diff --git a/docs/bundle.js b/docs/bundle.js index b9943be0fb..d4f61b983d 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -1,5170 +1,4144 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ function webpackJsonpCallback(data) { -/******/ var chunkIds = data[0]; -/******/ var moreModules = data[1]; -/******/ -/******/ -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = []; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(data); -/******/ -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ -/******/ }; -/******/ -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // Promise = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "bundle": 0 -/******/ }; -/******/ -/******/ -/******/ -/******/ // script path function -/******/ function jsonpScriptSrc(chunkId) { -/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "." + chunkId + ".js" -/******/ } -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var promises = []; -/******/ -/******/ -/******/ // JSONP chunk loading for javascript -/******/ -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData !== 0) { // 0 means "already installed". -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ promises.push(installedChunkData[2]); -/******/ } else { -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ promises.push(installedChunkData[2] = promise); -/******/ -/******/ // start chunk loading -/******/ var script = document.createElement('script'); -/******/ var onScriptComplete; -/******/ -/******/ script.charset = 'utf-8'; -/******/ script.timeout = 120; -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = jsonpScriptSrc(chunkId); -/******/ -/******/ // create error before stack unwound to get useful stacktrace later -/******/ var error = new Error(); -/******/ onScriptComplete = function (event) { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); -/******/ var realSrc = event && event.target && event.target.src; -/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; -/******/ error.name = 'ChunkLoadError'; -/******/ error.type = errorType; -/******/ error.request = realSrc; -/******/ chunk[1](error); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ var timeout = setTimeout(function(){ -/******/ onScriptComplete({ type: 'timeout', target: script }); -/******/ }, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ document.head.appendChild(script); -/******/ } -/******/ } -/******/ return Promise.all(promises); -/******/ }; -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // on error function for async loading -/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; -/******/ -/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; -/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); -/******/ jsonpArray.push = webpackJsonpCallback; -/******/ jsonpArray = jsonpArray.slice(); -/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); -/******/ var parentJsonpFunction = oldJsonpFunction; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ({ +!function(e){function t(t){for(var n,r,o=t[0],s=t[1],a=0,c=[];at.split(" ").forEach(t=>this.addClass(e,t)))}addClass(e,t){t&&e.classList&&e.classList.add(t)}removeClass(e,t){t&&e.classList&&e.classList.remove(t)}removeClasses(e,...t){t.forEach(t=>t.split(" ").forEach(t=>this.removeClass(e,t)))}toggleClass(e,t,n){e.classList&&e.classList.toggle(t,n)}},v=b.hasClass.bind(b),y=b.addClass.bind(b),w=b.addClasses.bind(b),C=b.removeClass.bind(b),S=b.removeClasses.bind(b),k=b.toggleClass.bind(b);class x{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function L(e,t,n,i){return new x(e,t,n,i)}function M(e){return function(t){return e(new s.a(t))}}let D=function(e,t,n,i){let r=n;return"click"===t||"mousedown"===t?r=M(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(r=function(e){return function(t){return e(new o.a(t))}}(n)),L(e,t,r,i)},E=function(e,t,n){return T(e,M(t),n)};function T(e,t,n){return L(e,u.c&&g.a.pointerEvents?he.POINTER_DOWN:he.MOUSE_DOWN,t,n)}function O(e,t,n){return L(e,u.c&&g.a.pointerEvents?he.POINTER_UP:he.MOUSE_UP,t,n)}function N(e,t){return L(e,"mouseout",n=>{let i=n.relatedTarget;for(;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})}function I(e,t){return L(e,"pointerout",n=>{let i=n.relatedTarget;for(;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})}let A,R,P=null;class j{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Object(l.e)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,n=!1,i=!1,r=()=>{for(n=!1,t=e,e=[],i=!0;t.length>0;){t.sort(j.sort),t.shift().execute()}i=!1};R=(t,i=0)=>{let o=new j(t,i);return e.push(o),n||(n=!0,function(e){if(!P){const e=e=>setTimeout(()=>e((new Date).getTime()),0);P=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}P.call(self,e)}(r)),o},A=(e,n)=>{if(i){let i=new j(e,n);return t.push(i),i}return R(e,n)}}();const F=16,B=function(e,t){return t};class W extends d.a{constructor(e,t,n,i=B,r=F){super();let o=null,s=0,l=this._register(new a.e),c=()=>{s=(new Date).getTime(),n(o),o=null};this._register(L(e,t,e=>{o=i(o,e);let t=(new Date).getTime()-s;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t)}))}}function H(e,t,n,i,r){return new W(e,t,n,i,r)}function Y(e){return document.defaultView.getComputedStyle(e,null)}function V(e){if(e!==document.body)return new U(e.clientWidth,e.clientHeight);if(u.c&&window.visualViewport){const e=window.visualViewport.width,t=window.visualViewport.height-(i.k?24:0);return new U(e,t)}if(window.innerWidth&&window.innerHeight)return new U(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new U(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new U(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class z{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){let i=Y(e),r="0";return i&&(r=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),z.convertToPixels(e,r)}static getBorderLeftWidth(e){return z.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return z.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return z.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return z.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return z.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return z.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return z.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return z.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return z.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return z.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return z.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return z.getDimension(e,"margin-bottom","marginBottom")}}class U{constructor(e,t){this.width=e,this.height=t}}function $(e){let t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;const r=ne(e)?null:Y(e);r&&(i-="rtl"!==r.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=z.getBorderLeftWidth(e),n+=z.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function q(e){let t=e.getBoundingClientRect();return{left:t.left+K.scrollX,top:t.top+K.scrollY,width:t.width,height:t.height}}const K=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function G(e){let t=z.getMarginLeft(e)+z.getMarginRight(e);return e.offsetWidth+t}function Z(e){let t=z.getBorderLeftWidth(e)+z.getBorderRightWidth(e),n=z.getPaddingLeft(e)+z.getPaddingRight(e);return e.offsetWidth-t-n}function J(e){let t=z.getBorderTopWidth(e)+z.getBorderBottomWidth(e),n=z.getPaddingTop(e)+z.getPaddingBottom(e);return e.offsetHeight-t-n}function X(e){let t=z.getMarginTop(e)+z.getMarginBottom(e);return e.offsetHeight+t}function Q(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ee(e,t,n){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(v(e,t))return e;if(n)if("string"==typeof n){if(v(e,n))return null}else if(e===n)return null;e=e.parentNode}return null}function te(e,t,n){return!!ee(e,t,n)}function ne(e){return e&&!!e.host&&!!e.mode}function ie(e){return!!re(e)}function re(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return ne(e)?e:null}function oe(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function se(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let ae=null;function le(){return ae||(ae=se()),ae}function ce(e,t,n=le()){n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function de(e,t=le()){if(!t)return;let n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[];for(let t=0;t=0;e--)t.sheet.deleteRule(i[e])}function ue(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const he={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:i.f?"mousewheel":"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:i.l?"webkitAnimationStart":"animationstart",ANIMATION_END:i.l?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:i.l?"webkitAnimationIteration":"animationiteration"},fe={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function ge(e){let t=[];for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function pe(e,t){for(let n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}class me extends d.a{constructor(e){super(),this._onDidFocus=this._register(new c.a),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.a),this.onDidBlur=this._onDidBlur.event;let t=Q(document.activeElement,e),n=!1;const i=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(n=!0,window.setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Q(document.activeElement,e)!==t&&(t?o():i())},this._register(Object(r.a)(e,he.FOCUS,!0)(i)),this._register(Object(r.a)(e,he.BLUR,!0)(o))}}function _e(e){return new me(e)}function be(e,...t){return t.forEach(t=>e.appendChild(t)),t[t.length-1]}const ve=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function ye(e,...t){e.innerText="",Object(h.d)(t).forEach(t=>{t instanceof Node?e.appendChild(t):e.appendChild(document.createTextNode(t))})}var we;function Ce(e,t,n,...i){let r=ve.exec(t);if(!r)throw new Error("Bad use of emmet");n=Object.assign({},n||{});let o,s=r[1]||"div";return o=e!==we.HTML?document.createElementNS(e,s):document.createElement(s),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),Object.keys(n).forEach(e=>{const t=n[e];void 0!==t&&(/^on\w+$/.test(e)?o[e]=t:"selected"===e?t&&o.setAttribute(e,"true"):o.setAttribute(e,t))}),Object(h.d)(i).forEach(e=>{e instanceof Node?o.appendChild(e):o.appendChild(document.createTextNode(e))}),o}function Se(e,t,...n){return Ce(we.HTML,e,t,...n)}function ke(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function xe(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function Le(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){let t=function(e,t){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}function Me(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function De(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Ee(e){if(u.g||i.g)window.open(e);else{let t=window.open();t&&(t.opener=null,t.location.href=e)}}function Te(e){const t=()=>{e(),n=R(t)};let n=R(t);return Object(d.h)(()=>n.dispose())}function Oe(e){return e&&f.b.vscodeRemote===e.scheme?f.a.rewrite(e):e}function Ne(e){return e?`url('${Oe(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(we||(we={})),Se.SVG=function(e,t,...n){return Ce(we.SVG,e,t,...n)},f.a.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http")},function(e,t,n){"use strict";n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return m}));var i=n(38);const r=!1,o="__is_disposable_tracked__";function s(e){if(r&&e&&e!==g.None)try{e[o]=!0}catch(e){}}function a(e){if(!r)return e;const t=new Error("Potentially leaked disposable").stack;return setTimeout(()=>{e[o]||console.log(t)},3e3),e}class l extends Error{constructor(e){super(`Encounter errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function c(e){return"function"==typeof e.dispose&&0===e.dispose.length}function d(e){if(i.a.is(e)){let t=[];for(const n of e)if(n){s(n);try{n.dispose()}catch(e){t.push(e)}}if(1===t.length)throw t[0];if(t.length>1)throw new l(t);return Array.isArray(e)?[]:e}if(e)return s(e),e.dispose(),e}function u(...e){return e.forEach(s),a({dispose:()=>d(e)})}function h(e){const t=a({dispose:()=>{s(t),e()}});return t}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(s(this),this._isDisposed=!0,this.clear())}clear(){try{d(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return s(e),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}f.DISABLE_DISPOSED_WARNING=!1;class g{constructor(){this._store=new f,a(this)}dispose(){s(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}g.None=Object.freeze({dispose(){}});class p{constructor(){this._isDisposed=!1,a(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value&&this._value.dispose(),e&&s(e),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,s(this),this._value&&this._value.dispose(),this._value=void 0}}class m{constructor(e){this.object=e}dispose(){}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(10);class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new r(n,i,o,s)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return nc?(o=c,s=d):o===c&&(s=Math.min(s,d)),n>o?null:n===o&&i>s?null:new r(n,i,o,s)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new i.a(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new i.a(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"f",(function(){return S})),n.d(t,"o",(function(){return k})),n.d(t,"j",(function(){return x})),n.d(t,"p",(function(){return L})),n.d(t,"q",(function(){return M})),n.d(t,"l",(function(){return D})),n.d(t,"k",(function(){return E})),n.d(t,"r",(function(){return T})),n.d(t,"n",(function(){return O})),n.d(t,"m",(function(){return N})),n.d(t,"d",(function(){return i})),n.d(t,"i",(function(){return R})),n.d(t,"g",(function(){return P})),n.d(t,"h",(function(){return j}));var i,r=n(0),o=n(15),s=n(24),a=n(33),l=n(10),c=n(54),d=n(110),u=n(25),h=n(28),f=n(9),g=n(80),p=n(46),m=n(108),_=n(20);class b{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=this._kbOpts.kbExpr;this.precondition&&(e=e?f.a.and(e,this.precondition):this.precondition),g.a.registerCommandAndKeybindingRule({id:this.id,handler:(e,t)=>this.runCommand(e,t),weight:this._kbOpts.weight,args:this._kbOpts.args,when:e,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else h.a.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){u.d.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon},when:e.when,order:e.order})}}class v extends b{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e{if(e.get(f.b).contextMatchesRules(Object(_.n)(this.precondition)))return this.runEditorCommand(e,i,t)})}}class C extends w{constructor(e){super(C.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function n(t){return t.menuId||(t.menuId=u.b.EditorContext),t.title||(t.title=e.label),t.when=f.a.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(m.a).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends C{constructor(e){super(e),this._implementations=[]}runEditorCommand(e,t,n){this.reportTelemetry(e,t);for(const t of this._implementations)if(t[1](e,n))return;return this.run(e,t,n||{})}}function k(e,t){h.a.registerCommand(e,(e,n)=>t(e,n||{}))}function x(e,t){k(e,(function(e,n){const{resource:i,position:r}=n;if(!(i instanceof s.a))throw Object(o.b)("resource");if(!l.a.isIPosition(r))throw Object(o.b)("position");const a=e.get(c.a).getModel(i);if(a){const e=l.a.lift(r);return t(a,e,n)}return e.get(d.a).createModelReference(i).then(e=>new Promise((i,o)=>{try{i(t(e.object.textEditorModel,l.a.lift(r),n))}catch(e){o(e)}}).finally(()=>{e.dispose()}))}))}function L(e,t){h.a.registerCommand(e,(function(e,...n){const[i,r]=n;Object(_.b)(s.a.isUri(i)),Object(_.b)(l.a.isIPosition(r));const o=e.get(c.a).getModel(i);if(o){const e=l.a.lift(r);return t(o,e,...n.slice(2))}return e.get(d.a).createModelReference(i).then(e=>new Promise((i,o)=>{try{i(t(e.object.textEditorModel,l.a.lift(r),n.slice(2)))}catch(e){o(e)}}).finally(()=>{e.dispose()}))}))}function M(e,t){h.a.registerCommand(e,(function(e,...n){const[i]=n;Object(_.b)(s.a.isUri(i));const r=e.get(c.a).getModel(i);return r?t(r,...n.slice(1)):e.get(d.a).createModelReference(i).then(e=>new Promise((i,r)=>{try{i(t(e.object.textEditorModel,n.slice(1)))}catch(e){r(e)}}).finally(()=>{e.dispose()}))}))}function D(e){return I.INSTANCE.registerEditorCommand(e),e}function E(e){const t=new e;return I.INSTANCE.registerEditorAction(t),t}function T(e){return I.INSTANCE.registerEditorAction(e),e}function O(e){I.INSTANCE.registerEditorAction(e)}function N(e,t){I.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return I.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return I.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return I.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return I.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)},e.getDiffEditorContributions=function(){return I.INSTANCE.getDiffEditorContributions()}}(i||(i={}));class I{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function A(e){return e.register(),e}I.INSTANCE=new I,p.a.add("editor.contributions",I.INSTANCE);const R=A(new v({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:u.b.MenubarEditMenu,group:"1_do",title:r.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:u.b.CommandPalette,group:"",title:r.a("undo","Undo"),order:1}]}));A(new y(R,{id:"default:undo",precondition:void 0}));const P=A(new v({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:u.b.MenubarEditMenu,group:"1_do",title:r.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:u.b.CommandPalette,group:"",title:r.a("redo","Redo"),order:1}]}));A(new y(P,{id:"default:redo",precondition:void 0}));const j=A(new v({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:u.b.MenubarSelectionMenu,group:"1_basic",title:r.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:u.b.CommandPalette,group:"",title:r.a("selectAll","Select All"),order:1}]}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"gc",(function(){return u})),n.d(t,"ab",(function(){return h})),n.d(t,"Y",(function(){return f})),n.d(t,"bb",(function(){return g})),n.d(t,"Z",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"b",(function(){return _})),n.d(t,"rc",(function(){return b})),n.d(t,"qc",(function(){return v})),n.d(t,"uc",(function(){return y})),n.d(t,"fb",(function(){return w})),n.d(t,"hb",(function(){return C})),n.d(t,"gb",(function(){return S})),n.d(t,"db",(function(){return k})),n.d(t,"cb",(function(){return x})),n.d(t,"eb",(function(){return L})),n.d(t,"lb",(function(){return M})),n.d(t,"nb",(function(){return D})),n.d(t,"mb",(function(){return E})),n.d(t,"ob",(function(){return T})),n.d(t,"qb",(function(){return O})),n.d(t,"pb",(function(){return N})),n.d(t,"ib",(function(){return I})),n.d(t,"kb",(function(){return A})),n.d(t,"jb",(function(){return R})),n.d(t,"f",(function(){return F})),n.d(t,"e",(function(){return B})),n.d(t,"g",(function(){return W})),n.d(t,"c",(function(){return H})),n.d(t,"d",(function(){return Y})),n.d(t,"ic",(function(){return V})),n.d(t,"kc",(function(){return z})),n.d(t,"lc",(function(){return U})),n.d(t,"jc",(function(){return $})),n.d(t,"cc",(function(){return q})),n.d(t,"u",(function(){return K})),n.d(t,"t",(function(){return G})),n.d(t,"T",(function(){return Z})),n.d(t,"S",(function(){return J})),n.d(t,"L",(function(){return X})),n.d(t,"K",(function(){return Q})),n.d(t,"D",(function(){return ee})),n.d(t,"C",(function(){return te})),n.d(t,"s",(function(){return ne})),n.d(t,"B",(function(){return ie})),n.d(t,"U",(function(){return re})),n.d(t,"W",(function(){return oe})),n.d(t,"V",(function(){return se})),n.d(t,"X",(function(){return ae})),n.d(t,"dc",(function(){return le})),n.d(t,"ec",(function(){return ce})),n.d(t,"fc",(function(){return de})),n.d(t,"Yb",(function(){return ue})),n.d(t,"Xb",(function(){return he})),n.d(t,"O",(function(){return fe})),n.d(t,"P",(function(){return ge})),n.d(t,"J",(function(){return pe})),n.d(t,"Q",(function(){return me})),n.d(t,"R",(function(){return _e})),n.d(t,"v",(function(){return be})),n.d(t,"x",(function(){return ve})),n.d(t,"z",(function(){return ye})),n.d(t,"w",(function(){return we})),n.d(t,"y",(function(){return Ce})),n.d(t,"A",(function(){return Se})),n.d(t,"H",(function(){return ke})),n.d(t,"E",(function(){return xe})),n.d(t,"G",(function(){return Le})),n.d(t,"F",(function(){return Me})),n.d(t,"I",(function(){return De})),n.d(t,"r",(function(){return Ee})),n.d(t,"N",(function(){return Te})),n.d(t,"M",(function(){return Oe})),n.d(t,"j",(function(){return Ne})),n.d(t,"k",(function(){return Ie})),n.d(t,"n",(function(){return Ae})),n.d(t,"p",(function(){return Re})),n.d(t,"o",(function(){return Pe})),n.d(t,"q",(function(){return je})),n.d(t,"l",(function(){return Fe})),n.d(t,"m",(function(){return Be})),n.d(t,"xb",(function(){return We})),n.d(t,"yb",(function(){return He})),n.d(t,"rb",(function(){return Ye})),n.d(t,"sb",(function(){return Ve})),n.d(t,"Db",(function(){return ze})),n.d(t,"Eb",(function(){return Ue})),n.d(t,"Cb",(function(){return $e})),n.d(t,"Ab",(function(){return qe})),n.d(t,"Bb",(function(){return Ke})),n.d(t,"tb",(function(){return Ge})),n.d(t,"zb",(function(){return Ze})),n.d(t,"ub",(function(){return Je})),n.d(t,"wb",(function(){return Xe})),n.d(t,"vb",(function(){return Qe})),n.d(t,"tc",(function(){return et})),n.d(t,"Gb",(function(){return tt})),n.d(t,"Hb",(function(){return nt})),n.d(t,"Fb",(function(){return it})),n.d(t,"Kb",(function(){return rt})),n.d(t,"Ib",(function(){return ot})),n.d(t,"Jb",(function(){return st})),n.d(t,"Lb",(function(){return at})),n.d(t,"oc",(function(){return lt})),n.d(t,"pc",(function(){return ct})),n.d(t,"mc",(function(){return dt})),n.d(t,"nc",(function(){return ut})),n.d(t,"Vb",(function(){return ht})),n.d(t,"Wb",(function(){return ft})),n.d(t,"Ob",(function(){return gt})),n.d(t,"Pb",(function(){return pt})),n.d(t,"Nb",(function(){return mt})),n.d(t,"Tb",(function(){return _t})),n.d(t,"Mb",(function(){return bt})),n.d(t,"Rb",(function(){return vt})),n.d(t,"Sb",(function(){return yt})),n.d(t,"Qb",(function(){return wt})),n.d(t,"Zb",(function(){return Ct})),n.d(t,"bc",(function(){return St})),n.d(t,"ac",(function(){return kt})),n.d(t,"i",(function(){return xt})),n.d(t,"sc",(function(){return Mt})),n.d(t,"Ub",(function(){return Dt})),n.d(t,"hc",(function(){return Tt}));var i=n(46),r=n(13),o=n(6),s=n(0),a=n(265),l=n(19);const c={ColorContribution:"base.contributions.colors"};const d=new class{constructor(){this._onDidChangeSchema=new o.a,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){let o={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=o;let s={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(s.deprecationMessage=r),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n&&n.defaults){return Tt(n.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((e,t)=>{let n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)}).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}};function u(e,t,n,i,r){return d.registerColor(e,t,n,i,r)}i.a.add(c.ColorContribution,d);const h=u("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},s.a("foreground","Overall foreground color. This color is only used if not overridden by a component.")),f=u("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},s.a("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),g=u("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},s.a("iconForeground","The default color for icons in the workbench.")),p=u("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},s.a("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),m=u("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},s.a("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),_=u("contrastActiveBorder",{light:null,dark:null,hc:p},s.a("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),b=u("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.a("textLinkForeground","Foreground color for links in text.")),v=u("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:r.a.black},s.a("textCodeBlockBackground","Background color for code blocks in text.")),y=u("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},s.a("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),w=u("input.background",{dark:"#3C3C3C",light:r.a.white,hc:r.a.black},s.a("inputBoxBackground","Input box background.")),C=u("input.foreground",{dark:h,light:h,hc:h},s.a("inputBoxForeground","Input box foreground.")),S=u("input.border",{dark:null,light:null,hc:m},s.a("inputBoxBorder","Input box border.")),k=u("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:m},s.a("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),x=u("inputOption.activeBackground",{dark:Mt(p,.4),light:Mt(p,.2),hc:r.a.transparent},s.a("inputOption.activeBackground","Background color of activated options in input fields.")),L=u("inputOption.activeForeground",{dark:r.a.white,light:r.a.black,hc:null},s.a("inputOption.activeForeground","Foreground color of activated options in input fields.")),M=u("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:r.a.black},s.a("inputValidationInfoBackground","Input validation background color for information severity.")),D=u("inputValidation.infoForeground",{dark:null,light:null,hc:null},s.a("inputValidationInfoForeground","Input validation foreground color for information severity.")),E=u("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:m},s.a("inputValidationInfoBorder","Input validation border color for information severity.")),T=u("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:r.a.black},s.a("inputValidationWarningBackground","Input validation background color for warning severity.")),O=u("inputValidation.warningForeground",{dark:null,light:null,hc:null},s.a("inputValidationWarningForeground","Input validation foreground color for warning severity.")),N=u("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:m},s.a("inputValidationWarningBorder","Input validation border color for warning severity.")),I=u("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:r.a.black},s.a("inputValidationErrorBackground","Input validation background color for error severity.")),A=u("inputValidation.errorForeground",{dark:null,light:null,hc:null},s.a("inputValidationErrorForeground","Input validation foreground color for error severity.")),R=u("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:m},s.a("inputValidationErrorBorder","Input validation border color for error severity.")),P=u("dropdown.background",{dark:"#3C3C3C",light:r.a.white,hc:r.a.black},s.a("dropdownBackground","Dropdown background.")),j=u("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:r.a.white},s.a("dropdownForeground","Dropdown foreground.")),F=u("button.foreground",{dark:r.a.white,light:r.a.white,hc:r.a.white},s.a("buttonForeground","Button foreground color.")),B=u("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},s.a("buttonBackground","Button background color.")),W=u("button.hoverBackground",{dark:Lt(B,.2),light:xt(B,.2),hc:null},s.a("buttonHoverBackground","Button background color when hovering.")),H=u("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:r.a.black},s.a("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Y=u("badge.foreground",{dark:r.a.white,light:"#333",hc:r.a.white},s.a("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),V=u("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},s.a("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),z=u("scrollbarSlider.background",{dark:r.a.fromHex("#797979").transparent(.4),light:r.a.fromHex("#646464").transparent(.4),hc:Mt(m,.6)},s.a("scrollbarSliderBackground","Scrollbar slider background color.")),U=u("scrollbarSlider.hoverBackground",{dark:r.a.fromHex("#646464").transparent(.7),light:r.a.fromHex("#646464").transparent(.7),hc:Mt(m,.8)},s.a("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),$=u("scrollbarSlider.activeBackground",{dark:r.a.fromHex("#BFBFBF").transparent(.4),light:r.a.fromHex("#000000").transparent(.6),hc:m},s.a("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),q=u("progressBar.background",{dark:r.a.fromHex("#0E70C0"),light:r.a.fromHex("#0E70C0"),hc:m},s.a("progressBarBackground","Background color of the progress bar that can show for long running operations.")),K=u("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},s.a("editorError.foreground","Foreground color of error squigglies in the editor.")),G=u("editorError.border",{dark:null,light:null,hc:r.a.fromHex("#E47777").transparent(.8)},s.a("errorBorder","Border color of error boxes in the editor.")),Z=u("editorWarning.foreground",{dark:"#CCA700",light:"#E9A700",hc:null},s.a("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),J=u("editorWarning.border",{dark:null,light:null,hc:r.a.fromHex("#FFCC00").transparent(.8)},s.a("warningBorder","Border color of warning boxes in the editor.")),X=u("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},s.a("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Q=u("editorInfo.border",{dark:null,light:null,hc:r.a.fromHex("#75BEFF").transparent(.8)},s.a("infoBorder","Border color of info boxes in the editor.")),ee=u("editorHint.foreground",{dark:r.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},s.a("editorHint.foreground","Foreground color of hint squigglies in the editor.")),te=u("editorHint.border",{dark:null,light:null,hc:r.a.fromHex("#eeeeee").transparent(.8)},s.a("hintBorder","Border color of hint boxes in the editor.")),ne=u("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:r.a.black},s.a("editorBackground","Editor background color.")),ie=u("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:r.a.white},s.a("editorForeground","Editor default foreground color.")),re=u("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},s.a("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),oe=u("editorWidget.foreground",{dark:h,light:h,hc:h},s.a("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),se=u("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:m},s.a("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),ae=u("editorWidget.resizeBorder",{light:null,dark:null,hc:null},s.a("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),le=u("quickInput.background",{dark:re,light:re,hc:re},s.a("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ce=u("quickInput.foreground",{dark:oe,light:oe,hc:oe},s.a("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),de=u("quickInputTitle.background",{dark:new r.a(new r.c(255,255,255,.105)),light:new r.a(new r.c(0,0,0,.06)),hc:"#000000"},s.a("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ue=u("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:r.a.white},s.a("pickerGroupForeground","Quick picker color for grouping labels.")),he=u("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:r.a.white},s.a("pickerGroupBorder","Quick picker color for grouping borders.")),fe=u("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},s.a("editorSelectionBackground","Color of the editor selection.")),ge=u("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},s.a("editorSelectionForeground","Color of the selected text for high contrast.")),pe=u("editor.inactiveSelectionBackground",{light:Mt(fe,.5),dark:Mt(fe,.5),hc:Mt(fe,.5)},s.a("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),me=u("editor.selectionHighlightBackground",{light:Et(fe,ne,.3,.6),dark:Et(fe,ne,.3,.6),hc:null},s.a("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),_e=u("editor.selectionHighlightBorder",{light:null,dark:null,hc:_},s.a("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),be=u("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},s.a("editorFindMatch","Color of the current search match.")),ve=u("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},s.a("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),ye=u("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},s.a("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),we=u("editor.findMatchBorder",{light:null,dark:null,hc:_},s.a("editorFindMatchBorder","Border color of the current search match.")),Ce=u("editor.findMatchHighlightBorder",{light:null,dark:null,hc:_},s.a("findMatchHighlightBorder","Border color of the other search matches.")),Se=u("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Mt(_,.4)},s.a("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),ke=u("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},s.a("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),xe=u("editorHoverWidget.background",{light:re,dark:re,hc:re},s.a("hoverBackground","Background color of the editor hover.")),Le=u("editorHoverWidget.foreground",{light:oe,dark:oe,hc:oe},s.a("hoverForeground","Foreground color of the editor hover.")),Me=u("editorHoverWidget.border",{light:se,dark:se,hc:se},s.a("hoverBorder","Border color of the editor hover.")),De=u("editorHoverWidget.statusBarBackground",{dark:Lt(xe,.2),light:xt(xe,.05),hc:re},s.a("statusBarBackground","Background color of the editor hover status bar.")),Ee=u("editorLink.activeForeground",{dark:"#4E94CE",light:r.a.blue,hc:r.a.cyan},s.a("activeLinkForeground","Color of active links.")),Te=u("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},s.a("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Oe=u("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},s.a("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),Ne=new r.a(new r.c(155,185,85,.2)),Ie=new r.a(new r.c(255,0,0,.2)),Ae=u("diffEditor.insertedTextBackground",{dark:Ne,light:Ne,hc:null},s.a("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Re=u("diffEditor.removedTextBackground",{dark:Ie,light:Ie,hc:null},s.a("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Pe=u("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},s.a("diffEditorInsertedOutline","Outline color for the text that got inserted.")),je=u("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},s.a("diffEditorRemovedOutline","Outline color for text that got removed.")),Fe=u("diffEditor.border",{dark:null,light:null,hc:m},s.a("diffEditorBorder","Border color between the two text editors.")),Be=u("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},s.a("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),We=u("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},s.a("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),He=u("list.focusForeground",{dark:null,light:null,hc:null},s.a("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ye=u("list.activeSelectionBackground",{dark:"#094771",light:"#0074E8",hc:null},s.a("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ve=u("list.activeSelectionForeground",{dark:r.a.white,light:r.a.white,hc:null},s.a("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ze=u("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},s.a("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Ue=u("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},s.a("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),$e=u("list.inactiveFocusBackground",{dark:null,light:null,hc:null},s.a("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),qe=u("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},s.a("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Ke=u("list.hoverForeground",{dark:null,light:null,hc:null},s.a("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Ge=u("list.dropBackground",{dark:We,light:We,hc:null},s.a("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Ze=u("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:p},s.a("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Je=u("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:r.a.black},s.a("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Xe=u("listFilterWidget.outline",{dark:r.a.transparent,light:r.a.transparent,hc:"#f38518"},s.a("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Qe=u("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:m},s.a("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),et=u("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},s.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),tt=u("menu.border",{dark:null,light:null,hc:m},s.a("menuBorder","Border color of menus.")),nt=u("menu.foreground",{dark:j,light:h,hc:j},s.a("menuForeground","Foreground color of menu items.")),it=u("menu.background",{dark:P,light:P,hc:P},s.a("menuBackground","Background color of menu items.")),rt=u("menu.selectionForeground",{dark:Ve,light:Ve,hc:Ve},s.a("menuSelectionForeground","Foreground color of the selected menu item in menus.")),ot=u("menu.selectionBackground",{dark:Ye,light:Ye,hc:Ye},s.a("menuSelectionBackground","Background color of the selected menu item in menus.")),st=u("menu.selectionBorder",{dark:null,light:null,hc:_},s.a("menuSelectionBorder","Border color of the selected menu item in menus.")),at=u("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:m},s.a("menuSeparatorBackground","Color of a separator menu item in menus.")),lt=u("editor.snippetTabstopHighlightBackground",{dark:new r.a(new r.c(124,124,124,.3)),light:new r.a(new r.c(10,50,100,.2)),hc:new r.a(new r.c(124,124,124,.3))},s.a("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),ct=u("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},s.a("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),dt=u("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},s.a("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),ut=u("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new r.a(new r.c(10,50,100,.5)),hc:"#525252"},s.a("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),ht=u("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},s.a("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),ft=u("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},s.a("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),gt=u("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},s.a("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),pt=u("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},s.a("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),mt=u("minimap.errorHighlight",{dark:new r.a(new r.c(255,18,18,.7)),light:new r.a(new r.c(255,18,18,.7)),hc:new r.a(new r.c(255,50,50,1))},s.a("minimapError","Minimap marker color for errors.")),_t=u("minimap.warningHighlight",{dark:Z,light:Z,hc:J},s.a("overviewRuleWarning","Minimap marker color for warnings.")),bt=u("minimap.background",{dark:null,light:null,hc:null},s.a("minimapBackground","Minimap background color.")),vt=u("minimapSlider.background",{light:Mt(z,.5),dark:Mt(z,.5),hc:Mt(z,.5)},s.a("minimapSliderBackground","Minimap slider background color.")),yt=u("minimapSlider.hoverBackground",{light:Mt(U,.5),dark:Mt(U,.5),hc:Mt(U,.5)},s.a("minimapSliderHoverBackground","Minimap slider background color when hovering.")),wt=u("minimapSlider.activeBackground",{light:Mt($,.5),dark:Mt($,.5),hc:Mt($,.5)},s.a("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),Ct=u("problemsErrorIcon.foreground",{dark:K,light:K,hc:K},s.a("problemsErrorIconForeground","The color used for the problems error icon.")),St=u("problemsWarningIcon.foreground",{dark:Z,light:Z,hc:Z},s.a("problemsWarningIconForeground","The color used for the problems warning icon.")),kt=u("problemsInfoIcon.foreground",{dark:X,light:X,hc:X},s.a("problemsInfoIconForeground","The color used for the problems info icon."));function xt(e,t){return n=>{let i=Tt(e,n);if(i)return i.darken(t)}}function Lt(e,t){return n=>{let i=Tt(e,n);if(i)return i.lighten(t)}}function Mt(e,t){return n=>{let i=Tt(e,n);if(i)return i.transparent(t)}}function Dt(...e){return t=>{for(let n of e){let e=Tt(n,t);if(e)return e}}}function Et(e,t,n,i){return o=>{let s=Tt(e,o);if(s){let e=Tt(t,o);return e?s.isDarkerThan(e)?r.a.getLighterColor(s,e,n).transparent(i):r.a.getDarkerColor(s,e,n).transparent(i):s.transparent(n*i)}}}function Tt(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?r.a.fromHex(e):t.getColor(e):e instanceof r.a?e:"function"==typeof e?e(t):void 0}let Ot=i.a.as(a.a.JSONContribution);Ot.registerSchema("vscode://schemas/workbench-colors",d.getColorSchema());const Nt=new l.d(()=>Ot.notifySchemaChanged("vscode://schemas/workbench-colors"),200);d.onDidChangeSchema(()=>{Nt.isScheduled()||Nt.schedule()})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return h}));var i,r=n(15),o=n(2),s=n(84);!function(e){function t(e){return(t,n=null,i)=>{let r,o=!1;return r=e(e=>{if(!o)return r?r.dispose():o=!0,t.call(n,e)},null,i),o&&r.dispose(),r}}function n(e,t){return a((n,i=null,r)=>e(e=>n.call(i,t(e)),null,r))}function i(e,t){return a((n,i=null,r)=>e(e=>{t(e),n.call(i,e)},null,r))}function r(e,t){return a((n,i=null,r)=>e(e=>t(e)&&n.call(i,e),null,r))}function s(e,t,i){let r=i;return n(e,e=>r=t(r,e))}function a(e){let t;const n=new c({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event}function l(e,t,n=100,i=!1,r){let o,s=void 0,a=void 0,l=0;const d=new c({leakWarningThreshold:r,onFirstListenerAdd(){o=e(e=>{l++,s=t(s,e),i&&!a&&(d.fire(s),s=void 0),clearTimeout(a),a=setTimeout(()=>{const e=s;s=void 0,a=void 0,(!i||l>1)&&d.fire(e),l=0},n)})},onLastListenerRemove(){o.dispose()}});return d.event}function d(e){let t,n=!0;return r(e,e=>{const i=n||e!==t;return n=!1,t=e,i})}e.None=()=>o.a.None,e.once=t,e.map=n,e.forEach=i,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>Object(o.e)(...e.map(e=>e(e=>t.call(n,e),null,i)))},e.reduce=s,e.snapshot=a,e.debounce=l,e.stopwatch=function(e){const i=(new Date).getTime();return n(t(e),e=>(new Date).getTime()-i)},e.latch=d,e.buffer=function(e,t=!1,n=[]){let i=n.slice(),r=e(e=>{i?i.push(e):s.fire(e)});const o=()=>{i&&i.forEach(e=>s.fire(e)),i=null},s=new c({onFirstListenerAdd(){r||(r=e(e=>s.fire(e)))},onFirstListenerDidAdd(){i&&(t?setTimeout(o):o())},onLastListenerRemove(){r&&r.dispose(),r=null}});return s.event};class u{constructor(e){this.event=e}map(e){return new u(n(this.event,e))}forEach(e){return new u(i(this.event,e))}filter(e){return new u(r(this.event,e))}reduce(e,t){return new u(s(this.event,e,t))}latch(){return new u(d(this.event))}debounce(e,t=100,n=!1,i){return new u(l(this.event,e,t,n,i))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}e.chain=function(e){return new u(e)},e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new c({onFirstListenerAdd:()=>e.on(t,i),onLastListenerRemove:()=>e.removeListener(t,i)});return r.event},e.fromDOMEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new c({onFirstListenerAdd:()=>e.addEventListener(t,i),onLastListenerRemove:()=>e.removeEventListener(t,i)});return r.event},e.fromPromise=function(e){const t=new c;let n=!1;return e.then(void 0,()=>null).then(()=>{n?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),n=!0,t.event},e.toPromise=function(e){return new Promise(n=>t(e)(n))}}(i||(i={}));let a=-1;class l{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=a;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e{const e=this._stacks.get(n)||0;this._stacks.set(n,e-1)}}}class c{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=a>0?new l(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=(e,t,n)=>{this._listeners||(this._listeners=new s.a);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(t?[e,t]:e);let a,l;return i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t),this._leakageMon&&(a=this._leakageMon.check(this._listeners.size)),l={dispose:()=>{if(a&&a(),l.dispose=c._noop,!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}},n instanceof o.b?n.add(l):Array.isArray(n)&&n.push(l),l}),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.a);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(;this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){Object(r.e)(e)}}}}dispose(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}c._noop=function(){};class d extends c{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.a,this._mergeFn=e&&e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=this._eventQueue.toArray();this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class u{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(e=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>t.call(n,e)):t.call(n,e)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(e=>e()),n}}class h{constructor(){this.listening=!1,this.inputEvent=i.None,this.inputEventListener=o.a.None,this.emitter=new c({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i,r=n(9);!function(e){e.editorSimpleInput=new r.c("editorSimpleInput",!1),e.editorTextFocus=new r.c("editorTextFocus",!1),e.focus=new r.c("editorFocus",!1),e.textInputFocus=new r.c("textInputFocus",!1),e.readOnly=new r.c("editorReadonly",!1),e.columnSelection=new r.c("editorColumnSelection",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new r.c("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new r.c("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new r.c("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new r.c("isInEmbeddedEditor",!1),e.canUndo=new r.c("canUndo",!1),e.canRedo=new r.c("canRedo",!1),e.hoverVisible=new r.c("editorHoverVisible",!1),e.inCompositeEditor=new r.c("inCompositeEditor",void 0),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new r.c("editorLangId",""),e.hasCompletionItemProvider=new r.c("editorHasCompletionItemProvider",!1),e.hasCodeActionsProvider=new r.c("editorHasCodeActionsProvider",!1),e.hasCodeLensProvider=new r.c("editorHasCodeLensProvider",!1),e.hasDefinitionProvider=new r.c("editorHasDefinitionProvider",!1),e.hasDeclarationProvider=new r.c("editorHasDeclarationProvider",!1),e.hasImplementationProvider=new r.c("editorHasImplementationProvider",!1),e.hasTypeDefinitionProvider=new r.c("editorHasTypeDefinitionProvider",!1),e.hasHoverProvider=new r.c("editorHasHoverProvider",!1),e.hasDocumentHighlightProvider=new r.c("editorHasDocumentHighlightProvider",!1),e.hasDocumentSymbolProvider=new r.c("editorHasDocumentSymbolProvider",!1),e.hasReferenceProvider=new r.c("editorHasReferenceProvider",!1),e.hasRenameProvider=new r.c("editorHasRenameProvider",!1),e.hasSignatureHelpProvider=new r.c("editorHasSignatureHelpProvider",!1),e.hasDocumentFormattingProvider=new r.c("editorHasDocumentFormattingProvider",!1),e.hasDocumentSelectionFormattingProvider=new r.c("editorHasDocumentSelectionFormattingProvider",!1),e.hasMultipleDocumentFormattingProvider=new r.c("editorHasMultipleDocumentFormattingProvider",!1),e.hasMultipleDocumentSelectionFormattingProvider=new r.c("editorHasMultipleDocumentSelectionFormattingProvider",!1)}(i||(i={}))},function(e,t,n){"use strict";function i(e){return!e||"string"!=typeof e||0===e.trim().length}function r(e,t,n="0"){const i=""+e,r=[i];for(let e=i.length;e=t.length?e:t[i]}))}function a(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function l(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function c(e,t=" "){return u(d(e,t),t)}function d(e,t){if(!e||!t)return e;const n=t.length;if(0===n||0===e.length)return e;let i=0;for(;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function u(e,t){if(!e||!t)return e;const n=t.length,i=e.length;if(0===n||0===i)return e;let r=i,o=-1;for(;-1!==(o=e.lastIndexOf(t,r-1))&&o+n===r;){if(0===o)return"";r=o}return e.substring(0,r)}function h(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function g(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function m(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=l(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),n.unicode&&(i+="u"),new RegExp(e,i)}function _(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;return!(!e.exec("")||0!==e.lastIndex)}function b(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function v(e){for(let t=0,n=e.length;t=0;n--){const t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1}function C(e,t){return et?1:0}function S(e,t,n=0,i=e.length,r=0,o=t.length){for(;no)return 1}const s=i-n,a=o-r;return sa?1:0}function k(e,t){return x(e,t,0,e.length,0,t.length)}function x(e,t,n=0,i=e.length,r=0,o=t.length){for(;na?1:0}function L(e){return e>=97&&e<=122}function M(e){return e>=65&&e<=90}function D(e){return L(e)||M(e)}function E(e,t){return e.length===t.length&&T(e,t)}function T(e,t,n=e.length){for(let i=0;ie.length)&&T(e,t,n)}function N(e,t){let n,i=Math.min(e.length,t.length);for(n=0;n1){const i=e.charCodeAt(t-2);if(A(i))return P(i,n)}return n}function B(e,t){const n=oe.getInstance(),i=t,r=e.length,o=j(e,r,t);t+=o>=65536?2:1;let s=n.getGraphemeBreakType(o);for(;t=65536?2:1,s=o}return t-i}function W(e,t){const n=oe.getInstance(),i=t,r=F(e,t);t-=r>=65536?2:1;let o=n.getGraphemeBreakType(r);for(;t>0;){const i=F(e,t),r=n.getGraphemeBreakType(i);if(re(r,o))break;t-=i>=65536?2:1,o=r}return i-t}function H(e){const t=e.byteLength,n=[];let i=0;for(;i=240&&i+3>>0|(63&e[i++])<<12>>>0|(63&e[i++])<<6>>>0|(63&e[i++])<<0>>>0:r>=224&&i+2>>0|(63&e[i++])<<6>>>0|(63&e[i++])<<0>>>0:r>=192&&i+1>>0|(63&e[i++])<<0>>>0:e[i++])>=0&&o<=55295||o>=57344&&o<=65535)n.push(String.fromCharCode(o));else if(o>=65536&&o<=1114111){const e=o-65536,t=55296+((1047552&e)>>>10),i=56320+((1023&e)>>>0);n.push(String.fromCharCode(t)),n.push(String.fromCharCode(i))}else n.push(String.fromCharCode(65533))}return n.join("")}const 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])/;function V(e){return Y.test(e)}const z=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function U(e){return z.test(e)}const $=/^[\t\n\r\x20-\x7E]*$/;function q(e){return $.test(e)}const K=/[\u2028\u2029]/;function G(e){return K.test(e)}function Z(e){for(let t=0,n=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function X(e){return e>=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685}const Q=String.fromCharCode(65279);function ee(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function te(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ne(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function ie(e){return oe.getInstance().getGraphemeBreakType(e)}function re(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class oe{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return oe._INSTANCE||(oe._INSTANCE=new oe),oe._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(et[3*i+1]))return t[3*i+2];i=2*i+1}return 0}}oe._INSTANCE=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return k}));var i=n(8),r=n(17),o=n(12);const s=new Map;s.set("false",!1),s.set("true",!0),s.set("isMac",o.f),s.set("isLinux",o.d),s.set("isWindows",o.i),s.set("isWeb",o.h),s.set("isMacNative",o.f&&!o.h);const a=Object.prototype.hasOwnProperty;class l{static has(e){return h.create(e)}static equals(e,t){return f.create(e,t)}static regex(e,t){return b.create(e,t)}static not(e){return _.create(e)}static and(...e){return y.create(e)}static or(...e){return w.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let n=e.split("||");return w.create(n.map(e=>this._deserializeAndExpression(e,t)))}static _deserializeAndExpression(e,t){let n=e.split("&&");return y.create(n.map(e=>this._deserializeOne(e,t)))}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let n=e.split("!=");return m.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){let n=e.split("==");return f.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("=~")>=0){let n=e.split("=~");return b.create(n[0].trim(),this._deserializeRegexValue(n[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return g.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?_.create(e.substr(1).trim()):h.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e}static _deserializeRegexValue(e,t){if(Object(i.D)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let n=e.indexOf("/"),r=e.lastIndexOf("/");if(n===r||n<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let o=e.slice(n+1,r),s="i"===e[r+1]?"i":"";try{return new RegExp(o,s)}catch(n){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${n}`);return console.warn(`bad regexp-value '${e}', parse error: ${n}`),null}}}function c(e,t){return e.cmp(t)}class d{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return u.INSTANCE}}d.INSTANCE=new d;class u{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return d.INSTANCE}}u.INSTANCE=new u;class h{constructor(e){this.key=e,this.type=2}static create(e){const t=s.get(e);return"boolean"==typeof t?t?u.INSTANCE:d.INSTANCE:new h(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return _.create(this.key)}}class f{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"==typeof t)return t?h.create(e):_.create(e);const n=s.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?u.INSTANCE:d.INSTANCE}return new f(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return this.key+" == '"+this.value+"'"}keys(){return[this.key]}negate(){return m.create(this.key,this.value)}}class g{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new g(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valueKeye.valueKey?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.indexOf(n)>=0:"string"==typeof n&&"object"==typeof t&&null!==t&&a.call(t,n)}serialize(){return this.key+" in '"+this.valueKey+"'"}keys(){return[this.key,this.valueKey]}negate(){return p.create(this)}}class p{constructor(e){this._actual=e,this.type=11}static create(e){return new p(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class m{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"==typeof t)return t?_.create(e):h.create(e);const n=s.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?d.INSTANCE:u.INSTANCE}return new m(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return this.key+" != '"+this.value+"'"}keys(){return[this.key]}negate(){return f.create(this.key,this.value)}}class _{constructor(e){this.key=e,this.type=3}static create(e){const t=s.get(e);return"boolean"==typeof t?t?d.INSTANCE:u.INSTANCE:new _(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return"!"+this.key}keys(){return[this.key]}negate(){return h.create(this.key)}}class b{constructor(e,t){this.key=e,this.regexp=t,this.type=7}static create(e,t){return new b(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return v.create(this)}}class v{constructor(e){this._actual=e,this.type=8}static create(e){return new v(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class y{constructor(e){this.expr=e,this.type=6}static create(e){return y._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const e=t[t.length-1];if(9!==e.type)break;t.pop();const n=t.pop(),i=w.create(e.expr.map(e=>y.create([e,n])));i&&(t.push(i),t.sort(c))}return new y(t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return w.create(e)}}class w{constructor(e){this.expr=e,this.type=9}static create(e){const t=w._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new w(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());const t=e=>9===e.type?e.expr:[e];for(;e.length>1;){const n=e.shift(),i=e.shift(),r=[];for(const e of t(n))for(const n of t(i))r.push(l.and(e,n));e.unshift(l.or(...r))}return e[0]}}class C extends h{constructor(e,t){super(e),this._defaultValue=t}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return l.not(this.key)}}const S=Object(r.c)("contextKeyService"),k="setContext"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumberr&&(r=e)}return r}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){const{language:r,pattern:o,scheme:s,hasAccessToAllModels:c}=e;if(!i&&!c)return 0;let d=0;if(s)if(s===t.scheme)d=10;else{if("*"!==s)return 0;d=5}if(r)if(r===n)d=10;else{if("*"!==r)return 0;d=Math.max(d,5)}if(o){let e;if((e="string"==typeof o?o:Object.assign(Object.assign({},o),{base:Object(l.d)(o.base)}))!==t.fsPath&&!Object(a.a)(e,t.fsPath))return 0;d=10}return d}return 0}var d=n(54);function u(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(u):!!e.exclusive)}class h{constructor(){this._clock=0,this._entries=[],this._onDidChange=new o.a}get onDidChange(){return this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(s.h)(()=>{if(n){let e=this._entries.indexOf(n);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,e=>t.push(e.provider)),t}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,e=>{n&&i===e._score?n.push(e.provider):(i=e._score,n=[e.provider],t.push(n))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=c(t.selector,e.uri,e.getLanguageIdentifier().language,Object(d.b)(e)),u(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(h._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}var f=n(16);n.d(t,"r",(function(){return g})),n.d(t,"B",(function(){return p})),n.d(t,"F",(function(){return m})),n.d(t,"E",(function(){return _})),n.d(t,"z",(function(){return b})),n.d(t,"h",(function(){return v})),n.d(t,"G",(function(){return w})),n.d(t,"A",(function(){return y})),n.d(t,"n",(function(){return C})),n.d(t,"v",(function(){return S})),n.d(t,"w",(function(){return k})),n.d(t,"d",(function(){return x})),n.d(t,"y",(function(){return L})),n.d(t,"p",(function(){return M})),n.d(t,"m",(function(){return D})),n.d(t,"i",(function(){return E})),n.d(t,"u",(function(){return T})),n.d(t,"f",(function(){return O})),n.d(t,"e",(function(){return N})),n.d(t,"q",(function(){return I})),n.d(t,"D",(function(){return A})),n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return P})),n.d(t,"g",(function(){return j})),n.d(t,"j",(function(){return F})),n.d(t,"t",(function(){return B})),n.d(t,"s",(function(){return W})),n.d(t,"c",(function(){return H})),n.d(t,"x",(function(){return Y})),n.d(t,"o",(function(){return V})),n.d(t,"l",(function(){return z})),n.d(t,"k",(function(){return U})),n.d(t,"C",(function(){return $}));class g{constructor(e,t){this.language=e,this.id=t}}class p{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;return 1&i&&(r+="font-style: italic;"),2&i&&(r+="font-weight: bold;"),4&i&&(r+="text-decoration: underline;"),r}}const m=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const n=e[t];let i=n&&f.c.get(n);return i||(console.info("No codicon found for CompletionItemKind "+t),i=f.a.symbolProperty),i.classNames}}();let _=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,n){let i=e[t];return void 0!==i||n||(i=9),i}}();var b,v,y;function w(e){return e&&i.a.isUri(e.uri)&&r.a.isIRange(e.range)&&(r.a.isIRange(e.originSelectionRange)||r.a.isIRange(e.targetSelectionRange))}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(b||(b={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(v||(v={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const n=new Map;n.set(0,"file"),n.set(1,"module"),n.set(2,"namespace"),n.set(3,"package"),n.set(4,"class"),n.set(5,"method"),n.set(6,"property"),n.set(7,"field"),n.set(8,"constructor"),n.set(9,"enum"),n.set(10,"interface"),n.set(11,"function"),n.set(12,"variable"),n.set(13,"constant"),n.set(14,"string"),n.set(15,"number"),n.set(16,"boolean"),n.set(17,"array"),n.set(18,"object"),n.set(19,"key"),n.set(20,"null"),n.set(21,"enum-member"),n.set(22,"struct"),n.set(23,"event"),n.set(24,"operator"),n.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return n.get(e)},e.toCssClassName=function(e,t){const i=n.get(e);let r=i&&f.c.get("symbol-"+i);return r||(console.info("No codicon found for SymbolKind "+e),r=f.a.symbolProperty),`${t?"inline":"block"} ${r.classNames}`}}(y||(y={}));class C{constructor(e){this.value=e}}C.Comment=new C("comment"),C.Imports=new C("imports"),C.Region=new C("region");const S=new h,k=new h,x=new h,L=new h,M=new h,D=new h,E=new h,T=new h,O=new h,N=new h,I=new h,A=new h,R=new h,P=new h,j=new h,F=new h,B=new h,W=new h,H=new h,Y=new h,V=new h,z=new h,U=new h,$=new class{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new o.a,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Object(s.h)(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let n=null,i=!1;return this._promises.set(e,t.then(t=>{this._promises.delete(e),!i&&t&&(n=this.register(e,t))})),Object(s.h)(()=>{i=!0,n&&n.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const n=this._promises.get(e);return n?n.then(t=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},function(e,t,n){"use strict";(function(e,i){n.d(t,"i",(function(){return m})),n.d(t,"f",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return y})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"j",(function(){return S})),n.d(t,"a",(function(){return k})),n.d(t,"e",(function(){return M}));let r=!1,o=!1,s=!1,a=!1,l=!1,c=!1,d=void 0,u="en",h=void 0,f=void 0;const g=void 0!==e&&void 0!==e.versions&&void 0!==e.versions.electron&&"renderer"===e.type;if("object"!=typeof navigator||g){if("object"==typeof e){r="win32"===e.platform,o="darwin"===e.platform,s="linux"===e.platform,d="en",u="en";const t=e.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t),n=e.availableLanguages["*"];d=e.locale,u=n||"en",h=e._translationsConfigFile}catch(e){}a=!0}}else r=(f=navigator.userAgent).indexOf("Windows")>=0,o=f.indexOf("Macintosh")>=0,c=(f.indexOf("Macintosh")>=0||f.indexOf("iPad")>=0||f.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,s=f.indexOf("Linux")>=0,l=!0,u=d=navigator.language;let p=0;o?p=1:r?p=3:s&&(p=2);const m=r,_=o,b=s,v=a,y=l,w=c,C="object"==typeof self?self:"object"==typeof i?i:{},S=function(){if(C.setImmediate)return C.setImmediate.bind(C);if("function"==typeof C.postMessage&&!C.importScripts){let e=[];C.addEventListener("message",t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let n=0,i=e.length;n{const i=++t;e.push({id:i,callback:n}),C.postMessage({vscodeSetImmediateId:i},"*")}}if(void 0!==e&&"function"==typeof e.nextTick)return e.nextTick.bind(e);const t=Promise.resolve();return e=>t.then(e)}(),k=o||c?2:r?1:3;let x=!0,L=!1;function M(){if(!L){L=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);x=513===t[0]}return x}}).call(this,n(343),n(238))},function(e,t,n){"use strict";function i(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));class r{constructor(e,t,n,r=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,n,r){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,s=Math.max(t,n,i),a=Math.min(t,n,i);let l=0,c=0;const d=(a+s)/2,u=s-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),s){case t:l=(n-i)/u+(n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:s}=e;let a,l,c;if(0===n)a=l=c=i;else{const e=i<.5?i*(1+n):i+n-i*n,r=2*i-e;a=o._hue2rgb(r,e,t+1/3),l=o._hue2rgb(r,e,t),c=o._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*c),s)}}class s{constructor(e,t,n,r){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),o=r-Math.min(t,n,i),a=0===r?0:o/r;let l;return l=0===o?0:r===t?((n-i)/o%6+6)%6:r===n?(i-t)/o+2:(t-n)/o+4,new s(Math.round(60*l),a,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:o}=e,s=i*n,a=s*(1-Math.abs(t/60%2-1)),l=i-s;let[c,d,u]=[0,0,0];return t<60?(c=s,d=a):t<120?(c=a,d=s):t<180?(d=s,u=a):t<240?(d=a,u=s):t<300?(c=a,u=s):t<360&&(c=s,u=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),u=Math.round(255*(u+l)),new r(c,d,u,o)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return i(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;i0))return o;r=o-1}}return-(i+1)}function a(e,t){let n=0,i=e.length;if(0===i)return 0;for(;ni?e[l]=o[a++]:a>r?e[l]=o[s++]:t(o[a],o[s])<0?e[l]=o[a++]:e[l]=o[s++]}(t,n,i,s,r,o)}(e,t,0,e.length-1,[]),e}function c(e,t){const n=[];let i=void 0;for(const r of l(e.slice(0),t))i&&0===t(i[0],r)?i.push(r):(i=[r],n.push(i));return n}function d(e){return e.filter(e=>!!e)}function u(e){return!Array.isArray(e)||0===e.length}function h(e){return Array.isArray(e)&&e.length>0}function f(e,t){if(!t)return e.filter((t,n)=>e.indexOf(t)===n);const n=Object.create(null);return e.filter(e=>{const i=t(e);return!n[i]&&(n[i]=!0,!0)})}function g(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))}function p(e,t){for(let n=0;n0?e[0]:t}function b(e){return[].concat(...e)}function v(e,t){let n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);const i=[];if(n<=t)for(let e=n;et;e--)i.push(e);return i}function y(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)}function w(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function C(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function S(e){return Array.isArray(e)?e:[e]}n.d(t,"t",(function(){return i})),n.d(t,"u",(function(){return r})),n.d(t,"g",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"h",(function(){return a})),n.d(t,"p",(function(){return l})),n.d(t,"m",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"n",(function(){return u})),n.d(t,"o",(function(){return h})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return g})),n.d(t,"j",(function(){return p})),n.d(t,"i",(function(){return m})),n.d(t,"k",(function(){return _})),n.d(t,"l",(function(){return b})),n.d(t,"s",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"r",(function(){return w})),n.d(t,"q",(function(){return C})),n.d(t,"b",(function(){return S}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return u}));const i=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function r(e){l(e)||i.onUnexpectedError(e)}function o(e){l(e)||i.onUnexpectedExternalError(e)}function s(e){if(e instanceof Error){let{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof Error&&e.name===a&&e.message===a}function c(){const e=new Error(a);return e.name=e.message,e}function d(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return h})),n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return g})),n.d(t,"h",(function(){return m}));var i=n(155),r=n(6);const o=new class{constructor(){this._icons=new Map,this._onDidRegister=new r.a}add(e){this._icons.has(e.id)?console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}},s=o;function a(e,t,n){return new l(e,t)}class l{constructor(e,t,n){this.id=e,this.definition=t,this.description=n,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get cssSelector(){return".codicon.codicon-"+this.id}}!function(e){e.add=new e("add",{character:"\\ea60"}),e.plus=new e("plus",{character:"\\ea60"}),e.gistNew=new e("gist-new",{character:"\\ea60"}),e.repoCreate=new e("repo-create",{character:"\\ea60"}),e.lightbulb=new e("lightbulb",{character:"\\ea61"}),e.lightBulb=new e("light-bulb",{character:"\\ea61"}),e.repo=new e("repo",{character:"\\ea62"}),e.repoDelete=new e("repo-delete",{character:"\\ea62"}),e.gistFork=new e("gist-fork",{character:"\\ea63"}),e.repoForked=new e("repo-forked",{character:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{character:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{character:"\\ea64"}),e.recordKeys=new e("record-keys",{character:"\\ea65"}),e.keyboard=new e("keyboard",{character:"\\ea65"}),e.tag=new e("tag",{character:"\\ea66"}),e.tagAdd=new e("tag-add",{character:"\\ea66"}),e.tagRemove=new e("tag-remove",{character:"\\ea66"}),e.person=new e("person",{character:"\\ea67"}),e.personAdd=new e("person-add",{character:"\\ea67"}),e.personFollow=new e("person-follow",{character:"\\ea67"}),e.personOutline=new e("person-outline",{character:"\\ea67"}),e.personFilled=new e("person-filled",{character:"\\ea67"}),e.gitBranch=new e("git-branch",{character:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{character:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{character:"\\ea68"}),e.sourceControl=new e("source-control",{character:"\\ea68"}),e.mirror=new e("mirror",{character:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{character:"\\ea69"}),e.star=new e("star",{character:"\\ea6a"}),e.starAdd=new e("star-add",{character:"\\ea6a"}),e.starDelete=new e("star-delete",{character:"\\ea6a"}),e.starEmpty=new e("star-empty",{character:"\\ea6a"}),e.comment=new e("comment",{character:"\\ea6b"}),e.commentAdd=new e("comment-add",{character:"\\ea6b"}),e.alert=new e("alert",{character:"\\ea6c"}),e.warning=new e("warning",{character:"\\ea6c"}),e.search=new e("search",{character:"\\ea6d"}),e.searchSave=new e("search-save",{character:"\\ea6d"}),e.logOut=new e("log-out",{character:"\\ea6e"}),e.signOut=new e("sign-out",{character:"\\ea6e"}),e.logIn=new e("log-in",{character:"\\ea6f"}),e.signIn=new e("sign-in",{character:"\\ea6f"}),e.eye=new e("eye",{character:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{character:"\\ea70"}),e.eyeWatch=new e("eye-watch",{character:"\\ea70"}),e.circleFilled=new e("circle-filled",{character:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{character:"\\ea71"}),e.closeDirty=new e("close-dirty",{character:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{character:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{character:"\\ea71"}),e.debugHint=new e("debug-hint",{character:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{character:"\\ea72"}),e.edit=new e("edit",{character:"\\ea73"}),e.pencil=new e("pencil",{character:"\\ea73"}),e.info=new e("info",{character:"\\ea74"}),e.issueOpened=new e("issue-opened",{character:"\\ea74"}),e.gistPrivate=new e("gist-private",{character:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{character:"\\ea75"}),e.lock=new e("lock",{character:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{character:"\\ea75"}),e.close=new e("close",{character:"\\ea76"}),e.removeClose=new e("remove-close",{character:"\\ea76"}),e.x=new e("x",{character:"\\ea76"}),e.repoSync=new e("repo-sync",{character:"\\ea77"}),e.sync=new e("sync",{character:"\\ea77"}),e.clone=new e("clone",{character:"\\ea78"}),e.desktopDownload=new e("desktop-download",{character:"\\ea78"}),e.beaker=new e("beaker",{character:"\\ea79"}),e.microscope=new e("microscope",{character:"\\ea79"}),e.vm=new e("vm",{character:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{character:"\\ea7a"}),e.file=new e("file",{character:"\\ea7b"}),e.fileText=new e("file-text",{character:"\\ea7b"}),e.more=new e("more",{character:"\\ea7c"}),e.ellipsis=new e("ellipsis",{character:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{character:"\\ea7c"}),e.mailReply=new e("mail-reply",{character:"\\ea7d"}),e.reply=new e("reply",{character:"\\ea7d"}),e.organization=new e("organization",{character:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{character:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{character:"\\ea7e"}),e.newFile=new e("new-file",{character:"\\ea7f"}),e.fileAdd=new e("file-add",{character:"\\ea7f"}),e.newFolder=new e("new-folder",{character:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{character:"\\ea80"}),e.trash=new e("trash",{character:"\\ea81"}),e.trashcan=new e("trashcan",{character:"\\ea81"}),e.history=new e("history",{character:"\\ea82"}),e.clock=new e("clock",{character:"\\ea82"}),e.folder=new e("folder",{character:"\\ea83"}),e.fileDirectory=new e("file-directory",{character:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{character:"\\ea83"}),e.logoGithub=new e("logo-github",{character:"\\ea84"}),e.markGithub=new e("mark-github",{character:"\\ea84"}),e.github=new e("github",{character:"\\ea84"}),e.terminal=new e("terminal",{character:"\\ea85"}),e.console=new e("console",{character:"\\ea85"}),e.repl=new e("repl",{character:"\\ea85"}),e.zap=new e("zap",{character:"\\ea86"}),e.symbolEvent=new e("symbol-event",{character:"\\ea86"}),e.error=new e("error",{character:"\\ea87"}),e.stop=new e("stop",{character:"\\ea87"}),e.variable=new e("variable",{character:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{character:"\\ea88"}),e.array=new e("array",{character:"\\ea8a"}),e.symbolArray=new e("symbol-array",{character:"\\ea8a"}),e.symbolModule=new e("symbol-module",{character:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{character:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{character:"\\ea8b"}),e.symbolObject=new e("symbol-object",{character:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{character:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{character:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{character:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{character:"\\ea8f"}),e.symbolNull=new e("symbol-null",{character:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{character:"\\ea90"}),e.symbolNumber=new e("symbol-number",{character:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{character:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{character:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{character:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{character:"\\ea92"}),e.symbolKey=new e("symbol-key",{character:"\\ea93"}),e.symbolText=new e("symbol-text",{character:"\\ea93"}),e.symbolReference=new e("symbol-reference",{character:"\\ea94"}),e.goToFile=new e("go-to-file",{character:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{character:"\\ea95"}),e.symbolValue=new e("symbol-value",{character:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{character:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{character:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{character:"\\ea97"}),e.archive=new e("archive",{character:"\\ea98"}),e.arrowBoth=new e("arrow-both",{character:"\\ea99"}),e.arrowDown=new e("arrow-down",{character:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{character:"\\ea9b"}),e.arrowRight=new e("arrow-right",{character:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{character:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{character:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{character:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{character:"\\eaa0"}),e.arrowUp=new e("arrow-up",{character:"\\eaa1"}),e.bell=new e("bell",{character:"\\eaa2"}),e.bold=new e("bold",{character:"\\eaa3"}),e.book=new e("book",{character:"\\eaa4"}),e.bookmark=new e("bookmark",{character:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{character:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{character:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{character:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{character:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{character:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{character:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{character:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{character:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{character:"\\eaab"}),e.briefcase=new e("briefcase",{character:"\\eaac"}),e.broadcast=new e("broadcast",{character:"\\eaad"}),e.browser=new e("browser",{character:"\\eaae"}),e.bug=new e("bug",{character:"\\eaaf"}),e.calendar=new e("calendar",{character:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{character:"\\eab1"}),e.check=new e("check",{character:"\\eab2"}),e.checklist=new e("checklist",{character:"\\eab3"}),e.chevronDown=new e("chevron-down",{character:"\\eab4"}),e.chevronLeft=new e("chevron-left",{character:"\\eab5"}),e.chevronRight=new e("chevron-right",{character:"\\eab6"}),e.chevronUp=new e("chevron-up",{character:"\\eab7"}),e.chromeClose=new e("chrome-close",{character:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{character:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{character:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{character:"\\eabb"}),e.circleOutline=new e("circle-outline",{character:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{character:"\\eabc"}),e.circleSlash=new e("circle-slash",{character:"\\eabd"}),e.circuitBoard=new e("circuit-board",{character:"\\eabe"}),e.clearAll=new e("clear-all",{character:"\\eabf"}),e.clippy=new e("clippy",{character:"\\eac0"}),e.closeAll=new e("close-all",{character:"\\eac1"}),e.cloudDownload=new e("cloud-download",{character:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{character:"\\eac3"}),e.code=new e("code",{character:"\\eac4"}),e.collapseAll=new e("collapse-all",{character:"\\eac5"}),e.colorMode=new e("color-mode",{character:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{character:"\\eac7"}),e.compareChanges=new e("compare-changes",{character:"\\eafd"}),e.creditCard=new e("credit-card",{character:"\\eac9"}),e.dash=new e("dash",{character:"\\eacc"}),e.dashboard=new e("dashboard",{character:"\\eacd"}),e.database=new e("database",{character:"\\eace"}),e.debugContinue=new e("debug-continue",{character:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{character:"\\ead0"}),e.debugPause=new e("debug-pause",{character:"\\ead1"}),e.debugRestart=new e("debug-restart",{character:"\\ead2"}),e.debugStart=new e("debug-start",{character:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{character:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{character:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{character:"\\ead6"}),e.debugStop=new e("debug-stop",{character:"\\ead7"}),e.debug=new e("debug",{character:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{character:"\\ead9"}),e.deviceCamera=new e("device-camera",{character:"\\eada"}),e.deviceMobile=new e("device-mobile",{character:"\\eadb"}),e.diffAdded=new e("diff-added",{character:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{character:"\\eadd"}),e.diffModified=new e("diff-modified",{character:"\\eade"}),e.diffRemoved=new e("diff-removed",{character:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{character:"\\eae0"}),e.diff=new e("diff",{character:"\\eae1"}),e.discard=new e("discard",{character:"\\eae2"}),e.editorLayout=new e("editor-layout",{character:"\\eae3"}),e.emptyWindow=new e("empty-window",{character:"\\eae4"}),e.exclude=new e("exclude",{character:"\\eae5"}),e.extensions=new e("extensions",{character:"\\eae6"}),e.eyeClosed=new e("eye-closed",{character:"\\eae7"}),e.fileBinary=new e("file-binary",{character:"\\eae8"}),e.fileCode=new e("file-code",{character:"\\eae9"}),e.fileMedia=new e("file-media",{character:"\\eaea"}),e.filePdf=new e("file-pdf",{character:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{character:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{character:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{character:"\\eaee"}),e.fileZip=new e("file-zip",{character:"\\eaef"}),e.files=new e("files",{character:"\\eaf0"}),e.filter=new e("filter",{character:"\\eaf1"}),e.flame=new e("flame",{character:"\\eaf2"}),e.foldDown=new e("fold-down",{character:"\\eaf3"}),e.foldUp=new e("fold-up",{character:"\\eaf4"}),e.fold=new e("fold",{character:"\\eaf5"}),e.folderActive=new e("folder-active",{character:"\\eaf6"}),e.folderOpened=new e("folder-opened",{character:"\\eaf7"}),e.gear=new e("gear",{character:"\\eaf8"}),e.gift=new e("gift",{character:"\\eaf9"}),e.gistSecret=new e("gist-secret",{character:"\\eafa"}),e.gist=new e("gist",{character:"\\eafb"}),e.gitCommit=new e("git-commit",{character:"\\eafc"}),e.gitCompare=new e("git-compare",{character:"\\eafd"}),e.gitMerge=new e("git-merge",{character:"\\eafe"}),e.githubAction=new e("github-action",{character:"\\eaff"}),e.githubAlt=new e("github-alt",{character:"\\eb00"}),e.globe=new e("globe",{character:"\\eb01"}),e.grabber=new e("grabber",{character:"\\eb02"}),e.graph=new e("graph",{character:"\\eb03"}),e.gripper=new e("gripper",{character:"\\eb04"}),e.heart=new e("heart",{character:"\\eb05"}),e.home=new e("home",{character:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{character:"\\eb07"}),e.hubot=new e("hubot",{character:"\\eb08"}),e.inbox=new e("inbox",{character:"\\eb09"}),e.issueClosed=new e("issue-closed",{character:"\\eb0a"}),e.issueReopened=new e("issue-reopened",{character:"\\eb0b"}),e.issues=new e("issues",{character:"\\eb0c"}),e.italic=new e("italic",{character:"\\eb0d"}),e.jersey=new e("jersey",{character:"\\eb0e"}),e.json=new e("json",{character:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{character:"\\eb10"}),e.key=new e("key",{character:"\\eb11"}),e.law=new e("law",{character:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{character:"\\eb13"}),e.linkExternal=new e("link-external",{character:"\\eb14"}),e.link=new e("link",{character:"\\eb15"}),e.listOrdered=new e("list-ordered",{character:"\\eb16"}),e.listUnordered=new e("list-unordered",{character:"\\eb17"}),e.liveShare=new e("live-share",{character:"\\eb18"}),e.loading=new e("loading",{character:"\\eb19"}),e.location=new e("location",{character:"\\eb1a"}),e.mailRead=new e("mail-read",{character:"\\eb1b"}),e.mail=new e("mail",{character:"\\eb1c"}),e.markdown=new e("markdown",{character:"\\eb1d"}),e.megaphone=new e("megaphone",{character:"\\eb1e"}),e.mention=new e("mention",{character:"\\eb1f"}),e.milestone=new e("milestone",{character:"\\eb20"}),e.mortarBoard=new e("mortar-board",{character:"\\eb21"}),e.move=new e("move",{character:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{character:"\\eb23"}),e.mute=new e("mute",{character:"\\eb24"}),e.noNewline=new e("no-newline",{character:"\\eb25"}),e.note=new e("note",{character:"\\eb26"}),e.octoface=new e("octoface",{character:"\\eb27"}),e.openPreview=new e("open-preview",{character:"\\eb28"}),e.package_=new e("package",{character:"\\eb29"}),e.paintcan=new e("paintcan",{character:"\\eb2a"}),e.pin=new e("pin",{character:"\\eb2b"}),e.play=new e("play",{character:"\\eb2c"}),e.run=new e("run",{character:"\\eb2c"}),e.plug=new e("plug",{character:"\\eb2d"}),e.preserveCase=new e("preserve-case",{character:"\\eb2e"}),e.preview=new e("preview",{character:"\\eb2f"}),e.project=new e("project",{character:"\\eb30"}),e.pulse=new e("pulse",{character:"\\eb31"}),e.question=new e("question",{character:"\\eb32"}),e.quote=new e("quote",{character:"\\eb33"}),e.radioTower=new e("radio-tower",{character:"\\eb34"}),e.reactions=new e("reactions",{character:"\\eb35"}),e.references=new e("references",{character:"\\eb36"}),e.refresh=new e("refresh",{character:"\\eb37"}),e.regex=new e("regex",{character:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{character:"\\eb39"}),e.remote=new e("remote",{character:"\\eb3a"}),e.remove=new e("remove",{character:"\\eb3b"}),e.replaceAll=new e("replace-all",{character:"\\eb3c"}),e.replace=new e("replace",{character:"\\eb3d"}),e.repoClone=new e("repo-clone",{character:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{character:"\\eb3f"}),e.repoPull=new e("repo-pull",{character:"\\eb40"}),e.repoPush=new e("repo-push",{character:"\\eb41"}),e.report=new e("report",{character:"\\eb42"}),e.requestChanges=new e("request-changes",{character:"\\eb43"}),e.rocket=new e("rocket",{character:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{character:"\\eb45"}),e.rootFolder=new e("root-folder",{character:"\\eb46"}),e.rss=new e("rss",{character:"\\eb47"}),e.ruby=new e("ruby",{character:"\\eb48"}),e.saveAll=new e("save-all",{character:"\\eb49"}),e.saveAs=new e("save-as",{character:"\\eb4a"}),e.save=new e("save",{character:"\\eb4b"}),e.screenFull=new e("screen-full",{character:"\\eb4c"}),e.screenNormal=new e("screen-normal",{character:"\\eb4d"}),e.searchStop=new e("search-stop",{character:"\\eb4e"}),e.server=new e("server",{character:"\\eb50"}),e.settingsGear=new e("settings-gear",{character:"\\eb51"}),e.settings=new e("settings",{character:"\\eb52"}),e.shield=new e("shield",{character:"\\eb53"}),e.smiley=new e("smiley",{character:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{character:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{character:"\\eb56"}),e.splitVertical=new e("split-vertical",{character:"\\eb57"}),e.squirrel=new e("squirrel",{character:"\\eb58"}),e.starFull=new e("star-full",{character:"\\eb59"}),e.starHalf=new e("star-half",{character:"\\eb5a"}),e.symbolClass=new e("symbol-class",{character:"\\eb5b"}),e.symbolColor=new e("symbol-color",{character:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{character:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{character:"\\eb5e"}),e.symbolField=new e("symbol-field",{character:"\\eb5f"}),e.symbolFile=new e("symbol-file",{character:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{character:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{character:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{character:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{character:"\\eb64"}),e.symbolProperty=new e("symbol-property",{character:"\\eb65"}),e.wrench=new e("wrench",{character:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{character:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{character:"\\eb66"}),e.tasklist=new e("tasklist",{character:"\\eb67"}),e.telescope=new e("telescope",{character:"\\eb68"}),e.textSize=new e("text-size",{character:"\\eb69"}),e.threeBars=new e("three-bars",{character:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{character:"\\eb6b"}),e.thumbsup=new e("thumbsup",{character:"\\eb6c"}),e.tools=new e("tools",{character:"\\eb6d"}),e.triangleDown=new e("triangle-down",{character:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{character:"\\eb6f"}),e.triangleRight=new e("triangle-right",{character:"\\eb70"}),e.triangleUp=new e("triangle-up",{character:"\\eb71"}),e.twitter=new e("twitter",{character:"\\eb72"}),e.unfold=new e("unfold",{character:"\\eb73"}),e.unlock=new e("unlock",{character:"\\eb74"}),e.unmute=new e("unmute",{character:"\\eb75"}),e.unverified=new e("unverified",{character:"\\eb76"}),e.verified=new e("verified",{character:"\\eb77"}),e.versions=new e("versions",{character:"\\eb78"}),e.vmActive=new e("vm-active",{character:"\\eb79"}),e.vmOutline=new e("vm-outline",{character:"\\eb7a"}),e.vmRunning=new e("vm-running",{character:"\\eb7b"}),e.watch=new e("watch",{character:"\\eb7c"}),e.whitespace=new e("whitespace",{character:"\\eb7d"}),e.wholeWord=new e("whole-word",{character:"\\eb7e"}),e.window=new e("window",{character:"\\eb7f"}),e.wordWrap=new e("word-wrap",{character:"\\eb80"}),e.zoomIn=new e("zoom-in",{character:"\\eb81"}),e.zoomOut=new e("zoom-out",{character:"\\eb82"}),e.listFilter=new e("list-filter",{character:"\\eb83"}),e.listFlat=new e("list-flat",{character:"\\eb84"}),e.listSelection=new e("list-selection",{character:"\\eb85"}),e.selection=new e("selection",{character:"\\eb85"}),e.listTree=new e("list-tree",{character:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{character:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{character:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{character:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{character:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{character:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{character:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{character:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{character:"\\eb8c"}),e.symbolString=new e("symbol-string",{character:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{character:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{character:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{character:"\\eb90"}),e.callIncoming=new e("call-incoming",{character:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{character:"\\eb93"}),e.menu=new e("menu",{character:"\\eb94"}),e.expandAll=new e("expand-all",{character:"\\eb95"}),e.feedback=new e("feedback",{character:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{character:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{character:"\\eb98"}),e.account=new e("account",{character:"\\eb99"}),e.bellDot=new e("bell-dot",{character:"\\eb9a"}),e.debugConsole=new e("debug-console",{character:"\\eb9b"}),e.library=new e("library",{character:"\\eb9c"}),e.output=new e("output",{character:"\\eb9d"}),e.runAll=new e("run-all",{character:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{character:"\\eb9f"}),e.pinned=new e("pinned",{character:"\\eba0"}),e.githubInverted=new e("github-inverted",{character:"\\eba1"}),e.debugAlt=new e("debug-alt",{character:"\\eb91"}),e.serverProcess=new e("server-process",{character:"\\eba2"}),e.serverEnvironment=new e("server-environment",{character:"\\eba3"}),e.pass=new e("pass",{character:"\\eba4"}),e.stopCircle=new e("stop-circle",{character:"\\eba5"}),e.playCircle=new e("play-circle",{character:"\\eba6"}),e.record=new e("record",{character:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{character:"\\eba8"}),e.vmConnect=new e("vm-connect",{character:"\\eba9"}),e.cloud=new e("cloud",{character:"\\ebaa"}),e.merge=new e("merge",{character:"\\ebab"})}(l||(l={}));const c=/(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;function d(e){return e.replace(c,(e,t)=>t?e:`\\${e}`)}const u=/\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;function h(e){return e.replace(u,e=>`\\${e}`)}const f=/(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;function g(e){return e.replace(f,(e,t,n,i,r)=>t?`$(${n})`:``)}const p=/(\s)?(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)(\s)?/gi;function m(e){return-1===e.indexOf(i.a)?e:e.replace(p,(e,t,n,i)=>n?e:t||i||"")}},function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i||(i={}));const r=s("instantiationService");function o(e,t,n,r){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:r}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:r}],t[i.DI_TARGET]=t)}function s(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,n,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");o(t,e,i,!1)};return t.toString=()=>e,i.serviceIds.set(e,t),t}function a(e){return function(t,n,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");o(e,t,i,!0)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"h",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"d",(function(){return m}));var i=n(17),r=n(2),o=n(46),s=n(6);const a=Object(i.c)("themeService");function l(e){return{id:e}}var c;!function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id};const t=/^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i;e.fromString=function(e){const n=t.exec(e);if(!n)return;let[,i,r]=n;return i||(i="codicon/"),{id:i+r}};const n=/^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i;e.asClassName=function(e){const t=n.exec(e.id);if(!t)return;let[,,i,r]=t,o=`codicon codicon-${i}`;return r&&(o+=` ${r.substr(1)}`),o}}(c||(c={}));const d="dark",u="hc";function h(e){switch(e){case d:return"vs-dark";case u:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};let g=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.a}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Object(r.h)(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}};function p(e){return g.onColorThemeChange(e)}o.a.add(f.ThemingContribution,g);class m extends r.a{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},function(e,t,n){"use strict";n.d(t,"i",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"j",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"l",(function(){return d})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"e",(function(){return f})),n.d(t,"c",(function(){return g})),n.d(t,"d",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"b",(function(){return _}));var i=n(26),r=n(15),o=n(2);function s(e){return e&&"function"==typeof e.then}function a(e){const t=new i.b,n=e(t.token),o=new Promise((e,i)=>{t.token.onCancellationRequested(()=>{i(r.a())}),Promise.resolve(n).then(n=>{t.dispose(),e(n)},e=>{t.dispose(),i(e)})});return new class{cancel(){t.cancel()}then(e,t){return o.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return o.finally(e)}}}function l(e,t,n){return Promise.race([e,new Promise(e=>t.onCancellationRequested(()=>e(n)))])}class c{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(r.a()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}function d(e,t){return t?new Promise((n,i)=>{const o=setTimeout(n,e);t.onCancellationRequested(()=>{clearTimeout(o),i(r.a())})}):a(t=>d(e,t))}function u(e,t=0){const n=setTimeout(e,t);return Object(o.h)(()=>clearTimeout(n))}function h(e,t=(e=>!!e),n=null){let i=0;const r=e.length,o=()=>{if(i>=r)return Promise.resolve(n);const s=e[i++];return Promise.resolve(s()).then(e=>t(e)?Promise.resolve(e):o())};return o()}class f{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class g{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class p{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let m;!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});m=t=>{const n=setTimeout(()=>t(e));let i=!1;return{dispose(){i||(i=!0,clearTimeout(n))}}}}else m=(e,t)=>{const n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(n))}}}}();class _{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=m(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}},function(e,t,n){"use strict";function i(e){return Array.isArray(e)}function r(e){return"string"==typeof e}function o(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return void 0===e}function c(e){return l(e)||null===e}function d(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function u(e){if(c(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function h(e){return"function"==typeof e}function f(e,t){const n=Math.min(e.length,t.length);for(let i=0;i(function(){const n=Array.prototype.slice.call(arguments,0);return t(e,n)});let i={};for(const t of e)i[t]=n(t);return i}function _(e){return null===e?void 0:e}n.d(t,"e",(function(){return i})),n.d(t,"j",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"k",(function(){return l})),n.d(t,"l",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"m",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"n",(function(){return _}))},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,i;function r(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,i=[];for(n=0;n>>0,i=0;i0)for(n=0;n<_.length;n++)a(r=t[i=_[n]])||(e[i]=r);return e}var v=!1;function y(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function w(e){return e instanceof y||null!=e&&null!=e._isAMomentObject}function C(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=C(t)),n}function k(e,t,n){var i,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(i=0;i=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var W=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},V={};function z(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(V[e]=r),t&&(V[t[0]]=function(){return B(r.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=$(t,e.localeData()),Y[t]=Y[t]||function(e){var t,n,i,r=e.match(W);for(t=0,n=r.length;t=0&&H.test(e);)e=e.replace(H,i),H.lastIndex=0,n-=1;return e}var q=/\d/,K=/\d\d/,G=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,X=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,ie=/[+-]?\d{1,6}/,re=/\d+/,oe=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,ae=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce={};function de(e,t,n){ce[e]=T(t)?t:function(e,i){return e&&n?n:t}}function ue(e,t){return u(ce,e)?ce[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function ge(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=S(e)}),n=0;n68?1900:2e3)};var De,Ee=Te("FullYear",!0);function Te(e,t){return function(n){return null!=n?(Ne(this,e,n),r.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ne(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Me(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ie(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ie(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,i=(t%(n=12)+n)%n;return e+=(t-i)/12,1===i?Me(e)?29:28:31-i%7%2}De=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(a=new Date(e+400,t,n,i,r,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,o,s),a}function ze(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ue(e,t,n){var i=7+t-n;return-(7+ze(e,0,i).getUTCDay()-t)%7+i-1}function $e(e,t,n,i,r){var o,s,a=1+7*(t-1)+(7+n-i)%7+Ue(e,i,r);return a<=0?s=Le(o=e-1)+a:a>Le(e)?(o=e+1,s=a-Le(e)):(o=e,s=a),{year:o,dayOfYear:s}}function qe(e,t,n){var i,r,o=Ue(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?i=s+Ke(r=e.year()-1,t,n):s>Ke(e.year(),t,n)?(i=s-Ke(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function Ke(e,t,n){var i=Ue(e,t,n),r=Ue(e+1,t,n);return(Le(e)-i+r)/7}function Ge(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),F("week",5),F("isoWeek",5),de("w",X),de("ww",X,K),de("W",X),de("WW",X,K),pe(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=S(e)})),z("d",0,"do","day"),z("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),z("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),z("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),pe(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:g(n).invalidWeekday=e})),pe(["d","e","E"],(function(e,t,n,i){t[i]=S(e)}));var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=De.call(this._weekdaysParse,s))?r:null:"ddd"===t?-1!==(r=De.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=De.call(this._minWeekdaysParse,s))?r:null:"dddd"===t?-1!==(r=De.call(this._weekdaysParse,s))?r:-1!==(r=De.call(this._shortWeekdaysParse,s))?r:-1!==(r=De.call(this._minWeekdaysParse,s))?r:null:"ddd"===t?-1!==(r=De.call(this._shortWeekdaysParse,s))?r:-1!==(r=De.call(this._weekdaysParse,s))?r:-1!==(r=De.call(this._minWeekdaysParse,s))?r:null:-1!==(r=De.call(this._minWeekdaysParse,s))?r:-1!==(r=De.call(this._weekdaysParse,s))?r:-1!==(r=De.call(this._shortWeekdaysParse,s))?r:null}var et=le,tt=le,nt=le;function it(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=he(a[t]),l[t]=he(l[t]),c[t]=he(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function rt(){return this.hours()%12||12}function ot(e,t){z(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function st(e,t){return t._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,rt),z("k",["kk",2],0,(function(){return this.hours()||24})),z("hmm",0,0,(function(){return""+rt.apply(this)+B(this.minutes(),2)})),z("hmmss",0,0,(function(){return""+rt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),z("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),z("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),ot("a",!0),ot("A",!1),A("hour","h"),F("hour",13),de("a",st),de("A",st),de("H",X),de("h",X),de("k",X),de("HH",X,K),de("hh",X,K),de("kk",X,K),de("hmm",Q),de("hmmss",ee),de("Hmm",Q),de("Hmmss",ee),ge(["H","HH"],ye),ge(["k","kk"],(function(e,t,n){var i=S(e);t[ye]=24===i?0:i})),ge(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ge(["h","hh"],(function(e,t,n){t[ye]=S(e),g(n).bigHour=!0})),ge("hmm",(function(e,t,n){var i=e.length-2;t[ye]=S(e.substr(0,i)),t[we]=S(e.substr(i)),g(n).bigHour=!0})),ge("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[ye]=S(e.substr(0,i)),t[we]=S(e.substr(i,2)),t[Ce]=S(e.substr(r)),g(n).bigHour=!0})),ge("Hmm",(function(e,t,n){var i=e.length-2;t[ye]=S(e.substr(0,i)),t[we]=S(e.substr(i))})),ge("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[ye]=S(e.substr(0,i)),t[we]=S(e.substr(i,2)),t[Ce]=S(e.substr(r))}));var at,lt=Te("Hours",!0),ct={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:Xe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},dt={},ut={};function ht(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var i=null;if(!dt[t]&&void 0!==e&&e&&e.exports)try{i=at._abbr,n(895)("./"+t),gt(i)}catch(e){}return dt[t]}function gt(e,t){var n;return e&&((n=a(t)?mt(e):pt(e,t))?at=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function pt(e,t){if(null!==t){var n,i=ct;if(t.abbr=e,null!=dt[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])i=dt[t.parentLocale]._config;else{if(null==(n=ft(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;i=n._config}return dt[e]=new N(O(i,t)),ut[e]&&ut[e].forEach((function(e){pt(e.name,e.config)})),gt(e),dt[e]}return delete dt[e],null}function mt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!o(e)){if(t=ft(e))return t;e=[e]}return function(e){for(var t,n,i,r,o=0;o0;){if(i=ft(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&k(r,n,!0)>=t-1)break;t--}o++}return at}(e)}function _t(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[be]<0||n[be]>11?be:n[ve]<1||n[ve]>Ie(n[_e],n[be])?ve:n[ye]<0||n[ye]>24||24===n[ye]&&(0!==n[we]||0!==n[Ce]||0!==n[Se])?ye:n[we]<0||n[we]>59?we:n[Ce]<0||n[Ce]>59?Ce:n[Se]<0||n[Se]>999?Se:-1,g(e)._overflowDayOfYear&&(t<_e||t>ve)&&(t=ve),g(e)._overflowWeeks&&-1===t&&(t=ke),g(e)._overflowWeekday&&-1===t&&(t=xe),g(e).overflow=t),e}function bt(e,t,n){return null!=e?e:null!=t?t:n}function vt(e){var t,n,i,o,s,a=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ve]&&null==e._a[be]&&function(e){var t,n,i,r,o,s,a,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,s=4,n=bt(t.GG,e._a[_e],qe(At(),1,4).year),i=bt(t.W,1),((r=bt(t.E,1))<1||r>7)&&(l=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var c=qe(At(),o,s);n=bt(t.gg,e._a[_e],c.year),i=bt(t.w,c.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(l=!0)):r=o}i<1||i>Ke(n,o,s)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(a=$e(n,i,r,o,s),e._a[_e]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=bt(e._a[_e],i[_e]),(e._dayOfYear>Le(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=ze(s,0,e._dayOfYear),e._a[be]=n.getUTCMonth(),e._a[ve]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ye]&&0===e._a[we]&&0===e._a[Ce]&&0===e._a[Se]&&(e._nextDay=!0,e._a[ye]=0),e._d=(e._useUTC?ze:Ve).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ct=/Z|[+-]\d\d(?::?\d\d)?/,St=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xt=/^\/?Date\((\-?\d+)/i;function Lt(e){var t,n,i,r,o,s,a=e._i,l=yt.exec(a)||wt.exec(a);if(l){for(g(e).iso=!0,t=0,n=St.length;t0&&g(e).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),c+=n.length),V[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),me(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=l-c,a.length>0&&g(e).unusedInput.push(a),e._a[ye]<=12&&!0===g(e).bigHour&&e._a[ye]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ye]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[ye],e._meridiem),vt(e),_t(e)}else Tt(e);else Lt(e)}function Nt(e){var t=e._i,n=e._f;return e._locale=e._locale||mt(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new y(_t(t)):(c(t)?e._d=t:o(n)?function(e){var t,n,i,r,o;if(0===e._f.length)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis?this:e:m()}));function jt(e,t){var n,i;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],i=1;i=0?new Date(e+400,t,n)-un:new Date(e,t,n).valueOf()}function gn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-un:Date.UTC(e,t,n)}function pn(e,t){z(0,[e,e.length],0,t)}function mn(e,t,n,i,r){var o;return null==e?qe(this,i,r).year:(t>(o=Ke(e,i,r))&&(t=o),_n.call(this,e,t,n,i,r))}function _n(e,t,n,i,r){var o=$e(e,t,n,i,r),s=ze(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}z(0,["gg",2],0,(function(){return this.weekYear()%100})),z(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),pn("gggg","weekYear"),pn("ggggg","weekYear"),pn("GGGG","isoWeekYear"),pn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),de("G",oe),de("g",oe),de("GG",X,K),de("gg",X,K),de("GGGG",ne,Z),de("gggg",ne,Z),de("GGGGG",ie,J),de("ggggg",ie,J),pe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=S(e)})),pe(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),z("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),de("Q",q),ge("Q",(function(e,t){t[be]=3*(S(e)-1)})),z("D",["DD",2],"Do","date"),A("date","D"),F("date",9),de("D",X),de("DD",X,K),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ge(["D","DD"],ve),ge("Do",(function(e,t){t[ve]=S(e.match(X)[0])}));var bn=Te("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),de("DDD",te),de("DDDD",G),ge(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=S(e)})),z("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),de("m",X),de("mm",X,K),ge(["m","mm"],we);var vn=Te("Minutes",!1);z("s",["ss",2],0,"second"),A("second","s"),F("second",15),de("s",X),de("ss",X,K),ge(["s","ss"],Ce);var yn,wn=Te("Seconds",!1);for(z("S",0,0,(function(){return~~(this.millisecond()/100)})),z(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),z(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),z(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),z(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),z(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),z(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),F("millisecond",16),de("S",te,q),de("SS",te,K),de("SSS",te,G),yn="SSSS";yn.length<=9;yn+="S")de(yn,re);function Cn(e,t){t[Se]=S(1e3*("0."+e))}for(yn="S";yn.length<=9;yn+="S")ge(yn,Cn);var Sn=Te("Milliseconds",!1);z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var kn=y.prototype;function xn(e){return e}kn.add=tn,kn.calendar=function(e,t){var n=e||At(),i=Ut(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",s=t&&(T(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,At(n)))},kn.clone=function(){return new y(this)},kn.diff=function(e,t,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=Ut(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=R(t)){case"year":o=rn(this,i)/12;break;case"month":o=rn(this,i);break;case"quarter":o=rn(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:C(o)},kn.endOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?gn:fn;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-hn(t+(this._isUTC?0:this.utcOffset()*cn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-hn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=ln-hn(t,ln)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},kn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},kn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||At(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kn.fromNow=function(e){return this.from(At(),e)},kn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||At(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kn.toNow=function(e){return this.to(At(),e)},kn.get=function(e){return T(this[e=R(e)])?this[e]():this},kn.invalidAt=function(){return g(this).overflow},kn.isAfter=function(e,t){var n=w(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},kn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},kn.toJSON=function(){return this.isValid()?this.toISOString():null},kn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},kn.unix=function(){return Math.floor(this.valueOf()/1e3)},kn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},kn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},kn.year=Ee,kn.isLeapYear=function(){return Me(this.year())},kn.weekYear=function(e){return mn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},kn.isoWeekYear=function(e){return mn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},kn.quarter=kn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},kn.month=Be,kn.daysInMonth=function(){return Ie(this.year(),this.month())},kn.week=kn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},kn.isoWeek=kn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},kn.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},kn.isoWeeksInYear=function(){return Ke(this.year(),1,4)},kn.date=bn,kn.day=kn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},kn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},kn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},kn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},kn.hour=kn.hours=lt,kn.minute=kn.minutes=vn,kn.second=kn.seconds=wn,kn.millisecond=kn.milliseconds=Sn,kn.utcOffset=function(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=zt(ae,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=$t(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?en(this,Zt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:$t(this)},kn.utc=function(e){return this.utcOffset(0,e)},kn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($t(this),"m")),this},kn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=zt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},kn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60==0)},kn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},kn.isLocal=function(){return!!this.isValid()&&!this._isUTC},kn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},kn.isUtc=qt,kn.isUTC=qt,kn.zoneAbbr=function(){return this._isUTC?"UTC":""},kn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},kn.dates=L("dates accessor is deprecated. Use date instead.",bn),kn.months=L("months accessor is deprecated. Use month instead",Be),kn.years=L("years accessor is deprecated. Use year instead",Ee),kn.zone=L("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),kn.isDSTShifted=L("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=Nt(e))._a){var t=e._isUTC?f(e._a):At(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Ln=N.prototype;function Mn(e,t,n,i){var r=mt(),o=f().set(i,t);return r[n](o,e)}function Dn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Mn(e,i,n,"month");return r}function En(e,t,n,i){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var r,o=mt(),s=e?o._week.dow:0;if(null!=n)return Mn(t,(n+s)%7,i,"day");var a=[];for(r=0;r<7;r++)a[r]=Mn(t,(r+s)%7,i,"day");return a}Ln.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return T(i)?i.call(t,n):i},Ln.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},Ln.invalidDate=function(){return this._invalidDate},Ln.ordinal=function(e){return this._ordinal.replace("%d",e)},Ln.preparse=xn,Ln.postformat=xn,Ln.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return T(r)?r(e,t,n,i):r.replace(/%d/i,e)},Ln.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Ln.set=function(e){var t,n;for(n in e)T(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ln.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ae).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},Ln.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ae.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ln.monthsParse=function(e,t,n){var i,r,o;if(this._monthsParseExact)return je.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=f([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},Ln.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Ye.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Ln.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||Ye.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=We),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Ln.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Ln.firstDayOfYear=function(){return this._week.doy},Ln.firstDayOfWeek=function(){return this._week.dow},Ln.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ge(n,this._week.dow):e?n[e.day()]:n},Ln.weekdaysMin=function(e){return!0===e?Ge(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Ln.weekdaysShort=function(e){return!0===e?Ge(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Ln.weekdaysParse=function(e,t,n){var i,r,o;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},Ln.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||it.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Ln.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||it.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ln.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||it.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ln.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Ln.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},gt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=L("moment.lang is deprecated. Use moment.locale instead.",gt),r.langData=L("moment.langData is deprecated. Use moment.localeData instead.",mt);var Tn=Math.abs;function On(e,t,n,i){var r=Zt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Nn(e){return e<0?Math.floor(e):Math.ceil(e)}function In(e){return 4800*e/146097}function An(e){return 146097*e/4800}function Rn(e){return function(){return this.as(e)}}var Pn=Rn("ms"),jn=Rn("s"),Fn=Rn("m"),Bn=Rn("h"),Wn=Rn("d"),Hn=Rn("w"),Yn=Rn("M"),Vn=Rn("Q"),zn=Rn("y");function Un(e){return function(){return this.isValid()?this._data[e]:NaN}}var $n=Un("milliseconds"),qn=Un("seconds"),Kn=Un("minutes"),Gn=Un("hours"),Zn=Un("days"),Jn=Un("months"),Xn=Un("years"),Qn=Math.round,ei={ss:44,s:45,m:45,h:22,d:26,M:11};function ti(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}var ni=Math.abs;function ii(e){return(e>0)-(e<0)||+e}function ri(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=ni(this._milliseconds)/1e3,i=ni(this._days),r=ni(this._months);e=C(n/60),t=C(e/60),n%=60,e%=60;var o=C(r/12),s=r%=12,a=i,l=t,c=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",u=this.asSeconds();if(!u)return"P0D";var h=u<0?"-":"",f=ii(this._months)!==ii(u)?"-":"",g=ii(this._days)!==ii(u)?"-":"",p=ii(this._milliseconds)!==ii(u)?"-":"";return h+"P"+(o?f+o+"Y":"")+(s?f+s+"M":"")+(a?g+a+"D":"")+(l||c||d?"T":"")+(l?p+l+"H":"")+(c?p+c+"M":"")+(d?p+d+"S":"")}var oi=Bt.prototype;return oi.isValid=function(){return this._isValid},oi.abs=function(){var e=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),e.milliseconds=Tn(e.milliseconds),e.seconds=Tn(e.seconds),e.minutes=Tn(e.minutes),e.hours=Tn(e.hours),e.months=Tn(e.months),e.years=Tn(e.years),this},oi.add=function(e,t){return On(this,e,t,1)},oi.subtract=function(e,t){return On(this,e,t,-1)},oi.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=R(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+In(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(An(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},oi.asMilliseconds=Pn,oi.asSeconds=jn,oi.asMinutes=Fn,oi.asHours=Bn,oi.asDays=Wn,oi.asWeeks=Hn,oi.asMonths=Yn,oi.asQuarters=Vn,oi.asYears=zn,oi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},oi._bubble=function(){var e,t,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Nn(An(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=C(o/1e3),l.seconds=e%60,t=C(e/60),l.minutes=t%60,n=C(t/60),l.hours=n%24,s+=C(n/24),r=C(In(s)),a+=r,s-=Nn(An(r)),i=C(a/12),a%=12,l.days=s,l.months=a,l.years=i,this},oi.clone=function(){return Zt(this)},oi.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},oi.milliseconds=$n,oi.seconds=qn,oi.minutes=Kn,oi.hours=Gn,oi.days=Zn,oi.weeks=function(){return C(this.days()/7)},oi.months=Jn,oi.years=Xn,oi.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var i=Zt(e).abs(),r=Qn(i.as("s")),o=Qn(i.as("m")),s=Qn(i.as("h")),a=Qn(i.as("d")),l=Qn(i.as("M")),c=Qn(i.as("y")),d=r<=ei.ss&&["s",r]||r0,d[4]=n,ti.apply(null,d)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},oi.toISOString=ri,oi.toString=ri,oi.toJSON=ri,oi.locale=on,oi.localeData=an,oi.toIsoString=L("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ri),oi.lang=sn,z("X",0,0,"unix"),z("x",0,0,"valueOf"),de("x",oe),de("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),ge("x",(function(e,t,n){n._d=new Date(S(e))})),r.version="2.24.0",t=At,r.fn=kn,r.min=function(){return jt("isBefore",[].slice.call(arguments,0))},r.max=function(){return jt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return At(1e3*e)},r.months=function(e,t){return Dn(e,t,"months")},r.isDate=c,r.locale=gt,r.invalid=m,r.duration=Zt,r.isMoment=w,r.weekdays=function(e,t,n){return En(e,t,n,"weekdays")},r.parseZone=function(){return At.apply(null,arguments).parseZone()},r.localeData=mt,r.isDuration=Wt,r.monthsShort=function(e,t){return Dn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return En(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,i,r=ct;null!=(i=ft(e))&&(r=i._config),t=O(r,t),(n=new N(t)).parentLocale=dt[e],dt[e]=n,gt(e)}else null!=dt[e]&&(null!=dt[e].parentLocale?dt[e]=dt[e].parentLocale:null!=dt[e]&&delete dt[e]);return dt[e]},r.locales=function(){return M(dt)},r.weekdaysShort=function(e,t,n){return En(e,t,n,"weekdaysShort")},r.normalizeUnits=R,r.relativeTimeRounding=function(e){return void 0===e?Qn:"function"==typeof e&&(Qn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==ei[e]&&(void 0===t?ei[e]:(ei[e]=t,"s"===e&&(ei.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=kn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(215)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(10),r=n(3);class o extends r.a{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new i.a(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n!0,u=()=>!1,h=e=>" "===e||"\t"===e;function f(e,t,n){e.has(t)?e.get(t).push(n):e.set(t,[n])}class g{constructor(e,t,n){this._languageIdentifier=e;const i=n.options,r=i.get(117);this.readOnly=i.get(72),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.lineHeight=i.get(51),this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=i.get(104),this.wordSeparators=i.get(105),this.emptySelectionClipboard=i.get(26),this.copyWithSyntaxHighlighting=i.get(16),this.multiCursorMergeOverlapping=i.get(60),this.multiCursorPaste=i.get(62),this.autoClosingBrackets=i.get(5),this.autoClosingQuotes=i.get(7),this.autoClosingOvertype=i.get(6),this.autoSurround=i.get(10),this.autoIndent=i.get(8),this.autoClosingPairsOpen2=new Map,this.autoClosingPairsClose2=new Map,this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:g._getShouldAutoClose(e,this.autoClosingQuotes),bracket:g._getShouldAutoClose(e,this.autoClosingBrackets)};let o=g._getAutoClosingPairs(e);if(o)for(const e of o)f(this.autoClosingPairsOpen2,e.open.charAt(e.open.length-1),e),1===e.close.length&&f(this.autoClosingPairsClose2,e.close,e);let s=g._getSurroundingPairs(e);if(s)for(const e of s)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(117)||e.hasChanged(105)||e.hasChanged(26)||e.hasChanged(60)||e.hasChanged(62)||e.hasChanged(5)||e.hasChanged(7)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(104)||e.hasChanged(51)||e.hasChanged(72)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=g._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return l.b.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return c.a.getElectricCharacters(e.id)}catch(e){return Object(i.e)(e),null}}static _getAutoClosingPairs(e){try{return c.a.getAutoClosingPairs(e.id)}catch(e){return Object(i.e)(e),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return h;case"languageDefined":return g._getLanguageDefinedShouldAutoClose(e);case"always":return d;case"never":return u}}static _getLanguageDefinedShouldAutoClose(e){try{const t=c.a.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(e){return Object(i.e)(e),u}}static _getSurroundingPairs(e){try{return c.a.getSurroundingPairs(e.id)}catch(e){return Object(i.e)(e),null}}}class p{constructor(e,t,n,i){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=n,this.leftoverVisibleColumns=i,this.selection=p._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,n,i){return e?new p(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new o.a(t,n),i):new p(new s.a(t,n,t,n),i,new o.a(t,n),i)}static _computeSelection(e,t){let n,i,r,o;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,r=t.lineNumber,o=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,r=t.lineNumber,o=t.column):(n=e.startLineNumber,i=e.startColumn,r=t.lineNumber,o=t.column),new a.a(n,i,r,o)}}class m{constructor(e,t,n){this.model=e,this.coordinatesConverter=t,this.cursorConfig=n}}class _{constructor(e){this.modelState=e,this.viewState=null}}class b{constructor(e){this.modelState=null,this.viewState=e}}class v{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new _(e)}static fromViewState(e){return new b(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,n=e.selectionStartColumn,i=e.positionLineNumber,r=e.positionColumn,a=new p(new s.a(t,n,t,n),0,new o.a(i,r),0);return v.fromModelState(a)}static fromModelSelections(e){let t=[];for(let n=0,i=e.length;n=65536?2:1,9===t)s=w.nextRenderTabStop(s,n);else{let n=r.y(t);for(;a=65536?2:1,n=i}r.E(t)||r.C(t)?s+=2:s+=1}}return s}static visibleColumnFromColumn2(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)}static columnFromVisibleColumn(e,t,n){if(t<=0)return 1;const i=e.length;let o=0,s=1,a=0;for(;a=65536?2:1,9===l)c=w.nextRenderTabStop(o,n);else{let t=r.y(l);for(;a=65536?2:1,t=o}c=r.E(l)||r.C(l)?o+2:o+1}const d=a+1;if(c>=t){return c-ts?s:r}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return e-1-(e-1)%t}static prevIndentTabStop(e,t){return e-1-(e-1)%t}}function C(e){return"'"===e||'"'===e||"`"===e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return _}));var i=n(12),r=n(45);const o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;const l="",c="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{constructor(e,t,n,i,r,d=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,d),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||l),this.query=i||l,this.fragment=r||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.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(a.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 ("//")')}(this,d))}static isUri(e){return e instanceof u||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===n?n=this.authority:null===n&&(n=l),void 0===i?i=this.path:null===i&&(i=l),void 0===r?r=this.query:null===r&&(r=l),void 0===o?o=this.fragment:null===o&&(o=l),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new f(t,n,i,r,o)}static parse(e,t=!1){const n=d.exec(e);return n?new f(n[2]||l,y(n[4]||l),y(n[5]||l),y(n[7]||l),y(n[9]||l),t):new f(l,l,l,l,l)}static file(e){let t=l;if(i.i&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const n=e.indexOf(c,2);-1===n?(t=e.substring(2),e=c):(t=e.substring(2,n),e=e.substring(n)||c)}return new f("file",t,e,l,l)}static from(e){return new f(e.scheme,e.authority,e.path,e.query,e.fragment)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");let n;return n=i.i&&"file"===e.scheme?u.file(r.i.join(_(e,!0),...t)).path:r.e.join(e.path,...t),e.with({path:n})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=i.i?1:void 0;class f extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),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}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t){let n=void 0,i=-1;for(let r=0;r=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));const t=g[o];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=t):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function m(e){let t=void 0;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i.i&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?m:p;let i="",{scheme:r,authority:o,path:s,query:a,fragment:l}=e;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=c,i+=c),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.indexOf(":"))?i+=n(t,!1):(i+=n(t.substr(0,e),!1),i+=":",i+=n(t.substr(e+1),!1)),i+="@"}-1===(e=(o=o.toLowerCase()).indexOf(":"))?i+=n(o,!1):(i+=n(o.substr(0,e),!1),i+=o.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),l&&(i+="#",i+=t?l:p(l,!1)),i}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function y(e){return e.match(v)?e.replace(v,e=>(function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}})(e)):e}},function(e,t,n){"use strict";n.d(t,"f",(function(){return f})),n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return b})),n.d(t,"c",(function(){return v}));var i=n(49),r=n(17),o=n(9),s=n(28),a=n(2),l=n(6),c=n(38),d=n(84),u=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=function(e,t){return function(n,i){t(n,i,e)}};function f(e){return void 0!==e.command}class g{constructor(e){this.id=g._idPool++,this._debugName=e}}g._idPool=0,g.CommandPalette=new g("CommandPalette"),g.EditorContext=new g("EditorContext"),g.EditorContextPeek=new g("EditorContextPeek"),g.MenubarEditMenu=new g("MenubarEditMenu"),g.MenubarGoMenu=new g("MenubarGoMenu"),g.MenubarSelectionMenu=new g("MenubarSelectionMenu");const p=Object(r.c)("menuService"),m=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.a,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===g.CommandPalette}}addCommand(e){return this.addCommands(c.a.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(a.h)(()=>{let t=!1;for(const n of e)t=this._commands.delete(n.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach((t,n)=>e.set(n,t)),e}appendMenuItem(e,t){return this.appendMenuItems(c.a.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,n=new d.a;for(const{id:i,item:r}of e){let e=this._menuItems.get(i);e||(e=new d.a,this._menuItems.set(i,e)),n.push(e.push(r)),t.add(i)}return this._onDidChangeMenu.fire(t),Object(a.h)(()=>{if(n.size>0){for(let e of n)e();this._onDidChangeMenu.fire(t),n.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===g.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const n of e)f(n)&&(t.add(n.command.id),n.alt&&t.add(n.alt.id));this._commands.forEach((n,i)=>{t.has(i)||e.push({command:n})})}};let _=class extends i.a{constructor(e,t,n){super(e,t),this._commandService=n}run(...e){return this._commandService.executeCommand(this.id,...e)}};_=u([h(2,s.b)],_);class b extends i.d{constructor(e,t,n,r){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,()=>{const o=[],s=t.createMenu(e.submenu,n),a=s.getActions(r);s.dispose();for(let e of a){const[,t]=e;t.length>0&&(o.push(...t),o.push(new i.c))}return o.length&&o.pop(),o},"submenu"),this.item=e}}let v=class e extends _{constructor(t,n,i,r,o){if("string"==typeof t.title?super(t.id,t.title,o):super(t.id,t.title.value,o),this._cssClass=void 0,this._enabled=!t.precondition||r.contextMatchesRules(t.precondition),this._tooltip=t.tooltip?"string"==typeof t.tooltip?t.tooltip:t.tooltip.value:void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this._checked=r.contextMatchesRules(e.condition),this._checked&&e.tooltip&&(this._tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value)}this._options=i||{},this.item=t,this.alt=n?new e(n,void 0,this._options,r,o):void 0}dispose(){this.alt&&this.alt.dispose(),super.dispose()}run(...e){let t=[];return this._options.arg&&(t=[...t,this._options.arg]),this._options.shouldForwardArgs&&(t=[...t,...e]),super.run(...t)}};v=u([h(3,o.b),h(4,s.b)],v)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n(6);const r=Object.freeze((function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));var o;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof s||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.b.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})}(o||(o={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new i.a),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=o.None}}},function(e,t,n){"use strict";n.d(t,"h",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"j",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"i",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return C})),n.d(t,"l",(function(){return S})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return L})),n.d(t,"k",(function(){return M})),n.d(t,"g",(function(){return E}));var i=n(0),r=n(12),o=n(138);const s=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class c{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class d{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}compute(e,t,n){return n}}class u{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class h{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,n){return n}}class f extends h{static boolean(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}constructor(e,t,n,i){void 0!==i&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return f.boolean(e,this.defaultValue)}}class g extends h{constructor(e,t,n,i,r,o){void 0!==o&&(o.type="integer",o.default=n,o.minimum=i,o.maximum=r),super(e,t,n,o),this.minimum=i,this.maximum=r}static clampedInt(e,t,n,i){if(void 0===e)return t;let r=parseInt(e,10);return isNaN(r)?t:(r=Math.max(n,r),0|(r=Math.min(i,r)))}validate(e){return g.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class p extends h{constructor(e,t,n,i,r){void 0!==r&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=i}static clamp(e,t,n){return en?n:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const n=parseFloat(e);return isNaN(n)?t:n}validate(e){return this.validationFn(p.float(e,this.defaultValue))}}class m extends h{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,n,i){void 0!==i&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return m.string(e,this.defaultValue)}}class _ extends h{constructor(e,t,n,i,r){void 0!==r&&(r.type="string",r.enum=i,r.default=n),super(e,t,n,r),this._allowedValues=i}static stringSet(e,t,n){return"string"!=typeof e?t:-1===n.indexOf(e)?t:e}validate(e){return _.stringSet(e,this.defaultValue,this._allowedValues)}}class b extends d{constructor(e,t,n,i,r,o,s){void 0!==s&&(s.type="string",s.enum=r,s.default=i),super(e,t,n,s),this._allowedValues=r,this._convert=o}validate(e){return"string"!=typeof e?this.defaultValue:-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var v;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(v||(v={}));class y extends d{constructor(){super(37,"fontLigatures",y.OFF,{anyOf:[{type:"boolean",description:i.a("fontLigatures","Enables/Disables font ligatures.")},{type:"string",description:i.a("fontFeatureSettings","Explicit font-feature-settings.")}],description:i.a("fontLigaturesGeneral","Configures font ligatures or font features."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?y.OFF:"true"===e?y.ON:e:Boolean(e)?y.ON:y.OFF}}y.OFF='"liga" off, "calt" off',y.ON='"liga" on, "calt" on';class w extends d{constructor(){super(39,"fontWeight",x.fontWeight,{anyOf:[{type:"number",minimum:w.MINIMUM_VALUE,maximum:w.MAXIMUM_VALUE,errorMessage:i.a("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:w.SUGGESTION_VALUES}],default:x.fontWeight,description:i.a("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(g.clampedInt(e,x.fontWeight,w.MINIMUM_VALUE,w.MAXIMUM_VALUE))}}w.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],w.MINIMUM_VALUE=1,w.MAXIMUM_VALUE=1e3;class C extends u{constructor(){super(117,[42,50,31,56,84,52,53,86,106,109,110,2])}compute(e,t,n){return C.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=e.scrollBeyondLastLine?t-1:0,i=(e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:i,minimapLineCount:Math.floor(e.viewLineCount/i)}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const o=t.stableMinimapLayoutInput,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=r>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,y=u?2:3;let w=Math.floor(r*i);const S=w/r;let k=!1,x=!1,L=y*h,M=h/r,D=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:n,extraLinesBeyondLastLine:o,desiredRatio:s,minimapLineCount:c}=C.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,height:i,lineHeight:l,pixelRatio:r});if(_/c>1)k=!0,x=!0,L=1,M=(h=1)/r;else{let i=!1,c=h+1;if("fit"===g){const n=Math.ceil((_+o)*L);v&&a&&b<=t.stableFitRemainingWidth?(i=!0,c=t.stableFitMaxMinimapScale):(i=n>w,v&&i?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===g||i){k=!0;const e=h;L=Math.min(l*r,Math.max(1,Math.floor(1/s))),(h=Math.min(c,Math.max(1,Math.floor(L/y))))>e&&(D=Math.min(2,h/e)),M=h/r/D,w=Math.ceil(Math.max(n,_+o)*L),v&&i&&(t.stableFitMaxMinimapScale=h)}}}const E=Math.floor(f*M),T=Math.min(E,Math.max(0,Math.floor((b-m-2)*M/(c+M)))+s);let O=Math.floor(r*T);const N=O/r;return{renderMinimap:u?1:2,minimapLeft:"left"===p?0:n-T-m,minimapWidth:T,minimapHeightIsEditorHeight:k,minimapIsSampling:x,minimapScale:h,minimapLineHeight:L,minimapCanvasInnerWidth:O=Math.floor(O*D),minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:N,minimapCanvasOuterHeight:S}}static computeLayout(e,t){const n=0|t.outerWidth,i=0|t.outerHeight,r=0|t.lineHeight,o=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,d=t.viewLineCount,u=e.get(106),h=e.get(109),f=e.get(110),p=e.get(2),m=t.isDominatedByLongLines,_=e.get(42),b=0!==e.get(52).renderType,v=e.get(53),y=e.get(86),w=e.get(56),S=e.get(84),k=S.verticalScrollbarSize,x=S.verticalHasArrows,L=S.arrowSize,M=S.horizontalScrollbarSize,D=e.get(50),E=e.get(31);let T;if("string"==typeof D&&/^\d+(\.\d+)?ch$/.test(D)){const e=parseFloat(D.substr(0,D.length-2));T=g.clampedInt(e*s,0,0,1e3)}else T=g.clampedInt(D,0,0,1e3);E&&(T+=16);let O=0;if(b){const e=Math.max(o,v);O=Math.round(e*a)}let N=0;_&&(N=r);let I=0,A=I+N,R=A+O,P=R+T;const j=n-N-O-T;let F=!1,B=!1,W=-1;2!==p&&(f&&m?(F=!0,B=!0):"on"===u||"bounded"===u?B=!0:"wordWrapColumn"===u&&(W=h));const H=C._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:r,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:y,minimap:w,verticalScrollbarWidth:k,viewLineCount:d,remainingWidth:j,isViewportWrapping:B},t.memory||new c);0!==H.renderMinimap&&0===H.minimapLeft&&(I+=H.minimapWidth,A+=H.minimapWidth,R+=H.minimapWidth,P+=H.minimapWidth);const Y=j-H.minimapWidth,V=Math.max(1,Math.floor((Y-k-2)/s)),z=x?L:0;return B&&(W=Math.max(1,V),"bounded"===u&&(W=Math.min(W,h))),{width:n,height:i,glyphMarginLeft:I,glyphMarginWidth:N,lineNumbersLeft:A,lineNumbersWidth:O,decorationsLeft:R,decorationsWidth:T,contentLeft:P,contentWidth:Y,minimap:H,viewportColumn:V,isWordWrapMinified:F,isViewportWrapping:B,wrappingColumn:W,verticalScrollbarWidth:k,horizontalScrollbarHeight:M,overviewRuler:{top:z,width:k,height:i-2*z,right:0}}}}function S(e){const t=e.get(79);return"editable"===t?e.get(72):"on"!==t}function k(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const x={fontFamily:r.f?"Menlo, Monaco, 'Courier New', monospace":r.d?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:r.f?12:14,lineHeight:0,letterSpacing:0},L={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},M=[];function D(e){return M[e.id]=e,e}const E={acceptSuggestionOnCommitCharacter:D(new f(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:i.a("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:D(new _(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",i.a("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:i.a("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:D(new class extends d{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[i.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),i.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),i.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:i.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return 0===n?e.accessibilitySupport:n}}),accessibilityPageSize:D(new g(3,"accessibilityPageSize",10,1,1073741824,{description:i.a("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:D(new m(4,"ariaLabel",i.a("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:D(new _(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.a("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),i.a("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:i.a("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingOvertype:D(new _(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",i.a("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:i.a("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:D(new _(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",i.a("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),i.a("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:i.a("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:D(new b(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[i.a("editor.autoIndent.none","The editor will not insert indentation automatically."),i.a("editor.autoIndent.keep","The editor will keep the current line's indentation."),i.a("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),i.a("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),i.a("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:i.a("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:D(new f(9,"automaticLayout",!1)),autoSurround:D(new _(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[i.a("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),i.a("editor.autoSurround.quotes","Surround with quotes but not brackets."),i.a("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:i.a("autoSurround","Controls whether the editor should automatically surround selections.")})),codeLens:D(new f(11,"codeLens",!0,{description:i.a("codeLens","Controls whether the editor shows CodeLens.")})),colorDecorators:D(new f(12,"colorDecorators",!0,{description:i.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:D(new f(13,"columnSelection",!1,{description:i.a("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:D(new class extends d{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(14,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:i.a("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:i.a("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:f.boolean(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:f.boolean(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:D(new f(15,"contextmenu",!0)),copyWithSyntaxHighlighting:D(new f(16,"copyWithSyntaxHighlighting",!0,{description:i.a("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:D(new b(17,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:i.a("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:D(new f(18,"cursorSmoothCaretAnimation",!1,{description:i.a("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:D(new b(19,"cursorStyle",v.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return v.Line;case"block":return v.Block;case"underline":return v.Underline;case"line-thin":return v.LineThin;case"block-outline":return v.BlockOutline;case"underline-thin":return v.UnderlineThin}}),{description:i.a("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:D(new g(20,"cursorSurroundingLines",0,0,1073741824,{description:i.a("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or `scrollOffset` in some other editors.")})),cursorSurroundingLinesStyle:D(new _(21,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[i.a("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),i.a("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:i.a("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:D(new g(22,"cursorWidth",0,0,1073741824,{markdownDescription:i.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:D(new f(23,"disableLayerHinting",!1)),disableMonospaceOptimizations:D(new f(24,"disableMonospaceOptimizations",!1)),dragAndDrop:D(new f(25,"dragAndDrop",!0,{description:i.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:D(new class extends f{constructor(){super(26,"emptySelectionClipboard",!0,{description:i.a("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}),extraEditorClassName:D(new m(27,"extraEditorClassName","")),fastScrollSensitivity:D(new p(28,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:i.a("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:D(new class extends d{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(29,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:i.a("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:i.a("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[i.a("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)"),i.a("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically"),i.a("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:i.a("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:i.a("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:r.f},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:i.a("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:i.a("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:f.boolean(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:f.boolean(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":_.stringSet(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:f.boolean(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:f.boolean(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:f.boolean(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:D(new f(30,"fixedOverflowWidgets",!1)),folding:D(new f(31,"folding",!0,{description:i.a("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:D(new _(32,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[i.a("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),i.a("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:i.a("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:D(new f(33,"foldingHighlight",!0,{description:i.a("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:D(new f(34,"unfoldOnClickAfterEndOfLine",!1,{description:i.a("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:D(new m(35,"fontFamily",x.fontFamily,{description:i.a("fontFamily","Controls the font family.")})),fontInfo:D(new class extends u{constructor(){super(36)}compute(e,t,n){return e.fontInfo}}),fontLigatures2:D(new y),fontSize:D(new class extends h{constructor(){super(38,"fontSize",x.fontSize,{type:"number",minimum:6,maximum:100,default:x.fontSize,description:i.a("fontSize","Controls the font size in pixels.")})}validate(e){let t=p.float(e,this.defaultValue);return 0===t?x.fontSize:p.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}),fontWeight:D(new w),formatOnPaste:D(new f(40,"formatOnPaste",!1,{description:i.a("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:D(new f(41,"formatOnType",!1,{description:i.a("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:D(new f(42,"glyphMargin",!0,{description:i.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:D(new class extends d{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[i.a("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),i.a("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),i.a("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]};super(43,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:i.a("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:i.a("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:i.a("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:i.a("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:i.a("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:i.a("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,description:i.a("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,description:i.a("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,description:i.a("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,description:i.a("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,description:i.a("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,r,o;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:_.stringSet(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:_.stringSet(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(n=s.multipleTypeDefinitions)&&void 0!==n?n:_.stringSet(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(i=s.multipleDeclarations)&&void 0!==i?i:_.stringSet(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(r=s.multipleImplementations)&&void 0!==r?r:_.stringSet(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=s.multipleReferences)&&void 0!==o?o:_.stringSet(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:m.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:m.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:m.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:m.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:m.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:D(new f(44,"hideCursorInOverviewRuler",!1,{description:i.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:D(new f(45,"highlightActiveIndentGuide",!0,{description:i.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:D(new class extends d{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(46,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:i.a("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:i.a("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:i.a("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:f.boolean(t.enabled,this.defaultValue.enabled),delay:g.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:f.boolean(t.sticky,this.defaultValue.sticky)}}}),inDiffEditor:D(new f(47,"inDiffEditor",!1)),letterSpacing:D(new p(48,"letterSpacing",x.letterSpacing,e=>p.clamp(e,-5,20),{description:i.a("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:D(new class extends d{constructor(){const e={enabled:!0};super(49,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:i.a("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:f.boolean(t.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:D(new h(50,"lineDecorationsWidth",10)),lineHeight:D(new class extends g{constructor(){super(51,"lineHeight",x.lineHeight,0,150,{description:i.a("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}compute(e,t,n){return e.fontInfo.lineHeight}}),lineNumbers:D(new class extends d{constructor(){super(52,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[i.a("lineNumbers.off","Line numbers are not rendered."),i.a("lineNumbers.on","Line numbers are rendered as absolute number."),i.a("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),i.a("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:i.a("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,n=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:n}}}),lineNumbersMinChars:D(new g(53,"lineNumbersMinChars",5,1,300)),links:D(new f(54,"links",!0,{description:i.a("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:D(new _(55,"matchBrackets","always",["always","near","never"],{description:i.a("matchBrackets","Highlight matching brackets.")})),minimap:D(new class extends d{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(56,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:i.a("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[i.a("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),i.a("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),i.a("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:i.a("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:i.a("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:i.a("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:i.a("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:i.a("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:i.a("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:f.boolean(t.enabled,this.defaultValue.enabled),size:_.stringSet(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:_.stringSet(t.side,this.defaultValue.side,["right","left"]),showSlider:_.stringSet(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:f.boolean(t.renderCharacters,this.defaultValue.renderCharacters),scale:g.clampedInt(t.scale,1,1,3),maxColumn:g.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:D(new _(57,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:D(new p(58,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:i.a("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:D(new f(59,"mouseWheelZoom",!1,{markdownDescription:i.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:D(new f(60,"multiCursorMergeOverlapping",!0,{description:i.a("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:D(new b(61,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?r.f?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[i.a("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),i.a("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:i.a({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:D(new _(62,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[i.a("multiCursorPaste.spread","Each cursor pastes a single line of the text."),i.a("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:i.a("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:D(new f(63,"occurrencesHighlight",!0,{description:i.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:D(new f(64,"overviewRulerBorder",!0,{description:i.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:D(new g(65,"overviewRulerLanes",3,0,3)),padding:D(new class extends d{constructor(){super(66,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:i.a("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:i.a("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:g.clampedInt(t.top,0,0,1e3),bottom:g.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:D(new class extends d{constructor(){const e={enabled:!0,cycle:!1};super(67,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:i.a("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:i.a("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:f.boolean(t.enabled,this.defaultValue.enabled),cycle:f.boolean(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:D(new _(68,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[i.a("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),i.a("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:i.a("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:D(new f(69,"definitionLinkOpensInPeek",!1,{description:i.a("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:D(new class extends d{constructor(){const e={other:!0,comments:!1,strings:!1};super(70,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:i.a("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:i.a("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:i.a("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:i.a("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,n={other:f.boolean(t.other,this.defaultValue.other),comments:f.boolean(t.comments,this.defaultValue.comments),strings:f.boolean(t.strings,this.defaultValue.strings)};return!!(n.other&&n.comments&&n.strings)||!!(n.other||n.comments||n.strings)&&n}return this.defaultValue}}),quickSuggestionsDelay:D(new g(71,"quickSuggestionsDelay",10,0,1073741824,{description:i.a("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:D(new f(72,"readOnly",!1)),renameOnType:D(new f(73,"renameOnType",!1,{description:i.a("renameOnType","Controls whether the editor auto renames on type.")})),renderControlCharacters:D(new f(74,"renderControlCharacters",!1,{description:i.a("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:D(new f(75,"renderIndentGuides",!0,{description:i.a("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:D(new f(76,"renderFinalNewline",!0,{description:i.a("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:D(new _(77,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",i.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:i.a("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:D(new f(78,"renderLineHighlightOnlyWhenFocus",!1,{description:i.a("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused")})),renderValidationDecorations:D(new _(79,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:D(new _(80,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",i.a("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),i.a("renderWhitespace.selection","Render whitespace characters only on selected text."),i.a("renderWhitespace.trailing","Render only trailing whitespace characters"),""],description:i.a("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:D(new g(81,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:D(new f(82,"roundedSelection",!0,{description:i.a("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:D(new class extends d{constructor(){const e=[],t={type:"number",description:i.a("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(83,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:i.a("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:i.a("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let n of e)if("number"==typeof n)t.push({column:g.clampedInt(n,0,0,1e4),color:null});else if(n&&"object"==typeof n){const e=n;t.push({column:g.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}),scrollbar:D(new class extends d{constructor(){super(84,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,n=g.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=g.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:g.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:k(t.vertical,this.defaultValue.vertical),horizontal:k(t.horizontal,this.defaultValue.horizontal),useShadows:f.boolean(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:f.boolean(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:f.boolean(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:f.boolean(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:f.boolean(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:g.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:g.clampedInt(t.verticalSliderSize,i,0,1e3)}}}),scrollBeyondLastColumn:D(new g(85,"scrollBeyondLastColumn",5,0,1073741824,{description:i.a("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:D(new f(86,"scrollBeyondLastLine",!0,{description:i.a("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:D(new f(87,"scrollPredominantAxis",!0,{description:i.a("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:D(new f(88,"selectionClipboard",!0,{description:i.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:r.d})),selectionHighlight:D(new f(89,"selectionHighlight",!0,{description:i.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:D(new f(90,"selectOnLineNumbers",!0)),showFoldingControls:D(new _(91,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[i.a("showFoldingControls.always","Always show the folding controls."),i.a("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:i.a("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:D(new f(92,"showUnused",!0,{description:i.a("showUnused","Controls fading out of unused code.")})),showDeprecated:D(new f(113,"showDeprecated",!0,{description:i.a("showDeprecated","Controls strikethrough deprecated variables.")})),snippetSuggestions:D(new _(93,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[i.a("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),i.a("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),i.a("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),i.a("snippetSuggestions.none","Do not show snippet suggestions.")],description:i.a("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smoothScrolling:D(new f(94,"smoothScrolling",!1,{description:i.a("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:D(new g(95,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:D(new class extends d{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,statusBar:{visible:!1}};super(96,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[i.a("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),i.a("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:i.a("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:i.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:i.a("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:i.a("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:i.a("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:i.a("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.maxVisibleSuggestions":{type:"number",default:e.maxVisibleSuggestions,minimum:1,maximum:15,description:i.a("suggest.maxVisibleSuggestions","Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:i.a("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:i.a("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,markdownDescription:i.a("editor.suggest.statusBar.visible","Controls the visibility of the status bar at the bottom of the suggest widget.")}})}validate(e){var t;if(!e||"object"!=typeof e)return this.defaultValue;const n=e;return{insertMode:_.stringSet(n.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:f.boolean(n.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:f.boolean(n.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:f.boolean(n.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:f.boolean(n.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:f.boolean(n.showIcons,this.defaultValue.showIcons),maxVisibleSuggestions:g.clampedInt(n.maxVisibleSuggestions,this.defaultValue.maxVisibleSuggestions,1,15),showMethods:f.boolean(n.showMethods,this.defaultValue.showMethods),showFunctions:f.boolean(n.showFunctions,this.defaultValue.showFunctions),showConstructors:f.boolean(n.showConstructors,this.defaultValue.showConstructors),showFields:f.boolean(n.showFields,this.defaultValue.showFields),showVariables:f.boolean(n.showVariables,this.defaultValue.showVariables),showClasses:f.boolean(n.showClasses,this.defaultValue.showClasses),showStructs:f.boolean(n.showStructs,this.defaultValue.showStructs),showInterfaces:f.boolean(n.showInterfaces,this.defaultValue.showInterfaces),showModules:f.boolean(n.showModules,this.defaultValue.showModules),showProperties:f.boolean(n.showProperties,this.defaultValue.showProperties),showEvents:f.boolean(n.showEvents,this.defaultValue.showEvents),showOperators:f.boolean(n.showOperators,this.defaultValue.showOperators),showUnits:f.boolean(n.showUnits,this.defaultValue.showUnits),showValues:f.boolean(n.showValues,this.defaultValue.showValues),showConstants:f.boolean(n.showConstants,this.defaultValue.showConstants),showEnums:f.boolean(n.showEnums,this.defaultValue.showEnums),showEnumMembers:f.boolean(n.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:f.boolean(n.showKeywords,this.defaultValue.showKeywords),showWords:f.boolean(n.showWords,this.defaultValue.showWords),showColors:f.boolean(n.showColors,this.defaultValue.showColors),showFiles:f.boolean(n.showFiles,this.defaultValue.showFiles),showReferences:f.boolean(n.showReferences,this.defaultValue.showReferences),showFolders:f.boolean(n.showFolders,this.defaultValue.showFolders),showTypeParameters:f.boolean(n.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:f.boolean(n.showSnippets,this.defaultValue.showSnippets),showUsers:f.boolean(n.showUsers,this.defaultValue.showUsers),showIssues:f.boolean(n.showIssues,this.defaultValue.showIssues),statusBar:{visible:f.boolean(null===(t=n.statusBar)||void 0===t?void 0:t.visible,!!this.defaultValue.statusBar.visible)}}}}),suggestFontSize:D(new g(97,"suggestFontSize",0,0,1e3,{markdownDescription:i.a("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:D(new g(98,"suggestLineHeight",0,0,1e3,{markdownDescription:i.a("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")})),suggestOnTriggerCharacters:D(new f(99,"suggestOnTriggerCharacters",!0,{description:i.a("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:D(new _(100,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[i.a("suggestSelection.first","Always select the first suggestion."),i.a("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),i.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:i.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:D(new _(101,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[i.a("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),i.a("tabCompletion.off","Disable tab completions."),i.a("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:i.a("tabCompletion","Enables tab completions.")})),tabIndex:D(new g(102,"tabIndex",0,-1,1073741824)),unusualLineTerminators:D(new _(103,"unusualLineTerminators","prompt",["off","prompt","auto"],{enumDescriptions:[i.a("unusualLineTerminators.off","Unusual line terminators are ignored."),i.a("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed."),i.a("unusualLineTerminators.auto","Unusual line terminators are automatically removed.")],description:i.a("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useTabStops:D(new f(104,"useTabStops",!0,{description:i.a("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:D(new m(105,"wordSeparators",o.b,{description:i.a("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:D(new _(106,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[i.a("wordWrap.off","Lines will never wrap."),i.a("wordWrap.on","Lines will wrap at the viewport width."),i.a({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),i.a({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:i.a({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:D(new m(107,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:D(new m(108,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:D(new g(109,"wordWrapColumn",80,1,1073741824,{markdownDescription:i.a({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapMinified:D(new f(110,"wordWrapMinified",!0)),wrappingIndent:D(new b(111,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[i.a("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),i.a("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),i.a("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),i.a("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:i.a("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:D(new _(112,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[i.a("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),i.a("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:i.a("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:D(new class extends u{constructor(){super(114,[57,27])}compute(e,t,n){const i=["monaco-editor"];return t.get(27)&&i.push(t.get(27)),e.extraEditorClassName&&i.push(e.extraEditorClassName),"default"===t.get(57)?i.push("mouse-default"):"copy"===t.get(57)&&i.push("mouse-copy"),t.get(92)&&i.push("showUnused"),t.get(113)&&i.push("showDeprecated"),i.join(" ")}}),pixelRatio:D(new class extends u{constructor(){super(115)}compute(e,t,n){return e.pixelRatio}}),tabFocusMode:D(new class extends u{constructor(){super(116,[72])}compute(e,t,n){return!!t.get(72)||e.tabFocusMode}}),layoutInfo:D(new C),wrappingInfo:D(new class extends u{constructor(){super(118,[117])}compute(e,t,n){const i=t.get(117);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}})}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return d}));var i=n(2),r=n(20),o=n(17),s=n(6),a=n(84),l=n(38);const c=Object(o.c)("commandService"),d=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new s.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let n of e.description.args)t.push(n.constraint);const n=e.handler;e.handler=function(e,...i){return Object(r.m)(i,t),n(e,...i)}}const{id:n}=e;let o=this._commands.get(n);o||(o=new a.a,this._commands.set(n,o));let s=o.unshift(e),l=Object(i.h)(()=>{s();const e=this._commands.get(n);(null==e?void 0:e.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),l}registerCommandAlias(e,t){return d.registerCommand(e,(e,...n)=>e.get(c).executeCommand(t,...n))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return l.a.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const n=this.getCommand(t);n&&e.set(t,n)}return e}}},function(e,t,n){"use strict";var i=n(15),r=n(6),o=n(2),s=n(8),a=n(24),l=n(27),c=n(10),d=n(3),u=n(22),h=n(48),f=n(208);class g{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function p(e,t,n,i,r){let o;for(r.spacesDiff=0,r.looksLikeAlignment=!1,o=0;o0&&a>0)return;if(l>0&&c>0)return;let d=Math.abs(a-c),u=Math.abs(s-l);if(0===d)return r.spacesDiff=u,void(u>0&&0<=l-1&&l-10?r++:m>1&&o++,p(s,a,u,g,d),d.looksLikeAlignment&&(!n||t!==d.spacesDiff))continue;let b=d.spacesDiff;b<=8&&c[b]++,s=u,a=g}let u=n;r!==o&&(u=r{let n=c[t];n>e&&(e=n,h=t)}),4===h&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(h=2)}return{insertSpaces:u,tabSize:h}}function _(e){return(1&e.metadata)>>>0}function b(e,t){e.metadata=254&e.metadata|t<<0}function v(e){return(2&e.metadata)>>>1==1}function y(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2==1}function C(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function S(e){return(8&e.metadata)>>>3==1}function k(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function x(e,t){e.metadata=207&e.metadata|t<<4}function L(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}class M{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,b(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,C(this,!1),x(this,1),k(this,!1),L(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,y(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;let t=this.options.className;C(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),x(this,this.options.stickiness),k(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),L(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const D=new M(null,0,0);D.parent=D,D.left=D,D.right=D,b(D,0);class E{constructor(){this.root=D,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r){return this.root===D?[]:function(e,t,n,i,r,o){let s=e.root,a=0,l=0,c=0,d=0,u=[],h=0;for(;s!==D;)if(v(s))y(s.left,!1),y(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!v(s.left)){if((l=a+s.maxEnd)n)y(s,!0);else{if((d=a+s.end)>=t){s.setCachedOffsets(c,d,o);let e=!0;i&&s.ownerId&&s.ownerId!==i&&(e=!1),r&&w(s)&&(e=!1),e&&(u[h++]=s)}y(s,!0),s.right===D||v(s.right)||(a+=s.delta,s=s.right)}}return y(e.root,!1),u}(this,e,t,n,i,r)}search(e,t,n){return this.root===D?[]:function(e,t,n,i){let r=e.root,o=0,s=0,a=0,l=[],c=0;for(;r!==D;){if(v(r)){y(r.left,!1),y(r.right,!1),r===r.parent.right&&(o-=r.parent.delta),r=r.parent;continue}if(r.left!==D&&!v(r.left)){r=r.left;continue}s=o+r.start,a=o+r.end,r.setCachedOffsets(s,a,i);let e=!0;t&&r.ownerId&&r.ownerId!==t&&(e=!1),n&&w(r)&&(e=!1),e&&(l[c++]=r),y(r,!0),r.right===D||v(r.right)||(o+=r.delta,r=r.right)}return y(e.root,!1),l}(this,e,t,n)}collectNodesFromOwner(e){return function(e,t){let n=e.root,i=[],r=0;for(;n!==D;)v(n)?(y(n.left,!1),y(n.right,!1),n=n.parent):n.left===D||v(n.left)?(n.ownerId===t&&(i[r++]=n),y(n,!0),n.right===D||v(n.right)||(n=n.right)):n=n.left;return y(e.root,!1),i}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,n=[],i=0;for(;t!==D;)v(t)?(y(t.left,!1),y(t.right,!1),t=t.parent):t.left===D||v(t.left)?t.right===D||v(t.right)?(n[i++]=t,y(t,!0)):t=t.right:t=t.left;return y(e.root,!1),n}(this)}insert(e){N(this,e),this._normalizeDeltaIfNecessary()}delete(e){I(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;for(;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,o=n.end+i;n.setCachedOffsets(r,o,t)}acceptReplace(e,t,n,i){const r=function(e,t,n){let i=e.root,r=0,o=0,s=0,a=0,l=[],c=0;for(;i!==D;)if(v(i))y(i.left,!1),y(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else{if(!v(i.left)){if((o=r+i.maxEnd)n?y(i,!0):((a=r+i.end)>=t&&(i.setCachedOffsets(s,a,0),l[c++]=i),y(i,!0),i.right===D||v(i.right)||(r+=i.delta,i=i.right))}return y(e.root,!1),l}(this,e,e+t);for(let e=0,t=r.length;en?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),y(r,!0)):(y(r,!0),r.right===D||v(r.right)||(o+=r.delta,r=r.right))}y(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(let o=0,s=r.length;on)&&(1!==i&&(2===i||t))}function O(e,t,n,i,r){const o=function(e){return(48&e.metadata)>>>4}(e),s=0===o||2===o,a=1===o||2===o,l=n-t,c=i,d=Math.min(l,c),u=e.start;let h=!1;const f=e.end;let g=!1;t<=u&&f<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,g=!0);{const e=r?1:l>0?2:0;!h&&T(u,s,t,e)&&(h=!0),!g&&T(f,a,t,e)&&(g=!0)}if(d>0&&!r){const e=l>c?2:0;!h&&T(u,s,t+d,e)&&(h=!0),!g&&T(f,a,t+d,e)&&(g=!0)}{const i=r?1:0;!h&&T(u,s,n,i)&&(e.start=t+c,h=!0),!g&&T(f,a,n,i)&&(e.end=t+c,g=!0)}const p=c-l;h||(e.start=Math.max(0,u+p)),g||(e.end=Math.max(0,f+p)),e.start>e.end&&(e.end=e.start)}function N(e,t){if(e.root===D)return t.parent=D,t.left=D,t.right=D,b(t,0),e.root=t,e.root;!function(e,t){let n=0,i=e.root;const r=t.start,o=t.end;for(;;){if(W(r,o,i.start+n,i.end+n)<0){if(i.left===D){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===D){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=D,t.right=D,b(t,1)}(e,t),B(t.parent);let n=t;for(;n!==e.root&&1===_(n.parent);)if(n.parent===n.parent.parent.left){const t=n.parent.parent.right;1===_(t)?(b(n.parent,0),b(t,0),b(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&R(e,n=n.parent),b(n.parent,0),b(n.parent.parent,1),P(e,n.parent.parent))}else{const t=n.parent.parent.left;1===_(t)?(b(n.parent,0),b(t,0),b(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&P(e,n=n.parent),b(n.parent,0),b(n.parent.parent,1),R(e,n.parent.parent))}return b(e.root,0),t}function I(e,t){let n,i;if(t.left===D?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===D?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==D;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,b(n,0),t.detach(),A(),F(n),void(e.root.parent=D);let r,o=1===_(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,b(i,_(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==D&&(i.left.parent=i),i.right!==D&&(i.right.parent=i)),t.detach(),o)return B(n.parent),i!==t&&(B(i),B(i.parent)),void A();for(B(n),B(n.parent),i!==t&&(B(i),B(i.parent));n!==e.root&&0===_(n);)n===n.parent.left?(1===_(r=n.parent.right)&&(b(r,0),b(n.parent,1),R(e,n.parent),r=n.parent.right),0===_(r.left)&&0===_(r.right)?(b(r,1),n=n.parent):(0===_(r.right)&&(b(r.left,0),b(r,1),P(e,r),r=n.parent.right),b(r,_(n.parent)),b(n.parent,0),b(r.right,0),R(e,n.parent),n=e.root)):(1===_(r=n.parent.left)&&(b(r,0),b(n.parent,1),P(e,n.parent),r=n.parent.left),0===_(r.left)&&0===_(r.right)?(b(r,1),n=n.parent):(0===_(r.left)&&(b(r.right,0),b(r,1),R(e,r),r=n.parent.left),b(r,_(n.parent)),b(n.parent,0),b(r.left,0),P(e,n.parent),n=e.root));b(n,0),A()}function A(){D.parent=D,D.delta=0,D.start=0,D.end=0}function R(e,t){const n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==D&&(n.left.parent=t),n.parent=t.parent,t.parent===D?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,F(t),F(n)}function P(e,t){const n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==D&&(n.right.parent=t),n.parent=t.parent,t.parent===D?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,F(t),F(n)}function j(e){let t=e.end;if(e.left!==D){const n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==D){const n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function F(e){e.maxEnd=j(e)}function B(e){for(;e!==D;){const t=j(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function W(e,t,n,i){return e===n?t-i:e-n}class H{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Y)return V(this.right);let e=this;for(;e.parent!==Y&&e.parent.left!==e;)e=e.parent;return e.parent===Y?Y:e.parent}prev(){if(this.left!==Y)return z(this.left);let e=this;for(;e.parent!==Y&&e.parent.right!==e;)e=e.parent;return e.parent===Y?Y:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Y=new H(null,0);function V(e){for(;e.left!==Y;)e=e.left;return e}function z(e){for(;e.right!==Y;)e=e.right;return e}function U(e){return e===Y?0:e.size_left+e.piece.length+U(e.right)}function $(e){return e===Y?0:e.lf_left+e.piece.lineFeedCnt+$(e.right)}function q(){Y.parent=Y}function K(e,t){let n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==Y&&(n.left.parent=t),n.parent=t.parent,t.parent===Y?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function G(e,t){let n=t.left;t.left=n.right,n.right!==Y&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===Y?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function Z(e,t){let n,i;if(n=t.left===Y?(i=t).right:t.right===Y?(i=t).left:(i=V(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),q(),void(e.root.parent=Y);let r,o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,Q(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,Q(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Y&&(i.left.parent=i),i.right!==Y&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,Q(e,i)),t.detach(),n.parent.left===n){let t=U(n),i=$(n);if(t!==n.parent.size_left||i!==n.parent.lf_left){let r=t-n.parent.size_left,o=i-n.parent.lf_left;n.parent.size_left=t,n.parent.lf_left=i,X(e,n.parent,r,o)}}if(Q(e,n.parent),o)q();else{for(;n!==e.root&&0===n.color;)n===n.parent.left?(1===(r=n.parent.right).color&&(r.color=0,n.parent.color=1,K(e,n.parent),r=n.parent.right),0===r.left.color&&0===r.right.color?(r.color=1,n=n.parent):(0===r.right.color&&(r.left.color=0,r.color=1,G(e,r),r=n.parent.right),r.color=n.parent.color,n.parent.color=0,r.right.color=0,K(e,n.parent),n=e.root)):(1===(r=n.parent.left).color&&(r.color=0,n.parent.color=1,G(e,n.parent),r=n.parent.left),0===r.left.color&&0===r.right.color?(r.color=1,n=n.parent):(0===r.left.color&&(r.right.color=0,r.color=1,K(e,r),r=n.parent.left),r.color=n.parent.color,n.parent.color=0,r.left.color=0,G(e,n.parent),n=e.root));n.color=0,q()}}function J(e,t){for(Q(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&K(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,G(e,t.parent.parent))}else{const n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&G(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,K(e,t.parent.parent))}e.root.color=0}function X(e,t,n,i){for(;t!==e.root&&t!==Y;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function Q(e,t){let n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=U((t=t.parent).left)-t.size_left,i=$(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}Y.parent=Y,Y.left=Y,Y.right=Y,Y.color=0;var ee=n(96);const te=65535;function ne(e){let t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}class ie{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function re(e,t=!0){let n=[0],i=1;for(let t=0,r=e.length;t(e!==Y&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class le{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let i=0;i=e)&&(n[i]=null,t=!0)}if(t){let e=[];for(const t of n)null!==t&&e.push(t);this._cache=e}}}class ce{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new se("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Y,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let t=0,n=e.length;t0){e[t].lineStarts||(e[t].lineStarts=re(e[t].buffer));let n=new oe(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),i=this.rbInsertRight(i,n)}this._searchCache=new le(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=te,n=t-Math.floor(t/3),i=2*n,r="",o=0,s=[];if(this.iterate(this.root,t=>{let a=this.getNodeContent(t),l=a.length;if(o<=n||o+l0){let t=r.replace(/\r\n|\r|\n/g,e);s.push(new se(t,re(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new ae(this,e)}getOffsetAt(e,t){let n=0,i=this.root;for(;i!==Y;)if(i.left!==Y&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1)}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,i=e;for(;t!==Y;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,0===r.index){let e=i-this.getOffsetAt(n+1,1);return new c.a(n+1,e+1)}return new c.a(n+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===Y){let t=i-e-this.getOffsetAt(n+1,1);return new c.a(n+1,t+1)}t=t.right}return new c.a(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),o=i.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==Y;){let e=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){o+=e.substring(i,i+t.remainder);break}o+=e.substr(i,n.piece.length),n=n.next()}return o}getLinesContent(){let e=[],t=0,n="",i=!1;return this.iterate(this.root,r=>{if(r===Y)return!0;const o=r.piece;let s=o.length;if(0===s)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,c=o.start.line,d=o.end.line;let u=l[c]+o.start.column;if(i&&(10===a.charCodeAt(u)&&(u++,s--),e[t++]=n,n="",i=!1,0===s))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(u+s-1)?n+=a.substr(u,s):(i=!0,n+=a.substr(u,s-1)),!0;n+=this._EOLNormalized?a.substring(u,Math.max(u,l[c+1]-this._EOLLength)):a.substring(u,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let i=c+1;ie+_,t.reset(0)):(f=p.buffer,g=e=>e,t.reset(_));do{if(h=t.next(f)){if(g(h.index)>=b)return c;this.positionInBuffer(e,g(h.index)-m,v);let t=this.getLineFeedCnt(e.piece.bufferIndex,r,v),o=v.line===r.line?v.column-r.column+i:v.column+1,s=o+h[0].length;if(u[c++]=Object(ee.d)(new d.a(n+t,o,n+t,s),h,a),g(h.index)+h[0].length>=b)return c;if(c>=l)return c}}while(h);return c}findMatchesLineByLine(e,t,n,i){const r=[];let o=0;const s=new ee.b(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder),d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,d,t,n,i,o,r),r;let u=e.startLineNumber,h=a.node;for(;h!==l.node;){let l=this.getLineFeedCnt(h.piece.bufferIndex,c,h.piece.end);if(l>=1){let a=this._buffers[h.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),f=a[c.line+l],g=u===e.startLineNumber?e.startColumn:1;if((o=this.findMatchesInNode(h,s,u,g,c,this.positionInBuffer(h,f-d),t,n,i,o,r))>=i)return r;u+=l}let d=u===e.startLineNumber?e.startColumn-1:0;if(u===e.endLineNumber){const a=this.getLineContent(u).substring(d,e.endColumn-1);return o=this._findMatchesInLine(t,s,a,e.endLineNumber,d,o,r,n,i),r}if((o=this._findMatchesInLine(t,s,this.getLineContent(u).substr(d),u,d,o,r,n,i))>=i)return r;u++,h=(a=this.nodeAt2(u,1)).node,c=this.positionInBuffer(a.node,a.remainder)}if(u===e.endLineNumber){let a=u===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(u).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,s,l,e.endLineNumber,a,o,r,n,i),r}let f=u===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,s,u,f,c,d,t,n,i,o,r),r}_findMatchesInLine(e,t,n,i,r,o,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,u=n.length;let f=-a;for(;-1!==(f=n.indexOf(t,f+a));)if((!c||Object(ee.e)(c,n,u,f,a))&&(s[o++]=new h.b(new d.a(i,f+1+r,i,f+1+a+r),null),o>=l))return o;return o}let u;t.reset(0);do{if((u=t.next(n))&&(s[o++]=Object(ee.d)(new d.a(i,u.index+1+r,i,u.index+1+u[0].length+r),u,a),o>=l))return o}while(u);return o}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Y){let{node:n,remainder:i,nodeStartOffset:r}=this.nodeAt(e),o=n.piece,s=o.bufferIndex,a=this.positionInBuffer(n,i);if(0===n.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&r+o.length===e&&t.lengthe){let e=[],r=new oe(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(s,o.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){if(10===this.nodeCharCodeAt(n,i)){let e={line:r.start.line+1,column:0};r=new oe(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(n,i-1)){let r=this.positionInBuffer(n,i-1);this.deleteNodeTail(n,r),t="\r"+t,0===n.piece.length&&e.push(n)}else this.deleteNodeTail(n,a)}else this.deleteNodeTail(n,a);let l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(n,r);let c=n;for(let e=0;e=0;e--)r=this.rbInsertLeft(r,i[e]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),r=i;for(let e=1;e=d))break;a=c+1}return n?(n.line=c,n.column=s-u,null):{line:c,column:s-u}}getLineFeedCnt(e,t,n){if(0===n.column)return n.line-t.line;let i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;let r=i[n.line+1],o=i[n.line]+n.column;if(r>o+1)return n.line-t.line;let s=o-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tte){let t=[];for(;e.length>te;){const n=e.charCodeAt(te-1);let i;13===n||n>=55296&&n<=56319?(i=e.substring(0,te-1),e=e.substring(te-1)):(i=e.substring(0,te),e=e.substring(te));let r=re(i);t.push(new oe(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new se(i,r))}let n=re(e);return t.push(new oe(this._buffers.length,{line:0,column:0},{line:n.length-1,column:e.length-n[n.length-1]},n.length-1,e.length)),this._buffers.push(new se(e,n)),t}let t=this._buffers[0].buffer.length;const n=re(e,!1);let i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let e=0;e=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let i=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:r,nodeStartLineNumber:o-(e-1-n.lf_left)}),a.substring(l+i,l+s-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(n,e-n.lf_left-2),r=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=r.substring(o+t,o+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}}for(n=n.next();n!==Y;){let e=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let r=this.getAccumulatedValue(n,0),o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=e.substring(o,o+r-t)}{let t=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=e.substr(t,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==Y;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,i=this.positionInBuffer(e,t),r=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[r]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),o=t,s=this.offsetInBuffer(n.bufferIndex,o),a=this.getLineFeedCnt(n.bufferIndex,n.start,o),l=a-i,c=s-r,d=n.length+c;e.piece=new oe(n.bufferIndex,n.start,o,a,d),X(this,e,c,l)}deleteNodeHead(e,t){const n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),o=t,s=this.getLineFeedCnt(n.bufferIndex,o,n.end),a=s-i,l=r-this.offsetInBuffer(n.bufferIndex,o),c=n.length+l;e.piece=new oe(n.bufferIndex,o,n.end,s,c),X(this,e,l,a)}shrinkNode(e,t,n){const i=e.piece,r=i.start,o=i.end,s=i.length,a=i.lineFeedCnt,l=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,l),d=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new oe(i.bufferIndex,i.start,l,c,d),X(this,e,d-s,c-a);let u=new oe(i.bufferIndex,n,o,this.getLineFeedCnt(i.bufferIndex,n,o),this.offsetInBuffer(i.bufferIndex,o)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,u);this.validateCRLFWithPrevNode(h)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=re(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;let n={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(n),n}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let n=this.root,i=0;for(;n!==Y;)if(n.left!==Y&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,o),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){let r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i};t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==Y;){if(n.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(n,0),i=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,e),nodeStartOffset:i}}if(n.piece.length>=t-1){return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)}}t-=n.piece.length,n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===Y||0===e.piece.lineFeedCnt)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==Y&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n,i=[],r=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new oe(e.piece.bufferIndex,e.piece.start,n,s,o),X(this,e,-1,-1),0===e.piece.length&&i.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new oe(t.piece.bufferIndex,a,t.piece.end,c,l),X(this,t,-1,-1),0===t.piece.length&&i.push(t);let d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex)}this._mightContainRTL=i,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=o;const g=this._doApplyEdits(l);let p=null;if(t&&u.length>0){u.sort((e,t)=>t.lineNumber-e.lineNumber),p=[];for(let e=0,t=u.length;e0&&u[e-1].lineNumber===t)continue;let n=u[e].oldContent,i=this.getLineContent(t);0!==i.length&&i!==n&&-1===s.w(i)&&p.push(t)}}return this._onDidChangeContent.fire(),new h.a(f,g,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,i=e[e.length-1].range,r=new d.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn);let o=n.startLineNumber,s=n.startColumn;const a=[];for(let n=0,i=e.length;n0&&a.push(i.text),o=r.endLineNumber,s=r.endColumn}const l=a.join(""),[c,u,h]=Object(de.f)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:c,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(he._sortOpsDescending);let t=[];for(let n=0;n0){const e=c.eolCount+1;l=1===e?new d.a(s,a,s,a+c.firstLineLength):new d.a(s,a,s+e-1,c.lastLineLength+1)}else l=new d.a(s,a,s,a);n=l.endLineNumber,i=l.endColumn,t.push(l),r=c}return t}static _sortOpsAscending(e,t){let n=d.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){let n=d.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}class fe{constructor(e,t,n,i,r,o,s,a,l){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=r,this._containsRTL=o,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,i=n.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let n=1,i=0,r=0,o=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}const a=new ie(ne(e),i,r,o,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new se(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.m(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=s.n(e))}finish(e=!0){return this._finish(),new fe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=re(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class pe{constructor(){this.changeType=1}}class me{constructor(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}class _e{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class be{constructor(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class ve{constructor(){this.changeType=5}}class ye{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[],i=[];for(let e=0;e=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new c.a(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class Ee extends o.a{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new De,this._tokenizationSupport=null,this._register(ke.C.onDidChange(e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeRawContentFast(e=>{e.containsEvent(1)&&this._resetTokenizationState()})),this._register(this._textModel.onDidChangeContentFast(e=>{for(let t=0,n=e.changes.length;t{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageIdentifier();let n=e.isTooLargeForTokenization()?null:ke.C.get(t.language),r=null;if(n)try{r=n.getInitialState()}catch(e){Object(i.e)(e),n=null}return[n,r]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&Me.j(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=new de.b,n=Le.a.create(!1);for(;this._hasLinesToTokenize()&&!(n.elapsed()>1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(e,t){const n=new de.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new de.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--){a=Te(s,this._tokenizationSupport,r[e],a).endState}for(let i=t;i<=n;i++){let t=this._textModel.getLineContent(i),n=Te(s,this._tokenizationSupport,t,a);e.add(i,n.tokens),this._tokenizationStateStore.setFakeTokens(i-1),a=n.endState}}}function Te(e,t,n,r){let o=null;if(t)try{o=t.tokenize2(n,r.clone(),0)}catch(e){Object(i.e)(e)}return o||(o=Object(xe.e)(e.id,n,r,0)),Se.a.convertToEndOffset(o.tokens,n.length),o}var Oe=n(138),Ne=n(32),Ie=n(102),Ae=n(107),Re=n(13);function Pe(e){const t=new ge;return t.acceptChunk(e),t.finish()}function je(e,t){return("string"==typeof e?Pe(e):e).create(t)}n.d(t,"b",(function(){return Ue})),n.d(t,"a",(function(){return Je}));let Fe=0;const Be=999,We=1e4;class He{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,n=0;for(;;){let i=this._source.read();if(null===i)return this._eos=!0,0===t?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=65536)return e.join("")}}}const Ye=()=>{throw new Error("Invalid change accessor")};class Ve{constructor(){this._searchCanceledBrand=void 0}}function ze(e){return e instanceof Ve?null:e}Ve.INSTANCE=new Ve;class Ue extends o.a{constructor(e,t,n,i=null,o){super(),this._onWillDispose=this._register(new r.a),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new et),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new r.a),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.a),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.a),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new r.a),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.a),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new tt),Fe++,this.id="$model"+Fe,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource=null==i?a.a.parse("inmemory://model/"+Fe):i,this._undoRedoService=o,this._attachedEditorCount=0,this._buffer=je(e,t.defaultEOL),this._options=Ue.resolveOptions(this._buffer,t);const l=this._buffer.getLineCount(),c=this._buffer.getValueLengthInRange(new d.a(1,1,l,this._buffer.getLineLength(l)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=c>Ue.LARGE_FILE_SIZE_THRESHOLD||l>Ue.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=c>Ue.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=n||xe.a,this._languageRegistryListener=Ne.a.onDidChange(e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=s.R(Fe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new $e,this._commandManager=new f.a(this,o),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new de.d,this._tokens2=new de.e,this._tokenization=new Ee(this)}static resolveOptions(e,t){if(t.detectIndentation){const n=m(e,t.tabSize,t.insertSpaces);return new h.e({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.e({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.rawContentChangedEvent))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._isDisposing=!1}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new we(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const t=je(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}_createContentChanged2(e,t,n,i,r,o,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:r,isRedoing:o,isFlush:s}}setValueFromTextBuffer(e){if(this._assertNotDisposed(),null===e)return;const t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),r=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new $e,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ye([new pe],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,i,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ye([new ve],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,r,o),0,i,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const n=this._buffer.getLineLength(i);n>=We?t+=n:e+=n}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new h.e({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r});if(this._options.equals(o))return;let s=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();let n=m(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}static _normalizeIndentationFromWhitespace(e,t,n){let i=0;for(let n=0;n({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new He(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r,o;if(n<1)r=1,o=1;else if(n>t)r=t,o=this.getLineMaxColumn(r);else if(r=0|n,i<=1)o=1;else{const e=this.getLineMaxColumn(r);o=i>=e?e:0|i}const s=e.endLineNumber,a=e.endColumn;let l,c;if(s<1)l=1,c=1;else if(s>t)l=t,c=this.getLineMaxColumn(l);else if(l=0|s,a<=1)c=1;else{const e=this.getLineMaxColumn(l);c=a>=e?e:0|a}return n===r&&i===o&&s===l&&a===c&&e instanceof d.a&&!(e instanceof u.a)?e:new d.a(r,o,l,c)}_isValidPosition(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){const n=this._buffer.getLineCharCode(e,t-2);if(s.F(n))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor("number"!=typeof e||isNaN(e)?1:e),r=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(i<1)return new c.a(1,1);if(i>o)return new c.a(o,this.getLineMaxColumn(o));if(r<=1)return new c.a(i,1);const a=this.getLineMaxColumn(i);if(r>=a)return new c.a(i,a);if(1===n){const e=this._buffer.getLineCharCode(i,r-2);if(s.F(e))return new c.a(i,r-1)}return new c.a(i,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof c.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(r,o,0))return!1;if(1===t){const e=i>1?this._buffer.getLineCharCode(n,i-2):0,t=o>1&&o<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,o-2):0,a=s.F(e),l=s.F(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof d.a&&!(e instanceof u.a)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,r=t.column,o=n.lineNumber,a=n.column;{const e=r>1?this._buffer.getLineCharCode(i,r-2):0,t=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,n=s.F(e),l=s.F(t);return n||l?i===o&&r===a?new d.a(i,r-1,o,a-1):n&&l?new d.a(i,r-1,o,a+1):n?new d.a(i,r-1,o,a):new d.a(i,r,o,a+1):new d.a(i,r,o,a)}}modifyPosition(e,t){this._assertNotDisposed();let n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new d.a(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,o,s=Be){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>d.a.isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let c;if(l.push(a.reduce((e,t)=>d.a.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!n&&e.indexOf("\n")<0){const t=new ee.a(e,n,i,r).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,o,s)}else c=t=>ee.c.findMatches(this,new ee.a(e,n,i,r),t,o,s);return l.map(c).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,n,i,r,o){this._assertNotDisposed();const s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){const t=new ee.a(e,n,i,r).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new d.a(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,o,1);return ee.c.findNextMatch(this,new ee.a(e,n,i,r),s,o),c.length>0?c[0]:(l=new d.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(l,t,o,1)).length>0?c[0]:null)}return ee.c.findNextMatch(this,new ee.a(e,n,i,r),s,o)}findPreviousMatch(e,t,n,i,r,o){this._assertNotDisposed();const s=this.validatePosition(t);return ee.c.findPreviousMatch(this,new ee.a(e,n,i,r),s,o)}pushStackElement(){this._commandManager.pushStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof h.f?e:new h.f(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(e.range),text:e.text})),i=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,s=r.startLineNumber>t.endLineNumber;if(!i&&!s){o=!0;break}}if(!o){i=!1;break}}if(i)for(let e=0,i=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&!(i===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||i===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){o=!1;break}}if(o){const e=new d.a(i,1,i,r);t.push(new h.f(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}_applyUndo(e,t,n,i){const r=e.map(e=>{const t=this.getPositionAt(e.newPosition),n=this.getPositionAt(e.newEnd);return{range:new d.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map(e=>{const t=this.getPositionAt(e.oldPosition),n=this.getPositionAt(e.oldEnd);return{range:new d.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),o=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==o.length){let e=[],t=n;for(let n=0,i=o.length;n0?i.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(i.rangeOffset,i.rangeLength,i.text.length,i.forceMoveMarkers);const c=i.range.startLineNumber,d=i.range.endLineNumber,u=d-c,h=s,f=Math.min(u,h),g=h-u;for(let n=f;n>=0;n--){const i=c+n,o=r-t-g+i;e.push(new me(i,this.getLineContent(o)))}if(fthis._deltaDecorationsImpl(e,[],[{range:t,options:n}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Qe(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,n)=>0===t.length&&0===n.length?[]:this._deltaDecorationsImpl(e,t,n)},r=null;try{r=t(n)}catch(e){Object(i.e)(e)}return n.addDecoration=Ye,n.changeDecoration=Ye,n.changeDecorationOptions=Ye,n.removeDecoration=Ye,n.deltaDecorations=Ye,r}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Xe[n]}])[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,r),i.setOptions(Xe[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,n=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1){let r=this.getLineCount(),o=Math.min(r,Math.max(1,e)),s=Math.min(r,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new d.a(o,1,s,a),n,i)}getDecorationsInRange(e,t=0,n=!1){let i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)}getOverviewRulerDecorations(e=0,t=!1){const n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)}getAllDecorations(e=0,t=!1){const n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)}_getDecorationsInRange(e,t,n){const i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),o=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,r,t,n,o);return this._ensureNodesHaveRanges(s)}_ensureNodesHaveRanges(e){for(let t=0,n=e.length;t0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasSemanticTokens(){return this._tokens2.isComplete()}setPartialSemanticTokens(e,t){if(this.hasSemanticTokens())return;const n=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const n=this.validatePosition(new c.a(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),i=this._getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[o,s]=Ue._findLanguageBoundaries(i,r),a=Object(Oe.d)(t.column,Ne.a.getWordDefinition(i.getLanguageId(r)),n.substring(o,s),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(r>0&&o===t.column-1){const[o,s]=Ue._findLanguageBoundaries(i,r-1),a=Object(Oe.d)(t.column,Ne.a.getWordDefinition(i.getLanguageId(r-1)),n.substring(o,s),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let r=t;r>=0&&e.getLanguageId(r)===n;r--)i=e.getStartOffset(r);let r=e.getLineContent().length;for(let i=t,o=e.getCount();i=0;e--){const t=n.getEndOffset(e);if(t<=i)break;Object(Ie.b)(n.getStandardTokenType(e))&&(i=t)}const a=Math.min(r.length,e.column-1+s.maxBracketLength);let l=null;for(;;){const n=Ae.a.findNextBracketInRange(s.forwardRegex,t,r,i,a);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=r.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),t=this._matchFoundBracket(n,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t){if(t instanceof Ve)return null;l=t}}i=n.endColumn-1}if(l)return l}if(o>0&&n.getStartOffset(o)===e.column-1){const s=o-1,a=Ne.a.getBracketsSupport(n.getLanguageId(s));if(a&&!Object(Ie.b)(n.getStandardTokenType(s))){const o=Math.max(0,e.column-1-a.maxBracketLength);let l=Math.min(r.length,e.column-1+a.maxBracketLength);for(let e=s+1;e=l)break;Object(Ie.b)(n.getStandardTokenType(e))&&(l=t)}const c=Ae.a.findPrevBracketInRange(a.reversedRegex,t,r,o,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),t=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],null);if(t)return t instanceof Ve?null:t}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof Ve?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageIdentifier.id,r=e.reversedRegex;let o=-1,s=0;const a=(t,i,a,l)=>{for(;;){if(n&&++s%100==0&&!n())return Ve.INSTANCE;const c=Ae.a.findPrevBracketInRange(r,t,i,a,l);if(!c)break;const d=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const n=this._getLineTokens(e),r=n.getCount(),o=this._buffer.getLineContent(e);let s=r-1,l=o.length,c=o.length;e===t.lineNumber&&(s=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;s>=0;s--){const t=n.getLanguageId(s)===i&&!Object(Ie.b)(n.getStandardTokenType(s));if(t)d?l=n.getStartOffset(s):(l=n.getStartOffset(s),c=n.getEndOffset(s));else if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageIdentifier.id,r=e.forwardRegex;let o=1,s=0;const a=(t,i,a,l)=>{for(;;){if(n&&++s%100==0&&!n())return Ve.INSTANCE;const c=Ae.a.findNextBracketInRange(r,t,i,a,l);if(!c)break;const d=i.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const n=this._getLineTokens(e),r=n.getCount(),o=this._buffer.getLineContent(e);let s=0,l=0,c=0;e===t.lineNumber&&(s=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;s=1;e--){const r=this._getLineTokens(e),o=r.getCount(),s=this._buffer.getLineContent(e);let a=o-1,l=s.length,c=s.length;if(e===t.lineNumber){a=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=r.getLanguageId(a);n!==e&&(n=e,i=Ne.a.getBracketsSupport(n))}let d=!0;for(;a>=0;a--){const t=r.getLanguageId(a);if(n!==t){if(i&&d&&l!==c){const t=Ae.a.findPrevBracketInRange(i.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(i,t);d=!1}n=t,i=Ne.a.getBracketsSupport(n)}const o=!!i&&!Object(Ie.b)(r.getStandardTokenType(a));if(o)d?l=r.getStartOffset(a):(l=r.getStartOffset(a),c=r.getEndOffset(a));else if(i&&d&&l!==c){const t=Ae.a.findPrevBracketInRange(i.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(i,t)}d=o}if(i&&d&&l!==c){const t=Ae.a.findPrevBracketInRange(i.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(i,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),n=this.getLineCount();let i=-1,r=null;for(let e=t.lineNumber;e<=n;e++){const n=this._getLineTokens(e),o=n.getCount(),s=this._buffer.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=n.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=n.getLanguageId(a);i!==e&&(i=e,r=Ne.a.getBracketsSupport(i))}let d=!0;for(;aDate.now()-e<=t}const i=this.validatePosition(e),r=this.getLineCount(),o=new Map;let s=[];const a=(e,t)=>{if(!o.has(e)){let n=[];for(let e=0,i=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return Ve.INSTANCE;const a=Ae.a.findNextBracketInRange(e.forwardRegex,t,i,r,o);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?s[d.index]++:d.isClose(c)&&s[d.index]--,-1===s[d.index]))return this._matchFoundBracket(a,d,!1,n);r=a.endColumn-1}return null};let d=-1,u=null;for(let e=i.lineNumber;e<=r;e++){const t=this._getLineTokens(e),n=t.getCount(),r=this._buffer.getLineContent(e);let o=0,s=0,l=0;if(e===i.lineNumber){o=t.findTokenIndexAtOffset(i.column-1),s=i.column-1,l=i.column-1;const e=t.getLanguageId(o);d!==e&&a(d=e,u=Ne.a.getBracketsSupport(d))}let h=!0;for(;oi)throw new Error("Illegal value for lineNumber");const r=Ne.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(r&&r.offSide);let s=-2,a=-1,l=-2,c=-1;const d=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let u=-2,h=-1,f=-2,g=-1;const p=e=>{if(-2===u){u=-1,h=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){u=t,h=e;break}}}if(-1!==f&&(-2===f||f=0){f=t,g=e;break}}}};let m=0,_=!0,b=0,v=!0,y=0,w=0;for(let r=0;_||v;r++){const s=e-r,f=e+r;r>1&&(s<1||s1&&(f>i||f>n)&&(v=!1),r>5e4&&(_=!1,v=!1);let C=-1;if(_){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,c=e,C=Math.ceil(e/this._options.indentSize)):(d(s),C=this._getIndentLevelForWhitespaceLine(o,a,c))}let S=-1;if(v){const e=this._computeIndentLevel(f-1);e>=0?(u=f-1,h=e,S=Math.ceil(e/this._options.indentSize)):(p(f),S=this._getIndentLevelForWhitespaceLine(o,h,g))}if(0!==r){if(1===r){if(f<=i&&S>=0&&w+1===S){_=!1,m=f,b=f,y=S;continue}if(s>=1&&C>=0&&C-1===w){v=!1,m=s,b=s,y=C;continue}if(m=e,b=e,0===(y=w))return{startLineNumber:m,endLineNumber:b,indent:y}}_&&(C>=y?m=s:_=!1),v&&(S>=y?b=f:v=!1)}else w=C}return{startLineNumber:m,endLineNumber:b,indent:y}}getLinesIndentGuides(e,t){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=Ne.a.getFoldingRules(this._languageIdentifier.id),r=Boolean(i&&i.offSide);let o=new Array(t-e+1),s=-2,a=-1,l=-2,c=-1;for(let i=e;i<=t;i++){let t=i-e;const d=this._computeIndentLevel(i-1);if(d>=0)s=i-1,a=d,o[t]=Math.ceil(d/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=i-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l=0){l=e,c=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(r,a,c)}}return o}_getIndentLevelForWhitespaceLine(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"n",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"l",(function(){return f})),n.d(t,"e",(function(){return g})),n.d(t,"j",(function(){return p})),n.d(t,"m",(function(){return m})),n.d(t,"i",(function(){return _})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return v}));var i=n(6);class r{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new i.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function o(){return r.INSTANCE.getZoomLevel()}function s(){return r.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return r.INSTANCE.onDidChangeZoomLevel(e)}function l(){return r.INSTANCE.getZoomFactor()}function c(){return r.INSTANCE.getPixelRatio()}r.INSTANCE=new r;const d=navigator.userAgent,u=d.indexOf("Edge/")>=0,h=d.indexOf("Firefox")>=0,f=d.indexOf("AppleWebKit")>=0,g=d.indexOf("Chrome")>=0,p=!g&&d.indexOf("Safari")>=0,m=!g&&!p&&f,_=d.indexOf("iPad")>=0||p&&navigator.maxTouchPoints>0,b=u&&d.indexOf("WebView/")>=0,v=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(1);class r{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){i.ab(this.domNode,e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return new r(e)}},function(e,t,n){"use strict";var i=n(6),r=n(2),o=n(8),s=n(138),a=n(64),l=n(102);class c{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new a.b(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.b({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.b({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,n){if(0===t.getTokenCount())return!0;const i=t.findTokenIndexAtOffset(n-2),r=t.getStandardTokenType(i);return e.isOK(r)}getSurroundingPairs(){return this._surroundingPairs}}c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var d=n(107);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const t=n.charAt(n.length-1);e.push(t)}return e=e.filter((e,t,n)=>n.indexOf(e)===t)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const i=t.findTokenIndexAtOffset(n-1);if(Object(l.b)(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,n-1)+e,s=d.a.findPrevBracketInRange(r,1,o,0,o.length);if(!s)return null;const a=o.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}class h{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=n(15);class g{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{const t=g._createOpenBracketRegExp(e[0]),n=g._createCloseBracketRegExp(e[1]);t&&n&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let e=0,r=this._regExpRules.length;e!e.reg||e.reg.test(e.text)))return r.action}if(e>=2&&n.length>0&&i.length>0)for(let e=0,t=this._brackets.length;e=2&&n.length>0)for(let e=0,t=this._brackets.length;e{this._entries.get(e.id)===i&&(this._entries.set(e.id,n),this._onDidChange.fire(new m(e)))})}_getRichEditSupport(e){return this._entries.get(e)}getIndentationRules(e){const t=this._entries.get(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,n){let i=Object(l.a)(t,n-1),r=this._getElectricCharacterSupport(i.languageId);return r?r.onElectricCharacter(e,i,n-i.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,n){const i=Object(l.a)(t,n-1);return c.shouldAutoClosePair(e,i,n-i.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?Object(s.c)(t.wordDefinition||null):Object(s.c)(null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,n){let i=e.getLanguageIdAtPosition(t,0);if(t>1){let r,o=-1;for(r=t-1;r>=1;r--){if(e.getLanguageIdAtPosition(r,0)!==i)return o;let t=e.getLineContent(r);if(!n.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return r;o=r}}return-1}getInheritIndentForLine(e,t,n,i=!0){if(e<4)return null;const r=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!r)return null;if(n<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,n,r);if(s<0)return null;if(s<1)return{indentation:"",action:null};const l=t.getLineContent(s);if(r.shouldIncrease(l)||r.shouldIndentNextLine(l))return{indentation:o.z(l),action:a.a.Indent,line:s};if(r.shouldDecrease(l))return{indentation:o.z(l),action:null,line:s};{if(1===s)return{indentation:o.z(t.getLineContent(s)),action:null,line:s};const e=s-1,n=r.getIndentMetadata(t.getLineContent(e));if(!(3&n)&&4&n){let n=0;for(let i=e-1;i>0;i--)if(!r.shouldIndentNextLine(t.getLineContent(i))){n=i;break}return{indentation:o.z(t.getLineContent(n+1)),action:null,line:n+1}}if(i)return{indentation:o.z(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const n=t.getLineContent(e);if(r.shouldIncrease(n))return{indentation:o.z(n),action:a.a.Indent,line:e};if(r.shouldIndentNextLine(n)){let n=0;for(let i=e-1;i>0;i--)if(!r.shouldIndentNextLine(t.getLineContent(e))){n=i;break}return{indentation:o.z(t.getLineContent(n+1)),action:null,line:n+1}}if(r.shouldDecrease(n))return{indentation:o.z(n),action:null,line:e}}return{indentation:o.z(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,n,i,r){if(e<4)return null;const s=this._getRichEditSupport(n);if(!s)return null;const l=this.getIndentRulesSupport(n);if(!l)return null;const c=this.getInheritIndentForLine(e,t,i),d=t.getLineContent(i);if(c){const n=c.line;if(void 0!==n){const i=s.onEnter(e,"",t.getLineContent(n),"");if(i){let e=o.z(t.getLineContent(n));return i.removeText&&(e=e.substring(0,e.length-i.removeText)),i.indentAction===a.a.Indent||i.indentAction===a.a.IndentOutdent?e=r.shiftIndent(e):i.indentAction===a.a.Outdent&&(e=r.unshiftIndent(e)),l.shouldDecrease(d)&&(e=r.unshiftIndent(e)),i.appendText&&(e+=i.appendText),o.z(e)}}return l.shouldDecrease(d)?c.action===a.a.Indent?c.indentation:r.unshiftIndent(c.indentation):c.action===a.a.Indent?r.shiftIndent(c.indentation):c.indentation}return null}getIndentForEnter(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);const r=t.getLineTokens(n.startLineNumber),s=Object(l.a)(r,n.startColumn-1),c=s.getLineContent();let d,u,h=!1;if(s.firstCharOffset>0&&r.getLanguageId(0)!==s.languageId?(h=!0,d=c.substr(0,n.startColumn-1-s.firstCharOffset)):d=r.getLineContent().substring(0,n.startColumn-1),n.isEmpty())u=c.substr(n.startColumn-1-s.firstCharOffset);else{u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-s.firstCharOffset)}const f=this.getIndentRulesSupport(s.languageId);if(!f)return null;const g=d,p=o.z(d),m={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,n)=>t.getLanguageIdAtPosition(e,n),getLineContent:e=>e===n.startLineNumber?g:t.getLineContent(e)},_=o.z(r.getLineContent()),b=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!b){const e=h?_:p;return{beforeEnter:e,afterEnter:e}}let v=h?_:b.indentation;return b.action===a.a.Indent&&(v=i.shiftIndent(v)),f.shouldDecrease(u)&&(v=i.unshiftIndent(v)),{beforeEnter:h?_:p,afterEnter:v}}getIndentActionForType(e,t,n,i,r){if(e<4)return null;const o=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(o.languageId);if(!s)return null;const l=o.getLineContent(),c=l.substr(0,n.startColumn-1-o.firstCharOffset);let d;if(n.isEmpty())d=l.substr(n.startColumn-1-o.firstCharOffset);else{d=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset)}if(!s.shouldDecrease(c+d)&&s.shouldDecrease(c+i+d)){const i=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!i)return null;let o=i.indentation;return i.action!==a.a.Indent&&(o=r.unshiftIndent(o)),o}return null}getIndentMetadata(e,t){const n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,n){const i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),r=this._getRichEditSupport(i.languageId);if(!r)return null;const o=i.getLineContent(),s=o.substr(0,n.startColumn-1-i.firstCharOffset);let l;if(n.isEmpty())l=o.substr(n.startColumn-1-i.firstCharOffset);else{l=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset)}let c="";if(n.startLineNumber>1&&0===i.firstCharOffset){const e=this.getScopedLineTokens(t,n.startLineNumber-1);e.languageId===i.languageId&&(c=e.getLineContent())}const d=r.onEnter(e,c,s,l);if(!d)return null;const u=d.indentAction;let h=d.appendText;const f=d.removeText||0;h||(h=u===a.a.Indent||u===a.a.IndentOutdent?"\t":"");let g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:u,appendText:h,removeText:f,indentation:g}}getIndentationAtPosition(e,t,n){const i=e.getLineContent(t);let r=o.z(i);return r.length>n-1&&(r=r.substring(0,n-1)),r}getScopedLineTokens(e,t,n){e.forceTokenization(t);const i=e.getLineTokens(t),r=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(l.a)(i,r)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("codeEditorService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(6);const r=(e,t,n)=>{const r=e=>o.fire(e),o=new i.a({onFirstListenerAdd:()=>{e.addEventListener(t,r,n)},onLastListenerRemove:()=>{e.removeEventListener(t,r,n)}});return o.event};function o(e){return i.b.map(e,e=>(e.preventDefault(),e.stopPropagation(),e))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var i,r=n(24),o=n(12);!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",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeSettings="vscode-settings",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.vscodeWebviewResource="vscode-webview-resource",e.extension="extension"}(i||(i={}));const s=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let n=this._hosts[t];n&&-1!==n.indexOf(":")&&(n=`[${n}]`);const s=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),r.a.from({scheme:o.h?this._preferredWebSchema:i.vscodeRemoteResource,authority:`${n}:${s}`,path:"/vscode-remote-resource",query:l})}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return y})),n.d(t,"e",(function(){return C})),n.d(t,"d",(function(){return x})),n.d(t,"f",(function(){return M}));var i=n(15),r=n(4),o=n(11),s=n(10),a=n(9),l=n(26),c=n(3),d=n(61),u=n(2),h=n(25),f=n(123),g=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const p={Visible:new a.c("suggestWidgetVisible",!1),DetailsVisible:new a.c("suggestWidgetDetailsVisible",!1),MultipleSuggestions:new a.c("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new a.c("suggestionMakesTextEdit",!0),AcceptSuggestionsOnEnter:new a.c("acceptSuggestionOnEnter",!0),HasInsertAndReplaceRange:new a.c("suggestionHasInsertAndReplaceRange",!1),CanResolve:new a.c("suggestionCanResolve",!1)},m=new h.b("suggestWidgetStatusBar");class _{constructor(e,t,n,i){this.position=e,this.completion=t,this.container=n,this.provider=i,this.isInvalid=!1,this.score=d.a.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),c.a.isIRange(t.range)?(this.editStart=new s.a(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new s.a(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new s.a(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||c.a.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new s.a(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new s.a(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new s.a(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||c.a.spansMultipleLines(t.range.insert)||c.a.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof i.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return g(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()},e=>{Object(i.d)(e)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache}))}}class b{constructor(e=2,t=new Set,n=new Set){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n}}let v;function y(){return v}b.default=new b;class w{constructor(e,t,n){this.items=e,this.needsClipboard=t,this.dispoables=n}}function C(e,t,n=b.default,r={triggerKind:0},s=l.a.None){return g(this,void 0,void 0,(function*(){t=t.clone();const a=e.getWordAtPosition(t),l=a?new c.a(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):c.a.fromPositions(t),d={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},h=[],p=new u.b;let m=!1;const b=(e,i)=>{if(i){for(let r of i.suggestions)n.kindFilter.has(r.kind)||(r.range||(r.range=d),r.sortText||(r.sortText="string"==typeof r.label?r.label:r.label.name),!m&&r.insertTextRules&&4&r.insertTextRules&&(m=f.c.guessNeedsClipboard(r.insertText)),h.push(new _(t,r,i,e)));Object(u.g)(i)&&p.add(i)}},y=(()=>g(this,void 0,void 0,(function*(){if(!v||n.kindFilter.has(27))return;if(n.providerFilter.size>0&&!n.providerFilter.has(v))return;const i=yield v.provideCompletionItems(e,t,r,s);b(v,i)})))();for(let a of o.d.orderedGroups(e)){let o=h.length;if(yield Promise.all(a.map(o=>g(this,void 0,void 0,(function*(){if(!(n.providerFilter.size>0)||n.providerFilter.has(o))try{const n=yield o.provideCompletionItems(e,t,r,s);b(o,n)}catch(e){Object(i.f)(e)}})))),o!==h.length||s.isCancellationRequested)break}return yield y,s.isCancellationRequested?(p.dispose(),Promise.reject(Object(i.a)())):new w(h.sort(x(n.snippetSortOrder)),m,p)}))}function S(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const k=new Map;function x(e){return k.get(e)}k.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return S(e,t)})),k.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return S(e,t)})),k.set(1,S),Object(r.j)("_executeCompletionItemProvider",(e,t,n)=>g(void 0,void 0,void 0,(function*(){const i={incomplete:!1,suggestions:[]},r=[],o=n.maxItemsToResolve||0,s=yield C(e,t);for(const e of s.items)r.lengths.dispoables.dispose(),100)}})));const L=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};function M(e,t){setTimeout(()=>{L.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(L))},0)}o.d.register("*",L)},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"g",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return u}));var i=n(20);function r(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]=r(e[n]):t[n]=e[n]}),t}function o(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const n in e)if(s.call(e,n)){const i=e[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e}const s=Object.prototype.hasOwnProperty;function a(e,t){return function e(t,n,r){if(Object(i.l)(t))return t;const o=n(t);if(void 0!==o)return o;if(Object(i.e)(t)){const i=[];for(const o of t)i.push(e(o,n,r));return i}if(Object(i.i)(t)){if(r.has(t))throw new Error("Cannot clone recursive data-structure");r.add(t);const i={};for(let o in t)s.call(t,o)&&(i[o]=e(t[o],n,r));return r.delete(t),i}return t}(e,t,new Set)}function l(e,t,n=!0){return Object(i.i)(e)?(Object(i.i)(t)&&Object.keys(t).forEach(r=>{r in e?n&&(Object(i.i)(e[r])&&Object(i.i)(t[r])?l(e[r],t[r],n):e[r]=t[r]):e[r]=t[r]}),e):t}function c(e,...t){return t.forEach(t=>Object.keys(t).forEach(n=>e[n]=t[n])),e}function d(e,t){if(e===t)return!0;if(null==e||null==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;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;nr}]}}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return p}));var i=n(15);class r{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new r,s=new r,a=new r;var l;function c(e,t){return(e|(65535&t)<<16>>>0)>>>0}function d(e,t){if(0===e)return null;const n=(65535&e)>>>0,i=(4294901760&e)>>>16;return new f(0!==i?[u(n,t),u(i,t)]:[u(n,t)])}function u(e,t){const n=!!(2048&e),i=!!(256&e);return new h(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}!function(){function e(e,t,n=t,i=n){o.define(e,t),s.define(e,n),a.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(l||(l={}));class h{constructor(e,t,n,i,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=r}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new f([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class f{constructor(e){if(0===e.length)throw Object(i.b)("parts");this.parts=e}}class g{constructor(e,t,n,i,r,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=r,this.keyAriaLabel=o}}class p{}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n(58),r=n(17);i.a;const o=Object(r.c)("notificationService");class s{}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("keybindingService")},function(e,t,n){"use strict";n.d(t,"i",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return u})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"d",(function(){return g})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return b})),n.d(t,"a",(function(){return y}));var i=n(228),r=n(45),o=n(24),s=n(8),a=n(35),l=n(12);function c(e){return Object(o.b)(e,!0)}const d=new class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:Object(s.f)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return o.a.joinPath(e,...t)}basenameOrAuthority(e){return f(e)||e.authority}basename(e){return r.e.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===a.b.file?t=o.a.file(r.b(c(e))).path:(t=r.e.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===a.b.file?o.a.file(r.d(c(e))).path:r.e.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!v(e.authority,t.authority))return;if(e.scheme===a.b.file){const n=r.f(c(e),c(t));return l.i?i.b(n):n}let n=e.path||"/",o=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(n.length,o.length);e!1),u=d.isEqual.bind(d),h=d.basenameOrAuthority.bind(d),f=d.basename.bind(d),g=d.dirname.bind(d),p=d.joinPath.bind(d),m=d.normalizePath.bind(d),_=d.relativePath.bind(d),b=d.resolvePath.bind(d),v=d.isEqualAuthority.bind(d);var y;!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){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)});const i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(y||(y={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"g",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return h}));var i=n(46),r=n(17),o=n(120);const s=Object(r.c)("configurationService");function a(e,t){const n=Object.create(null);for(let i in e)l(n,i,e[i],t);return n}function l(e,t,n,i){const r=t.split("."),o=r.pop();let s=e;for(let e=0;econsole.error(`Conflict in default settings: ${e}`))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"f",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return d})),n.d(t,"g",(function(){return u}));var i,r,o,s,a,l,c,d,u,h=n(0);!function(e){e.noSelection=h.a("noSelection","No selection"),e.singleSelectionRange=h.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=h.a("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=h.a("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=h.a("multiSelection","{0} selections"),e.emergencyConfOn=h.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=h.a("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=h.a("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=h.a("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=h.a("readonlyEditor"," in a read-only code editor"),e.editableEditor=h.a("editableEditor"," in a code editor"),e.changeConfigToOnMac=h.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=h.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=h.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=h.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=h.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=h.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=h.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=h.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=h.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=h.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=h.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=h.a("showAccessibilityHelpAction","Show Accessibility Help")}(i||(i={})),function(e){e.inspectTokensAction=h.a("inspectTokens","Developer: Inspect Tokens")}(r||(r={})),function(e){e.gotoLineActionLabel=h.a("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=h.a("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=h.a("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=h.a("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=h.a("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=h.a("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=h.a("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=h.a("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(c||(c={})),function(e){e.toggleHighContrast=h.a("toggleHighContrast","Toggle High Contrast Theme")}(d||(d={})),function(e){e.bulkEditServiceSummary=h.a("bulkEditServiceSummary","Made {0} edits in {1} files")}(u||(u={}))},function(e,t,n){"use strict";n.d(t,"i",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"g",(function(){return w})),n.d(t,"f",(function(){return C})),n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return k})),n.d(t,"c",(function(){return x})),n.d(t,"h",(function(){return L}));var i=n(140);const r=65,o=97,s=90,a=122,l=46,c=47,d=92;class u extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${r} ${i} of type ${t}`;super(o+=`. Received type ${typeof n}`),this.code="ERR_INVALID_ARG_TYPE"}}function h(e,t){if("string"!=typeof e)throw new u(t,"string",e)}function f(e){return e===c||e===d}function g(e){return e===c}function p(e){return e>=r&&e<=s||e>=o&&e<=a}function m(e,t,n,i){let r="",o=0,s=-1,a=0,d=0;for(let u=0;u<=e.length;++u){if(u2){const e=r.lastIndexOf(n);-1===e?(r="",o=0):o=(r=r.slice(0,e)).length-1-r.lastIndexOf(n),s=u,a=0;continue}if(0!==r.length){r="",o=0,s=u,a=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",o=2)}else r.length>0?r+=`${n}${e.slice(s+1,u)}`:r=e.slice(s+1,u),o=u-s-1;s=u,a=0}else d===l&&-1!==a?++a:a=-1}return r}function _(e,t){if(null===t||"object"!=typeof t)throw new u("pathObject","Object",t);const n=t.dir||t.root,i=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}const b={resolve(...e){let t="",n="",r=!1;for(let o=e.length-1;o>=-1;o--){let s;if(o>=0){if(h(s=e[o],"path"),0===s.length)continue}else 0===t.length?s=i.a():(void 0===(s=i.b[`=${t}`]||i.a())||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===d)&&(s=`${t}\\`);const a=s.length;let l=0,c="",u=!1;const g=s.charCodeAt(0);if(1===a)f(g)&&(l=1,u=!0);else if(f(g))if(u=!0,f(s.charCodeAt(1))){let e=2,t=e;for(;e2&&f(s.charCodeAt(2))&&(u=!0,l=3));if(c.length>0)if(t.length>0){if(c.toLowerCase()!==t.toLowerCase())continue}else t=c;if(r){if(t.length>0)break}else if(n=`${s.slice(l)}\\${n}`,r=u,u&&t.length>0)break}return n=m(n,!r,"\\",f),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){h(e,"path");const t=e.length;if(0===t)return".";let n,i=0,r=!1;const o=e.charCodeAt(0);if(1===t)return g(o)?"\\":e;if(f(o))if(r=!0,f(e.charCodeAt(1))){let r=2,o=r;for(;r2&&f(e.charCodeAt(2))&&(r=!0,i=3));let s=i0&&f(e.charCodeAt(t-1))&&(s+="\\"),void 0===n?r?`\\${s}`:s:r?`${n}\\${s}`:`${n}${s}`},isAbsolute(e){h(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return f(n)||t>2&&p(n)&&58===e.charCodeAt(1)&&f(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,n;for(let i=0;i0&&(void 0===t?t=n=r:t+=`\\${r}`)}if(void 0===t)return".";let i=!0,r=0;if("string"==typeof n&&f(n.charCodeAt(0))){++r;const e=n.length;e>1&&f(n.charCodeAt(1))&&(++r,e>2&&(f(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r=2&&(t=`\\${t.slice(r)}`)}return b.normalize(t)},relative(e,t){if(h(e,"from"),h(t,"to"),e===t)return"";const n=b.resolve(e),i=b.resolve(t);if(n===i)return"";if((e=n.toLowerCase())===(t=i.toLowerCase()))return"";let r=0;for(;rr&&e.charCodeAt(o-1)===d;)o--;const s=o-r;let a=0;for(;aa&&t.charCodeAt(l-1)===d;)l--;const c=l-a,u=su){if(t.charCodeAt(a+g)===d)return i.slice(a+g+1);if(2===g)return i.slice(a+g)}s>u&&(e.charCodeAt(r+g)===d?f=g:2===g&&(f=3)),-1===f&&(f=0)}let p="";for(g=r+f+1;g<=o;++g)g!==o&&e.charCodeAt(g)!==d||(p+=0===p.length?"..":"\\..");return a+=f,p.length>0?`${p}${i.slice(a,l)}`:(i.charCodeAt(a)===d&&++a,i.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===d){if(t.charCodeAt(1)===d){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(p(t.charCodeAt(0))&&58===t.charCodeAt(1)&&t.charCodeAt(2)===d)return`\\\\?\\${t}`;return e},dirname(e){h(e,"path");const t=e.length;if(0===t)return".";let n=-1,i=0;const r=e.charCodeAt(0);if(1===t)return f(r)?e:".";if(f(r)){if(n=i=1,f(e.charCodeAt(1))){let r=2,o=r;for(;r2&&f(e.charCodeAt(2))?3:2);let o=-1,s=!0;for(let n=t-1;n>=i;--n)if(f(e.charCodeAt(n))){if(!s){o=n;break}}else s=!1;if(-1===o){if(-1===n)return".";o=n}return e.slice(0,o)},basename(e,t){void 0!==t&&h(t,"ext"),h(e,"path");let n,i=0,r=-1,o=!0;if(e.length>=2&&p(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(i=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=i;--n){const l=e.charCodeAt(n);if(f(l)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(r=n):(s=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=i;--n)if(f(e.charCodeAt(n))){if(!o){i=n+1;break}}else-1===r&&(o=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){h(e,"path");let t=0,n=-1,i=0,r=-1,o=!0,s=0;e.length>=2&&58===e.charCodeAt(1)&&p(e.charCodeAt(0))&&(t=i=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(f(t)){if(!o){i=a+1;break}}else-1===r&&(o=!1,r=a+1),t===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1)}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===i+1?"":e.slice(n,r)},format:_.bind(null,"\\"),parse(e){h(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.length;let i=0,r=e.charCodeAt(0);if(1===n)return f(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(f(r)){if(i=1,f(e.charCodeAt(1))){let t=2,r=t;for(;t0&&(t.root=e.slice(0,i));let o=-1,s=i,a=-1,c=!0,d=e.length-1,u=0;for(;d>=i;--d)if(f(r=e.charCodeAt(d))){if(!c){s=d+1;break}}else-1===a&&(c=!1,a=d+1),r===l?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);return-1!==a&&(-1===o||0===u||1===u&&o===a-1&&o===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,o),t.base=e.slice(s,a),t.ext=e.slice(o,a))),t.dir=s>0&&s!==i?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},v={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:i.a();h(o,"path"),0!==o.length&&(t=`${o}/${t}`,n=o.charCodeAt(0)===c)}return t=m(t,!n,"/",g),n?`/${t}`:t.length>0?t:"."},normalize(e){if(h(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,n=e.charCodeAt(e.length-1)===c;return 0===(e=m(e,!t,"/",g)).length?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(h(e,"path"),e.length>0&&e.charCodeAt(0)===c),join(...e){if(0===e.length)return".";let t;for(let n=0;n0&&(void 0===t?t=i:t+=`/${i}`)}return void 0===t?".":v.normalize(t)},relative(e,t){if(h(e,"from"),h(t,"to"),e===t)return"";if((e=v.resolve(e))===(t=v.resolve(t)))return"";const n=e.length,i=n-1,r=t.length-1,o=io){if(t.charCodeAt(1+a)===c)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else i>o&&(e.charCodeAt(1+a)===c?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=n;++a)a!==n&&e.charCodeAt(a)!==c||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(h(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let n=-1,i=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!i){n=t;break}}else i=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&h(t,"ext"),h(e,"path");let n,i=0,r=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===c){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(r=n):(s=-1,r=a))}return i===r?r=a:-1===r&&(r=e.length),e.slice(i,r)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===c){if(!o){i=n+1;break}}else-1===r&&(o=!1,r=n+1);return-1===r?"":e.slice(i,r)},extname(e){h(e,"path");let t=-1,n=0,i=-1,r=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==c)-1===i&&(r=!1,i=s+1),a===l?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)},format:_.bind(null,"/"),parse(e){h(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const n=e.charCodeAt(0)===c;let i;n?(t.root="/",i=1):i=0;let r=-1,o=0,s=-1,a=!0,d=e.length-1,u=0;for(;d>=i;--d){const t=e.charCodeAt(d);if(t!==c)-1===s&&(a=!1,s=d+1),t===l?-1===r?r=d:1!==u&&(u=1):-1!==r&&(u=-1);else if(!a){o=d+1;break}}if(-1!==s){const i=0===o&&n?1:o;-1===r||0===u||1===u&&r===s-1&&r===o+1?t.base=t.name=e.slice(i,s):(t.name=e.slice(i,r),t.base=e.slice(i,s),t.ext=e.slice(r,s))}return o>0?t.dir=e.slice(0,o-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};v.win32=b.win32=b,v.posix=b.posix=v;const y="win32"===i.c?b.normalize:v.normalize,w="win32"===i.c?b.resolve:v.resolve,C="win32"===i.c?b.relative:v.relative,S="win32"===i.c?b.dirname:v.dirname,k="win32"===i.c?b.basename:v.basename,x="win32"===i.c?b.extname:v.extname,L="win32"===i.c?b.sep:v.sep},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(20),r=n(207);const o=new class{constructor(){this.data=new Map}add(e,t){r.a(i.j(e)),r.a(i.i(t)),r.a(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},function(e,t,n){"use strict";n.d(t,"i",(function(){return a})),n.d(t,"j",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return g})),n.d(t,"h",(function(){return m})),n.d(t,"a",(function(){return _})),n.d(t,"k",(function(){return b})),n.d(t,"b",(function(){return y})),n.d(t,"n",(function(){return w})),n.d(t,"e",(function(){return C})),n.d(t,"c",(function(){return S})),n.d(t,"d",(function(){return k})),n.d(t,"m",(function(){return x})),n.d(t,"l",(function(){return L})),n.d(t,"o",(function(){return D})),n.d(t,"p",(function(){return E})),n.d(t,"s",(function(){return O})),n.d(t,"q",(function(){return N})),n.d(t,"t",(function(){return I})),n.d(t,"r",(function(){return A}));var i=n(0),r=n(13),o=n(5),s=n(18);const a=Object(o.gc)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},i.a("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(o.gc)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},i.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=Object(o.gc)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},i.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),d=Object(o.gc)("editor.rangeHighlightBorder",{dark:null,light:null,hc:o.b},i.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),u=Object(o.gc)("editor.symbolHighlightBackground",{dark:o.x,light:o.x,hc:null},i.a("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),h=Object(o.gc)("editor.symbolHighlightBorder",{dark:null,light:null,hc:o.b},i.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),f=Object(o.gc)("editorCursor.foreground",{dark:"#AEAFAD",light:r.a.black,hc:r.a.white},i.a("caret","Color of the editor cursor.")),g=Object(o.gc)("editorCursor.background",null,i.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),p=Object(o.gc)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},i.a("editorWhitespaces","Color of whitespace characters in the editor.")),m=Object(o.gc)("editorIndentGuide.background",{dark:p,light:p,hc:p},i.a("editorIndentGuides","Color of the editor indentation guides.")),_=Object(o.gc)("editorIndentGuide.activeBackground",{dark:p,light:p,hc:p},i.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),b=Object(o.gc)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:r.a.white},i.a("editorLineNumbers","Color of editor line numbers.")),v=Object(o.gc)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o.b},i.a("editorActiveLineNumber","Color of editor active line number"),!1,i.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=Object(o.gc)("editorLineNumber.activeForeground",{dark:v,light:v,hc:v},i.a("editorActiveLineNumber","Color of editor active line number")),w=Object(o.gc)("editorRuler.foreground",{dark:"#5A5A5A",light:r.a.lightgrey,hc:r.a.white},i.a("editorRuler","Color of the editor rulers.")),C=Object(o.gc)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},i.a("editorCodeLensForeground","Foreground color of editor CodeLens")),S=Object(o.gc)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},i.a("editorBracketMatchBackground","Background color behind matching brackets")),k=Object(o.gc)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o.h},i.a("editorBracketMatchBorder","Color for matching brackets boxes")),x=Object(o.gc)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},i.a("editorOverviewRulerBorder","Color of the overview ruler border.")),L=Object(o.gc)("editorOverviewRuler.background",null,i.a("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),M=Object(o.gc)("editorGutter.background",{dark:o.s,light:o.s,hc:o.s},i.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),D=Object(o.gc)("editorUnnecessaryCode.border",{dark:null,light:null,hc:r.a.fromHex("#fff").transparent(.8)},i.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),E=Object(o.gc)("editorUnnecessaryCode.opacity",{dark:r.a.fromHex("#000a"),light:r.a.fromHex("#0007"),hc:null},i.a("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),T=new r.a(new r.c(0,122,204,.6)),O=Object(o.gc)("editorOverviewRuler.rangeHighlightForeground",{dark:T,light:T,hc:T},i.a("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),N=Object(o.gc)("editorOverviewRuler.errorForeground",{dark:new r.a(new r.c(255,18,18,.7)),light:new r.a(new r.c(255,18,18,.7)),hc:new r.a(new r.c(255,50,50,1))},i.a("overviewRuleError","Overview ruler marker color for errors.")),I=Object(o.gc)("editorOverviewRuler.warningForeground",{dark:o.T,light:o.T,hc:o.S},i.a("overviewRuleWarning","Overview ruler marker color for warnings.")),A=Object(o.gc)("editorOverviewRuler.infoForeground",{dark:o.L,light:o.L,hc:o.K},i.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(s.g)((e,t)=>{const n=e.getColor(o.s);n&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${n}; }`);const i=e.getColor(o.B);i&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const r=e.getColor(M);r&&t.addRule(`.monaco-editor .margin { background-color: ${r}; }`);const s=e.getColor(c);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=e.getColor(d);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(u);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const f=e.getColor(h);f&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${f}; }`);const g=e.getColor(p);g&&(t.addRule(`.monaco-editor .mtkw { color: ${g} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${g} !important; }`))})},function(e,t,n){"use strict";var i,r;n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"a",(function(){return l})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(r||(r={}));class o{constructor(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class s{constructor(e,t){this.range=e,this.matches=t}}class a{constructor(e,t,n,i,r,o){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=o}}class l{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c}));var i=n(2),r=n(6),o=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class s extends i.a{constructor(e,t="",n="",i=!0,o){super(),this._onDidChange=this._register(new r.a),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}}class a extends i.a{constructor(){super(...arguments),this._onDidBeforeRun=this._register(new r.a),this.onDidBeforeRun=this._onDidBeforeRun.event,this._onDidRun=this._register(new r.a),this.onDidRun=this._onDidRun.event}run(e,t){return o(this,void 0,void 0,(function*(){if(!e.enabled)return Promise.resolve(null);this._onDidBeforeRun.fire({action:e});try{const n=yield this.runAction(e,t);this._onDidRun.fire({action:e,result:n})}catch(t){this._onDidRun.fire({action:e,error:t})}}))}runAction(e,t){const n=t?e.run(t):e.run();return Promise.resolve(n)}}class l extends s{constructor(e){super(l.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}l.ID="vs.actions.separator";class c extends s{constructor(e,t,n,i){super(e,t,i,!0),this._actions=n}get actions(){return Array.isArray(this._actions)?this._actions:this._actions()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var i,r=n(14),o=n(2),s=n(1),a=n(89),l=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(i||(i={}));class c extends o.a{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(s.i(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(s.i(document,"touchend",e=>this.onTouchEnd(e))),this._register(s.i(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return c.isTouchDevice()?(c.INSTANCE||(c.INSTANCE=new c),c.INSTANCE.targets.push(e),{dispose:()=>{c.INSTANCE.targets=c.INSTANCE.targets.filter(t=>t!==e)}}):o.a.None}static ignoreTarget(e){return c.isTouchDevice()?(c.INSTANCE||(c.INSTANCE=new c),c.INSTANCE.ignoreTargets.push(e),{dispose:()=>{c.INSTANCE.ignoreTargets=c.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):o.a.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,r=e.targetTouches.length;n=c.HOLD_DELAY&&Math.abs(a.initialPageX-r.t(a.rollingPageX))<30&&Math.abs(a.initialPageY-r.t(a.rollingPageY))<30){let e=this.newGestureEvent(i.Contextmenu,a.initialTarget);e.pageX=r.t(a.rollingPageX),e.pageY=r.t(a.rollingPageY),this.dispatchEvent(e)}else if(1===n){let e=r.t(a.rollingPageX),n=r.t(a.rollingPageY),i=r.t(a.rollingTimestamps)-a.rollingTimestamps[0],o=e-a.rollingPageX[0],s=n-a.rollingPageY[0];const l=this.targets.filter(e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget));this.inertia(l,t,Math.abs(o)/i,o>0?1:-1,e,Math.abs(s)/i,s>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(i.End,a.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===i.Tap){const t=(new Date).getTime();let n=0;n=t-this._lastSetTapCountTime>c.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=n}else e.type!==i.Change&&e.type!==i.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,n,r,o,a,l,d){this.handle=s.Y(()=>{let s=Date.now(),u=s-t,h=0,f=0,g=!0;n+=c.SCROLL_FRICTION*u,a+=c.SCROLL_FRICTION*u,n>0&&(g=!1,h=r*n*u),a>0&&(g=!1,f=l*a*u);let p=this.newGestureEvent(i.Change);p.translationX=h,p.translationY=f,e.forEach(e=>e.dispatchEvent(p)),g||this.inertia(e,s,n,r,o+h,a,l,d+f)})}onTouchMove(e){let t=Date.now();for(let n=0,o=e.changedTouches.length;n3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(o.pageX),s.rollingPageY.push(o.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}c.SCROLL_FRICTION=-.005,c.HOLD_DELAY=700,c.CLEAR_TAP_COUNT_TIME=400,l([a.a],c,"isTouchDevice",null)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return l}));var i=n(22);class r{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.a(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}class o{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return new i.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}class s{constructor(e,t,n=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=n}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.a(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}class a{constructor(e,t,n,i,r=!1){this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=r}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new i.a(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}class l{constructor(e,t,n,i=!1){this._range=e,this._text=t,this._initialSelection=n,this._forceMoveMarkers=i,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return l}));var i,r,o=n(17),s=n(0),a=n(58);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(i||(i={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=Object(s.a)("sev.error","Error"),t[e.Warning]=Object(s.a)("sev.warning","Warning"),t[e.Info]=Object(s.a)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case a.a.Error:return e.Error;case a.a.Warning:return e.Warning;case a.a.Info:return e.Info;case a.a.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return a.a.Error;case e.Warning:return a.a.Warning;case e.Info:return a.a.Info;case e.Hint:return a.a.Ignore}}}(i||(i={})),function(e){const t="";function n(e,n){let r=[t];return e.source?r.push(e.source.replace("¦","\\¦")):r.push(t),e.code?"string"==typeof e.code?r.push(e.code.replace("¦","\\¦")):r.push(e.code.value.replace("¦","\\¦")):r.push(t),void 0!==e.severity&&null!==e.severity?r.push(i.toString(e.severity)):r.push(t),e.message&&n?r.push(e.message.replace("¦","\\¦")):r.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?r.push(e.startLineNumber.toString()):r.push(t),void 0!==e.startColumn&&null!==e.startColumn?r.push(e.startColumn.toString()):r.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?r.push(e.endLineNumber.toString()):r.push(t),void 0!==e.endColumn&&null!==e.endColumn?r.push(e.endColumn.toString()):r.push(t),r.push(t),r.join("¦")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(r||(r={}));const l=Object(o.c)("markerService")},function(e,t,n){"use strict";n(588);var i=n(1),r=n(104),o=n(49),s=n(13),a=n(6),l=n(37),c=n(33),d=n(186),u=(n(606),n(160)),h=n(149),f=n(2),g=n(3),p=n(29);const m=new s.a(new s.c(0,122,204)),_={showArrow:!0,showFrame:!0,className:"",frameColor:m,arrowColor:m,keepEditorSelection:!1},b="vs.editor.contrib.zoneWidget";class v{constructor(e,t,n,i,r,o){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=r,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class y{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class w{constructor(e){this._editor=e,this._ruleName=w._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),i.P(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){i.P(this._ruleName),i.u(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:g.a.fromPositions(e),options:{className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}w._IdGenerator=new h.a(".arrow-decoration-");var C=n(0),S=n(9),k=n(17),x=n(103),L=n(4),M=n(5),D=n(16),E=n(25),T=n(236);n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return A})),n.d(t,"d",(function(){return j})),n.d(t,"c",(function(){return B})),n.d(t,"p",(function(){return W})),n.d(t,"q",(function(){return H})),n.d(t,"r",(function(){return Y})),n.d(t,"e",(function(){return V})),n.d(t,"j",(function(){return z})),n.d(t,"l",(function(){return U})),n.d(t,"k",(function(){return $})),n.d(t,"n",(function(){return q})),n.d(t,"o",(function(){return K})),n.d(t,"f",(function(){return G})),n.d(t,"g",(function(){return Z})),n.d(t,"m",(function(){return J})),n.d(t,"h",(function(){return X})),n.d(t,"i",(function(){return Q}));var O=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},N=function(e,t){return function(n,i){t(n,i,e)}};const I=Object(k.c)("IPeekViewService");var A,R;Object(x.b)(I,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const n=this._widgets.get(e);n&&(n.listener.dispose(),n.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose(()=>{const n=this._widgets.get(e);n&&n.widget===t&&(n.listener.dispose(),this._widgets.delete(e))})})}}),(R=A||(A={})).inPeekEditor=new S.c("inReferenceSearchEditor",!0),R.notInPeekEditor=R.inPeekEditor.toNegated();let P=class{constructor(e,t){e instanceof d.a&&A.inPeekEditor.bindTo(t)}dispose(){}};function j(e){let t=e.get(c.a).getFocusedCodeEditor();return t instanceof d.a?t.getParentEditor():t}P.ID="editor.contrib.referenceController",P=O([N(1,S.b)],P),Object(L.m)(P.ID,P);const F={headerBackgroundColor:s.a.white,primaryHeadingColor:s.a.fromHex("#333333"),secondaryHeadingColor:s.a.fromHex("#6c6c6cb3")};let B=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new f.b,this.container=null,this._isShowing=!1,this.editor=e,this.options=l.c(t),l.g(this.options,_,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new w(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const n=t.getDecorationRange(e);return n?n.getStartPosition():void 0}show(e,t){const n=g.a.isIRange(e)?g.a.lift(e):g.a.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:p.a.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(51),t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const o=document.createElement("div");o.style.overflow="hidden";const s=this.editor.getOption(51),a=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(s/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(s/9)),this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new v(o,n.lineNumber,n.column,t,e=>this._onViewZoneTop(e),e=>this._onViewZoneHeight(e)),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new y(b+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let d=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);const u=this.editor.getModel();if(u){const t=e.endLineNumber+1;t<=u.getLineCount()?this.revealLine(t,!1):this.revealLine(u.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),i.e(this.container,e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new u.a(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(51),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new a.a,this.onDidClose=this._onDidClose.event,l.g(this.options,F,!1)}dispose(){super.dispose(),this._onDidClose.fire(this)}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=i.a(".head"),this._bodyElement=i.a(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const n=i.a(".peekview-title");i.p(this._headElement,n),i.n(n,"click",e=>this._onTitleClick(e)),this._fillTitleIcon(n),this._primaryHeading=i.a("span.filename"),this._secondaryHeading=i.a("span.dirname"),this._metaHeading=i.a("span.meta"),i.p(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);const s=i.a(".peekview-actions");i.p(this._headElement,s);const a=this._getActionBarOptions();this._actionbarWidget=new r.a(s,a),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new o.a("peekview.close",C.a("label.close","Close"),D.a.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:e=>e instanceof E.c?this.instantiationService.createInstance(T.a,e):e instanceof E.e?this.instantiationService.createInstance(T.b,e):void 0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("aria-label",e),t?this._secondaryHeading.innerText=t:i.s(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,i.Z(this._metaHeading)):i.K(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const n=Math.ceil(1.2*this.editor.getOption(51)),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};B=O([N(2,k.a)],B);const W=Object(M.gc)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},C.a("peekViewTitleBackground","Background color of the peek view title area.")),H=Object(M.gc)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},C.a("peekViewTitleForeground","Color of the peek view title.")),Y=Object(M.gc)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},C.a("peekViewTitleInfoForeground","Color of the peek view title info.")),V=Object(M.gc)("peekView.border",{dark:"#007acc",light:"#007acc",hc:M.h},C.a("peekViewBorder","Color of the peek view borders and arrow.")),z=Object(M.gc)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:s.a.black},C.a("peekViewResultsBackground","Background color of the peek view result list.")),U=Object(M.gc)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:s.a.white},C.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),$=Object(M.gc)("peekViewResult.fileForeground",{dark:s.a.white,light:"#1E1E1E",hc:s.a.white},C.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),q=Object(M.gc)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},C.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),K=Object(M.gc)("peekViewResult.selectionForeground",{dark:s.a.white,light:"#6C6C6C",hc:s.a.white},C.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),G=Object(M.gc)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:s.a.black},C.a("peekViewEditorBackground","Background color of the peek view editor.")),Z=Object(M.gc)("peekViewEditorGutter.background",{dark:G,light:G,hc:G},C.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),J=Object(M.gc)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},C.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),X=Object(M.gc)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},C.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Q=Object(M.gc)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:M.b},C.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(17);const r=Object(i.c)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return f}));n(570);var i=n(12),r=n(1);const o=2e4;let s,a,l,c,d;function u(e){(s=document.createElement("div")).className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};a=t(),l=t();const n=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),s.appendChild(e),e};c=n(),d=n(),e.appendChild(s)}function h(e){s&&(a.textContent!==e?(r.s(l),g(a,e)):(r.s(a),g(l,e)))}function f(e){s&&(i.f?h(e):c.textContent!==e?(r.s(d),g(c,e)):(r.s(c),g(d,e)))}function g(e,t){r.s(e),t.length>o&&(t=t.substr(0,o)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n(30),r=n(39),o=n(12);let s=new Array(230),a=new Array(112);!function(){for(let e=0;ea(t,n,e.include)))&&!(!e.includeSourceActions&&r.Source.contains(t)))}function s(e,t){const n=t.kind?new r(t.kind):void 0;return!!(!e.include||n&&e.include.contains(n))&&(!(e.excludes&&n&&e.excludes.some(t=>a(n,t,e.include)))&&(!(!e.includeSourceActions&&n&&r.Source.contains(n))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))}function a(e,t,n){return!!t.contains(e)&&(!n||!t.contains(n))}r.sep=".",r.None=new r("@@none@@"),r.Empty=new r(""),r.QuickFix=new r("quickfix"),r.Refactor=new r("refactor"),r.Source=new r("source"),r.SourceOrganizeImports=r.Source.append("organizeImports"),r.SourceFixAll=r.Source.append("fixAll");class l{constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}static fromUser(e,t){return e&&"object"==typeof e?new l(l.getKindFromUser(e,t.kind),l.getApplyFromUser(e,t.apply),l.getPreferredUser(e)):new l(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new r(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}},function(e,t,n){"use strict";var i,r=n(8);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={})),function(e){const t="error",n="warning",i="warn",o="info";e.fromValue=function(s){return s?r.t(t,s)?e.Error:r.t(n,s)||r.t(i,s)?e.Warning:r.t(o,s)?e.Info:e.Ignore:e.Ignore}}(i||(i={})),t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a}));var i=n(30),r=n(226),o=n(12);class s{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=r.a.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,n=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){let t=e,n=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==n.VERTICAL_AXIS&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?i.h&&!o.f?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)i.j&&o.i?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==n.HORIZONTAL_AXIS&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?i.h&&!o.f?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(3);class r{static insert(e,t){return{range:new i.a(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"i",(function(){return v})),n.d(t,"g",(function(){return x})),n.d(t,"b",(function(){return L})),n.d(t,"c",(function(){return M})),n.d(t,"a",(function(){return j})),n.d(t,"d",(function(){return F})),n.d(t,"e",(function(){return U}));var i=n(65),r=n(8);function o(...e){return function(t,n){for(let i=0,r=e.length;i0?[{start:0,end:t.length}]:[]}.bind(void 0,!0);function a(e,t){const n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function l(e){return 97<=e&&e<=122}function c(e){return 65<=e&&e<=90}function d(e){return 48<=e&&e<=57}function u(e){return 32===e||9===e||10===e||13===e}const h=new Set;function f(e){return u(e)||h.has(e)}function g(e){return l(e)||c(e)||d(e)}function p(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function m(e,t){for(let n=t;n0&&!g(e.charCodeAt(n-1)))return n}return e.length}function _(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;{let r=null,o=i+1;for(r=_(e,t,n+1,i+1);!r&&(o=m(t,o))60)return null;const n=function(e){let t=0,n=0,i=0,r=0,o=0;for(let s=0;s.2&&t<.8&&i>.6&&r<.2}(n)){if(!function(e){const{upperPercent:t,lowerPercent:n}=e;return 0===n&&t>.6}(n))return null;t=t.toLowerCase()}let i=null,r=0;for(e=e.toLowerCase();r0&&f(e.charCodeAt(n-1)))return n;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>h.add(e.charCodeAt(0)));const C=o(s,b,a),S=o(s,b,(function(e,t){return function e(t,n,i,r){if(i===t.length)return[];if(r===n.length)return null;if(t[i]===n[r]){let o=null;return(o=e(t,n,i+1,r+1))?p({start:r,end:r+1},o):null}return e(t,n,i,r+1)}(e.toLowerCase(),t.toLowerCase(),0,0)})),k=new i.a(1e4);function x(e,t,n=!1){if("string"!=typeof e||"string"!=typeof t)return null;let i=k.get(e);i||(i=new RegExp(r.p(e),"i"),k.set(e,i));const o=i.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:n?S(e,t):C(e,t)}function L(e,t,n,i,r,o){const s=F(e,t,0,i,r,0,!0);if(s)return s;let a=0,l=0,c=o;for(let e=0;e=0)l+=1,a+=Math.pow(2,n),c=n+1;else if(0!==a)break}return[l,a,o]}function M(e){if(void 0===e)return[];const t=e[1].toString(2),n=[];for(let i=e[2];io(e,3)).join("|")}\n`;for(let i=0;i<=n;i++)s+=0===i?" |":`${t[i-1]}|`,s+=e[i].slice(0,r+1).map(e=>o(e.toString(),3)).join("|")+"\n";return s}function R(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function P(e,t,n){return t[e]!==n[e]}var j;function F(e,t,n,i,r,o,s){const a=e.length>D?D:e.length,l=i.length>D?D:i.length;if(n>=a||o>=l||a-n>l-o)return;if(!function(e,t,n,i,r,o){for(;t1&&(f=!0),O[c][d]=o;const s=T[c-1][d-1]+(o>1?1:o),a=T[c-1][d]+-1,l=T[c][d-1]+-1;l>=a?l>s?(T[c][d]=l,N[c][d]=4):l===s?(T[c][d]=l,N[c][d]=6):(T[c][d]=s,N[c][d]=2):a>s?(T[c][d]=a,N[c][d]=1):a===s?(T[c][d]=a,N[c][d]=3):(T[c][d]=s,N[c][d]=2)}return I&&function(e,t,n,i){e=e.substr(t),n=n.substr(i),console.log(A(T,e,e.length,n,n.length)),console.log(A(N,e,e.length,n,n.length)),console.log(A(O,e,e.length,n,n.length))}(e,n,i,o),(f||s)&&(W=0,Y=-100,V=o,z=s,function e(t,n,i,r,o){if(W>=10||i<-25)return;let s=0;for(;t>0&&n>0;){const a=O[t][n],l=N[t][n];if(4===l)n-=1,o?i-=5:0!==r&&(i-=1),o=!1,s=0;else{if(!(2&l))return;if(4&l&&e(t,n-1,0!==r?i-1:i,r,o),i+=a,t-=1,n-=1,o=!0,r+=Math.pow(2,n+V),1===a){if(s+=1,0===t&&!z)return}else i+=1+s*(a-1),s=0}}W+=1,(i-=n>=3?9:3*n)>Y&&(Y=i,H=r)}(c-1,d-1,a===l?1:0,0,!1),0!==W)?[Y,H,o]:void 0}function B(e,t,n,i,r,o,s){return t[n]!==o[s]?-1:s===n-i?e[n]===r[s]?7:5:!P(s,r,o)||0!==s&&P(s-1,r,o)?!R(o,s)||0!==s&&R(o,s-1)?R(o,s-1)||function(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}(o,s-1)?5:1:5:e[n]===r[s]?7:5}!function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(j||(j={}));let W=0,H=0,Y=0,V=0,z=!1;function U(e,t,n,i,r,o,s){return function(e,t,n,i,r,o,s,a){let l=F(e,t,n,i,r,o,a);if(l&&!s)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let s=n+1;sl[0])&&(l=e))}}}return l}(e,t,n,i,r,o,!0,s)}function $(e,t){if(t+1>=e.length)return;const n=e[t],i=e[t+1];return n!==i?e.slice(0,t)+i+n+e.slice(t+2):void 0}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"g",(function(){return f}));var i=n(8);const r=void 0!==e,o="undefined"!=typeof TextDecoder;let s;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return r?this.buffer.toString():o?(s||(s=new TextDecoder),s.decode(this.buffer)):i.r(this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function c(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function d(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function u(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function h(e,t){return e[t]}function f(e,t,n){e[n]=t}}).call(this,n(573).Buffer)},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"e",(function(){return c}));var i=n(8);class r{constructor(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}}class o{constructor(e,t){this.tabSize=e,this.data=t}}class s{constructor(e,t,n,i,r,o){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=r,this.tokens=o}}class a{constructor(e,t,n,i,r,o,s,l,c,d){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=i,this.isBasicASCII=a.isBasicASCII(n,o),this.containsRTL=a.containsRTL(n,this.isBasicASCII,r),this.tokens=s,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||i.B(e)}static containsRTL(e,t,n){return!(t||!n)&&i.m(e)}}class l{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class c{constructor(e,t){this.range=e,this.options=t}}},function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(i||(i={}));class r{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t0)i.left||(i.left=new d,i.left.segment=n.value()),i=i.left;else if(e<0)i.right||(i.right=new d,i.right.segment=n.value()),i=i.right;else{if(!n.hasNext())break;n.next(),i.mid||(i.mid=new d,i.mid.segment=n.value()),i=i.mid}}const r=i.value;return i.value=t,i.key=e,r}get(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0}findSubstr(e){const t=this._iter.reset(e);let n=this._root,i=void 0;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}forEach(e){this._forEach(this._root,e)}_forEach(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))}}class h{constructor(e,t){this[Symbol.toStringTag]="ResourceMap",e instanceof h?(this.map=new Map(e.map),this.toKey=null!=t?t:h.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:h.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,n]of this.map)e(n,i.a.parse(t),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield i.a.parse(e)}*entries(){for(let e of this.map.entries())yield[i.a.parse(e[0]),e[1]]}*[Symbol.iterator](){for(let e of this.map)yield[i.a.parse(e[0]),e[1]]}}h.defaultToKey=e=>e.toString();class f{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator]:()=>i,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return i}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(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,this._state++}addItemLast(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,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class g extends f{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d}));var i=n(24),r=n(17),o=n(2),s=n(8),a=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const l=Object(r.c)("openerService"),c=Object.freeze({_serviceBrand:void 0,registerOpener:()=>o.a.None,registerValidator:()=>o.a.None,registerExternalUriResolver:()=>o.a.None,setExternalOpener(){},open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function d(e,t){return i.a.isUri(e)?Object(s.t)(e.scheme,t):Object(s.T)(e,t+":")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(17),r=n(9);const o=Object(i.c)("accessibilityService"),s=new r.c("accessibilityModeEnabled",!1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n(23),r=n(10),o=n(3),s=n(8);class a{constructor(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}class l{static leftPosition(e,t,n){return n>e.getLineMinColumn(t)?n-=s.N(e.getLineContent(t),n-1):t>1&&(t-=1,n=e.getLineMaxColumn(t)),new r.a(t,n)}static left(e,t,n,i){const r=l.leftPosition(t,n,i);return new a(r.lineNumber,r.column,0)}static moveLeft(e,t,n,i,r){let o,s;if(n.hasSelection()&&!i)o=n.selection.startLineNumber,s=n.selection.startColumn;else{let i=l.left(e,t,n.position.lineNumber,n.position.column-(r-1));o=i.lineNumber,s=i.column}return n.move(i,o,s,0)}static rightPosition(e,t,n){return nd?(n=d,r=l?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=i.a.columnFromVisibleColumn2(e,t,n,c),o=u?0:c-i.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new a(n,r,o)}static moveDown(e,t,n,i,r){let o,s;n.hasSelection()&&!i?(o=n.selection.endLineNumber,s=n.selection.endColumn):(o=n.position.lineNumber,s=n.position.column);let a=l.down(e,t,o,s,n.leftoverVisibleColumns,r,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,n){let s=n.selection,a=l.down(e,t,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),c=l.down(e,t,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i.f(new o.a(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}static up(e,t,n,r,o,s,l){const c=i.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize)+o,d=1===n&&1===r;return(n-=s)<1?(n=1,r=l?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=i.a.columnFromVisibleColumn2(e,t,n,c),o=d?0:c-i.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new a(n,r,o)}static moveUp(e,t,n,i,r){let o,s;n.hasSelection()&&!i?(o=n.selection.startLineNumber,s=n.selection.startColumn):(o=n.position.lineNumber,s=n.position.column);let a=l.up(e,t,o,s,n.leftoverVisibleColumns,r,!0);return n.move(i,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,n){let s=n.selection,a=l.up(e,t,s.selectionStartLineNumber,s.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),c=l.up(e,t,s.positionLineNumber,s.positionColumn,n.leftoverVisibleColumns,1,!1);return new i.f(new o.a(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new r.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}static moveToBeginningOfLine(e,t,n,i){let r,o=n.position.lineNumber,s=t.getLineMinColumn(o),a=t.getLineFirstNonWhitespaceColumn(o)||s;return r=n.position.column===a?s:a,n.move(i,o,r,0)}static moveToEndOfLine(e,t,n,i,r){let o=n.position.lineNumber,s=t.getLineMaxColumn(o);return n.move(i,o,s,r?1073741824-s:0)}static moveToBeginningOfBuffer(e,t,n,i){return n.move(i,1,1,0)}static moveToEndOfBuffer(e,t,n,i){let r=t.getLineCount(),o=t.getLineMaxColumn(r);return n.move(i,r,o,0)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n(1),r=n(56),o=n(59),s=n(2),a=n(50);class l extends s.a{onclick(e,t){this._register(i.i(e,i.c.CLICK,e=>t(new o.a(e))))}onmousedown(e,t){this._register(i.i(e,i.c.MOUSE_DOWN,e=>t(new o.a(e))))}onmouseover(e,t){this._register(i.i(e,i.c.MOUSE_OVER,e=>t(new o.a(e))))}onnonbubblingmouseout(e,t){this._register(i.j(e,e=>t(new o.a(e))))}onkeydown(e,t){this._register(i.i(e,i.c.KEY_DOWN,e=>t(new r.a(e))))}onkeyup(e,t){this._register(i.i(e,i.c.KEY_UP,e=>t(new r.a(e))))}oninput(e,t){this._register(i.i(e,i.c.INPUT,t))}onblur(e,t){this._register(i.i(e,i.c.BLUR,t))}onfocus(e,t){this._register(i.i(e,i.c.FOCUS,t))}ignoreGesture(e){a.b.ignoreTarget(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var i=n(17);class r{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}r.None=Object.freeze({report(){}});const o=Object(i.c)("editorProgressService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var i=n(17);const r=Object(i.c)("contextViewService"),o=Object(i.c)("contextMenuService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return m}));var i=n(0),r=n(6),o=n(42),s=n(2),a=n(8),l=n(149),c=n(3),d=n(65),u=n(15),h=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class f{constructor(e,t,n,i,r){this.isProviderFirst=e,this.parent=t,this.uri=n,this._range=i,this._rangeCallback=r,this.id=l.b.nextId()}get range(){return this._range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){return Object(i.a)("aria.oneReference","symbol in {0} on line {1} at column {2}",Object(o.b)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:o,endColumn:s}=e,a=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new c.a(i,a.startColumn,i,r),d=new c.a(o,s,o,1073741824),u=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e);return{value:u+h+n.getValueInRange(d).replace(/\s+$/,""),highlight:{start:u.length,end:u.length+h.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new d.b}dispose(){Object(s.f)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?Object(i.a)("aria.fileReferences.1","1 symbol in {0}, full path {1}",Object(o.b)(this.uri),this.uri.fsPath):Object(i.a)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Object(o.b)(this.uri),this.uri.fsPath)}resolve(e){return h(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(n))}catch(e){Object(u.e)(e)}return this}))}}class m{constructor(e,t){this._disposables=new s.b,this.groups=[],this.references=[],this._onDidChangeReferenceRange=new r.a,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;let i;e.sort(m._compareReferences);for(let t of e)if(i&&o.e.isEqual(i.uri,t.uri,!0)||(i=new p(this,t.uri),this.groups.push(i)),0===i.children.length||0!==m._compareReferences(t,i.children[i.children.length-1])){const e=new f(n===t,i,t.uri,t.targetSelectionRange||t.range,e=>this._onDidChangeReferenceRange.fire(e));this.references.push(e),i.children.push(e)}}dispose(){Object(s.f)(this.groups),this._disposables.dispose(),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new m(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?Object(i.a)("aria.result.0","No results found"):1===this.references.length?Object(i.a)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?Object(i.a)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):Object(i.a)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,i=n.children.indexOf(e),r=n.children.length,o=n.parent.groups.length;return 1===o||t&&i+10?(i=t?(i+1)%r:(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%o,n.parent.groups[i].children[0]):(i=(i+o-1)%o,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((n,i)=>({idx:i,prefixLen:a.d(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)})).sort((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&c.a.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return o.e.compare(e.uri,t.uri)||c.a.compareRangesUsingStarts(e.range,t.range)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return i}));var i,r=n(20),o=n(23),s=n(68),a=n(122),l=n(10),c=n(3);class d{static addCursorDown(e,t,n){let i=[],r=0;for(let a=0,l=t.length;at&&(n=t,i=e.model.getLineMaxColumn(n)),o.d.fromModelState(new o.f(new c.a(s.lineNumber,1,n,i),0,new l.a(n,i),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberd){const n=e.getLineCount();let i=a.lineNumber+1,r=1;return i>n&&(i=n,r=e.getLineMaxColumn(i)),o.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),i,r,0))}{const e=t.modelState.selectionStart.getEndPosition();return o.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,n,i){const r=e.model.validatePosition(i);return o.d.fromModelState(a.a.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new o.d(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,i=t.viewState.position.column;return o.d.fromViewState(new o.f(new c.a(n,i,n,i),0,new l.a(n,i),0))}static moveTo(e,t,n,i,r){const s=e.model.validatePosition(i),a=r?e.coordinatesConverter.validateViewPosition(new l.a(r.lineNumber,r.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return o.d.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}static simpleMove(e,t,n,i,r,o){switch(n){case 0:return 4===o?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,r);case 1:return 4===o?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,r);case 2:return 2===o?this._moveUpByViewLines(e,t,i,r):this._moveUpByModelLines(e,t,i,r);case 3:return 2===o?this._moveDownByViewLines(e,t,i,r):this._moveDownByModelLines(e,t,i,r);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);default:return null}}static viewportMove(e,t,n,i,r){const o=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(n){case 9:{const n=this._firstLineNumberInRange(e.model,s,r),o=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,o)]}case 11:{const n=this._lastLineNumberInRange(e.model,s,r),o=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,o)]}case 10:{const n=Math.round((s.startLineNumber+s.endLineNumber)/2),r=e.model.getLineFirstNonWhitespaceColumn(n);return[this._moveToModelPosition(e,t[0],i,n,r)]}case 12:{let n=[];for(let r=0,s=t.length;rn.endLineNumber-1&&(r=n.endLineNumber-1),r1;let a=[];for(let l=0,c=t.length;l1;let a=[];for(let l=0,c=t.length;l{return{key:f.bindTo(e.get(l.b)),tokens:new c.a}}),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),()=>{n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class g extends o.b{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(t=>t.get(h).add(e,this))}dispose(){this._unregister(),super.dispose()}}Object(a.l)(new class extends a.c{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})}runEditorCommand(e,t){e.get(h).cancel(t)}}),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"d",(function(){return _})),n.d(t,"c",(function(){return b}));class p{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?i.x("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof p))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new p(e,this.flags))}}class m extends g{constructor(e,t,n,i){super(e,i),this.editor=e,this._listener=new s.b,4&t&&this._listener.add(e.onDidChangeCursorPosition(e=>{n&&r.a.containsPosition(n,e.position)||this.cancel()})),2&t&&this._listener.add(e.onDidChangeCursorSelection(e=>{n&&r.a.containsRange(n,e.selection)||this.cancel()})),8&t&&this._listener.add(e.onDidScrollChange(e=>this.cancel())),1&t&&(this._listener.add(e.onDidChangeModel(e=>this.cancel())),this._listener.add(e.onDidChangeModelContent(e=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class _ extends o.b{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class b{constructor(e,t,n){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=n}static capture(e){let t=null,n=0;if(0!==e.getScrollTop()){const i=e.getVisibleRanges();if(i.length>0){t=i[0].getStartPosition();const r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}}return new b(t,n,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}},function(e,t,n){"use strict";var i=n(30),r=n(6),o=n(2),s=n(12);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(n);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",i.style.fontStyle="italic",e.appendChild(i);const r=[];for(const e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=n),1===e.type&&(o=i),o.appendChild(document.createElement("br"));const s=document.createElement("span");l._render(s,e),o.appendChild(s),r.push(s)}this._container=e,this._testElements=r}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let n=t.chr;for(let e=0;e<8;e++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e])}}function g(){p.INSTANCE.clearCache()}class p extends o.a{constructor(){super(),this._onDidChange=this._register(new r.a),this.onDidChange=this._onDidChange.event,this._cache=new f,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new f,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(let n=0,i=e.length;n.001){x=!1;break}}let M=!0;x&&w.width!==L&&(M=!1),w.width>y.width&&(M=!1);const D=i.b()>2e3;return new h.b({zoomLevel:i.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:x,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:M,spaceWidth:s.width,middotWidth:C.width,wsmiddotWidth:S.width,maxDigitWidth:k},D)}}p.INSTANCE=new p;class m extends d.a{constructor(e,t,n=null,r){super(e,t),this.accessibilityService=r,this._elementSizeObserver=this._register(new c.a(n,t.dimension,()=>this._onReferenceDomElementSizeChanged())),this._register(p.INSTANCE.onDidChange(()=>this._onCSSBasedConfigurationChanged())),this._validatedOptions.get(9)&&this._elementSizeObserver.startObserving(),this._register(i.n(e=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}_onReferenceDomElementSizeChanged(){this._recomputeOptions()}_onCSSBasedConfigurationChanged(){this._recomputeOptions()}observeReferenceElement(e){this._elementSizeObserver.observe(e)}dispose(){super.dispose()}_getExtraEditorClassName(){let e="";return i.j||i.m||(e+="no-user-select "),s.f&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:i.l||i.h,pixelRatio:i.a(),zoomLevel:i.d(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return p.INSTANCE.readConfiguration(e)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return c}));var i=n(114),r=n(11);const o=new class{clone(){return this}equals(e){return this===e}},s="vs.editor.nullMode",a=new r.r(s,0);function l(e,t,n,r){return new i.b([new i.a(r,"",e)],n)}function c(e,t,n,r){let s=new Uint32Array(2);return s[0]=r,s[1]=(16384|e<<0|2<<23)>>>0,new i.c(s,null===n?o:n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return f}));var i=n(8),r=n(125),o=n(163);class s{constructor(e,t,n){this.endIndex=e,this.type=t,this.metadata=n}isWhitespace(){return!!(1&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,n,i,r,o,s,a,l,c,d,u,h,f,g,p,m,_,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=r,this.containsRTL=o,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=l,this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=u,this.stopRenderingLineAfter=g,this.renderWhitespace="all"===p?4:"boundary"===p?1:"selection"===p?2:"trailing"===p?3:0,this.renderControlCharacters=m,this.fontLigatures=_,this.selectionsOnLine=b&&b.sort((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,n,i){let r=(t<<16|n<<0)>>>0;this._data[e]=r,this._absoluteOffsets[e]=i+n}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,n){if(0===this.length)return 0;let i=(e<<16|n<<0)>>>0,r=0,o=this.length-1;for(;r+1>>1,t=this._data[e];if(t===i)return e;t>i?o=e:r=e}if(r===o)return r;let s=this._data[r],a=this._data[o];if(s===i)return r;if(a===i)return o;let l,d=c.getPartIndex(s);return n-c.getCharIndex(s)<=(l=d!==c.getPartIndex(a)?t:c.getCharIndex(a))-n?r:o}}class d{constructor(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function u(e,t){if(0===e.lineContent.length){let n=0,i="";if(e.lineDecorations.length>0){const t=[],r=[];for(let i=0,o=e.lineDecorations.length;i${t.length>0?``:""}${r.length>0?``:""}`}}return t.appendASCIIString(i),new d(new c(0,0),!1,n)}return function(e,t){const n=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,u=e.parts,h=e.fauxIndentLength,f=e.tabSize,g=e.startVisibleColumn,p=e.containsRTL,m=e.spaceWidth,_=e.renderSpaceCharCode,b=e.renderWhitespace,v=e.renderControlCharacters,y=new c(a+1,u.length);let w=0,C=g,S=0,k=0,x=0,L=0;p?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,a=u.length;e=h&&(t+=i)}}for(g&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(m*n)),t.appendASCIIString('px"')),t.appendASCII(62);w1?t.write1(8594):t.write1(65515);for(let e=2;e<=n;e++)t.write1(160)}else n=1,t.write1(_);S+=n,w>=h&&(C+=n)}x=n}else{let n=0;for(t.appendASCII(62);w=h&&(C+=a)}x=n}p?k++:k=0,t.appendASCIIString("")}y.setPartData(a,u.length-1,S,L),l&&t.appendASCIIString("");return t.appendASCIIString(""),new d(y,p,o)}(function(e){const t=e.lineContent;let n,r;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[r++]=new s(t,"",0));for(let o=0,a=e.getCount();o=n){i[r++]=new s(n,l,0);break}i[r++]=new s(a,l,0)}return i}(e.lineTokens,e.fauxIndentLength,r);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,n,r){const o=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,u=e.selectionsOnLine,h=1===e.renderWhitespace,f=3===e.renderWhitespace,g=e.renderSpaceWidth!==e.spaceWidth;let p=[],m=0,_=0,b=r[_].type,v=r[_].endIndex;const y=r.length;let w,C=!1,S=i.w(t);-1===S?(C=!0,S=n,w=n):w=i.J(t);let k=!1,x=0,L=u&&u[x],M=c%l;for(let e=a;e=L.endOffset&&(x++,L=u&&u[x]),ew)c=!0;else if(9===o)c=!0;else if(32===o)if(h)if(k)c=!0;else{const i=e+1e),c&&f&&(c=C||e>w),k){if(!c||!d&&M>=l){if(g){for(let t=(m>0?p[m-1].endIndex:a)+1;t<=e;t++)p[m++]=new s(t,"mtkw",1)}else p[m++]=new s(e,"mtkw",1);M%=l}}else(e===v||c&&e>a)&&(p[m++]=new s(e,b,0),M%=l);for(9===o?M=l:i.E(o)?M+=2:M++,k=c;e===v;)++_0?t.charCodeAt(n-1):0,i=n>1?t.charCodeAt(n-2):0;32===e&&32!==i&&9!==i||(D=!0)}else D=!0;if(D)if(g){for(let e=(m>0?p[m-1].endIndex:a)+1;e<=n;e++)p[m++]=new s(e,"mtkw",1)}else p[m++]=new s(n,"mtkw",1);else p[m++]=new s(n,b,0);return p}(e,t,r,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,n=e.lineDecorations.length;tu&&(u=e.startOffset,c[d++]=new s(u,o,h)),!(e.endOffset+1<=i)){u=i,c[d++]=new s(u,o+" "+e.className,h|e.metadata);break}u=e.endOffset+1,c[d++]=new s(u,o+" "+e.className,h|e.metadata),l++}i>u&&(u=i,c[d++]=new s(u,o,h))}const h=n[n.length-1].endIndex;if(l=50&&(r[o++]=new s(c+1,t,n),d=c+1,c=-1);d!==l&&(r[o++]=new s(l,t,n))}else r[o++]=a;i=l}else for(let e=0,n=t.length;e50){const e=n.type,t=n.metadata,c=Math.ceil(l/50);for(let n=1;n=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,n,i,o,s){1===r.a&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:n,when:s,weight1:i,weight2:o,extensionId:null}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(c)),this._cachedMergedKeybindings.slice(0)}}const l=new a;function c(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.a.add("platform.keybindingsRegistry",l)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"d",(function(){return h}));var i=n(14),r=n(16),o=n(15);class s{constructor(e="",t=!1){var n,i;if(this._value=e,"string"!=typeof this._value)throw Object(o.b)("value");"boolean"==typeof t?(this._isTrusted=t,this._supportThemeIcons=!1):(this._isTrusted=null!==(n=t.isTrusted)&&void 0!==n&&n,this._supportThemeIcons=null!==(i=t.supportThemeIcons)&&void 0!==i&&i)}get value(){return this._value}get isTrusted(){return this._isTrusted}get supportThemeIcons(){return this._supportThemeIcons}appendText(e){return this._value+=(this._supportThemeIcons?Object(r.b)(e):e).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&").replace(/\n/g,"\n\n"),this}appendMarkdown(e){return this._value+=e,this}appendCodeblock(e,t){return this._value+="\n```",this._value+=e,this._value+="\n",this._value+=t,this._value+="\n```\n",this}}function a(e){return l(e)?!e.value:!Array.isArray(e)||e.every(a)}function l(e){return e instanceof s||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function c(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?Object(i.g)(e,t,d):!(!l(e)||!l(t))&&d(e,t))}function d(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons)}function u(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function h(e){const t=[],n=e.split("|").map(e=>e.trim());e=n[0];const i=n[1];if(i){const e=/height=(\d+)/.exec(i),n=/width=(\d+)/.exec(i),r=e?e[1]:"",o=n?n[1]:"",s=isFinite(parseInt(o)),a=isFinite(parseInt(r));s&&t.push(`width="${o}"`),a&&t.push(`height="${r}"`)}return{href:e,dimensions:t}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return d}));var i=n(5);function r(e,t){const n=Object.create(null);for(let r in t){const o=t[r];o&&(n[r]=Object(i.hc)(o,e))}return n}function o(e,t,n){function i(i){const o=r(e.getColorTheme(),t);"function"==typeof n?n(o):n.style(o)}return i(e.getColorTheme()),e.onDidColorThemeChange(i)}function s(e,t,n){return o(t,{badgeBackground:n&&n.badgeBackground||i.c,badgeForeground:n&&n.badgeForeground||i.d,badgeBorder:i.h},e)}function a(e,t,n){return o(t,Object.assign(Object.assign({},l),n||{}),e)}const l={listFocusBackground:i.xb,listFocusForeground:i.yb,listActiveSelectionBackground:Object(i.i)(i.rb,.1),listActiveSelectionForeground:i.sb,listFocusAndSelectionBackground:i.rb,listFocusAndSelectionForeground:i.sb,listInactiveSelectionBackground:i.Db,listInactiveSelectionForeground:i.Eb,listInactiveFocusBackground:i.Cb,listHoverBackground:i.Ab,listHoverForeground:i.Bb,listDropBackground:i.tb,listFocusOutline:i.b,listSelectionOutline:i.b,listHoverOutline:i.b,listFilterWidgetBackground:i.ub,listFilterWidgetOutline:i.wb,listFilterWidgetNoMatchesOutline:i.vb,listMatchesShadow:i.uc,treeIndentGuidesStroke:i.tc},c={shadowColor:i.uc,borderColor:i.Gb,foregroundColor:i.Hb,backgroundColor:i.Fb,selectionForegroundColor:i.Kb,selectionBackgroundColor:i.Ib,selectionBorderColor:i.Jb,separatorColor:i.Lb};function d(e,t,n){return o(t,Object.assign(Object.assign({},c),n),e)}},function(e,t,n){"use strict";function i(e,t){let n=0;for(let i=0;i{r||(r=!0,this._remove(n))}}shift(){if(this._first!==i.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==i.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==i.Undefined&&e.next!==i.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===i.Undefined&&e.next===i.Undefined?(this._first=i.Undefined,this._last=i.Undefined):e.next===i.Undefined?(this._last=this._last.prev,this._last.next=i.Undefined):e.prev===i.Undefined&&(this._first=this._first.next,this._first.prev=i.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==i.Undefined;)yield e.element,e=e.next}toArray(){const e=[];for(let t=this._first;t!==i.Undefined;t=t.next)e.push(t.element);return e}}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var i;self.MonacoEnvironment=(i={editorWorkerService:"editor.worker.js",json:"json.worker.js"},{getWorkerUrl:function(e,t){var r=n.p,o=(r?r.replace(/\/$/,"")+"/":"")+i[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,a.length)!==a){var l=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return o}}),n(275),n(276),n(277),n(332),n(278),n(279),n(327),n(222),n(330),n(280),n(90),n(281),n(333),n(183),n(324),n(282),n(328),n(200),n(334),n(225),n(223),n(323),n(283),n(335),n(284),n(285),n(325),n(336),n(286),n(287),n(329),n(326),n(337),n(331),n(338),n(339),n(150),n(322),n(288),n(196),n(289),n(290),n(291),n(292),n(170),n(293),e.exports=n(899),n(294)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return c}));var i=n(17),r=n(6),o=n(2),s=n(20);const a=Object(i.c)("storageService");var l;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(l||(l={}));class c extends o.a{constructor(){super(...arguments),this._onDidChangeStorage=this._register(new r.a),this._onWillSaveState=this._register(new r.a),this.onWillSaveState=this._onWillSaveState.event,this.globalCache=new Map,this.workspaceCache=new Map}getCache(e){return 0===e?this.globalCache:this.workspaceCache}get(e,t,n){const i=this.getCache(t).get(e);return Object(s.l)(i)?n:i}getBoolean(e,t,n){const i=this.getCache(t).get(e);return Object(s.l)(i)?n:"true"===i}getNumber(e,t,n){const i=this.getCache(t).get(e);return Object(s.l)(i)?n:parseInt(i,10)}store(e,t,n){if(Object(s.l)(t))return this.remove(e,n);const i=String(t);return this.getCache(n).get(e)===i?Promise.resolve():(this.getCache(n).set(e,i),this._onDidChangeStorage.fire({scope:n,key:e}),Promise.resolve())}remove(e,t){return this.getCache(t).delete(e)?(this._onDidChangeStorage.fire({scope:t,key:e}),Promise.resolve()):Promise.resolve()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("editorWorkerService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let i=0;function r(e,t,n){return function(){const e=`$memoize${i++}`;let t=void 0;const n=function(n,i,r){let o=null,s=null;if("function"==typeof r.value?(o="value",0!==(s=r.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof r.get&&(o="get",s=r.get),!s)throw new Error("not supported");const a=`${e}:${i}`;r[o]=function(...e){return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:s.apply(this,e)}),this[a]}};return n.clear=()=>{void 0!==t&&Object.getOwnPropertyNames(t).forEach(n=>{0===n.indexOf(e)&&delete t[n]})},n}()(e,t,n)}},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(20),o=n(4),s=n(33),a=n(23),l=n(10),c=n(3);class d{static columnSelect(e,t,n,i,r,o){let s=Math.abs(r-n)+1,d=n>r,u=i>o,h=io)continue;if(_i)continue;if(m1&&i--,d.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,i)}static columnSelectRight(e,t,n){let i=0;const r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),o=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let n=r;n<=o;n++){const r=t.getLineMaxColumn(n),o=a.a.visibleColumnFromColumn2(e,t,new l.a(n,r));i=Math.max(i,o)}let s=n.toViewVisualColumn;return s{const n=e.get(s.a).getFocusedCodeEditor();return!(!n||!n.hasTextFocus())&&(this.runEditorCommand(e,n,t),!0)}),e.addImplementation(1e3,(e,t)=>{const n=document.activeElement;return!!(n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)}),e.addImplementation(0,(e,t)=>{const n=e.get(s.a).getActiveCodeEditor();return!!n&&(n.focus(),this.runEditorCommand(e,n,t),!0)})}}!function(e){class t extends b{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[h.b.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=Object(o.l)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Object(o.l)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class n extends b{runCoreEditorCommand(e,t){e.model.pushStackElement();const n=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,n.viewStates.map(e=>a.d.fromViewState(e))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:n.fromLineNumber,fromViewVisualColumn:n.fromVisualColumn,toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),n.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=Object(o.l)(new class extends n{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,n,i){const r=e.model.validatePosition(i.position),o=e.coordinatesConverter.validateViewPosition(new l.a(i.viewPosition.lineNumber,i.viewPosition.column),r);let s=i.doColumnSelect?n.fromViewLineNumber:o.lineNumber,a=i.doColumnSelect?n.fromViewVisualColumn:i.mouseColumn-1;return d.columnSelect(e.cursorConfig,e,s,a,o.lineNumber,i.mouseColumn-1)}}),e.CursorColumnSelectLeft=Object(o.l)(new class extends n{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return d.columnSelectLeft(e.cursorConfig,e,n)}}),e.CursorColumnSelectRight=Object(o.l)(new class extends n{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,n,i){return d.columnSelectRight(e.cursorConfig,e,n)}});class r extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return d.columnSelectUp(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectUp=Object(o.l)(new r({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(o.l)(new r({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,n,i){return d.columnSelectDown(e.cursorConfig,e,n,this._isPaged)}}e.CursorColumnSelectDown=Object(o.l)(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(o.l)(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:3596,linux:{primary:0}}}));class u extends b{constructor(){super({id:"cursorMove",precondition:void 0,description:h.a.description})}runCoreEditorCommand(e,t){const n=h.a.parse(t);n&&this._runCursorMove(e,t.source,n)}_runCursorMove(e,t,n){e.model.pushStackElement(),e.setCursorStates(t,3,u._move(e,e.getCursorStates(),n)),e.revealPrimaryCursor(t,!0)}static _move(e,t,n){const i=n.select,r=n.value;switch(n.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:return h.b.simpleMove(e,t,n.direction,i,r,n.unit);case 9:case 11:case 10:case 12:return h.b.viewportMove(e,t,n.direction,i,r);default:return null}}}e.CursorMoveImpl=u,e.CursorMove=Object(o.l)(new u);class f extends b{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,h.b.simpleMove(e,e.getCursorStates(),n.direction,n.select,n.value,n.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Object(o.l)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(o.l)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1039}})),e.CursorRight=Object(o.l)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(o.l)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1041}})),e.CursorUp=Object(o.l)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(o.l)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(o.l)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(o.l)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1035}})),e.CursorDown=Object(o.l)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(o.l)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(o.l)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(o.l)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1036}})),e.CreateCursor=Object(o.l)(new class extends b{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let n;n=t.wholeLine?h.b.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):h.b.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const i=e.getCursorStates();if(i.length>1){const r=n.modelState?n.modelState.position:null,o=n.viewState?n.viewState.position:null;for(let n=0,s=i.length;nr&&(i=r);const o=new c.a(i,1,i,e.model.getLineMaxColumn(i));let s=0;if(n.at)switch(n.at){case w.RawAtArgument.Top:s=3;break;case w.RawAtArgument.Center:s=1;break;case w.RawAtArgument.Bottom:s=4}const a=e.coordinatesConverter.convertModelRangeToViewRange(o);e.revealRange(t.source,!1,a,s,0)}}),e.SelectAll=new class extends k{constructor(){super(o.h)}runDOMCommand(){document.execCommand("selectAll")}runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditorCommand(i,n)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[h.b.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Object(o.l)(new class extends b{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[a.d.fromModelSelection(t.selection)])}})}(S||(S={}));const x=p.a.and(g.a.textInputFocus,g.a.columnSelection);function L(e,t){m.a.registerKeybindingRule({id:e,primary:t,when:x,weight:_+1})}function M(e){return e.register(),e}var D;L(S.CursorColumnSelectLeft.id,1039),L(S.CursorColumnSelectRight.id,1041),L(S.CursorColumnSelectUp.id,1040),L(S.CursorColumnSelectPageUp.id,1035),L(S.CursorColumnSelectDown.id,1042),L(S.CursorColumnSelectPageDown.id,1036),function(e){class t extends o.c{runEditorCommand(e,t,n){const i=t._getViewModel();i&&this.runCoreEditingCommand(t,i,n||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Object(o.l)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:g.a.writable,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,f.a.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection)))}}),e.Outdent=Object(o.l)(new class extends t{constructor(){super({id:"outdent",precondition:g.a.writable,kbOpts:{weight:_,kbExpr:p.a.and(g.a.editorTextFocus,g.a.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,f.a.outdent(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.Tab=Object(o.l)(new class extends t{constructor(){super({id:"tab",precondition:g.a.writable,kbOpts:{weight:_,kbExpr:p.a.and(g.a.editorTextFocus,g.a.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,f.a.tab(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.DeleteLeft=Object(o.l)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,n){const[i,r]=u.a.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));i&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)}}),e.DeleteRight=Object(o.l)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:_,kbExpr:g.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,n){const[i,r]=u.a.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));i&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)}}),e.Undo=new class extends k{constructor(){super(o.i)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,n){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().undo()}},e.Redo=new class extends k{constructor(){super(o.g)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,n){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().redo()}}}(D||(D={}));class E extends o.a{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(s.a).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function T(e,t){M(new E("default:"+e,e)),M(new E(e,e,t))}T("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),T("replacePreviousChar"),T("compositionStart"),T("compositionEnd"),T("paste"),T("cut")},function(e,t,n){"use strict";var i;n.d(t,"a",(function(){return i})),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function n(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=n,e.intersects=function(e,i){return!n(t(e,i))},e.relativeComplement=function(e,t){const i=[],r={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return n(r)||i.push(r),n(o)||i.push(o),i}}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return d}));var i=n(17),r=n(2),o=n(6);const s=Object(i.c)("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a||(a={}));const l=a.Info;class c extends r.a{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new o.a)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class d extends c{constructor(e=l){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return d}));var i=n(1),r=n(12),o=n(226),s=n(59),a=n(2),l=n(136);function c(e,t){let n=new s.a(t);return n.preventDefault(),{leftButton:n.leftButton,buttons:n.buttons,posx:n.posx,posy:n.posy}}class d{constructor(){this._hooks=new a.b,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const t=this._onStopCallback;this._onStopCallback=null,e&&t&&t()}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,n,a,c){if(this.isMonitoring())return;this._mouseMoveEventMerger=n,this._mouseMoveCallback=a,this._onStopCallback=c;const d=o.a.getSameOriginWindowChain(),u=r.c&&l.a.pointerEvents?"pointermove":"mousemove",h=r.c&&l.a.pointerEvents?"pointerup":"mouseup",f=d.map(e=>e.window.document),g=i.E(e);g&&f.unshift(g);for(const e of f)this._hooks.add(i.l(e,u,e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)},(e,t)=>this._mouseMoveEventMerger(e,t))),this._hooks.add(i.i(e,h,e=>this.stopMonitoring(!0)));if(o.a.hasDifferentOriginAncestor()){let e=d[d.length-1];this._hooks.add(i.i(e.window.document,"mouseout",e=>{"html"===new s.a(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(i.i(e.window.document,"mouseover",e=>{"html"===new s.a(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(i.i(e.window.document.body,"mouseleave",e=>{this.stopMonitoring(!0)}))}}}},function(e,t,n){"use strict";n(585);var i=n(1),r=n(31),o=n(59),s=n(93),a=n(69),l=n(19);const c=11;class d extends a.a{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,Object(i.f)(this.domNode,e.icon.classNames),this.domNode.style.position="absolute",this.domNode.style.width=c+"px",this.domNode.style.height=c+"px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new s.a),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new l.c),this._mousedownScheduleRepeatTimer=this._register(new l.e)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)},200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.b,e=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}var u=n(2);class h extends u.a{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new l.e)}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){let t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var f=n(12);const g=140;class p extends a.a{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new h(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new s.a),this._shouldRender=!0,this.domNode=Object(r.b)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(e){let t=this._register(new d(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,i){this.slider=Object(r.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof n&&this.slider.setWidth(n),"number"==typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderMousePosition(e);n<=r&&r<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{const r=i.C(this.domNode.domNode);t=e.posx-r.left,n=e.posy-r.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const n=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.b,e=>{const t=this._sliderOrthogonalMousePosition(e),o=Math.abs(t-i);if(f.i&&o>g)return void this._setDesiredScrollPositionNow(r.getScrollPosition());const s=this._sliderMousePosition(e)-n;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(s))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}}const m=20;class _{constructor(e,t,n,i,r,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=r,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new _(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,n,i,r){const o=Math.max(0,n-e),s=Math.max(0,o-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(m,Math.floor(n*s/i))),c=(s-l)/(i-n),d=r*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=_._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}var b=n(16);const v=Object(b.e)("scrollbar-button-left",b.a.triangleLeft),y=Object(b.e)("scrollbar-button-right",b.a.triangleRight);class w extends p{constructor(e,t,n){const i=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new _(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,i.width,i.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e}),t.horizontalHasArrows){let e=(t.arrowSize-c)/2,n=(t.horizontalScrollbarSize-c)/2;this._createArrow({className:"scra",icon:v,top:n,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new o.b(null,1,0))}),this._createArrow({className:"scra",icon:y,top:n,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new o.b(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}const C=Object(b.e)("scrollbar-button-up",b.a.triangleUp),S=Object(b.e)("scrollbar-button-down",b.a.triangleDown);class k extends p{constructor(e,t,n){const i=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new _(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,i.height,i.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e}),t.verticalHasArrows){let e=(t.arrowSize-c)/2,n=(t.verticalScrollbarSize-c)/2;this._createArrow({className:"scra",icon:C,top:e,left:n,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new o.b(null,0,1))}),this._createArrow({className:"scra",icon:S,top:void 0,left:n,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new o.b(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}var x=n(6),L=n(201),M=n(30);n.d(t,"b",(function(){return A})),n.d(t,"c",(function(){return R})),n.d(t,"a",(function(){return P}));const D=500,E=50,T=!0;class O{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}}class N{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,n=1,i=this._rear;for(;;){const r=i===this._front?e:Math.pow(2,-n);if(e-=r,t+=this._memory[i].score*r,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5}accept(e,t,n){const i=new O(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}N.INSTANCE=new N;class I extends a.a{constructor(e,t,n){super(),this._onScroll=this._register(new x.a),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new x.a),e.style.overflow="hidden",this._options=function(e){let t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,f.f&&(t.className+=" mac");return t}(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let i={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new k(this._scrollable,this._options,i)),this._horizontalScrollbar=this._register(new w(this._scrollable,this._options,i)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Object(r.b)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Object(r.b)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Object(r.b)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onnonbubblingmouseout(this._listenOnDomNode,e=>this._onMouseOut(e)),this._hideTimeout=this._register(new l.e),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Object(u.f)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,f.f&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Object(u.f)(this._mouseWheelToDispose),e)){let e=e=>{this._onMouseWheel(new o.b(e))};this._mouseWheelToDispose.push(i.i(this._listenOnDomNode,i.c.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=N.INSTANCE;if(T){const n=window.devicePixelRatio/Object(M.c)();f.i||f.d?t.accept(Date.now(),e.deltaX/n,e.deltaY/n):t.accept(Date.now(),e.deltaX,e.deltaY)}if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(i)?i=0:n=0),this._options.flipAxes&&([n,i]=[i,n]);const r=!f.f&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||i||(i=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const o=this._scrollable.getFutureScrollPosition();let s={};if(n){const e=o.scrollTop-E*n;this._verticalScrollbar.writeScrollPosition(s,e)}if(i){const e=o.scrollLeft-E*i;this._horizontalScrollbar.writeScrollPosition(s,e)}if(s=this._scrollable.validateScrollPosition(s),o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop){T&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition();let t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),D)}}class A extends I{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const n=new L.a(0,e=>i.Y(e));super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class R extends I{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class P extends A{constructor(e,t){super(e,t),this._element=e,this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return k}));var i=n(14),r=n(26),o=n(15),s=n(2),a=n(24),l=n(76),c=n(4),d=n(3),u=n(22),h=n(11),f=n(54),g=n(57),p=n(70),m=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const _="editor.action.codeAction",b="editor.action.refactor",v="editor.action.sourceAction",y="editor.action.organizeImports",w="editor.action.fixAll";class C extends s.a{constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=Object(i.p)([...e],C.codeActionsComparator),this.validActions=this.allActions.filter(e=>!e.disabled)}static codeActionsComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:Object(i.o)(e.diagnostics)?Object(i.o)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:Object(i.o)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(e=>!!e.kind&&g.b.QuickFix.contains(new g.b(e.kind))&&!!e.isPreferred)}}const S={actions:[],documentation:void 0};function k(e,t,n,r,a){var c;const d=n.filter||{},u={only:null===(c=d.include)||void 0===c?void 0:c.value,trigger:n.type},f=new l.d(e,a),p=function(e,t){return h.a.all(e).filter(e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some(e=>Object(g.d)(t,new g.b(e))))}(e,d),_=new s.b,b=p.map(n=>m(this,void 0,void 0,(function*(){try{r.report(n);const i=yield n.provideCodeActions(e,t,u,f.token);if(i&&_.add(i),f.token.isCancellationRequested)return S;const o=((null==i?void 0:i.actions)||[]).filter(e=>e&&Object(g.c)(d,e));return{actions:o,documentation:function(e,t,n){if(!e.documentation)return;const i=e.documentation.map(e=>({kind:new g.b(e.kind),command:e.command}));if(n){let e;for(const t of i)t.kind.contains(n)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of i)if(t.kind.contains(new g.b(e.kind)))return t.command;return}(n,o,d.include)}}catch(e){if(Object(o.d)(e))throw e;return Object(o.f)(e),S}}))),v=h.a.onDidChange(()=>{const t=h.a.all(e);Object(i.g)(t,p)||f.cancel()});return Promise.all(b).then(e=>{const t=Object(i.l)(e.map(e=>e.actions)),n=Object(i.d)(e.map(e=>e.documentation));return new C(t,n,_)}).finally(()=>{v.dispose(),f.dispose()})}Object(c.o)("_executeCodeActionProvider",(function(e,t){return m(this,void 0,void 0,(function*(){const{resource:n,rangeOrSelection:i,kind:s}=t;if(!(n instanceof a.a))throw Object(o.b)();const l=e.get(f.a).getModel(n);if(!l)throw Object(o.b)();const c=u.a.isISelection(i)?u.a.liftSelection(i):d.a.isIRange(i)?l.validateRange(i):void 0;if(!c)throw Object(o.b)();const h=yield k(l,c,{type:2,filter:{includeSourceActions:!0,include:s&&s.value?new g.b(s.value):void 0}},p.b.None,r.a.None);return setTimeout(()=>h.dispose(),100),h.validActions}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return g})),n.d(t,"b",(function(){return p}));var i=n(8),r=n(105),o=n(10),s=n(3),a=n(48);const l=999;class c{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,n=e.length;t=n)break;const i=e.charCodeAt(t);if(110===i||114===i||87===i||119===i)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=i.q(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new d(t,this.wordSeparators?Object(r.a)(this.wordSeparators):null,n?this.searchString:null)}}class d{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}function u(e,t,n){if(!n)return new a.b(e,null);let i=[];for(let e=0,n=t.length;e>0);t[r]>=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class f{static findMatches(e,t,n,i,r){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,n,new p(o.wordSeparators,o.regex),i,r):this._doFindMatchesLineByLine(e,n,o,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,o){let a,l,c=0;if(a=i?t+r+(c=i.findLineFeedCountBeforeOffset(r)):t+r,i){let e=i.findLineFeedCountBeforeOffset(r+o.length)-c;l=a+o.length+e}else l=a+o.length;const d=e.getPositionAt(a),u=e.getPositionAt(l);return new s.a(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,n,i,r){const o=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(s):null,l=[];let c,d=0;for(n.reset(0);c=n.next(s);)if(l[d++]=u(this._getMultilineMatchRange(e,o,s,a,c.index,c[0]),c,i),d>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const o=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,o,i,r),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,o,i,r);for(let a=t.startLineNumber+1;a=c))return r;return r}const h=new p(e.wordSeparators,e.regex);let f;h.reset(0);do{if((f=h.next(t))&&(o[r++]=u(new s.a(n,f.index+1+i,n,f.index+1+f[0].length+i),f,l),r>=c))return r}while(f);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const o=new p(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,o,i):this._doFindNextMatchLineByLine(e,n,o,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new o.a(t.lineNumber,1),a=e.getOffsetAt(r),l=e.getLineCount(),c=e.getValueInRange(new s.a(r.lineNumber,r.column,l,e.getLineMaxColumn(l)),1),d="\r\n"===e.getEOL()?new h(c):null;n.reset(t.column-1);let f=n.next(c);return f?u(this._getMultilineMatchRange(e,a,c,d,f.index,f[0]),f,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.a(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o),a=this._findFirstMatchInLine(n,s,o,t.column,i);if(a)return a;for(let t=1;t<=r;t++){const s=(o+t-1)%r,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(n,a,s+1,1,i);if(l)return l}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const o=e.next(t);return o?u(new s.a(n,o.index+1,n,o.index+1+o[0].length),o,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const o=new p(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,o,i):this._doFindPreviousMatchLineByLine(e,n,o,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new s.a(1,1,t.lineNumber,t.column),n,i,10*l);if(r.length>0)return r[r.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.a(a,e.getLineMaxColumn(a)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,o,i);if(a)return a;for(let t=1;t<=r;t++){const s=(r+o-t-1)%r,a=e.getLineContent(s+1),l=this._findLastMatchInLine(n,a,s+1,i);if(l)return l}return null}static _findLastMatchInLine(e,t,n,i){let r,o=null;for(e.reset(0);r=e.next(t);)o=u(new s.a(n,r.index+1,n,r.index+1+r[0].length),r,i);return o}}function g(e,t,n,i,r){return function(e,t,n,i,r){if(0===i)return!0;const o=t.charCodeAt(i-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){const n=t.charCodeAt(i);if(0!==e.get(n))return!0}return!1}(e,t,0,i,r)&&function(e,t,n,i,r){if(i+r===n)return!0;const o=t.charCodeAt(i+r);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){const n=t.charCodeAt(i+r-1);if(0!==e.get(n))return!0}return!1}(e,t,n,i,r)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(!(n=this._searchRegex.exec(e)))return null;const r=n.index,o=n[0].length;if(r===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){i.A(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=o,!this._wordSeparators||g(this._wordSeparators,e,t,r,o))return n}while(n);return null}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(17),r=n(139);n.d(t,"b",(function(){return r.a}));const o=Object(i.c)("quickInputService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("modeService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(11);class r{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}equals(e){return e instanceof r&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let t=i;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)];return i.B.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return i.B.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return i.B.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return i.B.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[1+(e<<1)];return i.B.getInlineStyleFromMetadata(n,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return r.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new o(this,e,t,n)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;nt&&(i=r)}return n}}class o{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,i=e.getCount();t=n)break;this._tokensCount++}}equals(e){return e instanceof o&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(145);function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===i.a.ICodeEditor}function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===i.a.IDiffEditor}function s(e){return r(e)?e:o(e)?e.getModifiedEditor():null}},function(e,t,n){"use strict";n(347);var i=n(2),r=n(20),o=n(14),s=n(89),a=n(1),l=n(12),c=n(50),d=n(56),u=n(6),h=n(34);class f extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var g=n(175),p=n(13),m=n(37);class _{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(i=>i.splice(e,t,n))}}var b=n(106),v=n(61),y=n(55);n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return D})),n.d(t,"a",(function(){return T})),n.d(t,"h",(function(){return I})),n.d(t,"g",(function(){return A})),n.d(t,"d",(function(){return P})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return U}));var w,C=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};class S{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,n){const i=Object(o.j)(this.renderedElements,e=>e.templateData===n);if(i>=0){const e=this.renderedElements[i];this.trait.unrender(n),e.index=t}else{const e={index:t,templateData:n};this.renderedElements.push(e)}this.trait.renderIndex(t,n)}splice(e,t,n){const i=[];for(const r of this.renderedElements)r.index=e+t&&i.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=i}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=Object(o.j)(this.renderedElements,t=>t.templateData===e);t<0||this.renderedElements.splice(t,1)}}class k{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new u.a,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new S(this)}splice(e,t,n){const i=n.length-t,r=e+t,o=[...this.sortedIndexes.filter(t=>tt?n+e:-1).filter(e=>-1!==e),...this.sortedIndexes.filter(e=>e>=r).map(e=>e+i)];this.renderer.splice(e,t,n.length),this._set(o,o)}renderIndex(e,t){a.ab(t,this._trait,this.contains(e))}unrender(e){a.Q(e,this._trait)}set(e,t){return this._set(e,[...e].sort(H),t)}_set(e,t,n){const i=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=W(r,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:n}),i}get(){return this.indexes}contains(e){return Object(o.c)(this.sortedIndexes,e,H)>=0}dispose(){Object(i.f)(this._onChange)}}C([s.a],k.prototype,"renderer",null);class x extends k{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class L{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,n.map(()=>!1));const i=this.trait.get().map(e=>this.identityProvider.getId(this.view.element(e)).toString()),r=n.map(e=>i.indexOf(this.identityProvider.getId(e).toString())>-1);this.trait.splice(e,t,r)}}function M(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function D(e){return!!a.I(e,"monaco-editor")||!a.I(e,"monaco-list")&&(!!e.parentElement&&D(e.parentElement))}class E{constructor(e,t,n){this.list=e,this.view=t,this.disposables=new i.b;const r=!1!==n.multipleSelectionSupport,o=u.b.chain(Object(h.a)(t.domNode,"keydown")).filter(e=>!M(e.target)).map(e=>new d.a(e));o.filter(e=>3===e.keyCode).on(this.onEnter,this,this.disposables),o.filter(e=>16===e.keyCode).on(this.onUpArrow,this,this.disposables),o.filter(e=>18===e.keyCode).on(this.onDownArrow,this,this.disposables),o.filter(e=>11===e.keyCode).on(this.onPageUpArrow,this,this.disposables),o.filter(e=>12===e.keyCode).on(this.onPageDownArrow,this,this.disposables),o.filter(e=>9===e.keyCode).on(this.onEscape,this,this.disposables),r&&o.filter(e=>(l.f?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(o.s)(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()}dispose(){this.disposables.dispose()}}!function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(w||(w={}));const T=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class O{constructor(e,t,n,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.delegate=r,this.enabled=!1,this.state=w.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.b,this.disposables=new i.b,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=u.b.chain(Object(h.a)(this.view.domNode,"keydown")).filter(e=>!M(e.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(e=>new d.a(e)).filter(e=>this.delegate.mightProducePrintableCharacter(e)).forEach(e=>{e.stopPropagation(),e.preventDefault()}).map(e=>e.browserEvent.key).event,t=u.b.debounce(e,()=>null,800);u.b.reduce(u.b.any(e,t),(e,t)=>null===t?null:(e||"")+t)(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const n=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));n&&Object(y.a)(n)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===w.Idle?1:0;this.state=w.Typing;for(let t=0;t!M(e.target)).map(e=>new d.a(e)).filter(e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const n=this.view.domElement(t[0]);if(!n)return;const i=n.querySelector("[tabIndex]");if(!(i&&i instanceof HTMLElement&&-1!==i.tabIndex))return;const r=window.getComputedStyle(i);"hidden"!==r.visibility&&"none"!==r.display&&(e.preventDefault(),e.stopPropagation(),i.focus())}dispose(){this.disposables.dispose()}}function I(e){return l.f?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function A(e){return e.browserEvent.shiftKey}const R={isSelectionSingleChangeEvent:I,isSelectionRangeChangeEvent:A};class P{constructor(e){this.list=e,this.disposables=new i.b,this._onPointer=new u.a,this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||R),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(c.b.addTarget(e.getHTMLElement()))),u.b.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):l.f?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){D(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(D(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(M(e.browserEvent.target)||D(e.browserEvent.target))return;let t=this.list.getFocus()[0];const n=this.list.getSelection();t=void 0===t?n[0]:t;const i=e.index;return void 0===i?(this.list.setFocus([],e.browserEvent),void this.list.setSelection([],e.browserEvent)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)?this.changeSelection(e,t):this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e,t):(this.list.setFocus([i],e.browserEvent),(r=e.browserEvent)instanceof MouseEvent&&2===r.button||this.list.setSelection([i],e.browserEvent),void this._onPointer.fire(e));var r}onDoubleClick(e){if(M(e.browserEvent.target)||D(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e,t){const n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){const i=Math.min(t,n),r=Math.max(t,n),s=Object(o.s)(i,r+1),a=this.list.getSelection(),l=function(e,t){const n=e.indexOf(t);if(-1===n)return[];const i=[];let r=n-1;for(;r>=0&&e[r]===t-(n-r);)i.push(e[r--]);i.reverse(),r=n;for(;r=e.length)n.push(t[r++]);else if(r>=t.length)n.push(e[i++]);else{if(e[i]===t[r]){i++,r++;continue}e[i]e!==n);this.list.setFocus([n]),t.length===i.length?this.list.setSelection([...i,n],e.browserEvent):this.list.setSelection(i,e.browserEvent)}}dispose(){this.disposables.dispose()}}class j{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&(e.listBackground.isOpaque()?n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):l.f||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&n.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&n.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&n.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&n.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&n.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&n.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`);const i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)}}const F={listFocusBackground:p.a.fromHex("#7FB0D0"),listActiveSelectionBackground:p.a.fromHex("#0E639C"),listActiveSelectionForeground:p.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:p.a.fromHex("#094771"),listFocusAndSelectionForeground:p.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:p.a.fromHex("#3F3F46"),listHoverBackground:p.a.fromHex("#2A2D2E"),listDropBackground:p.a.fromHex("#383B3D"),treeIndentGuidesStroke:p.a.fromHex("#a9a9a9")},B={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function W(e,t){const n=[];let i=0,r=0;for(;i=e.length)n.push(t[r++]);else if(r>=t.length)n.push(e[i++]);else{if(e[i]===t[r]){n.push(e[i]),i++,r++;continue}e[i]e-t;class Y{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,i){let r=0;for(const o of this.renderers)o.renderElement(e,t,n[r++],i)}disposeElement(e,t,n,i){let r=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,n[r],i),r+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class V{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof r?n.setAttribute("aria-level",`${r}`):n.removeAttribute("aria-level")}disposeTemplate(e){}}class z{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,n,i){this.dnd.drop(e,t,n,i)}}class U{constructor(e,t,n,r,o=B){var s;this.user=e,this._options=o,this.eventBufferer=new u.c,this._ariaLabel="",this.disposables=new i.b,this.didJustPressContextMenuKey=!1,this._onDidDispose=new u.a,this.onDidDispose=this._onDidDispose.event;const l=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new x("listbox"!==l),this.focus=new k("focused"),Object(m.g)(o,F,!1);const c=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(c.push(new V(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),r=r.map(e=>new Y(e.templateId,[...c,e]));const d=Object.assign(Object.assign({},o),{dnd:o.dnd&&new z(this,o.dnd)});if(this.view=new g.b(t,n,r,d),this.view.domNode.setAttribute("role",l),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=a.v(this.view.domNode);this.styleController=new j(e,this.view.domId)}if(this.spliceable=new _([new L(this.focus,this.view,o.identityProvider),new L(this.selection,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=u.b.map(Object(h.a)(this.view.domNode,"focus",!0),()=>null),this.onDidBlur=u.b.map(Object(h.a)(this.view.domNode,"blur",!0),()=>null),this.disposables.add(new N(this,this.view)),"boolean"!=typeof o.keyboardSupport||o.keyboardSupport){const e=new E(this,this.view,o);this.disposables.add(e)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||T;this.typeLabelController=new O(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),o.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return u.b.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return u.b.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){const e=u.b.chain(Object(h.a)(this.view.domNode,"keydown")).map(e=>new d.a(e)).filter(e=>this.didJustPressContextMenuKey=58===e.keyCode||e.shiftKey&&68===e.keyCode).filter(e=>(e.preventDefault(),e.stopPropagation(),!1)).event,t=u.b.chain(Object(h.a)(this.view.domNode,"keyup")).filter(()=>{const e=this.didJustPressContextMenuKey;return this.didJustPressContextMenuKey=!1,e}).filter(()=>this.getFocus().length>0&&!!this.view.domElement(this.getFocus()[0])).map(e=>{const t=this.getFocus()[0];return{index:t,element:this.view.element(t),anchor:this.view.domElement(t),browserEvent:e}}).event,n=u.b.chain(this.view.onContextMenu).filter(()=>!this.didJustPressContextMenuKey).map(({element:e,index:t,browserEvent:n})=>({element:e,index:t,anchor:{x:n.clientX+1,y:n.clientY},browserEvent:n})).event;return u.b.any(e,t,n)}get onKeyDown(){return Object(h.a)(this.view.domNode,"keydown")}createMouseController(e){return new P(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new f(this.user,`Invalid start index: ${e}`);if(t<0)throw new f(this.user,`Invalid delete count: ${t}`);0===t&&0===n.length||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus()}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new f(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new f(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,i){if(0===this.length)return;const r=this.focus.get(),o=this.findNextIndex(r.length>0?r[0]+e:0,t,i);o>-1&&this.setFocus([o],n)}focusPrevious(e=1,t=!1,n,i){if(0===this.length)return;const r=this.focus.get(),o=this.findPreviousIndex(r.length>0?r[0]-e:0,t,i);o>-1&&this.setFocus([o],n)}focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=0===n?0:n-1;const i=this.view.element(n),r=this.getFocusedElements()[0];if(r!==i){const i=this.findPreviousIndex(n,!1,t);i>-1&&r!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(n)),this.view.getScrollTop()!==i&&setTimeout(()=>this.focusNextPage(e,t),0)}}focusPreviousPage(e,t){let n;const i=this.view.getScrollTop();n=0===i?this.view.indexAt(i):this.view.indexAfter(i-1);const r=this.view.element(n),o=this.getFocusedElements()[0];if(o!==r){const i=this.findNextIndex(n,!1,t);i>-1&&o!==this.view.element(i)?this.setFocus([i],e):this.setFocus([n],e)}else{const n=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==n&&setTimeout(()=>this.focusPreviousPage(e,t),0)}}focusLast(e,t){if(0===this.length)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(0===this.length)return;const i=this.findNextIndex(e,!1,n);i>-1&&this.setFocus([i],t)}findNextIndex(e,t=!1,n){for(let i=0;i=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let i=0;ithis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new f(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),i=this.view.elementTop(e),o=this.view.elementHeight(e);if(Object(r.h)(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*Object(b.b)(t,0,1)+i)}else{const e=i+o,t=n+this.view.renderHeight;i=t||(i=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new f(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),n=this.view.elementTop(e),i=this.view.elementHeight(e);if(nt+this.view.renderHeight)return null;const r=i-this.view.renderHeight;return Math.abs((t-n)/r)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();a.ab(this.view.domNode,"element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let n;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();a.ab(this.view.domNode,"selection-none",0===e.length),a.ab(this.view.domNode,"selection-single",1===e.length),a.ab(this.view.domNode,"selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}C([s.a],U.prototype,"onDidChangeFocus",null),C([s.a],U.prototype,"onDidChangeSelection",null),C([s.a],U.prototype,"onContextMenu",null)},function(e,t,n){"use strict";function i(e,t){let n=e.getCount(),i=e.findTokenIndexAtOffset(t),o=e.getLanguageId(i),s=i;for(;s+10&&e.getLanguageId(a-1)===o;)a--;return new r(e,o,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));class r{constructor(e,t,n,i,r,o){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=r,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function o(e){return 0!=(7&e)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(176);const r=[];function o(e,t,n){r.push([e,new i.a(t,[],n)])}function s(){return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(344);var i=n(2),r=n(49),o=n(1),s=n(20),a=n(56),l=n(6),c=n(112);class d extends i.a{constructor(e,t={}){var n,i,s;let c,d;switch(super(),this._onDidBlur=this._register(new l.a),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.a),this.onDidCancel=this._onDidCancel.event,this._onDidRun=this._register(new l.a),this.onDidRun=this._onDidRun.event,this._onDidBeforeRun=this._register(new l.a),this.onDidBeforeRun=this._onDidBeforeRun.event,this.options=t,this._context=null!==(n=t.context)&&void 0!==n?n:null,this._orientation=null!==(i=this.options.orientation)&&void 0!==i?i:0,this._triggerKeys=null!==(s=this.options.triggerKeys)&&void 0!==s?s:{keys:[3,10],keyDown:!1},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new r.b,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._register(this._actionRunner.onDidBeforeRun(e=>this._onDidBeforeRun.fire(e))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&o.e(this.domNode,"animated"),this._orientation){case 0:c=15,d=17;break;case 1:c=17,d=15,this.domNode.className+=" reverse";break;case 2:c=16,d=18,this.domNode.className+=" vertical";break;case 3:c=18,d=16,this.domNode.className+=" vertical reverse"}this._register(o.i(this.domNode,o.c.KEY_DOWN,e=>{const t=new a.a(e);let n=!0;t.equals(c)?n=this.focusPrevious():t.equals(d)?n=this.focusNext():t.equals(9)?this._onDidCancel.fire():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown&&this.doTrigger(t):n=!1,n&&(t.preventDefault(),t.stopPropagation())})),this._register(o.i(this.domNode,o.c.KEY_UP,e=>{const t=new a.a(e);this.isTriggerKeyEvent(t)?(this._triggerKeys.keyDown||this.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(o.bb(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{o.x()!==this.domNode&&o.L(o.x(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const n=Array.isArray(e)?e:[e];let i=s.h(t.index)?t.index:null;n.forEach(e=>{const n=document.createElement("li");let r;n.className="action-item",n.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(o.i(n,o.c.CONTEXT_MENU,e=>{o.b.stop(e,!0)})),this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e)),r||(r=new c.a(this.context,e,t)),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(n),null===i||i<0||i>=this.actionsList.children.length?(this.actionsList.appendChild(n),this.viewItems.push(r)):(this.actionsList.insertBefore(n,this.actionsList.children[i]),this.viewItems.splice(i,0,r),i++)}),this.focusedItem&&this.focus(this.focusedItem)}clear(){Object(i.f)(this.viewItems),this.viewItems=[],o.s(this.actionsList)}focus(e){let t=!1,n=void 0;void 0===e?t=!0:"number"==typeof e?n=e:"boolean"==typeof e&&(t=e),t&&void 0===this.focusedItem?(this.focusedItem=-1,this.focusNext()):(void 0!==n&&(this.focusedItem=n),this.updateFocus())}focusNext(){void 0===this.focusedItem&&(this.focusedItem=this.viewItems.length-1);const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(),!0}focusPrevious(){void 0===this.focusedItem&&(this.focusedItem=0);const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let n=0;n(t.hasOwnProperty(n)||(t[n]=e(n)),t[n])}(e=>new r(e))},function(e,t,n){"use strict";function i(e,t,n){return Math.min(Math.max(e,t),n)}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));class r{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return g}));var i=n(8),r=n(125),o=n(3);class s{constructor(e,t,n,i,r,o){this.languageIdentifier=e,this.index=t,this.open=n,this.close=i,this.forwardRegex=r,this.reversedRegex=o,this._openSet=s._toSet(this.open),this._closeSet=s._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const n of e)t.add(n);return t}}class a{constructor(e,t){const n=function(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const n=[];for(let e=0;e{const[n,i]=e,[r,o]=t;return n===r||n===o||i===r||i===o},r=(e,i)=>{const r=Math.min(e,i),o=Math.max(e,i);for(let e=0;e0&&o.push({open:r,close:s})}return o}(t);this.brackets=n.map((t,i)=>new s(e,i,t.open,t.close,function(e,t,n,i){let r=[];r=(r=r.concat(e)).concat(t);for(let e=0,t=r.length;e=0&&i.push(t);for(const t of o.close)t.indexOf(e)>=0&&i.push(t)}}function c(e,t){return e.length-t.length}function d(e){if(e.length<=1)return e;const t=[],n=new Set;for(const i of e)n.has(i)||(t.push(i),n.add(i));return t}function u(e){const t=/^[\w ]+$/.test(e);return e=i.v(e),t?`\\b${e}\\b`:e}function h(e){let t=`(${e.map(u).join(")|(")})`;return i.q(t,!0)}const f=function(){let e=null,t=null;return function(n){return e!==n&&(t=function(e){if(r.d){const t=new Uint16Array(e.length);let n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charCodeAt(i);return r.c().decode(t)}{let t=[],n=0;for(let i=e.length-1;i>=0;i--)t[n++]=e.charAt(i);return t.join("")}}(e=n)),t}}();class g{static _findPrevBracketInText(e,t,n,i){let r=n.match(e);if(!r)return null;let s=n.length-(r.index||0),a=r[0].length,l=i+s;return new o.a(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,n,i,r){const o=f(n).substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){let r=n.match(e);if(!r)return null;let s=r.index||0,a=r[0].length;if(0===a)return null;let l=i+s;return new o.a(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,n,i,r){const o=n.substring(i,r);return this.findNextBracketInText(e,t,o,i)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("telemetryService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("clipboardService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("textModelService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(121);class r{constructor(e){let t=Object(i.b)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let n=0;n<256;n++)t[n]=e;return t}set(e,t){let n=Object(i.b)(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class o{constructor(){this._actual=new r(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return f}));n(344);var i=n(12),r=n(0),o=n(2),s=n(49),a=n(1),l=n(20),c=n(50),d=n(115),u=n(30);class h extends o.a{constructor(e,t,n={}){super(),this.options=n,this._context=e||this,this._action=t,t instanceof s.a&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new s.b)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(c.b.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,u.h&&this._register(a.i(e,a.c.DRAG_START,e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(d.a.TEXT,this._action.label)}))),this._register(a.i(t,c.a.Tap,e=>this.onClick(e))),this._register(a.i(t,a.c.MOUSE_DOWN,e=>{n||a.b.stop(e,!0),this._action.enabled&&0===e.button&&a.e(t,"active")})),i.f&&this._register(a.i(t,a.c.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register(a.i(t,a.c.CLICK,e=>{a.b.stop(e,!0),this.options&&this.options.isMenu||i.j(()=>this.onClick(e))})),this._register(a.i(t,a.c.DBLCLICK,e=>{a.b.stop(e,!0)})),[a.c.MOUSE_UP,a.c.MOUSE_OUT].forEach(e=>{this._register(a.i(t,e,e=>{a.b.stop(e),a.Q(t,"active")}))})}onClick(e){var t;a.b.stop(e,!0);const n=l.l(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.focus(),a.e(this.element,"focused"))}blur(){this.element&&(this.element.blur(),a.Q(this.element,"focused"))}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(a.S(this.element),this.element=void 0),super.dispose()}}class f extends h{constructor(e,t,n={}){super(e,t,n),this.options=n,this.options.icon=void 0!==n.icon&&n.icon,this.options.label=void 0===n.label||n.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=a.p(this.element,a.a("a.action-label"))),this.label&&(this._action.id===s.c.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(a.p(this.element,a.a("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){super.focus(),this.label&&this.label.focus()}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=r.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&a.R(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(a.e(this.label,"codicon"),this.cssClass&&a.f(this.label,this.cssClass)),this.updateEnabled()):this.label&&a.Q(this.label,"codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),a.Q(this.label,"disabled"),this.label.tabIndex=0),this.element&&a.Q(this.element,"disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),a.e(this.label,"disabled"),a.T(this.label)),this.element&&a.e(this.element,"disabled"))}updateChecked(){this.label&&(this.getAction().checked?a.e(this.label,"checked"):a.Q(this.label,"checked"))}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return b}));var i=n(14),r=n(99),o=n(10),s=n(3),a=n(11);function l(e){let t=0,n=0,i=0,r=0;for(let o=0,s=e.length;o>>0}const d=new Uint32Array(0).buffer;class u{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const n=this.tokens[this.tokens.length-1];if(n.startLineNumber+n.tokens.length-1+1===e)return void n.tokens.push(t)}this.tokens.push(new p(e,[t]))}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let n=0;ne)){let r=i;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let o=i;for(;oe||d===e&&h>=t)&&(de||u===e&&f>=t){if(ur?g-=r-n:g=n;else if(h===t&&f===n){if(!(h===i&&g>r)){c=!0;continue}g-=r-n}else if(hr)){c=!0;continue}g=h===t?(f=n)+(g-r):(f=0)+(g-r)}else if(h>i){if(0===a&&!c){l=s;break}h-=a}else{if(!(h===i&&f>=r))throw new Error("Not possible!");e&&0===h&&(f+=e,g+=e),h-=a,f-=r-n,g-=r-n}const m=4*l;o[m]=h,o[m+1]=f,o[m+2]=g,o[m+3]=p,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,o){const s=0===n&&1===i&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let o=0;o0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new o.a(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;if(n<0){const e=n-t;return void(this.startLineNumber-=e)}const i=this.tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const i=-t;this.startLineNumber-=i,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(0===t&&0===n)return;const o=e.lineNumber-this.startLineNumber;o<0?this.startLineNumber+=t:o>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(o,e.column-1,t,n,i,r)}}class p{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function m(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const i=t[0].getRange(),r=t[t.length-1].getRange();if(!i||!r)return e;n=e.plusRange(i).plusRange(r)}let r=null;for(let e=0,t=this._pieces.length;en.endLineNumber){r=r||{index:e};break}if(i.removeTokens(n),i.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(i.endLineNumbern.endLineNumber){r=r||{index:e};continue}const[o,s]=i.split(n);o.isEmpty()?r=r||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,o,s),e++,t++,r=r||{index:e})}return r=r||{index:this._pieces.length},t.length>0&&(this._pieces=i.a(this._pieces,r.index,t)),n}isComplete(){return this._isComplete}addSemanticTokens(e,t){const n=this._pieces;if(0===n.length)return t;const i=n[_._findFirstPieceWithLine(n,e)].getLineTokens(e);if(!i)return t;const o=t.getCount(),s=i.getCount();let a=0,l=[],c=0,d=0;const u=(e,t)=>{e!==d&&(d=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;at)){for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}i=r-1}}return n}acceptEdit(e,t,n,i,r){for(const o of this._pieces)o.acceptEdit(e,t,n,i,r)}}class b{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,n){let i=null;if(t1&&(t=a.B.getLanguageId(i[1])!==e),!t)return d}if(!i||0===i.length){const n=new Uint32Array(2);return n[0]=t,n[1]=c(e),n.buffer}return i[i.length-2]=t,0===i.byteOffset&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let n=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=b._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=b._deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len||(0!==t?(this._lineTokens[i]=b._deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=b._insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)):this._lineTokens[i]=b._insert(this._lineTokens[i],e.column-1,n))}static _deleteBeginning(e,t){return null===e||e===d?e:b._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===d)return e;const n=m(e),i=n[n.length-2];return b._delete(e,t,i)}static _delete(e,t,n){if(null===e||e===d||t===n)return e;const i=m(e),o=i.length>>>1;if(0===t&&i[i.length-2]===n)return d;const s=r.a.findIndexInTokensArray(i,t),a=s>0?i[s-1<<1]:0;if(nc&&(i[l++]=t,i[l++]=i[1+(e<<1)],c=t)}if(l===i.length)return e;let h=new Uint32Array(l);return h.set(i.subarray(0,l),0),h.buffer}static _append(e,t){if(t===d)return e;if(e===d)return t;if(null===e)return e;if(null===t)return null;const n=m(e),i=m(t),r=i.length>>>1;let o=new Uint32Array(n.length+i.length);o.set(n,0);let s=n.length;const a=n[n.length-2];for(let e=0;e>>1;let s=r.a.findIndexInTokensArray(i,t);if(s>0){i[s-1<<1]===t&&s--}for(let e=s;e1){let i;for(i=n-1;i>=1;i--){const e=t.getLineContent(i);if(r.J(e)>=0)break}if(i<1)return null;const s=t.getLineMaxColumn(i),l=f.a.getEnterAction(e.autoIndent,t,new a.a(i,s,i,s));l&&(o=l.indentation+l.appendText)}return i&&(i===h.a.Indent&&(o=g.shiftIndent(e,o)),i===h.a.Outdent&&(o=g.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,n,i){let r="",s=n.getStartPosition();if(e.insertSpaces){let n=d.a.visibleColumnFromColumn2(e,t,s),i=e.indentSize,o=i-n%i;for(let e=0;e=4){const s=f.a.getIndentForEnter(e.autoIndent,t,i,{unshiftIndent:t=>g.unshiftIndent(e,t),shiftIndent:t=>g.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let u=d.a.visibleColumnFromColumn2(e,t,i.getEndPosition());const h=i.endColumn;let f="\n";c!==e.normalizeIndentation(s.beforeEnter)&&(f=e.normalizeIndentation(s.beforeEnter)+l.substring(c.length,i.startColumn-1)+"\n",i=new a.a(i.startLineNumber,1,i.endLineNumber,i.endColumn));const g=t.getLineContent(i.endLineNumber),p=r.w(g);if(i=p>=0?i.setEndPosition(i.endLineNumber,Math.max(i.endColumn,p+1)):i.setEndPosition(i.endLineNumber,t.getLineMaxColumn(i.endLineNumber)),n)return new o.e(i,f+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return h<=p+1&&(e.insertSpaces||(u=Math.ceil(u/e.indentSize)),t=Math.min(u+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new o.d(i,f+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return g._typeCommand(i,"\n"+e.normalizeIndentation(c),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let e=0,i=n.length;eg.shiftIndent(e,t),unshiftIndent:t=>g.unshiftIndent(e,t)});if(null===o)return null;if(o!==e.normalizeIndentation(r)){const r=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return 0===r?g._typeCommand(new a.a(n.startLineNumber,0,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+i,!1):g._typeCommand(new a.a(n.startLineNumber,0,n.endLineNumber,n.endColumn),e.normalizeIndentation(o)+t.getLineContent(n.startLineNumber).substring(r-1,n.startColumn-1)+i,!1)}return null}static _isAutoClosingOvertype(e,t,n,i,r){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairsClose2.has(r))return!1;for(let o=0,s=n.length;o2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,n=i.length;t=0||n.indexOf(t)>=0}static _isBeforeClosingBrace(e,t,n){const i=e.autoClosingPairsClose2.get(n);if(!i)return!1;const r=g._autoClosingPairIsSymmetric(t);for(const e of i){const t=g._autoClosingPairIsSymmetric(e);if(r||!t)return!0}return!1}static _findAutoClosingPairOpen(e,t,n,i){const r=e.autoClosingPairsOpen2.get(i);if(!r)return null;let o=null;for(const e of r)if(null===o||e.open.length>o.open.length){let r=!0;for(const o of n){if(t.getValueInRange(new a.a(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+i!==e.open){r=!1;break}}r&&(o=e)}return o}static _isAutoClosingOpenCharType(e,t,n,r,o){const s=Object(d.g)(r),a=s?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===a)return null;const l=this._findAutoClosingPairOpen(e,t,n.map(e=>e.getPosition()),r);if(!l)return null;const c=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let r=0,d=n.length;rh.column-1){const t=p.charAt(h.column-1);if(!g._isBeforeClosingBrace(e,l,t)&&!c(t))return null}if(!t.isCheapToTokenize(h.lineNumber))return null;if(1===l.open.length&&s&&"always"!==a){const t=Object(u.a)(e.wordSeparators);if(o&&h.column>1&&0===t.get(p.charCodeAt(h.column-2)))return null;if(!o&&h.column>2&&0===t.get(p.charCodeAt(h.column-3)))return null}t.forceTokenization(h.lineNumber);const m=t.getLineTokens(h.lineNumber);let _=!1;try{_=f.a.shouldAutoClosePair(l,m,o?h.column:h.column-1)}catch(e){Object(i.e)(e)}if(!_)return null}return l}static _runAutoClosingOpenCharType(e,t,n,i,r,o,s){let a=[];for(let e=0,t=i.length;enew o.a(new a.a(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new d.e(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const u=this._isAutoClosingOpenCharType(t,n,r,c,!1);return u?this._runAutoClosingOpenCharType(e,t,n,r,c,!1,u):null}static typeWithInterceptors(e,t,n,i,r,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,o=r.length;t, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new s(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new s(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)}_finishDeduceEditorPosition(e,t,n){let i=0,r=-1;for(;-1!==(r=t.indexOf("\n",r+1));)i++;return[e,n*t.length,i]}static selectedText(e){return new s(e,0,e.length,null,null)}static deduceInput(e,t,n){if(!e)return{text:"",replaceCharCnt:0};let r=e.value,o=e.selectionStart,s=e.selectionEnd,a=t.value,l=t.selectionStart,c=t.selectionEnd;const d=r.substring(s),u=a.substring(c),h=i.e(d,u);a=a.substring(0,a.length-h);const f=(r=r.substring(0,r.length-h)).substring(0,o),g=a.substring(0,l),p=i.d(f,g);if(a=a.substring(p),r=r.substring(p),l-=p,o-=p,c-=p,s-=p,n&&l===c&&r.length>0){let e=null;if(l===a.length?i.S(a,r)&&(e=a.substring(r.length)):i.s(a,r)&&(e=a.substring(0,a.length-r.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||i.k(e)))return{text:e,replaceCharCnt:0}}if(l===c){if(r===a&&0===o&&s===r.length&&l===a.length&&-1===a.indexOf("\n")&&i.l(a))return{text:"",replaceCharCnt:0};return{text:a,replaceCharCnt:f.length-p}}return{text:a,replaceCharCnt:s-o}}}s.EMPTY=new s("",0,0,null,null);class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const n=e*t,i=n+1,r=n+t;return new o.a(i,1,r+1,1)}static fromEditorSelection(e,t,n,i,l){const c=a._getPageOfLine(n.startLineNumber,i),d=a._getRangeForPage(c,i),u=a._getPageOfLine(n.endLineNumber,i),h=a._getRangeForPage(u,i),f=d.intersectRanges(new o.a(1,1,n.startLineNumber,n.startColumn));let g=t.getValueInRange(f,1);const p=t.getLineCount(),m=t.getLineMaxColumn(p),_=h.intersectRanges(new o.a(n.endLineNumber,n.endColumn,p,m));let b,v=t.getValueInRange(_,1);if(c===u||c+1===u)b=t.getValueInRange(n,1);else{const e=d.intersectRanges(n),i=h.intersectRanges(n);b=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(i,1)}if(l){const e=500;g.length>e&&(g=g.substring(g.length-e,g.length)),v.length>e&&(v=v.substring(0,e)),b.length>2*e&&(b=b.substring(0,e)+String.fromCharCode(8230)+b.substring(b.length-e,b.length))}return new s(g+b+v,g.length,g.length+b.length,new r.a(n.startLineNumber,n.startColumn),new r.a(n.endLineNumber,n.endColumn))}}},function(e,t,n){"use strict";var i=n(74),r=n(141).Graph;function o(e,t,n,r){var o;do{o=i.uniqueId(r)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function s(e){return i.max(i.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new r).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),t},asNonCompoundGraph:function(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,i,r=e.x,o=e.y,s=t.x-r,a=t.y-o,l=e.width/2,c=e.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(a)*l>Math.abs(s)*c?(a<0&&(c=-c),n=c*s/a,i=c):(s<0&&(l=-l),n=l,i=l*a/s);return{x:r+n,y:o+i}},buildLayerMatrix:function(e){var t=i.map(i.range(s(e)+1),(function(){return[]}));return i.forEach(e.nodes(),(function(n){var r=e.node(n),o=r.rank;i.isUndefined(o)||(t[o][r.order]=n)})),t},normalizeRanks:function(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank})));i.forEach(e.nodes(),(function(n){var r=e.node(n);i.has(r,"rank")&&(r.rank-=t)}))},removeEmptyRanks:function(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];i.forEach(e.nodes(),(function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)}));var r=0,o=e.graph().nodeRankFactor;i.forEach(n,(function(t,n){i.isUndefined(t)&&n%o!=0?--r:r&&i.forEach(t,(function(t){e.node(t).rank+=r}))}))},addBorderNode:function(e,t,n,i){var r={width:0,height:0};arguments.length>=4&&(r.rank=n,r.order=i);return o(e,"border",r,t)},maxRank:s,partition:function(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){"use strict";var i=n(75),r=n(143).Graph;function o(e,t,n,r){var o;do{o=i.uniqueId(r)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function s(e){return i.max(i.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new r).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),t},asNonCompoundGraph:function(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,i,r=e.x,o=e.y,s=t.x-r,a=t.y-o,l=e.width/2,c=e.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(a)*l>Math.abs(s)*c?(a<0&&(c=-c),n=c*s/a,i=c):(s<0&&(l=-l),n=l,i=l*a/s);return{x:r+n,y:o+i}},buildLayerMatrix:function(e){var t=i.map(i.range(s(e)+1),(function(){return[]}));return i.forEach(e.nodes(),(function(n){var r=e.node(n),o=r.rank;i.isUndefined(o)||(t[o][r.order]=n)})),t},normalizeRanks:function(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank})));i.forEach(e.nodes(),(function(n){var r=e.node(n);i.has(r,"rank")&&(r.rank-=t)}))},removeEmptyRanks:function(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];i.forEach(e.nodes(),(function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)}));var r=0,o=e.graph().nodeRankFactor;i.forEach(n,(function(t,n){i.isUndefined(t)&&n%o!=0?--r:r&&i.forEach(t,(function(t){e.node(t).rank+=r}))}))},addBorderNode:function(e,t,n,i){var r={width:0,height:0};arguments.length>=4&&(r.rank=n,r.order=i);return o(e,"border",r,t)},maxRank:s,partition:function(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return b}));var i=n(0),r=n(6),o=n(46),s=n(20),a=n(265);const l={Configuration:"base.contributions.configuration"},c={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p="vscode://schemas/settings/resourceLanguage",m=o.a.as(a.a.JSONContribution);const _=new RegExp("\\[.*\\]$");function b(e){return e.substring(1,e.length-1)}const v=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new r.a,this._onDidUpdateConfiguration=new r.a,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:i.a("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},m.registerSchema(p,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=[];e.forEach(e=>{n.push(...this.validateAndRegisterProperties(e,t)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),m.registerSchema(p,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,n=3){n=s.l(e.scope)?n:e.scope;let i=[],r=e.properties;if(r)for(let e in r){if(t&&y(e)){delete r[e];continue}const o=r[e];this.updatePropertyDefaultValue(e,o),_.test(e)?o.scope=void 0:o.scope=s.l(o.scope)?n:o.scope,!r[e].hasOwnProperty("included")||r[e].included?(this.configurationProperties[e]=r[e],!r[e].deprecationMessage&&r[e].markdownDeprecationMessage&&(r[e].deprecationMessage=r[e].markdownDeprecationMessage),i.push(e)):(this.excludedConfigurationProperties[e]=r[e],delete r[e])}let o=e.allOf;if(o)for(let e of o)i.push(...this.validateAndRegisterProperties(e,t,n));return i}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let n=e.properties;if(n)for(const e in n)this.updateSchema(e,n[e]);let i=e.allOf;i&&i.forEach(t)};t(e)}updateSchema(e,t){switch(c.properties[e]=t,t.scope){case 1:d.properties[e]=t;break;case 2:u.properties[e]=t;break;case 6:h.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:g.properties[e]=t;break;case 5:g.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:i.a("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:i.a("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:p};this.updatePropertyDefaultValue(t,n),c.properties[t]=n,d.properties[t]=n,u.properties[t]=n,h.properties[t]=n,f.properties[t]=n,g.properties[t]=n}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let n=this.defaultValues[e];s.k(n)&&(n=t.default),s.k(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n}};function y(e){return _.test(e)?i.a("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==v.getConfigurationProperties()[e]?i.a("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null}o.a.add(l.Configuration,v)},function(e,t,n){"use strict";function i(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var i=n(8),r=n(23),o=n(105),s=n(10),a=n(3);class l{static _createWord(e,t,n,i,r){return{start:i,end:r,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){let i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)}static _doFindPreviousWordOnLine(e,t,n){let i=0;for(let r=n.column-2;r>=0;r--){let n=e.charCodeAt(r),o=t.get(n);if(0===o){if(2===i)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=1}else if(2===o){if(1===i)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=2}else if(1===o&&0!==i)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null}static _findEndOfWord(e,t,n,i){let r=e.length;for(let o=i;o=0;r--){let i=e.charCodeAt(r),o=t.get(i);if(1===o)return r+1;if(1===n&&2===o)return r+1;if(2===n&&0===o)return r+1}return 0}static moveWordLeft(e,t,n,i){let r=n.lineNumber,o=n.column;1===o&&r>1&&(r-=1,o=t.getLineMaxColumn(r));let a=l._findPreviousWordOnLine(e,t,new s.a(r,o));if(0===i)return new s.a(r,a?a.start+1:1);if(1===i)return a&&2===a.wordType&&a.end-a.start==1&&0===a.nextCharClass&&(a=l._findPreviousWordOnLine(e,t,new s.a(r,a.start+1))),new s.a(r,a?a.start+1:1);if(3===i){for(;a&&2===a.wordType;)a=l._findPreviousWordOnLine(e,t,new s.a(r,a.start+1));return new s.a(r,a?a.start+1:1)}return a&&o<=a.end+1&&(a=l._findPreviousWordOnLine(e,t,new s.a(r,a.start+1))),new s.a(r,a?a.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,r=e.getLineMaxColumn(n);if(1===t.column)return n>1?new s.a(n-1,e.getLineMaxColumn(n-1)):t;const o=e.getLineContent(n);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),a=o.charCodeAt(e-1);if(95===t&&95!==a)return new s.a(n,e);if(i.H(t)&&i.I(a))return new s.a(n,e);if(i.I(t)&&i.I(a)&&e+1=c.start+1&&(c=l._findNextWordOnLine(e,t,new s.a(r,c.end+1))),o=c?c.start+1:t.getLineMaxColumn(r);return new s.a(r,o)}static _moveWordPartRight(e,t){const n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===r)return n1?d=1:(c--,d=t.getLineMaxColumn(c)):(u&&d<=u.end+1&&(u=l._findPreviousWordOnLine(e,t,new s.a(c,u.start+1))),u?d=u.end+1:d>1?d=1:(c--,d=t.getLineMaxColumn(c))),new a.a(c,d,o.lineNumber,o.column)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=l._moveWordPartLeft(e,n);return new a.a(n.lineNumber,n.column,i.lineNumber,i.column)}static _findFirstNonWhitespaceChar(e,t){let n=e.length;for(let i=t;i=f.start+1&&(f=l._findNextWordOnLine(e,t,new s.a(c,f.end+1))),f?d=f.start+1:dBoolean(e))}},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return g}));class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,n=0,r=this.value.charCodeAt(t);if("number"==typeof(e=i._table[r]))return this.pos+=1,{type:e,pos:t,len:1};if(i.isDigitCharacter(r)){e=8;do{n+=1,r=this.value.charCodeAt(t+n)}while(i.isDigitCharacter(r));return this.pos+=n,{type:e,pos:t,len:n}}if(i.isVariableCharacter(r)){e=9;do{r=this.value.charCodeAt(t+ ++n)}while(i.isVariableCharacter(r)||i.isDigitCharacter(r));return this.pos+=n,{type:e,pos:t,len:n}}e=10;do{n+=1,r=this.value.charCodeAt(t+n)}while(!isNaN(r)&&void 0===i._table[r]&&!i.isDigitCharacter(r)&&!i.isVariableCharacter(r));return this.pos+=n,{type:e,pos:t,len:n}}}i._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class r{constructor(){this._children=[]}appendChild(e){return e instanceof o&&this._children[this._children.length-1]instanceof o?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,i=n.children.indexOf(e),r=n.children.slice(0);r.splice(i,1,...t),n._children=r,function e(t,n){for(const i of t)i.parent=n,e(i.children,i)}(t,n)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof f)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class o extends r{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new o(this.value)}}class s extends r{}class a extends s{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){let e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}class l extends r{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof o&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends r{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,i=e.replace(this.regexp,(function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!n&&this._children.some(e=>e instanceof d&&Boolean(e.elseValue))&&(i=this._replace([])),i}_replace(e){let t="";for(const n of this._children)if(n instanceof d){let i=e[n.index]||"";t+=i=n.resolve(i)}else t+=n.toString();return t}toString(){return""}clone(){let e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(e=>e.clone()),e}}class d extends r{constructor(e,t,n,i){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=i}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z]+/gi);return t?t.map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(""):e}clone(){return new d(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class u extends s{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new o(t)],!0)}clone(){const e=new u(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}function h(e,t){const n=[...e];for(;n.length>0;){const e=n.shift();if(!t(e))break;n.unshift(...e.children)}}class f extends r{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(n){return n instanceof a&&(t.push(n),e=!e||e.indexi===e?(n=!0,!1):(t+=i.len(),!0)),n?t:-1}fullLen(e){let t=0;return h([e],e=>(t+=e.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof a&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof u&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new f;return this._children=this.children.map(e=>e.clone()),e}walk(e){h(this.children,e)}}class g{constructor(){this._scanner=new i,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){this._scanner.text(e),this._token=this._scanner.next();const i=new f;for(;this._parse(i););const r=new Map,o=[];let s=0;i.walk(e=>(e instanceof a&&(s+=1,e.isFinalTabstop?r.set(0,void 0):!r.has(e.index)&&e.children.length>0?r.set(e.index,e.children):o.push(e)),!0));for(const e of o){const t=r.get(e.index);if(t){const n=new a(e.index);n.transform=e.transform;for(const e of t)n.appendChild(e.clone());i.replace(e,[n])}}return n||(n=s>0&&t),!r.has(0)&&n&&i.appendChild(new a(0)),i}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new o(t)),!0)}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new u(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const i=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new o("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(t),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}}}_parseChoiceElement(e){const t=this._token,n=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(!(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(e)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new o(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const i=new u(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new o("${"+t+":")),i.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new c,n="",i="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))n+=e=this._accept(6,!0)||e;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new o(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new d(Number(i))),!0;if(this._accept(4))return e.appendChild(new d(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return n&&this._accept(4)?(e.appendChild(new d(Number(i),n)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new d(Number(i),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new d(Number(i),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let n=this._until(4);if(n)return e.appendChild(new d(Number(i),void 0,t,n)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new d(Number(i),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new o(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n(8),r=n(23),o=n(3),s=n(22),a=n(32);const l=Object.create(null);function c(e,t){l[e]||(l[e]=["",e]);const n=l[e];for(let i=n.length;i<=t;i++)n[i]=n[i-1]+e;return n[t]}class d{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,n,i,o){const s=r.a.visibleColumnFromColumn(e,t,n);if(o){const e=c(" ",i);return c(e,r.a.prevIndentTabStop(s,i)/i)}return c("\t",r.a.prevRenderTabStop(s,n)/n)}static shiftIndent(e,t,n,i,o){const s=r.a.visibleColumnFromColumn(e,t,n);if(o){const e=c(" ",i);return c(e,r.a.nextIndentTabStop(s,i)/i)}return c("\t",r.a.nextRenderTabStop(s,n)/n)}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){const n=this._selection.startLineNumber;let s=this._selection.endLineNumber;1===this._selection.endColumn&&n!==s&&(s-=1);const{tabSize:l,indentSize:u,insertSpaces:h}=this._opts,f=n===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,g=0;for(let p=n;p<=s;p++,c=g){g=0;let s,m=e.getLineContent(p),_=i.w(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(f||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),p>1){if(r.a.visibleColumnFromColumn(m,_+1,l)%u!=0&&e.isCheapToTokenize(p-1)){let t=a.a.getEnterAction(this._opts.autoIndent,e,new o.a(p-1,e.getLineMaxColumn(p-1),p-1,e.getLineMaxColumn(p-1)));if(t){if(g=c,t.appendText)for(let e=0,n=t.appendText.length;enew u(e),d=function(e,t,n){const i=new Uint16Array(e.buffer,t,n);return a().decode(i)}):(c=e=>new h,d=function(e,t,n){let i=[],r=0;for(let s=0;s=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let n=0;nt.prefix.length-e.prefix.length),Object(s.h)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Object(o.d)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0||this.defaultProvider}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(6);const r=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new i.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},function(e,t,n){"use strict";var i=n(1),r=(n(347),n(2)),o=n(14),s=n(101),a=n(6),l=n(26);class c{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:r.a.None}}renderElement(e,t,n,i){if(n.disposable&&n.disposable.dispose(),!n.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,n.data,i);const o=new l.b,s=r.resolve(e,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,n.data),s.then(t=>this.renderer.renderElement(t,e,n.data,i))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class d{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}var u=n(0),h=n(43),f=n(120),g=n(9),p=n(17),m=n(41),_=n(46),b=n(82),v=n(18);var y,w=n(38),C=(n(610),n(56));!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(y||(y={}));class S extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class k{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var x=n(115),L=n(175),M=n(34),D=n(61);function E(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function T(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function O(e){return"boolean"==typeof e.collapsible}class N{constructor(e,t,n,i={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new a.c,this._onDidChangeCollapseState=new a.a,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new a.a,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new a.a,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==i.collapseByDefault&&i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren=void 0!==i.autoExpandSingleChildren&&i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=w.a.empty(),i,r){if(0===e.length)throw new S(this.user,"Invalid tree location");const{parentNode:o,listIndex:s,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),c=[],d=w.a.map(n,e=>this.createTreeNode(e,o,o.visible?1:0,a,c,i)),u=e[e.length-1];let h=0;for(let e=u;e>=0&&ee+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,p-e),this.list.splice(s,e,c)}if(m.length>0&&r){const e=t=>{r(t),t.children.forEach(e)};m.forEach(e)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:m});let b=o;for(;b;){if(2===b.visibility){this.refilter();break}b=b.parent}}rerender(e){if(0===e.length)throw new S(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:i}=this.getTreeNodeWithListIndex(e);t.visible&&i&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:i}=this.getTreeNodeWithListIndex(e);return n&&i?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsible);const i={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,i))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsed);const r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){const{node:n,listIndex:i,revealed:r}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(n,i,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&o&&!O(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let i=-1;for(let e=0;e-1){i=-1;break}i=e}}i>-1&&this._setCollapseState([...e,i],t)}return o}_setListNodeCollapseState(e,t,n,i){const r=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!r)return r;const o=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),r}_setNodeCollapseState(e,t,n){let i;if(e===this.root?i=!1:(O(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!O(t)&&t.recursive)for(const n of e.children)i=this._setNodeCollapseState(n,t,!0)||i;return i}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,n,i,r,o){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,n);s.visibility=a,i&&r.push(s);const l=e.children||w.a.empty(),c=i&&0!==a&&!s.collapsed,d=w.a.map(l,e=>this.createTreeNode(e,s,a,c,r,o));let u=0,h=1;for(const e of d)s.children.push(e),h+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=u++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=u,s.visible=2===a?u>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=h):(s.renderNodeCount=0,i&&r.pop()),o&&o(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,i=!0){let r;if(e!==this.root){if(0===(r=this._filterNode(e,t)))return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}const o=n.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===r)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)s=this._updateNodeAfterFilterChange(o,r,n,i&&!e.collapsed)||s,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===r?s:1===r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-o):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof n?(e.filterData=void 0,n?1:0):E(n)?(e.filterData=n.data,T(n.visibility)):(e.filterData=void 0,T(n))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[n,...i]=e;return!(n<0||n>t.children.length)&&this.hasTreeNode(i,t.children[n])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[n,...i]=e;if(n<0||n>t.children.length)throw new S(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:i,visible:r}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new S(this.user,"Invalid tree location");const s=t.children[o];return{node:s,listIndex:n,revealed:i,visible:r&&s.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,i=!0,r=!0){const[o,...s]=e;if(o<0||o>t.children.length)throw new S(this.user,"Invalid tree location");for(let e=0;ee.element)),this.data=e}}function z(e){return e instanceof L.a?new V(e):e}class U{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=r.a.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(z(e),t)}onDragOver(e,t,n,i,r=!0){const s=this.dnd.onDragOver(z(e),t&&t.element,n,i),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(a&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=Object(I.g)(()=>{const e=this.modelProvider(),n=e.getNodeLocation(t);e.isCollapsed(n)&&e.setCollapsed(n,!1),this.autoExpandNode=void 0},500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback){if(!r){return{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[n]}}return s}if(1===s.bubble){const n=this.modelProvider(),r=n.getNodeLocation(t),o=n.getParentNodeLocation(r),s=n.getNode(o),a=o&&n.getListIndex(o);return this.onDragOver(e,s,a,i,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),u=l.getListRenderCount(c);return Object.assign(Object.assign({},s),{feedback:Object(o.s)(d,d+u)})}drop(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(z(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class ${constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var q;!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(q||(q={}));class K{constructor(e,t=[]){this._elements=t,this.onDidChange=a.b.forEach(e,e=>this._elements=e)}get elements(){return this._elements}}class G{constructor(e,t,n,i,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=i,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=G.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new P.a,this.activeIndentNodes=new Set,this.indentGuidesDisposable=r.a.None,this.disposables=new r.b,this.templateId=e.templateId,this.updateOptions(o),a.b.map(n,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=Object(R.b)(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==q.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new r.b;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=Object(i.p)(e,Object(i.a)(".monaco-tl-row")),n=Object(i.p)(t,Object(i.a)(".monaco-tl-indent")),o=Object(i.p)(t,Object(i.a)(".monaco-tl-twistie")),s=Object(i.p)(t,Object(i.a)(".monaco-tl-contents")),a=this.renderer.renderTemplate(s);return{container:e,indent:n,twistie:o,indentGuidesDisposable:r.a.None,templateData:a}}renderElement(e,t,n,i){"number"==typeof i&&(this.renderedNodes.set(e,{templateData:n,height:i}),this.renderedElements.set(e.element,e));const r=G.DefaultIndent+(e.depth-1)*this.indent;n.twistie.style.paddingLeft=`${r}px`,n.indent.style.width=`${r+this.indent-16}px`,this.renderTwistie(e,n),"number"==typeof i&&this.renderIndentGuides(e,n),this.renderer.renderElement(e,t,n.templateData,i)}disposeElement(e,t,n,i){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,i),"number"==typeof i&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e.element,t.twistie),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(Object(i.f)(t.twistie,F.classNames,"collapsible"),Object(i.ab)(t.twistie,"collapsed",e.collapsed)):Object(i.R)(t.twistie,F.classNames,"collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Object(i.s)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new r.b,o=this.modelProvider();let s=e;for(;;){const e=o.getNodeLocation(s),a=o.getParentNodeLocation(e);if(!a)break;const l=o.getNode(a),c=Object(i.a)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&Object(i.e)(c,"active"),0===t.indent.childElementCount?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),n.add(Object(r.h)(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach(e=>{const i=n.getNodeLocation(e);try{const r=n.getParentNodeLocation(i);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):r&&t.add(n.getNode(r))}catch(e){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>Object(i.Q)(e,"active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>Object(i.e)(e,"active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Object(r.f)(this.disposables)}}G.DefaultIndent=8;class Z{constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new r.b,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const n=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return n;let i;if(0===(i="boolean"==typeof n?n?1:0:E(n)?T(n.visibility):n))return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:D.a.Default,visibility:!0};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),i=n&&n.toString();if(void 0===i)return{data:D.a.Default,visibility:!0};const r=Object(D.d)(this._pattern,this._lowercasePattern,0,i,i.toLowerCase(),0,!0);return r?(this._matchCount++,{data:r,visibility:!0}):this.tree.options.filterOnType?2:{data:D.a.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Object(r.f)(this.disposables)}}class J{constructor(e,t,n,o,s){this.tree=e,this.view=n,this.filter=o,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new a.a,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new a.a,this.enabledDisposables=new r.b,this.disposables=new r.b,this.domNode=Object(i.a)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,Object(M.a)(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=Object(i.p)(n.getHTMLElement(),Object(i.a)(".monaco-list-type-filter-message")),this.labelDomNode=Object(i.p)(this.domNode,Object(i.a)("span.label"));const l=Object(i.p)(this.domNode,Object(i.a)(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=Object(i.p)(l,Object(i.a)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),Object(M.a)(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=Object(i.p)(l,Object(i.a)("button.clear"+H.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=Object(u.a)("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=a.b.chain(Object(M.a)(this.view.getHTMLElement(),"keydown")).filter(e=>!Object(s.e)(e.target)||e.target===this.filterOnTypeDomNode).filter(e=>"Dead"!==e.key&&!/^Media/.test(e.key)).map(e=>new C.a(e)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(A.f?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey).forEach(e=>{e.stopPropagation(),e.preventDefault()}).event,t=Object(M.a)(this.clearDomNode,"click");a.b.chain(a.b.any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(A.f?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,e=>!D.a.isDefault(e.filterData));const n=this.tree.getFocus();if(n.length>0){const e=n[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=Object(i.C)(e),n=e.clientWidth,o=n/2,s=this.domNode.clientWidth,a=new r.b;let l=this.positionClassName;const c=()=>{switch(l){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${n-s-6}px`}};c(),Object(i.Q)(this.domNode,l),Object(i.e)(this.domNode,"dragging"),a.add(Object(r.h)(()=>Object(i.Q)(this.domNode,"dragging"))),Object(M.a)(document,"dragover")(e=>{e.preventDefault();const n=e.screenX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),l=n{this.positionClassName=l,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",Object(r.f)(a)},null,a),x.c.CurrentDragAndDropData=new x.b("vscode-ui"),a.add(Object(r.h)(()=>x.c.CurrentDragAndDropData=void 0))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(Object(i.R)(this.filterOnTypeDomNode,W.classNames),Object(i.f)(this.filterOnTypeDomNode,B.classNames),this.filterOnTypeDomNode.title=Object(u.a)("disable filter on type","Disable Filter on Type")):(Object(i.R)(this.filterOnTypeDomNode,B.classNames),Object(i.f)(this.filterOnTypeDomNode,W.classNames),this.filterOnTypeDomNode.title=Object(u.a)("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=Object(u.a)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),Object(i.ab)(this.domNode,"no-matches",e),this.domNode.title=Object(u.a)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!D.a.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Object(r.f)(this.disposables)}}function X(e){let t=y.Unknown;return Object(i.J)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=y.Twistie:Object(i.J)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=y.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function Q(e,t){t(e),e.children.forEach(e=>Q(e,t))}class ee{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){Object(o.g)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),n=t=>e.delete(t);return t.forEach(e=>Q(e,n)),void this.set([...e.values()])}const n=new Set,i=e=>n.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>Q(e,i));const r=new Map,o=e=>r.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>Q(e,o));const s=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(n.has(t)){const e=r.get(t);e&&s.push(e)}else s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class te extends s.d{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(Object(s.e)(e.browserEvent.target)||Object(s.f)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,r=Object(i.I)(n,"monaco-tl-twistie")||Object(i.I)(n,"monaco-icon-label")&&Object(i.I)(n,"folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if((o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick)&&!r)return super.onViewPointer(e);if(this.tree.expandOnlyOnDoubleClick&&2!==e.browserEvent.detail&&!r)return super.onViewPointer(e);if(t.collapsible){const n=this.tree.model,i=n.getNodeLocation(t),s=e.browserEvent.altKey;if(n.setCollapsed(i,void 0,s),o&&r)return}super.onViewPointer(e)}onDoubleClick(e){Object(i.I)(e.browserEvent.target,"monaco-tl-twistie")||super.onDoubleClick(e)}}class ne extends s.c{constructor(e,t,n,i,r,o,s){super(e,t,n,i,s),this.focusTrait=r,this.selectionTrait=o}createMouseController(e){return new te(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),0===n.length)return;const i=[],r=[];n.forEach((t,n)=>{this.focusTrait.has(t)&&i.push(e+n),this.selectionTrait.has(t)&&r.push(e+n)}),i.length>0&&super.setFocus(Object(o.f)([...super.getFocus(),...i])),r.length>0&&super.setSelection(Object(o.f)([...super.getSelection(),...r]))}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(e=>this.element(e)),t)}}class ie{constructor(e,t,n,o,l={}){this._options=l,this.eventBufferer=new a.c,this.disposables=new r.b,this._onWillRefilter=new a.a,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new a.a;const c=new $(n),d=new a.e,u=new a.e,h=new K(u.event);this.renderers=o.map(e=>new G(e,()=>this.model,d.event,h,l));for(let e of this.renderers)this.disposables.add(e);let f;var g,p;l.keyboardNavigationLabelProvider&&(f=new Z(this,l.keyboardNavigationLabelProvider,l.filter),l=Object.assign(Object.assign({},l),{filter:f}),this.disposables.add(f)),this.focus=new ee(l.identityProvider),this.selection=new ee(l.identityProvider),this.view=new ne(e,t,c,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},(g=()=>this.model,(p=l)&&Object.assign(Object.assign({},p),{identityProvider:p.identityProvider&&{getId:e=>p.identityProvider.getId(e.element)},dnd:p.dnd&&new U(g,p.dnd),multipleSelectionController:p.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>p.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>p.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:p.accessibilityProvider&&Object.assign(Object.assign({},p.accessibilityProvider),{getSetSize(e){const t=g(),n=t.getNodeLocation(e),i=t.getParentNodeLocation(n);return t.getNode(i).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:p.accessibilityProvider&&p.accessibilityProvider.isChecked?e=>p.accessibilityProvider.isChecked(e.element):void 0,getRole:p.accessibilityProvider&&p.accessibilityProvider.getRole?e=>p.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>p.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>p.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:p.accessibilityProvider&&p.accessibilityProvider.getWidgetRole?()=>p.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e=>e.depth,getActiveDescendantId:p.accessibilityProvider.getActiveDescendantId&&(e=>p.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},p.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:p.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,l),d.input=this.model.onDidChangeCollapseState;const m=a.b.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})});if(m(()=>null,null,this.disposables),u.input=a.b.chain(a.b.any(m,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==l.keyboardSupport){const e=a.b.chain(this.view.onKeyDown).filter(e=>!Object(s.e)(e.target)).map(e=>new C.a(e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}if(l.keyboardNavigationLabelProvider){const e=l.keyboardNavigationDelegate||s.a;this.typeFilterController=new J(this,this.model,this.view,f,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=Object(i.v)(this.view.getHTMLElement()),Object(i.ab)(this.getHTMLElement(),"always",this._options.renderIndentGuides===q.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return a.b.map(this.view.onMouseDblClick,X)}get onPointer(){return a.b.map(this.view.onPointer,X)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnlyOnDoubleClick(){var e;return null!==(e=this._options.expandOnlyOnDoubleClick)&&void 0!==e&&e}get expandOnlyOnTwistieClick(){return void 0!==this._options.expandOnlyOnTwistieClick&&this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),Object(i.ab)(this.getHTMLElement(),"always",this._options.renderIndentGuides===q.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const n=e.map(e=>this.model.getNode(e));this.selection.set(n,t);const i=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(i,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map(e=>this.model.getNode(e));this.focus.set(n,t);const i=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(i,t,!0)}focusNext(e=1,t=!1,n,i=this.focusNavigationFilter){this.view.focusNext(e,t,n,i)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);-1!==n&&this.view.reveal(n,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!0)){const e=this.model.getParentNodeLocation(i);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!1)){if(!n.children.some(e=>e.visible))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const n=t[0],i=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,r)}dispose(){Object(r.f)(this.disposables),this.view.dispose()}}class re{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new N(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare:(e,t)=>n.sorter.compare(e.element,t.element)}),this.identityProvider=n.identityProvider}setChildren(e,t=w.a.empty(),n,i){const r=this.getElementLocation(e);this._setChildren(r,this.preserveCollapseState(t),n,i)}_setChildren(e,t=w.a.empty(),n,i){const r=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,e=>{if(null===e.element)return;const t=e;if(r.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.add(e),this.nodesByIdentity.set(e,t)}n&&n(t)},e=>{if(null===e.element)return;const t=e;if(r.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}i&&i(t)})}preserveCollapseState(e=w.a.empty()){return this.sorter&&(e=Object(o.p)([...e],this.sorter.compare.bind(this.sorter))),w.a.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const n=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(n)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const n="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,i=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:n,collapsed:i,children:this.preserveCollapseState(e.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new S(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new S(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new S(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n);return this.model.getNode(i).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new S(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function oe(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:w.a.map(w.a.from(e.children),oe),collapsible:e.collapsible,collapsed:e.collapsed}}function se(e){const t=[e.element],n=e.incompressible||!1;let i,r;for(;[r,i]=w.a.consume(w.a.from(e.children),2),1===r.length&&!(e=r[0]).incompressible;)t.push(e.element);return{element:{elements:t,incompressible:n},children:w.a.map(w.a.concat(r,i),se),collapsible:e.collapsible,collapsed:e.collapsed}}function ae(e){return function e(t,n=0){let i;return i=ne(t,0)),0===n&&t.element.incompressible?{element:t.element.elements[n],children:i,incompressible:!0,collapsible:t.collapsible,collapsed:t.collapsed}:{element:t.element.elements[n],children:i,collapsible:t.collapsible,collapsed:t.collapsed}}(e,0)}class le{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new re(e,t,n),this.enabled=void 0===n.compressionEnabled||n.compressionEnabled}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=w.a.empty()){if(null===e){const e=w.a.map(t,this.enabled?se:oe);return void this._setChildren(null,e)}const n=this.nodes.get(e);if(!n)throw new Error("Unknown compressed tree node");const i=this.model.getNode(n),r=this.model.getParentNodeLocation(n),o=this.model.getNode(r),s=function e(t,n,i){return t.element===n?Object.assign(Object.assign({},t),{children:i}):Object.assign(Object.assign({},t),{children:w.a.map(w.a.from(t.children),t=>e(t,n,i))})}(ae(i),e,t),a=(this.enabled?se:oe)(s),l=o.children.map(e=>e===i?a:e);this._setChildren(o.element,l)}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,n=w.a.map(t,ae),i=w.a.map(n,e?se:oe);this._setChildren(null,i)}_setChildren(e,t){const n=new Set;this.model.setChildren(e,t,e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return null===n?null:n.elements[n.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new S(this.user,`Tree element not found: ${e}`);return t}}const ce=e=>e[e.length-1];class de{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new de(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ue{constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||ce;const i=e=>this.elementMapper(e.elements);this.nodeMapper=new k(e=>new de(i,e)),this.model=new le(e,function(e,t){return{splice(n,i,r){t.splice(n,i,r.map(t=>e.map(t)))},updateElementHeight(e,n){t.updateElementHeight(e,n)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{sorter:t.sorter&&{compare:(e,n)=>t.sorter.compare(e.elements[0],n.elements[0])},identityProvider:t.identityProvider&&{getId:n=>t.identityProvider.getId(e(n))},filter:t.filter&&{filter:(n,i)=>t.filter.filter(e(n),i)}})}(i,n))}get onDidSplice(){return a.b.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return a.b.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return a.b.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=w.a.empty()){this.model.setChildren(e,t)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}class he extends ie{constructor(e,t,n,i,r={}){super(e,t,n,i,r)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=w.a.empty()){this.model.setChildren(e,t)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new re(e,t,n)}}class fe{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){const r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===r.element.elements.length?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,i))}disposeElement(e,t,n,i){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,i):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}(function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);o>3&&s&&Object.defineProperty(t,n,s)})([n(89).a],fe.prototype,"compressedTreeNodeProvider",null);class ge extends he{constructor(e,t,n,i,r={}){const o=()=>this;super(e,t,n,i.map(e=>new fe(o,e)),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let i;try{i=e().getCompressedTreeNode(n)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return 1===i.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}(o,r))}setChildren(e,t=w.a.empty()){this.model.setChildren(e,t)}createModel(e,t,n){return new ue(e,t,n)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var pe=n(15),me=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function _e(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function be(e,t){return!!t.parent&&(t.parent===e||be(e,t.parent))}class ve{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new ve(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ye{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?Object(i.f)(t,Y.classNames):Object(i.R)(t,Y.classNames),!1}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function we(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function Ce(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Se extends L.a{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function ke(e){return e instanceof L.a?new Se(e):e}class xe{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(ke(e),t)}onDragOver(e,t,n,i,r=!0){return this.dnd.onDragOver(ke(e),t&&t.element,n,i)}drop(e,t,n,i){this.dnd.drop(ke(e),t&&t.element,n,i)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Le(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new xe(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var n;return!!(null===(n=e.accessibilityProvider)||void 0===n?void 0:n.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,n)=>e.filter.filter(t.element,n)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function Me(e,t){t(e),e.children.forEach(e=>Me(e,t))}class De{constructor(e,t,n,i,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new a.a,this._onDidChangeNodeSlowState=new a.a,this.nodeMapper=new k(e=>new ve(e)),this.disposables=new r.b,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,n,i,s),this.root=_e({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return a.b.map(this.tree.onDidChangeFocus,we)}get onDidChangeSelection(){return a.b.map(this.tree.onDidChangeSelection,we)}get onMouseDblClick(){return a.b.map(this.tree.onMouseDblClick,Ce)}get onPointer(){return a.b.map(this.tree.onPointer,Ce)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,n,i,r){const o=new $(n),s=i.map(e=>new ye(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=Le(r)||{};return new he(e,t,o,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return me(this,void 0,void 0,(function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,n=!1,i){return me(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new S(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.b.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,i),n)try{this.tree.rerender(r)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}expand(e,t=!1){return me(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new S(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.b.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n))return!1;if(n.refreshPromise&&(yield this.root.refreshPromise,yield a.b.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n))return!1;const i=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield a.b.toPromise(this._onDidRender.event)),i}))}setSelection(e,t){const n=e.map(e=>this.getDataNode(e));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(e=>e.element)}setFocus(e,t){const n=e.map(e=>this.getDataNode(e));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new S(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,n){return me(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,n),this.render(e,n)}))}refreshNode(e,t,n){return me(this,void 0,void 0,(function*(){let i;return this.subTreeRefreshPromises.forEach((r,o)=>{!i&&function(e,t){return e===t||be(e,t)||be(t,e)}(o,e)&&(i=r.then(()=>this.refreshNode(e,t,n)))}),i||this.doRefreshSubTree(e,t,n)}))}doRefreshSubTree(e,t,n){return me(this,void 0,void 0,(function*(){let i;e.refreshPromise=new Promise(e=>i=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const r=yield this.doRefreshNode(e,t,n);e.stale=!1,yield Promise.all(r.map(e=>this.doRefreshSubTree(e,t,n)))}finally{i()}}))}doRefreshNode(e,t,n){return me(this,void 0,void 0,(function*(){let i;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=Object(I.l)(800);t.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),i=this.doGetChildren(e).finally(()=>t.cancel())}else i=Promise.resolve(w.a.empty());try{const r=yield i;return this.setChildren(e,r,t,n)}catch(t){if(e!==this.root&&this.tree.collapse(e===this.root?null:e),Object(pe.d)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=Object(I.f)(()=>me(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)}))),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(pe.e))}setChildren(e,t,n,i){const r=[...t];if(0===e.children.length&&0===r.length)return[];const o=new Map,s=new Map;for(const t of e.children)if(o.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}const a=[],l=r.map(t=>{const r=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const n=_e({element:t,parent:e,hasChildren:r});return r&&this.collapseByDefault&&!this.collapseByDefault(t)&&(n.collapsedByDefault=!1,a.push(n)),n}const l=this.identityProvider.getId(t).toString(),c=s.get(l);if(c){const e=c.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=r,n?c.collapsed?(e.children.forEach(e=>Me(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):r&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=_e({element:t,parent:e,id:l,hasChildren:r});return i&&i.viewState.focus&&i.viewState.focus.indexOf(l)>-1&&i.focus.push(d),i&&i.viewState.selection&&i.viewState.selection.indexOf(l)>-1&&i.selection.push(d),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(l)>-1?a.push(d):r&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d});for(const e of o.values())Me(e,e=>this.nodes.delete(e.element));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t){const n=e.children.map(e=>this.asTreeElement(e,t));this.tree.setChildren(e===this.root?null:e,n),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return n=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?w.a.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class Ee{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new Ee(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Te{constructor(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderCompressedElements(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?Object(i.f)(t,Y.classNames):Object(i.R)(t,Y.classNames),!1}disposeElement(e,t,n,i){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,i)}disposeCompressedElements(e,t,n,i){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Object(r.f)(this.disposables)}}class Oe extends De{constructor(e,t,n,i,r,o,s={}){super(e,t,n,r,o,s),this.compressionDelegate=i,this.compressibleNodeMapper=new k(e=>new Ee(e)),this.filter=s.filter}createTree(e,t,n,i,r){const o=new $(n),s=i.map(e=>new Te(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=function(e){const t=e&&Le(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))})})}(r)||{};return new ge(e,t,o,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),i=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},r=i(this.tree.getSelection()),o=i(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const d=e=>{const t=e.element;if(t)for(let e=0;e{const t=function(e){return"boolean"==typeof e?e?1:0:E(e)?T(e.visibility):T(e)}(this.filter.filter(e,1));if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t})),super.processChildren(e)}}class Ne extends ie{constructor(e,t,n,i,r,o={}){super(e,t,n,i,o),this.user=e,this.dataSource=r,this.identityProvider=o.identityProvider}createModel(e,t,n){return new re(e,t,n)}}var Ie=n(67);n.d(t,"a",(function(){return Pe})),n.d(t,"b",(function(){return je})),n.d(t,"e",(function(){return We})),n.d(t,"d",(function(){return st})),n.d(t,"c",(function(){return gt}));var Ae=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Re=function(e,t){return function(n,i){t(n,i,e)}};const Pe=Object(p.c)("listService");let je=class{constructor(e){this._themeService=e,this.disposables=new r.b,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new s.b(Object(i.v)(),"");this.disposables.add(Object(b.b)(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),Object(r.e)(e.onDidFocus(()=>this._lastFocusedWidget=e),Object(r.h)(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==n),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};je=Ae([Re(0,v.c)],je);const Fe=new g.c("listFocus",!0),Be=new g.c("listSupportsMultiselect",!0),We=g.a.and(Fe,g.a.not("inputFocus")),He=new g.c("listHasSelectionOrFocus",!1),Ye=new g.c("listDoubleSelection",!1),Ve=new g.c("listMultiSelection",!1),ze=new g.c("listSupportsKeyboardNavigation",!0),Ue="listAutomaticKeyboardNavigation",$e=new g.c(Ue,!0);let qe=!1;function Ke(e,t){const n=e.createScoped(t.getHTMLElement());return Fe.bindTo(n),n}const Ge="workbench.list.multiSelectModifier",Ze="workbench.list.openMode",Je="workbench.list.horizontalScrolling",Xe="workbench.list.keyboardNavigation",Qe="workbench.list.automaticKeyboardNavigation",et="workbench.tree.indent",tt="workbench.tree.renderIndentGuides",nt="workbench.list.smoothScrolling";function it(e){return"alt"===e.getValue(Ge)}class rt extends r.a{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=it(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Ge)&&(this.useAltAsMultipleSelectionModifier=it(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Object(s.h)(e)}isSelectionRangeChangeEvent(e){return Object(s.g)(e)}}function ot(e,t,n){const i=new r.b,o=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new rt(t);o.multipleSelectionController=e,i.add(e)}return o.keyboardNavigationDelegate={mightProducePrintableCharacter:e=>n.mightProducePrintableCharacter(e)},o.smoothScrolling=t.getValue(nt),[o,i]}let st=class extends s.c{constructor(e,t,n,i,r,o,s,a,l,c){const d=void 0!==r.horizontalScrolling?r.horizontalScrolling:l.getValue(Je),[u,h]=ot(r,l,c);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(b.d)(a.getColorTheme(),b.e)),u),{horizontalScrolling:d})),this.disposables.add(h),this.contextKeyService=Ke(o,this),this.themeService=a,Be.bindTo(this.contextKeyService).set(!(!1===r.multipleSelectionSupport)),this.listHasSelectionOrFocus=He.bindTo(this.contextKeyService),this.listDoubleSelection=Ye.bindTo(this.contextKeyService),this.listMultiSelection=Ve.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=it(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=it(l));let t={};if(e.affectsConfiguration(Je)&&void 0===this.horizontalScrolling){const e=l.getValue(Je);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(nt)){const e=l.getValue(nt);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}dispose(){super.dispose(),this._styler&&this._styler.dispose()}updateStyles(e){this._styler&&this._styler.dispose(),this._styler=Object(b.b)(this,this.themeService,e)}};st=Ae([Re(5,g.b),Re(6,Pe),Re(7,v.c),Re(8,h.a),Re(9,m.a)],st);let at=class extends class{constructor(e,t,n,i,r={}){const o=()=>this.model,a=i.map(e=>new c(e,o));this.list=new s.c(e,t,n,a,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new d(e,t.accessibilityProvider)})}(o,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return a.b.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return a.b.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeFocus(){return a.b.map(this.list.onDidChangeFocus,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:n}))}get onDidChangeSelection(){return a.b.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Object(o.s)(e.length))}getFocus(){return this.list.getFocus()}setSelection(e,t){this.list.setSelection(e,t)}getSelection(){return this.list.getSelection()}style(e){this.list.style(e)}dispose(){this.list.dispose()}}{constructor(e,t,n,i,o,s,a,l,c,d){const u=void 0!==o.horizontalScrolling?o.horizontalScrolling:c.getValue(Je),[h,f]=ot(o,c,d);super(e,t,n,i,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(b.d)(l.getColorTheme(),b.e)),h),{horizontalScrolling:u})),this.disposables=new r.b,this.disposables.add(f),this.contextKeyService=Ke(s,this),this.horizontalScrolling=o.horizontalScrolling,Be.bindTo(this.contextKeyService).set(!(!1===o.multipleSelectionSupport)),this._useAltAsMultipleSelectionModifier=it(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),o.overrideStyles&&this.disposables.add(Object(b.b)(this,l,o.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(e=>{e.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=it(c));let t={};if(e.affectsConfiguration(Je)&&void 0===this.horizontalScrolling){const e=c.getValue(Je);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(nt)){const e=c.getValue(nt);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))}dispose(){super.dispose(),this.disposables.dispose()}};at=Ae([Re(5,g.b),Re(6,Pe),Re(7,v.c),Re(8,h.a),Re(9,m.a)],at);class lt extends r.a{constructor(e,t){var n,i;super(),this.widget=e,this._onDidOpen=new a.a,this.onDidOpen=this._onDidOpen.event,this.openOnFocus=null!==(n=null==t?void 0:t.openOnFocus)&&void 0!==n&&n,this._register(a.b.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.browserEvent))),this.openOnFocus&&this._register(a.b.filter(this.widget.onDidChangeFocus,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onFocusFromKeyboard(e))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ze)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(Ze))}))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onFocusFromKeyboard(e){const t=this.widget.getFocus();this.widget.setSelection(t,e.browserEvent);const n="boolean"!=typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus;this._open(n,!1,!1,e.browserEvent)}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t="boolean"!=typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus;this._open(t,!1,!1,e.browserEvent)}onPointer(e){if(!this.openOnSingleClick)return;if(2===e.detail)return;const t=1===e.button,n=e.ctrlKey||e.metaKey||e.altKey;this._open(!0,t,n,e)}onMouseDblClick(e){if(!e)return;const t=e.ctrlKey||e.metaKey||e.altKey;this._open(!1,!0,t,e)}_open(e,t,n,i){this._onDidOpen.fire({editorOptions:{preserveFocus:e,pinned:t,revealIfVisible:!0},sideBySide:n,element:this.widget.getSelection()[0],browserEvent:i})}}class ct extends lt{constructor(e,t){super(e,t)}}function dt(e,t){let n=!1;return i=>{if(n)return n=!1,!1;const r=t.softDispatch(i,e);return r&&r.enterChord?(n=!0,!1):(n=!1,!0)}}let ut=class extends he{constructor(e,t,n,i,r,o,s,a,l,c,d){const{options:u,getAutomaticKeyboardNavigation:h,disposable:f}=mt(t,r,o,l,c,d);super(e,t,n,i,u),this.disposables.add(f),this.internals=new _t(this,r,h,r.overrideStyles,o,s,a,l,d),this.disposables.add(this.internals)}};ut=Ae([Re(5,g.b),Re(6,Pe),Re(7,v.c),Re(8,h.a),Re(9,m.a),Re(10,Ie.b)],ut);let ht=class extends ge{constructor(e,t,n,i,r,o,s,a,l,c,d){const{options:u,getAutomaticKeyboardNavigation:h,disposable:f}=mt(t,r,o,l,c,d);super(e,t,n,i,u),this.disposables.add(f),this.internals=new _t(this,r,h,r.overrideStyles,o,s,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};ht=Ae([Re(5,g.b),Re(6,Pe),Re(7,v.c),Re(8,h.a),Re(9,m.a),Re(10,Ie.b)],ht);let ft=class extends Ne{constructor(e,t,n,i,r,o,s,a,l,c,d,u){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=mt(t,o,s,c,d,u);super(e,t,n,i,r,h),this.disposables.add(g),this.internals=new _t(this,o,f,o.overrideStyles,s,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};ft=Ae([Re(6,g.b),Re(7,Pe),Re(8,v.c),Re(9,h.a),Re(10,m.a),Re(11,Ie.b)],ft);let gt=class extends De{constructor(e,t,n,i,r,o,s,a,l,c,d,u){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=mt(t,o,s,c,d,u);super(e,t,n,i,r,h),this.disposables.add(g),this.internals=new _t(this,o,f,o.overrideStyles,s,a,l,c,u),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};gt=Ae([Re(6,g.b),Re(7,Pe),Re(8,v.c),Re(9,h.a),Re(10,m.a),Re(11,Ie.b)],gt);let pt=class extends Oe{constructor(e,t,n,i,r,o,s,a,l,c,d,u,h){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=mt(t,s,a,d,u,h);super(e,t,n,i,r,o,f),this.disposables.add(p),this.internals=new _t(this,s,g,s.overrideStyles,a,l,c,d,h),this.disposables.add(this.internals)}};function mt(e,t,n,i,r,o){ze.bindTo(n),qe||($e.bindTo(n),qe=!0);const s=()=>{let e=n.getContextKeyValue(Ue);return e&&(e=i.getValue(Qe)),e},a=o.isScreenReaderOptimized()?"simple":i.getValue(Xe),l=void 0!==t.horizontalScrolling?t.horizontalScrolling:i.getValue(Je),[c,d]=ot(t,i,r),u=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:s,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},c),{indent:i.getValue(et),renderIndentGuides:i.getValue(tt),smoothScrolling:i.getValue(nt),automaticKeyboardNavigation:s(),simpleKeyboardNavigation:"simple"===a,filterOnType:"filter"===a,horizontalScrolling:l,keyboardNavigationEventFilter:dt(e,r),additionalScrollHeight:u,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnDoubleClick:"doubleClick"===i.getValue(Ze)})}}pt=Ae([Re(7,g.b),Re(8,Pe),Re(9,v.c),Re(10,h.a),Re(11,m.a),Re(12,Ie.b)],pt);let _t=class{constructor(e,t,n,i,r,o,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=Ke(r,e),Be.bindTo(this.contextKeyService).set(!(!1===t.multipleSelectionSupport)),this.hasSelectionOrFocus=He.bindTo(this.contextKeyService),this.hasDoubleSelection=Ye.bindTo(this.contextKeyService),this.hasMultiSelection=Ve.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=it(a);const c=new Set;c.add(Ue);const d=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(Xe);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(i),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const t=e.getSelection(),n=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||n.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{const t=e.getSelection(),n=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||n.length>0)}),a.onDidChangeConfiguration(i=>{let r={};if(i.affectsConfiguration(Ge)&&(this._useAltAsMultipleSelectionModifier=it(a)),i.affectsConfiguration(et)){const e=a.getValue(et);r=Object.assign(Object.assign({},r),{indent:e})}if(i.affectsConfiguration(tt)){const e=a.getValue(tt);r=Object.assign(Object.assign({},r),{renderIndentGuides:e})}if(i.affectsConfiguration(nt)){const e=a.getValue(nt);r=Object.assign(Object.assign({},r),{smoothScrolling:e})}if(i.affectsConfiguration(Xe)&&d(),i.affectsConfiguration(Qe)&&(r=Object.assign(Object.assign({},r),{automaticKeyboardNavigation:n()})),i.affectsConfiguration(Je)&&void 0===t.horizontalScrolling){const e=a.getValue(Je);r=Object.assign(Object.assign({},r),{horizontalScrolling:e})}i.affectsConfiguration(Ze)&&(r=Object.assign(Object.assign({},r),{expandOnlyOnDoubleClick:"doubleClick"===a.getValue(Ze)})),Object.keys(r).length>0&&e.updateOptions(r)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:n()})}),l.onDidChangeScreenReaderOptimized(()=>d())),this.navigator=new ct(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(e){Object(r.f)(this.styler),this.styler=e?Object(b.b)(this.tree,this.themeService,e):r.a.None}dispose(){this.disposables=Object(r.f)(this.disposables),Object(r.f)(this.styler),this.styler=void 0}};_t=Ae([Re(4,g.b),Re(5,Pe),Re(6,v.c),Re(7,h.a),Re(8,Ie.b)],_t),_.a.as(f.a.Configuration).registerConfiguration({id:"workbench",order:7,title:Object(u.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Ge]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(u.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(u.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(u.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Ze]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(u.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},[Je]:{type:"boolean",default:!1,description:Object(u.a)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[et]:{type:"number",default:8,minimum:0,maximum:40,description:Object(u.a)("tree indent setting","Controls tree indentation in pixels.")},[tt]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:Object(u.a)("render tree indent guides","Controls whether the tree should render indent guides.")},[nt]:{type:"boolean",default:!1,description:Object(u.a)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Xe]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[Object(u.a)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),Object(u.a)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),Object(u.a)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:Object(u.a)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[Qe]:{type:"boolean",default:!0,markdownDescription:Object(u.a)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")}}})},function(e,t,n){"use strict";class i{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var r=n(2),o=n(8),s=n(4),a=n(151),l=n(7),c=n(95),d=n(15),u=n(152),h=n(17),f=n(1),g=n(49),p=n(10),m=n(11),_=n(57),b=n(71),v=n(41),y=function(e,t){return function(n,i){t(n,i,e)}},w=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class C extends g.a{constructor(e,t){super(e.command?e.command.id:e.title,e.title,void 0,!e.disabled,t),this.action=e}}let S=class extends r.a{constructor(e,t,n,i){super(),this._editor=e,this._delegate=t,this._contextMenuService=n,this._visible=!1,this._showingActions=this._register(new r.d),this._keybindingResolver=new k({getKeybindings:()=>i.getKeybindings()})}get isVisible(){return this._visible}show(e,t,n,i){return w(this,void 0,void 0,(function*(){const r=i.includeDisabledActions?t.allActions:t.validActions;if(!r.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,Object(d.a)();this._visible=!0,this._showingActions.value=t;const o=this.getMenuActions(e,r,t.documentation),s=p.a.isIPosition(n)?this._toCoords(n):n||{x:0,y:0},a=this._keybindingResolver.getResolver();this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>s,getActions:()=>o,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof C?a(e.action):void 0})}))}getMenuActions(e,t,n){var i,r;const o=e=>new C(e,()=>this._delegate.onSelectCodeAction(e)),s=t.map(o),a=[...n],l=this._editor.getModel();if(l&&s.length)for(const n of m.a.all(l))n._getAdditionalMenuItems&&a.push(...n._getAdditionalMenuItems({trigger:e.type,only:null===(r=null===(i=e.filter)||void 0===i?void 0:i.include)||void 0===r?void 0:r.value},t));return a.length&&s.push(new g.c,...a.map(e=>o({title:e.title,command:e}))),s}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=Object(f.C)(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}};S=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([y(2,b.a),y(3,v.a)],S);class k{constructor(e){this._keybindingProvider=e}getResolver(){const e=new i(()=>this._keybindingProvider.getKeybindings().filter(e=>k.codeActionCommands.indexOf(e.command)>=0).filter(e=>e.resolvedKeybinding).map(e=>{let t=e.commandArgs;return e.command===c.d?t={kind:_.b.SourceOrganizeImports.value}:e.command===c.b&&(t={kind:_.b.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},_.a.fromUser(t,{kind:_.b.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.getValue());return null==n?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new _.b(e.kind);return t.filter(e=>e.kind.contains(n)).filter(t=>!t.preferred||e.isPreferred).reduceRight((e,t)=>e?e.kind.contains(t.kind)?t:e:t,void 0)}}k.codeActionCommands=[c.e,c.a,c.f,c.d,c.b];var x,L=n(93),M=n(6),D=(n(578),n(29)),E=n(0),T=n(18),O=n(5),N=n(50),I=n(16),A=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},R=function(e,t){return function(n,i){t(n,i,e)}};!function(e){e.Hidden={type:0};e.Showing=class{constructor(e,t,n,i){this.actions=e,this.trigger=t,this.editorPosition=n,this.widgetPosition=i,this.type=1}}}(x||(x={}));let P=class e extends r.a{constructor(e,t,n,i){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=n,this._keybindingService=i,this._onClick=this._register(new M.a),this.onClick=this._onClick.event,this._state=x.Hidden,this._domNode=document.createElement("div"),this._domNode.className=I.a.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()})),N.b.ignoreTarget(this._domNode),this._register(f.m(this._domNode,e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:n}=f.C(this._domNode),i=this._editor.getOption(51);let r=Math.floor(i/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new L.a;t.startMonitoring(e.target,e.buttons,L.b,()=>{},()=>{t.dispose()})})),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(49)&&!this._editor.getOption(49).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,n,i){if(t.validActions.length<=0)return this.hide();const r=this._editor.getOptions();if(!r.get(49).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:s,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,c=r.get(36),d=o.getLineContent(s),u=D.b.computeIndentLevel(d,l),h=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let f=s;if(!(c.spaceWidth*u>22))if(s>1&&!h(s-1))f-=1;else if(h(s+1)){if(a*c.spaceWidth<22)return this.hide()}else f+=1;this.state=new x.Showing(t,n,i,{position:{lineNumber:f,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=x.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){f.R(this._domNode,I.a.lightBulb.classNames),f.f(this._domNode,I.a.lightbulbAutofix.classNames);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=E.a("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",e.getLabel()))}f.R(this._domNode,I.a.lightbulbAutofix.classNames),f.f(this._domNode,I.a.lightBulb.classNames);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?E.a("quickFixWithKb","Show Fixes ({0})",e.getLabel()):E.a("quickFix","Show Fixes")}set title(e){this._domNode.title=e}};P._posPref=[0],P=A([R(3,v.a)],P),Object(T.g)((e,t)=>{const n=e.getColor(O.N);n&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${I.a.lightBulb.cssSelector} {\n\t\t\tcolor: ${n};\n\t\t}`);const i=e.getColor(O.M);i&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${I.a.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${i};\n\t\t}`)});var j=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let F=class extends r.a{constructor(e,t,n,o,s){super(),this._editor=e,this.delegate=o,this._activeCodeActions=this._register(new r.d),this._codeActionWidget=new i(()=>this._register(s.createInstance(S,this._editor,{onSelectCodeAction:e=>j(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))}))),this._lightBulbWidget=new i(()=>{const e=this._register(s.createInstance(P,this._editor,t,n));return this._register(e.onClick(e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1}))),e})}update(e){var t,n,i;return j(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let r;try{r=yield e.actions}catch(e){return void Object(d.e)(e)}if(this._lightBulbWidget.getValue().update(r,e.trigger,e.position),2===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,r);if(t){try{yield this.delegate.applyCodeAction(t,!1)}finally{r.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,r);if(t&&t.disabled)return u.a.get(this._editor).showMessage(t.disabled,e.trigger.context.position),void r.dispose()}}const t=!!(null===(i=e.trigger.filter)||void 0===i?void 0:i.include);if(e.trigger.context&&(!r.allActions.length||!t&&!r.validActions.length))return u.a.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=r,void r.dispose();this._activeCodeActions.value=r,this._codeActionWidget.getValue().show(e.trigger,r,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?r.dispose():this._activeCodeActions.value=r}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find(e=>e.disabled):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,n,i){return j(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,n,i)}))}};F=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(4,h.a)],F);var B=n(28),W=n(9),H=n(52),Y=n(40),V=n(70),z=n(108),U=n(19),$=n(3),q=n(42);const K=new W.c("supportedCodeAction","");class G extends r.a{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new U.e),this._register(this._markerService.onMarkerChanged(e=>this._onMarkerChanges(e))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(e=>Object(q.f)(e,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:1})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const n of this._markerService.read({resource:t.uri})){const i=t.validateRange(n);if($.a.intersectRanges(i,e))return $.a.lift(i)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&1===e.type){const{lineNumber:e,column:i}=n.getPosition(),r=t.getLineContent(e);if(0===r.length)return;if(1===i){if(/\s/.test(r[0]))return}else if(i===t.getLineMaxColumn(e)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[i-2])&&/\s/.test(r[i-1]))return}return n}_createEventAndSignalChange(e,t){const n=this._editor.getModel();if(!t||!n)return void this._signalChange(void 0);const i=this._getRangeOfMarker(t),r=i?i.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:r};return this._signalChange(o),o}}var Z;!function(e){e.Empty={type:0};e.Triggered=class{constructor(e,t,n,i){this.trigger=e,this.rangeOrSelection=t,this.position=n,this.actions=i,this.type=1}}}(Z||(Z={}));class J extends r.a{constructor(e,t,n,i){super(),this._editor=e,this._markerService=t,this._progressService=i,this._codeActionOracle=this._register(new r.d),this._state=Z.Empty,this._onDidChangeState=this._register(new M.a),this.onDidChangeState=this._onDidChangeState.event,this._supportedCodeActions=K.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(m.a.onDidChange(()=>this._update())),this._update()}dispose(){super.dispose(),this.setState(Z.Empty,!0)}_update(){this._codeActionOracle.value=void 0,this.setState(Z.Empty);const e=this._editor.getModel();if(e&&m.a.has(e)&&!this._editor.getOption(72)){const t=[];for(const n of m.a.all(e))Array.isArray(n.providedCodeActionKinds)&&t.push(...n.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new G(this._editor,this._markerService,t=>{var n;if(!t)return void this.setState(Z.Empty);const i=Object(U.f)(n=>Object(c.c)(e,t.selection,t.trigger,V.b.None,n));2===t.trigger.type&&(null===(n=this._progressService)||void 0===n||n.showWhile(i,250)),this.setState(new Z.Triggered(t.trigger,t.selection,t.position,i))},void 0),this._codeActionOracle.value.trigger({type:1})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.actions.cancel(),this._state=e,t||this._onDidChangeState.fire(e))}}n.d(t,"f",(function(){return ie})),n.d(t,"e",(function(){return se})),n.d(t,"b",(function(){return ae})),n.d(t,"g",(function(){return le})),n.d(t,"h",(function(){return ce})),n.d(t,"d",(function(){return de})),n.d(t,"c",(function(){return ue})),n.d(t,"a",(function(){return he}));var X=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Q=function(e,t){return function(n,i){t(n,i,e)}},ee=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function te(e){return W.a.regex(K.keys()[0],new RegExp("(\\s|^)"+Object(o.v)(e.value)+"\\b"))}const ne={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:E.a("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:E.a("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[E.a("args.schema.apply.first","Always apply the first returned code action."),E.a("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),E.a("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:E.a("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let ie=class e extends r.a{constructor(e,t,n,r,o){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new J(this._editor,t,n,r)),this._register(this._model.onDidChangeState(e=>this.update(e))),this._ui=new i(()=>this._register(new F(e,se.Id,he.Id,{applyCodeAction:(e,t)=>ee(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:1,filter:{}})}}))},this._instantiationService)))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,n){return this._ui.getValue().showCodeActionList(e,t,n,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,n){if(!this._editor.hasModel())return;u.a.get(this._editor).closeMessage();const i=this._editor.getPosition();this._trigger({type:2,filter:t,autoApply:n,context:{notAvailableMessage:e,position:i}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(re,e,this._editor)}};function re(e,t,n){return ee(this,void 0,void 0,(function*(){const i=e.get(a.a),r=e.get(B.b),o=e.get(z.a),s=e.get(Y.a);if(o.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.title,codeActionKind:t.kind,codeActionIsPreferred:!!t.isPreferred}),t.edit&&(yield i.apply(a.b.convert(t.edit),{editor:n,label:t.title})),t.command)try{yield r.executeCommand(t.command.id,...t.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);s.error("string"==typeof t?t:E.a("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function oe(e,t,n,i){if(e.hasModel()){const r=ie.get(e);r&&r.manualTriggerAtCurrentPosition(t,n,i)}}ie.ID="editor.contrib.quickFixController",ie=X([Q(1,H.b),Q(2,W.b),Q(3,V.a),Q(4,h.a)],ie);class se extends s.b{constructor(){super({id:se.Id,label:E.a("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:W.a.and(l.a.writable,l.a.hasCodeActionsProvider),kbOpts:{kbExpr:l.a.editorTextFocus,primary:2132,weight:100}})}run(e,t){return oe(t,E.a("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}se.Id="editor.action.quickFix";class ae extends s.c{constructor(){super({id:c.a,precondition:W.a.and(l.a.writable,l.a.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:ne}]}})}runEditorCommand(e,t,n){const i=_.a.fromUser(n,{kind:_.b.Empty,apply:"ifSingle"});return oe(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?E.a("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):E.a("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?E.a("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):E.a("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class le extends s.b{constructor(){super({id:c.e,label:E.a("refactor.label","Refactor..."),alias:"Refactor...",precondition:W.a.and(l.a.writable,l.a.hasCodeActionsProvider),kbOpts:{kbExpr:l.a.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:W.a.and(l.a.writable,te(_.b.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:ne}]}})}run(e,t,n){const i=_.a.fromUser(n,{kind:_.b.Refactor,apply:"never"});return oe(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?E.a("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):E.a("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?E.a("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):E.a("editor.action.refactor.noneMessage","No refactorings available"),{include:_.b.Refactor.contains(i.kind)?i.kind:_.b.None,onlyIncludePreferredActions:i.preferred},i.apply)}}class ce extends s.b{constructor(){super({id:c.f,label:E.a("source.label","Source Action..."),alias:"Source Action...",precondition:W.a.and(l.a.writable,l.a.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:W.a.and(l.a.writable,te(_.b.Source))},description:{description:"Source Action...",args:[{name:"args",schema:ne}]}})}run(e,t,n){const i=_.a.fromUser(n,{kind:_.b.Source,apply:"never"});return oe(t,"string"==typeof(null==n?void 0:n.kind)?i.preferred?E.a("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):E.a("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?E.a("editor.action.source.noneMessage.preferred","No preferred source actions available"):E.a("editor.action.source.noneMessage","No source actions available"),{include:_.b.Source.contains(i.kind)?i.kind:_.b.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class de extends s.b{constructor(){super({id:c.d,label:E.a("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:W.a.and(l.a.writable,te(_.b.SourceOrganizeImports)),kbOpts:{kbExpr:l.a.editorTextFocus,primary:1581,weight:100}})}run(e,t){return oe(t,E.a("editor.action.organize.noneMessage","No organize imports action available"),{include:_.b.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class ue extends s.b{constructor(){super({id:c.b,label:E.a("fixAll.label","Fix All"),alias:"Fix All",precondition:W.a.and(l.a.writable,te(_.b.SourceFixAll))})}run(e,t){return oe(t,E.a("fixAll.noneMessage","No fix all action available"),{include:_.b.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class he extends s.b{constructor(){super({id:he.Id,label:E.a("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:W.a.and(l.a.writable,te(_.b.QuickFix)),kbOpts:{kbExpr:l.a.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return oe(t,E.a("editor.action.autoFix.noneMessage","No auto fixes available"),{include:_.b.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}he.Id="editor.action.autoFix"},function(e,t,n){var i;try{i={clone:n(352),constant:n(217),each:n(218),filter:n(252),has:n(220),isArray:n(85),isEmpty:n(382),isFunction:n(178),isUndefined:n(255),keys:n(157),map:n(256),reduce:n(257),size:n(384),transform:n(385),union:n(386),values:n(259)}}catch(e){}i||(i=window._),e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var i;try{i={clone:n(352),constant:n(217),each:n(218),filter:n(252),has:n(220),isArray:n(85),isEmpty:n(382),isFunction:n(178),isUndefined:n(255),keys:n(157),map:n(256),reduce:n(257),size:n(384),transform:n(385),union:n(386),values:n(259)}}catch(e){}i||(i=window._),e.exports=i},function(e,t,n){var i=n(195);e.exports={isSubgraph:function(e,t){return!!e.children(t).length},edgeToId:function(e){return o(e.v)+":"+o(e.w)+":"+o(e.name)},applyStyle:function(e,t){t&&e.attr("style",t)},applyClass:function(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))},applyTransition:function(e,t){var n=t.graph();if(i.isPlainObject(n)){var r=n.transition;if(i.isFunction(r))return r(e)}return e}};var r=/:/g;function o(e){return e?String(e).replace(r,"\\:"):""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(862),r=n(863),o=n(864),s={channel:i.default,lang:r.default,unit:o.default};t.default=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(30),r=n(12);const o={clipboard:{writeText:r.g||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:r.g||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText),richText:(()=>{if(i.f){let e=navigator.userAgent.indexOf("Edge/"),t=parseInt(navigator.userAgent.substring(e+5,navigator.userAgent.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0})()},keyboard:(()=>r.g||i.k?0:navigator.keyboard||i.j?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("themeService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a}));const i="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of i)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}();function o(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const s={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,n,i,r=s){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?(i+=e,o=0):i+=o,a(e,t,n=n.substring(o,e+r.maxLen/2),i,r)}Date.now();const o=e-1-i;let c=-1,d=null;for(let e=1;;e++){Date.now(),r.timeBudget;const i=o-r.windowSize*e;t.lastIndex=Math.max(0,i);const s=l(t,n,o,c);if(!s&&d)break;if(d=s,i<=0)break;c=i}if(d){let e={word:d[0],startColumn:i+1+d.index,endColumn:i+1+d.index+d[0].length};return t.lastIndex=0,e}return null}function l(e,t,n,i){let r;for(;r=e.exec(t);){const t=r.index||0;if(t<=n&&e.lastIndex>=n)return r;if(i>0&&t>i)return null}return null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));const i={ctrlCmd:!1,alt:!1};var r;!function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return a}));var i=n(12);const r=void 0===e?{cwd:()=>"/",env:Object.create(null),get platform(){return i.i?"win32":i.f?"darwin":"linux"},nextTick:e=>Object(i.j)(e)}:e,o=r.cwd,s=r.env,a=r.platform}).call(this,n(343))},function(e,t,n){var i;try{i=n(351)}catch(e){}i||(i=window.graphlib),e.exports=i},function(e,t,n){var i=n(354),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){var i;try{i=n(414)}catch(e){}i||(i=window.graphlib),e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(321),r=n(427),o=n(868),s=n(869),a=n(870),l={format:{keyword:o.default,hex:r.default,rgb:s.default,rgba:s.default,hsl:a.default,hsla:a.default},parse:function(e){if("string"!=typeof e)return e;var t=r.default.parse(e)||s.default.parse(e)||a.default.parse(e)||o.default.parse(e);if(t)return t;throw new Error('Unsupported color format: "'+e+'"')},stringify:function(e){return!e.changed&&e.color?e.color:e.type.is(i.TYPE.HSL)||void 0===e.data.r?a.default.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?s.default.stringify(e):r.default.stringify(e)}};t.default=l},function(e,t,n){"use strict";function i(e){return e&&"string"==typeof e.id}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));const r={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(592);const i="monaco-mouse-cursor-text"},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return d}));var i=n(0),r=n(6),o=n(11),s=n(32),a=n(46);const l=new class{constructor(){this._onDidChangeLanguages=new r.a,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}})},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));class i{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const r=new i("id#")},function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(4),o=n(3),s=n(22),a=n(7),l=n(36),c=n(9),d=n(92),u=n(14),h=n(8),f=(n(621),n(60)),g=n(29),p=n(203),m=n(17),_=n(123),b=n(0),v=n(45),y=n(42),w=n(32),C=n(24);const S="code-workspace";function k(e){return e instanceof C.a}var x=n(174);class L{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let n=t.resolve(e);if(void 0!==n)return n}}}class M{constructor(e,t,n,i){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=i}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,n=e.multiline)}if(t&&n&&e.snippet){const n=this._model.getLineContent(this._selection.startLineNumber),i=Object(h.z)(n,0,this._selection.startColumn-1);let r=i;e.snippet.walk(t=>t!==e&&(t instanceof _.d&&(r=Object(h.z)(t.value.split(/\r\n|\r|\n/).pop())),!0));const o=Object(h.d)(r,i);t=t.replace(/(\r\n|\r|\n)(.*)/g,(e,t,n)=>`${t}${r.substr(o)}${n}`)}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class D{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return v.a(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=v.a(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===v.b(this._model.uri.fsPath)?"":this._labelService.getUriLabel(Object(y.d)(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):void 0}}class E{constructor(e,t,n,i){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=i}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter(e=>!Object(h.D)(e));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class T{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),i=w.a.getComments(n);if(i)return"LINE_COMMENT"===t?i.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?i.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&i.blockCommentEndToken||void 0}}class O{resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===t?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===t?String((new Date).getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String((new Date).getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String((new Date).getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String((new Date).getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String((new Date).getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?O.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===t?O.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===t?O.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?O.monthNamesShort[(new Date).getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(Date.now()/1e3)):void 0}}O.dayNames=[b.a("Sunday","Sunday"),b.a("Monday","Monday"),b.a("Tuesday","Tuesday"),b.a("Wednesday","Wednesday"),b.a("Thursday","Thursday"),b.a("Friday","Friday"),b.a("Saturday","Saturday")],O.dayNamesShort=[b.a("SundayShort","Sun"),b.a("MondayShort","Mon"),b.a("TuesdayShort","Tue"),b.a("WednesdayShort","Wed"),b.a("ThursdayShort","Thu"),b.a("FridayShort","Fri"),b.a("SaturdayShort","Sat")],O.monthNames=[b.a("January","January"),b.a("February","February"),b.a("March","March"),b.a("April","April"),b.a("May","May"),b.a("June","June"),b.a("July","July"),b.a("August","August"),b.a("September","September"),b.a("October","October"),b.a("November","November"),b.a("December","December")],O.monthNamesShort=[b.a("JanuaryShort","Jan"),b.a("FebruaryShort","Feb"),b.a("MarchShort","Mar"),b.a("AprilShort","Apr"),b.a("MayShort","May"),b.a("JuneShort","Jun"),b.a("JulyShort","Jul"),b.a("AugustShort","Aug"),b.a("SeptemberShort","Sep"),b.a("OctoberShort","Oct"),b.a("NovemberShort","Nov"),b.a("DecemberShort","Dec")];class N{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e){return e.configuration?{configPath:e.configuration,id:e.id}:1===e.folders.length?e.folders[0].uri:void 0}(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(k(e))return v.a(e.path);let t=v.a(e.configPath.path);return t.endsWith(S)&&(t=t.substr(0,t.length-S.length-1)),t}_resoveWorkspacePath(e){if(k(e))return Object(x.c)(e.fsPath);let t=v.a(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?Object(x.c)(n):"/"}}class I{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):void 0}}var A=n(18),R=n(5),P=n(169);Object(A.g)((e,t)=>{function n(t){const n=e.getColor(t);return n?n.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${n(R.oc)}; outline-color: ${n(R.pc)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${n(R.mc)}; outline-color: ${n(R.nc)}; }`)});class j{constructor(e,t,n){this._nestingLevel=1,this._editor=e,this._snippet=t,this._offset=n,this._placeholderGroups=Object(u.m)(t.placeholders,_.b.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const n of this._snippet.placeholders){const i=this._snippet.offset(n),r=this._snippet.fullLen(n),s=o.a.fromPositions(e.getPositionAt(this._offset+i),e.getPositionAt(this._offset+i+r)),a=n.isFinalTabstop?j._decor.inactiveFinal:j._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const n=this._placeholderDecorations.get(t),i=this._editor.getModel().getDecorationRange(n),r=this._editor.getModel().getValueInRange(i);e.push(f.a.replaceMove(i,t.transform.resolve(r)))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const n=this._editor.getModel().changeDecorations(e=>{const n=new Set,i=[];for(const r of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(r),a=this._editor.getModel().getDecorationRange(o);i.push(new s.a(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(r),e.changeDecorationOptions(o,r.isFinalTabstop?j._decor.activeFinal:j._decor.active),n.add(r);for(const t of this._snippet.enclosingPlaceholders(r)){const i=this._placeholderDecorations.get(t);e.changeDecorationOptions(i,t.isFinalTabstop?j._decor.activeFinal:j._decor.active),n.add(t)}}for(const[t,i]of this._placeholderDecorations)n.has(t)||e.changeDecorationOptions(i,t.isFinalTabstop?j._decor.inactiveFinal:j._decor.inactive);return i});return t?this.move(e):null!=n?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof _.b){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let n;for(const i of t){if(i.isFinalTabstop)break;n||(n=[],e.set(i.index,n));const t=this._placeholderDecorations.get(i),r=this._editor.getModel().getDecorationRange(t);if(!r){e.delete(i.index);break}n.push(r)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const i of this._placeholderGroups[this._placeholderGroupsIdx]){const r=e.shift();console.assert(!r._placeholderDecorations);const s=r._snippet.placeholderInfo.last.index;for(const e of r._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=i.index+(s+1)/this._nestingLevel:e.index=i.index+e.index/this._nestingLevel;this._snippet.replace(i,r._snippet.children);const a=this._placeholderDecorations.get(i);n.removeDecoration(a),this._placeholderDecorations.delete(i);for(const e of r._snippet.placeholders){const i=r._snippet.offset(e),s=r._snippet.fullLen(e),a=o.a.fromPositions(t.getPositionAt(r._offset+i),t.getPositionAt(r._offset+i+s)),l=n.addDecoration(a,j._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=Object(u.m)(this._snippet.placeholders,_.b.compareByIndex)})}}j._decor={active:g.a.register({stickiness:0,className:"snippet-placeholder"}),inactive:g.a.register({stickiness:1,className:"snippet-placeholder"}),activeFinal:g.a.register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:g.a.register({stickiness:1,className:"finish-snippet-placeholder"})};const F={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class B{constructor(e,t,n=F){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=n}static adjustWhitespace(e,t,n,i,r){const o=e.getLineContent(t.lineNumber),s=Object(h.z)(o,0,t.column-1);n.walk(t=>{if(t instanceof _.d&&!(t.parent instanceof _.a)){const n=t.value.split(/\r\n|\r|\n/);if(i)for(let t=1;te.get(p.a,m.d)),g=e.invokeWithinContext(e=>new D(e.get(P.a,m.d),u)),b=()=>a;let v=0,y=u.getValueInRange(B.adjustSelection(u,e.getSelection(),n,0)),w=u.getValueInRange(B.adjustSelection(u,e.getSelection(),0,i)),C=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const S=e.getSelections().map((e,t)=>({selection:e,idx:t})).sort((e,t)=>o.a.compareRangesUsingStarts(e.selection,t.selection));for(const{selection:o,idx:a}of S){let p=B.adjustSelection(u,o,n,0),m=B.adjustSelection(u,o,0,i);y!==u.getValueInRange(p)&&(p=o),w!==u.getValueInRange(m)&&(m=o);const k=o.setStartPosition(p.startLineNumber,p.startColumn).setEndPosition(m.endLineNumber,m.endColumn),x=(new _.c).parse(t,!0,r),D=k.getStartPosition();B.adjustWhitespace(u,D,x,s||a>0&&C!==u.getLineFirstNonWhitespaceColumn(o.positionLineNumber),!0),x.resolveVariables(new L([g,new E(b,a,S.length,"spread"===e.getOption(62)),new M(u,o,a,l),new T(u,o),new O,new N(h),new I]));const A=u.getOffsetAt(D)+v;v+=x.toString().length-u.getValueLengthInRange(k),c[a]=f.a.replace(k,x.toString()),c[a].identifier={major:a,minor:0},d[a]=new j(e,x,A)}return{edits:c,snippets:d}}dispose(){Object(i.f)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=B.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter(e=>!!e.identifier).map(e=>s.a.fromPositions(e.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=F){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:i}=B.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",n,e=>{for(const e of this._snippets)e.merge(i);return console.assert(0===i.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter(e=>!!e.identifier).map(e=>s.a.fromPositions(e.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const n of this._snippets){const i=n.move(e);t.push(...i)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...i.get(t))})}e.sort(o.a.compareRangesUsingStarts);for(let[n,i]of t)if(i.length===e.length){i.sort(o.a.compareRangesUsingStarts);for(let r=0;r0}}n.d(t,"SnippetController2",(function(){return V}));var W=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},H=function(e,t){return function(n,i){t(n,i,e)}};const Y={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let V=class e{constructor(t,n,r){this._editor=t,this._logService=n,this._snippetListener=new i.b,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(r),this._hasNextTabstop=e.HasNextTabstop.bindTo(r),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(r)}static get(t){return t.getContribution(e.ID)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(i.f)(this._session),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?Y:Object.assign(Object.assign({},Y),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new B(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(e=>e.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(e=>s.a.fromPositions(e.getStartPosition())));const[t]=e.options;Object(l.f)(this._editor,e.options.map((e,n)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(n+1),range:o.a.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))})))}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),Object(i.f)(this._session),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};V.ID="snippetController2",V.InSnippetMode=new c.c("inSnippetMode",!1),V.HasNextTabstop=new c.c("hasNextTabstop",!1),V.HasPrevTabstop=new c.c("hasPrevTabstop",!1),V=W([H(1,d.b),H(2,c.b)],V),Object(r.m)(V.ID,V);const z=r.c.bindToContribution(V.get);Object(r.l)(new z({id:"jumpToNextSnippetPlaceholder",precondition:c.a.and(V.InSnippetMode,V.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:a.a.editorTextFocus,primary:2}})),Object(r.l)(new z({id:"jumpToPrevSnippetPlaceholder",precondition:c.a.and(V.InSnippetMode,V.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:a.a.editorTextFocus,primary:1026}})),Object(r.l)(new z({id:"leaveSnippet",precondition:V.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:a.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(r.l)(new z({id:"acceptSnippet",precondition:V.InSnippetMode,handler:e=>e.finish()}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return l}));var i=n(17),r=n(24),o=n(20);const s=Object(i.c)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(function(e){return Object(o.i)(e)&&r.a.isUri(e.resource)&&Object(o.i)(e.edit)}(e))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);if(function(e){return Object(o.i)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new c(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}}class l extends a{constructor(e,t,n,i){super(i),this.resource=e,this.textEdit=t,this.versionId=n,this.metadata=i}}class c extends a{constructor(e,t,n,i){super(i),this.oldResource=e,this.newResource=t,this.options=n,this.metadata=i}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));n(577);var i=n(0),r=n(19),o=n(2),s=n(55),a=n(3),l=n(4),c=n(9),d=n(18),u=n(5),h=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},f=function(e,t){return function(n,i){t(n,i,e)}};let g=class e extends o.a{constructor(t,n){super(),this._messageWidget=this._register(new o.d),this._messageListeners=this._register(new o.b),this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(n),this._register(this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){super.dispose(),this._visible.reset()}showMessage(e,t){let n;Object(s.a)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new m(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new r.e(()=>this.closeMessage(),3e3)),this._messageListeners.add(this._editor.onMouseMove(e=>{e.target.position&&(n?n.containsPosition(e.target.position)||this.closeMessage():n=new a.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(m.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(i.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};g.ID="editor.contrib.messageController",g.MESSAGE_VISIBLE=new c.c("messageVisible",!1),g=h([f(1,c.b)],g);const p=l.c.bindToContribution(g.get);Object(l.l)(new p({id:"leaveEditorMessage",precondition:g.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class m{constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const r=document.createElement("div");r.classList.add("message"),r.textContent=i,this._domNode.appendChild(r);const o=document.createElement("div");o.classList.add("anchor"),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const n=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}}Object(l.m)(g.ID,g),Object(d.g)((e,t)=>{const n=e.getColor(u.mb);if(n){let i=e.type===d.b?2:1;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ${n}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${i}px solid ${n}; }`)}const i=e.getColor(u.lb);i&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const r=e.getColor(u.nb);r&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${r}; }`)})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(17);const r=Object(i.c)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return a}));var i=n(61),r=n(8);const o="$(";function s(e){const t=e.indexOf(o);return-1===t?{text:e}:function(e,t){const n=[];let i="";function r(e){if(e){i+=e;for(const t of e)n.push(d)}}let s,a,l=-1,c="",d=0,u=t;const h=e.length;r(e.substr(0,t));for(;uPromise.resolve(i(n,e,t)).then(void 0,e=>{Object(r.f)(e)}));return Promise.all(o).then(e=>{const t=[];for(let n of e)Array.isArray(n)?t.push(...n):n&&t.push(n);return t})}function c(e,t,n){return l(e,t,s.f,(e,t,i)=>e.provideDefinition(t,i,n))}function d(e,t,n){return l(e,t,s.e,(e,t,i)=>e.provideDeclaration(t,i,n))}function u(e,t,n){return l(e,t,s.q,(e,t,i)=>e.provideImplementation(t,i,n))}function h(e,t,n){return l(e,t,s.D,(e,t,i)=>e.provideTypeDefinition(t,i,n))}function f(e,t,n,i){return l(e,t,s.v,(e,t,r)=>a(this,void 0,void 0,(function*(){const o=yield e.provideReferences(t,r,{includeDeclaration:!0},i);if(!n||!o||2!==o.length)return o;const s=yield e.provideReferences(t,r,{includeDeclaration:!1},i);return s&&1===s.length?s:o})))}Object(o.p)("_executeDefinitionProvider",(e,t)=>c(e,t,i.a.None)),Object(o.p)("_executeDeclarationProvider",(e,t)=>d(e,t,i.a.None)),Object(o.p)("_executeImplementationProvider",(e,t)=>u(e,t,i.a.None)),Object(o.p)("_executeTypeDefinitionProvider",(e,t)=>h(e,t,i.a.None)),Object(o.p)("_executeReferenceProvider",(e,t)=>f(e,t,!1,i.a.None))},function(e,t,n){var i=n(357),r=n(301),o=n(158);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var i=n(178),r=n(299);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},function(e,t,n){var i=n(710),r=n(720),o=n(180),s=n(85),a=n(727);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?r(e[0],e[1]):i(e):a(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));n(583);var i=n(2),r=n(12),o=n(20),s=n(50),a=n(59),l=n(6),c=n(1),d=n(34);const u=!1;let h=4;const f=new l.a;class g extends i.a{constructor(e,t,n){super(),this._state=3,this._onDidEnablementChange=this._register(new l.a),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new l.a),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new l.a),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new l.a),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new l.a),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new i.b),this.orthogonalEndSashDisposables=this._register(new i.b),this.el=Object(c.p)(e,Object(c.a)(".monaco-sash")),r.f&&Object(c.e)(this.el,"mac"),this._register(Object(d.a)(this.el,"mousedown")(this.onMouseDown,this)),this._register(Object(d.a)(this.el,"dblclick")(this.onMouseDoubleClick,this)),this._register(s.b.addTarget(this.el)),this._register(Object(d.a)(this.el,s.a.Start)(this.onTouchStart,this)),"number"==typeof n.size?(this.size=n.size,0===n.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=h,this._register(f.event(e=>{this.size=e,this.layout()}))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,1===this.orientation?(Object(c.e)(this.el,"horizontal"),Object(c.Q)(this.el,"vertical")):(Object(c.Q)(this.el,"horizontal"),Object(c.e)(this.el,"vertical")),Object(c.ab)(this.el,"debug",u),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(Object(c.ab)(this.el,"disabled",0===e),Object(c.ab)(this.el,"minimum",1===e),Object(c.ab)(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){this.orthogonalStartSashDisposables.clear(),e?(this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this)),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){this.orthogonalEndSashDisposables.clear(),e?(this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this)),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e}onMouseDown(e){c.b.stop(e,!1);let t=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(t=!0,e.__orthogonalSashEvent=!0,n.onMouseDown(e))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!this.state)return;const n=[...Object(c.D)("iframe"),...Object(c.D)("webview")];for(const e of n)e.style.pointerEvents="none";const o=new a.a(e),s=o.posx,l=o.posy,u=o.altKey,h={startX:s,currentX:s,startY:l,currentY:l,altKey:u};Object(c.e)(this.el,"active"),this._onDidStart.fire(h);const f=Object(c.v)(this.el),g=()=>{let e="";e=t?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":r.f?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":r.f?"col-resize":"ew-resize",f.innerHTML=`* { cursor: ${e} !important; }`},p=new i.b;g(),t||this.onDidEnablementChange(g,null,p);Object(d.a)(window,"mousemove")(e=>{c.b.stop(e,!1);const t=new a.a(e),n={startX:s,currentX:t.posx,startY:l,currentY:t.posy,altKey:u};this._onDidChange.fire(n)},null,p),Object(d.a)(window,"mouseup")(e=>{c.b.stop(e,!1),this.el.removeChild(f),Object(c.Q)(this.el,"active"),this._onDidEnd.fire(),p.dispose();for(const e of n)e.style.pointerEvents="auto"},null,p)}onMouseDoubleClick(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}onTouchStart(e){c.b.stop(e);const t=[],n=e.pageX,r=e.pageY,a=e.altKey;this._onDidStart.fire({startX:n,currentX:n,startY:r,currentY:r,altKey:a}),t.push(Object(c.i)(this.el,s.a.Change,e=>{o.h(e.pageX)&&o.h(e.pageY)&&this._onDidChange.fire({startX:n,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a})})),t.push(Object(c.i)(this.el,s.a.End,e=>{this._onDidEnd.fire(),Object(i.f)(t)}))}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}onOrthogonalStartSashEnablementChange(e){Object(c.ab)(this.el,"orthogonal-start",0!==e)}onOrthogonalEndSashEnablementChange(e){Object(c.ab)(this.el,"orthogonal-end",0!==e)}getOrthogonalSash(e){if(0===this.orientation){if(e.offsetY<=this.size)return this.orthogonalStartSash;if(e.offsetY>=this.el.clientHeight-this.size)return this.orthogonalEndSash}else{if(e.offsetX<=this.size)return this.orthogonalStartSash;if(e.offsetX>=this.el.clientWidth-this.size)return this.orthogonalEndSash}}dispose(){super.dispose(),this.el.remove()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var i=n(17);const r=Object(i.c)("textResourceConfigurationService"),o=Object(i.c)("textResourcePropertiesService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));n(624),n(625),n(626);var i=n(16);const r=new class{constructor(){this.onDidChange=i.c.onDidRegister}getCSS(){const e=[];for(let t of i.c.all)e.push(o(t));return e.join("\n")}};function o(e){let t=e.definition;for(;t instanceof i.a;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.character}'; }`}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var i=n(8);class r{constructor(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const n=e.length;if(n!==t.length)return!1;for(let i=0;it)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:n,u=c.endLineNumber===t?c.endColumn:i;o[s++]=new r(d,u,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){const n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const n=r._typeCompare(e.type,t.type);return 0===n?e.classNamet.className?1:0:n}return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}class o{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.className=n,this.metadata=i}}class s{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let n=0,i=e.length;n0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t),this.metadata.splice(i,0,n);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let n=[];const r=new s;let o=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);i.F(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);i.F(t)&&c--}const h=l-1,f=c-2;o=r.consumeLowerThan(h,o,n),0===r.count&&(o=h),r.insert(f,d,u)}return r.consumeLowerThan(1073741824,o,n),n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(37),r=n(16),o=n(8);class s{constructor(e,t){this.supportCodicons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],n="",r){e||(e=""),r&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===n&&i.e(this.highlights,t)||(Array.isArray(t)||(t=[]),this.text=e,this.title=n,this.highlights=t,this.render())}render(){let e="",t=0;for(const n of this.highlights){if(n.end===n.start)continue;if(t";const i=this.text.substring(t,n.start);e+=this.supportCodicons?Object(r.f)(Object(o.u)(i)):Object(o.u)(i),e+="",t=n.end}n.extraClasses?e+=``:e+='';const i=this.text.substring(n.start,n.end);e+=this.supportCodicons?Object(r.f)(Object(o.u)(i)):Object(o.u)(i),e+="",t=n.end}if(t";const n=this.text.substring(t);e+=this.supportCodicons?Object(r.f)(Object(o.u)(n)):Object(o.u)(n),e+=""}this.domNode.innerHTML=e,this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let n=0,i=0;return e.replace(/\r\n|\r|\n/g,(e,r)=>{i="\r\n"===e?-1:0,r+=n;for(const e of t)e.end<=r||(e.start>=r&&(e.start+=i),e.end>=r&&(e.end+=i));return n+=i,"⏎"})}}},function(e,t,n){var i;if(!i)try{i=n(564)}catch(e){}i||(i=window.d3),e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(135),r=n(144);t.default=function(e,t){return i.default.lang.round(r.default.parse(e)[t])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(12);const r=i.b.performance&&"function"==typeof i.b.performance.now;class o{constructor(e){this._highResolution=r&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new o(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?i.b.performance.now():(new Date).getTime()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return u}));var i=n(8);function r(e){return o(e,0)}function o(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(n=e,i=s(104579,i=t),n.reduce((e,t)=>o(t,e),i)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=a(n,t),o(e[n],t)),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var n,i}function s(e,t){return(t<<5)-t+e|0}function a(e,t){t=s(149417,t);for(let n=0,i=e.length;n>>i)>>>0}function c(e,t=0,n=e.byteLength,i=0){for(let r=0;r>>0).toString(16),t/4)}class u{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const n=this._buff;let r,o,s=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(r=a,o=-1,a=0):(r=e.charCodeAt(0),o=0);;){let l=r;if(i.F(r)){if(!(o+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),d(this._h0)+d(this._h1)+d(this._h2)+d(this._h3)+d(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=u._bigBlock32,t=this._buffDV;for(let n=0;n<64;n+=4)e.setUint32(n,t.getUint32(n,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let n,i,r,o=this._h0,s=this._h1,a=this._h2,c=this._h3,d=this._h4;for(let t=0;t<80;t++)t<20?(n=s&a|~s&c,i=1518500249):t<40?(n=s^a^c,i=1859775393):t<60?(n=s&a|s&c|a&c,i=2400959708):(n=s^a^c,i=3395469782),r=l(o,5)+n+d+i+e.getUint32(4*t,!1)&4294967295,d=c,c=a,a=l(s,30),s=o,o=r;this._h0=this._h0+o&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+d&4294967295}}u._bigBlock32=new DataView(new ArrayBuffer(320))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("labelService")},function(e,t,n){"use strict";n.r(t),n.d(t,"MoveWordCommand",(function(){return p})),n.d(t,"WordLeftCommand",(function(){return m})),n.d(t,"WordRightCommand",(function(){return _})),n.d(t,"CursorWordStartLeft",(function(){return b})),n.d(t,"CursorWordEndLeft",(function(){return v})),n.d(t,"CursorWordLeft",(function(){return y})),n.d(t,"CursorWordStartLeftSelect",(function(){return w})),n.d(t,"CursorWordEndLeftSelect",(function(){return C})),n.d(t,"CursorWordLeftSelect",(function(){return S})),n.d(t,"CursorWordAccessibilityLeft",(function(){return k})),n.d(t,"CursorWordAccessibilityLeftSelect",(function(){return x})),n.d(t,"CursorWordStartRight",(function(){return L})),n.d(t,"CursorWordEndRight",(function(){return M})),n.d(t,"CursorWordRight",(function(){return D})),n.d(t,"CursorWordStartRightSelect",(function(){return E})),n.d(t,"CursorWordEndRightSelect",(function(){return T})),n.d(t,"CursorWordRightSelect",(function(){return O})),n.d(t,"CursorWordAccessibilityRight",(function(){return N})),n.d(t,"CursorWordAccessibilityRightSelect",(function(){return I})),n.d(t,"DeleteWordCommand",(function(){return A})),n.d(t,"DeleteWordLeftCommand",(function(){return R})),n.d(t,"DeleteWordRightCommand",(function(){return P})),n.d(t,"DeleteWordStartLeft",(function(){return j})),n.d(t,"DeleteWordEndLeft",(function(){return F})),n.d(t,"DeleteWordLeft",(function(){return B})),n.d(t,"DeleteWordStartRight",(function(){return W})),n.d(t,"DeleteWordEndRight",(function(){return H})),n.d(t,"DeleteWordRight",(function(){return Y}));var i=n(4),r=n(51),o=n(23),s=n(122),a=n(105),l=n(10),c=n(3),d=n(22),u=n(7),h=n(67),f=n(9),g=n(27);class p extends i.c{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=Object(a.a)(t.getOption(105)),r=t.getModel(),s=t.getSelections().map(e=>{const t=new l.a(e.positionLineNumber,e.positionColumn),n=this._move(i,r,t,this._wordNavigationType);return this._moveTo(e,n,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",0,s.map(e=>o.d.fromModelSelection(e))),1===s.length){const e=new l.a(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,n){return n?new d.a(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new d.a(t.lineNumber,t.column,t.lineNumber,t.column)}}class m extends p{_move(e,t,n,i){return s.a.moveWordLeft(e,t,n,i)}}class _ extends p{_move(e,t,n,i){return s.a.moveWordRight(e,t,n,i)}}class b extends m{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class v extends m{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class y extends m{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:u.a.textInputFocus,primary:2063,mac:{primary:527},weight:100}})}}class w extends m{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class C extends m{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class S extends m{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:u.a.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})}}class k extends m{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0,kbOpts:{kbExpr:f.a.and(u.a.textInputFocus,h.a),win:{primary:2063},weight:101}})}_move(e,t,n,i){return super._move(Object(a.a)(g.g.wordSeparators.defaultValue),t,n,i)}}class x extends m{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.a.and(u.a.textInputFocus,h.a),win:{primary:3087},weight:101}})}_move(e,t,n,i){return super._move(Object(a.a)(g.g.wordSeparators.defaultValue),t,n,i)}}class L extends _{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class M extends _{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:u.a.textInputFocus,primary:2065,mac:{primary:529},weight:100}})}}class D extends _{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class E extends _{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class T extends _{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:u.a.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})}}class O extends _{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class N extends _{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0,kbOpts:{kbExpr:f.a.and(u.a.textInputFocus,h.a),win:{primary:2065},weight:101}})}_move(e,t,n,i){return super._move(Object(a.a)(g.g.wordSeparators.defaultValue),t,n,i)}}class I extends _{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0,kbOpts:{kbExpr:f.a.and(u.a.textInputFocus,h.a),win:{primary:3089},weight:101}})}_move(e,t,n,i){return super._move(Object(a.a)(g.g.wordSeparators.defaultValue),t,n,i)}}class A extends i.c{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=Object(a.a)(t.getOption(105)),o=t.getModel(),s=t.getSelections().map(e=>{const t=this._delete(i,o,e,this._whitespaceHeuristics,this._wordNavigationType);return new r.a(t,"")});t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class R extends A{_delete(e,t,n,i,r){let o=s.a.deleteWordLeft(e,t,n,i,r);return o||new c.a(1,1,1,1)}}class P extends A{_delete(e,t,n,i,r){let o=s.a.deleteWordRight(e,t,n,i,r);if(o)return o;const a=t.getLineCount(),l=t.getLineMaxColumn(a);return new c.a(a,l,a,l)}}class j extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.a.writable})}}class F extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.a.writable})}}class B extends R{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.a.writable,kbOpts:{kbExpr:u.a.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class W extends P{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.a.writable})}}class H extends P{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.a.writable})}}class Y extends P{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.a.writable,kbOpts:{kbExpr:u.a.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}Object(i.l)(new b),Object(i.l)(new v),Object(i.l)(new y),Object(i.l)(new w),Object(i.l)(new C),Object(i.l)(new S),Object(i.l)(new L),Object(i.l)(new M),Object(i.l)(new D),Object(i.l)(new E),Object(i.l)(new T),Object(i.l)(new O),Object(i.l)(new k),Object(i.l)(new x),Object(i.l)(new N),Object(i.l)(new I),Object(i.l)(new j),Object(i.l)(new F),Object(i.l)(new B),Object(i.l)(new W),Object(i.l)(new H),Object(i.l)(new Y)},function(e,t,n){"use strict";var i,r=n(1),o=n(184),s=n(15),a=n(81),l=n(149),c=n(342);let d;!function e(t,n,r){function o(a,l){if(!n[a]){if(!t[a]){if(!l&&"function"==typeof i&&i)return i(a,!0);if(s)return s(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[a]={exports:{}};t[a][0].call(d.exports,(function(e){return o(t[a][1][e]||e)}),d,d.exports,e,t,n,r)}return n[a].exports}for(var s="function"==typeof i&&i,a=0;a\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):d.test(e)?g(a,m):c.test(e)&&g(s,p);var i;!function(){if(!n)return;var i,r=e.indexOf("<");r>=0?(i=e.substring(0,r),e=e.substring(r)):(i=e,e="");t.chars&&t.chars(i)}()}();var i=e===h;h=e,i&&(e="")}function g(t,i){var r=e.match(t);r&&(e=e.substring(r[0].length),r[0].replace(t,i),n=!1)}function p(e,n,s,a){var c={},d=r(n),h=o.voids[d]||!!a;s.replace(l,(function(e,t,n,r,o){c[t]=void 0===n&&void 0===r&&void 0===o?void 0:i.decode(n||r||o||"")})),h||u.push(d),t.start&&t.start(d,c,h)}function m(e,n){var i,o=0,s=r(n);if(s)for(o=u.length-1;o>=0&&u[o]!==s;o--);if(o>=0){for(i=u.length-1;i>=o;i--)t.end&&t.end(u[i]);u.length=o}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var i=e("he"),r=e("./lowercase"),o=e("./attributes"),s=e("./elements");t.exports=function(e,t){var n,a=t||{};return u(),{start:function(e,t,s){var d=r(e);if(n.ignoring)return void c(d);if(-1===(a.allowedTags||[]).indexOf(d))return void c(d);if(a.filter&&!a.filter({tag:d,attrs:t}))return void c(d);l("<"),l(d),Object.keys(t).forEach((function(e){var n=t[e],s=(a.allowedClasses||{})[d]||[],c=(a.allowedAttributes||{})[d]||[];c=c.concat((a.allowedAttributes||{})["*"]||[]);var u=r(e);("class"===u&&-1===c.indexOf(u)?(n=n.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(u)&&(!0!==o.uris[u]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var i=e.indexOf("?");if(-1!==i&&n>i)return!0;var r=e.indexOf("#");if(-1!==r&&n>r)return!0;return a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(n)))&&(l(" "),l(e),"string"==typeof n&&(l('="'),l(i.encode(n)),l('"')))})),l(s?"/>":">")},end:function(e){var t=r(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(l("")):d(t)},chars:function(e){!1===n.ignoring&&l(a.transformText?a.transformText(e):e)}};function l(t){e.push(t)}function c(e){s.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function d(e){n.ignoring===e&&--n.depth<=0&&u()}function u(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var i={"&":"&","<":"<",">":">",'"':""","'":"'"},r={"&":"&","<":"<",">":">",""":'"',"'":"'"},o=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return i[e]}function l(e){return r[e]}function c(e){return null==e?"":String(e).replace(s,a)}function d(e){return null==e?"":String(e).replace(o,l)}c.options=d.options={},t.exports={encode:c,escape:c,decode:d,unescape:d,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function i(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(i,{})}},{}]},{},[4]);var u=d,h=n(233),f=n(37),g=n(8),p=n(24),m=n(35),_=n(16),b=n(42),v=n(59);var y=n(66),w=n(98),C=n(231),S=n(17),k=n(6),x=n(2),L=n(11);n.d(t,"a",(function(){return D}));var M=function(e,t){return function(n,i){t(n,i,e)}};let D=class extends x.a{constructor(e,t,n=y.b){super(),this._editor=e,this._modeService=t,this._openerService=n,this._onDidRenderCodeBlock=this._register(new k.a),this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}getOptions(e){return{codeBlockRenderer:(e,t)=>{let n=null;if(e)n=this._modeService.getModeIdForLanguageName(e);else{const e=this._editor.getModel();e&&(n=e.getLanguageIdentifier().language)}return this._modeService.triggerMode(n||""),Promise.resolve(!0).then(e=>{const i=L.C.getPromise(n||"");return i?i.then(e=>Object(C.b)(t,e)):Object(C.b)(t,void 0)}).then(e=>`${e}`)},codeBlockRenderCallback:()=>this._onDidRenderCodeBlock.fire(),actionHandler:{callback:e=>{this._openerService.open(e,{fromUserGesture:!0}).catch(s.e)},disposeables:e}}}render(e){const t=new x.b;let n;return{element:n=e?function(e,t={},n={}){var i;const d=Object(o.a)(t),y=function(t){let n;try{n=Object(h.a)(decodeURIComponent(t))}catch(e){}return n?(n=Object(f.b)(n,t=>e.uris&&e.uris[t]?p.a.revive(e.uris[t]):void 0),encodeURIComponent(JSON.stringify(n))):t},w=function(t,n){const i=e.uris&&e.uris[t];if(!i)return t;let o=p.a.revive(i);return p.a.parse(t).toString()===o.toString()?t:n?r.r(o).toString(!0):(o.query&&(o=o.with({query:y(o.query)})),o.toString())};let C;const S=new Promise(e=>C=e),k=new c.Renderer;k.image=(e,n,i)=>{let r=[],o=[];if(e){({href:e,dimensions:r}=Object(a.d)(e)),e=w(e,!0);try{const n=p.a.parse(e);t.baseUrl&&n.scheme===m.b.file&&(e=Object(b.k)(t.baseUrl,e).toString())}catch(e){}o.push(`src="${e}"`)}return i&&o.push(`alt="${i}"`),n&&o.push(`title="${n}"`),r.length&&(o=o.concat(r)),""},k.link=(n,i,r)=>{if(n===r&&(r=Object(a.e)(r)),n=w(n,!1),t.baseUrl){/^\w[\w\d+.-]*:/.test(n)||(n=Object(b.k)(t.baseUrl,n).toString())}return i=Object(a.e)(i),!(n=Object(a.e)(n))||n.match(/^data:|javascript:/i)||n.match(/^command:/i)&&!e.isTrusted||n.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?r:`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${i||n}">${r}`},k.paragraph=t=>`

${e.supportThemeIcons?Object(_.f)(t):t}

`,t.codeBlockRenderer&&(k.code=(e,n)=>{const i=t.codeBlockRenderer(n,e),r=l.b.nextId(),o=Promise.all([i,S]).then(e=>{const t=e[0],n=d.querySelector(`div[data-code="${r}"]`);n&&(n.innerHTML=t)}).catch(e=>{});return t.codeBlockRenderCallback&&o.then(t.codeBlockRenderCallback),`
${Object(g.u)(e)}
`});const x=t.actionHandler;x&&[r.c.CLICK,r.c.AUXCLICK].forEach(e=>{x.disposeables.add(r.i(d,e,e=>{const t=new v.a(e);if(!t.leftButton&&!t.middleButton)return;let n=t.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName)try{const e=n.dataset.href;e&&x.callback(e,t)}catch(e){Object(s.e)(e)}finally{t.preventDefault()}}))}),n.sanitizer=t=>{return(e.isTrusted?t.match(/^()|(<\/\s*span>)$/):void 0)?t:""},n.sanitize=!0,n.renderer=k;const L=[m.b.http,m.b.https,m.b.mailto,m.b.data,m.b.file,m.b.vscodeRemote,m.b.vscodeRemoteResource];e.isTrusted&&L.push(m.b.command);let M=null!==(i=e.value)&&void 0!==i?i:"";M.length>1e5&&(M=`${M.substr(0,1e5)}…`);const D=c.parse(e.supportThemeIcons?Object(_.d)(M):M,n);return d.innerHTML=u(D,{allowedSchemes:L,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:function(t){return"span"!==t.tag||!e.isTrusted||1!==Object.keys(t.attrs).length||(t.attrs.style?!!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!!t.attrs.class&&!!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-animation-[a-z\-]+)?$/))}}),C(),d}(e,this.getOptions(t)):document.createElement("span"),dispose:()=>t.dispose()}}};D=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([M(1,w.a),M(2,Object(S.d)(y.a))],D)},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return y})),n.d(t,"d",(function(){return M})),n.d(t,"c",(function(){return D}));var i=n(0),r=n(6),o=n(2),s=n(37),a=n(14),l=n(27),c=n(128),d=n(173),u=n(120),h=n(46),f=n(266);const g=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new r.a,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},p=Object.hasOwnProperty;class m{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class b{static readOptions(e){const t=e,n=new _;for(const e of l.k){const i="_never_"===e.name?void 0:t[e.name];n._write(e.id,i)}return n}static validateOptions(e){const t=new l.j;for(const n of l.k)t._write(n.id,n.validate(e._read(n.id)));return t}static computeOptions(e,t){const n=new m;for(const i of l.k)n._write(i.id,i.compute(t,n,e._read(i.id)));return n}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a.g(e,t);for(let n in e)if(!b._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let i=!1;for(const r of l.k){const o=!b._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=o,o&&(i=!0)}return i?new l.b(n):null}}function v(e){const t=s.c(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const n=e.lineNumbers;!0===n?e.lineNumbers="on":!1===n&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const i=e.renderWhitespace;!0===i?e.renderWhitespace="boundary":!1===i&&(e.renderWhitespace="none");const r=e.renderLineHighlight;!0===r?e.renderLineHighlight="line":!1===r&&(e.renderLineHighlight="none");const o=e.acceptSuggestionOnEnter;!0===o?e.acceptSuggestionOnEnter="on":!1===o&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Object(f.b)(e,e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)})}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");const u=e.matchBrackets;!0===u?e.matchBrackets="always":!1===u&&(e.matchBrackets="never")}(t),t}class y extends o.a{constructor(e,t){super(),this._onDidChange=this._register(new r.a),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new r.a),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l.a,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=v(t),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._register(c.a.onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(g.onDidChangeTabFocus(e=>this._recomputeOptions()))}observeReferenceElement(e){}dispose(){super.dispose()}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const n=b.checkEquals(e,t);if(null===n)return;this.options=t,this._onDidChangeFast.fire(n),this._onDidChange.fire(n)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=d.a.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,this.isSimpleWidget),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:g.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return b.computeOptions(this._validatedOptions,n)}static _subsetEquals(e,t){for(const n in t)if(p.call(t,n)){const i=t[n],r=e[n];if(r===i)continue;if(Array.isArray(r)&&Array.isArray(i)){if(!a.g(r,i))return!1;continue}if(r&&"object"==typeof r&&i&&"object"==typeof i){if(!this._subsetEquals(r,i))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=v(e);y._subsetEquals(this._rawOptions,t)||(this._rawOptions=s.g(this._rawOptions,t||{}),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=y._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const w=Object.freeze({id:"editor",order:5,type:"object",title:i.a("editorConfigurationTitle","Editor"),scope:5}),C=h.a.as(u.a.Configuration),S=Object.assign(Object.assign({},w),{properties:{"editor.tabSize":{type:"number",default:l.d.tabSize,minimum:1,markdownDescription:i.a("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l.d.insertSpaces,markdownDescription:i.a("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l.d.detectIndentation,markdownDescription:i.a("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l.d.trimAutoWhitespace,description:i.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l.d.largeFileOptimizations,description:i.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:i.a("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[i.a("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),i.a("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),i.a("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:i.a("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:i.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:i.a("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:i.a("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.a("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:i.a("codeLens","Controls whether the editor shows CodeLens.")}}});for(const e of l.k){const t=e.schema;if(void 0!==t)if(void 0!==(k=t).type||void 0!==k.anyOf)S.properties[`editor.${e.name}`]=t;else for(let e in t)p.call(t,e)&&(S.properties[e]=t[e])}var k;let x=null;function L(){return null===x&&(x=Object.create(null),Object.keys(S.properties).forEach(e=>{x[e]=!0})),x}function M(e){return L()[`editor.${e}`]||!1}function D(e){return L()[`diffEditor.${e}`]||!1}C.registerConfiguration(S)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var i=n(12),r=n(128);const o=i.f?1.5:1.35,s=8;class a{constructor(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,n){const i=e.get(35),r=e.get(39),o=e.get(38),s=e.get(37),l=e.get(51),c=e.get(48);return a._create(i,r,o,s,l,c,t,n)}static _create(e,t,n,i,l,c,d,u){0===l?l=Math.round(o*n):l1;let r;if(r=Object(l.f)(t.uri,e)?"":Object(l.j)(t.uri,e),i){const e=t.name?t.name:Object(l.b)(t.uri);r=r?e+" • "+r:e}return r}}if(e.scheme!==s.b.file&&e.scheme!==s.b.untitled)return e.with({query:null,fragment:null}).toString(!0);if(u(e.fsPath))return Object(r.d)(h(e.fsPath));let c=Object(r.d)(e.fsPath);return!a.i&&(null==t?void 0:t.userHome)&&(c=function(e,t){if(a.i||!e||!t)return e;let n=f.original===t?f.normalized:void 0;n||(n=`${Object(o.Q)(t,r.e.sep)}${r.e.sep}`,f={original:t,normalized:n});(a.d?e.startsWith(n):Object(o.T)(e,n))&&(e=`~/${e.substr(n.length)}`);return e}(c,t.userHome.fsPath)),c}function d(e){if(!e)return;"string"==typeof e&&(e=i.a.file(e));const t=Object(l.b)(e)||(e.scheme===s.b.file?e.fsPath:e.path);return u(t)?h(t):t}function u(e){return!(!a.i||!e||":"!==e[1])}function h(e){return u(e)?e.charAt(0).toUpperCase()+e.slice(1):e}let f=Object.create(null)},function(e,t,n){"use strict";var i=n(37),r=n(2),o=n(50),s=n(1),a=n(6),l=n(34),c=n(94),d=n(201),u=n(91);function h(e,t){const n=[];for(let i of t){if(e.start>=i.range.end)continue;if(e.end({range:f(e.range,i),size:e.size})),s=n.map((t,n)=>({range:{start:e+n,end:e+n+1},size:t.size}));this.groups=function(...e){return function(e){const t=[];let n=null;for(let i of e){const e=i.range.start,r=i.range.end,o=i.size;n&&o===n.size?n.range.end=r:(n={range:{start:e,end:r},size:o},t.push(n))}return t}(e.reduce((e,t)=>e.concat(t),[]))}(r,s,o),this._size=this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,n=0;for(let i of this.groups){const r=i.range.end-i.range.start,o=n+r*i.size;if(e{for(const n of e){this.getRenderer(t).disposeTemplate(n.templateData),n.domNode=null,n.templateData=null}}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var m=n(89),_=n(14),b=n(115),v=n(19),y=n(30);n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return M}));var w=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};const C={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;tn,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>void 0}}class M{constructor(e,t,n,u=C){if(this.virtualDelegate=t,this.domId=`list_id_${++M.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new v.a(50),this.splicing=!1,this.dragOverAnimationStopDisposable=r.a.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=r.a.None,this.onDragLeaveTimeout=r.a.None,this.disposables=new r.b,this._onDidChangeContentHeight=new a.a,this._horizontalScrolling=!1,u.horizontalScrolling&&u.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new g;for(const e of n)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new p(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",s.e(this.domNode,this.domId),this.domNode.tabIndex=0,s.ab(this.domNode,"mouse-support","boolean"!=typeof u.mouseSupport||u.mouseSupport),this._horizontalScrolling=Object(i.f)(u,e=>e.horizontalScrolling,C.horizontalScrolling),s.ab(this.domNode,"horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===u.additionalScrollHeight?0:u.additionalScrollHeight,this.accessibilityProvider=new L(u.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",Object(i.f)(u,e=>e.transformOptimization,C.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(o.b.addTarget(this.rowsContainer)),this.scrollable=new d.a(Object(i.f)(u,e=>e.smoothScrolling,!1)?125:0,e=>s.Y(e)),this.scrollableElement=this.disposables.add(new c.c(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:1,vertical:Object(i.f)(u,e=>e.verticalScrollMode,C.verticalScrollMode),useShadows:Object(i.f)(u,e=>e.useShadows,C.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),Object(l.a)(this.rowsContainer,o.a.Change)(this.onTouchChange,this,this.disposables),Object(l.a)(this.scrollableElement.getDomNode(),"scroll")(e=>e.target.scrollTop=0,null,this.disposables),a.b.map(Object(l.a)(this.domNode,"dragover"),e=>this.toDragEvent(e))(this.onDragOver,this,this.disposables),a.b.map(Object(l.a)(this.domNode,"drop"),e=>this.toDragEvent(e))(this.onDrop,this,this.disposables),Object(l.a)(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),Object(l.a)(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=Object(i.f)(u,e=>e.setRowLineHeight,C.setRowLineHeight),this.setRowHeight=Object(i.f)(u,e=>e.setRowHeight,C.setRowHeight),this.supportDynamicHeights=Object(i.f)(u,e=>e.supportDynamicHeights,C.supportDynamicHeights),this.dnd=Object(i.f)(u,e=>e.dnd,C.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,s.ab(this.domNode,"horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:s.B(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=u.a.intersect(i,o);for(let e=s.start;e({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:r.a.None}));let h;0===e&&t>=this.items.length?(this.rangeMap=new g,this.rangeMap.splice(0,0,d),this.items=d,h=[]):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const p=n.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=f(l,p),b=u.a.intersect(m,_);for(let e=b.start;ef(e,p)),w=[{start:e,end:e+n.length},...y].map(e=>u.a.intersect(m,e)),C=this.getNextToLastElement(w);for(const e of w)for(let t=e.start;te.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=s.Y(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth()):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let n={height:"number"==typeof e?e:s.A(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:s.B(this.domNode)}))}render(e,t,n,i,r,o=!1){const s=this.getRenderRange(t,n),a=u.a.relativeComplement(s,e),l=u.a.relativeComplement(e,s),c=this.getNextToLastElement(a);if(o){const t=u.a.intersect(e,s);for(let e=t.start;ethis.onDragStart(n.element,r,e))}this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=y.h?"-moz-fit-content":"fit-content",e.width=s.B(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),s.ab(e.row.domNode,"drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];t.dragStartDisposable.dispose();const n=this.renderers.get(t.templateId);t.row&&n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null,this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return a.b.map(Object(l.a)(this.domNode,"click"),e=>this.toMouseEvent(e))}get onMouseDblClick(){return a.b.map(Object(l.a)(this.domNode,"dblclick"),e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return a.b.filter(a.b.map(Object(l.a)(this.domNode,"auxclick"),e=>this.toMouseEvent(e)),e=>1===e.browserEvent.button)}get onMouseDown(){return a.b.map(Object(l.a)(this.domNode,"mousedown"),e=>this.toMouseEvent(e))}get onContextMenu(){return a.b.map(Object(l.a)(this.domNode,"contextmenu"),e=>this.toMouseEvent(e))}get onTouchStart(){return a.b.map(Object(l.a)(this.domNode,"touchstart"),e=>this.toTouchEvent(e))}get onTap(){return a.b.map(Object(l.a)(this.rowsContainer,o.a.Tap),e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){if(!n.dataTransfer)return;const i=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(b.a.RESOURCES,JSON.stringify([t])),n.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(i,n)),void 0===e&&(e=String(i.length));const t=s.a(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),n.dataTransfer.setDragImage(t,-10,-10),setTimeout(()=>document.body.removeChild(t),0)}this.currentDragData=new S(i),b.c.CurrentDragAndDropData=new k(i),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,n)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),b.c.CurrentDragAndDropData&&"vscode-ui"===b.c.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(b.c.CurrentDragAndDropData)this.currentDragData=b.c.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new x}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let n;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",n="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],n=-1===(n=Object(_.e)(n).filter(e=>e>=-1&&ee-t))[0]?[-1]:n,i=this.currentDragFeedback,o=n,Array.isArray(i)&&Array.isArray(o)?Object(_.g)(i,o):i===o)return!0;var i,o;if(this.currentDragFeedback=n,this.currentDragFeedbackDisposable.dispose(),-1===n[0])s.e(this.domNode,"drop-target"),s.e(this.rowsContainer,"drop-target"),this.currentDragFeedbackDisposable=Object(r.h)(()=>{s.Q(this.domNode,"drop-target"),s.Q(this.rowsContainer,"drop-target")});else{for(const e of n){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode&&s.e(t.row.domNode,"drop-target")}this.currentDragFeedbackDisposable=Object(r.h)(()=>{for(const e of n){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode&&s.Q(t.row.domNode,"drop-target")}})}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Object(v.g)(()=>this.clearDragOverFeedback(),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,b.c.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,b.c.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=r.a.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=s.F(this.domNode).top;this.dragOverAnimationDisposable=s.o(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Object(v.g)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){const e=n.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t){const n=this.getRenderRange(e,t);let i,r;e===this.elementTop(n.start)?(i=n.start,r=0):n.end-n.start>1&&(i=n.start+1,r=this.elementTop(i)-e);let o=0;for(;;){const s=this.getRenderRange(e,t);let a=!1;for(let e=s.start;e{t(this._create(e))})}onMouseUp(e,t){return r.i(e,"mouseup",e=>{t(this._create(e))})}onMouseDown(e,t){return r.i(e,"mousedown",e=>{t(this._create(e))})}onMouseLeave(e,t){return r.j(e,e=>{t(this._create(e))})}onMouseMoveThrottled(e,t,n,i){return r.l(e,"mousemove",t,(e,t)=>n(e,this._create(t)),i)}}class L{constructor(e){this._editorViewDomNode=e}_create(e){return new k(e,this._editorViewDomNode)}onPointerUp(e,t){return r.i(e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return r.i(e,"pointerdown",e=>{t(this._create(e))})}onPointerLeave(e,t){return r.k(e,e=>{t(this._create(e))})}onPointerMoveThrottled(e,t,n,i){return r.l(e,"pointermove",t,(e,t)=>n(e,this._create(t)),i)}}class M extends a.a{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new v.a),this._keydownListener=null}startMonitoring(e,t,n,i,o){this._keydownListener=r.n(document,"keydown",e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0)},!0);this._globalMouseMoveMonitor.startMonitoring(e,t,(e,t)=>n(e,new k(t,this._editorViewDomNode)),i,()=>{this._keydownListener.dispose(),o()})}}class D extends a.a{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,i=e.length;n=a?r=Math.max(r,a+l-i):(t[n++]=new A(i,r),i=a,r=l)}return t[n++]=new A(i,r),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const n=[];for(let i=0,r=e.length;ia)return null;if((t=Math.min(a,Math.max(0,t)))===(i=Math.min(a,Math.max(0,i)))&&n===r&&0===n){const n=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(n,o)}t!==i&&i>0&&0===r&&(i--,r=1073741824);let l=e.children[t].firstChild,c=e.children[i].firstChild;if(l&&c||(!l&&0===n&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!c&&0===r&&i>0&&(c=e.children[i-1].firstChild,r=1073741824)),!l||!c)return null;n=Math.min(l.textContent.length,Math.max(0,n)),r=Math.min(c.textContent.length,Math.max(0,r));const d=this._readClientRects(l,n,c,r,s);return this._createHorizontalRangesFromClientRects(d,o)}}var B=n(163),W=n(79),H=n(18),Y=n(27);const V=!!g.g||!(g.d||b.h||b.j);let z=!0;const U=b.f;class ${constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class q{constructor(e,t){this.themeType=t;const n=e.options,i=n.get(36);this.renderWhitespace=n.get(80),this.renderControlCharacters=n.get(74),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(24),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(51),this.stopRenderingLineAfter=n.get(95),this.fontLigatures=n.get(37)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class K{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(f.b)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!U&&this._options.themeType!==H.b&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const r=n.getViewLineRenderingData(e),o=this._options,s=B.a.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn);let a=null;if(U||o.themeType===H.b||"selection"===this._options.renderWhitespace){const t=n.selections;for(const n of t){if(n.endLineNumbere)continue;const t=n.startLineNumber===e?n.startColumn:r.minColumn,i=n.endLineNumber===e?n.endColumn:r.maxColumn;t');const c=Object(W.d)(l,i);i.appendASCIIString("");let d=null;return z&&V&&r.isBasicASCII&&o.useMonospaceOptimizations&&0===c.containsForeignElements&&r.content.length<300&&l.lineTokens.getCount()<100&&(d=new G(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=X(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof G}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof G?this._renderedViewLine.monospaceAssumptionsAreValid():z}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof G&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const i=0|this._renderedViewLine.input.stopRenderingLineAfter;let r=!1;-1!==i&&e>i+1&&t>i+1&&(r=!0),-1!==i&&e>i+1&&(e=i+1),-1!==i&&t>i+1&&(t=i+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return o&&o.length>0?new P(r,o):null}getColumnOfNodeOffset(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}K.CLASS_NAME="view-line";class G{constructor(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return z;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),z=!1),z}toSlowRenderedLine(){return X(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n){const i=this._getCharPosition(e),r=this._getCharPosition(t);return[new A(i,r-i)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let r=-1;for(;t;)t=t.previousSibling,r++;return this._characterMapping.partDataToCharOffset(r,i,n)+1}}class Z{constructor(e,t,n,i,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const i=this._readPixelOffset(this.domNode,e,n);if(-1===i)return null;const r=this._readPixelOffset(this.domNode,t,n);return-1===r?null:[new A(i,r-i)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)}_readVisibleRangesForRange(e,t,n,i){if(t===n){const n=this._readPixelOffset(e,t,i);return-1===n?null:[new A(n,0)]}return this._readRawVisibleRangesForRange(e,t,n,i)}_readPixelOffset(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const i=this._pixelOffsetCache[t];if(-1!==i)return i;const r=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=r,r}return this._actualReadPixelOffset(e,t,n)}_actualReadPixelOffset(e,t,n){if(0===this._characterMapping.length){const t=F.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const i=this._characterMapping.charOffsetToPartData(t-1),r=W.a.getPartIndex(i),o=W.a.getCharIndex(i),s=F.readHorizontalRanges(this._getReadingTarget(e),r,o,r,o,n.clientRectDeltaLeft,n.endNode);if(!s||0===s.length)return-1;const a=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffsets(),n=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(n-a)<=1)return n}return a}_readRawVisibleRangesForRange(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new A(0,this.getWidth())];const r=this._characterMapping.charOffsetToPartData(t-1),o=W.a.getPartIndex(r),s=W.a.getCharIndex(r),a=this._characterMapping.charOffsetToPartData(n-1),l=W.a.getPartIndex(a),c=W.a.getCharIndex(a);return F.readHorizontalRanges(this._getReadingTarget(e),o,s,l,c,i.clientRectDeltaLeft,i.endNode)}getColumnOfNodeOffset(e,t,n){const i=t.textContent.length;let r=-1;for(;t;)t=t.previousSibling,r++;return this._characterMapping.partDataToCharOffset(r,i,n)+1}}class J extends Z{_readVisibleRangesForRange(e,t,n,i){const r=super._readVisibleRangesForRange(e,t,n,i);if(!r||0===r.length||t===n||1===t&&n===this._characterMapping.length)return r;if(!this.input.containsRTL){const t=this._readPixelOffset(e,n,i);if(-1!==t){const e=r[r.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class ae{constructor(e,t,n){this.model=e.model;const i=e.configuration.options;this.layoutInfo=i.get(117),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(51),this.typicalHalfwidthCharacterWidth=i.get(36).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return ae.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){let i,r=n.verticalOffset+n.height/2,o=e.model.getLineCount(),s=null,a=null;return n.afterLineNumber!==o&&(a=new te.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(s=new te.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),i=null===a?s:null===s?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,he._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ce extends le{constructor(e,t,n,i){super(e,t,n),this._ctx=e,i?(this.target=i,this.targetPath=T.collect(i,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,n=null,i=null){let r=this.mouseColumn;return t&&t.columno.contentLeft+o.width)continue;const n=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(n<=r&&r<=n+o.height)return t.fulfill(6,o.position)}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const e=t.isInContentArea?8:5;return t.fulfill(e,n.position,null,n)}return null}static _hitTestTextArea(e,t){return se.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition();let r=Math.abs(t.pos.x-t.editorPos.x);const o={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return(r-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,o):(r-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,o):(r-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,o))}return null}static _hitTestViewLines(e,t,n){if(!se.isChildOfViewLines(t.targetPath))return null;if(e.isAfterLines(t.mouseVerticalOffset)){const n=e.model.getLineCount(),i=e.model.getLineMaxColumn(n);return t.fulfill(7,new te.a(n,i),void 0,de)}if(n){if(se.isStrictChildOfViewLines(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(n)){const i=e.getLineWidth(n),r=ue(t.mouseContentHorizontalOffset-i);return t.fulfill(7,new te.a(n,1),void 0,r)}const i=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>=i){const r=ue(t.mouseContentHorizontalOffset-i),o=new te.a(n,e.model.getLineMaxColumn(n));return t.fulfill(7,o,void 0,r)}}return t.fulfill(0)}const i=he._doHitTest(e,t);return i.position?he.createMouseTargetFromHitTestPosition(e,t,i.position.lineNumber,i.position.column):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}static _hitTestMinimap(e,t){if(se.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new te.a(n,i))}return null}static _hitTestScrollbarSlider(e,t){if(se.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new te.a(n,i))}}return null}static _hitTestScrollbar(e,t){if(se.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new te.a(n,i))}return null}getMouseColumn(e,t){const n=this._context.configuration.options,i=n.get(117),r=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-i.contentLeft;return he._getMouseColumn(r,n.get(36).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,i){const r=new te.a(n,i),o=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>o){if(b.f&&1===r.column){const i=ue(t.mouseContentHorizontalOffset-o);return t.fulfill(7,new te.a(n,e.model.getLineMaxColumn(n)),void 0,i)}const i=ue(t.mouseContentHorizontalOffset-o);return t.fulfill(7,r,void 0,i)}const s=e.visibleRangeForPosition(n,i);if(!s)return t.fulfill(0,r);const a=s.left;if(t.mouseContentHorizontalOffset===a)return t.fulfill(6,r);const l=[];if(l.push({offset:s.left,column:i}),i>1){const t=e.visibleRangeForPosition(n,i-1);t&&l.push({offset:t.left,column:i-1})}if(ie.offset-t.offset);for(let e=1;e=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1);const o=new y(t.pos.x,r),s=this._actualDoHitTestWithCaretRangeFromPoint(e,o.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=r.E(e.viewDomNode);let i;if(!(i=n?void 0===n.caretRangeFromPoint?function(e,t,n){const i=document.createRange();let r=e.elementFromPoint(t,n);if(null!==r){for(;r&&r.firstChild&&r.firstChild.nodeType!==r.firstChild.TEXT_NODE;)r=r.lastChild;const e=r.getBoundingClientRect(),n=window.getComputedStyle(r,null).getPropertyValue("font"),o=r.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=o.length;else{const e=fe.getInstance();for(let i=0;ithis._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1;const i=new x(this.viewHelper.viewDomNode);this._register(i.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(i.onMouseMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),pe(this.mouseTargetFactory),me.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(i.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(i.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)));this._register(r.i(this.viewHelper.viewDomNode,r.c.MOUSE_WHEEL,e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(59))return;const t=new m.b(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){const e=ge.a.getZoomLevel(),n=t.deltaY>0?1:-1;ge.a.setZoomLevel(e+n),t.preventDefault(),t.stopPropagation()}},{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const n=new w(e,t).toPageCoordinates(),i=S(this.viewHelper.viewDomNode);return n.yi.y+i.height||n.xi.x+i.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),i,n,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(n||r&&o))c(),this._mouseDownOperation.start(t.type,e);else if(i)e.preventDefault();else if(s){const n=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}me.MOUSE_MOVE_MINIMUM_TIME=100;class _e extends a.a{constructor(e,t,n,i,r){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._createMouseTarget=i,this._getMouseColumn=r,this._mouseMoveMonitor=this._register(new M(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new _.e),this._mouseState=new be,this._currentSelection=new h.a(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const i=this._context.configuration.options;if(!i.get(72)&&i.get(25)&&!i.get(13)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,pe(null),e=>this._onMouseDownThenMove(e),()=>{const e=this._findMousePosition(this._lastMouseEvent,!0);this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:e?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,pe(null),e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.model,i=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=i.getCurrentScrollTop()+(e.posy-t.y),s=ae.getZoneAtCoord(this._context,o);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new oe(null,13,r,e)}const a=i.getLineNumberAtVerticalOffset(o);return new oe(null,13,r,new te.a(a,n.getLineMaxColumn(a)))}const o=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new oe(null,13,r,new te.a(o,n.getLineMaxColumn(o))):null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){const e=this._helpPositionJumpOverViewZone(i.detail);if(e)return new oe(i.element,i.type,i.mouseColumn,e,null,i.detail)}return i}_helpPositionJumpOverViewZone(e){const t=new te.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class be{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const n=(new Date).getTime();n-this._lastSetMouseDownCountTime>be.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}be.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var ve=n(136);function ye(e,t){const n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}class we extends me{constructor(e,t,n){super(e,t,n),this.viewHelper.linesContentDomNode.style.touchAction="none",this._installGestureHandlerTimeout=window.setTimeout(()=>{if(this._installGestureHandlerTimeout=-1,window.MSGesture){const e=new MSGesture,t=new MSGesture;e.target=this.viewHelper.linesContentDomNode,t.target=this.viewHelper.linesContentDomNode,this.viewHelper.linesContentDomNode.addEventListener("pointerdown",n=>{const i=n.pointerType;"mouse"!==i?"touch"===i?(this._lastPointerType="touch",e.addPointer(n.pointerId)):(this._lastPointerType="pen",t.addPointer(n.pointerId)):this._lastPointerType="mouse"}),this._register(r.l(this.viewHelper.linesContentDomNode,"MSGestureChange",e=>this._onGestureChange(e),ye)),this._register(r.i(this.viewHelper.linesContentDomNode,"MSGestureTap",e=>this._onCaptureGestureTap(e),!0))}},100),this._lastPointerType="mouse"}_onMouseDown(e){"mouse"===this._lastPointerType&&super._onMouseDown(e)}_onCaptureGestureTap(e){const t=new k(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(t,!1);n.position&&this.viewController.moveTo(n.position),t.browserEvent.fromElement?(t.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(()=>{this.viewHelper.focusTextArea()})}_onGestureChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}dispose(){window.clearTimeout(this._installGestureHandlerTimeout),super.dispose()}}class Ce extends me{constructor(e,t,n){super(e,t,n),this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Tap,e=>this.onTap(e))),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Change,e=>this.onChange(e))),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,e=>this._onContextMenu(new k(e,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(r.i(this.viewHelper.linesContentDomNode,"pointerdown",e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"}));const i=new L(this.viewHelper.viewDomNode);this._register(i.onPointerMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),pe(this.mouseTargetFactory),me.MOUSE_MOVE_MINIMUM_TIME)),this._register(i.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new k(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){e.target&&this.viewHelper.linesContentDomNode.contains(e.target)&&"touch"===this._lastPointerType||super._onMouseDown(e)}}class Se extends me{constructor(e,t,n){super(e,t,n),this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Tap,e=>this.onTap(e))),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Change,e=>this.onChange(e))),this._register(r.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,e=>this._onContextMenu(new k(e,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new k(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class ke extends a.a{constructor(e,t,n){super(),g.c&&ve.a.pointerEvents?this.handler=this._register(new Ce(e,t,n)):window.TouchEvent?this.handler=this._register(new Se(e,t,n)):window.navigator.pointerEnabled||window.PointerEvent?this.handler=this._register(new we(e,t,n)):this.handler=this._register(new me(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}n(590);var xe=n(8),Le=n(187),Me=n(117);n(591);class De extends D{}var Ee=n(47);class Te extends De{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new te.a(1,1),this._renderResult=null,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(51);const t=e.get(52);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(76);const n=e.get(117);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new te.a(e,1));if(1!==t.column)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===e?''+n+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10==0?String(n):"":String(n)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=g.d?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r='
',o=this._context.model.getLineCount(),s=[];for(let e=n;e<=i;e++){const t=e-n;if(!this._renderFinalNewline&&e===o&&0===this._context.model.getLineLength(e)){s[t]="";continue}const i=this._getLineRenderLineNumber(e);s[t]=i?r+i+"
":""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Te.CLASS_NAME="line-numbers",Object(H.g)((e,t)=>{const n=e.getColor(Ee.k);n&&t.addRule(`.monaco-editor .line-numbers { color: ${n}; }`);const i=e.getColor(Ee.b);i&&t.addRule(`.monaco-editor .current-line ~ .line-numbers { color: ${i}; }`)});class Oe extends E{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(117);this._canUseLayerHinting=!t.get(23),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=Object(f.b)(document.createElement("div")),this._domNode.setClassName(Oe.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Object(f.b)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Oe.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(117);return this._canUseLayerHinting=!t.get(23),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}Oe.CLASS_NAME="glyph-margin",Oe.OUTER_CLASS_NAME="margin";var Ne=n(105),Ie=n(146);class Ae{constructor(e,t,n){this.top=e,this.left=t,this.width=n}setWidth(e){return new Ae(this.top,this.left,e)}}const Re=b.f||b.h;class Pe extends E{constructor(e,t,n){super(e),this._primaryCursorPosition=new te.a(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=n,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,o=r.get(117);this._setAccessibilityOptions(r),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=r.get(36),this._lineHeight=r.get(51),this._emptySelectionClipboard=r.get(26),this._copyWithSyntaxHighlighting=r.get(16),this._visibleTextArea=null,this._selections=[new h.a(1,1,1,1)],this._modelSelections=[new h.a(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Object(f.b)(document.createElement("textarea")),T.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Ie.a}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(r)),this.textArea.setAttribute("tabindex",String(r.get(102))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",i.a("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),g.h&&r.get(72)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=Object(f.b)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const s={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},a={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,g.i),n=this._context.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),r=Array.isArray(t)?t:null,o=Array.isArray(t)?t.join(n):t;let s=void 0,a=null;if(e&&(Le.a.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,a=e.mode)}return{isFromEmptySelection:i,multicursorText:r,text:o,html:s,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(g.f){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let n=this._getWordBeforePosition(t);if(0===n.length&&(n=this._getCharacterBeforePosition(t)),n.length>0)return new Me.b(n,n.length,n.length,t,t)}}return Me.b.EMPTY}return Me.a.fromEditorSelection(e,s,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,n)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)};this._textAreaInput=this._register(new Le.c(a,this.textArea)),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,n=null,i=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),this._viewController.paste(e.text,t,n,i)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replaceCharCnt?this._viewController.replacePreviousChar(e.text,e.replaceCharCnt):this._viewController.type(e.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{const t=this._selections[0].startLineNumber,n=this._selections[0].startColumn-(e.moveOneCharacterLeft?1:0);this._context.model.revealRange("keyboard",!0,new ne.a(t,n,t,n),0,1);const i=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,n);i&&(this._visibleTextArea=new Ae(this._context.viewLayout.getVerticalOffsetForLineNumber(t),i.left,Re?0:1),this._render()),this.textArea.setClassName(`inputarea ${Ie.a} ime-input`),this._viewController.compositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{b.f?this._visibleTextArea=this._visibleTextArea.setWidth(0):this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const n=document.createElement("canvas").getContext("2d");n.font=(i=t,r="normal",o=i.fontWeight,s=i.fontSize,a=i.lineHeight,l=i.fontFamily,`${r} normal ${o} ${s}px / ${a}px ${l}`);var i,r,o,s,a,l;const c=n.measureText(e);return b.h?c.width+2:c.width}(e.data,this._fontInfo)),this._render()})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Ie.a}`),this._viewController.compositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),n=Object(Ne.a)(this._context.configuration.options.get(105));let i=e.column,r=0;for(;i>1;){const o=t.charCodeAt(i-2);if(0!==n.get(o)||r>50)return t.substring(i-1,e.column-1);r++,i--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!xe.F(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?i.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",g.d?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===Y.g.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(117);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(36),this._lineHeight=t.get(51),this._emptySelectionClipboard=t.get(26),this._copyWithSyntaxHighlighting=t.get(16),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(102))),g.h&&e.hasChanged(72)&&(t.get(72)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new te.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():g.f?this._renderInsideEditor(this._primaryCursorPosition,t,e,Re?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,Re?0:1,Re?0:1)}_renderInsideEditor(e,t,n,i,r){this._lastRenderPosition=e;const o=this.textArea,s=this.textAreaCover;c.a.applyFontInfo(o,this._fontInfo),o.setTop(t),o.setLeft(n),o.setWidth(i),o.setHeight(r),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(c.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Re)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const n=this._context.configuration.options;n.get(42)?t.setClassName("monaco-editor-background textAreaCover "+Oe.OUTER_CLASS_NAME):0!==n.get(52).renderType?t.setClassName("monaco-editor-background textAreaCover "+Te.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}var je=n(90);class Fe{constructor(e,t,n,i){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=i}paste(e,t,n,i){this.commandDelegate.paste(e,t,n,i)}type(e){this.commandDelegate.type(e)}replacePreviousChar(e,t){this.commandDelegate.replacePreviousChar(e,t)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){je.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):i?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){je.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){je.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,n){e=this._validateViewColumn(e),je.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),je.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){je.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){je.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){je.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){je.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){je.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){je.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){je.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){je.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){je.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Be{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Be.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new We(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class We{constructor(e,t,n,i,r,o){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=r,this.detail=o}toString(){return oe.toString(this)}}var He=n(125);class Ye{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;let r=0,o=0;for(let s=n;s<=i;s++){const n=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===o?(r=n,o=1):o++)}if(e=n&&o<=i&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(0===this.getCount())return null;const n=t-e+1,i=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r){return this._lines.splice(e-this._rendLineNumberStart,r-e+1)}const o=[];for(let e=0;en)continue;const s=Math.max(t,o.fromLineNumber),a=Math.min(n,o.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),i=!0}}return i}}class Ve{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Ye(()=>this._host.createVisibleLine())}_createDomNode(){const e=Object(f.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(117)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,n=t.length;et){const e=t,o=Math.min(n,r.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(r,e,o,i,t),r.linesLength+=o-e+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,e),r.linesLength-=e)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){const e=Math.max(0,n-r.rendLineNumberStart+1),t=r.linesLength-1-e+1;t>0&&(this._removeLinesAfter(r,t),r.linesLength-=t)}return this._finishRendering(r,!1,i),r}_renderUntouchedLines(e,t,n,i,r){const o=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=n;e++){const t=o+e;s[e].layoutLine(t,i[t-r])}}_insertLinesBefore(e,t,n,i,r){const o=[];let s=0;for(let e=t;e<=n;e++)o[s++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;t--){const n=e.lines[t];i[t]&&(n.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const i=document.createElement("div");i.innerHTML=t;for(let t=0;te.shouldRender());for(let n=0,i=t.length;n'),i.appendASCIIString(r),i.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class qe extends Ue{constructor(e){super(e);const t=this._context.configuration.options.get(117);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Ke extends Ue{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(117);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),c.a.applyFontInfo(this.domNode,t.get(36))}onConfigurationChanged(e){const t=this._context.configuration.options;c.a.applyFontInfo(this.domNode,t.get(36));const n=t.get(117);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Ge{constructor(e,t){this.top=e,this.left=t}}class Ze extends E{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Object(f.b)(document.createElement("div")),T.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Object(f.b)(document.createElement("div")),T.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Je(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n){this._widgets[e.getId()].setPosition(t,n),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const n=e.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].render(e)}}class Je{constructor(e,t,n){this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=Object(f.b)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const i=this._context.configuration.options,r=i.get(117);this._fixedOverflowWidgets=i.get(30),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=i.get(51),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(51),e.hasChanged(117)){const e=t.get(117);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,n,i,r){const o=e.top,s=o,a=t.top+this._lineHeight,l=o-i,c=s>=i,d=a,u=r.viewportHeight-a>=i;let h=e.left,f=t.left;return h+n>r.scrollLeft+r.viewportWidth&&(h=r.scrollLeft+r.viewportWidth-n),f+n>r.scrollLeft+r.viewportWidth&&(f=r.scrollLeft+r.viewportWidth-n),hs){const e=a-(s-i);a-=e,n-=e}if(a=22,_=d+i<=u.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(c,22),aboveLeft:f,fitsBelow:_,belowTop:d,belowLeft:p}:{fitsAbove:m,aboveTop:s,aboveLeft:h,fitsBelow:_,belowTop:a,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Ge(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let n=t[0],i=t[0];for(const e of t)e.lineNumberi.lineNumber&&(i=e);let r=1073741824;for(const e of n.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))}}n(593);var Xe=n(14);let Qe=!0;class et extends De{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(117);this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[],this._selections=[],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=Qe?this._selections.slice(0,1):this._selections,n=t.map(e=>e.positionLineNumber);n.sort((e,t)=>e-t),Xe.g(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);const i=t.every(e=>e.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(117);return this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHightlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._cursorLineNumbers.length;let o=0;const s=[];for(let e=n;e<=i;e++){const i=e-n;for(;o=this._renderData.length?"":this._renderData[n]}}class tt extends et{_renderOne(e){return`
`}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}class nt extends et{_renderOne(e){return`
`}_shouldRenderThis(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}Object(H.g)((e,t)=>{Qe=!1;const n=e.getColor(Ee.i);if(n&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||e.defines(Ee.j)){const n=e.getColor(Ee.j);n&&(Qe=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});n(594);class it extends De{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let e=0,r=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const n=e.options.className,i=t.options.className;return ni?1:ne.a.compareRangesUsingStarts(e.range,t.range)});const r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,s=[];for(let e=r;e<=o;e++){s[e-r]=""}this._renderWholeLineDecorations(e,n,s),this._renderNormalDecorations(e,n,s),this._renderResult=s}_renderWholeLineDecorations(e,t,n){const i=String(this._lineHeight),r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',l=Math.max(s.range.startLineNumber,r),c=Math.min(s.range.endLineNumber,o);for(let e=l;e<=c;e++){n[e-r]+=a}}}_renderNormalDecorations(e,t,n){const i=String(this._lineHeight),r=e.visibleRange.startLineNumber;let o=null,s=!1,a=null;for(let l=0,c=t.length;l';s[l]+=o}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}var rt=n(94);class ot extends E{constructor(e,t,n,i){super(e);const o=this._context.configuration.options,s=o.get(84),a=o.get(58),l=o.get(28),c=o.get(87),d={listenOnDomNode:n.domNode,className:"editor-scrollable "+Object(H.f)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c};this.scrollbar=this._register(new rt.c(t.domNode,d,this._context.viewLayout.getScrollable())),T.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Object(f.b)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(e,t,n)=>{const i={};if(t){const t=e.scrollTop;t&&(i.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(n){const t=e.scrollLeft;t&&(i.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(i,1)};this._register(r.i(n.domNode,"scroll",e=>u(n.domNode,!0,!0))),this._register(r.i(t.domNode,"scroll",e=>u(t.domNode,!0,!1))),this._register(r.i(i.domNode,"scroll",e=>u(i.domNode,!0,!1))),this._register(r.i(this.scrollbarDomNode.domNode,"scroll",e=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(117);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(56).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(84)||e.hasChanged(58)||e.hasChanged(28)){const e=this._context.configuration.options,t=e.get(84),n=e.get(58),i=e.get(28),r=e.get(87),o={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:i,scrollPredominantAxis:r};this.scrollbar.updateOptions(o)}return e.hasChanged(117)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(H.f)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}n(595);class st{constructor(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}class at extends De{_render(e,t,n){const i=[];for(let n=e;n<=t;n++){i[n-e]=[]}if(0===n.length)return i;n.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[];for(let e=t;e<=n;e++){const n=e-t,r=i[n];0===r.length?s[n]="":s[n]='
=this._renderResult.length?"":this._renderResult[n]}}n(596);class ct extends De{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,n=t.get(118),i=t.get(36);this._lineHeight=t.get(51),this._spaceWidth=i.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(118),i=t.get(36);return this._lineHeight=t.get(51),this._spaceWidth=i.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,{indentSize:i}=this._context.model.getTextModelOptions(),r=i*this._spaceWidth,o=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,n);let l=0,c=0,d=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);l=e.startLineNumber,c=e.endLineNumber,d=e.indent}const u=[];for(let i=t;i<=n;i++){const n=l<=i&&i<=c,h=i-t,f=a[h];let g="";if(f>=1){const t=e.visibleRangeForPosition(new te.a(i,1));let a=t?t.left:0;for(let e=1;e<=f;e++){if(g+=`
`,(a+=r)>o||this._maxIndentLeft>0&&a>this._maxIndentLeft)break}}u[h]=g}this._renderResult=u}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}Object(H.g)((e,t)=>{const n=e.getColor(Ee.h);n&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${n} inset; }`);const i=e.getColor(Ee.a)||n;i&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${i} inset; }`)});n(597);class dt{constructor(){this._currentVisibleRange=new ne.a(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class ut{constructor(e,t,n,i,r,o){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=r,this.scrollType=o,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class ht{constructor(e,t,n,i){this.selections=e,this.startScrollTop=t,this.stopScrollTop=n,this.scrollType=i,this.type="selections";let r=e[0].startLineNumber,o=e[0].endLineNumber;for(let t=1,n=e.length;t{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new _.d(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new dt,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new K(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(118)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(36),i=t.get(118);return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(81),this._cursorSurroundingLines=t.get(20),this._cursorSurroundingLinesStyle=t.get(21),this._canUseLayerHinting=!t.get(23),c.a.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(117)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new q(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let t=e;t<=n;t++){this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let e=t;e<=n;e++)i=this._visibleLines.getVisibleLine(e).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new ut(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new ht(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,i),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(null===n)return null;const i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new te.a(i,1);const r=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(io)return null;let s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t);const a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=ne.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;let r=[],o=0;const s=new $(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new te.a(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=i.startLineNumber;e<=i.endLineNumber;e++){if(ec)continue;const d=e===i.startLineNumber?i.startColumn:1,u=e===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(e),h=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(d,u,s);if(h){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new $(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new R(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,r=!0;for(let o=t;o<=n;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?i=Math.max(i,t.getWidth()):r=!1}return r&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++){const n=this._visibleLines.getVisibleLine(r);if(n.needsMonospaceFontCheck()){const i=n.getWidth();i>t&&(t=i,e=r)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=n;e<=i;e++){this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),g.d&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let n=e;n<=t;n++){if(this._visibleLines.getVisibleLine(n).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=i[0].startLineNumber,t=i[0].endLineNumber;for(let n=1,r=i.length;ns){if(!l)return-1;u=c}else if(5===r||6===r)if(6===r&&o<=c&&d<=a)u=o;else{const e=c-Math.max(5*this._lineHeight,.2*s),t=d-s;u=Math.max(t,e)}else if(1===r||2===r)if(2===r&&o<=c&&d<=a)u=o;else{const e=(c+d)/2;u=Math.max(0,e-s/2)}else u=this._computeMinimumScrolling(o,a,c,d,3===r,4===r);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=t.left,i=n+t.width;let r=1073741824,o=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)r=Math.min(r,e.left),o=Math.max(o,e.left+e.width)}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)r=Math.min(r,t.left),o=Math.max(o,t.left+t.width)}if(r=Math.max(0,r-ft.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding,"selections"===e.type&&o-r>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(n,i,r,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,n,i,r,o){r=!!r,o=!!o;const s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n}}ft.HORIZONTAL_EXTRA_PX=30;n(598);class gt extends at{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(117);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let e=0,r=t.length;e
',o=[];for(let e=t;e<=n;e++){const n=e-t,s=i[n];let a="";for(let e=0,t=s.length;e';r[n]=s}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}n(600);class mt{constructor(e,t,n,i){this.r=mt._clamp(e),this.g=mt._clamp(t),this.b=mt._clamp(n),this.a=mt._clamp(i)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}mt.Empty=new mt(0,0,0,0);var _t=n(11);class bt{constructor(){this._onDidChange=new s.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),_t.C.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()})}static getInstance(){return this._INSTANCE||(this._INSTANCE=new bt),this._INSTANCE}_updateColorMap(){const e=_t.C.getColorMap();if(!e)return this._colors=[mt.Empty],void(this._backgroundIsLight=!0);this._colors=[mt.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}bt._INSTANCE=null;var vt=n(63),yt=n(5);const wt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),Ct=(e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e;var St=n(121);class kt{constructor(e,t){this.scale=t,this.charDataNormal=kt.soften(e,.8),this.charDataLight=kt.soften(e,50/60)}static soften(e,t){let n=new Uint8ClampedArray(e.length);for(let i=0,r=e.length;ie.width||n+u>e.height)return void console.warn("bad render request outside image data");const h=a?this.charDataLight:this.charDataNormal,f=Ct(i,s),g=4*e.width,p=o.r,m=o.g,_=o.b,b=r.r-p,v=r.g-m,y=r.b-_,w=e.data;let C=f*c*d,S=n*g+4*t;for(let e=0;ee.width||n+c>e.height)return void console.warn("bad render request outside image data");const d=4*e.width,u=r.r,h=r.g,f=r.b,g=u+.5*(i.r-u),p=h+.5*(i.g-h),m=f+.5*(i.b-f),_=e.data;let b=n*d+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let n=0;n>1]=Lt[e[n]]<<4|15&Lt[e[n+1]];return t},Dt={1:Object(xt.a)(()=>Mt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Object(xt.a)(()=>Mt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Et{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return n=Dt[e]?new kt(Dt[e](),e):Et.createFromSampleData(Et.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let i=0;for(const e of wt)n.fillText(String.fromCharCode(e),i,8),i+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let n=Et._downsample(e,t);return new kt(n,t)}static _downsampleChar(e,t,n,i,r){const o=1*r,s=2*r;let a=i,l=0;for(let i=0;i0){const e=255/a;for(let t=0;tEt.create(this.fontScale,a.fontFamily)),this.backgroundColor=It._getMinimapBackground(t,n)}static _getMinimapBackground(e,t){const n=e.getColor(yt.Mb);return n?new mt(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class At{constructor(e,t,n,i,r,o,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=i,this.sliderTop=r,this.sliderHeight=o,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){const t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,n,i,r,o,s,a,l,c){const d=e.pixelRatio,u=e.minimapLineHeight,h=Math.floor(e.canvasInnerHeight/u),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=s*e.lineHeight+(e.scrollBeyondLastLine?i-e.lineHeight:0),n=Math.max(1,Math.floor(i*i/t)),r=Math.max(0,e.minimapHeight-n),c=r/(l-i),d=a*c,u=r>0,h=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new At(a,l,u,c,d,n,1,Math.min(o,h))}let g,p;if(r&&n!==o){const e=n-t+1;g=Math.floor(e*u/d)}else{const e=i/f;g=Math.floor(e*u/d)}p=e.scrollBeyondLastLine?(o-1)*u/d:Math.max(0,o*u/d-g);const m=(p=Math.min(e.minimapHeight-g,p))/(l-i),_=a*m;let b=0;if(e.scrollBeyondLastLine){b=i/f-1}if(h>=o+b){return new At(a,l,p>0,m,_,g,1,o)}{let e=Math.max(1,Math.floor(t-_*d/u));c&&c.scrollHeight===l&&(c.scrollTop>a&&(e=Math.min(e,c.startLineNumber)),c.scrollTopRt.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,n=t.length;e1){for(let t=0,n=s-1;t0&&this.minimapLines[n-1]>=e;)n--;let i=this.modelLineToMinimapLine(t)-1;for(;i+1t)return null}return[n+1,i+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),i=this.modelLineToMinimapLine(t);return e!==t&&i===n&&(i===this.minimapLines.length?n>1&&n--:i++),[n,i]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,i=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(i)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,n]=Ft.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of n)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){let i=[];for(let r=0,o=t-e+1;r{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=r.C(this._slider.domNode),n=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,n,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let i=Math.floor(n/t)+this._lastRenderData.renderedLayout.startLineNumber;i=Math.min(i,this._model.getLineCount()),this._model.revealLineNumber(i)}),this._sliderMouseMoveMonitor=new v.a,this._sliderMouseDownListener=r.n(this._slider.domNode,"mousedown",e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=p.b.addTarget(this._domNode.domNode),this._sliderTouchStartListener=r.i(this._domNode.domNode,p.a.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=r.i(this._domNode.domNode,p.a.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=r.n(this._domNode.domNode,p.a.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n,i,r){this._slider.toggleClassName("active",!0);const o=(e,i)=>{const o=Math.abs(i-t);if(g.i&&o>Ot)return void this._model.setScrollTop(r.scrollTop);const s=e-n;this._model.setScrollTop(r.getDesiredScrollTopFromDelta(s))};i!==n&&o(i,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,v.b,e=>o(e.posy,e.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new jt(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(yt.Pb),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=At.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,i=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:i,canvasInnerHeight:r}=this._model.options,o=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,i,r);const c=new Map;for(let n=0;nthis._model.options.canvasInnerHeight)return;let u=t.get(o);const h=!u;if(!u){const e=this._model.getLineContent(o);u=[Y.h];for(let t=1;to?u.length-1:g-1;if(b>0){const t=u[b]-_||2;this.renderDecoration(e,i,_,d,t,s)}h&&this.renderLineHighlight(e,i,d,s)}renderLineHighlight(e,t,n,i){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(Y.h,n,e.canvas.width,i)}renderDecoration(e,t,n,i,r,o){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,r,o)}renderLines(e){const t=e.startLineNumber,n=e.endLineNumber,i=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Pt(e,t.imageData,t.lines)}const r=this._getBuffer();if(!r)return null;let[o,s,a]=Wt._renderUntouchedLines(r,t,n,i,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,n,a),c=this._model.getOptions().tabSize,d=this._model.options.backgroundColor,u=this._model.tokensColorTracker,h=u.backgroundIsLight(),f=this._model.options.renderMinimap,g=this._model.options.charRenderer(),p=this._model.options.fontScale,m=this._model.options.minimapCharWidth,_=(1===f?2:3)*p,b=i>_?Math.floor((i-_)/2):0;let v=0;const y=[];for(let e=0,o=n-t+1;e=0&&rp)return;const o=f.charCodeAt(b);if(9===o){const e=c-(b+v)%c;v+=e-1,_+=e*r}else if(32===o)_+=r;else{const c=xe.E(o)?2:1;for(let d=0;dp)return}}}}}Object(H.g)((e,t)=>{const n=e.getColor(yt.Mb);n&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${n.rgba.a}; will-change: opacity; }`);const i=e.getColor(yt.Rb);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const r=e.getColor(yt.Sb);r&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${r}; }`);const o=e.getColor(yt.Qb);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(yt.ic);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});n(601);class Ht extends E{constructor(e){super(e);const t=this._context.configuration.options.get(117);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=Object(f.b)(document.createElement("div")),T.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(117);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=Object(f.b)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,n=t.length;e=3){const t=Math.floor(i/3),n=Math.floor(i/3),r=i-t-n,o=e+t;return[[0,e,o,e,e+t+r,e,o,e],[0,t,r,t+r,n,t+r+n,r+n,t+r+n]]}if(2===n){const t=Math.floor(i/2),n=i-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,n,t+n,t+n,t+n]]}return[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class zt extends E{constructor(e){super(e),this._domNode=Object(f.b)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=_t.C.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Vt(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tt&&(e=t-a),_=e-a,b=e+a}_>m+1||o!==g?(0!==e&&l.fillRect(c[g],p,d[g],m-p),g=o,p=_,m=b):b>m&&(m=b)}l.fillRect(c[g],p,d[g],m-p)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,n=e/2|0,o=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let d=0,u=this._cursorPositions.length;dt&&(h=t-n);const f=h-n,g=f+e;f>c+1?(0!==d&&l.fillRect(o,a,s,c-a),a=f,c=g):g>c&&(c=g)}l.fillRect(o,a,s,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var Ut=n(188);class $t extends D{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=Object(f.b)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Ut.b(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(51)),this._zoneManager.setPixelRatio(n.get(115)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(51)&&(this._zoneManager.setLineHeight(t.get(51)),this._render()),e.hasChanged(115)&&(this._zoneManager.setPixelRatio(t.get(115)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,i,e),!0}_renderOneLane(e,t,n,i){let r=0,o=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==r?(e.fillRect(0,o,i,s-o),r=t,e.fillStyle=n[r],o=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,o,i,s-o),o=l,s=c)}e.fillRect(0,o,i,s-o)}}n(602);class qt extends E{constructor(e){super(e),this.domNode=Object(f.b)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=Object(f.b)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),r--}return}let n=e-t;for(;n>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t{const n=e.getColor(Ee.n);n&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${n} inset; }`)});n(603);class Kt extends E{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(84);this._useShadows=t.useShadows,this._domNode=Object(f.b)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(117);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(84);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Object(H.g)((e,t)=>{const n=e.getColor(yt.ic);n&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${n} 0 6px 6px -6px inset; }`)});n(604);class Gt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Zt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Jt(e){return new Gt(e)}function Xt(e){return new Zt(e.lineNumber,e.ranges.map(Jt))}const Qt=b.f;class en extends De{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,n){const i=this._typicalHalfwidthCharacterWidth/4;let r=null,o=null;if(n&&n.length>0&&t.length>0){const i=t[0].lineNumber;if(i===e.startLineNumber)for(let e=0;!r&&e=0;e--)n[e].lineNumber===s&&(o=n[e].ranges[0]);r&&!r.startStyle&&(r=null),o&&!o.startStyle&&(o=null)}for(let e=0,n=t.length;e0){const n=t[e-1].ranges[0].left,r=t[e-1].ranges[0].left+t[e-1].ranges[0].width;tn(a-n)n&&(c.top=1),tn(l-r)'}_actualRenderOneSelection(e,t,n,i){if(0===i.length)return;const r=!!i[0].ranges[0].startStyle,o=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=i[0].lineNumber,l=i[i.length-1].lineNumber;for(let c=0,d=i.length;c1,s)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function tn(e){return e<0?-e:e}en.SELECTION_CLASS_NAME="selected-text",en.SELECTION_TOP_LEFT="top-left-radius",en.SELECTION_BOTTOM_LEFT="bottom-left-radius",en.SELECTION_TOP_RIGHT="top-right-radius",en.SELECTION_BOTTOM_RIGHT="bottom-right-radius",en.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",en.ROUNDED_PIECE_WIDTH=10,Object(H.g)((e,t)=>{const n=e.getColor(yt.O);n&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${n}; }`);const i=e.getColor(yt.J);i&&t.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const r=e.getColor(yt.P);r&&!r.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${r}; }`)});n(605);class nn{constructor(e,t,n,i,r,o){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=r,this.textContentClassName=o}}class rn{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(36);this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(f.b)(document.createElement("div")),this._domNode.setClassName(`cursor ${Ie.a}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),c.a.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new te.a(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(36);return this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),c.a.applyFontInfo(this._domNode,n),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===Y.i.Line||this._cursorStyle===Y.i.LineThin){const n=e.visibleRangeForPosition(this._position);if(!n||n.outsideRenderedLine)return null;let i;if(this._cursorStyle===Y.i.Line){if((i=r.t(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){const e=this._context.model.getLineContent(this._position.lineNumber),n=xe.L(e,this._position.column-1);t=e.substr(this._position.column-1,n)}}else i=r.t(1);let o=n.left;i>=2&&o>=1&&(o-=1);const s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new nn(s,o,i,this._lineHeight,t,"")}const n=this._context.model.getLineContent(this._position.lineNumber),i=xe.L(n,this._position.column-1),o=e.linesVisibleRangesForRange(new ne.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+i),!1);if(!o||0===o.length)return null;const s=o[0];if(s.outsideRenderedLine||0===s.ranges.length)return null;const a=s.ranges[0],l=a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===Y.i.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=n.substr(this._position.column-1,i);const r=e.tokens.findTokenIndexAtOffset(this._position.column-1);c=e.tokens.getClassName(r)}let d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return this._cursorStyle!==Y.i.Underline&&this._cursorStyle!==Y.i.UnderlineThin||(d+=this._lineHeight-2,u=2),new nn(d,a.left,l,u,t,c)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Ie.a} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class on extends E{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._selectionIsEmpty=!0,this._isVisible=!1,this._primaryCursor=new rn(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Object(f.b)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new _.e,this._cursorFlatBlinkInterval=new _.c,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,n=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let n=0,i=e.ranges.length;n{this._isVisible?this._hide():this._show()},on.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},on.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Y.i.Line:e+=" cursor-line-style";break;case Y.i.Block:e+=" cursor-block-style";break;case Y.i.Underline:e+=" cursor-underline-style";break;case Y.i.LineThin:e+=" cursor-line-thin-style";break;case Y.i.BlockOutline:e+=" cursor-block-outline-style";break;case Y.i.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const n=e.getColor(Ee.g);if(n){let i=e.getColor(Ee.f);i||(i=n.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${n}; border-color: ${n}; color: ${i}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const sn=()=>{throw new Error("Invalid change accessor")};class an extends E{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(117);this._lineHeight=t.get(51),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=Object(f.b)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Object(f.b)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let n=!1;return this._context.model.changeWhitespace(e=>{const i=Object.keys(this._zones);for(let r=0,o=i.length;r{const i={addZone:e=>(t=!0,this._addZone(n,e)),removeZone:e=>{e&&(t=this._removeZone(n,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(n,e)||t)}};!function(e,t){try{e(t)}catch(e){Object(o.e)(e)}}(e,i),i.addZone=sn,i.removeZone=sn,i.layoutZone=sn}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),i={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isVisible:!1,domNode:Object(f.b)(t.domNode),marginDomNode:t.marginDomNode?Object(f.b)(t.marginDomNode):null};return this._safeCallOnComputedHeight(i.delegate,n.heightInPx),i.domNode.setPosition("absolute"),i.domNode.domNode.style.width="100%",i.domNode.setDisplay("none"),i.domNode.setAttribute("monaco-view-zone",i.whitespaceId),this.domNode.appendChild(i.domNode),i.marginDomNode&&(i.marginDomNode.setPosition("absolute"),i.marginDomNode.domNode.style.width="100%",i.marginDomNode.setDisplay("none"),i.marginDomNode.setAttribute("monaco-view-zone",i.whitespaceId),this.marginDomNode.appendChild(i.marginDomNode)),this._zones[i.whitespaceId]=i,this.setShouldRender(),i.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){Object(o.e)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){Object(o.e)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let i=!1;for(let e=0,r=t.length;e{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new Pe(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Object(f.b)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Object(f.b)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Object(f.b)(document.createElement("div")),T.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new ot(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new ft(this._context,this._linesContent),this._viewZones=new an(this._context),this._viewParts.push(this._viewZones);const a=new zt(this._context);this._viewParts.push(a);const l=new Kt(this._context);this._viewParts.push(l);const c=new qe(this._context);this._viewParts.push(c),c.addDynamicOverlay(new tt(this._context)),c.addDynamicOverlay(new en(this._context)),c.addDynamicOverlay(new ct(this._context)),c.addDynamicOverlay(new it(this._context));const d=new Ke(this._context);this._viewParts.push(d),d.addDynamicOverlay(new nt(this._context)),d.addDynamicOverlay(new lt(this._context)),d.addDynamicOverlay(new pt(this._context)),d.addDynamicOverlay(new gt(this._context)),d.addDynamicOverlay(new Te(this._context));const u=new Oe(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(d.getDomNode()),this._viewParts.push(u),this._contentWidgets=new Ze(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new on(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Ht(this._context),this._viewParts.push(this._overlayWidgets);const g=new qt(this._context);this._viewParts.push(g);const p=new Bt(this._context);if(this._viewParts.push(p),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(p.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),o?o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new ke(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new re(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new te.a(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new te.a(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(117);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(114)+" "+Object(H.f)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e=0,t=this._viewParts.length;ethis._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(let n=0,i=this._viewParts.length;nn){let e=t-n;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,n=this.secondaryCursors.length;te.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber);for(let n=0;na&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),n--}}}}var gn=n(230),pn=n(116);class mn{constructor(e){this.type=0,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class _n{constructor(e,t){this.type=1,this.selections=e,this.modelSelections=t}}class bn{constructor(e){this.type=2,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class vn{constructor(){this.type=3}}class yn{constructor(e){this.type=4,this.isFocused=e}}class wn{constructor(){this.type=5}}class Cn{constructor(){this.type=6}}class Sn{constructor(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t}}class kn{constructor(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t}}class xn{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class Ln{constructor(e,t,n,i,r,o){this.type=10,this.source=e,this.range=t,this.selections=n,this.verticalType=i,this.revealHorizontal=r,this.scrollType=o}}class Mn{constructor(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Dn{constructor(){this.type=12}}class En{constructor(e){this.type=13,this.ranges=e}}class Tn{constructor(){this.type=14}}class On{constructor(){this.type=15}}class Nn extends a.a{constructor(){super(),this._onEvent=this._register(new s.a),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class In{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class An{constructor(e,t,n,i){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new An(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Rn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new Rn(this.oldHasFocus,e.hasFocus)}}class Pn{constructor(e,t,n,i,r,o,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=i,this.scrollWidth=r,this.scrollLeft=o,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new Pn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class jn{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Fn{constructor(e,t,n,i,r,o,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=i,this.source=r,this.reason=o,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0}}class Yn extends a.a{constructor(e,t,n,i){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=n,this.context=new ie.c(this._model,this._coordinatesConverter,i),this._cursors=new fn(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Object(a.f)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new ie.c(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;tYn.MAX_CURSOR_COUNT&&(i=i.slice(0,Yn.MAX_CURSOR_COUNT),r=!0);const o=new Wn(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,o,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,i){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,n,i);else{const o=r[0],s=new ne.a(o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,s,null,0,n,i)}}_revealPrimaryCursor(e,t,n,i,r){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),n,i,r);else{const s=o[0],a=new ne.a(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,n,i,r)}}_emitCursorRevealRange(e,t,n,i,r,o,s){e.emitViewEvent(new Ln(t,n,i,r,o,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let n=0,i=t.length;n0){const n=ie.d.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,n)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,ie.d.fromModelSelections(t))}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:ie.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:ie.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n){this.setStates(e,t,0,ie.d.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let n=[],i=[];for(let r=0,o=e.length;r0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,i,r){const o=new Wn(this._model,this);if(o.equals(i))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new _n(a,s)),!i||i.cursorState.length!==o.cursorState.length||o.cursorState.some((e,t)=>!e.modelState.equals(i.cursorState[t].modelState))){const a=i?i.cursorState.map(e=>e.modelState.selection):null,l=i?i.modelVersionId:0;e.emitOutgoingEvent(new Fn(a,s,l,o.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let n=0,i=e.length;n=0)return null;const r=i.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const o=r[1],s=this.context.cursorConfig.autoClosingPairsClose2.get(o);if(!s||1!==s.length)return null;const a=s[0].open,l=i.text.length-r[2].length-1,c=i.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,n,i){let r=null;"snippet"===t&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);let o=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),n,e=>{if(r)for(let t=0,n=r.length;t0&&this._pushAutoClosedAction(o,s)}_executeEdit(e,t,n,i=0){if(this.context.cursorConfig.readOnly)return;const r=new Wn(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){Object(o.e)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,i,r,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{if("keyboard"===t){const e=Hn.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(pn.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),e)),this._selectionsWhenCompositionStarted=null}},e,t)}type(e,t,n){this._executeEdit(()=>{if("keyboard"===n){const e=t.length;let n=0;for(;n{this._executeEditOperation(pn.a.replacePreviousChar(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n))},e,i)}paste(e,t,n,i,r){this._executeEdit(()=>{this._executeEditOperation(pn.a.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,i||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(gn.a.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new ie.e(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new ie.e(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}Yn.MAX_CURSOR_COUNT=1e4;class Vn{static executeCommands(e,t,n){const i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(i,n);for(let e=0,t=i.trackedRanges.length;e0&&(o[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,o,n=>{let i=[];for(let t=0;te.identifier.minor-t.identifier.minor;let o=[];for(let n=0;n0?(i[n].sort(r),o[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:()=>i[n],getTrackedSelection:t=>{const n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new h.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new h.a(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):o[n]=e.selectionsBefore[n];return o});s||(s=e.selectionsBefore);let a=[];for(let e in r)r.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort((e,t)=>t-e);for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{ne.a.isEmpty(e)&&""===o||i.push({identifier:{major:t,minor:r++},range:e,text:o,forceMoveMarkers:s,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let a=!1;const l={addEditOperation:s,addTrackedEditOperation:(e,t,n)=>{a=!0,s(e,t,n)},trackSelection:(t,n)=>{const i=h.a.liftSelection(t);let r;if(i.isEmpty())if("boolean"==typeof n)r=n?2:3;else{const t=e.model.getLineMaxColumn(i.startLineNumber);r=i.startColumn===t?2:3}else r=1;const o=e.trackedRanges.length,s=e.model._setTrackedRange(null,i,r);return e.trackedRanges[o]=s,e.trackedRangesDirection[o]=i.getDirection(),o.toString()}};try{n.getEditOperations(e.model,l)}catch(e){return Object(o.e)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){(e=e.slice(0)).sort((e,t)=>-ne.a.compareRangesUsingEnds(e.range,t.range));let t={};for(let n=1;nr.identifier.major?i.identifier.major:r.identifier.major).toString()]=!0;for(let t=0;t0&&n--}}return t}}var zn=n(269),Un=n(145),$n=n(7),qn=n(231),Kn=n(201);class Gn{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}}class Zn{constructor(e,t,n,i,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=r,this.prefixSum=0}}class Jn{constructor(e,t,n,i){this._instanceId=xe.R(++Jn.INSTANCE_COUNT),this._pendingChanges=new Gn,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=i}static findInsertionIndex(e,t,n){let i=0,r=e.length;for(;i>>1;t===e[o].afterLineNumber?n{t=!0,e|=0,n|=0,i|=0,r|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Zn(o,e,n,i,r)),o},changeOneWhitespace:(e,n,i)=>{t=!0,n|=0,i|=0,this._pendingChanges.change({id:e,newAfterLineNumber:n,newHeight:i})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of n){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const i=new Set;for(const e of n)i.add(e.id);const r=new Map;for(const e of t)r.set(e.id,e);const o=e=>{let t=[];for(const n of e)if(!i.has(n.id)){if(r.has(n.id)){const e=r.get(n.id);n.afterLineNumber=e.newAfterLineNumber,n.height=e.newHeight}t.push(n)}return t},s=o(this._arr).concat(o(e));s.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Jn.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,i=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let n=0,i=this._arr.length;n=t.length||t[r+1].afterLineNumber>=e)return r;n=r+1|0}else i=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,n=this._arr.length;tthis.getLinesTotalHeight()}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,n=this._lineHeight;let i=1,r=t;for(;i=o+n)i=t+1;else{if(e>=o)return t;r=t}}return i>t?t:i}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this._lineHeight,i=0|this.getLineNumberAtOrAfterVerticalOffset(e),r=0|this.getVerticalOffsetForLineNumber(i);let o=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(i);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=o+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let d=r,u=d;let h=0;r>=5e5&&(h=5e5*Math.floor(r/5e5),u-=h=Math.floor(h/n)*n);const f=[],g=e+(t-e)/2;let p=-1;for(let e=i;e<=o;e++){if(-1===p){const t=d,i=d+n;(t<=g&&gg)&&(p=e)}for(d+=n,f[e-i]=u,u+=n;c===e;)u+=l,d+=l,++s>=a?c=o+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(d>=t){o=e;break}}-1===p&&(p=o);const m=0|this.getVerticalOffsetForLineNumber(o);let _=i,b=o;return _t&&b--,{bigNumbersDelta:h,startLineNumber:i,endLineNumber:o,relativeVerticalOffset:f,centeredLineNumber:p,completelyVisibleStartLineNumber:_,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n,i;return(n=t>=1?this._lineHeight*t:0)+(i=e>0?this.getWhitespacesAccumulatedHeight(e-1):0)+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=r+this.getHeightForWhitespaceIndex(i))t=i+1;else{if(e>=r)return i;n=i}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const i=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];let r=[];for(let e=n;e<=i;e++){const n=this.getVerticalOffsetForWhitespaceIndex(e),i=this.getHeightForWhitespaceIndex(e);if(n>=t)break;r.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:n,height:i})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}Jn.INSTANCE_COUNT=0;const Xn=125;class Qn{constructor(e,t,n,i){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(n|=0)<0&&(n=0),(i|=0)<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class ei extends a.a{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new s.a),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Qn(0,0,0,0),this._scrollable=this._register(new Kn.a(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire(new An(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class ti extends a.a{constructor(e,t,n){super(),this._configuration=e;const i=this._configuration.options,r=i.get(117),o=i.get(66);this._linesLayout=new Jn(t,i.get(51),o.top,o.bottom),this._scrollable=this._register(new ei(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Qn(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(94)?Xn:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(51)&&this._linesLayout.setLineHeight(t.get(51)),e.hasChanged(66)){const e=t.get(66);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(117)){const e=t.get(117),n=e.contentWidth,i=e.height,r=this._scrollable.getScrollDimensions(),o=r.contentWidth;this._scrollable.setScrollDimensions(new Qn(n,r.contentWidth,i,this._getContentHeight(n,i,o)))}else this._updateHeight();e.hasChanged(94)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const n=this._configuration.options.get(84);return 2===n.horizontal?0:e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,n){const i=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return i.get(86)?r+=t-i.get(51):r+=this._getHorizontalScrollbarHeight(e,n),r}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.contentWidth;this._scrollable.setScrollDimensions(new Qn(t,e.contentWidth,n,this._getContentHeight(t,n,i)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new vt.f(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new vt.f(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,n=t.get(118),i=t.get(36);if(n.isViewportWrapping){const n=t.get(117),r=t.get(56);return e>n.contentWidth+i.typicalHalfwidthCharacterWidth&&r.enabled&&"right"===r.side?e+n.verticalScrollbarWidth:e}{const n=t.get(85)*i.typicalHalfwidthCharacterWidth,r=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,r)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Qn(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}var ni=n(29),ii=n(270);class ri{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}class oi{constructor(e,t,n){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n}static getInputOffsetOfOutputPosition(e,t,n){return 0===t?n:e[t-1]+n}static getOutputPositionOfInputOffset(e,t){let n=0,i=e.length-1,r=0,o=0;for(;n<=i;){const s=e[r=n+(i-n)/2|0];if(t<(o=r>0?e[r-1]:0))i=r-1;else{if(!(t>=s))break;n=r+1}}return new ri(r,t-o)}}class si{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}}class ai{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=n+t;for(let i=0;i0?this._modelToView[t-1]:0;return new ii.b(t,e-n)}}class li{constructor(e,t,n,i,r,o,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=i,this.tabSize=r,this.wrappingStrategy=o,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new si(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let n=this.model.getLinesContent();const i=n.length,r=this.createLineBreaksComputer();for(let e=0;ethis.model.getDecorationRange(e)).sort(ne.a.compareRangesUsingStarts),l=1,c=0,d=-1,u=d+1=l&&t<=c,r=pi(o[e],!n);s[e]=r.getViewLineCount(),this.lines[e]=r}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new ai(s)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(0===e.length)return[];let t=e.map(e=>this.model.validateRange(e)).sort(ne.a.compareRangesUsingStarts),n=[],i=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,o=t.length;er+1?(n.push(new ne.a(i,1,r,1)),i=o.startLineNumber,r=o.endLineNumber):o.endLineNumber>r&&(r=o.endLineNumber)}return n.push(new ne.a(i,1,r,1)),n}setHiddenAreas(e){let t=this._reduceRanges(e),n=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(ne.a.compareRangesUsingStarts);if(t.length===n.length){let e=!1;for(let i=0;i=o&&t<=s?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),n=!0):(c=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),n=!0)),n){let t=this.lines[e].getViewLineCount();this.prefixSumComputer.changeValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,i){const r=this.fontInfo.equals(e),o=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(r&&o&&s&&a)return!1;const l=r&&o&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;es?(f=(h=(c=(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+s-1)+1)+(r-s)-1,a=!0):rt?t:0|e}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,r.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let r=[],o=[],s=[];const a=n.lineNumber-1,l=i.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.lines[e];if(t.isVisible()){let i=t.getViewLineNumberOfModelPosition(0,e===a?n.column:1),r=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=r-i+1,d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,r)&&(d=0===i?1:2),o.push(l),s.push(d),null===c&&(c=new te.a(e+1,0))}else null!==c&&(r=r.concat(this.model.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(r=r.concat(this.model.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);const d=t-e+1;let u=new Array(d),h=0;for(let e=0,t=r.length;et&&(u=!0,d=t-r+1);let h=c+d;if(l.getViewLinesData(this.model,i+1,c,h,r-e,n,a),r+=d,u)break}return a}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),r=i.index,o=i.remainder,s=this.lines[r],a=s.getViewLineMinColumn(this.model,r+1,o),l=s.getViewLineMaxColumn(this.model,r+1,o);tl&&(t=l);let c=s.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new te.a(r+1,c)).equals(n)?new te.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new ne.a(n.lineNumber,n.column,i.lineNumber,i.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,r=n.remainder,o=this.lines[i].getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new te.a(i+1,o))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ne.a(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t){const n=this.model.validatePosition(new te.a(e,t)),i=n.lineNumber,r=n.column;let o=i-1,s=!1;for(;o>0&&!this.lines[o].isVisible();)o--,s=!0;if(0===o&&!this.lines[o].isVisible())return new te.a(1,1);const a=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));let l;return l=s?this.lines[o].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(o+1)):this.lines[i-1].getViewPositionOfModelPosition(a,r)}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new ne.a(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new ne.a(t.lineNumber,t.column,n.lineNumber,n.column)}_getViewLineNumberForModelPosition(e,t){let n=e-1;if(this.lines[n].isVisible()){const e=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(e,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;const i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}getAllOverviewRulerDecorations(e,t,n){const i=this.model.getOverviewRulerDecorations(e,t),r=new bi;for(const e of i){const t=e.options.overviewRuler,i=t?t.position:0;if(0===i)continue;const o=t.getColor(n),s=this._getViewLineNumberForModelPosition(e.range.startLineNumber,e.range.startColumn),a=this._getViewLineNumberForModelPosition(e.range.endLineNumber,e.range.endColumn);r.accept(o,s,a,i)}return r.result}getDecorationsInRange(e,t,n){const i=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-i.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ne.a(i.lineNumber,1,r.lineNumber,r.column),t,n);let o=[];const s=i.lineNumber-1,a=r.lineNumber-1;let l=null;for(let e=s;e<=a;e++){if(this.lines[e].isVisible())null===l&&(l=new te.a(e+1,e===s?i.column:1));else if(null!==l){const i=this.model.getLineMaxColumn(e);o=o.concat(this.model.getDecorationsInRange(new ne.a(l.lineNumber,l.column,e,i),t,n)),l=null}}null!==l&&(o=o.concat(this.model.getDecorationsInRange(new ne.a(l.lineNumber,l.column,r.lineNumber,r.column),t,n)),l=null),o.sort((e,t)=>{const n=ne.a.compareRangesUsingStarts(e.range,t.range);return 0===n?e.idt.id?1:0:n});let c=[],d=0,u=null;for(const e of o){const t=e.id;u!==t&&(u=t,c[d++]=e)}return c}}class ci{constructor(){}isVisible(){return!0}setVisible(e){return e?this:di.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,n){return e.getLineContent(t)}getViewLineLength(e,t,n){return e.getLineLength(t)}getViewLineMinColumn(e,t,n){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,n){return e.getLineMaxColumn(t)}getViewLineData(e,t,n){let i=e.getLineTokens(t),r=i.getLineContent();return new vt.c(r,!1,1,r.length+1,0,i.inflate())}getViewLinesData(e,t,n,i,r,o,s){o[r]?s[r]=this.getViewLineData(e,t,0):s[r]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new te.a(e,t)}getViewLineNumberOfModelPosition(e,t){return e}}ci.INSTANCE=new ci;class di{constructor(){}isVisible(){return!1}setVisible(e){return e?ci.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,n){throw new Error("Not supported")}getViewLineLength(e,t,n){throw new Error("Not supported")}getViewLineMinColumn(e,t,n){throw new Error("Not supported")}getViewLineMaxColumn(e,t,n){throw new Error("Not supported")}getViewLineData(e,t,n){throw new Error("Not supported")}getViewLinesData(e,t,n,i,r,o,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}}di.INSTANCE=new di;class ui{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return oi.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:oi.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,n+1,0)}getViewLineContent(e,t,n){if(!this._isVisible)throw new Error("Not supported");let i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),o=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});return n>0&&(o=fi(this._lineBreakData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,n){if(!this._isVisible)throw new Error("Not supported");let i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(r=this._lineBreakData.wrappedTextIndentLength+r),r}getViewLineMinColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1}getViewLineData(e,t,n){if(!this._isVisible)throw new Error("Not supported");let i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n),o=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});n>0&&(o=fi(this._lineBreakData.wrappedTextIndentLength)+o);let s=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=o.length+1,l=n+10&&(c=this._lineBreakData.wrappedTextIndentLength);let d=e.getLineTokens(t);const u=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new vt.c(o,l,s,a,u,d.sliceAndInflate(i,r,c))}getViewLinesData(e,t,n,i,r,o,s){if(!this._isVisible)throw new Error("Not supported");for(let a=n;a0&&(n0&&(r+=this._lineBreakData.wrappedTextIndentLength),new te.a(e+i,r)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+oi.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}}let hi=[""];function fi(e){if(e>=hi.length)for(let t=1;t<=e;t++)hi[t]=gi(t);return hi[e]}function gi(e){return new Array(e+1).join(" ")}function pi(e,t){return null===e?t?ci.INSTANCE:di.INSTANCE:new ui(e,t)}class mi{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}}class _i{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new mi(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,i){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new kn(t,n)}onModelLinesInserted(e,t,n,i){return new xn(t,n)}onModelLineChanged(e,t,n){return[!1,new Sn(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const n=t-e+1;let i=new Array(n);for(let e=0;e=t)return void(n>o&&(r[r.length-1]=n));r.push(i,t,n)}else this.result[e]=[i,t,n]}}class vi{constructor(e,t,n,i,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const i=e.range,r=e.options;let o;if(r.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new te.a(i.startLineNumber,1)),t=this._coordinatesConverter.convertModelPositionToViewPosition(new te.a(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));o=new ne.a(e.lineNumber,e.column,t.lineNumber,t.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new vt.e(o,r),this._decorationsCache[t]=n}return n}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object(Y.l)(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber;let r=[],o=0,s=[];for(let e=n;e<=i;e++)s[e-n]=[];for(let e=0,a=t.length;ethis.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new _.d(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,yi&&this.model.isTooLargeForTokenization())this._lines=new _i(this.model);else{const e=this._configuration.options,t=e.get(36),n=e.get(112),o=e.get(118),s=e.get(111);this._lines=new li(this.model,i,r,t,this.model.getOptions().tabSize,n,o.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Yn(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new ti(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Mn(e)),this._eventDispatcher.emitOutgoingEvent(new Pn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e)})),this._decorations=new vi(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(bt.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new Tn)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new te.a(e.startLineNumber,1)),n=this.coordinatesConverter.convertViewPositionToModelPosition(new te.a(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,n.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new yn(e)),this._eventDispatcher.emitOutgoingEvent(new Rn(!e,e))}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Dn)}_onConfigurationChanged(e,t){let n=null;if(-1!==this._viewportStartLine){let e=new te.a(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let i=!1;const r=this._configuration.options,o=r.get(36),s=r.get(112),a=r.get(118),l=r.get(111);if(this._lines.setWrappingSettings(o,s,a.wrappingColumn,l)&&(e.emitViewEvent(new vn),e.emitViewEvent(new Cn),e.emitViewEvent(new bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(72)&&(this._decorations.reset(),e.emitViewEvent(new bn(null))),e.emitViewEvent(new mn(t)),this.viewLayout.onConfigurationChanged(t),i&&n){const e=this.coordinatesConverter.convertModelPositionToViewPosition(n),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}ie.b.shouldRecreate(t)&&(this.cursorConfig=new ie.b(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let n=!1,i=!1;const r=e.changes,o=e.versionId,s=this._lines.createLineBreaksComputer();for(const e of r)switch(e.changeType){case 4:for(const t of e.detail)s.addRequest(t,null);break;case 2:s.addRequest(e.detail,null)}const a=s.finalize();let l=0;for(const e of r)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new vn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),n=!0;break;case 3:{const i=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==i&&(t.emitViewEvent(i),this.viewLayout.onLinesDeleted(i.fromLineNumber,i.toLineNumber)),n=!0;break}case 4:{const i=a.slice(l,l+e.detail.length);l+=e.detail.length;const r=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,i);null!==r&&(t.emitViewEvent(r),this.viewLayout.onLinesInserted(r.fromLineNumber,r.toLineNumber)),n=!0;break}case 2:{const n=a[l];l++;const[r,s,c,d]=this._lines.onModelLineChanged(o,e.lineNumber,n);i=r,s&&t.emitViewEvent(s),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!n&&i&&(t.emitViewEvent(new Cn),t.emitViewEvent(new bn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let n=0,i=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new wn),this.cursorConfig=new ie.b(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new ie.b(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new vn),e.emitViewEvent(new Cn),e.emitViewEvent(new bn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new ie.b(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new bn(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new vn),t.emitViewEvent(new Cn),t.emitViewEvent(new bn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(117),t=this._configuration.options.get(51),n=Math.max(20,Math.round(e.height/t)),i=this.viewLayout.getLinesViewportData(),r=Math.max(1,i.completelyVisibleStartLineNumber-n),o=Math.min(this.getLineCount(),i.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new ne.a(r,this.getLineMinColumn(r),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(0===n.length)return[t];let i=[],r=0,o=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=n.length;ea||(oe.startLineNumber);let r="";for(let e=0;e0&&n[e-1]===n[e]||(r+=this.model.getLineContent(n[e])+i);return r}if(r&&t){let t=[],i=0;for(const r of e){const e=r.startLineNumber;r.isEmpty()?e!==i&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(r,n?2:0)),i=e}return 1===t.length?t[0]:t}let s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,n?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;let i=e[0];if(i.isEmpty()){if(!t)return null;const e=i.startLineNumber;i=new ne.a(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const r=this._configuration.options.get(36),o=this._getColorMap(),s=r.fontFamily===Y.c.fontFamily?r.fontFamily:`'${r.fontFamily}', ${Y.c.fontFamily}`;return{mode:n.language,html:'
'+this._getHTMLToCopy(i,o)+"
"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,o=e.endColumn,s=this.getTabSize();let a="";for(let e=n;e<=r;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),d=e===n?i-1:0,u=e===r?o-1:c.length;a+=""===c?"
":Object(qn.a)(c,l.inflate(),t,d,u,s,g.i)}return a}_getColorMap(){let e=_t.C.getColorMap(),t=["#000000"];if(e)for(let n=1,i=e.length;nthis._cursor.setStates(i,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Bn):this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(i=>this._cursor.executeEdits(i,e,t,n))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}replacePreviousChar(e,t,n){this._executeCursorEdit(i=>this._cursor.replacePreviousChar(i,e,t,n))}paste(e,t,n,i){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,i))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new ne.a(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Ln(e,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new ne.a(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Ln(e,n,null,0,!0,0)))}revealRange(e,t,n,i,r){this._withViewEventsCollector(o=>o.emitViewEvent(new Ln(e,n,null,i,t,r)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new On),this._eventDispatcher.emitOutgoingEvent(new jn))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}}var Ci=n(28),Si=n(9),ki=n(17),xi=n(153),Li=n(40),Mi=n(67),Di=n(20),Ei=n(111);class Ti extends Ei.a{constructor(e,t){super(0);for(let t=0;t=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Oi=[],Ni=[];class Ii{constructor(e,t){this.classifier=new Ti(e,t)}static create(e){return new Ii(e.get(108),e.get(107))}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;let r=[],o=[];return{addRequest:(e,t)=>{r.push(e),o.push(t)},finalize:()=>{const s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let a=[];for(let e=0,l=r.length;e=0){let e=Math.abs(c[v]-_);for(;v+1=e)break;e=t,v++}}for(;vt&&(t=p,r=m);let s=0,d=0,y=0,w=0;if(r<=_){let m=r,b=0===t?0:n.charCodeAt(t-1),v=0===t?0:e.get(b),C=!0;for(let r=t;rp&&Fi(b,v,a,l)&&(s=t,d=m),(m+=c)>_){t>p?(y=t,w=m-c):(y=r+1,w=m),m-d>u&&(s=0),C=!1;break}b=a,v=l}if(C){g>0&&(h[g]=l[l.length-1],f[g]=c[l.length-1],g++);break}}if(0===s){let a=r,l=n.charCodeAt(t),c=e.get(l),h=!1;for(let i=t-1;i>=p;i--){const t=i+1,r=n.charCodeAt(i);if(9===r){h=!0;break}let f,g;if(xe.G(r)?(i--,f=0,g=2):(f=e.get(r),g=xe.E(r)?o:1),a<=_){if(0===y&&(y=t,w=a),a<=_-u)break;if(Fi(r,f,l,c)){s=t,d=a;break}}a-=g,l=r,c=f}if(0!==s){const e=u-(w-d);if(e<=i){const t=n.charCodeAt(y);let r;e-(r=xe.F(t)?2:Pi(t,w,i,o))<0&&(s=0)}}if(h){v--;continue}}for(0===s&&(s=y,d=w),p=s,h[g]=s,m=d,f[g]=d,g++,_=d+u;v<0||v=C)break;C=e,v++}}return 0===g?null:(h.length=g,f.length=g,Oi=t.breakOffsets,Ni=t.breakOffsetsVisibleColumn,t.breakOffsets=h,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=d,t)}function Ri(e,t,n,i,r,o){if(-1===i)return null;const s=t.length;if(s<=1)return null;const a=Bi(t,n,i,r,o),l=i-a;let c=[],d=[],u=0,h=0,f=0,g=i,p=t.charCodeAt(0),m=e.get(p),_=Pi(p,0,n,r),b=1;xe.F(p)&&(_+=1,p=t.charCodeAt(1),m=e.get(p),b++);for(let i=b;ig&&((0===h||_-f>l)&&(h=o,f=_-b),c[u]=h,d[u]=f,u++,g=f+l,h=0),p=s,m=a}return 0===u?null:(c[u]=s,d[u]=_,new oi(c,d,a))}function Pi(e,t,n,i){return 9===e?n-t%n:xe.E(e)?i:1}function ji(e,t){return t-e%t}function Fi(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function Bi(e,t,n,i,r){let o=0;if(0!==r){const s=xe.w(e);if(-1!==s){for(let n=0;nn&&(o=0)}}return o}class Wi{static create(){return new Wi}constructor(){}createLineBreaksComputer(e,t,n,i){t|=0,n=+n;let r=[];return{addRequest:(e,t)=>{r.push(e)},finalize:()=>(function(e,t,n,i,r){if(-1===i){const t=[];for(let n=0,i=e.length;no?(c=0,g=0):p=o-e}const m=s.substr(c),_=Hi(m,g,n,p,a);l[i]=c,d[i]=g,u[i]=m,h[i]=_[0],f[i]=_[1]}s.innerHTML=a.build(),s.style.position="absolute",s.style.top="10000",s.style.wordWrap="break-word",document.body.appendChild(s);let g=document.createRange();const p=Array.prototype.slice.call(s.children,0);let m=[];for(let t=0;t');const o=e.length;let s=t,a=0,l=[],c=[],d=0");for(let t=0;t"),l[t]=a,c[t]=s;const i=d;d=t+1"),l[e.length]=a,c[e.length]=s,r.appendASCIIString(""),[l,c]}function Yi(e,t,n,i){if(n.length<=1)return null;const r=Array.prototype.slice.call(t.children,0),o=[];try{!function e(t,n,i,r,o,s,a,l){if(r===s)return;if(o=o||Vi(t,n,i[r],i[r+1]),a=a||Vi(t,n,i[s],i[s+1]),Math.abs(o[0].top-a[0].top)<=.1)return;if(r+1===s)return void l.push(s);const c=r+(s-r)/2|0,d=Vi(t,n,i[c],i[c+1]);e(t,n,i,r,o,c,d,l),e(t,n,i,c,d,s,a,l)}(e,r,i,0,null,n.length-1,null,o)}catch(e){return console.log(e),null}return 0===o.length?null:(o.push(n.length),o)}function Vi(e,t,n,i){return e.setStart(t[n/16384|0].firstChild,n%16384),e.setEnd(t[i/16384|0].firstChild,i%16384),e.getClientRects()}var zi=n(122);n.d(t,"a",(function(){return Ki}));var Ui=function(e,t){return function(n,i){t(n,i,e)}};let $i=0;class qi{constructor(e,t,n,i,r){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=i,this.listenersToRemove=r}dispose(){Object(a.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Ki=class e extends a.a{constructor(e,t,n,i,r,a,l,c,u,h){let f;super(),this._onDidDispose=this._register(new s.a),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new s.a),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new s.a),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new s.a),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new s.a),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new s.a),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new s.a),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new s.a),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new s.a),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new s.a),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new s.a),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new s.a),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Gi),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Gi),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new s.a),this.onWillType=this._onWillType.event,this._onDidType=this._register(new s.a),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new s.a),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new s.a),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new s.a),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new s.a),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new s.a),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new s.a),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new s.a),this.onMouseDrop=this._onMouseDrop.event,this._onContextMenu=this._register(new s.a),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new s.a),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new s.a),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new s.a),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new s.a),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new s.a),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new s.a),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new s.a),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new s.a),this.onDidChangeViewZones=this._onDidChangeViewZones.event,t=t||{},this._domElement=e,this._overflowWidgetsDomNode=t.overflowWidgetsDomNode,this._id=++$i,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=n.isSimpleWidget||!1,this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(t,h)),this._register(this._configuration.onDidChange(e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(117)){const e=t.get(117);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(l.createScoped(this._domElement)),this._notificationService=u,this._codeEditorService=r,this._commandService=a,this._themeService=c,this._register(new Zi(this,this._contextKeyService)),this._register(new Ji(this,this._contextKeyService)),this._instantiationService=i.createChild(new xi.a([Si.b,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Xi(e),this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}),this._contentWidgets={},this._overlayWidgets={},f=Array.isArray(n.contributions)?n.contributions:d.d.getEditorContributions();for(const e of f)try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){Object(o.e)(e)}d.d.getEditorActions().forEach(e=>{const t=new zn.a(e.id,e.label,e.alias,Object(Di.n)(e.precondition),()=>this._instantiationService.invokeFunction(t=>Promise.resolve(e.runEditorCommand(t,this,null))),this._contextKeyService);this._actions[t.id]=t}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new c.a(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Un.a.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,n=e.length;tne.a.lift(e)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return ie.a.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!te.a.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,i){if(!this._modelData)return;if(!ne.a.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,o,t,i)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new ne.a(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,i){if(!te.a.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ne.a(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=h.a.isISelection(e),n=ne.a.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new h.a(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,i){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new ne.a(e,1,t,1),n,!1,i)}revealRange(e,t=0,n=!1,i=!0){this._revealRange(e,n?1:0,i,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,i){if(!ne.a.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ne.a.lift(e),t,n,i)}setSelections(e,t="api"){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,n=e.length;te.isSupported())}getAction(e){return this._actions[e]||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=n;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=n;return void this._replacePreviousChar(e,t.text||"",t.replaceCharCnt||0)}case"paste":{const t=n;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const i=this.getAction(t);i?Promise.resolve(i.run()).then(void 0,o.e):this._modelData&&this._triggerEditorCommand(e,t,n)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_replacePreviousChar(e,t,n){this._modelData&&this._modelData.viewModel.replacePreviousChar(t,n,e)}_paste(e,t,n,i,r){if(!this._modelData||0===t.length)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,n,i,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new ne.a(o.lineNumber,o.column,s.lineNumber,s.column),mode:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const i=d.d.getEditorCommand(t);return!!i&&((n=n||{}).source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(i.runEditorCommand(e,this,n)).then(void 0,o.e)}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(72)&&(this._modelData.model.pushStackElement(),!0))}executeEdits(e,t,n){if(!this._modelData)return!1;if(this._configuration.options.get(72))return!1;let i;return i=n?Array.isArray(n)?()=>n:n:()=>null,this._modelData.viewModel.executeEdits(e,t,i),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Object(Y.l)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(117)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const n=this._modelData.model.validatePosition(t),i=this._configuration.options,r=i.get(117);return{top:e._getVerticalOffsetForPosition(this._modelData,n.lineNumber,n.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(n.lineNumber,n.column)+r.glyphMarginWidth+r.lineNumbersWidth+r.decorationsWidth-this.getScrollLeft(),height:i.get(51)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){c.a.applyFontInfoSlow(e,this._configuration.options.get(36))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const n=new wi(this._id,this._configuration,e,Wi.create(),Ii.create(this._configuration.options),e=>r.Y(e));t.push(e.onDidChangeDecorations(e=>this._onDidChangeModelDecorations.fire(e))),t.push(e.onDidChangeLanguage(t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)})),t.push(e.onDidChangeLanguageConfiguration(e=>this._onDidChangeModelLanguageConfiguration.fire(e))),t.push(e.onDidChangeContent(e=>this._onDidChangeModelContent.fire(e))),t.push(e.onDidChangeOptions(e=>this._onDidChangeModelOptions.fire(e))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(i.a("cursors.maximum","The number of cursors has been limited to {0}.",Yn.MAX_CURSOR_COUNT));const t=[];for(let n=0,i=e.selections.length;n{this._paste("keyboard",e,t,n,i)},type:e=>{this._type("keyboard",e)},replacePreviousChar:(e,t)=>{this._replacePreviousChar("keyboard",e,t)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,n,i)=>{const r={text:e,pasteOnNewLine:t,multicursorText:n,mode:i};this._commandService.executeCommand("paste",r)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},replacePreviousChar:(e,t)=>{const n={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",n)},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new Be(e.coordinatesConverter);return n.onKeyDown=e=>this._onKeyDown.fire(e),n.onKeyUp=e=>this._onKeyUp.fire(e),n.onContextMenu=e=>this._onContextMenu.fire(e),n.onMouseMove=e=>this._onMouseMove.fire(e),n.onMouseLeave=e=>this._onMouseLeave.fire(e),n.onMouseDown=e=>this._onMouseDown.fire(e),n.onMouseUp=e=>this._onMouseUp.fire(e),n.onMouseDrag=e=>this._onMouseDrag.fire(e),n.onMouseDrop=e=>this._onMouseDrop.fire(e),n.onMouseWheel=e=>this._onMouseWheel.fire(e),[new un(t,this._configuration,this._themeService,e,n,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Ki=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Ui(3,ki.a),Ui(4,u.a),Ui(5,Ci.b),Ui(6,Si.b),Ui(7,H.c),Ui(8,Li.a),Ui(9,Mi.b)],Ki);class Gi extends a.a{constructor(){super(),this._onDidChangeToTrue=this._register(new s.a),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new s.a),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Zi extends a.a{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=$n.a.editorSimpleInput.bindTo(t),this._editorFocus=$n.a.focus.bindTo(t),this._textInputFocus=$n.a.textInputFocus.bindTo(t),this._editorTextFocus=$n.a.editorTextFocus.bindTo(t),this._editorTabMovesFocus=$n.a.tabMovesFocus.bindTo(t),this._editorReadonly=$n.a.readOnly.bindTo(t),this._editorColumnSelection=$n.a.columnSelection.bindTo(t),this._hasMultipleSelections=$n.a.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=$n.a.hasNonEmptySelection.bindTo(t),this._canUndo=$n.a.canUndo.bindTo(t),this._canRedo=$n.a.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(116)),this._editorReadonly.set(e.get(72)),this._editorColumnSelection.set(e.get(13))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Ji extends a.a{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=$n.a.languageId.bindTo(t),this._hasCompletionItemProvider=$n.a.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=$n.a.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=$n.a.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=$n.a.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=$n.a.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=$n.a.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=$n.a.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=$n.a.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=$n.a.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=$n.a.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=$n.a.hasReferenceProvider.bindTo(t),this._hasRenameProvider=$n.a.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=$n.a.hasSignatureHelpProvider.bindTo(t),this._hasDocumentFormattingProvider=$n.a.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=$n.a.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=$n.a.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=$n.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=$n.a.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(_t.d.onDidChange(n)),this._register(_t.a.onDidChange(n)),this._register(_t.b.onDidChange(n)),this._register(_t.f.onDidChange(n)),this._register(_t.e.onDidChange(n)),this._register(_t.q.onDidChange(n)),this._register(_t.D.onDidChange(n)),this._register(_t.p.onDidChange(n)),this._register(_t.i.onDidChange(n)),this._register(_t.m.onDidChange(n)),this._register(_t.v.onDidChange(n)),this._register(_t.w.onDidChange(n)),this._register(_t.g.onDidChange(n)),this._register(_t.j.onDidChange(n)),this._register(_t.y.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(_t.d.has(e)),this._hasCodeActionsProvider.set(_t.a.has(e)),this._hasCodeLensProvider.set(_t.b.has(e)),this._hasDefinitionProvider.set(_t.f.has(e)),this._hasDeclarationProvider.set(_t.e.has(e)),this._hasImplementationProvider.set(_t.q.has(e)),this._hasTypeDefinitionProvider.set(_t.D.has(e)),this._hasHoverProvider.set(_t.p.has(e)),this._hasDocumentHighlightProvider.set(_t.i.has(e)),this._hasDocumentSymbolProvider.set(_t.m.has(e)),this._hasReferenceProvider.set(_t.v.has(e)),this._hasRenameProvider.set(_t.w.has(e)),this._hasSignatureHelpProvider.set(_t.y.has(e)),this._hasDocumentFormattingProvider.set(_t.g.has(e)||_t.j.has(e)),this._hasDocumentSelectionFormattingProvider.set(_t.j.has(e)),this._hasMultipleDocumentFormattingProvider.set(_t.g.all(e).length+_t.j.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(_t.j.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===l.b.walkThroughSnippet)}):this.reset()}}class Xi extends a.a{constructor(e){super(),this._onChange=this._register(new s.a),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(r.bb(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const Qi=encodeURIComponent("");function tr(e){return Qi+encodeURIComponent(e.toString())+er}const nr=encodeURIComponent('');Object(H.g)((e,t)=>{const n=e.getColor(yt.t);n&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${n}; }`);const i=e.getColor(yt.u);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${tr(i)}") repeat-x bottom left; }`);const r=e.getColor(yt.S);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const o=e.getColor(yt.T);o&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${tr(o)}") repeat-x bottom left; }`);const s=e.getColor(yt.K);s&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${s}; }`);const a=e.getColor(yt.L);a&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${tr(a)}") repeat-x bottom left; }`);const l=e.getColor(yt.C);l&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${l}; }`);const c=e.getColor(yt.D);c&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return nr+encodeURIComponent(e.toString())+ir}(c)}") no-repeat bottom left; }`);const d=e.getColor(Ee.p);d&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${d.rgba.a}; }`);const u=e.getColor(Ee.o);u&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${u}; }`);const h=e.getColor(yt.B)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${h}}`)})},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(19),o=n(2),s=n(8),a=n(4),l=n(7),c=n(51),d=n(10),u=n(3),h=n(22),f=n(96),g=n(48),p=n(29),m=n(5),_=n(18);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(e=>this._editor.getModel().getDecorationRange(e)).filter(e=>!!e);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===b._FIND_MATCH_DECORATION||t===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,n=0;if(e)for(let i=0,r=this._decorations.length;i{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let n=this._editor.getModel().getDecorationRange(t);if(n.startLineNumber!==n.endLineNumber&&1===n.endColumn){let e=n.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);n=new u.a(n.startLineNumber,n.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(n,b._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=b._FIND_MATCH_DECORATION,r=[];if(e.length>1e3){i=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),n=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/n));let s=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,n=e.length;t=n.startLineNumber?n.endLineNumber>a&&(a=n.endLineNumber):(r.push({range:new u.a(s,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=n.startLineNumber,a=n.endLineNumber)}r.push({range:new u.a(s,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let t=0,n=e.length;tn.removeDecoration(e)),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map(e=>n.addDecoration(e,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){let e=[];for(let t=0;tu.a.compareRangesUsingStarts(e.range,t.range));let n=[],i=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):t}return t}function w(e,t,n){return-1!==e[0].indexOf(n)&&-1!==t.indexOf(n)&&e[0].split(n).length===t.split(n).length}function C(e,t,n){const i=t.split(n),r=e[0].split(n);let o="";return i.forEach((e,t)=>{o+=y([r[t]],e)+n}),o.slice(0,-1)}class S{constructor(e){this.staticValue=e,this.kind=0}}class k{constructor(e){this.pieces=e,this.kind=1}}class x{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new S(e[0].staticValue):this._state=new k(e):this._state=new S("")}static fromStaticValue(e){return new x([L.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?y(e,this._state.staticValue):this._state.staticValue;let n="";for(let t=0,i=this._state.pieces.length;t0){let e=[],t=i.caseOps.length,n=0;for(let o=0,s=r.length;o=t){e.push(r.slice(o));break}switch(i.caseOps[n]){case"U":e.push(r[o].toUpperCase());break;case"u":e.push(r[o].toUpperCase()),n++;break;case"L":e.push(r[o].toLowerCase());break;case"l":e.push(r[o].toLowerCase()),n++;break;default:e.push(r[o])}}r=e.join("")}n+=r}return n}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let n="";for(;e>0;){if(ethis.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Object(o.f)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},B)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;void 0!==t?null!==t&&(n=Array.isArray(t)?t:[t]):n=this._decorations.getFindScopes(),null!==n&&(n=n.map(e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new u.a(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e}));let i=this._findMatches(n,!1,F);this._decorations.set(i,n);const r=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(r);if(0===o&&i.length>0){const e=Object(E.h)(i.map(e=>e.range),e=>u.a.compareRangesUsingStarts(e,r)>=0);o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(29).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:i}=e,r=this._editor.getModel();return t||1===i?(1===n?n=r.getLineCount():n--,i=r.getLineMaxColumn(n)):i--,new d.a(n,i)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:i}=e,r=this._editor.getModel();return t||i===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,i=1):i++,new d.a(n,i)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=r)break;let o=e.charCodeAt(i);if(36===o){n.emitUnchanged(i-1),n.emitStatic("$",i+1);continue}if(48===o||38===o){n.emitUnchanged(i-1),n.emitMatchIndex(0,i+1,t),t.length=0;continue}if(49<=o&&o<=57){let s=o-48;if(i+1=r)break;let o=e.charCodeAt(i);switch(o){case 92:n.emitUnchanged(i-1),n.emitStatic("\\",i+1);break;case 110:n.emitUnchanged(i-1),n.emitStatic("\n",i+1);break;case 116:n.emitUnchanged(i-1),n.emitStatic("\t",i+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(i-1),n.emitStatic("",i+1),t.push(String.fromCharCode(o))}}}return n.finalize()}(this._state.replaceString):x.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){let i=e.buildReplaceString(n.matches,this._state.preserveCase),r=new c.a(t,i);this._executeEditorCommand("replace",r),this._decorations.setStartPosition(new d.a(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}_findMatches(e,t,n){const i=(e||[null]).map(e=>W._getSearchRange(this._editor.getModel(),e));return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null,t,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=F?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new f.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const n=this._editor.getModel(),i=n.getValue(1),r=n.getFullModelRange(),o=this._getReplacePattern();let s;const a=this._state.preserveCase;s=o.hasReplacementPatterns||a?i.replace(t,(function(){return o.buildReplaceString(arguments,a)})):i.replace(t,o.buildReplaceString(null,a));let l=new c.b(r,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),i=[];for(let e=0,r=n.length;ee.range),i);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map(e=>new h.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)),n=this._editor.getSelection();for(let e=0,i=t.length;e{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))}disable(){H.T(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))}}var q=n(16);const K=i.a("caseDescription","Match Case"),G=i.a("wordsDescription","Match Whole Word"),Z=i.a("regexDescription","Use Regular Expression");class J extends ${constructor(e){super({icon:q.a.caseSensitive,title:K+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class X extends ${constructor(e){super({icon:q.a.wholeWord,title:G+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Q extends ${constructor(e){super({icon:q.a.regex,title:Z+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ee extends Y.a{constructor(e,t,n,i){super(),this._hideSoon=this._register(new r.d(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o=i.getColorTheme().getColor(m.db),s=i.getColorTheme().getColor(m.eb),a=i.getColorTheme().getColor(m.cb);this.caseSensitive=this._register(new J({appendTitle:this._keybindingLabelFor(j.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new X({appendTitle:this._keybindingLabelFor(j.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Q({appendTitle:this._keybindingLabelFor(j.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()})),this._register(H.j(this._domNode,e=>this._onMouseOut())),this._register(H.i(this._domNode,"mouseover",e=>this._onMouseOver())),this._applyTheme(i.getColorTheme()),this._register(i.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ee.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.db),inputActiveOptionForeground:e.getColor(m.eb),inputActiveOptionBackground:e.getColor(m.cb)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function te(e,t){return 1===e||2!==e&&t}ee.ID="editor.contrib.findOptionsWidget",Object(_.g)((e,t)=>{const n=e.getColor(m.U);n&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${n}; }`);const i=e.getColor(m.W);i&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const r=e.getColor(m.uc);r&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px ${r}; }`);const o=e.getColor(m.h);o&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${o}; }`)});class ne extends o.a{constructor(){super(),this._onFindReplaceStateChange=this._register(new z.a),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return te(this._isRegexOverride,this._isRegex)}get wholeWord(){return te(this._wholeWordOverride,this._wholeWord)}get matchCase(){return te(this._matchCaseOverride,this._matchCase)}get preserveCase(){return te(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,n){let i={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},r=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,r=!0),void 0!==n&&(u.a.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(i)}change(e,t,n=!0){var i;let r={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(i=e.searchScope)||void 0===i?void 0:i.every(e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some(t=>!u.a.equalsRange(t,e))}))||(this._searchScope=e.searchScope,r.searchScope=!0,o=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,r.loop=!0,o=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,r.isRegex=!0),a!==this.wholeWord&&(o=!0,r.wholeWord=!0),l!==this.matchCase&&(o=!0,r.matchCase=!0),c!==this.preserveCase&&(o=!0,r.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=F}}n(582);var ie=n(55),re=n(160),oe=n(15),se=n(12),ae=(n(345),n(205));const le=i.a("defaultLabel","input");class ce extends Y.a{constructor(e,t,n,i){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new z.a),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new z.a),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new z.a),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new z.a),this._onKeyUp=this._register(new z.a),this._onCaseSensitiveKeyDown=this._register(new z.a),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new z.a),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||le,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const r=i.appendCaseSensitiveLabel||"",o=i.appendWholeWordsLabel||"",s=i.appendRegexLabel||"",a=i.history||[],l=!!i.flexibleHeight,c=!!i.flexibleWidth,d=i.flexibleMaxHeight;this.domNode=document.createElement("div"),H.e(this.domNode,"monaco-findInput"),this.inputBox=this._register(new ae.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:d})),this.regex=this._register(new Q({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(e=>{this._onRegexKeyDown.fire(e)})),this.wholeWords=this._register(new X({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new J({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(e=>{this._onCaseSensitiveKeyDown.fire(e)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let u=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=u.indexOf(document.activeElement);if(t>=0){let n=-1;e.equals(17)?n=(t+1)%u.length:e.equals(15)&&(n=0===t?u.length-1:t-1),e.equals(9)?u[t].blur():n>=0&&u[n].focus(),H.b.stop(e,!0)}}});let h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.caseSensitive.domNode),h.appendChild(this.wholeWords.domNode),h.appendChild(this.regex.domNode),this.domNode.appendChild(h),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){H.Q(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){H.e(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){H.Q(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,H.e(this.domNode,"highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}var de=n(80);const ue=i.a("defaultLabel","input"),he=i.a("label.preserveCaseCheckbox","Preserve Case");class fe extends ${constructor(e){super({icon:q.a.preserveCase,title:he+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ge extends Y.a{constructor(e,t,n,i){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new z.a),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new z.a),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new z.a),this._onInput=this._register(new z.a),this._onKeyUp=this._register(new z.a),this._onPreserveCaseKeyDown=this._register(new z.a),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||ue,this.inputActiveOptionBorder=i.inputActiveOptionBorder,this.inputActiveOptionForeground=i.inputActiveOptionForeground,this.inputActiveOptionBackground=i.inputActiveOptionBackground,this.inputBackground=i.inputBackground,this.inputForeground=i.inputForeground,this.inputBorder=i.inputBorder,this.inputValidationInfoBorder=i.inputValidationInfoBorder,this.inputValidationInfoBackground=i.inputValidationInfoBackground,this.inputValidationInfoForeground=i.inputValidationInfoForeground,this.inputValidationWarningBorder=i.inputValidationWarningBorder,this.inputValidationWarningBackground=i.inputValidationWarningBackground,this.inputValidationWarningForeground=i.inputValidationWarningForeground,this.inputValidationErrorBorder=i.inputValidationErrorBorder,this.inputValidationErrorBackground=i.inputValidationErrorBackground,this.inputValidationErrorForeground=i.inputValidationErrorForeground;const r=i.history||[],o=!!i.flexibleHeight,s=!!i.flexibleWidth,a=i.flexibleMaxHeight;this.domNode=document.createElement("div"),H.e(this.domNode,"monaco-findInput"),this.inputBox=this._register(new ae.a(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,flexibleHeight:o,flexibleWidth:s,flexibleMaxHeight:a})),this.preserveCase=this._register(new fe({appendTitle:"",isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(e=>{this._onPreserveCaseKeyDown.fire(e)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let l=[this.preserveCase.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=l.indexOf(document.activeElement);if(t>=0){let n=-1;e.equals(17)?n=(t+1)%l.length:e.equals(15)&&(n=0===t?l.length-1:t-1),e.equals(9)?l[t].blur():n>=0&&l[n].focus(),H.b.stop(e,!0)}}});let c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){H.Q(this.domNode,"disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){H.e(this.domNode,"disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var pe=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},me=function(e,t){return function(n,i){t(n,i,e)}};const _e="historyNavigationWidget",be="historyNavigationEnabled";function ve(e,t){return e.getContext(document.activeElement).getValue(t)}function ye(e,t){const n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new D.c(n,t).bindTo(e)}(n,t,_e),{scopedContextKeyService:n,historyNavigationEnablement:new D.c(be,!0).bindTo(n)}}let we=class extends ce{constructor(e,t,n,i,r=!1){super(e,t,r,n),this._register(ye(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};we=pe([me(3,D.b)],we);let Ce=class extends ge{constructor(e,t,n,i,r=!1){super(e,t,r,n),this._register(ye(i,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ce=pe([me(3,D.b)],Ce),de.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:D.a.and(D.a.has(_e),D.a.equals(be,!0)),primary:16,secondary:[528],handler:(e,t)=>{const n=ve(e.get(D.b),_e);if(n){n.historyNavigator.showPreviousValue()}}}),de.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:D.a.and(D.a.has(_e),D.a.equals(be,!0)),primary:18,secondary:[530],handler:(e,t)=>{const n=ve(e.get(D.b),_e);if(n){n.historyNavigator.showNextValue()}}});var Se=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const ke=Object(q.e)("find-selection",q.a.selection),xe=Object(q.e)("find-collapsed",q.a.chevronRight),Le=Object(q.e)("find-expanded",q.a.chevronDown),Me=Object(q.e)("find-close",q.a.close),De=Object(q.e)("find-replace",q.a.replace),Ee=Object(q.e)("find-replace-all",q.a.replaceAll),Te=Object(q.e)("find-previous-match",q.a.arrowUp),Oe=Object(q.e)("find-next-match",q.a.arrowDown),Ne=i.a("label.find","Find"),Ie=i.a("placeholder.find","Find"),Ae=i.a("label.previousMatchButton","Previous match"),Re=i.a("label.nextMatchButton","Next match"),Pe=i.a("label.toggleSelectionFind","Find in selection"),je=i.a("label.closeButton","Close"),Fe=i.a("label.replace","Replace"),Be=i.a("placeholder.replace","Replace"),We=i.a("label.replaceButton","Replace"),He=i.a("label.replaceAllButton","Replace All"),Ye=i.a("label.toggleReplaceButton","Toggle Replace mode"),Ve=i.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",F),ze=i.a("label.matchesLocation","{0} of {1}"),Ue=i.a("label.noResults","No results"),$e=419,qe=221;let Ke=69;const Ge=33,Ze="ctrlEnterReplaceAll.windows.donotask",Je=se.f?256:2048;class Xe{constructor(e){this.afterLineNumber=e,this.heightInPx=Ge,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Qe(e,t,n){const i=!!t.match(/\n/);n&&i&&n.selectionStart>0&&e.stopPropagation()}function et(e,t,n){const i=!!t.match(/\n/);n&&i&&n.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(e=>{if(e.hasChanged(72)&&(this._codeEditor.getOption(72)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(117)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(29)){const e=this._codeEditor.getOption(29).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new Xe(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Se(this,void 0,void 0,(function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!0),this._findInput.select())}})))),this._findInputFocused=O.bindTo(a),this._findFocusTracker=this._register(H.bb(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=N.bindTo(a),this._replaceFocusTracker=this._register(H.bb(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(29).addExtraSpaceOnTop&&(this._viewZone=new Xe(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return tt.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(72)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=H.H(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;H.ab(this._domNode,"no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Ke+"px",this._state.matchesCount>=F?this._matchesCount.title=Ve:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=F&&(t+="+");let n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.x(ze,n,t)}else e=Ue;this._matchesCount.appendChild(document.createTextNode(e)),Object(ie.a)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ke=Math.max(Ke,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===Ue)return""===n?i.a("ariaSearchNoResultEmpty","{0} found",e):i.a("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){const r=i.a("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();if(o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1){return`${o.getLineContent(t.startLineNumber)}, ${r}`}return r}return i.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),H.ab(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(72);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(29).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout(()=>{H.e(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","false")},0),setTimeout(()=>{this._findInput.validate()},200),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(29).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const i=H.C(n),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=i.left+(r?r.left:0),s=r?r.top:0;if(this._viewZone&&se.startLineNumber&&(t=!1);const n=H.F(this._domNode).left;o>n&&(t=!1);const r=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());i.left+(r?r.left:0)>n&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),H.Q(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(){if(!this._codeEditor.getOption(29).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const e=this._viewZone;void 0===this._viewZoneId&&e&&this._codeEditor.changeViewZones(t=>{e.heightInPx=this._getHeight(),this._viewZoneId=t.addZone(e),this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+e.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(29).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new Xe(0));const t=this._viewZone;this._codeEditor.changeViewZones(n=>{if(void 0!==this._viewZoneId){const i=this._getHeight();if(i===t.heightInPx)return;let r=i-t.heightInPx;return t.heightInPx=i,n.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r))}{let i=this._getHeight();if((i-=this._codeEditor.getOption(66).top)<=0)return;t.heightInPx=i,this._viewZoneId=n.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+i)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.db),inputActiveOptionBackground:e.getColor(m.cb),inputActiveOptionForeground:e.getColor(m.eb),inputBackground:e.getColor(m.fb),inputForeground:e.getColor(m.hb),inputBorder:e.getColor(m.gb),inputValidationInfoBackground:e.getColor(m.lb),inputValidationInfoForeground:e.getColor(m.nb),inputValidationInfoBorder:e.getColor(m.mb),inputValidationWarningBackground:e.getColor(m.ob),inputValidationWarningForeground:e.getColor(m.qb),inputValidationWarningBorder:e.getColor(m.pb),inputValidationErrorBackground:e.getColor(m.ib),inputValidationErrorForeground:e.getColor(m.kb),inputValidationErrorBorder:e.getColor(m.jb)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!H.N(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void H.e(this._domNode,"hiddenEditor");H.I(this._domNode,"hiddenEditor")&&H.Q(this._domNode,"hiddenEditor");const t=e.width,n=e.minimap.minimapWidth;let i=!1,r=!1,o=!1;if(this._resized){if(H.H(this._domNode)>$e)return this._domNode.style.maxWidth=`${t-28-n-15}px`,void(this._replaceInput.width=H.H(this._findInput.domNode))}if($e+28+n>=t&&(r=!0),$e+28+n-Ke>=t&&(o=!0),$e+28+n-Ke>=t+50&&(i=!0),H.ab(this._domNode,"collapsed-find-widget",i),H.ab(this._domNode,"narrow-find-widget",o),H.ab(this._domNode,"reduced-find-widget",r),o||i||(this._domNode.style.maxWidth=`${t-28-n-15}px`),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=H.H(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||u.a.equalsRange(e,t)?null:e}).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|Je)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Qe(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?et(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|Je)?(se.i&&se.g&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(i.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Ze,!0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Qe(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?et(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new we(null,this._contextViewProvider,{width:qe,label:Ne,placeholder:Ie,appendCaseSensitiveLabel:this._keybindingLabelFor(j.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(j.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(j.ToggleRegexCommand),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(e=>this._onFindInputKeyDown(e))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())})),this._register(this._findInput.onRegexKeyDown(e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(e=>{this._tryUpdateHeight()&&this._showViewZone()})),se.d&&this._register(this._findInput.onMouseDown(e=>this._onFindInputMouseDown(e))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new nt({label:Ae+this._keybindingLabelFor(j.PreviousMatchFindAction),className:Te.classNames,onTrigger:()=>{this._codeEditor.getAction(j.PreviousMatchFindAction).run().then(void 0,oe.e)}})),this._nextBtn=this._register(new nt({label:Re+this._keybindingLabelFor(j.NextMatchFindAction),className:Oe.classNames,onTrigger:()=>{this._codeEditor.getAction(j.NextMatchFindAction).run().then(void 0,oe.e)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new $({icon:ke,title:Pe+this._keybindingLabelFor(j.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)})),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new nt({label:je+this._keybindingLabelFor(j.CloseFindWidgetCommand),className:Me.classNames,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Ce(null,void 0,{label:Fe,placeholder:Be,history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(e=>this._onReplaceInputKeyDown(e))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})),this._replaceBtn=this._register(new nt({label:We+this._keybindingLabelFor(j.ReplaceOneAction),className:De.classNames,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new nt({label:He+this._keybindingLabelFor(j.ReplaceAllAction),className:Ee.classNames,onTrigger:()=>{this._controller.replaceAll()}}));let n=document.createElement("div");n.className="replace-part",n.appendChild(this._replaceInput.domNode);const i=document.createElement("div");i.className="replace-actions",n.appendChild(i),i.appendChild(this._replaceBtn.domNode),i.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new nt({label:Ye,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=H.H(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${$e}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(n),this._resizeSash=new re.a(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let r=$e;this._register(this._resizeSash.onDidStart(()=>{r=H.H(this._domNode)})),this._register(this._resizeSash.onDidChange(e=>{this._resized=!0;let t=r+e.startX-e.currentX;if(t<$e)return;t>(parseFloat(H.z(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=H.H(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const e=H.H(this._domNode);if(e<$e)return;let t=$e;if(!this._resized||e===$e){const e=this._codeEditor.getLayoutInfo();t=e.width-28-e.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=H.H(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)}}tt.ID="editor.contrib.findWidget";class nt extends Y.a{constructor(e){super(),this._opts=e,this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className="button "+this._opts.className,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,e=>{this._opts.onTrigger(),e.preventDefault()}),this.onkeydown(this._domNode,e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){H.ab(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(H.R(this._domNode,xe.classNames),H.f(this._domNode,Le.classNames)):(H.R(this._domNode,Le.classNames),H.f(this._domNode,xe.classNames))}}Object(_.g)((e,t)=>{const n=(e,n)=>{n&&t.addRule(`.monaco-editor ${e} { background-color: ${n}; }`)};n(".findMatch",e.getColor(m.x)),n(".currentFindMatch",e.getColor(m.v)),n(".findScope",e.getColor(m.z)),n(".find-widget",e.getColor(m.U));const i=e.getColor(m.uc);i&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 2px 8px ${i}; }`);const r=e.getColor(m.y);r&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const o=e.getColor(m.w);o&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${o}; padding: 1px; box-sizing: border-box; }`);const s=e.getColor(m.A);s&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const a=e.getColor(m.h);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(m.W);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const c=e.getColor(m.Y);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const d=e.getColor(m.X);if(d)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${d}; }`);else{const n=e.getColor(m.V);n&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${n}; }`)}const u=e.getColor(m.Z);u&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }`)});var it=n(25),rt=n(109),ot=n(71),st=n(41),at=n(87),lt=n(40),ct=n(185);n.d(t,"getSelectionSearchString",(function(){return gt})),n.d(t,"CommonFindController",(function(){return pt})),n.d(t,"FindController",(function(){return mt})),n.d(t,"StartFindAction",(function(){return _t})),n.d(t,"StartFindWithSelectionAction",(function(){return bt})),n.d(t,"MatchFindAction",(function(){return vt})),n.d(t,"NextMatchFindAction",(function(){return yt})),n.d(t,"NextMatchFindAction2",(function(){return wt})),n.d(t,"PreviousMatchFindAction",(function(){return Ct})),n.d(t,"PreviousMatchFindAction2",(function(){return St})),n.d(t,"SelectionMatchFindAction",(function(){return kt})),n.d(t,"NextSelectionMatchFindAction",(function(){return xt})),n.d(t,"PreviousSelectionMatchFindAction",(function(){return Lt})),n.d(t,"StartFindReplaceAction",(function(){return Mt})),n.d(t,"EditorStartFindAction",(function(){return Dt})),n.d(t,"EditorStartFindReplaceAction",(function(){return Et}));var dt=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},ut=function(e,t){return function(n,i){t(n,i,e)}},ht=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const ft=524288;function gt(e){if(!e.hasModel())return null;const t=e.getSelection();if(t.startLineNumber===t.endLineNumber)if(t.isEmpty()){const n=e.getConfiguredWordAtPosition(t.getStartPosition());if(n)return n.word}else if(e.getModel().getValueLengthInRange(t)this._onStateChanged(e))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(29).loop})}))}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!O.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.v(e)),this._state.change({searchString:e},!1)}highlightFindOptions(){}_start(e){return ht(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if(e.seedSearchStringFromSelection){let e=gt(this._editor);e&&(this._state.isRegex?t.searchString=s.v(e):t.searchString=e)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some(e=>!e.isEmpty())&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new W(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return ht(this,void 0,void 0,(function*(){return this._editor.getOption(29).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(29).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};pt.ID="editor.contrib.findController",pt=dt([ut(1,D.b),ut(2,at.a),ut(3,rt.a)],pt);let mt=class extends pt{constructor(e,t,n,i,r,o,s,a,l){super(e,n,s,l),this._contextViewService=t,this._keybindingService=i,this._themeService=r,this._notificationService=o,this._storageKeysSyncRegistryService=a,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return ht(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let i=!1;switch(this._editor.getOption(29).autoFindInSelection){case"always":i=!0;break;case"never":i=!1;break;case"multiline":i=!!n&&n.startLineNumber!==n.endLineNumber}e.updateSearchScope=i,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new tt(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._storageKeysSyncRegistryService)),this._findOptionsWidget=this._register(new ee(this._editor,this._state,this._keybindingService,this._themeService))}};mt=dt([ut(1,ot.b),ut(2,D.b),ut(3,st.a),ut(4,_.c),ut(5,lt.a),ut(6,at.a),ut(7,ct.a),ut(8,rt.a)],mt);class _t extends a.f{constructor(){super({id:j.StartFindAction,label:i.a("startFindAction","Find"),alias:"Find",precondition:void 0,kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:it.b.MenubarEditMenu,group:"3_find",title:i.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})}run(e,t){return ht(this,void 0,void 0,(function*(){let e=pt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(29).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}))}))}}class bt extends a.b{constructor(){super({id:j.StartFindWithSelection,label:i.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return ht(this,void 0,void 0,(function*(){let e=pt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class vt extends a.b{run(e,t){return ht(this,void 0,void 0,(function*(){let e=pt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),this._run(e))}))}}class yt extends vt{constructor(){super({id:j.NextMatchFindAction,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:l.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})}_run(e){return e.moveToNextMatch()}}class wt extends vt{constructor(){super({id:j.NextMatchFindAction,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:D.a.and(l.a.focus,O),primary:3,weight:100}})}_run(e){return e.moveToNextMatch()}}class Ct extends vt{constructor(){super({id:j.PreviousMatchFindAction,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:l.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})}_run(e){return e.moveToPrevMatch()}}class St extends vt{constructor(){super({id:j.PreviousMatchFindAction,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:D.a.and(l.a.focus,O),primary:1027,weight:100}})}_run(e){return e.moveToPrevMatch()}}class kt extends a.b{run(e,t){return ht(this,void 0,void 0,(function*(){let e=pt.get(t);if(!e)return;let n=gt(t);n&&e.setSearchString(n),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}),this._run(e))}))}}class xt extends kt{constructor(){super({id:j.NextSelectionMatchFindAction,label:i.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.a.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Lt extends kt{constructor(){super({id:j.PreviousSelectionMatchFindAction,label:i.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.a.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}class Mt extends a.f{constructor(){super({id:j.StartFindReplaceAction,label:i.a("startReplace","Replace"),alias:"Replace",precondition:void 0,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:it.b.MenubarEditMenu,group:"3_find",title:i.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})}run(e,t){return ht(this,void 0,void 0,(function*(){if(!t.hasModel()||t.getOption(72))return;let e=pt.get(t),n=t.getSelection(),i=e.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&t.getOption(29).seedSearchStringFromSelection&&!i,o=i||r?2:1;e&&(yield e.start({forceRevealReplace:!0,seedSearchStringFromSelection:r,seedSearchStringFromGlobalClipboard:t.getOption(29).seedSearchStringFromSelection,shouldFocus:o,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop}))}))}}Object(a.m)(pt.ID,mt);const Dt=new _t;Object(a.r)(Dt),Object(a.k)(bt),Object(a.k)(yt),Object(a.k)(wt),Object(a.k)(Ct),Object(a.k)(St),Object(a.k)(xt),Object(a.k)(Lt);const Et=new Mt;Object(a.r)(Et);const Tt=a.c.bindToContribution(pt.get);Object(a.l)(new Tt({id:j.CloseFindWidgetCommand,precondition:T,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:9,secondary:[1033]}})),Object(a.l)(new Tt({id:j.ToggleCaseSensitiveCommand,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:I.primary,mac:I.mac,win:I.win,linux:I.linux}})),Object(a.l)(new Tt({id:j.ToggleWholeWordCommand,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),Object(a.l)(new Tt({id:j.ToggleRegexCommand,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.l)(new Tt({id:j.ToggleSearchScopeCommand,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),Object(a.l)(new Tt({id:j.ReplaceOneAction,precondition:T,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:3094}})),Object(a.l)(new Tt({id:j.ReplaceOneAction,precondition:T,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:D.a.and(l.a.focus,N),primary:3}})),Object(a.l)(new Tt({id:j.ReplaceAllAction,precondition:T,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:2563}})),Object(a.l)(new Tt({id:j.ReplaceAllAction,precondition:T,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:D.a.and(l.a.focus,N),primary:void 0,mac:{primary:2051}}})),Object(a.l)(new Tt({id:j.SelectAllMatchesAction,precondition:T,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.a.focus,primary:515}}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(1);function r(e,t={}){const n=s(t);return n.textContent=e,n}function o(e,t={}){const n=s(t);return function e(t,n,r){let o;if(2===n.type)o=document.createTextNode(n.content||"");else if(3===n.type)o=document.createElement("b");else if(4===n.type)o=document.createElement("i");else if(5===n.type&&r){const e=document.createElement("a");e.href="#",r.disposeables.add(i.n(e,"click",e=>{r.callback(String(n.index),e)})),o=e}else 7===n.type?o=document.createElement("br"):1===n.type&&(o=t);o&&t!==o&&t.appendChild(o);o&&Array.isArray(n.children)&&n.children.forEach(t=>{e(o,t,r)})}(n,function(e){const t={type:1,children:[]};let n=0,i=t;const r=[],o=new a(e);for(;!o.eos();){let e=o.next();const t="\\"===e&&0!==l(o.peek());if(t&&(e=o.next()),t||0===l(e)||e!==o.peek())if("\n"===e)2===i.type&&(i=r.pop()),i.children.push({type:7});else if(2!==i.type){const t={type:2,content:e};i.children.push(t),r.push(i),i=t}else i.content+=e;else{o.advance(),2===i.type&&(i=r.pop());const t=l(e);if(i.type===t||5===i.type&&6===t)i=r.pop();else{const e={type:t,children:[]};5===t&&(e.index=n,n++),i.children.push(e),r.push(i),i=e}}}2===i.type&&(i=r.pop());r.length;return t}(e),t.actionHandler),n}function s(e){const t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a}));var i=n(6),r=n(2),o=n(17);const s=Object(o.c)("IStorageKeysSyncRegistryService");class a extends r.a{constructor(){super(),this._storageKeys=new Map,this._onDidChangeStorageKeys=this._register(new i.a),this._register(Object(r.h)(()=>this._storageKeys.clear()))}get storageKeys(){return[...this._storageKeys.values()]}registerStorageKey(e){this._storageKeys.has(e.key)||(this._storageKeys.set(e.key,e),this._onDidChangeStorageKeys.fire(this.storageKeys))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n(37),r=n(33),o=n(182),s=n(28),a=n(9),l=n(17),c=n(40),d=n(18),u=n(67),h=function(e,t){return function(n,i){t(n,i,e)}};let f=class extends o.a{constructor(e,t,n,i,r,o,s,a,l,c){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),{},i,r,o,s,a,l,c),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){i.g(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};f=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([h(3,l.a),h(4,r.a),h(5,s.b),h(6,a.b),h(7,d.c),h(8,c.a),h(9,u.b)],f)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return m}));var i=n(30),r=n(1),o=n(19),s=n(6),a=n(2),l=n(12),c=n(8),d=n(117),u=n(10),h=n(22),f=n(136);const g={forceCopyWithSyntaxHighlighting:!1};class p{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}p.INSTANCE=new p;class m extends a.a{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new s.a),this.onFocus=this._onFocus.event,this._onBlur=this._register(new s.a),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new s.a),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new s.a),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new s.a),this.onCut=this._onCut.event,this._onPaste=this._register(new s.a),this.onPaste=this._onPaste.event,this._onType=this._register(new s.a),this.onType=this._onType.event,this._onCompositionStart=this._register(new s.a),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new s.a),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new s.a),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new s.a),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new b(t)),this._asyncTriggerCut=this._register(new o.d(()=>this._onCut.fire(),0)),this._textAreaState=d.b.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let n=null;this._register(r.n(t.domNode,"keydown",e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),n=e,this._onKeyDown.fire(e)})),this._register(r.n(t.domNode,"keyup",e=>{this._onKeyUp.fire(e)})),this._register(r.i(t.domNode,"compositionstart",e=>{if(this._isDoingComposition)return;this._isDoingComposition=!0;let t=!1;l.f&&n&&n.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"!==n.code&&"ArrowLeft"!==n.code||(t=!0)),t?this._textAreaState=new d.b(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new u.a(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition):i.f||this._setAndWriteTextAreaState("compositionstart",d.b.EMPTY),this._onCompositionStart.fire({moveOneCharacterLeft:t})}));const a=e=>{const t=this._textAreaState,n=d.b.readFromTextArea(this._textArea);return[n,d.b.deduceInput(t,n,e)]},h=e=>{const t=this._textAreaState,n=d.b.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},f=e=>!(!i.f||"ja"!==e);this._register(r.i(t.domNode,"compositionupdate",e=>{if(f(e.locale)){const[t,n]=a(!1);return this._textAreaState=t,this._onType.fire(n),void this._onCompositionUpdate.fire(e)}const[t,n]=h(e.data||"");this._textAreaState=t,this._onType.fire(n),this._onCompositionUpdate.fire(e)})),this._register(r.i(t.domNode,"compositionend",e=>{if(this._isDoingComposition){if(f(e.locale)){const[e,t]=a(!1);this._textAreaState=e,this._onType.fire(t)}else{const[t,n]=h(e.data||"");this._textAreaState=t,this._onType.fire(n)}(i.f||i.e)&&(this._textAreaState=d.b.readFromTextArea(this._textArea)),this._isDoingComposition&&(this._isDoingComposition=!1,this._onCompositionEnd.fire())}})),this._register(r.i(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=a(l.f);0===t.replaceCharCnt&&1===t.text.length&&c.F(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""!==t.text&&this._onType.fire(t):(""===t.text&&0===t.replaceCharCnt||this._firePaste(t.text,null),this._nextCommand=0))})),this._register(r.i(t.domNode,"cut",e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(r.i(t.domNode,"copy",e=>{this._ensureClipboardGetsEditorSelection(e)})),this._register(r.i(t.domNode,"paste",e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),_.canUseTextData(e)){const[t,n]=_.getTextData(e);""!==t&&this._firePaste(t,n)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",d.b.EMPTY),this._nextCommand=1})),this._register(r.i(t.domNode,"focus",()=>{this._setHasFocus(!0)})),this._register(r.i(t.domNode,"blur",()=>{this._setHasFocus(!1)}))}_installSelectionChangeListener(){let e=0;return r.i(document,"selectionchange",t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!i.e)return;const n=Date.now(),r=n-e;if(e=n,r<5)return;const o=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),f=this._host.deduceModelPosition(u[0],u[1],u[2]),g=new h.a(d.lineNumber,d.column,f.lineNumber,f.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=r.E(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):r.N(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(i.f?this._setAndWriteTextAreaState("focusgain",d.b.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(_.canUseTextData(e)&&f.a.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};p.INSTANCE.set(i.h?t.text.replace(/\r\n/g,"\n"):t.text,n),_.canUseTextData(e)?_.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",d.b.selectedText(t.text))}_firePaste(e,t){t||(t=p.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class _{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData("text/plain");let n=null;const i=e.clipboardData.getData("vscode-editor-data");if("string"==typeof i)try{1!==(n=JSON.parse(i)).version&&(n=null)}catch(e){}return[t,n]}if(window.clipboardData){return e.preventDefault(),[window.clipboardData.getData("Text"),null]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,n,i){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"==typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(i)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class b extends a.a{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionEnd}setSelectionRange(e,t,n){const o=this._actual.domNode;let s=null;const a=r.E(o),l=(s=a?a.activeElement:document.activeElement)===o,c=o.selectionStart,d=o.selectionEnd;if(l&&c===t&&d===n)i.h&&window.parent!==window&&o.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),o.setSelectionRange(t,n),void(i.h&&window.parent!==window&&o.focus());try{const e=r.X(o);this.setIgnoreSelectionChangeTime("setSelectionRange"),o.focus(),o.setSelectionRange(t,n),r.V(o,e)}catch(e){}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));class i{constructor(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class r{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(u=n-h);const f=l.color;let g=this._color2Id[f];g||(g=++this._lastAssignedId,this._color2Id[f]=g,this._id2Color[g]=f);const p=new i(u-h,u+h,g);l.setColorZone(p),s.push(p)}return this._colorZonesInvalid=!1,s.sort(i.compare),s}}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var i=n(142).Symbol;e.exports=i},function(e,t,n){(function(e){var i=n(142),r=n(686),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?i.Buffer:void 0,l=(a?a.isBuffer:void 0)||r;e.exports=l}).call(this,n(215)(e))},function(e,t,n){var i=n(357),r=n(690),o=n(158);e.exports=function(e){return o(e)?i(e,!0):r(e)}},function(e,t,n){var i=n(695),r=n(296),o=n(696),s=n(366),a=n(697),l=n(179),c=n(355),d=c(i),u=c(r),h=c(o),f=c(s),g=c(a),p=l;(i&&"[object DataView]"!=p(new i(new ArrayBuffer(1)))||r&&"[object Map]"!=p(new r)||o&&"[object Promise]"!=p(o.resolve())||s&&"[object Set]"!=p(new s)||a&&"[object WeakMap]"!=p(new a))&&(p=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?c(n):"";if(i)switch(i){case d:return"[object DataView]";case u:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case g:return"[object WeakMap]"}return t}),e.exports=p},function(e,t,n){var i=n(179),r=n(148),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||r(e)&&i(e)==o}},function(e,t,n){var i;try{i={defaults:n(312),each:n(218),isFunction:n(178),isPlainObject:n(405),pick:n(315),has:n(220),range:n(316),uniqueId:n(317)}}catch(e){}i||(i=window._),e.exports=i},function(e,t,n){"use strict";n.r(t),n.d(t,"ToggleTabFocusModeAction",(function(){return a}));var i=n(0),r=n(55),o=n(4),s=n(172);class a extends o.b{constructor(){super({id:a.ID,label:i.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!s.b.getTabFocusMode();s.b.setTabFocusMode(n),n?Object(r.a)(i.a("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Object(r.a)(i.a("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",Object(o.k)(a)},function(e,t,n){"use strict";var i=n(86);n.o(i,"Emitter")&&n.d(t,"Emitter",(function(){return i.Emitter})),n.o(i,"MarkerSeverity")&&n.d(t,"MarkerSeverity",(function(){return i.MarkerSeverity})),n.o(i,"MarkerTag")&&n.d(t,"MarkerTag",(function(){return i.MarkerTag})),n.o(i,"Range")&&n.d(t,"Range",(function(){return i.Range})),n.o(i,"Uri")&&n.d(t,"Uri",(function(){return i.Uri})),n.o(i,"editor")&&n.d(t,"editor",(function(){return i.editor})),n.o(i,"languages")&&n.d(t,"languages",(function(){return i.languages}))},function(e,t,n){"use strict";var i=n(86);n.o(i,"Emitter")&&n.d(t,"Emitter",(function(){return i.Emitter})),n.o(i,"MarkerSeverity")&&n.d(t,"MarkerSeverity",(function(){return i.MarkerSeverity})),n.o(i,"Range")&&n.d(t,"Range",(function(){return i.Range})),n.o(i,"Uri")&&n.d(t,"Uri",(function(){return i.Uri})),n.o(i,"editor")&&n.d(t,"editor",(function(){return i.editor})),n.o(i,"languages")&&n.d(t,"languages",(function(){return i.languages}))},function(e,t,n){"use strict";var i=n(86);n.o(i,"Emitter")&&n.d(t,"Emitter",(function(){return i.Emitter})),n.o(i,"MarkerSeverity")&&n.d(t,"MarkerSeverity",(function(){return i.MarkerSeverity})),n.o(i,"Range")&&n.d(t,"Range",(function(){return i.Range})),n.o(i,"Uri")&&n.d(t,"Uri",(function(){return i.Uri})),n.o(i,"editor")&&n.d(t,"editor",(function(){return i.editor})),n.o(i,"languages")&&n.d(t,"languages",(function(){return i.languages}))},function(e,t,n){"use strict";n.r(t);var i,r=n(0),o=n(2),s=n(9),a=n(10),l=n(3),c=n(4),d=n(7),u=(n(587),n(1)),h=n(52),f=n(5),g=n(18),p=n(13),m=n(94),_=n(174),b=n(14),v=n(6),y=n(53),w=n(42),C=n(58),S=n(16);(i||(i={})).className=function(e){switch(e){case C.a.Ignore:return"severity-ignore "+S.a.info.classNames;case C.a.Info:return S.a.info.classNames;case C.a.Warning:return S.a.warning.classNames;case C.a.Error:return S.a.error.classNames;default:return""}},Object(g.g)((e,t)=>{const n=e.getColor(f.Zb);if(n){const e=S.a.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const i=e.getColor(f.bc);if(i){const e=S.a.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const r=e.getColor(f.ac);if(r){const e=S.a.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${r};\n\t\t\t}\n\t\t`)}});var k=n(66),x=n(25),L=n(236),M=n(17),D=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},E=function(e,t){return function(n,i){t(n,i,e)}};class T{constructor(e,t,n,i){this._openerService=i,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new o.b,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),u.e(this._messageBlock,"message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(u.n(this._relatedBlock,"click",e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&n(t)})),this._scrollable=new m.b(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Object(o.f)(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let o=((null==t?void 0:t.length)||0)+"()".length;r&&(o+="string"==typeof r?r.length:r.value.length);const s=n.split(/\r\n|\r|\n/g);this._lines=s.length,this._longestLineLength=0;for(const e of s)this._longestLineLength=Math.max(e.length+o,this._longestLineLength);u.s(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of s)(a=document.createElement("div")).innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||r){const e=document.createElement("span");if(u.e(e,"details"),a.appendChild(e),t){const n=document.createElement("span");n.innerText=t,u.e(n,"source"),e.appendChild(n)}if(r)if("string"==typeof r){const t=document.createElement("span");t.innerText=`(${r})`,u.e(t,"code"),e.appendChild(t)}else{this._codeLink=u.a("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(r.target),e.preventDefault(),e.stopPropagation()},u.p(this._codeLink,u.a("span")).innerText=r.value,e.appendChild(this._codeLink)}}if(u.s(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Object(b.o)(i)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(51))}px`,this._lines+=1;for(const t of i){let n=document.createElement("div"),i=document.createElement("a");u.e(i,"filename"),i.innerText=`${Object(_.a)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,i.title=Object(_.b)(t.resource,void 0),this._relatedDiagnostics.set(i,t);let r=document.createElement("span");r.innerText=t.message,n.appendChild(i),n.appendChild(r),this._lines+=1,e.appendChild(n)}}const l=this._editor.getOption(36),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case h.c.Error:t=r.a("Error","Error");break;case h.c.Warning:t=r.a("Warning","Warning");break;case h.c.Info:t=r.a("Info","Info");break;case h.c.Hint:t=r.a("Hint","Hint")}let n=r.a("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();if(i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1){n=`${i.getLineContent(e.startLineNumber)}, ${n}`}return n}}let O=class e extends y.c{constructor(e,t,n,i,r,s){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=s,this._callOnDispose=new o.b,this._onDidSelectRelatedInformation=new v.a,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=h.c.Warning,this._backgroundColor=p.a.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(F);let t=R;this._severity===h.c.Warning?t=P:this._severity===h.c.Info&&(t=j);const n=e.getColor(t);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(y.q),secondaryHeadingColor:e.getColor(y.r)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onDidBeforeRun(e=>this.editor.focus()));const n=[],i=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);Object(L.c)(i,void 0,n),this._actionbarWidget.push(n,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=u.p(e,u.a(""))}_getActionBarOptions(){return Object.assign(Object.assign({},super._getActionBarOptions()),{orientation:0})}_fillBody(e){this._parentContainer=e,u.e(e,"marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new T(this._container,this.editor,e=>this._onDidSelectRelatedInformation.fire(e),this._openerService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let o=l.a.lift(e);const s=this.editor.getPosition();let a=s&&o.containsPosition(s)?s:o.getStartPosition();super.show(a,this.computeRequiredHeight());const c=this.editor.getModel();if(c){const e=n>1?r.a("problems","{0} of {1} problems",t,n):r.a("change","{0} of {1} problem",t,n);this.setTitle(Object(w.b)(c.uri),e)}this._icon.className=`codicon ${i.className(h.c.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};O.TitleMenu=new x.b("gotoErrorTitleMenu"),O=D([E(1,g.c),E(2,k.a),E(3,x.a),E(4,M.a),E(5,s.b)],O);let N=Object(f.Ub)(f.u,f.t),I=Object(f.Ub)(f.T,f.S),A=Object(f.Ub)(f.L,f.K);const R=Object(f.gc)("editorMarkerNavigationError.background",{dark:N,light:N,hc:N},r.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),P=Object(f.gc)("editorMarkerNavigationWarning.background",{dark:I,light:I,hc:I},r.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),j=Object(f.gc)("editorMarkerNavigationInfo.background",{dark:A,light:A,hc:A},r.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),F=Object(f.gc)("editorMarkerNavigation.background",{dark:"#2D2D30",light:p.a.white,hc:"#0C141F"},r.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(g.g)((e,t)=>{const n=e.getColor(f.rc);n&&(t.addRule(`.monaco-editor .marker-widget a { color: ${n}; }`),t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${n}; }`))});var B=n(33),W=n(24),H=n(8),Y=n(103),V=n(84),z=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},U=function(e,t){return function(n,i){t(n,i,e)}};class ${constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let q=class e{constructor(t,n){this._markerService=n,this._onDidChange=new v.a,this.onDidChange=this._onDidChange.event,this._dispoables=new o.b,this._markers=[],this._nextIdx=-1,W.a.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const i=()=>{this._markers=this._markerService.read({resource:W.a.isUri(t)?t:void 0,severities:h.c.Error|h.c.Warning|h.c.Info}),"function"==typeof t&&(this._markers=this._markers.filter(e=>this._resourceFilter(e.resource))),this._markers.sort(e._compareMarker)};i(),this._dispoables.add(n.onMarkerChanged(e=>{this._resourceFilter&&!e.some(e=>this._resourceFilter(e))||(i(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new $(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(t=>t.resource.toString()===e.uri.toString());r<0&&(r=Object(b.c)(this._markers,{resource:e.uri},(e,t)=>Object(H.f)(e.resource.toString(),t.resource.toString())))<0&&(r=~r);for(let n=r;nt.resource.toString()===e.toString());if(!(n<0))for(;n=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},J=function(e,t){return function(n,i){t(n,i,e)}},X=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let Q=class e{constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new o.b,this._editor=e,this._widgetVisible=ie.bindTo(this._contextKeyService)}static get(t){return t.getContribution(e.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(O,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e=>{var t,n,i;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.a.containsPosition(null===(n=this._model)||void 0===n?void 0:n.selected.marker,e.position)||null===(i=this._model)||void 0===i||i.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.a.lift(e).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.a(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,n){return X(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const i=this._getOrCreateModel(n?void 0:this._editor.getModel().uri);if(i.move(t,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);r&&(e.get(r).close(),e.get(r).nagivate(t,n))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}))}};Q.ID="editor.contrib.markerController",Q=Z([J(1,K),J(2,s.b),J(3,B.a),J(4,M.a)],Q);class ee extends c.b{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){return X(this,void 0,void 0,(function*(){t.hasModel()&&Q.get(t).nagivate(this._next,this._multiFile)}))}}class te extends ee{constructor(){super(!0,!1,{id:te.ID,label:te.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.a.focus,primary:578,weight:100},menuOpts:{menuId:O.TitleMenu,title:te.LABEL,icon:Object(S.e)("marker-navigation-next",S.a.chevronDown),group:"navigation",order:1}})}}te.ID="editor.action.marker.next",te.LABEL=r.a("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class ne extends ee{constructor(){super(!1,!1,{id:ne.ID,label:ne.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.a.focus,primary:1602,weight:100},menuOpts:{menuId:O.TitleMenu,title:te.LABEL,icon:Object(S.e)("marker-navigation-previous",S.a.chevronUp),group:"navigation",order:2}})}}ne.ID="editor.action.marker.prev",ne.LABEL=r.a("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");Object(c.m)(Q.ID,Q),Object(c.k)(te),Object(c.k)(ne),Object(c.k)(class extends ee{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:r.a("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.a.focus,primary:66,weight:100},menuOpts:{menuId:x.b.MenubarGoMenu,title:r.a({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),Object(c.k)(class extends ee{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:r.a("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:d.a.focus,primary:1090,weight:100},menuOpts:{menuId:x.b.MenubarGoMenu,title:r.a({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const ie=new s.c("markersNavigationVisible",!1),re=c.c.bindToContribution(Q.get);Object(c.l)(new re({id:"closeMarkersNavigation",precondition:ie,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:d.a.focus,primary:9,secondary:[1033]}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(6),r=n(2);class o{constructor(e,t,n,i,r,o){e|=0,t|=0,n|=0,i|=0,r|=0,o|=0,this.rawScrollLeft=n,this.rawScrollTop=o,e<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),o+i>r&&(o=r-i),o<0&&(o=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=r,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e){const t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:r,scrollHeightChanged:o,scrollTopChanged:s}}}class s extends r.a{constructor(e,t){super(),this._onScroll=this._register(new i.a),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new o(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const n=this._state.withScrollDimensions(e,t);this._setState(n),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)}setScrollPositionSmooth(e){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const t=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===t.scrollLeft&&this._smoothScrolling.to.scrollTop===t.scrollTop)return;const n=this._smoothScrolling.combine(this._state,t,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})):void 0}_setState(e){const t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))}}class a{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function l(e,t){const n=t-e;return function(t){return e+n*(1-function(e){return Math.pow(e,3)}(1-t))}}class c{constructor(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let s,a;return enew r.a(i.p(this.descriptionContainer.element,i.a("span.label-description")),!!t.supportCodicons):this.descriptionNodeFactory=()=>this._register(new l(i.p(this.descriptionContainer.element,i.a("span.label-description"))))}setLabel(e,t,n){const i=["monaco-icon-label"];n&&(n.extraClasses&&i.push(...n.extraClasses),n.italic&&i.push("italic"),n.strikethrough&&i.push("strikethrough")),this.domNode.className=i.join(" "),this.domNode.title=(null==n?void 0:n.title)||"",this.nameNode.setLabel(e,n),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.a?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),(null==n?void 0:n.descriptionTitle)?this.descriptionNode.element.title=n.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=(null==n?void 0:n.descriptionTitle)||"",this.descriptionNode.empty=!t))}}class d{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Object(a.e)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",i.Q(this.container,"multiple"),this.singleLabel=i.p(this.container,i.a("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",i.e(this.container,"multiple"),this.singleLabel=void 0;for(let n=0;n{const r={start:i,end:i+e.length},o=n.map(e=>s.a.intersect(r,e)).filter(e=>!s.a.isEmpty(e)).map(({start:e,end:t})=>({start:e-i,end:t-i}));return i=r.end+t.length,o})}(e,n,null==t?void 0:t.matches);for(let s=0;sthis._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}var g=n(94),p=n(34);n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return v}));const m=r.a,_={inputBackground:d.a.fromHex("#3C3C3C"),inputForeground:d.a.fromHex("#CCCCCC"),inputValidationInfoBorder:d.a.fromHex("#55AAFF"),inputValidationInfoBackground:d.a.fromHex("#063B49"),inputValidationWarningBorder:d.a.fromHex("#B89500"),inputValidationWarningBackground:d.a.fromHex("#352A05"),inputValidationErrorBorder:d.a.fromHex("#BE1100"),inputValidationErrorBackground:d.a.fromHex("#5A1D1D")};class b extends c.a{constructor(e,t,n){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new l.a),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new l.a),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n||Object.create(null),Object(u.g)(this.options,_,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=r.p(e,m(".monaco-inputbox.idle"));let i=this.options.flexibleHeight?"textarea":"input",o=r.p(this.element,m(".wrapper"));if(this.input=r.p(o,m(i+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=r.p(o,m("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new g.b(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),r.p(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=l.b.filter(Object(p.a)(document,"selectionchange"),()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===o});this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new a.a(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:r.G(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return r.H(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=n.border?`1px solid ${n.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,n=()=>e.style.width=r.H(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=r.p(t,m(".monaco-inputbox-container")),n();const i={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?Object(o.b)(this.message.content,i):Object(o.c)(this.message.content,i);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background?a.background.toString():"",s.style.color=a.foreground?a.foreground.toString():"",s.style.border=a.border?`1px solid ${a.border}`:"",r.p(e,s),null},onHide:()=>{this.state="closed"},layout:n}),t=3===this.message.type?i.a("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?i.a("alertWarningMessage","Warning: {0}",this.message.content):i.a("alertInfoMessage","Info: {0}",this.message.content),s.a(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=r.G(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,i=t.selectionEnd,r=t.value;null!==n&&null!==i&&(this.value=r.substr(0,n)+e+r.substr(i),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class v extends b{constructor(e,t,n){super(e,t,n),this.history=new f(n.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,s.c(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,s.c(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},function(module,exports,__webpack_require__){(function(global){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(e,t){module.exports=t(e)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:this,(function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.1",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,i=e.length;n>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,i=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),r=[fromCharCode(i>>>16),fromCharCode(i>>>8&255),fromCharCode(255&i)];return r.length-=[0,0,2,1][n],r.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(e){return encode(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),module.exports?module.exports.Base64=global.Base64:(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return global.Base64}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)),{Base64:global.Base64}}))}).call(this,__webpack_require__(238))},function(e,t,n){"use strict";function i(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return p}));var i=n(0),r=n(15),o=n(22),s=n(24),a=n(227),l=n(62);function c(e){return e.toString()}class d{constructor(e,t,n,i,r,o,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=r,this.afterCursorState=o,this.changes=s}static create(e,t){const n=e.getAlternativeVersionId(),i=f(e);return new d(n,n,i,i,t,t,[])}append(e,t,n,i,r){t.length>0&&(this.changes=Object(a.b)(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(l.f(e,t?t.length:0,n),n+=4,t)for(const i of t)l.f(e,i.selectionStartLineNumber,n),n+=4,l.f(e,i.selectionStartColumn,n),n+=4,l.f(e,i.positionLineNumber,n),n+=4,l.f(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=l.c(e,t);t+=4;for(let r=0;re.toString()).join(", ")}matchesResource(e){return(s.a.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof d}append(e,t,n,i,r){this._data instanceof d&&this._data.append(e,t,n,i,r)}close(){this._data instanceof d&&(this._data=this._data.serialize())}undo(){if(s.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}}class h{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=c(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=c(e);return this._editStackElementsMap.has(t)}setModel(e){const t=c(s.a.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=c(e.uri);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).canAppend(e)}return!1}append(e,t,n,i,r){const o=c(e.uri);this._editStackElementsMap.get(o).append(e,t,n,i,r)}close(){this._isOpen=!1}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}split(){return this._editStackElementsArr}}function f(e){return"\n"===e.getEOL()?0:1}function g(e){return!!e&&(e instanceof u||e instanceof h)}class p{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);g(e)&&e.close()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(g(t)&&t.canAppend(this._model))return t;const n=new u(this._model,e);return this._undoRedoService.pushElement(n),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],f(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n){const i=this._getOrCreateEditStackElement(e),r=this._model.applyEdits(t,!0),o=p._computeCursorState(n,r),s=r.map((e,t)=>({index:t,textChange:e.textChange}));return s.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),i.append(this._model,s.map(e=>e.textChange),f(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return Object(r.e)(e),null}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var i=n(14),r=n(26),o=n(15),s=n(65),a=n(11),l=n(38),c=n(106);class d{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let n;"string"==typeof e?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,void 0!==t.children.get(n)&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let e=0;void 0!==t.children.get(i);e++)i=`${n}_${e}`;return i}static empty(e){return 0===e.children.size}}class u extends d{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}}class h extends d{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}}class f extends d{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let n=this._keys.for(e,!0),i=f._requests.get(n);if(!i){let t=new r.b;i={promiseCnt:0,source:t,promise:f._create(e,t.token),model:void 0},f._requests.set(n,i);const o=Date.now();i.promise.then(()=>{let t=this._keys.for(e,!1),n=this._requestDurations.get(t);n||(n=new c.a,this._requestDurations.set(t,n)),n.update(Date.now()-o)})}return i.model?Promise.resolve(i.model):(i.promiseCnt+=1,t.onCancellationRequested(()=>{0==--i.promiseCnt&&(i.source.cancel(),f._requests.delete(n))}),new Promise((e,t)=>{i.promise.then(t=>{i.model=t,e(t)},e=>{f._requests.delete(n),t(e)})}))}static _create(e,t){const n=new r.b(t),s=new f(e.uri),l=a.m.ordered(e),c=l.map((t,i)=>{var r;let a=d.findId(`provider_${i}`,s),l=new h(a,s,null!==(r=t.displayName)&&void 0!==r?r:"Unknown Outline Provider",i);return Promise.resolve(t.provideDocumentSymbols(e,n.token)).then(e=>{for(const t of e||[])f._makeOutlineElement(t,l);return l},e=>(Object(o.f)(e),l)).then(e=>{d.empty(e)?e.remove():s._groups.set(a,e)})}),u=a.m.onDidChange(()=>{const t=a.m.ordered(e);Object(i.g)(t,l)||n.cancel()});return Promise.all(c).then(()=>n.token.isCancellationRequested&&!t.isCancellationRequested?f._create(e,t):s._compact()).finally(()=>{u.dispose()})}static _makeOutlineElement(e,t){let n=d.findId(e,t),i=new u(n,t,e);if(e.children)for(const t of e.children)f._makeOutlineElement(t,i);t.children.set(i.id,i)}_compact(){let e=0;for(const[t,n]of this._groups)0===n.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=l.a.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}}f._requestDurations=new s.a(50,.7),f._requests=new s.a(9,.75),f._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(a.m.all(e))}`}_hash(e){let t="";for(const n of e){let e=this._data.get(n);void 0===e&&(e=this._counter++,this._data.set(n,e)),t+=e}return t}}},function(e,t,n){var i;"undefined"!=typeof self&&self,i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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="./src/mermaid.js")}({"./node_modules/node-libs-browser/mock/empty.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-array/src/threshold/scott.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/***/ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js": -/*!*******************************************************************************!*\ - !*** include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deviation */ "./node_modules/d3-array/src/deviation.js"); -self["MonacoEnvironment"] = (function (paths) { - function stripTrailingSlash(str) { - return str.replace(/\/$/, ''); - } - return { - getWorkerUrl: function (moduleId, label) { - var pathPrefix = true ? __webpack_require__.p : undefined; - var result = (pathPrefix ? stripTrailingSlash(pathPrefix) + '/' : '') + paths[label]; - if (/^((http:)|(https:)|(file:)|(\/\/))/.test(result)) { - var currentUrl = String(window.location); - var currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length); - if (result.substring(0, currentOrigin.length) !== currentOrigin) { - var js = '/*' + label + '*/importScripts("' + result + '");'; - var blob = new Blob([js], { type: 'application/javascript' }); - return URL.createObjectURL(blob); - } - } - return result; - } - }; - })({ - "editorWorkerService": "editor.worker.js", - "json": "json.worker.js" -}); -__webpack_require__(/*! ./standalone/browser/accessibilityHelp/accessibilityHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js"); -__webpack_require__(/*! ./contrib/anchorSelect/anchorSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js"); -__webpack_require__(/*! ./contrib/bracketMatching/bracketMatching.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js"); -__webpack_require__(/*! ./contrib/caretOperations/caretOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js"); -__webpack_require__(/*! ./contrib/clipboard/clipboard.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js"); -__webpack_require__(/*! ./contrib/codeAction/codeActionContributions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js"); -__webpack_require__(/*! ./contrib/codelens/codelensController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js"); -__webpack_require__(/*! ./contrib/colorPicker/colorDetector.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js"); -__webpack_require__(/*! ./contrib/comment/comment.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js"); -__webpack_require__(/*! ./contrib/contextmenu/contextmenu.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js"); -__webpack_require__(/*! ./browser/controller/coreCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js"); -__webpack_require__(/*! ./contrib/cursorUndo/cursorUndo.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js"); -__webpack_require__(/*! ./contrib/dnd/dnd.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js"); -__webpack_require__(/*! ./contrib/find/findController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js"); -__webpack_require__(/*! ./contrib/folding/folding.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js"); -__webpack_require__(/*! ./contrib/fontZoom/fontZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js"); -__webpack_require__(/*! ./contrib/format/formatActions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js"); -__webpack_require__(/*! ./contrib/gotoError/gotoError.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js"); -__webpack_require__(/*! ./contrib/gotoSymbol/goToCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js"); -__webpack_require__(/*! ./contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js"); -__webpack_require__(/*! ./contrib/hover/hover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js"); -__webpack_require__(/*! ./standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js"); -__webpack_require__(/*! ./contrib/inPlaceReplace/inPlaceReplace.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js"); -__webpack_require__(/*! ./contrib/indentation/indentation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js"); -__webpack_require__(/*! ./standalone/browser/inspectTokens/inspectTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js"); -__webpack_require__(/*! ./contrib/linesOperations/linesOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js"); -__webpack_require__(/*! ./contrib/links/links.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js"); -__webpack_require__(/*! ./contrib/multicursor/multicursor.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js"); -__webpack_require__(/*! ./contrib/rename/onTypeRename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/onTypeRename.js"); -__webpack_require__(/*! ./contrib/parameterHints/parameterHints.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneCommandsQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneHelpQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js"); -__webpack_require__(/*! ./contrib/rename/rename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js"); -__webpack_require__(/*! ./contrib/smartSelect/smartSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js"); -__webpack_require__(/*! ./contrib/snippet/snippetController2.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js"); -__webpack_require__(/*! ./contrib/suggest/suggestController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js"); -__webpack_require__(/*! ./standalone/browser/toggleHighContrast/toggleHighContrast.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js"); -__webpack_require__(/*! ./contrib/toggleTabFocusMode/toggleTabFocusMode.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js"); -__webpack_require__(/*! ./contrib/caretOperations/transpose.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js"); -__webpack_require__(/*! ./contrib/unusualLineTerminators/unusualLineTerminators.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js"); -__webpack_require__(/*! ./contrib/viewportSemanticTokens/viewportSemanticTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js"); -__webpack_require__(/*! ./contrib/wordHighlighter/wordHighlighter.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js"); -__webpack_require__(/*! ./contrib/wordOperations/wordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js"); -__webpack_require__(/*! ./contrib/wordPartOperations/wordPartOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js"); -module.exports = __webpack_require__(/*! !./editor.api.js */ "./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -__webpack_require__(/*! ../language/json/monaco.contribution.js */ "./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js"); - -/***/ }), - -/***/ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.main.js": -/*!********************************************************************************!*\ - !*** include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.main.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -self["MonacoEnvironment"] = (function (paths) { - function stripTrailingSlash(str) { - return str.replace(/\/$/, ''); - } - return { - getWorkerUrl: function (moduleId, label) { - var pathPrefix = true ? __webpack_require__.p : undefined; - var result = (pathPrefix ? stripTrailingSlash(pathPrefix) + '/' : '') + paths[label]; - if (/^((http:)|(https:)|(file:)|(\/\/))/.test(result)) { - var currentUrl = String(window.location); - var currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length); - if (result.substring(0, currentOrigin.length) !== currentOrigin) { - var js = '/*' + label + '*/importScripts("' + result + '");'; - var blob = new Blob([js], { type: 'application/javascript' }); - return URL.createObjectURL(blob); - } - } - return result; - } - }; - })({ - "editorWorkerService": "editor.worker.js", - "json": "json.worker.js" +/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { + return Math.ceil((max - min) / (3.5 * Object(_deviation__WEBPACK_IMPORTED_MODULE_0__["default"])(values) * Math.pow(values.length, -1 / 3))); }); -__webpack_require__(/*! ./standalone/browser/accessibilityHelp/accessibilityHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js"); -__webpack_require__(/*! ./contrib/anchorSelect/anchorSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js"); -__webpack_require__(/*! ./contrib/bracketMatching/bracketMatching.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js"); -__webpack_require__(/*! ./contrib/caretOperations/caretOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js"); -__webpack_require__(/*! ./contrib/clipboard/clipboard.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js"); -__webpack_require__(/*! ./contrib/codeAction/codeActionContributions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js"); -__webpack_require__(/*! ./contrib/codelens/codelensController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js"); -__webpack_require__(/*! ./contrib/colorPicker/colorDetector.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js"); -__webpack_require__(/*! ./contrib/comment/comment.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js"); -__webpack_require__(/*! ./contrib/contextmenu/contextmenu.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js"); -__webpack_require__(/*! ./browser/controller/coreCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js"); -__webpack_require__(/*! ./contrib/cursorUndo/cursorUndo.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js"); -__webpack_require__(/*! ./contrib/dnd/dnd.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js"); -__webpack_require__(/*! ./contrib/find/findController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js"); -__webpack_require__(/*! ./contrib/folding/folding.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js"); -__webpack_require__(/*! ./contrib/fontZoom/fontZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js"); -__webpack_require__(/*! ./contrib/format/formatActions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js"); -__webpack_require__(/*! ./contrib/gotoError/gotoError.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js"); -__webpack_require__(/*! ./contrib/gotoSymbol/goToCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js"); -__webpack_require__(/*! ./contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js"); -__webpack_require__(/*! ./contrib/hover/hover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js"); -__webpack_require__(/*! ./standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js"); -__webpack_require__(/*! ./contrib/inPlaceReplace/inPlaceReplace.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js"); -__webpack_require__(/*! ./contrib/indentation/indentation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js"); -__webpack_require__(/*! ./standalone/browser/inspectTokens/inspectTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js"); -__webpack_require__(/*! ./contrib/linesOperations/linesOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js"); -__webpack_require__(/*! ./contrib/links/links.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js"); -__webpack_require__(/*! ./contrib/multicursor/multicursor.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js"); -__webpack_require__(/*! ./contrib/rename/onTypeRename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/onTypeRename.js"); -__webpack_require__(/*! ./contrib/parameterHints/parameterHints.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneCommandsQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneHelpQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js"); -__webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js"); -__webpack_require__(/*! ./contrib/rename/rename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js"); -__webpack_require__(/*! ./contrib/smartSelect/smartSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js"); -__webpack_require__(/*! ./contrib/snippet/snippetController2.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js"); -__webpack_require__(/*! ./contrib/suggest/suggestController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js"); -__webpack_require__(/*! ./standalone/browser/toggleHighContrast/toggleHighContrast.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js"); -__webpack_require__(/*! ./contrib/toggleTabFocusMode/toggleTabFocusMode.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js"); -__webpack_require__(/*! ./contrib/caretOperations/transpose.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js"); -__webpack_require__(/*! ./contrib/unusualLineTerminators/unusualLineTerminators.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js"); -__webpack_require__(/*! ./contrib/viewportSemanticTokens/viewportSemanticTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js"); -__webpack_require__(/*! ./contrib/wordHighlighter/wordHighlighter.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js"); -__webpack_require__(/*! ./contrib/wordOperations/wordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js"); -__webpack_require__(/*! ./contrib/wordPartOperations/wordPartOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js"); -module.exports = __webpack_require__(/*! !./editor.main.js */ "./node_modules/monaco-editor/esm/vs/editor/editor.main.js"); -__webpack_require__(/*! ../language/json/monaco.contribution.js */ "./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js"); - -/***/ }), - -/***/ "./node_modules/@braintree/sanitize-url/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/@braintree/sanitize-url/index.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +/***/ }), -var invalidPrototcolRegex = /^(%20|\s)*(javascript|data)/im; -var ctrlCharactersRegex = /[^\x20-\x7E]/gmi; -var urlSchemeRegex = /^([^:]+):/gm; -var relativeFirstCharacters = ['.', '/'] +/***/ "./node_modules/d3-array/src/threshold/sturges.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-array/src/threshold/sturges.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function isRelativeUrl(url) { - return relativeFirstCharacters.indexOf(url[0]) > -1; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + return Math.ceil(Math.log(values.length) / Math.LN2) + 1; +}); -function sanitizeUrl(url) { - if (!url) { - return 'about:blank'; - } - var urlScheme, urlSchemeParseResults; - var sanitizedUrl = url.replace(ctrlCharactersRegex, '').trim(); +/***/ }), - if (isRelativeUrl(sanitizedUrl)) { - return sanitizedUrl; - } +/***/ "./node_modules/d3-array/src/ticks.js": +/*!********************************************!*\ + !*** ./node_modules/d3-array/src/ticks.js ***! + \********************************************/ +/*! exports provided: default, tickIncrement, tickStep */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); +var e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); - if (!urlSchemeParseResults) { - return 'about:blank'; - } +/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) { + var reverse, + i = -1, + n, + ticks, + step; - urlScheme = urlSchemeParseResults[0]; + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) return [start]; + if (reverse = stop < start) n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; - if (invalidPrototcolRegex.test(urlScheme)) { - return 'about:blank'; + if (step > 0) { + start = Math.ceil(start / step); + stop = Math.floor(stop / step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) * step; + } else { + start = Math.floor(start * step); + stop = Math.ceil(stop * step); + ticks = new Array(n = Math.ceil(start - stop + 1)); + while (++i < n) ticks[i] = (start - i) / step; } - return sanitizedUrl; + if (reverse) ticks.reverse(); + + return ticks; +}); + +function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log(step) / Math.LN10), + error = step / Math.pow(10, power); + return power >= 0 + ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) + : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); } -module.exports = { - sanitizeUrl: sanitizeUrl -}; +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; +} /***/ }), -/***/ "./node_modules/base64-js/index.js": -/*!*****************************************!*\ - !*** ./node_modules/base64-js/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./node_modules/d3-array/src/transpose.js": +/*!************************************************!*\ + !*** ./node_modules/d3-array/src/transpose.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min */ "./node_modules/d3-array/src/min.js"); -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function getLens (b64) { - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') +/* harmony default export */ __webpack_exports__["default"] = (function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = Object(_min__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } } + return transpose; +}); - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +function length(d) { + return d.length; } -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] +/***/ }), - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) +/***/ "./node_modules/d3-array/src/variance.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-array/src/variance.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var curByte = 0 +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js"); - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } +/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { + var n = values.length, + m = 0, + i = -1, + mean = 0, + value, + delta, + sum = 0; - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF + if (valueof == null) { + while (++i < n) { + if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(values[i]))) { + delta = value - mean; + mean += delta / ++m; + sum += delta * (value - mean); + } + } } - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF + else { + while (++i < n) { + if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(valueof(values[i], i, values)))) { + delta = value - mean; + mean += delta / ++m; + sum += delta * (value - mean); + } + } } - return arr -} + if (m > 1) return sum / (m - 1); +}); -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} +/***/ }), -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 +/***/ "./node_modules/d3-array/src/zip.js": +/*!******************************************!*\ + !*** ./node_modules/d3-array/src/zip.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk( - uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) - )) - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose */ "./node_modules/d3-array/src/transpose.js"); - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - return parts.join('') -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_transpose__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments); +}); /***/ }), -/***/ "./node_modules/batch-processor/src/batch-processor.js": -/*!*************************************************************!*\ - !*** ./node_modules/batch-processor/src/batch-processor.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./node_modules/d3-axis/src/array.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-axis/src/array.js ***! + \*******************************************/ +/*! exports provided: slice */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var slice = Array.prototype.slice; -var utils = __webpack_require__(/*! ./utils */ "./node_modules/batch-processor/src/utils.js"); - -module.exports = function batchProcessorMaker(options) { - options = options || {}; - var reporter = options.reporter; - var asyncProcess = utils.getOption(options, "async", true); - var autoProcess = utils.getOption(options, "auto", true); +/***/ }), - if(autoProcess && !asyncProcess) { - reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."); - asyncProcess = true; - } +/***/ "./node_modules/d3-axis/src/axis.js": +/*!******************************************!*\ + !*** ./node_modules/d3-axis/src/axis.js ***! + \******************************************/ +/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var batch = Batch(); - var asyncFrameHandler; - var isProcessing = false; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return axisTop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return axisRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return axisBottom; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return axisLeft; }); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-axis/src/array.js"); +/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-axis/src/identity.js"); - function addFunction(level, fn) { - if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) { - // Since this is async, it is guaranteed to be executed after that the fn is added to the batch. - // This needs to be done before, since we're checking the size of the batch to be 0. - processBatchAsync(); - } - batch.add(level, fn); - } - function processBatch() { - // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch. - // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on). - isProcessing = true; - while (batch.size()) { - var processingBatch = batch; - batch = Batch(); - processingBatch.process(); - } - isProcessing = false; - } +var top = 1, + right = 2, + bottom = 3, + left = 4, + epsilon = 1e-6; - function forceProcessBatch(localAsyncProcess) { - if (isProcessing) { - return; - } +function translateX(x) { + return "translate(" + (x + 0.5) + ",0)"; +} - if(localAsyncProcess === undefined) { - localAsyncProcess = asyncProcess; - } +function translateY(y) { + return "translate(0," + (y + 0.5) + ")"; +} - if(asyncFrameHandler) { - cancelFrame(asyncFrameHandler); - asyncFrameHandler = null; - } +function number(scale) { + return function(d) { + return +scale(d); + }; +} - if(localAsyncProcess) { - processBatchAsync(); - } else { - processBatch(); - } - } +function center(scale) { + var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset. + if (scale.round()) offset = Math.round(offset); + return function(d) { + return +scale(d) + offset; + }; +} - function processBatchAsync() { - asyncFrameHandler = requestFrame(processBatch); - } +function entering() { + return !this.__axis; +} - function clearBatch() { - batch = {}; - batchSize = 0; - topLevel = 0; - bottomLevel = 0; - } +function axis(orient, scale) { + var tickArguments = [], + tickValues = null, + tickFormat = null, + tickSizeInner = 6, + tickSizeOuter = 6, + tickPadding = 3, + k = orient === top || orient === left ? -1 : 1, + x = orient === left || orient === right ? "x" : "y", + transform = orient === top || orient === bottom ? translateX : translateY; - function cancelFrame(listener) { - // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout; - var cancel = clearTimeout; - return cancel(listener); - } + function axis(context) { + var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, + format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity__WEBPACK_IMPORTED_MODULE_1__["default"]) : tickFormat, + spacing = Math.max(tickSizeInner, 0) + tickPadding, + range = scale.range(), + range0 = +range[0] + 0.5, + range1 = +range[range.length - 1] + 0.5, + position = (scale.bandwidth ? center : number)(scale.copy()), + selection = context.selection ? context.selection() : context, + path = selection.selectAll(".domain").data([null]), + tick = selection.selectAll(".tick").data(values, scale).order(), + tickExit = tick.exit(), + tickEnter = tick.enter().append("g").attr("class", "tick"), + line = tick.select("line"), + text = tick.select("text"); - function requestFrame(callback) { - // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); }; - var raf = function(fn) { return setTimeout(fn, 0); }; - return raf(callback); - } + path = path.merge(path.enter().insert("path", ".tick") + .attr("class", "domain") + .attr("stroke", "currentColor")); - return { - add: addFunction, - force: forceProcessBatch - }; -}; + tick = tick.merge(tickEnter); -function Batch() { - var batch = {}; - var size = 0; - var topLevel = 0; - var bottomLevel = 0; + line = line.merge(tickEnter.append("line") + .attr("stroke", "currentColor") + .attr(x + "2", k * tickSizeInner)); - function add(level, fn) { - if(!fn) { - fn = level; - level = 0; - } + text = text.merge(tickEnter.append("text") + .attr("fill", "currentColor") + .attr(x, k * spacing) + .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); - if(level > topLevel) { - topLevel = level; - } else if(level < bottomLevel) { - bottomLevel = level; - } + if (context !== selection) { + path = path.transition(context); + tick = tick.transition(context); + line = line.transition(context); + text = text.transition(context); - if(!batch[level]) { - batch[level] = []; - } + tickExit = tickExit.transition(context) + .attr("opacity", epsilon) + .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); }); - batch[level].push(fn); - size++; + tickEnter + .attr("opacity", epsilon) + .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); }); } - function process() { - for(var level = bottomLevel; level <= topLevel; level++) { - var fns = batch[level]; - - for(var i = 0; i < fns.length; i++) { - var fn = fns[i]; - fn(); - } - } - } + tickExit.remove(); - function getSize() { - return size; - } + path + .attr("d", orient === left || orient == right + ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1) + : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1)); - return { - add: add, - process: process, - size: getSize - }; -} + tick + .attr("opacity", 1) + .attr("transform", function(d) { return transform(position(d)); }); + line + .attr(x + "2", k * tickSizeInner); -/***/ }), + text + .attr(x, k * spacing) + .text(format); -/***/ "./node_modules/batch-processor/src/utils.js": -/*!***************************************************!*\ - !*** ./node_modules/batch-processor/src/utils.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + selection.filter(entering) + .attr("fill", "none") + .attr("font-size", 10) + .attr("font-family", "sans-serif") + .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); -"use strict"; + selection + .each(function() { this.__axis = position; }); + } + axis.scale = function(_) { + return arguments.length ? (scale = _, axis) : scale; + }; -var utils = module.exports = {}; + axis.ticks = function() { + return tickArguments = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), axis; + }; -utils.getOption = getOption; + axis.tickArguments = function(_) { + return arguments.length ? (tickArguments = _ == null ? [] : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickArguments.slice(); + }; -function getOption(options, name, defaultValue) { - var value = options[name]; + axis.tickValues = function(_) { + return arguments.length ? (tickValues = _ == null ? null : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickValues && tickValues.slice(); + }; - if((value === undefined || value === null) && defaultValue !== undefined) { - return defaultValue; - } + axis.tickFormat = function(_) { + return arguments.length ? (tickFormat = _, axis) : tickFormat; + }; - return value; -} + axis.tickSize = function(_) { + return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; + }; + axis.tickSizeInner = function(_) { + return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; + }; -/***/ }), + axis.tickSizeOuter = function(_) { + return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; + }; -/***/ "./node_modules/buffer/index.js": -/*!**************************************!*\ - !*** ./node_modules/buffer/index.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + axis.tickPadding = function(_) { + return arguments.length ? (tickPadding = +_, axis) : tickPadding; + }; -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - - - -var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js") -var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js") -var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js") - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } + return axis; } -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff +function axisTop(scale) { + return axis(top, scale); } -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that +function axisRight(scale) { + return axis(right, scale); } -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) +function axisBottom(scale) { + return axis(bottom, scale); } -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr +function axisLeft(scale) { + return axis(left, scale); } -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - return fromObject(that, value) -} +/***/ }), -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} +/***/ "./node_modules/d3-axis/src/identity.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-axis/src/identity.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return x; +}); -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} +/***/ }), -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} +/***/ "./node_modules/d3-axis/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-axis/src/index.js ***! + \*******************************************/ +/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/d3-axis/src/axis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisTop"]; }); -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisRight"]; }); - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisBottom"]; }); - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisLeft"]; }); - var actual = that.write(string, encoding) - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) - } - return that -} -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} +/***/ }), -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer +/***/ "./node_modules/d3-brush/src/brush.js": +/*!********************************************!*\ + !*** ./node_modules/d3-brush/src/brush.js ***! + \********************************************/ +/*! exports provided: brushSelection, brushX, brushY, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; }); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-brush/src/constant.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-brush/src/event.js"); +/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-brush/src/noevent.js"); - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - if (that.length === 0) { - return that - } - obj.copy(that, 0, 0, len) - return that - } - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} +var MODE_DRAG = {name: "drag"}, + MODE_SPACE = {name: "space"}, + MODE_HANDLE = {name: "handle"}, + MODE_CENTER = {name: "center"}; -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 +function number1(e) { + return [+e[0], +e[1]]; } -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) +function number2(e) { + return [number1(e[0]), number1(e[1])]; } -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) +function toucher(identifier) { + return function(target) { + return Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(target, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches, identifier); + }; } -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 +var X = { + name: "x", + handles: ["w", "e"].map(type), + input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, + output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } +}; - var x = a.length - var y = b.length +var Y = { + name: "y", + handles: ["n", "s"].map(type), + input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, + output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } +}; - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } +var XY = { + name: "xy", + handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), + input: function(xy) { return xy == null ? null : number2(xy); }, + output: function(xy) { return xy; } +}; - if (x < y) return -1 - if (y < x) return 1 - return 0 -} +var cursors = { + overlay: "crosshair", + selection: "move", + n: "ns-resize", + e: "ew-resize", + s: "ns-resize", + w: "ew-resize", + nw: "nwse-resize", + ne: "nesw-resize", + se: "nwse-resize", + sw: "nesw-resize" +}; -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} +var flipX = { + e: "w", + w: "e", + nw: "ne", + ne: "nw", + se: "sw", + sw: "se" +}; -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } +var flipY = { + n: "s", + s: "n", + nw: "sw", + ne: "se", + se: "ne", + sw: "nw" +}; - if (list.length === 0) { - return Buffer.alloc(0) - } +var signsX = { + overlay: +1, + selection: +1, + n: null, + e: +1, + s: null, + w: -1, + nw: -1, + ne: +1, + se: +1, + sw: -1 +}; - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } +var signsY = { + overlay: +1, + selection: +1, + n: -1, + e: null, + s: +1, + w: null, + nw: -1, + ne: -1, + se: +1, + sw: +1 +}; - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer +function type(t) { + return {type: t}; } -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button; } -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } +function defaultExtent() { + var svg = this.ownerSVGElement || this; + if (svg.hasAttribute("viewBox")) { + svg = svg.viewBox.baseVal; + return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; } + return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; } -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this +function defaultTouchable() { + return navigator.maxTouchPoints || ("ontouchstart" in this); } -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this +// Like d3.local, but with the name “__brush” rather than auto-generated. +function local(node) { + while (!node.__brush) if (!(node = node.parentNode)) return; + return node.__brush; } -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this +function empty(extent) { + return extent[0][0] === extent[1][0] + || extent[0][1] === extent[1][1]; } -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) +function brushSelection(node) { + var state = node.__brush; + return state ? state.dim.output(state.selection) : null; } -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 +function brushX() { + return brush(X); } -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' +function brushY() { + return brush(Y); } -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } +/* harmony default export */ __webpack_exports__["default"] = (function() { + return brush(XY); +}); - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } +function brush(dim) { + var extent = defaultExtent, + filter = defaultFilter, + touchable = defaultTouchable, + keys = true, + listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "brush", "end"), + handleSize = 6, + touchending; - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 + function brush(group) { + var overlay = group + .property("__brush", initialize) + .selectAll(".overlay") + .data([type("overlay")]); - if (this === target) return 0 + overlay.enter().append("rect") + .attr("class", "overlay") + .attr("pointer-events", "all") + .attr("cursor", cursors.overlay) + .merge(overlay) + .each(function() { + var extent = local(this).extent; + Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this) + .attr("x", extent[0][0]) + .attr("y", extent[0][1]) + .attr("width", extent[1][0] - extent[0][0]) + .attr("height", extent[1][1] - extent[0][1]); + }); - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) + group.selectAll(".selection") + .data([type("selection")]) + .enter().append("rect") + .attr("class", "selection") + .attr("cursor", cursors.selection) + .attr("fill", "#777") + .attr("fill-opacity", 0.3) + .attr("stroke", "#fff") + .attr("shape-rendering", "crispEdges"); - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) + var handle = group.selectAll(".handle") + .data(dim.handles, function(d) { return d.type; }); - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } + handle.exit().remove(); - if (x < y) return -1 - if (y < x) return 1 - return 0 -} + handle.enter().append("rect") + .attr("class", function(d) { return "handle handle--" + d.type; }) + .attr("cursor", function(d) { return cursors[d.type]; }); -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + group + .each(redraw) + .attr("fill", "none") + .attr("pointer-events", "all") + .on("mousedown.brush", started) + .filter(touchable) + .on("touchstart.brush", started) + .on("touchmove.brush", touchmoved) + .on("touchend.brush touchcancel.brush", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length + brush.move = function(group, selection) { + if (group.selection) { + group + .on("start.brush", function() { emitter(this, arguments).beforestart().start(); }) + .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); }) + .tween("brush", function() { + var that = this, + state = that.__brush, + emit = emitter(that, arguments), + selection0 = state.selection, + selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), + i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolate"])(selection0, selection1); - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } + function tween(t) { + state.selection = t === 1 && selection1 === null ? null : i(t); + redraw.call(that); + emit.brush(); + } - function read (buf, i) { - if (indexSize === 1) { - return buf[i] + return selection0 !== null && selection1 !== null ? tween : tween(1); + }); } else { - return buf.readUInt16BE(i * indexSize) - } - } + group + .each(function() { + var that = this, + args = arguments, + state = that.__brush, + selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), + emit = emitter(that, args).beforestart(); - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i + Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); + state.selection = selection1 === null ? null : selection1; + redraw.call(that); + emit.start().brush().end(); + }); } - } - - return -1 -} + }; -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} + brush.clear = function(group) { + brush.move(group, null); + }; -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} + function redraw() { + var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this), + selection = local(this).selection; -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} + if (selection) { + group.selectAll(".selection") + .style("display", null) + .attr("x", selection[0][0]) + .attr("y", selection[0][1]) + .attr("width", selection[1][0] - selection[0][0]) + .attr("height", selection[1][1] - selection[0][1]); -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining + group.selectAll(".handle") + .style("display", null) + .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) + .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) + .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) + .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined + else { + group.selectAll(".selection,.handle") + .style("display", "none") + .attr("x", null) + .attr("y", null) + .attr("width", null) + .attr("height", null); } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) } - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') + function emitter(that, args, clean) { + return (!clean && that.__brush.emitter) || new Emitter(that, args); } - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) + function Emitter(that, args) { + this.that = that; + this.args = args; + this.state = that.__brush; + this.active = 0; + } - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) + Emitter.prototype = { + beforestart: function() { + if (++this.active === 1) this.state.emitter = this, this.starting = true; + return this; + }, + start: function() { + if (this.starting) this.starting = false, this.emit("start"); + else this.emit("brush"); + return this; + }, + brush: function() { + this.emit("brush"); + return this; + }, + end: function() { + if (--this.active === 0) delete this.state.emitter, this.emit("end"); + return this; + }, + emit: function(type) { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]); + } + }; - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) + function started() { + if (touchending && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) return; + if (!filter.apply(this, arguments)) return; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) + var that = this, + type = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].target.__data__.type, + mode = (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey ? MODE_CENTER : MODE_HANDLE), + signX = dim === Y ? null : signsX[type], + signY = dim === X ? null : signsY[type], + state = local(that), + extent = state.extent, + selection = state.selection, + W = extent[0][0], w0, w1, + N = extent[0][1], n0, n1, + E = extent[1][0], e0, e1, + S = extent[1][1], s0, s1, + dx = 0, + dy = 0, + moving, + shifting = signX && signY && keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey, + lockX, + lockY, + pointer = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches ? toucher(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches[0].identifier) : d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"], + point0 = pointer(that), + point = point0, + emit = emitter(that, arguments, true).beforestart(); - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true + if (type === "overlay") { + if (selection) moving = true; + state.selection = selection = [ + [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]], + [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0] + ]; + } else { + w0 = selection[0][0]; + n0 = selection[0][1]; + e0 = selection[1][0]; + s0 = selection[1][1]; } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] + w1 = w0; + n1 = n0; + e1 = e0; + s1 = s0; - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 + var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(that) + .attr("pointer-events", "none"); - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint + var overlay = group.selectAll(".overlay") + .attr("cursor", cursors[type]); - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } + if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) { + emit.moved = moved; + emit.ended = ended; + } else { + var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view) + .on("mousemove.brush", moved, true) + .on("mouseup.brush", ended, true); + if (keys) view + .on("keydown.brush", keydowned, true) + .on("keyup.brush", keyupped, true) - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF + Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view); } - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(); + Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); + redraw.call(that); + emit.start(); -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 + function moved() { + var point1 = pointer(that); + if (shifting && !lockX && !lockY) { + if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true; + else lockX = true; + } + point = point1; + moving = true; + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); + move(); + } -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } + function move() { + var t; - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} + dx = point[0] - point0[0]; + dy = point[1] - point0[1]; -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) + switch (mode) { + case MODE_SPACE: + case MODE_DRAG: { + if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; + if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; + break; + } + case MODE_HANDLE: { + if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0; + else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx; + if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0; + else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy; + break; + } + case MODE_CENTER: { + if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX)); + if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY)); + break; + } + } - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} + if (e1 < w1) { + signX *= -1; + t = w0, w0 = e0, e0 = t; + t = w1, w1 = e1, e1 = t; + if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); + } -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) + if (s1 < n1) { + signY *= -1; + t = n0, n0 = s0, s0 = t; + t = n1, n1 = s1, s1 = t; + if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); + } - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} + if (state.selection) selection = state.selection; // May be set by brush.move! + if (lockX) w1 = selection[0][0], e1 = selection[1][0]; + if (lockY) n1 = selection[0][1], s1 = selection[1][1]; -function hexSlice (buf, start, end) { - var len = buf.length + if (selection[0][0] !== w1 + || selection[0][1] !== n1 + || selection[1][0] !== e1 + || selection[1][1] !== s1) { + state.selection = [[w1, n1], [e1, s1]]; + redraw.call(that); + emit.brush(); + } + } - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len + function ended() { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(); + if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) { + if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches.length) return; + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + } else { + Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, moving); + view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); + } + group.attr("pointer-events", "all"); + overlay.attr("cursor", cursors.overlay); + if (state.selection) selection = state.selection; // May be set by brush.move (on start)! + if (empty(selection)) state.selection = null, redraw.call(that); + emit.end(); + } - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} + function keydowned() { + switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) { + case 16: { // SHIFT + shifting = signX && signY; + break; + } + case 18: { // ALT + if (mode === MODE_HANDLE) { + if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; + if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; + mode = MODE_CENTER; + move(); + } + break; + } + case 32: { // SPACE; takes priority over ALT + if (mode === MODE_HANDLE || mode === MODE_CENTER) { + if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; + if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; + mode = MODE_SPACE; + overlay.attr("cursor", cursors.selection); + move(); + } + break; + } + default: return; + } + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); + } -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + function keyupped() { + switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) { + case 16: { // SHIFT + if (shifting) { + lockX = lockY = shifting = false; + move(); + } + break; + } + case 18: { // ALT + if (mode === MODE_CENTER) { + if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; + if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; + mode = MODE_HANDLE; + move(); + } + break; + } + case 32: { // SPACE + if (mode === MODE_SPACE) { + if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey) { + if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; + if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; + mode = MODE_CENTER; + } else { + if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; + if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; + mode = MODE_HANDLE; + } + overlay.attr("cursor", cursors[type]); + move(); + } + break; + } + default: return; + } + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); + } } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len + function touchmoved() { + emitter(this, arguments).moved(); } - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len + function touchended() { + emitter(this, arguments).ended(); } - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } + function initialize() { + var state = this.__brush || {selection: null}; + state.extent = number2(extent.apply(this, arguments)); + state.dim = dim; + return state; } - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} + brush.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(number2(_)), brush) : extent; + }; -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) + brush.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : filter; + }; - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } + brush.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : touchable; + }; - return val -} + brush.handleSize = function(_) { + return arguments.length ? (handleSize = +_, brush) : handleSize; + }; -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } + brush.keyModifiers = function(_) { + return arguments.length ? (keys = !!_, brush) : keys; + }; - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } + brush.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? brush : value; + }; - return val + return brush; } -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} +/***/ }), -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} +/***/ "./node_modules/d3-brush/src/constant.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-brush/src/constant.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +/***/ }), - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} +/***/ "./node_modules/d3-brush/src/event.js": +/*!********************************************!*\ + !*** ./node_modules/d3-brush/src/event.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(target, type, selection) { + this.target = target; + this.type = type; + this.selection = selection; +}); - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - if (val >= mul) val -= Math.pow(2, 8 * byteLength) +/***/ }), - return val -} +/***/ "./node_modules/d3-brush/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-brush/src/index.js ***! + \********************************************/ +/*! exports provided: brush, brushX, brushY, brushSelection */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ "./node_modules/d3-brush/src/brush.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushX"]; }); - if (val >= mul) val -= Math.pow(2, 8 * byteLength) +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushY"]; }); - return val -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushSelection"]; }); -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +/***/ }), - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} +/***/ "./node_modules/d3-brush/src/noevent.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-brush/src/noevent.js ***! + \**********************************************/ +/*! exports provided: nopropagation, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) +function nopropagation() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); } -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); +}); -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} +/***/ }), -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} +/***/ "./node_modules/d3-chord/src/array.js": +/*!********************************************!*\ + !*** ./node_modules/d3-chord/src/array.js ***! + \********************************************/ +/*! exports provided: slice */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var slice = Array.prototype.slice; - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - return offset + byteLength -} +/***/ }), -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } +/***/ "./node_modules/d3-chord/src/chord.js": +/*!********************************************!*\ + !*** ./node_modules/d3-chord/src/chord.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js"); - return offset + byteLength -} -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } +function compareValue(compare) { + return function(a, b) { + return compare( + a.source.value + a.target.value, + b.source.value + b.target.value + ); + }; } -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var padAngle = 0, + sortGroups = null, + sortSubgroups = null, + sortChords = null; -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} + function chord(matrix) { + var n = matrix.length, + groupSums = [], + groupIndex = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n), + subgroupIndex = [], + chords = [], + groups = chords.groups = new Array(n), + subgroups = new Array(n * n), + k, + x, + x0, + dx, + i, + j; -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} + // Compute the sum. + k = 0, i = -1; while (++i < n) { + x = 0, j = -1; while (++j < n) { + x += matrix[i][j]; + } + groupSums.push(x); + subgroupIndex.push(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n)); + k += x; + } -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} + // Sort groups… + if (sortGroups) groupIndex.sort(function(a, b) { + return sortGroups(groupSums[a], groupSums[b]); + }); -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} + // Sort subgroups… + if (sortSubgroups) subgroupIndex.forEach(function(d, i) { + d.sort(function(a, b) { + return sortSubgroups(matrix[i][a], matrix[i][b]); + }); + }); -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) + // Convert the sum to scaling factor for [0, 2pi]. + // TODO Allow start and end angle to be specified? + // TODO Allow padding to be specified as percentage? + k = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _math__WEBPACK_IMPORTED_MODULE_1__["tau"] - padAngle * n) / k; + dx = k ? padAngle : _math__WEBPACK_IMPORTED_MODULE_1__["tau"] / n; - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } + // Compute the start and end angle for each group and subgroup. + // Note: Opera has a bug reordering object literal properties! + x = 0, i = -1; while (++i < n) { + x0 = x, j = -1; while (++j < n) { + var di = groupIndex[i], + dj = subgroupIndex[di][j], + v = matrix[di][dj], + a0 = x, + a1 = x += v * k; + subgroups[dj * n + di] = { + index: di, + subindex: dj, + startAngle: a0, + endAngle: a1, + value: v + }; + } + groups[di] = { + index: di, + startAngle: x0, + endAngle: x, + value: groupSums[di] + }; + x += dx; + } - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 + // Generate chords for each (non-empty) subgroup-subgroup link. + i = -1; while (++i < n) { + j = i - 1; while (++j < n) { + var source = subgroups[j * n + i], + target = subgroups[i * n + j]; + if (source.value || target.value) { + chords.push(source.value < target.value + ? {source: target, target: source} + : {source: source, target: target}); + } + } } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + + return sortChords ? chords.sort(sortChords) : chords; } - return offset + byteLength -} + chord.padAngle = function(_) { + return arguments.length ? (padAngle = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _), chord) : padAngle; + }; -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) + chord.sortGroups = function(_) { + return arguments.length ? (sortGroups = _, chord) : sortGroups; + }; - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } + chord.sortSubgroups = function(_) { + return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; + }; - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } + chord.sortChords = function(_) { + return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; + }; - return offset + byteLength -} + return chord; +}); -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} +/***/ }), -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css": -/*!*************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css ***! - \*************************************************************************************************************************/ +/***/ "./node_modules/d3-chord/src/constant.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-chord/src/constant.js ***! + \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar {\r\n\ttext-align: right;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\twidth: 100%;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar.reverse .actions-container {\r\n\tflex-direction: row-reverse;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tcursor: pointer;\r\n\tdisplay: inline-block;\r\n\ttransition: transform 50ms ease;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar.animated .action-item.active {\r\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar.animated.vertical .action-item.active {\r\n\ttransform: translate(5px, 0);\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,iBAAiB;CACjB,mBAAmB;AACpB;;AAEA;CACC,aAAa;CACb,cAAc;CACd,UAAU;CACV,WAAW;CACX,yBAAyB;AAC1B;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,2BAA2B;AAC5B;;AAEA;CACC,eAAe;CACf,qBAAqB;CACrB,+BAA+B;CAC/B,kBAAkB,GAAG,qFAAqF;AAC3G;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,0CAA0C,EAAE,qBAAqB;AAClE;;AAEA;;CAEC,qBAAqB;AACtB;;AAEA;CACC,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,eAAe;CACf,iBAAiB;AAClB;;AAEA;;CAEC,YAAY;AACb;;AAEA,qBAAqB;;AAErB;CACC,gBAAgB;AACjB;;AAEA;CACC,cAAc;AACf;;AAEA;CACC,cAAc;CACd,6BAA6B;CAC7B,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,4BAA4B;AAC7B;;AAEA;CACC,gBAAgB;AACjB;;AAEA,iBAAiB;AACjB;CACC,gBAAgB,EAAE,iFAAiF;CACnG,OAAO;CACP,gBAAgB;CAChB,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar {\r\n\ttext-align: right;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\twidth: 100%;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar.reverse .actions-container {\r\n\tflex-direction: row-reverse;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tcursor: pointer;\r\n\tdisplay: inline-block;\r\n\ttransition: transform 50ms ease;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar.animated .action-item.active {\r\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar.animated.vertical .action-item.active {\r\n\ttransform: translate(5px, 0);\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css ***! - \***************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-chord/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-chord/src/index.js ***! + \********************************************/ +/*! exports provided: chord, ribbon */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB,EAAE,wDAAwD;CAC5E,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - - -/***/ }), +/* harmony import */ var _chord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord */ "./node_modules/d3-chord/src/chord.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return _chord__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css": -/*!*******************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css ***! - \*******************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _ribbon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon */ "./node_modules/d3-chord/src/ribbon.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return _ribbon__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\toutline-offset: 2px !important;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled {\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,aAAa;CACb,WAAW;CACX,YAAY;CACZ,kBAAkB;CAClB,eAAe;CACf,8BAA8B;CAC9B,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,gCAAgC;AACjC;;AAEA;CACC,YAAY;CACZ,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,yBAAyB;AAC1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\toutline-offset: 2px !important;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled {\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css": -/*!***********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css ***! - \***********************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-chord/src/math.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-chord/src/math.js ***! + \*******************************************/ +/*! exports provided: cos, sin, pi, halfPi, tau, max */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox.unchecked:not(.checked)::before {\r\n\tvisibility: hidden;;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,6BAA6B;CAC7B,YAAY;CACZ,sBAAsB;CACtB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,YAAY;CACZ,WAAW;CACX,6BAA6B;CAC7B,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,UAAU;CACV,gCAAgC;AACjC;;AAEA,8BAA8B;AAC9B;CACC,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox.unchecked:not(.checked)::before {\r\n\tvisibility: hidden;;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); +var cos = Math.cos; +var sin = Math.sin; +var pi = Math.PI; +var halfPi = pi / 2; +var tau = pi * 2; +var max = Math.max; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css": -/*!*****************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css ***! - \*****************************************************************************************************************************************/ +/***/ "./node_modules/d3-chord/src/ribbon.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-chord/src/ribbon.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-chord/src/array.js"); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-chord/src/constant.js"); +/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js"); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-animation-spin {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC;EACC,wBAAwB;CACzB;AACD;;AAEA;CACC,kDAAkD;CAClD,+CAA+C;AAChD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-animation-spin {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css": -/*!********************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css ***! - \********************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function defaultSource(d) { + return d.source; +} +function defaultTarget(d) { + return d.target; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function defaultRadius(d) { + return d.radius; +} +function defaultStartAngle(d) { + return d.startAngle; +} -/***/ }), +function defaultEndAngle(d) { + return d.endAngle; +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css ***! - \******************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony default export */ __webpack_exports__["default"] = (function() { + var source = defaultSource, + target = defaultTarget, + radius = defaultRadius, + startAngle = defaultStartAngle, + endAngle = defaultEndAngle, + context = null; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/getUrl.js */ "./node_modules/css-loader/dist/runtime/getUrl.js"); -/* harmony import */ var _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _codicon_ttf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./codicon.ttf */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf"); -// Imports + function ribbon() { + var buffer, + argv = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), + s = source.apply(this, argv), + t = target.apply(this, argv), + sr = +radius.apply(this, (argv[0] = s, argv)), + sa0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + sa1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + sx0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(sa0), + sy0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(sa0), + tr = +radius.apply(this, (argv[0] = t, argv)), + ta0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + ta1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"]; + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_3__["path"])(); + context.moveTo(sx0, sy0); + context.arc(0, 0, sr, sa0, sa1); + if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr? + context.quadraticCurveTo(0, 0, tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(ta0), tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(ta0)); + context.arc(0, 0, tr, ta0, ta1); + } + context.quadraticCurveTo(0, 0, sx0, sy0); + context.closePath(); + if (buffer) return context = null, buffer + "" || null; + } -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(_codicon_ttf__WEBPACK_IMPORTED_MODULE_3__["default"]); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@font-face {\r\n\tfont-family: \"codicon\";\r\n\tsrc: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"truetype\");\r\n}\r\n\r\n.codicon[class*='codicon-'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,+DAA0C;AAC3C;;AAEA;CACC,yCAAyC;CACzC,qBAAqB;CACrB,qBAAqB;CACrB,oBAAoB;CACpB,kBAAkB;CAClB,mCAAmC;CACnC,kCAAkC;CAClC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA,wDAAwD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@font-face {\r\n\tfont-family: \"codicon\";\r\n\tsrc: url(./codicon.ttf) format(\"truetype\");\r\n}\r\n\r\n.codicon[class*='codicon-'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + ribbon.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : radius; + }; + ribbon.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : startAngle; + }; -/***/ }), + ribbon.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : endAngle; + }; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css": -/*!*****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css ***! - \*****************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + ribbon.source = function(_) { + return arguments.length ? (source = _, ribbon) : source; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + ribbon.target = function(_) { + return arguments.length ? (target = _, ribbon) : target; + }; + ribbon.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; + }; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,aAAa;AACd;;AAEA;CACC,YAAY;CACZ,oBAAoB;CACpB,eAAe;CACf,eAAe;CACf,aAAa;CACb,cAAc;AACf","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return ribbon; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css": -/*!***************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css ***! - \***************************************************************************************************************************/ +/***/ "./node_modules/d3-collection/src/entries.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-collection/src/entries.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,mBAAmB;CACnB,kBAAkB;CAClB,qBAAqB;CACrB,sBAAsB;AACvB;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;AACpB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + var entries = []; + for (var key in map) entries.push({key: key, value: map[key]}); + return entries; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css": -/*!***********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css ***! - \***********************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-collection/src/index.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-collection/src/index.js ***! + \*************************************************/ +/*! exports provided: nest, set, map, keys, values, entries */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,UAAU;AACX;;AAEA;CACC,eAAe;CACf,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony import */ var _nest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nest */ "./node_modules/d3-collection/src/nest.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return _nest__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set */ "./node_modules/d3-collection/src/set.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/***/ }), +/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css": -/*!*************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css ***! - \*************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keys */ "./node_modules/d3-collection/src/keys.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./values */ "./node_modules/d3-collection/src/values.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony import */ var _entries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entries */ "./node_modules/d3-collection/src/entries.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return _entries__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,qCAAqC;;AAErC;CACC,kBAAkB;AACnB;;AAEA;CACC,eAAe;CACf,WAAW;AACZ;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,UAAU;AACX;;AAEA;CACC,yBAAyB;AAC1B;;AAEA,YAAY;AACZ;CACC,sBAAsB;AACvB;;AAEA,iBAAiB;AACjB;CACC,uDAAuD;AACxD;AACA;CACC,uDAAuD;AACxD;AACA;;CAEC,4DAA4D;AAC7D;AACA;;CAEC,4DAA4D;AAC7D;;AAEA;CACC,KAAK,kCAAkC,EAAE;CACzC,OAAO,uBAAuB,EAAE;AACjC;AACA;CACC,KAAK,kCAAkC,EAAE;CACzC,kHAAkH;CAClH,MAAM,uBAAuB,EAAE;AAChC;;AAEA;CACC,KAAK,qCAAqC,EAAE;CAC5C,OAAO,uBAAuB,EAAE;AACjC;AACA;CACC,KAAK,qCAAqC,EAAE;CAC5C,kHAAkH;CAClH,MAAM,uBAAuB,EAAE;AAChC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css": -/*!*****************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css ***! - \*****************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\t/* This is a strange rule but it avoids https://github.com/microsoft/vscode/issues/96795, just 100vw on its own caused the actual hover width to increase */\r\n\tmin-width: calc(100% + 100vw);\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -10px;\r\n\tmargin-right: -10px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n\tword-break: break-all;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,eAAe;CACf,kBAAkB;CAClB,gBAAgB;CAChB,WAAW;CACX,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,mBAAmB;CACnB,8BAA8B;CAC9B,kBAAkB;AACnB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,2JAA2J;CAC3J,6BAA6B;AAC9B;;AAEA;;;CAGC,aAAa;AACd;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,eAAe;CACf,mBAAmB;CACnB,kBAAkB;CAClB,mBAAmB;CACnB,WAAW;AACZ;;AAEA;;;CAGC,aAAa;AACd;;AAEA;;;CAGC,gBAAgB;AACjB;;AAEA,yBAAyB;AACzB;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,qBAAqB;AACtB;;AAEA;CACC,eAAe;CACf,iBAAiB;AAClB;;AAEA;CACC,aAAa;CACb,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,eAAe;AAChB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,cAAc;CACd,kBAAkB;CAClB,sBAAsB;AACvB;;AAEA;CACC,YAAY;AACb;AACA;CACC,YAAY;AACb;;AAEA;CACC,cAAc;AACf;AACA;CACC,0BAA0B;CAC1B,sCAAsC;CACtC,oCAAoC;CACpC,8BAA8B;AAC/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\t/* This is a strange rule but it avoids https://github.com/microsoft/vscode/issues/96795, just 100vw on its own caused the actual hover width to increase */\r\n\tmin-width: calc(100% + 100vw);\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -10px;\r\n\tmargin-right: -10px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n\tword-break: break-all;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css": -/*!*************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css ***! - \*************************************************************************************************************************/ +/***/ "./node_modules/d3-collection/src/keys.js": +/*!************************************************!*\ + !*** ./node_modules/d3-collection/src/keys.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/Microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tpadding: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,qCAAqC;;AAErC;CACC,aAAa,EAAE,4CAA4C;CAC3D,gBAAgB;CAChB,uBAAuB;AACxB;;AAEA;;CAEC,2CAA2C;CAC3C,qBAAqB;CACrB,gCAAgC;CAChC,4BAA4B;CAC5B,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,+BAA+B;CAC/B,qBAAqB;;CAErB,gBAAgB;CAChB,mCAAmC;CACnC,kCAAkC;CAClC,mBAAmB;;CAEnB,cAAc,EAAE,6DAA6D;AAC9E;;AAEA;CACC,YAAY;CACZ,gBAAgB;CAChB,uBAAuB;CACvB,OAAO;AACR;;AAEA;CACC,cAAc;CACd,gBAAgB,EAAE,4DAA4D;AAC/E;;AAEA;CACC,aAAa;CACb,YAAY;AACb;;AAEA;CACC,WAAW;CACX,kBAAkB;CAClB,gBAAgB;CAChB,gBAAgB,EAAE,4DAA4D;AAC/E;;AAEA;CACC,YAAY;AACb;;AAEA;;CAEC,kBAAkB;AACnB;;AAEA;;CAEC,6BAA6B;AAC9B;;AAEA;CACC,aAAa;CACb,cAAc;CACd,gBAAgB;CAChB,qBAAqB;CACrB,kBAAkB;AACnB;;AAEA,kEAAkE;AAClE;;;CAGC,yBAAyB;AAC1B;;AAEA;;CAEC,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/Microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tpadding: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css": -/*!***********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css ***! - \***********************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-collection/src/map.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-collection/src/map.js ***! + \***********************************************/ +/*! exports provided: prefix, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); +var prefix = "$"; + +function Map() {} +Map.prototype = map.prototype = { + constructor: Map, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } +}; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .input,\r\n.monaco-inputbox > .wrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .wrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmin-height: 34px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,cAAc;CACd,UAAU;CACV,sBAAsB;;CAEtB,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,6BAA6B;AAC9B;;AAEA;;;CAGC,iBAAiB;CACjB,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,qBAAqB;CACrB,sBAAsB;CACtB,WAAW;CACX,YAAY;CACZ,oBAAoB;CACpB,YAAY;CACZ,oBAAoB;CACpB,kBAAkB;CAClB,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,uBAAuB;AACxB;;AAEA;CACC,cAAc;CACd,wBAAwB,EAAE,4BAA4B;CACtD,qBAAqB,EAAE,6BAA6B;CACpD,aAAa;AACd;;AAEA;CACC,aAAa,EAAE,oCAAoC;AACpD;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,kBAAkB;CAClB,qBAAqB;CACrB,WAAW;CACX,MAAM;CACN,OAAO;CACP,sBAAsB;CACtB,qBAAqB;CACrB,kBAAkB;CAClB,qBAAqB;AACtB;;AAEA,iBAAiB;;AAEjB;CACC,iBAAiB;AAClB;;AAEA;CACC,qBAAqB;CACrB,gBAAgB;CAChB,gBAAgB;CAChB,WAAW;CACX,sBAAsB;CACtB,cAAc;CACd,eAAe;CACf,iBAAiB;CACjB,gBAAgB;CAChB,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA,uBAAuB;AACvB;CACC,kBAAkB;CAClB,UAAU;CACV,QAAQ;AACT;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,4BAA4B;CAC5B,WAAW;CACX,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .input,\r\n.monaco-inputbox > .wrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .wrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .wrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .wrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmin-height: 34px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function map(object, f) { + var map = new Map; + // Copy constructor. + if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); -/***/ }), + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css": -/*!*************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css ***! - \*************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + return map; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tborder-radius: 3px;\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tvertical-align: middle;\r\n\tcolor: #555;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tcolor: #ccc;\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA;CACC,qBAAqB;CACrB,0CAA0C;CAC1C,6CAA6C;CAC7C,kBAAkB;CAClB,mDAAmD;CACnD,0CAA0C;CAC1C,sBAAsB;CACtB,WAAW;CACX,eAAe;CACf,gBAAgB;CAChB,aAAa;AACd;;AAEA;CACC,cAAc;AACf;;AAEA;CACC,eAAe;AAChB;;AAEA;;CAEC,2CAA2C;CAC3C,WAAW;CACX,uCAAuC;CACvC,0CAA0C;CAC1C,gDAAgD;AACjD;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,UAAU;AACX","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tborder-radius: 3px;\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tvertical-align: middle;\r\n\tcolor: #555;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tcolor: #ccc;\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (map); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css ***! - \***************************************************************************************************************/ +/***/ "./node_modules/d3-collection/src/nest.js": +/*!************************************************!*\ + !*** ./node_modules/d3-collection/src/nest.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing:\tborder-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused, .monaco-list.selection-single, .monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n.monaco-list:focus .monaco-list-row.selected .codicon {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,YAAY;CACZ,WAAW;CACX,mBAAmB;AACpB;;AAEA;CACC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,WAAW;CACX,eAAe;AAChB;;AAEA;CACC,kBAAkB;CAClB,sBAAsB;CACtB,gBAAgB;CAChB,WAAW;AACZ;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA,iCAAiC;AACjC;CACC,wBAAwB;AACzB;;AAEA,UAAU;AACV;CACC,qBAAqB;AACtB;;AAEA;CACC,cAAc;AACf;;AAEA,QAAQ;AACR;CACC,qBAAqB;CACrB,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,kBAAkB;AACnB;;AAEA,gBAAgB;;AAEhB;CACC,aAAa;CACb,mBAAmB;CACnB,kBAAkB;CAClB,kBAAkB;CAClB,gBAAgB;CAChB,4BAA4B;CAC5B,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,sBAAsB;CACtB,kBAAkB;CAClB,eAAe;CACf,iBAAiB;CACjB,YAAY;CACZ,UAAU;CACV,QAAQ;AACT;;AAEA;CACC,+BAA+B;AAChC;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,SAAS;AACV;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,sBAAsB;CACtB,sBAAsB;CACtB,QAAQ;AACT;;AAEA;;CAEC,WAAW;AACZ;;AAEA;CACC,YAAY;CACZ,sBAAsB;CACtB,wBAAwB;CACxB,qBAAqB;CACrB,gBAAgB;CAChB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,SAAS;CACT,UAAU;CACV,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,eAAe;AAChB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,sBAAsB;CACtB,WAAW;CACX,YAAY;CACZ,MAAM;CACN,OAAO;CACP,yBAAyB;CACzB,kBAAkB;CAClB,mBAAmB;CACnB,YAAY;CACZ,oBAAoB;AACrB;;AAEA;CACC,aAAa;AACd;;AAEA,aAAa;;AAEb;CACC,YAAY;AACb;;AAEA;CACC,gBAAgB;AACjB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing:\tborder-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused, .monaco-list.selection-single, .monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n.monaco-list:focus .monaco-list-row.selected .codicon {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var keys = [], + sortKeys = [], + sortValues, + rollup, + nest; -/***/ }), + function apply(array, depth, createResult, setResult) { + if (depth >= keys.length) { + if (sortValues != null) array.sort(sortValues); + return rollup != null ? rollup(array) : array; + } -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css": -/*!*****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css ***! - \*****************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var i = -1, + n = array.length, + key = keys[depth++], + keyValue, + value, + valuesByKey = Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])(), + values, + result = createResult(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { + values.push(value); + } else { + valuesByKey.set(keyValue, [value]); + } + } + valuesByKey.each(function(values, key) { + setResult(result, key, apply(values, depth, createResult, setResult)); + }); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;AACb;;AAEA,6GAA6G;AAC7G;;CAEC,+kBAA+kB;AAChlB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return result; + } + function entries(map, depth) { + if (++depth > keys.length) return map; + var array, sortKey = sortKeys[depth - 1]; + if (rollup != null && depth >= keys.length) array = map.entries(); + else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); + return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; + } -/***/ }), + return nest = { + object: function(array) { return apply(array, 0, createObject, setObject); }, + map: function(array) { return apply(array, 0, createMap, setMap); }, + entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, + key: function(d) { keys.push(d); return nest; }, + sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, + sortValues: function(order) { sortValues = order; return nest; }, + rollup: function(f) { rollup = f; return nest; } + }; +}); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css": -/*!*****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css ***! - \*****************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function createObject() { + return {}; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function setObject(object, key, value) { + object[key] = value; +} +function createMap() { + return Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])(); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * 50%: 50 * 50 = 2500%\r\n * 100%: 50 * 100 - 50 (do not overflow): 4950%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,WAAW;CACX,gBAAgB,EAAE,gCAAgC;AACnD;;AAEA;CACC,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,OAAO;CACP,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,OAAO;CACP,8BAA8B;AAC/B;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,wBAAwB;CACxB,sBAAsB;CACtB,mCAAmC;CACnC,iCAAiC;CACjC,qCAAqC;AACtC;;AAEA;;;;;;EAME;AACF,sBAAsB,OAAO,oCAAoC,EAAE,MAAM,uCAAuC,EAAE,KAAK,uCAAuC,EAAE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * 50%: 50 * 50 = 2500%\r\n * 100%: 50 * 100 - 50 (do not overflow): 4950%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function setMap(map, key, value) { + map.set(key, value); +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css ***! - \***************************************************************************************************************/ +/***/ "./node_modules/d3-collection/src/set.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-collection/src/set.js ***! + \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\r\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\r\n\tbackground: red;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,WAAW;CACX,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,0BAA0B;CAC1B,+BAA+B;AAChC;;AAEA,YAAY;;AAEZ;CACC,gBAAgB;AACjB;;AAEA;CACC,kCAAkC;AACnC;;AAEA;;CAEC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\r\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\r\n\tbackground: red;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function Set() {} +var proto = _map__WEBPACK_IMPORTED_MODULE_0__["default"].prototype; -/***/ }), +Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[_map__WEBPACK_IMPORTED_MODULE_0__["prefix"] + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each +}; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css": -/*!********************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css ***! - \********************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function set(object, f) { + var set = new Set; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + return set; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,WAAW;AACX;CACC,eAAe;CACf,0BAA0B;AAC3B;;AAEA;CACC,UAAU;;CAEV,gEAAgE;CAChE,wBAAwB;;CAExB,gCAAgC;AACjC;AACA;CACC,UAAU;CACV,oBAAoB;AACrB;AACA;CACC,gCAAgC;AACjC;;AAEA,oCAAoC;AACpC;CACC,kBAAkB;CAClB,aAAa;AACd;AACA;CACC,cAAc;CACd,MAAM;CACN,SAAS;CACT,WAAW;CACX,WAAW;CACX,qCAAqC;AACtC;AACA;CACC,cAAc;CACd,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,UAAU;CACV,qCAAqC;AACtC;AACA;CACC,cAAc;CACd,MAAM;CACN,OAAO;CACP,WAAW;CACX,UAAU;AACX;AACA;CACC,uCAAuC;AACxC;;AAEA,wCAAwC;;AAExC;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;;AAEA;CACC,mCAAmC;AACpC;AACA;CACC,mCAAmC;AACpC;;AAEA;CACC,6BAA6B;AAC9B;AACA;CACC,mCAAmC;AACpC;AACA;CACC,kCAAkC;AACnC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qCAAqC;AACtC;;AAEA;CACC,uCAAuC;AACxC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (set); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css": -/*!*************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css ***! - \*************************************************************************************************************************/ +/***/ "./node_modules/d3-collection/src/values.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-collection/src/values.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,oBAAoB;AACrB;;AAEA;CACC,uBAAuB;AACxB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,mBAAmB;CACnB,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;CACpB,kBAAkB;AACnB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,UAAU;CACV,oBAAoB;CACpB,yCAAyC;AAC1C;;AAEA;CACC,YAAY;CACZ,UAAU;AACX;;AAEA;CACC,WAAW;CACX,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css": -/*!*********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css ***! - \*********************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/color.js": +/*!********************************************!*\ + !*** ./node_modules/d3-color/src/color.js ***! + \********************************************/ +/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcolor: inherit !important;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,YAAY;CACZ,mBAAmB;CACnB,kBAAkB;AACnB;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,MAAM;CACN,UAAU;CACV,oBAAoB;AACrB;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,qBAAqB;CACrB,sBAAsB;CACtB,YAAY;CACZ,kCAAkC;AACnC;;AAEA;CACC,oCAAoC;AACrC;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,WAAW;CACX,wBAAwB;CACxB,mBAAmB;CACnB,uBAAuB;CACvB,yBAAyB;CACzB,0BAA0B;AAC3B;;AAEA;CACC,OAAO;CACP,gBAAgB;AACjB;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,kDAAkD;CAClD,gDAAgD;AACjD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcolor: inherit !important;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); +/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -/***/ }), +function Color() {} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css": -/*!************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css ***! - \************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var darker = 0.7; +var brighter = 1 / darker; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex = /^#([0-9a-f]{3,8})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding-bottom: 6px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-left-action-bar.monaco-action-bar .actions-container {\r\n\tjustify-content: flex-start;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\twidth: 19px;\r\n\theight: 100%;\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\theight: 100%;\r\n\tpadding: 0 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px; /* separate actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,YAAY;CACZ,aAAa;CACb,mBAAmB;CACnB,SAAS;CACT,mBAAmB;AACpB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,aAAa;CACb,gBAAgB;CAChB,OAAO;AACR;;AAEA;CACC,2BAA2B;AAC5B;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;AACnB;;AAEA;CACC,aAAa;CACb,iBAAiB;CACjB,OAAO;AACR;;AAEA;CACC,SAAS;CACT,WAAW;CACX,YAAY;CACZ,2BAA2B;CAC3B,4BAA4B;AAC7B;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,aAAa;CACb,wBAAwB;CACxB,mBAAmB;AACpB;;AAEA;CACC,sDAAsD;CACtD,UAAU;CACV,gBAAgB;AACjB;;AAEA;CACC,aAAa;CACb,sBAAsB;CACtB,YAAY;CACZ,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,SAAS;AACV;;AAEA;CACC,YAAY;CACZ,aAAa;CACb,kBAAkB;AACnB;;AAEA;CACC,YAAY;AACb;;AAEA;;CAEC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,cAAc;AACf;;AAEA;CACC,kBAAkB;CAClB,kBAAkB;CAClB,UAAU;CACV,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,sBAAsB;CACtB,gBAAgB;CAChB,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;AACpB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,eAAe;CACf,cAAc;CACd,aAAa;CACb,YAAY;CACZ,mBAAmB;AACpB;;AAEA;CACC,gBAAgB;CAChB,wBAAwB;AACzB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;;CAEC,WAAW;AACZ;;AAEA;CACC,iBAAiB;CACjB,eAAe;AAChB;;AAEA;CACC,aAAa,EAAE,yCAAyC;AACzD;;AAEA;CACC,gBAAgB;CAChB,2BAA2B;AAC5B;;AAEA;CACC,sBAAsB;CACtB,gBAAgB;CAChB,aAAa;CACb,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,qBAAqB;CACrB,uBAAuB;AACxB;;AAEA;CACC,sBAAsB;AACvB;;AAEA;CACC,gBAAgB;CAChB,aAAa;CACb,YAAY;CACZ,OAAO;AACR;;AAEA;CACC,kBAAkB;CAClB,SAAS;AACV;;AAEA;CACC,gBAAgB;CAChB,uBAAuB;CACvB,aAAa;CACb,sBAAsB;CACtB,YAAY;CACZ,OAAO;CACP,gBAAgB;AACjB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,aAAa;AACd;AACA;CACC,eAAe;AAChB;;AAEA;CACC,aAAa;CACb,mBAAmB;AACpB;;AAEA;;CAEC,OAAO,EAAE,kDAAkD;AAC5D;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,iBAAiB,EAAE,0DAA0D;AAC9E;;AAEA;CACC,YAAY;CACZ,mBAAmB;CACnB,uBAAuB;CACvB,gBAAgB;AACjB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,iBAAiB,EAAE,yCAAyC;AAC7D;;AAEA;CACC,aAAa;CACb,OAAO;CACP,iBAAiB;AAClB;;AAEA;CACC;;;GAGE;CACF,aAAa;AACd;;AAEA;CACC,SAAS;CACT,YAAY;CACZ,cAAc;CACd,sBAAsB;AACvB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,iBAAiB,EAAE,4BAA4B;AAChD;;AAEA;CACC,iBAAiB,EAAE,qBAAqB;AACzC;;AAEA;;;CAGC,aAAa;AACd","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding-bottom: 6px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-left-action-bar.monaco-action-bar .actions-container {\r\n\tjustify-content: flex-start;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\twidth: 19px;\r\n\theight: 100%;\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\theight: 100%;\r\n\tpadding: 0 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px; /* separate actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { + copy: function(channels) { + return Object.assign(new this.constructor, this, channels); + }, + displayable: function() { + return this.rgb().displayable(); + }, + hex: color_formatHex, // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb +}); +function color_formatHex() { + return this.rgb().formatHex(); +} -/***/ }), +function color_formatHsl() { + return hslConvert(this).formatHsl(); +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css": -/*!*******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css ***! - \*******************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function color_formatRgb() { + return this.rgb().formatRgb(); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function color(format) { + var m, l; + format = (format + "").trim().toLowerCase(); + return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 + : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 + : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 + : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 + : null) // invalid hex + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; +} +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,aAAa;CACb,SAAS;CACT,UAAU;CACV,kBAAkB;CAClB,wBAAwB;CACxB,YAAY;CACZ,YAAY;CACZ,gBAAgB;CAChB,kBAAkB;CAClB,6BAA6B;AAC9B;AACA;;;;;;;;;;;;EAYE;AACF;CACC,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} -/***/ }), +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css": -/*!********************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css ***! - \********************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (-0.5 <= this.r && this.r < 255.5) + && (-0.5 <= this.g && this.g < 255.5) + && (-0.5 <= this.b && this.b < 255.5) + && (0 <= this.opacity && this.opacity <= 1); + }, + hex: rgb_formatHex, // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb +})); +function rgb_formatHex() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,cAAc;CACd,kBAAkB;CAClB,OAAO;CACP,MAAM;CACN,sBAAsB;AACvB;;AAEA;CACC,cAAc;CACd,kBAAkB;CAClB,OAAO;CACP,MAAM;CACN,sBAAsB;AACvB;;AAEA;CACC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function rgb_formatRgb() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); +} +function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); +} -/***/ }), +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css": -/*!**************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css ***! - \**************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} + +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + }, + formatHsl: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "hsl(" : "hsla(") + + (this.h || 0) + ", " + + (this.s || 0) * 100 + "%, " + + (this.l || 0) * 100 + "%" + + (a === 1 ? ")" : ", " + a + ")"); + } +})); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css": -/*!**************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css ***! - \**************************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/cubehelix.js": +/*!************************************************!*\ + !*** ./node_modules/d3-color/src/cubehelix.js ***! + \************************************************/ +/*! exports provided: default, Cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); +/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;;;CAGC;AACD;CACC,kBAAkB;CAClB,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), +var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css": -/*!****************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css ***! - \****************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"] - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"], + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } +})); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css": -/*!**************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css ***! - \**************************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/define.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-color/src/define.js ***! + \*********************************************/ +/*! exports provided: default, extend */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); +/* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +}); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kCAAkC;CAClC,kBAAkB;CAClB,iBAAiB;CACjB,qBAAqB;CACrB,sBAAsB;CACtB,sBAAsB;CACtB,eAAe;CACf,YAAY;AACb;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;CACrB,WAAW;AACZ;;AAEA;CACC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css ***! - \******************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-color/src/index.js ***! + \********************************************/ +/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,yDAAyD;AACzD;;;;;;;;EAQE;;AAEF;;;CAGC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,kBAAkB;CAClB,WAAW;AACZ;;AAEA;CACC,qBAAqB;AACtB;;AAEA,oCAAoC;AACpC;;;;EAIE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css": -/*!************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css ***! - \************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-color/src/lab.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;CACN,iBAAiB;AAClB;;AAEA;;;CAGC;AACD;CACC,kBAAkB;CAClB,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); -/***/ }), +/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-color/src/cubehelix.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css": -/*!**************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css ***! - \**************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;CAClB,OAAO;CACP,WAAW;CACX,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***! - \******************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/lab.js": +/*!******************************************!*\ + !*** ./node_modules/d3-color/src/lab.js ***! + \******************************************/ +/*! exports provided: gray, default, Lab, lch, hcl, Hcl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); +/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,6DAA6D;AAC7D;CACC,UAAU;CACV,gCAAgC;AACjC;AACA;CACC,UAAU;AACX;AACA;CACC,UAAU;AACX;AACA,2DAA2D;;AAE3D;CACC,kBAAkB;CAClB,QAAQ;AACT;AACA;CACC,kBAAkB;CAClB,UAAU;CACV,UAAU;AACX","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css": -/*!********************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css ***! - \********************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// https://observablehq.com/@mbostock/lab-and-rgb +var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) return hcl2lab(o); + if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) x = z = y; else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} +function gray(l, opacity) { + return new Lab(l, 0, 0, opacity == null ? 1 : opacity); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;CACN,MAAM;AACP","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} -/***/ }), +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( + lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), + lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } +})); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css ***! - \****************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} +function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;AACP","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"]; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} -/***/ }), +function lch(l, c, h, opacity) { + return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css": -/*!************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css ***! - \************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} +function hcl2lab(o) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"]; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kBAAkB;CAClB,MAAM;CACN,OAAO;CACP,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return hcl2lab(this).rgb(); + } +})); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css": -/*!************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css ***! - \************************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-color/src/math.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-color/src/math.js ***! + \*******************************************/ +/*! exports provided: deg2rad, rad2deg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;;CAGC;AACD;CACC,kBAAkB;AACnB;;AAEA,qCAAqC,2BAA2B,EAAE;AAClE,wCAAwC,8BAA8B,EAAE;AACxE,sCAAsC,4BAA4B,EAAE;AACpE,wCAAwC,+BAA+B,EAAE;;AAEzE,4CAA4C,yBAAyB,EAAE;AACvE,+CAA+C,4BAA4B,EAAE;AAC7E,6CAA6C,0BAA0B,EAAE;AACzE,+CAA+C,6BAA6B,EAAE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deg2rad", function() { return deg2rad; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rad2deg", function() { return rad2deg; }); +var deg2rad = Math.PI / 180; +var rad2deg = 180 / Math.PI; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css": -/*!**************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css ***! - \**************************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/area.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-contour/src/area.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA,iCAAiC;AACjC;CACC,oBAAoB;AACrB;;AAEA,8BAA8B;AAC9B;CACC,sBAAsB;CACtB,kCAAkC;CAClC,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA,0BAA0B;AAC1B;CACC,wBAAwB;CACxB,0BAA0B;CAC1B,kCAAkC;CAClC,sBAAsB;AACvB;;AAEA,+BAA+B;AAC/B;CACC,wBAAwB;CACxB,0BAA0B;CAC1B,kCAAkC;CAClC,sBAAsB;AACvB;;AAEA;CACC;;EAEC,UAAU;CACX;CACA;;EAEC,UAAU;CACX;AACD;;AAEA;CACC;;EAEC,UAAU;CACX;CACA;;EAEC,UAAU;CACX;AACD;;AAEA;CACC;;EAEC,oBAAoB;CACrB;CACA;;EAEC,oBAAoB;CACrB;AACD;;AAEA;CACC,gEAAgE;AACjE;;AAEA;CACC,+DAA+D;AAChE;;AAEA;CACC,gEAAgE;AACjE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(ring) { + var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; + while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; + return area; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css ***! - \****************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-contour/src/array.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-contour/src/array.js ***! + \**********************************************/ +/*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var array = Array.prototype; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,qCAAqC;;AAErC;CACC,UAAU;AACX;;AAEA;CACC,WAAW;AACZ;;AAEA,8DAA8D;AAC9D,yCAAyC,+BAA+B,EAAE;AAC1E,6CAA6C,qCAAqC,EAAE;;AAEpF,2EAA2E,yBAAyB,EAAE;AACtG,+EAA+E,yBAAyB,EAAE;AAC1G,gFAAgF,gBAAgB,EAAE;;AAElG;CACC,WAAW;AACZ;AACA,oDAAoD,mCAAmC,EAAE;AACzF,0DAA0D,gBAAgB,EAAE;;AAE5E,+BAA+B;;AAE/B;;;;CAIC,0BAA0B;CAC1B,uBAAuB;CACvB,wBAAwB;CACxB,mBAAmB;AACpB;AACA;;;;CAIC,UAAU;AACX;;AAEA;CACC,iBAAiB;AAClB;AACA;CACC,iBAAiB;AAClB;;AAEA,sCAAsC;;AAEtC;CACC,qBAAqB;AACtB;;AAEA;CACC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +var slice = array.slice; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css ***! - \****************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/ascending.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-contour/src/ascending.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,iBAAiB;CACjB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,cAAc;CACd,eAAe;AAChB;;AAEA;CACC,kBAAkB;CAClB,WAAW;AACZ;;AAEA;CACC,qBAAqB;CACrB,WAAW;CACX,sBAAsB;AACvB;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;CAClB,WAAW;CACX,QAAQ;AACT;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,aAAa;AACd","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return a - b; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css": -/*!************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css ***! - \************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-contour/src/blur.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-contour/src/blur.js ***! + \*********************************************/ +/*! exports provided: blurX, blurY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurX", function() { return blurX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurY", function() { return blurY; }); +// TODO Optimize edge cases. +// TODO Optimize index calculation. +// TODO Optimize arguments. +function blurX(source, target, r) { + var n = source.width, + m = source.height, + w = (r << 1) + 1; + for (var j = 0; j < m; ++j) { + for (var i = 0, sr = 0; i < n + r; ++i) { + if (i < n) { + sr += source.data[i + j * n]; + } + if (i >= r) { + if (i >= w) { + sr -= source.data[i - w + j * n]; + } + target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); + } + } + } +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,4EAA4E;;AAE5E;CACC,aAAa;AACd;;AAEA,gBAAgB;AAChB,oCAAoC;AACpC;CACC,cAAc;AACf;;AAEA,qDAAqD;;AAErD;CACC,kBAAkB;CAClB,iBAAiB;CACjB,8BAA8B;AAC/B;;AAEA,mDAAmD;;AAEnD;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,MAAM;AACP;;AAEA;;;;CAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +// TODO Optimize edge cases. +// TODO Optimize index calculation. +// TODO Optimize arguments. +function blurY(source, target, r) { + var n = source.width, + m = source.height, + w = (r << 1) + 1; + for (var i = 0; i < n; ++i) { + for (var j = 0, sr = 0; j < m + r; ++j) { + if (j < m) { + sr += source.data[i + j * n]; + } + if (j >= r) { + if (j >= w) { + sr -= source.data[i + (j - w) * n]; + } + target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); + } + } + } +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css ***! - \******************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/constant.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-contour/src/constant.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,yBAAyB;CACzB,qBAAqB;AACtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css": -/*!************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css ***! - \************************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/contains.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-contour/src/contains.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;AACvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - - -/***/ }), +/* harmony default export */ __webpack_exports__["default"] = (function(ring, hole) { + var i = -1, n = hole.length, c; + while (++i < n) if (c = ringContains(ring, hole[i])) return c; + return 0; +}); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css": -/*!*******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css ***! - \*******************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function ringContains(ring, point) { + var x = point[0], y = point[1], contains = -1; + for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { + var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; + if (segmentContains(pi, pj, point)) return 0; + if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; + } + return contains; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function segmentContains(a, b, c) { + var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); +} +function collinear(a, b, c) { + return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .lightbulb-glyph,\r\n.monaco-editor .codicon-lightbulb {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\theight: 16px;\r\n\twidth: 20px;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .lightbulb-glyph:hover,\r\n.monaco-editor .codicon-lightbulb:hover {\r\n\tcursor: pointer;\r\n\t/* transform: scale(1.3, 1.3); */\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;CAEC,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,YAAY;CACZ,WAAW;CACX,iBAAiB;AAClB;;AAEA;;CAEC,eAAe;CACf,gCAAgC;AACjC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .lightbulb-glyph,\r\n.monaco-editor .codicon-lightbulb {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\theight: 16px;\r\n\twidth: 20px;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .lightbulb-glyph:hover,\r\n.monaco-editor .codicon-lightbulb:hover {\r\n\tcursor: pointer;\r\n\t/* transform: scale(1.3, 1.3); */\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function within(p, q, r) { + return p <= q && q <= r || r <= q && q <= p; +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css ***! - \****************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/contours.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-contour/src/contours.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;CAChB,qBAAqB;CACrB,uBAAuB;AACxB;;AAEA;;CAEC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,sBAAsB;CACtB,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,KAAK,UAAU,EAAE,mBAAmB,CAAC;CACrC,OAAO,UAAU,EAAE;AACpB;;AAEA;CACC,6BAA6B;AAC9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - - -/***/ }), +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js"); +/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-contour/src/ascending.js"); +/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area */ "./node_modules/d3-contour/src/area.js"); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js"); +/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains */ "./node_modules/d3-contour/src/contains.js"); +/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop */ "./node_modules/d3-contour/src/noop.js"); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css ***! - \****************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA;CACC,aAAa;AACd;;;AAGA,WAAW;;AAEX;CACC,aAAa;CACb,YAAY;CACZ,kBAAkB;CAClB,iRAAiR;CACjR,wBAAwB;CACxB,0BAA0B;AAC3B;;AAEA;CACC,YAAY;CACZ,kBAAkB;CAClB,iBAAiB;CACjB,eAAe;CACf,YAAY;CACZ,OAAO;CACP,kBAAkB;AACnB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,WAAW;CACX,gBAAgB;CAChB,eAAe;AAChB;;;AAGA,SAAS;;AAET;CACC,aAAa;CACb,YAAY;CACZ,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;CAChB,aAAa;CACb,kBAAkB;CAClB,gBAAgB;CAChB,OAAO;AACR;;AAEA;CACC,aAAa;CACb,kBAAkB;AACnB;;AAEA;CACC,UAAU;CACV,WAAW;CACX,qBAAqB;CACrB,oCAAoC;CACpC,mBAAmB;CACnB,0CAA0C;CAC1C,kBAAkB;AACnB;;AAEA;CACC,WAAW;CACX,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,YAAY;CACZ,iIAAiI;AAClI;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,YAAY;CACZ,iRAAiR;CACjR,wBAAwB;CACxB,0BAA0B;AAC3B;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,kBAAkB;CAClB,MAAM;CACN,UAAU;CACV,uBAAuB;CACvB,WAAW;CACX,sBAAsB;CACtB,2CAA2C;CAC3C,2CAA2C;AAC5C;;AAEA;CACC,aAAa;CACb,oBAAoB;AACrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css": -/*!************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css ***! - \************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +var cases = [ + [], + [[[1.0, 1.5], [0.5, 1.0]]], + [[[1.5, 1.0], [1.0, 1.5]]], + [[[1.5, 1.0], [0.5, 1.0]]], + [[[1.0, 0.5], [1.5, 1.0]]], + [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], + [[[1.0, 0.5], [1.0, 1.5]]], + [[[1.0, 0.5], [0.5, 1.0]]], + [[[0.5, 1.0], [1.0, 0.5]]], + [[[1.0, 1.5], [1.0, 0.5]]], + [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], + [[[1.5, 1.0], [1.0, 0.5]]], + [[[0.5, 1.0], [1.5, 1.0]]], + [[[1.0, 1.5], [1.5, 1.0]]], + [[[0.5, 1.0], [1.0, 1.5]]], + [] +]; +/* harmony default export */ __webpack_exports__["default"] = (function() { + var dx = 1, + dy = 1, + threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__["thresholdSturges"], + smooth = smoothLinear; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,8BAA8B;CAC9B,YAAY,EAAE,sBAAsB;AACrC;AACA;CACC,gCAAgC;CAChC,cAAc,EAAE,wBAAwB;AACzC;AACA;CACC,6BAA6B;CAC7B,WAAW,EAAE,qBAAqB;AACnC;;AAEA;;;CAGC,eAAe;AAChB;AACA;;;CAGC,YAAY;AACb","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + function contours(values) { + var tz = threshold(values); + // Convert number of thresholds into uniform thresholds. + if (!Array.isArray(tz)) { + var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["extent"])(values), start = domain[0], stop = domain[1]; + tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, tz); + tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); + } else { + tz = tz.slice().sort(_ascending__WEBPACK_IMPORTED_MODULE_2__["default"]); + } -/***/ }), + return tz.map(function(value) { + return contour(values, value); + }); + } -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css": -/*!**************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css ***! - \**************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Accumulate, smooth contour rings, assign holes to exterior rings. + // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js + function contour(values, value) { + var polygons = [], + holes = []; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + isorings(values, value, function(ring) { + smooth(ring, values, value); + if (Object(_area__WEBPACK_IMPORTED_MODULE_3__["default"])(ring) > 0) polygons.push([ring]); + else holes.push(ring); + }); + holes.forEach(function(hole) { + for (var i = 0, n = polygons.length, polygon; i < n; ++i) { + if (Object(_contains__WEBPACK_IMPORTED_MODULE_5__["default"])((polygon = polygons[i])[0], hole) !== -1) { + polygon.push(hole); + return; + } + } + }); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list .monaco-list-row.focused.selected .outline-element .monaco-highlighted-label,\r\n.monaco-list .monaco-list-row.focused.selected .outline-element-decoration {\r\n\t/* make sure selection color wins when a label is being selected */\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list .outline-element {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-flow: row nowrap;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-list .outline-element .monaco-highlighted-label {\r\n\tcolor: var(--outline-element-color);\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-decoration {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tpadding: 0 12px 0 5px;\r\n\tmargin-left: auto;\r\n\ttext-align: center;\r\n\tcolor: var(--outline-element-color);\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-decoration.bubble {\r\n\tfont-family: codicon;\r\n\tfont-size: 14px;\r\n\topacity: 0.4;\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-icon {\r\n\tmargin-right: 4px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;CAEC,kEAAkE;CAClE,yBAAyB;AAC1B;;AAEA;CACC,aAAa;CACb,OAAO;CACP,qBAAqB;CACrB,mBAAmB;AACpB;;AAEA;CACC,mCAAmC;AACpC;;AAEA;CACC,aAAa;CACb,cAAc;CACd,gBAAgB;CAChB,qBAAqB;CACrB,iBAAiB;CACjB,kBAAkB;CAClB,mCAAmC;AACpC;;AAEA;CACC,oBAAoB;CACpB,eAAe;CACf,YAAY;AACb;;AAEA;CACC,iBAAiB;AAClB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list .monaco-list-row.focused.selected .outline-element .monaco-highlighted-label,\r\n.monaco-list .monaco-list-row.focused.selected .outline-element-decoration {\r\n\t/* make sure selection color wins when a label is being selected */\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list .outline-element {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-flow: row nowrap;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-list .outline-element .monaco-highlighted-label {\r\n\tcolor: var(--outline-element-color);\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-decoration {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tpadding: 0 12px 0 5px;\r\n\tmargin-left: auto;\r\n\ttext-align: center;\r\n\tcolor: var(--outline-element-color);\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-decoration.bubble {\r\n\tfont-family: codicon;\r\n\tfont-size: 14px;\r\n\topacity: 0.4;\r\n}\r\n\r\n.monaco-list .outline-element .outline-element-icon {\r\n\tmargin-right: 4px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return { + type: "MultiPolygon", + value: value, + coordinates: polygons + }; + } + // Marching squares with isolines stitched into rings. + // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js + function isorings(values, value, callback) { + var fragmentByStart = new Array, + fragmentByEnd = new Array, + x, y, t0, t1, t2, t3; -/***/ }), + // Special case for the first row (y = -1, t2 = t3 = 0). + x = y = -1; + t1 = values[0] >= value; + cases[t1 << 1].forEach(stitch); + while (++x < dx - 1) { + t0 = t1, t1 = values[x + 1] >= value; + cases[t0 | t1 << 1].forEach(stitch); + } + cases[t1 << 0].forEach(stitch); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css": -/*!***************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css ***! - \***************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // General case for the intermediate rows. + while (++y < dy - 1) { + x = -1; + t1 = values[y * dx + dx] >= value; + t2 = values[y * dx] >= value; + cases[t1 << 1 | t2 << 2].forEach(stitch); + while (++x < dx - 1) { + t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; + t3 = t2, t2 = values[y * dx + x + 1] >= value; + cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); + } + cases[t1 | t2 << 3].forEach(stitch); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + // Special case for the last row (y = dy - 1, t0 = t1 = 0). + x = -1; + t2 = values[y * dx] >= value; + cases[t2 << 2].forEach(stitch); + while (++x < dx - 1) { + t3 = t2, t2 = values[y * dx + x + 1] >= value; + cases[t2 << 2 | t3 << 3].forEach(stitch); + } + cases[t2 << 3].forEach(stitch); + function stitch(line) { + var start = [line[0][0] + x, line[0][1] + y], + end = [line[1][0] + x, line[1][1] + y], + startIndex = index(start), + endIndex = index(end), + f, g; + if (f = fragmentByEnd[startIndex]) { + if (g = fragmentByStart[endIndex]) { + delete fragmentByEnd[f.end]; + delete fragmentByStart[g.start]; + if (f === g) { + f.ring.push(end); + callback(f.ring); + } else { + fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; + } + } else { + delete fragmentByEnd[f.end]; + f.ring.push(end); + fragmentByEnd[f.end = endIndex] = f; + } + } else if (f = fragmentByStart[endIndex]) { + if (g = fragmentByEnd[startIndex]) { + delete fragmentByStart[f.start]; + delete fragmentByEnd[g.end]; + if (f === g) { + f.ring.push(end); + callback(f.ring); + } else { + fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; + } + } else { + delete fragmentByStart[f.start]; + f.ring.unshift(start); + fragmentByStart[f.start = startIndex] = f; + } + } else { + fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; + } + } + } -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,6BAA6B;CAC7B,aAAa;AACd","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + function index(point) { + return point[0] * 2 + point[1] * (dx + 1) * 4; + } + function smoothLinear(ring, values, value) { + ring.forEach(function(point) { + var x = point[0], + y = point[1], + xt = x | 0, + yt = y | 0, + v0, + v1 = values[yt * dx + xt]; + if (x > 0 && x < dx && xt === x) { + v0 = values[yt * dx + xt - 1]; + point[0] = x + (value - v0) / (v1 - v0) - 0.5; + } + if (y > 0 && y < dy && yt === y) { + v0 = values[(yt - 1) * dx + xt]; + point[1] = y + (value - v0) / (v1 - v0) - 0.5; + } + }); + } -/***/ }), + contours.contour = contour; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css ***! - \********************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + contours.size = function(_) { + if (!arguments.length) return [dx, dy]; + var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]); + if (!(_0 > 0) || !(_1 > 0)) throw new Error("invalid size"); + return dx = _0, dy = _1, contours; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + contours.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_), contours) : threshold; + }; + contours.smooth = function(_) { + return arguments.length ? (smooth = _ ? smoothLinear : _noop__WEBPACK_IMPORTED_MODULE_6__["default"], contours) : smooth === smoothLinear; + }; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 50;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,gBAAgB;AAChB;CACC,kBAAkB;CAClB,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,iBAAiB;CACjB,kCAAkC;CAClC,cAAc;CACd,sBAAsB;CACtB,yCAAyC,EAAE,kBAAkB;AAC9D;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,aAAa;AACd;;AAEA,2CAA2C;AAC3C;CACC,aAAa;AACd;;AAEA;CACC,wBAAwB;AACzB;;AAEA;CACC,2CAA2C;CAC3C,oBAAoB;AACrB;;AAEA;CACC,6BAA6B;CAC7B,aAAa;AACd;;AAEA;CACC,eAAe;AAChB;;AAEA;;CAEC,oBAAoB;CACpB,eAAe;CACf,aAAa;AACd;;AAEA;;CAEC,gBAAgB;AACjB;;;AAGA;CACC,mBAAmB;AACpB;;AAEA;;;;CAIC,gBAAgB;CAChB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,sBAAsB;CACtB,aAAa;CACb,MAAM;AACP;;AAEA;CACC,oDAAoD;CACpD,WAAW;AACZ;;AAEA;CACC,4BAA4B;CAC5B,UAAU;AACX;;AAEA;CACC,aAAa;CACb,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACpB,YAAY;CACZ,sBAAsB;CACtB,sBAAsB;CACtB,kBAAkB;CAClB,iBAAiB;AAClB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,kCAAkC;CAClC,4BAA4B;CAC5B,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,uBAAuB;AACxB;;AAEA;CACC,cAAc;CACd,iBAAiB;AAClB;;AAEA;CACC,WAAW;CACX,gBAAgB;CAChB,SAAS;AACV;;AAEA;CACC,kBAAkB;CAClB,MAAM;CACN,SAAS;CACT,WAAW;CACX,YAAY;CACZ,sBAAsB;AACvB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,YAAY;CACZ,eAAe;AAChB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,aAAa;CACb,sBAAsB;CACtB,UAAU;CACV,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,UAAU;AACX;;AAEA,YAAY;AACZ;CACC,YAAY;AACb;;AAEA,kCAAkC;AAClC;CACC,2BAA2B;AAC5B;;AAEA,oCAAoC;AACpC;CACC,2BAA2B;AAC5B;;AAEA;;;;;CAKC,YAAY;AACb;;AAEA;CACC,qBAAqB;CACrB,kCAAkC;AACnC;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,SAAS;AACV","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 50;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return contours; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css ***! - \********************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/density.js": +/*!************************************************!*\ + !*** ./node_modules/d3-contour/src/density.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js"); +/* harmony import */ var _blur__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur */ "./node_modules/d3-contour/src/blur.js"); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js"); +/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: \"⋯\";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;;CAEC,eAAe;CACf,UAAU;CACV,wBAAwB;CACxB,aAAa;CACb,mBAAmB;CACnB,uBAAuB;CACvB,eAAe;CACf,gBAAgB;AACjB;;AAEA;;;CAGC,UAAU;AACX;;AAEA;CACC,WAAW;CACX,2BAA2B;CAC3B,YAAY;CACZ,eAAe;CACf,gBAAgB;CAChB,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: \"⋯\";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css": -/*!************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css ***! - \************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +function defaultX(d) { + return d[0]; +} +function defaultY(d) { + return d[1]; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,gBAAgB;;AAEhB;CACC,qBAAqB;CACrB,wBAAwB;CACxB,iBAAiB;AAClB;;AAEA;CACC,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,kBAAkB;AACnB;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;CAChB,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,wBAAwB;AACzB;;AAEA;CACC,aAAa;CACb,sBAAsB;AACvB;;AAEA;CACC,iBAAiB;AAClB;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,cAAc;AACf;AACA;CACC,YAAY;AACb;AACA;CACC,YAAY;AACb;AACA;CACC,0BAA0B;CAC1B,sCAAsC;CACtC,oCAAoC;CACpC,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function defaultWeight() { + return 1; +} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x = defaultX, + y = defaultY, + weight = defaultWeight, + dx = 960, + dy = 500, + r = 20, // blur radius + k = 2, // log2(grid cell size) + o = r * 3, // grid offset, to pad for blur + n = (dx + o * 2) >> k, // grid width + m = (dy + o * 2) >> k, // grid height + threshold = Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(20); -/***/ }), - -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css": -/*!*********************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css ***! - \*********************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,0BAA0B;CAC1B,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + function density(data) { + var values0 = new Float32Array(n * m), + values1 = new Float32Array(n * m); + data.forEach(function(d, i, data) { + var xi = (+x(d, i, data) + o) >> k, + yi = (+y(d, i, data) + o) >> k, + wi = +weight(d, i, data); + if (xi >= 0 && xi < n && yi >= 0 && yi < m) { + values0[xi + yi * n] += wi; + } + }); -/***/ }), + // TODO Optimize. + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); + Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css": -/*!*************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css ***! - \*************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var tz = threshold(values0); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + // Convert number of thresholds into uniform thresholds. + if (!Array.isArray(tz)) { + var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(values0); + tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(0, stop, tz); + tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(0, Math.floor(stop / tz) * tz, tz); + tz.shift(); + } + return Object(_contours__WEBPACK_IMPORTED_MODULE_4__["default"])() + .thresholds(tz) + .size([n, m]) + (values0) + .map(transform); + } -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,mBAAmB;AACnB;CACC,qBAAqB;CACrB,wBAAwB;AACzB;;AAEA;CACC,qBAAqB;CACrB,mBAAmB;AACpB;;AAEA;CACC,YAAY;CACZ,WAAW;CACX,kBAAkB;CAClB,cAAc;AACf;;AAEA;CACC,iBAAiB;AAClB;;AAEA;CACC,uBAAuB;CACvB,gBAAgB;AACjB;;AAEA;CACC,oBAAoB;CACpB,WAAW;CACX,YAAY;AACb;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,kBAAkB;CAClB,iBAAiB;AAClB;;AAEA,0BAA0B;;AAE1B;CACC,iBAAiB;AAClB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + function transform(geometry) { + geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. + geometry.coordinates.forEach(transformPolygon); + return geometry; + } + function transformPolygon(coordinates) { + coordinates.forEach(transformRing); + } -/***/ }), + function transformRing(coordinates) { + coordinates.forEach(transformPoint); + } -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css": -/*!****************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css ***! - \****************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // TODO Optimize. + function transformPoint(coordinates) { + coordinates[0] = coordinates[0] * Math.pow(2, k) - o; + coordinates[1] = coordinates[1] * Math.pow(2, k) - o; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + function resize() { + o = r * 3; + n = (dx + o * 2) >> k; + m = (dy + o * 2) >> k; + return density; + } + density.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : x; + }; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;CAEC,0BAA0B;CAC1B,8BAA8B;AAC/B;;AAEA;CACC,eAAe;AAChB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + density.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : y; + }; + density.weight = function(_) { + return arguments.length ? (weight = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : weight; + }; -/***/ }), + density.size = function(_) { + if (!arguments.length) return [dx, dy]; + var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]); + if (!(_0 >= 0) && !(_0 >= 0)) throw new Error("invalid size"); + return dx = _0, dy = _1, resize(); + }; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css ***! - \******************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + density.cellSize = function(_) { + if (!arguments.length) return 1 << k; + if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); + return k = Math.floor(Math.log(_) / Math.LN2), resize(); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + density.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), density) : threshold; + }; + density.bandwidth = function(_) { + if (!arguments.length) return Math.sqrt(r * (r + 1)); + if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); + return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); + }; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,mBAAmB;CACnB,cAAc;AACf;;AAEA;CACC,OAAO,UAAU,EAAE;CACnB,KAAK,UAAU,EAAE;AAClB;AACA;CACC,gCAAgC;AACjC;;AAEA;CACC,OAAO,UAAU,EAAE;CACnB,KAAK,UAAU,EAAE;AAClB;AACA;CACC,iCAAiC;AAClC;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,mBAAmB;CACnB,oBAAoB;CACpB,yBAAyB;CACzB,mBAAmB;CACnB,aAAa;CACb,iBAAiB;CACjB,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return density; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css": -/*!**********************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css ***! - \**********************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-contour/src/index.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-contour/src/index.js ***! + \**********************************************/ +/*! exports provided: contours, contourDensity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .wrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,aAAa;CACb,sBAAsB;CACtB,kBAAkB;AACnB;;AAEA;CACC,gBAAgB;CAChB,aAAa;CACb,mBAAmB;AACpB;;AAEA;CACC,iBAAiB;CACjB,UAAU;AACX;;AAEA;CACC,iCAAiC;AAClC;;AAEA;;CAEC,aAAa;AACd;;AAEA;;CAEC,aAAa;CACb,OAAO;CACP,sBAAsB;CACtB,gBAAgB;AACjB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,qBAAqB;AACtB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;AAEA;CACC,aAAa;CACb,sBAAsB;CACtB,mBAAmB;CACnB,eAAe;CACf,yBAAyB;AAC1B;;AAEA;CACC,aAAa;CACb,cAAc;AACf;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,4BAA4B;CAC5B,eAAe;AAChB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,YAAY;CACZ,iBAAiB;CACjB,YAAY;CACZ,yCAAyC;AAC1C;;AAEA;CACC,iBAAiB;CACjB,0BAA0B;AAC3B;;AAEA;CACC,iBAAiB;CACjB,mBAAmB;AACpB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .wrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - - -/***/ }), +/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return _contours__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css": -/*!**********************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css ***! - \**********************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _density__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density */ "./node_modules/d3-contour/src/density.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return _density__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tcursor: pointer;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\r\n\twidth: 16px;\r\n\theight: 100%;\r\n\tmargin: 0;\r\n\tline-height: inherit;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center center;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,sBAAsB;CACtB,aAAa;AACd;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,eAAe;CACf,iBAAiB;CACjB,eAAe;CACf,YAAY;AACb;;AAEA;CACC,gBAAgB;CAChB,kBAAkB;AACnB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,gBAAgB;CAChB,uBAAuB;AACxB;;AAEA;CACC,YAAY;CACZ,gBAAgB;AACjB;;AAEA;CACC,OAAO;CACP,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;;CAEC,YAAY;AACb;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,SAAS;CACT,oBAAoB;CACpB,4BAA4B;CAC5B,kCAAkC;AACnC;;AAEA;CACC,SAAS;AACV;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;AACnB;;AAEA;CACC,iBAAiB;AAClB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tcursor: pointer;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\r\n\twidth: 16px;\r\n\theight: 100%;\r\n\tmargin: 0;\r\n\tline-height: inherit;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center center;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css": -/*!******************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css ***! - \******************************************************************************************************************************/ +/***/ "./node_modules/d3-contour/src/noop.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-contour/src/noop.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .on-type-rename-decoration {\r\n\tborder-left: 1px solid transparent;\r\n\t/* So border can be transparent */\r\n\tbackground-clip: padding-box;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,kCAAkC;CAClC,iCAAiC;CACjC,4BAA4B;AAC7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .on-type-rename-decoration {\r\n\tborder-left: 1px solid transparent;\r\n\t/* So border can be transparent */\r\n\tbackground-clip: padding-box;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css": -/*!****************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css ***! - \****************************************************************************************************************************/ +/***/ "./node_modules/d3-dispatch/src/dispatch.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-dispatch/src/dispatch.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +var noop = {value: function() {}}; +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,sBAAsB;AACvB;;AAEA;CACC,YAAY;CACZ,uBAAuB;AACxB;;AAEA;CACC,aAAa;CACb,WAAW;AACZ;;AAEA;CACC,gBAAgB;AACjB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function Dispatch(_) { + this._ = _; +} +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} -/***/ }), +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css": -/*!***************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css ***! - \***************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,cAAc;CACd,oBAAoB;CACpB,kBAAkB;AACnB;;AAEA;CACC,oBAAoB;CACpB,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (dispatch); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css": -/*!**************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css ***! - \**************************************************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-dispatch/src/index.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-dispatch/src/index.js ***! + \***********************************************/ +/*! exports provided: dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ "./node_modules/d3-dispatch/src/dispatch.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Suggest widget*/\r\n.monaco-editor .suggest-widget {\r\n\tz-index: 40;\r\n}\r\n\r\n/** Initial widths **/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n}\r\n\r\n.monaco-editor .suggest-widget > .message,\r\n.monaco-editor .suggest-widget > .tree,\r\n.monaco-editor .suggest-widget > .details {\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget > .message,\r\n.monaco-editor.hc-black .suggest-widget > .tree,\r\n.monaco-editor.hc-black .suggest-widget > .details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/** Adjust width when docs are expanded to the side **/\r\n.monaco-editor .suggest-widget.docs-side {\r\n\twidth: 660px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side > .tree,\r\n.monaco-editor .suggest-widget.docs-side > .details {\r\n\twidth: 50%;\r\n\tfloat: left;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side.list-right > .tree,\r\n.monaco-editor .suggest-widget.docs-side.list-right > .details {\r\n\tfloat: right;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-editor .suggest-widget > .details ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-editor .suggest-widget > .details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-widget > .details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n.monaco-editor .suggest-widget > .message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n.monaco-editor .suggest-widget > .tree {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** Status Bar **/\r\n\r\n.monaco-editor .suggest-widget > .suggest-status-bar {\r\n\tvisibility: hidden;\r\n\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\r\n\tbox-sizing: border-box;\r\n\r\n\tdisplay: flex;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\r\n\twidth: 100%;\r\n\r\n\tfont-size: 80%;\r\n\r\n\tborder-left-width: 1px;\r\n\tborder-left-style: solid;\r\n\tborder-right-width: 1px;\r\n\tborder-right-style: solid;\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\r\n\tpadding: 0 8px 0 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.list-right.docs-side > .suggest-status-bar {\r\n\tleft: auto;\r\n\tright: 0;\r\n}\r\n.monaco-editor .suggest-widget.docs-side > .suggest-status-bar {\r\n\twidth: 50%;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close {\r\n\tposition: absolute;\r\n\ttop: 2px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label {\r\n\tmargin-left: 4px;\r\n\topacity: 0.4;\r\n\tfont-size: 90%;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\tline-height: 17px;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\r\n\tmargin-left: 0.8em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label > .monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .right > .details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label) > .contents > .main > .right > .details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .left > .monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .left > .monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\r\n\toverflow: hidden;\r\n\tmargin-left: 16px;\r\n\tflex-shrink: 0;\r\n\tmax-width: 45%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover > .contents > .main > .right > .readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated > .monaco-icon-label-container > .monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n.monaco-editor .suggest-widget .details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-below .details {\r\n\tborder-top-width: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\tword-break: break-all;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child\t {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n\r\n/* replace/insert decorations */\r\n\r\n.monaco-editor .suggest-insert-unexpected {\r\n\tfont-style: italic;\r\n}\r\n\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F,kBAAkB;AAClB;CACC,WAAW;AACZ;;AAEA,qBAAqB;;AAErB;CACC,YAAY;AACb;;AAEA;;;CAGC,WAAW;CACX,mBAAmB;CACnB,iBAAiB;CACjB,sBAAsB;AACvB;;AAEA;;;CAGC,iBAAiB;AAClB;;AAEA,sDAAsD;AACtD;CACC,YAAY;AACb;;AAEA;;CAEC,UAAU;CACV,WAAW;AACZ;;AAEA;;CAEC,YAAY;AACb;;AAEA,yBAAyB;AACzB;CACC,kBAAkB;AACnB;AACA;CACC,kBAAkB;AACnB;;AAEA;CACC,yCAAyC;AAC1C;;AAEA,sEAAsE;AACtE;CACC,kBAAkB;AACnB;;AAEA,kCAAkC;AAClC;CACC,YAAY;AACb;;AAEA;CACC,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;AACtB;;AAEA,8CAA8C;;AAE9C;CACC,aAAa;CACb,2BAA2B;CAC3B,sBAAsB;CACtB,mBAAmB;CACnB,4BAA4B;CAC5B,4BAA4B;CAC5B,mBAAmB;CACnB,eAAe;CACf,kBAAkB;AACnB;;AAEA;CACC,OAAO;CACP,YAAY;CACZ,gBAAgB;CAChB,iBAAiB;AAClB;;AAEA;CACC,aAAa;CACb,gBAAgB;CAChB,uBAAuB;CACvB,gBAAgB;CAChB,8BAA8B;AAC/B;;AAEA;;CAEC,aAAa;AACd;;AAEA;CACC,iBAAiB;AAClB;;AAEA,iBAAiB;;AAEjB;CACC,kBAAkB;;CAElB,kBAAkB;CAClB,OAAO;;CAEP,sBAAsB;;CAEtB,aAAa;CACb,qBAAqB;CACrB,8BAA8B;;CAE9B,WAAW;;CAEX,cAAc;;CAEd,sBAAsB;CACtB,wBAAwB;CACxB,uBAAuB;CACvB,yBAAyB;CACzB,wBAAwB;CACxB,0BAA0B;;CAE1B,oBAAoB;AACrB;;AAEA;CACC,UAAU;CACV,QAAQ;AACT;AACA;CACC,UAAU;AACX;;AAEA,2BAA2B;;AAE3B;;CAEC,cAAc;CACd,UAAU;CACV,eAAe;CACf,eAAe;AAChB;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,UAAU;AACX;;AAEA;;CAEC,UAAU;AACX;;AAEA,iDAAiD;AACjD;;;CAGC,YAAY;AACb;;AAEA;CACC,gBAAgB;CAChB,uBAAuB;AACxB;;AAEA;CACC,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,uBAAuB;CACvB,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;AACnB;;AAEA,0EAA0E;;AAE1E;CACC,kBAAkB;CAClB,gBAAgB;CAChB,uBAAuB;CACvB,mBAAmB;AACpB;;AAEA;CACC,eAAe;AAChB;;AAEA,8DAA8D;;AAE9D;;CAEC,aAAa;AACd;;AAEA;CACC,eAAe;AAChB;;AAEA,iEAAiE;;AAEjE;;CAEC,eAAe;AAChB;;AAEA,wBAAwB;AACxB;CACC,wBAAwB;AACzB;;AAEA;CACC,cAAc;CACd,YAAY;CACZ,gBAAgB;AACjB;AACA;CACC,cAAc;AACf;AACA;CACC,eAAe;AAChB;AACA;CACC,cAAc;AACf;AACA;CACC,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,cAAc;AACf;;AAEA;CACC,qBAAqB;CACrB,kBAAkB;CAClB,WAAW;CACX,WAAW;CACX,YAAY;CACZ,kBAAkB;AACnB;;AAEA,sDAAsD;AACtD;;CAEC,wBAAwB;AACzB;;AAEA,iHAAiH;AACjH;CACC,aAAa;AACd;AACA,wEAAwE;AACxE;CACC,qBAAqB;AACtB;;AAEA;;CAEC,aAAa;AACd;;AAEA;CACC,mBAAmB;AACpB;;AAEA,sCAAsC;;AAEtC;CACC,aAAa;CACb,sBAAsB;AACvB;AACA;CACC,6BAA6B;AAC9B;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,cAAc;CACd,YAAY;CACZ,WAAW;CACX,gBAAgB;CAChB,4BAA4B;CAC5B,oBAAoB;CACpB,2BAA2B;AAC5B;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,aAAa;CACb,mBAAmB;CACnB,iBAAiB;AAClB;;AAEA;;CAEC,aAAa;AACd;;AAEA;CACC,mBAAmB;CACnB,wBAAwB;CACxB,YAAY;CACZ,aAAa;CACb,qBAAqB;AACtB;;AAEA,0DAA0D;AAC1D;CACC,aAAa;CACb,sBAAsB;CACtB,eAAe;AAChB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,OAAO;AACR;;AAEA;CACC,kBAAkB;CAClB,sBAAsB;CACtB,YAAY;CACZ,WAAW;AACZ;;AAEA;CACC,OAAO;CACP,gBAAgB;CAChB,uBAAuB;CACvB,YAAY;CACZ,qBAAqB;CACrB,kBAAkB;CAClB,uBAAuB;AACxB;;AAEA;CACC,SAAS;CACT,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,UAAU;CACV,oBAAoB;CACpB,4BAA4B;AAC7B;;AAEA;;CAEC,gBAAgB;AACjB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,qBAAqB;CACrB,qBAAqB;AACtB;;AAEA;CACC,mBAAmB;AACpB;;AAEA;CACC,aAAa;AACd;;AAEA;CACC,kBAAkB;CAClB,gBAAgB;AACjB;;;AAGA,+BAA+B;;AAE/B;CACC,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Suggest widget*/\r\n.monaco-editor .suggest-widget {\r\n\tz-index: 40;\r\n}\r\n\r\n/** Initial widths **/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n}\r\n\r\n.monaco-editor .suggest-widget > .message,\r\n.monaco-editor .suggest-widget > .tree,\r\n.monaco-editor .suggest-widget > .details {\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget > .message,\r\n.monaco-editor.hc-black .suggest-widget > .tree,\r\n.monaco-editor.hc-black .suggest-widget > .details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/** Adjust width when docs are expanded to the side **/\r\n.monaco-editor .suggest-widget.docs-side {\r\n\twidth: 660px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side > .tree,\r\n.monaco-editor .suggest-widget.docs-side > .details {\r\n\twidth: 50%;\r\n\tfloat: left;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side.list-right > .tree,\r\n.monaco-editor .suggest-widget.docs-side.list-right > .details {\r\n\tfloat: right;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-editor .suggest-widget > .details ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-editor .suggest-widget > .details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-widget > .details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n.monaco-editor .suggest-widget > .message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n.monaco-editor .suggest-widget > .tree {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** Status Bar **/\r\n\r\n.monaco-editor .suggest-widget > .suggest-status-bar {\r\n\tvisibility: hidden;\r\n\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\r\n\tbox-sizing: border-box;\r\n\r\n\tdisplay: flex;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\r\n\twidth: 100%;\r\n\r\n\tfont-size: 80%;\r\n\r\n\tborder-left-width: 1px;\r\n\tborder-left-style: solid;\r\n\tborder-right-width: 1px;\r\n\tborder-right-style: solid;\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\r\n\tpadding: 0 8px 0 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.list-right.docs-side > .suggest-status-bar {\r\n\tleft: auto;\r\n\tright: 0;\r\n}\r\n.monaco-editor .suggest-widget.docs-side > .suggest-status-bar {\r\n\twidth: 50%;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close {\r\n\tposition: absolute;\r\n\ttop: 2px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label {\r\n\tmargin-left: 4px;\r\n\topacity: 0.4;\r\n\tfont-size: 90%;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\tline-height: 17px;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\r\n\tmargin-left: 0.8em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label > .monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .right > .details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label) > .contents > .main > .right > .details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .left > .monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .left > .monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\r\n\toverflow: hidden;\r\n\tmargin-left: 16px;\r\n\tflex-shrink: 0;\r\n\tmax-width: 45%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover > .contents > .main > .right > .readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated > .monaco-icon-label-container > .monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n.monaco-editor .suggest-widget .details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-below .details {\r\n\tborder-top-width: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\tword-break: break-all;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child\t {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n\r\n/* replace/insert decorations */\r\n\r\n.monaco-editor .suggest-insert-unexpected {\r\n\tfont-style: italic;\r\n}\r\n\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css": -/*!***********************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css ***! - \***********************************************************************************************************************************/ +/***/ "./node_modules/d3-drag/src/constant.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-drag/src/constant.js ***! + \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tvisibility: visible;\r\n}\r\n.monaco-editor .suggest-widget.with-status-bar > .tree {\r\n\tmargin-bottom: 18px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\tmin-height: 18px;\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\r\n\twidth: 100%;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,mBAAmB;AACpB;AACA;CACC,mBAAmB;AACpB;;AAEA;CACC,gBAAgB;CAChB,YAAY;CACZ,cAAc;AACf;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,aAAa;CACb,mBAAmB;AACpB;;AAEA;;CAEC,aAAa;AACd;;AAEA;CACC,WAAW;AACZ","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tvisibility: visible;\r\n}\r\n.monaco-editor .suggest-widget.with-status-bar > .tree {\r\n\tmargin-bottom: 18px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\tmin-height: 18px;\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\r\n\twidth: 100%;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css": -/*!**************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css ***! - \**************************************************************************************************************************/ +/***/ "./node_modules/d3-drag/src/drag.js": +/*!******************************************!*\ + !*** ./node_modules/d3-drag/src/drag.js ***! + \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js"); +/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-drag/src/constant.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-drag/src/event.js"); -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;CACC,kBAAkB;CAClB,WAAW;AACZ;;;AAGA;CACC,uBAAuB;CACvB,0BAA0B;CAC1B,mBAAmB;CACnB,sBAAsB;CACtB,kBAAkB;AACnB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); -/***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css": -/*!***************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css ***! - \***************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,aAAa;CACb,sBAAsB;CACtB,gBAAgB;AACjB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].button; +} +function defaultContainer() { + return this.parentNode; +} -/***/ }), +function defaultSubject(d) { + return d == null ? {x: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].x, y: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].y} : d; +} -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css": -/*!*************************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***! - \*************************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function defaultTouchable() { + return navigator.maxTouchPoints || ("ontouchstart" in this); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony default export */ __webpack_exports__["default"] = (function() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + function drag(selection) { + selection + .on("mousedown.drag", mousedowned) + .filter(touchable) + .on("touchstart.drag", touchstarted) + .on("touchmove.drag", touchmoved) + .on("touchend.drag touchcancel.drag", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiM0MjQyNDIiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #F6F6F6;\r\n\tborder-radius: 4px;\r\n}\r\n\r\n.monaco-editor.vs-dark .iPadShowKeyboard {\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiNDNUM1QzUiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,SAAS;CACT,UAAU;CACV,kBAAkB;CAClB,YAAY;CACZ,gBAAgB;CAChB,ioDAAioD;CACjoD,yBAAyB;CACzB,kBAAkB;AACnB;;AAEA;CACC,ioDAAioD;CACjoD,yBAAyB;AAC1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiM0MjQyNDIiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #F6F6F6;\r\n\tborder-radius: 4px;\r\n}\r\n\r\n.monaco-editor.vs-dark .iPadShowKeyboard {\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiNDNUM1QzUiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), d3_selection__WEBPACK_IMPORTED_MODULE_1__["mouse"], this, arguments); + if (!gesture) return; + Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["default"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); + mousemoving = false; + mousedownx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX; + mousedowny = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY; + gesture("start"); + } + function mousemoved() { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); + if (!mousemoving) { + var dx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX - mousedownx, dy = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } -/***/ }), + function mouseupped() { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag mouseup.drag", null); + Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["yesdrag"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view, mousemoving); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); + gestures.mouse("end"); + } -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css": -/*!*******************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css ***! - \*******************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, + c = container.apply(this, arguments), + n = touches.length, i, gesture; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, d3_selection__WEBPACK_IMPORTED_MODULE_1__["touch"], this, arguments)) { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); + gesture("start"); + } + } + } + function touchmoved() { + var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, + n = touches.length, i, gesture; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,WAAW;CACX,iBAAiB;CACjB,yBAAyB;CACzB,qBAAqB;CACrB,aAAa;AACd;;AAEA;CACC,WAAW;CACX,SAAS;AACV;;AAEA;CACC,yCAAyC;AAC1C;;AAEA;CACC,mBAAmB;CACnB,cAAc;CACd,YAAY;AACb;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,yCAAyC;CACzC,iBAAiB;AAClB;;AAEA;CACC,yCAAyC;AAC1C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); + gesture("drag"); + } + } + } + function touchended() { + var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, + n = touches.length, i, gesture; -/***/ }), + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); + gesture("end"); + } + } + } -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css": -/*!***********************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css ***! - \***********************************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function beforestart(id, container, point, that, args) { + var p = point(container, id), s, dx, dy, + sublisteners = listeners.copy(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + if (!Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { + if ((d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + return function gesture(type) { + var p0 = p, n; + switch (type) { + case "start": gestures[id] = gesture, n = active++; break; + case "end": delete gestures[id], --active; // nobreak + case "drag": p = point(container, id), n = active; break; + } + Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,eAAe;AAChB;;AAEA;;CAEC,cAAc;AACf;;AAEA;;CAEC,cAAc;AACf;;AAEA;;CAEC,cAAc;AACf","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + drag.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : filter; + }; + drag.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : container; + }; -/***/ }), + drag.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : subject; + }; -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css": -/*!*********************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css ***! - \*********************************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + drag.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : touchable; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + drag.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? drag : value; + }; + drag.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); + }; -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"HelveticaNeue-Light\", system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif;\r\n\t--monaco-monospace-font: \"SF Mono\", Monaco, Menlo, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"DejaVu Sans Mono\", \"Courier New\", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;;AAG/F,oCAAoC;AACpC;CACC,6IAA6I;CAC7I,2IAA2I;AAC5I;;AAEA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,mBAAmB;AACpB;;AAEA;CACC,SAAS;AACV;;AAEA,0DAA0D;AAC1D;CACC,8BAA8B;AAC/B;AACA,8GAA8G;AAC9G;;CAEC,2BAA2B;CAC3B;;EAEC,mCAAmC;EACnC,cAAc;EACd,eAAe;CAChB;;CAEA,iBAAiB;CACjB;;EAEC,uCAAuC;CACxC;CACA,eAAe;CACf;;EAEC,mCAAmC;CACpC;;CAEA,6BAA6B;CAC7B;;EAEC,sCAAsC;CACvC;;CAEA,qDAAqD;CACrD;;EAEC,8BAA8B;CAC/B;;CAEA,eAAe;CACf;;EAEC,4BAA4B;CAC7B;CACA,wBAAwB;CACxB;;EAEC,+BAA+B;CAChC;;CAEA,sBAAsB;CACtB;;EAEC,8BAA8B;CAC/B;;CAEA,wBAAwB;CACxB;;;;;;;;EAQC,uCAAuC;EACvC,kCAAkC;EAClC,sBAAsB;CACvB;CACA;;EAEC,kCAAkC;EAClC,0CAA0C;EAC1C,sBAAsB;CACvB;CACA;;EAEC,mCAAmC;EACnC,kCAAkC;CACnC;;CAEA,gBAAgB;CAChB;;;;EAIC,0CAA0C;EAC1C,kCAAkC;EAClC,sBAAsB;CACvB;CACA;;EAEC,4BAA4B;CAC7B;;CAEA,kCAAkC;CAClC;;EAEC,8BAA8B;EAC9B,4BAA4B;CAC7B;CACA;;EAEC,+BAA+B;EAC/B,sCAAsC;CACvC;CACA;;EAEC,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;CACvB;;CAEA,eAAe;CACf;;EAEC,8BAA8B;EAC9B,iCAAiC;EACjC,4BAA4B;EAC5B,sBAAsB;CACvB;CACA;;EAEC,iCAAiC;CAClC;CACA;;EAEC,gCAAgC;CACjC;CACA;;EAEC,gCAAgC;CACjC;;CAEA,mBAAmB;CACnB;;EAEC,UAAU;CACX;;CAEA,YAAY;CACZ;;EAEC,aAAa;CACd;;CAEA,cAAc;CACd;;EAEC,kCAAkC;EAClC,iCAAiC;CAClC;CACA;;EAEC,iCAAiC;CAClC;CACA;;EAEC,iCAAiC;CAClC;CACA;;EAEC,iCAAiC;CAClC;;CAEA,gBAAgB;CAChB;;EAEC,8BAA8B;EAC9B,+BAA+B;EAC/B,sCAAsC;CACvC;CACA;;EAEC,8BAA8B;EAC9B,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;CACvB;;CAEA,gBAAgB;CAChB;;EAEC,aAAa;CACd;CACA;;;;EAIC,kCAAkC;EAClC,sCAAsC;EACtC,sBAAsB;CACvB;CACA;;;;EAIC,kCAAkC;CACnC;AACD;;AAEA;;;;;;;;;;EAUE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"HelveticaNeue-Light\", system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif;\r\n\t--monaco-monospace-font: \"SF Mono\", Monaco, Menlo, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"DejaVu Sans Mono\", \"Courier New\", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + return drag; +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css": -/*!*************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css ***! - \*************************************************************************************************************************************/ +/***/ "./node_modules/d3-drag/src/event.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-drag/src/event.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DragEvent; }); +function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; +} -var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n", "",{"version":3,"sources":["webpack://./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css"],"names":[],"mappings":"AAAA;;;+FAG+F;;AAE/F;CACC,gBAAgB;AACjB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; +}; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Card.svelte.css": -/*!******************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Card.svelte.css ***! - \******************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-drag/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-drag/src/index.js ***! + \*******************************************/ +/*! exports provided: drag, dragDisable, dragEnable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#card.svelte-m2i2uf{border:1px solid lightgray;margin-bottom:16px}#title.svelte-m2i2uf{font-family:'Playfair Display', serif;font-weight:400;border-bottom:1px solid lightgray;font-size:1.25rem;background-color:#1e60ab;color:#eaebef}#content.svelte-m2i2uf{padding-top:8px}.padding.svelte-m2i2uf{padding:8px}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZC5zdmVsdGUiLCJzb3VyY2VzIjpbIkNhcmQuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGV4cG9ydCBsZXQgdGl0bGUgPSAnJztcbiAgZXhwb3J0IGxldCBub1BhZGRpbmcgPSBmYWxzZTtcbiAgbGV0IGNvbnRlbnRDbGFzcyA9ICdwYWRkaW5nJztcbiAgaWYgKG5vUGFkZGluZykge1xuICAgIGNvbnRlbnRDbGFzcyA9ICcnO1xuICB9XG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjY2FyZCB7XG4gICAgYm9yZGVyOiAxcHggc29saWQgbGlnaHRncmF5O1xuICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XG4gIH1cbiAgI3RpdGxlIHtcbiAgICBmb250LWZhbWlseTogJ1BsYXlmYWlyIERpc3BsYXknLCBzZXJpZjtcbiAgICBmb250LXdlaWdodDogNDAwO1xuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gICAgZm9udC1zaXplOiAxLjI1cmVtO1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMxZTYwYWI7XG4gICAgY29sb3I6ICNlYWViZWY7XG4gIH1cbiAgI2NvbnRlbnQge1xuICAgIHBhZGRpbmctdG9wOiA4cHg7XG4gIH1cbiAgLnBhZGRpbmcge1xuICAgIHBhZGRpbmc6IDhweDtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImNhcmRcIj5cbiAgPGRpdiBpZD1cInRpdGxlXCIgY2xhc3M9XCJwYWRkaW5nXCI+e3RpdGxlfTwvZGl2PlxuICA8ZGl2IGlkPVwiY29udGVudFwiIGNsYXNzPXtjb250ZW50Q2xhc3N9PlxuICAgIDxzbG90IC8+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVUUsS0FBSyxjQUFDLENBQUMsQUFDTCxNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQzNCLGFBQWEsQ0FBRSxJQUFJLEFBQ3JCLENBQUMsQUFDRCxNQUFNLGNBQUMsQ0FBQyxBQUNOLFdBQVcsQ0FBRSxrQkFBa0IsQ0FBQyxDQUFDLEtBQUssQ0FDdEMsV0FBVyxDQUFFLEdBQUcsQ0FDaEIsYUFBYSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUNsQyxTQUFTLENBQUUsT0FBTyxDQUNsQixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLEFBQ2hCLENBQUMsQUFDRCxRQUFRLGNBQUMsQ0FBQyxBQUNSLFdBQVcsQ0FBRSxHQUFHLEFBQ2xCLENBQUMsQUFDRCxRQUFRLGNBQUMsQ0FBQyxBQUNSLE9BQU8sQ0FBRSxHQUFHLEFBQ2QsQ0FBQyJ9*/", "",{"version":3,"sources":["webpack://./src/components/Card.svelte","webpack://./src/components/Card.svelte.css"],"names":[],"mappings":"AAUE,oBAAO,0BACsB,CAC3B,kBAAmB,CACpB,qBACO,qCACgC,CACtC,eAAgB,CAChB,iCAAkC,CAClC,iBAAkB,CAClB,wBAAyB,CACzB,aAAc,CACf,uBACS,eACQ,CACjB,uBACS,WACI;ACzBhB,inDAAinD","sourcesContent":["\n\n\n\n
\n
{title}
\n
\n \n
\n
\n","#card.svelte-m2i2uf{border:1px solid lightgray;margin-bottom:16px}#title.svelte-m2i2uf{font-family:'Playfair Display', serif;font-weight:400;border-bottom:1px solid lightgray;font-size:1.25rem;background-color:#1e60ab;color:#eaebef}#content.svelte-m2i2uf{padding-top:8px}.padding.svelte-m2i2uf{padding:8px}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FyZC5zdmVsdGUiLCJzb3VyY2VzIjpbIkNhcmQuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGV4cG9ydCBsZXQgdGl0bGUgPSAnJztcbiAgZXhwb3J0IGxldCBub1BhZGRpbmcgPSBmYWxzZTtcbiAgbGV0IGNvbnRlbnRDbGFzcyA9ICdwYWRkaW5nJztcbiAgaWYgKG5vUGFkZGluZykge1xuICAgIGNvbnRlbnRDbGFzcyA9ICcnO1xuICB9XG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjY2FyZCB7XG4gICAgYm9yZGVyOiAxcHggc29saWQgbGlnaHRncmF5O1xuICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XG4gIH1cbiAgI3RpdGxlIHtcbiAgICBmb250LWZhbWlseTogJ1BsYXlmYWlyIERpc3BsYXknLCBzZXJpZjtcbiAgICBmb250LXdlaWdodDogNDAwO1xuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gICAgZm9udC1zaXplOiAxLjI1cmVtO1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMxZTYwYWI7XG4gICAgY29sb3I6ICNlYWViZWY7XG4gIH1cbiAgI2NvbnRlbnQge1xuICAgIHBhZGRpbmctdG9wOiA4cHg7XG4gIH1cbiAgLnBhZGRpbmcge1xuICAgIHBhZGRpbmc6IDhweDtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImNhcmRcIj5cbiAgPGRpdiBpZD1cInRpdGxlXCIgY2xhc3M9XCJwYWRkaW5nXCI+e3RpdGxlfTwvZGl2PlxuICA8ZGl2IGlkPVwiY29udGVudFwiIGNsYXNzPXtjb250ZW50Q2xhc3N9PlxuICAgIDxzbG90IC8+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVUUsS0FBSyxjQUFDLENBQUMsQUFDTCxNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQzNCLGFBQWEsQ0FBRSxJQUFJLEFBQ3JCLENBQUMsQUFDRCxNQUFNLGNBQUMsQ0FBQyxBQUNOLFdBQVcsQ0FBRSxrQkFBa0IsQ0FBQyxDQUFDLEtBQUssQ0FDdEMsV0FBVyxDQUFFLEdBQUcsQ0FDaEIsYUFBYSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUNsQyxTQUFTLENBQUUsT0FBTyxDQUNsQixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLEFBQ2hCLENBQUMsQUFDRCxRQUFRLGNBQUMsQ0FBQyxBQUNSLFdBQVcsQ0FBRSxHQUFHLEFBQ2xCLENBQUMsQUFDRCxRQUFRLGNBQUMsQ0FBQyxBQUNSLE9BQU8sQ0FBRSxHQUFHLEFBQ2QsQ0FBQyJ9*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - +/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ "./node_modules/d3-drag/src/drag.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/***/ }), +/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Config.svelte.css": -/*!********************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Config.svelte.css ***! - \********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["yesdrag"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#editor-conf.svelte-e1y9ss{width:100%;height:200px;max-height:300px;flex:1}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uZmlnLnN2ZWx0ZSIsInNvdXJjZXMiOlsiQ29uZmlnLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c2NyaXB0PlxuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvbmZpZyB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgeyBjb25maWdFcnJvclN0b3JlIH0gZnJvbSAnLi4vZXJyb3Itc3RvcmUuanMnO1xuICBpbXBvcnQgeyBvbk1vdW50IH0gZnJvbSAnc3ZlbHRlJztcbiAgaW1wb3J0IEVycm9yIGZyb20gJy4vRXJyb3Iuc3ZlbHRlJztcbiAgaW1wb3J0IHsgZ2V0UmVzaXplSGFuZGxlciwgaW5pdEVkaXRvciB9IGZyb20gJy4vZWRpdG9yLXV0aWxzJztcbiAgaW1wb3J0IHsgd2F0Y2hSZXNpemUgfSBmcm9tICdzdmVsdGUtd2F0Y2gtcmVzaXplJztcbiAgaW1wb3J0ICogYXMgbW9uYWNvIGZyb20gJ21vbmFjby1lZGl0b3IvZXNtL3ZzL2VkaXRvci9lZGl0b3IuYXBpLmpzJztcblxuICBsZXQgZWRpdDtcblxuICBsZXQgcmVzaXplSGFuZGxlciA9ICgpID0+IHt9O1xuXG4gIGNvbnN0IGhhbmRsZUNvbmZVcGRhdGUgPSAoY29uZiwgdXBkYXRlRWRpdG9yKSA9PiB7XG4gICAgY29uc29sZS5sb2coY29uZik7XG4gICAgaWYgKHVwZGF0ZUVkaXRvciAmJiBlZGl0KSB7XG4gICAgICBlZGl0LnNldFZhbHVlKEpTT04uc3RyaW5naWZ5KGNvbmYsIG51bGwsIDIpKTtcbiAgICB9XG4gICAgdXBkYXRlQ29uZmlnKGNvbmYsIGZhbHNlKTtcbiAgICBjb25maWdFcnJvclN0b3JlLnNldCh1bmRlZmluZWQpO1xuICB9O1xuICBcblxuICBjb25zdCB1bnN1YnNjcmliZSA9IGNvZGVTdG9yZS5zdWJzY3JpYmUoKHN0YXRlKSA9PiB7XG4gICAgY29uc29sZS5sb2coc3RhdGUubWVybWFpZCwgc3RhdGUudXBkYXRlRWRpdG9yKTtcbiAgICBpZiAoc3RhdGUudXBkYXRlRWRpdG9yKSB7XG4gICAgICBoYW5kbGVDb25mVXBkYXRlKHN0YXRlLm1lcm1haWQsIHRydWUpO1xuICAgIH1cbiAgfSk7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgY29uc29sZS5sb2coJ01vdW50aW5nIGNvbmZpZycpO1xuICAgIGNvbnN0IGVkaXRvckVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZWRpdG9yLWNvbmYnKTtcbiAgICBlZGl0ID0gbW9uYWNvLmVkaXRvci5jcmVhdGUoZWRpdG9yRWxlbSwge1xuICAgICAgdmFsdWU6ICcnLFxuICAgICAgdGhlbWU6ICdteUNvb2xUaGVtZScsXG4gICAgICBsYW5ndWFnZTogJ2pzb24nLFxuICAgIH0pO1xuICAgIHJlc2l6ZUhhbmRsZXIgPSBnZXRSZXNpemVIYW5kbGVyKGVkaXQpO1xuICAgIGVkaXQub25EaWRDaGFuZ2VNb2RlbENvbnRlbnQoZnVuY3Rpb24gKGUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IGNvbmYgPSBKU09OLnBhcnNlKGVkaXQuZ2V0VmFsdWUoKSk7XG4gICAgICAgIGhhbmRsZUNvbmZVcGRhdGUoY29uZiwgZmFsc2UpO1xuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdFcnJvciBpbiBwYXJzZWQnLCBlcnIpO1xuICAgICAgICBjb25maWdFcnJvclN0b3JlLnNldChlcnIpO1xuICAgICAgfVxuICAgIH0pO1xuXG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNlZGl0b3ItY29uZiB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAyMDBweDtcbiAgICBtYXgtaGVpZ2h0OiAzMDBweDtcbiAgICBmbGV4OiAxO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwiZWRpdG9yLWNvbnRhaW5lclwiPlxuICA8ZGl2IGlkPVwiZWRpdG9yLWNvbmZcIiB1c2U6d2F0Y2hSZXNpemU9e3Jlc2l6ZUhhbmRsZXJ9IC8+XG4gIDxFcnJvciBlcnJvclN0b3JlPXtjb25maWdFcnJvclN0b3JlfSAvPlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0RFLFlBQVksY0FBQyxDQUFDLEFBQ1osS0FBSyxDQUFFLElBQUksQ0FDWCxNQUFNLENBQUUsS0FBSyxDQUNiLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyJ9*/", "",{"version":3,"sources":["webpack://./src/components/Config.svelte","webpack://./src/components/Config.svelte.css"],"names":[],"mappings":"AAsDE,2BAAc,UACD,CACX,YAAa,CACb,gBAAiB,CACjB,MAAO;ACzDX,6rFAA6rF","sourcesContent":["\n\n\n\n
\n
\n \n
\n","#editor-conf.svelte-e1y9ss{width:100%;height:200px;max-height:300px;flex:1}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uZmlnLnN2ZWx0ZSIsInNvdXJjZXMiOlsiQ29uZmlnLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c2NyaXB0PlxuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvbmZpZyB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgeyBjb25maWdFcnJvclN0b3JlIH0gZnJvbSAnLi4vZXJyb3Itc3RvcmUuanMnO1xuICBpbXBvcnQgeyBvbk1vdW50IH0gZnJvbSAnc3ZlbHRlJztcbiAgaW1wb3J0IEVycm9yIGZyb20gJy4vRXJyb3Iuc3ZlbHRlJztcbiAgaW1wb3J0IHsgZ2V0UmVzaXplSGFuZGxlciwgaW5pdEVkaXRvciB9IGZyb20gJy4vZWRpdG9yLXV0aWxzJztcbiAgaW1wb3J0IHsgd2F0Y2hSZXNpemUgfSBmcm9tICdzdmVsdGUtd2F0Y2gtcmVzaXplJztcbiAgaW1wb3J0ICogYXMgbW9uYWNvIGZyb20gJ21vbmFjby1lZGl0b3IvZXNtL3ZzL2VkaXRvci9lZGl0b3IuYXBpLmpzJztcblxuICBsZXQgZWRpdDtcblxuICBsZXQgcmVzaXplSGFuZGxlciA9ICgpID0+IHt9O1xuXG4gIGNvbnN0IGhhbmRsZUNvbmZVcGRhdGUgPSAoY29uZiwgdXBkYXRlRWRpdG9yKSA9PiB7XG4gICAgY29uc29sZS5sb2coY29uZik7XG4gICAgaWYgKHVwZGF0ZUVkaXRvciAmJiBlZGl0KSB7XG4gICAgICBlZGl0LnNldFZhbHVlKEpTT04uc3RyaW5naWZ5KGNvbmYsIG51bGwsIDIpKTtcbiAgICB9XG4gICAgdXBkYXRlQ29uZmlnKGNvbmYsIGZhbHNlKTtcbiAgICBjb25maWdFcnJvclN0b3JlLnNldCh1bmRlZmluZWQpO1xuICB9O1xuICBcblxuICBjb25zdCB1bnN1YnNjcmliZSA9IGNvZGVTdG9yZS5zdWJzY3JpYmUoKHN0YXRlKSA9PiB7XG4gICAgY29uc29sZS5sb2coc3RhdGUubWVybWFpZCwgc3RhdGUudXBkYXRlRWRpdG9yKTtcbiAgICBpZiAoc3RhdGUudXBkYXRlRWRpdG9yKSB7XG4gICAgICBoYW5kbGVDb25mVXBkYXRlKHN0YXRlLm1lcm1haWQsIHRydWUpO1xuICAgIH1cbiAgfSk7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgY29uc29sZS5sb2coJ01vdW50aW5nIGNvbmZpZycpO1xuICAgIGNvbnN0IGVkaXRvckVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZWRpdG9yLWNvbmYnKTtcbiAgICBlZGl0ID0gbW9uYWNvLmVkaXRvci5jcmVhdGUoZWRpdG9yRWxlbSwge1xuICAgICAgdmFsdWU6ICcnLFxuICAgICAgdGhlbWU6ICdteUNvb2xUaGVtZScsXG4gICAgICBsYW5ndWFnZTogJ2pzb24nLFxuICAgIH0pO1xuICAgIHJlc2l6ZUhhbmRsZXIgPSBnZXRSZXNpemVIYW5kbGVyKGVkaXQpO1xuICAgIGVkaXQub25EaWRDaGFuZ2VNb2RlbENvbnRlbnQoZnVuY3Rpb24gKGUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IGNvbmYgPSBKU09OLnBhcnNlKGVkaXQuZ2V0VmFsdWUoKSk7XG4gICAgICAgIGhhbmRsZUNvbmZVcGRhdGUoY29uZiwgZmFsc2UpO1xuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIGNvbnNvbGUubG9nKCdFcnJvciBpbiBwYXJzZWQnLCBlcnIpO1xuICAgICAgICBjb25maWdFcnJvclN0b3JlLnNldChlcnIpO1xuICAgICAgfVxuICAgIH0pO1xuXG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNlZGl0b3ItY29uZiB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgaGVpZ2h0OiAyMDBweDtcbiAgICBtYXgtaGVpZ2h0OiAzMDBweDtcbiAgICBmbGV4OiAxO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwiZWRpdG9yLWNvbnRhaW5lclwiPlxuICA8ZGl2IGlkPVwiZWRpdG9yLWNvbmZcIiB1c2U6d2F0Y2hSZXNpemU9e3Jlc2l6ZUhhbmRsZXJ9IC8+XG4gIDxFcnJvciBlcnJvclN0b3JlPXtjb25maWdFcnJvclN0b3JlfSAvPlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0RFLFlBQVksY0FBQyxDQUFDLEFBQ1osS0FBSyxDQUFFLElBQUksQ0FDWCxNQUFNLENBQUUsS0FBSyxDQUNiLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyJ9*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Editor.svelte.css": -/*!********************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Editor.svelte.css ***! - \********************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-drag/src/nodrag.js": +/*!********************************************!*\ + !*** ./node_modules/d3-drag/src/nodrag.js ***! + \********************************************/ +/*! exports provided: default, yesdrag */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yesdrag", function() { return yesdrag; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js"); -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#editor.svelte-129q4vv{width:100%;height:400px;max-height:300px;flex:1}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWRpdG9yLnN2ZWx0ZSIsInNvdXJjZXMiOlsiRWRpdG9yLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c2NyaXB0PlxuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvZGUgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcbiAgaW1wb3J0IHsgY29kZUVycm9yU3RvcmUgfSBmcm9tICcuLi9lcnJvci1zdG9yZS5qcyc7XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgbWVybWFpZCBmcm9tICdAbWVybWFpZCc7XG4gIGltcG9ydCBFcnJvciBmcm9tICcuL0Vycm9yLnN2ZWx0ZSc7XG4gIGltcG9ydCB7IGdldFJlc2l6ZUhhbmRsZXIsIGluaXRFZGl0b3IgfSBmcm9tICcuL2VkaXRvci11dGlscyc7XG4gIGltcG9ydCAqIGFzIG1vbmFjbyBmcm9tICdtb25hY28tZWRpdG9yJztcbiAgaW1wb3J0IHsgd2F0Y2hSZXNpemUgfSBmcm9tICdzdmVsdGUtd2F0Y2gtcmVzaXplJztcblxuICBsZXQgZWRpdDtcblxuICBjb25zdCBkZWNBcnIgPSBbXTtcbiAgbGV0IGVkaXRvckVsZW0gPSBudWxsO1xuICBsZXQgcmVzaXplSGFuZGxlciA9ICgpID0+IHt9O1xuICBjb25zdCBoYW5kbGVDb2RlVXBkYXRlID0gKHVwZGF0ZWRDb2RlLCB1cGRhdGVFZGl0b3IpID0+IHtcbiAgICB0cnkge1xuICAgICAgbWVybWFpZC5wYXJzZSh1cGRhdGVkQ29kZSk7XG4gICAgICBpZiAoZWRpdCkge1xuICAgICAgICBpZiAodXBkYXRlRWRpdG9yKSB7XG4gICAgICAgICAgZWRpdC5zZXRWYWx1ZSh1cGRhdGVkQ29kZSk7XG4gICAgICAgIH1cbiAgICAgICAgZGVjQXJyLmZvckVhY2goKGRlY29yKSA9PiB7XG4gICAgICAgICAgZWRpdC5kZWx0YURlY29yYXRpb25zKGRlY29yLCBbXSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgdXBkYXRlQ29kZSh1cGRhdGVkQ29kZSwgZmFsc2UpO1xuICAgICAgY29kZUVycm9yU3RvcmUuc2V0KHVuZGVmaW5lZCk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgY29kZUVycm9yU3RvcmUuc2V0KCdTeW50YXggRXJyb3InKTtcbiAgICAgIGNvbnNvbGUubG9nKCdFcnJvciBpbiBwYXJzZWQnLCBlLmhhc2gpO1xuICAgICAgY29uc3QgbCA9IGUuaGFzaC5saW5lO1xuICAgICAgZGVjQXJyLnB1c2goXG4gICAgICAgIGVkaXQuZGVsdGFEZWNvcmF0aW9ucyhcbiAgICAgICAgICBbXSxcbiAgICAgICAgICBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHJhbmdlOiBuZXcgbW9uYWNvLlJhbmdlKFxuICAgICAgICAgICAgICAgIGUuaGFzaC5sb2MuZmlyc3RfbGluZSxcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmxhc3RfbGluZSxcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmZpcnN0X2NvbHVtbixcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmxhc3RfY29sdW1uXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIG9wdGlvbnM6IHsgaW5saW5lQ2xhc3NOYW1lOiAnbXlJbmxpbmVEZWNvcmF0aW9uJyB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdXG4gICAgICAgIClcbiAgICAgICk7XG4gICAgfVxuICB9O1xuXG4gIGNvbnN0IHVuc3Vic2NyaWJlID0gY29kZVN0b3JlLnN1YnNjcmliZSgoc3RhdGUpID0+IHtcbiAgICBpZiAoc3RhdGUudXBkYXRlRWRpdG9yKSB7XG4gICAgICBoYW5kbGVDb2RlVXBkYXRlKHN0YXRlLmNvZGUsIHRydWUpO1xuICAgIH1cbiAgfSk7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICAgIGVkaXRvckVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZWRpdG9yJyk7XG4gICAgZWRpdCA9IG1vbmFjby5lZGl0b3IuY3JlYXRlKGVkaXRvckVsZW0sIHtcbiAgICAgIHZhbHVlOiAnJyxcbiAgICAgIHRoZW1lOiAnbXlDb29sVGhlbWUnLFxuICAgICAgbGFuZ3VhZ2U6ICdtZXJtYWlkJyxcbiAgICB9KTtcbiAgICByZXNpemVIYW5kbGVyID0gZ2V0UmVzaXplSGFuZGxlcihlZGl0KTtcbiAgICBlZGl0Lm9uRGlkQ2hhbmdlTW9kZWxDb250ZW50KGZ1bmN0aW9uIChlKSB7XG4gICAgICBoYW5kbGVDb2RlVXBkYXRlKGVkaXQuZ2V0VmFsdWUoKSwgZmFsc2UpO1xuICAgIH0pO1xuXG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNlZGl0b3Ige1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogNDAwcHg7XG4gICAgbWF4LWhlaWdodDogMzAwcHg7XG4gICAgZmxleDogMTtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImVkaXRvci1jb250YWluZXJcIj5cbiAgPGRpdiBpZD1cImVkaXRvclwiIHVzZTp3YXRjaFJlc2l6ZT17cmVzaXplSGFuZGxlcn0gLz5cbiAgPEVycm9yIGVycm9yU3RvcmU9e2NvZGVFcnJvclN0b3JlfSAvPlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkVFLE9BQU8sZUFBQyxDQUFDLEFBQ1AsS0FBSyxDQUFFLElBQUksQ0FDWCxNQUFNLENBQUUsS0FBSyxDQUNiLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyJ9*/", "",{"version":3,"sources":["webpack://./src/components/Editor.svelte","webpack://./src/components/Editor.svelte.css"],"names":[],"mappings":"AA2EE,uBAAS,UACI,CACX,YAAa,CACb,gBAAiB,CACjB,MAAO;AC9EX,q2GAAq2G","sourcesContent":["\n\n\n\n
\n
\n \n
\n","#editor.svelte-129q4vv{width:100%;height:400px;max-height:300px;flex:1}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWRpdG9yLnN2ZWx0ZSIsInNvdXJjZXMiOlsiRWRpdG9yLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c2NyaXB0PlxuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvZGUgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcbiAgaW1wb3J0IHsgY29kZUVycm9yU3RvcmUgfSBmcm9tICcuLi9lcnJvci1zdG9yZS5qcyc7XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgbWVybWFpZCBmcm9tICdAbWVybWFpZCc7XG4gIGltcG9ydCBFcnJvciBmcm9tICcuL0Vycm9yLnN2ZWx0ZSc7XG4gIGltcG9ydCB7IGdldFJlc2l6ZUhhbmRsZXIsIGluaXRFZGl0b3IgfSBmcm9tICcuL2VkaXRvci11dGlscyc7XG4gIGltcG9ydCAqIGFzIG1vbmFjbyBmcm9tICdtb25hY28tZWRpdG9yJztcbiAgaW1wb3J0IHsgd2F0Y2hSZXNpemUgfSBmcm9tICdzdmVsdGUtd2F0Y2gtcmVzaXplJztcblxuICBsZXQgZWRpdDtcblxuICBjb25zdCBkZWNBcnIgPSBbXTtcbiAgbGV0IGVkaXRvckVsZW0gPSBudWxsO1xuICBsZXQgcmVzaXplSGFuZGxlciA9ICgpID0+IHt9O1xuICBjb25zdCBoYW5kbGVDb2RlVXBkYXRlID0gKHVwZGF0ZWRDb2RlLCB1cGRhdGVFZGl0b3IpID0+IHtcbiAgICB0cnkge1xuICAgICAgbWVybWFpZC5wYXJzZSh1cGRhdGVkQ29kZSk7XG4gICAgICBpZiAoZWRpdCkge1xuICAgICAgICBpZiAodXBkYXRlRWRpdG9yKSB7XG4gICAgICAgICAgZWRpdC5zZXRWYWx1ZSh1cGRhdGVkQ29kZSk7XG4gICAgICAgIH1cbiAgICAgICAgZGVjQXJyLmZvckVhY2goKGRlY29yKSA9PiB7XG4gICAgICAgICAgZWRpdC5kZWx0YURlY29yYXRpb25zKGRlY29yLCBbXSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgdXBkYXRlQ29kZSh1cGRhdGVkQ29kZSwgZmFsc2UpO1xuICAgICAgY29kZUVycm9yU3RvcmUuc2V0KHVuZGVmaW5lZCk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgY29kZUVycm9yU3RvcmUuc2V0KCdTeW50YXggRXJyb3InKTtcbiAgICAgIGNvbnNvbGUubG9nKCdFcnJvciBpbiBwYXJzZWQnLCBlLmhhc2gpO1xuICAgICAgY29uc3QgbCA9IGUuaGFzaC5saW5lO1xuICAgICAgZGVjQXJyLnB1c2goXG4gICAgICAgIGVkaXQuZGVsdGFEZWNvcmF0aW9ucyhcbiAgICAgICAgICBbXSxcbiAgICAgICAgICBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHJhbmdlOiBuZXcgbW9uYWNvLlJhbmdlKFxuICAgICAgICAgICAgICAgIGUuaGFzaC5sb2MuZmlyc3RfbGluZSxcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmxhc3RfbGluZSxcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmZpcnN0X2NvbHVtbixcbiAgICAgICAgICAgICAgICBlLmhhc2gubG9jLmxhc3RfY29sdW1uXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIG9wdGlvbnM6IHsgaW5saW5lQ2xhc3NOYW1lOiAnbXlJbmxpbmVEZWNvcmF0aW9uJyB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdXG4gICAgICAgIClcbiAgICAgICk7XG4gICAgfVxuICB9O1xuXG4gIGNvbnN0IHVuc3Vic2NyaWJlID0gY29kZVN0b3JlLnN1YnNjcmliZSgoc3RhdGUpID0+IHtcbiAgICBpZiAoc3RhdGUudXBkYXRlRWRpdG9yKSB7XG4gICAgICBoYW5kbGVDb2RlVXBkYXRlKHN0YXRlLmNvZGUsIHRydWUpO1xuICAgIH1cbiAgfSk7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICAgIGVkaXRvckVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnZWRpdG9yJyk7XG4gICAgZWRpdCA9IG1vbmFjby5lZGl0b3IuY3JlYXRlKGVkaXRvckVsZW0sIHtcbiAgICAgIHZhbHVlOiAnJyxcbiAgICAgIHRoZW1lOiAnbXlDb29sVGhlbWUnLFxuICAgICAgbGFuZ3VhZ2U6ICdtZXJtYWlkJyxcbiAgICB9KTtcbiAgICByZXNpemVIYW5kbGVyID0gZ2V0UmVzaXplSGFuZGxlcihlZGl0KTtcbiAgICBlZGl0Lm9uRGlkQ2hhbmdlTW9kZWxDb250ZW50KGZ1bmN0aW9uIChlKSB7XG4gICAgICBoYW5kbGVDb2RlVXBkYXRlKGVkaXQuZ2V0VmFsdWUoKSwgZmFsc2UpO1xuICAgIH0pO1xuXG4gICAgaW5pdEVkaXRvcihtb25hY28pO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNlZGl0b3Ige1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogNDAwcHg7XG4gICAgbWF4LWhlaWdodDogMzAwcHg7XG4gICAgZmxleDogMTtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImVkaXRvci1jb250YWluZXJcIj5cbiAgPGRpdiBpZD1cImVkaXRvclwiIHVzZTp3YXRjaFJlc2l6ZT17cmVzaXplSGFuZGxlcn0gLz5cbiAgPEVycm9yIGVycm9yU3RvcmU9e2NvZGVFcnJvclN0b3JlfSAvPlxuPC9kaXY+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkVFLE9BQU8sZUFBQyxDQUFDLEFBQ1AsS0FBSyxDQUFFLElBQUksQ0FDWCxNQUFNLENBQUUsS0FBSyxDQUNiLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyJ9*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + +/* harmony default export */ __webpack_exports__["default"] = (function(view) { + var root = view.document.documentElement, + selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } +}); + +function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); + setTimeout(function() { selection.on("click.drag", null); }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } +} /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Error.svelte.css": -/*!*******************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Error.svelte.css ***! - \*******************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-drag/src/noevent.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-drag/src/noevent.js ***! + \*********************************************/ +/*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#error.svelte-104hor5{background:darkred;color:white;flex:1;padding:10px}.invisible.svelte-104hor5{display:none}.visible.svelte-104hor5{display:block}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXJyb3Iuc3ZlbHRlIiwic291cmNlcyI6WyJFcnJvci5zdmVsdGUiXSwic291cmNlc0NvbnRlbnQiOlsiPHNjcmlwdD5cbiAgZXhwb3J0IGxldCBjbGFzc2VzID0gJyc7XG4gIGV4cG9ydCBsZXQgZXJyb3JTdG9yZTtcbiAgbGV0IGVycm9yO1xuICBlcnJvclN0b3JlLnN1YnNjcmliZSgoX2Vycm9yKSA9PiB7XG4gICAgaWYgKF9lcnJvcikge1xuICAgICAgZXJyb3IgPSBfZXJyb3IudG9TdHJpbmcoKTtcbiAgICB9IGVsc2Uge1xuICAgICAgZXJyb3IgPSBmYWxzZTtcbiAgICB9XG4gIH0pO1xuPC9zY3JpcHQ+XG5cbjxzdHlsZT5cbiAgI2Vycm9yIHtcbiAgICBiYWNrZ3JvdW5kOiBkYXJrcmVkO1xuICAgIGNvbG9yOiB3aGl0ZTtcbiAgICBmbGV4OiAxO1xuICAgIHBhZGRpbmc6IDEwcHg7XG4gIH1cbiAgLmludmlzaWJsZSB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAudmlzaWJsZSB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cbjwvc3R5bGU+XG5cbnsjaWYgZXJyb3J9XG4gIDxkaXYgaWQ9XCJlcnJvclwiIGNsYXNzPXtjbGFzc2VzfT57ZXJyb3J9PC9kaXY+XG57L2lmfVxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNFLE1BQU0sZUFBQyxDQUFDLEFBQ04sVUFBVSxDQUFFLE9BQU8sQ0FDbkIsS0FBSyxDQUFFLEtBQUssQ0FDWixJQUFJLENBQUUsQ0FBQyxDQUNQLE9BQU8sQ0FBRSxJQUFJLEFBQ2YsQ0FBQyxBQUNELFVBQVUsZUFBQyxDQUFDLEFBQ1YsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsUUFBUSxlQUFDLENBQUMsQUFDUixPQUFPLENBQUUsS0FBSyxBQUNoQixDQUFDIn0=*/", "",{"version":3,"sources":["webpack://./src/components/Error.svelte","webpack://./src/components/Error.svelte.css"],"names":[],"mappings":"AAcE,sBAAQ,kBACa,CACnB,WAAY,CACZ,MAAO,CACP,YAAa,CACd,0BACW,YACG,CACd,wBACS,aACM;ACvBlB,yoCAAyoC","sourcesContent":["\n\n\n\n{#if error}\n
{error}
\n{/if}\n","#error.svelte-104hor5{background:darkred;color:white;flex:1;padding:10px}.invisible.svelte-104hor5{display:none}.visible.svelte-104hor5{display:block}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXJyb3Iuc3ZlbHRlIiwic291cmNlcyI6WyJFcnJvci5zdmVsdGUiXSwic291cmNlc0NvbnRlbnQiOlsiPHNjcmlwdD5cbiAgZXhwb3J0IGxldCBjbGFzc2VzID0gJyc7XG4gIGV4cG9ydCBsZXQgZXJyb3JTdG9yZTtcbiAgbGV0IGVycm9yO1xuICBlcnJvclN0b3JlLnN1YnNjcmliZSgoX2Vycm9yKSA9PiB7XG4gICAgaWYgKF9lcnJvcikge1xuICAgICAgZXJyb3IgPSBfZXJyb3IudG9TdHJpbmcoKTtcbiAgICB9IGVsc2Uge1xuICAgICAgZXJyb3IgPSBmYWxzZTtcbiAgICB9XG4gIH0pO1xuPC9zY3JpcHQ+XG5cbjxzdHlsZT5cbiAgI2Vycm9yIHtcbiAgICBiYWNrZ3JvdW5kOiBkYXJrcmVkO1xuICAgIGNvbG9yOiB3aGl0ZTtcbiAgICBmbGV4OiAxO1xuICAgIHBhZGRpbmc6IDEwcHg7XG4gIH1cbiAgLmludmlzaWJsZSB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAudmlzaWJsZSB7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cbjwvc3R5bGU+XG5cbnsjaWYgZXJyb3J9XG4gIDxkaXYgaWQ9XCJlcnJvclwiIGNsYXNzPXtjbGFzc2VzfT57ZXJyb3J9PC9kaXY+XG57L2lmfVxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNFLE1BQU0sZUFBQyxDQUFDLEFBQ04sVUFBVSxDQUFFLE9BQU8sQ0FDbkIsS0FBSyxDQUFFLEtBQUssQ0FDWixJQUFJLENBQUUsQ0FBQyxDQUNQLE9BQU8sQ0FBRSxJQUFJLEFBQ2YsQ0FBQyxBQUNELFVBQVUsZUFBQyxDQUFDLEFBQ1YsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsUUFBUSxlQUFDLENBQUMsQUFDUixPQUFPLENBQUUsS0FBSyxBQUNoQixDQUFDIn0=*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function nopropagation() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); +}); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Links.svelte.css": -/*!*******************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Links.svelte.css ***! - \*******************************************************************************/ +/***/ "./node_modules/d3-dsv/src/autoType.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-dsv/src/autoType.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#links.svelte-187ys3m{margin-bottom:1rem;padding-bottom:0.5rem;border-bottom:1px solid lightgray}#markdown.svelte-187ys3m{padding:7px;font-family:monospace;font-size:14px;width:95%;margin:1rem 0;border:1px solid lightgray}label[for='markdown'].svelte-187ys3m{cursor:pointer;margin:0 auto}.button-style.svelte-187ys3m{background-color:#a2d9e2;color:#33a2c4;border-radius:0.25rem;padding:0.5rem;border:1px solid #a2d9e2;margin:0.25rem}.button-style.svelte-187ys3m:hover{background-color:#fff;color:#33a2c4;border:1px solid #33a2c4}.button-style.svelte-187ys3m:focus{outline:none}.link-style.svelte-187ys3m{text-decoration:none;color:#33a2c4}#copy-section.svelte-187ys3m{padding-top:1rem;text-align:center}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGlua3Muc3ZlbHRlIiwic291cmNlcyI6WyJMaW5rcy5zdmVsdGUiXSwic291cmNlc0NvbnRlbnQiOlsiPHNjcmlwdD5cbiAgaW1wb3J0IHsgQmFzZTY0IH0gZnJvbSAnanMtYmFzZTY0JztcbiAgaW1wb3J0IG1vbWVudCBmcm9tICdtb21lbnQnO1xuICBpbXBvcnQgeyBjb2RlU3RvcmUgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcblxuICBjb25zdCBnZXRCYXNlNjRTVkcgPSAoKSA9PiB7XG4gICAgY29uc3QgY29udGFpbmVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NvbnRhaW5lcicpO1xuICAgIGNvbnN0IHN2ZyA9IGNvbnRhaW5lci5pbm5lckhUTUwucmVwbGFjZUFsbCgnPGJyPicsICc8YnIvPicpO1xuICAgIHJldHVybiBCYXNlNjQuZW5jb2RlKHN2Zyk7XG4gIH07XG5cbiAgY29uc3QgZXhwb3J0SW1hZ2UgPSAoZXZlbnQsIGV4cG9ydGVyKSA9PiB7XG4gICAgY29uc3QgY2FudmFzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnY2FudmFzJyk7XG4gICAgY29uc3Qgc3ZnID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2NvbnRhaW5lciBzdmcnKTtcbiAgICBjb25zdCBib3ggPSBzdmcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgY2FudmFzLndpZHRoID0gYm94LndpZHRoO1xuICAgIGNhbnZhcy5oZWlnaHQgPSBib3guaGVpZ2h0O1xuICAgIGlmIChpbWFnZW1vZGVzZWxlY3RlZCA9PT0gJ3dpZHRoJykge1xuICAgICAgY29uc3QgcmF0aW8gPSBib3guaGVpZ2h0IC8gYm94LndpZHRoO1xuICAgICAgY2FudmFzLndpZHRoID0gdXNlcmltYWdld2lkdGg7XG4gICAgICBjYW52YXMuaGVpZ2h0ID0gdXNlcmltYWdld2lkdGggKiByYXRpbztcbiAgICB9IGVsc2UgaWYgKGltYWdlbW9kZXNlbGVjdGVkID09PSAnaGVpZ2h0Jykge1xuICAgICAgY29uc3QgcmF0aW8gPSBib3gud2lkdGggLyBib3guaGVpZ2h0O1xuICAgICAgY2FudmFzLndpZHRoID0gdXNlcmltYWdlaGVpZ2h0ICogcmF0aW87XG4gICAgICBjYW52YXMuaGVpZ2h0ID0gdXNlcmltYWdlaGVpZ2h0O1xuICAgIH1cbiAgICBjb25zdCBjb250ZXh0ID0gY2FudmFzLmdldENvbnRleHQoJzJkJyk7XG4gICAgY29udGV4dC5maWxsU3R5bGUgPSAnd2hpdGUnO1xuICAgIGNvbnRleHQuZmlsbFJlY3QoMCwgMCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0KTtcblxuICAgIGNvbnN0IGltYWdlID0gbmV3IEltYWdlKCk7XG4gICAgaW1hZ2Uub25sb2FkID0gZXhwb3J0ZXIoY2FudmFzLCBjb250ZXh0LCBpbWFnZSk7XG5cbiAgICBjb25zb2xlLmxvZygnU1ZHJywgZ2V0QmFzZTY0U1ZHKCkpO1xuICAgIGltYWdlLnNyYyA9IGBkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LCR7Z2V0QmFzZTY0U1ZHKCl9YDtcbiAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICB9O1xuXG4gIGNvbnN0IGRvd25sb2FkSW1hZ2UgPSAoY2FudmFzLCBjb250ZXh0LCBpbWFnZSkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBjb250ZXh0LmRyYXdJbWFnZShpbWFnZSwgMCwgMCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0KTtcblxuICAgICAgY29uc3QgYSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2EnKTtcbiAgICAgIGEuZG93bmxvYWQgPSBgbWVybWFpZC1kaWFncmFtLSR7bW9tZW50KCkuZm9ybWF0KCdZWVlZTU1EREhIbW1zcycpfS5wbmdgO1xuICAgICAgYS5ocmVmID0gY2FudmFzXG4gICAgICAgIC50b0RhdGFVUkwoJ2ltYWdlL3BuZycpXG4gICAgICAgIC5yZXBsYWNlKCdpbWFnZS9wbmcnLCAnaW1hZ2Uvb2N0ZXQtc3RyZWFtJyk7XG4gICAgICBhLmNsaWNrKCk7XG4gICAgfTtcbiAgfTtcblxuICBjb25zdCBpc0NsaXBib2FyZEF2YWlsYWJsZSA9ICgpID0+IHtcbiAgICByZXR1cm4gd2luZG93Lmhhc093blByb3BlcnR5KCdDbGlwYm9hcmRJdGVtJyk7XG4gIH07XG5cbiAgY29uc3QgY2xpcGJvYXJkQ29weSA9IChjYW52YXMsIGNvbnRleHQsIGltYWdlKSA9PiB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGNvbnRleHQuZHJhd0ltYWdlKGltYWdlLCAwLCAwLCBjYW52YXMud2lkdGgsIGNhbnZhcy5oZWlnaHQpO1xuXG4gICAgICBjYW52YXMudG9CbG9iKChibG9iKSA9PiB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZShbXG4gICAgICAgICAgICBuZXcgQ2xpcGJvYXJkSXRlbSh7XG4gICAgICAgICAgICAgIFtibG9iLnR5cGVdOiBibG9iLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH07XG5cbiAgY29uc3Qgb25Db3B5Q2xpcGJvYXJkID0gKGV2ZW50KSA9PiB7XG4gICAgZXhwb3J0SW1hZ2UoZXZlbnQsIGNsaXBib2FyZENvcHkpO1xuICB9O1xuXG4gIGNvbnN0IG9uRG93bmxvYWRQTkcgPSAoZXZlbnQpID0+IHtcbiAgICBleHBvcnRJbWFnZShldmVudCwgZG93bmxvYWRJbWFnZSk7XG4gIH07XG5cbiAgY29uc3Qgb25Eb3dubG9hZFNWRyA9IChldmVudCkgPT4ge1xuICAgIGNvbnNvbGUubG9nKCdldmVudCcsIGV2ZW50LnRhcmdldCk7XG4gICAgZXZlbnQudGFyZ2V0LmhyZWYgPSBgZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCwke2dldEJhc2U2NFNWRygpfWA7XG4gICAgZXZlbnQudGFyZ2V0LmRvd25sb2FkID0gYG1lcm1haWQtZGlhZ3JhbS0ke21vbWVudCgpLmZvcm1hdChcbiAgICAgICdZWVlZTU1EREhIbW1zcydcbiAgICApfS5zdmdgO1xuICAgIGNvbnNvbGUubG9nKCdldmVudCcsIGV2ZW50KTtcbiAgfTtcblxuICBjb25zdCBvbkNvcHlNYXJrZG93biA9IChldmVudCkgPT4ge1xuICAgIGV2ZW50LnRhcmdldC5zZWxlY3QoKTtcbiAgICBkb2N1bWVudC5leGVjQ29tbWFuZCgnQ29weScpO1xuICB9O1xuXG4gIGxldCB1cmw7XG4gIGxldCBiNjRDb2RlO1xuICBsZXQgaVVybDtcbiAgbGV0IHN2Z1VybDtcbiAgbGV0IG1kQ29kZTtcbiAgbGV0IGltYWdlbW9kZXNlbGVjdGVkID0gJ2F1dG8nO1xuICBsZXQgdXNlcmltYWdld2lkdGggPSAxOTIwO1xuICBsZXQgdXNlcmltYWdlaGVpZ2h0ID0gMTA4MDtcblxuICBjb25zdCB1bnN1YnNjcmliZSA9IGNvZGVTdG9yZS5zdWJzY3JpYmUoKHN0YXRlKSA9PiB7XG4gICAgYjY0Q29kZSA9IEJhc2U2NC5lbmNvZGVVUkkoSlNPTi5zdHJpbmdpZnkoc3RhdGUpKTtcbiAgICB1cmwgPSBgJHt3aW5kb3cubG9jYXRpb24ucGF0aG5hbWUuc3BsaXQoJyMnKVswXX0jL3ZpZXcvJHtiNjRDb2RlfWA7XG4gICAgaVVybCA9IGBodHRwczovL21lcm1haWQuaW5rL2ltZy8ke2I2NENvZGV9YDtcbiAgICBzdmdVcmwgPSBgaHR0cHM6Ly9tZXJtYWlkLmluay9zdmcvJHtiNjRDb2RlfWA7XG4gICAgbWRDb2RlID0gYFshW10oJHtpVXJsfSldKCR7d2luZG93LmxvY2F0aW9uLnByb3RvY29sfS8vJHt3aW5kb3cubG9jYXRpb24uaG9zdH0ke3dpbmRvdy5sb2NhdGlvbi5wYXRobmFtZX0jL2VkaXQvJHtiNjRDb2RlfSlgO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNsaW5rcyB7XG4gICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbiAgICBwYWRkaW5nLWJvdHRvbTogMC41cmVtO1xuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gIH1cbiAgI21hcmtkb3duIHtcbiAgICBwYWRkaW5nOiA3cHg7XG4gICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICBmb250LXNpemU6IDE0cHg7XG4gICAgd2lkdGg6IDk1JTtcbiAgICBtYXJnaW46IDFyZW0gMDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gIH1cbiAgbGFiZWxbZm9yPSdtYXJrZG93biddIHtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgbWFyZ2luOiAwIGF1dG87XG4gIH1cbiAgLypcbiAgICBAbWVkaWEgKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKSB7XG4gICAgICAgIGxhYmVsW2Zvcj1cIm1hcmtkb3duXCJdIHtcbiAgICAgICAgICAgIGNvbG9yOiAjZDhkOGQ4O1xuICAgICAgICB9XG4gICAgfSAqL1xuICAuYnV0dG9uLXN0eWxlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYTJkOWUyO1xuICAgIGNvbG9yOiAjMzNhMmM0O1xuICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgcGFkZGluZzogMC41cmVtO1xuICAgIGJvcmRlcjogMXB4IHNvbGlkICNhMmQ5ZTI7XG4gICAgbWFyZ2luOiAwLjI1cmVtO1xuICB9XG4gIC5idXR0b24tc3R5bGU6aG92ZXIge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gICAgYm9yZGVyOiAxcHggc29saWQgIzMzYTJjNDtcbiAgfVxuICAuYnV0dG9uLXN0eWxlOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG4gIC5saW5rLXN0eWxlIHtcbiAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gIH1cbiAgI2NvcHktc2VjdGlvbiB7XG4gICAgcGFkZGluZy10b3A6IDFyZW07XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwibGlua3NcIj5cbiAgeyNpZiBpc0NsaXBib2FyZEF2YWlsYWJsZSgpfVxuICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgIDxhIGNsYXNzPVwibGluay1zdHlsZVwiIGhyZWY9e3VybH0gZG93bmxvYWQ9XCJcIiBvbjpjbGljaz17b25Db3B5Q2xpcGJvYXJkfT5cbiAgICAgICAgQ29weSBJbWFnZVxuICAgICAgPC9hPlxuICAgIDwvYnV0dG9uPlxuICB7L2lmfVxuICA8YnV0dG9uIGNsYXNzPVwiYnV0dG9uLXN0eWxlXCI+XG4gICAgPGEgY2xhc3M9XCJsaW5rLXN0eWxlXCIgaHJlZj17dXJsfSBkb3dubG9hZD1cIlwiIG9uOmNsaWNrPXtvbkRvd25sb2FkUE5HfT5cbiAgICAgIERvd25sb2FkIFBOR1xuICAgIDwvYT5cbiAgPC9idXR0b24+XG4gIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICA8YSBjbGFzcz1cImxpbmstc3R5bGVcIiBocmVmPXt1cmx9PkxpbmsgdG8gdmlldzwvYT5cbiAgPC9idXR0b24+XG4gIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICA8YSBjbGFzcz1cImxpbmstc3R5bGVcIiBocmVmPXt1cmx9IGRvd25sb2FkPVwiXCIgb246Y2xpY2s9e29uRG93bmxvYWRTVkd9PlxuICAgICAgRG93bmxvYWQgU1ZHXG4gICAgPC9hPlxuICA8L2J1dHRvbj5cbiAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgIDxhIGNsYXNzPVwibGluay1zdHlsZVwiIGhyZWY9e2lVcmx9PkxpbmsgdG8gSW1hZ2U8L2E+XG4gIDwvYnV0dG9uPlxuICA8YnV0dG9uIGNsYXNzPVwiYnV0dG9uLXN0eWxlXCI+XG4gICAgPGEgY2xhc3M9XCJsaW5rLXN0eWxlXCIgaHJlZj17c3ZnVXJsfT5MaW5rIHRvIFNWRzwvYT5cbiAgPC9idXR0b24+XG4gIChtYXJrZG93biBpcyBiYXNlNjQgZW5jb2RlZCBmb3IgdGhlc2UgdXJscylcbjwvZGl2PlxuPGRpdiBpZD1cImNvcHktc2VjdGlvblwiPlxuICA8bGFiZWwgZm9yPVwibWFya2Rvd25cIiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPkNvcHkgTWFya2Rvd248L2xhYmVsPlxuICA8YnIgLz5cbiAgPGlucHV0IGlkPVwibWFya2Rvd25cIiB0eXBlPVwidGV4dFwiIHZhbHVlPXttZENvZGV9IG9uOmNsaWNrPXtvbkNvcHlNYXJrZG93bn0gLz5cbjwvZGl2PlxuPHA+XG4gIDxsYWJlbD5QTkcgc2l6ZTo8L2xhYmVsPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwiYXV0b1wiXG4gICAgaWQ9XCJhdXRvc2l6ZVwiXG4gICAgYmluZDpncm91cD17aW1hZ2Vtb2Rlc2VsZWN0ZWR9IC8+XG4gIDxsYWJlbCBmb3I9XCJhdXRvc2l6ZVwiPmF1dG88L2xhYmVsPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwid2lkdGhcIlxuICAgIGlkPVwid2lkdGgtYWN0aXZlXCJcbiAgICBiaW5kOmdyb3VwPXtpbWFnZW1vZGVzZWxlY3RlZH0gLz5cbiAgPGxhYmVsIGZvcj1cIndpZHRoXCI+d2lkdGg8L2xhYmVsPlxuICA8aW5wdXRcbiAgICBpZD1cIndpZHRoXCJcbiAgICB0eXBlPVwibnVtYmVyXCJcbiAgICBtaW49XCIzXCJcbiAgICBtYXg9XCIxMDAwMFwiXG4gICAgYmluZDp2YWx1ZT17dXNlcmltYWdld2lkdGh9XG4gICAgZGlzYWJsZWQ9e2ltYWdlbW9kZXNlbGVjdGVkICE9PSAnd2lkdGgnfSAvPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwiaGVpZ2h0XCJcbiAgICBpZD1cImhlaWdodC1hY3RpdmVcIlxuICAgIGJpbmQ6Z3JvdXA9e2ltYWdlbW9kZXNlbGVjdGVkfSAvPlxuICA8bGFiZWwgZm9yPVwiaGVpZ2h0XCI+aGVpZ2h0PC9sYWJlbD5cbiAgPGlucHV0XG4gICAgaWQ9XCJoZWlnaHRcIlxuICAgIHR5cGU9XCJudW1iZXJcIlxuICAgIG1pbj1cIjNcIlxuICAgIG1heD1cIjEwMDAwXCJcbiAgICBiaW5kOnZhbHVlPXt1c2VyaW1hZ2VoZWlnaHR9XG4gICAgZGlzYWJsZWQ9e2ltYWdlbW9kZXNlbGVjdGVkICE9PSAnaGVpZ2h0J30gLz48YnIgLz5cbjwvcD5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSEUsTUFBTSxlQUFDLENBQUMsQUFDTixhQUFhLENBQUUsSUFBSSxDQUNuQixjQUFjLENBQUUsTUFBTSxDQUN0QixhQUFhLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLEFBQ3BDLENBQUMsQUFDRCxTQUFTLGVBQUMsQ0FBQyxBQUNULE9BQU8sQ0FBRSxHQUFHLENBQ1osV0FBVyxDQUFFLFNBQVMsQ0FDdEIsU0FBUyxDQUFFLElBQUksQ0FDZixLQUFLLENBQUUsR0FBRyxDQUNWLE1BQU0sQ0FBRSxJQUFJLENBQUMsQ0FBQyxDQUNkLE1BQU0sQ0FBRSxHQUFHLENBQUMsS0FBSyxDQUFDLFNBQVMsQUFDN0IsQ0FBQyxBQUNELEtBQUssQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDLGVBQUMsQ0FBQyxBQUNyQixNQUFNLENBQUUsT0FBTyxDQUNmLE1BQU0sQ0FBRSxDQUFDLENBQUMsSUFBSSxBQUNoQixDQUFDLEFBT0QsYUFBYSxlQUFDLENBQUMsQUFDYixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLENBQ2QsYUFBYSxDQUFFLE9BQU8sQ0FDdEIsT0FBTyxDQUFFLE1BQU0sQ0FDZixNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLE1BQU0sQ0FBRSxPQUFPLEFBQ2pCLENBQUMsQUFDRCw0QkFBYSxNQUFNLEFBQUMsQ0FBQyxBQUNuQixnQkFBZ0IsQ0FBRSxJQUFJLENBQ3RCLEtBQUssQ0FBRSxPQUFPLENBQ2QsTUFBTSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsT0FBTyxBQUMzQixDQUFDLEFBQ0QsNEJBQWEsTUFBTSxBQUFDLENBQUMsQUFDbkIsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsV0FBVyxlQUFDLENBQUMsQUFDWCxlQUFlLENBQUUsSUFBSSxDQUNyQixLQUFLLENBQUUsT0FBTyxBQUNoQixDQUFDLEFBQ0QsYUFBYSxlQUFDLENBQUMsQUFDYixXQUFXLENBQUUsSUFBSSxDQUNqQixVQUFVLENBQUUsTUFBTSxBQUNwQixDQUFDIn0=*/", "",{"version":3,"sources":["webpack://./src/components/Links.svelte","webpack://./src/components/Links.svelte.css"],"names":[],"mappings":"AAmHE,sBAAQ,kBACa,CACnB,qBAAsB,CACtB,iCAAkC,CACnC,yBACU,WACG,CACZ,qBAAsB,CACtB,cAAe,CACf,SAAU,CACV,aAAc,CACd,0BAA2B,CAC5B,qCACsB,cACN,CACf,aAAc,CACf,6BAOc,wBACY,CACzB,aAAc,CACd,qBAAsB,CACtB,cAAe,CACf,wBAAyB,CACzB,cAAe,CAChB,mCACoB,qBACG,CACtB,aAAc,CACd,wBAAyB,CAC1B,mCACoB,YACN,CACd,2BACY,oBACU,CACrB,aAAc,CACf,6BACc,gBACI,CACjB,iBAAkB;AC/JtB,yyTAAyyT","sourcesContent":["\n\n\n\n
\n {#if isClipboardAvailable()}\n \n {/if}\n \n \n \n \n \n (markdown is base64 encoded for these urls)\n
\n
\n \n
\n \n
\n

\n
\n \n
\n \n \n
\n \n \n
\n

\n","#links.svelte-187ys3m{margin-bottom:1rem;padding-bottom:0.5rem;border-bottom:1px solid lightgray}#markdown.svelte-187ys3m{padding:7px;font-family:monospace;font-size:14px;width:95%;margin:1rem 0;border:1px solid lightgray}label[for='markdown'].svelte-187ys3m{cursor:pointer;margin:0 auto}.button-style.svelte-187ys3m{background-color:#a2d9e2;color:#33a2c4;border-radius:0.25rem;padding:0.5rem;border:1px solid #a2d9e2;margin:0.25rem}.button-style.svelte-187ys3m:hover{background-color:#fff;color:#33a2c4;border:1px solid #33a2c4}.button-style.svelte-187ys3m:focus{outline:none}.link-style.svelte-187ys3m{text-decoration:none;color:#33a2c4}#copy-section.svelte-187ys3m{padding-top:1rem;text-align:center}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGlua3Muc3ZlbHRlIiwic291cmNlcyI6WyJMaW5rcy5zdmVsdGUiXSwic291cmNlc0NvbnRlbnQiOlsiPHNjcmlwdD5cbiAgaW1wb3J0IHsgQmFzZTY0IH0gZnJvbSAnanMtYmFzZTY0JztcbiAgaW1wb3J0IG1vbWVudCBmcm9tICdtb21lbnQnO1xuICBpbXBvcnQgeyBjb2RlU3RvcmUgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcblxuICBjb25zdCBnZXRCYXNlNjRTVkcgPSAoKSA9PiB7XG4gICAgY29uc3QgY29udGFpbmVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NvbnRhaW5lcicpO1xuICAgIGNvbnN0IHN2ZyA9IGNvbnRhaW5lci5pbm5lckhUTUwucmVwbGFjZUFsbCgnPGJyPicsICc8YnIvPicpO1xuICAgIHJldHVybiBCYXNlNjQuZW5jb2RlKHN2Zyk7XG4gIH07XG5cbiAgY29uc3QgZXhwb3J0SW1hZ2UgPSAoZXZlbnQsIGV4cG9ydGVyKSA9PiB7XG4gICAgY29uc3QgY2FudmFzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnY2FudmFzJyk7XG4gICAgY29uc3Qgc3ZnID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2NvbnRhaW5lciBzdmcnKTtcbiAgICBjb25zdCBib3ggPSBzdmcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgY2FudmFzLndpZHRoID0gYm94LndpZHRoO1xuICAgIGNhbnZhcy5oZWlnaHQgPSBib3guaGVpZ2h0O1xuICAgIGlmIChpbWFnZW1vZGVzZWxlY3RlZCA9PT0gJ3dpZHRoJykge1xuICAgICAgY29uc3QgcmF0aW8gPSBib3guaGVpZ2h0IC8gYm94LndpZHRoO1xuICAgICAgY2FudmFzLndpZHRoID0gdXNlcmltYWdld2lkdGg7XG4gICAgICBjYW52YXMuaGVpZ2h0ID0gdXNlcmltYWdld2lkdGggKiByYXRpbztcbiAgICB9IGVsc2UgaWYgKGltYWdlbW9kZXNlbGVjdGVkID09PSAnaGVpZ2h0Jykge1xuICAgICAgY29uc3QgcmF0aW8gPSBib3gud2lkdGggLyBib3guaGVpZ2h0O1xuICAgICAgY2FudmFzLndpZHRoID0gdXNlcmltYWdlaGVpZ2h0ICogcmF0aW87XG4gICAgICBjYW52YXMuaGVpZ2h0ID0gdXNlcmltYWdlaGVpZ2h0O1xuICAgIH1cbiAgICBjb25zdCBjb250ZXh0ID0gY2FudmFzLmdldENvbnRleHQoJzJkJyk7XG4gICAgY29udGV4dC5maWxsU3R5bGUgPSAnd2hpdGUnO1xuICAgIGNvbnRleHQuZmlsbFJlY3QoMCwgMCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0KTtcblxuICAgIGNvbnN0IGltYWdlID0gbmV3IEltYWdlKCk7XG4gICAgaW1hZ2Uub25sb2FkID0gZXhwb3J0ZXIoY2FudmFzLCBjb250ZXh0LCBpbWFnZSk7XG5cbiAgICBjb25zb2xlLmxvZygnU1ZHJywgZ2V0QmFzZTY0U1ZHKCkpO1xuICAgIGltYWdlLnNyYyA9IGBkYXRhOmltYWdlL3N2Zyt4bWw7YmFzZTY0LCR7Z2V0QmFzZTY0U1ZHKCl9YDtcbiAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICB9O1xuXG4gIGNvbnN0IGRvd25sb2FkSW1hZ2UgPSAoY2FudmFzLCBjb250ZXh0LCBpbWFnZSkgPT4ge1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICBjb250ZXh0LmRyYXdJbWFnZShpbWFnZSwgMCwgMCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0KTtcblxuICAgICAgY29uc3QgYSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2EnKTtcbiAgICAgIGEuZG93bmxvYWQgPSBgbWVybWFpZC1kaWFncmFtLSR7bW9tZW50KCkuZm9ybWF0KCdZWVlZTU1EREhIbW1zcycpfS5wbmdgO1xuICAgICAgYS5ocmVmID0gY2FudmFzXG4gICAgICAgIC50b0RhdGFVUkwoJ2ltYWdlL3BuZycpXG4gICAgICAgIC5yZXBsYWNlKCdpbWFnZS9wbmcnLCAnaW1hZ2Uvb2N0ZXQtc3RyZWFtJyk7XG4gICAgICBhLmNsaWNrKCk7XG4gICAgfTtcbiAgfTtcblxuICBjb25zdCBpc0NsaXBib2FyZEF2YWlsYWJsZSA9ICgpID0+IHtcbiAgICByZXR1cm4gd2luZG93Lmhhc093blByb3BlcnR5KCdDbGlwYm9hcmRJdGVtJyk7XG4gIH07XG5cbiAgY29uc3QgY2xpcGJvYXJkQ29weSA9IChjYW52YXMsIGNvbnRleHQsIGltYWdlKSA9PiB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIGNvbnRleHQuZHJhd0ltYWdlKGltYWdlLCAwLCAwLCBjYW52YXMud2lkdGgsIGNhbnZhcy5oZWlnaHQpO1xuXG4gICAgICBjYW52YXMudG9CbG9iKChibG9iKSA9PiB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZShbXG4gICAgICAgICAgICBuZXcgQ2xpcGJvYXJkSXRlbSh7XG4gICAgICAgICAgICAgIFtibG9iLnR5cGVdOiBibG9iLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH07XG5cbiAgY29uc3Qgb25Db3B5Q2xpcGJvYXJkID0gKGV2ZW50KSA9PiB7XG4gICAgZXhwb3J0SW1hZ2UoZXZlbnQsIGNsaXBib2FyZENvcHkpO1xuICB9O1xuXG4gIGNvbnN0IG9uRG93bmxvYWRQTkcgPSAoZXZlbnQpID0+IHtcbiAgICBleHBvcnRJbWFnZShldmVudCwgZG93bmxvYWRJbWFnZSk7XG4gIH07XG5cbiAgY29uc3Qgb25Eb3dubG9hZFNWRyA9IChldmVudCkgPT4ge1xuICAgIGNvbnNvbGUubG9nKCdldmVudCcsIGV2ZW50LnRhcmdldCk7XG4gICAgZXZlbnQudGFyZ2V0LmhyZWYgPSBgZGF0YTppbWFnZS9zdmcreG1sO2Jhc2U2NCwke2dldEJhc2U2NFNWRygpfWA7XG4gICAgZXZlbnQudGFyZ2V0LmRvd25sb2FkID0gYG1lcm1haWQtZGlhZ3JhbS0ke21vbWVudCgpLmZvcm1hdChcbiAgICAgICdZWVlZTU1EREhIbW1zcydcbiAgICApfS5zdmdgO1xuICAgIGNvbnNvbGUubG9nKCdldmVudCcsIGV2ZW50KTtcbiAgfTtcblxuICBjb25zdCBvbkNvcHlNYXJrZG93biA9IChldmVudCkgPT4ge1xuICAgIGV2ZW50LnRhcmdldC5zZWxlY3QoKTtcbiAgICBkb2N1bWVudC5leGVjQ29tbWFuZCgnQ29weScpO1xuICB9O1xuXG4gIGxldCB1cmw7XG4gIGxldCBiNjRDb2RlO1xuICBsZXQgaVVybDtcbiAgbGV0IHN2Z1VybDtcbiAgbGV0IG1kQ29kZTtcbiAgbGV0IGltYWdlbW9kZXNlbGVjdGVkID0gJ2F1dG8nO1xuICBsZXQgdXNlcmltYWdld2lkdGggPSAxOTIwO1xuICBsZXQgdXNlcmltYWdlaGVpZ2h0ID0gMTA4MDtcblxuICBjb25zdCB1bnN1YnNjcmliZSA9IGNvZGVTdG9yZS5zdWJzY3JpYmUoKHN0YXRlKSA9PiB7XG4gICAgYjY0Q29kZSA9IEJhc2U2NC5lbmNvZGVVUkkoSlNPTi5zdHJpbmdpZnkoc3RhdGUpKTtcbiAgICB1cmwgPSBgJHt3aW5kb3cubG9jYXRpb24ucGF0aG5hbWUuc3BsaXQoJyMnKVswXX0jL3ZpZXcvJHtiNjRDb2RlfWA7XG4gICAgaVVybCA9IGBodHRwczovL21lcm1haWQuaW5rL2ltZy8ke2I2NENvZGV9YDtcbiAgICBzdmdVcmwgPSBgaHR0cHM6Ly9tZXJtYWlkLmluay9zdmcvJHtiNjRDb2RlfWA7XG4gICAgbWRDb2RlID0gYFshW10oJHtpVXJsfSldKCR7d2luZG93LmxvY2F0aW9uLnByb3RvY29sfS8vJHt3aW5kb3cubG9jYXRpb24uaG9zdH0ke3dpbmRvdy5sb2NhdGlvbi5wYXRobmFtZX0jL2VkaXQvJHtiNjRDb2RlfSlgO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICNsaW5rcyB7XG4gICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbiAgICBwYWRkaW5nLWJvdHRvbTogMC41cmVtO1xuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gIH1cbiAgI21hcmtkb3duIHtcbiAgICBwYWRkaW5nOiA3cHg7XG4gICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICBmb250LXNpemU6IDE0cHg7XG4gICAgd2lkdGg6IDk1JTtcbiAgICBtYXJnaW46IDFyZW0gMDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCBsaWdodGdyYXk7XG4gIH1cbiAgbGFiZWxbZm9yPSdtYXJrZG93biddIHtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgbWFyZ2luOiAwIGF1dG87XG4gIH1cbiAgLypcbiAgICBAbWVkaWEgKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKSB7XG4gICAgICAgIGxhYmVsW2Zvcj1cIm1hcmtkb3duXCJdIHtcbiAgICAgICAgICAgIGNvbG9yOiAjZDhkOGQ4O1xuICAgICAgICB9XG4gICAgfSAqL1xuICAuYnV0dG9uLXN0eWxlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjYTJkOWUyO1xuICAgIGNvbG9yOiAjMzNhMmM0O1xuICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgcGFkZGluZzogMC41cmVtO1xuICAgIGJvcmRlcjogMXB4IHNvbGlkICNhMmQ5ZTI7XG4gICAgbWFyZ2luOiAwLjI1cmVtO1xuICB9XG4gIC5idXR0b24tc3R5bGU6aG92ZXIge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gICAgYm9yZGVyOiAxcHggc29saWQgIzMzYTJjNDtcbiAgfVxuICAuYnV0dG9uLXN0eWxlOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG4gIC5saW5rLXN0eWxlIHtcbiAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gIH1cbiAgI2NvcHktc2VjdGlvbiB7XG4gICAgcGFkZGluZy10b3A6IDFyZW07XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwibGlua3NcIj5cbiAgeyNpZiBpc0NsaXBib2FyZEF2YWlsYWJsZSgpfVxuICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgIDxhIGNsYXNzPVwibGluay1zdHlsZVwiIGhyZWY9e3VybH0gZG93bmxvYWQ9XCJcIiBvbjpjbGljaz17b25Db3B5Q2xpcGJvYXJkfT5cbiAgICAgICAgQ29weSBJbWFnZVxuICAgICAgPC9hPlxuICAgIDwvYnV0dG9uPlxuICB7L2lmfVxuICA8YnV0dG9uIGNsYXNzPVwiYnV0dG9uLXN0eWxlXCI+XG4gICAgPGEgY2xhc3M9XCJsaW5rLXN0eWxlXCIgaHJlZj17dXJsfSBkb3dubG9hZD1cIlwiIG9uOmNsaWNrPXtvbkRvd25sb2FkUE5HfT5cbiAgICAgIERvd25sb2FkIFBOR1xuICAgIDwvYT5cbiAgPC9idXR0b24+XG4gIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICA8YSBjbGFzcz1cImxpbmstc3R5bGVcIiBocmVmPXt1cmx9PkxpbmsgdG8gdmlldzwvYT5cbiAgPC9idXR0b24+XG4gIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICA8YSBjbGFzcz1cImxpbmstc3R5bGVcIiBocmVmPXt1cmx9IGRvd25sb2FkPVwiXCIgb246Y2xpY2s9e29uRG93bmxvYWRTVkd9PlxuICAgICAgRG93bmxvYWQgU1ZHXG4gICAgPC9hPlxuICA8L2J1dHRvbj5cbiAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgIDxhIGNsYXNzPVwibGluay1zdHlsZVwiIGhyZWY9e2lVcmx9PkxpbmsgdG8gSW1hZ2U8L2E+XG4gIDwvYnV0dG9uPlxuICA8YnV0dG9uIGNsYXNzPVwiYnV0dG9uLXN0eWxlXCI+XG4gICAgPGEgY2xhc3M9XCJsaW5rLXN0eWxlXCIgaHJlZj17c3ZnVXJsfT5MaW5rIHRvIFNWRzwvYT5cbiAgPC9idXR0b24+XG4gIChtYXJrZG93biBpcyBiYXNlNjQgZW5jb2RlZCBmb3IgdGhlc2UgdXJscylcbjwvZGl2PlxuPGRpdiBpZD1cImNvcHktc2VjdGlvblwiPlxuICA8bGFiZWwgZm9yPVwibWFya2Rvd25cIiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPkNvcHkgTWFya2Rvd248L2xhYmVsPlxuICA8YnIgLz5cbiAgPGlucHV0IGlkPVwibWFya2Rvd25cIiB0eXBlPVwidGV4dFwiIHZhbHVlPXttZENvZGV9IG9uOmNsaWNrPXtvbkNvcHlNYXJrZG93bn0gLz5cbjwvZGl2PlxuPHA+XG4gIDxsYWJlbD5QTkcgc2l6ZTo8L2xhYmVsPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwiYXV0b1wiXG4gICAgaWQ9XCJhdXRvc2l6ZVwiXG4gICAgYmluZDpncm91cD17aW1hZ2Vtb2Rlc2VsZWN0ZWR9IC8+XG4gIDxsYWJlbCBmb3I9XCJhdXRvc2l6ZVwiPmF1dG88L2xhYmVsPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwid2lkdGhcIlxuICAgIGlkPVwid2lkdGgtYWN0aXZlXCJcbiAgICBiaW5kOmdyb3VwPXtpbWFnZW1vZGVzZWxlY3RlZH0gLz5cbiAgPGxhYmVsIGZvcj1cIndpZHRoXCI+d2lkdGg8L2xhYmVsPlxuICA8aW5wdXRcbiAgICBpZD1cIndpZHRoXCJcbiAgICB0eXBlPVwibnVtYmVyXCJcbiAgICBtaW49XCIzXCJcbiAgICBtYXg9XCIxMDAwMFwiXG4gICAgYmluZDp2YWx1ZT17dXNlcmltYWdld2lkdGh9XG4gICAgZGlzYWJsZWQ9e2ltYWdlbW9kZXNlbGVjdGVkICE9PSAnd2lkdGgnfSAvPjxiciAvPlxuICA8aW5wdXRcbiAgICB0eXBlPVwicmFkaW9cIlxuICAgIHZhbHVlPVwiaGVpZ2h0XCJcbiAgICBpZD1cImhlaWdodC1hY3RpdmVcIlxuICAgIGJpbmQ6Z3JvdXA9e2ltYWdlbW9kZXNlbGVjdGVkfSAvPlxuICA8bGFiZWwgZm9yPVwiaGVpZ2h0XCI+aGVpZ2h0PC9sYWJlbD5cbiAgPGlucHV0XG4gICAgaWQ9XCJoZWlnaHRcIlxuICAgIHR5cGU9XCJudW1iZXJcIlxuICAgIG1pbj1cIjNcIlxuICAgIG1heD1cIjEwMDAwXCJcbiAgICBiaW5kOnZhbHVlPXt1c2VyaW1hZ2VoZWlnaHR9XG4gICAgZGlzYWJsZWQ9e2ltYWdlbW9kZXNlbGVjdGVkICE9PSAnaGVpZ2h0J30gLz48YnIgLz5cbjwvcD5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSEUsTUFBTSxlQUFDLENBQUMsQUFDTixhQUFhLENBQUUsSUFBSSxDQUNuQixjQUFjLENBQUUsTUFBTSxDQUN0QixhQUFhLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLEFBQ3BDLENBQUMsQUFDRCxTQUFTLGVBQUMsQ0FBQyxBQUNULE9BQU8sQ0FBRSxHQUFHLENBQ1osV0FBVyxDQUFFLFNBQVMsQ0FDdEIsU0FBUyxDQUFFLElBQUksQ0FDZixLQUFLLENBQUUsR0FBRyxDQUNWLE1BQU0sQ0FBRSxJQUFJLENBQUMsQ0FBQyxDQUNkLE1BQU0sQ0FBRSxHQUFHLENBQUMsS0FBSyxDQUFDLFNBQVMsQUFDN0IsQ0FBQyxBQUNELEtBQUssQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDLGVBQUMsQ0FBQyxBQUNyQixNQUFNLENBQUUsT0FBTyxDQUNmLE1BQU0sQ0FBRSxDQUFDLENBQUMsSUFBSSxBQUNoQixDQUFDLEFBT0QsYUFBYSxlQUFDLENBQUMsQUFDYixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLENBQ2QsYUFBYSxDQUFFLE9BQU8sQ0FDdEIsT0FBTyxDQUFFLE1BQU0sQ0FDZixNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLE1BQU0sQ0FBRSxPQUFPLEFBQ2pCLENBQUMsQUFDRCw0QkFBYSxNQUFNLEFBQUMsQ0FBQyxBQUNuQixnQkFBZ0IsQ0FBRSxJQUFJLENBQ3RCLEtBQUssQ0FBRSxPQUFPLENBQ2QsTUFBTSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsT0FBTyxBQUMzQixDQUFDLEFBQ0QsNEJBQWEsTUFBTSxBQUFDLENBQUMsQUFDbkIsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsV0FBVyxlQUFDLENBQUMsQUFDWCxlQUFlLENBQUUsSUFBSSxDQUNyQixLQUFLLENBQUUsT0FBTyxBQUNoQixDQUFDLEFBQ0QsYUFBYSxlQUFDLENBQUMsQUFDYixXQUFXLENBQUUsSUFBSSxDQUNqQixVQUFVLENBQUUsTUFBTSxBQUNwQixDQUFDIn0=*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoType; }); +function autoType(object) { + for (var key in object) { + var value = object[key].trim(), number, m; + if (!value) value = null; + else if (value === "true") value = true; + else if (value === "false") value = false; + else if (value === "NaN") value = NaN; + else if (!isNaN(number = +value)) value = number; + else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { + if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); + value = new Date(value); + } + else continue; + object[key] = value; + } + return object; +} +// https://github.com/d3/d3-dsv/issues/45 +var fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/Tag.svelte.css": -/*!*****************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/Tag.svelte.css ***! - \*****************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-dsv/src/csv.js": +/*!****************************************!*\ + !*** ./node_modules/d3-dsv/src/csv.js ***! + \****************************************/ +/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#tag.svelte-1nm8e4l{height:auto;margin:0 8px 0 0;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;border:1px solid #d9d9d9;border-radius:4px;cursor:default;font-size:smaller;color:#52c41a;background:#f6ffed;border-color:#b7eb8f;margin-left:8px}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFnLnN2ZWx0ZSIsInNvdXJjZXMiOlsiVGFnLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c3R5bGU+XG4gICN0YWcge1xuICAgIGhlaWdodDogYXV0bztcbiAgICBtYXJnaW46IDAgOHB4IDAgMDtcbiAgICBwYWRkaW5nOiAwIDdweDtcbiAgICBmb250LXNpemU6IDEycHg7XG4gICAgbGluZS1oZWlnaHQ6IDIwcHg7XG4gICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjZDlkOWQ5O1xuICAgIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgICBjdXJzb3I6IGRlZmF1bHQ7XG4gICAgZm9udC1zaXplOiBzbWFsbGVyO1xuICAgIGNvbG9yOiAjNTJjNDFhO1xuICAgIGJhY2tncm91bmQ6ICNmNmZmZWQ7XG4gICAgYm9yZGVyLWNvbG9yOiAjYjdlYjhmO1xuICAgIG1hcmdpbi1sZWZ0OiA4cHg7XG4gIH1cbjwvc3R5bGU+XG5cbjxkaXYgaWQ9XCJ0YWdcIj5cbiAgPHNsb3QgLz5cbjwvZGl2PlxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFLElBQUksZUFBQyxDQUFDLEFBQ0osTUFBTSxDQUFFLElBQUksQ0FDWixNQUFNLENBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUNqQixPQUFPLENBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FDZCxTQUFTLENBQUUsSUFBSSxDQUNmLFdBQVcsQ0FBRSxJQUFJLENBQ2pCLFdBQVcsQ0FBRSxNQUFNLENBQ25CLE1BQU0sQ0FBRSxHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FDekIsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsTUFBTSxDQUFFLE9BQU8sQ0FDZixTQUFTLENBQUUsT0FBTyxDQUNsQixLQUFLLENBQUUsT0FBTyxDQUNkLFVBQVUsQ0FBRSxPQUFPLENBQ25CLFlBQVksQ0FBRSxPQUFPLENBQ3JCLFdBQVcsQ0FBRSxHQUFHLEFBQ2xCLENBQUMifQ==*/", "",{"version":3,"sources":["webpack://./src/components/Tag.svelte","webpack://./src/components/Tag.svelte.css"],"names":[],"mappings":"AACE,oBAAM,WACQ,CACZ,gBAAiB,CACjB,aAAc,CACd,cAAe,CACf,gBAAiB,CACjB,kBAAmB,CACnB,wBAAyB,CACzB,iBAAkB,CAClB,cAAe,CACf,iBAAkB,CAClB,aAAc,CACd,kBAAmB,CACnB,oBAAqB,CACrB,eAAgB;ACdpB,6uCAA6uC","sourcesContent":["\n\n
\n \n
\n","#tag.svelte-1nm8e4l{height:auto;margin:0 8px 0 0;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;border:1px solid #d9d9d9;border-radius:4px;cursor:default;font-size:smaller;color:#52c41a;background:#f6ffed;border-color:#b7eb8f;margin-left:8px}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFnLnN2ZWx0ZSIsInNvdXJjZXMiOlsiVGFnLnN2ZWx0ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8c3R5bGU+XG4gICN0YWcge1xuICAgIGhlaWdodDogYXV0bztcbiAgICBtYXJnaW46IDAgOHB4IDAgMDtcbiAgICBwYWRkaW5nOiAwIDdweDtcbiAgICBmb250LXNpemU6IDEycHg7XG4gICAgbGluZS1oZWlnaHQ6IDIwcHg7XG4gICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjZDlkOWQ5O1xuICAgIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgICBjdXJzb3I6IGRlZmF1bHQ7XG4gICAgZm9udC1zaXplOiBzbWFsbGVyO1xuICAgIGNvbG9yOiAjNTJjNDFhO1xuICAgIGJhY2tncm91bmQ6ICNmNmZmZWQ7XG4gICAgYm9yZGVyLWNvbG9yOiAjYjdlYjhmO1xuICAgIG1hcmdpbi1sZWZ0OiA4cHg7XG4gIH1cbjwvc3R5bGU+XG5cbjxkaXYgaWQ9XCJ0YWdcIj5cbiAgPHNsb3QgLz5cbjwvZGl2PlxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFLElBQUksZUFBQyxDQUFDLEFBQ0osTUFBTSxDQUFFLElBQUksQ0FDWixNQUFNLENBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUNqQixPQUFPLENBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FDZCxTQUFTLENBQUUsSUFBSSxDQUNmLFdBQVcsQ0FBRSxJQUFJLENBQ2pCLFdBQVcsQ0FBRSxNQUFNLENBQ25CLE1BQU0sQ0FBRSxHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FDekIsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsTUFBTSxDQUFFLE9BQU8sQ0FDZixTQUFTLENBQUUsT0FBTyxDQUNsQixLQUFLLENBQUUsT0FBTyxDQUNkLFVBQVUsQ0FBRSxPQUFPLENBQ25CLFlBQVksQ0FBRSxPQUFPLENBQ3JCLFdBQVcsQ0FBRSxHQUFHLEFBQ2xCLENBQUMifQ==*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); - - -/***/ }), - -/***/ "./node_modules/css-loader/dist/cjs.js!./src/components/View.svelte.css": -/*!******************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/components/View.svelte.css ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return csvFormatBody; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return csvFormatRow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return csvFormatValue; }); +/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports +var csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])(","); -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#view.svelte-adxv1m{border:1px solor darkred;flex:1}#container.svelte-adxv1m{overflow-x:auto}.error.svelte-adxv1m{opacity:0.5}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmlldy5zdmVsdGUiLCJzb3VyY2VzIjpbIlZpZXcuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IGNvZGVTdG9yZSB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgeyBjb2RlRXJyb3JTdG9yZSwgY29uZmlnRXJyb3JTdG9yZSB9IGZyb20gJy4uL2Vycm9yLXN0b3JlLmpzJztcbiAgaW1wb3J0IHsgb25Nb3VudCB9IGZyb20gJ3N2ZWx0ZSc7XG4gIGltcG9ydCBtZXJtYWlkIGZyb20gJ0BtZXJtYWlkJztcblxuICBjb25zdCBkZXRlY3RUeXBlID0gKHRleHQpID0+IHtcbiAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9eXFxzKiUlLipcXG4vZywgJ1xcbicpO1xuICAgIGNvbnNvbGUuZGVidWcoJ0RldGVjdGluZyBkaWFncmFtIHR5cGUgYmFzZWQgb24gdGhlIHRleHQgJyArIHRleHQpO1xuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKnNlcXVlbmNlRGlhZ3JhbS8pKSB7XG4gICAgICByZXR1cm4gJ3NlcXVlbmNlJztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccypnYW50dC8pKSB7XG4gICAgICByZXR1cm4gJ2dhbnR0JztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccypjbGFzc0RpYWdyYW0vKSkge1xuICAgICAgcmV0dXJuICdjbGFzcyc7XG4gICAgfVxuXG4gICAgaWYgKHRleHQubWF0Y2goL15cXHMqc3RhdGVEaWFncmFtLykpIHtcbiAgICAgIHJldHVybiAnc3RhdGUnO1xuICAgIH1cblxuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKmdpdEdyYXBoLykpIHtcbiAgICAgIHJldHVybiAnZ2l0JztcbiAgICB9XG4gICAgaWYgKHRleHQubWF0Y2goL15cXHMqZmxvd2NoYXJ0LykpIHtcbiAgICAgIHJldHVybiAnZmxvd2NoYXJ0JztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccyppbmZvLykpIHtcbiAgICAgIHJldHVybiAnaW5mbyc7XG4gICAgfVxuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKnBpZS8pKSB7XG4gICAgICByZXR1cm4gJ3BpZSc7XG4gICAgfVxuXG4gICAgcmV0dXJuICdmbG93Y2hhcnQnO1xuICB9O1xuXG4gIC8vIG1hbnVhbCBkZWJvdW5jZVxuICBsZXQgdGltZW91dDtcbiAgY29uc3Qgc2F2ZVN0YXRpc3RjcyA9IChncmFwaFR5cGUpID0+IHtcbiAgICBjbGVhclRpbWVvdXQodGltZW91dCk7XG4gICAgLy8gT25seSBzYXZlIHN0YXRpc3RjcyBhZnRlciBhIDUgc2VjIGRlbGF5XG4gICAgdGltZW91dCA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgY29uc29sZS5sb2coJ2dhOicsICdzZW5kJywgJ2V2ZW50JywgJ3JlbmRlcicsIGdyYXBoVHlwZSwgZ3JhcGhUeXBlKTtcbiAgICAgIGdhKCdzZW5kJywgJ2V2ZW50JywgZ3JhcGhUeXBlLCAncmVuZGVyJywgJ3JlbmRlcicpO1xuICAgIH0sIDUwMDApO1xuICB9O1xuXG4gIGxldCBjb250YWluZXI7XG5cbiAgZXhwb3J0IGxldCBjb2RlID0gJyc7XG4gIGV4cG9ydCBsZXQgY29uZmlnQ2xhc3NlcyA9ICcnO1xuICBleHBvcnQgbGV0IGNvZGVDbGFzc2VzID0gJyc7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgdW5zdWJzY3JpYmUgPSBjb2RlU3RvcmUuc3Vic2NyaWJlKChzdGF0ZSkgPT4ge1xuICAgICAgdHJ5IHtcbiAgICAgICAgaWYgKGNvbnRhaW5lciAmJiBzdGF0ZSkge1xuXG4gICAgICAgICAgLy8gUmVwbGFjaW5nIHNwZWNpYWwgY2hhcmFjdGVycyAnPCcgYW5kICc+JyB3aXRoIGVuY29kZWQgJyZsdDsnIGFuZCAnJmd0OydcbiAgICAgICAgICBjb2RlID0gc3RhdGUuY29kZS5yZXBsYWNlKC88L2csICcmbHQ7JykucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuXG4gICAgICAgICAgY29udGFpbmVyLmlubmVySFRNTCA9IGNvZGU7XG4gICAgICAgICAgc2F2ZVN0YXRpc3RjcyhkZXRlY3RUeXBlKGNvZGUpKTtcbiAgICAgICAgICBkZWxldGUgY29udGFpbmVyLmRhdGFzZXQucHJvY2Vzc2VkO1xuICAgICAgICAgIG1lcm1haWQuaW5pdGlhbGl6ZShPYmplY3QuYXNzaWduKHt9LCBzdGF0ZS5tZXJtYWlkKSk7XG4gICAgICAgICAgbWVybWFpZC5pbml0KHVuZGVmaW5lZCwgY29udGFpbmVyKTtcbiAgICAgICAgICBpZiAoY29kZSkgbWVybWFpZC5yZW5kZXIoJ2dyYXBoLWRpdicsIGNvZGUsIGluc2VydFN2Zyk7XG4gICAgICAgIH1cbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgY29uc29sZS5sb2coJ3ZpZXcgZmFpbCcsIGUpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIGNvbnN0IHVuc3Vic2NyaWJlRXJyb3IgPSBjb2RlRXJyb3JTdG9yZS5zdWJzY3JpYmUoKF9lcnJvcikgPT4ge1xuICAgICAgaWYgKHR5cGVvZiBfZXJyb3IgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGNvZGVDbGFzc2VzID0gJyc7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb2RlQ2xhc3NlcyA9ICdlcnJvcic7XG4gICAgICAgIGNvbnNvbGUubG9nKCdjb2RlIGVycm9yOiAnLCBfZXJyb3IpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIGNvbnN0IHVuc3Vic2NyaWJlQ29uZmlnRXJyb3IgPSBjb25maWdFcnJvclN0b3JlLnN1YnNjcmliZSgoX2Vycm9yKSA9PiB7XG4gICAgICBpZiAodHlwZW9mIF9lcnJvciA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgY29uZmlnQ2xhc3NlcyA9ICcnO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uZmlnQ2xhc3NlcyA9ICdlcnJvcic7XG4gICAgICAgIGNvbnNvbGUubG9nKCdjb25mIGVycm9yOiAnLCBfZXJyb3IpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcblxuICBsZXQgaW5zZXJ0U3ZnID0gZnVuY3Rpb24gKHN2Z0NvZGUsIGJpbmRGdW5jdGlvbnMpIHt9O1xuXG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjdmlldyB7XG4gICAgYm9yZGVyOiAxcHggc29sb3IgZGFya3JlZDtcbiAgICBmbGV4OiAxO1xuICB9XG4gICNjb250YWluZXIge1xuICAgIG92ZXJmbG93LXg6IGF1dG87XG4gIH1cbiAgLmVycm9yIHtcbiAgICBvcGFjaXR5OiAwLjU7XG4gIH1cbjwvc3R5bGU+XG5cbjxkaXYgaWQ9XCJ2aWV3XCIgY2xhc3M9XCJ7Y29kZUNsYXNzZXN9IHtjb25maWdDbGFzc2VzfVwiPlxuICA8ZGl2IGlkPVwiY29udGFpbmVyXCIgYmluZDp0aGlzPXtjb250YWluZXJ9IC8+XG48L2Rpdj5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxR0UsS0FBSyxjQUFDLENBQUMsQUFDTCxNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyxBQUNELFVBQVUsY0FBQyxDQUFDLEFBQ1YsVUFBVSxDQUFFLElBQUksQUFDbEIsQ0FBQyxBQUNELE1BQU0sY0FBQyxDQUFDLEFBQ04sT0FBTyxDQUFFLEdBQUcsQUFDZCxDQUFDIn0=*/", "",{"version":3,"sources":["webpack://./src/components/View.svelte","webpack://./src/components/View.svelte.css"],"names":[],"mappings":"AAqGE,oBAAO,wBACoB,CACzB,MAAO,CACR,yBACW,eACM,CACjB,qBACO,WACM;AC5GhB,63IAA63I","sourcesContent":["\n\n\n\n
\n
\n
\n","#view.svelte-adxv1m{border:1px solor darkred;flex:1}#container.svelte-adxv1m{overflow-x:auto}.error.svelte-adxv1m{opacity:0.5}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmlldy5zdmVsdGUiLCJzb3VyY2VzIjpbIlZpZXcuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IGNvZGVTdG9yZSB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgeyBjb2RlRXJyb3JTdG9yZSwgY29uZmlnRXJyb3JTdG9yZSB9IGZyb20gJy4uL2Vycm9yLXN0b3JlLmpzJztcbiAgaW1wb3J0IHsgb25Nb3VudCB9IGZyb20gJ3N2ZWx0ZSc7XG4gIGltcG9ydCBtZXJtYWlkIGZyb20gJ0BtZXJtYWlkJztcblxuICBjb25zdCBkZXRlY3RUeXBlID0gKHRleHQpID0+IHtcbiAgICB0ZXh0ID0gdGV4dC5yZXBsYWNlKC9eXFxzKiUlLipcXG4vZywgJ1xcbicpO1xuICAgIGNvbnNvbGUuZGVidWcoJ0RldGVjdGluZyBkaWFncmFtIHR5cGUgYmFzZWQgb24gdGhlIHRleHQgJyArIHRleHQpO1xuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKnNlcXVlbmNlRGlhZ3JhbS8pKSB7XG4gICAgICByZXR1cm4gJ3NlcXVlbmNlJztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccypnYW50dC8pKSB7XG4gICAgICByZXR1cm4gJ2dhbnR0JztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccypjbGFzc0RpYWdyYW0vKSkge1xuICAgICAgcmV0dXJuICdjbGFzcyc7XG4gICAgfVxuXG4gICAgaWYgKHRleHQubWF0Y2goL15cXHMqc3RhdGVEaWFncmFtLykpIHtcbiAgICAgIHJldHVybiAnc3RhdGUnO1xuICAgIH1cblxuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKmdpdEdyYXBoLykpIHtcbiAgICAgIHJldHVybiAnZ2l0JztcbiAgICB9XG4gICAgaWYgKHRleHQubWF0Y2goL15cXHMqZmxvd2NoYXJ0LykpIHtcbiAgICAgIHJldHVybiAnZmxvd2NoYXJ0JztcbiAgICB9XG5cbiAgICBpZiAodGV4dC5tYXRjaCgvXlxccyppbmZvLykpIHtcbiAgICAgIHJldHVybiAnaW5mbyc7XG4gICAgfVxuICAgIGlmICh0ZXh0Lm1hdGNoKC9eXFxzKnBpZS8pKSB7XG4gICAgICByZXR1cm4gJ3BpZSc7XG4gICAgfVxuXG4gICAgcmV0dXJuICdmbG93Y2hhcnQnO1xuICB9O1xuXG4gIC8vIG1hbnVhbCBkZWJvdW5jZVxuICBsZXQgdGltZW91dDtcbiAgY29uc3Qgc2F2ZVN0YXRpc3RjcyA9IChncmFwaFR5cGUpID0+IHtcbiAgICBjbGVhclRpbWVvdXQodGltZW91dCk7XG4gICAgLy8gT25seSBzYXZlIHN0YXRpc3RjcyBhZnRlciBhIDUgc2VjIGRlbGF5XG4gICAgdGltZW91dCA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgY29uc29sZS5sb2coJ2dhOicsICdzZW5kJywgJ2V2ZW50JywgJ3JlbmRlcicsIGdyYXBoVHlwZSwgZ3JhcGhUeXBlKTtcbiAgICAgIGdhKCdzZW5kJywgJ2V2ZW50JywgZ3JhcGhUeXBlLCAncmVuZGVyJywgJ3JlbmRlcicpO1xuICAgIH0sIDUwMDApO1xuICB9O1xuXG4gIGxldCBjb250YWluZXI7XG5cbiAgZXhwb3J0IGxldCBjb2RlID0gJyc7XG4gIGV4cG9ydCBsZXQgY29uZmlnQ2xhc3NlcyA9ICcnO1xuICBleHBvcnQgbGV0IGNvZGVDbGFzc2VzID0gJyc7XG5cbiAgb25Nb3VudChhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgdW5zdWJzY3JpYmUgPSBjb2RlU3RvcmUuc3Vic2NyaWJlKChzdGF0ZSkgPT4ge1xuICAgICAgdHJ5IHtcbiAgICAgICAgaWYgKGNvbnRhaW5lciAmJiBzdGF0ZSkge1xuXG4gICAgICAgICAgLy8gUmVwbGFjaW5nIHNwZWNpYWwgY2hhcmFjdGVycyAnPCcgYW5kICc+JyB3aXRoIGVuY29kZWQgJyZsdDsnIGFuZCAnJmd0OydcbiAgICAgICAgICBjb2RlID0gc3RhdGUuY29kZS5yZXBsYWNlKC88L2csICcmbHQ7JykucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuXG4gICAgICAgICAgY29udGFpbmVyLmlubmVySFRNTCA9IGNvZGU7XG4gICAgICAgICAgc2F2ZVN0YXRpc3RjcyhkZXRlY3RUeXBlKGNvZGUpKTtcbiAgICAgICAgICBkZWxldGUgY29udGFpbmVyLmRhdGFzZXQucHJvY2Vzc2VkO1xuICAgICAgICAgIG1lcm1haWQuaW5pdGlhbGl6ZShPYmplY3QuYXNzaWduKHt9LCBzdGF0ZS5tZXJtYWlkKSk7XG4gICAgICAgICAgbWVybWFpZC5pbml0KHVuZGVmaW5lZCwgY29udGFpbmVyKTtcbiAgICAgICAgICBpZiAoY29kZSkgbWVybWFpZC5yZW5kZXIoJ2dyYXBoLWRpdicsIGNvZGUsIGluc2VydFN2Zyk7XG4gICAgICAgIH1cbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgY29uc29sZS5sb2coJ3ZpZXcgZmFpbCcsIGUpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIGNvbnN0IHVuc3Vic2NyaWJlRXJyb3IgPSBjb2RlRXJyb3JTdG9yZS5zdWJzY3JpYmUoKF9lcnJvcikgPT4ge1xuICAgICAgaWYgKHR5cGVvZiBfZXJyb3IgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGNvZGVDbGFzc2VzID0gJyc7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb2RlQ2xhc3NlcyA9ICdlcnJvcic7XG4gICAgICAgIGNvbnNvbGUubG9nKCdjb2RlIGVycm9yOiAnLCBfZXJyb3IpO1xuICAgICAgfVxuICAgIH0pO1xuICAgIGNvbnN0IHVuc3Vic2NyaWJlQ29uZmlnRXJyb3IgPSBjb25maWdFcnJvclN0b3JlLnN1YnNjcmliZSgoX2Vycm9yKSA9PiB7XG4gICAgICBpZiAodHlwZW9mIF9lcnJvciA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgY29uZmlnQ2xhc3NlcyA9ICcnO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uZmlnQ2xhc3NlcyA9ICdlcnJvcic7XG4gICAgICAgIGNvbnNvbGUubG9nKCdjb25mIGVycm9yOiAnLCBfZXJyb3IpO1xuICAgICAgfVxuICAgIH0pO1xuICB9KTtcblxuICBsZXQgaW5zZXJ0U3ZnID0gZnVuY3Rpb24gKHN2Z0NvZGUsIGJpbmRGdW5jdGlvbnMpIHt9O1xuXG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjdmlldyB7XG4gICAgYm9yZGVyOiAxcHggc29sb3IgZGFya3JlZDtcbiAgICBmbGV4OiAxO1xuICB9XG4gICNjb250YWluZXIge1xuICAgIG92ZXJmbG93LXg6IGF1dG87XG4gIH1cbiAgLmVycm9yIHtcbiAgICBvcGFjaXR5OiAwLjU7XG4gIH1cbjwvc3R5bGU+XG5cbjxkaXYgaWQ9XCJ2aWV3XCIgY2xhc3M9XCJ7Y29kZUNsYXNzZXN9IHtjb25maWdDbGFzc2VzfVwiPlxuICA8ZGl2IGlkPVwiY29udGFpbmVyXCIgYmluZDp0aGlzPXtjb250YWluZXJ9IC8+XG48L2Rpdj5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxR0UsS0FBSyxjQUFDLENBQUMsQUFDTCxNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLElBQUksQ0FBRSxDQUFDLEFBQ1QsQ0FBQyxBQUNELFVBQVUsY0FBQyxDQUFDLEFBQ1YsVUFBVSxDQUFFLElBQUksQUFDbEIsQ0FBQyxBQUNELE1BQU0sY0FBQyxDQUFDLEFBQ04sT0FBTyxDQUFFLEdBQUcsQUFDZCxDQUFDIn0=*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +var csvParse = csv.parse; +var csvParseRows = csv.parseRows; +var csvFormat = csv.format; +var csvFormatBody = csv.formatBody; +var csvFormatRows = csv.formatRows; +var csvFormatRow = csv.formatRow; +var csvFormatValue = csv.formatValue; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./src/routes/Edit.svelte.css": -/*!**************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/routes/Edit.svelte.css ***! - \**************************************************************************/ +/***/ "./node_modules/d3-dsv/src/dsv.js": +/*!****************************************!*\ + !*** ./node_modules/d3-dsv/src/dsv.js ***! + \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#body.svelte-mx8k4g{font-family:'Roboto', sans-serif;background-color:#fcfbfc}#editor-root.svelte-mx8k4g{display:flex;height:100%}#col1.svelte-mx8k4g{width:35%}#col2.svelte-mx8k4g{width:65%;padding-left:32px}#link-root.svelte-mx8k4g{display:flex;height:fit-content}#link-col1.svelte-mx8k4g{width:50%}#link-col2.svelte-mx8k4g{width:50%;padding-left:32px}#app-title.svelte-mx8k4g{font-family:'Playfair Display', serif;font-size:32px;font-weight:700;margin:0;color:#1e60ab;opacity:0.8}#title-container.svelte-mx8k4g{width:fit-content;margin:0 auto 8px}#power.svelte-mx8k4g{width:100%;display:flex;justify-content:flex-end;align-items:center;height:4rem}#sampleLoader.svelte-mx8k4g{padding-left:10px;border-bottom:1px solid lightgray}#historyLoaderSubTitle.svelte-mx8k4g{display:inline-block;color:#33a2c4;font-size:small;font-style:italic}.button-container.svelte-mx8k4g{display:flex;align-items:center;flex-direction:row;flex-wrap:wrap}.button-style.svelte-mx8k4g{background-color:#a2d9e2;color:#33a2c4;border-radius:0.25rem;padding:0.5rem;border:1px solid #a2d9e2;margin:0.25rem}.button-style.svelte-mx8k4g:hover{background-color:#fff;color:#33a2c4;border:1px solid #33a2c4}.button-style.svelte-mx8k4g:focus{outline:none}.link-style.svelte-mx8k4g{text-decoration:none;color:#33a2c4}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWRpdC5zdmVsdGUiLCJzb3VyY2VzIjpbIkVkaXQuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvZGUsIHVwZGF0ZUNvZGVTdG9yZSB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgRWRpdG9yIGZyb20gJy4uL2NvbXBvbmVudHMvRWRpdG9yLnN2ZWx0ZSc7XG4gIGltcG9ydCBDb25maWcgZnJvbSAnLi4vY29tcG9uZW50cy9Db25maWcuc3ZlbHRlJztcbiAgaW1wb3J0IFZpZXcgZnJvbSAnLi4vY29tcG9uZW50cy9WaWV3LnN2ZWx0ZSc7XG4gIGltcG9ydCBDYXJkIGZyb20gJy4uL2NvbXBvbmVudHMvQ2FyZC5zdmVsdGUnO1xuICBpbXBvcnQgVGFnIGZyb20gJy4uL2NvbXBvbmVudHMvVGFnLnN2ZWx0ZSc7XG4gIGltcG9ydCBMaW5rcyBmcm9tICcuLi9jb21wb25lbnRzL0xpbmtzLnN2ZWx0ZSc7XG4gIGltcG9ydCB7IGZyb21VcmwgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcbiAgaW1wb3J0IHBrZyBmcm9tICdAbWVybWFpZC9wYWNrYWdlLmpzb24nO1xuICBpbXBvcnQgbW9tZW50IGZyb20gJ21vbWVudCc7XG4gIGV4cG9ydCBsZXQgbWVybWFpZFZlcnNpb24gPSBwa2cudmVyc2lvbjtcbiAgbGV0IGhpc3RvcnlMaXN0ID0gW107XG4gIG9uTW91bnQoYXN5bmMgKCkgPT4ge1xuICAgIGdhKCdzZW5kJywgJ3BhZ2V2aWV3Jyk7XG4gICAgZ2EoJ3NlbmQnLCAnZXZlbnQnLCAndmVyc2lvbicsIG1lcm1haWRWZXJzaW9uLCBtZXJtYWlkVmVyc2lvbik7XG5cbiAgICBjb25zdCBoaXN0b3J5TGlzdEtleSA9ICdfbWVybWFpZF9oaXN0b3J5Xyc7XG4gICAgaGlzdG9yeUxpc3QgPSBKU09OLnBhcnNlKGxvY2FsU3RvcmFnZS5nZXRJdGVtKGhpc3RvcnlMaXN0S2V5KSB8fCAnW10nKTtcbiAgICBsZXQgaGlzQ29kZSA9XG4gICAgICBoaXN0b3J5TGlzdC5sZW5ndGggPiAwID8gaGlzdG9yeUxpc3RbaGlzdG9yeUxpc3QubGVuZ3RoIC0gMV0gOiBudWxsO1xuXG4gICAgaWYgKHBhcmFtcy5kYXRhKSB7XG4gICAgICBmcm9tVXJsKHBhcmFtcy5kYXRhKTtcbiAgICB9IGVsc2UgaWYgKGhpc0NvZGUpIHtcbiAgICAgIHVwZGF0ZUNvZGVTdG9yZSh7XG4gICAgICAgIGNvZGU6IGhpc0NvZGUuY29kZSxcbiAgICAgICAgbWVybWFpZDoge30sXG4gICAgICAgIHVwZGF0ZUVkaXRvcjogdHJ1ZSxcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICBsb2FkU2FtcGxlRGlhZ3JhbSgnRmxvdyBDaGFydCcpO1xuICAgIH1cblxuICAgIGxldCBjb2RlID0gbnVsbDtcbiAgICBjb2RlU3RvcmUuc3Vic2NyaWJlKChzdGF0ZSkgPT4ge1xuICAgICAgY29kZSA9IChzdGF0ZSAmJiBzdGF0ZS5jb2RlKSB8fCBjb2RlO1xuICAgIH0pO1xuXG4gICAgc2V0SW50ZXJ2YWwoKCkgPT4ge1xuICAgICAgaWYgKGNvZGUgIT0gaGlzQ29kZSkge1xuICAgICAgICAvL3NhdmUgaGlzdG9yeVxuICAgICAgICBoaXN0b3J5TGlzdC51bnNoaWZ0KHtcbiAgICAgICAgICB0aW1lOiBuZXcgRGF0ZSgpLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgY29kZTogKGhpc0NvZGUgPSBjb2RlKSxcbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChoaXN0b3J5TGlzdC5sZW5ndGggPiAxMCkge1xuICAgICAgICAgIGhpc3RvcnlMaXN0LnBvcCgpO1xuICAgICAgICB9XG4gICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKGhpc3RvcnlMaXN0S2V5LCBKU09OLnN0cmluZ2lmeShoaXN0b3J5TGlzdCkpO1xuICAgICAgfVxuICAgICAgaGlzdG9yeUxpc3QgPSBoaXN0b3J5TGlzdDsgLy90cmlnZ2VyZWQgdXBkYXRlXG4gICAgfSwgMSAqIDYwICogMTAwMCk7XG4gIH0pO1xuXG4gIGV4cG9ydCBsZXQgcGFyYW1zID0ge307XG4gIGNvbnN0IHNhbXBsZXMgPSB7XG4gICAgJ0Zsb3cgQ2hhcnQnOiBgZ3JhcGggVERcbiAgICBBW0NocmlzdG1hc10gLS0+fEdldCBtb25leXwgQihHbyBzaG9wcGluZylcbiAgICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgICBDIC0tPnxPbmV8IERbTGFwdG9wXVxuICAgIEMgLS0+fFR3b3wgRVtpUGhvbmVdXG4gICAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl1gLFxuICAgICdTZXF1ZW5jZSBEaWFncmFtJzogYHNlcXVlbmNlRGlhZ3JhbVxuICAgIEFsaWNlLT4+K0pvaG46IEhlbGxvIEpvaG4sIGhvdyBhcmUgeW91P1xuICAgIEFsaWNlLT4+K0pvaG46IEpvaG4sIGNhbiB5b3UgaGVhciBtZT9cbiAgICBKb2huLS0+Pi1BbGljZTogSGkgQWxpY2UsIEkgY2FuIGhlYXIgeW91IVxuICAgIEpvaG4tLT4+LUFsaWNlOiBJIGZlZWwgZ3JlYXQhXG4gICAgICAgICAgICBgLFxuICAgICdDbGFzcyBEaWFncmFtJzogYGNsYXNzRGlhZ3JhbVxuICAgIEFuaW1hbCA8fC0tIER1Y2tcbiAgICBBbmltYWwgPHwtLSBGaXNoXG4gICAgQW5pbWFsIDx8LS0gWmVicmFcbiAgICBBbmltYWwgOiAraW50IGFnZVxuICAgIEFuaW1hbCA6ICtTdHJpbmcgZ2VuZGVyXG4gICAgQW5pbWFsOiAraXNNYW1tYWwoKVxuICAgIEFuaW1hbDogK21hdGUoKVxuICAgIGNsYXNzIER1Y2t7XG4gICAgICArU3RyaW5nIGJlYWtDb2xvclxuICAgICAgK3N3aW0oKVxuICAgICAgK3F1YWNrKClcbiAgICB9XG4gICAgY2xhc3MgRmlzaHtcbiAgICAgIC1pbnQgc2l6ZUluRmVldFxuICAgICAgLWNhbkVhdCgpXG4gICAgfVxuICAgIGNsYXNzIFplYnJhe1xuICAgICAgK2Jvb2wgaXNfd2lsZFxuICAgICAgK3J1bigpXG4gICAgfVxuICAgICAgICAgICAgYCxcbiAgICAnU3RhdGUgRGlhZ3JhbSc6IGBzdGF0ZURpYWdyYW0tdjJcbiAgICBbKl0gLS0+IFN0aWxsXG4gICAgU3RpbGwgLS0+IFsqXVxuICAgIFN0aWxsIC0tPiBNb3ZpbmdcbiAgICBNb3ZpbmcgLS0+IFN0aWxsXG4gICAgTW92aW5nIC0tPiBDcmFzaFxuICAgIENyYXNoIC0tPiBbKl1cbiAgICAgICAgICAgIGAsXG4gICAgJ0dhbnR0IENoYXJ0JzogYGdhbnR0XG4gICAgdGl0bGUgQSBHYW50dCBEaWFncmFtXG4gICAgZGF0ZUZvcm1hdCAgWVlZWS1NTS1ERFxuICAgIHNlY3Rpb24gU2VjdGlvblxuICAgIEEgdGFzayAgICAgICAgICAgOmExLCAyMDE0LTAxLTAxLCAzMGRcbiAgICBBbm90aGVyIHRhc2sgICAgIDphZnRlciBhMSAgLCAyMGRcbiAgICBzZWN0aW9uIEFub3RoZXJcbiAgICBUYXNrIGluIHNlYyAgICAgIDoyMDE0LTAxLTEyICAsIDEyZFxuICAgIGFub3RoZXIgdGFzayAgICAgIDogMjRkXG4gICAgICAgICAgICBgLFxuICAgICdQaWUgQ2hhcnQnOiBgcGllIHRpdGxlIFBldHMgYWRvcHRlZCBieSB2b2x1bnRlZXJzXG4gICAgXCJEb2dzXCIgOiAzODZcbiAgICBcIkNhdHNcIiA6IDg1XG4gICAgXCJSYXRzXCIgOiAxNVxuICAgICAgICAgICAgYCxcbiAgICAnRVIgRGlhZ3JhbSc6IGBlckRpYWdyYW1cbiAgICAgICAgICBDVVNUT01FUiB9fC4ufHsgREVMSVZFUlktQUREUkVTUyA6IGhhc1xuICAgICAgICAgIENVU1RPTUVSIHx8LS1veyBPUkRFUiA6IHBsYWNlc1xuICAgICAgICAgIENVU1RPTUVSIHx8LS1veyBJTlZPSUNFIDogXCJsaWFibGUgZm9yXCJcbiAgICAgICAgICBERUxJVkVSWS1BRERSRVNTIHx8LS1veyBPUkRFUiA6IHJlY2VpdmVzXG4gICAgICAgICAgSU5WT0lDRSB8fC0tfHsgT1JERVIgOiBjb3ZlcnNcbiAgICAgICAgICBPUkRFUiB8fC0tfHsgT1JERVItSVRFTSA6IGluY2x1ZGVzXG4gICAgICAgICAgUFJPRFVDVC1DQVRFR09SWSB8fC0tfHsgUFJPRFVDVCA6IGNvbnRhaW5zXG4gICAgICAgICAgUFJPRFVDVCB8fC0tb3sgT1JERVItSVRFTSA6IFwib3JkZXJlZCBpblwiXG4gICAgICAgICAgICBgLFxuICB9O1xuXG4gIGZ1bmN0aW9uIGxvYWRTYW1wbGVEaWFncmFtKGRpYWdyYW1UeXBlKSB7XG4gICAgdG9VcGRhdGVDb2RlU3RvcmUoc2FtcGxlc1tkaWFncmFtVHlwZV0pO1xuICB9XG5cbiAgZnVuY3Rpb24gdG9VcGRhdGVDb2RlU3RvcmUoY29kZSkge1xuICAgIGlmICghY29kZSkgcmV0dXJuO1xuICAgIHVwZGF0ZUNvZGUoY29kZSwgdHJ1ZSk7XG4gIH1cblxuICBmdW5jdGlvbiByZWxhdGl2ZVRpbWUodCkge1xuICAgIHJldHVybiBgJHttb21lbnQodCkuZnJvbU5vdygpfSAoJHtuZXcgRGF0ZSh0KS50b0xvY2FsZVN0cmluZygpfSlgO1xuICB9XG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjYm9keSB7XG4gICAgZm9udC1mYW1pbHk6ICdSb2JvdG8nLCBzYW5zLXNlcmlmO1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmY2ZiZmM7XG4gIH1cbiAgI2VkaXRvci1yb290IHtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGhlaWdodDogMTAwJTtcbiAgfVxuICAjY29sMSB7XG4gICAgd2lkdGg6IDM1JTtcbiAgfVxuICAjY29sMiB7XG4gICAgd2lkdGg6IDY1JTtcbiAgICBwYWRkaW5nLWxlZnQ6IDMycHg7XG4gIH1cbiAgI2xpbmstcm9vdCB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBoZWlnaHQ6IGZpdC1jb250ZW50O1xuICB9XG4gICNsaW5rLWNvbDEge1xuICAgIHdpZHRoOiA1MCU7XG4gIH1cbiAgI2xpbmstY29sMiB7XG4gICAgd2lkdGg6IDUwJTtcbiAgICBwYWRkaW5nLWxlZnQ6IDMycHg7XG4gIH1cbiAgI2FwcC10aXRsZSB7XG4gICAgZm9udC1mYW1pbHk6ICdQbGF5ZmFpciBEaXNwbGF5Jywgc2VyaWY7XG4gICAgZm9udC1zaXplOiAzMnB4O1xuICAgIGZvbnQtd2VpZ2h0OiA3MDA7XG4gICAgbWFyZ2luOiAwO1xuICAgIGNvbG9yOiAjMWU2MGFiO1xuICAgIG9wYWNpdHk6IDAuODtcbiAgfVxuICAjdGl0bGUtY29udGFpbmVyIHtcbiAgICB3aWR0aDogZml0LWNvbnRlbnQ7XG4gICAgbWFyZ2luOiAwIGF1dG8gOHB4O1xuICB9XG4gICNwb3dlciB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgaGVpZ2h0OiA0cmVtO1xuICB9XG4gICNzYW1wbGVMb2FkZXIge1xuICAgIHBhZGRpbmctbGVmdDogMTBweDtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgbGlnaHRncmF5O1xuICB9XG4gICNoaXN0b3J5TG9hZGVyU3ViVGl0bGUge1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgICBmb250LXNpemU6IHNtYWxsO1xuICAgIGZvbnQtc3R5bGU6IGl0YWxpYztcbiAgfVxuICAuYnV0dG9uLWNvbnRhaW5lciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgZmxleC13cmFwOiB3cmFwO1xuICB9XG4gIC5idXR0b24tc3R5bGUge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNhMmQ5ZTI7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gICAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgICBwYWRkaW5nOiAwLjVyZW07XG4gICAgYm9yZGVyOiAxcHggc29saWQgI2EyZDllMjtcbiAgICBtYXJnaW46IDAuMjVyZW07XG4gIH1cbiAgLmJ1dHRvbi1zdHlsZTpob3ZlciB7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjMzNhMmM0O1xuICB9XG4gIC5idXR0b24tc3R5bGU6Zm9jdXMge1xuICAgIG91dGxpbmU6IG5vbmU7XG4gIH1cbiAgLmxpbmstc3R5bGUge1xuICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImJvZHlcIj5cbiAgPGRpdiBpZD1cInRpdGxlLWNvbnRhaW5lclwiPlxuICAgIDxoMSBpZD1cImFwcC10aXRsZVwiPk1lcm1haWQgTGl2ZSBFZGl0b3I8L2gxPlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cInNhbXBsZUxvYWRlclwiPlxuICAgIDxkaXYgY2xhc3M9XCJidXR0b24tY29udGFpbmVyXCI+XG4gICAgICA8c3BhbiBpZD1cInNhbXBsZUxvYWRlclRpdGxlXCI+PHN0cm9uZz5EaWFncmFtIHByZXNldHM6PC9zdHJvbmc+PC9zcGFuPlxuICAgICAgeyNlYWNoIE9iamVjdC5rZXlzKHNhbXBsZXMpIGFzIGRpYWdyYW1UeXBlLCBpfVxuICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgY2xhc3M9XCJidXR0b24tc3R5bGVcIlxuICAgICAgICAgIG9uOmNsaWNrPXsoZSkgPT4gbG9hZFNhbXBsZURpYWdyYW0oZGlhZ3JhbVR5cGUpfT5cbiAgICAgICAgICB7ZGlhZ3JhbVR5cGV9XG4gICAgICAgIDwvYnV0dG9uPlxuICAgICAgey9lYWNofVxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cImVkaXRvci1yb290XCI+XG4gICAgPGRpdiBpZD1cImNvbDFcIj5cbiAgICAgIDxDYXJkIHRpdGxlPVwiQ29kZVwiIG5vUGFkZGluZz1cInRydWVcIj5cbiAgICAgICAgPEVkaXRvciBkYXRhPXtwYXJhbXMuZGF0YX0gLz5cbiAgICAgIDwvQ2FyZD5cbiAgICAgIDxDYXJkIHRpdGxlPVwiTWVybWFpZCBDb25maWd1cmF0aW9uXCI+XG4gICAgICAgIDxDb25maWcgLz5cbiAgICAgIDwvQ2FyZD5cbiAgICA8L2Rpdj5cbiAgICA8ZGl2IGlkPVwiY29sMlwiPlxuICAgICAgPENhcmQgdGl0bGU9XCJQcmV2aWV3XCI+XG4gICAgICAgIDxWaWV3IC8+XG4gICAgICA8L0NhcmQ+XG4gICAgICA8ZGl2IGlkPVwibGluay1yb290XCI+XG4gICAgICAgIDxkaXYgaWQ9XCJsaW5rLWNvbDFcIj5cbiAgICAgICAgICA8Q2FyZCB0aXRsZT1cIkVkaXRpbmcgaGlzdG9yeVwiPlxuICAgICAgICAgICAgPHNwYW4gaWQ9XCJoaXN0b3J5TG9hZGVyU3ViVGl0bGVcIj5BdXRvbWF0aWNhbGx5IHNhdmVzIG9uY2UgZXZlcnlcbiAgICAgICAgICAgICAgbWludXRlLCB1cCB0byAxMCByZWNvcmRzLjwvc3Bhbj5cbiAgICAgICAgICAgIDxiciAvPlxuICAgICAgICAgICAgPGRpdiBpZD1cImhpc3RvcnlMaXN0XCIgY2xhc3M9XCJidXR0b24tY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgIHsjaWYgaGlzdG9yeUxpc3QubGVuZ3RoID4gMH1cbiAgICAgICAgICAgICAgICB7I2VhY2ggaGlzdG9yeUxpc3QgYXMgaXRlbSwgaX1cbiAgICAgICAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b24tc3R5bGVcIlxuICAgICAgICAgICAgICAgICAgICBvbjpjbGljaz17KGUpID0+IHRvVXBkYXRlQ29kZVN0b3JlKGl0ZW0uY29kZSl9PlxuICAgICAgICAgICAgICAgICAgICB7cmVsYXRpdmVUaW1lKGl0ZW0udGltZSl9XG4gICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICB7L2VhY2h9XG4gICAgICAgICAgICAgIHs6ZWxzZX1ObyByZWNvcmRzLnsvaWZ9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L0NhcmQ+XG4gICAgICAgICAgPENhcmQgdGl0bGU9XCJMaW5rc1wiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJ1dHRvbi1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9tZXJtYWlkLWpzLmdpdGh1Yi5pby9tZXJtYWlkXCJcbiAgICAgICAgICAgICAgICAgIHRhcmdldD1cIl9ibGFua1wiXG4gICAgICAgICAgICAgICAgICBjbGFzcz1cImxpbmstc3R5bGVcIj5cbiAgICAgICAgICAgICAgICAgIE1lcm1haWQgRG9jdW1lbnRhdGlvblxuICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZC9ibG9iL21hc3Rlci9kb2NzL2dldHRpbmctc3RhcnRlZC9UdXRvcmlhbHMubWRcIlxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImxpbmstc3R5bGVcIj5cbiAgICAgICAgICAgICAgICAgICAgTGl2ZSBFZGl0b3IgVmlkZW8gVHV0b3JpYWxzXG4gICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZFwiXG4gICAgICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICAgICAgY2xhc3M9XCJsaW5rLXN0eWxlXCI+XG4gICAgICAgICAgICAgICAgICBNZXJtYWlkIG9uIEdpdEh1YlxuICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgaHJlZj1cImh0dHBzOi8vZ2l0aHViLmNvbS9tZXJtYWlkLWpzL21lcm1haWQtbGl2ZS1lZGl0b3JcIlxuICAgICAgICAgICAgICAgICAgdGFyZ2V0PVwiX2JsYW5rXCJcbiAgICAgICAgICAgICAgICAgIGNsYXNzPVwibGluay1zdHlsZVwiPlxuICAgICAgICAgICAgICAgICAgTGl2ZSBFZGl0b3Igb24gR2l0SHViXG4gICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZC1jbGlcIlxuICAgICAgICAgICAgICAgICAgdGFyZ2V0PVwiX2JsYW5rXCJcbiAgICAgICAgICAgICAgICAgIGNsYXNzPVwibGluay1zdHlsZVwiPlxuICAgICAgICAgICAgICAgICAgTWVybWFpZCBDTElcbiAgICAgICAgICAgICAgICA8L2E+XG4gICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9DYXJkPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBpZD1cImxpbmstY29sMlwiPlxuICAgICAgICAgIDxDYXJkIHRpdGxlPVwiQWN0aW9uc1wiPlxuICAgICAgICAgICAgPExpbmtzIC8+XG4gICAgICAgICAgPC9DYXJkPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cInBvd2VyXCI+XG4gICAgUG93ZXJlZCBieSBtZXJtYWlkXG4gICAgPFRhZyBjb2xvcj1cImdyZWVuXCI+e21lcm1haWRWZXJzaW9ufTwvVGFnPlxuICA8L2Rpdj5cbjwvZGl2PlxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThJRSxLQUFLLGNBQUMsQ0FBQyxBQUNMLFdBQVcsQ0FBRSxRQUFRLENBQUMsQ0FBQyxVQUFVLENBQ2pDLGdCQUFnQixDQUFFLE9BQU8sQUFDM0IsQ0FBQyxBQUNELFlBQVksY0FBQyxDQUFDLEFBQ1osT0FBTyxDQUFFLElBQUksQ0FDYixNQUFNLENBQUUsSUFBSSxBQUNkLENBQUMsQUFDRCxLQUFLLGNBQUMsQ0FBQyxBQUNMLEtBQUssQ0FBRSxHQUFHLEFBQ1osQ0FBQyxBQUNELEtBQUssY0FBQyxDQUFDLEFBQ0wsS0FBSyxDQUFFLEdBQUcsQ0FDVixZQUFZLENBQUUsSUFBSSxBQUNwQixDQUFDLEFBQ0QsVUFBVSxjQUFDLENBQUMsQUFDVixPQUFPLENBQUUsSUFBSSxDQUNiLE1BQU0sQ0FBRSxXQUFXLEFBQ3JCLENBQUMsQUFDRCxVQUFVLGNBQUMsQ0FBQyxBQUNWLEtBQUssQ0FBRSxHQUFHLEFBQ1osQ0FBQyxBQUNELFVBQVUsY0FBQyxDQUFDLEFBQ1YsS0FBSyxDQUFFLEdBQUcsQ0FDVixZQUFZLENBQUUsSUFBSSxBQUNwQixDQUFDLEFBQ0QsVUFBVSxjQUFDLENBQUMsQUFDVixXQUFXLENBQUUsa0JBQWtCLENBQUMsQ0FBQyxLQUFLLENBQ3RDLFNBQVMsQ0FBRSxJQUFJLENBQ2YsV0FBVyxDQUFFLEdBQUcsQ0FDaEIsTUFBTSxDQUFFLENBQUMsQ0FDVCxLQUFLLENBQUUsT0FBTyxDQUNkLE9BQU8sQ0FBRSxHQUFHLEFBQ2QsQ0FBQyxBQUNELGdCQUFnQixjQUFDLENBQUMsQUFDaEIsS0FBSyxDQUFFLFdBQVcsQ0FDbEIsTUFBTSxDQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxBQUNwQixDQUFDLEFBQ0QsTUFBTSxjQUFDLENBQUMsQUFDTixLQUFLLENBQUUsSUFBSSxDQUNYLE9BQU8sQ0FBRSxJQUFJLENBQ2IsZUFBZSxDQUFFLFFBQVEsQ0FDekIsV0FBVyxDQUFFLE1BQU0sQ0FDbkIsTUFBTSxDQUFFLElBQUksQUFDZCxDQUFDLEFBQ0QsYUFBYSxjQUFDLENBQUMsQUFDYixZQUFZLENBQUUsSUFBSSxDQUNsQixhQUFhLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLEFBQ3BDLENBQUMsQUFDRCxzQkFBc0IsY0FBQyxDQUFDLEFBQ3RCLE9BQU8sQ0FBRSxZQUFZLENBQ3JCLEtBQUssQ0FBRSxPQUFPLENBQ2QsU0FBUyxDQUFFLEtBQUssQ0FDaEIsVUFBVSxDQUFFLE1BQU0sQUFDcEIsQ0FBQyxBQUNELGlCQUFpQixjQUFDLENBQUMsQUFDakIsT0FBTyxDQUFFLElBQUksQ0FDYixXQUFXLENBQUUsTUFBTSxDQUNuQixjQUFjLENBQUUsR0FBRyxDQUNuQixTQUFTLENBQUUsSUFBSSxBQUNqQixDQUFDLEFBQ0QsYUFBYSxjQUFDLENBQUMsQUFDYixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLENBQ2QsYUFBYSxDQUFFLE9BQU8sQ0FDdEIsT0FBTyxDQUFFLE1BQU0sQ0FDZixNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLE1BQU0sQ0FBRSxPQUFPLEFBQ2pCLENBQUMsQUFDRCwyQkFBYSxNQUFNLEFBQUMsQ0FBQyxBQUNuQixnQkFBZ0IsQ0FBRSxJQUFJLENBQ3RCLEtBQUssQ0FBRSxPQUFPLENBQ2QsTUFBTSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsT0FBTyxBQUMzQixDQUFDLEFBQ0QsMkJBQWEsTUFBTSxBQUFDLENBQUMsQUFDbkIsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsV0FBVyxjQUFDLENBQUMsQUFDWCxlQUFlLENBQUUsSUFBSSxDQUNyQixLQUFLLENBQUUsT0FBTyxBQUNoQixDQUFDIn0=*/", "",{"version":3,"sources":["webpack://./src/routes/Edit.svelte","webpack://./src/routes/Edit.svelte.css"],"names":[],"mappings":"AA8IE,oBAAO,gCAC4B,CACjC,wBAAyB,CAC1B,2BACa,YACC,CACb,WAAY,CACb,oBACM,SACK,CACX,oBACM,SACK,CACV,iBAAkB,CACnB,yBACW,YACG,CACb,kBAAmB,CACpB,yBACW,SACA,CACX,yBACW,SACA,CACV,iBAAkB,CACnB,yBACW,qCAC4B,CACtC,cAAe,CACf,eAAgB,CAChB,QAAS,CACT,aAAc,CACd,WAAY,CACb,+BACiB,iBACE,CAClB,iBAAkB,CACnB,qBACO,UACK,CACX,YAAa,CACb,wBAAyB,CACzB,kBAAmB,CACnB,WAAY,CACb,4BACc,iBACK,CAClB,iCAAkC,CACnC,qCACuB,oBACD,CACrB,aAAc,CACd,eAAgB,CAChB,iBAAkB,CACnB,gCACkB,YACJ,CACb,kBAAmB,CACnB,kBAAmB,CACnB,cAAe,CAChB,4BACc,wBACY,CACzB,aAAc,CACd,qBAAsB,CACtB,cAAe,CACf,wBAAyB,CACzB,cAAe,CAChB,kCACoB,qBACG,CACtB,aAAc,CACd,wBAAyB,CAC1B,kCACoB,YACN,CACd,0BACY,oBACU,CACrB,aAAc;AC5NlB,6tcAA6tc","sourcesContent":["\n\n\n\n
\n
\n

Mermaid Live Editor

\n
\n
\n
\n Diagram presets:\n {#each Object.keys(samples) as diagramType, i}\n loadSampleDiagram(diagramType)}>\n {diagramType}\n \n {/each}\n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n Powered by mermaid\n {mermaidVersion}\n
\n
\n","#body.svelte-mx8k4g{font-family:'Roboto', sans-serif;background-color:#fcfbfc}#editor-root.svelte-mx8k4g{display:flex;height:100%}#col1.svelte-mx8k4g{width:35%}#col2.svelte-mx8k4g{width:65%;padding-left:32px}#link-root.svelte-mx8k4g{display:flex;height:fit-content}#link-col1.svelte-mx8k4g{width:50%}#link-col2.svelte-mx8k4g{width:50%;padding-left:32px}#app-title.svelte-mx8k4g{font-family:'Playfair Display', serif;font-size:32px;font-weight:700;margin:0;color:#1e60ab;opacity:0.8}#title-container.svelte-mx8k4g{width:fit-content;margin:0 auto 8px}#power.svelte-mx8k4g{width:100%;display:flex;justify-content:flex-end;align-items:center;height:4rem}#sampleLoader.svelte-mx8k4g{padding-left:10px;border-bottom:1px solid lightgray}#historyLoaderSubTitle.svelte-mx8k4g{display:inline-block;color:#33a2c4;font-size:small;font-style:italic}.button-container.svelte-mx8k4g{display:flex;align-items:center;flex-direction:row;flex-wrap:wrap}.button-style.svelte-mx8k4g{background-color:#a2d9e2;color:#33a2c4;border-radius:0.25rem;padding:0.5rem;border:1px solid #a2d9e2;margin:0.25rem}.button-style.svelte-mx8k4g:hover{background-color:#fff;color:#33a2c4;border:1px solid #33a2c4}.button-style.svelte-mx8k4g:focus{outline:none}.link-style.svelte-mx8k4g{text-decoration:none;color:#33a2c4}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRWRpdC5zdmVsdGUiLCJzb3VyY2VzIjpbIkVkaXQuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgeyBjb2RlU3RvcmUsIHVwZGF0ZUNvZGUsIHVwZGF0ZUNvZGVTdG9yZSB9IGZyb20gJy4uL2NvZGUtc3RvcmUuanMnO1xuICBpbXBvcnQgRWRpdG9yIGZyb20gJy4uL2NvbXBvbmVudHMvRWRpdG9yLnN2ZWx0ZSc7XG4gIGltcG9ydCBDb25maWcgZnJvbSAnLi4vY29tcG9uZW50cy9Db25maWcuc3ZlbHRlJztcbiAgaW1wb3J0IFZpZXcgZnJvbSAnLi4vY29tcG9uZW50cy9WaWV3LnN2ZWx0ZSc7XG4gIGltcG9ydCBDYXJkIGZyb20gJy4uL2NvbXBvbmVudHMvQ2FyZC5zdmVsdGUnO1xuICBpbXBvcnQgVGFnIGZyb20gJy4uL2NvbXBvbmVudHMvVGFnLnN2ZWx0ZSc7XG4gIGltcG9ydCBMaW5rcyBmcm9tICcuLi9jb21wb25lbnRzL0xpbmtzLnN2ZWx0ZSc7XG4gIGltcG9ydCB7IGZyb21VcmwgfSBmcm9tICcuLi9jb2RlLXN0b3JlLmpzJztcbiAgaW1wb3J0IHBrZyBmcm9tICdAbWVybWFpZC9wYWNrYWdlLmpzb24nO1xuICBpbXBvcnQgbW9tZW50IGZyb20gJ21vbWVudCc7XG4gIGV4cG9ydCBsZXQgbWVybWFpZFZlcnNpb24gPSBwa2cudmVyc2lvbjtcbiAgbGV0IGhpc3RvcnlMaXN0ID0gW107XG4gIG9uTW91bnQoYXN5bmMgKCkgPT4ge1xuICAgIGdhKCdzZW5kJywgJ3BhZ2V2aWV3Jyk7XG4gICAgZ2EoJ3NlbmQnLCAnZXZlbnQnLCAndmVyc2lvbicsIG1lcm1haWRWZXJzaW9uLCBtZXJtYWlkVmVyc2lvbik7XG5cbiAgICBjb25zdCBoaXN0b3J5TGlzdEtleSA9ICdfbWVybWFpZF9oaXN0b3J5Xyc7XG4gICAgaGlzdG9yeUxpc3QgPSBKU09OLnBhcnNlKGxvY2FsU3RvcmFnZS5nZXRJdGVtKGhpc3RvcnlMaXN0S2V5KSB8fCAnW10nKTtcbiAgICBsZXQgaGlzQ29kZSA9XG4gICAgICBoaXN0b3J5TGlzdC5sZW5ndGggPiAwID8gaGlzdG9yeUxpc3RbaGlzdG9yeUxpc3QubGVuZ3RoIC0gMV0gOiBudWxsO1xuXG4gICAgaWYgKHBhcmFtcy5kYXRhKSB7XG4gICAgICBmcm9tVXJsKHBhcmFtcy5kYXRhKTtcbiAgICB9IGVsc2UgaWYgKGhpc0NvZGUpIHtcbiAgICAgIHVwZGF0ZUNvZGVTdG9yZSh7XG4gICAgICAgIGNvZGU6IGhpc0NvZGUuY29kZSxcbiAgICAgICAgbWVybWFpZDoge30sXG4gICAgICAgIHVwZGF0ZUVkaXRvcjogdHJ1ZSxcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICBsb2FkU2FtcGxlRGlhZ3JhbSgnRmxvdyBDaGFydCcpO1xuICAgIH1cblxuICAgIGxldCBjb2RlID0gbnVsbDtcbiAgICBjb2RlU3RvcmUuc3Vic2NyaWJlKChzdGF0ZSkgPT4ge1xuICAgICAgY29kZSA9IChzdGF0ZSAmJiBzdGF0ZS5jb2RlKSB8fCBjb2RlO1xuICAgIH0pO1xuXG4gICAgc2V0SW50ZXJ2YWwoKCkgPT4ge1xuICAgICAgaWYgKGNvZGUgIT0gaGlzQ29kZSkge1xuICAgICAgICAvL3NhdmUgaGlzdG9yeVxuICAgICAgICBoaXN0b3J5TGlzdC51bnNoaWZ0KHtcbiAgICAgICAgICB0aW1lOiBuZXcgRGF0ZSgpLnRvSVNPU3RyaW5nKCksXG4gICAgICAgICAgY29kZTogKGhpc0NvZGUgPSBjb2RlKSxcbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChoaXN0b3J5TGlzdC5sZW5ndGggPiAxMCkge1xuICAgICAgICAgIGhpc3RvcnlMaXN0LnBvcCgpO1xuICAgICAgICB9XG4gICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKGhpc3RvcnlMaXN0S2V5LCBKU09OLnN0cmluZ2lmeShoaXN0b3J5TGlzdCkpO1xuICAgICAgfVxuICAgICAgaGlzdG9yeUxpc3QgPSBoaXN0b3J5TGlzdDsgLy90cmlnZ2VyZWQgdXBkYXRlXG4gICAgfSwgMSAqIDYwICogMTAwMCk7XG4gIH0pO1xuXG4gIGV4cG9ydCBsZXQgcGFyYW1zID0ge307XG4gIGNvbnN0IHNhbXBsZXMgPSB7XG4gICAgJ0Zsb3cgQ2hhcnQnOiBgZ3JhcGggVERcbiAgICBBW0NocmlzdG1hc10gLS0+fEdldCBtb25leXwgQihHbyBzaG9wcGluZylcbiAgICBCIC0tPiBDe0xldCBtZSB0aGlua31cbiAgICBDIC0tPnxPbmV8IERbTGFwdG9wXVxuICAgIEMgLS0+fFR3b3wgRVtpUGhvbmVdXG4gICAgQyAtLT58VGhyZWV8IEZbZmE6ZmEtY2FyIENhcl1gLFxuICAgICdTZXF1ZW5jZSBEaWFncmFtJzogYHNlcXVlbmNlRGlhZ3JhbVxuICAgIEFsaWNlLT4+K0pvaG46IEhlbGxvIEpvaG4sIGhvdyBhcmUgeW91P1xuICAgIEFsaWNlLT4+K0pvaG46IEpvaG4sIGNhbiB5b3UgaGVhciBtZT9cbiAgICBKb2huLS0+Pi1BbGljZTogSGkgQWxpY2UsIEkgY2FuIGhlYXIgeW91IVxuICAgIEpvaG4tLT4+LUFsaWNlOiBJIGZlZWwgZ3JlYXQhXG4gICAgICAgICAgICBgLFxuICAgICdDbGFzcyBEaWFncmFtJzogYGNsYXNzRGlhZ3JhbVxuICAgIEFuaW1hbCA8fC0tIER1Y2tcbiAgICBBbmltYWwgPHwtLSBGaXNoXG4gICAgQW5pbWFsIDx8LS0gWmVicmFcbiAgICBBbmltYWwgOiAraW50IGFnZVxuICAgIEFuaW1hbCA6ICtTdHJpbmcgZ2VuZGVyXG4gICAgQW5pbWFsOiAraXNNYW1tYWwoKVxuICAgIEFuaW1hbDogK21hdGUoKVxuICAgIGNsYXNzIER1Y2t7XG4gICAgICArU3RyaW5nIGJlYWtDb2xvclxuICAgICAgK3N3aW0oKVxuICAgICAgK3F1YWNrKClcbiAgICB9XG4gICAgY2xhc3MgRmlzaHtcbiAgICAgIC1pbnQgc2l6ZUluRmVldFxuICAgICAgLWNhbkVhdCgpXG4gICAgfVxuICAgIGNsYXNzIFplYnJhe1xuICAgICAgK2Jvb2wgaXNfd2lsZFxuICAgICAgK3J1bigpXG4gICAgfVxuICAgICAgICAgICAgYCxcbiAgICAnU3RhdGUgRGlhZ3JhbSc6IGBzdGF0ZURpYWdyYW0tdjJcbiAgICBbKl0gLS0+IFN0aWxsXG4gICAgU3RpbGwgLS0+IFsqXVxuICAgIFN0aWxsIC0tPiBNb3ZpbmdcbiAgICBNb3ZpbmcgLS0+IFN0aWxsXG4gICAgTW92aW5nIC0tPiBDcmFzaFxuICAgIENyYXNoIC0tPiBbKl1cbiAgICAgICAgICAgIGAsXG4gICAgJ0dhbnR0IENoYXJ0JzogYGdhbnR0XG4gICAgdGl0bGUgQSBHYW50dCBEaWFncmFtXG4gICAgZGF0ZUZvcm1hdCAgWVlZWS1NTS1ERFxuICAgIHNlY3Rpb24gU2VjdGlvblxuICAgIEEgdGFzayAgICAgICAgICAgOmExLCAyMDE0LTAxLTAxLCAzMGRcbiAgICBBbm90aGVyIHRhc2sgICAgIDphZnRlciBhMSAgLCAyMGRcbiAgICBzZWN0aW9uIEFub3RoZXJcbiAgICBUYXNrIGluIHNlYyAgICAgIDoyMDE0LTAxLTEyICAsIDEyZFxuICAgIGFub3RoZXIgdGFzayAgICAgIDogMjRkXG4gICAgICAgICAgICBgLFxuICAgICdQaWUgQ2hhcnQnOiBgcGllIHRpdGxlIFBldHMgYWRvcHRlZCBieSB2b2x1bnRlZXJzXG4gICAgXCJEb2dzXCIgOiAzODZcbiAgICBcIkNhdHNcIiA6IDg1XG4gICAgXCJSYXRzXCIgOiAxNVxuICAgICAgICAgICAgYCxcbiAgICAnRVIgRGlhZ3JhbSc6IGBlckRpYWdyYW1cbiAgICAgICAgICBDVVNUT01FUiB9fC4ufHsgREVMSVZFUlktQUREUkVTUyA6IGhhc1xuICAgICAgICAgIENVU1RPTUVSIHx8LS1veyBPUkRFUiA6IHBsYWNlc1xuICAgICAgICAgIENVU1RPTUVSIHx8LS1veyBJTlZPSUNFIDogXCJsaWFibGUgZm9yXCJcbiAgICAgICAgICBERUxJVkVSWS1BRERSRVNTIHx8LS1veyBPUkRFUiA6IHJlY2VpdmVzXG4gICAgICAgICAgSU5WT0lDRSB8fC0tfHsgT1JERVIgOiBjb3ZlcnNcbiAgICAgICAgICBPUkRFUiB8fC0tfHsgT1JERVItSVRFTSA6IGluY2x1ZGVzXG4gICAgICAgICAgUFJPRFVDVC1DQVRFR09SWSB8fC0tfHsgUFJPRFVDVCA6IGNvbnRhaW5zXG4gICAgICAgICAgUFJPRFVDVCB8fC0tb3sgT1JERVItSVRFTSA6IFwib3JkZXJlZCBpblwiXG4gICAgICAgICAgICBgLFxuICB9O1xuXG4gIGZ1bmN0aW9uIGxvYWRTYW1wbGVEaWFncmFtKGRpYWdyYW1UeXBlKSB7XG4gICAgdG9VcGRhdGVDb2RlU3RvcmUoc2FtcGxlc1tkaWFncmFtVHlwZV0pO1xuICB9XG5cbiAgZnVuY3Rpb24gdG9VcGRhdGVDb2RlU3RvcmUoY29kZSkge1xuICAgIGlmICghY29kZSkgcmV0dXJuO1xuICAgIHVwZGF0ZUNvZGUoY29kZSwgdHJ1ZSk7XG4gIH1cblxuICBmdW5jdGlvbiByZWxhdGl2ZVRpbWUodCkge1xuICAgIHJldHVybiBgJHttb21lbnQodCkuZnJvbU5vdygpfSAoJHtuZXcgRGF0ZSh0KS50b0xvY2FsZVN0cmluZygpfSlgO1xuICB9XG48L3NjcmlwdD5cblxuPHN0eWxlPlxuICAjYm9keSB7XG4gICAgZm9udC1mYW1pbHk6ICdSb2JvdG8nLCBzYW5zLXNlcmlmO1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmY2ZiZmM7XG4gIH1cbiAgI2VkaXRvci1yb290IHtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGhlaWdodDogMTAwJTtcbiAgfVxuICAjY29sMSB7XG4gICAgd2lkdGg6IDM1JTtcbiAgfVxuICAjY29sMiB7XG4gICAgd2lkdGg6IDY1JTtcbiAgICBwYWRkaW5nLWxlZnQ6IDMycHg7XG4gIH1cbiAgI2xpbmstcm9vdCB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBoZWlnaHQ6IGZpdC1jb250ZW50O1xuICB9XG4gICNsaW5rLWNvbDEge1xuICAgIHdpZHRoOiA1MCU7XG4gIH1cbiAgI2xpbmstY29sMiB7XG4gICAgd2lkdGg6IDUwJTtcbiAgICBwYWRkaW5nLWxlZnQ6IDMycHg7XG4gIH1cbiAgI2FwcC10aXRsZSB7XG4gICAgZm9udC1mYW1pbHk6ICdQbGF5ZmFpciBEaXNwbGF5Jywgc2VyaWY7XG4gICAgZm9udC1zaXplOiAzMnB4O1xuICAgIGZvbnQtd2VpZ2h0OiA3MDA7XG4gICAgbWFyZ2luOiAwO1xuICAgIGNvbG9yOiAjMWU2MGFiO1xuICAgIG9wYWNpdHk6IDAuODtcbiAgfVxuICAjdGl0bGUtY29udGFpbmVyIHtcbiAgICB3aWR0aDogZml0LWNvbnRlbnQ7XG4gICAgbWFyZ2luOiAwIGF1dG8gOHB4O1xuICB9XG4gICNwb3dlciB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgaGVpZ2h0OiA0cmVtO1xuICB9XG4gICNzYW1wbGVMb2FkZXIge1xuICAgIHBhZGRpbmctbGVmdDogMTBweDtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgbGlnaHRncmF5O1xuICB9XG4gICNoaXN0b3J5TG9hZGVyU3ViVGl0bGUge1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgICBmb250LXNpemU6IHNtYWxsO1xuICAgIGZvbnQtc3R5bGU6IGl0YWxpYztcbiAgfVxuICAuYnV0dG9uLWNvbnRhaW5lciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgZmxleC13cmFwOiB3cmFwO1xuICB9XG4gIC5idXR0b24tc3R5bGUge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNhMmQ5ZTI7XG4gICAgY29sb3I6ICMzM2EyYzQ7XG4gICAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgICBwYWRkaW5nOiAwLjVyZW07XG4gICAgYm9yZGVyOiAxcHggc29saWQgI2EyZDllMjtcbiAgICBtYXJnaW46IDAuMjVyZW07XG4gIH1cbiAgLmJ1dHRvbi1zdHlsZTpob3ZlciB7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjMzNhMmM0O1xuICB9XG4gIC5idXR0b24tc3R5bGU6Zm9jdXMge1xuICAgIG91dGxpbmU6IG5vbmU7XG4gIH1cbiAgLmxpbmstc3R5bGUge1xuICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgICBjb2xvcjogIzMzYTJjNDtcbiAgfVxuPC9zdHlsZT5cblxuPGRpdiBpZD1cImJvZHlcIj5cbiAgPGRpdiBpZD1cInRpdGxlLWNvbnRhaW5lclwiPlxuICAgIDxoMSBpZD1cImFwcC10aXRsZVwiPk1lcm1haWQgTGl2ZSBFZGl0b3I8L2gxPlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cInNhbXBsZUxvYWRlclwiPlxuICAgIDxkaXYgY2xhc3M9XCJidXR0b24tY29udGFpbmVyXCI+XG4gICAgICA8c3BhbiBpZD1cInNhbXBsZUxvYWRlclRpdGxlXCI+PHN0cm9uZz5EaWFncmFtIHByZXNldHM6PC9zdHJvbmc+PC9zcGFuPlxuICAgICAgeyNlYWNoIE9iamVjdC5rZXlzKHNhbXBsZXMpIGFzIGRpYWdyYW1UeXBlLCBpfVxuICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgY2xhc3M9XCJidXR0b24tc3R5bGVcIlxuICAgICAgICAgIG9uOmNsaWNrPXsoZSkgPT4gbG9hZFNhbXBsZURpYWdyYW0oZGlhZ3JhbVR5cGUpfT5cbiAgICAgICAgICB7ZGlhZ3JhbVR5cGV9XG4gICAgICAgIDwvYnV0dG9uPlxuICAgICAgey9lYWNofVxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cImVkaXRvci1yb290XCI+XG4gICAgPGRpdiBpZD1cImNvbDFcIj5cbiAgICAgIDxDYXJkIHRpdGxlPVwiQ29kZVwiIG5vUGFkZGluZz1cInRydWVcIj5cbiAgICAgICAgPEVkaXRvciBkYXRhPXtwYXJhbXMuZGF0YX0gLz5cbiAgICAgIDwvQ2FyZD5cbiAgICAgIDxDYXJkIHRpdGxlPVwiTWVybWFpZCBDb25maWd1cmF0aW9uXCI+XG4gICAgICAgIDxDb25maWcgLz5cbiAgICAgIDwvQ2FyZD5cbiAgICA8L2Rpdj5cbiAgICA8ZGl2IGlkPVwiY29sMlwiPlxuICAgICAgPENhcmQgdGl0bGU9XCJQcmV2aWV3XCI+XG4gICAgICAgIDxWaWV3IC8+XG4gICAgICA8L0NhcmQ+XG4gICAgICA8ZGl2IGlkPVwibGluay1yb290XCI+XG4gICAgICAgIDxkaXYgaWQ9XCJsaW5rLWNvbDFcIj5cbiAgICAgICAgICA8Q2FyZCB0aXRsZT1cIkVkaXRpbmcgaGlzdG9yeVwiPlxuICAgICAgICAgICAgPHNwYW4gaWQ9XCJoaXN0b3J5TG9hZGVyU3ViVGl0bGVcIj5BdXRvbWF0aWNhbGx5IHNhdmVzIG9uY2UgZXZlcnlcbiAgICAgICAgICAgICAgbWludXRlLCB1cCB0byAxMCByZWNvcmRzLjwvc3Bhbj5cbiAgICAgICAgICAgIDxiciAvPlxuICAgICAgICAgICAgPGRpdiBpZD1cImhpc3RvcnlMaXN0XCIgY2xhc3M9XCJidXR0b24tY29udGFpbmVyXCI+XG4gICAgICAgICAgICAgIHsjaWYgaGlzdG9yeUxpc3QubGVuZ3RoID4gMH1cbiAgICAgICAgICAgICAgICB7I2VhY2ggaGlzdG9yeUxpc3QgYXMgaXRlbSwgaX1cbiAgICAgICAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJidXR0b24tc3R5bGVcIlxuICAgICAgICAgICAgICAgICAgICBvbjpjbGljaz17KGUpID0+IHRvVXBkYXRlQ29kZVN0b3JlKGl0ZW0uY29kZSl9PlxuICAgICAgICAgICAgICAgICAgICB7cmVsYXRpdmVUaW1lKGl0ZW0udGltZSl9XG4gICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICB7L2VhY2h9XG4gICAgICAgICAgICAgIHs6ZWxzZX1ObyByZWNvcmRzLnsvaWZ9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICA8L0NhcmQ+XG4gICAgICAgICAgPENhcmQgdGl0bGU9XCJMaW5rc1wiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJ1dHRvbi1jb250YWluZXJcIj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9tZXJtYWlkLWpzLmdpdGh1Yi5pby9tZXJtYWlkXCJcbiAgICAgICAgICAgICAgICAgIHRhcmdldD1cIl9ibGFua1wiXG4gICAgICAgICAgICAgICAgICBjbGFzcz1cImxpbmstc3R5bGVcIj5cbiAgICAgICAgICAgICAgICAgIE1lcm1haWQgRG9jdW1lbnRhdGlvblxuICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZC9ibG9iL21hc3Rlci9kb2NzL2dldHRpbmctc3RhcnRlZC9UdXRvcmlhbHMubWRcIlxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImxpbmstc3R5bGVcIj5cbiAgICAgICAgICAgICAgICAgICAgTGl2ZSBFZGl0b3IgVmlkZW8gVHV0b3JpYWxzXG4gICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZFwiXG4gICAgICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICAgICAgY2xhc3M9XCJsaW5rLXN0eWxlXCI+XG4gICAgICAgICAgICAgICAgICBNZXJtYWlkIG9uIEdpdEh1YlxuICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidXR0b24tc3R5bGVcIj5cbiAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgaHJlZj1cImh0dHBzOi8vZ2l0aHViLmNvbS9tZXJtYWlkLWpzL21lcm1haWQtbGl2ZS1lZGl0b3JcIlxuICAgICAgICAgICAgICAgICAgdGFyZ2V0PVwiX2JsYW5rXCJcbiAgICAgICAgICAgICAgICAgIGNsYXNzPVwibGluay1zdHlsZVwiPlxuICAgICAgICAgICAgICAgICAgTGl2ZSBFZGl0b3Igb24gR2l0SHViXG4gICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ1dHRvbi1zdHlsZVwiPlxuICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICBocmVmPVwiaHR0cHM6Ly9naXRodWIuY29tL21lcm1haWQtanMvbWVybWFpZC1jbGlcIlxuICAgICAgICAgICAgICAgICAgdGFyZ2V0PVwiX2JsYW5rXCJcbiAgICAgICAgICAgICAgICAgIGNsYXNzPVwibGluay1zdHlsZVwiPlxuICAgICAgICAgICAgICAgICAgTWVybWFpZCBDTElcbiAgICAgICAgICAgICAgICA8L2E+XG4gICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9DYXJkPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBpZD1cImxpbmstY29sMlwiPlxuICAgICAgICAgIDxDYXJkIHRpdGxlPVwiQWN0aW9uc1wiPlxuICAgICAgICAgICAgPExpbmtzIC8+XG4gICAgICAgICAgPC9DYXJkPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbiAgPGRpdiBpZD1cInBvd2VyXCI+XG4gICAgUG93ZXJlZCBieSBtZXJtYWlkXG4gICAgPFRhZyBjb2xvcj1cImdyZWVuXCI+e21lcm1haWRWZXJzaW9ufTwvVGFnPlxuICA8L2Rpdj5cbjwvZGl2PlxuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQThJRSxLQUFLLGNBQUMsQ0FBQyxBQUNMLFdBQVcsQ0FBRSxRQUFRLENBQUMsQ0FBQyxVQUFVLENBQ2pDLGdCQUFnQixDQUFFLE9BQU8sQUFDM0IsQ0FBQyxBQUNELFlBQVksY0FBQyxDQUFDLEFBQ1osT0FBTyxDQUFFLElBQUksQ0FDYixNQUFNLENBQUUsSUFBSSxBQUNkLENBQUMsQUFDRCxLQUFLLGNBQUMsQ0FBQyxBQUNMLEtBQUssQ0FBRSxHQUFHLEFBQ1osQ0FBQyxBQUNELEtBQUssY0FBQyxDQUFDLEFBQ0wsS0FBSyxDQUFFLEdBQUcsQ0FDVixZQUFZLENBQUUsSUFBSSxBQUNwQixDQUFDLEFBQ0QsVUFBVSxjQUFDLENBQUMsQUFDVixPQUFPLENBQUUsSUFBSSxDQUNiLE1BQU0sQ0FBRSxXQUFXLEFBQ3JCLENBQUMsQUFDRCxVQUFVLGNBQUMsQ0FBQyxBQUNWLEtBQUssQ0FBRSxHQUFHLEFBQ1osQ0FBQyxBQUNELFVBQVUsY0FBQyxDQUFDLEFBQ1YsS0FBSyxDQUFFLEdBQUcsQ0FDVixZQUFZLENBQUUsSUFBSSxBQUNwQixDQUFDLEFBQ0QsVUFBVSxjQUFDLENBQUMsQUFDVixXQUFXLENBQUUsa0JBQWtCLENBQUMsQ0FBQyxLQUFLLENBQ3RDLFNBQVMsQ0FBRSxJQUFJLENBQ2YsV0FBVyxDQUFFLEdBQUcsQ0FDaEIsTUFBTSxDQUFFLENBQUMsQ0FDVCxLQUFLLENBQUUsT0FBTyxDQUNkLE9BQU8sQ0FBRSxHQUFHLEFBQ2QsQ0FBQyxBQUNELGdCQUFnQixjQUFDLENBQUMsQUFDaEIsS0FBSyxDQUFFLFdBQVcsQ0FDbEIsTUFBTSxDQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxBQUNwQixDQUFDLEFBQ0QsTUFBTSxjQUFDLENBQUMsQUFDTixLQUFLLENBQUUsSUFBSSxDQUNYLE9BQU8sQ0FBRSxJQUFJLENBQ2IsZUFBZSxDQUFFLFFBQVEsQ0FDekIsV0FBVyxDQUFFLE1BQU0sQ0FDbkIsTUFBTSxDQUFFLElBQUksQUFDZCxDQUFDLEFBQ0QsYUFBYSxjQUFDLENBQUMsQUFDYixZQUFZLENBQUUsSUFBSSxDQUNsQixhQUFhLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLEFBQ3BDLENBQUMsQUFDRCxzQkFBc0IsY0FBQyxDQUFDLEFBQ3RCLE9BQU8sQ0FBRSxZQUFZLENBQ3JCLEtBQUssQ0FBRSxPQUFPLENBQ2QsU0FBUyxDQUFFLEtBQUssQ0FDaEIsVUFBVSxDQUFFLE1BQU0sQUFDcEIsQ0FBQyxBQUNELGlCQUFpQixjQUFDLENBQUMsQUFDakIsT0FBTyxDQUFFLElBQUksQ0FDYixXQUFXLENBQUUsTUFBTSxDQUNuQixjQUFjLENBQUUsR0FBRyxDQUNuQixTQUFTLENBQUUsSUFBSSxBQUNqQixDQUFDLEFBQ0QsYUFBYSxjQUFDLENBQUMsQUFDYixnQkFBZ0IsQ0FBRSxPQUFPLENBQ3pCLEtBQUssQ0FBRSxPQUFPLENBQ2QsYUFBYSxDQUFFLE9BQU8sQ0FDdEIsT0FBTyxDQUFFLE1BQU0sQ0FDZixNQUFNLENBQUUsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQ3pCLE1BQU0sQ0FBRSxPQUFPLEFBQ2pCLENBQUMsQUFDRCwyQkFBYSxNQUFNLEFBQUMsQ0FBQyxBQUNuQixnQkFBZ0IsQ0FBRSxJQUFJLENBQ3RCLEtBQUssQ0FBRSxPQUFPLENBQ2QsTUFBTSxDQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsT0FBTyxBQUMzQixDQUFDLEFBQ0QsMkJBQWEsTUFBTSxBQUFDLENBQUMsQUFDbkIsT0FBTyxDQUFFLElBQUksQUFDZixDQUFDLEFBQ0QsV0FBVyxjQUFDLENBQUMsQUFDWCxlQUFlLENBQUUsSUFBSSxDQUNyQixLQUFLLENBQUUsT0FBTyxBQUNoQixDQUFDIn0=*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +var EOL = {}, + EOF = {}, + QUOTE = 34, + NEWLINE = 10, + RETURN = 13; +function objectConverter(columns) { + return new Function("d", "return {" + columns.map(function(name, i) { + return JSON.stringify(name) + ": d[" + i + "] || \"\""; + }).join(",") + "}"); +} -/***/ }), +function customConverter(columns, f) { + var object = objectConverter(columns); + return function(row, i) { + return f(object(row), i, columns); + }; +} -/***/ "./node_modules/css-loader/dist/cjs.js!./src/routes/View.svelte.css": -/*!**************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./src/routes/View.svelte.css ***! - \**************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// Compute unique columns in order of discovery. +function inferColumns(rows) { + var columnSet = Object.create(null), + columns = []; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports + rows.forEach(function(row) { + for (var column in row) { + if (!(column in columnSet)) { + columns.push(columnSet[column] = column); + } + } + }); + return columns; +} -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); -// Module -___CSS_LOADER_EXPORT___.push([module.i, "#view-page.svelte-clxwlp{display:flex;height:100%}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmlldy5zdmVsdGUiLCJzb3VyY2VzIjpbIlZpZXcuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgVmlldyBmcm9tICcuLi9jb21wb25lbnRzL1ZpZXcuc3ZlbHRlJztcblxuICBvbk1vdW50KGFzeW5jICgpID0+IHtcbiAgICBnYSgnc2VuZCcsICdwYWdldmlldycpO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICN2aWV3LXBhZ2Uge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgaGVpZ2h0OiAxMDAlO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwidmlldy1wYWdlXCI+XG4gIDxWaWV3IC8+XG48L2Rpdj5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVRSxVQUFVLGNBQUMsQ0FBQyxBQUNWLE9BQU8sQ0FBRSxJQUFJLENBQ2IsTUFBTSxDQUFFLElBQUksQUFDZCxDQUFDIn0=*/", "",{"version":3,"sources":["webpack://./src/routes/View.svelte","webpack://./src/routes/View.svelte.css"],"names":[],"mappings":"AAUE,yBAAY,YACG,CACb,WAAY;ACXhB,yrBAAyrB","sourcesContent":["\n\n\n\n
\n \n
\n","#view-page.svelte-clxwlp{display:flex;height:100%}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmlldy5zdmVsdGUiLCJzb3VyY2VzIjpbIlZpZXcuc3ZlbHRlIl0sInNvdXJjZXNDb250ZW50IjpbIjxzY3JpcHQ+XG4gIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xuICBpbXBvcnQgVmlldyBmcm9tICcuLi9jb21wb25lbnRzL1ZpZXcuc3ZlbHRlJztcblxuICBvbk1vdW50KGFzeW5jICgpID0+IHtcbiAgICBnYSgnc2VuZCcsICdwYWdldmlldycpO1xuICB9KTtcbjwvc2NyaXB0PlxuXG48c3R5bGU+XG4gICN2aWV3LXBhZ2Uge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgaGVpZ2h0OiAxMDAlO1xuICB9XG48L3N0eWxlPlxuXG48ZGl2IGlkPVwidmlldy1wYWdlXCI+XG4gIDxWaWV3IC8+XG48L2Rpdj5cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVRSxVQUFVLGNBQUMsQ0FBQyxBQUNWLE9BQU8sQ0FBRSxJQUFJLENBQ2IsTUFBTSxDQUFFLElBQUksQUFDZCxDQUFDIn0=*/"],"sourceRoot":""}]); -// Exports -/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); +function pad(value, width) { + var s = value + "", length = s.length; + return length < width ? new Array(width - length + 1).join(0) + s : s; +} +function formatYear(year) { + return year < 0 ? "-" + pad(-year, 6) + : year > 9999 ? "+" + pad(year, 6) + : pad(year, 4); +} -/***/ }), +function formatDate(date) { + var hours = date.getUTCHours(), + minutes = date.getUTCMinutes(), + seconds = date.getUTCSeconds(), + milliseconds = date.getUTCMilliseconds(); + return isNaN(date) ? "Invalid Date" + : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) + + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" + : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" + : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" + : ""); +} -/***/ "./node_modules/css-loader/dist/runtime/api.js": -/*!*****************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/api.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/* harmony default export */ __webpack_exports__["default"] = (function(delimiter) { + var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), + DELIMITER = delimiter.charCodeAt(0); -"use strict"; + function parse(text, f) { + var convert, columns, rows = parseRows(text, function(row, i) { + if (convert) return convert(row, i - 1); + columns = row, convert = f ? customConverter(row, f) : objectConverter(row); + }); + rows.columns = columns || []; + return rows; + } + function parseRows(text, f) { + var rows = [], // output rows + N = text.length, + I = 0, // current character index + n = 0, // current line number + t, // current token + eof = N <= 0, // current token followed by EOF? + eol = false; // current token followed by EOL? -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names -module.exports = function (cssWithMappingToString) { - var list = []; // return the list of modules as css string + // Strip the trailing newline. + if (text.charCodeAt(N - 1) === NEWLINE) --N; + if (text.charCodeAt(N - 1) === RETURN) --N; - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item); + function token() { + if (eof) return EOF; + if (eol) return eol = false, EOL; - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); + // Unescape quotes. + var i, j = I, c; + if (text.charCodeAt(j) === QUOTE) { + while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); + if ((i = I) >= N) eof = true; + else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + return text.slice(j + 1, i - 1).replace(/""/g, "\""); } - return content; - }).join(""); - }; // import a list of modules into the list - // eslint-disable-next-line func-names + // Find next delimiter or newline. + while (I < N) { + if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + else if (c !== DELIMITER) continue; + return text.slice(j, i); + } + // Return last token before EOF. + return eof = true, text.slice(j, N); + } - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === "string") { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, ""]]; + while ((t = token()) !== EOF) { + var row = []; + while (t !== EOL && t !== EOF) row.push(t), t = token(); + if (f && (row = f(row, n++)) == null) continue; + rows.push(row); } - var alreadyImportedModules = {}; + return rows; + } - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; + function preformatBody(rows, columns) { + return rows.map(function(row) { + return columns.map(function(column) { + return formatValue(row[column]); + }).join(delimiter); + }); + } - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } + function format(rows, columns) { + if (columns == null) columns = inferColumns(rows); + return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); + } - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); + function formatBody(rows, columns) { + if (columns == null) columns = inferColumns(rows); + return preformatBody(rows, columns).join("\n"); + } - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } + function formatRows(rows) { + return rows.map(formatRow).join("\n"); + } - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } + function formatRow(row) { + return row.map(formatValue).join(delimiter); + } - list.push(item); - } + function formatValue(value) { + return value == null ? "" + : value instanceof Date ? formatDate(value) + : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" + : value; + } + + return { + parse: parse, + parseRows: parseRows, + format: format, + formatBody: formatBody, + formatRows: formatRows, + formatRow: formatRow, + formatValue: formatValue }; +}); - return list; -}; /***/ }), -/***/ "./node_modules/css-loader/dist/runtime/cssWithMappingToString.js": -/*!************************************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/cssWithMappingToString.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./node_modules/d3-dsv/src/index.js": +/*!******************************************!*\ + !*** ./node_modules/d3-dsv/src/index.js ***! + \******************************************/ +/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ "./node_modules/d3-dsv/src/csv.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParse"]; }); -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParseRows"]; }); -function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormat"]; }); -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatBody"]; }); -module.exports = function cssWithMappingToString(item) { - var _item = _slicedToArray(item, 4), - content = _item[1], - cssMapping = _item[3]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRows"]; }); - if (typeof btoa === "function") { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); - var sourceMapping = "/*# ".concat(data, " */"); - var sourceURLs = cssMapping.sources.map(function (source) { - return "/*# sourceURL=".concat(cssMapping.sourceRoot || "").concat(source, " */"); - }); - return [content].concat(sourceURLs).concat([sourceMapping]).join("\n"); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRow"]; }); - return [content].join("\n"); -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatValue"]; }); -/***/ }), +/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ "./node_modules/d3-dsv/src/tsv.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParse"]; }); -/***/ "./node_modules/css-loader/dist/runtime/getUrl.js": -/*!********************************************************!*\ - !*** ./node_modules/css-loader/dist/runtime/getUrl.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParseRows"]; }); -"use strict"; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormat"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatBody"]; }); -module.exports = function (url, options) { - if (!options) { - // eslint-disable-next-line no-param-reassign - options = {}; - } // eslint-disable-next-line no-underscore-dangle, no-param-reassign +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRows"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRow"]; }); - url = url && url.__esModule ? url.default : url; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatValue"]; }); - if (typeof url !== "string") { - return url; - } // If url is already wrapped in quotes, remove them +/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ "./node_modules/d3-dsv/src/autoType.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - if (/^['"].*['"]$/.test(url)) { - // eslint-disable-next-line no-param-reassign - url = url.slice(1, -1); - } - if (options.hash) { - // eslint-disable-next-line no-param-reassign - url += options.hash; - } // Should url be wrapped? - // See https://drafts.csswg.org/css-values-3/#urls - if (/["'() \t\n]/.test(url) || options.needQuotes) { - return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\""); - } - return url; -}; /***/ }), -/***/ "./node_modules/d3-array/src/array.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/array.js ***! - \********************************************/ -/*! exports provided: slice, map */ +/***/ "./node_modules/d3-dsv/src/tsv.js": +/*!****************************************!*\ + !*** ./node_modules/d3-dsv/src/tsv.js ***! + \****************************************/ +/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); -var array = Array.prototype; - -var slice = array.slice; -var map = array.map; - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return tsvFormatBody; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return tsvFormatRow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return tsvFormatValue; }); +/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); -/***/ }), -/***/ "./node_modules/d3-array/src/ascending.js": -/*!************************************************!*\ - !*** ./node_modules/d3-array/src/ascending.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])("\t"); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -}); +var tsvParse = tsv.parse; +var tsvParseRows = tsv.parseRows; +var tsvFormat = tsv.format; +var tsvFormatBody = tsv.formatBody; +var tsvFormatRows = tsv.formatRows; +var tsvFormatRow = tsv.formatRow; +var tsvFormatValue = tsv.formatValue; /***/ }), -/***/ "./node_modules/d3-array/src/bisect.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-array/src/bisect.js ***! - \*********************************************/ -/*! exports provided: bisectRight, bisectLeft, default */ +/***/ "./node_modules/d3-ease/src/back.js": +/*!******************************************!*\ + !*** ./node_modules/d3-ease/src/back.js ***! + \******************************************/ +/*! exports provided: backIn, backOut, backInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; }); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js"); -/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector */ "./node_modules/d3-array/src/bisector.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); +var overshoot = 1.70158; -var ascendingBisect = Object(_bisector__WEBPACK_IMPORTED_MODULE_1__["default"])(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"]); -var bisectRight = ascendingBisect.right; -var bisectLeft = ascendingBisect.left; -/* harmony default export */ __webpack_exports__["default"] = (bisectRight); +var backIn = (function custom(s) { + s = +s; + function backIn(t) { + return t * t * ((s + 1) * t - s); + } -/***/ }), + backIn.overshoot = custom; -/***/ "./node_modules/d3-array/src/bisector.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-array/src/bisector.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return backIn; +})(overshoot); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js"); +var backOut = (function custom(s) { + s = +s; + function backOut(t) { + return --t * t * ((s + 1) * t + s) + 1; + } -/* harmony default export */ __webpack_exports__["default"] = (function(compare) { - if (compare.length === 1) compare = ascendingComparator(compare); - return { - left: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - }, - right: function(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } - }; -}); + backOut.overshoot = custom; -function ascendingComparator(f) { - return function(d, x) { - return Object(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"])(f(d), x); - }; -} + return backOut; +})(overshoot); +var backInOut = (function custom(s) { + s = +s; -/***/ }), + function backInOut(t) { + return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; + } -/***/ "./node_modules/d3-array/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-array/src/constant.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + backInOut.overshoot = custom; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); + return backInOut; +})(overshoot); /***/ }), -/***/ "./node_modules/d3-array/src/cross.js": +/***/ "./node_modules/d3-ease/src/bounce.js": /*!********************************************!*\ - !*** ./node_modules/d3-array/src/cross.js ***! + !*** ./node_modules/d3-ease/src/bounce.js ***! \********************************************/ -/*! exports provided: default */ +/*! exports provided: bounceIn, bounceOut, bounceInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pairs */ "./node_modules/d3-array/src/pairs.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(values0, values1, reduce) { - var n0 = values0.length, - n1 = values1.length, - values = new Array(n0 * n1), - i0, - i1, - i, - value0; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); +var b1 = 4 / 11, + b2 = 6 / 11, + b3 = 8 / 11, + b4 = 3 / 4, + b5 = 9 / 11, + b6 = 10 / 11, + b7 = 15 / 16, + b8 = 21 / 22, + b9 = 63 / 64, + b0 = 1 / b1 / b1; - if (reduce == null) reduce = _pairs__WEBPACK_IMPORTED_MODULE_0__["pair"]; +function bounceIn(t) { + return 1 - bounceOut(1 - t); +} - for (i0 = i = 0; i0 < n0; ++i0) { - for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) { - values[i] = reduce(value0, values1[i1]); - } - } +function bounceOut(t) { + return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; +} - return values; -}); +function bounceInOut(t) { + return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/descending.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-array/src/descending.js ***! - \*************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-ease/src/circle.js": +/*!********************************************!*\ + !*** ./node_modules/d3-ease/src/circle.js ***! + \********************************************/ +/*! exports provided: circleIn, circleOut, circleInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); +function circleIn(t) { + return 1 - Math.sqrt(1 - t * t); +} + +function circleOut(t) { + return Math.sqrt(1 - --t * t); +} + +function circleInOut(t) { + return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/deviation.js": -/*!************************************************!*\ - !*** ./node_modules/d3-array/src/deviation.js ***! - \************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-ease/src/cubic.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-ease/src/cubic.js ***! + \*******************************************/ +/*! exports provided: cubicIn, cubicOut, cubicInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance */ "./node_modules/d3-array/src/variance.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); +function cubicIn(t) { + return t * t * t; +} +function cubicOut(t) { + return --t * t * t + 1; +} -/* harmony default export */ __webpack_exports__["default"] = (function(array, f) { - var v = Object(_variance__WEBPACK_IMPORTED_MODULE_0__["default"])(array, f); - return v ? Math.sqrt(v) : v; -}); +function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/extent.js": +/***/ "./node_modules/d3-ease/src/elastic.js": /*!*********************************************!*\ - !*** ./node_modules/d3-array/src/extent.js ***! + !*** ./node_modules/d3-ease/src/elastic.js ***! \*********************************************/ -/*! exports provided: default */ +/*! exports provided: elasticIn, elasticOut, elasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - i = -1, - value, - min, - max; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); +var tau = 2 * Math.PI, + amplitude = 1, + period = 0.3; - if (valueof == null) { - while (++i < n) { // Find the first comparable value. - if ((value = values[i]) != null && value >= value) { - min = max = value; - while (++i < n) { // Compare the remaining values. - if ((value = values[i]) != null) { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } - } +var elasticIn = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - else { - while (++i < n) { // Find the first comparable value. - if ((value = valueof(values[i], i, values)) != null && value >= value) { - min = max = value; - while (++i < n) { // Compare the remaining values. - if ((value = valueof(values[i], i, values)) != null) { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } + function elasticIn(t) { + return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p); } - return [min, max]; -}); - - -/***/ }), - -/***/ "./node_modules/d3-array/src/histogram.js": -/*!************************************************!*\ - !*** ./node_modules/d3-array/src/histogram.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + elasticIn.amplitude = function(a) { return custom(a, p * tau); }; + elasticIn.period = function(p) { return custom(a, p); }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-array/src/array.js"); -/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect */ "./node_modules/d3-array/src/bisect.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-array/src/constant.js"); -/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent */ "./node_modules/d3-array/src/extent.js"); -/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-array/src/identity.js"); -/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./range */ "./node_modules/d3-array/src/range.js"); -/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks */ "./node_modules/d3-array/src/ticks.js"); -/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges */ "./node_modules/d3-array/src/threshold/sturges.js"); + return elasticIn; +})(amplitude, period); +var elasticOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + function elasticOut(t) { + return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p); + } + elasticOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticOut.period = function(p) { return custom(a, p); }; + return elasticOut; +})(amplitude, period); +var elasticInOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - var value = _identity__WEBPACK_IMPORTED_MODULE_4__["default"], - domain = _extent__WEBPACK_IMPORTED_MODULE_3__["default"], - threshold = _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__["default"]; - - function histogram(data) { - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - tz = Object(_ticks__WEBPACK_IMPORTED_MODULE_6__["tickStep"])(x0, x1, tz); - tz = Object(_range__WEBPACK_IMPORTED_MODULE_5__["default"])(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive - } - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] > x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[Object(_bisect__WEBPACK_IMPORTED_MODULE_1__["default"])(tz, x, 0, m)].push(data[i]); - } - } - - return bins; + function elasticInOut(t) { + return ((t = t * 2 - 1) < 0 + ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p) + : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2; } - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : threshold; - }; + elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticInOut.period = function(p) { return custom(a, p); }; - return histogram; -}); + return elasticInOut; +})(amplitude, period); /***/ }), -/***/ "./node_modules/d3-array/src/identity.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-array/src/identity.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-ease/src/exp.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-ease/src/exp.js ***! + \*****************************************/ +/*! exports provided: expIn, expOut, expInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); +function expIn(t) { + return Math.pow(2, 10 * t - 10); +} + +function expOut(t) { + return 1 - Math.pow(2, -10 * t); +} + +function expInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/index.js ***! - \********************************************/ -/*! exports provided: bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip */ +/***/ "./node_modules/d3-ease/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-ease/src/index.js ***! + \*******************************************/ +/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect */ "./node_modules/d3-array/src/bisect.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-ease/src/linear.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); + +/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-ease/src/quad.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["bisectRight"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["bisectLeft"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return _ascending__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "./node_modules/d3-ease/src/cubic.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); -/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector */ "./node_modules/d3-array/src/bisector.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return _bisector__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); -/* harmony import */ var _cross__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cross */ "./node_modules/d3-array/src/cross.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return _cross__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); -/* harmony import */ var _descending__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./descending */ "./node_modules/d3-array/src/descending.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return _descending__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); -/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./deviation */ "./node_modules/d3-array/src/deviation.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return _deviation__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "./node_modules/d3-ease/src/poly.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); -/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./extent */ "./node_modules/d3-array/src/extent.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return _extent__WEBPACK_IMPORTED_MODULE_6__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); -/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./histogram */ "./node_modules/d3-array/src/histogram.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return _histogram__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); -/* harmony import */ var _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./threshold/freedmanDiaconis */ "./node_modules/d3-array/src/threshold/freedmanDiaconis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); -/* harmony import */ var _threshold_scott__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold/scott */ "./node_modules/d3-array/src/threshold/scott.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return _threshold_scott__WEBPACK_IMPORTED_MODULE_9__["default"]; }); +/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "./node_modules/d3-ease/src/sin.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); -/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold/sturges */ "./node_modules/d3-array/src/threshold/sturges.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); -/* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./max */ "./node_modules/d3-array/src/max.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max__WEBPACK_IMPORTED_MODULE_11__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); -/* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./mean */ "./node_modules/d3-array/src/mean.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean__WEBPACK_IMPORTED_MODULE_12__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); -/* harmony import */ var _median__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./median */ "./node_modules/d3-array/src/median.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median__WEBPACK_IMPORTED_MODULE_13__["default"]; }); +/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "./node_modules/d3-ease/src/exp.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); -/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./merge */ "./node_modules/d3-array/src/merge.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); -/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./min */ "./node_modules/d3-array/src/min.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min__WEBPACK_IMPORTED_MODULE_15__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); -/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./pairs */ "./node_modules/d3-array/src/pairs.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _pairs__WEBPACK_IMPORTED_MODULE_16__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); -/* harmony import */ var _permute__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./permute */ "./node_modules/d3-array/src/permute.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return _permute__WEBPACK_IMPORTED_MODULE_17__["default"]; }); +/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-ease/src/circle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); -/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-array/src/quantile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return _quantile__WEBPACK_IMPORTED_MODULE_18__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); -/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./range */ "./node_modules/d3-array/src/range.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range__WEBPACK_IMPORTED_MODULE_19__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./scan */ "./node_modules/d3-array/src/scan.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan__WEBPACK_IMPORTED_MODULE_20__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); -/* harmony import */ var _shuffle__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./shuffle */ "./node_modules/d3-array/src/shuffle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _shuffle__WEBPACK_IMPORTED_MODULE_21__["default"]; }); +/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "./node_modules/d3-ease/src/bounce.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); -/* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sum */ "./node_modules/d3-array/src/sum.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum__WEBPACK_IMPORTED_MODULE_22__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); -/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ticks */ "./node_modules/d3-array/src/ticks.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["tickIncrement"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["tickStep"]; }); +/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "./node_modules/d3-ease/src/back.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); -/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./transpose */ "./node_modules/d3-array/src/transpose.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose__WEBPACK_IMPORTED_MODULE_24__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); -/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./variance */ "./node_modules/d3-array/src/variance.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return _variance__WEBPACK_IMPORTED_MODULE_25__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); -/* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./zip */ "./node_modules/d3-array/src/zip.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip__WEBPACK_IMPORTED_MODULE_26__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); +/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "./node_modules/d3-ease/src/elastic.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); @@ -5187,3622 +4161,3384 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), +/***/ "./node_modules/d3-ease/src/linear.js": +/*!********************************************!*\ + !*** ./node_modules/d3-ease/src/linear.js ***! + \********************************************/ +/*! exports provided: linear */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); +function linear(t) { + return +t; +} /***/ }), -/***/ "./node_modules/d3-array/src/max.js": +/***/ "./node_modules/d3-ease/src/poly.js": /*!******************************************!*\ - !*** ./node_modules/d3-array/src/max.js ***! + !*** ./node_modules/d3-ease/src/poly.js ***! \******************************************/ -/*! exports provided: default */ +/*! exports provided: polyIn, polyOut, polyInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - i = -1, - value, - max; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); +var exponent = 3; - if (valueof == null) { - while (++i < n) { // Find the first comparable value. - if ((value = values[i]) != null && value >= value) { - max = value; - while (++i < n) { // Compare the remaining values. - if ((value = values[i]) != null && value > max) { - max = value; - } - } - } - } - } +var polyIn = (function custom(e) { + e = +e; - else { - while (++i < n) { // Find the first comparable value. - if ((value = valueof(values[i], i, values)) != null && value >= value) { - max = value; - while (++i < n) { // Compare the remaining values. - if ((value = valueof(values[i], i, values)) != null && value > max) { - max = value; - } - } - } - } + function polyIn(t) { + return Math.pow(t, e); } - return max; -}); + polyIn.exponent = custom; + return polyIn; +})(exponent); -/***/ }), +var polyOut = (function custom(e) { + e = +e; -/***/ "./node_modules/d3-array/src/mean.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-array/src/mean.js ***! - \*******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function polyOut(t) { + return 1 - Math.pow(1 - t, e); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js"); + polyOut.exponent = custom; + return polyOut; +})(exponent); -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - m = n, - i = -1, - value, - sum = 0; +var polyInOut = (function custom(e) { + e = +e; - if (valueof == null) { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(values[i]))) sum += value; - else --m; - } + function polyInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; } - else { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(valueof(values[i], i, values)))) sum += value; - else --m; - } - } + polyInOut.exponent = custom; - if (m) return sum / m; -}); + return polyInOut; +})(exponent); /***/ }), -/***/ "./node_modules/d3-array/src/median.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-array/src/median.js ***! - \*********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-ease/src/quad.js": +/*!******************************************!*\ + !*** ./node_modules/d3-ease/src/quad.js ***! + \******************************************/ +/*! exports provided: quadIn, quadOut, quadInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js"); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js"); -/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-array/src/quantile.js"); - - - - -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - i = -1, - value, - numbers = []; - - if (valueof == null) { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__["default"])(values[i]))) { - numbers.push(value); - } - } - } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); +function quadIn(t) { + return t * t; +} - else { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__["default"])(valueof(values[i], i, values)))) { - numbers.push(value); - } - } - } +function quadOut(t) { + return t * (2 - t); +} - return Object(_quantile__WEBPACK_IMPORTED_MODULE_2__["default"])(numbers.sort(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"]), 0.5); -}); +function quadInOut(t) { + return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/merge.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/merge.js ***! - \********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-ease/src/sin.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-ease/src/sin.js ***! + \*****************************************/ +/*! exports provided: sinIn, sinOut, sinInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(arrays) { - var n = arrays.length, - m, - i = -1, - j = 0, - merged, - array; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); +var pi = Math.PI, + halfPi = pi / 2; - while (++i < n) j += arrays[i].length; - merged = new Array(j); +function sinIn(t) { + return 1 - Math.cos(t * halfPi); +} - while (--n >= 0) { - array = arrays[n]; - m = array.length; - while (--m >= 0) { - merged[--j] = array[m]; - } - } +function sinOut(t) { + return Math.sin(t * halfPi); +} - return merged; -}); +function sinInOut(t) { + return (1 - Math.cos(pi * t)) / 2; +} /***/ }), -/***/ "./node_modules/d3-array/src/min.js": -/*!******************************************!*\ - !*** ./node_modules/d3-array/src/min.js ***! - \******************************************/ +/***/ "./node_modules/d3-fetch/src/blob.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-fetch/src/blob.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - i = -1, - value, - min; - - if (valueof == null) { - while (++i < n) { // Find the first comparable value. - if ((value = values[i]) != null && value >= value) { - min = value; - while (++i < n) { // Compare the remaining values. - if ((value = values[i]) != null && min > value) { - min = value; - } - } - } - } - } - - else { - while (++i < n) { // Find the first comparable value. - if ((value = valueof(values[i], i, values)) != null && value >= value) { - min = value; - while (++i < n) { // Compare the remaining values. - if ((value = valueof(values[i], i, values)) != null && min > value) { - min = value; - } - } - } - } - } +function responseBlob(response) { + if (!response.ok) throw new Error(response.status + " " + response.statusText); + return response.blob(); +} - return min; +/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { + return fetch(input, init).then(responseBlob); }); /***/ }), -/***/ "./node_modules/d3-array/src/number.js": +/***/ "./node_modules/d3-fetch/src/buffer.js": /*!*********************************************!*\ - !*** ./node_modules/d3-array/src/number.js ***! + !*** ./node_modules/d3-fetch/src/buffer.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x === null ? NaN : +x; +function responseArrayBuffer(response) { + if (!response.ok) throw new Error(response.status + " " + response.statusText); + return response.arrayBuffer(); +} + +/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { + return fetch(input, init).then(responseArrayBuffer); }); /***/ }), -/***/ "./node_modules/d3-array/src/pairs.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/pairs.js ***! - \********************************************/ -/*! exports provided: default, pair */ +/***/ "./node_modules/d3-fetch/src/dsv.js": +/*!******************************************!*\ + !*** ./node_modules/d3-fetch/src/dsv.js ***! + \******************************************/ +/*! exports provided: default, csv, tsv */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return pair; }); -/* harmony default export */ __webpack_exports__["default"] = (function(array, f) { - if (f == null) f = pair; - var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); - while (i < n) pairs[i] = f(p, p = array[++i]); - return pairs; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dsv; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return csv; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return tsv; }); +/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js"); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); -function pair(a, b) { - return [a, b]; + + +function dsvParse(parse) { + return function(input, init, row) { + if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; + return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { + return parse(response, row); + }); + }; +} + +function dsv(delimiter, input, init, row) { + if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; + var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["dsvFormat"])(delimiter); + return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { + return format.parse(response, row); + }); } +var csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["csvParse"]); +var tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["tsvParse"]); + /***/ }), -/***/ "./node_modules/d3-array/src/permute.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-array/src/permute.js ***! - \**********************************************/ +/***/ "./node_modules/d3-fetch/src/image.js": +/*!********************************************!*\ + !*** ./node_modules/d3-fetch/src/image.js ***! + \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(array, indexes) { - var i = indexes.length, permutes = new Array(i); - while (i--) permutes[i] = array[indexes[i]]; - return permutes; +/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { + return new Promise(function(resolve, reject) { + var image = new Image; + for (var key in init) image[key] = init[key]; + image.onerror = reject; + image.onload = function() { resolve(image); }; + image.src = input; + }); }); /***/ }), -/***/ "./node_modules/d3-array/src/quantile.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-array/src/quantile.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-fetch/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-fetch/src/index.js ***! + \********************************************/ +/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js"); +/* harmony import */ var _blob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob */ "./node_modules/d3-fetch/src/blob.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return _blob__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer */ "./node_modules/d3-fetch/src/buffer.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _buffer__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(values, p, valueof) { - if (valueof == null) valueof = _number__WEBPACK_IMPORTED_MODULE_0__["default"]; - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); - if (p >= 1) return +valueof(values[n - 1], n - 1, values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = +valueof(values[i0], i0, values), - value1 = +valueof(values[i0 + 1], i0 + 1, values); - return value0 + (value1 - value0) * (i - i0); -}); +/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv */ "./node_modules/d3-fetch/src/dsv.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["csv"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["tsv"]; }); -/***/ "./node_modules/d3-array/src/range.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/range.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image */ "./node_modules/d3-fetch/src/image.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return _image__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; +/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json */ "./node_modules/d3-fetch/src/json.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return _json__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return _text__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - while (++i < n) { - range[i] = start + i * step; - } +/* harmony import */ var _xml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml */ "./node_modules/d3-fetch/src/xml.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - return range; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["html"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["svg"]; }); -/***/ }), -/***/ "./node_modules/d3-array/src/scan.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-array/src/scan.js ***! - \*******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(values, compare) { - if (!(n = values.length)) return; - var n, - i = 0, - j = 0, - xi, - xj = values[j]; - if (compare == null) compare = _ascending__WEBPACK_IMPORTED_MODULE_0__["default"]; - while (++i < n) { - if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) { - xj = xi, j = i; - } - } - if (compare(xj, xj) === 0) return j; -}); /***/ }), -/***/ "./node_modules/d3-array/src/shuffle.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-array/src/shuffle.js ***! - \**********************************************/ +/***/ "./node_modules/d3-fetch/src/json.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-fetch/src/json.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(array, i0, i1) { - var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } +function responseJson(response) { + if (!response.ok) throw new Error(response.status + " " + response.statusText); + return response.json(); +} - return array; +/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { + return fetch(input, init).then(responseJson); }); /***/ }), -/***/ "./node_modules/d3-array/src/sum.js": -/*!******************************************!*\ - !*** ./node_modules/d3-array/src/sum.js ***! - \******************************************/ +/***/ "./node_modules/d3-fetch/src/text.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-fetch/src/text.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - i = -1, - value, - sum = 0; - - if (valueof == null) { - while (++i < n) { - if (value = +values[i]) sum += value; // Note: zero and null are equivalent. - } - } - - else { - while (++i < n) { - if (value = +valueof(values[i], i, values)) sum += value; - } - } +function responseText(response) { + if (!response.ok) throw new Error(response.status + " " + response.statusText); + return response.text(); +} - return sum; +/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { + return fetch(input, init).then(responseText); }); /***/ }), -/***/ "./node_modules/d3-array/src/threshold/freedmanDiaconis.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***! - \*****************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-fetch/src/xml.js": +/*!******************************************!*\ + !*** ./node_modules/d3-fetch/src/xml.js ***! + \******************************************/ +/*! exports provided: default, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array */ "./node_modules/d3-array/src/array.js"); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ascending */ "./node_modules/d3-array/src/ascending.js"); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../number */ "./node_modules/d3-array/src/number.js"); -/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../quantile */ "./node_modules/d3-array/src/quantile.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return svg; }); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); +function parser(type) { + return function(input, init) { + return Object(_text__WEBPACK_IMPORTED_MODULE_0__["default"])(input, init).then(function(text) { + return (new DOMParser).parseFromString(text, type); + }); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (parser("application/xml")); +var html = parser("text/html"); -/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { - values = _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(values, _number__WEBPACK_IMPORTED_MODULE_2__["default"]).sort(_ascending__WEBPACK_IMPORTED_MODULE_1__["default"]); - return Math.ceil((max - min) / (2 * (Object(_quantile__WEBPACK_IMPORTED_MODULE_3__["default"])(values, 0.75) - Object(_quantile__WEBPACK_IMPORTED_MODULE_3__["default"])(values, 0.25)) * Math.pow(values.length, -1 / 3))); -}); +var svg = parser("image/svg+xml"); /***/ }), -/***/ "./node_modules/d3-array/src/threshold/scott.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-array/src/threshold/scott.js ***! - \******************************************************/ +/***/ "./node_modules/d3-force/src/center.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-force/src/center.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deviation */ "./node_modules/d3-array/src/deviation.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { + var nodes; + if (x == null) x = 0; + if (y == null) y = 0; -/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { - return Math.ceil((max - min) / (3.5 * Object(_deviation__WEBPACK_IMPORTED_MODULE_0__["default"])(values) * Math.pow(values.length, -1 / 3))); -}); + function force() { + var i, + n = nodes.length, + node, + sx = 0, + sy = 0; + for (i = 0; i < n; ++i) { + node = nodes[i], sx += node.x, sy += node.y; + } -/***/ }), + for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { + node = nodes[i], node.x -= sx, node.y -= sy; + } + } -/***/ "./node_modules/d3-array/src/threshold/sturges.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-array/src/threshold/sturges.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + force.initialize = function(_) { + nodes = _; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - return Math.ceil(Math.log(values.length) / Math.LN2) + 1; + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; + + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; + + return force; }); /***/ }), -/***/ "./node_modules/d3-array/src/ticks.js": -/*!********************************************!*\ - !*** ./node_modules/d3-array/src/ticks.js ***! - \********************************************/ -/*! exports provided: default, tickIncrement, tickStep */ +/***/ "./node_modules/d3-force/src/collide.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-force/src/collide.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); -var e10 = Math.sqrt(50), - e5 = Math.sqrt(10), - e2 = Math.sqrt(2); - -/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) { - var reverse, - i = -1, - n, - ticks, - step; - - stop = +stop, start = +start, count = +count; - if (start === stop && count > 0) return [start]; - if (reverse = stop < start) n = start, start = stop, stop = n; - if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); +/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); +/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); - if (step > 0) { - start = Math.ceil(start / step); - stop = Math.floor(stop / step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) * step; - } else { - start = Math.floor(start * step); - stop = Math.ceil(stop * step); - ticks = new Array(n = Math.ceil(start - stop + 1)); - while (++i < n) ticks[i] = (start - i) / step; - } - if (reverse) ticks.reverse(); - return ticks; -}); -function tickIncrement(start, stop, count) { - var step = (stop - start) / Math.max(0, count), - power = Math.floor(Math.log(step) / Math.LN10), - error = step / Math.pow(10, power); - return power >= 0 - ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) - : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); +function x(d) { + return d.x + d.vx; } -function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; +function y(d) { + return d.y + d.vy; } +/* harmony default export */ __webpack_exports__["default"] = (function(radius) { + var nodes, + radii, + strength = 1, + iterations = 1; -/***/ }), + if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(radius == null ? 1 : +radius); -/***/ "./node_modules/d3-array/src/transpose.js": -/*!************************************************!*\ - !*** ./node_modules/d3-array/src/transpose.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function force() { + var i, n = nodes.length, + tree, + node, + xi, + yi, + ri, + ri2; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min */ "./node_modules/d3-array/src/min.js"); + for (var k = 0; k < iterations; ++k) { + tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, x, y).visitAfter(prepare); + for (i = 0; i < n; ++i) { + node = nodes[i]; + ri = radii[node.index], ri2 = ri * ri; + xi = node.x + node.vx; + yi = node.y + node.vy; + tree.visit(apply); + } + } + function apply(quad, x0, y0, x1, y1) { + var data = quad.data, rj = quad.r, r = ri + rj; + if (data) { + if (data.index > node.index) { + var x = xi - data.x - data.vx, + y = yi - data.y - data.vy, + l = x * x + y * y; + if (l < r * r) { + if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; + if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; + l = (r - (l = Math.sqrt(l))) / l * strength; + node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); + node.vy += (y *= l) * r; + data.vx -= x * (r = 1 - r); + data.vy -= y * r; + } + } + return; + } + return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; + } + } -/* harmony default export */ __webpack_exports__["default"] = (function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = Object(_min__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; + function prepare(quad) { + if (quad.data) return quad.r = radii[quad.data.index]; + for (var i = quad.r = 0; i < 4; ++i) { + if (quad[i] && quad[i].r > quad.r) { + quad.r = quad[i].r; + } } } - return transpose; -}); -function length(d) { - return d.length; -} + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + radii = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); + } + + force.initialize = function(_) { + nodes = _; + initialize(); + }; + + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; + }; + + force.strength = function(_) { + return arguments.length ? (strength = +_, force) : strength; + }; + + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; + }; + + return force; +}); /***/ }), -/***/ "./node_modules/d3-array/src/variance.js": +/***/ "./node_modules/d3-force/src/constant.js": /*!***********************************************!*\ - !*** ./node_modules/d3-array/src/variance.js ***! + !*** ./node_modules/d3-force/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { - var n = values.length, - m = 0, - i = -1, - mean = 0, - value, - delta, - sum = 0; - - if (valueof == null) { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(values[i]))) { - delta = value - mean; - mean += delta / ++m; - sum += delta * (value - mean); - } - } - } - - else { - while (++i < n) { - if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(valueof(values[i], i, values)))) { - delta = value - mean; - mean += delta / ++m; - sum += delta * (value - mean); - } - } - } - - if (m > 1) return sum / (m - 1); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; }); /***/ }), -/***/ "./node_modules/d3-array/src/zip.js": -/*!******************************************!*\ - !*** ./node_modules/d3-array/src/zip.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-force/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-force/src/index.js ***! + \********************************************/ +/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose */ "./node_modules/d3-array/src/transpose.js"); +/* harmony import */ var _center__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center */ "./node_modules/d3-force/src/center.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return _center__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _collide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide */ "./node_modules/d3-force/src/collide.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return _collide__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link */ "./node_modules/d3-force/src/link.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return _link__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _manyBody__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody */ "./node_modules/d3-force/src/manyBody.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return _manyBody__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _radial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial */ "./node_modules/d3-force/src/radial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return _radial__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return _simulation__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _x__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x */ "./node_modules/d3-force/src/x.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return _x__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y */ "./node_modules/d3-force/src/y.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return _y__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + + + + + + + -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_transpose__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments); -}); /***/ }), -/***/ "./node_modules/d3-axis/src/array.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-axis/src/array.js ***! - \*******************************************/ -/*! exports provided: slice */ +/***/ "./node_modules/d3-force/src/jiggle.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-force/src/jiggle.js ***! + \*********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -var slice = Array.prototype.slice; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return (Math.random() - 0.5) * 1e-6; +}); /***/ }), -/***/ "./node_modules/d3-axis/src/axis.js": -/*!******************************************!*\ - !*** ./node_modules/d3-axis/src/axis.js ***! - \******************************************/ -/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ +/***/ "./node_modules/d3-force/src/link.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-force/src/link.js ***! + \*******************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return axisTop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return axisRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return axisBottom; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return axisLeft; }); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-axis/src/array.js"); -/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-axis/src/identity.js"); - - - -var top = 1, - right = 2, - bottom = 3, - left = 4, - epsilon = 1e-6; +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); +/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); +/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); -function translateX(x) { - return "translate(" + (x + 0.5) + ",0)"; -} -function translateY(y) { - return "translate(0," + (y + 0.5) + ")"; -} -function number(scale) { - return function(d) { - return +scale(d); - }; -} -function center(scale) { - var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset. - if (scale.round()) offset = Math.round(offset); - return function(d) { - return +scale(d) + offset; - }; +function index(d) { + return d.index; } -function entering() { - return !this.__axis; +function find(nodeById, nodeId) { + var node = nodeById.get(nodeId); + if (!node) throw new Error("missing: " + nodeId); + return node; } -function axis(orient, scale) { - var tickArguments = [], - tickValues = null, - tickFormat = null, - tickSizeInner = 6, - tickSizeOuter = 6, - tickPadding = 3, - k = orient === top || orient === left ? -1 : 1, - x = orient === left || orient === right ? "x" : "y", - transform = orient === top || orient === bottom ? translateX : translateY; - - function axis(context) { - var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, - format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity__WEBPACK_IMPORTED_MODULE_1__["default"]) : tickFormat, - spacing = Math.max(tickSizeInner, 0) + tickPadding, - range = scale.range(), - range0 = +range[0] + 0.5, - range1 = +range[range.length - 1] + 0.5, - position = (scale.bandwidth ? center : number)(scale.copy()), - selection = context.selection ? context.selection() : context, - path = selection.selectAll(".domain").data([null]), - tick = selection.selectAll(".tick").data(values, scale).order(), - tickExit = tick.exit(), - tickEnter = tick.enter().append("g").attr("class", "tick"), - line = tick.select("line"), - text = tick.select("text"); - - path = path.merge(path.enter().insert("path", ".tick") - .attr("class", "domain") - .attr("stroke", "currentColor")); - - tick = tick.merge(tickEnter); - - line = line.merge(tickEnter.append("line") - .attr("stroke", "currentColor") - .attr(x + "2", k * tickSizeInner)); - - text = text.merge(tickEnter.append("text") - .attr("fill", "currentColor") - .attr(x, k * spacing) - .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); +/* harmony default export */ __webpack_exports__["default"] = (function(links) { + var id = index, + strength = defaultStrength, + strengths, + distance = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(30), + distances, + nodes, + count, + bias, + iterations = 1; - if (context !== selection) { - path = path.transition(context); - tick = tick.transition(context); - line = line.transition(context); - text = text.transition(context); + if (links == null) links = []; - tickExit = tickExit.transition(context) - .attr("opacity", epsilon) - .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); }); + function defaultStrength(link) { + return 1 / Math.min(count[link.source.index], count[link.target.index]); + } - tickEnter - .attr("opacity", epsilon) - .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); }); + function force(alpha) { + for (var k = 0, n = links.length; k < iterations; ++k) { + for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { + link = links[i], source = link.source, target = link.target; + x = target.x + target.vx - source.x - source.vx || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(); + y = target.y + target.vy - source.y - source.vy || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(); + l = Math.sqrt(x * x + y * y); + l = (l - distances[i]) / l * alpha * strengths[i]; + x *= l, y *= l; + target.vx -= x * (b = bias[i]); + target.vy -= y * b; + source.vx += x * (b = 1 - b); + source.vy += y * b; + } } + } - tickExit.remove(); + function initialize() { + if (!nodes) return; - path - .attr("d", orient === left || orient == right - ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1) - : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1)); + var i, + n = nodes.length, + m = links.length, + nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_2__["map"])(nodes, id), + link; - tick - .attr("opacity", 1) - .attr("transform", function(d) { return transform(position(d)); }); + for (i = 0, count = new Array(n); i < m; ++i) { + link = links[i], link.index = i; + if (typeof link.source !== "object") link.source = find(nodeById, link.source); + if (typeof link.target !== "object") link.target = find(nodeById, link.target); + count[link.source.index] = (count[link.source.index] || 0) + 1; + count[link.target.index] = (count[link.target.index] || 0) + 1; + } - line - .attr(x + "2", k * tickSizeInner); + for (i = 0, bias = new Array(m); i < m; ++i) { + link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); + } - text - .attr(x, k * spacing) - .text(format); + strengths = new Array(m), initializeStrength(); + distances = new Array(m), initializeDistance(); + } - selection.filter(entering) - .attr("fill", "none") - .attr("font-size", 10) - .attr("font-family", "sans-serif") - .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); + function initializeStrength() { + if (!nodes) return; - selection - .each(function() { this.__axis = position; }); + for (var i = 0, n = links.length; i < n; ++i) { + strengths[i] = +strength(links[i], i, links); + } } - axis.scale = function(_) { - return arguments.length ? (scale = _, axis) : scale; - }; + function initializeDistance() { + if (!nodes) return; - axis.ticks = function() { - return tickArguments = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), axis; - }; + for (var i = 0, n = links.length; i < n; ++i) { + distances[i] = +distance(links[i], i, links); + } + } - axis.tickArguments = function(_) { - return arguments.length ? (tickArguments = _ == null ? [] : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickArguments.slice(); + force.initialize = function(_) { + nodes = _; + initialize(); }; - axis.tickValues = function(_) { - return arguments.length ? (tickValues = _ == null ? null : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickValues && tickValues.slice(); + force.links = function(_) { + return arguments.length ? (links = _, initialize(), force) : links; }; - axis.tickFormat = function(_) { - return arguments.length ? (tickFormat = _, axis) : tickFormat; + force.id = function(_) { + return arguments.length ? (id = _, force) : id; }; - axis.tickSize = function(_) { - return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; + force.iterations = function(_) { + return arguments.length ? (iterations = +_, force) : iterations; }; - axis.tickSizeInner = function(_) { - return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeStrength(), force) : strength; }; - axis.tickSizeOuter = function(_) { - return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; + force.distance = function(_) { + return arguments.length ? (distance = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeDistance(), force) : distance; }; - axis.tickPadding = function(_) { - return arguments.length ? (tickPadding = +_, axis) : tickPadding; - }; + return force; +}); - return axis; -} -function axisTop(scale) { - return axis(top, scale); -} +/***/ }), -function axisRight(scale) { - return axis(right, scale); -} +/***/ "./node_modules/d3-force/src/manyBody.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-force/src/manyBody.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function axisBottom(scale) { - return axis(bottom, scale); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); +/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); +/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); +/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js"); -function axisLeft(scale) { - return axis(left, scale); -} -/***/ }), -/***/ "./node_modules/d3-axis/src/identity.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-axis/src/identity.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x; -}); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var nodes, + node, + alpha, + strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(-30), + strengths, + distanceMin2 = 1, + distanceMax2 = Infinity, + theta2 = 0.81; + function force(_) { + var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, _simulation__WEBPACK_IMPORTED_MODULE_3__["x"], _simulation__WEBPACK_IMPORTED_MODULE_3__["y"]).visitAfter(accumulate); + for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); + } -/***/ }), + function initialize() { + if (!nodes) return; + var i, n = nodes.length, node; + strengths = new Array(n); + for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); + } -/***/ "./node_modules/d3-axis/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-axis/src/index.js ***! - \*******************************************/ -/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function accumulate(quad) { + var strength = 0, q, c, weight = 0, x, y, i; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/d3-axis/src/axis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisTop"]; }); + // For internal nodes, accumulate forces from child quadrants. + if (quad.length) { + for (x = y = i = 0; i < 4; ++i) { + if ((q = quad[i]) && (c = Math.abs(q.value))) { + strength += q.value, weight += c, x += c * q.x, y += c * q.y; + } + } + quad.x = x / weight; + quad.y = y / weight; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisRight"]; }); + // For leaf nodes, accumulate forces from coincident quadrants. + else { + q = quad; + q.x = q.data.x; + q.y = q.data.y; + do strength += strengths[q.data.index]; + while (q = q.next); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisBottom"]; }); + quad.value = strength; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisLeft"]; }); + function apply(quad, x1, _, x2) { + if (!quad.value) return true; + var x = quad.x - node.x, + y = quad.y - node.y, + w = x2 - x1, + l = x * x + y * y; + // Apply the Barnes-Hut approximation if possible. + // Limit forces for very close nodes; randomize direction if coincident. + if (w * w / theta2 < l) { + if (l < distanceMax2) { + if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; + if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + node.vx += x * quad.value * alpha / l; + node.vy += y * quad.value * alpha / l; + } + return true; + } + // Otherwise, process points directly. + else if (quad.length || l >= distanceMax2) return; -/***/ }), + // Limit forces for very close nodes; randomize direction if coincident. + if (quad.data !== node || quad.next) { + if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; + if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; + if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); + } -/***/ "./node_modules/d3-brush/src/brush.js": -/*!********************************************!*\ - !*** ./node_modules/d3-brush/src/brush.js ***! - \********************************************/ -/*! exports provided: brushSelection, brushX, brushY, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + do if (quad.data !== node) { + w = strengths[quad.data.index] * alpha / l; + node.vx += x * w; + node.vy += y * w; + } while (quad = quad.next); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; }); -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-brush/src/constant.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-brush/src/event.js"); -/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-brush/src/noevent.js"); + force.initialize = function(_) { + nodes = _; + initialize(); + }; + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; + }; + force.distanceMin = function(_) { + return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); + }; + force.distanceMax = function(_) { + return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); + }; + force.theta = function(_) { + return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); + }; + return force; +}); +/***/ }), +/***/ "./node_modules/d3-force/src/radial.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-force/src/radial.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var MODE_DRAG = {name: "drag"}, - MODE_SPACE = {name: "space"}, - MODE_HANDLE = {name: "handle"}, - MODE_CENTER = {name: "center"}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); -function number1(e) { - return [+e[0], +e[1]]; -} -function number2(e) { - return [number1(e[0]), number1(e[1])]; -} +/* harmony default export */ __webpack_exports__["default"] = (function(radius, x, y) { + var nodes, + strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), + strengths, + radiuses; -function toucher(identifier) { - return function(target) { - return Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(target, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches, identifier); + if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+radius); + if (x == null) x = 0; + if (y == null) y = 0; + + function force(alpha) { + for (var i = 0, n = nodes.length; i < n; ++i) { + var node = nodes[i], + dx = node.x - x || 1e-6, + dy = node.y - y || 1e-6, + r = Math.sqrt(dx * dx + dy * dy), + k = (radiuses[i] - r) * strengths[i] * alpha / r; + node.vx += dx * k; + node.vy += dy * k; + } + } + + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + radiuses = new Array(n); + for (i = 0; i < n; ++i) { + radiuses[i] = +radius(nodes[i], i, nodes); + strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); + } + } + + force.initialize = function(_) { + nodes = _, initialize(); }; -} -var X = { - name: "x", - handles: ["w", "e"].map(type), - input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, - output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } -}; + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; + }; -var Y = { - name: "y", - handles: ["n", "s"].map(type), - input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, - output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } -}; + force.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; + }; -var XY = { - name: "xy", - handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), - input: function(xy) { return xy == null ? null : number2(xy); }, - output: function(xy) { return xy; } -}; + force.x = function(_) { + return arguments.length ? (x = +_, force) : x; + }; -var cursors = { - overlay: "crosshair", - selection: "move", - n: "ns-resize", - e: "ew-resize", - s: "ns-resize", - w: "ew-resize", - nw: "nwse-resize", - ne: "nesw-resize", - se: "nwse-resize", - sw: "nesw-resize" -}; + force.y = function(_) { + return arguments.length ? (y = +_, force) : y; + }; -var flipX = { - e: "w", - w: "e", - nw: "ne", - ne: "nw", - se: "sw", - sw: "se" -}; + return force; +}); -var flipY = { - n: "s", - s: "n", - nw: "sw", - ne: "se", - se: "ne", - sw: "nw" -}; -var signsX = { - overlay: +1, - selection: +1, - n: null, - e: +1, - s: null, - w: -1, - nw: -1, - ne: +1, - se: +1, - sw: -1 -}; +/***/ }), -var signsY = { - overlay: +1, - selection: +1, - n: -1, - e: null, - s: +1, - w: null, - nw: -1, - ne: -1, - se: +1, - sw: +1 -}; +/***/ "./node_modules/d3-force/src/simulation.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-force/src/simulation.js ***! + \*************************************************/ +/*! exports provided: x, y, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function type(t) { - return {type: t}; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); -// Ignore right-click, since that should open the context menu. -function defaultFilter() { - return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button; -} -function defaultExtent() { - var svg = this.ownerSVGElement || this; - if (svg.hasAttribute("viewBox")) { - svg = svg.viewBox.baseVal; - return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; - } - return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; -} -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} -// Like d3.local, but with the name “__brush” rather than auto-generated. -function local(node) { - while (!node.__brush) if (!(node = node.parentNode)) return; - return node.__brush; +function x(d) { + return d.x; } -function empty(extent) { - return extent[0][0] === extent[1][0] - || extent[0][1] === extent[1][1]; +function y(d) { + return d.y; } -function brushSelection(node) { - var state = node.__brush; - return state ? state.dim.output(state.selection) : null; -} +var initialRadius = 10, + initialAngle = Math.PI * (3 - Math.sqrt(5)); -function brushX() { - return brush(X); -} +/* harmony default export */ __webpack_exports__["default"] = (function(nodes) { + var simulation, + alpha = 1, + alphaMin = 0.001, + alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), + alphaTarget = 0, + velocityDecay = 0.6, + forces = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__["map"])(), + stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(step), + event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("tick", "end"); -function brushY() { - return brush(Y); -} + if (nodes == null) nodes = []; -/* harmony default export */ __webpack_exports__["default"] = (function() { - return brush(XY); -}); + function step() { + tick(); + event.call("tick", simulation); + if (alpha < alphaMin) { + stepper.stop(); + event.call("end", simulation); + } + } -function brush(dim) { - var extent = defaultExtent, - filter = defaultFilter, - touchable = defaultTouchable, - keys = true, - listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "brush", "end"), - handleSize = 6, - touchending; + function tick(iterations) { + var i, n = nodes.length, node; - function brush(group) { - var overlay = group - .property("__brush", initialize) - .selectAll(".overlay") - .data([type("overlay")]); + if (iterations === undefined) iterations = 1; - overlay.enter().append("rect") - .attr("class", "overlay") - .attr("pointer-events", "all") - .attr("cursor", cursors.overlay) - .merge(overlay) - .each(function() { - var extent = local(this).extent; - Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this) - .attr("x", extent[0][0]) - .attr("y", extent[0][1]) - .attr("width", extent[1][0] - extent[0][0]) - .attr("height", extent[1][1] - extent[0][1]); - }); + for (var k = 0; k < iterations; ++k) { + alpha += (alphaTarget - alpha) * alphaDecay; - group.selectAll(".selection") - .data([type("selection")]) - .enter().append("rect") - .attr("class", "selection") - .attr("cursor", cursors.selection) - .attr("fill", "#777") - .attr("fill-opacity", 0.3) - .attr("stroke", "#fff") - .attr("shape-rendering", "crispEdges"); + forces.each(function (force) { + force(alpha); + }); - var handle = group.selectAll(".handle") - .data(dim.handles, function(d) { return d.type; }); + for (i = 0; i < n; ++i) { + node = nodes[i]; + if (node.fx == null) node.x += node.vx *= velocityDecay; + else node.x = node.fx, node.vx = 0; + if (node.fy == null) node.y += node.vy *= velocityDecay; + else node.y = node.fy, node.vy = 0; + } + } - handle.exit().remove(); + return simulation; + } - handle.enter().append("rect") - .attr("class", function(d) { return "handle handle--" + d.type; }) - .attr("cursor", function(d) { return cursors[d.type]; }); + function initializeNodes() { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.index = i; + if (node.fx != null) node.x = node.fx; + if (node.fy != null) node.y = node.fy; + if (isNaN(node.x) || isNaN(node.y)) { + var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; + node.x = radius * Math.cos(angle); + node.y = radius * Math.sin(angle); + } + if (isNaN(node.vx) || isNaN(node.vy)) { + node.vx = node.vy = 0; + } + } + } - group - .each(redraw) - .attr("fill", "none") - .attr("pointer-events", "all") - .on("mousedown.brush", started) - .filter(touchable) - .on("touchstart.brush", started) - .on("touchmove.brush", touchmoved) - .on("touchend.brush touchcancel.brush", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + function initializeForce(force) { + if (force.initialize) force.initialize(nodes); + return force; } - brush.move = function(group, selection) { - if (group.selection) { - group - .on("start.brush", function() { emitter(this, arguments).beforestart().start(); }) - .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); }) - .tween("brush", function() { - var that = this, - state = that.__brush, - emit = emitter(that, arguments), - selection0 = state.selection, - selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), - i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolate"])(selection0, selection1); + initializeNodes(); - function tween(t) { - state.selection = t === 1 && selection1 === null ? null : i(t); - redraw.call(that); - emit.brush(); - } + return simulation = { + tick: tick, - return selection0 !== null && selection1 !== null ? tween : tween(1); - }); - } else { - group - .each(function() { - var that = this, - args = arguments, - state = that.__brush, - selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), - emit = emitter(that, args).beforestart(); + restart: function() { + return stepper.restart(step), simulation; + }, - Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); - state.selection = selection1 === null ? null : selection1; - redraw.call(that); - emit.start().brush().end(); - }); - } - }; + stop: function() { + return stepper.stop(), simulation; + }, - brush.clear = function(group) { - brush.move(group, null); - }; + nodes: function(_) { + return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; + }, - function redraw() { - var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this), - selection = local(this).selection; + alpha: function(_) { + return arguments.length ? (alpha = +_, simulation) : alpha; + }, - if (selection) { - group.selectAll(".selection") - .style("display", null) - .attr("x", selection[0][0]) - .attr("y", selection[0][1]) - .attr("width", selection[1][0] - selection[0][0]) - .attr("height", selection[1][1] - selection[0][1]); - - group.selectAll(".handle") - .style("display", null) - .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) - .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) - .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) - .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); - } - - else { - group.selectAll(".selection,.handle") - .style("display", "none") - .attr("x", null) - .attr("y", null) - .attr("width", null) - .attr("height", null); - } - } - - function emitter(that, args, clean) { - return (!clean && that.__brush.emitter) || new Emitter(that, args); - } + alphaMin: function(_) { + return arguments.length ? (alphaMin = +_, simulation) : alphaMin; + }, - function Emitter(that, args) { - this.that = that; - this.args = args; - this.state = that.__brush; - this.active = 0; - } + alphaDecay: function(_) { + return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; + }, - Emitter.prototype = { - beforestart: function() { - if (++this.active === 1) this.state.emitter = this, this.starting = true; - return this; + alphaTarget: function(_) { + return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; }, - start: function() { - if (this.starting) this.starting = false, this.emit("start"); - else this.emit("brush"); - return this; + + velocityDecay: function(_) { + return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; }, - brush: function() { - this.emit("brush"); - return this; + + force: function(name, _) { + return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); }, - end: function() { - if (--this.active === 0) delete this.state.emitter, this.emit("end"); - return this; + + find: function(x, y, radius) { + var i = 0, + n = nodes.length, + dx, + dy, + d2, + node, + closest; + + if (radius == null) radius = Infinity; + else radius *= radius; + + for (i = 0; i < n; ++i) { + node = nodes[i]; + dx = x - node.x; + dy = y - node.y; + d2 = dx * dx + dy * dy; + if (d2 < radius) closest = node, radius = d2; + } + + return closest; }, - emit: function(type) { - Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]); + + on: function(name, _) { + return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); } }; +}); - function started() { - if (touchending && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) return; - if (!filter.apply(this, arguments)) return; - var that = this, - type = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].target.__data__.type, - mode = (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey ? MODE_CENTER : MODE_HANDLE), - signX = dim === Y ? null : signsX[type], - signY = dim === X ? null : signsY[type], - state = local(that), - extent = state.extent, - selection = state.selection, - W = extent[0][0], w0, w1, - N = extent[0][1], n0, n1, - E = extent[1][0], e0, e1, - S = extent[1][1], s0, s1, - dx = 0, - dy = 0, - moving, - shifting = signX && signY && keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey, - lockX, - lockY, - pointer = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches ? toucher(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches[0].identifier) : d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"], - point0 = pointer(that), - point = point0, - emit = emitter(that, arguments, true).beforestart(); +/***/ }), - if (type === "overlay") { - if (selection) moving = true; - state.selection = selection = [ - [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]], - [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0] - ]; - } else { - w0 = selection[0][0]; - n0 = selection[0][1]; - e0 = selection[1][0]; - s0 = selection[1][1]; - } +/***/ "./node_modules/d3-force/src/x.js": +/*!****************************************!*\ + !*** ./node_modules/d3-force/src/x.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - w1 = w0; - n1 = n0; - e1 = e0; - s1 = s0; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); - var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(that) - .attr("pointer-events", "none"); - var overlay = group.selectAll(".overlay") - .attr("cursor", cursors[type]); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), + nodes, + strengths, + xz; - if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) { - emit.moved = moved; - emit.ended = ended; - } else { - var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view) - .on("mousemove.brush", moved, true) - .on("mouseup.brush", ended, true); - if (keys) view - .on("keydown.brush", keydowned, true) - .on("keyup.brush", keyupped, true) + if (typeof x !== "function") x = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(x == null ? 0 : +x); - Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view); + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; } + } - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(); - Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); - redraw.call(that); - emit.start(); - - function moved() { - var point1 = pointer(that); - if (shifting && !lockX && !lockY) { - if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true; - else lockX = true; - } - point = point1; - moving = true; - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); - move(); + function initialize() { + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + xz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); } + } - function move() { - var t; + force.initialize = function(_) { + nodes = _; + initialize(); + }; - dx = point[0] - point0[0]; - dy = point[1] - point0[1]; + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; + }; - switch (mode) { - case MODE_SPACE: - case MODE_DRAG: { - if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; - if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; - break; - } - case MODE_HANDLE: { - if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0; - else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx; - if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0; - else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy; - break; - } - case MODE_CENTER: { - if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX)); - if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY)); - break; - } - } + force.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : x; + }; - if (e1 < w1) { - signX *= -1; - t = w0, w0 = e0, e0 = t; - t = w1, w1 = e1, e1 = t; - if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); - } + return force; +}); - if (s1 < n1) { - signY *= -1; - t = n0, n0 = s0, s0 = t; - t = n1, n1 = s1, s1 = t; - if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); - } - if (state.selection) selection = state.selection; // May be set by brush.move! - if (lockX) w1 = selection[0][0], e1 = selection[1][0]; - if (lockY) n1 = selection[0][1], s1 = selection[1][1]; +/***/ }), - if (selection[0][0] !== w1 - || selection[0][1] !== n1 - || selection[1][0] !== e1 - || selection[1][1] !== s1) { - state.selection = [[w1, n1], [e1, s1]]; - redraw.call(that); - emit.brush(); - } - } +/***/ "./node_modules/d3-force/src/y.js": +/*!****************************************!*\ + !*** ./node_modules/d3-force/src/y.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function ended() { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(); - if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) { - if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches.length) return; - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - } else { - Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, moving); - view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); - } - group.attr("pointer-events", "all"); - overlay.attr("cursor", cursors.overlay); - if (state.selection) selection = state.selection; // May be set by brush.move (on start)! - if (empty(selection)) state.selection = null, redraw.call(that); - emit.end(); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); - function keydowned() { - switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) { - case 16: { // SHIFT - shifting = signX && signY; - break; - } - case 18: { // ALT - if (mode === MODE_HANDLE) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - move(); - } - break; - } - case 32: { // SPACE; takes priority over ALT - if (mode === MODE_HANDLE || mode === MODE_CENTER) { - if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; - if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; - mode = MODE_SPACE; - overlay.attr("cursor", cursors.selection); - move(); - } - break; - } - default: return; - } - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); - } - function keyupped() { - switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) { - case 16: { // SHIFT - if (shifting) { - lockX = lockY = shifting = false; - move(); - } - break; - } - case 18: { // ALT - if (mode === MODE_CENTER) { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - move(); - } - break; - } - case 32: { // SPACE - if (mode === MODE_SPACE) { - if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - } else { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - } - overlay.attr("cursor", cursors[type]); - move(); - } - break; - } - default: return; - } - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(); - } - } +/* harmony default export */ __webpack_exports__["default"] = (function(y) { + var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), + nodes, + strengths, + yz; - function touchmoved() { - emitter(this, arguments).moved(); - } + if (typeof y !== "function") y = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(y == null ? 0 : +y); - function touchended() { - emitter(this, arguments).ended(); + function force(alpha) { + for (var i = 0, n = nodes.length, node; i < n; ++i) { + node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; + } } function initialize() { - var state = this.__brush || {selection: null}; - state.extent = number2(extent.apply(this, arguments)); - state.dim = dim; - return state; + if (!nodes) return; + var i, n = nodes.length; + strengths = new Array(n); + yz = new Array(n); + for (i = 0; i < n; ++i) { + strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); + } } - brush.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(number2(_)), brush) : extent; + force.initialize = function(_) { + nodes = _; + initialize(); }; - brush.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : filter; + force.strength = function(_) { + return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; - brush.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : touchable; + force.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : y; }; - brush.handleSize = function(_) { - return arguments.length ? (handleSize = +_, brush) : handleSize; - }; + return force; +}); - brush.keyModifiers = function(_) { - return arguments.length ? (keys = !!_, brush) : keys; - }; - brush.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? brush : value; - }; +/***/ }), - return brush; +/***/ "./node_modules/d3-format/src/defaultLocale.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-format/src/defaultLocale.js ***! + \*****************************************************/ +/*! exports provided: format, formatPrefix, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return formatPrefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); +/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js"); + + +var locale; +var format; +var formatPrefix; + +defaultLocale({ + decimal: ".", + thousands: ",", + grouping: [3], + currency: ["$", ""], + minus: "-" +}); + +function defaultLocale(definition) { + locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); + format = locale.format; + formatPrefix = locale.formatPrefix; + return locale; } /***/ }), -/***/ "./node_modules/d3-brush/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-brush/src/constant.js ***! - \***********************************************/ +/***/ "./node_modules/d3-format/src/exponent.js": +/*!************************************************!*\ + !*** ./node_modules/d3-format/src/exponent.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); +/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); + + /* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; + return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(x)), x ? x[1] : NaN; }); /***/ }), -/***/ "./node_modules/d3-brush/src/event.js": -/*!********************************************!*\ - !*** ./node_modules/d3-brush/src/event.js ***! - \********************************************/ +/***/ "./node_modules/d3-format/src/formatDecimal.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-format/src/formatDecimal.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(target, type, selection) { - this.target = target; - this.type = type; - this.selection = selection; +// Computes the decimal coefficient and exponent of the specified number x with +// significant digits p, where x is positive and p is in [1, 21] or undefined. +// For example, formatDecimal(1.23) returns ["123", 0]. +/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x.slice(i + 1) + ]; }); /***/ }), -/***/ "./node_modules/d3-brush/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-brush/src/index.js ***! - \********************************************/ -/*! exports provided: brush, brushX, brushY, brushSelection */ +/***/ "./node_modules/d3-format/src/formatGroup.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-format/src/formatGroup.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ "./node_modules/d3-brush/src/brush.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushX"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushY"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushSelection"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(grouping, thousands) { + return function(value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + return t.reverse().join(thousands); + }; +}); /***/ }), -/***/ "./node_modules/d3-brush/src/noevent.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-brush/src/noevent.js ***! - \**********************************************/ -/*! exports provided: nopropagation, default */ +/***/ "./node_modules/d3-format/src/formatNumerals.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-format/src/formatNumerals.js ***! + \******************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); - - -function nopropagation() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); -} - -/* harmony default export */ __webpack_exports__["default"] = (function() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); +/* harmony default export */ __webpack_exports__["default"] = (function(numerals) { + return function(value) { + return value.replace(/[0-9]/g, function(i) { + return numerals[+i]; + }); + }; }); /***/ }), -/***/ "./node_modules/d3-chord/src/array.js": -/*!********************************************!*\ - !*** ./node_modules/d3-chord/src/array.js ***! - \********************************************/ -/*! exports provided: slice */ +/***/ "./node_modules/d3-format/src/formatPrefixAuto.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***! + \********************************************************/ +/*! exports provided: prefixExponent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -var slice = Array.prototype.slice; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefixExponent", function() { return prefixExponent; }); +/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); + + +var prefixExponent; + +/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { + var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient + : i > n ? coefficient + new Array(i - n + 1).join("0") + : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) + : "0." + new Array(1 - i).join("0") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, Math.max(0, p + i - 1))[0]; // less than 1y! +}); /***/ }), -/***/ "./node_modules/d3-chord/src/chord.js": -/*!********************************************!*\ - !*** ./node_modules/d3-chord/src/chord.js ***! - \********************************************/ +/***/ "./node_modules/d3-format/src/formatRounded.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-format/src/formatRounded.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js"); - - - -function compareValue(compare) { - return function(a, b) { - return compare( - a.source.value + a.target.value, - b.source.value + b.target.value - ); - }; -} - -/* harmony default export */ __webpack_exports__["default"] = (function() { - var padAngle = 0, - sortGroups = null, - sortSubgroups = null, - sortChords = null; - - function chord(matrix) { - var n = matrix.length, - groupSums = [], - groupIndex = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n), - subgroupIndex = [], - chords = [], - groups = chords.groups = new Array(n), - subgroups = new Array(n * n), - k, - x, - x0, - dx, - i, - j; - - // Compute the sum. - k = 0, i = -1; while (++i < n) { - x = 0, j = -1; while (++j < n) { - x += matrix[i][j]; - } - groupSums.push(x); - subgroupIndex.push(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n)); - k += x; - } - - // Sort groups… - if (sortGroups) groupIndex.sort(function(a, b) { - return sortGroups(groupSums[a], groupSums[b]); - }); +/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); - // Sort subgroups… - if (sortSubgroups) subgroupIndex.forEach(function(d, i) { - d.sort(function(a, b) { - return sortSubgroups(matrix[i][a], matrix[i][b]); - }); - }); - // Convert the sum to scaling factor for [0, 2pi]. - // TODO Allow start and end angle to be specified? - // TODO Allow padding to be specified as percentage? - k = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _math__WEBPACK_IMPORTED_MODULE_1__["tau"] - padAngle * n) / k; - dx = k ? padAngle : _math__WEBPACK_IMPORTED_MODULE_1__["tau"] / n; +/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { + var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient + : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) + : coefficient + new Array(exponent - coefficient.length + 2).join("0"); +}); - // Compute the start and end angle for each group and subgroup. - // Note: Opera has a bug reordering object literal properties! - x = 0, i = -1; while (++i < n) { - x0 = x, j = -1; while (++j < n) { - var di = groupIndex[i], - dj = subgroupIndex[di][j], - v = matrix[di][dj], - a0 = x, - a1 = x += v * k; - subgroups[dj * n + di] = { - index: di, - subindex: dj, - startAngle: a0, - endAngle: a1, - value: v - }; - } - groups[di] = { - index: di, - startAngle: x0, - endAngle: x, - value: groupSums[di] - }; - x += dx; - } - // Generate chords for each (non-empty) subgroup-subgroup link. - i = -1; while (++i < n) { - j = i - 1; while (++j < n) { - var source = subgroups[j * n + i], - target = subgroups[i * n + j]; - if (source.value || target.value) { - chords.push(source.value < target.value - ? {source: target, target: source} - : {source: source, target: target}); - } - } - } +/***/ }), - return sortChords ? chords.sort(sortChords) : chords; - } +/***/ "./node_modules/d3-format/src/formatSpecifier.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-format/src/formatSpecifier.js ***! + \*******************************************************/ +/*! exports provided: default, FormatSpecifier */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - chord.padAngle = function(_) { - return arguments.length ? (padAngle = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _), chord) : padAngle; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatSpecifier; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return FormatSpecifier; }); +// [[fill]align][sign][symbol][0][width][,][.precision][~][type] +var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; - chord.sortGroups = function(_) { - return arguments.length ? (sortGroups = _, chord) : sortGroups; - }; +function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); +} - chord.sortSubgroups = function(_) { - return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; - }; +formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof - chord.sortChords = function(_) { - return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; - }; +function FormatSpecifier(specifier) { + this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; + this.align = specifier.align === undefined ? ">" : specifier.align + ""; + this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === undefined ? undefined : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === undefined ? undefined : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === undefined ? "" : specifier.type + ""; +} - return chord; -}); +FormatSpecifier.prototype.toString = function() { + return this.fill + + this.align + + this.sign + + this.symbol + + (this.zero ? "0" : "") + + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + + (this.comma ? "," : "") + + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + + (this.trim ? "~" : "") + + this.type; +}; /***/ }), -/***/ "./node_modules/d3-chord/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-chord/src/constant.js ***! - \***********************************************/ +/***/ "./node_modules/d3-format/src/formatTrim.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-format/src/formatTrim.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; +// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. +/* harmony default export */ __webpack_exports__["default"] = (function(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": i0 = i1 = i; break; + case "0": if (i0 === 0) i0 = i; i1 = i; break; + default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; }); /***/ }), -/***/ "./node_modules/d3-chord/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-chord/src/index.js ***! - \********************************************/ -/*! exports provided: chord, ribbon */ +/***/ "./node_modules/d3-format/src/formatTypes.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-format/src/formatTypes.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _chord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord */ "./node_modules/d3-chord/src/chord.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return _chord__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _ribbon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon */ "./node_modules/d3-chord/src/ribbon.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return _ribbon__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js"); +/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatRounded.js */ "./node_modules/d3-format/src/formatRounded.js"); +/* harmony default export */ __webpack_exports__["default"] = ({ + "%": function(x, p) { return (x * 100).toFixed(p); }, + "b": function(x) { return Math.round(x).toString(2); }, + "c": function(x) { return x + ""; }, + "d": function(x) { return Math.round(x).toString(10); }, + "e": function(x, p) { return x.toExponential(p); }, + "f": function(x, p) { return x.toFixed(p); }, + "g": function(x, p) { return x.toPrecision(p); }, + "o": function(x) { return Math.round(x).toString(8); }, + "p": function(x, p) { return Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x * 100, p); }, + "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"], + "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__["default"], + "X": function(x) { return Math.round(x).toString(16).toUpperCase(); }, + "x": function(x) { return Math.round(x).toString(16); } +}); /***/ }), -/***/ "./node_modules/d3-chord/src/math.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-chord/src/math.js ***! - \*******************************************/ -/*! exports provided: cos, sin, pi, halfPi, tau, max */ +/***/ "./node_modules/d3-format/src/identity.js": +/*!************************************************!*\ + !*** ./node_modules/d3-format/src/identity.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); -var cos = Math.cos; -var sin = Math.sin; -var pi = Math.PI; -var halfPi = pi / 2; -var tau = pi * 2; -var max = Math.max; +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return x; +}); /***/ }), -/***/ "./node_modules/d3-chord/src/ribbon.js": +/***/ "./node_modules/d3-format/src/index.js": /*!*********************************************!*\ - !*** ./node_modules/d3-chord/src/ribbon.js ***! + !*** ./node_modules/d3-format/src/index.js ***! \*********************************************/ -/*! exports provided: default */ +/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-chord/src/array.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-chord/src/constant.js"); -/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js"); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); - - - - - -function defaultSource(d) { - return d.source; -} - -function defaultTarget(d) { - return d.target; -} +/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-format/src/defaultLocale.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -function defaultRadius(d) { - return d.radius; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["format"]; }); -function defaultStartAngle(d) { - return d.startAngle; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["formatPrefix"]; }); -function defaultEndAngle(d) { - return d.endAngle; -} +/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var source = defaultSource, - target = defaultTarget, - radius = defaultRadius, - startAngle = defaultStartAngle, - endAngle = defaultEndAngle, - context = null; +/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - function ribbon() { - var buffer, - argv = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), - s = source.apply(this, argv), - t = target.apply(this, argv), - sr = +radius.apply(this, (argv[0] = s, argv)), - sa0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], - sa1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], - sx0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(sa0), - sy0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(sa0), - tr = +radius.apply(this, (argv[0] = t, argv)), - ta0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"], - ta1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["FormatSpecifier"]; }); - if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_3__["path"])(); +/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ "./node_modules/d3-format/src/precisionFixed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - context.moveTo(sx0, sy0); - context.arc(0, 0, sr, sa0, sa1); - if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr? - context.quadraticCurveTo(0, 0, tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(ta0), tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(ta0)); - context.arc(0, 0, tr, ta0, ta1); - } - context.quadraticCurveTo(0, 0, sx0, sy0); - context.closePath(); +/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ "./node_modules/d3-format/src/precisionPrefix.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - if (buffer) return context = null, buffer + "" || null; - } +/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ "./node_modules/d3-format/src/precisionRound.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - ribbon.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : radius; - }; - ribbon.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : startAngle; - }; - ribbon.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : endAngle; - }; - ribbon.source = function(_) { - return arguments.length ? (source = _, ribbon) : source; - }; - ribbon.target = function(_) { - return arguments.length ? (target = _, ribbon) : target; - }; - ribbon.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; - }; - return ribbon; -}); /***/ }), -/***/ "./node_modules/d3-collection/src/entries.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-collection/src/entries.js ***! - \***************************************************/ +/***/ "./node_modules/d3-format/src/locale.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-format/src/locale.js ***! + \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(map) { - var entries = []; - for (var key in map) entries.push({key: key, value: map[key]}); - return entries; -}); +/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); +/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "./node_modules/d3-format/src/formatGroup.js"); +/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "./node_modules/d3-format/src/formatNumerals.js"); +/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js"); +/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ "./node_modules/d3-format/src/formatTrim.js"); +/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ "./node_modules/d3-format/src/formatTypes.js"); +/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-format/src/identity.js"); -/***/ }), -/***/ "./node_modules/d3-collection/src/index.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-collection/src/index.js ***! - \*************************************************/ -/*! exports provided: nest, set, map, keys, values, entries */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nest */ "./node_modules/d3-collection/src/nest.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return _nest__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set */ "./node_modules/d3-collection/src/set.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keys */ "./node_modules/d3-collection/src/keys.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./values */ "./node_modules/d3-collection/src/values.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var _entries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entries */ "./node_modules/d3-collection/src/entries.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return _entries__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +var map = Array.prototype.map, + prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; +/* harmony default export */ __webpack_exports__["default"] = (function(locale) { + var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""), + currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", + currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", + decimal = locale.decimal === undefined ? "." : locale.decimal + "", + numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)), + percent = locale.percent === undefined ? "%" : locale.percent + "", + minus = locale.minus === undefined ? "-" : locale.minus + "", + nan = locale.nan === undefined ? "NaN" : locale.nan + ""; + function newFormat(specifier) { + specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier); + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g"; + // If zero fill is specified, padding goes after sign and before digits. + if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type], + maybeSuffix = /[defgprs%]/.test(type); -/***/ }), + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision === undefined ? 6 + : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) + : Math.max(0, Math.min(20, precision)); -/***/ "./node_modules/d3-collection/src/keys.js": -/*!************************************************!*\ - !*** ./node_modules/d3-collection/src/keys.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, n, c; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Perform the initial formatting. + var valueNegative = value < 0; + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value); + + // If a negative value rounds to zero during formatting, treat as positive. + if (valueNegative && +value === 0) valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + + valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__["prefixExponent"] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": value = valuePrefix + value + valueSuffix + padding; break; + case "=": value = valuePrefix + padding + value + valueSuffix; break; + case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; + default: value = padding + valuePrefix + value + valueSuffix; break; + } + + return numerals(value); + } + + format.toString = function() { + return specifier + ""; + }; + + return format; + } + + function formatPrefix(specifier, value) { + var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function(value) { + return f(k * value) + prefix; + }; + } + + return { + format: newFormat, + formatPrefix: formatPrefix + }; }); /***/ }), -/***/ "./node_modules/d3-collection/src/map.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-collection/src/map.js ***! - \***********************************************/ -/*! exports provided: prefix, default */ +/***/ "./node_modules/d3-format/src/precisionFixed.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-format/src/precisionFixed.js ***! + \******************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); -var prefix = "$"; - -function Map() {} +/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); -Map.prototype = map.prototype = { - constructor: Map, - has: function(key) { - return (prefix + key) in this; - }, - get: function(key) { - return this[prefix + key]; - }, - set: function(key, value) { - this[prefix + key] = value; - return this; - }, - remove: function(key) { - var property = prefix + key; - return property in this && delete this[property]; - }, - clear: function() { - for (var property in this) if (property[0] === prefix) delete this[property]; - }, - keys: function() { - var keys = []; - for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); - return keys; - }, - values: function() { - var values = []; - for (var property in this) if (property[0] === prefix) values.push(this[property]); - return values; - }, - entries: function() { - var entries = []; - for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); - return entries; - }, - size: function() { - var size = 0; - for (var property in this) if (property[0] === prefix) ++size; - return size; - }, - empty: function() { - for (var property in this) if (property[0] === prefix) return false; - return true; - }, - each: function(f) { - for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); - } -}; -function map(object, f) { - var map = new Map; +/* harmony default export */ __webpack_exports__["default"] = (function(step) { + return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); +}); - // Copy constructor. - if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); - // Index array by numeric index or specified key function. - else if (Array.isArray(object)) { - var i = -1, - n = object.length, - o; +/***/ }), - if (f == null) while (++i < n) map.set(i, object[i]); - else while (++i < n) map.set(f(o = object[i], i, object), o); - } +/***/ "./node_modules/d3-format/src/precisionPrefix.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-format/src/precisionPrefix.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Convert object to map. - else if (object) for (var key in object) map.set(key, object[key]); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); - return map; -} -/* harmony default export */ __webpack_exports__["default"] = (map); +/* harmony default export */ __webpack_exports__["default"] = (function(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); +}); /***/ }), -/***/ "./node_modules/d3-collection/src/nest.js": -/*!************************************************!*\ - !*** ./node_modules/d3-collection/src/nest.js ***! - \************************************************/ +/***/ "./node_modules/d3-format/src/precisionRound.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-format/src/precisionRound.js ***! + \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - var keys = [], - sortKeys = [], - sortValues, - rollup, - nest; +/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); - function apply(array, depth, createResult, setResult) { - if (depth >= keys.length) { - if (sortValues != null) array.sort(sortValues); - return rollup != null ? rollup(array) : array; - } - var i = -1, - n = array.length, - key = keys[depth++], - keyValue, - value, - valuesByKey = Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])(), - values, - result = createResult(); +/* harmony default export */ __webpack_exports__["default"] = (function(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(step)) + 1; +}); - while (++i < n) { - if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { - values.push(value); - } else { - valuesByKey.set(keyValue, [value]); - } - } - valuesByKey.each(function(values, key) { - setResult(result, key, apply(values, depth, createResult, setResult)); - }); +/***/ }), - return result; - } +/***/ "./node_modules/d3-geo/src/adder.js": +/*!******************************************!*\ + !*** ./node_modules/d3-geo/src/adder.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function entries(map, depth) { - if (++depth > keys.length) return map; - var array, sortKey = sortKeys[depth - 1]; - if (rollup != null && depth >= keys.length) array = map.entries(); - else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); - return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +// Adds floating point numbers with twice the normal precision. +// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and +// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3) +// 305–363 (1997). +// Code adapted from GeographicLib by Charles F. F. Karney, +// http://geographiclib.sourceforge.net/ - return nest = { - object: function(array) { return apply(array, 0, createObject, setObject); }, - map: function(array) { return apply(array, 0, createMap, setMap); }, - entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, - key: function(d) { keys.push(d); return nest; }, - sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, - sortValues: function(order) { sortValues = order; return nest; }, - rollup: function(f) { rollup = f; return nest; } - }; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new Adder; }); -function createObject() { - return {}; +function Adder() { + this.reset(); } -function setObject(object, key, value) { - object[key] = value; -} +Adder.prototype = { + constructor: Adder, + reset: function() { + this.s = // rounded value + this.t = 0; // exact error + }, + add: function(y) { + add(temp, y, this.t); + add(this, temp.s, this.s); + if (this.s) this.t += temp.t; + else this.s = temp.t; + }, + valueOf: function() { + return this.s; + } +}; -function createMap() { - return Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])(); -} +var temp = new Adder; -function setMap(map, key, value) { - map.set(key, value); +function add(adder, a, b) { + var x = adder.s = a + b, + bv = x - a, + av = x - bv; + adder.t = (a - av) + (b - bv); } /***/ }), -/***/ "./node_modules/d3-collection/src/set.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-collection/src/set.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/area.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-geo/src/area.js ***! + \*****************************************/ +/*! exports provided: areaRingSum, areaStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaRingSum", function() { return areaRingSum; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaStream", function() { return areaStream; }); +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); -function Set() {} -var proto = _map__WEBPACK_IMPORTED_MODULE_0__["default"].prototype; -Set.prototype = set.prototype = { - constructor: Set, - has: proto.has, - add: function(value) { - value += ""; - this[_map__WEBPACK_IMPORTED_MODULE_0__["prefix"] + value] = value; - return this; + +var areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(); + +var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + lambda00, + phi00, + lambda0, + cosPhi0, + sinPhi0; + +var areaStream = { + point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + polygonStart: function() { + areaRingSum.reset(); + areaStream.lineStart = areaRingStart; + areaStream.lineEnd = areaRingEnd; }, - remove: proto.remove, - clear: proto.clear, - values: proto.keys, - size: proto.size, - empty: proto.empty, - each: proto.each + polygonEnd: function() { + var areaRing = +areaRingSum; + areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] + areaRing : areaRing); + this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; + }, + sphere: function() { + areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]); + } }; -function set(object, f) { - var set = new Set; +function areaRingStart() { + areaStream.point = areaPointFirst; +} - // Copy constructor. - if (object instanceof Set) object.each(function(value) { set.add(value); }); +function areaRingEnd() { + areaPoint(lambda00, phi00); +} - // Otherwise, assume it’s an array. - else if (object) { - var i = -1, n = object.length; - if (f == null) while (++i < n) set.add(object[i]); - else while (++i < n) set.add(f(object[i], i, object)); - } +function areaPointFirst(lambda, phi) { + areaStream.point = areaPoint; + lambda00 = lambda, phi00 = phi; + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; + lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); +} - return set; +function areaPoint(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; + phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]; // half the angular distance from south pole + + // Spherical excess E for a spherical triangle with vertices: south pole, + // previous point, current point. Uses a formula derived from Cagnoli’s + // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). + var dLambda = lambda - lambda0, + sdLambda = dLambda >= 0 ? 1 : -1, + adLambda = sdLambda * dLambda, + cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), + sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), + k = sinPhi0 * sinPhi, + u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(adLambda), + v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(adLambda); + areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(v, u)); + + // Advance the previous points. + lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; } -/* harmony default export */ __webpack_exports__["default"] = (set); +/* harmony default export */ __webpack_exports__["default"] = (function(object) { + areaSum.reset(); + Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, areaStream); + return areaSum * 2; +}); /***/ }), -/***/ "./node_modules/d3-collection/src/values.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-collection/src/values.js ***! - \**************************************************/ +/***/ "./node_modules/d3-geo/src/bounds.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-geo/src/bounds.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; -}); +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js"); +/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); -/***/ }), -/***/ "./node_modules/d3-color/src/color.js": -/*!********************************************!*\ - !*** ./node_modules/d3-color/src/color.js ***! - \********************************************/ -/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -function Color() {} +var lambda0, phi0, lambda1, phi1, // bounds + lambda2, // previous lambda-coordinate + lambda00, phi00, // first point + p0, // previous 3D point + deltaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + ranges, + range; -var darker = 0.7; -var brighter = 1 / darker; +var boundsStream = { + point: boundsPoint, + lineStart: boundsLineStart, + lineEnd: boundsLineEnd, + polygonStart: function() { + boundsStream.point = boundsRingPoint; + boundsStream.lineStart = boundsRingStart; + boundsStream.lineEnd = boundsRingEnd; + deltaSum.reset(); + _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonStart(); + }, + polygonEnd: function() { + _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonEnd(); + boundsStream.point = boundsPoint; + boundsStream.lineStart = boundsLineStart; + boundsStream.lineEnd = boundsLineEnd; + if (_area_js__WEBPACK_IMPORTED_MODULE_1__["areaRingSum"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); + else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi1 = 90; + else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi0 = -90; + range[0] = lambda0, range[1] = lambda1; + }, + sphere: function() { + lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); + } +}; -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); +function boundsPoint(lambda, phi) { + ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); + if (phi < phi0) phi0 = phi; + if (phi > phi1) phi1 = phi; +} -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); +function linePoint(lambda, phi) { + var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesian"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"]]); + if (p0) { + var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(p0, p), + equatorial = [normal[1], -normal[0], 0], + inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(equatorial, normal); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianNormalizeInPlace"])(inflection); + inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["spherical"])(inflection); + var delta = lambda - lambda2, + sign = delta > 0 ? 1 : -1, + lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"] * sign, + phii, + antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180; + if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { + phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; + if (phii > phi1) phi1 = phii; + } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { + phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; + if (phii < phi0) phi0 = phii; + } else { + if (phi < phi0) phi0 = phi; + if (phi > phi1) phi1 = phi; + } + if (antimeridian) { + if (lambda < lambda2) { + if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; + } else { + if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; + } + } else { + if (lambda1 >= lambda0) { + if (lambda < lambda0) lambda0 = lambda; + if (lambda > lambda1) lambda1 = lambda; + } else { + if (lambda > lambda2) { + if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; + } else { + if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; + } + } + } + } else { + ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); + } + if (phi < phi0) phi0 = phi; + if (phi > phi1) phi1 = phi; + p0 = p, lambda2 = lambda; } -function color_formatHsl() { - return hslConvert(this).formatHsl(); +function boundsLineStart() { + boundsStream.point = linePoint; } -function color_formatRgb() { - return this.rgb().formatRgb(); +function boundsLineEnd() { + range[0] = lambda0, range[1] = lambda1; + boundsStream.point = boundsPoint; + p0 = null; } -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; +function boundsRingPoint(lambda, phi) { + if (p0) { + var delta = lambda - lambda2; + deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); + } else { + lambda00 = lambda, phi00 = phi; + } + _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].point(lambda, phi); + linePoint(lambda, phi); } -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +function boundsRingStart() { + _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineStart(); } -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); +function boundsRingEnd() { + boundsRingPoint(lambda00, phi00); + _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineEnd(); + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) lambda0 = -(lambda1 = 180); + range[0] = lambda0, range[1] = lambda1; + p0 = null; } -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); +// Finds the left-right distance between two longitudes. +// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want +// the distance between ±180° to be 360°. +function angle(lambda0, lambda1) { + return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; } -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +function rangeCompare(a, b) { + return a[0] - b[0]; } -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; +function rangeContains(range, x) { + return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; } -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} +/* harmony default export */ __webpack_exports__["default"] = (function(feature) { + var i, n, a, b, merged, deltaMax, delta; -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} + phi1 = lambda1 = -(lambda0 = phi0 = Infinity); + ranges = []; + Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__["default"])(feature, boundsStream); -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} + // First, sort ranges by their minimum longitudes. + if (n = ranges.length) { + ranges.sort(rangeCompare); -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} + // Then, merge any ranges that overlap. + for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { + b = ranges[i]; + if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { + if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; + if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; + } else { + merged.push(a = b); + } + } -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; + // Finally, find the largest gap between the merged ranges. + // The final bounding box will be the inverse of this gap. + for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { + b = merged[i]; + if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1]; + } } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - displayable: function() { - return (0 <= this.s && this.s <= 1 || isNaN(this.s)) - && (0 <= this.l && this.l <= 1) - && (0 <= this.opacity && this.opacity <= 1); - }, - formatHsl: function() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); + ranges = range = null; -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} + return lambda0 === Infinity || phi0 === Infinity + ? [[NaN, NaN], [NaN, NaN]] + : [[lambda0, phi0], [lambda1, phi1]]; +}); /***/ }), -/***/ "./node_modules/d3-color/src/cubehelix.js": -/*!************************************************!*\ - !*** ./node_modules/d3-color/src/cubehelix.js ***! - \************************************************/ -/*! exports provided: default, Cubehelix */ +/***/ "./node_modules/d3-geo/src/cartesian.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-geo/src/cartesian.js ***! + \**********************************************/ +/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spherical", function() { return spherical; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesian", function() { return cartesian; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianDot", function() { return cartesianDot; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianCross", function() { return cartesianCross; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianAddInPlace", function() { return cartesianAddInPlace; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianScale", function() { return cartesianScale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianNormalizeInPlace", function() { return cartesianNormalizeInPlace; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +function spherical(cartesian) { + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(cartesian[2])]; +} +function cartesian(spherical) { + var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); + return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)]; +} -var A = -0.14861, - B = +1.78277, - C = -0.29227, - D = -0.90649, - E = +1.97294, - ED = E * D, - EB = E * B, - BC_DA = B * C - D * A; +function cartesianDot(a, b) { + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; +} -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"] - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +function cartesianCross(a, b) { + return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; } -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +// TODO return a +function cartesianAddInPlace(a, b) { + a[0] += b[0], a[1] += b[1], a[2] += b[2]; } -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; +function cartesianScale(vector, k) { + return [vector[0] * k, vector[1] * k, vector[2] * k]; } -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"], - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); +// TODO return d +function cartesianNormalizeInPlace(d) { + var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); + d[0] /= l, d[1] /= l, d[2] /= l; +} /***/ }), -/***/ "./node_modules/d3-color/src/define.js": +/***/ "./node_modules/d3-geo/src/centroid.js": /*!*********************************************!*\ - !*** ./node_modules/d3-color/src/define.js ***! + !*** ./node_modules/d3-geo/src/centroid.js ***! \*********************************************/ -/*! exports provided: default, extend */ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); -/* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -}); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} -/***/ }), -/***/ "./node_modules/d3-color/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-color/src/index.js ***! - \********************************************/ -/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var W0, W1, + X0, Y0, Z0, + X1, Y1, Z1, + X2, Y2, Z2, + lambda00, phi00, // first point + x0, y0, z0; // previous point -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +var centroidStream = { + sphere: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], + point: centroidPoint, + lineStart: centroidLineStart, + lineEnd: centroidLineEnd, + polygonStart: function() { + centroidStream.lineStart = centroidRingStart; + centroidStream.lineEnd = centroidRingEnd; + }, + polygonEnd: function() { + centroidStream.lineStart = centroidLineStart; + centroidStream.lineEnd = centroidLineEnd; + } +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); +// Arithmetic mean of Cartesian vectors. +function centroidPoint(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); + centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); +function centroidPointCartesian(x, y, z) { + ++W0; + X0 += (x - X0) / W0; + Y0 += (y - Y0) / W0; + Z0 += (z - Z0) / W0; +} -/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-color/src/lab.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +function centroidLineStart() { + centroidStream.point = centroidLinePointFirst; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); +function centroidLinePointFirst(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); + x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda); + y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda); + z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi); + centroidStream.point = centroidLinePoint; + centroidPointCartesian(x0, y0, z0); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); +function centroidLinePoint(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi), + x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), + y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), + z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi), + w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); + W1 += w; + X1 += w * (x0 + (x0 = x)); + Y1 += w * (y0 + (y0 = y)); + Z1 += w * (z0 + (z0 = z)); + centroidPointCartesian(x0, y0, z0); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); +function centroidLineEnd() { + centroidStream.point = centroidPoint; +} -/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-color/src/cubehelix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +// See J. E. Brock, The Inertia Tensor for a Spherical Triangle, +// J. Applied Mechanics 42, 239 (1975). +function centroidRingStart() { + centroidStream.point = centroidRingPointFirst; +} + +function centroidRingEnd() { + centroidRingPoint(lambda00, phi00); + centroidStream.point = centroidPoint; +} + +function centroidRingPointFirst(lambda, phi) { + lambda00 = lambda, phi00 = phi; + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; + centroidStream.point = centroidRingPoint; + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); + x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda); + y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda); + z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi); + centroidPointCartesian(x0, y0, z0); +} + +function centroidRingPoint(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi), + x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), + y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), + z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi), + cx = y0 * z - z0 * y, + cy = z0 * x - x0 * z, + cz = x0 * y - y0 * x, + m = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(cx * cx + cy * cy + cz * cz), + w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(m), // line weight = angle + v = m && -w / m; // area weight multiplier + X2 += v * cx; + Y2 += v * cy; + Z2 += v * cz; + W1 += w; + X1 += w * (x0 + (x0 = x)); + Y1 += w * (y0 + (y0 = y)); + Z1 += w * (z0 + (z0 = z)); + centroidPointCartesian(x0, y0, z0); +} +/* harmony default export */ __webpack_exports__["default"] = (function(object) { + W0 = W1 = + X0 = Y0 = Z0 = + X1 = Y1 = Z1 = + X2 = Y2 = Z2 = 0; + Object(_stream_js__WEBPACK_IMPORTED_MODULE_2__["default"])(object, centroidStream); + var x = X2, + y = Y2, + z = Z2, + m = x * x + y * y + z * z; + // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. + if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) { + x = X1, y = Y1, z = Z1; + // If the feature has zero length, fall back to arithmetic mean of point vectors. + if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) x = X0, y = Y0, z = Z0; + m = x * x + y * y + z * z; + // If the feature still has an undefined ccentroid, then return. + if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) return [NaN, NaN]; + } + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(m)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; +}); /***/ }), -/***/ "./node_modules/d3-color/src/lab.js": -/*!******************************************!*\ - !*** ./node_modules/d3-color/src/lab.js ***! - \******************************************/ -/*! exports provided: gray, default, Lab, lch, hcl, Hcl */ +/***/ "./node_modules/d3-geo/src/circle.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-geo/src/circle.js ***! + \*******************************************/ +/*! exports provided: circleStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); -/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleStream", function() { return circleStream; }); +/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-geo/src/constant.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js"); -// https://observablehq.com/@mbostock/lab-and-rgb -var K = 18, - Xn = 0.96422, - Yn = 1, - Zn = 0.82521, - t0 = 4 / 29, - t1 = 6 / 29, - t2 = 3 * t1 * t1, - t3 = t1 * t1 * t1; -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) return hcl2lab(o); - if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); - var r = rgb2lrgb(o.r), - g = rgb2lrgb(o.g), - b = rgb2lrgb(o.b), - y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; - if (r === g && g === b) x = z = y; else { - x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); - z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); +// Generates a circle centered at [0°, 0°], with a given radius and precision. +function circleStream(stream, radius, delta, direction, t0, t1) { + if (!delta) return; + var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), + sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(radius), + step = direction * delta; + if (t0 == null) { + t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; + t1 = radius - step / 2; + } else { + t0 = circleRadius(cosRadius, t0); + t1 = circleRadius(cosRadius, t1); + if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; + } + for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { + point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(t)]); + stream.point(point[0], point[1]); } - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); } -function gray(l, opacity) { - return new Lab(l, 0, 0, opacity == null ? 1 : opacity); +// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. +function circleRadius(cosRadius, point) { + point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(point), point[0] -= cosRadius; + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianNormalizeInPlace"])(point); + var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])(-point[1]); + return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; } -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([0, 0]), + radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(90), + precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(6), + ring, + rotate, + stream = {point: point}; -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} + function point(x, y) { + ring.push(x = rotate(x, y)); + x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; + } -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - x = Xn * lab2xyz(x); - y = Yn * lab2xyz(y); - z = Zn * lab2xyz(z); - return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( - lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), - lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), - lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), - this.opacity - ); + function circle() { + var c = center.apply(this, arguments), + r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], + p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; + ring = []; + rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__["rotateRadians"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], 0).invert; + circleStream(stream, r, p, 1); + c = {type: "Polygon", coordinates: [ring]}; + ring = rotate = null; + return c; } -})); -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} + circle.center = function(_) { + return arguments.length ? (center = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([+_[0], +_[1]]), circle) : center; + }; -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} + circle.radius = function(_) { + return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : radius; + }; -function lrgb2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} + circle.precision = function(_) { + return arguments.length ? (precision = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : precision; + }; -function rgb2lrgb(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} + return circle; +}); -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); - var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"]; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} -function lch(l, c, h, opacity) { - return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} +/***/ }), -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} +/***/ "./node_modules/d3-geo/src/clip/antimeridian.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -function hcl2lab(o) { - if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); - var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"]; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); -} -Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return hcl2lab(this).rgb(); - } -})); +/* harmony default export */ __webpack_exports__["default"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])( + function() { return true; }, + clipAntimeridianLine, + clipAntimeridianInterpolate, + [-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]] +)); -/***/ }), +// Takes a line and cuts into visible segments. Return values: 0 - there were +// intersections or the line was empty; 1 - no intersections; 2 - there were +// intersections, and the first and last segments should be rejoined. +function clipAntimeridianLine(stream) { + var lambda0 = NaN, + phi0 = NaN, + sign0 = NaN, + clean; // no intersections -/***/ "./node_modules/d3-color/src/math.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-color/src/math.js ***! - \*******************************************/ -/*! exports provided: deg2rad, rad2deg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return { + lineStart: function() { + stream.lineStart(); + clean = 1; + }, + point: function(lambda1, phi1) { + var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], + delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - lambda0); + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { // line crosses a pole + stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]); + stream.point(sign0, phi0); + stream.lineEnd(); + stream.lineStart(); + stream.point(sign1, phi0); + stream.point(lambda1, phi0); + clean = 0; + } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) { // line crosses antimeridian + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; // handle degeneracies + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; + phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); + stream.point(sign0, phi0); + stream.lineEnd(); + stream.lineStart(); + stream.point(sign1, phi0); + clean = 0; + } + stream.point(lambda0 = lambda1, phi0 = phi1); + sign0 = sign1; + }, + lineEnd: function() { + stream.lineEnd(); + lambda0 = phi0 = NaN; + }, + clean: function() { + return 2 - clean; // if intersections, rejoin first and last segments + } + }; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deg2rad", function() { return deg2rad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rad2deg", function() { return rad2deg; }); -var deg2rad = Math.PI / 180; -var rad2deg = 180 / Math.PI; +function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { + var cosPhi0, + cosPhi1, + sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0 - lambda1); + return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] + ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda1) + - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0)) + / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) + : (phi0 + phi1) / 2; +} + +function clipAntimeridianInterpolate(from, to, direction, stream) { + var phi; + if (from == null) { + phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]; + stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); + stream.point(0, phi); + stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); + stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); + stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); + stream.point(0, -phi); + stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); + stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); + stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); + } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { + var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]; + phi = direction * lambda / 2; + stream.point(-lambda, phi); + stream.point(0, phi); + stream.point(lambda, phi); + } else { + stream.point(to[0], to[1]); + } +} /***/ }), -/***/ "./node_modules/d3-contour/src/area.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-contour/src/area.js ***! - \*********************************************/ +/***/ "./node_modules/d3-geo/src/clip/buffer.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/buffer.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(ring) { - var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; - while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; - return area; +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var lines = [], + line; + return { + point: function(x, y) { + line.push([x, y]); + }, + lineStart: function() { + lines.push(line = []); + }, + lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + rejoin: function() { + if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); + }, + result: function() { + var result = lines; + lines = []; + line = null; + return result; + } + }; }); /***/ }), -/***/ "./node_modules/d3-contour/src/array.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-contour/src/array.js ***! - \**********************************************/ -/*! exports provided: slice */ +/***/ "./node_modules/d3-geo/src/clip/circle.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/circle.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -var array = Array.prototype; - -var slice = array.slice; +/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); +/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ "./node_modules/d3-geo/src/circle.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js"); -/***/ }), -/***/ "./node_modules/d3-contour/src/ascending.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-contour/src/ascending.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a - b; -}); -/***/ }), +/* harmony default export */ __webpack_exports__["default"] = (function(radius) { + var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), + delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], + smallRadius = cr > 0, + notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; // TODO optimise for this common case -/***/ "./node_modules/d3-contour/src/blur.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-contour/src/blur.js ***! - \*********************************************/ -/*! exports provided: blurX, blurY */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function interpolate(from, to, direction, stream) { + Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__["circleStream"])(stream, radius, delta, direction, from, to); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurX", function() { return blurX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurY", function() { return blurY; }); -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurX(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var j = 0; j < m; ++j) { - for (var i = 0, sr = 0; i < n + r; ++i) { - if (i < n) { - sr += source.data[i + j * n]; - } - if (i >= r) { - if (i >= w) { - sr -= source.data[i - w + j * n]; - } - target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); - } - } + function visible(lambda, phi) { + return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi) > cr; } -} -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurY(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var i = 0; i < n; ++i) { - for (var j = 0, sr = 0; j < m + r; ++j) { - if (j < m) { - sr += source.data[i + j * n]; - } - if (j >= r) { - if (j >= w) { - sr -= source.data[i + (j - w) * n]; + // Takes a line and cuts into visible segments. Return values used for polygon + // clipping: 0 - there were intersections or the line was empty; 1 - no + // intersections 2 - there were intersections, and the first and last segments + // should be rejoined. + function clipLine(stream) { + var point0, // previous point + c0, // code for previous point + v0, // visibility of previous point + v00, // visibility of first point + clean; // no intersections + return { + lineStart: function() { + v00 = v0 = false; + clean = 1; + }, + point: function(lambda, phi) { + var point1 = [lambda, phi], + point2, + v = visible(lambda, phi), + c = smallRadius + ? v ? 0 : code(lambda, phi) + : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]), phi) : 0; + if (!point0 && (v00 = v0 = v)) stream.lineStart(); + // Handle degeneracies. + // TODO ignore if not clipping polygons. + if (v !== v0) { + point2 = intersect(point0, point1); + if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point1, point2)) { + point1[0] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; + point1[1] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; + v = visible(point1[0], point1[1]); + } } - target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); + if (v !== v0) { + clean = 0; + if (v) { + // outside going in + stream.lineStart(); + point2 = intersect(point1, point0); + stream.point(point2[0], point2[1]); + } else { + // inside going out + point2 = intersect(point0, point1); + stream.point(point2[0], point2[1]); + stream.lineEnd(); + } + point0 = point2; + } else if (notHemisphere && point0 && smallRadius ^ v) { + var t; + // If the codes for two points are different, or are both zero, + // and there this segment intersects with the small circle. + if (!(c & c0) && (t = intersect(point1, point0, true))) { + clean = 0; + if (smallRadius) { + stream.lineStart(); + stream.point(t[0][0], t[0][1]); + stream.point(t[1][0], t[1][1]); + stream.lineEnd(); + } else { + stream.point(t[1][0], t[1][1]); + stream.lineEnd(); + stream.lineStart(); + stream.point(t[0][0], t[0][1]); + } + } + } + if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point1))) { + stream.point(point1[0], point1[1]); + } + point0 = point1, v0 = v, c0 = c; + }, + lineEnd: function() { + if (v0) stream.lineEnd(); + point0 = null; + }, + // Rejoin first and last segments if there were intersections and the first + // and last points were visible. + clean: function() { + return clean | ((v00 && v0) << 1); } - } + }; } -} + // Intersects the great circle between a and b with the clip circle. + function intersect(a, b, two) { + var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(a), + pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(b); -/***/ }), + // We have two planes, n1.p = d1 and n2.p = d2. + // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). + var n1 = [1, 0, 0], // normal + n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(pa, pb), + n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(n2, n2), + n1n2 = n2[0], // cartesianDot(n1, n2), + determinant = n2n2 - n1n2 * n1n2; -/***/ "./node_modules/d3-contour/src/constant.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-contour/src/constant.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Two polar points. + if (!determinant) return !two && a; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); + var c1 = cr * n2n2 / determinant, + c2 = -cr * n1n2 / determinant, + n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(n1, n2), + A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n1, c1), + B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n2, c2); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(A, B); + // Solve |p(t)|^2 = 1. + var u = n1xn2, + w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, u), + uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(u, u), + t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, A) - 1); -/***/ }), + if (t2 < 0) return; -/***/ "./node_modules/d3-contour/src/contains.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-contour/src/contains.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(t2), + q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w - t) / uu); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q, A); + q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(ring, hole) { - var i = -1, n = hole.length, c; - while (++i < n) if (c = ringContains(ring, hole[i])) return c; - return 0; -}); + if (!two) return q; -function ringContains(ring, point) { - var x = point[0], y = point[1], contains = -1; - for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { - var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; - if (segmentContains(pi, pj, point)) return 0; - if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; - } - return contains; -} + // Two intersection points. + var lambda0 = a[0], + lambda1 = b[0], + phi0 = a[1], + phi1 = b[1], + z; -function segmentContains(a, b, c) { - var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); -} + if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; -function collinear(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); -} + var delta = lambda1 - lambda0, + polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"], + meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; -function within(p, q, r) { - return p <= q && q <= r || r <= q && q <= p; -} + if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; + + // Check that the first point is between a and b. + if (meridian + ? polar + ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] ? phi0 : phi1) + : phi0 <= q[1] && q[1] <= phi1 + : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) { + var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w + t) / uu); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q1, A); + return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q1)]; + } + } + + // Generates a 4-bit vector representing the location of a point relative to + // the small circle's bounding box. + function code(lambda, phi) { + var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] - radius, + code = 0; + if (lambda < -r) code |= 1; // left + else if (lambda > r) code |= 2; // right + if (phi < -r) code |= 4; // below + else if (phi > r) code |= 8; // above + return code; + } + + return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]]); +}); /***/ }), -/***/ "./node_modules/d3-contour/src/contours.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-contour/src/contours.js ***! - \*************************************************/ +/***/ "./node_modules/d3-geo/src/clip/extent.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/extent.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js"); -/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-contour/src/ascending.js"); -/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area */ "./node_modules/d3-contour/src/area.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js"); -/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains */ "./node_modules/d3-contour/src/contains.js"); -/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop */ "./node_modules/d3-contour/src/noop.js"); - +/* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x0 = 0, + y0 = 0, + x1 = 960, + y1 = 500, + cache, + cacheStream, + clip; + return clip = { + stream: function(stream) { + return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0, y0, x1, y1)(cacheStream = stream); + }, + extent: function(_) { + return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; + } + }; +}); +/***/ }), +/***/ "./node_modules/d3-geo/src/clip/index.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-geo/src/clip/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var cases = [ - [], - [[[1.0, 1.5], [0.5, 1.0]]], - [[[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [0.5, 1.0]]], - [[[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 0.5], [1.0, 1.5]]], - [[[1.0, 0.5], [0.5, 1.0]]], - [[[0.5, 1.0], [1.0, 0.5]]], - [[[1.0, 1.5], [1.0, 0.5]]], - [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [1.0, 0.5]]], - [[[0.5, 1.0], [1.5, 1.0]]], - [[[1.0, 1.5], [1.5, 1.0]]], - [[[0.5, 1.0], [1.0, 1.5]]], - [] -]; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js"); +/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js"); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var dx = 1, - dy = 1, - threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__["thresholdSturges"], - smooth = smoothLinear; - function contours(values) { - var tz = threshold(values); - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["extent"])(values), start = domain[0], stop = domain[1]; - tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, tz); - tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); - } else { - tz = tz.slice().sort(_ascending__WEBPACK_IMPORTED_MODULE_2__["default"]); - } - return tz.map(function(value) { - return contour(values, value); - }); - } - // Accumulate, smooth contour rings, assign holes to exterior rings. - // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js - function contour(values, value) { - var polygons = [], - holes = []; - isorings(values, value, function(ring) { - smooth(ring, values, value); - if (Object(_area__WEBPACK_IMPORTED_MODULE_3__["default"])(ring) > 0) polygons.push([ring]); - else holes.push(ring); - }); +/* harmony default export */ __webpack_exports__["default"] = (function(pointVisible, clipLine, interpolate, start) { + return function(sink) { + var line = clipLine(sink), + ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + ringSink = clipLine(ringBuffer), + polygonStarted = false, + polygon, + segments, + ring; - holes.forEach(function(hole) { - for (var i = 0, n = polygons.length, polygon; i < n; ++i) { - if (Object(_contains__WEBPACK_IMPORTED_MODULE_5__["default"])((polygon = polygons[i])[0], hole) !== -1) { - polygon.push(hole); - return; + var clip = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { + clip.point = pointRing; + clip.lineStart = ringStart; + clip.lineEnd = ringEnd; + segments = []; + polygon = []; + }, + polygonEnd: function() { + clip.point = point; + clip.lineStart = lineStart; + clip.lineEnd = lineEnd; + segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments); + var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__["default"])(polygon, start); + if (segments.length) { + if (!polygonStarted) sink.polygonStart(), polygonStarted = true; + Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(segments, compareIntersection, startInside, interpolate, sink); + } else if (startInside) { + if (!polygonStarted) sink.polygonStart(), polygonStarted = true; + sink.lineStart(); + interpolate(null, null, 1, sink); + sink.lineEnd(); } + if (polygonStarted) sink.polygonEnd(), polygonStarted = false; + segments = polygon = null; + }, + sphere: function() { + sink.polygonStart(); + sink.lineStart(); + interpolate(null, null, 1, sink); + sink.lineEnd(); + sink.polygonEnd(); } - }); - - return { - type: "MultiPolygon", - value: value, - coordinates: polygons }; - } - // Marching squares with isolines stitched into rings. - // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js - function isorings(values, value, callback) { - var fragmentByStart = new Array, - fragmentByEnd = new Array, - x, y, t0, t1, t2, t3; + function point(lambda, phi) { + if (pointVisible(lambda, phi)) sink.point(lambda, phi); + } - // Special case for the first row (y = -1, t2 = t3 = 0). - x = y = -1; - t1 = values[0] >= value; - cases[t1 << 1].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[x + 1] >= value; - cases[t0 | t1 << 1].forEach(stitch); + function pointLine(lambda, phi) { + line.point(lambda, phi); } - cases[t1 << 0].forEach(stitch); - // General case for the intermediate rows. - while (++y < dy - 1) { - x = -1; - t1 = values[y * dx + dx] >= value; - t2 = values[y * dx] >= value; - cases[t1 << 1 | t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t1 | t2 << 3].forEach(stitch); + function lineStart() { + clip.point = pointLine; + line.lineStart(); } - // Special case for the last row (y = dy - 1, t0 = t1 = 0). - x = -1; - t2 = values[y * dx] >= value; - cases[t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t2 << 2 | t3 << 3].forEach(stitch); + function lineEnd() { + clip.point = point; + line.lineEnd(); } - cases[t2 << 3].forEach(stitch); - function stitch(line) { - var start = [line[0][0] + x, line[0][1] + y], - end = [line[1][0] + x, line[1][1] + y], - startIndex = index(start), - endIndex = index(end), - f, g; - if (f = fragmentByEnd[startIndex]) { - if (g = fragmentByStart[endIndex]) { - delete fragmentByEnd[f.end]; - delete fragmentByStart[g.start]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; - } - } else { - delete fragmentByEnd[f.end]; - f.ring.push(end); - fragmentByEnd[f.end = endIndex] = f; - } - } else if (f = fragmentByStart[endIndex]) { - if (g = fragmentByEnd[startIndex]) { - delete fragmentByStart[f.start]; - delete fragmentByEnd[g.end]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; - } - } else { - delete fragmentByStart[f.start]; - f.ring.unshift(start); - fragmentByStart[f.start = startIndex] = f; - } - } else { - fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; - } + function pointRing(lambda, phi) { + ring.push([lambda, phi]); + ringSink.point(lambda, phi); } - } - function index(point) { - return point[0] * 2 + point[1] * (dx + 1) * 4; - } + function ringStart() { + ringSink.lineStart(); + ring = []; + } - function smoothLinear(ring, values, value) { - ring.forEach(function(point) { - var x = point[0], - y = point[1], - xt = x | 0, - yt = y | 0, - v0, - v1 = values[yt * dx + xt]; - if (x > 0 && x < dx && xt === x) { - v0 = values[yt * dx + xt - 1]; - point[0] = x + (value - v0) / (v1 - v0) - 0.5; - } - if (y > 0 && y < dy && yt === y) { - v0 = values[(yt - 1) * dx + xt]; - point[1] = y + (value - v0) / (v1 - v0) - 0.5; - } - }); - } + function ringEnd() { + pointRing(ring[0][0], ring[0][1]); + ringSink.lineEnd(); - contours.contour = contour; + var clean = ringSink.clean(), + ringSegments = ringBuffer.result(), + i, n = ringSegments.length, m, + segment, + point; - contours.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]); - if (!(_0 > 0) || !(_1 > 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, contours; - }; + ring.pop(); + polygon.push(ring); + ring = null; - contours.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_), contours) : threshold; - }; + if (!n) return; - contours.smooth = function(_) { - return arguments.length ? (smooth = _ ? smoothLinear : _noop__WEBPACK_IMPORTED_MODULE_6__["default"], contours) : smooth === smoothLinear; - }; + // No intersections. + if (clean & 1) { + segment = ringSegments[0]; + if ((m = segment.length - 1) > 0) { + if (!polygonStarted) sink.polygonStart(), polygonStarted = true; + sink.lineStart(); + for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); + sink.lineEnd(); + } + return; + } - return contours; + // Rejoin connected segments. + // TODO reuse ringBuffer.rejoin()? + if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); + + segments.push(ringSegments.filter(validSegment)); + } + + return clip; + }; }); +function validSegment(segment) { + return segment.length > 1; +} + +// Intersections are sorted along the clip edge. For both antimeridian cutting +// and circle clipping, the same comparison is used. +function compareIntersection(a, b) { + return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - a[1]) + - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - b[1]); +} + /***/ }), -/***/ "./node_modules/d3-contour/src/density.js": -/*!************************************************!*\ - !*** ./node_modules/d3-contour/src/density.js ***! - \************************************************/ +/***/ "./node_modules/d3-geo/src/clip/line.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-geo/src/clip/line.js ***! + \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js"); -/* harmony import */ var _blur__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur */ "./node_modules/d3-contour/src/blur.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js"); -/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b, x0, y0, x1, y1) { + var ax = a[0], + ay = a[1], + bx = b[0], + by = b[1], + t0 = 0, + t1 = 1, + dx = bx - ax, + dy = by - ay, + r; + r = x0 - ax; + if (!dx && r > 0) return; + r /= dx; + if (dx < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dx > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = x1 - ax; + if (!dx && r < 0) return; + r /= dx; + if (dx < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dx > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + r = y0 - ay; + if (!dy && r > 0) return; + r /= dy; + if (dy < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dy > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + r = y1 - ay; + if (!dy && r < 0) return; + r /= dy; + if (dy < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dy > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; + if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; + return true; +}); -function defaultX(d) { - return d[0]; -} -function defaultY(d) { - return d[1]; -} +/***/ }), -function defaultWeight() { - return 1; -} +/***/ "./node_modules/d3-geo/src/clip/rectangle.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/rectangle.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (function() { - var x = defaultX, - y = defaultY, - weight = defaultWeight, - dx = 960, - dy = 500, - r = 20, // blur radius - k = 2, // log2(grid cell size) - o = r * 3, // grid offset, to pad for blur - n = (dx + o * 2) >> k, // grid width - m = (dy + o * 2) >> k, // grid height - threshold = Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(20); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clipRectangle; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js"); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-geo/src/clip/line.js"); +/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js"); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); - function density(data) { - var values0 = new Float32Array(n * m), - values1 = new Float32Array(n * m); - data.forEach(function(d, i, data) { - var xi = (+x(d, i, data) + o) >> k, - yi = (+y(d, i, data) + o) >> k, - wi = +weight(d, i, data); - if (xi >= 0 && xi < n && yi >= 0 && yi < m) { - values0[xi + yi * n] += wi; - } - }); - // TODO Optimize. - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - var tz = threshold(values0); - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(values0); - tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(0, stop, tz); - tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(0, Math.floor(stop / tz) * tz, tz); - tz.shift(); - } - return Object(_contours__WEBPACK_IMPORTED_MODULE_4__["default"])() - .thresholds(tz) - .size([n, m]) - (values0) - .map(transform); - } +var clipMax = 1e9, clipMin = -clipMax; - function transform(geometry) { - geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. - geometry.coordinates.forEach(transformPolygon); - return geometry; - } +// TODO Use d3-polygon’s polygonContains here for the ring check? +// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? - function transformPolygon(coordinates) { - coordinates.forEach(transformRing); - } +function clipRectangle(x0, y0, x1, y1) { - function transformRing(coordinates) { - coordinates.forEach(transformPoint); + function visible(x, y) { + return x0 <= x && x <= x1 && y0 <= y && y <= y1; } - // TODO Optimize. - function transformPoint(coordinates) { - coordinates[0] = coordinates[0] * Math.pow(2, k) - o; - coordinates[1] = coordinates[1] * Math.pow(2, k) - o; + function interpolate(from, to, direction, stream) { + var a = 0, a1 = 0; + if (from == null + || (a = corner(from, direction)) !== (a1 = corner(to, direction)) + || comparePoint(from, to) < 0 ^ direction > 0) { + do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); + while ((a = (a + direction + 4) % 4) !== a1); + } else { + stream.point(to[0], to[1]); + } } - function resize() { - o = r * 3; - n = (dx + o * 2) >> k; - m = (dy + o * 2) >> k; - return density; + function corner(p, direction) { + return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 0 : 3 + : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 2 : 1 + : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 1 : 0 + : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon } - density.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : x; - }; - - density.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : y; - }; - - density.weight = function(_) { - return arguments.length ? (weight = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : weight; - }; - - density.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]); - if (!(_0 >= 0) && !(_0 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, resize(); - }; - - density.cellSize = function(_) { - if (!arguments.length) return 1 << k; - if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); - return k = Math.floor(Math.log(_) / Math.LN2), resize(); - }; - - density.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), density) : threshold; - }; - - density.bandwidth = function(_) { - if (!arguments.length) return Math.sqrt(r * (r + 1)); - if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); - return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); - }; + function compareIntersection(a, b) { + return comparePoint(a.x, b.x); + } - return density; -}); + function comparePoint(a, b) { + var ca = corner(a, 1), + cb = corner(b, 1); + return ca !== cb ? ca - cb + : ca === 0 ? b[1] - a[1] + : ca === 1 ? a[0] - b[0] + : ca === 2 ? a[1] - b[1] + : b[0] - a[0]; + } + return function(stream) { + var activeStream = stream, + bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), + segments, + polygon, + ring, + x__, y__, v__, // first point + x_, y_, v_, // previous point + first, + clean; -/***/ }), + var clipStream = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: polygonStart, + polygonEnd: polygonEnd + }; -/***/ "./node_modules/d3-contour/src/index.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-contour/src/index.js ***! - \**********************************************/ -/*! exports provided: contours, contourDensity */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function point(x, y) { + if (visible(x, y)) activeStream.point(x, y); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return _contours__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + function polygonInside() { + var winding = 0; -/* harmony import */ var _density__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density */ "./node_modules/d3-contour/src/density.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return _density__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + for (var i = 0, n = polygon.length; i < n; ++i) { + for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { + a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; + if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } + else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } + } + } + return winding; + } + // Buffer geometry within a polygon and then clip it en masse. + function polygonStart() { + activeStream = bufferStream, segments = [], polygon = [], clean = true; + } + function polygonEnd() { + var startInside = polygonInside(), + cleanInside = clean && startInside, + visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments)).length; + if (cleanInside || visible) { + stream.polygonStart(); + if (cleanInside) { + stream.lineStart(); + interpolate(null, null, 1, stream); + stream.lineEnd(); + } + if (visible) { + Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(segments, compareIntersection, startInside, interpolate, stream); + } + stream.polygonEnd(); + } + activeStream = stream, segments = polygon = ring = null; + } + function lineStart() { + clipStream.point = linePoint; + if (polygon) polygon.push(ring = []); + first = true; + v_ = false; + x_ = y_ = NaN; + } -/***/ }), + // TODO rather than special-case polygons, simply handle them separately. + // Ideally, coincident intersection points should be jittered to avoid + // clipping issues. + function lineEnd() { + if (segments) { + linePoint(x__, y__); + if (v__ && v_) bufferStream.rejoin(); + segments.push(bufferStream.result()); + } + clipStream.point = point; + if (v_) activeStream.lineEnd(); + } -/***/ "./node_modules/d3-contour/src/noop.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-contour/src/noop.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function linePoint(x, y) { + var v = visible(x, y); + if (polygon) ring.push([x, y]); + if (first) { + x__ = x, y__ = y, v__ = v; + first = false; + if (v) { + activeStream.lineStart(); + activeStream.point(x, y); + } + } else { + if (v && v_) activeStream.point(x, y); + else { + var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], + b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; + if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b, x0, y0, x1, y1)) { + if (!v_) { + activeStream.lineStart(); + activeStream.point(a[0], a[1]); + } + activeStream.point(b[0], b[1]); + if (!v) activeStream.lineEnd(); + clean = false; + } else if (v) { + activeStream.lineStart(); + activeStream.point(x, y); + clean = false; + } + } + } + x_ = x, y_ = y, v_ = v; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() {}); + return clipStream; + }; +} /***/ }), -/***/ "./node_modules/d3-dispatch/src/dispatch.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-dispatch/src/dispatch.js ***! - \**************************************************/ +/***/ "./node_modules/d3-geo/src/clip/rejoin.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/clip/rejoin.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -var noop = {value: function() {}}; +/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js"); -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} -function Dispatch(_) { - this._ = _; +function Intersection(point, points, other, entry) { + this.x = point; + this.z = points; + this.o = other; // another intersection + this.e = entry; // is an entry? + this.v = false; // visited + this.n = this.p = null; // next & previous } -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} +// A generalized polygon clipping algorithm: given a polygon that has been cut +// into its visible line segments, and rejoins the segments by interpolating +// along the clip edge. +/* harmony default export */ __webpack_exports__["default"] = (function(segments, compareIntersection, startInside, interpolate, stream) { + var subject = [], + clip = [], + i, + n; -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; + segments.forEach(function(segment) { + if ((n = segment.length - 1) <= 0) return; + var n, p0 = segment[0], p1 = segment[n], x; - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + // If the first and last points of a segment are coincident, then treat as a + // closed ring. TODO if all rings are closed, then the winding order of the + // exterior ring should be checked. + if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p0, p1)) { + stream.lineStart(); + for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); + stream.lineEnd(); return; } - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } + subject.push(x = new Intersection(p0, segment, null, true)); + clip.push(x.o = new Intersection(p0, null, x, false)); + subject.push(x = new Intersection(p1, segment, null, false)); + clip.push(x.o = new Intersection(p1, null, x, true)); + }); - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; + if (!subject.length) return; -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; - } + clip.sort(compareIntersection); + link(subject); + link(clip); + + for (i = 0, n = clip.length; i < n; ++i) { + clip[i].e = startInside = !startInside; } -} -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } + var start = subject[0], + points, + point; + + while (1) { + // Find first unvisited intersection. + var current = start, + isSubject = true; + while (current.v) if ((current = current.n) === start) return; + points = current.z; + stream.lineStart(); + do { + current.v = current.o.v = true; + if (current.e) { + if (isSubject) { + for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.n.x, 1, stream); + } + current = current.n; + } else { + if (isSubject) { + points = current.p.z; + for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); + } else { + interpolate(current.x, current.p.x, -1, stream); + } + current = current.p; + } + current = current.o; + points = current.z; + isSubject = !isSubject; + } while (!current.v); + stream.lineEnd(); } - if (callback != null) type.push({name: name, value: callback}); - return type; -} +}); -/* harmony default export */ __webpack_exports__["default"] = (dispatch); +function link(array) { + if (!(n = array.length)) return; + var n, + i = 0, + a = array[0], + b; + while (++i < n) { + a.n = b = array[i]; + b.p = a; + a = b; + } + a.n = b = array[0]; + b.p = a; +} /***/ }), -/***/ "./node_modules/d3-dispatch/src/index.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-dispatch/src/index.js ***! - \***********************************************/ -/*! exports provided: dispatch */ +/***/ "./node_modules/d3-geo/src/compose.js": +/*!********************************************!*\ + !*** ./node_modules/d3-geo/src/compose.js ***! + \********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ "./node_modules/d3-dispatch/src/dispatch.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + + function compose(x, y) { + return x = a(x, y), b(x[0], x[1]); + } + if (a.invert && b.invert) compose.invert = function(x, y) { + return x = b.invert(x, y), x && a.invert(x[0], x[1]); + }; + return compose; +}); /***/ }), -/***/ "./node_modules/d3-drag/src/constant.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-drag/src/constant.js ***! - \**********************************************/ +/***/ "./node_modules/d3-geo/src/constant.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-geo/src/constant.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -8817,601 +7553,451 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./node_modules/d3-drag/src/drag.js": -/*!******************************************!*\ - !*** ./node_modules/d3-drag/src/drag.js ***! - \******************************************/ +/***/ "./node_modules/d3-geo/src/contains.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-geo/src/contains.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js"); -/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-drag/src/constant.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-drag/src/event.js"); +/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js"); +/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +var containsObjectType = { + Feature: function(object, point) { + return containsGeometry(object.geometry, point); + }, + FeatureCollection: function(object, point) { + var features = object.features, i = -1, n = features.length; + while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; + return false; + } +}; +var containsGeometryType = { + Sphere: function() { + return true; + }, + Point: function(object, point) { + return containsPoint(object.coordinates, point); + }, + MultiPoint: function(object, point) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) if (containsPoint(coordinates[i], point)) return true; + return false; + }, + LineString: function(object, point) { + return containsLine(object.coordinates, point); + }, + MultiLineString: function(object, point) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) if (containsLine(coordinates[i], point)) return true; + return false; + }, + Polygon: function(object, point) { + return containsPolygon(object.coordinates, point); + }, + MultiPolygon: function(object, point) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) if (containsPolygon(coordinates[i], point)) return true; + return false; + }, + GeometryCollection: function(object, point) { + var geometries = object.geometries, i = -1, n = geometries.length; + while (++i < n) if (containsGeometry(geometries[i], point)) return true; + return false; + } +}; +function containsGeometry(geometry, point) { + return geometry && containsGeometryType.hasOwnProperty(geometry.type) + ? containsGeometryType[geometry.type](geometry, point) + : false; +} -// Ignore right-click, since that should open the context menu. -function defaultFilter() { - return !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].button; +function containsPoint(coordinates, point) { + return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates, point) === 0; } -function defaultContainer() { - return this.parentNode; +function containsLine(coordinates, point) { + var ao, bo, ab; + for (var i = 0, n = coordinates.length; i < n; i++) { + bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], point); + if (bo === 0) return true; + if (i > 0) { + ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], coordinates[i - 1]); + if ( + ab > 0 && + ao <= ab && + bo <= ab && + (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"] * ab + ) + return true; + } + ao = bo; + } + return false; } -function defaultSubject(d) { - return d == null ? {x: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].x, y: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].y} : d; +function containsPolygon(coordinates, point) { + return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__["default"])(coordinates.map(ringRadians), pointRadians(point)); } -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); +function ringRadians(ring) { + return ring = ring.map(pointRadians), ring.pop(), ring; } -/* harmony default export */ __webpack_exports__["default"] = (function() { - var filter = defaultFilter, - container = defaultContainer, - subject = defaultSubject, - touchable = defaultTouchable, - gestures = {}, - listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "drag", "end"), - active = 0, - mousedownx, - mousedowny, - mousemoving, - touchending, - clickDistance2 = 0; +function pointRadians(point) { + return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]]; +} - function drag(selection) { - selection - .on("mousedown.drag", mousedowned) - .filter(touchable) - .on("touchstart.drag", touchstarted) - .on("touchmove.drag", touchmoved) - .on("touchend.drag touchcancel.drag", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } +/* harmony default export */ __webpack_exports__["default"] = (function(object, point) { + return (object && containsObjectType.hasOwnProperty(object.type) + ? containsObjectType[object.type] + : containsGeometry)(object, point); +}); - function mousedowned() { - if (touchending || !filter.apply(this, arguments)) return; - var gesture = beforestart("mouse", container.apply(this, arguments), d3_selection__WEBPACK_IMPORTED_MODULE_1__["mouse"], this, arguments); - if (!gesture) return; - Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); - Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["default"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); - mousemoving = false; - mousedownx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX; - mousedowny = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY; - gesture("start"); - } - function mousemoved() { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); - if (!mousemoving) { - var dx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX - mousedownx, dy = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY - mousedowny; - mousemoving = dx * dx + dy * dy > clickDistance2; - } - gestures.mouse("drag"); - } +/***/ }), - function mouseupped() { - Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag mouseup.drag", null); - Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["yesdrag"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view, mousemoving); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); - gestures.mouse("end"); - } +/***/ "./node_modules/d3-geo/src/distance.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-geo/src/distance.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function touchstarted() { - if (!filter.apply(this, arguments)) return; - var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, - c = container.apply(this, arguments), - n = touches.length, i, gesture; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js"); - for (i = 0; i < n; ++i) { - if (gesture = beforestart(touches[i].identifier, c, d3_selection__WEBPACK_IMPORTED_MODULE_1__["touch"], this, arguments)) { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); - gesture("start"); - } - } - } - function touchmoved() { - var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, - n = touches.length, i, gesture; +var coordinates = [null, null], + object = {type: "LineString", coordinates: coordinates}; - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); - gesture("drag"); - } - } - } +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + coordinates[0] = a; + coordinates[1] = b; + return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object); +}); - function touchended() { - var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches, - n = touches.length, i, gesture; - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(); - gesture("end"); - } - } +/***/ }), + +/***/ "./node_modules/d3-geo/src/graticule.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-geo/src/graticule.js ***! + \**********************************************/ +/*! exports provided: default, graticule10 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return graticule; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graticule10", function() { return graticule10; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); + + + +function graticuleX(y0, y1, dy) { + var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dy).concat(y1); + return function(x) { return y.map(function(y) { return [x, y]; }); }; +} + +function graticuleY(x0, x1, dx) { + var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dx).concat(x1); + return function(y) { return x.map(function(x) { return [x, y]; }); }; +} + +function graticule() { + var x1, x0, X1, X0, + y1, y0, Y1, Y0, + dx = 10, dy = dx, DX = 90, DY = 360, + x, y, X, Y, + precision = 2.5; + + function graticule() { + return {type: "MultiLineString", coordinates: lines()}; } - function beforestart(id, container, point, that, args) { - var p = point(container, id), s, dx, dy, - sublisteners = listeners.copy(); + function lines() { + return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(X0 / DX) * DX, X1, DX).map(X) + .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(Y0 / DY) * DY, Y1, DY).map(Y)) + .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(x)) + .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(y)); + } - if (!Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { - if ((d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].subject = s = subject.apply(that, args)) == null) return false; - dx = s.x - p[0] || 0; - dy = s.y - p[1] || 0; - return true; - })) return; + graticule.lines = function() { + return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); + }; - return function gesture(type) { - var p0 = p, n; - switch (type) { - case "start": gestures[id] = gesture, n = active++; break; - case "end": delete gestures[id], --active; // nobreak - case "drag": p = point(container, id), n = active; break; - } - Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + graticule.outline = function() { + return { + type: "Polygon", + coordinates: [ + X(X0).concat( + Y(Y1).slice(1), + X(X1).reverse().slice(1), + Y(Y0).reverse().slice(1)) + ] }; - } + }; - drag.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : filter; + graticule.extent = function(_) { + if (!arguments.length) return graticule.extentMinor(); + return graticule.extentMajor(_).extentMinor(_); }; - drag.container = function(_) { - return arguments.length ? (container = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : container; + graticule.extentMajor = function(_) { + if (!arguments.length) return [[X0, Y0], [X1, Y1]]; + X0 = +_[0][0], X1 = +_[1][0]; + Y0 = +_[0][1], Y1 = +_[1][1]; + if (X0 > X1) _ = X0, X0 = X1, X1 = _; + if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; + return graticule.precision(precision); }; - drag.subject = function(_) { - return arguments.length ? (subject = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : subject; + graticule.extentMinor = function(_) { + if (!arguments.length) return [[x0, y0], [x1, y1]]; + x0 = +_[0][0], x1 = +_[1][0]; + y0 = +_[0][1], y1 = +_[1][1]; + if (x0 > x1) _ = x0, x0 = x1, x1 = _; + if (y0 > y1) _ = y0, y0 = y1, y1 = _; + return graticule.precision(precision); }; - drag.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : touchable; + graticule.step = function(_) { + if (!arguments.length) return graticule.stepMinor(); + return graticule.stepMajor(_).stepMinor(_); }; - drag.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? drag : value; + graticule.stepMajor = function(_) { + if (!arguments.length) return [DX, DY]; + DX = +_[0], DY = +_[1]; + return graticule; }; - drag.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); + graticule.stepMinor = function(_) { + if (!arguments.length) return [dx, dy]; + dx = +_[0], dy = +_[1]; + return graticule; }; - return drag; -}); + graticule.precision = function(_) { + if (!arguments.length) return precision; + precision = +_; + x = graticuleX(y0, y1, 90); + y = graticuleY(x0, x1, precision); + X = graticuleX(Y0, Y1, 90); + Y = graticuleY(X0, X1, precision); + return graticule; + }; + + return graticule + .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]) + .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]); +} + +function graticule10() { + return graticule()(); +} /***/ }), -/***/ "./node_modules/d3-drag/src/event.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-drag/src/event.js ***! - \*******************************************/ +/***/ "./node_modules/d3-geo/src/identity.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-geo/src/identity.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DragEvent; }); -function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { - this.target = target; - this.type = type; - this.subject = subject; - this.identifier = id; - this.active = active; - this.x = x; - this.y = y; - this.dx = dx; - this.dy = dy; - this._ = dispatch; -} - -DragEvent.prototype.on = function() { - var value = this._.on.apply(this._, arguments); - return value === this._ ? this : value; -}; +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return x; +}); /***/ }), -/***/ "./node_modules/d3-drag/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-drag/src/index.js ***! - \*******************************************/ -/*! exports provided: drag, dragDisable, dragEnable */ +/***/ "./node_modules/d3-geo/src/index.js": +/*!******************************************!*\ + !*** ./node_modules/d3-geo/src/index.js ***! + \******************************************/ +/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ "./node_modules/d3-drag/src/drag.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/bounds.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["yesdrag"]; }); +/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/centroid.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-geo/src/circle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +/* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ "./node_modules/d3-geo/src/clip/extent.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -/***/ }), +/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); -/***/ "./node_modules/d3-drag/src/nodrag.js": -/*!********************************************!*\ - !*** ./node_modules/d3-drag/src/nodrag.js ***! - \********************************************/ -/*! exports provided: default, yesdrag */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-geo/src/contains.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yesdrag", function() { return yesdrag; }); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js"); +/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); +/* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ "./node_modules/d3-geo/src/graticule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["graticule10"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(view) { - var root = view.document.documentElement, - selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); - if ("onselectstart" in root) { - selection.on("selectstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); - } else { - root.__noselect = root.style.MozUserSelect; - root.style.MozUserSelect = "none"; - } -}); - -function yesdrag(view, noclick) { - var root = view.document.documentElement, - selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", null); - if (noclick) { - selection.on("click.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); - setTimeout(function() { selection.on("click.drag", null); }, 0); - } - if ("onselectstart" in root) { - selection.on("selectstart.drag", null); - } else { - root.style.MozUserSelect = root.__noselect; - delete root.__noselect; - } -} - +/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-geo/src/interpolate.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); -/***/ }), +/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); -/***/ "./node_modules/d3-drag/src/noevent.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-drag/src/noevent.js ***! - \*********************************************/ -/*! exports provided: nopropagation, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ "./node_modules/d3-geo/src/path/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ "./node_modules/d3-geo/src/projection/albers.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ "./node_modules/d3-geo/src/projection/albersUsa.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -function nopropagation() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); -} +/* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["azimuthalEqualAreaRaw"]; }); +/* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["azimuthalEquidistantRaw"]; }); -/***/ "./node_modules/d3-dsv/src/autoType.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-dsv/src/autoType.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ "./node_modules/d3-geo/src/projection/conicConformal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoType; }); -function autoType(object) { - for (var key in object) { - var value = object[key].trim(), number, m; - if (!value) value = null; - else if (value === "true") value = true; - else if (value === "false") value = false; - else if (value === "NaN") value = NaN; - else if (!isNaN(number = +value)) value = number; - else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { - if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); - value = new Date(value); - } - else continue; - object[key] = value; - } - return object; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["conicConformalRaw"]; }); -// https://github.com/d3/d3-dsv/issues/45 -var fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); +/* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["conicEqualAreaRaw"]; }); -/***/ "./node_modules/d3-dsv/src/csv.js": -/*!****************************************!*\ - !*** ./node_modules/d3-dsv/src/csv.js ***! - \****************************************/ -/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ "./node_modules/d3-geo/src/projection/conicEquidistant.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return csvFormatBody; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return csvFormatRow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return csvFormatValue; }); -/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["conicEquidistantRaw"]; }); +/* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ "./node_modules/d3-geo/src/projection/equalEarth.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); -var csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])(","); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["equalEarthRaw"]; }); -var csvParse = csv.parse; -var csvParseRows = csv.parseRows; -var csvFormat = csv.format; -var csvFormatBody = csv.formatBody; -var csvFormatRows = csv.formatRows; -var csvFormatRow = csv.formatRow; -var csvFormatValue = csv.formatValue; +/* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["equirectangularRaw"]; }); -/***/ }), +/* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ "./node_modules/d3-geo/src/projection/gnomonic.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); -/***/ "./node_modules/d3-dsv/src/dsv.js": -/*!****************************************!*\ - !*** ./node_modules/d3-dsv/src/dsv.js ***! - \****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["gnomonicRaw"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -var EOL = {}, - EOF = {}, - QUOTE = 34, - NEWLINE = 10, - RETURN = 13; +/* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ "./node_modules/d3-geo/src/projection/identity.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); -function objectConverter(columns) { - return new Function("d", "return {" + columns.map(function(name, i) { - return JSON.stringify(name) + ": d[" + i + "] || \"\""; - }).join(",") + "}"); -} +/* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ "./node_modules/d3-geo/src/projection/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); -function customConverter(columns, f) { - var object = objectConverter(columns); - return function(row, i) { - return f(object(row), i, columns); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["projectionMutator"]; }); -// Compute unique columns in order of discovery. -function inferColumns(rows) { - var columnSet = Object.create(null), - columns = []; +/* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); - rows.forEach(function(row) { - for (var column in row) { - if (!(column in columnSet)) { - columns.push(columnSet[column] = column); - } - } - }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["mercatorRaw"]; }); - return columns; -} +/* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ "./node_modules/d3-geo/src/projection/naturalEarth1.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); -function pad(value, width) { - var s = value + "", length = s.length; - return length < width ? new Array(width - length + 1).join(0) + s : s; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["naturalEarth1Raw"]; }); -function formatYear(year) { - return year < 0 ? "-" + pad(-year, 6) - : year > 9999 ? "+" + pad(year, 6) - : pad(year, 4); -} +/* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ "./node_modules/d3-geo/src/projection/orthographic.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); -function formatDate(date) { - var hours = date.getUTCHours(), - minutes = date.getUTCMinutes(), - seconds = date.getUTCSeconds(), - milliseconds = date.getUTCMilliseconds(); - return isNaN(date) ? "Invalid Date" - : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) - + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" - : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" - : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" - : ""); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["orthographicRaw"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(delimiter) { - var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), - DELIMITER = delimiter.charCodeAt(0); +/* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ "./node_modules/d3-geo/src/projection/stereographic.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); - function parse(text, f) { - var convert, columns, rows = parseRows(text, function(row, i) { - if (convert) return convert(row, i - 1); - columns = row, convert = f ? customConverter(row, f) : objectConverter(row); - }); - rows.columns = columns || []; - return rows; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["stereographicRaw"]; }); - function parseRows(text, f) { - var rows = [], // output rows - N = text.length, - I = 0, // current character index - n = 0, // current line number - t, // current token - eof = N <= 0, // current token followed by EOF? - eol = false; // current token followed by EOL? +/* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ "./node_modules/d3-geo/src/projection/transverseMercator.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); - // Strip the trailing newline. - if (text.charCodeAt(N - 1) === NEWLINE) --N; - if (text.charCodeAt(N - 1) === RETURN) --N; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["transverseMercatorRaw"]; }); - function token() { - if (eof) return EOF; - if (eol) return eol = false, EOL; +/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); - // Unescape quotes. - var i, j = I, c; - if (text.charCodeAt(j) === QUOTE) { - while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); - if ((i = I) >= N) eof = true; - else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - return text.slice(j + 1, i - 1).replace(/""/g, "\""); - } +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); - // Find next delimiter or newline. - while (I < N) { - if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - else if (c !== DELIMITER) continue; - return text.slice(j, i); - } +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-geo/src/transform.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); - // Return last token before EOF. - return eof = true, text.slice(j, N); - } - while ((t = token()) !== EOF) { - var row = []; - while (t !== EOL && t !== EOF) row.push(t), t = token(); - if (f && (row = f(row, n++)) == null) continue; - rows.push(row); - } - return rows; - } - function preformatBody(rows, columns) { - return rows.map(function(row) { - return columns.map(function(column) { - return formatValue(row[column]); - }).join(delimiter); - }); - } - function format(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); - } - function formatBody(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return preformatBody(rows, columns).join("\n"); - } - function formatRows(rows) { - return rows.map(formatRow).join("\n"); - } + // DEPRECATED! Use d3.geoIdentity().clipExtent(…). - function formatRow(row) { - return row.map(formatValue).join(delimiter); - } - function formatValue(value) { - return value == null ? "" - : value instanceof Date ? formatDate(value) - : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" - : value; - } - return { - parse: parse, - parseRows: parseRows, - format: format, - formatBody: formatBody, - formatRows: formatRows, - formatRow: formatRow, - formatValue: formatValue - }; -}); -/***/ }), -/***/ "./node_modules/d3-dsv/src/index.js": -/*!******************************************!*\ - !*** ./node_modules/d3-dsv/src/index.js ***! - \******************************************/ -/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ "./node_modules/d3-dsv/src/csv.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParse"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParseRows"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormat"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatBody"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRows"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRow"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatValue"]; }); -/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ "./node_modules/d3-dsv/src/tsv.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParse"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParseRows"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormat"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatBody"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRows"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRow"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatValue"]; }); -/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ "./node_modules/d3-dsv/src/autoType.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); @@ -9421,1477 +8007,1544 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./node_modules/d3-dsv/src/tsv.js": -/*!****************************************!*\ - !*** ./node_modules/d3-dsv/src/tsv.js ***! - \****************************************/ -/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */ +/***/ "./node_modules/d3-geo/src/interpolate.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/interpolate.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return tsvFormatBody; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return tsvFormatRow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return tsvFormatValue; }); -/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -var tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])("\t"); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], + y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], + x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], + y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], + cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), + sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), + cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1), + sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1), + kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x0), + ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x0), + kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x1), + ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x1), + d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(x1 - x0))), + k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d); -var tsvParse = tsv.parse; -var tsvParseRows = tsv.parseRows; -var tsvFormat = tsv.format; -var tsvFormatBody = tsv.formatBody; -var tsvFormatRows = tsv.formatRows; -var tsvFormatRow = tsv.formatRow; -var tsvFormatValue = tsv.formatValue; + var interpolate = d ? function(t) { + var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(t *= d) / k, + A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d - t) / k, + x = A * kx0 + B * kx1, + y = A * ky0 + B * ky1, + z = A * sy0 + B * sy1; + return [ + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"] + ]; + } : function() { + return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; + }; + + interpolate.distance = d; + + return interpolate; +}); /***/ }), -/***/ "./node_modules/d3-ease/src/back.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/back.js ***! - \******************************************/ -/*! exports provided: backIn, backOut, backInOut */ +/***/ "./node_modules/d3-geo/src/length.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-geo/src/length.js ***! + \*******************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); -var overshoot = 1.70158; - -var backIn = (function custom(s) { - s = +s; +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); - function backIn(t) { - return t * t * ((s + 1) * t - s); - } - backIn.overshoot = custom; - return backIn; -})(overshoot); -var backOut = (function custom(s) { - s = +s; - function backOut(t) { - return --t * t * ((s + 1) * t + s) + 1; - } +var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + lambda0, + sinPhi0, + cosPhi0; - backOut.overshoot = custom; +var lengthStream = { + sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineStart: lengthLineStart, + lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"] +}; - return backOut; -})(overshoot); +function lengthLineStart() { + lengthStream.point = lengthPointFirst; + lengthStream.lineEnd = lengthLineEnd; +} -var backInOut = (function custom(s) { - s = +s; +function lengthLineEnd() { + lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +} - function backInOut(t) { - return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; - } +function lengthPointFirst(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; + lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); + lengthStream.point = lengthPoint; +} - backInOut.overshoot = custom; +function lengthPoint(lambda, phi) { + lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; + var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), + cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), + delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda - lambda0), + cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(delta), + sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(delta), + x = cosPhi * sinDelta, + y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta, + z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta; + lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x * x + y * y), z)); + lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi; +} - return backInOut; -})(overshoot); +/* harmony default export */ __webpack_exports__["default"] = (function(object) { + lengthSum.reset(); + Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, lengthStream); + return +lengthSum; +}); /***/ }), -/***/ "./node_modules/d3-ease/src/bounce.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/bounce.js ***! - \********************************************/ -/*! exports provided: bounceIn, bounceOut, bounceInOut */ +/***/ "./node_modules/d3-geo/src/math.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-geo/src/math.js ***! + \*****************************************/ +/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); -var b1 = 4 / 11, - b2 = 6 / 11, - b3 = 8 / 11, - b4 = 3 / 4, - b5 = 9 / 11, - b6 = 10 / 11, - b7 = 15 / 16, - b8 = 21 / 22, - b9 = 63 / 64, - b0 = 1 / b1 / b1; - -function bounceIn(t) { - return 1 - bounceOut(1 - t); -} - -function bounceOut(t) { - return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; -} - -function bounceInOut(t) { - return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; -} - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quarterPi", function() { return quarterPi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return atan; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exp", function() { return exp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pow", function() { return pow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sign", function() { return sign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return tan; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "haversin", function() { return haversin; }); +var epsilon = 1e-6; +var epsilon2 = 1e-12; +var pi = Math.PI; +var halfPi = pi / 2; +var quarterPi = pi / 4; +var tau = pi * 2; -/***/ }), +var degrees = 180 / pi; +var radians = pi / 180; -/***/ "./node_modules/d3-ease/src/circle.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/circle.js ***! - \********************************************/ -/*! exports provided: circleIn, circleOut, circleInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var abs = Math.abs; +var atan = Math.atan; +var atan2 = Math.atan2; +var cos = Math.cos; +var ceil = Math.ceil; +var exp = Math.exp; +var floor = Math.floor; +var log = Math.log; +var pow = Math.pow; +var sin = Math.sin; +var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; +var sqrt = Math.sqrt; +var tan = Math.tan; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); -function circleIn(t) { - return 1 - Math.sqrt(1 - t * t); +function acos(x) { + return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } -function circleOut(t) { - return Math.sqrt(1 - --t * t); +function asin(x) { + return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); } -function circleInOut(t) { - return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; +function haversin(x) { + return (x = sin(x / 2)) * x; } /***/ }), -/***/ "./node_modules/d3-ease/src/cubic.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-ease/src/cubic.js ***! - \*******************************************/ -/*! exports provided: cubicIn, cubicOut, cubicInOut */ +/***/ "./node_modules/d3-geo/src/noop.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-geo/src/noop.js ***! + \*****************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); -function cubicIn(t) { - return t * t * t; -} - -function cubicOut(t) { - return --t * t * t + 1; -} - -function cubicInOut(t) { - return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return noop; }); +function noop() {} /***/ }), -/***/ "./node_modules/d3-ease/src/elastic.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-ease/src/elastic.js ***! - \*********************************************/ -/*! exports provided: elasticIn, elasticOut, elasticInOut */ +/***/ "./node_modules/d3-geo/src/path/area.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-geo/src/path/area.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); -var tau = 2 * Math.PI, - amplitude = 1, - period = 0.3; - -var elasticIn = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); - function elasticIn(t) { - return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p); - } - elasticIn.amplitude = function(a) { return custom(a, p * tau); }; - elasticIn.period = function(p) { return custom(a, p); }; - return elasticIn; -})(amplitude, period); -var elasticOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); +var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + x00, + y00, + x0, + y0; - function elasticOut(t) { - return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p); +var areaStream = { + point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + polygonStart: function() { + areaStream.lineStart = areaRingStart; + areaStream.lineEnd = areaRingEnd; + }, + polygonEnd: function() { + areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; + areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(areaRingSum)); + areaRingSum.reset(); + }, + result: function() { + var area = areaSum / 2; + areaSum.reset(); + return area; } +}; - elasticOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticOut.period = function(p) { return custom(a, p); }; - - return elasticOut; -})(amplitude, period); +function areaRingStart() { + areaStream.point = areaPointFirst; +} -var elasticInOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); +function areaPointFirst(x, y) { + areaStream.point = areaPoint; + x00 = x0 = x, y00 = y0 = y; +} - function elasticInOut(t) { - return ((t = t * 2 - 1) < 0 - ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p) - : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2; - } +function areaPoint(x, y) { + areaRingSum.add(y0 * x - x0 * y); + x0 = x, y0 = y; +} - elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticInOut.period = function(p) { return custom(a, p); }; +function areaRingEnd() { + areaPoint(x00, y00); +} - return elasticInOut; -})(amplitude, period); +/* harmony default export */ __webpack_exports__["default"] = (areaStream); /***/ }), -/***/ "./node_modules/d3-ease/src/exp.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-ease/src/exp.js ***! - \*****************************************/ -/*! exports provided: expIn, expOut, expInOut */ +/***/ "./node_modules/d3-geo/src/path/bounds.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/path/bounds.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); -function expIn(t) { - return Math.pow(2, 10 * t - 10); -} +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); -function expOut(t) { - return 1 - Math.pow(2, -10 * t); -} -function expInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2; +var x0 = Infinity, + y0 = x0, + x1 = -x0, + y1 = x1; + +var boundsStream = { + point: boundsPoint, + lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + result: function() { + var bounds = [[x0, y0], [x1, y1]]; + x1 = y1 = -(y0 = x0 = Infinity); + return bounds; + } +}; + +function boundsPoint(x, y) { + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; } +/* harmony default export */ __webpack_exports__["default"] = (boundsStream); + /***/ }), -/***/ "./node_modules/d3-ease/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-ease/src/index.js ***! - \*******************************************/ -/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */ +/***/ "./node_modules/d3-geo/src/path/centroid.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-geo/src/path/centroid.js ***! + \**************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-ease/src/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); - -/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-ease/src/quad.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "./node_modules/d3-ease/src/cubic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); +// TODO Enforce positive area for exterior, negative area for interior? -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); +var X0 = 0, + Y0 = 0, + Z0 = 0, + X1 = 0, + Y1 = 0, + Z1 = 0, + X2 = 0, + Y2 = 0, + Z2 = 0, + x00, + y00, + x0, + y0; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); +var centroidStream = { + point: centroidPoint, + lineStart: centroidLineStart, + lineEnd: centroidLineEnd, + polygonStart: function() { + centroidStream.lineStart = centroidRingStart; + centroidStream.lineEnd = centroidRingEnd; + }, + polygonEnd: function() { + centroidStream.point = centroidPoint; + centroidStream.lineStart = centroidLineStart; + centroidStream.lineEnd = centroidLineEnd; + }, + result: function() { + var centroid = Z2 ? [X2 / Z2, Y2 / Z2] + : Z1 ? [X1 / Z1, Y1 / Z1] + : Z0 ? [X0 / Z0, Y0 / Z0] + : [NaN, NaN]; + X0 = Y0 = Z0 = + X1 = Y1 = Z1 = + X2 = Y2 = Z2 = 0; + return centroid; + } +}; -/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "./node_modules/d3-ease/src/poly.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); +function centroidPoint(x, y) { + X0 += x; + Y0 += y; + ++Z0; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); +function centroidLineStart() { + centroidStream.point = centroidPointFirstLine; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); +function centroidPointFirstLine(x, y) { + centroidStream.point = centroidPointLine; + centroidPoint(x0 = x, y0 = y); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); +function centroidPointLine(x, y) { + var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); + X1 += z * (x0 + x) / 2; + Y1 += z * (y0 + y) / 2; + Z1 += z; + centroidPoint(x0 = x, y0 = y); +} -/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "./node_modules/d3-ease/src/sin.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); +function centroidLineEnd() { + centroidStream.point = centroidPoint; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); +function centroidRingStart() { + centroidStream.point = centroidPointFirstRing; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); +function centroidRingEnd() { + centroidPointRing(x00, y00); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); +function centroidPointFirstRing(x, y) { + centroidStream.point = centroidPointRing; + centroidPoint(x00 = x0 = x, y00 = y0 = y); +} -/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "./node_modules/d3-ease/src/exp.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); +function centroidPointRing(x, y) { + var dx = x - x0, + dy = y - y0, + z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); + X1 += z * (x0 + x) / 2; + Y1 += z * (y0 + y) / 2; + Z1 += z; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); + z = y0 * x - x0 * y; + X2 += z * (x0 + x); + Y2 += z * (y0 + y); + Z2 += z * 3; + centroidPoint(x0 = x, y0 = y); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); +/* harmony default export */ __webpack_exports__["default"] = (centroidStream); -/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-ease/src/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); +/***/ "./node_modules/d3-geo/src/path/context.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-geo/src/path/context.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathContext; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); -/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "./node_modules/d3-ease/src/bounce.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); +function PathContext(context) { + this._context = context; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); +PathContext.prototype = { + _radius: 4.5, + pointRadius: function(_) { + return this._radius = _, this; + }, + polygonStart: function() { + this._line = 0; + }, + polygonEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line === 0) this._context.closePath(); + this._point = NaN; + }, + point: function(x, y) { + switch (this._point) { + case 0: { + this._context.moveTo(x, y); + this._point = 1; + break; + } + case 1: { + this._context.lineTo(x, y); + break; + } + default: { + this._context.moveTo(x + this._radius, y); + this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); + break; + } + } + }, + result: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"] +}; -/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "./node_modules/d3-ease/src/back.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); +/***/ "./node_modules/d3-geo/src/path/index.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-geo/src/path/index.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js"); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/path/area.js"); +/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/path/bounds.js"); +/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/path/centroid.js"); +/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ "./node_modules/d3-geo/src/path/context.js"); +/* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ "./node_modules/d3-geo/src/path/measure.js"); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-geo/src/path/string.js"); -/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "./node_modules/d3-ease/src/elastic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(projection, context) { + var pointRadius = 4.5, + projectionStream, + contextStream; + function path(object) { + if (object) { + if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); + Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(contextStream)); + } + return contextStream.result(); + } + path.area = function(object) { + Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__["default"])); + return _area_js__WEBPACK_IMPORTED_MODULE_2__["default"].result(); + }; + path.measure = function(object) { + Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__["default"])); + return _measure_js__WEBPACK_IMPORTED_MODULE_6__["default"].result(); + }; + path.bounds = function(object) { + Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"])); + return _bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"].result(); + }; + path.centroid = function(object) { + Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"])); + return _centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"].result(); + }; + path.projection = function(_) { + return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]) : (projection = _).stream, path) : projection; + }; + path.context = function(_) { + if (!arguments.length) return context; + contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__["default"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__["default"](context = _); + if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); + return path; + }; + path.pointRadius = function(_) { + if (!arguments.length) return pointRadius; + pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); + return path; + }; + return path.projection(projection).context(context); +}); +/***/ }), +/***/ "./node_modules/d3-geo/src/path/measure.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-geo/src/path/measure.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); -/***/ }), +var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), + lengthRing, + x00, + y00, + x0, + y0; -/***/ "./node_modules/d3-ease/src/linear.js": -/*!********************************************!*\ - !*** ./node_modules/d3-ease/src/linear.js ***! - \********************************************/ -/*! exports provided: linear */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); -function linear(t) { - return +t; -} - - -/***/ }), - -/***/ "./node_modules/d3-ease/src/poly.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/poly.js ***! - \******************************************/ -/*! exports provided: polyIn, polyOut, polyInOut */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); -var exponent = 3; - -var polyIn = (function custom(e) { - e = +e; - - function polyIn(t) { - return Math.pow(t, e); - } - - polyIn.exponent = custom; - - return polyIn; -})(exponent); - -var polyOut = (function custom(e) { - e = +e; - - function polyOut(t) { - return 1 - Math.pow(1 - t, e); +var lengthStream = { + point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], + lineStart: function() { + lengthStream.point = lengthPointFirst; + }, + lineEnd: function() { + if (lengthRing) lengthPoint(x00, y00); + lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; + }, + polygonStart: function() { + lengthRing = true; + }, + polygonEnd: function() { + lengthRing = null; + }, + result: function() { + var length = +lengthSum; + lengthSum.reset(); + return length; } +}; - polyOut.exponent = custom; - - return polyOut; -})(exponent); - -var polyInOut = (function custom(e) { - e = +e; - - function polyInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; - } +function lengthPointFirst(x, y) { + lengthStream.point = lengthPoint; + x00 = x0 = x, y00 = y0 = y; +} - polyInOut.exponent = custom; +function lengthPoint(x, y) { + x0 -= x, y0 -= y; + lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x0 * x0 + y0 * y0)); + x0 = x, y0 = y; +} - return polyInOut; -})(exponent); +/* harmony default export */ __webpack_exports__["default"] = (lengthStream); /***/ }), -/***/ "./node_modules/d3-ease/src/quad.js": -/*!******************************************!*\ - !*** ./node_modules/d3-ease/src/quad.js ***! - \******************************************/ -/*! exports provided: quadIn, quadOut, quadInOut */ +/***/ "./node_modules/d3-geo/src/path/string.js": +/*!************************************************!*\ + !*** ./node_modules/d3-geo/src/path/string.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); -function quadIn(t) { - return t * t; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathString; }); +function PathString() { + this._string = []; } -function quadOut(t) { - return t * (2 - t); -} +PathString.prototype = { + _radius: 4.5, + _circle: circle(4.5), + pointRadius: function(_) { + if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; + return this; + }, + polygonStart: function() { + this._line = 0; + }, + polygonEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line === 0) this._string.push("Z"); + this._point = NaN; + }, + point: function(x, y) { + switch (this._point) { + case 0: { + this._string.push("M", x, ",", y); + this._point = 1; + break; + } + case 1: { + this._string.push("L", x, ",", y); + break; + } + default: { + if (this._circle == null) this._circle = circle(this._radius); + this._string.push("M", x, ",", y, this._circle); + break; + } + } + }, + result: function() { + if (this._string.length) { + var result = this._string.join(""); + this._string = []; + return result; + } else { + return null; + } + } +}; -function quadInOut(t) { - return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; +function circle(radius) { + return "m0," + radius + + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + + "z"; } /***/ }), -/***/ "./node_modules/d3-ease/src/sin.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-ease/src/sin.js ***! - \*****************************************/ -/*! exports provided: sinIn, sinOut, sinInOut */ +/***/ "./node_modules/d3-geo/src/pointEqual.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-geo/src/pointEqual.js ***! + \***********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); -var pi = Math.PI, - halfPi = pi / 2; - -function sinIn(t) { - return 1 - Math.cos(t * halfPi); -} +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -function sinOut(t) { - return Math.sin(t * halfPi); -} -function sinInOut(t) { - return (1 - Math.cos(pi * t)) / 2; -} +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; +}); /***/ }), -/***/ "./node_modules/d3-fetch/src/blob.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-fetch/src/blob.js ***! - \*******************************************/ +/***/ "./node_modules/d3-geo/src/polygonContains.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-geo/src/polygonContains.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function responseBlob(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.blob(); -} +/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); +/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { - return fetch(input, init).then(responseBlob); -}); -/***/ }), -/***/ "./node_modules/d3-fetch/src/buffer.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-fetch/src/buffer.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var sum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -function responseArrayBuffer(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.arrayBuffer(); +function longitude(point) { + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) + return point[0]; + else + return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sign"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]); } -/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { - return fetch(input, init).then(responseArrayBuffer); -}); - +/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { + var lambda = longitude(point), + phi = point[1], + sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi), + normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda), 0], + angle = 0, + winding = 0; -/***/ }), + sum.reset(); -/***/ "./node_modules/d3-fetch/src/dsv.js": -/*!******************************************!*\ - !*** ./node_modules/d3-fetch/src/dsv.js ***! - \******************************************/ -/*! exports provided: default, csv, tsv */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; + else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dsv; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return csv; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return tsv; }); -/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js"); -/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); + for (var i = 0, n = polygon.length; i < n; ++i) { + if (!(m = (ring = polygon[i]).length)) continue; + var ring, + m, + point0 = ring[m - 1], + lambda0 = longitude(point0), + phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], + sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi0), + cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi0); + for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { + var point1 = ring[j], + lambda1 = longitude(point1), + phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], + sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi1), + cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi1), + delta = lambda1 - lambda0, + sign = delta >= 0 ? 1 : -1, + absDelta = sign * delta, + antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], + k = sinPhi0 * sinPhi1; + sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(absDelta))); + angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] : delta; -function dsvParse(parse) { - return function(input, init, row) { - if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; - return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { - return parse(response, row); - }); - }; -} + // Are the longitudes either side of the point’s meridian (lambda), + // and are the latitudes smaller than the parallel (phi)? + if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { + var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point1)); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(arc); + var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(normal, arc); + Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(intersection); + var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(intersection[2]); + if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { + winding += antimeridian ^ delta >= 0 ? 1 : -1; + } + } + } + } -function dsv(delimiter, input, init, row) { - if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; - var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["dsvFormat"])(delimiter); - return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { - return format.parse(response, row); - }); -} + // First, determine whether the South pole is inside or outside: + // + // It is inside if: + // * the polygon winds around it in a clockwise direction. + // * the polygon does not (cumulatively) wind around it, but has a negative + // (counter-clockwise) area. + // + // Second, count the (signed) number of times a segment crosses a lambda + // from the point to the South pole. If it is zero, then the point is the + // same side as the South pole. -var csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["csvParse"]); -var tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["tsvParse"]); + return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) ^ (winding & 1); +}); /***/ }), -/***/ "./node_modules/d3-fetch/src/image.js": -/*!********************************************!*\ - !*** ./node_modules/d3-fetch/src/image.js ***! - \********************************************/ +/***/ "./node_modules/d3-geo/src/projection/albers.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/albers.js ***! + \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { - return new Promise(function(resolve, reject) { - var image = new Image; - for (var key in init) image[key] = init[key]; - image.onerror = reject; - image.onload = function() { resolve(image); }; - image.src = input; - }); +/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__["default"])() + .parallels([29.5, 45.5]) + .scale(1070) + .translate([480, 250]) + .rotate([96, 0]) + .center([-0.6, 38.7]); }); /***/ }), -/***/ "./node_modules/d3-fetch/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-fetch/src/index.js ***! - \********************************************/ -/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */ +/***/ "./node_modules/d3-geo/src/projection/albersUsa.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _blob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob */ "./node_modules/d3-fetch/src/blob.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return _blob__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer */ "./node_modules/d3-fetch/src/buffer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _buffer__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ "./node_modules/d3-geo/src/projection/albers.js"); +/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); +/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); -/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv */ "./node_modules/d3-fetch/src/dsv.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["csv"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["tsv"]; }); -/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image */ "./node_modules/d3-fetch/src/image.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return _image__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json */ "./node_modules/d3-fetch/src/json.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return _json__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +// The projections must have mutually exclusive clip regions on the sphere, +// as this will avoid emitting interleaving lines and polygons. +function multiplex(streams) { + var n = streams.length; + return { + point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, + sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, + lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, + lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, + polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, + polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } + }; +} -/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return _text__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +// A composite projection for the United States, configured by default for +// 960×500. The projection also works quite well at 960×600 if you change the +// scale to 1285 and adjust the translate accordingly. The set of standard +// parallels for each region comes from USGS, which is published here: +// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers +/* harmony default export */ __webpack_exports__["default"] = (function() { + var cache, + cacheStream, + lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), lower48Point, + alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 + hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 + point, pointStream = {point: function(x, y) { point = [x, y]; }}; -/* harmony import */ var _xml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml */ "./node_modules/d3-fetch/src/xml.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + function albersUsa(coordinates) { + var x = coordinates[0], y = coordinates[1]; + return point = null, + (lower48Point.point(x, y), point) + || (alaskaPoint.point(x, y), point) + || (hawaiiPoint.point(x, y), point); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["html"]; }); + albersUsa.invert = function(coordinates) { + var k = lower48.scale(), + t = lower48.translate(), + x = (coordinates[0] - t[0]) / k, + y = (coordinates[1] - t[1]) / k; + return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska + : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii + : lower48).invert(coordinates); + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["svg"]; }); + albersUsa.stream = function(stream) { + return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); + }; + albersUsa.precision = function(_) { + if (!arguments.length) return lower48.precision(); + lower48.precision(_), alaska.precision(_), hawaii.precision(_); + return reset(); + }; + albersUsa.scale = function(_) { + if (!arguments.length) return lower48.scale(); + lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); + return albersUsa.translate(lower48.translate()); + }; + albersUsa.translate = function(_) { + if (!arguments.length) return lower48.translate(); + var k = lower48.scale(), x = +_[0], y = +_[1]; + lower48Point = lower48 + .translate(_) + .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) + .stream(pointStream); + alaskaPoint = alaska + .translate([x - 0.307 * k, y + 0.201 * k]) + .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) + .stream(pointStream); + hawaiiPoint = hawaii + .translate([x - 0.205 * k, y + 0.212 * k]) + .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) + .stream(pointStream); + return reset(); + }; + albersUsa.fitExtent = function(extent, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(albersUsa, extent, object); + }; + albersUsa.fitSize = function(size, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(albersUsa, size, object); + }; -/***/ }), + albersUsa.fitWidth = function(width, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(albersUsa, width, object); + }; -/***/ "./node_modules/d3-fetch/src/json.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-fetch/src/json.js ***! - \*******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + albersUsa.fitHeight = function(height, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(albersUsa, height, object); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -function responseJson(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.json(); -} + function reset() { + cache = cacheStream = null; + return albersUsa; + } -/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { - return fetch(input, init).then(responseJson); + return albersUsa.scale(1070); }); /***/ }), -/***/ "./node_modules/d3-fetch/src/text.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-fetch/src/text.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/azimuthal.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***! + \*********************************************************/ +/*! exports provided: azimuthalRaw, azimuthalInvert */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function responseText(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.text(); -} - -/* harmony default export */ __webpack_exports__["default"] = (function(input, init) { - return fetch(input, init).then(responseText); -}); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalRaw", function() { return azimuthalRaw; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalInvert", function() { return azimuthalInvert; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/***/ }), -/***/ "./node_modules/d3-fetch/src/xml.js": -/*!******************************************!*\ - !*** ./node_modules/d3-fetch/src/xml.js ***! - \******************************************/ -/*! exports provided: default, html, svg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return svg; }); -/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js"); - - -function parser(type) { - return function(input, init) { - return Object(_text__WEBPACK_IMPORTED_MODULE_0__["default"])(input, init).then(function(text) { - return (new DOMParser).parseFromString(text, type); - }); - }; +function azimuthalRaw(scale) { + return function(x, y) { + var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x), + cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), + k = scale(cx * cy); + return [ + k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) + ]; + } } -/* harmony default export */ __webpack_exports__["default"] = (parser("application/xml")); - -var html = parser("text/html"); - -var svg = parser("image/svg+xml"); +function azimuthalInvert(angle) { + return function(x, y) { + var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y), + c = angle(z), + sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c), + cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(c); + return [ + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x * sc, z * cc), + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z && y * sc / z) + ]; + } +} /***/ }), -/***/ "./node_modules/d3-force/src/center.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-force/src/center.js ***! - \*********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js": +/*!******************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***! + \******************************************************************/ +/*! exports provided: azimuthalEqualAreaRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { - var nodes; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEqualAreaRaw", function() { return azimuthalEqualAreaRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; - } - } - force.initialize = function(_) { - nodes = _; - }; - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; +var azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(cxcy) { + return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(2 / (1 + cxcy)); +}); - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; +azimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { + return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / 2); +}); - return force; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEqualAreaRaw) + .scale(124.75) + .clipAngle(180 - 1e-3); }); /***/ }), -/***/ "./node_modules/d3-force/src/collide.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-force/src/collide.js ***! - \**********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***! + \********************************************************************/ +/*! exports provided: azimuthalEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); -/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); -/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEquidistantRaw", function() { return azimuthalEquidistantRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -function x(d) { - return d.x + d.vx; -} -function y(d) { - return d.y + d.vy; -} -/* harmony default export */ __webpack_exports__["default"] = (function(radius) { - var nodes, - radii, - strength = 1, - iterations = 1; +var azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(c) { + return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["acos"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c); +}); - if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(radius == null ? 1 : +radius); +azimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { + return z; +}); - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEquidistantRaw) + .scale(79.4188) + .clipAngle(180 - 1e-3); +}); - for (var k = 0; k < iterations; ++k) { - tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; - if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } - } - return; - } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } +/***/ }), - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; - } - } - } +/***/ "./node_modules/d3-geo/src/projection/conic.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/conic.js ***! + \*****************************************************/ +/*! exports provided: conicProjection */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicProjection", function() { return conicProjection; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - force.initialize = function(_) { - nodes = _; - initialize(); - }; - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; +function conicProjection(projectAt) { + var phi0 = 0, + phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 3, + m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__["projectionMutator"])(projectAt), + p = m(phi0, phi1); - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; + p.parallels = function(_) { + return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; }; - return force; -}); + return p; +} /***/ }), -/***/ "./node_modules/d3-force/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-force/src/constant.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/conicConformal.js": +/*!**************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***! + \**************************************************************/ +/*! exports provided: conicConformalRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicConformalRaw", function() { return conicConformalRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); +/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); -/***/ }), -/***/ "./node_modules/d3-force/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-force/src/index.js ***! - \********************************************/ -/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _center__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center */ "./node_modules/d3-force/src/center.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return _center__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +function tany(y) { + return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + y) / 2); +} -/* harmony import */ var _collide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide */ "./node_modules/d3-force/src/collide.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return _collide__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +function conicConformalRaw(y0, y1) { + var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), + n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(tany(y1) / tany(y0)), + f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y0), n) / n; -/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link */ "./node_modules/d3-force/src/link.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return _link__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__["mercatorRaw"]; -/* harmony import */ var _manyBody__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody */ "./node_modules/d3-force/src/manyBody.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return _manyBody__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + function project(x, y) { + if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } + else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } + var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y), n); + return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(n * x)]; + } -/* harmony import */ var _radial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial */ "./node_modules/d3-force/src/radial.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return _radial__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + project.invert = function(x, y) { + var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + fy * fy); + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(fy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy), 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; + }; -/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return _simulation__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + return project; +} -/* harmony import */ var _x__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x */ "./node_modules/d3-force/src/x.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return _x__WEBPACK_IMPORTED_MODULE_6__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicConformalRaw) + .scale(109.5) + .parallels([30, 30]); +}); -/* harmony import */ var _y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y */ "./node_modules/d3-force/src/y.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return _y__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +/***/ }), +/***/ "./node_modules/d3-geo/src/projection/conicEqualArea.js": +/*!**************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***! + \**************************************************************/ +/*! exports provided: conicEqualAreaRaw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEqualAreaRaw", function() { return conicEqualAreaRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); +/* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js"); +function conicEqualAreaRaw(y0, y1) { + var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1)) / 2; + // Are the parallels symmetrical around the Equator? + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["cylindricalEqualAreaRaw"])(y0); + var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c) / n; + function project(x, y) { + var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)) / n; + return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x)]; + } -/***/ }), + project.invert = function(x, y) { + var r0y = r0 - y; + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(r0y)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; + }; -/***/ "./node_modules/d3-force/src/jiggle.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-force/src/jiggle.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return project; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { - return (Math.random() - 0.5) * 1e-6; + return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEqualAreaRaw) + .scale(155.424) + .center([0, 33.6442]); }); /***/ }), -/***/ "./node_modules/d3-force/src/link.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-force/src/link.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/conicEquidistant.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***! + \****************************************************************/ +/*! exports provided: conicEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); -/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); -/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEquidistantRaw", function() { return conicEquidistantRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); +/* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js"); -function index(d) { - return d.index; -} -function find(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("missing: " + nodeId); - return node; -} -/* harmony default export */ __webpack_exports__["default"] = (function(links) { - var id = index, - strength = defaultStrength, - strengths, - distance = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(30), - distances, - nodes, - count, - bias, - iterations = 1; +function conicEquidistantRaw(y0, y1) { + var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), + n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / (y1 - y0), + g = cy0 / n + y0; - if (links == null) links = []; + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__["equirectangularRaw"]; - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); + function project(x, y) { + var gy = g - y, nx = n * x; + return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(nx)]; } - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(); - y = target.y + target.vy - source.y - source.vy || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; - } - } - } + project.invert = function(x, y) { + var gy = g - y; + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(gy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy), g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + gy * gy)]; + }; - function initialize() { - if (!nodes) return; + return project; +} - var i, - n = nodes.length, - m = links.length, - nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_2__["map"])(nodes, id), - link; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEquidistantRaw) + .scale(131.154) + .center([0, 13.9389]); +}); - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find(nodeById, link.source); - if (typeof link.target !== "object") link.target = find(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); - } +/***/ }), - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } +/***/ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***! + \********************************************************************/ +/*! exports provided: cylindricalEqualAreaRaw */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function initializeStrength() { - if (!nodes) return; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cylindricalEqualAreaRaw", function() { return cylindricalEqualAreaRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); - } - } - function initializeDistance() { - if (!nodes) return; +function cylindricalEqualAreaRaw(phi0) { + var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi0); - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); - } + function forward(lambda, phi) { + return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi) / cosPhi0]; } - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; - }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeStrength(), force) : strength; - }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeDistance(), force) : distance; + forward.invert = function(x, y) { + return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(y * cosPhi0)]; }; - return force; -}); + return forward; +} /***/ }), -/***/ "./node_modules/d3-force/src/manyBody.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-force/src/manyBody.js ***! - \***********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/equalEarth.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***! + \**********************************************************/ +/*! exports provided: equalEarthRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); -/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js"); -/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); -/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalEarthRaw", function() { return equalEarthRaw; }); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +var A1 = 1.340264, + A2 = -0.081106, + A3 = 0.000893, + A4 = 0.003796, + M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(3) / 2, + iterations = 12; -/* harmony default export */ __webpack_exports__["default"] = (function() { - var nodes, - node, - alpha, - strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, _simulation__WEBPACK_IMPORTED_MODULE_3__["x"], _simulation__WEBPACK_IMPORTED_MODULE_3__["y"]).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); - } - - function accumulate(quad) { - var strength = 0, q, c, weight = 0, x, y, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x = y = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = Math.abs(q.value))) { - strength += q.value, weight += c, x += c * q.x, y += c * q.y; - } - } - quad.x = x / weight; - quad.y = y / weight; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } +function equalEarthRaw(lambda, phi) { + var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)), l2 = l * l, l6 = l2 * l2 * l2; + return [ + lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), + l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) + ]; +} - quad.value = strength; +equalEarthRaw.invert = function(x, y) { + var l = y, l2 = l * l, l6 = l2 * l2 * l2; + for (var i = 0, delta, fy, fpy; i < iterations; ++i) { + fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; + fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); + l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; + if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) break; } + return [ + M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l), + Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(l) / M) + ]; +}; - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x = quad.x - node.x, - y = quad.y - node.y, - w = x2 - x1, - l = x * x + y * y; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; - if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x * quad.value * alpha / l; - node.vy += y * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equalEarthRaw) + .scale(177.158); +}); - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x; - if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x * w; - node.vy += y * w; - } while (quad = quad.next); - } +/***/ }), - force.initialize = function(_) { - nodes = _; - initialize(); - }; +/***/ "./node_modules/d3-geo/src/projection/equirectangular.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***! + \***************************************************************/ +/*! exports provided: equirectangularRaw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equirectangularRaw", function() { return equirectangularRaw; }); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; +function equirectangularRaw(lambda, phi) { + return [lambda, phi]; +} - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; +equirectangularRaw.invert = equirectangularRaw; - return force; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equirectangularRaw) + .scale(152.63); }); /***/ }), -/***/ "./node_modules/d3-force/src/radial.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-force/src/radial.js ***! - \*********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/fit.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/fit.js ***! + \***************************************************/ +/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(radius, x, y) { - var nodes, - strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), - strengths, - radiuses; - - if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+radius); - if (x == null) x = 0; - if (y == null) y = 0; - - function force(alpha) { - for (var i = 0, n = nodes.length; i < n; ++i) { - var node = nodes[i], - dx = node.x - x || 1e-6, - dy = node.y - y || 1e-6, - r = Math.sqrt(dx * dx + dy * dy), - k = (radiuses[i] - r) * strengths[i] * alpha / r; - node.vx += dx * k; - node.vy += dy * k; - } - } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitExtent", function() { return fitExtent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitSize", function() { return fitSize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitWidth", function() { return fitWidth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitHeight", function() { return fitHeight; }); +/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js"); +/* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ "./node_modules/d3-geo/src/path/bounds.js"); - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - radiuses = new Array(n); - for (i = 0; i < n; ++i) { - radiuses[i] = +radius(nodes[i], i, nodes); - strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); - } - } - force.initialize = function(_) { - nodes = _, initialize(); - }; - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; - }; +function fit(projection, fitBounds, object) { + var clip = projection.clipExtent && projection.clipExtent(); + projection.scale(150).translate([0, 0]); + if (clip != null) projection.clipExtent(null); + Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"])); + fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"].result()); + if (clip != null) projection.clipExtent(clip); + return projection; +} - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; - }; +function fitExtent(projection, extent, object) { + return fit(projection, function(b) { + var w = extent[1][0] - extent[0][0], + h = extent[1][1] - extent[0][1], + k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), + x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, + y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; + projection.scale(150 * k).translate([x, y]); + }, object); +} - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; +function fitSize(projection, size, object) { + return fitExtent(projection, [[0, 0], size], object); +} - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; +function fitWidth(projection, width, object) { + return fit(projection, function(b) { + var w = +width, + k = w / (b[1][0] - b[0][0]), + x = (w - k * (b[1][0] + b[0][0])) / 2, + y = -k * b[0][1]; + projection.scale(150 * k).translate([x, y]); + }, object); +} - return force; -}); +function fitHeight(projection, height, object) { + return fit(projection, function(b) { + var h = +height, + k = h / (b[1][1] - b[0][1]), + x = -k * b[0][0], + y = (h - k * (b[1][1] + b[0][1])) / 2; + projection.scale(150 * k).translate([x, y]); + }, object); +} /***/ }), -/***/ "./node_modules/d3-force/src/simulation.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-force/src/simulation.js ***! - \*************************************************/ -/*! exports provided: x, y, default */ +/***/ "./node_modules/d3-geo/src/projection/gnomonic.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***! + \********************************************************/ +/*! exports provided: gnomonicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); -/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gnomonicRaw", function() { return gnomonicRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -function x(d) { - return d.x; -} -function y(d) { - return d.y; +function gnomonicRaw(x, y) { + var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; + return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; } -var initialRadius = 10, - initialAngle = Math.PI * (3 - Math.sqrt(5)); +gnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"]); -/* harmony default export */ __webpack_exports__["default"] = (function(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__["map"])(), - stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(step), - event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("tick", "end"); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(gnomonicRaw) + .scale(144.049) + .clipAngle(60); +}); - if (nodes == null) nodes = []; - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); - } - } +/***/ }), - function tick(iterations) { - var i, n = nodes.length, node; +/***/ "./node_modules/d3-geo/src/projection/identity.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/identity.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (iterations === undefined) iterations = 1; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); +/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); - for (var k = 0; k < iterations; ++k) { - alpha += (alphaTarget - alpha) * alphaDecay; - forces.each(function (force) { - force(alpha); - }); - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; - } - } - return simulation; - } - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (node.fx != null) node.x = node.fx; - if (node.fy != null) node.y = node.fy; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } +function scaleTranslate(kx, ky, tx, ty) { + return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] : Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ + point: function(x, y) { + this.stream.point(x * kx + tx, y * ky + ty); } - } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes); - return force; - } + }); +} - initializeNodes(); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, transform = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], // scale, translate and reflect + x0 = null, y0, x1, y1, // clip extent + postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], + cache, + cacheStream, + projection; - return simulation = { - tick: tick, + function reset() { + cache = cacheStream = null; + return projection; + } - restart: function() { - return stepper.restart(step), simulation; + return projection = { + stream: function(stream) { + return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); }, - - stop: function() { - return stepper.stop(), simulation; + postclip: function(_) { + return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes; + clipExtent: function(_) { + return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; + scale: function(_) { + return arguments.length ? (transform = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k; }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; + translate: function(_) { + return arguments.length ? (transform = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty]; }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; + reflectX: function(_) { + return arguments.length ? (transform = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0; }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; + reflectY: function(_) { + return arguments.length ? (transform = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0; }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; + fitExtent: function(extent, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(projection, extent, object); }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); + fitSize: function(size, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(projection, size, object); }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; + fitWidth: function(width, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(projection, width, object); }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); + fitHeight: function(height, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(projection, height, object); } }; }); @@ -10899,7781 +9552,6628 @@ var initialRadius = 10, /***/ }), -/***/ "./node_modules/d3-force/src/x.js": -/*!****************************************!*\ - !*** ./node_modules/d3-force/src/x.js ***! - \****************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/index.js ***! + \*****************************************************/ +/*! exports provided: default, projectionMutator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return projection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projectionMutator", function() { return projectionMutator; }); +/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js"); +/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js"); +/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); +/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ "./node_modules/d3-geo/src/compose.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js"); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); +/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); +/* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ "./node_modules/d3-geo/src/projection/resample.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), - nodes, - strengths, - xz; - if (typeof x !== "function") x = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(x == null ? 0 : +x); - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } - } - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - force.initialize = function(_) { - nodes = _; - initialize(); - }; - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; - }; - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : x; - }; - return force; -}); -/***/ }), -/***/ "./node_modules/d3-force/src/y.js": -/*!****************************************!*\ - !*** ./node_modules/d3-force/src/y.js ***! - \****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ + point: function(x, y) { + this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); + } +}); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(y) { - var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; +function transformRotate(rotate) { + return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ + point: function(x, y) { + var r = rotate(x, y); + return this.stream.point(r[0], r[1]); } - } + }); +} - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } +function scaleTranslate(k, dx, dy) { + function transform(x, y) { + return [dx + k * x, dy - k * y]; } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; + transform.invert = function(x, y) { + return [(x - dx) / k, (dy - y) / k]; }; + return transform; +} - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : y; +function scaleTranslateRotate(k, dx, dy, alpha) { + var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["cos"])(alpha), + sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sin"])(alpha), + a = cosAlpha * k, + b = sinAlpha * k, + ai = cosAlpha / k, + bi = sinAlpha / k, + ci = (sinAlpha * dy - cosAlpha * dx) / k, + fi = (sinAlpha * dx + cosAlpha * dy) / k; + function transform(x, y) { + return [a * x - b * y + dx, dy - b * x - a * y]; + } + transform.invert = function(x, y) { + return [ai * x - bi * y + ci, fi - bi * x - ai * y]; }; + return transform; +} - return force; -}); - - -/***/ }), - -/***/ "./node_modules/d3-format/src/defaultLocale.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-format/src/defaultLocale.js ***! - \*****************************************************/ -/*! exports provided: format, formatPrefix, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return formatPrefix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); -/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js"); - - -var locale; -var format; -var formatPrefix; - -defaultLocale({ - decimal: ".", - thousands: ",", - grouping: [3], - currency: ["$", ""], - minus: "-" -}); - -function defaultLocale(definition) { - locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); - format = locale.format; - formatPrefix = locale.formatPrefix; - return locale; +function projection(project) { + return projectionMutator(function() { return project; })(); } +function projectionMutator(projectAt) { + var project, + k = 150, // scale + x = 480, y = 250, // translate + lambda = 0, phi = 0, // center + deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate + alpha = 0, // post-rotate + theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"], // pre-clip angle + x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], // post-clip extent + delta2 = 0.5, // precision + projectResample, + projectTransform, + projectRotateTransform, + cache, + cacheStream; -/***/ }), + function projection(point) { + return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); + } -/***/ "./node_modules/d3-format/src/exponent.js": -/*!************************************************!*\ - !*** ./node_modules/d3-format/src/exponent.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function invert(point) { + point = projectRotateTransform.invert(point[0], point[1]); + return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); + projection.stream = function(stream) { + return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); + }; + projection.preclip = function(_) { + return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(x)), x ? x[1] : NaN; -}); + projection.postclip = function(_) { + return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; + }; + projection.clipAngle = function(_) { + return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; + }; -/***/ }), + projection.clipExtent = function(_) { + return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; + }; -/***/ "./node_modules/d3-format/src/formatDecimal.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-format/src/formatDecimal.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + projection.scale = function(_) { + return arguments.length ? (k = +_, recenter()) : k; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -// Computes the decimal coefficient and exponent of the specified number x with -// significant digits p, where x is positive and p is in [1, 21] or undefined. -// For example, formatDecimal(1.23) returns ["123", 0]. -/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { - if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity - var i, coefficient = x.slice(0, i); + projection.translate = function(_) { + return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; + }; - // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ - // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). - return [ - coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, - +x.slice(i + 1) - ]; -}); + projection.center = function(_) { + return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; + }; + projection.rotate = function(_) { + return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; + }; -/***/ }), + projection.angle = function(_) { + return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; + }; -/***/ "./node_modules/d3-format/src/formatGroup.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-format/src/formatGroup.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + projection.precision = function(_) { + return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sqrt"])(delta2); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(grouping, thousands) { - return function(value, width) { - var i = value.length, - t = [], - j = 0, - g = grouping[0], - length = 0; + projection.fitExtent = function(extent, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitExtent"])(projection, extent, object); + }; - while (i > 0 && g > 0) { - if (length + g + 1 > width) g = Math.max(1, width - length); - t.push(value.substring(i -= g, i + g)); - if ((length += g + 1) > width) break; - g = grouping[j = (j + 1) % grouping.length]; - } + projection.fitSize = function(size, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitSize"])(projection, size, object); + }; - return t.reverse().join(thousands); + projection.fitWidth = function(width, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitWidth"])(projection, width, object); }; -}); + projection.fitHeight = function(height, object) { + return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitHeight"])(projection, height, object); + }; -/***/ }), + function recenter() { + var center = scaleTranslateRotate(k, 0, 0, alpha).apply(null, project(lambda, phi)), + transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], alpha); + rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__["rotateRadians"])(deltaLambda, deltaPhi, deltaGamma); + projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(project, transform); + projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(rotate, projectTransform); + projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2); + return reset(); + } -/***/ "./node_modules/d3-format/src/formatNumerals.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-format/src/formatNumerals.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function reset() { + cache = cacheStream = null; + return projection; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(numerals) { - return function(value) { - return value.replace(/[0-9]/g, function(i) { - return numerals[+i]; - }); + return function() { + project = projectAt.apply(this, arguments); + projection.invert = project.invert && invert; + return recenter(); }; -}); +} /***/ }), -/***/ "./node_modules/d3-format/src/formatPrefixAuto.js": +/***/ "./node_modules/d3-geo/src/projection/mercator.js": /*!********************************************************!*\ - !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***! + !*** ./node_modules/d3-geo/src/projection/mercator.js ***! \********************************************************/ -/*! exports provided: prefixExponent, default */ +/*! exports provided: mercatorRaw, default, mercatorProjection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefixExponent", function() { return prefixExponent; }); -/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorRaw", function() { return mercatorRaw; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorProjection", function() { return mercatorProjection; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -var prefixExponent; -/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { - var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1], - i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, - n = coefficient.length; - return i === n ? coefficient - : i > n ? coefficient + new Array(i - n + 1).join("0") - : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) - : "0." + new Array(1 - i).join("0") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, Math.max(0, p + i - 1))[0]; // less than 1y! + +function mercatorRaw(lambda, phi) { + return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2))]; +} + +mercatorRaw.invert = function(x, y) { + return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; +}; + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return mercatorProjection(mercatorRaw) + .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); }); +function mercatorProjection(project) { + var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(project), + center = m.center, + scale = m.scale, + translate = m.translate, + clipExtent = m.clipExtent, + x0 = null, y0, x1, y1; // clip extent -/***/ }), + m.scale = function(_) { + return arguments.length ? (scale(_), reclip()) : scale(); + }; -/***/ "./node_modules/d3-format/src/formatRounded.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-format/src/formatRounded.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + m.translate = function(_) { + return arguments.length ? (translate(_), reclip()) : translate(); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js"); + m.center = function(_) { + return arguments.length ? (center(_), reclip()) : center(); + }; + m.clipExtent = function(_) { + return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(x, p) { - var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1]; - return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient - : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) - : coefficient + new Array(exponent - coefficient.length + 2).join("0"); -}); + function reclip() { + var k = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * scale(), + t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m.rotate()).invert([0, 0])); + return clipExtent(x0 == null + ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw + ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] + : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); + } + + return reclip(); +} /***/ }), -/***/ "./node_modules/d3-format/src/formatSpecifier.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-format/src/formatSpecifier.js ***! - \*******************************************************/ -/*! exports provided: default, FormatSpecifier */ +/***/ "./node_modules/d3-geo/src/projection/naturalEarth1.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***! + \*************************************************************/ +/*! exports provided: naturalEarth1Raw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatSpecifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return FormatSpecifier; }); -// [[fill]align][sign][symbol][0][width][,][.precision][~][type] -var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "naturalEarth1Raw", function() { return naturalEarth1Raw; }); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -function formatSpecifier(specifier) { - if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); - var match; - return new FormatSpecifier({ - fill: match[1], - align: match[2], - sign: match[3], - symbol: match[4], - zero: match[5], - width: match[6], - comma: match[7], - precision: match[8] && match[8].slice(1), - trim: match[9], - type: match[10] - }); -} -formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof -function FormatSpecifier(specifier) { - this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; - this.align = specifier.align === undefined ? ">" : specifier.align + ""; - this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; - this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; - this.zero = !!specifier.zero; - this.width = specifier.width === undefined ? undefined : +specifier.width; - this.comma = !!specifier.comma; - this.precision = specifier.precision === undefined ? undefined : +specifier.precision; - this.trim = !!specifier.trim; - this.type = specifier.type === undefined ? "" : specifier.type + ""; +function naturalEarth1Raw(lambda, phi) { + var phi2 = phi * phi, phi4 = phi2 * phi2; + return [ + lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), + phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) + ]; } -FormatSpecifier.prototype.toString = function() { - return this.fill - + this.align - + this.sign - + this.symbol - + (this.zero ? "0" : "") - + (this.width === undefined ? "" : Math.max(1, this.width | 0)) - + (this.comma ? "," : "") - + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) - + (this.trim ? "~" : "") - + this.type; +naturalEarth1Raw.invert = function(x, y) { + var phi = y, i = 25, delta; + do { + var phi2 = phi * phi, phi4 = phi2 * phi2; + phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / + (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); + } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && --i > 0); + return [ + x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), + phi + ]; }; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(naturalEarth1Raw) + .scale(175.295); +}); + /***/ }), -/***/ "./node_modules/d3-format/src/formatTrim.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-format/src/formatTrim.js ***! - \**************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/orthographic.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/orthographic.js ***! + \************************************************************/ +/*! exports provided: orthographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. -/* harmony default export */ __webpack_exports__["default"] = (function(s) { - out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { - switch (s[i]) { - case ".": i0 = i1 = i; break; - case "0": if (i0 === 0) i0 = i; i1 = i; break; - default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break; - } - } - return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; -}); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orthographicRaw", function() { return orthographicRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -/***/ }), -/***/ "./node_modules/d3-format/src/formatTypes.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-format/src/formatTypes.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js"); -/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatRounded.js */ "./node_modules/d3-format/src/formatRounded.js"); +function orthographicRaw(x, y) { + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)]; +} +orthographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"]); -/* harmony default export */ __webpack_exports__["default"] = ({ - "%": function(x, p) { return (x * 100).toFixed(p); }, - "b": function(x) { return Math.round(x).toString(2); }, - "c": function(x) { return x + ""; }, - "d": function(x) { return Math.round(x).toString(10); }, - "e": function(x, p) { return x.toExponential(p); }, - "f": function(x, p) { return x.toFixed(p); }, - "g": function(x, p) { return x.toPrecision(p); }, - "o": function(x) { return Math.round(x).toString(8); }, - "p": function(x, p) { return Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x * 100, p); }, - "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"], - "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__["default"], - "X": function(x) { return Math.round(x).toString(16).toUpperCase(); }, - "x": function(x) { return Math.round(x).toString(16); } +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(orthographicRaw) + .scale(249.5) + .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]); }); /***/ }), -/***/ "./node_modules/d3-format/src/identity.js": -/*!************************************************!*\ - !*** ./node_modules/d3-format/src/identity.js ***! - \************************************************/ +/***/ "./node_modules/d3-geo/src/projection/resample.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/resample.js ***! + \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x; -}); +/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); -/***/ }), -/***/ "./node_modules/d3-format/src/index.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-format/src/index.js ***! - \*********************************************/ -/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-format/src/defaultLocale.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +var maxDepth = 16, // maximum depth of subdivision + cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); // cos(minimum angular distance) -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["format"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["formatPrefix"]; }); - -/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(project, delta2) { + return +delta2 ? resample(project, delta2) : resampleNone(project); +}); -/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +function resampleNone(project) { + return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ + point: function(x, y) { + x = project(x, y); + this.stream.point(x[0], x[1]); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["FormatSpecifier"]; }); +function resample(project, delta2) { -/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ "./node_modules/d3-format/src/precisionFixed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { + var dx = x1 - x0, + dy = y1 - y0, + d2 = dx * dx + dy * dy; + if (d2 > 4 * delta2 && depth--) { + var a = a0 + a1, + b = b0 + b1, + c = c0 + c1, + m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(a * a + b * b + c * c), + phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(c /= m), + lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(b, a), + p = project(lambda2, phi2), + x2 = p[0], + y2 = p[1], + dx2 = x2 - x0, + dy2 = y2 - y0, + dz = dy * dx2 - dx * dy2; + if (dz * dz / d2 > delta2 // perpendicular projected distance + || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end + || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance + resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); + stream.point(x2, y2); + resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); + } + } + } + return function(stream) { + var lambda00, x00, y00, a00, b00, c00, // first point + lambda0, x0, y0, a0, b0, c0; // previous point -/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ "./node_modules/d3-format/src/precisionPrefix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + var resampleStream = { + point: point, + lineStart: lineStart, + lineEnd: lineEnd, + polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, + polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } + }; -/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ "./node_modules/d3-format/src/precisionRound.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + function point(x, y) { + x = project(x, y); + stream.point(x[0], x[1]); + } + function lineStart() { + x0 = NaN; + resampleStream.point = linePoint; + stream.lineStart(); + } + function linePoint(lambda, phi) { + var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])([lambda, phi]), p = project(lambda, phi); + resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); + stream.point(x0, y0); + } + function lineEnd() { + resampleStream.point = point; + stream.lineEnd(); + } + function ringStart() { + lineStart(); + resampleStream.point = ringPoint; + resampleStream.lineEnd = ringEnd; + } + function ringPoint(lambda, phi) { + linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; + resampleStream.point = linePoint; + } + function ringEnd() { + resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); + resampleStream.lineEnd = lineEnd; + lineEnd(); + } + return resampleStream; + }; +} /***/ }), -/***/ "./node_modules/d3-format/src/locale.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-format/src/locale.js ***! - \**********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/projection/stereographic.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/stereographic.js ***! + \*************************************************************/ +/*! exports provided: stereographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); -/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "./node_modules/d3-format/src/formatGroup.js"); -/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "./node_modules/d3-format/src/formatNumerals.js"); -/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js"); -/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ "./node_modules/d3-format/src/formatTrim.js"); -/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ "./node_modules/d3-format/src/formatTypes.js"); -/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js"); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-format/src/identity.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stereographicRaw", function() { return stereographicRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +function stereographicRaw(x, y) { + var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; + return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; +} +stereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { + return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(z); +}); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(stereographicRaw) + .scale(250) + .clipAngle(142); +}); +/***/ }), -var map = Array.prototype.map, - prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; +/***/ "./node_modules/d3-geo/src/projection/transverseMercator.js": +/*!******************************************************************!*\ + !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***! + \******************************************************************/ +/*! exports provided: transverseMercatorRaw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (function(locale) { - var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""), - currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", - currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", - decimal = locale.decimal === undefined ? "." : locale.decimal + "", - numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)), - percent = locale.percent === undefined ? "%" : locale.percent + "", - minus = locale.minus === undefined ? "-" : locale.minus + "", - nan = locale.nan === undefined ? "NaN" : locale.nan + ""; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transverseMercatorRaw", function() { return transverseMercatorRaw; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); - function newFormat(specifier) { - specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier); - var fill = specifier.fill, - align = specifier.align, - sign = specifier.sign, - symbol = specifier.symbol, - zero = specifier.zero, - width = specifier.width, - comma = specifier.comma, - precision = specifier.precision, - trim = specifier.trim, - type = specifier.type; - // The "n" type is an alias for ",g". - if (type === "n") comma = true, type = "g"; +function transverseMercatorRaw(lambda, phi) { + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2)), -lambda]; +} - // The "" type, and any invalid type, is an alias for ".12~g". - else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g"; +transverseMercatorRaw.invert = function(x, y) { + return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; +}; - // If zero fill is specified, padding goes after sign and before digits. - if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; +/* harmony default export */ __webpack_exports__["default"] = (function() { + var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__["mercatorProjection"])(transverseMercatorRaw), + center = m.center, + rotate = m.rotate; - // Compute the prefix and suffix. - // For SI-prefix, the suffix is lazily computed. - var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", - suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + m.center = function(_) { + return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); + }; - // What format function should we use? - // Is this an integer type? - // Can this type generate exponential notation? - var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type], - maybeSuffix = /[defgprs%]/.test(type); + m.rotate = function(_) { + return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); + }; - // Set the default precision if not specified, - // or clamp the specified precision to the supported range. - // For significant precision, it must be in [1, 21]. - // For fixed precision, it must be in [0, 20]. - precision = precision === undefined ? 6 - : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) - : Math.max(0, Math.min(20, precision)); + return rotate([0, 0, 90]) + .scale(159.155); +}); - function format(value) { - var valuePrefix = prefix, - valueSuffix = suffix, - i, n, c; - if (type === "c") { - valueSuffix = formatType(value) + valueSuffix; - value = ""; - } else { - value = +value; +/***/ }), - // Perform the initial formatting. - var valueNegative = value < 0; - value = isNaN(value) ? nan : formatType(Math.abs(value), precision); +/***/ "./node_modules/d3-geo/src/rotation.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-geo/src/rotation.js ***! + \*********************************************/ +/*! exports provided: rotateRadians, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Trim insignificant zeros. - if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateRadians", function() { return rotateRadians; }); +/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "./node_modules/d3-geo/src/compose.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); - // If a negative value rounds to zero during formatting, treat as positive. - if (valueNegative && +value === 0) valueNegative = false; - // Compute the prefix and suffix. - valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; - valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__["prefixExponent"] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); +function rotationIdentity(lambda, phi) { + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; +} - // Break the formatted value into the integer “value” part that can be - // grouped, and fractional or exponential “suffix” part that is not. - if (maybeSuffix) { - i = -1, n = value.length; - while (++i < n) { - if (c = value.charCodeAt(i), 48 > c || c > 57) { - valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; - value = value.slice(0, i); - break; - } - } - } - } +rotationIdentity.invert = rotationIdentity; - // If the fill character is not "0", grouping is applied before padding. - if (comma && !zero) value = group(value, Infinity); +function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { + return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) + : rotationLambda(deltaLambda)) + : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) + : rotationIdentity); +} - // Compute the padding. - var length = valuePrefix.length + value.length + valueSuffix.length, - padding = length < width ? new Array(width - length + 1).join(fill) : ""; +function forwardRotationLambda(deltaLambda) { + return function(lambda, phi) { + return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; + }; +} - // If the fill character is "0", grouping is applied after padding. - if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; +function rotationLambda(deltaLambda) { + var rotation = forwardRotationLambda(deltaLambda); + rotation.invert = forwardRotationLambda(-deltaLambda); + return rotation; +} - // Reconstruct the final output based on the desired alignment. - switch (align) { - case "<": value = valuePrefix + value + valueSuffix + padding; break; - case "=": value = valuePrefix + padding + value + valueSuffix; break; - case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; - default: value = padding + valuePrefix + value + valueSuffix; break; - } +function rotationPhiGamma(deltaPhi, deltaGamma) { + var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaPhi), + sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaPhi), + cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaGamma), + sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaGamma); - return numerals(value); - } + function rotation(lambda, phi) { + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), + x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, + y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, + z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), + k = z * cosDeltaPhi + x * sinDeltaPhi; + return [ + Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), + Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaGamma + y * sinDeltaGamma) + ]; + } - format.toString = function() { - return specifier + ""; - }; + rotation.invert = function(lambda, phi) { + var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), + x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, + y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, + z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), + k = z * cosDeltaGamma - y * sinDeltaGamma; + return [ + Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), + Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaPhi - x * sinDeltaPhi) + ]; + }; - return format; - } + return rotation; +} - function formatPrefix(specifier, value) { - var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)), - e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3, - k = Math.pow(10, -e), - prefix = prefixes[8 + e / 3]; - return function(value) { - return f(k * value) + prefix; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(rotate) { + rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"] : 0); + + function forward(coordinates) { + coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); + return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; } - return { - format: newFormat, - formatPrefix: formatPrefix + forward.invert = function(coordinates) { + coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); + return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; }; + + return forward; }); /***/ }), -/***/ "./node_modules/d3-format/src/precisionFixed.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-format/src/precisionFixed.js ***! - \******************************************************/ +/***/ "./node_modules/d3-geo/src/stream.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-geo/src/stream.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); +function streamGeometry(geometry, stream) { + if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { + streamGeometryType[geometry.type](geometry, stream); + } +} +var streamObjectType = { + Feature: function(object, stream) { + streamGeometry(object.geometry, stream); + }, + FeatureCollection: function(object, stream) { + var features = object.features, i = -1, n = features.length; + while (++i < n) streamGeometry(features[i].geometry, stream); + } +}; -/* harmony default export */ __webpack_exports__["default"] = (function(step) { - return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); +var streamGeometryType = { + Sphere: function(object, stream) { + stream.sphere(); + }, + Point: function(object, stream) { + object = object.coordinates; + stream.point(object[0], object[1], object[2]); + }, + MultiPoint: function(object, stream) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); + }, + LineString: function(object, stream) { + streamLine(object.coordinates, stream, 0); + }, + MultiLineString: function(object, stream) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) streamLine(coordinates[i], stream, 0); + }, + Polygon: function(object, stream) { + streamPolygon(object.coordinates, stream); + }, + MultiPolygon: function(object, stream) { + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) streamPolygon(coordinates[i], stream); + }, + GeometryCollection: function(object, stream) { + var geometries = object.geometries, i = -1, n = geometries.length; + while (++i < n) streamGeometry(geometries[i], stream); + } +}; + +function streamLine(coordinates, stream, closed) { + var i = -1, n = coordinates.length - closed, coordinate; + stream.lineStart(); + while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); + stream.lineEnd(); +} + +function streamPolygon(coordinates, stream) { + var i = -1, n = coordinates.length; + stream.polygonStart(); + while (++i < n) streamLine(coordinates[i], stream, 1); + stream.polygonEnd(); +} + +/* harmony default export */ __webpack_exports__["default"] = (function(object, stream) { + if (object && streamObjectType.hasOwnProperty(object.type)) { + streamObjectType[object.type](object, stream); + } else { + streamGeometry(object, stream); + } }); /***/ }), -/***/ "./node_modules/d3-format/src/precisionPrefix.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-format/src/precisionPrefix.js ***! - \*******************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-geo/src/transform.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-geo/src/transform.js ***! + \**********************************************/ +/*! exports provided: default, transformer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); +/* harmony default export */ __webpack_exports__["default"] = (function(methods) { + return { + stream: transformer(methods) + }; +}); +function transformer(methods) { + return function(stream) { + var s = new TransformStream; + for (var key in methods) s[key] = methods[key]; + s.stream = stream; + return s; + }; +} -/* harmony default export */ __webpack_exports__["default"] = (function(step, value) { - return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); -}); +function TransformStream() {} + +TransformStream.prototype = { + constructor: TransformStream, + point: function(x, y) { this.stream.point(x, y); }, + sphere: function() { this.stream.sphere(); }, + lineStart: function() { this.stream.lineStart(); }, + lineEnd: function() { this.stream.lineEnd(); }, + polygonStart: function() { this.stream.polygonStart(); }, + polygonEnd: function() { this.stream.polygonEnd(); } +}; /***/ }), -/***/ "./node_modules/d3-format/src/precisionRound.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-format/src/precisionRound.js ***! - \******************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-hierarchy/src/accessors.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/accessors.js ***! + \****************************************************/ +/*! exports provided: optional, required */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "required", function() { return required; }); +function optional(f) { + return f == null ? null : required(f); +} -/* harmony default export */ __webpack_exports__["default"] = (function(step, max) { - step = Math.abs(step), max = Math.abs(max) - step; - return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(step)) + 1; -}); +function required(f) { + if (typeof f !== "function") throw new Error; + return f; +} /***/ }), -/***/ "./node_modules/d3-geo/src/adder.js": -/*!******************************************!*\ - !*** ./node_modules/d3-geo/src/adder.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-hierarchy/src/array.js": +/*!************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/array.js ***! + \************************************************/ +/*! exports provided: slice, shuffle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -// Adds floating point numbers with twice the normal precision. -// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and -// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3) -// 305–363 (1997). -// Code adapted from GeographicLib by Charles F. F. Karney, -// http://geographiclib.sourceforge.net/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); +var slice = Array.prototype.slice; -/* harmony default export */ __webpack_exports__["default"] = (function() { - return new Adder; -}); +function shuffle(array) { + var m = array.length, + t, + i; -function Adder() { - this.reset(); -} - -Adder.prototype = { - constructor: Adder, - reset: function() { - this.s = // rounded value - this.t = 0; // exact error - }, - add: function(y) { - add(temp, y, this.t); - add(this, temp.s, this.s); - if (this.s) this.t += temp.t; - else this.s = temp.t; - }, - valueOf: function() { - return this.s; + while (m) { + i = Math.random() * m-- | 0; + t = array[m]; + array[m] = array[i]; + array[i] = t; } -}; - -var temp = new Adder; -function add(adder, a, b) { - var x = adder.s = a + b, - bv = x - a, - av = x - bv; - adder.t = (a - av) + (b - bv); + return array; } /***/ }), -/***/ "./node_modules/d3-geo/src/area.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-geo/src/area.js ***! - \*****************************************/ -/*! exports provided: areaRingSum, areaStream, default */ +/***/ "./node_modules/d3-hierarchy/src/cluster.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/cluster.js ***! + \**************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaRingSum", function() { return areaRingSum; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaStream", function() { return areaStream; }); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); +function defaultSeparation(a, b) { + return a.parent === b.parent ? 1 : 2; +} +function meanX(children) { + return children.reduce(meanXReduce, 0) / children.length; +} +function meanXReduce(x, c) { + return x + c.x; +} +function maxY(children) { + return 1 + children.reduce(maxYReduce, 0); +} +function maxYReduce(y, c) { + return Math.max(y, c.y); +} -var areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(); +function leafLeft(node) { + var children; + while (children = node.children) node = children[0]; + return node; +} -var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - lambda00, - phi00, - lambda0, - cosPhi0, - sinPhi0; +function leafRight(node) { + var children; + while (children = node.children) node = children[children.length - 1]; + return node; +} -var areaStream = { - point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - polygonStart: function() { - areaRingSum.reset(); - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - var areaRing = +areaRingSum; - areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] + areaRing : areaRing); - this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; - }, - sphere: function() { - areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]); - } -}; +/* harmony default export */ __webpack_exports__["default"] = (function() { + var separation = defaultSeparation, + dx = 1, + dy = 1, + nodeSize = false; -function areaRingStart() { - areaStream.point = areaPointFirst; -} + function cluster(root) { + var previousNode, + x = 0; -function areaRingEnd() { - areaPoint(lambda00, phi00); -} + // First walk, computing the initial x & y values. + root.eachAfter(function(node) { + var children = node.children; + if (children) { + node.x = meanX(children); + node.y = maxY(children); + } else { + node.x = previousNode ? x += separation(node, previousNode) : 0; + node.y = 0; + previousNode = node; + } + }); -function areaPointFirst(lambda, phi) { - areaStream.point = areaPoint; - lambda00 = lambda, phi00 = phi; - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; - lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); -} + var left = leafLeft(root), + right = leafRight(root), + x0 = left.x - separation(left, right) / 2, + x1 = right.x + separation(right, left) / 2; -function areaPoint(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; - phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]; // half the angular distance from south pole + // Second walk, normalizing x & y to the desired size. + return root.eachAfter(nodeSize ? function(node) { + node.x = (node.x - root.x) * dx; + node.y = (root.y - node.y) * dy; + } : function(node) { + node.x = (node.x - x0) / (x1 - x0) * dx; + node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; + }); + } - // Spherical excess E for a spherical triangle with vertices: south pole, - // previous point, current point. Uses a formula derived from Cagnoli’s - // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). - var dLambda = lambda - lambda0, - sdLambda = dLambda >= 0 ? 1 : -1, - adLambda = sdLambda * dLambda, - cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), - sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), - k = sinPhi0 * sinPhi, - u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(adLambda), - v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(adLambda); - areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(v, u)); + cluster.separation = function(x) { + return arguments.length ? (separation = x, cluster) : separation; + }; - // Advance the previous points. - lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; -} + cluster.size = function(x) { + return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); + }; -/* harmony default export */ __webpack_exports__["default"] = (function(object) { - areaSum.reset(); - Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, areaStream); - return areaSum * 2; + cluster.nodeSize = function(x) { + return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); + }; + + return cluster; }); /***/ }), -/***/ "./node_modules/d3-geo/src/bounds.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-geo/src/bounds.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-hierarchy/src/constant.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/constant.js ***! + \***************************************************/ +/*! exports provided: constantZero, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js"); -/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantZero", function() { return constantZero; }); +function constantZero() { + return 0; +} +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); +/***/ }), -var lambda0, phi0, lambda1, phi1, // bounds - lambda2, // previous lambda-coordinate - lambda00, phi00, // first point - p0, // previous 3D point - deltaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - ranges, - range; +/***/ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js": +/*!**************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var boundsStream = { - point: boundsPoint, - lineStart: boundsLineStart, - lineEnd: boundsLineEnd, - polygonStart: function() { - boundsStream.point = boundsRingPoint; - boundsStream.lineStart = boundsRingStart; - boundsStream.lineEnd = boundsRingEnd; - deltaSum.reset(); - _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonStart(); - }, - polygonEnd: function() { - _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonEnd(); - boundsStream.point = boundsPoint; - boundsStream.lineStart = boundsLineStart; - boundsStream.lineEnd = boundsLineEnd; - if (_area_js__WEBPACK_IMPORTED_MODULE_1__["areaRingSum"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); - else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi1 = 90; - else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi0 = -90; - range[0] = lambda0, range[1] = lambda1; - }, - sphere: function() { - lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var node = this, nodes = [node]; + while (node = node.parent) { + nodes.push(node); } -}; - -function boundsPoint(lambda, phi) { - ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; -} + return nodes; +}); -function linePoint(lambda, phi) { - var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesian"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"]]); - if (p0) { - var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(p0, p), - equatorial = [normal[1], -normal[0], 0], - inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(equatorial, normal); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianNormalizeInPlace"])(inflection); - inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["spherical"])(inflection); - var delta = lambda - lambda2, - sign = delta > 0 ? 1 : -1, - lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"] * sign, - phii, - antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180; - if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; - if (phii > phi1) phi1 = phii; - } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; - if (phii < phi0) phi0 = phii; - } else { - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - } - if (antimeridian) { - if (lambda < lambda2) { - if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; - } - } else { - if (lambda1 >= lambda0) { - if (lambda < lambda0) lambda0 = lambda; - if (lambda > lambda1) lambda1 = lambda; - } else { - if (lambda > lambda2) { - if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; - } - } - } - } else { - ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); - } - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - p0 = p, lambda2 = lambda; -} -function boundsLineStart() { - boundsStream.point = linePoint; -} +/***/ }), -function boundsLineEnd() { - range[0] = lambda0, range[1] = lambda1; - boundsStream.point = boundsPoint; - p0 = null; -} +/***/ "./node_modules/d3-hierarchy/src/hierarchy/count.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function boundsRingPoint(lambda, phi) { - if (p0) { - var delta = lambda - lambda2; - deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); - } else { - lambda00 = lambda, phi00 = phi; - } - _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].point(lambda, phi); - linePoint(lambda, phi); +"use strict"; +__webpack_require__.r(__webpack_exports__); +function count(node) { + var sum = 0, + children = node.children, + i = children && children.length; + if (!i) sum = 1; + else while (--i >= 0) sum += children[i].value; + node.value = sum; } -function boundsRingStart() { - _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineStart(); -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.eachAfter(count); +}); -function boundsRingEnd() { - boundsRingPoint(lambda00, phi00); - _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineEnd(); - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) lambda0 = -(lambda1 = 180); - range[0] = lambda0, range[1] = lambda1; - p0 = null; -} -// Finds the left-right distance between two longitudes. -// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want -// the distance between ±180° to be 360°. -function angle(lambda0, lambda1) { - return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; -} +/***/ }), -function rangeCompare(a, b) { - return a[0] - b[0]; -} +/***/ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function rangeContains(range, x) { - return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var nodes = []; + this.each(function(node) { + nodes.push(node); + }); + return nodes; +}); -/* harmony default export */ __webpack_exports__["default"] = (function(feature) { - var i, n, a, b, merged, deltaMax, delta; - phi1 = lambda1 = -(lambda0 = phi0 = Infinity); - ranges = []; - Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__["default"])(feature, boundsStream); +/***/ }), - // First, sort ranges by their minimum longitudes. - if (n = ranges.length) { - ranges.sort(rangeCompare); +/***/ "./node_modules/d3-hierarchy/src/hierarchy/each.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Then, merge any ranges that overlap. - for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { - b = ranges[i]; - if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { - if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; - if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; - } else { - merged.push(a = b); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + var node = this, current, next = [node], children, i, n; + do { + current = next.reverse(), next = []; + while (node = current.pop()) { + callback(node), children = node.children; + if (children) for (i = 0, n = children.length; i < n; ++i) { + next.push(children[i]); } } - - // Finally, find the largest gap between the merged ranges. - // The final bounding box will be the inverse of this gap. - for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { - b = merged[i]; - if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1]; - } - } - - ranges = range = null; - - return lambda0 === Infinity || phi0 === Infinity - ? [[NaN, NaN], [NaN, NaN]] - : [[lambda0, phi0], [lambda1, phi1]]; + } while (next.length); + return this; }); /***/ }), -/***/ "./node_modules/d3-geo/src/cartesian.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-geo/src/cartesian.js ***! - \**********************************************/ -/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */ +/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js": +/*!**************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***! + \**************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spherical", function() { return spherical; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesian", function() { return cartesian; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianDot", function() { return cartesianDot; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianCross", function() { return cartesianCross; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianAddInPlace", function() { return cartesianAddInPlace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianScale", function() { return cartesianScale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianNormalizeInPlace", function() { return cartesianNormalizeInPlace; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); - - -function spherical(cartesian) { - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(cartesian[2])]; -} - -function cartesian(spherical) { - var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); - return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)]; -} - -function cartesianDot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -} - -function cartesianCross(a, b) { - return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; -} - -// TODO return a -function cartesianAddInPlace(a, b) { - a[0] += b[0], a[1] += b[1], a[2] += b[2]; -} - -function cartesianScale(vector, k) { - return [vector[0] * k, vector[1] * k, vector[2] * k]; -} - -// TODO return d -function cartesianNormalizeInPlace(d) { - var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); - d[0] /= l, d[1] /= l, d[2] /= l; -} +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + var node = this, nodes = [node], next = [], children, i, n; + while (node = nodes.pop()) { + next.push(node), children = node.children; + if (children) for (i = 0, n = children.length; i < n; ++i) { + nodes.push(children[i]); + } + } + while (node = next.pop()) { + callback(node); + } + return this; +}); /***/ }), -/***/ "./node_modules/d3-geo/src/centroid.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/centroid.js ***! - \*********************************************/ +/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***! + \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); - +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + var node = this, nodes = [node], children, i; + while (node = nodes.pop()) { + callback(node), children = node.children; + if (children) for (i = children.length - 1; i >= 0; --i) { + nodes.push(children[i]); + } + } + return this; +}); +/***/ }), -var W0, W1, - X0, Y0, Z0, - X1, Y1, Z1, - X2, Y2, Z2, - lambda00, phi00, // first point - x0, y0, z0; // previous point +/***/ "./node_modules/d3-hierarchy/src/hierarchy/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***! + \**********************************************************/ +/*! exports provided: default, computeHeight, Node */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var centroidStream = { - sphere: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - } -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hierarchy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeHeight", function() { return computeHeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; }); +/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ "./node_modules/d3-hierarchy/src/hierarchy/count.js"); +/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ "./node_modules/d3-hierarchy/src/hierarchy/each.js"); +/* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js"); +/* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js"); +/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sum.js */ "./node_modules/d3-hierarchy/src/hierarchy/sum.js"); +/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sort.js */ "./node_modules/d3-hierarchy/src/hierarchy/sort.js"); +/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-hierarchy/src/hierarchy/path.js"); +/* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ancestors.js */ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js"); +/* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descendants.js */ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js"); +/* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./leaves.js */ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js"); +/* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./links.js */ "./node_modules/d3-hierarchy/src/hierarchy/links.js"); -// Arithmetic mean of Cartesian vectors. -function centroidPoint(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); - centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)); -} -function centroidPointCartesian(x, y, z) { - ++W0; - X0 += (x - X0) / W0; - Y0 += (y - Y0) / W0; - Z0 += (z - Z0) / W0; -} -function centroidLineStart() { - centroidStream.point = centroidLinePointFirst; -} -function centroidLinePointFirst(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); - x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda); - y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda); - z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi); - centroidStream.point = centroidLinePoint; - centroidPointCartesian(x0, y0, z0); -} -function centroidLinePoint(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi), - x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), - y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), - z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi), - w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); + + + + + + + +function hierarchy(data, children) { + var root = new Node(data), + valued = +data.value && (root.value = data.value), + node, + nodes = [root], + child, + childs, + i, + n; + + if (children == null) children = defaultChildren; + + while (node = nodes.pop()) { + if (valued) node.value = +node.data.value; + if ((childs = children(node.data)) && (n = childs.length)) { + node.children = new Array(n); + for (i = n - 1; i >= 0; --i) { + nodes.push(child = node.children[i] = new Node(childs[i])); + child.parent = node; + child.depth = node.depth + 1; + } + } + } + + return root.eachBefore(computeHeight); } -function centroidLineEnd() { - centroidStream.point = centroidPoint; +function node_copy() { + return hierarchy(this).eachBefore(copyData); } -// See J. E. Brock, The Inertia Tensor for a Spherical Triangle, -// J. Applied Mechanics 42, 239 (1975). -function centroidRingStart() { - centroidStream.point = centroidRingPointFirst; +function defaultChildren(d) { + return d.children; } -function centroidRingEnd() { - centroidRingPoint(lambda00, phi00); - centroidStream.point = centroidPoint; +function copyData(node) { + node.data = node.data.data; } -function centroidRingPointFirst(lambda, phi) { - lambda00 = lambda, phi00 = phi; - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; - centroidStream.point = centroidRingPoint; - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); - x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda); - y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda); - z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi); - centroidPointCartesian(x0, y0, z0); +function computeHeight(node) { + var height = 0; + do node.height = height; + while ((node = node.parent) && (node.height < ++height)); } -function centroidRingPoint(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]; - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi), - x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), - y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), - z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi), - cx = y0 * z - z0 * y, - cy = z0 * x - x0 * z, - cz = x0 * y - y0 * x, - m = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(cx * cx + cy * cy + cz * cz), - w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(m), // line weight = angle - v = m && -w / m; // area weight multiplier - X2 += v * cx; - Y2 += v * cy; - Z2 += v * cz; - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); +function Node(data) { + this.data = data; + this.depth = + this.height = 0; + this.parent = null; } -/* harmony default export */ __webpack_exports__["default"] = (function(object) { - W0 = W1 = - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = - X2 = Y2 = Z2 = 0; - Object(_stream_js__WEBPACK_IMPORTED_MODULE_2__["default"])(object, centroidStream); +Node.prototype = hierarchy.prototype = { + constructor: Node, + count: _count_js__WEBPACK_IMPORTED_MODULE_0__["default"], + each: _each_js__WEBPACK_IMPORTED_MODULE_1__["default"], + eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__["default"], + eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__["default"], + sum: _sum_js__WEBPACK_IMPORTED_MODULE_4__["default"], + sort: _sort_js__WEBPACK_IMPORTED_MODULE_5__["default"], + path: _path_js__WEBPACK_IMPORTED_MODULE_6__["default"], + ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_7__["default"], + descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_8__["default"], + leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_9__["default"], + links: _links_js__WEBPACK_IMPORTED_MODULE_10__["default"], + copy: node_copy +}; - var x = X2, - y = Y2, - z = Z2, - m = x * x + y * y + z * z; - // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. - if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) { - x = X1, y = Y1, z = Z1; - // If the feature has zero length, fall back to arithmetic mean of point vectors. - if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) x = X0, y = Y0, z = Z0; - m = x * x + y * y + z * z; - // If the feature still has an undefined ccentroid, then return. - if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) return [NaN, NaN]; - } +/***/ }), - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(m)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; +/***/ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var leaves = []; + this.eachBefore(function(node) { + if (!node.children) { + leaves.push(node); + } + }); + return leaves; }); /***/ }), -/***/ "./node_modules/d3-geo/src/circle.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-geo/src/circle.js ***! - \*******************************************/ -/*! exports provided: circleStream, default */ +/***/ "./node_modules/d3-hierarchy/src/hierarchy/links.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***! + \**********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleStream", function() { return circleStream; }); -/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-geo/src/constant.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js"); - +/* harmony default export */ __webpack_exports__["default"] = (function() { + var root = this, links = []; + root.each(function(node) { + if (node !== root) { // Don’t include the root’s parent, if any. + links.push({source: node.parent, target: node}); + } + }); + return links; +}); +/***/ }), +/***/ "./node_modules/d3-hierarchy/src/hierarchy/path.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -// Generates a circle centered at [0°, 0°], with a given radius and precision. -function circleStream(stream, radius, delta, direction, t0, t1) { - if (!delta) return; - var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), - sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(radius), - step = direction * delta; - if (t0 == null) { - t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; - t1 = radius - step / 2; - } else { - t0 = circleRadius(cosRadius, t0); - t1 = circleRadius(cosRadius, t1); - if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; - } - for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { - point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(t)]); - stream.point(point[0], point[1]); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(end) { + var start = this, + ancestor = leastCommonAncestor(start, end), + nodes = [start]; + while (start !== ancestor) { + start = start.parent; + nodes.push(start); } -} - -// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. -function circleRadius(cosRadius, point) { - point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(point), point[0] -= cosRadius; - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianNormalizeInPlace"])(point); - var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])(-point[1]); - return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; -} - -/* harmony default export */ __webpack_exports__["default"] = (function() { - var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([0, 0]), - radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(90), - precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(6), - ring, - rotate, - stream = {point: point}; - - function point(x, y) { - ring.push(x = rotate(x, y)); - x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; + var k = nodes.length; + while (end !== ancestor) { + nodes.splice(k, 0, end); + end = end.parent; } + return nodes; +}); - function circle() { - var c = center.apply(this, arguments), - r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], - p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; - ring = []; - rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__["rotateRadians"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], 0).invert; - circleStream(stream, r, p, 1); - c = {type: "Polygon", coordinates: [ring]}; - ring = rotate = null; - return c; +function leastCommonAncestor(a, b) { + if (a === b) return a; + var aNodes = a.ancestors(), + bNodes = b.ancestors(), + c = null; + a = aNodes.pop(); + b = bNodes.pop(); + while (a === b) { + c = a; + a = aNodes.pop(); + b = bNodes.pop(); } - - circle.center = function(_) { - return arguments.length ? (center = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([+_[0], +_[1]]), circle) : center; - }; - - circle.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : radius; - }; - - circle.precision = function(_) { - return arguments.length ? (precision = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : precision; - }; - - return circle; -}); + return c; +} /***/ }), -/***/ "./node_modules/d3-geo/src/clip/antimeridian.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***! - \******************************************************/ +/***/ "./node_modules/d3-hierarchy/src/hierarchy/sort.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***! + \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])( - function() { return true; }, - clipAntimeridianLine, - clipAntimeridianInterpolate, - [-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]] -)); - -// Takes a line and cuts into visible segments. Return values: 0 - there were -// intersections or the line was empty; 1 - no intersections; 2 - there were -// intersections, and the first and last segments should be rejoined. -function clipAntimeridianLine(stream) { - var lambda0 = NaN, - phi0 = NaN, - sign0 = NaN, - clean; // no intersections - - return { - lineStart: function() { - stream.lineStart(); - clean = 1; - }, - point: function(lambda1, phi1) { - var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], - delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - lambda0); - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { // line crosses a pole - stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - stream.point(lambda1, phi0); - clean = 0; - } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) { // line crosses antimeridian - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; // handle degeneracies - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; - phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - clean = 0; - } - stream.point(lambda0 = lambda1, phi0 = phi1); - sign0 = sign1; - }, - lineEnd: function() { - stream.lineEnd(); - lambda0 = phi0 = NaN; - }, - clean: function() { - return 2 - clean; // if intersections, rejoin first and last segments +/* harmony default export */ __webpack_exports__["default"] = (function(compare) { + return this.eachBefore(function(node) { + if (node.children) { + node.children.sort(compare); } - }; -} - -function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { - var cosPhi0, - cosPhi1, - sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0 - lambda1); - return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] - ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda1) - - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0)) - / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) - : (phi0 + phi1) / 2; -} - -function clipAntimeridianInterpolate(from, to, direction, stream) { - var phi; - if (from == null) { - phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]; - stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); - stream.point(0, phi); - stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); - stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); - stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); - stream.point(0, -phi); - stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); - stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); - stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); - } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { - var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]; - phi = direction * lambda / 2; - stream.point(-lambda, phi); - stream.point(0, phi); - stream.point(lambda, phi); - } else { - stream.point(to[0], to[1]); - } -} + }); +}); /***/ }), -/***/ "./node_modules/d3-geo/src/clip/buffer.js": -/*!************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/buffer.js ***! - \************************************************/ +/***/ "./node_modules/d3-hierarchy/src/hierarchy/sum.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***! + \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - var lines = [], - line; - return { - point: function(x, y) { - line.push([x, y]); - }, - lineStart: function() { - lines.push(line = []); - }, - lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - rejoin: function() { - if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); - }, - result: function() { - var result = lines; - lines = []; - line = null; - return result; - } - }; +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return this.eachAfter(function(node) { + var sum = +value(node.data) || 0, + children = node.children, + i = children && children.length; + while (--i >= 0) sum += children[i].value; + node.value = sum; + }); }); /***/ }), -/***/ "./node_modules/d3-geo/src/clip/circle.js": +/***/ "./node_modules/d3-hierarchy/src/index.js": /*!************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/circle.js ***! + !*** ./node_modules/d3-hierarchy/src/index.js ***! \************************************************/ -/*! exports provided: default */ +/*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); -/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ "./node_modules/d3-geo/src/circle.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js"); +/* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ "./node_modules/d3-hierarchy/src/cluster.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ "./node_modules/d3-hierarchy/src/pack/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ "./node_modules/d3-hierarchy/src/partition.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(radius) { - var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), - delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], - smallRadius = cr > 0, - notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; // TODO optimise for this common case - - function interpolate(from, to, direction, stream) { - Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__["circleStream"])(stream, radius, delta, direction, from, to); - } +/* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ "./node_modules/d3-hierarchy/src/stratify.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - function visible(lambda, phi) { - return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi) > cr; - } +/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ "./node_modules/d3-hierarchy/src/tree.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - // Takes a line and cuts into visible segments. Return values used for polygon - // clipping: 0 - there were intersections or the line was empty; 1 - no - // intersections 2 - there were intersections, and the first and last segments - // should be rejoined. - function clipLine(stream) { - var point0, // previous point - c0, // code for previous point - v0, // visibility of previous point - v00, // visibility of first point - clean; // no intersections - return { - lineStart: function() { - v00 = v0 = false; - clean = 1; - }, - point: function(lambda, phi) { - var point1 = [lambda, phi], - point2, - v = visible(lambda, phi), - c = smallRadius - ? v ? 0 : code(lambda, phi) - : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]), phi) : 0; - if (!point0 && (v00 = v0 = v)) stream.lineStart(); - // Handle degeneracies. - // TODO ignore if not clipping polygons. - if (v !== v0) { - point2 = intersect(point0, point1); - if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point1, point2)) { - point1[0] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; - point1[1] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; - v = visible(point1[0], point1[1]); - } - } - if (v !== v0) { - clean = 0; - if (v) { - // outside going in - stream.lineStart(); - point2 = intersect(point1, point0); - stream.point(point2[0], point2[1]); - } else { - // inside going out - point2 = intersect(point0, point1); - stream.point(point2[0], point2[1]); - stream.lineEnd(); - } - point0 = point2; - } else if (notHemisphere && point0 && smallRadius ^ v) { - var t; - // If the codes for two points are different, or are both zero, - // and there this segment intersects with the small circle. - if (!(c & c0) && (t = intersect(point1, point0, true))) { - clean = 0; - if (smallRadius) { - stream.lineStart(); - stream.point(t[0][0], t[0][1]); - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - } else { - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - stream.lineStart(); - stream.point(t[0][0], t[0][1]); - } - } - } - if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point1))) { - stream.point(point1[0], point1[1]); - } - point0 = point1, v0 = v, c0 = c; - }, - lineEnd: function() { - if (v0) stream.lineEnd(); - point0 = null; - }, - // Rejoin first and last segments if there were intersections and the first - // and last points were visible. - clean: function() { - return clean | ((v00 && v0) << 1); - } - }; - } +/* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ "./node_modules/d3-hierarchy/src/treemap/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - // Intersects the great circle between a and b with the clip circle. - function intersect(a, b, two) { - var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(a), - pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(b); +/* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ "./node_modules/d3-hierarchy/src/treemap/binary.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - // We have two planes, n1.p = d1 and n2.p = d2. - // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). - var n1 = [1, 0, 0], // normal - n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(pa, pb), - n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(n2, n2), - n1n2 = n2[0], // cartesianDot(n1, n2), - determinant = n2n2 - n1n2 * n1n2; +/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - // Two polar points. - if (!determinant) return !two && a; +/* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - var c1 = cr * n2n2 / determinant, - c2 = -cr * n1n2 / determinant, - n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(n1, n2), - A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n1, c1), - B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n2, c2); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(A, B); +/* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - // Solve |p(t)|^2 = 1. - var u = n1xn2, - w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, u), - uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(u, u), - t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, A) - 1); +/* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - if (t2 < 0) return; +/* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ "./node_modules/d3-hierarchy/src/treemap/resquarify.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(t2), - q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w - t) / uu); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q, A); - q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q); - if (!two) return q; - // Two intersection points. - var lambda0 = a[0], - lambda1 = b[0], - phi0 = a[1], - phi1 = b[1], - z; - if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; - var delta = lambda1 - lambda0, - polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"], - meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; - if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; - // Check that the first point is between a and b. - if (meridian - ? polar - ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] ? phi0 : phi1) - : phi0 <= q[1] && q[1] <= phi1 - : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) { - var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w + t) / uu); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q1, A); - return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q1)]; - } - } - // Generates a 4-bit vector representing the location of a point relative to - // the small circle's bounding box. - function code(lambda, phi) { - var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] - radius, - code = 0; - if (lambda < -r) code |= 1; // left - else if (lambda > r) code |= 2; // right - if (phi < -r) code |= 4; // below - else if (phi > r) code |= 8; // above - return code; - } - return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]]); -}); -/***/ }), -/***/ "./node_modules/d3-geo/src/clip/extent.js": -/*!************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/extent.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var x0 = 0, - y0 = 0, - x1 = 960, - y1 = 500, - cache, - cacheStream, - clip; - return clip = { - stream: function(stream) { - return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0, y0, x1, y1)(cacheStream = stream); - }, - extent: function(_) { - return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; - } - }; -}); /***/ }), -/***/ "./node_modules/d3-geo/src/clip/index.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-geo/src/clip/index.js ***! - \***********************************************/ +/***/ "./node_modules/d3-hierarchy/src/pack/enclose.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***! + \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js"); -/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js"); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); - +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-hierarchy/src/array.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(circles) { + var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(circles))).length, B = [], p, e; + while (i < n) { + p = circles[i]; + if (e && enclosesWeak(e, p)) ++i; + else e = encloseBasis(B = extendBasis(B, p)), i = 0; + } + return e; +}); -/* harmony default export */ __webpack_exports__["default"] = (function(pointVisible, clipLine, interpolate, start) { - return function(sink) { - var line = clipLine(sink), - ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - ringSink = clipLine(ringBuffer), - polygonStarted = false, - polygon, - segments, - ring; +function extendBasis(B, p) { + var i, j; - var clip = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { - clip.point = pointRing; - clip.lineStart = ringStart; - clip.lineEnd = ringEnd; - segments = []; - polygon = []; - }, - polygonEnd: function() { - clip.point = point; - clip.lineStart = lineStart; - clip.lineEnd = lineEnd; - segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments); - var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__["default"])(polygon, start); - if (segments.length) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(segments, compareIntersection, startInside, interpolate, sink); - } else if (startInside) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - } - if (polygonStarted) sink.polygonEnd(), polygonStarted = false; - segments = polygon = null; - }, - sphere: function() { - sink.polygonStart(); - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - sink.polygonEnd(); - } - }; + if (enclosesWeakAll(p, B)) return [p]; - function point(lambda, phi) { - if (pointVisible(lambda, phi)) sink.point(lambda, phi); + // If we get here then B must have at least one element. + for (i = 0; i < B.length; ++i) { + if (enclosesNot(p, B[i]) + && enclosesWeakAll(encloseBasis2(B[i], p), B)) { + return [B[i], p]; } + } - function pointLine(lambda, phi) { - line.point(lambda, phi); + // If we get here then B must have at least two elements. + for (i = 0; i < B.length - 1; ++i) { + for (j = i + 1; j < B.length; ++j) { + if (enclosesNot(encloseBasis2(B[i], B[j]), p) + && enclosesNot(encloseBasis2(B[i], p), B[j]) + && enclosesNot(encloseBasis2(B[j], p), B[i]) + && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { + return [B[i], B[j], p]; + } } + } - function lineStart() { - clip.point = pointLine; - line.lineStart(); - } + // If we get here then something is very wrong. + throw new Error; +} - function lineEnd() { - clip.point = point; - line.lineEnd(); - } +function enclosesNot(a, b) { + var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; + return dr < 0 || dr * dr < dx * dx + dy * dy; +} - function pointRing(lambda, phi) { - ring.push([lambda, phi]); - ringSink.point(lambda, phi); - } +function enclosesWeak(a, b) { + var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y; + return dr > 0 && dr * dr > dx * dx + dy * dy; +} - function ringStart() { - ringSink.lineStart(); - ring = []; +function enclosesWeakAll(a, B) { + for (var i = 0; i < B.length; ++i) { + if (!enclosesWeak(a, B[i])) { + return false; } + } + return true; +} - function ringEnd() { - pointRing(ring[0][0], ring[0][1]); - ringSink.lineEnd(); - - var clean = ringSink.clean(), - ringSegments = ringBuffer.result(), - i, n = ringSegments.length, m, - segment, - point; - - ring.pop(); - polygon.push(ring); - ring = null; - - if (!n) return; - - // No intersections. - if (clean & 1) { - segment = ringSegments[0]; - if ((m = segment.length - 1) > 0) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); - sink.lineEnd(); - } - return; - } - - // Rejoin connected segments. - // TODO reuse ringBuffer.rejoin()? - if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); - - segments.push(ringSegments.filter(validSegment)); - } +function encloseBasis(B) { + switch (B.length) { + case 1: return encloseBasis1(B[0]); + case 2: return encloseBasis2(B[0], B[1]); + case 3: return encloseBasis3(B[0], B[1], B[2]); + } +} - return clip; +function encloseBasis1(a) { + return { + x: a.x, + y: a.y, + r: a.r }; -}); +} -function validSegment(segment) { - return segment.length > 1; +function encloseBasis2(a, b) { + var x1 = a.x, y1 = a.y, r1 = a.r, + x2 = b.x, y2 = b.y, r2 = b.r, + x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, + l = Math.sqrt(x21 * x21 + y21 * y21); + return { + x: (x1 + x2 + x21 / l * r21) / 2, + y: (y1 + y2 + y21 / l * r21) / 2, + r: (l + r1 + r2) / 2 + }; } -// Intersections are sorted along the clip edge. For both antimeridian cutting -// and circle clipping, the same comparison is used. -function compareIntersection(a, b) { - return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - a[1]) - - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - b[1]); +function encloseBasis3(a, b, c) { + var x1 = a.x, y1 = a.y, r1 = a.r, + x2 = b.x, y2 = b.y, r2 = b.r, + x3 = c.x, y3 = c.y, r3 = c.r, + a2 = x1 - x2, + a3 = x1 - x3, + b2 = y1 - y2, + b3 = y1 - y3, + c2 = r2 - r1, + c3 = r3 - r1, + d1 = x1 * x1 + y1 * y1 - r1 * r1, + d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, + d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, + ab = a3 * b2 - a2 * b3, + xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, + xb = (b3 * c2 - b2 * c3) / ab, + ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, + yb = (a2 * c3 - a3 * c2) / ab, + A = xb * xb + yb * yb - 1, + B = 2 * (r1 + xa * xb + ya * yb), + C = xa * xa + ya * ya - r1 * r1, + r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); + return { + x: x1 + xa + xb * r, + y: y1 + ya + yb * r, + r: r + }; } /***/ }), -/***/ "./node_modules/d3-geo/src/clip/line.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-geo/src/clip/line.js ***! - \**********************************************/ +/***/ "./node_modules/d3-hierarchy/src/pack/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/pack/index.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b, x0, y0, x1, y1) { - var ax = a[0], - ay = a[1], - bx = b[0], - by = b[1], - t0 = 0, - t1 = 1, - dx = bx - ax, - dy = by - ay, - r; +/* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js"); +/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js"); - r = x0 - ax; - if (!dx && r > 0) return; - r /= dx; - if (dx < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dx > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - r = x1 - ax; - if (!dx && r < 0) return; - r /= dx; - if (dx < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dx > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - r = y0 - ay; - if (!dy && r > 0) return; - r /= dy; - if (dy < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dy > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - r = y1 - ay; - if (!dy && r < 0) return; - r /= dy; - if (dy < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dy > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } +function defaultRadius(d) { + return Math.sqrt(d.value); +} - if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; - if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; - return true; -}); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var radius = null, + dx = 1, + dy = 1, + padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"]; + function pack(root) { + root.x = dx / 2, root.y = dy / 2; + if (radius) { + root.eachBefore(radiusLeaf(radius)) + .eachAfter(packChildren(padding, 0.5)) + .eachBefore(translateChild(1)); + } else { + root.eachBefore(radiusLeaf(defaultRadius)) + .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"], 1)) + .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) + .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); + } + return root; + } -/***/ }), + pack.radius = function(x) { + return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__["optional"])(x), pack) : radius; + }; -/***/ "./node_modules/d3-geo/src/clip/rectangle.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/rectangle.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + pack.size = function(x) { + return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clipRectangle; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js"); -/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-geo/src/clip/line.js"); -/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js"); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); + pack.padding = function(x) { + return arguments.length ? (padding = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x), pack) : padding; + }; + return pack; +}); +function radiusLeaf(radius) { + return function(node) { + if (!node.children) { + node.r = Math.max(0, +radius(node) || 0); + } + }; +} +function packChildren(padding, k) { + return function(node) { + if (children = node.children) { + var children, + i, + n = children.length, + r = padding(node) * k || 0, + e; + if (r) for (i = 0; i < n; ++i) children[i].r += r; + e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__["packEnclose"])(children); + if (r) for (i = 0; i < n; ++i) children[i].r -= r; + node.r = e + r; + } + }; +} +function translateChild(k) { + return function(node) { + var parent = node.parent; + node.r *= k; + if (parent) { + node.x = parent.x + k * node.x; + node.y = parent.y + k * node.y; + } + }; +} -var clipMax = 1e9, clipMin = -clipMax; -// TODO Use d3-polygon’s polygonContains here for the ring check? -// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? +/***/ }), -function clipRectangle(x0, y0, x1, y1) { +/***/ "./node_modules/d3-hierarchy/src/pack/siblings.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***! + \********************************************************/ +/*! exports provided: packEnclose, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function visible(x, y) { - return x0 <= x && x <= x1 && y0 <= y && y <= y1; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return packEnclose; }); +/* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js"); - function interpolate(from, to, direction, stream) { - var a = 0, a1 = 0; - if (from == null - || (a = corner(from, direction)) !== (a1 = corner(to, direction)) - || comparePoint(from, to) < 0 ^ direction > 0) { - do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); - while ((a = (a + direction + 4) % 4) !== a1); + +function place(b, a, c) { + var dx = b.x - a.x, x, a2, + dy = b.y - a.y, y, b2, + d2 = dx * dx + dy * dy; + if (d2) { + a2 = a.r + c.r, a2 *= a2; + b2 = b.r + c.r, b2 *= b2; + if (a2 > b2) { + x = (d2 + b2 - a2) / (2 * d2); + y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); + c.x = b.x - x * dx - y * dy; + c.y = b.y - x * dy + y * dx; } else { - stream.point(to[0], to[1]); + x = (d2 + a2 - b2) / (2 * d2); + y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); + c.x = a.x + x * dx - y * dy; + c.y = a.y + x * dy + y * dx; } + } else { + c.x = a.x + c.r; + c.y = a.y; } +} - function corner(p, direction) { - return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 0 : 3 - : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 2 : 1 - : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 1 : 0 - : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon - } +function intersects(a, b) { + var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; + return dr > 0 && dr * dr > dx * dx + dy * dy; +} - function compareIntersection(a, b) { - return comparePoint(a.x, b.x); - } +function score(node) { + var a = node._, + b = node.next._, + ab = a.r + b.r, + dx = (a.x * b.r + b.x * a.r) / ab, + dy = (a.y * b.r + b.y * a.r) / ab; + return dx * dx + dy * dy; +} - function comparePoint(a, b) { - var ca = corner(a, 1), - cb = corner(b, 1); - return ca !== cb ? ca - cb - : ca === 0 ? b[1] - a[1] - : ca === 1 ? a[0] - b[0] - : ca === 2 ? a[1] - b[1] - : b[0] - a[0]; - } +function Node(circle) { + this._ = circle; + this.next = null; + this.previous = null; +} - return function(stream) { - var activeStream = stream, - bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), - segments, - polygon, - ring, - x__, y__, v__, // first point - x_, y_, v_, // previous point - first, - clean; +function packEnclose(circles) { + if (!(n = circles.length)) return 0; - var clipStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: polygonStart, - polygonEnd: polygonEnd - }; + var a, b, c, n, aa, ca, i, j, k, sj, sk; - function point(x, y) { - if (visible(x, y)) activeStream.point(x, y); - } + // Place the first circle. + a = circles[0], a.x = 0, a.y = 0; + if (!(n > 1)) return a.r; - function polygonInside() { - var winding = 0; + // Place the second circle. + b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; + if (!(n > 2)) return a.r + b.r; - for (var i = 0, n = polygon.length; i < n; ++i) { - for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { - a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; - if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } - else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } - } - } + // Place the third circle. + place(b, a, c = circles[2]); - return winding; - } + // Initialize the front-chain using the first three circles a, b and c. + a = new Node(a), b = new Node(b), c = new Node(c); + a.next = c.previous = b; + b.next = a.previous = c; + c.next = b.previous = a; - // Buffer geometry within a polygon and then clip it en masse. - function polygonStart() { - activeStream = bufferStream, segments = [], polygon = [], clean = true; - } + // Attempt to place each remaining circle… + pack: for (i = 3; i < n; ++i) { + place(a._, b._, c = circles[i]), c = new Node(c); - function polygonEnd() { - var startInside = polygonInside(), - cleanInside = clean && startInside, - visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments)).length; - if (cleanInside || visible) { - stream.polygonStart(); - if (cleanInside) { - stream.lineStart(); - interpolate(null, null, 1, stream); - stream.lineEnd(); + // Find the closest intersecting circle on the front-chain, if any. + // “Closeness” is determined by linear distance along the front-chain. + // “Ahead” or “behind” is likewise determined by linear distance. + j = b.next, k = a.previous, sj = b._.r, sk = a._.r; + do { + if (sj <= sk) { + if (intersects(j._, c._)) { + b = j, a.next = b, b.previous = a, --i; + continue pack; } - if (visible) { - Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(segments, compareIntersection, startInside, interpolate, stream); + sj += j._.r, j = j.next; + } else { + if (intersects(k._, c._)) { + a = k, a.next = b, b.previous = a, --i; + continue pack; } - stream.polygonEnd(); + sk += k._.r, k = k.previous; } - activeStream = stream, segments = polygon = ring = null; - } + } while (j !== k.next); - function lineStart() { - clipStream.point = linePoint; - if (polygon) polygon.push(ring = []); - first = true; - v_ = false; - x_ = y_ = NaN; - } + // Success! Insert the new circle c between a and b. + c.previous = a, c.next = b, a.next = b.previous = b = c; - // TODO rather than special-case polygons, simply handle them separately. - // Ideally, coincident intersection points should be jittered to avoid - // clipping issues. - function lineEnd() { - if (segments) { - linePoint(x__, y__); - if (v__ && v_) bufferStream.rejoin(); - segments.push(bufferStream.result()); + // Compute the new closest circle pair to the centroid. + aa = score(a); + while ((c = c.next) !== b) { + if ((ca = score(c)) < aa) { + a = c, aa = ca; } - clipStream.point = point; - if (v_) activeStream.lineEnd(); } + b = a.next; + } - function linePoint(x, y) { - var v = visible(x, y); - if (polygon) ring.push([x, y]); - if (first) { - x__ = x, y__ = y, v__ = v; - first = false; - if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - } - } else { - if (v && v_) activeStream.point(x, y); - else { - var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], - b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; - if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b, x0, y0, x1, y1)) { - if (!v_) { - activeStream.lineStart(); - activeStream.point(a[0], a[1]); - } - activeStream.point(b[0], b[1]); - if (!v) activeStream.lineEnd(); - clean = false; - } else if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - clean = false; - } - } - } - x_ = x, y_ = y, v_ = v; - } + // Compute the enclosing circle of the front chain. + a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a); - return clipStream; - }; + // Translate the circles to put the enclosing circle around the origin. + for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; + + return c.r; } +/* harmony default export */ __webpack_exports__["default"] = (function(circles) { + packEnclose(circles); + return circles; +}); + /***/ }), -/***/ "./node_modules/d3-geo/src/clip/rejoin.js": -/*!************************************************!*\ - !*** ./node_modules/d3-geo/src/clip/rejoin.js ***! - \************************************************/ +/***/ "./node_modules/d3-hierarchy/src/partition.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/partition.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js"); - - -function Intersection(point, points, other, entry) { - this.x = point; - this.z = points; - this.o = other; // another intersection - this.e = entry; // is an entry? - this.v = false; // visited - this.n = this.p = null; // next & previous -} - -// A generalized polygon clipping algorithm: given a polygon that has been cut -// into its visible line segments, and rejoins the segments by interpolating -// along the clip edge. -/* harmony default export */ __webpack_exports__["default"] = (function(segments, compareIntersection, startInside, interpolate, stream) { - var subject = [], - clip = [], - i, - n; - - segments.forEach(function(segment) { - if ((n = segment.length - 1) <= 0) return; - var n, p0 = segment[0], p1 = segment[n], x; - - // If the first and last points of a segment are coincident, then treat as a - // closed ring. TODO if all rings are closed, then the winding order of the - // exterior ring should be checked. - if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p0, p1)) { - stream.lineStart(); - for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); - stream.lineEnd(); - return; - } +/* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js"); +/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); - subject.push(x = new Intersection(p0, segment, null, true)); - clip.push(x.o = new Intersection(p0, null, x, false)); - subject.push(x = new Intersection(p1, segment, null, false)); - clip.push(x.o = new Intersection(p1, null, x, true)); - }); - if (!subject.length) return; - clip.sort(compareIntersection); - link(subject); - link(clip); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var dx = 1, + dy = 1, + padding = 0, + round = false; - for (i = 0, n = clip.length; i < n; ++i) { - clip[i].e = startInside = !startInside; + function partition(root) { + var n = root.height + 1; + root.x0 = + root.y0 = padding; + root.x1 = dx; + root.y1 = dy / n; + root.eachBefore(positionNode(dy, n)); + if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + return root; } - var start = subject[0], - points, - point; - - while (1) { - // Find first unvisited intersection. - var current = start, - isSubject = true; - while (current.v) if ((current = current.n) === start) return; - points = current.z; - stream.lineStart(); - do { - current.v = current.o.v = true; - if (current.e) { - if (isSubject) { - for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.n.x, 1, stream); - } - current = current.n; - } else { - if (isSubject) { - points = current.p.z; - for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.p.x, -1, stream); - } - current = current.p; + function positionNode(dy, n) { + return function(node) { + if (node.children) { + Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); } - current = current.o; - points = current.z; - isSubject = !isSubject; - } while (!current.v); - stream.lineEnd(); - } -}); - -function link(array) { - if (!(n = array.length)) return; - var n, - i = 0, - a = array[0], - b; - while (++i < n) { - a.n = b = array[i]; - b.p = a; - a = b; + var x0 = node.x0, + y0 = node.y0, + x1 = node.x1 - padding, + y1 = node.y1 - padding; + if (x1 < x0) x0 = x1 = (x0 + x1) / 2; + if (y1 < y0) y0 = y1 = (y0 + y1) / 2; + node.x0 = x0; + node.y0 = y0; + node.x1 = x1; + node.y1 = y1; + }; } - a.n = b = array[0]; - b.p = a; -} - - -/***/ }), - -/***/ "./node_modules/d3-geo/src/compose.js": -/*!********************************************!*\ - !*** ./node_modules/d3-geo/src/compose.js ***! - \********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + partition.round = function(x) { + return arguments.length ? (round = !!x, partition) : round; + }; - function compose(x, y) { - return x = a(x, y), b(x[0], x[1]); - } + partition.size = function(x) { + return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; + }; - if (a.invert && b.invert) compose.invert = function(x, y) { - return x = b.invert(x, y), x && a.invert(x[0], x[1]); + partition.padding = function(x) { + return arguments.length ? (padding = +x, partition) : padding; }; - return compose; + return partition; }); /***/ }), -/***/ "./node_modules/d3-geo/src/constant.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/constant.js ***! - \*********************************************/ +/***/ "./node_modules/d3-hierarchy/src/stratify.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/stratify.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); - +/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); +/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); -/***/ }), -/***/ "./node_modules/d3-geo/src/contains.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/contains.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js"); -/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +var keyPrefix = "$", // Protect against keys like “__proto__”. + preroot = {depth: -1}, + ambiguous = {}; +function defaultId(d) { + return d.id; +} +function defaultParentId(d) { + return d.parentId; +} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var id = defaultId, + parentId = defaultParentId; -var containsObjectType = { - Feature: function(object, point) { - return containsGeometry(object.geometry, point); - }, - FeatureCollection: function(object, point) { - var features = object.features, i = -1, n = features.length; - while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; - return false; - } -}; + function stratify(data) { + var d, + i, + n = data.length, + root, + parent, + node, + nodes = new Array(n), + nodeId, + nodeKey, + nodeByKey = {}; -var containsGeometryType = { - Sphere: function() { - return true; - }, - Point: function(object, point) { - return containsPoint(object.coordinates, point); - }, - MultiPoint: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPoint(coordinates[i], point)) return true; - return false; - }, - LineString: function(object, point) { - return containsLine(object.coordinates, point); - }, - MultiLineString: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsLine(coordinates[i], point)) return true; - return false; - }, - Polygon: function(object, point) { - return containsPolygon(object.coordinates, point); - }, - MultiPolygon: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPolygon(coordinates[i], point)) return true; - return false; - }, - GeometryCollection: function(object, point) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) if (containsGeometry(geometries[i], point)) return true; - return false; - } -}; + for (i = 0; i < n; ++i) { + d = data[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["Node"](d); + if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { + nodeKey = keyPrefix + (node.id = nodeId); + nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node; + } + } -function containsGeometry(geometry, point) { - return geometry && containsGeometryType.hasOwnProperty(geometry.type) - ? containsGeometryType[geometry.type](geometry, point) - : false; -} + for (i = 0; i < n; ++i) { + node = nodes[i], nodeId = parentId(data[i], i, data); + if (nodeId == null || !(nodeId += "")) { + if (root) throw new Error("multiple roots"); + root = node; + } else { + parent = nodeByKey[keyPrefix + nodeId]; + if (!parent) throw new Error("missing: " + nodeId); + if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); + if (parent.children) parent.children.push(node); + else parent.children = [node]; + node.parent = parent; + } + } -function containsPoint(coordinates, point) { - return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates, point) === 0; -} + if (!root) throw new Error("no root"); + root.parent = preroot; + root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["computeHeight"]); + root.parent = null; + if (n > 0) throw new Error("cycle"); -function containsLine(coordinates, point) { - var ao, bo, ab; - for (var i = 0, n = coordinates.length; i < n; i++) { - bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], point); - if (bo === 0) return true; - if (i > 0) { - ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], coordinates[i - 1]); - if ( - ab > 0 && - ao <= ab && - bo <= ab && - (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"] * ab - ) - return true; - } - ao = bo; + return root; } - return false; -} - -function containsPolygon(coordinates, point) { - return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__["default"])(coordinates.map(ringRadians), pointRadians(point)); -} -function ringRadians(ring) { - return ring = ring.map(pointRadians), ring.pop(), ring; -} + stratify.id = function(x) { + return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : id; + }; -function pointRadians(point) { - return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]]; -} + stratify.parentId = function(x) { + return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : parentId; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(object, point) { - return (object && containsObjectType.hasOwnProperty(object.type) - ? containsObjectType[object.type] - : containsGeometry)(object, point); + return stratify; }); /***/ }), -/***/ "./node_modules/d3-geo/src/distance.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/distance.js ***! - \*********************************************/ +/***/ "./node_modules/d3-hierarchy/src/tree.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-hierarchy/src/tree.js ***! + \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js"); - - -var coordinates = [null, null], - object = {type: "LineString", coordinates: coordinates}; +/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - coordinates[0] = a; - coordinates[1] = b; - return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object); -}); +function defaultSeparation(a, b) { + return a.parent === b.parent ? 1 : 2; +} -/***/ }), +// function radialSeparation(a, b) { +// return (a.parent === b.parent ? 1 : 2) / a.depth; +// } -/***/ "./node_modules/d3-geo/src/graticule.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-geo/src/graticule.js ***! - \**********************************************/ -/*! exports provided: default, graticule10 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// This function is used to traverse the left contour of a subtree (or +// subforest). It returns the successor of v on this contour. This successor is +// either given by the leftmost child of v or by the thread of v. The function +// returns null if and only if v is on the highest level of its subtree. +function nextLeft(v) { + var children = v.children; + return children ? children[0] : v.t; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return graticule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graticule10", function() { return graticule10; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +// This function works analogously to nextLeft. +function nextRight(v) { + var children = v.children; + return children ? children[children.length - 1] : v.t; +} +// Shifts the current subtree rooted at w+. This is done by increasing +// prelim(w+) and mod(w+) by shift. +function moveSubtree(wm, wp, shift) { + var change = shift / (wp.i - wm.i); + wp.c -= change; + wp.s += shift; + wm.c += change; + wp.z += shift; + wp.m += shift; +} +// All other shifts, applied to the smaller subtrees between w- and w+, are +// performed by this function. To prepare the shifts, we have to adjust +// change(w+), shift(w+), and change(w-). +function executeShifts(v) { + var shift = 0, + change = 0, + children = v.children, + i = children.length, + w; + while (--i >= 0) { + w = children[i]; + w.z += shift; + w.m += shift; + shift += w.s + (change += w.c); + } +} -function graticuleX(y0, y1, dy) { - var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dy).concat(y1); - return function(x) { return y.map(function(y) { return [x, y]; }); }; +// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, +// returns the specified (default) ancestor. +function nextAncestor(vim, v, ancestor) { + return vim.a.parent === v.parent ? vim.a : ancestor; } -function graticuleY(x0, x1, dx) { - var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dx).concat(x1); - return function(y) { return x.map(function(x) { return [x, y]; }); }; +function TreeNode(node, i) { + this._ = node; + this.parent = null; + this.children = null; + this.A = null; // default ancestor + this.a = this; // ancestor + this.z = 0; // prelim + this.m = 0; // mod + this.c = 0; // change + this.s = 0; // shift + this.t = null; // thread + this.i = i; // number } -function graticule() { - var x1, x0, X1, X0, - y1, y0, Y1, Y0, - dx = 10, dy = dx, DX = 90, DY = 360, - x, y, X, Y, - precision = 2.5; +TreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__["Node"].prototype); - function graticule() { - return {type: "MultiLineString", coordinates: lines()}; - } +function treeRoot(root) { + var tree = new TreeNode(root, 0), + node, + nodes = [tree], + child, + children, + i, + n; - function lines() { - return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(X0 / DX) * DX, X1, DX).map(X) - .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(Y0 / DY) * DY, Y1, DY).map(Y)) - .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(x)) - .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(y)); + while (node = nodes.pop()) { + if (children = node._.children) { + node.children = new Array(n = children.length); + for (i = n - 1; i >= 0; --i) { + nodes.push(child = node.children[i] = new TreeNode(children[i], i)); + child.parent = node; + } + } } - graticule.lines = function() { - return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); - }; + (tree.parent = new TreeNode(null, 0)).children = [tree]; + return tree; +} - graticule.outline = function() { - return { - type: "Polygon", - coordinates: [ - X(X0).concat( - Y(Y1).slice(1), - X(X1).reverse().slice(1), - Y(Y0).reverse().slice(1)) - ] - }; - }; +// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm +/* harmony default export */ __webpack_exports__["default"] = (function() { + var separation = defaultSeparation, + dx = 1, + dy = 1, + nodeSize = null; - graticule.extent = function(_) { - if (!arguments.length) return graticule.extentMinor(); - return graticule.extentMajor(_).extentMinor(_); - }; + function tree(root) { + var t = treeRoot(root); - graticule.extentMajor = function(_) { - if (!arguments.length) return [[X0, Y0], [X1, Y1]]; - X0 = +_[0][0], X1 = +_[1][0]; - Y0 = +_[0][1], Y1 = +_[1][1]; - if (X0 > X1) _ = X0, X0 = X1, X1 = _; - if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; - return graticule.precision(precision); - }; + // Compute the layout using Buchheim et al.’s algorithm. + t.eachAfter(firstWalk), t.parent.m = -t.z; + t.eachBefore(secondWalk); - graticule.extentMinor = function(_) { - if (!arguments.length) return [[x0, y0], [x1, y1]]; - x0 = +_[0][0], x1 = +_[1][0]; - y0 = +_[0][1], y1 = +_[1][1]; - if (x0 > x1) _ = x0, x0 = x1, x1 = _; - if (y0 > y1) _ = y0, y0 = y1, y1 = _; - return graticule.precision(precision); - }; + // If a fixed node size is specified, scale x and y. + if (nodeSize) root.eachBefore(sizeNode); - graticule.step = function(_) { - if (!arguments.length) return graticule.stepMinor(); - return graticule.stepMajor(_).stepMinor(_); - }; + // If a fixed tree size is specified, scale x and y based on the extent. + // Compute the left-most, right-most, and depth-most nodes for extents. + else { + var left = root, + right = root, + bottom = root; + root.eachBefore(function(node) { + if (node.x < left.x) left = node; + if (node.x > right.x) right = node; + if (node.depth > bottom.depth) bottom = node; + }); + var s = left === right ? 1 : separation(left, right) / 2, + tx = s - left.x, + kx = dx / (right.x + s + tx), + ky = dy / (bottom.depth || 1); + root.eachBefore(function(node) { + node.x = (node.x + tx) * kx; + node.y = node.depth * ky; + }); + } - graticule.stepMajor = function(_) { - if (!arguments.length) return [DX, DY]; - DX = +_[0], DY = +_[1]; - return graticule; - }; + return root; + } - graticule.stepMinor = function(_) { - if (!arguments.length) return [dx, dy]; - dx = +_[0], dy = +_[1]; - return graticule; - }; + // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is + // applied recursively to the children of v, as well as the function + // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the + // node v is placed to the midpoint of its outermost children. + function firstWalk(v) { + var children = v.children, + siblings = v.parent.children, + w = v.i ? siblings[v.i - 1] : null; + if (children) { + executeShifts(v); + var midpoint = (children[0].z + children[children.length - 1].z) / 2; + if (w) { + v.z = w.z + separation(v._, w._); + v.m = v.z - midpoint; + } else { + v.z = midpoint; + } + } else if (w) { + v.z = w.z + separation(v._, w._); + } + v.parent.A = apportion(v, w, v.parent.A || siblings[0]); + } - graticule.precision = function(_) { - if (!arguments.length) return precision; - precision = +_; - x = graticuleX(y0, y1, 90); - y = graticuleY(x0, x1, precision); - X = graticuleX(Y0, Y1, 90); - Y = graticuleY(X0, X1, precision); - return graticule; - }; + // Computes all real x-coordinates by summing up the modifiers recursively. + function secondWalk(v) { + v._.x = v.z + v.parent.m; + v.m += v.parent.m; + } - return graticule - .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]) - .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]); -} + // The core of the algorithm. Here, a new subtree is combined with the + // previous subtrees. Threads are used to traverse the inside and outside + // contours of the left and right subtree up to the highest common level. The + // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the + // superscript o means outside and i means inside, the subscript - means left + // subtree and + means right subtree. For summing up the modifiers along the + // contour, we use respective variables si+, si-, so-, and so+. Whenever two + // nodes of the inside contours conflict, we compute the left one of the + // greatest uncommon ancestors using the function ANCESTOR and call MOVE + // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. + // Finally, we add a new thread (if necessary). + function apportion(v, w, ancestor) { + if (w) { + var vip = v, + vop = v, + vim = w, + vom = vip.parent.children[0], + sip = vip.m, + sop = vop.m, + sim = vim.m, + som = vom.m, + shift; + while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { + vom = nextLeft(vom); + vop = nextRight(vop); + vop.a = v; + shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); + if (shift > 0) { + moveSubtree(nextAncestor(vim, v, ancestor), v, shift); + sip += shift; + sop += shift; + } + sim += vim.m; + sip += vip.m; + som += vom.m; + sop += vop.m; + } + if (vim && !nextRight(vop)) { + vop.t = vim; + vop.m += sim - sop; + } + if (vip && !nextLeft(vom)) { + vom.t = vip; + vom.m += sip - som; + ancestor = v; + } + } + return ancestor; + } -function graticule10() { - return graticule()(); -} + function sizeNode(node) { + node.x *= dx; + node.y = node.depth * dy; + } + tree.separation = function(x) { + return arguments.length ? (separation = x, tree) : separation; + }; -/***/ }), + tree.size = function(x) { + return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); + }; -/***/ "./node_modules/d3-geo/src/identity.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/identity.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + tree.nodeSize = function(x) { + return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return x; + return tree; }); /***/ }), -/***/ "./node_modules/d3-geo/src/index.js": -/*!******************************************!*\ - !*** ./node_modules/d3-geo/src/index.js ***! - \******************************************/ -/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */ +/***/ "./node_modules/d3-hierarchy/src/treemap/binary.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { + var nodes = parent.children, + i, n = nodes.length, + sum, sums = new Array(n + 1); -/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/bounds.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + for (sums[0] = sum = i = 0; i < n; ++i) { + sums[i + 1] = sum += nodes[i].value; + } -/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/centroid.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + partition(0, n, parent.value, x0, y0, x1, y1); -/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-geo/src/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + function partition(i, j, value, x0, y0, x1, y1) { + if (i >= j - 1) { + var node = nodes[i]; + node.x0 = x0, node.y0 = y0; + node.x1 = x1, node.y1 = y1; + return; + } -/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + var valueOffset = sums[i], + valueTarget = (value / 2) + valueOffset, + k = i + 1, + hi = j - 1; -/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + while (k < hi) { + var mid = k + hi >>> 1; + if (sums[mid] < valueTarget) k = mid + 1; + else hi = mid; + } -/* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ "./node_modules/d3-geo/src/clip/extent.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; -/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + var valueLeft = sums[k] - valueOffset, + valueRight = value - valueLeft; -/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-geo/src/contains.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + if ((x1 - x0) > (y1 - y0)) { + var xk = (x0 * valueRight + x1 * valueLeft) / value; + partition(i, k, valueLeft, x0, y0, xk, y1); + partition(k, j, valueRight, xk, y0, x1, y1); + } else { + var yk = (y0 * valueRight + y1 * valueLeft) / value; + partition(i, k, valueLeft, x0, y0, x1, yk); + partition(k, j, valueRight, x0, yk, x1, y1); + } + } +}); -/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ "./node_modules/d3-geo/src/graticule.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["graticule10"]; }); - -/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-geo/src/interpolate.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); +/***/ "./node_modules/d3-hierarchy/src/treemap/dice.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ "./node_modules/d3-geo/src/path/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { + var nodes = parent.children, + node, + i = -1, + n = nodes.length, + k = parent.value && (x1 - x0) / parent.value; -/* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ "./node_modules/d3-geo/src/projection/albers.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + while (++i < n) { + node = nodes[i], node.y0 = y0, node.y1 = y1; + node.x0 = x0, node.x1 = x0 += node.value * k; + } +}); -/* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ "./node_modules/d3-geo/src/projection/albersUsa.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["azimuthalEqualAreaRaw"]; }); +/***/ "./node_modules/d3-hierarchy/src/treemap/index.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js"); +/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); +/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["azimuthalEquidistantRaw"]; }); -/* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ "./node_modules/d3-geo/src/projection/conicConformal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["conicConformalRaw"]; }); -/* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["conicEqualAreaRaw"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__["default"], + round = false, + dx = 1, + dy = 1, + paddingStack = [0], + paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], + paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], + paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], + paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], + paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"]; -/* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ "./node_modules/d3-geo/src/projection/conicEquidistant.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); + function treemap(root) { + root.x0 = + root.y0 = 0; + root.x1 = dx; + root.y1 = dy; + root.eachBefore(positionNode); + paddingStack = [0]; + if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + return root; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["conicEquidistantRaw"]; }); + function positionNode(node) { + var p = paddingStack[node.depth], + x0 = node.x0 + p, + y0 = node.y0 + p, + x1 = node.x1 - p, + y1 = node.y1 - p; + if (x1 < x0) x0 = x1 = (x0 + x1) / 2; + if (y1 < y0) y0 = y1 = (y0 + y1) / 2; + node.x0 = x0; + node.y0 = y0; + node.x1 = x1; + node.y1 = y1; + if (node.children) { + p = paddingStack[node.depth + 1] = paddingInner(node) / 2; + x0 += paddingLeft(node) - p; + y0 += paddingTop(node) - p; + x1 -= paddingRight(node) - p; + y1 -= paddingBottom(node) - p; + if (x1 < x0) x0 = x1 = (x0 + x1) / 2; + if (y1 < y0) y0 = y1 = (y0 + y1) / 2; + tile(node, x0, y0, x1, y1); + } + } -/* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ "./node_modules/d3-geo/src/projection/equalEarth.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); + treemap.round = function(x) { + return arguments.length ? (round = !!x, treemap) : round; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["equalEarthRaw"]; }); + treemap.size = function(x) { + return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; + }; -/* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); + treemap.tile = function(x) { + return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__["required"])(x), treemap) : tile; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["equirectangularRaw"]; }); + treemap.padding = function(x) { + return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); + }; -/* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ "./node_modules/d3-geo/src/projection/gnomonic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); + treemap.paddingInner = function(x) { + return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingInner; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["gnomonicRaw"]; }); + treemap.paddingOuter = function(x) { + return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); + }; -/* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ "./node_modules/d3-geo/src/projection/identity.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); + treemap.paddingTop = function(x) { + return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingTop; + }; -/* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ "./node_modules/d3-geo/src/projection/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); + treemap.paddingRight = function(x) { + return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingRight; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["projectionMutator"]; }); + treemap.paddingBottom = function(x) { + return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingBottom; + }; -/* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); + treemap.paddingLeft = function(x) { + return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingLeft; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["mercatorRaw"]; }); + return treemap; +}); -/* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ "./node_modules/d3-geo/src/projection/naturalEarth1.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["naturalEarth1Raw"]; }); +/***/ }), -/* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ "./node_modules/d3-geo/src/projection/orthographic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); +/***/ "./node_modules/d3-hierarchy/src/treemap/resquarify.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["orthographicRaw"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); +/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); +/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); -/* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ "./node_modules/d3-geo/src/projection/stereographic.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["stereographicRaw"]; }); -/* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ "./node_modules/d3-geo/src/projection/transverseMercator.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["transverseMercatorRaw"]; }); +/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { -/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); + function resquarify(parent, x0, y0, x1, y1) { + if ((rows = parent._squarify) && (rows.ratio === ratio)) { + var rows, + row, + nodes, + i, + j = -1, + n, + m = rows.length, + value = parent.value; -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); + while (++j < m) { + row = rows[j], nodes = row.children; + for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; + if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value); + else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1); + value -= row.value; + } + } else { + parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["squarifyRatio"])(ratio, parent, x0, y0, x1, y1); + rows.ratio = ratio; + } + } -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-geo/src/transform.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); + resquarify.ratio = function(x) { + return custom((x = +x) > 1 ? x : 1); + }; + return resquarify; +})(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["phi"])); +/***/ }), +/***/ "./node_modules/d3-hierarchy/src/treemap/round.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(node) { + node.x0 = Math.round(node.x0); + node.y0 = Math.round(node.y0); + node.x1 = Math.round(node.x1); + node.y1 = Math.round(node.y1); +}); - // DEPRECATED! Use d3.geoIdentity().clipExtent(…). +/***/ }), +/***/ "./node_modules/d3-hierarchy/src/treemap/slice.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { + var nodes = parent.children, + node, + i = -1, + n = nodes.length, + k = parent.value && (y1 - y0) / parent.value; + while (++i < n) { + node = nodes[i], node.x0 = x0, node.x1 = x1; + node.y0 = y0, node.y1 = y0 += node.value * k; + } +}); +/***/ }), +/***/ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); +/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { + (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__["default"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parent, x0, y0, x1, y1); +}); +/***/ }), +/***/ "./node_modules/d3-hierarchy/src/treemap/squarify.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***! + \***********************************************************/ +/*! exports provided: phi, squarifyRatio, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "phi", function() { return phi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squarifyRatio", function() { return squarifyRatio; }); +/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); +/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); +var phi = (1 + Math.sqrt(5)) / 2; +function squarifyRatio(ratio, parent, x0, y0, x1, y1) { + var rows = [], + nodes = parent.children, + row, + nodeValue, + i0 = 0, + i1 = 0, + n = nodes.length, + dx, dy, + value = parent.value, + sumValue, + minValue, + maxValue, + newRatio, + minRatio, + alpha, + beta; + while (i0 < n) { + dx = x1 - x0, dy = y1 - y0; + // Find the next non-empty node. + do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); + minValue = maxValue = sumValue; + alpha = Math.max(dy / dx, dx / dy) / (value * ratio); + beta = sumValue * sumValue * alpha; + minRatio = Math.max(maxValue / beta, beta / minValue); + // Keep adding nodes while the aspect ratio maintains or improves. + for (; i1 < n; ++i1) { + sumValue += nodeValue = nodes[i1].value; + if (nodeValue < minValue) minValue = nodeValue; + if (nodeValue > maxValue) maxValue = nodeValue; + beta = sumValue * sumValue * alpha; + newRatio = Math.max(maxValue / beta, beta / minValue); + if (newRatio > minRatio) { sumValue -= nodeValue; break; } + minRatio = newRatio; + } + // Position and record the row orientation. + rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); + if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); + else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); + value -= sumValue, i0 = i1; + } + return rows; +} +/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { + function squarify(parent, x0, y0, x1, y1) { + squarifyRatio(ratio, parent, x0, y0, x1, y1); + } + squarify.ratio = function(x) { + return custom((x = +x) > 1 ? x : 1); + }; + return squarify; +})(phi)); /***/ }), -/***/ "./node_modules/d3-geo/src/interpolate.js": -/*!************************************************!*\ - !*** ./node_modules/d3-geo/src/interpolate.js ***! - \************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-interpolate/src/array.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/array.js ***! + \**************************************************/ +/*! exports provided: default, genericArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; }); +/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); +/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); + /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], - y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], - x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], - y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], - cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), - sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), - cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1), - sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1), - kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x0), - ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x0), - kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x1), - ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x1), - d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(x1 - x0))), - k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d); + return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b); +}); - var interpolate = d ? function(t) { - var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(t *= d) / k, - A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d - t) / k, - x = A * kx0 + B * kx1, - y = A * ky0 + B * ky1, - z = A * sy0 + B * sy1; - return [ - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"] - ]; - } : function() { - return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; +function genericArray(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; }; +} - interpolate.distance = d; - return interpolate; +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/basis.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/basis.js ***! + \**************************************************/ +/*! exports provided: basis, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; }); /***/ }), -/***/ "./node_modules/d3-geo/src/length.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-geo/src/length.js ***! - \*******************************************/ +/***/ "./node_modules/d3-interpolate/src/basisClosed.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! + \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js"); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js"); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + var n = values.length; + return function(t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); + }; +}); +/***/ }), -var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - lambda0, - sinPhi0, - cosPhi0; +/***/ "./node_modules/d3-interpolate/src/color.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/color.js ***! + \**************************************************/ +/*! exports provided: hue, gamma, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var lengthStream = { - sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineStart: lengthLineStart, - lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"] -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); -function lengthLineStart() { - lengthStream.point = lengthPointFirst; - lengthStream.lineEnd = lengthLineEnd; + +function linear(a, d) { + return function(t) { + return a + t * d; + }; } -function lengthLineEnd() { - lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; } -function lengthPointFirst(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; - lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); - lengthStream.point = lengthPoint; +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); } -function lengthPoint(lambda, phi) { - lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; - var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), - cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), - delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda - lambda0), - cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(delta), - sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(delta), - x = cosPhi * sinDelta, - y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta, - z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta; - lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x * x + y * y), z)); - lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi; +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); + }; } -/* harmony default export */ __webpack_exports__["default"] = (function(object) { - lengthSum.reset(); - Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, lengthStream); - return +lengthSum; -}); +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); +} /***/ }), -/***/ "./node_modules/d3-geo/src/math.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-geo/src/math.js ***! - \*****************************************/ -/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */ +/***/ "./node_modules/d3-interpolate/src/constant.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/constant.js ***! + \*****************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quarterPi", function() { return quarterPi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return atan; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exp", function() { return exp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pow", function() { return pow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sign", function() { return sign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return tan; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "haversin", function() { return haversin; }); -var epsilon = 1e-6; -var epsilon2 = 1e-12; -var pi = Math.PI; -var halfPi = pi / 2; -var quarterPi = pi / 4; -var tau = pi * 2; +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); -var degrees = 180 / pi; -var radians = pi / 180; -var abs = Math.abs; -var atan = Math.atan; -var atan2 = Math.atan2; -var cos = Math.cos; -var ceil = Math.ceil; -var exp = Math.exp; -var floor = Math.floor; -var log = Math.log; -var pow = Math.pow; -var sin = Math.sin; -var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; -var sqrt = Math.sqrt; -var tan = Math.tan; +/***/ }), -function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); -} +/***/ "./node_modules/d3-interpolate/src/cubehelix.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! + \******************************************************/ +/*! exports provided: default, cubehelixLong */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function asin(x) { - return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); -function haversin(x) { - return (x = sin(x / 2)) * x; + + +function cubehelix(hue) { + return (function cubehelixGamma(y) { + y = +y; + + function cubehelix(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), + s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), + l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + + cubehelix.gamma = cubehelixGamma; + + return cubehelix; + })(1); } +/* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + /***/ }), -/***/ "./node_modules/d3-geo/src/noop.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-geo/src/noop.js ***! - \*****************************************/ +/***/ "./node_modules/d3-interpolate/src/date.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-interpolate/src/date.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return noop; }); -function noop() {} +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var d = new Date; + return a = +a, b = +b, function(t) { + return d.setTime(a * (1 - t) + b * t), d; + }; +}); /***/ }), -/***/ "./node_modules/d3-geo/src/path/area.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-geo/src/path/area.js ***! - \**********************************************/ +/***/ "./node_modules/d3-interpolate/src/discrete.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/discrete.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); - - +/* harmony default export */ __webpack_exports__["default"] = (function(range) { + var n = range.length; + return function(t) { + return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; + }; +}); -var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - x00, - y00, - x0, - y0; +/***/ }), -var areaStream = { - point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - polygonStart: function() { - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; - areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(areaRingSum)); - areaRingSum.reset(); - }, - result: function() { - var area = areaSum / 2; - areaSum.reset(); - return area; - } -}; +/***/ "./node_modules/d3-interpolate/src/hcl.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/hcl.js ***! + \************************************************/ +/*! exports provided: default, hclLong */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function areaRingStart() { - areaStream.point = areaPointFirst; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); -function areaPointFirst(x, y) { - areaStream.point = areaPoint; - x00 = x0 = x, y00 = y0 = y; -} -function areaPoint(x, y) { - areaRingSum.add(y0 * x - x0 * y); - x0 = x, y0 = y; -} -function areaRingEnd() { - areaPoint(x00, y00); +function hcl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), + c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), + l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } } -/* harmony default export */ __webpack_exports__["default"] = (areaStream); +/* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), -/***/ "./node_modules/d3-geo/src/path/bounds.js": +/***/ "./node_modules/d3-interpolate/src/hsl.js": /*!************************************************!*\ - !*** ./node_modules/d3-geo/src/path/bounds.js ***! + !*** ./node_modules/d3-interpolate/src/hsl.js ***! \************************************************/ -/*! exports provided: default */ +/*! exports provided: default, hslLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); -var x0 = Infinity, - y0 = x0, - x1 = -x0, - y1 = x1; -var boundsStream = { - point: boundsPoint, - lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - result: function() { - var bounds = [[x0, y0], [x1, y1]]; - x1 = y1 = -(y0 = x0 = Infinity); - return bounds; +function hsl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), + s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), + l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; } -}; - -function boundsPoint(x, y) { - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; } -/* harmony default export */ __webpack_exports__["default"] = (boundsStream); +/* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), -/***/ "./node_modules/d3-geo/src/path/centroid.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-geo/src/path/centroid.js ***! - \**************************************************/ +/***/ "./node_modules/d3-interpolate/src/hue.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/hue.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); -// TODO Enforce positive area for exterior, negative area for interior? +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); + return function(t) { + var x = i(t); + return x - 360 * Math.floor(x / 360); + }; +}); -var X0 = 0, - Y0 = 0, - Z0 = 0, - X1 = 0, - Y1 = 0, - Z1 = 0, - X2 = 0, - Y2 = 0, - Z2 = 0, - x00, - y00, - x0, - y0; -var centroidStream = { - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.point = centroidPoint; - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - }, - result: function() { - var centroid = Z2 ? [X2 / Z2, Y2 / Z2] - : Z1 ? [X1 / Z1, Y1 / Z1] - : Z0 ? [X0 / Z0, Y0 / Z0] - : [NaN, NaN]; - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = - X2 = Y2 = Z2 = 0; - return centroid; - } -}; +/***/ }), -function centroidPoint(x, y) { - X0 += x; - Y0 += y; - ++Z0; -} +/***/ "./node_modules/d3-interpolate/src/index.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/index.js ***! + \**************************************************/ +/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function centroidLineStart() { - centroidStream.point = centroidPointFirstLine; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -function centroidPointFirstLine(x, y) { - centroidStream.point = centroidPointLine; - centroidPoint(x0 = x, y0 = y); -} +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -function centroidPointLine(x, y) { - var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); - X1 += z * (x0 + x) / 2; - Y1 += z * (y0 + y) / 2; - Z1 += z; - centroidPoint(x0 = x, y0 = y); -} +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -function centroidLineEnd() { - centroidStream.point = centroidPoint; -} +/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -function centroidRingStart() { - centroidStream.point = centroidPointFirstRing; -} +/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -function centroidRingEnd() { - centroidPointRing(x00, y00); -} +/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "./node_modules/d3-interpolate/src/discrete.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -function centroidPointFirstRing(x, y) { - centroidStream.point = centroidPointRing; - centroidPoint(x00 = x0 = x, y00 = y0 = y); -} +/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "./node_modules/d3-interpolate/src/hue.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -function centroidPointRing(x, y) { - var dx = x - x0, - dy = y - y0, - z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - X1 += z * (x0 + x) / 2; - Y1 += z * (y0 + y) / 2; - Z1 += z; +/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - z = y0 * x - x0 * y; - X2 += z * (x0 + x); - Y2 += z * (y0 + y); - Z2 += z * 3; - centroidPoint(x0 = x, y0 = y); -} +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (centroidStream); +/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-interpolate/src/round.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); -/***/ }), +/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "./node_modules/d3-interpolate/src/transform/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; }); -/***/ "./node_modules/d3-geo/src/path/context.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-geo/src/path/context.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathContext; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); +/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-interpolate/src/zoom.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); +/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; }); -function PathContext(context) { - this._context = context; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; }); -PathContext.prototype = { - _radius: 4.5, - pointRadius: function(_) { - return this._radius = _, this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._context.closePath(); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._context.moveTo(x, y); - this._point = 1; - break; - } - case 1: { - this._context.lineTo(x, y); - break; - } - default: { - this._context.moveTo(x + this._radius, y); - this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); - break; - } - } - }, - result: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"] -}; +/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "./node_modules/d3-interpolate/src/hsl.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; }); -/***/ }), +/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-interpolate/src/lab.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -/***/ "./node_modules/d3-geo/src/path/index.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-geo/src/path/index.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "./node_modules/d3-interpolate/src/hcl.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js"); -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/path/area.js"); -/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/path/bounds.js"); -/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/path/centroid.js"); -/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ "./node_modules/d3-geo/src/path/context.js"); -/* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ "./node_modules/d3-geo/src/path/measure.js"); -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-geo/src/path/string.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; }); +/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-interpolate/src/cubehelix.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; }); +/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "./node_modules/d3-interpolate/src/piecewise.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); +/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "./node_modules/d3-interpolate/src/quantize.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(projection, context) { - var pointRadius = 4.5, - projectionStream, - contextStream; - function path(object) { - if (object) { - if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); - Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(contextStream)); - } - return contextStream.result(); - } - path.area = function(object) { - Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__["default"])); - return _area_js__WEBPACK_IMPORTED_MODULE_2__["default"].result(); - }; - path.measure = function(object) { - Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__["default"])); - return _measure_js__WEBPACK_IMPORTED_MODULE_6__["default"].result(); - }; - path.bounds = function(object) { - Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"])); - return _bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"].result(); - }; - path.centroid = function(object) { - Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"])); - return _centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"].result(); - }; - - path.projection = function(_) { - return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]) : (projection = _).stream, path) : projection; - }; - - path.context = function(_) { - if (!arguments.length) return context; - contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__["default"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__["default"](context = _); - if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); - return path; - }; - - path.pointRadius = function(_) { - if (!arguments.length) return pointRadius; - pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); - return path; - }; - - return path.projection(projection).context(context); -}); -/***/ }), -/***/ "./node_modules/d3-geo/src/path/measure.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-geo/src/path/measure.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js"); -var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), - lengthRing, - x00, - y00, - x0, - y0; -var lengthStream = { - point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], - lineStart: function() { - lengthStream.point = lengthPointFirst; - }, - lineEnd: function() { - if (lengthRing) lengthPoint(x00, y00); - lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; - }, - polygonStart: function() { - lengthRing = true; - }, - polygonEnd: function() { - lengthRing = null; - }, - result: function() { - var length = +lengthSum; - lengthSum.reset(); - return length; - } -}; -function lengthPointFirst(x, y) { - lengthStream.point = lengthPoint; - x00 = x0 = x, y00 = y0 = y; -} -function lengthPoint(x, y) { - x0 -= x, y0 -= y; - lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x0 * x0 + y0 * y0)); - x0 = x, y0 = y; -} -/* harmony default export */ __webpack_exports__["default"] = (lengthStream); /***/ }), -/***/ "./node_modules/d3-geo/src/path/string.js": +/***/ "./node_modules/d3-interpolate/src/lab.js": /*!************************************************!*\ - !*** ./node_modules/d3-geo/src/path/string.js ***! + !*** ./node_modules/d3-interpolate/src/lab.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathString; }); -function PathString() { - this._string = []; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); -PathString.prototype = { - _radius: 4.5, - _circle: circle(4.5), - pointRadius: function(_) { - if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; - return this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._string.push("Z"); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._string.push("M", x, ",", y); - this._point = 1; - break; - } - case 1: { - this._string.push("L", x, ",", y); - break; - } - default: { - if (this._circle == null) this._circle = circle(this._radius); - this._string.push("M", x, ",", y, this._circle); - break; - } - } - }, - result: function() { - if (this._string.length) { - var result = this._string.join(""); - this._string = []; - return result; - } else { - return null; - } - } -}; -function circle(radius) { - return "m0," + radius - + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius - + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius - + "z"; + +function lab(start, end) { + var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), + a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), + b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), + opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; } /***/ }), -/***/ "./node_modules/d3-geo/src/pointEqual.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-geo/src/pointEqual.js ***! - \***********************************************/ +/***/ "./node_modules/d3-interpolate/src/number.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/number.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); - - /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; + return a = +a, b = +b, function(t) { + return a * (1 - t) + b * t; + }; }); /***/ }), -/***/ "./node_modules/d3-geo/src/polygonContains.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-geo/src/polygonContains.js ***! - \****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-interpolate/src/numberArray.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-interpolate/src/numberArray.js ***! + \********************************************************/ +/*! exports provided: default, isNumberArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js"); -/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); - - - - -var sum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; }); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + if (!b) b = []; + var n = a ? Math.min(b.length, a.length) : 0, + c = b.slice(), + i; + return function(t) { + for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; +}); -function longitude(point) { - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) - return point[0]; - else - return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sign"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]); +function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); } -/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { - var lambda = longitude(point), - phi = point[1], - sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi), - normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda), 0], - angle = 0, - winding = 0; - sum.reset(); +/***/ }), - if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; - else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; +/***/ "./node_modules/d3-interpolate/src/object.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/object.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - for (var i = 0, n = polygon.length; i < n; ++i) { - if (!(m = (ring = polygon[i]).length)) continue; - var ring, - m, - point0 = ring[m - 1], - lambda0 = longitude(point0), - phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], - sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi0), - cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi0); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); - for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { - var point1 = ring[j], - lambda1 = longitude(point1), - phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], - sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi1), - cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi1), - delta = lambda1 - lambda0, - sign = delta >= 0 ? 1 : -1, - absDelta = sign * delta, - antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], - k = sinPhi0 * sinPhi1; - sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(absDelta))); - angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] : delta; +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var i = {}, + c = {}, + k; - // Are the longitudes either side of the point’s meridian (lambda), - // and are the latitudes smaller than the parallel (phi)? - if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { - var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point1)); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(arc); - var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(normal, arc); - Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(intersection); - var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(intersection[2]); - if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { - winding += antimeridian ^ delta >= 0 ? 1 : -1; - } - } + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); + } else { + c[k] = b[k]; } } - // First, determine whether the South pole is inside or outside: - // - // It is inside if: - // * the polygon winds around it in a clockwise direction. - // * the polygon does not (cumulatively) wind around it, but has a negative - // (counter-clockwise) area. - // - // Second, count the (signed) number of times a segment crosses a lambda - // from the point to the South pole. If it is zero, then the point is the - // same side as the South pole. - - return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) ^ (winding & 1); + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/albers.js": +/***/ "./node_modules/d3-interpolate/src/piecewise.js": /*!******************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/albers.js ***! + !*** ./node_modules/d3-interpolate/src/piecewise.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__["default"])() - .parallels([29.5, 45.5]) - .scale(1070) - .translate([480, 250]) - .rotate([96, 0]) - .center([-0.6, 38.7]); -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); +function piecewise(interpolate, values) { + var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); + while (i < n) I[i] = interpolate(v, v = values[++i]); + return function(t) { + var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); + return I[i](t - i); + }; +} /***/ }), -/***/ "./node_modules/d3-geo/src/projection/albersUsa.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-interpolate/src/quantize.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/quantize.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ "./node_modules/d3-geo/src/projection/albers.js"); -/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js"); -/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); - - - - +/* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +}); -// The projections must have mutually exclusive clip regions on the sphere, -// as this will avoid emitting interleaving lines and polygons. -function multiplex(streams) { - var n = streams.length; - return { - point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, - sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, - lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, - lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, - polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, - polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } - }; -} -// A composite projection for the United States, configured by default for -// 960×500. The projection also works quite well at 960×600 if you change the -// scale to 1285 and adjust the translate accordingly. The set of standard -// parallels for each region comes from USGS, which is published here: -// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers -/* harmony default export */ __webpack_exports__["default"] = (function() { - var cache, - cacheStream, - lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), lower48Point, - alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 - hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 - point, pointStream = {point: function(x, y) { point = [x, y]; }}; +/***/ }), - function albersUsa(coordinates) { - var x = coordinates[0], y = coordinates[1]; - return point = null, - (lower48Point.point(x, y), point) - || (alaskaPoint.point(x, y), point) - || (hawaiiPoint.point(x, y), point); - } +/***/ "./node_modules/d3-interpolate/src/rgb.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/rgb.js ***! + \************************************************/ +/*! exports provided: default, rgbBasis, rgbBasisClosed */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - albersUsa.invert = function(coordinates) { - var k = lower48.scale(), - t = lower48.translate(), - x = (coordinates[0] - t[0]) / k, - y = (coordinates[1] - t[1]) / k; - return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska - : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii - : lower48).invert(coordinates); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); +/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - albersUsa.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); - }; - albersUsa.precision = function(_) { - if (!arguments.length) return lower48.precision(); - lower48.precision(_), alaska.precision(_), hawaii.precision(_); - return reset(); - }; - albersUsa.scale = function(_) { - if (!arguments.length) return lower48.scale(); - lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); - return albersUsa.translate(lower48.translate()); - }; - albersUsa.translate = function(_) { - if (!arguments.length) return lower48.translate(); - var k = lower48.scale(), x = +_[0], y = +_[1]; - lower48Point = lower48 - .translate(_) - .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) - .stream(pointStream); +/* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { + var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); - alaskaPoint = alaska - .translate([x - 0.307 * k, y + 0.201 * k]) - .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) - .stream(pointStream); + function rgb(start, end) { + var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } - hawaiiPoint = hawaii - .translate([x - 0.205 * k, y + 0.212 * k]) - .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) - .stream(pointStream); + rgb.gamma = rgbGamma; - return reset(); - }; + return rgb; +})(1)); - albersUsa.fitExtent = function(extent, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(albersUsa, extent, object); +function rgbSpline(spline) { + return function(colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, color; + for (i = 0; i < n; ++i) { + color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); + r[i] = color.r || 0; + g[i] = color.g || 0; + b[i] = color.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color.opacity = 1; + return function(t) { + color.r = r(t); + color.g = g(t); + color.b = b(t); + return color + ""; + }; }; +} - albersUsa.fitSize = function(size, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(albersUsa, size, object); - }; +var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]); - albersUsa.fitWidth = function(width, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(albersUsa, width, object); - }; - albersUsa.fitHeight = function(height, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(albersUsa, height, object); - }; +/***/ }), - function reset() { - cache = cacheStream = null; - return albersUsa; - } +/***/ "./node_modules/d3-interpolate/src/round.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/round.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return albersUsa.scale(1070); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return a = +a, b = +b, function(t) { + return Math.round(a * (1 - t) + b * t); + }; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/azimuthal.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***! - \*********************************************************/ -/*! exports provided: azimuthalRaw, azimuthalInvert */ +/***/ "./node_modules/d3-interpolate/src/string.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/string.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalRaw", function() { return azimuthalRaw; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalInvert", function() { return azimuthalInvert; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); -function azimuthalRaw(scale) { - return function(x, y) { - var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x), - cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), - k = scale(cx * cy); - return [ - k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), - k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) - ]; - } +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + +function zero(b) { + return function() { + return b; + }; } -function azimuthalInvert(angle) { - return function(x, y) { - var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y), - c = angle(z), - sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c), - cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(c); - return [ - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x * sc, z * cc), - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z && y * sc / z) - ]; - } +function one(b) { + return function(t) { + return b(t) + ""; + }; } +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators -/***/ }), - -/***/ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js": -/*!******************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***! - \******************************************************************/ -/*! exports provided: azimuthalEqualAreaRaw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEqualAreaRaw", function() { return azimuthalEqualAreaRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - - - + // Coerce inputs to strings. + a = a + "", b = b + ""; -var azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(cxcy) { - return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(2 / (1 + cxcy)); -}); + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); + } + bi = reB.lastIndex; + } -azimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { - return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / 2); -}); + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEqualAreaRaw) - .scale(124.75) - .clipAngle(180 - 1e-3); + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js": -/*!********************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***! - \********************************************************************/ -/*! exports provided: azimuthalEquidistantRaw, default */ +/***/ "./node_modules/d3-interpolate/src/transform/decompose.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! + \****************************************************************/ +/*! exports provided: identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEquidistantRaw", function() { return azimuthalEquidistantRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - - - - -var azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(c) { - return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["acos"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c); -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); +var degrees = 180 / Math.PI; -azimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { - return z; -}); +var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEquidistantRaw) - .scale(79.4188) - .clipAngle(180 - 1e-3); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/conic.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/conic.js ***! - \*****************************************************/ -/*! exports provided: conicProjection */ +/***/ "./node_modules/d3-interpolate/src/transform/index.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/index.js ***! + \************************************************************/ +/*! exports provided: interpolateTransformCss, interpolateTransformSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicProjection", function() { return conicProjection; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "./node_modules/d3-interpolate/src/number.js"); +/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "./node_modules/d3-interpolate/src/transform/parse.js"); -function conicProjection(projectAt) { - var phi0 = 0, - phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 3, - m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__["projectionMutator"])(projectAt), - p = m(phi0, phi1); +function interpolateTransform(parse, pxComma, pxParen, degParen) { - p.parallels = function(_) { - return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; - }; + function pop(s) { + return s.length ? s.pop() + " " : ""; + } - return p; + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; } +var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); + /***/ }), -/***/ "./node_modules/d3-geo/src/projection/conicConformal.js": -/*!**************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***! - \**************************************************************/ -/*! exports provided: conicConformalRaw, default */ +/***/ "./node_modules/d3-interpolate/src/transform/parse.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! + \************************************************************/ +/*! exports provided: parseCss, parseSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicConformalRaw", function() { return conicConformalRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); -/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); +/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "./node_modules/d3-interpolate/src/transform/decompose.js"); +var cssNode, + cssRoot, + cssView, + svgNode; -function tany(y) { - return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + y) / 2); +function parseCss(value) { + if (value === "none") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); } -function conicConformalRaw(y0, y1) { - var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), - n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(tany(y1) / tany(y0)), - f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y0), n) / n; - - if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__["mercatorRaw"]; - - function project(x, y) { - if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } - else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } - var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y), n); - return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(n * x)]; - } - - project.invert = function(x, y) { - var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + fy * fy); - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(fy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy), 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; - }; - - return project; +function parseSvg(value) { + if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; + value = value.matrix; + return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicConformalRaw) - .scale(109.5) - .parallels([30, 30]); -}); - /***/ }), -/***/ "./node_modules/d3-geo/src/projection/conicEqualArea.js": -/*!**************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***! - \**************************************************************/ -/*! exports provided: conicEqualAreaRaw, default */ +/***/ "./node_modules/d3-interpolate/src/value.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/value.js ***! + \**************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEqualAreaRaw", function() { return conicEqualAreaRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); -/* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js"); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); +/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); +/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); -function conicEqualAreaRaw(y0, y1) { - var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1)) / 2; - // Are the parallels symmetrical around the Equator? - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["cylindricalEqualAreaRaw"])(y0); - var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c) / n; - function project(x, y) { - var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)) / n; - return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x)]; - } - project.invert = function(x, y) { - var r0y = r0 - y; - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(r0y)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; - }; - return project; -} -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEqualAreaRaw) - .scale(155.424) - .center([0, 33.6442]); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b) + : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"] + : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"]) + : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"] + : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"] + : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"] + : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"] + : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"] + : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/conicEquidistant.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***! - \****************************************************************/ -/*! exports provided: conicEquidistantRaw, default */ +/***/ "./node_modules/d3-interpolate/src/zoom.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-interpolate/src/zoom.js ***! + \*************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEquidistantRaw", function() { return conicEquidistantRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js"); -/* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js"); - +var rho = Math.SQRT2, + rho2 = 2, + rho4 = 4, + epsilon2 = 1e-12; +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} -function conicEquidistantRaw(y0, y1) { - var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), - n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / (y1 - y0), - g = cy0 / n + y0; +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__["equirectangularRaw"]; +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +/* harmony default export */ __webpack_exports__["default"] = (function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; - function project(x, y) { - var gy = g - y, nx = n * x; - return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(nx)]; + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + } } - project.invert = function(x, y) { - var gy = g - y; - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(gy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy), g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + gy * gy)]; - }; + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + } + } - return project; -} + i.duration = S * 1000; -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEquidistantRaw) - .scale(131.154) - .center([0, 13.9389]); + return i; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js": -/*!********************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***! - \********************************************************************/ -/*! exports provided: cylindricalEqualAreaRaw */ +/***/ "./node_modules/d3-path/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-path/src/index.js ***! + \*******************************************/ +/*! exports provided: path */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cylindricalEqualAreaRaw", function() { return cylindricalEqualAreaRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); - - -function cylindricalEqualAreaRaw(phi0) { - var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi0); - - function forward(lambda, phi) { - return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi) / cosPhi0]; - } +/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-path/src/path.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - forward.invert = function(x, y) { - return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(y * cosPhi0)]; - }; - return forward; -} /***/ }), -/***/ "./node_modules/d3-geo/src/projection/equalEarth.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***! - \**********************************************************/ -/*! exports provided: equalEarthRaw, default */ +/***/ "./node_modules/d3-path/src/path.js": +/*!******************************************!*\ + !*** ./node_modules/d3-path/src/path.js ***! + \******************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalEarthRaw", function() { return equalEarthRaw; }); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); - - - -var A1 = 1.340264, - A2 = -0.081106, - A3 = 0.000893, - A4 = 0.003796, - M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(3) / 2, - iterations = 12; +var pi = Math.PI, + tau = 2 * pi, + epsilon = 1e-6, + tauEpsilon = tau - epsilon; -function equalEarthRaw(lambda, phi) { - var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)), l2 = l * l, l6 = l2 * l2 * l2; - return [ - lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), - l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - ]; +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; } -equalEarthRaw.invert = function(x, y) { - var l = y, l2 = l * l, l6 = l2 * l2 * l2; - for (var i = 0, delta, fy, fpy; i < iterations; ++i) { - fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; - fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); - l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; - if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) break; - } - return [ - M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l), - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(l) / M) - ]; -}; - -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equalEarthRaw) - .scale(177.158); -}); - - -/***/ }), +function path() { + return new Path; +} -/***/ "./node_modules/d3-geo/src/projection/equirectangular.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***! - \***************************************************************/ -/*! exports provided: equirectangularRaw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equirectangularRaw", function() { return equirectangularRaw; }); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x, y) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x, y) { + this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); + }, + quadraticCurveTo: function(x1, y1, x, y) { + this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, + y0 = this._y1, + x21 = x2 - x1, + y21 = y2 - y1, + x01 = x0 - x1, + y01 = y0 - y1, + l01_2 = x01 * x01 + y01 * y01; + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); -function equirectangularRaw(lambda, phi) { - return [lambda, phi]; -} + // Is this path empty? Move to (x1,y1). + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } -equirectangularRaw.invert = equirectangularRaw; + // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. + else if (!(l01_2 > epsilon)); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equirectangularRaw) - .scale(152.63); -}); + // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? + // Equivalently, is (x1,y1) coincident with (x2,y2)? + // Or, is the radius zero? Line to (x1,y1). + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } + // Otherwise, draw an arc! + else { + var x20 = x2 - x0, + y20 = y2 - y0, + l21_2 = x21 * x21 + y21 * y21, + l20_2 = x20 * x20 + y20 * y20, + l21 = Math.sqrt(l21_2), + l01 = Math.sqrt(l01_2), + l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), + t01 = l / l01, + t21 = l / l21; -/***/ }), + // If the start tangent is not coincident with (x0,y0), line to. + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } -/***/ "./node_modules/d3-geo/src/projection/fit.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/fit.js ***! - \***************************************************/ -/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), + dy = r * Math.sin(a0), + x0 = x + dx, + y0 = y + dy, + cw = 1 ^ ccw, + da = ccw ? a0 - a1 : a1 - a0; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitExtent", function() { return fitExtent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitSize", function() { return fitSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitWidth", function() { return fitWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitHeight", function() { return fitHeight; }); -/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js"); -/* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ "./node_modules/d3-geo/src/path/bounds.js"); + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + // Is this path empty? Move to (x0,y0). + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } + // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). + else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } -function fit(projection, fitBounds, object) { - var clip = projection.clipExtent && projection.clipExtent(); - projection.scale(150).translate([0, 0]); - if (clip != null) projection.clipExtent(null); - Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"])); - fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"].result()); - if (clip != null) projection.clipExtent(clip); - return projection; -} + // Is this arc empty? We’re done. + if (!r) return; -function fitExtent(projection, extent, object) { - return fit(projection, function(b) { - var w = extent[1][0] - extent[0][0], - h = extent[1][1] - extent[0][1], - k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), - x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, - y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} + // Does the angle go the wrong way? Flip the direction. + if (da < 0) da = da % tau + tau; -function fitSize(projection, size, object) { - return fitExtent(projection, [[0, 0], size], object); -} + // Is this a complete circle? Draw two arcs to complete the circle. + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } -function fitWidth(projection, width, object) { - return fit(projection, function(b) { - var w = +width, - k = w / (b[1][0] - b[0][0]), - x = (w - k * (b[1][0] + b[0][0])) / 2, - y = -k * b[0][1]; - projection.scale(150 * k).translate([x, y]); - }, object); -} + // Is this arc non-empty? Draw an arc! + else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); + } + }, + rect: function(x, y, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; + }, + toString: function() { + return this._; + } +}; -function fitHeight(projection, height, object) { - return fit(projection, function(b) { - var h = +height, - k = h / (b[1][1] - b[0][1]), - x = -k * b[0][0], - y = (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} +/* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/gnomonic.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***! - \********************************************************/ -/*! exports provided: gnomonicRaw, default */ +/***/ "./node_modules/d3-polygon/src/area.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-polygon/src/area.js ***! + \*********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gnomonicRaw", function() { return gnomonicRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - - - - -function gnomonicRaw(x, y) { - var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; - return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; -} +/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { + var i = -1, + n = polygon.length, + a, + b = polygon[n - 1], + area = 0; -gnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"]); + while (++i < n) { + a = b; + b = polygon[i]; + area += a[1] * b[0] - a[0] * b[1]; + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(gnomonicRaw) - .scale(144.049) - .clipAngle(60); + return area / 2; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/identity.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/identity.js ***! - \********************************************************/ +/***/ "./node_modules/d3-polygon/src/centroid.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-polygon/src/centroid.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); -/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { + var i = -1, + n = polygon.length, + x = 0, + y = 0, + a, + b = polygon[n - 1], + c, + k = 0; + while (++i < n) { + a = b; + b = polygon[i]; + k += c = a[0] * b[1] - b[0] * a[1]; + x += (a[0] + b[0]) * c; + y += (a[1] + b[1]) * c; + } + return k *= 3, [x / k, y / k]; +}); +/***/ }), -function scaleTranslate(kx, ky, tx, ty) { - return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] : Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ - point: function(x, y) { - this.stream.point(x * kx + tx, y * ky + ty); - } - }); -} +/***/ "./node_modules/d3-polygon/src/contains.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-polygon/src/contains.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (function() { - var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, transform = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], // scale, translate and reflect - x0 = null, y0, x1, y1, // clip extent - postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], - cache, - cacheStream, - projection; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { + var n = polygon.length, + p = polygon[n - 1], + x = point[0], y = point[1], + x0 = p[0], y0 = p[1], + x1, y1, + inside = false; - function reset() { - cache = cacheStream = null; - return projection; + for (var i = 0; i < n; ++i) { + p = polygon[i], x1 = p[0], y1 = p[1]; + if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; + x0 = x1, y0 = y1; } - return projection = { - stream: function(stream) { - return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); - }, - postclip: function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }, - clipExtent: function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }, - scale: function(_) { - return arguments.length ? (transform = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k; - }, - translate: function(_) { - return arguments.length ? (transform = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty]; - }, - reflectX: function(_) { - return arguments.length ? (transform = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0; - }, - reflectY: function(_) { - return arguments.length ? (transform = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0; - }, - fitExtent: function(extent, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(projection, extent, object); - }, - fitSize: function(size, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(projection, size, object); - }, - fitWidth: function(width, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(projection, width, object); - }, - fitHeight: function(height, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(projection, height, object); - } - }; + return inside; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/index.js ***! - \*****************************************************/ -/*! exports provided: default, projectionMutator */ +/***/ "./node_modules/d3-polygon/src/cross.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-polygon/src/cross.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return projection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projectionMutator", function() { return projectionMutator; }); -/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js"); -/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js"); -/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js"); -/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ "./node_modules/d3-geo/src/compose.js"); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js"); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); -/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js"); -/* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ "./node_modules/d3-geo/src/projection/resample.js"); +// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of +// the 3D cross product in a quadrant I Cartesian coordinate system (+x is +// right, +y is up). Returns a positive value if ABC is counter-clockwise, +// negative if clockwise, and zero if the points are collinear. +/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c) { + return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); +}); +/***/ }), +/***/ "./node_modules/d3-polygon/src/hull.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-polygon/src/hull.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ "./node_modules/d3-polygon/src/cross.js"); +function lexicographicOrder(a, b) { + return a[0] - b[0] || a[1] - b[1]; +} +// Computes the upper convex hull per the monotone chain algorithm. +// Assumes points.length >= 3, is sorted by x, unique in y. +// Returns an array of indices into points in left-to-right order. +function computeUpperHullIndexes(points) { + var n = points.length, + indexes = [0, 1], + size = 2; + for (var i = 2; i < n; ++i) { + while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__["default"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; + indexes[size++] = i; + } + return indexes.slice(0, size); // remove popped points +} +/* harmony default export */ __webpack_exports__["default"] = (function(points) { + if ((n = points.length) < 3) return null; -var transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ - point: function(x, y) { - this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); - } -}); + var i, + n, + sortedPoints = new Array(n), + flippedPoints = new Array(n); -function transformRotate(rotate) { - return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ - point: function(x, y) { - var r = rotate(x, y); - return this.stream.point(r[0], r[1]); - } - }); -} + for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; + sortedPoints.sort(lexicographicOrder); + for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; -function scaleTranslate(k, dx, dy) { - function transform(x, y) { - return [dx + k * x, dy - k * y]; - } - transform.invert = function(x, y) { - return [(x - dx) / k, (dy - y) / k]; - }; - return transform; -} + var upperIndexes = computeUpperHullIndexes(sortedPoints), + lowerIndexes = computeUpperHullIndexes(flippedPoints); -function scaleTranslateRotate(k, dx, dy, alpha) { - var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["cos"])(alpha), - sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sin"])(alpha), - a = cosAlpha * k, - b = sinAlpha * k, - ai = cosAlpha / k, - bi = sinAlpha / k, - ci = (sinAlpha * dy - cosAlpha * dx) / k, - fi = (sinAlpha * dx + cosAlpha * dy) / k; - function transform(x, y) { - return [a * x - b * y + dx, dy - b * x - a * y]; - } - transform.invert = function(x, y) { - return [ai * x - bi * y + ci, fi - bi * x - ai * y]; - }; - return transform; -} + // Construct the hull polygon, removing possible duplicate endpoints. + var skipLeft = lowerIndexes[0] === upperIndexes[0], + skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], + hull = []; -function projection(project) { - return projectionMutator(function() { return project; })(); -} + // Add upper hull in right-to-l order. + // Then add lower hull in left-to-right order. + for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); + for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); -function projectionMutator(projectAt) { - var project, - k = 150, // scale - x = 480, y = 250, // translate - lambda = 0, phi = 0, // center - deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate - alpha = 0, // post-rotate - theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"], // pre-clip angle - x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], // post-clip extent - delta2 = 0.5, // precision - projectResample, - projectTransform, - projectRotateTransform, - cache, - cacheStream; + return hull; +}); - function projection(point) { - return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); - } - function invert(point) { - point = projectRotateTransform.invert(point[0], point[1]); - return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; - } +/***/ }), - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); - }; +/***/ "./node_modules/d3-polygon/src/index.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-polygon/src/index.js ***! + \**********************************************/ +/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - projection.preclip = function(_) { - return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-polygon/src/area.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; +/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-polygon/src/centroid.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - projection.clipAngle = function(_) { - return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; - }; +/* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ "./node_modules/d3-polygon/src/hull.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; +/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-polygon/src/contains.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - projection.scale = function(_) { - return arguments.length ? (k = +_, recenter()) : k; - }; +/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-polygon/src/length.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - projection.translate = function(_) { - return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; - }; - projection.center = function(_) { - return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; - }; - projection.rotate = function(_) { - return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; - }; - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; - }; - projection.precision = function(_) { - return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sqrt"])(delta2); - }; - projection.fitExtent = function(extent, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitExtent"])(projection, extent, object); - }; - projection.fitSize = function(size, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitSize"])(projection, size, object); - }; - projection.fitWidth = function(width, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitWidth"])(projection, width, object); - }; +/***/ }), - projection.fitHeight = function(height, object) { - return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitHeight"])(projection, height, object); - }; +/***/ "./node_modules/d3-polygon/src/length.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-polygon/src/length.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function recenter() { - var center = scaleTranslateRotate(k, 0, 0, alpha).apply(null, project(lambda, phi)), - transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], alpha); - rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__["rotateRadians"])(deltaLambda, deltaPhi, deltaGamma); - projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(project, transform); - projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(rotate, projectTransform); - projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2); - return reset(); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { + var i = -1, + n = polygon.length, + b = polygon[n - 1], + xa, + ya, + xb = b[0], + yb = b[1], + perimeter = 0; - function reset() { - cache = cacheStream = null; - return projection; + while (++i < n) { + xa = xb; + ya = yb; + b = polygon[i]; + xb = b[0]; + yb = b[1]; + xa -= xb; + ya -= yb; + perimeter += Math.sqrt(xa * xa + ya * ya); } - return function() { - project = projectAt.apply(this, arguments); - projection.invert = project.invert && invert; - return recenter(); - }; -} + return perimeter; +}); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/mercator.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/mercator.js ***! - \********************************************************/ -/*! exports provided: mercatorRaw, default, mercatorProjection */ +/***/ "./node_modules/d3-quadtree/src/add.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-quadtree/src/add.js ***! + \*********************************************/ +/*! exports provided: default, addAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorRaw", function() { return mercatorRaw; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorProjection", function() { return mercatorProjection; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAll", function() { return addAll; }); +/* harmony default export */ __webpack_exports__["default"] = (function(d) { + var x = +this._x.call(null, d), + y = +this._y.call(null, d); + return add(this.cover(x, y), x, y, d); +}); +function add(tree, x, y, d) { + if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points + var parent, + node = tree._root, + leaf = {data: d}, + x0 = tree._x0, + y0 = tree._y0, + x1 = tree._x1, + y1 = tree._y1, + xm, + ym, + xp, + yp, + right, + bottom, + i, + j; -function mercatorRaw(lambda, phi) { - return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2))]; -} + // If the tree is empty, initialize the root as a leaf. + if (!node) return tree._root = leaf, tree; -mercatorRaw.invert = function(x, y) { - return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; -}; + // Find the existing leaf for the new point, or add it. + while (node.length) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return mercatorProjection(mercatorRaw) - .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); -}); + // Is the new point is exactly coincident with the existing point? + xp = +tree._x.call(null, node.data); + yp = +tree._y.call(null, node.data); + if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; -function mercatorProjection(project) { - var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(project), - center = m.center, - scale = m.scale, - translate = m.translate, - clipExtent = m.clipExtent, - x0 = null, y0, x1, y1; // clip extent + // Otherwise, split the leaf node until the old and new point are separated. + do { + parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); + return parent[j] = node, parent[i] = leaf, tree; +} - m.scale = function(_) { - return arguments.length ? (scale(_), reclip()) : scale(); - }; +function addAll(data) { + var d, i, n = data.length, + x, + y, + xz = new Array(n), + yz = new Array(n), + x0 = Infinity, + y0 = Infinity, + x1 = -Infinity, + y1 = -Infinity; - m.translate = function(_) { - return arguments.length ? (translate(_), reclip()) : translate(); - }; + // Compute the points and their extent. + for (i = 0; i < n; ++i) { + if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; + xz[i] = x; + yz[i] = y; + if (x < x0) x0 = x; + if (x > x1) x1 = x; + if (y < y0) y0 = y; + if (y > y1) y1 = y; + } - m.center = function(_) { - return arguments.length ? (center(_), reclip()) : center(); - }; + // If there were no (valid) points, abort. + if (x0 > x1 || y0 > y1) return this; - m.clipExtent = function(_) { - return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; + // Expand the tree to cover the new points. + this.cover(x0, y0).cover(x1, y1); - function reclip() { - var k = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * scale(), - t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m.rotate()).invert([0, 0])); - return clipExtent(x0 == null - ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw - ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] - : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); + // Add the new points. + for (i = 0; i < n; ++i) { + add(this, xz[i], yz[i], data[i]); } - return reclip(); + return this; } /***/ }), -/***/ "./node_modules/d3-geo/src/projection/naturalEarth1.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***! - \*************************************************************/ -/*! exports provided: naturalEarth1Raw, default */ +/***/ "./node_modules/d3-quadtree/src/cover.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-quadtree/src/cover.js ***! + \***********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "naturalEarth1Raw", function() { return naturalEarth1Raw; }); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { + if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + var x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1; + // If the quadtree has no extent, initialize them. + // Integer extent are necessary so that if we later double the extent, + // the existing quadrant boundaries don’t change due to floating point error! + if (isNaN(x0)) { + x1 = (x0 = Math.floor(x)) + 1; + y1 = (y0 = Math.floor(y)) + 1; + } -function naturalEarth1Raw(lambda, phi) { - var phi2 = phi * phi, phi4 = phi2 * phi2; - return [ - lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), - phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - ]; -} + // Otherwise, double repeatedly to cover. + else { + var z = x1 - x0, + node = this._root, + parent, + i; -naturalEarth1Raw.invert = function(x, y) { - var phi = y, i = 25, delta; - do { - var phi2 = phi * phi, phi4 = phi2 * phi2; - phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / - (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); - } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && --i > 0); - return [ - x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), - phi - ]; -}; + while (x0 > x || x >= x1 || y0 > y || y >= y1) { + i = (y < y0) << 1 | (x < x0); + parent = new Array(4), parent[i] = node, node = parent, z *= 2; + switch (i) { + case 0: x1 = x0 + z, y1 = y0 + z; break; + case 1: x0 = x1 - z, y1 = y0 + z; break; + case 2: x1 = x0 + z, y0 = y1 - z; break; + case 3: x0 = x1 - z, y0 = y1 - z; break; + } + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(naturalEarth1Raw) - .scale(175.295); + if (this._root && this._root.length) this._root = node; + } + + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + return this; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/orthographic.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/orthographic.js ***! - \************************************************************/ -/*! exports provided: orthographicRaw, default */ +/***/ "./node_modules/d3-quadtree/src/data.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-quadtree/src/data.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orthographicRaw", function() { return orthographicRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); - - - - -function orthographicRaw(x, y) { - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)]; -} - -orthographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"]); - /* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(orthographicRaw) - .scale(249.5) - .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]); + var data = []; + this.visit(function(node) { + if (!node.length) do data.push(node.data); while (node = node.next) + }); + return data; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/resample.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/resample.js ***! - \********************************************************/ +/***/ "./node_modules/d3-quadtree/src/extent.js": +/*!************************************************!*\ + !*** ./node_modules/d3-quadtree/src/extent.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js"); - +/* harmony default export */ __webpack_exports__["default"] = (function(_) { + return arguments.length + ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) + : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; +}); +/***/ }), -var maxDepth = 16, // maximum depth of subdivision - cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); // cos(minimum angular distance) +/***/ "./node_modules/d3-quadtree/src/find.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-quadtree/src/find.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (function(project, delta2) { - return +delta2 ? resample(project, delta2) : resampleNone(project); -}); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); -function resampleNone(project) { - return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ - point: function(x, y) { - x = project(x, y); - this.stream.point(x[0], x[1]); - } - }); -} -function resample(project, delta2) { +/* harmony default export */ __webpack_exports__["default"] = (function(x, y, radius) { + var data, + x0 = this._x0, + y0 = this._y0, + x1, + y1, + x2, + y2, + x3 = this._x1, + y3 = this._y1, + quads = [], + node = this._root, + q, + i; - function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { - var dx = x1 - x0, - dy = y1 - y0, - d2 = dx * dx + dy * dy; - if (d2 > 4 * delta2 && depth--) { - var a = a0 + a1, - b = b0 + b1, - c = c0 + c1, - m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(a * a + b * b + c * c), - phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(c /= m), - lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(b, a), - p = project(lambda2, phi2), - x2 = p[0], - y2 = p[1], - dx2 = x2 - x0, - dy2 = y2 - y0, - dz = dy * dx2 - dx * dy2; - if (dz * dz / d2 > delta2 // perpendicular projected distance - || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end - || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); - stream.point(x2, y2); - resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); - } - } + if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, x0, y0, x3, y3)); + if (radius == null) radius = Infinity; + else { + x0 = x - radius, y0 = y - radius; + x3 = x + radius, y3 = y + radius; + radius *= radius; } - return function(stream) { - var lambda00, x00, y00, a00, b00, c00, // first point - lambda0, x0, y0, a0, b0, c0; // previous point - - var resampleStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, - polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } - }; - - function point(x, y) { - x = project(x, y); - stream.point(x[0], x[1]); - } - function lineStart() { - x0 = NaN; - resampleStream.point = linePoint; - stream.lineStart(); - } + while (q = quads.pop()) { - function linePoint(lambda, phi) { - var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])([lambda, phi]), p = project(lambda, phi); - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); - stream.point(x0, y0); - } + // Stop searching if this quadrant can’t contain a closer node. + if (!(node = q.node) + || (x1 = q.x0) > x3 + || (y1 = q.y0) > y3 + || (x2 = q.x1) < x0 + || (y2 = q.y1) < y0) continue; - function lineEnd() { - resampleStream.point = point; - stream.lineEnd(); - } + // Bisect the current quadrant. + if (node.length) { + var xm = (x1 + x2) / 2, + ym = (y1 + y2) / 2; - function ringStart() { - lineStart(); - resampleStream.point = ringPoint; - resampleStream.lineEnd = ringEnd; - } + quads.push( + new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[3], xm, ym, x2, y2), + new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[2], x1, ym, xm, y2), + new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[1], xm, y1, x2, ym), + new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[0], x1, y1, xm, ym) + ); - function ringPoint(lambda, phi) { - linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; - resampleStream.point = linePoint; + // Visit the closest quadrant first. + if (i = (y >= ym) << 1 | (x >= xm)) { + q = quads[quads.length - 1]; + quads[quads.length - 1] = quads[quads.length - 1 - i]; + quads[quads.length - 1 - i] = q; + } } - function ringEnd() { - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); - resampleStream.lineEnd = lineEnd; - lineEnd(); + // Visit this point. (Visiting coincident points isn’t necessary!) + else { + var dx = x - +this._x.call(null, node.data), + dy = y - +this._y.call(null, node.data), + d2 = dx * dx + dy * dy; + if (d2 < radius) { + var d = Math.sqrt(radius = d2); + x0 = x - d, y0 = y - d; + x3 = x + d, y3 = y + d; + data = node.data; + } } + } - return resampleStream; - }; -} + return data; +}); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/stereographic.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/stereographic.js ***! - \*************************************************************/ -/*! exports provided: stereographicRaw, default */ +/***/ "./node_modules/d3-quadtree/src/index.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-quadtree/src/index.js ***! + \***********************************************/ +/*! exports provided: quadtree */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stereographicRaw", function() { return stereographicRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js"); +/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ "./node_modules/d3-quadtree/src/quadtree.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -function stereographicRaw(x, y) { - var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; - return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; -} +/***/ }), -stereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { - return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(z); -}); +/***/ "./node_modules/d3-quadtree/src/quad.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-quadtree/src/quad.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(stereographicRaw) - .scale(250) - .clipAngle(142); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(node, x0, y0, x1, y1) { + this.node = node; + this.x0 = x0; + this.y0 = y0; + this.x1 = x1; + this.y1 = y1; }); /***/ }), -/***/ "./node_modules/d3-geo/src/projection/transverseMercator.js": -/*!******************************************************************!*\ - !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***! - \******************************************************************/ -/*! exports provided: transverseMercatorRaw, default */ +/***/ "./node_modules/d3-quadtree/src/quadtree.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-quadtree/src/quadtree.js ***! + \**************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transverseMercatorRaw", function() { return transverseMercatorRaw; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js"); -/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js"); - - - -function transverseMercatorRaw(lambda, phi) { - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2)), -lambda]; -} - -transverseMercatorRaw.invert = function(x, y) { - return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; -}; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quadtree; }); +/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/d3-quadtree/src/add.js"); +/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ "./node_modules/d3-quadtree/src/cover.js"); +/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ "./node_modules/d3-quadtree/src/data.js"); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "./node_modules/d3-quadtree/src/extent.js"); +/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "./node_modules/d3-quadtree/src/find.js"); +/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-quadtree/src/remove.js"); +/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ "./node_modules/d3-quadtree/src/root.js"); +/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ "./node_modules/d3-quadtree/src/size.js"); +/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ "./node_modules/d3-quadtree/src/visit.js"); +/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ "./node_modules/d3-quadtree/src/visitAfter.js"); +/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ "./node_modules/d3-quadtree/src/x.js"); +/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ "./node_modules/d3-quadtree/src/y.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__["mercatorProjection"])(transverseMercatorRaw), - center = m.center, - rotate = m.rotate; - m.center = function(_) { - return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); - }; - m.rotate = function(_) { - return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); - }; - return rotate([0, 0, 90]) - .scale(159.155); -}); -/***/ }), -/***/ "./node_modules/d3-geo/src/rotation.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-geo/src/rotation.js ***! - \*********************************************/ -/*! exports provided: rotateRadians, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateRadians", function() { return rotateRadians; }); -/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "./node_modules/d3-geo/src/compose.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js"); -function rotationIdentity(lambda, phi) { - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; -} -rotationIdentity.invert = rotationIdentity; -function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { - return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) - : rotationLambda(deltaLambda)) - : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) - : rotationIdentity); +function quadtree(nodes, x, y) { + var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__["defaultX"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__["defaultY"] : y, NaN, NaN, NaN, NaN); + return nodes == null ? tree : tree.addAll(nodes); } -function forwardRotationLambda(deltaLambda) { - return function(lambda, phi) { - return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; - }; +function Quadtree(x, y, x0, y0, x1, y1) { + this._x = x; + this._y = y; + this._x0 = x0; + this._y0 = y0; + this._x1 = x1; + this._y1 = y1; + this._root = undefined; } -function rotationLambda(deltaLambda) { - var rotation = forwardRotationLambda(deltaLambda); - rotation.invert = forwardRotationLambda(-deltaLambda); - return rotation; +function leaf_copy(leaf) { + var copy = {data: leaf.data}, next = copy; + while (leaf = leaf.next) next = next.next = {data: leaf.data}; + return copy; } -function rotationPhiGamma(deltaPhi, deltaGamma) { - var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaPhi), - sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaPhi), - cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaGamma), - sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaGamma); - - function rotation(lambda, phi) { - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), - x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, - y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, - z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), - k = z * cosDeltaPhi + x * sinDeltaPhi; - return [ - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaGamma + y * sinDeltaGamma) - ]; - } +var treeProto = quadtree.prototype = Quadtree.prototype; - rotation.invert = function(lambda, phi) { - var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), - x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, - y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, - z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), - k = z * cosDeltaGamma - y * sinDeltaGamma; - return [ - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaPhi - x * sinDeltaPhi) - ]; - }; +treeProto.copy = function() { + var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), + node = this._root, + nodes, + child; - return rotation; -} + if (!node) return copy; -/* harmony default export */ __webpack_exports__["default"] = (function(rotate) { - rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"] : 0); + if (!node.length) return copy._root = leaf_copy(node), copy; - function forward(coordinates) { - coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); - return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; + nodes = [{source: node, target: copy._root = new Array(4)}]; + while (node = nodes.pop()) { + for (var i = 0; i < 4; ++i) { + if (child = node.source[i]) { + if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); + else node.target[i] = leaf_copy(child); + } + } } - forward.invert = function(coordinates) { - coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); - return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; - }; + return copy; +}; - return forward; -}); +treeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__["default"]; +treeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__["addAll"]; +treeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__["default"]; +treeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +treeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]; +treeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__["default"]; +treeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__["default"]; +treeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__["removeAll"]; +treeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__["default"]; +treeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__["default"]; +treeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__["default"]; +treeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__["default"]; +treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"]; +treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"]; /***/ }), -/***/ "./node_modules/d3-geo/src/stream.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-geo/src/stream.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-quadtree/src/remove.js": +/*!************************************************!*\ + !*** ./node_modules/d3-quadtree/src/remove.js ***! + \************************************************/ +/*! exports provided: default, removeAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function streamGeometry(geometry, stream) { - if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { - streamGeometryType[geometry.type](geometry, stream); - } -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAll", function() { return removeAll; }); +/* harmony default export */ __webpack_exports__["default"] = (function(d) { + if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points -var streamObjectType = { - Feature: function(object, stream) { - streamGeometry(object.geometry, stream); - }, - FeatureCollection: function(object, stream) { - var features = object.features, i = -1, n = features.length; - while (++i < n) streamGeometry(features[i].geometry, stream); - } -}; + var parent, + node = this._root, + retainer, + previous, + next, + x0 = this._x0, + y0 = this._y0, + x1 = this._x1, + y1 = this._y1, + x, + y, + xm, + ym, + right, + bottom, + i, + j; -var streamGeometryType = { - Sphere: function(object, stream) { - stream.sphere(); - }, - Point: function(object, stream) { - object = object.coordinates; - stream.point(object[0], object[1], object[2]); - }, - MultiPoint: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); - }, - LineString: function(object, stream) { - streamLine(object.coordinates, stream, 0); - }, - MultiLineString: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamLine(coordinates[i], stream, 0); - }, - Polygon: function(object, stream) { - streamPolygon(object.coordinates, stream); - }, - MultiPolygon: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamPolygon(coordinates[i], stream); - }, - GeometryCollection: function(object, stream) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) streamGeometry(geometries[i], stream); + // If the tree is empty, initialize the root as a leaf. + if (!node) return this; + + // Find the leaf node for the point. + // While descending, also retain the deepest parent with a non-removed sibling. + if (node.length) while (true) { + if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; + if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; + if (!(parent = node, node = node[i = bottom << 1 | right])) return this; + if (!node.length) break; + if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; } -}; -function streamLine(coordinates, stream, closed) { - var i = -1, n = coordinates.length - closed, coordinate; - stream.lineStart(); - while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); - stream.lineEnd(); -} + // Find the point to remove. + while (node.data !== d) if (!(previous = node, node = node.next)) return this; + if (next = node.next) delete node.next; -function streamPolygon(coordinates, stream) { - var i = -1, n = coordinates.length; - stream.polygonStart(); - while (++i < n) streamLine(coordinates[i], stream, 1); - stream.polygonEnd(); -} + // If there are multiple coincident points, remove just the point. + if (previous) return (next ? previous.next = next : delete previous.next), this; -/* harmony default export */ __webpack_exports__["default"] = (function(object, stream) { - if (object && streamObjectType.hasOwnProperty(object.type)) { - streamObjectType[object.type](object, stream); - } else { - streamGeometry(object, stream); + // If this is the root point, remove it. + if (!parent) return this._root = next, this; + + // Remove this leaf. + next ? parent[i] = next : delete parent[i]; + + // If the parent now contains exactly one leaf, collapse superfluous parents. + if ((node = parent[0] || parent[1] || parent[2] || parent[3]) + && node === (parent[3] || parent[2] || parent[1] || parent[0]) + && !node.length) { + if (retainer) retainer[j] = node; + else this._root = node; } + + return this; }); +function removeAll(data) { + for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); + return this; +} + /***/ }), -/***/ "./node_modules/d3-geo/src/transform.js": +/***/ "./node_modules/d3-quadtree/src/root.js": /*!**********************************************!*\ - !*** ./node_modules/d3-geo/src/transform.js ***! + !*** ./node_modules/d3-quadtree/src/root.js ***! \**********************************************/ -/*! exports provided: default, transformer */ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); -/* harmony default export */ __webpack_exports__["default"] = (function(methods) { - return { - stream: transformer(methods) - }; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this._root; }); -function transformer(methods) { - return function(stream) { - var s = new TransformStream; - for (var key in methods) s[key] = methods[key]; - s.stream = stream; - return s; - }; -} - -function TransformStream() {} - -TransformStream.prototype = { - constructor: TransformStream, - point: function(x, y) { this.stream.point(x, y); }, - sphere: function() { this.stream.sphere(); }, - lineStart: function() { this.stream.lineStart(); }, - lineEnd: function() { this.stream.lineEnd(); }, - polygonStart: function() { this.stream.polygonStart(); }, - polygonEnd: function() { this.stream.polygonEnd(); } -}; - /***/ }), -/***/ "./node_modules/d3-hierarchy/src/accessors.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/accessors.js ***! - \****************************************************/ -/*! exports provided: optional, required */ +/***/ "./node_modules/d3-quadtree/src/size.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-quadtree/src/size.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "required", function() { return required; }); -function optional(f) { - return f == null ? null : required(f); -} - -function required(f) { - if (typeof f !== "function") throw new Error; - return f; -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var size = 0; + this.visit(function(node) { + if (!node.length) do ++size; while (node = node.next) + }); + return size; +}); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/array.js": -/*!************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/array.js ***! - \************************************************/ -/*! exports provided: slice, shuffle */ +/***/ "./node_modules/d3-quadtree/src/visit.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-quadtree/src/visit.js ***! + \***********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); -var slice = Array.prototype.slice; +/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); -function shuffle(array) { - var m = array.length, - t, - i; - while (m) { - i = Math.random() * m-- | 0; - t = array[m]; - array[m] = array[i]; - array[i] = t; +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + var quads = [], q, node = this._root, child, x0, y0, x1, y1; + if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { + var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); + if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); + if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); + if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); + } } - - return array; -} + return this; +}); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/cluster.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/cluster.js ***! - \**************************************************/ +/***/ "./node_modules/d3-quadtree/src/visitAfter.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-quadtree/src/visitAfter.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} +/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); -function meanX(children) { - return children.reduce(meanXReduce, 0) / children.length; -} -function meanXReduce(x, c) { - return x + c.x; -} +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + var quads = [], next = [], q; + if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](this._root, this._x0, this._y0, this._x1, this._y1)); + while (q = quads.pop()) { + var node = q.node; + if (node.length) { + var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; + if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); + if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); + if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); + if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); + } + next.push(q); + } + while (q = next.pop()) { + callback(q.node, q.x0, q.y0, q.x1, q.y1); + } + return this; +}); -function maxY(children) { - return 1 + children.reduce(maxYReduce, 0); -} -function maxYReduce(y, c) { - return Math.max(y, c.y); -} +/***/ }), -function leafLeft(node) { - var children; - while (children = node.children) node = children[0]; - return node; -} +/***/ "./node_modules/d3-quadtree/src/x.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-quadtree/src/x.js ***! + \*******************************************/ +/*! exports provided: defaultX, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function leafRight(node) { - var children; - while (children = node.children) node = children[children.length - 1]; - return node; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultX", function() { return defaultX; }); +function defaultX(d) { + return d[0]; } -/* harmony default export */ __webpack_exports__["default"] = (function() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = false; - - function cluster(root) { - var previousNode, - x = 0; - - // First walk, computing the initial x & y values. - root.eachAfter(function(node) { - var children = node.children; - if (children) { - node.x = meanX(children); - node.y = maxY(children); - } else { - node.x = previousNode ? x += separation(node, previousNode) : 0; - node.y = 0; - previousNode = node; - } - }); - - var left = leafLeft(root), - right = leafRight(root), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2; - - // Second walk, normalizing x & y to the desired size. - return root.eachAfter(nodeSize ? function(node) { - node.x = (node.x - root.x) * dx; - node.y = (root.y - node.y) * dy; - } : function(node) { - node.x = (node.x - x0) / (x1 - x0) * dx; - node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; - }); - } - - cluster.separation = function(x) { - return arguments.length ? (separation = x, cluster) : separation; - }; - - cluster.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); - }; - - cluster.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); - }; - - return cluster; +/* harmony default export */ __webpack_exports__["default"] = (function(_) { + return arguments.length ? (this._x = _, this) : this._x; }); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/constant.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/constant.js ***! - \***************************************************/ -/*! exports provided: constantZero, default */ +/***/ "./node_modules/d3-quadtree/src/y.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-quadtree/src/y.js ***! + \*******************************************/ +/*! exports provided: defaultY, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantZero", function() { return constantZero; }); -function constantZero() { - return 0; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultY", function() { return defaultY; }); +function defaultY(d) { + return d[1]; } -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(_) { + return arguments.length ? (this._y = _, this) : this._y; }); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js": -/*!**************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***! - \**************************************************************/ +/***/ "./node_modules/d3-random/src/bates.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-random/src/bates.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var node = this, nodes = [node]; - while (node = node.parent) { - nodes.push(node); +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js"); + + + +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBates(source) { + function randomBates(n) { + var randomIrwinHall = _irwinHall__WEBPACK_IMPORTED_MODULE_1__["default"].source(source)(n); + return function() { + return randomIrwinHall() / n; + }; } - return nodes; -}); + + randomBates.source = sourceRandomBates; + + return randomBates; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/count.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-random/src/defaultSource.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-random/src/defaultSource.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function count(node) { - var sum = 0, - children = node.children, - i = children && children.length; - if (!i) sum = 1; - else while (--i >= 0) sum += children[i].value; - node.value = sum; -} - /* harmony default export */ __webpack_exports__["default"] = (function() { - return this.eachAfter(count); + return Math.random(); }); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***! - \****************************************************************/ +/***/ "./node_modules/d3-random/src/exponential.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-random/src/exponential.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var nodes = []; - this.each(function(node) { - nodes.push(node); - }); - return nodes; -}); +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); + + +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomExponential(source) { + function randomExponential(lambda) { + return function() { + return -Math.log(1 - source()) / lambda; + }; + } + + randomExponential.source = sourceRandomExponential; + + return randomExponential; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/each.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***! - \*********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-random/src/index.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-random/src/index.js ***! + \*********************************************/ +/*! exports provided: randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { - var node = this, current, next = [node], children, i, n; - do { - current = next.reverse(), next = []; - while (node = current.pop()) { - callback(node), children = node.children; - if (children) for (i = 0, n = children.length; i < n; ++i) { - next.push(children[i]); - } - } - } while (next.length); - return this; -}); +/* harmony import */ var _uniform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform */ "./node_modules/d3-random/src/uniform.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return _uniform__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return _normal__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _logNormal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logNormal */ "./node_modules/d3-random/src/logNormal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return _logNormal__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _bates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bates */ "./node_modules/d3-random/src/bates.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return _bates__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return _irwinHall__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _exponential__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exponential */ "./node_modules/d3-random/src/exponential.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return _exponential__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + + + + + + + /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js": -/*!**************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***! - \**************************************************************/ +/***/ "./node_modules/d3-random/src/irwinHall.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-random/src/irwinHall.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { - var node = this, nodes = [node], next = [], children, i, n; - while (node = nodes.pop()) { - next.push(node), children = node.children; - if (children) for (i = 0, n = children.length; i < n; ++i) { - nodes.push(children[i]); - } - } - while (node = next.pop()) { - callback(node); +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); + + +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomIrwinHall(source) { + function randomIrwinHall(n) { + return function() { + for (var sum = 0, i = 0; i < n; ++i) sum += source(); + return sum; + }; } - return this; -}); + + randomIrwinHall.source = sourceRandomIrwinHall; + + return randomIrwinHall; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***! - \***************************************************************/ +/***/ "./node_modules/d3-random/src/logNormal.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-random/src/logNormal.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { - var node = this, nodes = [node], children, i; - while (node = nodes.pop()) { - callback(node), children = node.children; - if (children) for (i = children.length - 1; i >= 0; --i) { - nodes.push(children[i]); - } +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js"); + + + +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogNormal(source) { + function randomLogNormal() { + var randomNormal = _normal__WEBPACK_IMPORTED_MODULE_1__["default"].source(source).apply(this, arguments); + return function() { + return Math.exp(randomNormal()); + }; } - return this; -}); + + randomLogNormal.source = sourceRandomLogNormal; + + return randomLogNormal; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***! - \**********************************************************/ -/*! exports provided: default, computeHeight, Node */ +/***/ "./node_modules/d3-random/src/normal.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-random/src/normal.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hierarchy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeHeight", function() { return computeHeight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; }); -/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ "./node_modules/d3-hierarchy/src/hierarchy/count.js"); -/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ "./node_modules/d3-hierarchy/src/hierarchy/each.js"); -/* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js"); -/* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js"); -/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sum.js */ "./node_modules/d3-hierarchy/src/hierarchy/sum.js"); -/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sort.js */ "./node_modules/d3-hierarchy/src/hierarchy/sort.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-hierarchy/src/hierarchy/path.js"); -/* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ancestors.js */ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js"); -/* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descendants.js */ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js"); -/* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./leaves.js */ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js"); -/* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./links.js */ "./node_modules/d3-hierarchy/src/hierarchy/links.js"); - +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomNormal(source) { + function randomNormal(mu, sigma) { + var x, r; + mu = mu == null ? 0 : +mu; + sigma = sigma == null ? 1 : +sigma; + return function() { + var y; + // If available, use the second previously-generated uniform random. + if (x != null) y = x, x = null; + // Otherwise, generate a new x and y. + else do { + x = source() * 2 - 1; + y = source() * 2 - 1; + r = x * x + y * y; + } while (!r || r > 1); + return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); + }; + } + randomNormal.source = sourceRandomNormal; + return randomNormal; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); +/***/ }), +/***/ "./node_modules/d3-random/src/uniform.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-random/src/uniform.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function hierarchy(data, children) { - var root = new Node(data), - valued = +data.value && (root.value = data.value), - node, - nodes = [root], - child, - childs, - i, - n; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); - if (children == null) children = defaultChildren; - while (node = nodes.pop()) { - if (valued) node.value = +node.data.value; - if ((childs = children(node.data)) && (n = childs.length)) { - node.children = new Array(n); - for (i = n - 1; i >= 0; --i) { - nodes.push(child = node.children[i] = new Node(childs[i])); - child.parent = node; - child.depth = node.depth + 1; - } - } +/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomUniform(source) { + function randomUniform(min, max) { + min = min == null ? 0 : +min; + max = max == null ? 1 : +max; + if (arguments.length === 1) max = min, min = 0; + else max -= min; + return function() { + return source() * max + min; + }; } - return root.eachBefore(computeHeight); -} + randomUniform.source = sourceRandomUniform; -function node_copy() { - return hierarchy(this).eachBefore(copyData); -} + return randomUniform; +})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); -function defaultChildren(d) { - return d.children; -} -function copyData(node) { - node.data = node.data.data; -} +/***/ }), -function computeHeight(node) { - var height = 0; - do node.height = height; - while ((node = node.parent) && (node.height < ++height)); -} +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function Node(data) { - this.data = data; - this.depth = - this.height = 0; - this.parent = null; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -Node.prototype = hierarchy.prototype = { - constructor: Node, - count: _count_js__WEBPACK_IMPORTED_MODULE_0__["default"], - each: _each_js__WEBPACK_IMPORTED_MODULE_1__["default"], - eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__["default"], - eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__["default"], - sum: _sum_js__WEBPACK_IMPORTED_MODULE_4__["default"], - sort: _sort_js__WEBPACK_IMPORTED_MODULE_5__["default"], - path: _path_js__WEBPACK_IMPORTED_MODULE_6__["default"], - ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_7__["default"], - descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_8__["default"], - leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_9__["default"], - links: _links_js__WEBPACK_IMPORTED_MODULE_10__["default"], - copy: node_copy -}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***! - \***********************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js": +/*!******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***! + \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var leaves = []; - this.eachBefore(function(node) { - if (!node.children) { - leaves.push(node); - } - }); - return leaves; -}); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/links.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***! + \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var root = this, links = []; - root.each(function(node) { - if (node !== root) { // Don’t include the root’s parent, if any. - links.push({source: node.parent, target: node}); - } - }); - return links; -}); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/path.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***! + \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(end) { - var start = this, - ancestor = leastCommonAncestor(start, end), - nodes = [start]; - while (start !== ancestor) { - start = start.parent; - nodes.push(start); - } - var k = nodes.length; - while (end !== ancestor) { - nodes.splice(k, 0, end); - end = end.parent; - } - return nodes; -}); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -function leastCommonAncestor(a, b) { - if (a === b) return a; - var aNodes = a.ancestors(), - bNodes = b.ancestors(), - c = null; - a = aNodes.pop(); - b = bNodes.pop(); - while (a === b) { - c = a; - a = aNodes.pop(); - b = bNodes.pop(); - } - return c; -} + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/sort.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***! + \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(compare) { - return this.eachBefore(function(node) { - if (node.children) { - node.children.sort(compare); - } - }); -}); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/hierarchy/sum.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***! - \********************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***! + \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return this.eachAfter(function(node) { - var sum = +value(node.data) || 0, - children = node.children, - i = children && children.length; - while (--i >= 0) sum += children[i].value; - node.value = sum; - }); -}); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/index.js": -/*!************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/index.js ***! - \************************************************/ -/*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */ +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***! + \*****************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ "./node_modules/d3-hierarchy/src/cluster.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ "./node_modules/d3-hierarchy/src/pack/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")); -/* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ "./node_modules/d3-hierarchy/src/partition.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ "./node_modules/d3-hierarchy/src/stratify.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ "./node_modules/d3-hierarchy/src/tree.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - -/* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ "./node_modules/d3-hierarchy/src/treemap/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ "./node_modules/d3-hierarchy/src/treemap/binary.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - -/* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ "./node_modules/d3-hierarchy/src/treemap/resquarify.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/***/ }), +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")); +/***/ }), +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); +/***/ }), +/***/ "./node_modules/d3-scale-chromatic/src/categorical/category10.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/pack/enclose.js": +/***/ "./node_modules/d3-scale-chromatic/src/colors.js": /*!*******************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***! + !*** ./node_modules/d3-scale-chromatic/src/colors.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-hierarchy/src/array.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(specifier) { + var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; + while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); + return colors; +}); -/* harmony default export */ __webpack_exports__["default"] = (function(circles) { - var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(circles))).length, B = [], p, e; +/***/ }), - while (i < n) { - p = circles[i]; - if (e && enclosesWeak(e, p)) ++i; - else e = encloseBasis(B = extendBasis(B, p)), i = 0; - } +/***/ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return e; -}); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function extendBasis(B, p) { - var i, j; - if (enclosesWeakAll(p, B)) return [p]; - // If we get here then B must have at least one element. - for (i = 0; i < B.length; ++i) { - if (enclosesNot(p, B[i]) - && enclosesWeakAll(encloseBasis2(B[i], p), B)) { - return [B[i], p]; - } - } +var scheme = new Array(3).concat( + "d8b365f5f5f55ab4ac", + "a6611adfc27d80cdc1018571", + "a6611adfc27df5f5f580cdc1018571", + "8c510ad8b365f6e8c3c7eae55ab4ac01665e", + "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", + "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", + "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", + "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", + "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - // If we get here then B must have at least two elements. - for (i = 0; i < B.length - 1; ++i) { - for (j = i + 1; j < B.length; ++j) { - if (enclosesNot(encloseBasis2(B[i], B[j]), p) - && enclosesNot(encloseBasis2(B[i], p), B[j]) - && enclosesNot(encloseBasis2(B[j], p), B[i]) - && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { - return [B[i], B[j], p]; - } - } - } +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); - // If we get here then something is very wrong. - throw new Error; -} -function enclosesNot(a, b) { - var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; - return dr < 0 || dr * dr < dx * dx + dy * dy; -} +/***/ }), -function enclosesWeak(a, b) { - var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} +/***/ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function enclosesWeakAll(a, B) { - for (var i = 0; i < B.length; ++i) { - if (!enclosesWeak(a, B[i])) { - return false; - } - } - return true; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function encloseBasis(B) { - switch (B.length) { - case 1: return encloseBasis1(B[0]); - case 2: return encloseBasis2(B[0], B[1]); - case 3: return encloseBasis3(B[0], B[1], B[2]); - } -} -function encloseBasis1(a) { - return { - x: a.x, - y: a.y, - r: a.r - }; -} -function encloseBasis2(a, b) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, - l = Math.sqrt(x21 * x21 + y21 * y21); - return { - x: (x1 + x2 + x21 / l * r21) / 2, - y: (y1 + y2 + y21 / l * r21) / 2, - r: (l + r1 + r2) / 2 - }; -} +var scheme = new Array(3).concat( + "af8dc3f7f7f77fbf7b", + "7b3294c2a5cfa6dba0008837", + "7b3294c2a5cff7f7f7a6dba0008837", + "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", + "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", + "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", + "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", + "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", + "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function encloseBasis3(a, b, c) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x3 = c.x, y3 = c.y, r3 = c.r, - a2 = x1 - x2, - a3 = x1 - x3, - b2 = y1 - y2, - b3 = y1 - y3, - c2 = r2 - r1, - c3 = r3 - r1, - d1 = x1 * x1 + y1 * y1 - r1 * r1, - d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, - d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, - ab = a3 * b2 - a2 * b3, - xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, - xb = (b3 * c2 - b2 * c3) / ab, - ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, - yb = (a2 * c3 - a3 * c2) / ab, - A = xb * xb + yb * yb - 1, - B = 2 * (r1 + xa * xb + ya * yb), - C = xa * xa + ya * ya - r1 * r1, - r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); - return { - x: x1 + xa + xb * r, - y: y1 + ya + yb * r, - r: r - }; -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/pack/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/pack/index.js ***! - \*****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js"); -/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function defaultRadius(d) { - return Math.sqrt(d.value); -} -/* harmony default export */ __webpack_exports__["default"] = (function() { - var radius = null, - dx = 1, - dy = 1, - padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"]; +var scheme = new Array(3).concat( + "e9a3c9f7f7f7a1d76a", + "d01c8bf1b6dab8e1864dac26", + "d01c8bf1b6daf7f7f7b8e1864dac26", + "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", + "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", + "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", + "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", + "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", + "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - function pack(root) { - root.x = dx / 2, root.y = dy / 2; - if (radius) { - root.eachBefore(radiusLeaf(radius)) - .eachAfter(packChildren(padding, 0.5)) - .eachBefore(translateChild(1)); - } else { - root.eachBefore(radiusLeaf(defaultRadius)) - .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"], 1)) - .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) - .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); - } - return root; - } +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); - pack.radius = function(x) { - return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__["optional"])(x), pack) : radius; - }; - pack.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; - }; +/***/ }), - pack.padding = function(x) { - return arguments.length ? (padding = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x), pack) : padding; - }; +/***/ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return pack; -}); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function radiusLeaf(radius) { - return function(node) { - if (!node.children) { - node.r = Math.max(0, +radius(node) || 0); - } - }; -} -function packChildren(padding, k) { - return function(node) { - if (children = node.children) { - var children, - i, - n = children.length, - r = padding(node) * k || 0, - e; - if (r) for (i = 0; i < n; ++i) children[i].r += r; - e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__["packEnclose"])(children); - if (r) for (i = 0; i < n; ++i) children[i].r -= r; - node.r = e + r; - } - }; -} +var scheme = new Array(3).concat( + "998ec3f7f7f7f1a340", + "5e3c99b2abd2fdb863e66101", + "5e3c99b2abd2f7f7f7fdb863e66101", + "542788998ec3d8daebfee0b6f1a340b35806", + "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", + "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", + "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", + "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", + "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function translateChild(k) { - return function(node) { - var parent = node.parent; - node.r *= k; - if (parent) { - node.x = parent.x + k * node.x; - node.y = parent.y + k * node.y; - } - }; -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/pack/siblings.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***! - \********************************************************/ -/*! exports provided: packEnclose, default */ +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return packEnclose; }); -/* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function place(b, a, c) { - var dx = b.x - a.x, x, a2, - dy = b.y - a.y, y, b2, - d2 = dx * dx + dy * dy; - if (d2) { - a2 = a.r + c.r, a2 *= a2; - b2 = b.r + c.r, b2 *= b2; - if (a2 > b2) { - x = (d2 + b2 - a2) / (2 * d2); - y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); - c.x = b.x - x * dx - y * dy; - c.y = b.y - x * dy + y * dx; - } else { - x = (d2 + a2 - b2) / (2 * d2); - y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); - c.x = a.x + x * dx - y * dy; - c.y = a.y + x * dy + y * dx; - } - } else { - c.x = a.x + c.r; - c.y = a.y; - } -} -function intersects(a, b) { - var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} +var scheme = new Array(3).concat( + "ef8a62f7f7f767a9cf", + "ca0020f4a58292c5de0571b0", + "ca0020f4a582f7f7f792c5de0571b0", + "b2182bef8a62fddbc7d1e5f067a9cf2166ac", + "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", + "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", + "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", + "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", + "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function score(node) { - var a = node._, - b = node.next._, - ab = a.r + b.r, - dx = (a.x * b.r + b.x * a.r) / ab, - dy = (a.y * b.r + b.y * a.r) / ab; - return dx * dx + dy * dy; -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); -function Node(circle) { - this._ = circle; - this.next = null; - this.previous = null; -} -function packEnclose(circles) { - if (!(n = circles.length)) return 0; +/***/ }), - var a, b, c, n, aa, ca, i, j, k, sj, sk; +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Place the first circle. - a = circles[0], a.x = 0, a.y = 0; - if (!(n > 1)) return a.r; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - // Place the second circle. - b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; - if (!(n > 2)) return a.r + b.r; - // Place the third circle. - place(b, a, c = circles[2]); - // Initialize the front-chain using the first three circles a, b and c. - a = new Node(a), b = new Node(b), c = new Node(c); - a.next = c.previous = b; - b.next = a.previous = c; - c.next = b.previous = a; +var scheme = new Array(3).concat( + "ef8a62ffffff999999", + "ca0020f4a582bababa404040", + "ca0020f4a582ffffffbababa404040", + "b2182bef8a62fddbc7e0e0e09999994d4d4d", + "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", + "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", + "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", + "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", + "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - // Attempt to place each remaining circle… - pack: for (i = 3; i < n; ++i) { - place(a._, b._, c = circles[i]), c = new Node(c); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); - // Find the closest intersecting circle on the front-chain, if any. - // “Closeness” is determined by linear distance along the front-chain. - // “Ahead” or “behind” is likewise determined by linear distance. - j = b.next, k = a.previous, sj = b._.r, sk = a._.r; - do { - if (sj <= sk) { - if (intersects(j._, c._)) { - b = j, a.next = b, b.previous = a, --i; - continue pack; - } - sj += j._.r, j = j.next; - } else { - if (intersects(k._, c._)) { - a = k, a.next = b, b.previous = a, --i; - continue pack; - } - sk += k._.r, k = k.previous; - } - } while (j !== k.next); - // Success! Insert the new circle c between a and b. - c.previous = a, c.next = b, a.next = b.previous = b = c; +/***/ }), - // Compute the new closest circle pair to the centroid. - aa = score(a); - while ((c = c.next) !== b) { - if ((ca = score(c)) < aa) { - a = c, aa = ca; - } - } - b = a.next; - } +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***! + \*****************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Compute the enclosing circle of the front chain. - a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - // Translate the circles to put the enclosing circle around the origin. - for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; - return c.r; -} -/* harmony default export */ __webpack_exports__["default"] = (function(circles) { - packEnclose(circles); - return circles; -}); +var scheme = new Array(3).concat( + "fc8d59ffffbf91bfdb", + "d7191cfdae61abd9e92c7bb6", + "d7191cfdae61ffffbfabd9e92c7bb6", + "d73027fc8d59fee090e0f3f891bfdb4575b4", + "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", + "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", + "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", + "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", + "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/partition.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/partition.js ***! - \****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***! + \*****************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js"); -/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var dx = 1, - dy = 1, - padding = 0, - round = false; +var scheme = new Array(3).concat( + "fc8d59ffffbf91cf60", + "d7191cfdae61a6d96a1a9641", + "d7191cfdae61ffffbfa6d96a1a9641", + "d73027fc8d59fee08bd9ef8b91cf601a9850", + "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", + "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", + "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", + "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", + "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - function partition(root) { - var n = root.height + 1; - root.x0 = - root.y0 = padding; - root.x1 = dx; - root.y1 = dy / n; - root.eachBefore(positionNode(dy, n)); - if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - return root; - } +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); - function positionNode(dy, n) { - return function(node) { - if (node.children) { - Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); - } - var x0 = node.x0, - y0 = node.y0, - x1 = node.x1 - padding, - y1 = node.y1 - padding; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - }; - } - partition.round = function(x) { - return arguments.length ? (round = !!x, partition) : round; - }; +/***/ }), - partition.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; - }; +/***/ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***! + \*******************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - partition.padding = function(x) { - return arguments.length ? (padding = +x, partition) : padding; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - return partition; -}); + + +var scheme = new Array(3).concat( + "fc8d59ffffbf99d594", + "d7191cfdae61abdda42b83ba", + "d7191cfdae61ffffbfabdda42b83ba", + "d53e4ffc8d59fee08be6f59899d5943288bd", + "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", + "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", + "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", + "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", + "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/stratify.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/stratify.js ***! - \***************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/index.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/index.js ***! + \******************************************************/ +/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); -/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); +/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ "./node_modules/d3-scale-chromatic/src/categorical/category10.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -var keyPrefix = "$", // Protect against keys like “__proto__”. - preroot = {depth: -1}, - ambiguous = {}; +/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -function defaultId(d) { - return d.id; -} +/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -function defaultParentId(d) { - return d.parentId; -} +/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var id = defaultId, - parentId = defaultParentId; +/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - function stratify(data) { - var d, - i, - n = data.length, - root, - parent, - node, - nodes = new Array(n), - nodeId, - nodeKey, - nodeByKey = {}; +/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - for (i = 0; i < n; ++i) { - d = data[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["Node"](d); - if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { - nodeKey = keyPrefix + (node.id = nodeId); - nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node; - } - } +/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - for (i = 0; i < n; ++i) { - node = nodes[i], nodeId = parentId(data[i], i, data); - if (nodeId == null || !(nodeId += "")) { - if (root) throw new Error("multiple roots"); - root = node; - } else { - parent = nodeByKey[keyPrefix + nodeId]; - if (!parent) throw new Error("missing: " + nodeId); - if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); - if (parent.children) parent.children.push(node); - else parent.children = [node]; - node.parent = parent; - } - } +/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - if (!root) throw new Error("no root"); - root.parent = preroot; - root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["computeHeight"]); - root.parent = null; - if (n > 0) throw new Error("cycle"); +/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - return root; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["scheme"]; }); - stratify.id = function(x) { - return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : id; - }; +/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - stratify.parentId = function(x) { - return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : parentId; - }; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["scheme"]; }); - return stratify; -}); +/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["scheme"]; }); -/***/ }), +/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/***/ "./node_modules/d3-hierarchy/src/tree.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-hierarchy/src/tree.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["scheme"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js"); +/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["scheme"]; }); -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} +/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -// function radialSeparation(a, b) { -// return (a.parent === b.parent ? 1 : 2) / a.depth; -// } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["scheme"]; }); -// This function is used to traverse the left contour of a subtree (or -// subforest). It returns the successor of v on this contour. This successor is -// either given by the leftmost child of v or by the thread of v. The function -// returns null if and only if v is on the highest level of its subtree. -function nextLeft(v) { - var children = v.children; - return children ? children[0] : v.t; -} +/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -// This function works analogously to nextLeft. -function nextRight(v) { - var children = v.children; - return children ? children[children.length - 1] : v.t; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["scheme"]; }); -// Shifts the current subtree rooted at w+. This is done by increasing -// prelim(w+) and mod(w+) by shift. -function moveSubtree(wm, wp, shift) { - var change = shift / (wp.i - wm.i); - wp.c -= change; - wp.s += shift; - wm.c += change; - wp.z += shift; - wp.m += shift; -} +/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -// All other shifts, applied to the smaller subtrees between w- and w+, are -// performed by this function. To prepare the shifts, we have to adjust -// change(w+), shift(w+), and change(w-). -function executeShifts(v) { - var shift = 0, - change = 0, - children = v.children, - i = children.length, - w; - while (--i >= 0) { - w = children[i]; - w.z += shift; - w.m += shift; - shift += w.s + (change += w.c); - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["scheme"]; }); -// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, -// returns the specified (default) ancestor. -function nextAncestor(vim, v, ancestor) { - return vim.a.parent === v.parent ? vim.a : ancestor; -} +/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -function TreeNode(node, i) { - this._ = node; - this.parent = null; - this.children = null; - this.A = null; // default ancestor - this.a = this; // ancestor - this.z = 0; // prelim - this.m = 0; // mod - this.c = 0; // change - this.s = 0; // shift - this.t = null; // thread - this.i = i; // number -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["scheme"]; }); -TreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__["Node"].prototype); +/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -function treeRoot(root) { - var tree = new TreeNode(root, 0), - node, - nodes = [tree], - child, - children, - i, - n; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["scheme"]; }); - while (node = nodes.pop()) { - if (children = node._.children) { - node.children = new Array(n = children.length); - for (i = n - 1; i >= 0; --i) { - nodes.push(child = node.children[i] = new TreeNode(children[i], i)); - child.parent = node; - } - } - } +/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); - (tree.parent = new TreeNode(null, 0)).children = [tree]; - return tree; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["scheme"]; }); -// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm -/* harmony default export */ __webpack_exports__["default"] = (function() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = null; +/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); - function tree(root) { - var t = treeRoot(root); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["scheme"]; }); - // Compute the layout using Buchheim et al.’s algorithm. - t.eachAfter(firstWalk), t.parent.m = -t.z; - t.eachBefore(secondWalk); +/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); - // If a fixed node size is specified, scale x and y. - if (nodeSize) root.eachBefore(sizeNode); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["scheme"]; }); - // If a fixed tree size is specified, scale x and y based on the extent. - // Compute the left-most, right-most, and depth-most nodes for extents. - else { - var left = root, - right = root, - bottom = root; - root.eachBefore(function(node) { - if (node.x < left.x) left = node; - if (node.x > right.x) right = node; - if (node.depth > bottom.depth) bottom = node; - }); - var s = left === right ? 1 : separation(left, right) / 2, - tx = s - left.x, - kx = dx / (right.x + s + tx), - ky = dy / (bottom.depth || 1); - root.eachBefore(function(node) { - node.x = (node.x + tx) * kx; - node.y = node.depth * ky; - }); - } +/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); - return root; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["scheme"]; }); - // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is - // applied recursively to the children of v, as well as the function - // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the - // node v is placed to the midpoint of its outermost children. - function firstWalk(v) { - var children = v.children, - siblings = v.parent.children, - w = v.i ? siblings[v.i - 1] : null; - if (children) { - executeShifts(v); - var midpoint = (children[0].z + children[children.length - 1].z) / 2; - if (w) { - v.z = w.z + separation(v._, w._); - v.m = v.z - midpoint; - } else { - v.z = midpoint; - } - } else if (w) { - v.z = w.z + separation(v._, w._); - } - v.parent.A = apportion(v, w, v.parent.A || siblings[0]); - } +/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); - // Computes all real x-coordinates by summing up the modifiers recursively. - function secondWalk(v) { - v._.x = v.z + v.parent.m; - v.m += v.parent.m; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["scheme"]; }); - // The core of the algorithm. Here, a new subtree is combined with the - // previous subtrees. Threads are used to traverse the inside and outside - // contours of the left and right subtree up to the highest common level. The - // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the - // superscript o means outside and i means inside, the subscript - means left - // subtree and + means right subtree. For summing up the modifiers along the - // contour, we use respective variables si+, si-, so-, and so+. Whenever two - // nodes of the inside contours conflict, we compute the left one of the - // greatest uncommon ancestors using the function ANCESTOR and call MOVE - // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. - // Finally, we add a new thread (if necessary). - function apportion(v, w, ancestor) { - if (w) { - var vip = v, - vop = v, - vim = w, - vom = vip.parent.children[0], - sip = vip.m, - sop = vop.m, - sim = vim.m, - som = vom.m, - shift; - while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { - vom = nextLeft(vom); - vop = nextRight(vop); - vop.a = v; - shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); - if (shift > 0) { - moveSubtree(nextAncestor(vim, v, ancestor), v, shift); - sip += shift; - sop += shift; - } - sim += vim.m; - sip += vip.m; - som += vom.m; - sop += vop.m; - } - if (vim && !nextRight(vop)) { - vop.t = vim; - vop.m += sim - sop; - } - if (vip && !nextLeft(vom)) { - vom.t = vip; - vom.m += sip - som; - ancestor = v; - } - } - return ancestor; - } +/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); - function sizeNode(node) { - node.x *= dx; - node.y = node.depth * dy; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["scheme"]; }); - tree.separation = function(x) { - return arguments.length ? (separation = x, tree) : separation; - }; +/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); - tree.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); - }; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["scheme"]; }); - tree.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); - }; +/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); - return tree; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["scheme"]; }); +/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["scheme"]; }); -/***/ "./node_modules/d3-hierarchy/src/treemap/binary.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - i, n = nodes.length, - sum, sums = new Array(n + 1); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["scheme"]; }); - for (sums[0] = sum = i = 0; i < n; ++i) { - sums[i + 1] = sum += nodes[i].value; - } +/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); - partition(0, n, parent.value, x0, y0, x1, y1); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["scheme"]; }); - function partition(i, j, value, x0, y0, x1, y1) { - if (i >= j - 1) { - var node = nodes[i]; - node.x0 = x0, node.y0 = y0; - node.x1 = x1, node.y1 = y1; - return; - } +/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); - var valueOffset = sums[i], - valueTarget = (value / 2) + valueOffset, - k = i + 1, - hi = j - 1; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["scheme"]; }); - while (k < hi) { - var mid = k + hi >>> 1; - if (sums[mid] < valueTarget) k = mid + 1; - else hi = mid; - } +/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); - if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["scheme"]; }); - var valueLeft = sums[k] - valueOffset, - valueRight = value - valueLeft; +/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); - if ((x1 - x0) > (y1 - y0)) { - var xk = (x0 * valueRight + x1 * valueLeft) / value; - partition(i, k, valueLeft, x0, y0, xk, y1); - partition(k, j, valueRight, xk, y0, x1, y1); - } else { - var yk = (y0 * valueRight + y1 * valueLeft) / value; - partition(i, k, valueLeft, x0, y0, x1, yk); - partition(k, j, valueRight, x0, yk, x1, y1); - } - } -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["scheme"]; }); +/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["scheme"]; }); -/***/ "./node_modules/d3-hierarchy/src/treemap/dice.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (x1 - x0) / parent.value; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["scheme"]; }); + +/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["scheme"]; }); + +/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); + +/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); + +/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["warm"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["cool"]; }); + +/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); + +/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); + +/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["magma"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["inferno"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["plasma"]; }); - while (++i < n) { - node = nodes[i], node.y0 = y0, node.y1 = y1; - node.x0 = x0, node.x1 = x0 += node.value * k; - } -}); -/***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/index.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js"); -/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); -/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__["default"], - round = false, - dx = 1, - dy = 1, - paddingStack = [0], - paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], - paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], - paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], - paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], - paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"]; - function treemap(root) { - root.x0 = - root.y0 = 0; - root.x1 = dx; - root.y1 = dy; - root.eachBefore(positionNode); - paddingStack = [0]; - if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - return root; - } - function positionNode(node) { - var p = paddingStack[node.depth], - x0 = node.x0 + p, - y0 = node.y0 + p, - x1 = node.x1 - p, - y1 = node.y1 - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - if (node.children) { - p = paddingStack[node.depth + 1] = paddingInner(node) / 2; - x0 += paddingLeft(node) - p; - y0 += paddingTop(node) - p; - x1 -= paddingRight(node) - p; - y1 -= paddingBottom(node) - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - tile(node, x0, y0, x1, y1); - } - } - treemap.round = function(x) { - return arguments.length ? (round = !!x, treemap) : round; - }; - treemap.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; - }; - treemap.tile = function(x) { - return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__["required"])(x), treemap) : tile; - }; - treemap.padding = function(x) { - return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); - }; - treemap.paddingInner = function(x) { - return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingInner; - }; - treemap.paddingOuter = function(x) { - return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); - }; - treemap.paddingTop = function(x) { - return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingTop; - }; - treemap.paddingRight = function(x) { - return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingRight; - }; - treemap.paddingBottom = function(x) { - return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingBottom; - }; - treemap.paddingLeft = function(x) { - return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingLeft; - }; - return treemap; -}); -/***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/resquarify.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); -/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); -/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { - function resquarify(parent, x0, y0, x1, y1) { - if ((rows = parent._squarify) && (rows.ratio === ratio)) { - var rows, - row, - nodes, - i, - j = -1, - n, - m = rows.length, - value = parent.value; - while (++j < m) { - row = rows[j], nodes = row.children; - for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; - if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value); - else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1); - value -= row.value; - } - } else { - parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["squarifyRatio"])(ratio, parent, x0, y0, x1, y1); - rows.ratio = ratio; - } - } - resquarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - return resquarify; -})(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["phi"])); -/***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/round.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(node) { - node.x0 = Math.round(node.x0); - node.y0 = Math.round(node.y0); - node.x1 = Math.round(node.x1); - node.y1 = Math.round(node.y1); -}); -/***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/slice.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (y1 - y0) / parent.value; - while (++i < n) { - node = nodes[i], node.x0 = x0, node.x1 = x1; - node.y0 = y0, node.y1 = y0 += node.value * k; - } -}); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***! - \************************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/ramp.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); -/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); - +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { - (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__["default"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parent, x0, y0, x1, y1); +/* harmony default export */ __webpack_exports__["default"] = (function(scheme) { + return Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRgbBasis"])(scheme[scheme.length - 1]); }); /***/ }), -/***/ "./node_modules/d3-hierarchy/src/treemap/squarify.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***! - \***********************************************************/ -/*! exports provided: phi, squarifyRatio, default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "phi", function() { return phi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squarifyRatio", function() { return squarifyRatio; }); -/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js"); -/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -var phi = (1 + Math.sqrt(5)) / 2; -function squarifyRatio(ratio, parent, x0, y0, x1, y1) { - var rows = [], - nodes = parent.children, - row, - nodeValue, - i0 = 0, - i1 = 0, - n = nodes.length, - dx, dy, - value = parent.value, - sumValue, - minValue, - maxValue, - newRatio, - minRatio, - alpha, - beta; +var scheme = new Array(3).concat( + "e5f5f999d8c92ca25f", + "edf8fbb2e2e266c2a4238b45", + "edf8fbb2e2e266c2a42ca25f006d2c", + "edf8fbccece699d8c966c2a42ca25f006d2c", + "edf8fbccece699d8c966c2a441ae76238b45005824", + "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", + "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - while (i0 < n) { - dx = x1 - x0, dy = y1 - y0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); - // Find the next non-empty node. - do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); - minValue = maxValue = sumValue; - alpha = Math.max(dy / dx, dx / dy) / (value * ratio); - beta = sumValue * sumValue * alpha; - minRatio = Math.max(maxValue / beta, beta / minValue); - // Keep adding nodes while the aspect ratio maintains or improves. - for (; i1 < n; ++i1) { - sumValue += nodeValue = nodes[i1].value; - if (nodeValue < minValue) minValue = nodeValue; - if (nodeValue > maxValue) maxValue = nodeValue; - beta = sumValue * sumValue * alpha; - newRatio = Math.max(maxValue / beta, beta / minValue); - if (newRatio > minRatio) { sumValue -= nodeValue; break; } - minRatio = newRatio; - } +/***/ }), - // Position and record the row orientation. - rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); - if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); - else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); - value -= sumValue, i0 = i1; - } +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return rows; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { - function squarify(parent, x0, y0, x1, y1) { - squarifyRatio(ratio, parent, x0, y0, x1, y1); - } - squarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; +var scheme = new Array(3).concat( + "e0ecf49ebcda8856a7", + "edf8fbb3cde38c96c688419d", + "edf8fbb3cde38c96c68856a7810f7c", + "edf8fbbfd3e69ebcda8c96c68856a7810f7c", + "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", + "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", + "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - return squarify; -})(phi)); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/array.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/array.js ***! - \**************************************************/ -/*! exports provided: default, genericArray */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; }); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b); -}); -function genericArray(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(na), - c = new Array(nb), - i; - for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; +var scheme = new Array(3).concat( + "e0f3dba8ddb543a2ca", + "f0f9e8bae4bc7bccc42b8cbe", + "f0f9e8bae4bc7bccc443a2ca0868ac", + "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", + "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", + "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", + "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/basis.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/basis.js ***! - \**************************************************/ -/*! exports provided: basis, default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}); + + +var scheme = new Array(3).concat( + "fee8c8fdbb84e34a33", + "fef0d9fdcc8afc8d59d7301f", + "fef0d9fdcc8afc8d59e34a33b30000", + "fef0d9fdd49efdbb84fc8d59e34a33b30000", + "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", + "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", + "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/basisClosed.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! - \********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); - }; -}); + +var scheme = new Array(3).concat( + "ece7f2a6bddb2b8cbe", + "f1eef6bdc9e174a9cf0570b0", + "f1eef6bdc9e174a9cf2b8cbe045a8d", + "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", + "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", + "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", + "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/color.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/color.js ***! - \**************************************************/ -/*! exports provided: hue, gamma, default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); - - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); -} -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); - }; -} +var scheme = new Array(3).concat( + "ece2f0a6bddb1c9099", + "f6eff7bdc9e167a9cf02818a", + "f6eff7bdc9e167a9cf1c9099016c59", + "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", + "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", + "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", + "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/constant.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/constant.js ***! - \*****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); + + + +var scheme = new Array(3).concat( + "e7e1efc994c7dd1c77", + "f1eef6d7b5d8df65b0ce1256", + "f1eef6d7b5d8df65b0dd1c77980043", + "f1eef6d4b9dac994c7df65b0dd1c77980043", + "f1eef6d4b9dac994c7df65b0e7298ace125691003f", + "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", + "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/cubehelix.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! - \******************************************************/ -/*! exports provided: default, cubehelixLong */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - - -function cubehelix(hue) { - return (function cubehelixGamma(y) { - y = +y; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - function cubehelix(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), - s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - cubehelix.gamma = cubehelixGamma; - return cubehelix; - })(1); -} +var scheme = new Array(3).concat( + "fde0ddfa9fb5c51b8a", + "feebe2fbb4b9f768a1ae017e", + "feebe2fbb4b9f768a1c51b8a7a0177", + "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", + "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", + "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", + "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/date.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-interpolate/src/date.js ***! - \*************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var d = new Date; - return a = +a, b = +b, function(t) { - return d.setTime(a * (1 - t) + b * t), d; - }; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); + + + +var scheme = new Array(3).concat( + "f7fcb9addd8e31a354", + "ffffccc2e69978c679238443", + "ffffccc2e69978c67931a354006837", + "ffffccd9f0a3addd8e78c67931a354006837", + "ffffccd9f0a3addd8e78c67941ab5d238443005a32", + "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", + "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/discrete.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/discrete.js ***! - \*****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); + + + +var scheme = new Array(3).concat( + "edf8b17fcdbb2c7fb8", + "ffffcca1dab441b6c4225ea8", + "ffffcca1dab441b6c42c7fb8253494", + "ffffccc7e9b47fcdbb41b6c42c7fb8253494", + "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", + "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", + "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/hcl.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hcl.js ***! - \************************************************/ -/*! exports provided: default, hclLong */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function hcl(hue) { - return function(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), - c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} +var scheme = new Array(3).concat( + "fff7bcfec44fd95f0e", + "ffffd4fed98efe9929cc4c02", + "ffffd4fed98efe9929d95f0e993404", + "ffffd4fee391fec44ffe9929d95f0e993404", + "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", + "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", + "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/hsl.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hsl.js ***! - \************************************************/ -/*! exports provided: default, hslLong */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function hsl(hue) { - return function(start, end) { - var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), - s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), - l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} +var scheme = new Array(3).concat( + "ffeda0feb24cf03b20", + "ffffb2fecc5cfd8d3ce31a1c", + "ffffb2fecc5cfd8d3cf03b20bd0026", + "ffffb2fed976feb24cfd8d3cf03b20bd0026", + "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", + "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", + "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); -var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/hue.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/hue.js ***! - \************************************************/ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***! + \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); - return function(t) { - var x = i(t); - return x - 360 * Math.floor(x / 360); - }; +/* harmony default export */ __webpack_exports__["default"] = (function(t) { + t = Math.max(0, Math.min(1, t)); + return "rgb(" + + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " + + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " + + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + + ")"; }); /***/ }), -/***/ "./node_modules/d3-interpolate/src/index.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/index.js ***! - \**************************************************/ -/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js": +/*!***************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***! + \***************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-240, 0.5, 1.0))); -/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "./node_modules/d3-interpolate/src/discrete.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +/***/ }), -/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "./node_modules/d3-interpolate/src/hue.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***! + \*************************************************************************/ +/*! exports provided: warm, cool, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warm", function() { return warm; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cool", function() { return cool; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); -/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-interpolate/src/round.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +var warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); +var cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); -/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "./node_modules/d3-interpolate/src/transform/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; }); +var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(t) { + if (t < 0 || t > 1) t -= Math.floor(t); + var ts = Math.abs(t - 0.5); + c.h = 360 * t - 100; + c.s = 1.5 - 1.5 * ts; + c.l = 0.8 - 0.9 * ts; + return c + ""; +}); -/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-interpolate/src/zoom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; }); +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "./node_modules/d3-interpolate/src/hsl.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; }); +var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(), + pi_1_3 = Math.PI / 3, + pi_2_3 = Math.PI * 2 / 3; -/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-interpolate/src/lab.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(t) { + var x; + t = (0.5 - t) * Math.PI; + c.r = 255 * (x = Math.sin(t)) * x; + c.g = 255 * (x = Math.sin(t + pi_1_3)) * x; + c.b = 255 * (x = Math.sin(t + pi_2_3)) * x; + return c + ""; +}); -/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "./node_modules/d3-interpolate/src/hcl.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; }); +/***/ }), -/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-interpolate/src/cubehelix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(t) { + t = Math.max(0, Math.min(1, t)); + return "rgb(" + + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " + + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " + + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + + ")"; +}); -/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "./node_modules/d3-interpolate/src/piecewise.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "./node_modules/d3-interpolate/src/quantize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***! + \*************************************************************************/ +/*! exports provided: default, magma, inferno, plasma */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "magma", function() { return magma; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inferno", function() { return inferno; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plasma", function() { return plasma; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +function ramp(range) { + var n = range.length; + return function(t) { + return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; + }; +} +/* harmony default export */ __webpack_exports__["default"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"))); +var magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); +var inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); +var plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); +/***/ }), +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +var scheme = new Array(3).concat( + "deebf79ecae13182bd", + "eff3ffbdd7e76baed62171b5", + "eff3ffbdd7e76baed63182bd08519c", + "eff3ffc6dbef9ecae16baed63182bd08519c", + "eff3ffc6dbef9ecae16baed64292c62171b5084594", + "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", + "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/***/ }), +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***! + \*************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +var scheme = new Array(3).concat( + "e5f5e0a1d99b31a354", + "edf8e9bae4b374c476238b45", + "edf8e9bae4b374c47631a354006d2c", + "edf8e9c7e9c0a1d99b74c47631a354006d2c", + "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", + "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", + "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/lab.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/lab.js ***! - \************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -function lab(start, end) { - var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), - a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), - b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} +var scheme = new Array(3).concat( + "f0f0f0bdbdbd636363", + "f7f7f7cccccc969696525252", + "f7f7f7cccccc969696636363252525", + "f7f7f7d9d9d9bdbdbd969696636363252525", + "f7f7f7d9d9d9bdbdbd969696737373525252252525", + "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", + "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/number.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/number.js ***! - \***************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js": +/*!**************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***! + \**************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a = +a, b = +b, function(t) { - return a * (1 - t) + b * t; - }; -}); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/***/ }), -/***/ "./node_modules/d3-interpolate/src/numberArray.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-interpolate/src/numberArray.js ***! - \********************************************************/ -/*! exports provided: default, isNumberArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; }); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - if (!b) b = []; - var n = a ? Math.min(b.length, a.length) : 0, - c = b.slice(), - i; - return function(t) { - for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; - return c; - }; -}); +var scheme = new Array(3).concat( + "fee6cefdae6be6550d", + "feeddefdbe85fd8d3cd94701", + "feeddefdbe85fd8d3ce6550da63603", + "feeddefdd0a2fdae6bfd8d3ce6550da63603", + "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", + "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", + "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function isNumberArray(x) { - return ArrayBuffer.isView(x) && !(x instanceof DataView); -} +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/object.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/object.js ***! - \***************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js": +/*!**************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***! + \**************************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var i = {}, - c = {}, - k; - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - for (k in b) { - if (k in a) { - i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); - } else { - c[k] = b[k]; - } - } +var scheme = new Array(3).concat( + "efedf5bcbddc756bb1", + "f2f0f7cbc9e29e9ac86a51a3", + "f2f0f7cbc9e29e9ac8756bb154278f", + "f2f0f7dadaebbcbddc9e9ac8756bb154278f", + "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", + "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", + "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -}); +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/piecewise.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-interpolate/src/piecewise.js ***! - \******************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***! + \***********************************************************************/ +/*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); -function piecewise(interpolate, values) { - var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); - while (i < n) I[i] = interpolate(v, v = values[++i]); - return function(t) { - var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); - return I[i](t - i); - }; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); + + + +var scheme = new Array(3).concat( + "fee0d2fc9272de2d26", + "fee5d9fcae91fb6a4acb181d", + "fee5d9fcae91fb6a4ade2d26a50f15", + "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", + "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", + "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", + "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" +).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), -/***/ "./node_modules/d3-interpolate/src/quantize.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-interpolate/src/quantize.js ***! - \*****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/array.js": +/*!********************************************!*\ + !*** ./node_modules/d3-scale/src/array.js ***! + \********************************************/ +/*! exports provided: map, slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var array = Array.prototype; + +var map = array.map; +var slice = array.slice; /***/ }), -/***/ "./node_modules/d3-interpolate/src/rgb.js": -/*!************************************************!*\ - !*** ./node_modules/d3-interpolate/src/rgb.js ***! - \************************************************/ -/*! exports provided: default, rgbBasis, rgbBasisClosed */ +/***/ "./node_modules/d3-scale/src/band.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-scale/src/band.js ***! + \*******************************************/ +/*! exports provided: default, point */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js"); -/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return band; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js"); +function band() { + var scale = Object(_ordinal__WEBPACK_IMPORTED_MODULE_2__["default"])().unknown(undefined), + domain = scale.domain, + ordinalRange = scale.range, + range = [0, 1], + step, + bandwidth, + round = false, + paddingInner = 0, + paddingOuter = 0, + align = 0.5; -/* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { - var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); + delete scale.unknown; - function rgb(start, end) { - var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; + function rescale() { + var n = domain().length, + reverse = range[1] < range[0], + start = range[reverse - 0], + stop = range[1 - reverse]; + step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); + if (round) step = Math.floor(step); + start += (stop - start - step * (n - paddingInner)) * align; + bandwidth = step * (1 - paddingInner); + if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); + var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n).map(function(i) { return start + step * i; }); + return ordinalRange(reverse ? values.reverse() : values); } - rgb.gamma = rgbGamma; + scale.domain = function(_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; - return rgb; -})(1)); + scale.range = function(_) { + return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice(); + }; -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color; - for (i = 0; i < n; ++i) { - color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); - r[i] = color.r || 0; - g[i] = color.g || 0; - b[i] = color.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color.opacity = 1; - return function(t) { - color.r = r(t); - color.g = g(t); - color.b = b(t); - return color + ""; - }; + scale.rangeRound = function(_) { + return range = [+_[0], +_[1]], round = true, rescale(); }; -} -var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]); -var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]); + scale.bandwidth = function() { + return bandwidth; + }; + scale.step = function() { + return step; + }; -/***/ }), + scale.round = function(_) { + return arguments.length ? (round = !!_, rescale()) : round; + }; -/***/ "./node_modules/d3-interpolate/src/round.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/round.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + scale.padding = function(_) { + return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return a = +a, b = +b, function(t) { - return Math.round(a * (1 - t) + b * t); + scale.paddingInner = function(_) { + return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; }; -}); + scale.paddingOuter = function(_) { + return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; + }; -/***/ }), + scale.align = function(_) { + return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; + }; -/***/ "./node_modules/d3-interpolate/src/string.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-interpolate/src/string.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + scale.copy = function() { + return band(domain(), range) + .round(round) + .paddingInner(paddingInner) + .paddingOuter(paddingOuter) + .align(align); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); + return _init__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(rescale(), arguments); +} +function pointish(scale) { + var copy = scale.copy; -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, - reB = new RegExp(reA.source, "g"); + scale.padding = scale.paddingOuter; + delete scale.paddingInner; + delete scale.paddingOuter; -function zero(b) { - return function() { - return b; + scale.copy = function() { + return pointish(copy()); }; -} -function one(b) { - return function(t) { - return b(t) + ""; - }; + return scale; } -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators +function point() { + return pointish(band.apply(null, arguments).paddingInner(1)); +} - // Coerce inputs to strings. - a = a + "", b = b + ""; - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); - } - bi = reB.lastIndex; - } +/***/ }), - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } +/***/ "./node_modules/d3-scale/src/constant.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-scale/src/constant.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; }); /***/ }), -/***/ "./node_modules/d3-interpolate/src/transform/decompose.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! - \****************************************************************/ -/*! exports provided: identity, default */ +/***/ "./node_modules/d3-scale/src/continuous.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-scale/src/continuous.js ***! + \*************************************************/ +/*! exports provided: identity, copy, transformer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); -var degrees = 180 / Math.PI; - -var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return continuous; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-scale/src/constant.js"); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -}); -/***/ }), -/***/ "./node_modules/d3-interpolate/src/transform/index.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/index.js ***! - \************************************************************/ -/*! exports provided: interpolateTransformCss, interpolateTransformSvg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "./node_modules/d3-interpolate/src/transform/parse.js"); +var unit = [0, 1]; +function identity(x) { + return x; +} -function interpolateTransform(parse, pxComma, pxParen, degParen) { +function normalize(a, b) { + return (b -= (a = +a)) + ? function(x) { return (x - a) / b; } + : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(isNaN(b) ? NaN : 0.5); +} - function pop(s) { - return s.length ? s.pop() + " " : ""; - } +function clamper(domain) { + var a = domain[0], b = domain[domain.length - 1], t; + if (a > b) t = a, a = b, b = t; + return function(x) { return Math.max(a, Math.min(b, x)); }; +} - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } +// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. +// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. +function bimap(domain, range, interpolate) { + var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; + if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); + else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); + return function(x) { return r0(d0(x)); }; +} - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } +function polymap(domain, range, interpolate) { + var j = Math.min(domain.length, range.length) - 1, + d = new Array(j), + r = new Array(j), + i = -1; - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } + // Reverse descending domains. + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); } - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } + while (++i < j) { + d[i] = normalize(domain[i], domain[i + 1]); + r[i] = interpolate(range[i], range[i + 1]); } - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; + return function(x) { + var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1, j) - 1; + return r[i](d[i](x)); }; } -var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); +function copy(source, target) { + return target + .domain(source.domain()) + .range(source.range()) + .interpolate(source.interpolate()) + .clamp(source.clamp()) + .unknown(source.unknown()); +} +function transformer() { + var domain = unit, + range = unit, + interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolate"], + transform, + untransform, + unknown, + clamp = identity, + piecewise, + output, + input; -/***/ }), + function rescale() { + piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap; + output = input = null; + return scale; + } -/***/ "./node_modules/d3-interpolate/src/transform/parse.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! - \************************************************************/ -/*! exports provided: parseCss, parseSvg */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function scale(x) { + return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); -/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "./node_modules/d3-interpolate/src/transform/decompose.js"); + scale.invert = function(y) { + return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"])))(y))); + }; + scale.domain = function(_) { + return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__["default"]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice(); + }; -var cssNode, - cssRoot, - cssView, - svgNode; + scale.range = function(_) { + return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), rescale()) : range.slice(); + }; -function parseCss(value) { - if (value === "none") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; - cssNode.style.transform = value; - value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); - cssRoot.removeChild(cssNode); - value = value.slice(7, -1).split(","); - return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); + scale.rangeRound = function(_) { + return range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRound"], rescale(); + }; + + scale.clamp = function(_) { + return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity; + }; + + scale.interpolate = function(_) { + return arguments.length ? (interpolate = _, rescale()) : interpolate; + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + + return function(t, u) { + transform = t, untransform = u; + return rescale(); + }; } -function parseSvg(value) { - if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; - value = value.matrix; - return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); +function continuous(transform, untransform) { + return transformer()(transform, untransform); } /***/ }), -/***/ "./node_modules/d3-interpolate/src/value.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-interpolate/src/value.js ***! - \**************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/diverging.js": +/*!************************************************!*\ + !*** ./node_modules/d3-scale/src/diverging.js ***! + \************************************************/ +/*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js"); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js"); -/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js"); -/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js"); -/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js"); -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js"); -/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return diverging; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingLog", function() { return divergingLog; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSymlog", function() { return divergingSymlog; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingPow", function() { return divergingPow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSqrt", function() { return divergingSqrt; }); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); +/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js"); +/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); +/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); @@ -18682,4653 +16182,5023 @@ __webpack_require__.r(__webpack_exports__); +function transformer() { + var x0 = 0, + x1 = 0.5, + x2 = 1, + t0, + t1, + t2, + k10, + k21, + interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"], + transform, + clamp = false, + unknown; -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b) - : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"] - : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"]) - : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"] - : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"] - : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"] - : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"] - : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"] - : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); -}); + function scale(x) { + return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); + } + scale.domain = function(_) { + return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2]; + }; -/***/ }), + scale.clamp = function(_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; -/***/ "./node_modules/d3-interpolate/src/zoom.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-interpolate/src/zoom.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + scale.interpolator = function(_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -var rho = Math.SQRT2, - rho2 = 2, - rho4 = 4, - epsilon2 = 1e-12; + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; + return function(t) { + transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1); + return scale; + }; } -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; +function diverging() { + var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"])); + + scale.copy = function() { + return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, diverging()); + }; + + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); } -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); +function divergingLog() { + var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([0.1, 1, 10]); + + scale.copy = function() { + return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingLog()).base(scale.base()); + }; + + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); } -// p0 = [ux0, uy0, w0] -// p1 = [ux1, uy1, w1] -/* harmony default export */ __webpack_exports__["default"] = (function(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; +function divergingSymlog() { + var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_5__["symlogish"])(transformer()); - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - } - } + scale.copy = function() { + return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingSymlog()).constant(scale.constant()); + }; - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - } - } + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} - i.duration = S * 1000; +function divergingPow() { + var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_6__["powish"])(transformer()); - return i; -}); + scale.copy = function() { + return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingPow()).exponent(scale.exponent()); + }; + + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} + +function divergingSqrt() { + return divergingPow.apply(null, arguments).exponent(0.5); +} /***/ }), -/***/ "./node_modules/d3-path/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-path/src/index.js ***! - \*******************************************/ -/*! exports provided: path */ +/***/ "./node_modules/d3-scale/src/identity.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-scale/src/identity.js ***! + \***********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-path/src/path.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return identity; }); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js"); + + + +function identity(domain) { + var unknown; + + function scale(x) { + return isNaN(x = +x) ? unknown : x; + } + + scale.invert = scale; + + scale.domain = scale.range = function(_) { + return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_2__["default"]), scale) : domain.slice(); + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function() { + return identity(domain).unknown(unknown); + }; + + domain = arguments.length ? _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(domain, _number__WEBPACK_IMPORTED_MODULE_2__["default"]) : [0, 1]; + + return Object(_linear__WEBPACK_IMPORTED_MODULE_1__["linearish"])(scale); +} /***/ }), -/***/ "./node_modules/d3-path/src/path.js": -/*!******************************************!*\ - !*** ./node_modules/d3-path/src/path.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-scale/src/index.js ***! + \********************************************/ +/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -var pi = Math.PI, - tau = 2 * pi, - epsilon = 1e-6, - tauEpsilon = tau - epsilon; +/* harmony import */ var _band__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band */ "./node_modules/d3-scale/src/band.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -function Path() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["point"]; }); -function path() { - return new Path; -} +/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-scale/src/identity.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return _identity__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -Path.prototype = path.prototype = { - constructor: Path, - moveTo: function(x, y) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); - }, - closePath: function() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - }, - lineTo: function(x, y) { - this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); - }, - quadraticCurveTo: function(x1, y1, x, y) { - this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { - this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - arcTo: function(x1, y1, x2, y2, r) { - x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; - var x0 = this._x1, - y0 = this._y1, - x21 = x2 - x1, - y21 = y2 - y1, - x01 = x0 - x1, - y01 = y0 - y1, - l01_2 = x01 * x01 + y01 * y01; +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return _linear__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); +/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return _log__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - // Is this path empty? Move to (x1,y1). - if (this._x1 === null) { - this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); - } +/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return _symlog__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. - else if (!(l01_2 > epsilon)); +/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? - // Equivalently, is (x1,y1) coincident with (x2,y2)? - // Or, is the radius zero? Line to (x1,y1). - else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { - this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["implicit"]; }); - // Otherwise, draw an arc! - else { - var x20 = x2 - x0, - y20 = y2 - y0, - l21_2 = x21 * x21 + y21 * y21, - l20_2 = x20 * x20 + y20 * y20, - l21 = Math.sqrt(l21_2), - l01 = Math.sqrt(l01_2), - l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), - t01 = l / l01, - t21 = l / l21; +/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - // If the start tangent is not coincident with (x0,y0), line to. - if (Math.abs(t01 - 1) > epsilon) { - this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["sqrt"]; }); - this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); - } - }, - arc: function(x, y, r, a0, a1, ccw) { - x = +x, y = +y, r = +r, ccw = !!ccw; - var dx = r * Math.cos(a0), - dy = r * Math.sin(a0), - x0 = x + dx, - y0 = y + dy, - cw = 1 ^ ccw, - da = ccw ? a0 - a1 : a1 - a0; +/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-scale/src/quantile.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return _quantile__WEBPACK_IMPORTED_MODULE_7__["default"]; }); - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); +/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantize */ "./node_modules/d3-scale/src/quantize.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return _quantize__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - // Is this path empty? Move to (x0,y0). - if (this._x1 === null) { - this._ += "M" + x0 + "," + y0; - } +/* harmony import */ var _threshold__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold */ "./node_modules/d3-scale/src/threshold.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return _threshold__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { - this._ += "L" + x0 + "," + y0; - } +/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return _time__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - // Is this arc empty? We’re done. - if (!r) return; +/* harmony import */ var _utcTime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcTime */ "./node_modules/d3-scale/src/utcTime.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return _utcTime__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - // Does the angle go the wrong way? Flip the direction. - if (da < 0) da = da % tau + tau; +/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - // Is this a complete circle? Draw two arcs to complete the circle. - if (da > tauEpsilon) { - this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialLog"]; }); - // Is this arc non-empty? Draw an arc! - else if (da > epsilon) { - this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); - } - }, - rect: function(x, y, w, h) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; - }, - toString: function() { - return this._; - } -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialPow"]; }); -/* harmony default export */ __webpack_exports__["default"] = (path); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSqrt"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSymlog"]; }); -/***/ }), +/* harmony import */ var _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequentialQuantile */ "./node_modules/d3-scale/src/sequentialQuantile.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/***/ "./node_modules/d3-polygon/src/area.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-polygon/src/area.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _diverging__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging */ "./node_modules/d3-scale/src/diverging.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { - var i = -1, - n = polygon.length, - a, - b = polygon[n - 1], - area = 0; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingLog"]; }); - while (++i < n) { - a = b; - b = polygon[i]; - area += a[1] * b[0] - a[0] * b[1]; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingPow"]; }); - return area / 2; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSqrt"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSymlog"]; }); + +/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return _tickFormat__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/***/ }), -/***/ "./node_modules/d3-polygon/src/centroid.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-polygon/src/centroid.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { - var i = -1, - n = polygon.length, - x = 0, - y = 0, - a, - b = polygon[n - 1], - c, - k = 0; - while (++i < n) { - a = b; - b = polygon[i]; - k += c = a[0] * b[1] - b[0] * a[1]; - x += (a[0] + b[0]) * c; - y += (a[1] + b[1]) * c; - } - return k *= 3, [x / k, y / k]; -}); -/***/ }), -/***/ "./node_modules/d3-polygon/src/contains.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-polygon/src/contains.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { - var n = polygon.length, - p = polygon[n - 1], - x = point[0], y = point[1], - x0 = p[0], y0 = p[1], - x1, y1, - inside = false; - for (var i = 0; i < n; ++i) { - p = polygon[i], x1 = p[0], y1 = p[1]; - if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; - x0 = x1, y0 = y1; - } - return inside; -}); -/***/ }), -/***/ "./node_modules/d3-polygon/src/cross.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-polygon/src/cross.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of -// the 3D cross product in a quadrant I Cartesian coordinate system (+x is -// right, +y is up). Returns a positive value if ABC is counter-clockwise, -// negative if clockwise, and zero if the points are collinear. -/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); -}); -/***/ }), -/***/ "./node_modules/d3-polygon/src/hull.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-polygon/src/hull.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ "./node_modules/d3-polygon/src/cross.js"); -function lexicographicOrder(a, b) { - return a[0] - b[0] || a[1] - b[1]; -} -// Computes the upper convex hull per the monotone chain algorithm. -// Assumes points.length >= 3, is sorted by x, unique in y. -// Returns an array of indices into points in left-to-right order. -function computeUpperHullIndexes(points) { - var n = points.length, - indexes = [0, 1], - size = 2; - for (var i = 2; i < n; ++i) { - while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__["default"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; - indexes[size++] = i; - } - return indexes.slice(0, size); // remove popped points -} -/* harmony default export */ __webpack_exports__["default"] = (function(points) { - if ((n = points.length) < 3) return null; - var i, - n, - sortedPoints = new Array(n), - flippedPoints = new Array(n); - for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; - sortedPoints.sort(lexicographicOrder); - for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; - var upperIndexes = computeUpperHullIndexes(sortedPoints), - lowerIndexes = computeUpperHullIndexes(flippedPoints); - // Construct the hull polygon, removing possible duplicate endpoints. - var skipLeft = lowerIndexes[0] === upperIndexes[0], - skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], - hull = []; - // Add upper hull in right-to-l order. - // Then add lower hull in left-to-right order. - for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); - for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); - return hull; -}); /***/ }), -/***/ "./node_modules/d3-polygon/src/index.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-polygon/src/index.js ***! - \**********************************************/ -/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */ +/***/ "./node_modules/d3-scale/src/init.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-scale/src/init.js ***! + \*******************************************/ +/*! exports provided: initRange, initInterpolator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-polygon/src/area.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initRange", function() { return initRange; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initInterpolator", function() { return initInterpolator; }); +function initRange(domain, range) { + switch (arguments.length) { + case 0: break; + case 1: this.range(domain); break; + default: this.range(range).domain(domain); break; + } + return this; +} + +function initInterpolator(domain, interpolator) { + switch (arguments.length) { + case 0: break; + case 1: this.interpolator(domain); break; + default: this.interpolator(interpolator).domain(domain); break; + } + return this; +} + + +/***/ }), + +/***/ "./node_modules/d3-scale/src/linear.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-scale/src/linear.js ***! + \*********************************************/ +/*! exports provided: linearish, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearish", function() { return linearish; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js"); -/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-polygon/src/centroid.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ "./node_modules/d3-polygon/src/hull.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-polygon/src/contains.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-polygon/src/length.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +function linearish(scale) { + var domain = scale.domain; + scale.ticks = function(count) { + var d = domain(); + return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count); + }; + scale.tickFormat = function(count, specifier) { + var d = domain(); + return Object(_tickFormat__WEBPACK_IMPORTED_MODULE_3__["default"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + scale.nice = function(count) { + if (count == null) count = 10; + var d = domain(), + i0 = 0, + i1 = d.length - 1, + start = d[i0], + stop = d[i1], + step; + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); -/***/ }), + if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); + } -/***/ "./node_modules/d3-polygon/src/length.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-polygon/src/length.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (step > 0) { + d[i0] = Math.floor(start / step) * step; + d[i1] = Math.ceil(stop / step) * step; + domain(d); + } else if (step < 0) { + d[i0] = Math.ceil(start * step) / step; + d[i1] = Math.floor(stop * step) / step; + domain(d); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(polygon) { - var i = -1, - n = polygon.length, - b = polygon[n - 1], - xa, - ya, - xb = b[0], - yb = b[1], - perimeter = 0; + return scale; + }; - while (++i < n) { - xa = xb; - ya = yb; - b = polygon[i]; - xb = b[0]; - yb = b[1]; - xa -= xb; - ya -= yb; - perimeter += Math.sqrt(xa * xa + ya * ya); - } + return scale; +} - return perimeter; -}); +function linear() { + var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]); + + scale.copy = function() { + return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, linear()); + }; + + _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); + + return linearish(scale); +} /***/ }), -/***/ "./node_modules/d3-quadtree/src/add.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-quadtree/src/add.js ***! - \*********************************************/ -/*! exports provided: default, addAll */ +/***/ "./node_modules/d3-scale/src/log.js": +/*!******************************************!*\ + !*** ./node_modules/d3-scale/src/log.js ***! + \******************************************/ +/*! exports provided: loggish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAll", function() { return addAll; }); -/* harmony default export */ __webpack_exports__["default"] = (function(d) { - var x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loggish", function() { return loggish; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); +/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; +function transformLog(x) { + return Math.log(x); } -function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; +function transformExp(x) { + return Math.exp(x); +} - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } +function transformLogn(x) { + return -Math.log(-x); +} - // If there were no (valid) points, abort. - if (x0 > x1 || y0 > y1) return this; +function transformExpn(x) { + return -Math.exp(-x); +} - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); +function pow10(x) { + return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; +} - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } +function powp(base) { + return base === 10 ? pow10 + : base === Math.E ? Math.exp + : function(x) { return Math.pow(base, x); }; +} - return this; +function logp(base) { + return base === Math.E ? Math.log + : base === 10 && Math.log10 + || base === 2 && Math.log2 + || (base = Math.log(base), function(x) { return Math.log(x) / base; }); } +function reflect(f) { + return function(x) { + return -f(-x); + }; +} -/***/ }), +function loggish(transform) { + var scale = transform(transformLog, transformExp), + domain = scale.domain, + base = 10, + logs, + pows; -/***/ "./node_modules/d3-quadtree/src/cover.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-quadtree/src/cover.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function rescale() { + logs = logp(base), pows = powp(base); + if (domain()[0] < 0) { + logs = reflect(logs), pows = reflect(pows); + transform(transformLogn, transformExpn); + } else { + transform(transformLog, transformExp); + } + return scale; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points + scale.base = function(_) { + return arguments.length ? (base = +_, rescale()) : base; + }; - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; + scale.domain = function(_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } + scale.ticks = function(count) { + var d = domain(), + u = d[0], + v = d[d.length - 1], + r; - // Otherwise, double repeatedly to cover. - else { - var z = x1 - x0, - node = this._root, - parent, - i; + if (r = v < u) i = u, u = v, v = i; - while (x0 > x || x >= x1 || y0 > y || y >= y1) { - i = (y < y0) << 1 | (x < x0); - parent = new Array(4), parent[i] = node, node = parent, z *= 2; - switch (i) { - case 0: x1 = x0 + z, y1 = y0 + z; break; - case 1: x0 = x1 - z, y1 = y0 + z; break; - case 2: x1 = x0 + z, y0 = y1 - z; break; - case 3: x0 = x1 - z, y0 = y1 - z; break; + var i = logs(u), + j = logs(v), + p, + k, + t, + n = count == null ? 10 : +count, + z = []; + + if (!(base % 1) && j - i < n) { + i = Math.round(i) - 1, j = Math.round(j) + 1; + if (u > 0) for (; i < j; ++i) { + for (k = 1, p = pows(i); k < base; ++k) { + t = p * k; + if (t < u) continue; + if (t > v) break; + z.push(t); + } + } else for (; i < j; ++i) { + for (k = base - 1, p = pows(i); k >= 1; --k) { + t = p * k; + if (t < u) continue; + if (t > v) break; + z.push(t); + } } + } else { + z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(i, j, Math.min(j - i, n)).map(pows); } - if (this._root && this._root.length) this._root = node; - } + return r ? z.reverse() : z; + }; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -}); + scale.tickFormat = function(count, specifier) { + if (specifier == null) specifier = base === 10 ? ".0e" : ","; + if (typeof specifier !== "function") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); + if (count === Infinity) return specifier; + if (count == null) count = 10; + var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? + return function(d) { + var i = d / pows(Math.round(logs(d))); + if (i * base < base - 0.5) i *= base; + return i <= k ? specifier(d) : ""; + }; + }; + + scale.nice = function() { + return domain(Object(_nice__WEBPACK_IMPORTED_MODULE_2__["default"])(domain(), { + floor: function(x) { return pows(Math.floor(logs(x))); }, + ceil: function(x) { return pows(Math.ceil(logs(x))); } + })); + }; + + return scale; +} + +function log() { + var scale = loggish(Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["transformer"])()).domain([1, 10]); + + scale.copy = function() { + return Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, log()).base(scale.base()); + }; + + _init__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(scale, arguments); + + return scale; +} /***/ }), -/***/ "./node_modules/d3-quadtree/src/data.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-quadtree/src/data.js ***! - \**********************************************/ +/***/ "./node_modules/d3-scale/src/nice.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-scale/src/nice.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; +/* harmony default export */ __webpack_exports__["default"] = (function(domain, interval) { + domain = domain.slice(); + + var i0 = 0, + i1 = domain.length - 1, + x0 = domain[i0], + x1 = domain[i1], + t; + + if (x1 < x0) { + t = i0, i0 = i1, i1 = t; + t = x0, x0 = x1, x1 = t; + } + + domain[i0] = interval.floor(x0); + domain[i1] = interval.ceil(x1); + return domain; }); /***/ }), -/***/ "./node_modules/d3-quadtree/src/extent.js": -/*!************************************************!*\ - !*** ./node_modules/d3-quadtree/src/extent.js ***! - \************************************************/ +/***/ "./node_modules/d3-scale/src/number.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-scale/src/number.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return +x; }); /***/ }), -/***/ "./node_modules/d3-quadtree/src/find.js": +/***/ "./node_modules/d3-scale/src/ordinal.js": /*!**********************************************!*\ - !*** ./node_modules/d3-quadtree/src/find.js ***! + !*** ./node_modules/d3-scale/src/ordinal.js ***! \**********************************************/ -/*! exports provided: default */ +/*! exports provided: implicit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "implicit", function() { return implicit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ordinal; }); +/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - while (q = quads.pop()) { - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - quads.push( - new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[3], xm, ym, x2, y2), - new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[2], x1, ym, xm, y2), - new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[1], xm, y1, x2, ym), - new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[0], x1, y1, xm, ym) - ); +var implicit = {name: "implicit"}; - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } +function ordinal() { + var index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])(), + domain = [], + range = [], + unknown = implicit; - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } + function scale(d) { + var key = d + "", i = index.get(key); + if (!i) { + if (unknown !== implicit) return unknown; + index.set(key, i = domain.push(d)); } + return range[(i - 1) % range.length]; } - return data; -}); - - -/***/ }), - -/***/ "./node_modules/d3-quadtree/src/index.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-quadtree/src/index.js ***! - \***********************************************/ -/*! exports provided: quadtree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ "./node_modules/d3-quadtree/src/quadtree.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - + scale.domain = function(_) { + if (!arguments.length) return domain.slice(); + domain = [], index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])(); + var i = -1, n = _.length, d, key; + while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d)); + return scale; + }; + scale.range = function(_) { + return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), scale) : range.slice(); + }; + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; -/***/ }), + scale.copy = function() { + return ordinal(domain, range).unknown(unknown); + }; -/***/ "./node_modules/d3-quadtree/src/quad.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-quadtree/src/quad.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -}); + return scale; +} /***/ }), -/***/ "./node_modules/d3-quadtree/src/quadtree.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-quadtree/src/quadtree.js ***! - \**************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/pow.js": +/*!******************************************!*\ + !*** ./node_modules/d3-scale/src/pow.js ***! + \******************************************/ +/*! exports provided: powish, default, sqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quadtree; }); -/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/d3-quadtree/src/add.js"); -/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ "./node_modules/d3-quadtree/src/cover.js"); -/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ "./node_modules/d3-quadtree/src/data.js"); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "./node_modules/d3-quadtree/src/extent.js"); -/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "./node_modules/d3-quadtree/src/find.js"); -/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-quadtree/src/remove.js"); -/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ "./node_modules/d3-quadtree/src/root.js"); -/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ "./node_modules/d3-quadtree/src/size.js"); -/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ "./node_modules/d3-quadtree/src/visit.js"); -/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ "./node_modules/d3-quadtree/src/visitAfter.js"); -/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ "./node_modules/d3-quadtree/src/x.js"); -/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ "./node_modules/d3-quadtree/src/y.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "powish", function() { return powish; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +function transformPow(exponent) { + return function(x) { + return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); + }; +} +function transformSqrt(x) { + return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); +} +function transformSquare(x) { + return x < 0 ? -x * x : x * x; +} +function powish(transform) { + var scale = transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]), + exponent = 1; + function rescale() { + return exponent === 1 ? transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]) + : exponent === 0.5 ? transform(transformSqrt, transformSquare) + : transform(transformPow(exponent), transformPow(1 / exponent)); + } + scale.exponent = function(_) { + return arguments.length ? (exponent = +_, rescale()) : exponent; + }; + return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); +} +function pow() { + var scale = powish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); + scale.copy = function() { + return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, pow()).exponent(scale.exponent()); + }; -function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__["defaultX"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__["defaultY"] : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} + _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; + return scale; } -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; +function sqrt() { + return pow.apply(null, arguments).exponent(0.5); } -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__["default"]; -treeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__["addAll"]; -treeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__["default"]; -treeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__["default"]; -treeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]; -treeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__["default"]; -treeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__["default"]; -treeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__["removeAll"]; -treeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__["default"]; -treeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__["default"]; -treeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__["default"]; -treeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__["default"]; -treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"]; -treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - /***/ }), -/***/ "./node_modules/d3-quadtree/src/remove.js": -/*!************************************************!*\ - !*** ./node_modules/d3-quadtree/src/remove.js ***! - \************************************************/ -/*! exports provided: default, removeAll */ +/***/ "./node_modules/d3-scale/src/quantile.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-scale/src/quantile.js ***! + \***********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAll", function() { return removeAll; }); -/* harmony default export */ __webpack_exports__["default"] = (function(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; + +function quantile() { + var domain = [], + range = [], + thresholds = [], + unknown; + + function rescale() { + var i = 0, n = Math.max(1, range.length); + thresholds = new Array(n - 1); + while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantile"])(domain, i / n); + return scale; } - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; + function scale(x) { + return isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(thresholds, x)]; + } - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] : [ + i > 0 ? thresholds[i - 1] : domain[0], + i < thresholds.length ? thresholds[i] : domain[domain.length - 1] + ]; + }; - // If this is the root point, remove it. - if (!parent) return this._root = next, this; + scale.domain = function(_) { + if (!arguments.length) return domain.slice(); + domain = []; + for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d); + domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); + return rescale(); + }; - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; + scale.range = function(_) { + return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), rescale()) : range.slice(); + }; - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; - return this; -}); + scale.quantiles = function() { + return thresholds.slice(); + }; -function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; + scale.copy = function() { + return quantile() + .domain(domain) + .range(range) + .unknown(unknown); + }; + + return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); } /***/ }), -/***/ "./node_modules/d3-quadtree/src/root.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-quadtree/src/root.js ***! - \**********************************************/ +/***/ "./node_modules/d3-scale/src/quantize.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-scale/src/quantize.js ***! + \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return this._root; -}); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantize; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/***/ }), -/***/ "./node_modules/d3-quadtree/src/size.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-quadtree/src/size.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -}); +function quantize() { + var x0 = 0, + x1 = 1, + n = 1, + domain = [0.5], + range = [0, 1], + unknown; -/***/ }), + function scale(x) { + return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; + } -/***/ "./node_modules/d3-quadtree/src/visit.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-quadtree/src/visit.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function rescale() { + var i = -1; + domain = new Array(n); + while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); + return scale; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); + scale.domain = function(_) { + return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1]; + }; + scale.range = function(_) { + return arguments.length ? (n = (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)).length - 1, rescale()) : range.slice(); + }; -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); - } - } - return this; -}); + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] + : i < 1 ? [x0, domain[0]] + : i >= n ? [domain[n - 1], x1] + : [domain[i - 1], domain[i]]; + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : scale; + }; + + scale.thresholds = function() { + return domain.slice(); + }; + + scale.copy = function() { + return quantize() + .domain([x0, x1]) + .range(range) + .unknown(unknown); + }; + + return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(scale), arguments); +} /***/ }), -/***/ "./node_modules/d3-quadtree/src/visitAfter.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-quadtree/src/visitAfter.js ***! - \****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/sequential.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-scale/src/sequential.js ***! + \*************************************************/ +/*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequential; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialLog", function() { return sequentialLog; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSymlog", function() { return sequentialSymlog; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialPow", function() { return sequentialPow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSqrt", function() { return sequentialSqrt; }); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); +/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); +/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -}); -/***/ }), -/***/ "./node_modules/d3-quadtree/src/x.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-quadtree/src/x.js ***! - \*******************************************/ -/*! exports provided: defaultX, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultX", function() { return defaultX; }); -function defaultX(d) { - return d[0]; -} -/* harmony default export */ __webpack_exports__["default"] = (function(_) { - return arguments.length ? (this._x = _, this) : this._x; -}); +function transformer() { + var x0 = 0, + x1 = 1, + t0, + t1, + k10, + transform, + interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"], + clamp = false, + unknown; + function scale(x) { + return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); + } -/***/ }), + scale.domain = function(_) { + return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; + }; -/***/ "./node_modules/d3-quadtree/src/y.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-quadtree/src/y.js ***! - \*******************************************/ -/*! exports provided: defaultY, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + scale.clamp = function(_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultY", function() { return defaultY; }); -function defaultY(d) { - return d[1]; + scale.interpolator = function(_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + + return function(t) { + transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); + return scale; + }; } -/* harmony default export */ __webpack_exports__["default"] = (function(_) { - return arguments.length ? (this._y = _, this) : this._y; -}); +function copy(source, target) { + return target + .domain(source.domain()) + .interpolator(source.interpolator()) + .clamp(source.clamp()) + .unknown(source.unknown()); +} +function sequential() { + var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"])); -/***/ }), + scale.copy = function() { + return copy(scale, sequential()); + }; -/***/ "./node_modules/d3-random/src/bates.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-random/src/bates.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); -/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js"); +function sequentialLog() { + var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([1, 10]); + scale.copy = function() { + return copy(scale, sequentialLog()).base(scale.base()); + }; + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBates(source) { - function randomBates(n) { - var randomIrwinHall = _irwinHall__WEBPACK_IMPORTED_MODULE_1__["default"].source(source)(n); - return function() { - return randomIrwinHall() / n; - }; - } +function sequentialSymlog() { + var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_4__["symlogish"])(transformer()); - randomBates.source = sourceRandomBates; + scale.copy = function() { + return copy(scale, sequentialSymlog()).constant(scale.constant()); + }; - return randomBates; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} +function sequentialPow() { + var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_5__["powish"])(transformer()); -/***/ }), + scale.copy = function() { + return copy(scale, sequentialPow()).exponent(scale.exponent()); + }; -/***/ "./node_modules/d3-random/src/defaultSource.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-random/src/defaultSource.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return Math.random(); -}); +function sequentialSqrt() { + return sequentialPow.apply(null, arguments).exponent(0.5); +} /***/ }), -/***/ "./node_modules/d3-random/src/exponential.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-random/src/exponential.js ***! - \***************************************************/ +/***/ "./node_modules/d3-scale/src/sequentialQuantile.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***! + \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequentialQuantile; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomExponential(source) { - function randomExponential(lambda) { - return function() { - return -Math.log(1 - source()) / lambda; - }; + + +function sequentialQuantile() { + var domain = [], + interpolator = _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]; + + function scale(x) { + if (!isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x) - 1) / (domain.length - 1)); } - randomExponential.source = sourceRandomExponential; + scale.domain = function(_) { + if (!arguments.length) return domain.slice(); + domain = []; + for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d); + domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); + return scale; + }; - return randomExponential; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); + scale.interpolator = function(_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + + scale.copy = function() { + return sequentialQuantile(interpolator).domain(domain); + }; + + return _init__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); +} /***/ }), -/***/ "./node_modules/d3-random/src/index.js": +/***/ "./node_modules/d3-scale/src/symlog.js": /*!*********************************************!*\ - !*** ./node_modules/d3-random/src/index.js ***! + !*** ./node_modules/d3-scale/src/symlog.js ***! \*********************************************/ -/*! exports provided: randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential */ +/*! exports provided: symlogish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _uniform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform */ "./node_modules/d3-random/src/uniform.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return _uniform__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return _normal__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symlogish", function() { return symlogish; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symlog; }); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _logNormal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logNormal */ "./node_modules/d3-random/src/logNormal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return _logNormal__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _bates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bates */ "./node_modules/d3-random/src/bates.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return _bates__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return _irwinHall__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var _exponential__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exponential */ "./node_modules/d3-random/src/exponential.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return _exponential__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +function transformSymlog(c) { + return function(x) { + return Math.sign(x) * Math.log1p(Math.abs(x / c)); + }; +} +function transformSymexp(c) { + return function(x) { + return Math.sign(x) * Math.expm1(Math.abs(x)) * c; + }; +} +function symlogish(transform) { + var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); + scale.constant = function(_) { + return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; + }; + return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); +} +function symlog() { + var scale = symlogish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); + scale.copy = function() { + return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, symlog()).constant(scale.constant()); + }; + return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); +} /***/ }), -/***/ "./node_modules/d3-random/src/irwinHall.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-random/src/irwinHall.js ***! - \*************************************************/ +/***/ "./node_modules/d3-scale/src/threshold.js": +/*!************************************************!*\ + !*** ./node_modules/d3-scale/src/threshold.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return threshold; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomIrwinHall(source) { - function randomIrwinHall(n) { - return function() { - for (var sum = 0, i = 0; i < n; ++i) sum += source(); - return sum; - }; + + +function threshold() { + var domain = [0.5], + range = [0, 1], + unknown, + n = 1; + + function scale(x) { + return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; } - randomIrwinHall.source = sourceRandomIrwinHall; + scale.domain = function(_) { + return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); + }; - return randomIrwinHall; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); + scale.range = function(_) { + return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); + }; + + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return [domain[i - 1], domain[i]]; + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + + scale.copy = function() { + return threshold() + .domain(domain) + .range(range) + .unknown(unknown); + }; + + return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); +} /***/ }), -/***/ "./node_modules/d3-random/src/logNormal.js": +/***/ "./node_modules/d3-scale/src/tickFormat.js": /*!*************************************************!*\ - !*** ./node_modules/d3-random/src/logNormal.js ***! + !*** ./node_modules/d3-scale/src/tickFormat.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); -/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js"); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogNormal(source) { - function randomLogNormal() { - var randomNormal = _normal__WEBPACK_IMPORTED_MODULE_1__["default"].source(source).apply(this, arguments); - return function() { - return Math.exp(randomNormal()); - }; +/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count, specifier) { + var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, count), + precision; + specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatSpecifier"])(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionPrefix"])(step, value))) specifier.precision = precision; + return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatPrefix"])(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": { + if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionRound"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": { + if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionFixed"])(step))) specifier.precision = precision - (specifier.type === "%") * 2; + break; + } } - - randomLogNormal.source = sourceRandomLogNormal; - - return randomLogNormal; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); + return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); +}); /***/ }), -/***/ "./node_modules/d3-random/src/normal.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-random/src/normal.js ***! - \**********************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-scale/src/time.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-scale/src/time.js ***! + \*******************************************/ +/*! exports provided: calendar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calendar", function() { return calendar; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); +/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); +/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomNormal(source) { - function randomNormal(mu, sigma) { - var x, r; - mu = mu == null ? 0 : +mu; - sigma = sigma == null ? 1 : +sigma; - return function() { - var y; - // If available, use the second previously-generated uniform random. - if (x != null) y = x, x = null; - // Otherwise, generate a new x and y. - else do { - x = source() * 2 - 1; - y = source() * 2 - 1; - r = x * x + y * y; - } while (!r || r > 1); - return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); - }; - } - randomNormal.source = sourceRandomNormal; - return randomNormal; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); +var durationSecond = 1000, + durationMinute = durationSecond * 60, + durationHour = durationMinute * 60, + durationDay = durationHour * 24, + durationWeek = durationDay * 7, + durationMonth = durationDay * 30, + durationYear = durationDay * 365; -/***/ }), +function date(t) { + return new Date(t); +} -/***/ "./node_modules/d3-random/src/uniform.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-random/src/uniform.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function number(t) { + return t instanceof Date ? +t : +new Date(+t); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js"); +function calendar(year, month, week, day, hour, minute, second, millisecond, format) { + var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_4__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_4__["identity"]), + invert = scale.invert, + domain = scale.domain; + var formatMillisecond = format(".%L"), + formatSecond = format(":%S"), + formatMinute = format("%I:%M"), + formatHour = format("%I %p"), + formatDay = format("%a %d"), + formatWeek = format("%b %d"), + formatMonth = format("%B"), + formatYear = format("%Y"); -/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomUniform(source) { - function randomUniform(min, max) { - min = min == null ? 0 : +min; - max = max == null ? 1 : +max; - if (arguments.length === 1) max = min, min = 0; - else max -= min; - return function() { - return source() * max + min; - }; + var tickIntervals = [ + [second, 1, durationSecond], + [second, 5, 5 * durationSecond], + [second, 15, 15 * durationSecond], + [second, 30, 30 * durationSecond], + [minute, 1, durationMinute], + [minute, 5, 5 * durationMinute], + [minute, 15, 15 * durationMinute], + [minute, 30, 30 * durationMinute], + [ hour, 1, durationHour ], + [ hour, 3, 3 * durationHour ], + [ hour, 6, 6 * durationHour ], + [ hour, 12, 12 * durationHour ], + [ day, 1, durationDay ], + [ day, 2, 2 * durationDay ], + [ week, 1, durationWeek ], + [ month, 1, durationMonth ], + [ month, 3, 3 * durationMonth ], + [ year, 1, durationYear ] + ]; + + function tickFormat(date) { + return (second(date) < date ? formatMillisecond + : minute(date) < date ? formatSecond + : hour(date) < date ? formatMinute + : day(date) < date ? formatHour + : month(date) < date ? (week(date) < date ? formatDay : formatWeek) + : year(date) < date ? formatMonth + : formatYear)(date); } - randomUniform.source = sourceRandomUniform; + function tickInterval(interval, start, stop, step) { + if (interval == null) interval = 10; - return randomUniform; -})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"])); + // If a desired tick count is specified, pick a reasonable tick interval + // based on the extent of the domain and a rough estimate of tick size. + // Otherwise, assume interval is already a time interval and use it. + if (typeof interval === "number") { + var target = Math.abs(stop - start) / interval, + i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target); + if (i === tickIntervals.length) { + step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start / durationYear, stop / durationYear, interval); + interval = year; + } else if (i) { + i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; + step = i[1]; + interval = i[0]; + } else { + step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, interval), 1); + interval = millisecond; + } + } + return step == null ? interval : interval.every(step); + } -/***/ }), + scale.invert = function(y) { + return new Date(invert(y)); + }; -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js": -/*!*******************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + scale.domain = function(_) { + return arguments.length ? domain(_array__WEBPACK_IMPORTED_MODULE_3__["map"].call(_, number)) : domain().map(date); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); + scale.ticks = function(interval, step) { + var d = domain(), + t0 = d[0], + t1 = d[d.length - 1], + r = t1 < t0, + t; + if (r) t = t0, t0 = t1, t1 = t; + t = tickInterval(interval, t0, t1, step); + t = t ? t.range(t0, t1 + 1) : []; // inclusive stop + return r ? t.reverse() : t; + }; + scale.tickFormat = function(count, specifier) { + return specifier == null ? tickFormat : format(specifier); + }; -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")); + scale.nice = function(interval, step) { + var d = domain(); + return (interval = tickInterval(interval, d[0], d[d.length - 1], step)) + ? domain(Object(_nice__WEBPACK_IMPORTED_MODULE_6__["default"])(d, interval)) + : scale; + }; + + scale.copy = function() { + return Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); + }; + + return scale; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return _init__WEBPACK_IMPORTED_MODULE_5__["initRange"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__["timeYear"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMonth"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeWeek"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeDay"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeHour"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMinute"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeSecond"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js": -/*!******************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***! - \******************************************************************/ +/***/ "./node_modules/d3-scale/src/utcTime.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-scale/src/utcTime.js ***! + \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js"); +/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); +/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); +/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")); + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_time__WEBPACK_IMPORTED_MODULE_0__["calendar"])(d3_time__WEBPACK_IMPORTED_MODULE_2__["utcYear"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMonth"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcWeek"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcDay"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcHour"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMinute"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcSecond"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js": -/*!*******************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***! - \*******************************************************************/ +/***/ "./node_modules/d3-selection/src/constant.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-selection/src/constant.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js": -/*!********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***! - \********************************************************************/ +/***/ "./node_modules/d3-selection/src/create.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-selection/src/create.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js"); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")); + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + return Object(_select__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement)); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js": -/*!********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***! - \********************************************************************/ +/***/ "./node_modules/d3-selection/src/creator.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-selection/src/creator.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js"); +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")); + +function creatorInherit(name) { + return function() { + var document = this.ownerDocument, + uri = this.namespaceURI; + return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] + ? document.createElement(name) + : document.createElementNS(uri, name); + }; +} + +function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***! - \*****************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-selection/src/index.js": +/*!************************************************!*\ + !*** ./node_modules/d3-selection/src/index.js ***! + \************************************************/ +/*! exports provided: create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create */ "./node_modules/d3-selection/src/create.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local */ "./node_modules/d3-selection/src/local.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher */ "./node_modules/d3-selection/src/matcher.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouse */ "./node_modules/d3-selection/src/mouse.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return _point__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selectAll.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector */ "./node_modules/d3-selection/src/selector.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll */ "./node_modules/d3-selection/src/selectorAll.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style */ "./node_modules/d3-selection/src/selection/style.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; }); + +/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./touch */ "./node_modules/d3-selection/src/touch.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./touches */ "./node_modules/d3-selection/src/touches.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return _touches__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./window */ "./node_modules/d3-selection/src/window.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["event"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["customEvent"]; }); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***! - \**********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/categorical/category10.js": -/*!***********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***! - \***********************************************************************/ +/***/ "./node_modules/d3-selection/src/local.js": +/*!************************************************!*\ + !*** ./node_modules/d3-selection/src/local.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; }); +var nextId = 0; +function local() { + return new Local; +} -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")); +function Local() { + this._ = "@" + (++nextId).toString(36); +} + +Local.prototype = local.prototype = { + constructor: Local, + get: function(node) { + var id = this._; + while (!(id in node)) if (!(node = node.parentNode)) return; + return node[id]; + }, + set: function(node, value) { + return node[this._] = value; + }, + remove: function(node) { + return this._ in node && delete node[this._]; + }, + toString: function() { + return this._; + } +}; /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/colors.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/colors.js ***! - \*******************************************************/ +/***/ "./node_modules/d3-selection/src/matcher.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-selection/src/matcher.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(specifier) { - var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; - while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); - return colors; +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return function() { + return this.matches(selector); + }; }); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/mouse.js": +/*!************************************************!*\ + !*** ./node_modules/d3-selection/src/mouse.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); -var scheme = new Array(3).concat( - "d8b365f5f5f55ab4ac", - "a6611adfc27d80cdc1018571", - "a6611adfc27df5f5f580cdc1018571", - "8c510ad8b365f6e8c3c7eae55ab4ac01665e", - "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", - "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", - "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", - "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", - "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(node) { + var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])(); + if (event.changedTouches) event = event.changedTouches[0]; + return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, event); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/namespace.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-selection/src/namespace.js ***! + \****************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); -var scheme = new Array(3).concat( - "af8dc3f7f7f77fbf7b", - "7b3294c2a5cfa6dba0008837", - "7b3294c2a5cff7f7f7a6dba0008837", - "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", - "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", - "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", - "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", - "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", - "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/namespaces.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-selection/src/namespaces.js ***! + \*****************************************************/ +/*! exports provided: xhtml, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "e9a3c9f7f7f7a1d76a", - "d01c8bf1b6dab8e1864dac26", - "d01c8bf1b6daf7f7f7b8e1864dac26", - "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", - "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", - "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", - "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", - "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", - "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; }); +var xhtml = "http://www.w3.org/1999/xhtml"; -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = ({ + svg: "http://www.w3.org/2000/svg", + xhtml: xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/point.js": +/*!************************************************!*\ + !*** ./node_modules/d3-selection/src/point.js ***! + \************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony default export */ __webpack_exports__["default"] = (function(node, event) { + var svg = node.ownerSVGElement || node; -var scheme = new Array(3).concat( - "998ec3f7f7f7f1a340", - "5e3c99b2abd2fdb863e66101", - "5e3c99b2abd2f7f7f7fdb863e66101", - "542788998ec3d8daebfee0b6f1a340b35806", - "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", - "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", - "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", - "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", - "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/select.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-selection/src/select.js ***! + \*************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); -var scheme = new Array(3).concat( - "ef8a62f7f7f767a9cf", - "ca0020f4a58292c5de0571b0", - "ca0020f4a582f7f7f792c5de0571b0", - "b2182bef8a62fddbc7d1e5f067a9cf2166ac", - "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", - "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", - "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", - "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", - "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return typeof selector === "string" + ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement]) + : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***! - \***************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selectAll.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-selection/src/selectAll.js ***! + \****************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); -var scheme = new Array(3).concat( - "ef8a62ffffff999999", - "ca0020f4a582bababa404040", - "ca0020f4a582ffffffbababa404040", - "b2182bef8a62fddbc7e0e0e09999994d4d4d", - "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", - "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", - "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", - "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", - "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return typeof selector === "string" + ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([document.querySelectorAll(selector)], [document.documentElement]) + : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***! - \*****************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/append.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/append.js ***! + \***********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js"); -var scheme = new Array(3).concat( - "fc8d59ffffbf91bfdb", - "d7191cfdae61abd9e92c7bb6", - "d7191cfdae61ffffbfabd9e92c7bb6", - "d73027fc8d59fee090e0f3f891bfdb4575b4", - "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", - "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", - "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", - "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", - "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***! - \*****************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/attr.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/attr.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "fc8d59ffffbf91cf60", - "d7191cfdae61a6d96a1a9641", - "d7191cfdae61ffffbfa6d96a1a9641", - "d73027fc8d59fee08bd9ef8b91cf601a9850", - "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", - "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", - "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", - "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", - "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace */ "./node_modules/d3-selection/src/namespace.js"); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} -/***/ }), +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} -/***/ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js": -/*!*******************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***! - \*******************************************************************/ -/*! exports provided: scheme, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function attrConstant(name, value) { + return function() { + this.setAttribute(name, value); + }; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +function attrConstantNS(fullname, value) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value); + }; +} + +function attrFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttribute(name); + else this.setAttribute(name, v); + }; +} +function attrFunctionNS(fullname, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttributeNS(fullname.space, fullname.local); + else this.setAttributeNS(fullname.space, fullname.local, v); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); -var scheme = new Array(3).concat( - "fc8d59ffffbf99d594", - "d7191cfdae61abdda42b83ba", - "d7191cfdae61ffffbfabdda42b83ba", - "d53e4ffc8d59fee08be6f59899d5943288bd", - "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", - "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", - "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", - "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", - "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + if (arguments.length < 2) { + var node = this.node(); + return fullname.local + ? node.getAttributeNS(fullname.space, fullname.local) + : node.getAttribute(fullname); + } -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + return this.each((value == null + ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction) + : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/index.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/index.js ***! - \******************************************************/ -/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */ +/***/ "./node_modules/d3-selection/src/selection/call.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/call.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ "./node_modules/d3-scale-chromatic/src/categorical/category10.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - -/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - -/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; +}); -/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); +/***/ }), -/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +/***/ "./node_modules/d3-selection/src/selection/classed.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/classed.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +function classArray(string) { + return string.trim().split(/^|\s+/); +} -/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); +function classList(node) { + return node.classList || new ClassList(node); +} -/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +function ClassList(node) { + this._node = node; + this._names = classArray(node.getAttribute("class") || ""); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["scheme"]; }); +ClassList.prototype = { + add: function(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name) { + return this._names.indexOf(name) >= 0; + } +}; -/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); +function classedAdd(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.add(names[i]); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["scheme"]; }); +function classedRemove(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.remove(names[i]); +} -/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); +function classedTrue(names) { + return function() { + classedAdd(this, names); + }; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["scheme"]; }); +function classedFalse(names) { + return function() { + classedRemove(this, names); + }; +} -/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); +function classedFunction(names, value) { + return function() { + (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["scheme"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var names = classArray(name + ""); -/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + if (arguments.length < 2) { + var list = classList(this.node()), i = -1, n = names.length; + while (++i < n) if (!list.contains(names[i])) return false; + return true; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["scheme"]; }); + return this.each((typeof value === "function" + ? classedFunction : value + ? classedTrue + : classedFalse)(names, value)); +}); -/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["scheme"]; }); +/***/ }), -/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); +/***/ "./node_modules/d3-selection/src/selection/clone.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/clone.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["scheme"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +function selection_cloneShallow() { + var clone = this.cloneNode(false), parent = this.parentNode; + return parent ? parent.insertBefore(clone, this.nextSibling) : clone; +} -/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); +function selection_cloneDeep() { + var clone = this.cloneNode(true), parent = this.parentNode; + return parent ? parent.insertBefore(clone, this.nextSibling) : clone; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["scheme"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +}); -/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["scheme"]; }); +/***/ }), -/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); +/***/ "./node_modules/d3-selection/src/selection/data.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/data.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["scheme"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js"); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ "./node_modules/d3-selection/src/constant.js"); -/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["scheme"]; }); -/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["scheme"]; }); +var keyPrefix = "$"; // Protect against keys like “__proto__”. -/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); +function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, + node, + groupLength = group.length, + dataLength = data.length; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["scheme"]; }); + // Put any non-null nodes that fit into update. + // Put any null nodes into enter. + // Put any remaining data into enter. + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); + } + } -/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); + // Put any non-null nodes that don’t fit into exit. + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["scheme"]; }); +function bindKey(parent, group, enter, update, exit, data, key) { + var i, + node, + nodeByKeyValue = {}, + groupLength = group.length, + dataLength = data.length, + keyValues = new Array(groupLength), + keyValue; -/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); + // Compute the key for each node. + // If multiple nodes have the same key, the duplicates are added to exit. + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[keyValue] = node; + } + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["scheme"]; }); + // Compute the key for each datum. + // If there a node associated with this key, join and add it to update. + // If there is not (or the key is a duplicate), add it to enter. + for (i = 0; i < dataLength; ++i) { + keyValue = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } else { + enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); + } + } -/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); + // Add any remaining nodes that were not bound to data to exit. + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { + exit[i] = node; + } + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["scheme"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } -/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["scheme"]; }); + if (typeof value !== "function") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(value); -/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], + group = groups[j], + groupLength = group.length, + data = value.call(parent, parent && parent.__data__, j, parents), + dataLength = data.length, + enterGroup = enter[j] = new Array(dataLength), + updateGroup = update[j] = new Array(dataLength), + exitGroup = exit[j] = new Array(groupLength); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["scheme"]; }); + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); -/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); + // Now connect the enter nodes to their following update node, such that + // appendChild can insert the materialized enter node before this node, + // rather than at the end of the parent node. + for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { + if (previous = enterGroup[i0]) { + if (i0 >= i1) i1 = i0 + 1; + while (!(next = updateGroup[i1]) && ++i1 < dataLength); + previous._next = next || null; + } + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["scheme"]; }); + update = new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents); + update._enter = enter; + update._exit = exit; + return update; +}); -/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["scheme"]; }); +/***/ }), -/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); +/***/ "./node_modules/d3-selection/src/selection/datum.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/datum.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["scheme"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; +}); -/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["scheme"]; }); - -/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["scheme"]; }); - -/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["scheme"]; }); - -/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["scheme"]; }); - -/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["scheme"]; }); - -/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["scheme"]; }); - -/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); - -/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); - -/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["warm"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["cool"]; }); - -/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); - -/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); - -/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["magma"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["inferno"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["plasma"]; }); +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/dispatch.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/dispatch.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js"); +function dispatchEvent(node, type, params) { + var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node), + event = window.CustomEvent; + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window.document.createEvent("Event"); + if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else event.initEvent(type, false, false); + } + node.dispatchEvent(event); +} +function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; +} +function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (function(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); +}); +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/each.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/each.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { + if (node = group[i]) callback.call(node, node.__data__, i, group); + } + } + return this; +}); +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/empty.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/empty.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return !this.node(); +}); +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/enter.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/enter.js ***! + \**********************************************************/ +/*! exports provided: default, EnterNode */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; }); +/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); +}); +function EnterNode(parent, datum) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum; +} +EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, + insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, + querySelector: function(selector) { return this._parent.querySelector(selector); }, + querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } +}; +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/exit.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/exit.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); +}); +/***/ }), +/***/ "./node_modules/d3-selection/src/selection/filter.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/filter.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher */ "./node_modules/d3-selection/src/matcher.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(match) { + if (typeof match !== "function") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__["default"])(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/ramp.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***! - \*****************************************************/ +/***/ "./node_modules/d3-selection/src/selection/html.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/html.js ***! + \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +function htmlRemove() { + this.innerHTML = ""; +} + +function htmlConstant(value) { + return function() { + this.innerHTML = value; + }; +} +function htmlFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; +} -/* harmony default export */ __webpack_exports__["default"] = (function(scheme) { - return Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRgbBasis"])(scheme[scheme.length - 1]); +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; }); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/index.js ***! + \**********************************************************/ +/*! exports provided: root, Selection, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/selection/select.js"); +/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selection/selectAll.js"); +/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./node_modules/d3-selection/src/selection/filter.js"); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data */ "./node_modules/d3-selection/src/selection/data.js"); +/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js"); +/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exit */ "./node_modules/d3-selection/src/selection/exit.js"); +/* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./join */ "./node_modules/d3-selection/src/selection/join.js"); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge */ "./node_modules/d3-selection/src/selection/merge.js"); +/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./order */ "./node_modules/d3-selection/src/selection/order.js"); +/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sort */ "./node_modules/d3-selection/src/selection/sort.js"); +/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./call */ "./node_modules/d3-selection/src/selection/call.js"); +/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./nodes */ "./node_modules/d3-selection/src/selection/nodes.js"); +/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node */ "./node_modules/d3-selection/src/selection/node.js"); +/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./size */ "./node_modules/d3-selection/src/selection/size.js"); +/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./empty */ "./node_modules/d3-selection/src/selection/empty.js"); +/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./each */ "./node_modules/d3-selection/src/selection/each.js"); +/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./attr */ "./node_modules/d3-selection/src/selection/attr.js"); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./style */ "./node_modules/d3-selection/src/selection/style.js"); +/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./property */ "./node_modules/d3-selection/src/selection/property.js"); +/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./classed */ "./node_modules/d3-selection/src/selection/classed.js"); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./text */ "./node_modules/d3-selection/src/selection/text.js"); +/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./html */ "./node_modules/d3-selection/src/selection/html.js"); +/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./raise */ "./node_modules/d3-selection/src/selection/raise.js"); +/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./lower */ "./node_modules/d3-selection/src/selection/lower.js"); +/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./append */ "./node_modules/d3-selection/src/selection/append.js"); +/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./insert */ "./node_modules/d3-selection/src/selection/insert.js"); +/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./remove */ "./node_modules/d3-selection/src/selection/remove.js"); +/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ "./node_modules/d3-selection/src/selection/clone.js"); +/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./datum */ "./node_modules/d3-selection/src/selection/datum.js"); +/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./on */ "./node_modules/d3-selection/src/selection/on.js"); +/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./dispatch */ "./node_modules/d3-selection/src/selection/dispatch.js"); -var scheme = new Array(3).concat( - "e5f5f999d8c92ca25f", - "edf8fbb2e2e266c2a4238b45", - "edf8fbb2e2e266c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -var scheme = new Array(3).concat( - "e0ecf49ebcda8856a7", - "edf8fbb3cde38c96c688419d", - "edf8fbb3cde38c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -var scheme = new Array(3).concat( - "e0f3dba8ddb543a2ca", - "f0f9e8bae4bc7bccc42b8cbe", - "f0f9e8bae4bc7bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); -var scheme = new Array(3).concat( - "fee8c8fdbb84e34a33", - "fef0d9fdcc8afc8d59d7301f", - "fef0d9fdcc8afc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); -/***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +var root = [null]; +function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; +} +function selection() { + return new Selection([[document.documentElement]], root); +} -var scheme = new Array(3).concat( - "ece7f2a6bddb2b8cbe", - "f1eef6bdc9e174a9cf0570b0", - "f1eef6bdc9e174a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +Selection.prototype = selection.prototype = { + constructor: Selection, + select: _select__WEBPACK_IMPORTED_MODULE_0__["default"], + selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__["default"], + filter: _filter__WEBPACK_IMPORTED_MODULE_2__["default"], + data: _data__WEBPACK_IMPORTED_MODULE_3__["default"], + enter: _enter__WEBPACK_IMPORTED_MODULE_4__["default"], + exit: _exit__WEBPACK_IMPORTED_MODULE_5__["default"], + join: _join__WEBPACK_IMPORTED_MODULE_6__["default"], + merge: _merge__WEBPACK_IMPORTED_MODULE_7__["default"], + order: _order__WEBPACK_IMPORTED_MODULE_8__["default"], + sort: _sort__WEBPACK_IMPORTED_MODULE_9__["default"], + call: _call__WEBPACK_IMPORTED_MODULE_10__["default"], + nodes: _nodes__WEBPACK_IMPORTED_MODULE_11__["default"], + node: _node__WEBPACK_IMPORTED_MODULE_12__["default"], + size: _size__WEBPACK_IMPORTED_MODULE_13__["default"], + empty: _empty__WEBPACK_IMPORTED_MODULE_14__["default"], + each: _each__WEBPACK_IMPORTED_MODULE_15__["default"], + attr: _attr__WEBPACK_IMPORTED_MODULE_16__["default"], + style: _style__WEBPACK_IMPORTED_MODULE_17__["default"], + property: _property__WEBPACK_IMPORTED_MODULE_18__["default"], + classed: _classed__WEBPACK_IMPORTED_MODULE_19__["default"], + text: _text__WEBPACK_IMPORTED_MODULE_20__["default"], + html: _html__WEBPACK_IMPORTED_MODULE_21__["default"], + raise: _raise__WEBPACK_IMPORTED_MODULE_22__["default"], + lower: _lower__WEBPACK_IMPORTED_MODULE_23__["default"], + append: _append__WEBPACK_IMPORTED_MODULE_24__["default"], + insert: _insert__WEBPACK_IMPORTED_MODULE_25__["default"], + remove: _remove__WEBPACK_IMPORTED_MODULE_26__["default"], + clone: _clone__WEBPACK_IMPORTED_MODULE_27__["default"], + datum: _datum__WEBPACK_IMPORTED_MODULE_28__["default"], + on: _on__WEBPACK_IMPORTED_MODULE_29__["default"], + dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_30__["default"] +}; -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (selection); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/insert.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/insert.js ***! + \***********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js"); +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js"); -var scheme = new Array(3).concat( - "ece2f0a6bddb1c9099", - "f6eff7bdc9e167a9cf02818a", - "f6eff7bdc9e167a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +function constantNull() { + return null; +} -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(name, before) { + var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name), + select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(before); + return this.select(function() { + return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); + }); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/join.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/join.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "e7e1efc994c7dd1c77", - "f1eef6d7b5d8df65b0ce1256", - "f1eef6d7b5d8df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); + if (onupdate != null) update = onupdate(update); + if (onexit == null) exit.remove(); else onexit(exit); + return enter && update ? enter.merge(update).order() : update; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/lower.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/lower.js ***! + \**********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "fde0ddfa9fb5c51b8a", - "feebe2fbb4b9f768a1ae017e", - "feebe2fbb4b9f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); +} -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(lower); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js": -/*!**********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***! - \**********************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/merge.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/merge.js ***! + \**********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(selection) { -var scheme = new Array(3).concat( - "f7fcb9addd8e31a354", - "ffffccc2e69978c679238443", - "ffffccc2e69978c67931a354006837", - "ffffccd9f0a3addd8e78c67931a354006837", - "ffffccd9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/node.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/node.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - +/* harmony default export */ __webpack_exports__["default"] = (function() { -var scheme = new Array(3).concat( - "edf8b17fcdbb2c7fb8", - "ffffcca1dab441b6c4225ea8", - "ffffcca1dab441b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) return node; + } + } -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + return null; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/nodes.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/nodes.js ***! + \**********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "fff7bcfec44fd95f0e", - "ffffd4fed98efe9929cc4c02", - "ffffd4fed98efe9929d95f0e993404", - "ffffd4fee391fec44ffe9929d95f0e993404", - "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/on.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/on.js ***! + \*******************************************************/ +/*! exports provided: event, default, customEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return customEvent; }); +var filterEvents = {}; +var event = null; +if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } +} -var scheme = new Array(3).concat( - "ffeda0feb24cf03b20", - "ffffb2fecc5cfd8d3ce31a1c", - "ffffb2fecc5cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; +} -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +function contextListener(listener, index, group) { + return function(event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; +} +function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + return {type: t, name: name}; + }); +} -/***/ }), +function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; +} -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js": -/*!*************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + if (on) for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " - + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " - + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) - + ")"; +/* harmony default export */ __webpack_exports__["default"] = (function(typename, value, capture) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + + if (arguments.length < 2) { + var on = this.node().__on; + if (on) for (var j = 0, m = on.length, o; j < m; ++j) { + for (i = 0, o = on[j]; i < n; ++i) { + if ((t = typenames[i]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + + on = value ? onAdd : onRemove; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; }); +function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } +} + /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js": -/*!***************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***! - \***************************************************************************/ +/***/ "./node_modules/d3-selection/src/selection/order.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/order.js ***! + \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); - +/* harmony default export */ __webpack_exports__["default"] = (function() { + for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { + for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { + if (node = group[i]) { + if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); + next = node; + } + } + } -/* harmony default export */ __webpack_exports__["default"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-240, 0.5, 1.0))); + return this; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js": -/*!*************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***! - \*************************************************************************/ -/*! exports provided: warm, cool, default */ +/***/ "./node_modules/d3-selection/src/selection/property.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/property.js ***! + \*************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warm", function() { return warm; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cool", function() { return cool; }); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); - - - -var warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); +function propertyRemove(name) { + return function() { + delete this[name]; + }; +} -var cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); +function propertyConstant(name, value) { + return function() { + this[name] = value; + }; +} -var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(); +function propertyFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) delete this[name]; + else this[name] = v; + }; +} -/* harmony default export */ __webpack_exports__["default"] = (function(t) { - if (t < 0 || t > 1) t -= Math.floor(t); - var ts = Math.abs(t - 0.5); - c.h = 360 * t - 100; - c.s = 1.5 - 1.5 * ts; - c.l = 0.8 - 0.9 * ts; - return c + ""; +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; }); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js": -/*!*************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***! - \*************************************************************************/ +/***/ "./node_modules/d3-selection/src/selection/raise.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/raise.js ***! + \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); - - -var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(), - pi_1_3 = Math.PI / 3, - pi_2_3 = Math.PI * 2 / 3; +function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); +} -/* harmony default export */ __webpack_exports__["default"] = (function(t) { - var x; - t = (0.5 - t) * Math.PI; - c.r = 255 * (x = Math.sin(t)) * x; - c.g = 255 * (x = Math.sin(t + pi_1_3)) * x; - c.b = 255 * (x = Math.sin(t + pi_2_3)) * x; - return c + ""; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(raise); }); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js": -/*!***********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***! - \***********************************************************************/ +/***/ "./node_modules/d3-selection/src/selection/remove.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/remove.js ***! + \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " - + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " - + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) - + ")"; +function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(remove); }); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js": -/*!*************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***! - \*************************************************************************/ -/*! exports provided: default, magma, inferno, plasma */ +/***/ "./node_modules/d3-selection/src/selection/select.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/select.js ***! + \***********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "magma", function() { return magma; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inferno", function() { return inferno; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plasma", function() { return plasma; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); - +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js"); -function ramp(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} -/* harmony default export */ __webpack_exports__["default"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"))); -var magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + if (typeof select !== "function") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(select); -var inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + } + } + } -var plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/selectAll.js": +/*!**************************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/selectAll.js ***! + \**************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selectorAll */ "./node_modules/d3-selection/src/selectorAll.js"); -var scheme = new Array(3).concat( - "deebf79ecae13182bd", - "eff3ffbdd7e76baed62171b5", - "eff3ffbdd7e76baed63182bd08519c", - "eff3ffc6dbef9ecae16baed63182bd08519c", - "eff3ffc6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + if (typeof select !== "function") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__["default"])(select); -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + subgroups.push(select.call(node, node.__data__, i, group)); + parents.push(node); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js": -/*!*************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***! - \*************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/size.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/size.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "e5f5e0a1d99b31a354", - "edf8e9bae4b374c476238b45", - "edf8e9bae4b374c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var size = 0; + this.each(function() { ++size; }); + return size; +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js": -/*!************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***! - \************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/sort.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/sort.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(compare) { + if (!compare) compare = ascending; -var scheme = new Array(3).concat( - "f0f0f0bdbdbd636363", - "f7f7f7cccccc969696525252", - "f7f7f7cccccc969696636363252525", - "f7f7f7d9d9d9bdbdbd969696636363252525", - "f7f7f7d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group[i]) { + sortgroup[i] = node; + } + } + sortgroup.sort(compareNode); + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order(); +}); + +function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js": -/*!**************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***! - \**************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/sparse.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/sparse.js ***! + \***********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); - - - -var scheme = new Array(3).concat( - "fee6cefdae6be6550d", - "feeddefdbe85fd8d3cd94701", - "feeddefdbe85fd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(update) { + return new Array(update.length); +}); /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js": -/*!**************************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***! - \**************************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/style.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/style.js ***! + \**********************************************************/ +/*! exports provided: default, styleValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; }); +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js"); +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} -var scheme = new Array(3).concat( - "efedf5bcbddc756bb1", - "f2f0f7cbc9e29e9ac86a51a3", - "f2f0f7cbc9e29e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +function styleConstant(name, value, priority) { + return function() { + this.style.setProperty(name, value, priority); + }; +} -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +function styleFunction(name, value, priority) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.style.removeProperty(name); + else this.style.setProperty(name, v, priority); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + return arguments.length > 1 + ? this.each((value == null + ? styleRemove : typeof value === "function" + ? styleFunction + : styleConstant)(name, value, priority == null ? "" : priority)) + : styleValue(this.node(), name); +}); + +function styleValue(node, name) { + return node.style.getPropertyValue(name) + || Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name); +} /***/ }), -/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js": -/*!***********************************************************************!*\ - !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***! - \***********************************************************************/ -/*! exports provided: scheme, default */ +/***/ "./node_modules/d3-selection/src/selection/text.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-selection/src/selection/text.js ***! + \*********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js"); -/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js"); +function textRemove() { + this.textContent = ""; +} +function textConstant(value) { + return function() { + this.textContent = value; + }; +} +function textFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; +} -var scheme = new Array(3).concat( - "fee0d2fc9272de2d26", - "fee5d9fcae91fb6a4acb181d", - "fee5d9fcae91fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" -).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - -/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; +}); /***/ }), -/***/ "./node_modules/d3-scale/src/array.js": -/*!********************************************!*\ - !*** ./node_modules/d3-scale/src/array.js ***! - \********************************************/ -/*! exports provided: map, slice */ +/***/ "./node_modules/d3-selection/src/selector.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-selection/src/selector.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -var array = Array.prototype; +function none() {} -var map = array.map; -var slice = array.slice; +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; +}); /***/ }), -/***/ "./node_modules/d3-scale/src/band.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-scale/src/band.js ***! - \*******************************************/ -/*! exports provided: default, point */ +/***/ "./node_modules/d3-selection/src/selectorAll.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-selection/src/selectorAll.js ***! + \******************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return band; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js"); +function empty() { + return []; +} +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; +}); +/***/ }), -function band() { - var scale = Object(_ordinal__WEBPACK_IMPORTED_MODULE_2__["default"])().unknown(undefined), - domain = scale.domain, - ordinalRange = scale.range, - range = [0, 1], - step, - bandwidth, - round = false, - paddingInner = 0, - paddingOuter = 0, - align = 0.5; +/***/ "./node_modules/d3-selection/src/sourceEvent.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-selection/src/sourceEvent.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - delete scale.unknown; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js"); - function rescale() { - var n = domain().length, - reverse = range[1] < range[0], - start = range[reverse - 0], - stop = range[1 - reverse]; - step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); - if (round) step = Math.floor(step); - start += (stop - start - step * (n - paddingInner)) * align; - bandwidth = step * (1 - paddingInner); - if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); - var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n).map(function(i) { return start + step * i; }); - return ordinalRange(reverse ? values.reverse() : values); - } - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; +/* harmony default export */ __webpack_exports__["default"] = (function() { + var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__["event"], source; + while (source = current.sourceEvent) current = source; + return current; +}); - scale.range = function(_) { - return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice(); - }; - scale.rangeRound = function(_) { - return range = [+_[0], +_[1]], round = true, rescale(); - }; +/***/ }), - scale.bandwidth = function() { - return bandwidth; - }; +/***/ "./node_modules/d3-selection/src/touch.js": +/*!************************************************!*\ + !*** ./node_modules/d3-selection/src/touch.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - scale.step = function() { - return step; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); - scale.round = function(_) { - return arguments.length ? (round = !!_, rescale()) : round; - }; - scale.padding = function(_) { - return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; - }; - scale.paddingInner = function(_) { - return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().changedTouches; - scale.paddingOuter = function(_) { - return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; - }; + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touch); + } + } - scale.align = function(_) { - return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; - }; + return null; +}); - scale.copy = function() { - return band(domain(), range) - .round(round) - .paddingInner(paddingInner) - .paddingOuter(paddingOuter) - .align(align); - }; - return _init__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(rescale(), arguments); -} +/***/ }), -function pointish(scale) { - var copy = scale.copy; +/***/ "./node_modules/d3-selection/src/touches.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-selection/src/touches.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - scale.padding = scale.paddingOuter; - delete scale.paddingInner; - delete scale.paddingOuter; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); - scale.copy = function() { - return pointish(copy()); - }; - return scale; -} -function point() { - return pointish(band.apply(null, arguments).paddingInner(1)); -} +/* harmony default export */ __webpack_exports__["default"] = (function(node, touches) { + if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().touches; + + for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) { + points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touches[i]); + } + + return points; +}); /***/ }), -/***/ "./node_modules/d3-scale/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-scale/src/constant.js ***! - \***********************************************/ +/***/ "./node_modules/d3-selection/src/window.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-selection/src/window.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document }); /***/ }), -/***/ "./node_modules/d3-scale/src/continuous.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-scale/src/continuous.js ***! - \*************************************************/ -/*! exports provided: identity, copy, transformer, default */ +/***/ "./node_modules/d3-shape/src/arc.js": +/*!******************************************!*\ + !*** ./node_modules/d3-shape/src/arc.js ***! + \******************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return continuous; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-scale/src/constant.js"); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js"); - - +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js"); -var unit = [0, 1]; +function arcInnerRadius(d) { + return d.innerRadius; +} -function identity(x) { - return x; +function arcOuterRadius(d) { + return d.outerRadius; } -function normalize(a, b) { - return (b -= (a = +a)) - ? function(x) { return (x - a) / b; } - : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(isNaN(b) ? NaN : 0.5); +function arcStartAngle(d) { + return d.startAngle; } -function clamper(domain) { - var a = domain[0], b = domain[domain.length - 1], t; - if (a > b) t = a, a = b, b = t; - return function(x) { return Math.max(a, Math.min(b, x)); }; +function arcEndAngle(d) { + return d.endAngle; } -// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. -// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. -function bimap(domain, range, interpolate) { - var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; - if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); - else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); - return function(x) { return r0(d0(x)); }; +function arcPadAngle(d) { + return d && d.padAngle; // Note: optional! } -function polymap(domain, range, interpolate) { - var j = Math.min(domain.length, range.length) - 1, - d = new Array(j), - r = new Array(j), - i = -1; +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, + x32 = x3 - x2, y32 = y3 - y2, + t = y32 * x10 - x32 * y10; + if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; +} - // Reverse descending domains. - if (domain[j] < domain[0]) { - domain = domain.slice().reverse(); - range = range.slice().reverse(); - } +// Compute perpendicular offset line of length rc. +// http://mathworld.wolfram.com/Circle-LineIntersection.html +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, + y01 = y0 - y1, + lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), + ox = lo * y01, + oy = -lo * x01, + x11 = x0 + ox, + y11 = y0 + oy, + x10 = x1 + ox, + y10 = y1 + oy, + x00 = (x11 + x10) / 2, + y00 = (y11 + y10) / 2, + dx = x10 - x11, + dy = y10 - y11, + d2 = dx * dx + dy * dy, + r = r1 - rc, + D = x11 * y10 - x10 * y11, + d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["max"])(0, r * r * d2 - D * D)), + cx0 = (D * dy - dx * d) / d2, + cy0 = (-D * dx - dy * d) / d2, + cx1 = (D * dy + dx * d) / d2, + cy1 = (-D * dx + dy * d) / d2, + dx0 = cx0 - x00, + dy0 = cy0 - y00, + dx1 = cx1 - x00, + dy1 = cy1 - y00; - while (++i < j) { - d[i] = normalize(domain[i], domain[i + 1]); - r[i] = interpolate(range[i], range[i + 1]); - } + // Pick the closer of the two intersection points. + // TODO Is there a faster way to determine which intersection to use? + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; - return function(x) { - var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1, j) - 1; - return r[i](d[i](x)); + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) }; } -function copy(source, target) { - return target - .domain(source.domain()) - .range(source.range()) - .interpolate(source.interpolate()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -function transformer() { - var domain = unit, - range = unit, - interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolate"], - transform, - untransform, - unknown, - clamp = identity, - piecewise, - output, - input; - - function rescale() { - piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap; - output = input = null; - return scale; - } +/* harmony default export */ __webpack_exports__["default"] = (function() { + var innerRadius = arcInnerRadius, + outerRadius = arcOuterRadius, + cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), + padRadius = null, + startAngle = arcStartAngle, + endAngle = arcEndAngle, + padAngle = arcPadAngle, + context = null; - function scale(x) { - return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); - } + function arc() { + var buffer, + r, + r0 = +innerRadius.apply(this, arguments), + r1 = +outerRadius.apply(this, arguments), + a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0), + cw = a1 > a0; - scale.invert = function(y) { - return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"])))(y))); - }; + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); - scale.domain = function(_) { - return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__["default"]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice(); - }; + // Ensure that the outer radius is always larger than the inner radius. + if (r1 < r0) r = r1, r1 = r0, r0 = r; - scale.range = function(_) { - return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), rescale()) : range.slice(); - }; + // Is it a point? + if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0); - scale.rangeRound = function(_) { - return range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRound"], rescale(); - }; + // Or is it a circle or annulus? + else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } - scale.clamp = function(_) { - return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity; - }; + // Or is it a circular or annular sector? + else { + var a01 = a0, + a11 = a1, + a00 = a0, + a10 = a1, + da0 = da, + da1 = da, + ap = padAngle.apply(this, arguments) / 2, + rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)), + rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), + rc0 = rc, + rc1 = rc, + t0, + t1; - scale.interpolate = function(_) { - return arguments.length ? (interpolate = _, rescale()) : interpolate; - }; + // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. + if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)), + p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)); + if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; + else da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; + else da1 = 0, a01 = a11 = (a0 + a1) / 2; + } - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; + var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01), + y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01), + x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10), + y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10); - return function(t, u) { - transform = t, untransform = u; - return rescale(); - }; -} + // Apply rounded corners? + if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11), + y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11), + x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00), + y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00), + oc; -function continuous(transform, untransform) { - return transformer()(transform, untransform); -} + // Restrict the corner radius according to the sector angle. + if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { + var ax = x01 - oc[0], + ay = y01 - oc[1], + bx = x11 - oc[0], + by = y11 - oc[1], + kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2), + lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1)); + rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1)); + } + } + // Is the sector collapsed to a line? + if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01); -/***/ }), + // Does the sector’s outer ring have rounded corners? + else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); -/***/ "./node_modules/d3-scale/src/diverging.js": -/*!************************************************!*\ - !*** ./node_modules/d3-scale/src/diverging.js ***! - \************************************************/ -/*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return diverging; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingLog", function() { return divergingLog; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSymlog", function() { return divergingSymlog; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingPow", function() { return divergingPow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSqrt", function() { return divergingSqrt; }); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); -/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js"); -/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); -/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); + // Have the corners merged? + if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); + context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw); + context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + } + } + // Or is the outer ring just a circular arc? + else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + // Is there no inner ring, and it’s a circular sector? + // Or perhaps it’s an annular sector collapsed due to padding? + if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10); + // Does the sector’s inner ring (or point) have rounded corners? + else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); + // Have the corners merged? + if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); + context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw); + context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + } + } -function transformer() { - var x0 = 0, - x1 = 0.5, - x2 = 1, - t0, - t1, - t2, - k10, - k21, - interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"], - transform, - clamp = false, - unknown; + // Or is the inner ring just a circular arc? + else context.arc(0, 0, r0, a10, a00, cw); + } - function scale(x) { - return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); + context.closePath(); + + if (buffer) return context = null, buffer + "" || null; } - scale.domain = function(_) { - return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2]; + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, + a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2; + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r]; }; - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; + arc.innerRadius = function(_) { + return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius; }; - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; + arc.outerRadius = function(_) { + return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius; }; - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; + arc.cornerRadius = function(_) { + return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius; }; - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1); - return scale; + arc.padRadius = function(_) { + return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius; }; -} - -function diverging() { - var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"])); - scale.copy = function() { - return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, diverging()); + arc.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle; }; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); -} - -function divergingLog() { - var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([0.1, 1, 10]); - - scale.copy = function() { - return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingLog()).base(scale.base()); + arc.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle; }; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); -} - -function divergingSymlog() { - var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_5__["symlogish"])(transformer()); - - scale.copy = function() { - return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingSymlog()).constant(scale.constant()); + arc.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle; }; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); -} - -function divergingPow() { - var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_6__["powish"])(transformer()); - - scale.copy = function() { - return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingPow()).exponent(scale.exponent()); + arc.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), arc) : context; }; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); -} - -function divergingSqrt() { - return divergingPow.apply(null, arguments).exponent(0.5); -} + return arc; +}); /***/ }), -/***/ "./node_modules/d3-scale/src/identity.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-scale/src/identity.js ***! - \***********************************************/ +/***/ "./node_modules/d3-shape/src/area.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-shape/src/area.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return identity; }); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js"); - - - - -function identity(domain) { - var unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : x; - } - - scale.invert = scale; +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js"); - scale.domain = scale.range = function(_) { - return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_2__["default"]), scale) : domain.slice(); - }; - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - scale.copy = function() { - return identity(domain).unknown(unknown); - }; - domain = arguments.length ? _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(domain, _number__WEBPACK_IMPORTED_MODULE_2__["default"]) : [0, 1]; - return Object(_linear__WEBPACK_IMPORTED_MODULE_1__["linearish"])(scale); -} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x0 = _point_js__WEBPACK_IMPORTED_MODULE_4__["x"], + x1 = null, + y0 = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), + y1 = _point_js__WEBPACK_IMPORTED_MODULE_4__["y"], + defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), + context = null, + curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], + output = null; -/***/ }), + function area(data) { + var i, + j, + k, + n = data.length, + d, + defined0 = false, + buffer, + x0z = new Array(n), + y0z = new Array(n); -/***/ "./node_modules/d3-scale/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-scale/src/index.js ***! - \********************************************/ -/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _band__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band */ "./node_modules/d3-scale/src/band.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) { + j = i; + output.areaStart(); + output.lineStart(); + } else { + output.lineEnd(); + output.lineStart(); + for (k = i - 1; k >= j; --k) { + output.point(x0z[k], y0z[k]); + } + output.lineEnd(); + output.areaEnd(); + } + } + if (defined0) { + x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); + output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["point"]; }); + if (buffer) return output = null, buffer + "" || null; + } -/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-scale/src/identity.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return _identity__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + function arealine() { + return Object(_line_js__WEBPACK_IMPORTED_MODULE_3__["default"])().defined(defined).curve(curve).context(context); + } -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return _linear__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + area.x = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), x1 = null, area) : x0; + }; -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return _log__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + area.x0 = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x0; + }; -/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return _symlog__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + area.x1 = function(_) { + return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x1; + }; -/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + area.y = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), y1 = null, area) : y0; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["implicit"]; }); + area.y0 = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y0; + }; -/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + area.y1 = function(_) { + return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y1; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["sqrt"]; }); + area.lineX0 = + area.lineY0 = function() { + return arealine().x(x0).y(y0); + }; -/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-scale/src/quantile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return _quantile__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + area.lineY1 = function() { + return arealine().x(x0).y(y1); + }; -/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantize */ "./node_modules/d3-scale/src/quantize.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return _quantize__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + area.lineX1 = function() { + return arealine().x(x1).y(y0); + }; -/* harmony import */ var _threshold__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold */ "./node_modules/d3-scale/src/threshold.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return _threshold__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + area.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), area) : defined; + }; -/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return _time__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + area.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; + }; -/* harmony import */ var _utcTime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcTime */ "./node_modules/d3-scale/src/utcTime.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return _utcTime__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + area.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; + }; -/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + return area; +}); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialLog"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialPow"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSqrt"]; }); +/***/ "./node_modules/d3-shape/src/areaRadial.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-shape/src/areaRadial.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSymlog"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js"); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js"); +/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js"); -/* harmony import */ var _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequentialQuantile */ "./node_modules/d3-scale/src/sequentialQuantile.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/* harmony import */ var _diverging__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging */ "./node_modules/d3-scale/src/diverging.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingLog"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingPow"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]), + c = a.curve, + x0 = a.lineX0, + x1 = a.lineX1, + y0 = a.lineY0, + y1 = a.lineY1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSqrt"]; }); + a.angle = a.x, delete a.x; + a.startAngle = a.x0, delete a.x0; + a.endAngle = a.x1, delete a.x1; + a.radius = a.y, delete a.y; + a.innerRadius = a.y0, delete a.y0; + a.outerRadius = a.y1, delete a.y1; + a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0; + a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1; + a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0; + a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSymlog"]; }); + a.curve = function(_) { + return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; + }; -/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return _tickFormat__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + return a; +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/array.js": +/*!********************************************!*\ + !*** ./node_modules/d3-shape/src/array.js ***! + \********************************************/ +/*! exports provided: slice */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var slice = Array.prototype.slice; +/***/ }), +/***/ "./node_modules/d3-shape/src/constant.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-shape/src/constant.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function constant() { + return x; + }; +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/curve/basis.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/basis.js ***! + \**************************************************/ +/*! exports provided: point, Basis, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; }); +function point(that, x, y) { + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x) / 6, + (that._y0 + 4 * that._y1 + y) / 6 + ); +} +function Basis(context) { + this._context = context; +} +Basis.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: point(this, this._x1, this._y1); // proceed + case 2: this._context.lineTo(this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Basis(context); +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/curve/basisClosed.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +function BasisClosed(context) { + this._context = context; +} +BasisClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x2 = x, this._y2 = y; break; + case 1: this._point = 2; this._x3 = x, this._y3 = y; break; + case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; + default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new BasisClosed(context); +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/curve/basisOpen.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +function BasisOpen(context) { + this._context = context; +} +BasisOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; + case 3: this._point = 4; // proceed + default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new BasisOpen(context); +}); /***/ }), -/***/ "./node_modules/d3-scale/src/init.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-scale/src/init.js ***! - \*******************************************/ -/*! exports provided: initRange, initInterpolator */ +/***/ "./node_modules/d3-shape/src/curve/bundle.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/bundle.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initRange", function() { return initRange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initInterpolator", function() { return initInterpolator; }); -function initRange(domain, range) { - switch (arguments.length) { - case 0: break; - case 1: this.range(domain); break; - default: this.range(range).domain(domain); break; - } - return this; -} +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); -function initInterpolator(domain, interpolator) { - switch (arguments.length) { - case 0: break; - case 1: this.interpolator(domain); break; - default: this.interpolator(interpolator).domain(domain); break; - } - return this; -} - - -/***/ }), - -/***/ "./node_modules/d3-scale/src/linear.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-scale/src/linear.js ***! - \*********************************************/ -/*! exports provided: linearish, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearish", function() { return linearish; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js"); - - - - - -function linearish(scale) { - var domain = scale.domain; - scale.ticks = function(count) { - var d = domain(); - return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count); - }; - - scale.tickFormat = function(count, specifier) { - var d = domain(); - return Object(_tickFormat__WEBPACK_IMPORTED_MODULE_3__["default"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier); - }; - - scale.nice = function(count) { - if (count == null) count = 10; - - var d = domain(), - i0 = 0, - i1 = d.length - 1, - start = d[i0], - stop = d[i1], - step; - - if (stop < start) { - step = start, start = stop, stop = step; - step = i0, i0 = i1, i1 = step; - } +function Bundle(context, beta) { + this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context); + this._beta = beta; +} - step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); +Bundle.prototype = { + lineStart: function() { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function() { + var x = this._x, + y = this._y, + j = x.length - 1; - if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); - } + if (j > 0) { + var x0 = x[0], + y0 = y[0], + dx = x[j] - x0, + dy = y[j] - y0, + i = -1, + t; - if (step > 0) { - d[i0] = Math.floor(start / step) * step; - d[i1] = Math.ceil(stop / step) * step; - domain(d); - } else if (step < 0) { - d[i0] = Math.ceil(start * step) / step; - d[i1] = Math.floor(stop * step) / step; - domain(d); + while (++i <= j) { + t = i / j; + this._basis.point( + this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), + this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) + ); + } } - return scale; - }; + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; - return scale; -} +/* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) { -function linear() { - var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]); + function bundle(context) { + return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta); + } - scale.copy = function() { - return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, linear()); + bundle.beta = function(beta) { + return custom(+beta); }; - _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); - - return linearish(scale); -} + return bundle; +})(0.85)); /***/ }), -/***/ "./node_modules/d3-scale/src/log.js": -/*!******************************************!*\ - !*** ./node_modules/d3-scale/src/log.js ***! - \******************************************/ -/*! exports provided: loggish, default */ +/***/ "./node_modules/d3-shape/src/curve/cardinal.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/cardinal.js ***! + \*****************************************************/ +/*! exports provided: point, Cardinal, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loggish", function() { return loggish; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); -/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - - - - - -function transformLog(x) { - return Math.log(x); -} - -function transformExp(x) { - return Math.exp(x); -} - -function transformLogn(x) { - return -Math.log(-x); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; }); +function point(that, x, y) { + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x), + that._y2 + that._k * (that._y1 - y), + that._x2, + that._y2 + ); } -function transformExpn(x) { - return -Math.exp(-x); +function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; } -function pow10(x) { - return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; -} +Cardinal.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: point(this, this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; this._x1 = x, this._y1 = y; break; + case 2: this._point = 3; // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; -function powp(base) { - return base === 10 ? pow10 - : base === Math.E ? Math.exp - : function(x) { return Math.pow(base, x); }; -} +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { -function logp(base) { - return base === Math.E ? Math.log - : base === 10 && Math.log10 - || base === 2 && Math.log2 - || (base = Math.log(base), function(x) { return Math.log(x) / base; }); -} + function cardinal(context) { + return new Cardinal(context, tension); + } -function reflect(f) { - return function(x) { - return -f(-x); + cardinal.tension = function(tension) { + return custom(+tension); }; -} -function loggish(transform) { - var scale = transform(transformLog, transformExp), - domain = scale.domain, - base = 10, - logs, - pows; + return cardinal; +})(0)); - function rescale() { - logs = logp(base), pows = powp(base); - if (domain()[0] < 0) { - logs = reflect(logs), pows = reflect(pows); - transform(transformLogn, transformExpn); - } else { - transform(transformLog, transformExp); - } - return scale; - } - scale.base = function(_) { - return arguments.length ? (base = +_, rescale()) : base; - }; +/***/ }), - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; +/***/ "./node_modules/d3-shape/src/curve/cardinalClosed.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***! + \***********************************************************/ +/*! exports provided: CardinalClosed, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - scale.ticks = function(count) { - var d = domain(), - u = d[0], - v = d[d.length - 1], - r; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; }); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); - if (r = v < u) i = u, u = v, v = i; - var i = logs(u), - j = logs(v), - p, - k, - t, - n = count == null ? 10 : +count, - z = []; - if (!(base % 1) && j - i < n) { - i = Math.round(i) - 1, j = Math.round(j) + 1; - if (u > 0) for (; i < j; ++i) { - for (k = 1, p = pows(i); k < base; ++k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } else for (; i < j; ++i) { - for (k = base - 1, p = pows(i); k >= 1; --k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } +function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +CardinalClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; } - } else { - z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(i, j, Math.min(j - i, n)).map(pows); } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; - return r ? z.reverse() : z; - }; - - scale.tickFormat = function(count, specifier) { - if (specifier == null) specifier = base === 10 ? ".0e" : ","; - if (typeof specifier !== "function") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); - if (count === Infinity) return specifier; - if (count == null) count = 10; - var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? - return function(d) { - var i = d / pows(Math.round(logs(d))); - if (i * base < base - 0.5) i *= base; - return i <= k ? specifier(d) : ""; - }; - }; - - scale.nice = function() { - return domain(Object(_nice__WEBPACK_IMPORTED_MODULE_2__["default"])(domain(), { - floor: function(x) { return pows(Math.floor(logs(x))); }, - ceil: function(x) { return pows(Math.ceil(logs(x))); } - })); - }; - - return scale; -} +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { -function log() { - var scale = loggish(Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["transformer"])()).domain([1, 10]); + function cardinal(context) { + return new CardinalClosed(context, tension); + } - scale.copy = function() { - return Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, log()).base(scale.base()); + cardinal.tension = function(tension) { + return custom(+tension); }; - _init__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(scale, arguments); - - return scale; -} + return cardinal; +})(0)); /***/ }), -/***/ "./node_modules/d3-scale/src/nice.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-scale/src/nice.js ***! - \*******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-shape/src/curve/cardinalOpen.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***! + \*********************************************************/ +/*! exports provided: CardinalOpen, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(domain, interval) { - domain = domain.slice(); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; }); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); - var i0 = 0, - i1 = domain.length - 1, - x0 = domain[i0], - x1 = domain[i1], - t; - if (x1 < x0) { - t = i0, i0 = i1, i1 = t; - t = x0, x0 = x1, x1 = t; - } +function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} - domain[i0] = interval.floor(x0); - domain[i1] = interval.ceil(x1); - return domain; -}); +CardinalOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { -/***/ }), + function cardinal(context) { + return new CardinalOpen(context, tension); + } -/***/ "./node_modules/d3-scale/src/number.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-scale/src/number.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + cardinal.tension = function(tension) { + return custom(+tension); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return +x; -}); + return cardinal; +})(0)); /***/ }), -/***/ "./node_modules/d3-scale/src/ordinal.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-scale/src/ordinal.js ***! - \**********************************************/ -/*! exports provided: implicit, default */ +/***/ "./node_modules/d3-shape/src/curve/catmullRom.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***! + \*******************************************************/ +/*! exports provided: point, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "implicit", function() { return implicit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ordinal; }); -/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); -var implicit = {name: "implicit"}; -function ordinal() { - var index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])(), - domain = [], - range = [], - unknown = implicit; +function point(that, x, y) { + var x1 = that._x1, + y1 = that._y1, + x2 = that._x2, + y2 = that._y2; - function scale(d) { - var key = d + "", i = index.get(key); - if (!i) { - if (unknown !== implicit) return unknown; - index.set(key, i = domain.push(d)); - } - return range[(i - 1) % range.length]; + if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, + n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; } - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = [], index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])(); - var i = -1, n = _.length, d, key; - while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d)); - return scale; - }; - - scale.range = function(_) { - return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), scale) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return ordinal(domain, range).unknown(unknown); - }; - - _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); + if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, + m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; + y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + } - return scale; + that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); } - -/***/ }), - -/***/ "./node_modules/d3-scale/src/pow.js": -/*!******************************************!*\ - !*** ./node_modules/d3-scale/src/pow.js ***! - \******************************************/ -/*! exports provided: powish, default, sqrt */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "powish", function() { return powish; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - - - -function transformPow(exponent) { - return function(x) { - return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); - }; +function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; } -function transformSqrt(x) { - return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); -} +CatmullRom.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: this.point(this._x2, this._y2); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; -function transformSquare(x) { - return x < 0 ? -x * x : x * x; -} + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } -function powish(transform) { - var scale = transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]), - exponent = 1; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; // proceed + default: point(this, x, y); break; + } - function rescale() { - return exponent === 1 ? transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]) - : exponent === 0.5 ? transform(transformSqrt, transformSquare) - : transform(transformPow(exponent), transformPow(1 / exponent)); + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } +}; - scale.exponent = function(_) { - return arguments.length ? (exponent = +_, rescale()) : exponent; - }; - - return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); -} +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { -function pow() { - var scale = powish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0); + } - scale.copy = function() { - return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, pow()).exponent(scale.exponent()); + catmullRom.alpha = function(alpha) { + return custom(+alpha); }; - _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); - - return scale; -} - -function sqrt() { - return pow.apply(null, arguments).exponent(0.5); -} + return catmullRom; +})(0.5)); /***/ }), -/***/ "./node_modules/d3-scale/src/quantile.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-scale/src/quantile.js ***! - \***********************************************/ +/***/ "./node_modules/d3-shape/src/curve/catmullRomClosed.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***! + \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - +/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); -function quantile() { - var domain = [], - range = [], - thresholds = [], - unknown; - function rescale() { - var i = 0, n = Math.max(1, range.length); - thresholds = new Array(n - 1); - while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantile"])(domain, i / n); - return scale; - } +function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; +} - function scale(x) { - return isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(thresholds, x)]; - } +CatmullRomClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] : [ - i > 0 ? thresholds[i - 1] : domain[0], - i < thresholds.length ? thresholds[i] : domain[domain.length - 1] - ]; - }; + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); - return rescale(); - }; + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break; + } - scale.range = function(_) { - return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), rescale()) : range.slice(); - }; + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { - scale.quantiles = function() { - return thresholds.slice(); - }; + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0); + } - scale.copy = function() { - return quantile() - .domain(domain) - .range(range) - .unknown(unknown); + catmullRom.alpha = function(alpha) { + return custom(+alpha); }; - return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); -} + return catmullRom; +})(0.5)); /***/ }), -/***/ "./node_modules/d3-scale/src/quantize.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-scale/src/quantize.js ***! - \***********************************************/ +/***/ "./node_modules/d3-shape/src/curve/catmullRomOpen.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***! + \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantize; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js"); +/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); +function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRomOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; -function quantize() { - var x0 = 0, - x1 = 1, - n = 1, - domain = [0.5], - range = [0, 1], - unknown; + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } - function scale(x) { - return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; - } + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } - function rescale() { - var i = -1; - domain = new Array(n); - while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); - return scale; + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } +}; - scale.domain = function(_) { - return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1]; - }; - - scale.range = function(_) { - return arguments.length ? (n = (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)).length - 1, rescale()) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] - : i < 1 ? [x0, domain[0]] - : i >= n ? [domain[n - 1], x1] - : [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : scale; - }; +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { - scale.thresholds = function() { - return domain.slice(); - }; + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0); + } - scale.copy = function() { - return quantize() - .domain([x0, x1]) - .range(range) - .unknown(unknown); + catmullRom.alpha = function(alpha) { + return custom(+alpha); }; - return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(scale), arguments); -} + return catmullRom; +})(0.5)); /***/ }), -/***/ "./node_modules/d3-scale/src/sequential.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-scale/src/sequential.js ***! - \*************************************************/ -/*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */ +/***/ "./node_modules/d3-shape/src/curve/linear.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/linear.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequential; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialLog", function() { return sequentialLog; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSymlog", function() { return sequentialSymlog; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialPow", function() { return sequentialPow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSqrt", function() { return sequentialSqrt; }); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js"); -/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js"); -/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js"); +function Linear(context) { + this._context = context; +} + +Linear.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: this._context.lineTo(x, y); break; + } + } +}; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Linear(context); +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/curve/linearClosed.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); -function transformer() { - var x0 = 0, - x1 = 1, - t0, - t1, - k10, - transform, - interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"], - clamp = false, - unknown; +function LinearClosed(context) { + this._context = context; +} - function scale(x) { - return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); +LinearClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._point) this._context.closePath(); + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) this._context.lineTo(x, y); + else this._point = 1, this._context.moveTo(x, y); } +}; - scale.domain = function(_) { - return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new LinearClosed(context); +}); - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; +/***/ }), - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; +/***/ "./node_modules/d3-shape/src/curve/monotone.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/monotone.js ***! + \*****************************************************/ +/*! exports provided: monotoneX, monotoneY */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); - return scale; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; }); +function sign(x) { + return x < 0 ? -1 : 1; } -function copy(source, target) { - return target - .domain(source.domain()) - .interpolator(source.interpolator()) - .clamp(source.clamp()) - .unknown(source.unknown()); +// Calculate the slopes of the tangents (Hermite-type interpolation) based on +// the following paper: Steffen, M. 1990. A Simple Method for Monotonic +// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. +// NOV(II), P. 443, 1990. +function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, + h1 = x2 - that._x1, + s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), + s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), + p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; } -function sequential() { - var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"])); +// Calculate a one-sided slope. +function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; +} - scale.copy = function() { - return copy(scale, sequential()); - }; +// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations +// "you can express cubic Hermite interpolation in terms of cubic Bézier curves +// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". +function point(that, t0, t1) { + var x0 = that._x0, + y0 = that._y0, + x1 = that._x1, + y1 = that._y1, + dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); +} - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +function MonotoneX(context) { + this._context = context; } -function sequentialLog() { - var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([1, 10]); +MonotoneX.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = + this._t0 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x1, this._y1); break; + case 3: point(this, this._t0, slope2(this, this._t0)); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + var t1 = NaN; - scale.copy = function() { - return copy(scale, sequentialLog()).base(scale.base()); - }; + x = +x, y = +y; + if (x === this._x1 && y === this._y1) return; // Ignore coincident points. + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; + default: point(this, this._t0, t1 = slope3(this, x, y)); break; + } - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + this._t0 = t1; + } } -function sequentialSymlog() { - var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_4__["symlogish"])(transformer()); +function MonotoneY(context) { + this._context = new ReflectContext(context); +} - scale.copy = function() { - return copy(scale, sequentialSymlog()).constant(scale.constant()); - }; +(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { + MonotoneX.prototype.point.call(this, y, x); +}; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +function ReflectContext(context) { + this._context = context; } -function sequentialPow() { - var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_5__["powish"])(transformer()); - - scale.copy = function() { - return copy(scale, sequentialPow()).exponent(scale.exponent()); - }; +ReflectContext.prototype = { + moveTo: function(x, y) { this._context.moveTo(y, x); }, + closePath: function() { this._context.closePath(); }, + lineTo: function(x, y) { this._context.lineTo(y, x); }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } +}; - return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments); +function monotoneX(context) { + return new MonotoneX(context); } -function sequentialSqrt() { - return sequentialPow.apply(null, arguments).exponent(0.5); +function monotoneY(context) { + return new MonotoneY(context); } /***/ }), -/***/ "./node_modules/d3-scale/src/sequentialQuantile.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/curve/natural.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/natural.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequentialQuantile; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - +function Natural(context) { + this._context = context; +} +Natural.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = []; + this._y = []; + }, + lineEnd: function() { + var x = this._x, + y = this._y, + n = x.length; -function sequentialQuantile() { - var domain = [], - interpolator = _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]; + if (n) { + this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); + if (n === 2) { + this._context.lineTo(x[1], y[1]); + } else { + var px = controlPoints(x), + py = controlPoints(y); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); + } + } + } - function scale(x) { - if (!isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x) - 1) / (domain.length - 1)); + if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); } +}; - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); - return scale; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - scale.copy = function() { - return sequentialQuantile(interpolator).domain(domain); - }; - - return _init__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); +// See https://www.particleincell.com/2012/bezier-splines/ for derivation. +function controlPoints(x) { + var i, + n = x.length - 1, + m, + a = new Array(n), + b = new Array(n), + r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; + for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; + for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; + b[n - 1] = (x[n] + a[n - 1]) / 2; + for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; + return [a, b]; } +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Natural(context); +}); + /***/ }), -/***/ "./node_modules/d3-scale/src/symlog.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-scale/src/symlog.js ***! - \*********************************************/ -/*! exports provided: symlogish, default */ +/***/ "./node_modules/d3-shape/src/curve/radial.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/radial.js ***! + \***************************************************/ +/*! exports provided: curveRadialLinear, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symlogish", function() { return symlogish; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symlog; }); -/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; }); +/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); -function transformSymlog(c) { - return function(x) { - return Math.sign(x) * Math.log1p(Math.abs(x / c)); - }; -} +var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function transformSymexp(c) { - return function(x) { - return Math.sign(x) * Math.expm1(Math.abs(x)) * c; - }; +function Radial(curve) { + this._curve = curve; } -function symlogish(transform) { - var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); - - scale.constant = function(_) { - return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; - }; +Radial.prototype = { + areaStart: function() { + this._curve.areaStart(); + }, + areaEnd: function() { + this._curve.areaEnd(); + }, + lineStart: function() { + this._curve.lineStart(); + }, + lineEnd: function() { + this._curve.lineEnd(); + }, + point: function(a, r) { + this._curve.point(r * Math.sin(a), r * -Math.cos(a)); + } +}; - return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); -} +function curveRadial(curve) { -function symlog() { - var scale = symlogish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); + function radial(context) { + return new Radial(curve(context)); + } - scale.copy = function() { - return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, symlog()).constant(scale.constant()); - }; + radial._curve = curve; - return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); + return radial; } /***/ }), -/***/ "./node_modules/d3-scale/src/threshold.js": -/*!************************************************!*\ - !*** ./node_modules/d3-scale/src/threshold.js ***! - \************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-shape/src/curve/step.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-shape/src/curve/step.js ***! + \*************************************************/ +/*! exports provided: default, stepBefore, stepAfter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return threshold; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); - - - - -function threshold() { - var domain = [0.5], - range = [0, 1], - unknown, - n = 1; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; }); +function Step(context, t) { + this._context = context; + this._t = t; +} - function scale(x) { - return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; +Step.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function() { + if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: { + if (this._t <= 0) { + this._context.lineTo(this._x, y); + this._context.lineTo(x, y); + } else { + var x1 = this._x * (1 - this._t) + x * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y); + } + break; + } + } + this._x = x, this._y = y; } +}; - scale.domain = function(_) { - return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Step(context, 0.5); +}); - scale.copy = function() { - return threshold() - .domain(domain) - .range(range) - .unknown(unknown); - }; +function stepBefore(context) { + return new Step(context, 0); +} - return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); +function stepAfter(context) { + return new Step(context, 1); } /***/ }), -/***/ "./node_modules/d3-scale/src/tickFormat.js": +/***/ "./node_modules/d3-shape/src/descending.js": /*!*************************************************!*\ - !*** ./node_modules/d3-scale/src/tickFormat.js ***! + !*** ./node_modules/d3-shape/src/descending.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}); +/***/ }), -/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count, specifier) { - var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, count), - precision; - specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatSpecifier"])(specifier == null ? ",f" : specifier); - switch (specifier.type) { - case "s": { - var value = Math.max(Math.abs(start), Math.abs(stop)); - if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionPrefix"])(step, value))) specifier.precision = precision; - return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatPrefix"])(specifier, value); - } - case "": - case "e": - case "g": - case "p": - case "r": { - if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionRound"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); - break; - } - case "f": - case "%": { - if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionFixed"])(step))) specifier.precision = precision - (specifier.type === "%") * 2; - break; - } - } - return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); +/***/ "./node_modules/d3-shape/src/identity.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-shape/src/identity.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(d) { + return d; }); /***/ }), -/***/ "./node_modules/d3-scale/src/time.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-scale/src/time.js ***! - \*******************************************/ -/*! exports provided: calendar, default */ +/***/ "./node_modules/d3-shape/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-shape/src/index.js ***! + \********************************************/ +/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calendar", function() { return calendar; }); -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); -/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); -/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js"); -/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); -/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js"); +/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "./node_modules/d3-shape/src/arc.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "./node_modules/d3-shape/src/pie.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "./node_modules/d3-shape/src/areaRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -var durationSecond = 1000, - durationMinute = durationSecond * 60, - durationHour = durationMinute * 60, - durationDay = durationHour * 24, - durationWeek = durationDay * 7, - durationMonth = durationDay * 30, - durationYear = durationDay * 365; +/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -function date(t) { - return new Date(t); -} +/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "./node_modules/d3-shape/src/link/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; }); -function number(t) { - return t instanceof Date ? +t : +new Date(+t); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; }); -function calendar(year, month, week, day, hour, minute, second, millisecond, format) { - var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_4__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_4__["identity"]), - invert = scale.invert, - domain = scale.domain; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; }); - var formatMillisecond = format(".%L"), - formatSecond = format(":%S"), - formatMinute = format("%I:%M"), - formatHour = format("%I %p"), - formatDay = format("%a %d"), - formatWeek = format("%b %d"), - formatMonth = format("%B"), - formatYear = format("%Y"); +/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "./node_modules/d3-shape/src/symbol.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - var tickIntervals = [ - [second, 1, durationSecond], - [second, 5, 5 * durationSecond], - [second, 15, 15 * durationSecond], - [second, 30, 30 * durationSecond], - [minute, 1, durationMinute], - [minute, 5, 5 * durationMinute], - [minute, 15, 15 * durationMinute], - [minute, 30, 30 * durationMinute], - [ hour, 1, durationHour ], - [ hour, 3, 3 * durationHour ], - [ hour, 6, 6 * durationHour ], - [ hour, 12, 12 * durationHour ], - [ day, 1, durationDay ], - [ day, 2, 2 * durationDay ], - [ week, 1, durationWeek ], - [ month, 1, durationMonth ], - [ month, 3, 3 * durationMonth ], - [ year, 1, durationYear ] - ]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; }); - function tickFormat(date) { - return (second(date) < date ? formatMillisecond - : minute(date) < date ? formatSecond - : hour(date) < date ? formatMinute - : day(date) < date ? formatHour - : month(date) < date ? (week(date) < date ? formatDay : formatWeek) - : year(date) < date ? formatMonth - : formatYear)(date); - } +/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - function tickInterval(interval, start, stop, step) { - if (interval == null) interval = 10; +/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - // If a desired tick count is specified, pick a reasonable tick interval - // based on the extent of the domain and a rough estimate of tick size. - // Otherwise, assume interval is already a time interval and use it. - if (typeof interval === "number") { - var target = Math.abs(stop - start) / interval, - i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target); - if (i === tickIntervals.length) { - step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start / durationYear, stop / durationYear, interval); - interval = year; - } else if (i) { - i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; - step = i[1]; - interval = i[0]; - } else { - step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, interval), 1); - interval = millisecond; - } - } +/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - return step == null ? interval : interval.every(step); - } +/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - scale.invert = function(y) { - return new Date(invert(y)); - }; +/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - scale.domain = function(_) { - return arguments.length ? domain(_array__WEBPACK_IMPORTED_MODULE_3__["map"].call(_, number)) : domain().map(date); - }; +/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - scale.ticks = function(interval, step) { - var d = domain(), - t0 = d[0], - t1 = d[d.length - 1], - r = t1 < t0, - t; - if (r) t = t0, t0 = t1, t1 = t; - t = tickInterval(interval, t0, t1, step); - t = t ? t.range(t0, t1 + 1) : []; // inclusive stop - return r ? t.reverse() : t; - }; +/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - scale.tickFormat = function(count, specifier) { - return specifier == null ? tickFormat : format(specifier); - }; +/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "./node_modules/d3-shape/src/curve/basisClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); - scale.nice = function(interval, step) { - var d = domain(); - return (interval = tickInterval(interval, d[0], d[d.length - 1], step)) - ? domain(Object(_nice__WEBPACK_IMPORTED_MODULE_6__["default"])(d, interval)) - : scale; - }; +/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "./node_modules/d3-shape/src/curve/basisOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); - scale.copy = function() { - return Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); - }; +/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); - return scale; -} +/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bundle.js */ "./node_modules/d3-shape/src/curve/bundle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return _init__WEBPACK_IMPORTED_MODULE_5__["initRange"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__["timeYear"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMonth"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeWeek"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeDay"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeHour"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMinute"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeSecond"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); -}); +/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); +/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); -/***/ }), +/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); -/***/ "./node_modules/d3-scale/src/utcTime.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-scale/src/utcTime.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "./node_modules/d3-shape/src/curve/catmullRomClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js"); -/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); -/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js"); +/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "./node_modules/d3-shape/src/curve/catmullRomOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); +/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); +/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/linearClosed.js */ "./node_modules/d3-shape/src/curve/linearClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); +/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/monotone.js */ "./node_modules/d3-shape/src/curve/monotone.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneX"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_time__WEBPACK_IMPORTED_MODULE_0__["calendar"])(d3_time__WEBPACK_IMPORTED_MODULE_2__["utcYear"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMonth"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcWeek"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcDay"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcHour"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMinute"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcSecond"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneY"]; }); +/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/natural.js */ "./node_modules/d3-shape/src/curve/natural.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); -/***/ }), +/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/step.js */ "./node_modules/d3-shape/src/curve/step.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); -/***/ "./node_modules/d3-selection/src/constant.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-selection/src/constant.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepAfter"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepBefore"]; }); +/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stack.js */ "./node_modules/d3-shape/src/stack.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); -/***/ }), +/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./offset/expand.js */ "./node_modules/d3-shape/src/offset/expand.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); -/***/ "./node_modules/d3-selection/src/create.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-selection/src/create.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/diverging.js */ "./node_modules/d3-shape/src/offset/diverging.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js"); -/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js"); +/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); +/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/silhouette.js */ "./node_modules/d3-shape/src/offset/silhouette.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); +/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/wiggle.js */ "./node_modules/d3-shape/src/offset/wiggle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - return Object(_select__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement)); -}); +/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./order/appearance.js */ "./node_modules/d3-shape/src/order/appearance.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); +/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); -/***/ }), +/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/descending.js */ "./node_modules/d3-shape/src/order/descending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); -/***/ "./node_modules/d3-selection/src/creator.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-selection/src/creator.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/insideOut.js */ "./node_modules/d3-shape/src/order/insideOut.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js"); -/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); +/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); +/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/reverse.js */ "./node_modules/d3-shape/src/order/reverse.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); -function creatorInherit(name) { - return function() { - var document = this.ownerDocument, - uri = this.namespaceURI; - return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] - ? document.createElement(name) - : document.createElementNS(uri, name); - }; -} -function creatorFixed(fullname) { - return function() { - return this.ownerDocument.createElementNS(fullname.space, fullname.local); - }; -} -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); - return (fullname.local - ? creatorFixed - : creatorInherit)(fullname); -}); + // Note: radialArea is deprecated! + // Note: radialLine is deprecated! -/***/ }), -/***/ "./node_modules/d3-selection/src/index.js": -/*!************************************************!*\ - !*** ./node_modules/d3-selection/src/index.js ***! - \************************************************/ -/*! exports provided: create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create */ "./node_modules/d3-selection/src/create.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local */ "./node_modules/d3-selection/src/local.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher */ "./node_modules/d3-selection/src/matcher.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouse */ "./node_modules/d3-selection/src/mouse.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return _point__WEBPACK_IMPORTED_MODULE_7__["default"]; }); -/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select__WEBPACK_IMPORTED_MODULE_8__["default"]; }); -/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selectAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index__WEBPACK_IMPORTED_MODULE_10__["default"]; }); -/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector */ "./node_modules/d3-selection/src/selector.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector__WEBPACK_IMPORTED_MODULE_11__["default"]; }); -/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll */ "./node_modules/d3-selection/src/selectorAll.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll__WEBPACK_IMPORTED_MODULE_12__["default"]; }); -/* harmony import */ var _selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style */ "./node_modules/d3-selection/src/selection/style.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; }); -/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./touch */ "./node_modules/d3-selection/src/touch.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__["default"]; }); -/* harmony import */ var _touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./touches */ "./node_modules/d3-selection/src/touches.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return _touches__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./window */ "./node_modules/d3-selection/src/window.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["event"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["customEvent"]; }); @@ -23352,855 +21222,791 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./node_modules/d3-selection/src/local.js": -/*!************************************************!*\ - !*** ./node_modules/d3-selection/src/local.js ***! - \************************************************/ +/***/ "./node_modules/d3-shape/src/line.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-shape/src/line.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; }); -var nextId = 0; - -function local() { - return new Local; -} - -function Local() { - this._ = "@" + (++nextId).toString(36); -} - -Local.prototype = local.prototype = { - constructor: Local, - get: function(node) { - var id = this._; - while (!(id in node)) if (!(node = node.parentNode)) return; - return node[id]; - }, - set: function(node, value) { - return node[this._] = value; - }, - remove: function(node) { - return this._ in node && delete node[this._]; - }, - toString: function() { - return this._; - } -}; - - -/***/ }), +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js"); -/***/ "./node_modules/d3-selection/src/matcher.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-selection/src/matcher.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(selector) { - return function() { - return this.matches(selector); - }; -}); -/***/ }), -/***/ "./node_modules/d3-selection/src/mouse.js": -/*!************************************************!*\ - !*** ./node_modules/d3-selection/src/mouse.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], + y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], + defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), + context = null, + curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], + output = null; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); -/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); + function line(data) { + var i, + n = data.length, + d, + defined0 = false, + buffer; + if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) output.lineStart(); + else output.lineEnd(); + } + if (defined0) output.point(+x(d, i, data), +y(d, i, data)); + } -/* harmony default export */ __webpack_exports__["default"] = (function(node) { - var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])(); - if (event.changedTouches) event = event.changedTouches[0]; - return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, event); -}); + if (buffer) return output = null, buffer + "" || null; + } + line.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : x; + }; -/***/ }), + line.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : y; + }; -/***/ "./node_modules/d3-selection/src/namespace.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-selection/src/namespace.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + line.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), line) : defined; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js"); + line.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; + }; + line.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - var prefix = name += "", i = prefix.indexOf(":"); - if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); - return _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name; + return line; }); /***/ }), -/***/ "./node_modules/d3-selection/src/namespaces.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-selection/src/namespaces.js ***! - \*****************************************************/ -/*! exports provided: xhtml, default */ +/***/ "./node_modules/d3-shape/src/lineRadial.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-shape/src/lineRadial.js ***! + \*************************************************/ +/*! exports provided: lineRadial, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; }); -var xhtml = "http://www.w3.org/1999/xhtml"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; }); +/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js"); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); -/* harmony default export */ __webpack_exports__["default"] = ({ - svg: "http://www.w3.org/2000/svg", - xhtml: xhtml, - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -}); -/***/ }), +function lineRadial(l) { + var c = l.curve; -/***/ "./node_modules/d3-selection/src/point.js": -/*!************************************************!*\ - !*** ./node_modules/d3-selection/src/point.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(node, event) { - var svg = node.ownerSVGElement || node; + l.curve = function(_) { + return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; + }; - if (svg.createSVGPoint) { - var point = svg.createSVGPoint(); - point.x = event.clientX, point.y = event.clientY; - point = point.matrixTransform(node.getScreenCTM().inverse()); - return [point.x, point.y]; - } + return l; +} - var rect = node.getBoundingClientRect(); - return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; +/* harmony default export */ __webpack_exports__["default"] = (function() { + return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"])); }); /***/ }), -/***/ "./node_modules/d3-selection/src/select.js": +/***/ "./node_modules/d3-shape/src/link/index.js": /*!*************************************************!*\ - !*** ./node_modules/d3-selection/src/select.js ***! + !*** ./node_modules/d3-shape/src/link/index.js ***! \*************************************************/ -/*! exports provided: default */ +/*! exports provided: linkHorizontal, linkVertical, linkRadial */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-shape/src/array.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "./node_modules/d3-shape/src/point.js"); +/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(selector) { - return typeof selector === "string" - ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement]) - : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); -}); -/***/ }), -/***/ "./node_modules/d3-selection/src/selectAll.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-selection/src/selectAll.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js"); +function linkSource(d) { + return d.source; +} -/* harmony default export */ __webpack_exports__["default"] = (function(selector) { - return typeof selector === "string" - ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([document.querySelectorAll(selector)], [document.documentElement]) - : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); -}); +function linkTarget(d) { + return d.target; +} +function link(curve) { + var source = linkSource, + target = linkTarget, + x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], + y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], + context = null; -/***/ }), + function link() { + var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); + curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); + if (buffer) return context = null, buffer + "" || null; + } -/***/ "./node_modules/d3-selection/src/selection/append.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/append.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + link.source = function(_) { + return arguments.length ? (source = _, link) : source; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js"); + link.target = function(_) { + return arguments.length ? (target = _, link) : target; + }; + link.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name); - return this.select(function() { - return this.appendChild(create.apply(this, arguments)); - }); -}); + link.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y; + }; + link.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), link) : context; + }; -/***/ }), + return link; +} -/***/ "./node_modules/d3-selection/src/selection/attr.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/attr.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace */ "./node_modules/d3-selection/src/namespace.js"); +function curveVertical(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); +} - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; +function curveRadial(context, x0, y0, x1, y1) { + var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0), + p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2), + p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0), + p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1); + context.moveTo(p0[0], p0[1]); + context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); } -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; +function linkHorizontal() { + return link(curveHorizontal); } -function attrConstant(name, value) { - return function() { - this.setAttribute(name, value); - }; +function linkVertical() { + return link(curveVertical); } -function attrConstantNS(fullname, value) { - return function() { - this.setAttributeNS(fullname.space, fullname.local, value); - }; +function linkRadial() { + var l = link(curveRadial); + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + return l; } -function attrFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttribute(name); - else this.setAttribute(name, v); - }; -} -function attrFunctionNS(fullname, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttributeNS(fullname.space, fullname.local); - else this.setAttributeNS(fullname.space, fullname.local, v); - }; -} +/***/ }), -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); +/***/ "./node_modules/d3-shape/src/math.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-shape/src/math.js ***! + \*******************************************/ +/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (arguments.length < 2) { - var node = this.node(); - return fullname.local - ? node.getAttributeNS(fullname.space, fullname.local) - : node.getAttribute(fullname); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); +var abs = Math.abs; +var atan2 = Math.atan2; +var cos = Math.cos; +var max = Math.max; +var min = Math.min; +var sin = Math.sin; +var sqrt = Math.sqrt; - return this.each((value == null - ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction) - : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); -}); +var epsilon = 1e-12; +var pi = Math.PI; +var halfPi = pi / 2; +var tau = 2 * pi; + +function acos(x) { + return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); +} + +function asin(x) { + return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); +} /***/ }), -/***/ "./node_modules/d3-selection/src/selection/call.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/call.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/noop.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-shape/src/noop.js ***! + \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var callback = arguments[0]; - arguments[0] = this; - callback.apply(null, arguments); - return this; -}); +/* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/classed.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/classed.js ***! - \************************************************************/ +/***/ "./node_modules/d3-shape/src/offset/diverging.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-shape/src/offset/diverging.js ***! + \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function classArray(string) { - return string.trim().split(/^|\s+/); -} - -function classList(node) { - return node.classList || new ClassList(node); -} - -function ClassList(node) { - this._node = node; - this._names = classArray(node.getAttribute("class") || ""); -} - -ClassList.prototype = { - add: function(name) { - var i = this._names.indexOf(name); - if (i < 0) { - this._names.push(name); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - remove: function(name) { - var i = this._names.indexOf(name); - if (i >= 0) { - this._names.splice(i, 1); - this._node.setAttribute("class", this._names.join(" ")); +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { + for (yp = yn = 0, i = 0; i < n; ++i) { + if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { + d[0] = yp, d[1] = yp += dy; + } else if (dy < 0) { + d[1] = yn, d[0] = yn += dy; + } else { + d[0] = 0, d[1] = dy; + } } - }, - contains: function(name) { - return this._names.indexOf(name) >= 0; - } -}; - -function classedAdd(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.add(names[i]); -} - -function classedRemove(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.remove(names[i]); -} - -function classedTrue(names) { - return function() { - classedAdd(this, names); - }; -} - -function classedFalse(names) { - return function() { - classedRemove(this, names); - }; -} - -function classedFunction(names, value) { - return function() { - (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); - }; -} - -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - var names = classArray(name + ""); - - if (arguments.length < 2) { - var list = classList(this.node()), i = -1, n = names.length; - while (++i < n) if (!list.contains(names[i])) return false; - return true; } - - return this.each((typeof value === "function" - ? classedFunction : value - ? classedTrue - : classedFalse)(names, value)); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/clone.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/clone.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/offset/expand.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/offset/expand.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function selection_cloneShallow() { - var clone = this.cloneNode(false), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); -function selection_cloneDeep() { - var clone = this.cloneNode(true), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} -/* harmony default export */ __webpack_exports__["default"] = (function(deep) { - return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { + for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; + if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; + } + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/data.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/data.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/offset/none.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-shape/src/offset/none.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); -/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js"); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ "./node_modules/d3-selection/src/constant.js"); - - - - -var keyPrefix = "$"; // Protect against keys like “__proto__”. - -function bindIndex(parent, group, enter, update, exit, data) { - var i = 0, - node, - groupLength = group.length, - dataLength = data.length; - - // Put any non-null nodes that fit into update. - // Put any null nodes into enter. - // Put any remaining data into enter. - for (; i < dataLength; ++i) { - if (node = group[i]) { - node.__data__ = data[i]; - update[i] = node; - } else { - enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 1)) return; + for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { + s0 = s1, s1 = series[order[i]]; + for (j = 0; j < m; ++j) { + s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; } } +}); - // Put any non-null nodes that don’t fit into exit. - for (; i < groupLength; ++i) { - if (node = group[i]) { - exit[i] = node; - } - } -} -function bindKey(parent, group, enter, update, exit, data, key) { - var i, - node, - nodeByKeyValue = {}, - groupLength = group.length, - dataLength = data.length, - keyValues = new Array(groupLength), - keyValue; +/***/ }), - // Compute the key for each node. - // If multiple nodes have the same key, the duplicates are added to exit. - for (i = 0; i < groupLength; ++i) { - if (node = group[i]) { - keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); - if (keyValue in nodeByKeyValue) { - exit[i] = node; - } else { - nodeByKeyValue[keyValue] = node; - } - } - } +/***/ "./node_modules/d3-shape/src/offset/silhouette.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-shape/src/offset/silhouette.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // Compute the key for each datum. - // If there a node associated with this key, join and add it to update. - // If there is not (or the key is a duplicate), add it to enter. - for (i = 0; i < dataLength; ++i) { - keyValue = keyPrefix + key.call(parent, data[i], i, data); - if (node = nodeByKeyValue[keyValue]) { - update[i] = node; - node.__data__ = data[i]; - nodeByKeyValue[keyValue] = null; - } else { - enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); - } - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); - // Add any remaining nodes that were not bound to data to exit. - for (i = 0; i < groupLength; ++i) { - if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { - exit[i] = node; - } - } -} -/* harmony default export */ __webpack_exports__["default"] = (function(value, key) { - if (!value) { - data = new Array(this.size()), j = -1; - this.each(function(d) { data[++j] = d; }); - return data; +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { + for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; + s0[j][1] += s0[j][0] = -y / 2; } + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); +}); - var bind = key ? bindKey : bindIndex, - parents = this._parents, - groups = this._groups; - if (typeof value !== "function") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(value); +/***/ }), - for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { - var parent = parents[j], - group = groups[j], - groupLength = group.length, - data = value.call(parent, parent && parent.__data__, j, parents), - dataLength = data.length, - enterGroup = enter[j] = new Array(dataLength), - updateGroup = update[j] = new Array(dataLength), - exitGroup = exit[j] = new Array(groupLength); +/***/ "./node_modules/d3-shape/src/offset/wiggle.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/offset/wiggle.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); - // Now connect the enter nodes to their following update node, such that - // appendChild can insert the materialized enter node before this node, - // rather than at the end of the parent node. - for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { - if (previous = enterGroup[i0]) { - if (i0 >= i1) i1 = i0 + 1; - while (!(next = updateGroup[i1]) && ++i1 < dataLength); - previous._next = next || null; + +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; + for (var y = 0, j = 1, s0, m, n; j < m; ++j) { + for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { + var si = series[order[i]], + sij0 = si[j][1] || 0, + sij1 = si[j - 1][1] || 0, + s3 = (sij0 - sij1) / 2; + for (var k = 0; k < i; ++k) { + var sk = series[order[k]], + skj0 = sk[j][1] || 0, + skj1 = sk[j - 1][1] || 0; + s3 += skj0 - skj1; } + s1 += sij0, s2 += s3 * sij0; } + s0[j - 1][1] += s0[j - 1][0] = y; + if (s1) y -= s2 / s1; } - - update = new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents); - update._enter = enter; - update._exit = exit; - return update; + s0[j - 1][1] += s0[j - 1][0] = y; + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/datum.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/datum.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/order/appearance.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-shape/src/order/appearance.js ***! + \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return arguments.length - ? this.property("__data__", value) - : this.node().__data__; +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var peaks = series.map(peak); + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); }); +function peak(series) { + var i = -1, j = 0, n = series.length, vi, vj = -Infinity; + while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; + return j; +} + /***/ }), -/***/ "./node_modules/d3-selection/src/selection/dispatch.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/dispatch.js ***! - \*************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-shape/src/order/ascending.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-shape/src/order/ascending.js ***! + \******************************************************/ +/*! exports provided: default, sum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js"); - - -function dispatchEvent(node, type, params) { - var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node), - event = window.CustomEvent; - - if (typeof event === "function") { - event = new event(type, params); - } else { - event = window.document.createEvent("Event"); - if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; - else event.initEvent(type, false, false); - } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; }); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); - node.dispatchEvent(event); -} -function dispatchConstant(type, params) { - return function() { - return dispatchEvent(this, type, params); - }; -} +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var sums = series.map(sum); + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; }); +}); -function dispatchFunction(type, params) { - return function() { - return dispatchEvent(this, type, params.apply(this, arguments)); - }; +function sum(series) { + var s = 0, i = -1, n = series.length, v; + while (++i < n) if (v = +series[i][1]) s += v; + return s; } -/* harmony default export */ __webpack_exports__["default"] = (function(type, params) { - return this.each((typeof params === "function" - ? dispatchFunction - : dispatchConstant)(type, params)); -}); - /***/ }), -/***/ "./node_modules/d3-selection/src/selection/each.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/each.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/order/descending.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-shape/src/order/descending.js ***! + \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(callback) { +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) callback.call(node, node.__data__, i, group); - } - } - return this; +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/empty.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/empty.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/order/insideOut.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-shape/src/order/insideOut.js ***! + \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return !this.node(); -}); - +/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "./node_modules/d3-shape/src/order/appearance.js"); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); -/***/ }), -/***/ "./node_modules/d3-selection/src/selection/enter.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/enter.js ***! - \**********************************************************/ -/*! exports provided: default, EnterNode */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; }); -/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js"); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var n = series.length, + i, + j, + sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]), + order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series), + top = 0, + bottom = 0, + tops = [], + bottoms = []; + for (i = 0; i < n; ++i) { + j = order[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); + return bottoms.reverse().concat(tops); }); -function EnterNode(parent, datum) { - this.ownerDocument = parent.ownerDocument; - this.namespaceURI = parent.namespaceURI; - this._next = null; - this._parent = parent; - this.__data__ = datum; -} -EnterNode.prototype = { - constructor: EnterNode, - appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, - insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, - querySelector: function(selector) { return this._parent.querySelector(selector); }, - querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } -}; +/***/ }), + +/***/ "./node_modules/d3-shape/src/order/none.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-shape/src/order/none.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var n = series.length, o = new Array(n); + while (--n >= 0) o[n] = n; + return o; +}); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/exit.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/exit.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/order/reverse.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/order/reverse.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js"); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); - +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/filter.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/filter.js ***! - \***********************************************************/ +/***/ "./node_modules/d3-shape/src/pie.js": +/*!******************************************!*\ + !*** ./node_modules/d3-shape/src/pie.js ***! + \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); -/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher */ "./node_modules/d3-selection/src/matcher.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending.js */ "./node_modules/d3-shape/src/descending.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-shape/src/identity.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(match) { - if (typeof match !== "function") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__["default"])(match); - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var value = _identity_js__WEBPACK_IMPORTED_MODULE_2__["default"], + sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_1__["default"], + sort = null, + startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0), + endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"]), + padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0); + + function pie(data) { + var i, + n = data.length, + j, + k, + sum = 0, + index = new Array(n), + arcs = new Array(n), + a0 = +startAngle.apply(this, arguments), + da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], endAngle.apply(this, arguments) - a0)), + a1, + p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), + pa = p * (da < 0 ? -1 : 1), + v; + + for (i = 0; i < n; ++i) { + if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { + sum += v; } } + + // Optionally sort the arcs by previously-computed values or by data. + if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); + else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); + + // Compute the arcs! They are stored in the original data's order. + for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { + j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p + }; + } + + return arcs; } - return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); + pie.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : value; + }; + + pie.sortValues = function(_) { + return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; + }; + + pie.sort = function(_) { + return arguments.length ? (sort = _, sortValues = null, pie) : sort; + }; + + pie.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : startAngle; + }; + + pie.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : endAngle; + }; + + pie.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : padAngle; + }; + + return pie; }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/html.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/html.js ***! - \*********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-shape/src/point.js": +/*!********************************************!*\ + !*** ./node_modules/d3-shape/src/point.js ***! + \********************************************/ +/*! exports provided: x, y */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function htmlRemove() { - this.innerHTML = ""; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); +function x(p) { + return p[0]; } -function htmlConstant(value) { - return function() { - this.innerHTML = value; - }; +function y(p) { + return p[1]; } -function htmlFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.innerHTML = v == null ? "" : v; - }; -} -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return arguments.length - ? this.each(value == null - ? htmlRemove : (typeof value === "function" - ? htmlFunction - : htmlConstant)(value)) - : this.node().innerHTML; +/***/ }), + +/***/ "./node_modules/d3-shape/src/pointRadial.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-shape/src/pointRadial.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { + return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/index.js ***! - \**********************************************************/ -/*! exports provided: root, Selection, default */ +/***/ "./node_modules/d3-shape/src/stack.js": +/*!********************************************!*\ + !*** ./node_modules/d3-shape/src/stack.js ***! + \********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); -/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/selection/select.js"); -/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selection/selectAll.js"); -/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./node_modules/d3-selection/src/selection/filter.js"); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data */ "./node_modules/d3-selection/src/selection/data.js"); -/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js"); -/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exit */ "./node_modules/d3-selection/src/selection/exit.js"); -/* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./join */ "./node_modules/d3-selection/src/selection/join.js"); -/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge */ "./node_modules/d3-selection/src/selection/merge.js"); -/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./order */ "./node_modules/d3-selection/src/selection/order.js"); -/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sort */ "./node_modules/d3-selection/src/selection/sort.js"); -/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./call */ "./node_modules/d3-selection/src/selection/call.js"); -/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./nodes */ "./node_modules/d3-selection/src/selection/nodes.js"); -/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node */ "./node_modules/d3-selection/src/selection/node.js"); -/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./size */ "./node_modules/d3-selection/src/selection/size.js"); -/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./empty */ "./node_modules/d3-selection/src/selection/empty.js"); -/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./each */ "./node_modules/d3-selection/src/selection/each.js"); -/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./attr */ "./node_modules/d3-selection/src/selection/attr.js"); -/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./style */ "./node_modules/d3-selection/src/selection/style.js"); -/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./property */ "./node_modules/d3-selection/src/selection/property.js"); -/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./classed */ "./node_modules/d3-selection/src/selection/classed.js"); -/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./text */ "./node_modules/d3-selection/src/selection/text.js"); -/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./html */ "./node_modules/d3-selection/src/selection/html.js"); -/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./raise */ "./node_modules/d3-selection/src/selection/raise.js"); -/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./lower */ "./node_modules/d3-selection/src/selection/lower.js"); -/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./append */ "./node_modules/d3-selection/src/selection/append.js"); -/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./insert */ "./node_modules/d3-selection/src/selection/insert.js"); -/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./remove */ "./node_modules/d3-selection/src/selection/remove.js"); -/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ "./node_modules/d3-selection/src/selection/clone.js"); -/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./datum */ "./node_modules/d3-selection/src/selection/datum.js"); -/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./on */ "./node_modules/d3-selection/src/selection/on.js"); -/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./dispatch */ "./node_modules/d3-selection/src/selection/dispatch.js"); - +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-shape/src/array.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js"); +/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js"); +function stackValue(d, key) { + return d[key]; +} +/* harmony default export */ __webpack_exports__["default"] = (function() { + var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]), + order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"], + offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"], + value = stackValue; + function stack(data) { + var kz = keys.apply(this, arguments), + i, + m = data.length, + n = kz.length, + sz = new Array(n), + oz; + for (i = 0; i < n; ++i) { + for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) { + si[j] = sij = [0, +value(data[j], ki, j, data)]; + sij.data = data[j]; + } + si.key = ki; + } + for (i = 0, oz = order(sz); i < n; ++i) { + sz[oz[i]].index = i; + } + offset(sz, oz); + return sz; + } + stack.keys = function(_) { + return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : keys; + }; + stack.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value; + }; + stack.order = function(_) { + return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : order; + }; + stack.offset = function(_) { + return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset; + }; + return stack; +}); +/***/ }), +/***/ "./node_modules/d3-shape/src/symbol.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-shape/src/symbol.js ***! + \*********************************************/ +/*! exports provided: symbols, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js"); +/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js"); +/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js"); +/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js"); +/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js"); +/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js"); +/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); @@ -24211,12225 +22017,12451 @@ __webpack_require__.r(__webpack_exports__); +var symbols = [ + _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], + _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"], + _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"], + _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"], + _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"], + _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"], + _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"] +]; +/* harmony default export */ __webpack_exports__["default"] = (function() { + var type = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]), + size = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(64), + context = null; -var root = [null]; + function symbol() { + var buffer; + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); + type.apply(this, arguments).draw(context, +size.apply(this, arguments)); + if (buffer) return context = null, buffer + "" || null; + } -function Selection(groups, parents) { - this._groups = groups; - this._parents = parents; -} + symbol.type = function(_) { + return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type; + }; -function selection() { - return new Selection([[document.documentElement]], root); -} + symbol.size = function(_) { + return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size; + }; -Selection.prototype = selection.prototype = { - constructor: Selection, - select: _select__WEBPACK_IMPORTED_MODULE_0__["default"], - selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__["default"], - filter: _filter__WEBPACK_IMPORTED_MODULE_2__["default"], - data: _data__WEBPACK_IMPORTED_MODULE_3__["default"], - enter: _enter__WEBPACK_IMPORTED_MODULE_4__["default"], - exit: _exit__WEBPACK_IMPORTED_MODULE_5__["default"], - join: _join__WEBPACK_IMPORTED_MODULE_6__["default"], - merge: _merge__WEBPACK_IMPORTED_MODULE_7__["default"], - order: _order__WEBPACK_IMPORTED_MODULE_8__["default"], - sort: _sort__WEBPACK_IMPORTED_MODULE_9__["default"], - call: _call__WEBPACK_IMPORTED_MODULE_10__["default"], - nodes: _nodes__WEBPACK_IMPORTED_MODULE_11__["default"], - node: _node__WEBPACK_IMPORTED_MODULE_12__["default"], - size: _size__WEBPACK_IMPORTED_MODULE_13__["default"], - empty: _empty__WEBPACK_IMPORTED_MODULE_14__["default"], - each: _each__WEBPACK_IMPORTED_MODULE_15__["default"], - attr: _attr__WEBPACK_IMPORTED_MODULE_16__["default"], - style: _style__WEBPACK_IMPORTED_MODULE_17__["default"], - property: _property__WEBPACK_IMPORTED_MODULE_18__["default"], - classed: _classed__WEBPACK_IMPORTED_MODULE_19__["default"], - text: _text__WEBPACK_IMPORTED_MODULE_20__["default"], - html: _html__WEBPACK_IMPORTED_MODULE_21__["default"], - raise: _raise__WEBPACK_IMPORTED_MODULE_22__["default"], - lower: _lower__WEBPACK_IMPORTED_MODULE_23__["default"], - append: _append__WEBPACK_IMPORTED_MODULE_24__["default"], - insert: _insert__WEBPACK_IMPORTED_MODULE_25__["default"], - remove: _remove__WEBPACK_IMPORTED_MODULE_26__["default"], - clone: _clone__WEBPACK_IMPORTED_MODULE_27__["default"], - datum: _datum__WEBPACK_IMPORTED_MODULE_28__["default"], - on: _on__WEBPACK_IMPORTED_MODULE_29__["default"], - dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_30__["default"] -}; + symbol.context = function(_) { + return arguments.length ? (context = _ == null ? null : _, symbol) : context; + }; -/* harmony default export */ __webpack_exports__["default"] = (selection); + return symbol; +}); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/insert.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/insert.js ***! - \***********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/circle.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/circle.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js"); -/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js"); - - +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); -function constantNull() { - return null; -} -/* harmony default export */ __webpack_exports__["default"] = (function(name, before) { - var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name), - select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(before); - return this.select(function() { - return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); - }); +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]); + context.moveTo(r, 0); + context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); + } }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/join.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/join.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/cross.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/cross.js ***! + \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(onenter, onupdate, onexit) { - var enter = this.enter(), update = this, exit = this.exit(); - enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); - if (onupdate != null) update = onupdate(update); - if (onexit == null) exit.remove(); else onexit(exit); - return enter && update ? enter.merge(update).order() : update; +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / 5) / 2; + context.moveTo(-3 * r, -r); + context.lineTo(-r, -r); + context.lineTo(-r, -3 * r); + context.lineTo(r, -3 * r); + context.lineTo(r, -r); + context.lineTo(3 * r, -r); + context.lineTo(3 * r, r); + context.lineTo(r, r); + context.lineTo(r, 3 * r); + context.lineTo(-r, 3 * r); + context.lineTo(-r, r); + context.lineTo(-3 * r, r); + context.closePath(); + } }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/lower.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/lower.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/diamond.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/diamond.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function lower() { - if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); -} +var tan30 = Math.sqrt(1 / 3), + tan30_2 = tan30 * 2; -/* harmony default export */ __webpack_exports__["default"] = (function() { - return this.each(lower); +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var y = Math.sqrt(size / tan30_2), + x = y * tan30; + context.moveTo(0, -y); + context.lineTo(x, 0); + context.lineTo(0, y); + context.lineTo(-x, 0); + context.closePath(); + } }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/merge.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/merge.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/square.js": +/*!****************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/square.js ***! + \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(selection) { - - for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var w = Math.sqrt(size), + x = -w / 2; + context.rect(x, x, w, w); } - - return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents); }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/node.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/node.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/star.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/star.js ***! + \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { - var node = group[i]; - if (node) return node; + +var ka = 0.89081309152928522810, + kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10), + kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr, + ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr; + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size * ka), + x = kx * r, + y = ky * r; + context.moveTo(0, -r); + context.lineTo(x, y); + for (var i = 1; i < 5; ++i) { + var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5, + c = Math.cos(a), + s = Math.sin(a); + context.lineTo(s * r, -c * r); + context.lineTo(c * x - s * y, s * x + c * y); } + context.closePath(); } - - return null; }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/nodes.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/nodes.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/triangle.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/triangle.js ***! + \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var nodes = new Array(this.size()), i = -1; - this.each(function() { nodes[++i] = this; }); - return nodes; -}); - - -/***/ }), - -/***/ "./node_modules/d3-selection/src/selection/on.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/on.js ***! - \*******************************************************/ -/*! exports provided: event, default, customEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return customEvent; }); -var filterEvents = {}; - -var event = null; - -if (typeof document !== "undefined") { - var element = document.documentElement; - if (!("onmouseenter" in element)) { - filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; - } -} - -function filterContextListener(listener, index, group) { - listener = contextListener(listener, index, group); - return function(event) { - var related = event.relatedTarget; - if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { - listener.call(this, event); - } - }; -} - -function contextListener(listener, index, group) { - return function(event1) { - var event0 = event; // Events can be reentrant (e.g., focus). - event = event1; - try { - listener.call(this, this.__data__, index, group); - } finally { - event = event0; - } - }; -} - -function parseTypenames(typenames) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - return {type: t, name: name}; - }); -} - -function onRemove(typename) { - return function() { - var on = this.__on; - if (!on) return; - for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { - if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.capture); - } else { - on[++i] = o; - } - } - if (++i) on.length = i; - else delete this.__on; - }; -} - -function onAdd(typename, value, capture) { - var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; - return function(d, i, group) { - var on = this.__on, o, listener = wrap(value, i, group); - if (on) for (var j = 0, m = on.length; j < m; ++j) { - if ((o = on[j]).type === typename.type && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.capture); - this.addEventListener(o.type, o.listener = listener, o.capture = capture); - o.value = value; - return; - } - } - this.addEventListener(typename.type, listener, capture); - o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; - if (!on) this.__on = [o]; - else on.push(o); - }; -} - -/* harmony default export */ __webpack_exports__["default"] = (function(typename, value, capture) { - var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; +var sqrt3 = Math.sqrt(3); - if (arguments.length < 2) { - var on = this.node().__on; - if (on) for (var j = 0, m = on.length, o; j < m; ++j) { - for (i = 0, o = on[j]; i < n; ++i) { - if ((t = typenames[i]).type === o.type && t.name === o.name) { - return o.value; - } - } - } - return; +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var y = -Math.sqrt(size / (sqrt3 * 3)); + context.moveTo(0, y * 2); + context.lineTo(-sqrt3 * y, -y); + context.lineTo(sqrt3 * y, -y); + context.closePath(); } - - on = value ? onAdd : onRemove; - if (capture == null) capture = false; - for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); - return this; }); -function customEvent(event1, listener, that, args) { - var event0 = event; - event1.sourceEvent = event; - event = event1; - try { - return listener.apply(that, args); - } finally { - event = event0; - } -} - /***/ }), -/***/ "./node_modules/d3-selection/src/selection/order.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/order.js ***! - \**********************************************************/ +/***/ "./node_modules/d3-shape/src/symbol/wye.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-shape/src/symbol/wye.js ***! + \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { +var c = -0.5, + s = Math.sqrt(3) / 2, + k = 1 / Math.sqrt(12), + a = (k / 2 + 1) * 3; - for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { - for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { - if (node = group[i]) { - if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); - next = node; - } - } +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / a), + x0 = r / 2, + y0 = r * k, + x1 = x0, + y1 = r * k + r, + x2 = -x1, + y2 = y1; + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + context.lineTo(c * x0 - s * y0, s * x0 + c * y0); + context.lineTo(c * x1 - s * y1, s * x1 + c * y1); + context.lineTo(c * x2 - s * y2, s * x2 + c * y2); + context.lineTo(c * x0 + s * y0, c * y0 - s * x0); + context.lineTo(c * x1 + s * y1, c * y1 - s * x1); + context.lineTo(c * x2 + s * y2, c * y2 - s * x2); + context.closePath(); } - - return this; }); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/property.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/property.js ***! - \*************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time-format/src/defaultLocale.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-time-format/src/defaultLocale.js ***! + \**********************************************************/ +/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function propertyRemove(name) { - return function() { - delete this[name]; - }; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); +/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js"); -function propertyConstant(name, value) { - return function() { - this[name] = value; - }; -} -function propertyFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) delete this[name]; - else this[name] = v; - }; -} +var locale; +var timeFormat; +var timeParse; +var utcFormat; +var utcParse; -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - return arguments.length > 1 - ? this.each((value == null - ? propertyRemove : typeof value === "function" - ? propertyFunction - : propertyConstant)(name, value)) - : this.node()[name]; +defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }); - -/***/ }), - -/***/ "./node_modules/d3-selection/src/selection/raise.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/raise.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function raise() { - if (this.nextSibling) this.parentNode.appendChild(this); +function defaultLocale(definition) { + locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); + timeFormat = locale.format; + timeParse = locale.parse; + utcFormat = locale.utcFormat; + utcParse = locale.utcParse; + return locale; } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return this.each(raise); -}); - /***/ }), -/***/ "./node_modules/d3-selection/src/selection/remove.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/remove.js ***! - \***********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time-format/src/index.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-time-format/src/index.js ***! + \**************************************************/ +/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function remove() { - var parent = this.parentNode; - if (parent) parent.removeChild(this); -} +/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return this.each(remove); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeFormat"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeParse"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"]; }); -/***/ "./node_modules/d3-selection/src/selection/select.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/select.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcParse"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); -/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js"); +/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ "./node_modules/d3-time-format/src/isoParse.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(select) { - if (typeof select !== "function") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(select); - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - } - } - } - return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); -}); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/selectAll.js": -/*!**************************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/selectAll.js ***! - \**************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time-format/src/isoFormat.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-time-format/src/isoFormat.js ***! + \******************************************************/ +/*! exports provided: isoSpecifier, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); -/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selectorAll */ "./node_modules/d3-selection/src/selectorAll.js"); - - - -/* harmony default export */ __webpack_exports__["default"] = (function(select) { - if (typeof select !== "function") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__["default"])(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - subgroups.push(select.call(node, node.__data__, i, group)); - parents.push(node); - } - } - } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isoSpecifier", function() { return isoSpecifier; }); +/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); - return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents); -}); +var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; -/***/ }), +function formatIsoNative(date) { + return date.toISOString(); +} -/***/ "./node_modules/d3-selection/src/selection/size.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/size.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var formatIso = Date.prototype.toISOString + ? formatIsoNative + : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"])(isoSpecifier); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var size = 0; - this.each(function() { ++size; }); - return size; -}); +/* harmony default export */ __webpack_exports__["default"] = (formatIso); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/sort.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/sort.js ***! - \*********************************************************/ +/***/ "./node_modules/d3-time-format/src/isoParse.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-time-format/src/isoParse.js ***! + \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(compare) { - if (!compare) compare = ascending; - - function compareNode(a, b) { - return a && b ? compare(a.__data__, b.__data__) : !a - !b; - } +/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js"); +/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); - for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group[i]) { - sortgroup[i] = node; - } - } - sortgroup.sort(compareNode); - } - return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order(); -}); -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +function parseIsoNative(string) { + var date = new Date(string); + return isNaN(date) ? null : date; } +var parseIso = +new Date("2000-01-01T00:00:00.000Z") + ? parseIsoNative + : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__["utcParse"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__["isoSpecifier"]); -/***/ }), - -/***/ "./node_modules/d3-selection/src/selection/sparse.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/sparse.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(update) { - return new Array(update.length); -}); +/* harmony default export */ __webpack_exports__["default"] = (parseIso); /***/ }), -/***/ "./node_modules/d3-selection/src/selection/style.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/style.js ***! - \**********************************************************/ -/*! exports provided: default, styleValue */ +/***/ "./node_modules/d3-time-format/src/locale.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-time-format/src/locale.js ***! + \***************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; }); -/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatLocale; }); +/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; +function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); } -function styleConstant(name, value, priority) { - return function() { - this.style.setProperty(name, value, priority); - }; +function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); } -function styleFunction(name, value, priority) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.style.removeProperty(name); - else this.style.setProperty(name, v, priority); - }; +function newDate(y, m, d) { + return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; } -/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { - return arguments.length > 1 - ? this.each((value == null - ? styleRemove : typeof value === "function" - ? styleFunction - : styleConstant)(name, value, priority == null ? "" : priority)) - : styleValue(this.node(), name); -}); +function formatLocale(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; -function styleValue(node, name) { - return node.style.getPropertyValue(name) - || Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name); -} - - -/***/ }), - -/***/ "./node_modules/d3-selection/src/selection/text.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-selection/src/selection/text.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); -"use strict"; -__webpack_require__.r(__webpack_exports__); -function textRemove() { - this.textContent = ""; -} + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; -function textConstant(value) { - return function() { - this.textContent = value; + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent }; -} -function textFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.textContent = v == null ? "" : v; + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent }; -} -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return arguments.length - ? this.each(value == null - ? textRemove : (typeof value === "function" - ? textFunction - : textConstant)(value)) - : this.node().textContent; -}); + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + function newFormat(specifier, formats) { + return function(date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; -/***/ }), + if (!(date instanceof Date)) date = new Date(+date); -/***/ "./node_modules/d3-selection/src/selector.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-selection/src/selector.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); + else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -function none() {} + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } -/* harmony default export */ __webpack_exports__["default"] = (function(selector) { - return selector == null ? none : function() { - return this.querySelector(selector); - }; -}); + function newParse(specifier, Z) { + return function(string) { + var d = newDate(1900, undefined, 1), + i = parseSpecifier(d, specifier, string += "", 0), + week, day; + if (i != string.length) return null; + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); -/***/ }), + // If this is utcParse, never use the local timezone. + if (Z && !("Z" in d)) d.Z = 0; -/***/ "./node_modules/d3-selection/src/selectorAll.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-selection/src/selectorAll.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; -"use strict"; -__webpack_require__.r(__webpack_exports__); -function empty() { - return []; -} + // If the month was not specified, inherit from the quarter. + if (d.m === undefined) d.m = "q" in d ? d.q : 0; -/* harmony default export */ __webpack_exports__["default"] = (function(selector) { - return selector == null ? empty : function() { - return this.querySelectorAll(selector); - }; -}); + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); + week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"])(week); + week = d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); + week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"])(week); + week = d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; + } + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } -/***/ }), + // Otherwise, all fields are in local time. + return localDate(d); + }; + } -/***/ "./node_modules/d3-selection/src/sourceEvent.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-selection/src/sourceEvent.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js"); + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || ((j = parse(d, string, j)) < 0)) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } -/* harmony default export */ __webpack_exports__["default"] = (function() { - var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__["event"], source; - while (source = current.sourceEvent) current = source; - return current; -}); + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } -/***/ }), + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } -/***/ "./node_modules/d3-selection/src/touch.js": -/*!************************************************!*\ - !*** ./node_modules/d3-selection/src/touch.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); -/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } -/* harmony default export */ __webpack_exports__["default"] = (function(node, touches, identifier) { - if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().changedTouches; + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } - for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { - if ((touch = touches[i]).identifier === identifier) { - return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touch); - } + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; } - return null; -}); + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } -/***/ }), + function formatMonth(d) { + return locale_months[d.getMonth()]; + } -/***/ "./node_modules/d3-selection/src/touches.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-selection/src/touches.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js"); -/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js"); + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } -/* harmony default export */ __webpack_exports__["default"] = (function(node, touches) { - if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().touches; + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } - for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) { - points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touches[i]); + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; } - return points; -}); + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } -/***/ }), + return { + format: function(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function() { return specifier; }; + return f; + }, + parse: function(specifier) { + var p = newParse(specifier += "", false); + p.toString = function() { return specifier; }; + return p; + }, + utcFormat: function(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function() { return specifier; }; + return f; + }, + utcParse: function(specifier) { + var p = newParse(specifier += "", true); + p.toString = function() { return specifier; }; + return p; + } + }; +} -/***/ "./node_modules/d3-selection/src/window.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-selection/src/window.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var pads = {"-": "", "_": " ", "0": "0"}, + numberRe = /^\s*\d+/, // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(node) { - return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node - || (node.document && node) // node is a Window - || node.defaultView; // node is a Document -}); +function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); +} +function requote(s) { + return s.replace(requoteRe, "\\$&"); +} -/***/ }), +function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +} -/***/ "./node_modules/d3-shape/src/arc.js": -/*!******************************************!*\ - !*** ./node_modules/d3-shape/src/arc.js ***! - \******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function formatLookup(names) { + var map = {}, i = -1, n = names.length; + while (++i < n) map[names[i].toLowerCase()] = i; + return map; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js"); +function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; +} +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} -function arcInnerRadius(d) { - return d.innerRadius; +function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; } -function arcOuterRadius(d) { - return d.outerRadius; +function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; } -function arcStartAngle(d) { - return d.startAngle; +function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; } -function arcEndAngle(d) { - return d.endAngle; +function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; } -function arcPadAngle(d) { - return d && d.padAngle; // Note: optional! +function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; } -function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { - var x10 = x1 - x0, y10 = y1 - y0, - x32 = x3 - x2, y32 = y3 - y2, - t = y32 * x10 - x32 * y10; - if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; - t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; - return [x0 + t * x10, y0 + t * y10]; +function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; } -// Compute perpendicular offset line of length rc. -// http://mathworld.wolfram.com/Circle-LineIntersection.html -function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { - var x01 = x0 - x1, - y01 = y0 - y1, - lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), - ox = lo * y01, - oy = -lo * x01, - x11 = x0 + ox, - y11 = y0 + oy, - x10 = x1 + ox, - y10 = y1 + oy, - x00 = (x11 + x10) / 2, - y00 = (y11 + y10) / 2, - dx = x10 - x11, - dy = y10 - y11, - d2 = dx * dx + dy * dy, - r = r1 - rc, - D = x11 * y10 - x10 * y11, - d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["max"])(0, r * r * d2 - D * D)), - cx0 = (D * dy - dx * d) / d2, - cy0 = (-D * dx - dy * d) / d2, - cx1 = (D * dy + dx * d) / d2, - cy1 = (-D * dx + dy * d) / d2, - dx0 = cx0 - x00, - dy0 = cy0 - y00, - dx1 = cx1 - x00, - dy1 = cy1 - y00; +function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; +} - // Pick the closer of the two intersection points. - // TODO Is there a faster way to determine which intersection to use? - if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; +function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; +} - return { - cx: cx0, - cy: cy0, - x01: -ox, - y01: -oy, - x11: cx0 * (r1 / r - 1), - y11: cy0 * (r1 / r - 1) - }; +function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; } -/* harmony default export */ __webpack_exports__["default"] = (function() { - var innerRadius = arcInnerRadius, - outerRadius = arcOuterRadius, - cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), - padRadius = null, - startAngle = arcStartAngle, - endAngle = arcEndAngle, - padAngle = arcPadAngle, - context = null; +function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; +} - function arc() { - var buffer, - r, - r0 = +innerRadius.apply(this, arguments), - r1 = +outerRadius.apply(this, arguments), - a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], - a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], - da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0), - cw = a1 > a0; +function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; +} - if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); +function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; +} - // Ensure that the outer radius is always larger than the inner radius. - if (r1 < r0) r = r1, r1 = r0, r0 = r; +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; +} - // Is it a point? - if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0); +function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; +} - // Or is it a circle or annulus? - else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0)); - context.arc(0, 0, r1, a0, a1, !cw); - if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1)); - context.arc(0, 0, r0, a1, a0, cw); - } - } +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} - // Or is it a circular or annular sector? - else { - var a01 = a0, - a11 = a1, - a00 = a0, - a10 = a1, - da0 = da, - da1 = da, - ap = padAngle.apply(this, arguments) / 2, - rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)), - rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), - rc0 = rc, - rc1 = rc, - t0, - t1; +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; +} - // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. - if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)), - p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)); - if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; - else da0 = 0, a00 = a10 = (a0 + a1) / 2; - if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; - else da1 = 0, a01 = a11 = (a0 + a1) / 2; - } +function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); +} - var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01), - y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01), - x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10), - y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10); +function formatHour24(d, p) { + return pad(d.getHours(), p, 2); +} - // Apply rounded corners? - if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11), - y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11), - x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00), - y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00), - oc; +function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); +} - // Restrict the corner radius according to the sector angle. - if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { - var ax = x01 - oc[0], - ay = y01 - oc[1], - bx = x11 - oc[0], - by = y11 - oc[1], - kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2), - lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]); - rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1)); - rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1)); - } - } +function formatDayOfYear(d, p) { + return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d), p, 3); +} - // Is the sector collapsed to a line? - if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01); +function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); +} - // Does the sector’s outer ring have rounded corners? - else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); - t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} - context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); +function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); +} - // Have the corners merged? - if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); +function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); +} - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); - context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw); - context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); - } - } +function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); +} - // Or is the outer ring just a circular arc? - else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); +function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; +} - // Is there no inner ring, and it’s a circular sector? - // Or perhaps it’s an annular sector collapsed due to padding? - if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10); +function formatWeekNumberSunday(d, p) { + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); +} - // Does the sector’s inner ring (or point) have rounded corners? - else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { - t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); - t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); +function formatWeekNumberISO(d, p) { + var day = d.getDay(); + d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d).getDay() === 4), p, 2); +} - context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); +function formatWeekdayNumberSunday(d) { + return d.getDay(); +} - // Have the corners merged? - if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); +function formatWeekNumberMonday(d, p) { + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); +} - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); - context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw); - context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); - } - } +function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); +} - // Or is the inner ring just a circular arc? - else context.arc(0, 0, r0, a10, a00, cw); - } +function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); +} - context.closePath(); +function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + + pad(z / 60 | 0, "0", 2) + + pad(z % 60, "0", 2); +} - if (buffer) return context = null, buffer + "" || null; - } +function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); +} - arc.centroid = function() { - var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, - a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2; - return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r]; - }; +function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); +} - arc.innerRadius = function(_) { - return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius; - }; +function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); +} - arc.outerRadius = function(_) { - return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius; - }; +function formatUTCDayOfYear(d, p) { + return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d), p, 3); +} - arc.cornerRadius = function(_) { - return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius; - }; +function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); +} - arc.padRadius = function(_) { - return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius; - }; +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} - arc.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle; - }; +function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); +} - arc.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle; - }; +function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); +} - arc.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle; - }; +function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); +} - arc.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), arc) : context; - }; +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} - return arc; -}); +function formatUTCWeekNumberSunday(d, p) { + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); +} +function formatUTCWeekNumberISO(d, p) { + var day = d.getUTCDay(); + d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d).getUTCDay() === 4), p, 2); +} -/***/ }), +function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); +} -/***/ "./node_modules/d3-shape/src/area.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-shape/src/area.js ***! - \*******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function formatUTCWeekNumberMonday(d, p) { + return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); -/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); -/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js"); +function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); +} +function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); +} +function formatUTCZone() { + return "+0000"; +} +function formatLiteralPercent() { + return "%"; +} +function formatUnixTimestamp(d) { + return +d; +} +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); +} -/* harmony default export */ __webpack_exports__["default"] = (function() { - var x0 = _point_js__WEBPACK_IMPORTED_MODULE_4__["x"], - x1 = null, - y0 = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), - y1 = _point_js__WEBPACK_IMPORTED_MODULE_4__["y"], - defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), - context = null, - curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], - output = null; - function area(data) { - var i, - j, - k, - n = data.length, - d, - defined0 = false, - buffer, - x0z = new Array(n), - y0z = new Array(n); +/***/ }), - if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); +/***/ "./node_modules/d3-time/src/day.js": +/*!*****************************************!*\ + !*** ./node_modules/d3-time/src/day.js ***! + \*****************************************/ +/*! exports provided: default, days */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) { - j = i; - output.areaStart(); - output.lineStart(); - } else { - output.lineEnd(); - output.lineStart(); - for (k = i - 1; k >= j; --k) { - output.point(x0z[k], y0z[k]); - } - output.lineEnd(); - output.areaEnd(); - } - } - if (defined0) { - x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); - output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); - } - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "days", function() { return days; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); - if (buffer) return output = null, buffer + "" || null; - } - function arealine() { - return Object(_line_js__WEBPACK_IMPORTED_MODULE_3__["default"])().defined(defined).curve(curve).context(context); - } - area.x = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), x1 = null, area) : x0; - }; +var day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setDate(date.getDate() + step); +}, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; +}, function(date) { + return date.getDate() - 1; +}); - area.x0 = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x0; - }; +/* harmony default export */ __webpack_exports__["default"] = (day); +var days = day.range; - area.x1 = function(_) { - return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x1; - }; - area.y = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), y1 = null, area) : y0; - }; +/***/ }), - area.y0 = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y0; - }; +/***/ "./node_modules/d3-time/src/duration.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-time/src/duration.js ***! + \**********************************************/ +/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - area.y1 = function(_) { - return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y1; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationSecond", function() { return durationSecond; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationMinute", function() { return durationMinute; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationHour", function() { return durationHour; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationDay", function() { return durationDay; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationWeek", function() { return durationWeek; }); +var durationSecond = 1e3; +var durationMinute = 6e4; +var durationHour = 36e5; +var durationDay = 864e5; +var durationWeek = 6048e5; - area.lineX0 = - area.lineY0 = function() { - return arealine().x(x0).y(y0); - }; - area.lineY1 = function() { - return arealine().x(x0).y(y1); - }; +/***/ }), - area.lineX1 = function() { - return arealine().x(x1).y(y0); - }; +/***/ "./node_modules/d3-time/src/hour.js": +/*!******************************************!*\ + !*** ./node_modules/d3-time/src/hour.js ***! + \******************************************/ +/*! exports provided: default, hours */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - area.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), area) : defined; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hours", function() { return hours; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); - area.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; - }; - area.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; - }; - return area; +var hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); +}, function(date, step) { + date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; +}, function(date) { + return date.getHours(); }); +/* harmony default export */ __webpack_exports__["default"] = (hour); +var hours = hour.range; + /***/ }), -/***/ "./node_modules/d3-shape/src/areaRadial.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/areaRadial.js ***! - \*************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-time/src/index.js ***! + \*******************************************/ +/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js"); -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js"); -/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js"); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ "./node_modules/d3-time/src/millisecond.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]), - c = a.curve, - x0 = a.lineX0, - x1 = a.lineX1, - y0 = a.lineY0, - y1 = a.lineY1; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); - a.angle = a.x, delete a.x; - a.startAngle = a.x0, delete a.x0; - a.endAngle = a.x1, delete a.x1; - a.radius = a.y, delete a.y; - a.innerRadius = a.y0, delete a.y0; - a.outerRadius = a.y1, delete a.y1; - a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0; - a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1; - a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0; - a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1; +/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ "./node_modules/d3-time/src/second.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); - a.curve = function(_) { - return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; - }; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); - return a; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); -/***/ }), +/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ "./node_modules/d3-time/src/minute.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/***/ "./node_modules/d3-shape/src/array.js": -/*!********************************************!*\ - !*** ./node_modules/d3-shape/src/array.js ***! - \********************************************/ -/*! exports provided: slice */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["minutes"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); -var slice = Array.prototype.slice; +/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ "./node_modules/d3-time/src/hour.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["hours"]; }); -/***/ }), +/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ "./node_modules/d3-time/src/day.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/***/ "./node_modules/d3-shape/src/constant.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-shape/src/constant.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["days"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function constant() { - return x; - }; -}); +/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ "./node_modules/d3-time/src/week.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); -/***/ "./node_modules/d3-shape/src/curve/basis.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/basis.js ***! - \**************************************************/ -/*! exports provided: point, Basis, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; }); -function point(that, x, y) { - that._context.bezierCurveTo( - (2 * that._x0 + that._x1) / 3, - (2 * that._y0 + that._y1) / 3, - (that._x0 + 2 * that._x1) / 3, - (that._y0 + 2 * that._y1) / 3, - (that._x0 + 4 * that._x1 + x) / 6, - (that._y0 + 4 * that._y1 + y) / 6 - ); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["monday"]; }); -function Basis(context) { - this._context = context; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["mondays"]; }); -Basis.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 3: point(this, this._x1, this._y1); // proceed - case 2: this._context.lineTo(this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesday"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new Basis(context); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesdays"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesday"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesdays"]; }); -/***/ "./node_modules/d3-shape/src/curve/basisClosed.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursday"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursdays"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["friday"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["fridays"]; }); -function BasisClosed(context) { - this._context = context; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturday"]; }); -BasisClosed.prototype = { - areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x2, this._y2); - this._context.closePath(); - break; - } - case 2: { - this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); - this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x2, this._y2); - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x2 = x, this._y2 = y; break; - case 1: this._point = 2; this._x3 = x, this._y3 = y; break; - case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; - default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturdays"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new BasisClosed(context); -}); +/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ "./node_modules/d3-time/src/month.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["months"]; }); -/***/ }), +/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ "./node_modules/d3-time/src/year.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); -/***/ "./node_modules/d3-shape/src/curve/basisOpen.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***! - \******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["years"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ "./node_modules/d3-time/src/utcMinute.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["utcMinutes"]; }); -function BasisOpen(context) { - this._context = context; -} +/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ "./node_modules/d3-time/src/utcHour.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); -BasisOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; - case 3: this._point = 4; // proceed - default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["utcHours"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new BasisOpen(context); -}); +/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ "./node_modules/d3-time/src/utcDay.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["utcDays"]; }); -/***/ }), +/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ "./node_modules/d3-time/src/utcWeek.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); -/***/ "./node_modules/d3-shape/src/curve/bundle.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/bundle.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); -function Bundle(context, beta) { - this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context); - this._beta = beta; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMonday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMondays"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesdays"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesdays"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursdays"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFriday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFridays"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturday"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturdays"]; }); + +/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ "./node_modules/d3-time/src/utcMonth.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["utcMonths"]; }); + +/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ "./node_modules/d3-time/src/utcYear.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["utcYears"]; }); -Bundle.prototype = { - lineStart: function() { - this._x = []; - this._y = []; - this._basis.lineStart(); - }, - lineEnd: function() { - var x = this._x, - y = this._y, - j = x.length - 1; - if (j > 0) { - var x0 = x[0], - y0 = y[0], - dx = x[j] - x0, - dy = y[j] - y0, - i = -1, - t; - while (++i <= j) { - t = i / j; - this._basis.point( - this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), - this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) - ); - } - } - this._x = this._y = null; - this._basis.lineEnd(); - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; -/* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) { - function bundle(context) { - return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta); - } - bundle.beta = function(beta) { - return custom(+beta); - }; - return bundle; -})(0.85)); -/***/ }), -/***/ "./node_modules/d3-shape/src/curve/cardinal.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/cardinal.js ***! - \*****************************************************/ -/*! exports provided: point, Cardinal, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; }); -function point(that, x, y) { - that._context.bezierCurveTo( - that._x1 + that._k * (that._x2 - that._x0), - that._y1 + that._k * (that._y2 - that._y0), - that._x2 + that._k * (that._x1 - x), - that._y2 + that._k * (that._y1 - y), - that._x2, - that._y2 - ); -} -function Cardinal(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} -Cardinal.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: point(this, this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; this._x1 = x, this._y1 = y; break; - case 2: this._point = 3; // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; -/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { - function cardinal(context) { - return new Cardinal(context, tension); - } - cardinal.tension = function(tension) { - return custom(+tension); - }; - return cardinal; -})(0)); -/***/ }), -/***/ "./node_modules/d3-shape/src/curve/cardinalClosed.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***! - \***********************************************************/ -/*! exports provided: CardinalClosed, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; }); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); -/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); -function CardinalClosed(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} -CardinalClosed.prototype = { - areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; -/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { - function cardinal(context) { - return new CardinalClosed(context, tension); - } - cardinal.tension = function(tension) { - return custom(+tension); - }; - return cardinal; -})(0)); /***/ }), -/***/ "./node_modules/d3-shape/src/curve/cardinalOpen.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***! - \*********************************************************/ -/*! exports provided: CardinalOpen, default */ +/***/ "./node_modules/d3-time/src/interval.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-time/src/interval.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; }); -/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return newInterval; }); +var t0 = new Date, + t1 = new Date; +function newInterval(floori, offseti, count, field) { -function CardinalOpen(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { - - function cardinal(context) { - return new CardinalOpen(context, tension); + function interval(date) { + return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; } - cardinal.tension = function(tension) { - return custom(+tension); + interval.floor = function(date) { + return floori(date = new Date(+date)), date; }; - return cardinal; -})(0)); - - -/***/ }), - -/***/ "./node_modules/d3-shape/src/curve/catmullRom.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***! - \*******************************************************/ -/*! exports provided: point, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + interval.ceil = function(date) { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); -/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); + interval.round = function(date) { + var d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + interval.offset = function(date, step) { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + interval.range = function(start, stop, step) { + var range = [], previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); + while (previous < start && start < stop); + return range; + }; -function point(that, x, y) { - var x1 = that._x1, - y1 = that._y1, - x2 = that._x2, - y2 = that._y2; + interval.filter = function(test) { + return newInterval(function(date) { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, function(date, step) { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; - if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { - var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, - n = 3 * that._l01_a * (that._l01_a + that._l12_a); - x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; - y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; - } + if (count) { + interval.count = function(start, end) { + t0.setTime(+start), t1.setTime(+end); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; - if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { - var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, - m = 3 * that._l23_a * (that._l23_a + that._l12_a); - x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; - y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + interval.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null + : !(step > 1) ? interval + : interval.filter(field + ? function(d) { return field(d) % step === 0; } + : function(d) { return interval.count(0, d) % step === 0; }); + }; } - that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); -} - -function CatmullRom(context, alpha) { - this._context = context; - this._alpha = alpha; + return interval; } -CatmullRom.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: this.point(this._x2, this._y2); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } +/***/ }), - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; // proceed - default: point(this, x, y); break; - } +/***/ "./node_modules/d3-time/src/millisecond.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-time/src/millisecond.js ***! + \*************************************************/ +/*! exports provided: default, milliseconds */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return milliseconds; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { - function catmullRom(context) { - return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0); - } +var millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function() { + // noop +}, function(date, step) { + date.setTime(+date + step); +}, function(start, end) { + return end - start; +}); - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; +// An optimized implementation for this simple case. +millisecond.every = function(k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) return null; + if (!(k > 1)) return millisecond; + return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setTime(Math.floor(date / k) * k); + }, function(date, step) { + date.setTime(+date + step * k); + }, function(start, end) { + return (end - start) / k; + }); +}; - return catmullRom; -})(0.5)); +/* harmony default export */ __webpack_exports__["default"] = (millisecond); +var milliseconds = millisecond.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/catmullRomClosed.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***! - \*************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/minute.js": +/*!********************************************!*\ + !*** ./node_modules/d3-time/src/minute.js ***! + \********************************************/ +/*! exports provided: default, minutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js"); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); -/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minutes", function() { return minutes; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -function CatmullRomClosed(context, alpha) { - this._context = context; - this._alpha = alpha; -} +var minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); +}, function(date, step) { + date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; +}, function(date) { + return date.getMinutes(); +}); -CatmullRomClosed.prototype = { - areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], - areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; +/* harmony default export */ __webpack_exports__["default"] = (minute); +var minutes = minute.range; - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break; - } +/***/ }), - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; +/***/ "./node_modules/d3-time/src/month.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-time/src/month.js ***! + \*******************************************/ +/*! exports provided: default, months */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "months", function() { return months; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); - function catmullRom(context) { - return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0); - } - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; +var month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setDate(1); + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setMonth(date.getMonth() + step); +}, function(start, end) { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; +}, function(date) { + return date.getMonth(); +}); - return catmullRom; -})(0.5)); +/* harmony default export */ __webpack_exports__["default"] = (month); +var months = month.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/catmullRomOpen.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***! - \***********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/second.js": +/*!********************************************!*\ + !*** ./node_modules/d3-time/src/second.js ***! + \********************************************/ +/*! exports provided: default, seconds */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js"); -/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seconds", function() { return seconds; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -function CatmullRomOpen(context, alpha) { - this._context = context; - this._alpha = alpha; -} +var second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setTime(date - date.getMilliseconds()); +}, function(date, step) { + date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]; +}, function(date) { + return date.getUTCSeconds(); +}); -CatmullRomOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; +/* harmony default export */ __webpack_exports__["default"] = (second); +var seconds = second.range; - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; - } +/***/ }), - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; +/***/ "./node_modules/d3-time/src/utcDay.js": +/*!********************************************!*\ + !*** ./node_modules/d3-time/src/utcDay.js ***! + \********************************************/ +/*! exports provided: default, utcDays */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); - function catmullRom(context) { - return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0); - } - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - return catmullRom; -})(0.5)); +var utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCDate(date.getUTCDate() + step); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; +}, function(date) { + return date.getUTCDate() - 1; +}); + +/* harmony default export */ __webpack_exports__["default"] = (utcDay); +var utcDays = utcDay.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/linear.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/linear.js ***! - \***************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/utcHour.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-time/src/utcHour.js ***! + \*********************************************/ +/*! exports provided: default, utcHours */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function Linear(context) { - this._context = context; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -Linear.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: this._context.lineTo(x, y); break; - } - } -}; -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new Linear(context); + +var utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCMinutes(0, 0, 0); +}, function(date, step) { + date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; +}, function(date) { + return date.getUTCHours(); }); +/* harmony default export */ __webpack_exports__["default"] = (utcHour); +var utcHours = utcHour.range; + /***/ }), -/***/ "./node_modules/d3-shape/src/curve/linearClosed.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***! - \*********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/utcMinute.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-time/src/utcMinute.js ***! + \***********************************************/ +/*! exports provided: default, utcMinutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -function LinearClosed(context) { - this._context = context; -} -LinearClosed.prototype = { - areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._point) this._context.closePath(); - }, - point: function(x, y) { - x = +x, y = +y; - if (this._point) this._context.lineTo(x, y); - else this._point = 1, this._context.moveTo(x, y); - } -}; - -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new LinearClosed(context); +var utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCSeconds(0, 0); +}, function(date, step) { + date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); +}, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; +}, function(date) { + return date.getUTCMinutes(); }); +/* harmony default export */ __webpack_exports__["default"] = (utcMinute); +var utcMinutes = utcMinute.range; + /***/ }), -/***/ "./node_modules/d3-shape/src/curve/monotone.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/monotone.js ***! - \*****************************************************/ -/*! exports provided: monotoneX, monotoneY */ +/***/ "./node_modules/d3-time/src/utcMonth.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-time/src/utcMonth.js ***! + \**********************************************/ +/*! exports provided: default, utcMonths */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; }); -function sign(x) { - return x < 0 ? -1 : 1; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -// Calculate the slopes of the tangents (Hermite-type interpolation) based on -// the following paper: Steffen, M. 1990. A Simple Method for Monotonic -// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. -// NOV(II), P. 443, 1990. -function slope3(that, x2, y2) { - var h0 = that._x1 - that._x0, - h1 = x2 - that._x1, - s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), - s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), - p = (s0 * h1 + s1 * h0) / (h0 + h1); - return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; -} -// Calculate a one-sided slope. -function slope2(that, t) { - var h = that._x1 - that._x0; - return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; -} +var utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCDate(1); + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCMonth(date.getUTCMonth() + step); +}, function(start, end) { + return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; +}, function(date) { + return date.getUTCMonth(); +}); -// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations -// "you can express cubic Hermite interpolation in terms of cubic Bézier curves -// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". -function point(that, t0, t1) { - var x0 = that._x0, - y0 = that._y0, - x1 = that._x1, - y1 = that._y1, - dx = (x1 - x0) / 3; - that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); -} +/* harmony default export */ __webpack_exports__["default"] = (utcMonth); +var utcMonths = utcMonth.range; -function MonotoneX(context) { - this._context = context; -} -MonotoneX.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = - this._t0 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x1, this._y1); break; - case 3: point(this, this._t0, slope2(this, this._t0)); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - var t1 = NaN; +/***/ }), - x = +x, y = +y; - if (x === this._x1 && y === this._y1) return; // Ignore coincident points. - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; - default: point(this, this._t0, t1 = slope3(this, x, y)); break; - } +/***/ "./node_modules/d3-time/src/utcWeek.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-time/src/utcWeek.js ***! + \*********************************************/ +/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - this._t0 = t1; - } -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -function MonotoneY(context) { - this._context = new ReflectContext(context); -} -(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { - MonotoneX.prototype.point.call(this, y, x); -}; -function ReflectContext(context) { - this._context = context; +function utcWeekday(i) { + return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCDate(date.getUTCDate() + step * 7); + }, function(start, end) { + return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; + }); } -ReflectContext.prototype = { - moveTo: function(x, y) { this._context.moveTo(y, x); }, - closePath: function() { this._context.closePath(); }, - lineTo: function(x, y) { this._context.lineTo(y, x); }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } -}; - -function monotoneX(context) { - return new MonotoneX(context); -} +var utcSunday = utcWeekday(0); +var utcMonday = utcWeekday(1); +var utcTuesday = utcWeekday(2); +var utcWednesday = utcWeekday(3); +var utcThursday = utcWeekday(4); +var utcFriday = utcWeekday(5); +var utcSaturday = utcWeekday(6); -function monotoneY(context) { - return new MonotoneY(context); -} +var utcSundays = utcSunday.range; +var utcMondays = utcMonday.range; +var utcTuesdays = utcTuesday.range; +var utcWednesdays = utcWednesday.range; +var utcThursdays = utcThursday.range; +var utcFridays = utcFriday.range; +var utcSaturdays = utcSaturday.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/natural.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/natural.js ***! - \****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-time/src/utcYear.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-time/src/utcYear.js ***! + \*********************************************/ +/*! exports provided: default, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -function Natural(context) { - this._context = context; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -Natural.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = []; - this._y = []; - }, - lineEnd: function() { - var x = this._x, - y = this._y, - n = x.length; - if (n) { - this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); - if (n === 2) { - this._context.lineTo(x[1], y[1]); - } else { - var px = controlPoints(x), - py = controlPoints(y); - for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { - this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); - } - } - } +var utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step); +}, function(start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); +}, function(date) { + return date.getUTCFullYear(); +}); - if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); - this._line = 1 - this._line; - this._x = this._y = null; - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } +// An optimized implementation for this simple case. +utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); }; -// See https://www.particleincell.com/2012/bezier-splines/ for derivation. -function controlPoints(x) { - var i, - n = x.length - 1, - m, - a = new Array(n), - b = new Array(n), - r = new Array(n); - a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; - for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; - a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; - for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; - a[n - 1] = r[n - 1] / b[n - 1]; - for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; - b[n - 1] = (x[n] + a[n - 1]) / 2; - for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; - return [a, b]; -} - -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new Natural(context); -}); +/* harmony default export */ __webpack_exports__["default"] = (utcYear); +var utcYears = utcYear.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/radial.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/radial.js ***! - \***************************************************/ -/*! exports provided: curveRadialLinear, default */ +/***/ "./node_modules/d3-time/src/week.js": +/*!******************************************!*\ + !*** ./node_modules/d3-time/src/week.js ***! + \******************************************/ +/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; }); -/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sunday", function() { return sunday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monday", function() { return monday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesday", function() { return tuesday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesday", function() { return wednesday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursday", function() { return thursday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friday", function() { return friday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturday", function() { return saturday; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sundays", function() { return sundays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mondays", function() { return mondays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesdays", function() { return tuesdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesdays", function() { return wednesdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursdays", function() { return thursdays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fridays", function() { return fridays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturdays", function() { return saturdays; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]); -function Radial(curve) { - this._curve = curve; +function weekday(i) { + return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setDate(date.getDate() + step * 7); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; + }); } -Radial.prototype = { - areaStart: function() { - this._curve.areaStart(); - }, - areaEnd: function() { - this._curve.areaEnd(); - }, - lineStart: function() { - this._curve.lineStart(); - }, - lineEnd: function() { - this._curve.lineEnd(); - }, - point: function(a, r) { - this._curve.point(r * Math.sin(a), r * -Math.cos(a)); - } -}; - -function curveRadial(curve) { - - function radial(context) { - return new Radial(curve(context)); - } - - radial._curve = curve; +var sunday = weekday(0); +var monday = weekday(1); +var tuesday = weekday(2); +var wednesday = weekday(3); +var thursday = weekday(4); +var friday = weekday(5); +var saturday = weekday(6); - return radial; -} +var sundays = sunday.range; +var mondays = monday.range; +var tuesdays = tuesday.range; +var wednesdays = wednesday.range; +var thursdays = thursday.range; +var fridays = friday.range; +var saturdays = saturday.range; /***/ }), -/***/ "./node_modules/d3-shape/src/curve/step.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/curve/step.js ***! - \*************************************************/ -/*! exports provided: default, stepBefore, stepAfter */ +/***/ "./node_modules/d3-time/src/year.js": +/*!******************************************!*\ + !*** ./node_modules/d3-time/src/year.js ***! + \******************************************/ +/*! exports provided: default, years */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; }); -function Step(context, t) { - this._context = context; - this._t = t; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "years", function() { return years; }); +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -Step.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = this._y = NaN; - this._point = 0; - }, - lineEnd: function() { - if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: { - if (this._t <= 0) { - this._context.lineTo(this._x, y); - this._context.lineTo(x, y); - } else { - var x1 = this._x * (1 - this._t) + x * this._t; - this._context.lineTo(x1, this._y); - this._context.lineTo(x1, y); - } - break; - } - } - this._x = x, this._y = y; - } -}; -/* harmony default export */ __webpack_exports__["default"] = (function(context) { - return new Step(context, 0.5); +var year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setFullYear(date.getFullYear() + step); +}, function(start, end) { + return end.getFullYear() - start.getFullYear(); +}, function(date) { + return date.getFullYear(); }); -function stepBefore(context) { - return new Step(context, 0); -} +// An optimized implementation for this simple case. +year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setFullYear(date.getFullYear() + step * k); + }); +}; -function stepAfter(context) { - return new Step(context, 1); -} +/* harmony default export */ __webpack_exports__["default"] = (year); +var years = year.range; /***/ }), -/***/ "./node_modules/d3-shape/src/descending.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/descending.js ***! - \*************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-timer/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-timer/src/index.js ***! + \********************************************/ +/*! exports provided: now, timer, timerFlush, timeout, interval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -}); +/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); + +/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "./node_modules/d3-timer/src/timeout.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-timer/src/interval.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + /***/ }), -/***/ "./node_modules/d3-shape/src/identity.js": +/***/ "./node_modules/d3-timer/src/interval.js": /*!***********************************************!*\ - !*** ./node_modules/d3-shape/src/identity.js ***! + !*** ./node_modules/d3-timer/src/interval.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(d) { - return d; +/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { + var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; + if (delay == null) return t.restart(callback, delay, time), t; + delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; + t.restart(function tick(elapsed) { + elapsed += total; + t.restart(tick, total += delay, time); + callback(elapsed); + }, delay, time); + return t; }); /***/ }), -/***/ "./node_modules/d3-shape/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-shape/src/index.js ***! - \********************************************/ -/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */ +/***/ "./node_modules/d3-timer/src/timeout.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-timer/src/timeout.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "./node_modules/d3-shape/src/arc.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); - -/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); -/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "./node_modules/d3-shape/src/pie.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "./node_modules/d3-shape/src/areaRadial.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); - -/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); - -/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); - -/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "./node_modules/d3-shape/src/link/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; }); - -/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "./node_modules/d3-shape/src/symbol.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; }); - -/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); - -/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); - -/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); - -/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); - -/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); - -/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "./node_modules/d3-shape/src/curve/basisClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); - -/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "./node_modules/d3-shape/src/curve/basisOpen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { + var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"]; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +}); -/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "./node_modules/d3-shape/src/curve/basis.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bundle.js */ "./node_modules/d3-shape/src/curve/bundle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); +/***/ }), -/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); +/***/ "./node_modules/d3-timer/src/timer.js": +/*!********************************************!*\ + !*** ./node_modules/d3-timer/src/timer.js ***! + \********************************************/ +/*! exports provided: now, Timer, timer, timerFlush */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); +var frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; -/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} -/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "./node_modules/d3-shape/src/curve/catmullRomClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); +function clearNow() { + clockNow = 0; +} -/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "./node_modules/d3-shape/src/curve/catmullRomOpen.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); +function Timer() { + this._call = + this._time = + this._next = null; +} -/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) taskTail._next = this; + else taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; -/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/linearClosed.js */ "./node_modules/d3-shape/src/curve/linearClosed.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); +function timer(callback, delay, time) { + var t = new Timer; + t.restart(callback, delay, time); + return t; +} -/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); +function timerFlush() { + now(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, e); + t = t._next; + } + --frame; +} -/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/monotone.js */ "./node_modules/d3-shape/src/curve/monotone.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneX"]; }); +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneY"]; }); +function poke() { + var now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; +} -/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/natural.js */ "./node_modules/d3-shape/src/curve/natural.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} -/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/step.js */ "./node_modules/d3-shape/src/curve/step.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); +function sleep(time) { + if (frame) return; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed clockNow. + if (delay > 24) { + if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); + if (interval) interval = clearInterval(interval); + } else { + if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepAfter"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepBefore"]; }); +/***/ }), -/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stack.js */ "./node_modules/d3-shape/src/stack.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); +/***/ "./node_modules/d3-transition/src/active.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-transition/src/active.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./offset/expand.js */ "./node_modules/d3-shape/src/offset/expand.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/diverging.js */ "./node_modules/d3-shape/src/offset/diverging.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); -/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); -/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/silhouette.js */ "./node_modules/d3-shape/src/offset/silhouette.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); +var root = [null]; -/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/wiggle.js */ "./node_modules/d3-shape/src/offset/wiggle.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { + var schedules = node.__transition, + schedule, + i; -/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./order/appearance.js */ "./node_modules/d3-shape/src/order/appearance.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); + if (schedules) { + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) { + return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i); + } + } + } -/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); + return null; +}); -/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/descending.js */ "./node_modules/d3-shape/src/order/descending.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); -/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/insideOut.js */ "./node_modules/d3-shape/src/order/insideOut.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); +/***/ }), -/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); +/***/ "./node_modules/d3-transition/src/index.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-transition/src/index.js ***! + \*************************************************/ +/*! exports provided: transition, active, interrupt */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/reverse.js */ "./node_modules/d3-shape/src/order/reverse.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "./node_modules/d3-transition/src/selection/index.js"); +/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ "./node_modules/d3-transition/src/active.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/interrupt.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); - // Note: radialArea is deprecated! - // Note: radialLine is deprecated! +/***/ }), +/***/ "./node_modules/d3-transition/src/interrupt.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-transition/src/interrupt.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { + var schedules = node.__transition, + schedule, + active, + empty = true, + i; + if (!schedules) return; + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule = schedules[i]).name !== name) { empty = false; continue; } + active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDING"]; + schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDED"]; + schedule.timer.stop(); + schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); + delete schedules[i]; + } + if (empty) delete node.__transition; +}); +/***/ }), +/***/ "./node_modules/d3-transition/src/selection/index.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-transition/src/selection/index.js ***! + \***********************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/selection/interrupt.js"); +/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/selection/transition.js"); +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__["default"]; +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +/***/ }), +/***/ "./node_modules/d3-transition/src/selection/interrupt.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-transition/src/selection/interrupt.js ***! + \***************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ "./node_modules/d3-transition/src/interrupt.js"); +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + return this.each(function() { + Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name); + }); +}); +/***/ }), +/***/ "./node_modules/d3-transition/src/selection/transition.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-transition/src/selection/transition.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js"); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); +var defaultTiming = { + time: null, // Set on use. + delay: 0, + duration: 250, + ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"] +}; +function inherit(node, id) { + var timing; + while (!(timing = node.__transition) || !(timing = timing[id])) { + if (!(node = node.parentNode)) { + return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), defaultTiming; + } + } + return timing; +} +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var id, + timing; + if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]) { + id = name._id, name = name._name; + } else { + id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + ""; + } + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id)); + } + } + } + return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id); +}); /***/ }), -/***/ "./node_modules/d3-shape/src/line.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-shape/src/line.js ***! - \*******************************************/ +/***/ "./node_modules/d3-transition/src/transition/attr.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/attr.js ***! + \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js"); -/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js"); - - - - +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); +/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js"); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], - y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], - defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), - context = null, - curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], - output = null; - function line(data) { - var i, - n = data.length, - d, - defined0 = false, - buffer; - if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) output.lineStart(); - else output.lineEnd(); - } - if (defined0) output.point(+x(d, i, data), +y(d, i, data)); - } - if (buffer) return output = null, buffer + "" || null; - } +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} - line.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : x; +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); }; +} - line.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : y; +function attrConstant(name, interpolate, value1) { + var string00, + string1 = value1 + "", + interpolate0; + return function() { + var string0 = this.getAttribute(name); + return string0 === string1 ? null + : string0 === string00 ? interpolate0 + : interpolate0 = interpolate(string00 = string0, value1); }; +} - line.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), line) : defined; +function attrConstantNS(fullname, interpolate, value1) { + var string00, + string1 = value1 + "", + interpolate0; + return function() { + var string0 = this.getAttributeNS(fullname.space, fullname.local); + return string0 === string1 ? null + : string0 === string00 ? interpolate0 + : interpolate0 = interpolate(string00 = string0, value1); }; +} - line.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; +function attrFunction(name, interpolate, value) { + var string00, + string10, + interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) return void this.removeAttribute(name); + string0 = this.getAttribute(name); + string1 = value1 + ""; + return string0 === string1 ? null + : string0 === string00 && string1 === string10 ? interpolate0 + : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; +} - line.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; +function attrFunctionNS(fullname, interpolate, value) { + var string00, + string10, + interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); + string0 = this.getAttributeNS(fullname.space, fullname.local); + string1 = value1 + ""; + return string0 === string1 ? null + : string0 === string00 && string1 === string10 ? interpolate0 + : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; +} - return line; +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__["default"]; + return this.attrTween(name, typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value)) + : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) + : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); }); /***/ }), -/***/ "./node_modules/d3-shape/src/lineRadial.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/lineRadial.js ***! - \*************************************************/ -/*! exports provided: lineRadial, default */ +/***/ "./node_modules/d3-transition/src/transition/attrTween.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/attrTween.js ***! + \****************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; }); -/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js"); -/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js"); - - - -function lineRadial(l) { - var c = l.curve; +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - l.curve = function(_) { - return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; +function attrInterpolate(name, i) { + return function(t) { + this.setAttribute(name, i.call(this, t)); }; +} - return l; +function attrInterpolateNS(fullname, i) { + return function(t) { + this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); + }; } -/* harmony default export */ __webpack_exports__["default"] = (function() { - return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"])); +function attrTweenNS(fullname, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); + return t0; + } + tween._value = value; + return tween; +} + +function attrTween(name, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); + return t0; + } + tween._value = value; + return tween; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var key = "attr." + name; + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); }); /***/ }), -/***/ "./node_modules/d3-shape/src/link/index.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/link/index.js ***! - \*************************************************/ -/*! exports provided: linkHorizontal, linkVertical, linkRadial */ +/***/ "./node_modules/d3-transition/src/transition/delay.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/delay.js ***! + \************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-shape/src/array.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "./node_modules/d3-shape/src/point.js"); -/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js"); - - - - - +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -function linkSource(d) { - return d.source; -} -function linkTarget(d) { - return d.target; +function delayFunction(id, value) { + return function() { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments); + }; } -function link(curve) { - var source = linkSource, - target = linkTarget, - x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], - y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], - context = null; - - function link() { - var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); - if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); - curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); - if (buffer) return context = null, buffer + "" || null; - } - - link.source = function(_) { - return arguments.length ? (source = _, link) : source; +function delayConstant(id, value) { + return value = +value, function() { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value; }; +} - link.target = function(_) { - return arguments.length ? (target = _, link) : target; - }; +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; - link.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x; - }; + return arguments.length + ? this.each((typeof value === "function" + ? delayFunction + : delayConstant)(id, value)) + : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay; +}); - link.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y; - }; - link.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), link) : context; - }; +/***/ }), - return link; -} +/***/ "./node_modules/d3-transition/src/transition/duration.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/duration.js ***! + \***************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function curveHorizontal(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -function curveVertical(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); -} -function curveRadial(context, x0, y0, x1, y1) { - var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0), - p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2), - p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0), - p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1); - context.moveTo(p0[0], p0[1]); - context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); +function durationFunction(id, value) { + return function() { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments); + }; } -function linkHorizontal() { - return link(curveHorizontal); +function durationConstant(id, value) { + return value = +value, function() { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value; + }; } -function linkVertical() { - return link(curveVertical); -} +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; -function linkRadial() { - var l = link(curveRadial); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - return l; -} + return arguments.length + ? this.each((typeof value === "function" + ? durationFunction + : durationConstant)(id, value)) + : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration; +}); /***/ }), -/***/ "./node_modules/d3-shape/src/math.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-shape/src/math.js ***! - \*******************************************/ -/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */ +/***/ "./node_modules/d3-transition/src/transition/ease.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/ease.js ***! + \***********************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); -var abs = Math.abs; -var atan2 = Math.atan2; -var cos = Math.cos; -var max = Math.max; -var min = Math.min; -var sin = Math.sin; -var sqrt = Math.sqrt; +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -var epsilon = 1e-12; -var pi = Math.PI; -var halfPi = pi / 2; -var tau = 2 * pi; -function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); +function easeConstant(id, value) { + if (typeof value !== "function") throw new Error; + return function() { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value; + }; } -function asin(x) { - return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); -} +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; + + return arguments.length + ? this.each(easeConstant(id, value)) + : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease; +}); /***/ }), -/***/ "./node_modules/d3-shape/src/noop.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-shape/src/noop.js ***! - \*******************************************/ +/***/ "./node_modules/d3-transition/src/transition/end.js": +/*!**********************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/end.js ***! + \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function() {}); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -/***/ }), +/* harmony default export */ __webpack_exports__["default"] = (function() { + var on0, on1, that = this, id = that._id, size = that.size(); + return new Promise(function(resolve, reject) { + var cancel = {value: reject}, + end = {value: function() { if (--size === 0) resolve(); }}; -/***/ "./node_modules/d3-shape/src/offset/diverging.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-shape/src/offset/diverging.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + that.each(function() { + var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), + on = schedule.on; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { - for (yp = yn = 0, i = 0; i < n; ++i) { - if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { - d[0] = yp, d[1] = yp += dy; - } else if (dy < 0) { - d[1] = yn, d[0] = yn += dy; - } else { - d[0] = 0, d[1] = dy; + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) { + on1 = (on0 = on).copy(); + on1._.cancel.push(cancel); + on1._.interrupt.push(cancel); + on1._.end.push(end); } - } - } + + schedule.on = on1; + }); + }); }); /***/ }), -/***/ "./node_modules/d3-shape/src/offset/expand.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/offset/expand.js ***! - \****************************************************/ +/***/ "./node_modules/d3-transition/src/transition/filter.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/filter.js ***! + \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); - - -/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { - for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; - if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; - } - Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); -}); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/***/ }), -/***/ "./node_modules/d3-shape/src/offset/none.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-shape/src/offset/none.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony default export */ __webpack_exports__["default"] = (function(match) { + if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { - if (!((n = series.length) > 1)) return; - for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { - s0 = s1, s1 = series[order[i]]; - for (j = 0; j < m; ++j) { - s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } } } + + return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id); }); /***/ }), -/***/ "./node_modules/d3-shape/src/offset/silhouette.js": -/*!********************************************************!*\ - !*** ./node_modules/d3-shape/src/offset/silhouette.js ***! - \********************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-transition/src/transition/index.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/index.js ***! + \************************************************************/ +/*! exports provided: Transition, default, newId */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ "./node_modules/d3-transition/src/transition/attr.js"); +/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ "./node_modules/d3-transition/src/transition/attrTween.js"); +/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ "./node_modules/d3-transition/src/transition/delay.js"); +/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-transition/src/transition/duration.js"); +/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ "./node_modules/d3-transition/src/transition/ease.js"); +/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter.js */ "./node_modules/d3-transition/src/transition/filter.js"); +/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge.js */ "./node_modules/d3-transition/src/transition/merge.js"); +/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./on.js */ "./node_modules/d3-transition/src/transition/on.js"); +/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-transition/src/transition/remove.js"); +/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select.js */ "./node_modules/d3-transition/src/transition/select.js"); +/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selectAll.js */ "./node_modules/d3-transition/src/transition/selectAll.js"); +/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selection.js */ "./node_modules/d3-transition/src/transition/selection.js"); +/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.js */ "./node_modules/d3-transition/src/transition/style.js"); +/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./styleTween.js */ "./node_modules/d3-transition/src/transition/styleTween.js"); +/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./text.js */ "./node_modules/d3-transition/src/transition/text.js"); +/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textTween.js */ "./node_modules/d3-transition/src/transition/textTween.js"); +/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/transition/transition.js"); +/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); +/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./end.js */ "./node_modules/d3-transition/src/transition/end.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { - if (!((n = series.length) > 0)) return; - for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { - for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; - s0[j][1] += s0[j][0] = -y / 2; - } - Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); -}); -/***/ }), -/***/ "./node_modules/d3-shape/src/offset/wiggle.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/offset/wiggle.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { - if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; - for (var y = 0, j = 1, s0, m, n; j < m; ++j) { - for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { - var si = series[order[i]], - sij0 = si[j][1] || 0, - sij1 = si[j - 1][1] || 0, - s3 = (sij0 - sij1) / 2; - for (var k = 0; k < i; ++k) { - var sk = series[order[k]], - skj0 = sk[j][1] || 0, - skj1 = sk[j - 1][1] || 0; - s3 += skj0 - skj1; - } - s1 += sij0, s2 += s3 * sij0; - } - s0[j - 1][1] += s0[j - 1][0] = y; - if (s1) y -= s2 / s1; - } - s0[j - 1][1] += s0[j - 1][0] = y; - Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); -}); -/***/ }), -/***/ "./node_modules/d3-shape/src/order/appearance.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-shape/src/order/appearance.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - var peaks = series.map(peak); - return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); -}); -function peak(series) { - var i = -1, j = 0, n = series.length, vi, vj = -Infinity; - while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; - return j; -} -/***/ }), -/***/ "./node_modules/d3-shape/src/order/ascending.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-shape/src/order/ascending.js ***! - \******************************************************/ -/*! exports provided: default, sum */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; }); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - var sums = series.map(sum); - return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; }); -}); +var id = 0; -function sum(series) { - var s = 0, i = -1, n = series.length, v; - while (++i < n) if (v = +series[i][1]) s += v; - return s; +function Transition(groups, parents, name, id) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id; +} + +function transition(name) { + return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name); +} + +function newId() { + return ++id; } +var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype; + +Transition.prototype = transition.prototype = { + constructor: Transition, + select: _select_js__WEBPACK_IMPORTED_MODULE_10__["default"], + selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_11__["default"], + filter: _filter_js__WEBPACK_IMPORTED_MODULE_6__["default"], + merge: _merge_js__WEBPACK_IMPORTED_MODULE_7__["default"], + selection: _selection_js__WEBPACK_IMPORTED_MODULE_12__["default"], + transition: _transition_js__WEBPACK_IMPORTED_MODULE_17__["default"], + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: _on_js__WEBPACK_IMPORTED_MODULE_8__["default"], + attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__["default"], + attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__["default"], + style: _style_js__WEBPACK_IMPORTED_MODULE_13__["default"], + styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_14__["default"], + text: _text_js__WEBPACK_IMPORTED_MODULE_15__["default"], + textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_16__["default"], + remove: _remove_js__WEBPACK_IMPORTED_MODULE_9__["default"], + tween: _tween_js__WEBPACK_IMPORTED_MODULE_18__["default"], + delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__["default"], + duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__["default"], + ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__["default"], + end: _end_js__WEBPACK_IMPORTED_MODULE_19__["default"] +}; + /***/ }), -/***/ "./node_modules/d3-shape/src/order/descending.js": -/*!*******************************************************!*\ - !*** ./node_modules/d3-shape/src/order/descending.js ***! - \*******************************************************/ +/***/ "./node_modules/d3-transition/src/transition/interpolate.js": +/*!******************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/interpolate.js ***! + \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var c; + return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"] + : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"] + : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]) + : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b); }); /***/ }), -/***/ "./node_modules/d3-shape/src/order/insideOut.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-shape/src/order/insideOut.js ***! - \******************************************************/ +/***/ "./node_modules/d3-transition/src/transition/merge.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/merge.js ***! + \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "./node_modules/d3-shape/src/order/appearance.js"); -/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js"); - +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - var n = series.length, - i, - j, - sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]), - order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series), - top = 0, - bottom = 0, - tops = [], - bottoms = []; +/* harmony default export */ __webpack_exports__["default"] = (function(transition) { + if (transition._id !== this._id) throw new Error; - for (i = 0; i < n; ++i) { - j = order[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } } } - return bottoms.reverse().concat(tops); + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id); }); /***/ }), -/***/ "./node_modules/d3-shape/src/order/none.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/order/none.js ***! - \*************************************************/ +/***/ "./node_modules/d3-transition/src/transition/on.js": +/*!*********************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/on.js ***! + \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - var n = series.length, o = new Array(n); - while (--n >= 0) o[n] = n; - return o; +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); + + +function start(name) { + return (name + "").trim().split(/^|\s+/).every(function(t) { + var i = t.indexOf("."); + if (i >= 0) t = t.slice(0, i); + return !t || t === "start"; + }); +} + +function onFunction(id, name, listener) { + var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"]; + return function() { + var schedule = sit(this, id), + on = schedule.on; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); + + schedule.on = on1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, listener) { + var id = this._id; + + return arguments.length < 2 + ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name) + : this.each(onFunction(id, name, listener)); }); /***/ }), -/***/ "./node_modules/d3-shape/src/order/reverse.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/order/reverse.js ***! - \****************************************************/ +/***/ "./node_modules/d3-transition/src/transition/remove.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/remove.js ***! + \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js"); - +function removeFunction(id) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) if (+i !== id) return; + if (parent) parent.removeChild(this); + }; +} -/* harmony default export */ __webpack_exports__["default"] = (function(series) { - return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.on("end.remove", removeFunction(this._id)); }); /***/ }), -/***/ "./node_modules/d3-shape/src/pie.js": -/*!******************************************!*\ - !*** ./node_modules/d3-shape/src/pie.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-transition/src/transition/schedule.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/schedule.js ***! + \***************************************************************/ +/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending.js */ "./node_modules/d3-shape/src/descending.js"); -/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-shape/src/identity.js"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); +var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "cancel", "interrupt"); +var emptyTween = []; -/* harmony default export */ __webpack_exports__["default"] = (function() { - var value = _identity_js__WEBPACK_IMPORTED_MODULE_2__["default"], - sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_1__["default"], - sort = null, - startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0), - endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"]), - padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0); +var CREATED = 0; +var SCHEDULED = 1; +var STARTING = 2; +var STARTED = 3; +var RUNNING = 4; +var ENDING = 5; +var ENDED = 6; - function pie(data) { - var i, - n = data.length, - j, - k, - sum = 0, - index = new Array(n), - arcs = new Array(n), - a0 = +startAngle.apply(this, arguments), - da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], endAngle.apply(this, arguments) - a0)), - a1, - p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), - pa = p * (da < 0 ? -1 : 1), - v; +/* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) { + var schedules = node.__transition; + if (!schedules) node.__transition = {}; + else if (id in schedules) return; + create(node, id, { + name: name, + index: index, // For context during callback. + group: group, // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); +}); - for (i = 0; i < n; ++i) { - if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { - sum += v; - } - } +function init(node, id) { + var schedule = get(node, id); + if (schedule.state > CREATED) throw new Error("too late; already scheduled"); + return schedule; +} - // Optionally sort the arcs by previously-computed values or by data. - if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); - else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); +function set(node, id) { + var schedule = get(node, id); + if (schedule.state > STARTED) throw new Error("too late; already running"); + return schedule; +} - // Compute the arcs! They are stored in the original data's order. - for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { - j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { - data: data[j], - index: i, - value: v, - startAngle: a0, - endAngle: a1, - padAngle: p - }; - } +function get(node, id) { + var schedule = node.__transition; + if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); + return schedule; +} - return arcs; - } +function create(node, id, self) { + var schedules = node.__transition, + tween; - pie.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : value; - }; + // Initialize the self timer when the transition is created. + // Note the actual delay is not known until the first callback! + schedules[id] = self; + self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time); - pie.sortValues = function(_) { - return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; - }; + function schedule(elapsed) { + self.state = SCHEDULED; + self.timer.restart(start, self.delay, self.time); - pie.sort = function(_) { - return arguments.length ? (sort = _, sortValues = null, pie) : sort; - }; + // If the elapsed delay is less than our first sleep, start immediately. + if (self.delay <= elapsed) start(elapsed - self.delay); + } - pie.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : startAngle; - }; + function start(elapsed) { + var i, j, n, o; - pie.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : endAngle; - }; + // If the state is not SCHEDULED, then we previously errored on start. + if (self.state !== SCHEDULED) return stop(); - pie.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : padAngle; - }; + for (i in schedules) { + o = schedules[i]; + if (o.name !== self.name) continue; - return pie; -}); + // While this element already has a starting transition during this frame, + // defer starting an interrupting transition until that transition has a + // chance to tick (and possibly end); see d3/d3-transition#54! + if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start); + // Interrupt the active transition, if any. + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node, node.__data__, o.index, o.group); + delete schedules[i]; + } -/***/ }), + // Cancel any pre-empted transitions. + else if (+i < id) { + o.state = ENDED; + o.timer.stop(); + o.on.call("cancel", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + } -/***/ "./node_modules/d3-shape/src/point.js": -/*!********************************************!*\ - !*** ./node_modules/d3-shape/src/point.js ***! - \********************************************/ -/*! exports provided: x, y */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Defer the first tick to end of the current frame; see d3/d3#1576. + // Note the transition may be canceled after start and before the first tick! + // Note this must be scheduled before the start event; see d3/d3-transition#16! + // Assuming this is successful, subsequent callbacks go straight to tick. + Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() { + if (self.state === STARTED) { + self.state = RUNNING; + self.timer.restart(tick, self.delay, self.time); + tick(elapsed); + } + }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); -function x(p) { - return p[0]; -} + // Dispatch the start event. + // Note this must be done before the tween are initialized. + self.state = STARTING; + self.on.call("start", node, node.__data__, self.index, self.group); + if (self.state !== STARTING) return; // interrupted + self.state = STARTED; -function y(p) { - return p[1]; -} + // Initialize the tween, deleting null tween. + tween = new Array(n = self.tween.length); + for (i = 0, j = -1; i < n; ++i) { + if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + function tick(elapsed) { + var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), + i = -1, + n = tween.length; -/***/ }), + while (++i < n) { + tween[i].call(node, t); + } -/***/ "./node_modules/d3-shape/src/pointRadial.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-shape/src/pointRadial.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Dispatch the end event. + if (self.state === ENDING) { + self.on.call("end", node, node.__data__, self.index, self.group); + stop(); + } + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { - return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; -}); + function stop() { + self.state = ENDED; + self.timer.stop(); + delete schedules[id]; + for (var i in schedules) return; // eslint-disable-line no-unused-vars + delete node.__transition; + } +} /***/ }), -/***/ "./node_modules/d3-shape/src/stack.js": -/*!********************************************!*\ - !*** ./node_modules/d3-shape/src/stack.js ***! - \********************************************/ +/***/ "./node_modules/d3-transition/src/transition/select.js": +/*!*************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/select.js ***! + \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-shape/src/array.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); -/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js"); -/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js"); - - +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -function stackValue(d, key) { - return d[key]; -} -/* harmony default export */ __webpack_exports__["default"] = (function() { - var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]), - order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"], - offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"], - value = stackValue; +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + var name = this._name, + id = this._id; - function stack(data) { - var kz = keys.apply(this, arguments), - i, - m = data.length, - n = kz.length, - sz = new Array(n), - oz; + if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select); - for (i = 0; i < n; ++i) { - for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) { - si[j] = sij = [0, +value(data[j], ki, j, data)]; - sij.data = data[j]; + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id)); } - si.key = ki; - } - - for (i = 0, oz = order(sz); i < n; ++i) { - sz[oz[i]].index = i; } - - offset(sz, oz); - return sz; } - stack.keys = function(_) { - return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : keys; - }; - - stack.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value; - }; - - stack.order = function(_) { - return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : order; - }; - - stack.offset = function(_) { - return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset; - }; - - return stack; + return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-shape/src/symbol.js ***! - \*********************************************/ -/*! exports provided: symbols, default */ +/***/ "./node_modules/d3-transition/src/transition/selectAll.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/selectAll.js ***! + \****************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js"); -/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js"); -/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js"); -/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js"); -/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js"); -/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js"); -/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js"); - - - - - - +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -var symbols = [ - _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], - _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"], - _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"], - _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"], - _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"], - _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"], - _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"] -]; +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + var name = this._name, + id = this._id; -/* harmony default export */ __webpack_exports__["default"] = (function() { - var type = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]), - size = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(64), - context = null; + if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select); - function symbol() { - var buffer; - if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); - type.apply(this, arguments).draw(context, +size.apply(this, arguments)); - if (buffer) return context = null, buffer + "" || null; + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) { + if (child = children[k]) { + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit); + } + } + subgroups.push(children); + parents.push(node); + } + } } - symbol.type = function(_) { - return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type; - }; - - symbol.size = function(_) { - return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size; - }; - - symbol.context = function(_) { - return arguments.length ? (context = _ == null ? null : _, symbol) : context; - }; - - return symbol; + return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol/circle.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/circle.js ***! - \****************************************************/ +/***/ "./node_modules/d3-transition/src/transition/selection.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/selection.js ***! + \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]); - context.moveTo(r, 0); - context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); - } +var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor; + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new Selection(this._groups, this._parents); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol/cross.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/cross.js ***! - \***************************************************/ +/***/ "./node_modules/d3-transition/src/transition/style.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/style.js ***! + \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var r = Math.sqrt(size / 5) / 2; - context.moveTo(-3 * r, -r); - context.lineTo(-r, -r); - context.lineTo(-r, -3 * r); - context.lineTo(r, -3 * r); - context.lineTo(r, -r); - context.lineTo(3 * r, -r); - context.lineTo(3 * r, r); - context.lineTo(r, r); - context.lineTo(r, 3 * r); - context.lineTo(-r, 3 * r); - context.lineTo(-r, r); - context.lineTo(-3 * r, r); - context.closePath(); - } -}); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); +/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js"); -/***/ }), -/***/ "./node_modules/d3-shape/src/symbol/diamond.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/diamond.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -var tan30 = Math.sqrt(1 / 3), - tan30_2 = tan30 * 2; -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var y = Math.sqrt(size / tan30_2), - x = y * tan30; - context.moveTo(0, -y); - context.lineTo(x, 0); - context.lineTo(0, y); - context.lineTo(-x, 0); - context.closePath(); - } -}); +function styleNull(name, interpolate) { + var string00, + string10, + interpolate0; + return function() { + var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), + string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); + return string0 === string1 ? null + : string0 === string00 && string1 === string10 ? interpolate0 + : interpolate0 = interpolate(string00 = string0, string10 = string1); + }; +} -/***/ }), +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} -/***/ "./node_modules/d3-shape/src/symbol/square.js": -/*!****************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/square.js ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function styleConstant(name, interpolate, value1) { + var string00, + string1 = value1 + "", + interpolate0; + return function() { + var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name); + return string0 === string1 ? null + : string0 === string00 ? interpolate0 + : interpolate0 = interpolate(string00 = string0, value1); + }; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var w = Math.sqrt(size), - x = -w / 2; - context.rect(x, x, w, w); - } +function styleFunction(name, interpolate, value) { + var string00, + string10, + interpolate0; + return function() { + var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), + value1 = value(this), + string1 = value1 + ""; + if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); + return string0 === string1 ? null + : string0 === string00 && string1 === string10 ? interpolate0 + : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); + }; +} + +function styleMaybeRemove(id, name) { + var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; + return function() { + var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["set"])(this, id), + on = schedule.on, + listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); + + schedule.on = on1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__["default"]; + return value == null ? this + .styleTween(name, styleNull(name, i)) + .on("end.style." + name, styleRemove(name)) + : typeof value === "function" ? this + .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__["tweenValue"])(this, "style." + name, value))) + .each(styleMaybeRemove(this._id, name)) + : this + .styleTween(name, styleConstant(name, i, value), priority) + .on("end.style." + name, null); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol/star.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/star.js ***! - \**************************************************/ +/***/ "./node_modules/d3-transition/src/transition/styleTween.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/styleTween.js ***! + \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js"); - - -var ka = 0.89081309152928522810, - kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10), - kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr, - ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr; +function styleInterpolate(name, i, priority) { + return function(t) { + this.style.setProperty(name, i.call(this, t), priority); + }; +} -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var r = Math.sqrt(size * ka), - x = kx * r, - y = ky * r; - context.moveTo(0, -r); - context.lineTo(x, y); - for (var i = 1; i < 5; ++i) { - var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5, - c = Math.cos(a), - s = Math.sin(a); - context.lineTo(s * r, -c * r); - context.lineTo(c * x - s * y, s * x + c * y); - } - context.closePath(); +function styleTween(name, value, priority) { + var t, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); + return t; } + tween._value = value; + return tween; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + var key = "style." + (name += ""); + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol/triangle.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/triangle.js ***! - \******************************************************/ +/***/ "./node_modules/d3-transition/src/transition/text.js": +/*!***********************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/text.js ***! + \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -var sqrt3 = Math.sqrt(3); +/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var y = -Math.sqrt(size / (sqrt3 * 3)); - context.moveTo(0, y * 2); - context.lineTo(-sqrt3 * y, -y); - context.lineTo(sqrt3 * y, -y); - context.closePath(); - } + +function textConstant(value) { + return function() { + this.textContent = value; + }; +} + +function textFunction(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return this.tween("text", typeof value === "function" + ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value)) + : textConstant(value == null ? "" : value + "")); }); /***/ }), -/***/ "./node_modules/d3-shape/src/symbol/wye.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-shape/src/symbol/wye.js ***! - \*************************************************/ +/***/ "./node_modules/d3-transition/src/transition/textTween.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/textTween.js ***! + \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -var c = -0.5, - s = Math.sqrt(3) / 2, - k = 1 / Math.sqrt(12), - a = (k / 2 + 1) * 3; +function textInterpolate(i) { + return function(t) { + this.textContent = i.call(this, t); + }; +} -/* harmony default export */ __webpack_exports__["default"] = ({ - draw: function(context, size) { - var r = Math.sqrt(size / a), - x0 = r / 2, - y0 = r * k, - x1 = x0, - y1 = r * k + r, - x2 = -x1, - y2 = y1; - context.moveTo(x0, y0); - context.lineTo(x1, y1); - context.lineTo(x2, y2); - context.lineTo(c * x0 - s * y0, s * x0 + c * y0); - context.lineTo(c * x1 - s * y1, s * x1 + c * y1); - context.lineTo(c * x2 - s * y2, s * x2 + c * y2); - context.lineTo(c * x0 + s * y0, c * y0 - s * x0); - context.lineTo(c * x1 + s * y1, c * y1 - s * x1); - context.lineTo(c * x2 + s * y2, c * y2 - s * x2); - context.closePath(); +function textTween(value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) t0 = (i0 = i) && textInterpolate(i); + return t0; } + tween._value = value; + return tween; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var key = "text"; + if (arguments.length < 1) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + return this.tween(key, textTween(value)); }); /***/ }), -/***/ "./node_modules/d3-time-format/src/defaultLocale.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-time-format/src/defaultLocale.js ***! - \**********************************************************/ -/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */ +/***/ "./node_modules/d3-transition/src/transition/transition.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/transition.js ***! + \*****************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); -/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js"); +/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -var locale; -var timeFormat; -var timeParse; -var utcFormat; -var utcParse; -defaultLocale({ - dateTime: "%x, %X", - date: "%-m/%-d/%Y", - time: "%-I:%M:%S %p", - periods: ["AM", "PM"], - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] -}); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var name = this._name, + id0 = this._id, + id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(); -function defaultLocale(definition) { - locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); - timeFormat = locale.format; - timeParse = locale.parse; - utcFormat = locale.utcFormat; - utcParse = locale.utcParse; - return locale; -} + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0); + Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, { + time: inherit.time + inherit.delay + inherit.duration, + delay: 0, + duration: inherit.duration, + ease: inherit.ease + }); + } + } + } + + return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1); +}); /***/ }), -/***/ "./node_modules/d3-time-format/src/index.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-time-format/src/index.js ***! - \**************************************************/ -/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */ +/***/ "./node_modules/d3-transition/src/transition/tween.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-transition/src/transition/tween.js ***! + \************************************************************/ +/*! exports provided: default, tweenValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeFormat"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeParse"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcParse"]; }); - -/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; }); +/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ "./node_modules/d3-time-format/src/isoParse.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +function tweenRemove(id, name) { + var tween0, tween1; + return function() { + var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), + tween = schedule.tween; + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1 = tween1.slice(); + tween1.splice(i, 1); + break; + } + } + } + schedule.tween = tween1; + }; +} +function tweenFunction(id, name, value) { + var tween0, tween1; + if (typeof value !== "function") throw new Error; + return function() { + var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), + tween = schedule.tween; + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1[i] = t; + break; + } + } + if (i === n) tween1.push(t); + } + schedule.tween = tween1; + }; +} +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var id = this._id; -/***/ }), + name += ""; -/***/ "./node_modules/d3-time-format/src/isoFormat.js": -/*!******************************************************!*\ - !*** ./node_modules/d3-time-format/src/isoFormat.js ***! - \******************************************************/ -/*! exports provided: isoSpecifier, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (arguments.length < 2) { + var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween; + for (var i = 0, n = tween.length, t; i < n; ++i) { + if ((t = tween[i]).name === name) { + return t.value; + } + } + return null; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isoSpecifier", function() { return isoSpecifier; }); -/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); + return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); +}); +function tweenValue(transition, name, value) { + var id = transition._id; -var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; + transition.each(function() { + var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id); + (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); + }); -function formatIsoNative(date) { - return date.toISOString(); + return function(node) { + return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name]; + }; } -var formatIso = Date.prototype.toISOString - ? formatIsoNative - : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"])(isoSpecifier); - -/* harmony default export */ __webpack_exports__["default"] = (formatIso); - /***/ }), -/***/ "./node_modules/d3-time-format/src/isoParse.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-time-format/src/isoParse.js ***! - \*****************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/d3-voronoi/src/Beach.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-voronoi/src/Beach.js ***! + \**********************************************/ +/*! exports provided: removeBeach, addBeach */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js"); -/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js"); - - - -function parseIsoNative(string) { - var date = new Date(string); - return isNaN(date) ? null : date; -} +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeBeach", function() { return removeBeach; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBeach", function() { return addBeach; }); +/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); +/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js"); +/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js"); +/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); +/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); -var parseIso = +new Date("2000-01-01T00:00:00.000Z") - ? parseIsoNative - : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__["utcParse"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__["isoSpecifier"]); -/* harmony default export */ __webpack_exports__["default"] = (parseIso); -/***/ }), -/***/ "./node_modules/d3-time-format/src/locale.js": -/*!***************************************************!*\ - !*** ./node_modules/d3-time-format/src/locale.js ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatLocale; }); -/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); +var beachPool = []; +function Beach() { + Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this); + this.edge = + this.site = + this.circle = null; +} -function localDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); - date.setFullYear(d.y); - return date; - } - return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); +function createBeach(site) { + var beach = beachPool.pop() || new Beach; + beach.site = site; + return beach; } -function utcDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); - date.setUTCFullYear(d.y); - return date; - } - return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); +function detachBeach(beach) { + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(beach); + _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].remove(beach); + beachPool.push(beach); + Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(beach); } -function newDate(y, m, d) { - return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; -} - -function formatLocale(locale) { - var locale_dateTime = locale.dateTime, - locale_date = locale.date, - locale_time = locale.time, - locale_periods = locale.periods, - locale_weekdays = locale.days, - locale_shortWeekdays = locale.shortDays, - locale_months = locale.months, - locale_shortMonths = locale.shortMonths; - - var periodRe = formatRe(locale_periods), - periodLookup = formatLookup(locale_periods), - weekdayRe = formatRe(locale_weekdays), - weekdayLookup = formatLookup(locale_weekdays), - shortWeekdayRe = formatRe(locale_shortWeekdays), - shortWeekdayLookup = formatLookup(locale_shortWeekdays), - monthRe = formatRe(locale_months), - monthLookup = formatLookup(locale_months), - shortMonthRe = formatRe(locale_shortMonths), - shortMonthLookup = formatLookup(locale_shortMonths); - - var formats = { - "a": formatShortWeekday, - "A": formatWeekday, - "b": formatShortMonth, - "B": formatMonth, - "c": null, - "d": formatDayOfMonth, - "e": formatDayOfMonth, - "f": formatMicroseconds, - "H": formatHour24, - "I": formatHour12, - "j": formatDayOfYear, - "L": formatMilliseconds, - "m": formatMonthNumber, - "M": formatMinutes, - "p": formatPeriod, - "q": formatQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatSeconds, - "u": formatWeekdayNumberMonday, - "U": formatWeekNumberSunday, - "V": formatWeekNumberISO, - "w": formatWeekdayNumberSunday, - "W": formatWeekNumberMonday, - "x": null, - "X": null, - "y": formatYear, - "Y": formatFullYear, - "Z": formatZone, - "%": formatLiteralPercent - }; - - var utcFormats = { - "a": formatUTCShortWeekday, - "A": formatUTCWeekday, - "b": formatUTCShortMonth, - "B": formatUTCMonth, - "c": null, - "d": formatUTCDayOfMonth, - "e": formatUTCDayOfMonth, - "f": formatUTCMicroseconds, - "H": formatUTCHour24, - "I": formatUTCHour12, - "j": formatUTCDayOfYear, - "L": formatUTCMilliseconds, - "m": formatUTCMonthNumber, - "M": formatUTCMinutes, - "p": formatUTCPeriod, - "q": formatUTCQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatUTCSeconds, - "u": formatUTCWeekdayNumberMonday, - "U": formatUTCWeekNumberSunday, - "V": formatUTCWeekNumberISO, - "w": formatUTCWeekdayNumberSunday, - "W": formatUTCWeekNumberMonday, - "x": null, - "X": null, - "y": formatUTCYear, - "Y": formatUTCFullYear, - "Z": formatUTCZone, - "%": formatLiteralPercent - }; - - var parses = { - "a": parseShortWeekday, - "A": parseWeekday, - "b": parseShortMonth, - "B": parseMonth, - "c": parseLocaleDateTime, - "d": parseDayOfMonth, - "e": parseDayOfMonth, - "f": parseMicroseconds, - "H": parseHour24, - "I": parseHour24, - "j": parseDayOfYear, - "L": parseMilliseconds, - "m": parseMonthNumber, - "M": parseMinutes, - "p": parsePeriod, - "q": parseQuarter, - "Q": parseUnixTimestamp, - "s": parseUnixTimestampSeconds, - "S": parseSeconds, - "u": parseWeekdayNumberMonday, - "U": parseWeekNumberSunday, - "V": parseWeekNumberISO, - "w": parseWeekdayNumberSunday, - "W": parseWeekNumberMonday, - "x": parseLocaleDate, - "X": parseLocaleTime, - "y": parseYear, - "Y": parseFullYear, - "Z": parseZone, - "%": parseLiteralPercent - }; - - // These recursive directive definitions must be deferred. - formats.x = newFormat(locale_date, formats); - formats.X = newFormat(locale_time, formats); - formats.c = newFormat(locale_dateTime, formats); - utcFormats.x = newFormat(locale_date, utcFormats); - utcFormats.X = newFormat(locale_time, utcFormats); - utcFormats.c = newFormat(locale_dateTime, utcFormats); +function removeBeach(beach) { + var circle = beach.circle, + x = circle.x, + y = circle.cy, + vertex = [x, y], + previous = beach.P, + next = beach.N, + disappearing = [beach]; - function newFormat(specifier, formats) { - return function(date) { - var string = [], - i = -1, - j = 0, - n = specifier.length, - c, - pad, - format; + detachBeach(beach); - if (!(date instanceof Date)) date = new Date(+date); + var lArc = previous; + while (lArc.circle + && Math.abs(x - lArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"] + && Math.abs(y - lArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { + previous = lArc.P; + disappearing.unshift(lArc); + detachBeach(lArc); + lArc = previous; + } - while (++i < n) { - if (specifier.charCodeAt(i) === 37) { - string.push(specifier.slice(j, i)); - if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); - else pad = c === "e" ? " " : "0"; - if (format = formats[c]) c = format(date, pad); - string.push(c); - j = i + 1; - } - } + disappearing.unshift(lArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); - string.push(specifier.slice(j, i)); - return string.join(""); - }; + var rArc = next; + while (rArc.circle + && Math.abs(x - rArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"] + && Math.abs(y - rArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { + next = rArc.N; + disappearing.push(rArc); + detachBeach(rArc); + rArc = next; } - function newParse(specifier, Z) { - return function(string) { - var d = newDate(1900, undefined, 1), - i = parseSpecifier(d, specifier, string += "", 0), - week, day; - if (i != string.length) return null; + disappearing.push(rArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc); - // If a UNIX timestamp is specified, return it. - if ("Q" in d) return new Date(d.Q); - if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); + var nArcs = disappearing.length, + iArc; + for (iArc = 1; iArc < nArcs; ++iArc) { + rArc = disappearing[iArc]; + lArc = disappearing[iArc - 1]; + Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lArc.site, rArc.site, vertex); + } - // If this is utcParse, never use the local timezone. - if (Z && !("Z" in d)) d.Z = 0; + lArc = disappearing[0]; + rArc = disappearing[nArcs - 1]; + rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, rArc.site, null, vertex); - // The am-pm flag is 0 for AM, and 1 for PM. - if ("p" in d) d.H = d.H % 12 + d.p * 12; + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); +} - // If the month was not specified, inherit from the quarter. - if (d.m === undefined) d.m = "q" in d ? d.q : 0; +function addBeach(site) { + var x = site[0], + directrix = site[1], + lArc, + rArc, + dxl, + dxr, + node = _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"]._; - // Convert day-of-week and week-of-year to day-of-year. - if ("V" in d) { - if (d.V < 1 || d.V > 53) return null; - if (!("w" in d)) d.w = 1; - if ("Z" in d) { - week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); - week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"])(week); - week = d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].offset(week, (d.V - 1) * 7); - d.y = week.getUTCFullYear(); - d.m = week.getUTCMonth(); - d.d = week.getUTCDate() + (d.w + 6) % 7; + while (node) { + dxl = leftBreakPoint(node, directrix) - x; + if (dxl > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) node = node.L; else { + dxr = x - rightBreakPoint(node, directrix); + if (dxr > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { + if (!node.R) { + lArc = node; + break; + } + node = node.R; + } else { + if (dxl > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { + lArc = node.P; + rArc = node; + } else if (dxr > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { + lArc = node; + rArc = node.N; } else { - week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); - week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"])(week); - week = d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].offset(week, (d.V - 1) * 7); - d.y = week.getFullYear(); - d.m = week.getMonth(); - d.d = week.getDate() + (d.w + 6) % 7; + lArc = rArc = node; } - } else if ("W" in d || "U" in d) { - if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; - day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); - d.m = 0; - d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; - } - - // If a time zone is specified, all fields are interpreted as UTC and then - // offset according to the specified time zone. - if ("Z" in d) { - d.H += d.Z / 100 | 0; - d.M += d.Z % 100; - return utcDate(d); - } - - // Otherwise, all fields are in local time. - return localDate(d); - }; - } - - function parseSpecifier(d, specifier, string, j) { - var i = 0, - n = specifier.length, - m = string.length, - c, - parse; - - while (i < n) { - if (j >= m) return -1; - c = specifier.charCodeAt(i++); - if (c === 37) { - c = specifier.charAt(i++); - parse = parses[c in pads ? specifier.charAt(i++) : c]; - if (!parse || ((j = parse(d, string, j)) < 0)) return -1; - } else if (c != string.charCodeAt(j++)) { - return -1; + break; } } - - return j; - } - - function parsePeriod(d, string, i) { - var n = periodRe.exec(string.slice(i)); - return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; } - function parseShortWeekday(d, string, i) { - var n = shortWeekdayRe.exec(string.slice(i)); - return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; - } + Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["createCell"])(site); + var newArc = createBeach(site); + _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(lArc, newArc); - function parseWeekday(d, string, i) { - var n = weekdayRe.exec(string.slice(i)); - return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; - } + if (!lArc && !rArc) return; - function parseShortMonth(d, string, i) { - var n = shortMonthRe.exec(string.slice(i)); - return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + if (lArc === rArc) { + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); + rArc = createBeach(lArc.site); + _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(newArc, rArc); + newArc.edge = rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); + return; } - function parseMonth(d, string, i) { - var n = monthRe.exec(string.slice(i)); - return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + if (!rArc) { // && lArc + newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site); + return; } - function parseLocaleDateTime(d, string, i) { - return parseSpecifier(d, locale_dateTime, string, i); - } + // else lArc !== rArc + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc); - function parseLocaleDate(d, string, i) { - return parseSpecifier(d, locale_date, string, i); - } + var lSite = lArc.site, + ax = lSite[0], + ay = lSite[1], + bx = site[0] - ax, + by = site[1] - ay, + rSite = rArc.site, + cx = rSite[0] - ax, + cy = rSite[1] - ay, + d = 2 * (bx * cy - by * cx), + hb = bx * bx + by * by, + hc = cx * cx + cy * cy, + vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay]; - function parseLocaleTime(d, string, i) { - return parseSpecifier(d, locale_time, string, i); - } + Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lSite, rSite, vertex); + newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lSite, site, null, vertex); + rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(site, rSite, null, vertex); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); + Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); +} - function formatShortWeekday(d) { - return locale_shortWeekdays[d.getDay()]; - } +function leftBreakPoint(arc, directrix) { + var site = arc.site, + rfocx = site[0], + rfocy = site[1], + pby2 = rfocy - directrix; - function formatWeekday(d) { - return locale_weekdays[d.getDay()]; - } + if (!pby2) return rfocx; - function formatShortMonth(d) { - return locale_shortMonths[d.getMonth()]; - } + var lArc = arc.P; + if (!lArc) return -Infinity; - function formatMonth(d) { - return locale_months[d.getMonth()]; - } + site = lArc.site; + var lfocx = site[0], + lfocy = site[1], + plby2 = lfocy - directrix; - function formatPeriod(d) { - return locale_periods[+(d.getHours() >= 12)]; - } + if (!plby2) return lfocx; - function formatQuarter(d) { - return 1 + ~~(d.getMonth() / 3); - } + var hl = lfocx - rfocx, + aby2 = 1 / pby2 - 1 / plby2, + b = hl / plby2; - function formatUTCShortWeekday(d) { - return locale_shortWeekdays[d.getUTCDay()]; - } + if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx; - function formatUTCWeekday(d) { - return locale_weekdays[d.getUTCDay()]; - } + return (rfocx + lfocx) / 2; +} - function formatUTCShortMonth(d) { - return locale_shortMonths[d.getUTCMonth()]; - } +function rightBreakPoint(arc, directrix) { + var rArc = arc.N; + if (rArc) return leftBreakPoint(rArc, directrix); + var site = arc.site; + return site[1] === directrix ? site[0] : Infinity; +} - function formatUTCMonth(d) { - return locale_months[d.getUTCMonth()]; - } - function formatUTCPeriod(d) { - return locale_periods[+(d.getUTCHours() >= 12)]; - } +/***/ }), - function formatUTCQuarter(d) { - return 1 + ~~(d.getUTCMonth() / 3); - } +/***/ "./node_modules/d3-voronoi/src/Cell.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-voronoi/src/Cell.js ***! + \*********************************************/ +/*! exports provided: createCell, cellHalfedgeStart, cellHalfedgeEnd, sortCellHalfedges, clipCells */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return { - format: function(specifier) { - var f = newFormat(specifier += "", formats); - f.toString = function() { return specifier; }; - return f; - }, - parse: function(specifier) { - var p = newParse(specifier += "", false); - p.toString = function() { return specifier; }; - return p; - }, - utcFormat: function(specifier) { - var f = newFormat(specifier += "", utcFormats); - f.toString = function() { return specifier; }; - return f; - }, - utcParse: function(specifier) { - var p = newParse(specifier += "", true); - p.toString = function() { return specifier; }; - return p; - } - }; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCell", function() { return createCell; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeStart", function() { return cellHalfedgeStart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeEnd", function() { return cellHalfedgeEnd; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortCellHalfedges", function() { return sortCellHalfedges; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipCells", function() { return clipCells; }); +/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); +/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); -var pads = {"-": "", "_": " ", "0": "0"}, - numberRe = /^\s*\d+/, // note: ignores next directive - percentRe = /^%/, - requoteRe = /[\\^$*+?|[\]().{}]/g; -function pad(value, fill, width) { - var sign = value < 0 ? "-" : "", - string = (sign ? -value : value) + "", - length = string.length; - return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); -} -function requote(s) { - return s.replace(requoteRe, "\\$&"); +function createCell(site) { + return _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][site.index] = { + site: site, + halfedges: [] + }; } -function formatRe(names) { - return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +function cellHalfedgeAngle(cell, edge) { + var site = cell.site, + va = edge.left, + vb = edge.right; + if (site === vb) vb = va, va = site; + if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]); + if (site === va) va = edge[1], vb = edge[0]; + else va = edge[0], vb = edge[1]; + return Math.atan2(va[0] - vb[0], vb[1] - va[1]); } -function formatLookup(names) { - var map = {}, i = -1, n = names.length; - while (++i < n) map[names[i].toLowerCase()] = i; - return map; +function cellHalfedgeStart(cell, edge) { + return edge[+(edge.left !== cell.site)]; } -function parseWeekdayNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.w = +n[0], i + n[0].length) : -1; +function cellHalfedgeEnd(cell, edge) { + return edge[+(edge.left === cell.site)]; } -function parseWeekdayNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.u = +n[0], i + n[0].length) : -1; +function sortCellHalfedges() { + for (var i = 0, n = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length, cell, halfedges, j, m; i < n; ++i) { + if ((cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][i]) && (m = (halfedges = cell.halfedges).length)) { + var index = new Array(m), + array = new Array(m); + for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[j]]); + index.sort(function(i, j) { return array[j] - array[i]; }); + for (j = 0; j < m; ++j) array[j] = halfedges[index[j]]; + for (j = 0; j < m; ++j) halfedges[j] = array[j]; + } + } } -function parseWeekNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.U = +n[0], i + n[0].length) : -1; -} +function clipCells(x0, y0, x1, y1) { + var nCells = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length, + iCell, + cell, + site, + iHalfedge, + halfedges, + nHalfedges, + start, + startX, + startY, + end, + endX, + endY, + cover = true; -function parseWeekNumberISO(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.V = +n[0], i + n[0].length) : -1; -} + for (iCell = 0; iCell < nCells; ++iCell) { + if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { + site = cell.site; + halfedges = cell.halfedges; + iHalfedge = halfedges.length; -function parseWeekNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.W = +n[0], i + n[0].length) : -1; -} + // Remove any dangling clipped edges. + while (iHalfedge--) { + if (!_Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]) { + halfedges.splice(iHalfedge, 1); + } + } -function parseFullYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 4)); - return n ? (d.y = +n[0], i + n[0].length) : -1; -} + // Insert any border edges as necessary. + iHalfedge = 0, nHalfedges = halfedges.length; + while (iHalfedge < nHalfedges) { + end = cellHalfedgeEnd(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]), endX = end[0], endY = end[1]; + start = cellHalfedgeStart(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1]; + if (Math.abs(endX - startX) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Math.abs(endY - startY) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { + halfedges.splice(iHalfedge, 0, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, end, + Math.abs(endX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && y1 - endY > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x0, Math.abs(startX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y1] + : Math.abs(endY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && x1 - endX > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x1, y1] + : Math.abs(endX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endY - y0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x1, Math.abs(startX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y0] + : Math.abs(endY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endX - x0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x0, y0] + : null)) - 1); + ++nHalfedges; + } + } -function parseYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; -} + if (nHalfedges) cover = false; + } + } -function parseZone(d, string, i) { - var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); - return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; -} + // If there weren’t any edges, have the closest site cover the extent. + // It doesn’t matter which corner of the extent we measure! + if (cover) { + var dx, dy, d2, dc = Infinity; -function parseQuarter(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; -} + for (iCell = 0, cover = null; iCell < nCells; ++iCell) { + if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { + site = cell.site; + dx = site[0] - x0; + dy = site[1] - y0; + d2 = dx * dx + dy * dy; + if (d2 < dc) dc = d2, cover = cell; + } + } -function parseMonthNumber(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.m = n[0] - 1, i + n[0].length) : -1; -} + if (cover) { + var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0]; + cover.halfedges.push( + _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site = cover.site, v00, v01)) - 1, + _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v01, v11)) - 1, + _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v11, v10)) - 1, + _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v10, v00)) - 1 + ); + } + } -function parseDayOfMonth(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.d = +n[0], i + n[0].length) : -1; + // Lastly delete any cells with no edges; these were entirely clipped. + for (iCell = 0; iCell < nCells; ++iCell) { + if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { + if (!cell.halfedges.length) { + delete _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]; + } + } + } } -function parseDayOfYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; -} -function parseHour24(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.H = +n[0], i + n[0].length) : -1; -} +/***/ }), -function parseMinutes(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.M = +n[0], i + n[0].length) : -1; -} +/***/ "./node_modules/d3-voronoi/src/Circle.js": +/*!***********************************************!*\ + !*** ./node_modules/d3-voronoi/src/Circle.js ***! + \***********************************************/ +/*! exports provided: firstCircle, attachCircle, detachCircle */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function parseSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.S = +n[0], i + n[0].length) : -1; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstCircle", function() { return firstCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachCircle", function() { return attachCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detachCircle", function() { return detachCircle; }); +/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); +/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); -function parseMilliseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.L = +n[0], i + n[0].length) : -1; -} -function parseMicroseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 6)); - return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; -} -function parseLiteralPercent(d, string, i) { - var n = percentRe.exec(string.slice(i, i + 1)); - return n ? i + n[0].length : -1; -} +var circlePool = []; -function parseUnixTimestamp(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.Q = +n[0], i + n[0].length) : -1; -} +var firstCircle; -function parseUnixTimestampSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.s = +n[0], i + n[0].length) : -1; +function Circle() { + Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this); + this.x = + this.y = + this.arc = + this.site = + this.cy = null; } -function formatDayOfMonth(d, p) { - return pad(d.getDate(), p, 2); -} +function attachCircle(arc) { + var lArc = arc.P, + rArc = arc.N; -function formatHour24(d, p) { - return pad(d.getHours(), p, 2); -} + if (!lArc || !rArc) return; -function formatHour12(d, p) { - return pad(d.getHours() % 12 || 12, p, 2); -} + var lSite = lArc.site, + cSite = arc.site, + rSite = rArc.site; -function formatDayOfYear(d, p) { - return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d), p, 3); -} + if (lSite === rSite) return; -function formatMilliseconds(d, p) { - return pad(d.getMilliseconds(), p, 3); -} + var bx = cSite[0], + by = cSite[1], + ax = lSite[0] - bx, + ay = lSite[1] - by, + cx = rSite[0] - bx, + cy = rSite[1] - by; -function formatMicroseconds(d, p) { - return formatMilliseconds(d, p) + "000"; -} + var d = 2 * (ax * cy - ay * cx); + if (d >= -_Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) return; -function formatMonthNumber(d, p) { - return pad(d.getMonth() + 1, p, 2); -} + var ha = ax * ax + ay * ay, + hc = cx * cx + cy * cy, + x = (cy * ha - ay * hc) / d, + y = (ax * hc - cx * ha) / d; -function formatMinutes(d, p) { - return pad(d.getMinutes(), p, 2); -} + var circle = circlePool.pop() || new Circle; + circle.arc = arc; + circle.site = cSite; + circle.x = x + bx; + circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom -function formatSeconds(d, p) { - return pad(d.getSeconds(), p, 2); -} + arc.circle = circle; -function formatWeekdayNumberMonday(d) { - var day = d.getDay(); - return day === 0 ? 7 : day; -} + var before = null, + node = _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"]._; -function formatWeekNumberSunday(d, p) { - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); -} + while (node) { + if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) { + if (node.L) node = node.L; + else { before = node.P; break; } + } else { + if (node.R) node = node.R; + else { before = node; break; } + } + } -function formatWeekNumberISO(d, p) { - var day = d.getDay(); - d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d).getDay() === 4), p, 2); + _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].insert(before, circle); + if (!before) firstCircle = circle; } -function formatWeekdayNumberSunday(d) { - return d.getDay(); +function detachCircle(arc) { + var circle = arc.circle; + if (circle) { + if (!circle.P) firstCircle = circle.N; + _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].remove(circle); + circlePool.push(circle); + Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(circle); + arc.circle = null; + } } -function formatWeekNumberMonday(d, p) { - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); -} -function formatYear(d, p) { - return pad(d.getFullYear() % 100, p, 2); -} +/***/ }), -function formatFullYear(d, p) { - return pad(d.getFullYear() % 10000, p, 4); -} +/***/ "./node_modules/d3-voronoi/src/Diagram.js": +/*!************************************************!*\ + !*** ./node_modules/d3-voronoi/src/Diagram.js ***! + \************************************************/ +/*! exports provided: epsilon, epsilon2, beaches, cells, circles, edges, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function formatZone(d) { - var z = d.getTimezoneOffset(); - return (z > 0 ? "-" : (z *= -1, "+")) - + pad(z / 60 | 0, "0", 2) - + pad(z % 60, "0", 2); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beaches", function() { return beaches; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cells", function() { return cells; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circles", function() { return circles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "edges", function() { return edges; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Diagram; }); +/* harmony import */ var _Beach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Beach */ "./node_modules/d3-voronoi/src/Beach.js"); +/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js"); +/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js"); +/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); +/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); -function formatUTCDayOfMonth(d, p) { - return pad(d.getUTCDate(), p, 2); -} -function formatUTCHour24(d, p) { - return pad(d.getUTCHours(), p, 2); -} -function formatUTCHour12(d, p) { - return pad(d.getUTCHours() % 12 || 12, p, 2); -} -function formatUTCDayOfYear(d, p) { - return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d), p, 3); -} -function formatUTCMilliseconds(d, p) { - return pad(d.getUTCMilliseconds(), p, 3); -} -function formatUTCMicroseconds(d, p) { - return formatUTCMilliseconds(d, p) + "000"; -} +var epsilon = 1e-6; +var epsilon2 = 1e-12; +var beaches; +var cells; +var circles; +var edges; -function formatUTCMonthNumber(d, p) { - return pad(d.getUTCMonth() + 1, p, 2); +function triangleArea(a, b, c) { + return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]); } -function formatUTCMinutes(d, p) { - return pad(d.getUTCMinutes(), p, 2); +function lexicographic(a, b) { + return b[1] - a[1] + || b[0] - a[0]; } -function formatUTCSeconds(d, p) { - return pad(d.getUTCSeconds(), p, 2); -} +function Diagram(sites, extent) { + var site = sites.sort(lexicographic).pop(), + x, + y, + circle; -function formatUTCWeekdayNumberMonday(d) { - var dow = d.getUTCDay(); - return dow === 0 ? 7 : dow; -} + edges = []; + cells = new Array(sites.length); + beaches = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"]; + circles = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"]; -function formatUTCWeekNumberSunday(d, p) { - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); -} + while (true) { + circle = _Circle__WEBPACK_IMPORTED_MODULE_2__["firstCircle"]; + if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) { + if (site[0] !== x || site[1] !== y) { + Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["addBeach"])(site); + x = site[0], y = site[1]; + } + site = sites.pop(); + } else if (circle) { + Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["removeBeach"])(circle.arc); + } else { + break; + } + } -function formatUTCWeekNumberISO(d, p) { - var day = d.getUTCDay(); - d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d).getUTCDay() === 4), p, 2); -} + Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["sortCellHalfedges"])(); -function formatUTCWeekdayNumberSunday(d) { - return d.getUTCDay(); -} + if (extent) { + var x0 = +extent[0][0], + y0 = +extent[0][1], + x1 = +extent[1][0], + y1 = +extent[1][1]; + Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["clipEdges"])(x0, y0, x1, y1); + Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["clipCells"])(x0, y0, x1, y1); + } -function formatUTCWeekNumberMonday(d, p) { - return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); -} + this.edges = edges; + this.cells = cells; -function formatUTCYear(d, p) { - return pad(d.getUTCFullYear() % 100, p, 2); + beaches = + circles = + edges = + cells = null; } -function formatUTCFullYear(d, p) { - return pad(d.getUTCFullYear() % 10000, p, 4); -} +Diagram.prototype = { + constructor: Diagram, -function formatUTCZone() { - return "+0000"; -} + polygons: function() { + var edges = this.edges; -function formatLiteralPercent() { - return "%"; -} + return this.cells.map(function(cell) { + var polygon = cell.halfedges.map(function(i) { return Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["cellHalfedgeStart"])(cell, edges[i]); }); + polygon.data = cell.site.data; + return polygon; + }); + }, -function formatUnixTimestamp(d) { - return +d; -} + triangles: function() { + var triangles = [], + edges = this.edges; -function formatUnixTimestampSeconds(d) { - return Math.floor(+d / 1000); -} + this.cells.forEach(function(cell, i) { + if (!(m = (halfedges = cell.halfedges).length)) return; + var site = cell.site, + halfedges, + j = -1, + m, + s0, + e1 = edges[halfedges[m - 1]], + s1 = e1.left === site ? e1.right : e1.left; + while (++j < m) { + s0 = s1; + e1 = edges[halfedges[j]]; + s1 = e1.left === site ? e1.right : e1.left; + if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) { + triangles.push([site.data, s0.data, s1.data]); + } + } + }); -/***/ }), + return triangles; + }, -/***/ "./node_modules/d3-time/src/day.js": -/*!*****************************************!*\ - !*** ./node_modules/d3-time/src/day.js ***! - \*****************************************/ -/*! exports provided: default, days */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + links: function() { + return this.edges.filter(function(edge) { + return edge.right; + }).map(function(edge) { + return { + source: edge.left.data, + target: edge.right.data + }; + }); + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "days", function() { return days; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); + find: function(x, y, radius) { + var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell; + // Use the previously-found cell, or start with an arbitrary one. + while (!(cell = that.cells[i1])) if (++i1 >= n) return null; + var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy; + // Traverse the half-edges to find a closer cell, if any. + do { + cell = that.cells[i0 = i1], i1 = null; + cell.halfedges.forEach(function(e) { + var edge = that.edges[e], v = edge.left; + if ((v === cell.site || !v) && !(v = edge.right)) return; + var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy; + if (v2 < d2) d2 = v2, i1 = v.index; + }); + } while (i1 !== null); -var day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setDate(date.getDate() + step); -}, function(start, end) { - return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; -}, function(date) { - return date.getDate() - 1; -}); + that._found = i0; -/* harmony default export */ __webpack_exports__["default"] = (day); -var days = day.range; + return radius == null || d2 <= radius * radius ? cell.site : null; + } +} /***/ }), -/***/ "./node_modules/d3-time/src/duration.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-time/src/duration.js ***! - \**********************************************/ -/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */ +/***/ "./node_modules/d3-voronoi/src/Edge.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-voronoi/src/Edge.js ***! + \*********************************************/ +/*! exports provided: createEdge, createBorderEdge, setEdgeEnd, clipEdges */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationSecond", function() { return durationSecond; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationMinute", function() { return durationMinute; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationHour", function() { return durationHour; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationDay", function() { return durationDay; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationWeek", function() { return durationWeek; }); -var durationSecond = 1e3; -var durationMinute = 6e4; -var durationHour = 36e5; -var durationDay = 864e5; -var durationWeek = 6048e5; - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEdge", function() { return createEdge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBorderEdge", function() { return createBorderEdge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setEdgeEnd", function() { return setEdgeEnd; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipEdges", function() { return clipEdges; }); +/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); -/***/ }), -/***/ "./node_modules/d3-time/src/hour.js": -/*!******************************************!*\ - !*** ./node_modules/d3-time/src/hour.js ***! - \******************************************/ -/*! exports provided: default, hours */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function createEdge(left, right, v0, v1) { + var edge = [null, null], + index = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].push(edge) - 1; + edge.left = left; + edge.right = right; + if (v0) setEdgeEnd(edge, left, right, v0); + if (v1) setEdgeEnd(edge, right, left, v1); + _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][left.index].halfedges.push(index); + _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][right.index].halfedges.push(index); + return edge; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hours", function() { return hours; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); +function createBorderEdge(left, v0, v1) { + var edge = [v0, v1]; + edge.left = left; + return edge; +} +function setEdgeEnd(edge, left, right, vertex) { + if (!edge[0] && !edge[1]) { + edge[0] = vertex; + edge.left = left; + edge.right = right; + } else if (edge.left === right) { + edge[1] = vertex; + } else { + edge[0] = vertex; + } +} +// Liang–Barsky line clipping. +function clipEdge(edge, x0, y0, x1, y1) { + var a = edge[0], + b = edge[1], + ax = a[0], + ay = a[1], + bx = b[0], + by = b[1], + t0 = 0, + t1 = 1, + dx = bx - ax, + dy = by - ay, + r; -var hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); -}, function(date, step) { - date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; -}, function(date) { - return date.getHours(); -}); + r = x0 - ax; + if (!dx && r > 0) return; + r /= dx; + if (dx < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dx > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } -/* harmony default export */ __webpack_exports__["default"] = (hour); -var hours = hour.range; + r = x1 - ax; + if (!dx && r < 0) return; + r /= dx; + if (dx < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dx > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + r = y0 - ay; + if (!dy && r > 0) return; + r /= dy; + if (dy < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dy > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } -/***/ }), + r = y1 - ay; + if (!dy && r < 0) return; + r /= dy; + if (dy < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dy > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } -/***/ "./node_modules/d3-time/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-time/src/index.js ***! - \*******************************************/ -/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check? -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy]; + if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy]; + return true; +} -/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ "./node_modules/d3-time/src/millisecond.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +function connectEdge(edge, x0, y0, x1, y1) { + var v1 = edge[1]; + if (v1) return true; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); + var v0 = edge[0], + left = edge.left, + right = edge.right, + lx = left[0], + ly = left[1], + rx = right[0], + ry = right[1], + fx = (lx + rx) / 2, + fy = (ly + ry) / 2, + fm, + fb; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + if (ry === ly) { + if (fx < x0 || fx >= x1) return; + if (lx > rx) { + if (!v0) v0 = [fx, y0]; + else if (v0[1] >= y1) return; + v1 = [fx, y1]; + } else { + if (!v0) v0 = [fx, y1]; + else if (v0[1] < y0) return; + v1 = [fx, y0]; + } + } else { + fm = (lx - rx) / (ry - ly); + fb = fy - fm * fx; + if (fm < -1 || fm > 1) { + if (lx > rx) { + if (!v0) v0 = [(y0 - fb) / fm, y0]; + else if (v0[1] >= y1) return; + v1 = [(y1 - fb) / fm, y1]; + } else { + if (!v0) v0 = [(y1 - fb) / fm, y1]; + else if (v0[1] < y0) return; + v1 = [(y0 - fb) / fm, y0]; + } + } else { + if (ly < ry) { + if (!v0) v0 = [x0, fm * x0 + fb]; + else if (v0[0] >= x1) return; + v1 = [x1, fm * x1 + fb]; + } else { + if (!v0) v0 = [x1, fm * x1 + fb]; + else if (v0[0] < x0) return; + v1 = [x0, fm * x0 + fb]; + } + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); + edge[0] = v0; + edge[1] = v1; + return true; +} -/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ "./node_modules/d3-time/src/second.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +function clipEdges(x0, y0, x1, y1) { + var i = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].length, + edge; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); + while (i--) { + if (!connectEdge(edge = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i], x0, y0, x1, y1) + || !clipEdge(edge, x0, y0, x1, y1) + || !(Math.abs(edge[0][0] - edge[1][0]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"] + || Math.abs(edge[0][1] - edge[1][1]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"])) { + delete _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i]; + } + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); +/***/ }), -/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ "./node_modules/d3-time/src/minute.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/***/ "./node_modules/d3-voronoi/src/RedBlackTree.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-voronoi/src/RedBlackTree.js ***! + \*****************************************************/ +/*! exports provided: RedBlackNode, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["minutes"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedBlackNode", function() { return RedBlackNode; }); +function RedBlackTree() { + this._ = null; // root node +} -/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ "./node_modules/d3-time/src/hour.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +function RedBlackNode(node) { + node.U = // parent node + node.C = // color - true for red, false for black + node.L = // left node + node.R = // right node + node.P = // previous node + node.N = null; // next node +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["hours"]; }); +RedBlackTree.prototype = { + constructor: RedBlackTree, -/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ "./node_modules/d3-time/src/day.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + insert: function(after, node) { + var parent, grandpa, uncle; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["days"]; }); + if (after) { + node.P = after; + node.N = after.N; + if (after.N) after.N.P = node; + after.N = node; + if (after.R) { + after = after.R; + while (after.L) after = after.L; + after.L = node; + } else { + after.R = node; + } + parent = after; + } else if (this._) { + after = RedBlackFirst(this._); + node.P = null; + node.N = after; + after.P = after.L = node; + parent = after; + } else { + node.P = node.N = null; + this._ = node; + parent = null; + } + node.L = node.R = null; + node.U = parent; + node.C = true; -/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ "./node_modules/d3-time/src/week.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); + after = node; + while (parent && parent.C) { + grandpa = parent.U; + if (parent === grandpa.L) { + uncle = grandpa.R; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.R) { + RedBlackRotateLeft(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + RedBlackRotateRight(this, grandpa); + } + } else { + uncle = grandpa.L; + if (uncle && uncle.C) { + parent.C = uncle.C = false; + grandpa.C = true; + after = grandpa; + } else { + if (after === parent.L) { + RedBlackRotateRight(this, parent); + after = parent; + parent = after.U; + } + parent.C = false; + grandpa.C = true; + RedBlackRotateLeft(this, grandpa); + } + } + parent = after.U; + } + this._.C = false; + }, -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); + remove: function(node) { + if (node.N) node.N.P = node.P; + if (node.P) node.P.N = node.N; + node.N = node.P = null; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); + var parent = node.U, + sibling, + left = node.L, + right = node.R, + next, + red; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); + if (!left) next = right; + else if (!right) next = left; + else next = RedBlackFirst(right); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["monday"]; }); + if (parent) { + if (parent.L === node) parent.L = next; + else parent.R = next; + } else { + this._ = next; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["mondays"]; }); + if (left && right) { + red = next.C; + next.C = node.C; + next.L = left; + left.U = next; + if (next !== right) { + parent = next.U; + next.U = node.U; + node = next.R; + parent.L = node; + next.R = right; + right.U = next; + } else { + next.U = parent; + parent = next; + node = next.R; + } + } else { + red = node.C; + node = next; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesday"]; }); + if (node) node.U = parent; + if (red) return; + if (node && node.C) { node.C = false; return; } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesdays"]; }); + do { + if (node === this._) break; + if (node === parent.L) { + sibling = parent.R; + if (sibling.C) { + sibling.C = false; + parent.C = true; + RedBlackRotateLeft(this, parent); + sibling = parent.R; + } + if ((sibling.L && sibling.L.C) + || (sibling.R && sibling.R.C)) { + if (!sibling.R || !sibling.R.C) { + sibling.L.C = false; + sibling.C = true; + RedBlackRotateRight(this, sibling); + sibling = parent.R; + } + sibling.C = parent.C; + parent.C = sibling.R.C = false; + RedBlackRotateLeft(this, parent); + node = this._; + break; + } + } else { + sibling = parent.L; + if (sibling.C) { + sibling.C = false; + parent.C = true; + RedBlackRotateRight(this, parent); + sibling = parent.L; + } + if ((sibling.L && sibling.L.C) + || (sibling.R && sibling.R.C)) { + if (!sibling.L || !sibling.L.C) { + sibling.R.C = false; + sibling.C = true; + RedBlackRotateLeft(this, sibling); + sibling = parent.L; + } + sibling.C = parent.C; + parent.C = sibling.L.C = false; + RedBlackRotateRight(this, parent); + node = this._; + break; + } + } + sibling.C = true; + node = parent; + parent = parent.U; + } while (!node.C); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesday"]; }); + if (node) node.C = false; + } +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesdays"]; }); +function RedBlackRotateLeft(tree, node) { + var p = node, + q = node.R, + parent = p.U; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursday"]; }); + if (parent) { + if (parent.L === p) parent.L = q; + else parent.R = q; + } else { + tree._ = q; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursdays"]; }); + q.U = parent; + p.U = q; + p.R = q.L; + if (p.R) p.R.U = p; + q.L = p; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["friday"]; }); +function RedBlackRotateRight(tree, node) { + var p = node, + q = node.L, + parent = p.U; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["fridays"]; }); + if (parent) { + if (parent.L === p) parent.L = q; + else parent.R = q; + } else { + tree._ = q; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturday"]; }); + q.U = parent; + p.U = q; + p.L = q.R; + if (p.L) p.L.U = p; + q.R = p; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturdays"]; }); +function RedBlackFirst(node) { + while (node.L) node = node.L; + return node; +} -/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ "./node_modules/d3-time/src/month.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); +/* harmony default export */ __webpack_exports__["default"] = (RedBlackTree); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["months"]; }); -/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ "./node_modules/d3-time/src/year.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["years"]; }); +/***/ "./node_modules/d3-voronoi/src/constant.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-voronoi/src/constant.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ "./node_modules/d3-time/src/utcMinute.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["utcMinutes"]; }); -/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ "./node_modules/d3-time/src/utcHour.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["utcHours"]; }); +/***/ "./node_modules/d3-voronoi/src/index.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-voronoi/src/index.js ***! + \**********************************************/ +/*! exports provided: voronoi */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ "./node_modules/d3-time/src/utcDay.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _voronoi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./voronoi */ "./node_modules/d3-voronoi/src/voronoi.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return _voronoi__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["utcDays"]; }); -/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ "./node_modules/d3-time/src/utcWeek.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); +/***/ "./node_modules/d3-voronoi/src/point.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-voronoi/src/point.js ***! + \**********************************************/ +/*! exports provided: x, y */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMonday"]; }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); +function x(d) { + return d[0]; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMondays"]; }); +function y(d) { + return d[1]; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesday"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesdays"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesday"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesdays"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursday"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursdays"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFriday"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFridays"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturday"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturdays"]; }); - -/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ "./node_modules/d3-time/src/utcMonth.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["utcMonths"]; }); - -/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ "./node_modules/d3-time/src/utcYear.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["utcYears"]; }); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "./node_modules/d3-time/src/interval.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-time/src/interval.js ***! - \**********************************************/ +/***/ "./node_modules/d3-voronoi/src/voronoi.js": +/*!************************************************!*\ + !*** ./node_modules/d3-voronoi/src/voronoi.js ***! + \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return newInterval; }); -var t0 = new Date, - t1 = new Date; +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-voronoi/src/constant.js"); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-voronoi/src/point.js"); +/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); -function newInterval(floori, offseti, count, field) { - function interval(date) { - return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x = _point__WEBPACK_IMPORTED_MODULE_1__["x"], + y = _point__WEBPACK_IMPORTED_MODULE_1__["y"], + extent = null; + + function voronoi(data) { + return new _Diagram__WEBPACK_IMPORTED_MODULE_2__["default"](data.map(function(d, i) { + var s = [Math.round(x(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"], Math.round(y(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]]; + s.index = i; + s.data = d; + return s; + }), extent); } - interval.floor = function(date) { - return floori(date = new Date(+date)), date; + voronoi.polygons = function(data) { + return voronoi(data).polygons(); }; - interval.ceil = function(date) { - return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + voronoi.links = function(data) { + return voronoi(data).links(); }; - interval.round = function(date) { - var d0 = interval(date), - d1 = interval.ceil(date); - return date - d0 < d1 - date ? d0 : d1; + voronoi.triangles = function(data) { + return voronoi(data).triangles(); }; - interval.offset = function(date, step) { - return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + voronoi.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : x; }; - interval.range = function(start, stop, step) { - var range = [], previous; - start = interval.ceil(start); - step = step == null ? 1 : Math.floor(step); - if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date - do range.push(previous = new Date(+start)), offseti(start, step), floori(start); - while (previous < start && start < stop); - return range; + voronoi.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : y; }; - interval.filter = function(test) { - return newInterval(function(date) { - if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); - }, function(date, step) { - if (date >= date) { - if (step < 0) while (++step <= 0) { - while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty - } else while (--step >= 0) { - while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty - } - } - }); + voronoi.extent = function(_) { + return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]]; }; - if (count) { - interval.count = function(start, end) { - t0.setTime(+start), t1.setTime(+end); - floori(t0), floori(t1); - return Math.floor(count(t0, t1)); - }; - - interval.every = function(step) { - step = Math.floor(step); - return !isFinite(step) || !(step > 0) ? null - : !(step > 1) ? interval - : interval.filter(field - ? function(d) { return field(d) % step === 0; } - : function(d) { return interval.count(0, d) % step === 0; }); - }; - } - - return interval; -} - - -/***/ }), - -/***/ "./node_modules/d3-time/src/millisecond.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-time/src/millisecond.js ***! - \*************************************************/ -/*! exports provided: default, milliseconds */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return milliseconds; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); - + voronoi.size = function(_) { + return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]]; + }; -var millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function() { - // noop -}, function(date, step) { - date.setTime(+date + step); -}, function(start, end) { - return end - start; + return voronoi; }); -// An optimized implementation for this simple case. -millisecond.every = function(k) { - k = Math.floor(k); - if (!isFinite(k) || !(k > 0)) return null; - if (!(k > 1)) return millisecond; - return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setTime(Math.floor(date / k) * k); - }, function(date, step) { - date.setTime(+date + step * k); - }, function(start, end) { - return (end - start) / k; - }); -}; - -/* harmony default export */ __webpack_exports__["default"] = (millisecond); -var milliseconds = millisecond.range; - /***/ }), -/***/ "./node_modules/d3-time/src/minute.js": -/*!********************************************!*\ - !*** ./node_modules/d3-time/src/minute.js ***! - \********************************************/ -/*! exports provided: default, minutes */ +/***/ "./node_modules/d3-zoom/src/constant.js": +/*!**********************************************!*\ + !*** ./node_modules/d3-zoom/src/constant.js ***! + \**********************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minutes", function() { return minutes; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); - - - -var minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); -}, function(date, step) { - date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; -}, function(date) { - return date.getMinutes(); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; }); -/* harmony default export */ __webpack_exports__["default"] = (minute); -var minutes = minute.range; - /***/ }), -/***/ "./node_modules/d3-time/src/month.js": +/***/ "./node_modules/d3-zoom/src/event.js": /*!*******************************************!*\ - !*** ./node_modules/d3-time/src/month.js ***! + !*** ./node_modules/d3-zoom/src/event.js ***! \*******************************************/ -/*! exports provided: default, months */ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "months", function() { return months; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); - - -var month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setDate(1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setMonth(date.getMonth() + step); -}, function(start, end) { - return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; -}, function(date) { - return date.getMonth(); -}); - -/* harmony default export */ __webpack_exports__["default"] = (month); -var months = month.range; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoomEvent; }); +function ZoomEvent(target, type, transform) { + this.target = target; + this.type = type; + this.transform = transform; +} /***/ }), -/***/ "./node_modules/d3-time/src/second.js": -/*!********************************************!*\ - !*** ./node_modules/d3-time/src/second.js ***! - \********************************************/ -/*! exports provided: default, seconds */ +/***/ "./node_modules/d3-zoom/src/index.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-zoom/src/index.js ***! + \*******************************************/ +/*! exports provided: zoom, zoomTransform, zoomIdentity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seconds", function() { return seconds; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); - - - -var second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setTime(date - date.getMilliseconds()); -}, function(date, step) { - date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]; -}, function(date) { - return date.getUTCSeconds(); -}); - -/* harmony default export */ __webpack_exports__["default"] = (second); -var seconds = second.range; - - -/***/ }), - -/***/ "./node_modules/d3-time/src/utcDay.js": -/*!********************************************!*\ - !*** ./node_modules/d3-time/src/utcDay.js ***! - \********************************************/ -/*! exports provided: default, utcDays */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-zoom/src/zoom.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; }); -var utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCDate(date.getUTCDate() + step); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; -}, function(date) { - return date.getUTCDate() - 1; -}); -/* harmony default export */ __webpack_exports__["default"] = (utcDay); -var utcDays = utcDay.range; /***/ }), -/***/ "./node_modules/d3-time/src/utcHour.js": +/***/ "./node_modules/d3-zoom/src/noevent.js": /*!*********************************************!*\ - !*** ./node_modules/d3-time/src/utcHour.js ***! + !*** ./node_modules/d3-zoom/src/noevent.js ***! \*********************************************/ -/*! exports provided: default, utcHours */ +/*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +function nopropagation() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); +} -var utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCMinutes(0, 0, 0); -}, function(date, step) { - date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; -}, function(date) { - return date.getUTCHours(); +/* harmony default export */ __webpack_exports__["default"] = (function() { + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); + d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); }); -/* harmony default export */ __webpack_exports__["default"] = (utcHour); -var utcHours = utcHour.range; - /***/ }), -/***/ "./node_modules/d3-time/src/utcMinute.js": +/***/ "./node_modules/d3-zoom/src/transform.js": /*!***********************************************!*\ - !*** ./node_modules/d3-time/src/utcMinute.js ***! + !*** ./node_modules/d3-zoom/src/transform.js ***! \***********************************************/ -/*! exports provided: default, utcMinutes */ +/*! exports provided: Transform, identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transform; }); +function Transform(k, x, y) { + this.k = k; + this.x = x; + this.y = y; +} +Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x, y) { + return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); + }, + apply: function(point) { + return [point[0] * this.k + this.x, point[1] * this.k + this.y]; + }, + applyX: function(x) { + return x * this.k + this.x; + }, + applyY: function(y) { + return y * this.k + this.y; + }, + invert: function(location) { + return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; + }, + invertX: function(x) { + return (x - this.x) / this.k; + }, + invertY: function(y) { + return (y - this.y) / this.k; + }, + rescaleX: function(x) { + return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); + }, + rescaleY: function(y) { + return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } +}; +var identity = new Transform(1, 0, 0); -var utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCSeconds(0, 0); -}, function(date, step) { - date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); -}, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; -}, function(date) { - return date.getUTCMinutes(); -}); +transform.prototype = Transform.prototype; -/* harmony default export */ __webpack_exports__["default"] = (utcMinute); -var utcMinutes = utcMinute.range; +function transform(node) { + while (!node.__zoom) if (!(node = node.parentNode)) return identity; + return node.__zoom; +} /***/ }), -/***/ "./node_modules/d3-time/src/utcMonth.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-time/src/utcMonth.js ***! - \**********************************************/ -/*! exports provided: default, utcMonths */ +/***/ "./node_modules/d3-zoom/src/zoom.js": +/*!******************************************!*\ + !*** ./node_modules/d3-zoom/src/zoom.js ***! + \******************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-zoom/src/constant.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-zoom/src/event.js"); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js"); +/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-zoom/src/noevent.js"); -var utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCDate(1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCMonth(date.getUTCMonth() + step); -}, function(start, end) { - return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; -}, function(date) { - return date.getUTCMonth(); -}); -/* harmony default export */ __webpack_exports__["default"] = (utcMonth); -var utcMonths = utcMonth.range; -/***/ }), -/***/ "./node_modules/d3-time/src/utcWeek.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-time/src/utcWeek.js ***! - \*********************************************/ -/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); -function utcWeekday(i) { - return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCDate(date.getUTCDate() + step * 7); - }, function(start, end) { - return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; - }); +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button; } -var utcSunday = utcWeekday(0); -var utcMonday = utcWeekday(1); -var utcTuesday = utcWeekday(2); -var utcWednesday = utcWeekday(3); -var utcThursday = utcWeekday(4); -var utcFriday = utcWeekday(5); -var utcSaturday = utcWeekday(6); - -var utcSundays = utcSunday.range; -var utcMondays = utcMonday.range; -var utcTuesdays = utcTuesday.range; -var utcWednesdays = utcWednesday.range; -var utcThursdays = utcThursday.range; -var utcFridays = utcFriday.range; -var utcSaturdays = utcSaturday.range; +function defaultExtent() { + var e = this; + if (e instanceof SVGElement) { + e = e.ownerSVGElement || e; + if (e.hasAttribute("viewBox")) { + e = e.viewBox.baseVal; + return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; + } + return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; + } + return [[0, 0], [e.clientWidth, e.clientHeight]]; +} +function defaultTransform() { + return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"]; +} -/***/ }), - -/***/ "./node_modules/d3-time/src/utcYear.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-time/src/utcYear.js ***! - \*********************************************/ -/*! exports provided: default, utcYears */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function defaultWheelDelta() { + return -d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaY * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode === 1 ? 0.05 : d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode ? 1 : 0.002); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); +function defaultTouchable() { + return navigator.maxTouchPoints || ("ontouchstart" in this); +} +function defaultConstrain(transform, extent, translateExtent) { + var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], + dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], + dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], + dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; + return transform.translate( + dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), + dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) + ); +} -var utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step); -}, function(start, end) { - return end.getUTCFullYear() - start.getUTCFullYear(); -}, function(date) { - return date.getUTCFullYear(); -}); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var filter = defaultFilter, + extent = defaultExtent, + constrain = defaultConstrain, + wheelDelta = defaultWheelDelta, + touchable = defaultTouchable, + scaleExtent = [0, Infinity], + translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], + duration = 250, + interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolateZoom"], + listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "zoom", "end"), + touchstarting, + touchending, + touchDelay = 500, + wheelDelay = 150, + clickDistance2 = 0; -// An optimized implementation for this simple case. -utcYear.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step * k); - }); -}; + function zoom(selection) { + selection + .property("__zoom", defaultTransform) + .on("wheel.zoom", wheeled) + .on("mousedown.zoom", mousedowned) + .on("dblclick.zoom", dblclicked) + .filter(touchable) + .on("touchstart.zoom", touchstarted) + .on("touchmove.zoom", touchmoved) + .on("touchend.zoom touchcancel.zoom", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } -/* harmony default export */ __webpack_exports__["default"] = (utcYear); -var utcYears = utcYear.range; + zoom.transform = function(collection, transform, point) { + var selection = collection.selection ? collection.selection() : collection; + selection.property("__zoom", defaultTransform); + if (collection !== selection) { + schedule(collection, transform, point); + } else { + selection.interrupt().each(function() { + gesture(this, arguments) + .start() + .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) + .end(); + }); + } + }; + zoom.scaleBy = function(selection, k, p) { + zoom.scaleTo(selection, function() { + var k0 = this.__zoom.k, + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return k0 * k1; + }, p); + }; -/***/ }), + zoom.scaleTo = function(selection, k, p) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t0 = this.__zoom, + p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, + p1 = t0.invert(p0), + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); + }, p); + }; -/***/ "./node_modules/d3-time/src/week.js": -/*!******************************************!*\ - !*** ./node_modules/d3-time/src/week.js ***! - \******************************************/ -/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + zoom.translateBy = function(selection, x, y) { + zoom.transform(selection, function() { + return constrain(this.__zoom.translate( + typeof x === "function" ? x.apply(this, arguments) : x, + typeof y === "function" ? y.apply(this, arguments) : y + ), extent.apply(this, arguments), translateExtent); + }); + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sunday", function() { return sunday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monday", function() { return monday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesday", function() { return tuesday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesday", function() { return wednesday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursday", function() { return thursday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friday", function() { return friday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturday", function() { return saturday; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sundays", function() { return sundays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mondays", function() { return mondays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesdays", function() { return tuesdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesdays", function() { return wednesdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursdays", function() { return thursdays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fridays", function() { return fridays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturdays", function() { return saturdays; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js"); + zoom.translateTo = function(selection, x, y, p) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t = this.__zoom, + p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; + return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"].translate(p0[0], p0[1]).scale(t.k).translate( + typeof x === "function" ? -x.apply(this, arguments) : -x, + typeof y === "function" ? -y.apply(this, arguments) : -y + ), e, translateExtent); + }, p); + }; + function scale(transform, k) { + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); + return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, transform.x, transform.y); + } + function translate(transform, p0, p1) { + var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; + return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](transform.k, x, y); + } -function weekday(i) { - return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setDate(date.getDate() + step * 7); - }, function(start, end) { - return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; - }); -} + function centroid(extent) { + return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; + } -var sunday = weekday(0); -var monday = weekday(1); -var tuesday = weekday(2); -var wednesday = weekday(3); -var thursday = weekday(4); -var friday = weekday(5); -var saturday = weekday(6); + function schedule(transition, transform, point) { + transition + .on("start.zoom", function() { gesture(this, arguments).start(); }) + .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); }) + .tween("zoom", function() { + var that = this, + args = arguments, + g = gesture(that, args), + e = extent.apply(that, args), + p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, + w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), + a = that.__zoom, + b = typeof transform === "function" ? transform.apply(that, args) : transform, + i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); + return function(t) { + if (t === 1) t = b; // Avoid rounding error on end. + else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, p[0] - l[0] * k, p[1] - l[1] * k); } + g.zoom(null, t); + }; + }); + } -var sundays = sunday.range; -var mondays = monday.range; -var tuesdays = tuesday.range; -var wednesdays = wednesday.range; -var thursdays = thursday.range; -var fridays = friday.range; -var saturdays = saturday.range; + function gesture(that, args, clean) { + return (!clean && that.__zooming) || new Gesture(that, args); + } + function Gesture(that, args) { + this.that = that; + this.args = args; + this.active = 0; + this.extent = extent.apply(that, args); + this.taps = 0; + } -/***/ }), + Gesture.prototype = { + start: function() { + if (++this.active === 1) { + this.that.__zooming = this; + this.emit("start"); + } + return this; + }, + zoom: function(key, transform) { + if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); + if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); + if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); + this.that.__zoom = transform; + this.emit("zoom"); + return this; + }, + end: function() { + if (--this.active === 0) { + delete this.that.__zooming; + this.emit("end"); + } + return this; + }, + emit: function(type) { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]); + } + }; -/***/ "./node_modules/d3-time/src/year.js": -/*!******************************************!*\ - !*** ./node_modules/d3-time/src/year.js ***! - \******************************************/ -/*! exports provided: default, years */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function wheeled() { + if (!filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + t = this.__zoom, + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), + p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "years", function() { return years; }); -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js"); + // If the mouse is in the same location as before, reuse it. + // If there were recent wheel events, reset the wheel idle timeout. + if (g.wheel) { + if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { + g.mouse[1] = t.invert(g.mouse[0] = p); + } + clearTimeout(g.wheel); + } + // If this wheel event won’t trigger a transform change, ignore it. + else if (t.k === k) return; -var year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setFullYear(date.getFullYear() + step); -}, function(start, end) { - return end.getFullYear() - start.getFullYear(); -}, function(date) { - return date.getFullYear(); -}); + // Otherwise, capture the mouse point and location at the start. + else { + g.mouse = [p, t.invert(p)]; + Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); + g.start(); + } -// An optimized implementation for this simple case. -year.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { - date.setFullYear(Math.floor(date.getFullYear() / k) * k); - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setFullYear(date.getFullYear() + step * k); - }); -}; + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); + g.wheel = setTimeout(wheelidled, wheelDelay); + g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); -/* harmony default export */ __webpack_exports__["default"] = (year); -var years = year.range; + function wheelidled() { + g.wheel = null; + g.end(); + } + } + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var g = gesture(this, arguments, true), + v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), + p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this), + x0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX, + y0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY; -/***/ }), + Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); + g.mouse = [p, this.__zoom.invert(p)]; + Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); + g.start(); -/***/ "./node_modules/d3-timer/src/index.js": -/*!********************************************!*\ - !*** ./node_modules/d3-timer/src/index.js ***! - \********************************************/ -/*! exports provided: now, timer, timerFlush, timeout, interval */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function mousemoved() { + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); + if (!g.moved) { + var dx = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX - x0, dy = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY - y0; + g.moved = dx * dx + dy * dy > clickDistance2; + } + g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(g.that), g.mouse[1]), g.extent, translateExtent)); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; }); + function mouseupped() { + v.on("mousemove.zoom mouseup.zoom", null); + Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, g.moved); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); + g.end(); + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); + function dblclicked() { + if (!filter.apply(this, arguments)) return; + var t0 = this.__zoom, + p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this), + p1 = t0.invert(p0), + k1 = t0.k * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey ? 0.5 : 2), + t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); + if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).transition().duration(duration).call(schedule, t1, p0); + else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).call(zoom.transform, t1); + } -/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "./node_modules/d3-timer/src/timeout.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches, + n = touches.length, + g = gesture(this, arguments, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches.length === n), + started, i, t, p; -/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-timer/src/interval.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); + for (i = 0; i < n; ++i) { + t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier); + p = [p, this.__zoom.invert(p), t.identifier]; + if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; + else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; + } + if (touchstarting) touchstarting = clearTimeout(touchstarting); + if (started) { + if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); + Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); + g.start(); + } + } + function touchmoved() { + if (!this.__zooming) return; + var g = gesture(this, arguments), + touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches, + n = touches.length, i, t, p, l; + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); + if (touchstarting) touchstarting = clearTimeout(touchstarting); + g.taps = 0; + for (i = 0; i < n; ++i) { + t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier); + if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; + else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; + } + t = g.that.__zoom; + if (g.touch1) { + var p0 = g.touch0[0], l0 = g.touch0[1], + p1 = g.touch1[0], l1 = g.touch1[1], + dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, + dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; + t = scale(t, Math.sqrt(dp / dl)); + p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; + l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; + } + else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; + else return; + g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); + } + function touchended() { + if (!this.__zooming) return; + var g = gesture(this, arguments), + touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches, + n = touches.length, i, t; + Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, touchDelay); + for (i = 0; i < n; ++i) { + t = touches[i]; + if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; + else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; + } + if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; + if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); + else { + g.end(); + // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. + if (g.taps === 2) { + var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).on("dblclick.zoom"); + if (p) p.apply(this, arguments); + } + } + } + zoom.wheelDelta = function(_) { + return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(+_), zoom) : wheelDelta; + }; -/***/ }), + zoom.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : filter; + }; -/***/ "./node_modules/d3-timer/src/interval.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-timer/src/interval.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + zoom.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : touchable; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); + zoom.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; + }; + zoom.scaleExtent = function(_) { + return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; + }; -/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { - var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; - t.restart(function tick(elapsed) { - elapsed += total; - t.restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - return t; -}); + zoom.translateExtent = function(_) { + return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; + }; + zoom.constrain = function(_) { + return arguments.length ? (constrain = _, zoom) : constrain; + }; -/***/ }), + zoom.duration = function(_) { + return arguments.length ? (duration = +_, zoom) : duration; + }; -/***/ "./node_modules/d3-timer/src/timeout.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-timer/src/timeout.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + zoom.interpolate = function(_) { + return arguments.length ? (interpolate = _, zoom) : interpolate; + }; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js"); + zoom.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? zoom : value; + }; + zoom.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); + }; -/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { - var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"]; - delay = delay == null ? 0 : +delay; - t.restart(function(elapsed) { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; + return zoom; }); /***/ }), -/***/ "./node_modules/d3-timer/src/timer.js": -/*!********************************************!*\ - !*** ./node_modules/d3-timer/src/timer.js ***! - \********************************************/ -/*! exports provided: now, Timer, timer, timerFlush */ +/***/ "./node_modules/d3/dist/package.js": +/*!*****************************************!*\ + !*** ./node_modules/d3/dist/package.js ***! + \*****************************************/ +/*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); -var frame = 0, // is an animation frame pending? - timeout = 0, // is a timeout pending? - interval = 0, // are any timers active? - pokeDelay = 1000, // how frequently we check for clock skew - taskHead, - taskTail, - clockLast = 0, - clockNow = 0, - clockSkew = 0, - clock = typeof performance === "object" && performance.now ? performance : Date, - setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "description", function() { return description; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keywords", function() { return keywords; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepage", function() { return homepage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "license", function() { return license; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "author", function() { return author; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "main", function() { return main; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpkg", function() { return unpkg; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsdelivr", function() { return jsdelivr; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "module", function() { return module; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repository", function() { return repository; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "files", function() { return files; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scripts", function() { return scripts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "devDependencies", function() { return devDependencies; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; }); +var name = "d3"; +var version = "5.14.2"; +var description = "Data-Driven Documents"; +var keywords = ["dom","visualization","svg","animation","canvas"]; +var homepage = "https://d3js.org"; +var license = "BSD-3-Clause"; +var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"}; +var main = "dist/d3.node.js"; +var unpkg = "dist/d3.min.js"; +var jsdelivr = "dist/d3.min.js"; +var module = "index.js"; +var repository = {"type":"git","url":"https://github.com/d3/d3.git"}; +var files = ["dist/**/*.js","index.js"]; +var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"}; +var devDependencies = {"json2module":"0.0","rimraf":"2","rollup":"1","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"3","rollup-plugin-terser":"5","tape":"4"}; +var dependencies = {"d3-array":"1","d3-axis":"1","d3-brush":"1","d3-chord":"1","d3-collection":"1","d3-color":"1","d3-contour":"1","d3-dispatch":"1","d3-drag":"1","d3-dsv":"1","d3-ease":"1","d3-fetch":"1","d3-force":"1","d3-format":"1","d3-geo":"1","d3-hierarchy":"1","d3-interpolate":"1","d3-path":"1","d3-polygon":"1","d3-quadtree":"1","d3-random":"1","d3-scale":"2","d3-scale-chromatic":"1","d3-selection":"1","d3-shape":"1","d3-time":"1","d3-time-format":"2","d3-timer":"1","d3-transition":"1","d3-voronoi":"1","d3-zoom":"1"}; -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} -function clearNow() { - clockNow = 0; -} +/***/ }), -function Timer() { - this._call = - this._time = - this._next = null; -} +/***/ "./node_modules/d3/index.js": +/*!**********************************!*\ + !*** ./node_modules/d3/index.js ***! + \**********************************/ +/*! exports provided: version, bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, ribbon, nest, set, map, keys, values, entries, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, voronoi, zoom, zoomTransform, zoomIdentity */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ "./node_modules/d3/dist/package.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__["version"]; }); -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisect"]; }); -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectRight"]; }); -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectLeft"]; }); -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ascending"]; }); -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisector"]; }); -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; // Strictly less than if we recomputed clockNow. - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cross"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["descending"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["deviation"]; }); -/***/ "./node_modules/d3-transition/src/active.js": -/*!**************************************************!*\ - !*** ./node_modules/d3-transition/src/active.js ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["extent"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["histogram"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdFreedmanDiaconis"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdScott"]; }); -var root = [null]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdSturges"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { - var schedules = node.__transition, - schedule, - i; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["max"]; }); - if (schedules) { - name = name == null ? null : name + ""; - for (i in schedules) { - if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) { - return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i); - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["mean"]; }); - return null; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["median"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["merge"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["min"]; }); -/***/ "./node_modules/d3-transition/src/index.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-transition/src/index.js ***! - \*************************************************/ -/*! exports provided: transition, active, interrupt */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["pairs"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "./node_modules/d3-transition/src/selection/index.js"); -/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["permute"]; }); -/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ "./node_modules/d3-transition/src/active.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantile"]; }); -/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/interrupt.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["range"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["scan"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sum"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ticks"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickIncrement"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickStep"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["transpose"]; }); -/***/ "./node_modules/d3-transition/src/interrupt.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-transition/src/interrupt.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["variance"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["zip"]; }); +/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ "./node_modules/d3-axis/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisTop"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { - var schedules = node.__transition, - schedule, - active, - empty = true, - i; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisRight"]; }); - if (!schedules) return; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisBottom"]; }); - name = name == null ? null : name + ""; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisLeft"]; }); - for (i in schedules) { - if ((schedule = schedules[i]).name !== name) { empty = false; continue; } - active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDING"]; - schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDED"]; - schedule.timer.stop(); - schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); - delete schedules[i]; - } +/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ "./node_modules/d3-brush/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brush"]; }); - if (empty) delete node.__transition; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushX"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushY"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushSelection"]; }); -/***/ "./node_modules/d3-transition/src/selection/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-transition/src/selection/index.js ***! - \***********************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ "./node_modules/d3-chord/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chord"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/selection/interrupt.js"); -/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/selection/transition.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbon"]; }); +/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["nest"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["set"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["map"]; }); -d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__["default"]; -d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["keys"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["values"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["entries"]; }); -/***/ "./node_modules/d3-transition/src/selection/interrupt.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-transition/src/selection/interrupt.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["color"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ "./node_modules/d3-transition/src/interrupt.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["rgb"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hsl"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - return this.each(function() { - Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name); - }); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lab"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hcl"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lch"]; }); -/***/ "./node_modules/d3-transition/src/selection/transition.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-transition/src/selection/transition.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["gray"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js"); -/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["cubehelix"]; }); +/* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-contour */ "./node_modules/d3-contour/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contours"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contourDensity"]; }); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__["dispatch"]; }); +/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["drag"]; }); -var defaultTiming = { - time: null, // Set on use. - delay: 0, - duration: 250, - ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"] -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragDisable"]; }); -function inherit(node, id) { - var timing; - while (!(timing = node.__transition) || !(timing = timing[id])) { - if (!(node = node.parentNode)) { - return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), defaultTiming; - } - } - return timing; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragEnable"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name) { - var id, - timing; +/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["dsvFormat"]; }); - if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]) { - id = name._id, name = name._name; - } else { - id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + ""; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParse"]; }); - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id)); - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParseRows"]; }); - return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormat"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatBody"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRows"]; }); -/***/ "./node_modules/d3-transition/src/transition/attr.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/attr.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRow"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); -/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatValue"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParse"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParseRows"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormat"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatBody"]; }); -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRows"]; }); -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRow"]; }); -function attrConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttribute(name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatValue"]; }); -function attrConstantNS(fullname, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttributeNS(fullname.space, fullname.local); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["autoType"]; }); -function attrFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttribute(name); - string0 = this.getAttribute(name); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} +/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeLinear"]; }); -function attrFunctionNS(fullname, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); - string0 = this.getAttributeNS(fullname.space, fullname.local); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuad"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - return this.attrTween(name, typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value)) - : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) - : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadIn"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadOut"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadInOut"]; }); -/***/ "./node_modules/d3-transition/src/transition/attrTween.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/attrTween.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubic"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicIn"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicOut"]; }); -function attrInterpolate(name, i) { - return function(t) { - this.setAttribute(name, i.call(this, t)); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicInOut"]; }); -function attrInterpolateNS(fullname, i) { - return function(t) { - this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePoly"]; }); -function attrTweenNS(fullname, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); - return t0; - } - tween._value = value; - return tween; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyIn"]; }); -function attrTween(name, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); - return t0; - } - tween._value = value; - return tween; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyOut"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - var key = "attr." + name; - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name); - return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyInOut"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSin"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinIn"]; }); -/***/ "./node_modules/d3-transition/src/transition/delay.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/delay.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinOut"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinInOut"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExp"]; }); -function delayFunction(id, value) { - return function() { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpIn"]; }); -function delayConstant(id, value) { - return value = +value, function() { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpOut"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - var id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpInOut"]; }); - return arguments.length - ? this.each((typeof value === "function" - ? delayFunction - : delayConstant)(id, value)) - : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleIn"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleOut"]; }); -/***/ "./node_modules/d3-transition/src/transition/duration.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/duration.js ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleInOut"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounce"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceIn"]; }); -function durationFunction(id, value) { - return function() { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceOut"]; }); -function durationConstant(id, value) { - return value = +value, function() { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceInOut"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - var id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBack"]; }); - return arguments.length - ? this.each((typeof value === "function" - ? durationFunction - : durationConstant)(id, value)) - : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackIn"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackOut"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackInOut"]; }); -/***/ "./node_modules/d3-transition/src/transition/ease.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/ease.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElastic"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticIn"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticOut"]; }); -function easeConstant(id, value) { - if (typeof value !== "function") throw new Error; - return function() { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticInOut"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - var id = this._id; +/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ "./node_modules/d3-fetch/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["blob"]; }); - return arguments.length - ? this.each(easeConstant(id, value)) - : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["buffer"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["dsv"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["csv"]; }); -/***/ "./node_modules/d3-transition/src/transition/end.js": -/*!**********************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/end.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["tsv"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["image"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["json"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var on0, on1, that = this, id = that._id, size = that.size(); - return new Promise(function(resolve, reject) { - var cancel = {value: reject}, - end = {value: function() { if (--size === 0) resolve(); }}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["text"]; }); - that.each(function() { - var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), - on = schedule.on; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["xml"]; }); - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) { - on1 = (on0 = on).copy(); - on1._.cancel.push(cancel); - on1._.interrupt.push(cancel); - on1._.end.push(end); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["html"]; }); - schedule.on = on1; - }); - }); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["svg"]; }); +/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ "./node_modules/d3-force/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCenter"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCollide"]; }); -/***/ "./node_modules/d3-transition/src/transition/filter.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/filter.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceLink"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceManyBody"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceRadial"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceSimulation"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(match) { - if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceX"]; }); - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceY"]; }); - return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id); -}); +/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatDefaultLocale"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["format"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatPrefix"]; }); -/***/ "./node_modules/d3-transition/src/transition/index.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/index.js ***! - \************************************************************/ -/*! exports provided: Transition, default, newId */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatLocale"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; }); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ "./node_modules/d3-transition/src/transition/attr.js"); -/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ "./node_modules/d3-transition/src/transition/attrTween.js"); -/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ "./node_modules/d3-transition/src/transition/delay.js"); -/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-transition/src/transition/duration.js"); -/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ "./node_modules/d3-transition/src/transition/ease.js"); -/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter.js */ "./node_modules/d3-transition/src/transition/filter.js"); -/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge.js */ "./node_modules/d3-transition/src/transition/merge.js"); -/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./on.js */ "./node_modules/d3-transition/src/transition/on.js"); -/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-transition/src/transition/remove.js"); -/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select.js */ "./node_modules/d3-transition/src/transition/select.js"); -/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selectAll.js */ "./node_modules/d3-transition/src/transition/selectAll.js"); -/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selection.js */ "./node_modules/d3-transition/src/transition/selection.js"); -/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.js */ "./node_modules/d3-transition/src/transition/style.js"); -/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./styleTween.js */ "./node_modules/d3-transition/src/transition/styleTween.js"); -/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./text.js */ "./node_modules/d3-transition/src/transition/text.js"); -/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textTween.js */ "./node_modules/d3-transition/src/transition/textTween.js"); -/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/transition/transition.js"); -/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); -/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./end.js */ "./node_modules/d3-transition/src/transition/end.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatSpecifier"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["FormatSpecifier"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionFixed"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionPrefix"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionRound"]; }); +/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ "./node_modules/d3-geo/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoArea"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoBounds"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCentroid"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCircle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipAntimeridian"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipCircle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipExtent"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipRectangle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoContains"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoDistance"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule10"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoInterpolate"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoLength"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoPath"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbers"]; }); -var id = 0; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbersUsa"]; }); -function Transition(groups, parents, name, id) { - this._groups = groups; - this._parents = parents; - this._name = name; - this._id = id; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualArea"]; }); -function transition(name) { - return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualAreaRaw"]; }); -function newId() { - return ++id; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistant"]; }); -var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistantRaw"]; }); -Transition.prototype = transition.prototype = { - constructor: Transition, - select: _select_js__WEBPACK_IMPORTED_MODULE_10__["default"], - selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_11__["default"], - filter: _filter_js__WEBPACK_IMPORTED_MODULE_6__["default"], - merge: _merge_js__WEBPACK_IMPORTED_MODULE_7__["default"], - selection: _selection_js__WEBPACK_IMPORTED_MODULE_12__["default"], - transition: _transition_js__WEBPACK_IMPORTED_MODULE_17__["default"], - call: selection_prototype.call, - nodes: selection_prototype.nodes, - node: selection_prototype.node, - size: selection_prototype.size, - empty: selection_prototype.empty, - each: selection_prototype.each, - on: _on_js__WEBPACK_IMPORTED_MODULE_8__["default"], - attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__["default"], - attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__["default"], - style: _style_js__WEBPACK_IMPORTED_MODULE_13__["default"], - styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_14__["default"], - text: _text_js__WEBPACK_IMPORTED_MODULE_15__["default"], - textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_16__["default"], - remove: _remove_js__WEBPACK_IMPORTED_MODULE_9__["default"], - tween: _tween_js__WEBPACK_IMPORTED_MODULE_18__["default"], - delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__["default"], - duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__["default"], - ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__["default"], - end: _end_js__WEBPACK_IMPORTED_MODULE_19__["default"] -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformal"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformalRaw"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualArea"]; }); -/***/ "./node_modules/d3-transition/src/transition/interpolate.js": -/*!******************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/interpolate.js ***! - \******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualAreaRaw"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistant"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistantRaw"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarth"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { - var c; - return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"] - : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"] - : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]) - : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarthRaw"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangular"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangularRaw"]; }); -/***/ "./node_modules/d3-transition/src/transition/merge.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/merge.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonic"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonicRaw"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoIdentity"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(transition) { - if (transition._id !== this._id) throw new Error; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjection"]; }); - for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjectionMutator"]; }); - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercator"]; }); - return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercatorRaw"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1Raw"]; }); -/***/ "./node_modules/d3-transition/src/transition/on.js": -/*!*********************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/on.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographic"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographicRaw"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographic"]; }); -function start(name) { - return (name + "").trim().split(/^|\s+/).every(function(t) { - var i = t.indexOf("."); - if (i >= 0) t = t.slice(0, i); - return !t || t === "start"; - }); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographicRaw"]; }); -function onFunction(id, name, listener) { - var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"]; - return function() { - var schedule = sit(this, id), - on = schedule.on; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercator"]; }); - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercatorRaw"]; }); - schedule.on = on1; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoRotation"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, listener) { - var id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStream"]; }); - return arguments.length < 2 - ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name) - : this.each(onFunction(id, name, listener)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransform"]; }); +/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ "./node_modules/d3-hierarchy/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["cluster"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["hierarchy"]; }); -/***/ "./node_modules/d3-transition/src/transition/remove.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/remove.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["pack"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -function removeFunction(id) { - return function() { - var parent = this.parentNode; - for (var i in this.__transition) if (+i !== id) return; - if (parent) parent.removeChild(this); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packSiblings"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return this.on("end.remove", removeFunction(this._id)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packEnclose"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["partition"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["stratify"]; }); -/***/ "./node_modules/d3-transition/src/transition/schedule.js": -/*!***************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/schedule.js ***! - \***************************************************************/ -/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["tree"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemap"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapBinary"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapDice"]; }); -var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "cancel", "interrupt"); -var emptyTween = []; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSlice"]; }); -var CREATED = 0; -var SCHEDULED = 1; -var STARTING = 2; -var STARTED = 3; -var RUNNING = 4; -var ENDING = 5; -var ENDED = 6; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSliceDice"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) { - var schedules = node.__transition; - if (!schedules) node.__transition = {}; - else if (id in schedules) return; - create(node, id, { - name: name, - index: index, // For context during callback. - group: group, // For context during callback. - on: emptyOn, - tween: emptyTween, - time: timing.time, - delay: timing.delay, - duration: timing.duration, - ease: timing.ease, - timer: null, - state: CREATED - }); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSquarify"]; }); -function init(node, id) { - var schedule = get(node, id); - if (schedule.state > CREATED) throw new Error("too late; already scheduled"); - return schedule; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapResquarify"]; }); -function set(node, id) { - var schedule = get(node, id); - if (schedule.state > STARTED) throw new Error("too late; already running"); - return schedule; -} +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolate"]; }); -function get(node, id) { - var schedule = node.__transition; - if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); - return schedule; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateArray"]; }); -function create(node, id, self) { - var schedules = node.__transition, - tween; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasis"]; }); - // Initialize the self timer when the transition is created. - // Note the actual delay is not known until the first callback! - schedules[id] = self; - self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasisClosed"]; }); - function schedule(elapsed) { - self.state = SCHEDULED; - self.timer.restart(start, self.delay, self.time); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDate"]; }); - // If the elapsed delay is less than our first sleep, start immediately. - if (self.delay <= elapsed) start(elapsed - self.delay); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDiscrete"]; }); - function start(elapsed) { - var i, j, n, o; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHue"]; }); - // If the state is not SCHEDULED, then we previously errored on start. - if (self.state !== SCHEDULED) return stop(); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumber"]; }); - for (i in schedules) { - o = schedules[i]; - if (o.name !== self.name) continue; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumberArray"]; }); - // While this element already has a starting transition during this frame, - // defer starting an interrupting transition until that transition has a - // chance to tick (and possibly end); see d3/d3-transition#54! - if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateObject"]; }); - // Interrupt the active transition, if any. - if (o.state === RUNNING) { - o.state = ENDED; - o.timer.stop(); - o.on.call("interrupt", node, node.__data__, o.index, o.group); - delete schedules[i]; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRound"]; }); - // Cancel any pre-empted transitions. - else if (+i < id) { - o.state = ENDED; - o.timer.stop(); - o.on.call("cancel", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateString"]; }); - // Defer the first tick to end of the current frame; see d3/d3#1576. - // Note the transition may be canceled after start and before the first tick! - // Note this must be scheduled before the start event; see d3/d3-transition#16! - // Assuming this is successful, subsequent callbacks go straight to tick. - Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() { - if (self.state === STARTED) { - self.state = RUNNING; - self.timer.restart(tick, self.delay, self.time); - tick(elapsed); - } - }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformCss"]; }); - // Dispatch the start event. - // Note this must be done before the tween are initialized. - self.state = STARTING; - self.on.call("start", node, node.__data__, self.index, self.group); - if (self.state !== STARTING) return; // interrupted - self.state = STARTED; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformSvg"]; }); - // Initialize the tween, deleting null tween. - tween = new Array(n = self.tween.length); - for (i = 0, j = -1; i < n; ++i) { - if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { - tween[++j] = o; - } - } - tween.length = j + 1; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateZoom"]; }); - function tick(elapsed) { - var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), - i = -1, - n = tween.length; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgb"]; }); - while (++i < n) { - tween[i].call(node, t); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasis"]; }); - // Dispatch the end event. - if (self.state === ENDING) { - self.on.call("end", node, node.__data__, self.index, self.group); - stop(); - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasisClosed"]; }); - function stop() { - self.state = ENDED; - self.timer.stop(); - delete schedules[id]; - for (var i in schedules) return; // eslint-disable-line no-unused-vars - delete node.__transition; - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHsl"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHslLong"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateLab"]; }); -/***/ "./node_modules/d3-transition/src/transition/select.js": -/*!*************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/select.js ***! - \*************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHcl"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHclLong"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelix"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelixLong"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["piecewise"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(select) { - var name = this._name, - id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["quantize"]; }); - if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__["path"]; }); - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id)); - } - } - } +/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ "./node_modules/d3-polygon/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonArea"]; }); - return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonCentroid"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonHull"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonContains"]; }); -/***/ "./node_modules/d3-transition/src/transition/selectAll.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/selectAll.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonLength"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__["quadtree"]; }); +/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ "./node_modules/d3-random/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomUniform"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomNormal"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogNormal"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(select) { - var name = this._name, - id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBates"]; }); - if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomIrwinHall"]; }); - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) { - if (child = children[k]) { - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit); - } - } - subgroups.push(children); - parents.push(node); - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomExponential"]; }); - return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id); -}); +/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ "./node_modules/d3-scale/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleBand"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePoint"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleIdentity"]; }); -/***/ "./node_modules/d3-transition/src/transition/selection.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/selection.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLinear"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLog"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSymlog"]; }); -var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleOrdinal"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - return new Selection(this._groups, this._parents); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleImplicit"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePow"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSqrt"]; }); -/***/ "./node_modules/d3-transition/src/transition/style.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/style.js ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantile"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); -/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); -/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantize"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleThreshold"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleTime"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleUtc"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequential"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialLog"]; }); -function styleNull(name, interpolate) { - var string00, - string10, - interpolate0; - return function() { - var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), - string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, string10 = string1); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialPow"]; }); -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSqrt"]; }); -function styleConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSymlog"]; }); -function styleFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), - value1 = value(this), - string1 = value1 + ""; - if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialQuantile"]; }); -function styleMaybeRemove(id, name) { - var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; - return function() { - var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["set"])(this, id), - on = schedule.on, - listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDiverging"]; }); - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingLog"]; }); - schedule.on = on1; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingPow"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { - var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__["default"]; - return value == null ? this - .styleTween(name, styleNull(name, i)) - .on("end.style." + name, styleRemove(name)) - : typeof value === "function" ? this - .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__["tweenValue"])(this, "style." + name, value))) - .each(styleMaybeRemove(this._id, name)) - : this - .styleTween(name, styleConstant(name, i, value), priority) - .on("end.style." + name, null); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSqrt"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSymlog"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["tickFormat"]; }); -/***/ "./node_modules/d3-transition/src/transition/styleTween.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/styleTween.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ "./node_modules/d3-scale-chromatic/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeCategory10"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -function styleInterpolate(name, i, priority) { - return function(t) { - this.style.setProperty(name, i.call(this, t), priority); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeAccent"]; }); -function styleTween(name, value, priority) { - var t, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); - return t; - } - tween._value = value; - return tween; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeDark2"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { - var key = "style." + (name += ""); - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePaired"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel1"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel2"]; }); -/***/ "./node_modules/d3-transition/src/transition/text.js": -/*!***********************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/text.js ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet1"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet2"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet3"]; }); -function textConstant(value) { - return function() { - this.textContent = value; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeTableau10"]; }); -function textFunction(value) { - return function() { - var value1 = value(this); - this.textContent = value1 == null ? "" : value1; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBrBG"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return this.tween("text", typeof value === "function" - ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value)) - : textConstant(value == null ? "" : value + "")); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBrBG"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePRGn"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePRGn"]; }); -/***/ "./node_modules/d3-transition/src/transition/textTween.js": -/*!****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/textTween.js ***! - \****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePiYG"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -function textInterpolate(i) { - return function(t) { - this.textContent = i.call(this, t); - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePiYG"]; }); -function textTween(value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && textInterpolate(i); - return t0; - } - tween._value = value; - return tween; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuOr"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - var key = "text"; - if (arguments.length < 1) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, textTween(value)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuOr"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdBu"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdBu"]; }); -/***/ "./node_modules/d3-transition/src/transition/transition.js": -/*!*****************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/transition.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdGy"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js"); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdGy"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlBu"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlBu"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var name = this._name, - id0 = this._id, - id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlGn"]; }); - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0); - Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, { - time: inherit.time + inherit.delay + inherit.duration, - delay: 0, - duration: inherit.duration, - ease: inherit.ease - }); - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlGn"]; }); - return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSpectral"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSpectral"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuGn"]; }); -/***/ "./node_modules/d3-transition/src/transition/tween.js": -/*!************************************************************!*\ - !*** ./node_modules/d3-transition/src/transition/tween.js ***! - \************************************************************/ -/*! exports provided: default, tweenValue */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuGn"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; }); -/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuPu"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuPu"]; }); -function tweenRemove(id, name) { - var tween0, tween1; - return function() { - var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), - tween = schedule.tween; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGnBu"]; }); - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = tween0 = tween; - for (var i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1 = tween1.slice(); - tween1.splice(i, 1); - break; - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGnBu"]; }); - schedule.tween = tween1; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOrRd"]; }); -function tweenFunction(id, name, value) { - var tween0, tween1; - if (typeof value !== "function") throw new Error; - return function() { - var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), - tween = schedule.tween; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOrRd"]; }); - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = (tween0 = tween).slice(); - for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1[i] = t; - break; - } - } - if (i === n) tween1.push(t); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBuGn"]; }); - schedule.tween = tween1; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBuGn"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { - var id = this._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBu"]; }); - name += ""; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBu"]; }); - if (arguments.length < 2) { - var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween; - for (var i = 0, n = tween.length, t; i < n; ++i) { - if ((t = tween[i]).name === name) { - return t.value; - } - } - return null; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuRd"]; }); - return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuRd"]; }); -function tweenValue(transition, name, value) { - var id = transition._id; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdPu"]; }); - transition.each(function() { - var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id); - (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); - }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdPu"]; }); - return function(node) { - return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name]; - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGnBu"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGnBu"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGn"]; }); -/***/ "./node_modules/d3-voronoi/src/Beach.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-voronoi/src/Beach.js ***! - \**********************************************/ -/*! exports provided: removeBeach, addBeach */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGn"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeBeach", function() { return removeBeach; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBeach", function() { return addBeach; }); -/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); -/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js"); -/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js"); -/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); -/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrBr"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrBr"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrRd"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrRd"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBlues"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBlues"]; }); -var beachPool = []; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreens"]; }); -function Beach() { - Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this); - this.edge = - this.site = - this.circle = null; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreens"]; }); -function createBeach(site) { - var beach = beachPool.pop() || new Beach; - beach.site = site; - return beach; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreys"]; }); -function detachBeach(beach) { - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(beach); - _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].remove(beach); - beachPool.push(beach); - Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(beach); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreys"]; }); -function removeBeach(beach) { - var circle = beach.circle, - x = circle.x, - y = circle.cy, - vertex = [x, y], - previous = beach.P, - next = beach.N, - disappearing = [beach]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePurples"]; }); - detachBeach(beach); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePurples"]; }); - var lArc = previous; - while (lArc.circle - && Math.abs(x - lArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"] - && Math.abs(y - lArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { - previous = lArc.P; - disappearing.unshift(lArc); - detachBeach(lArc); - lArc = previous; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateReds"]; }); - disappearing.unshift(lArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeReds"]; }); - var rArc = next; - while (rArc.circle - && Math.abs(x - rArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"] - && Math.abs(y - rArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { - next = rArc.N; - disappearing.push(rArc); - detachBeach(rArc); - rArc = next; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOranges"]; }); - disappearing.push(rArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOranges"]; }); - var nArcs = disappearing.length, - iArc; - for (iArc = 1; iArc < nArcs; ++iArc) { - rArc = disappearing[iArc]; - lArc = disappearing[iArc - 1]; - Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lArc.site, rArc.site, vertex); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCividis"]; }); - lArc = disappearing[0]; - rArc = disappearing[nArcs - 1]; - rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, rArc.site, null, vertex); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCubehelixDefault"]; }); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRainbow"]; }); -function addBeach(site) { - var x = site[0], - directrix = site[1], - lArc, - rArc, - dxl, - dxr, - node = _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"]._; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateWarm"]; }); - while (node) { - dxl = leftBreakPoint(node, directrix) - x; - if (dxl > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) node = node.L; else { - dxr = x - rightBreakPoint(node, directrix); - if (dxr > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { - if (!node.R) { - lArc = node; - break; - } - node = node.R; - } else { - if (dxl > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { - lArc = node.P; - rArc = node; - } else if (dxr > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) { - lArc = node; - rArc = node.N; - } else { - lArc = rArc = node; - } - break; - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCool"]; }); - Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["createCell"])(site); - var newArc = createBeach(site); - _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(lArc, newArc); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSinebow"]; }); - if (!lArc && !rArc) return; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateTurbo"]; }); - if (lArc === rArc) { - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); - rArc = createBeach(lArc.site); - _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(newArc, rArc); - newArc.edge = rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); - return; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateViridis"]; }); - if (!rArc) { // && lArc - newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site); - return; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateMagma"]; }); - // else lArc !== rArc - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateInferno"]; }); - var lSite = lArc.site, - ax = lSite[0], - ay = lSite[1], - bx = site[0] - ax, - by = site[1] - ay, - rSite = rArc.site, - cx = rSite[0] - ax, - cy = rSite[1] - ay, - d = 2 * (bx * cy - by * cx), - hb = bx * bx + by * by, - hc = cx * cx + cy * cy, - vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePlasma"]; }); - Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lSite, rSite, vertex); - newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lSite, site, null, vertex); - rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(site, rSite, null, vertex); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc); - Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc); -} +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["create"]; }); -function leftBreakPoint(arc, directrix) { - var site = arc.site, - rfocx = site[0], - rfocy = site[1], - pby2 = rfocy - directrix; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["creator"]; }); - if (!pby2) return rfocx; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["local"]; }); - var lArc = arc.P; - if (!lArc) return -Infinity; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["matcher"]; }); - site = lArc.site; - var lfocx = site[0], - lfocy = site[1], - plby2 = lfocy - directrix; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["mouse"]; }); - if (!plby2) return lfocx; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespace"]; }); - var hl = lfocx - rfocx, - aby2 = 1 / pby2 - 1 / plby2, - b = hl / plby2; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespaces"]; }); - if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["clientPoint"]; }); - return (rfocx + lfocx) / 2; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["select"]; }); -function rightBreakPoint(arc, directrix) { - var rArc = arc.N; - if (rArc) return leftBreakPoint(rArc, directrix); - var site = arc.site; - return site[1] === directrix ? site[0] : Infinity; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectAll"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selection"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selector"]; }); -/***/ "./node_modules/d3-voronoi/src/Cell.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-voronoi/src/Cell.js ***! - \*********************************************/ -/*! exports provided: createCell, cellHalfedgeStart, cellHalfedgeEnd, sortCellHalfedges, clipCells */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectorAll"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCell", function() { return createCell; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeStart", function() { return cellHalfedgeStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeEnd", function() { return cellHalfedgeEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortCellHalfedges", function() { return sortCellHalfedges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipCells", function() { return clipCells; }); -/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); -/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["style"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touch"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touches"]; }); -function createCell(site) { - return _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][site.index] = { - site: site, - halfedges: [] - }; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["window"]; }); -function cellHalfedgeAngle(cell, edge) { - var site = cell.site, - va = edge.left, - vb = edge.right; - if (site === vb) vb = va, va = site; - if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]); - if (site === va) va = edge[1], vb = edge[0]; - else va = edge[0], vb = edge[1]; - return Math.atan2(va[0] - vb[0], vb[1] - va[1]); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["event"]; }); -function cellHalfedgeStart(cell, edge) { - return edge[+(edge.left !== cell.site)]; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["customEvent"]; }); -function cellHalfedgeEnd(cell, edge) { - return edge[+(edge.left === cell.site)]; -} +/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ "./node_modules/d3-shape/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["arc"]; }); -function sortCellHalfedges() { - for (var i = 0, n = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length, cell, halfedges, j, m; i < n; ++i) { - if ((cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][i]) && (m = (halfedges = cell.halfedges).length)) { - var index = new Array(m), - array = new Array(m); - for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[j]]); - index.sort(function(i, j) { return array[j] - array[i]; }); - for (j = 0; j < m; ++j) array[j] = halfedges[index[j]]; - for (j = 0; j < m; ++j) halfedges[j] = array[j]; - } - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["area"]; }); -function clipCells(x0, y0, x1, y1) { - var nCells = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length, - iCell, - cell, - site, - iHalfedge, - halfedges, - nHalfedges, - start, - startX, - startY, - end, - endX, - endY, - cover = true; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["line"]; }); - for (iCell = 0; iCell < nCells; ++iCell) { - if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { - site = cell.site; - halfedges = cell.halfedges; - iHalfedge = halfedges.length; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pie"]; }); - // Remove any dangling clipped edges. - while (iHalfedge--) { - if (!_Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]) { - halfedges.splice(iHalfedge, 1); - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["areaRadial"]; }); - // Insert any border edges as necessary. - iHalfedge = 0, nHalfedges = halfedges.length; - while (iHalfedge < nHalfedges) { - end = cellHalfedgeEnd(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]), endX = end[0], endY = end[1]; - start = cellHalfedgeStart(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1]; - if (Math.abs(endX - startX) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Math.abs(endY - startY) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { - halfedges.splice(iHalfedge, 0, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, end, - Math.abs(endX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && y1 - endY > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x0, Math.abs(startX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y1] - : Math.abs(endY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && x1 - endX > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x1, y1] - : Math.abs(endX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endY - y0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x1, Math.abs(startX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y0] - : Math.abs(endY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endX - x0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x0, y0] - : null)) - 1); - ++nHalfedges; - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialArea"]; }); - if (nHalfedges) cover = false; - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["lineRadial"]; }); - // If there weren’t any edges, have the closest site cover the extent. - // It doesn’t matter which corner of the extent we measure! - if (cover) { - var dx, dy, d2, dc = Infinity; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialLine"]; }); - for (iCell = 0, cover = null; iCell < nCells; ++iCell) { - if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { - site = cell.site; - dx = site[0] - x0; - dy = site[1] - y0; - d2 = dx * dx + dy * dy; - if (d2 < dc) dc = d2, cover = cell; - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pointRadial"]; }); - if (cover) { - var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0]; - cover.halfedges.push( - _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site = cover.site, v00, v01)) - 1, - _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v01, v11)) - 1, - _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v11, v10)) - 1, - _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v10, v00)) - 1 - ); - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkHorizontal"]; }); - // Lastly delete any cells with no edges; these were entirely clipped. - for (iCell = 0; iCell < nCells; ++iCell) { - if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) { - if (!cell.halfedges.length) { - delete _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]; - } - } - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkVertical"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkRadial"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbol"]; }); -/***/ "./node_modules/d3-voronoi/src/Circle.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-voronoi/src/Circle.js ***! - \***********************************************/ -/*! exports provided: firstCircle, attachCircle, detachCircle */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbols"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstCircle", function() { return firstCircle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachCircle", function() { return attachCircle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detachCircle", function() { return detachCircle; }); -/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); -/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCircle"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCross"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolDiamond"]; }); -var circlePool = []; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolSquare"]; }); -var firstCircle; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolStar"]; }); -function Circle() { - Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this); - this.x = - this.y = - this.arc = - this.site = - this.cy = null; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolTriangle"]; }); -function attachCircle(arc) { - var lArc = arc.P, - rArc = arc.N; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolWye"]; }); - if (!lArc || !rArc) return; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisClosed"]; }); - var lSite = lArc.site, - cSite = arc.site, - rSite = rArc.site; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisOpen"]; }); - if (lSite === rSite) return; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasis"]; }); - var bx = cSite[0], - by = cSite[1], - ax = lSite[0] - bx, - ay = lSite[1] - by, - cx = rSite[0] - bx, - cy = rSite[1] - by; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBundle"]; }); - var d = 2 * (ax * cy - ay * cx); - if (d >= -_Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) return; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalClosed"]; }); - var ha = ax * ax + ay * ay, - hc = cx * cx + cy * cy, - x = (cy * ha - ay * hc) / d, - y = (ax * hc - cx * ha) / d; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalOpen"]; }); - var circle = circlePool.pop() || new Circle; - circle.arc = arc; - circle.site = cSite; - circle.x = x + bx; - circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinal"]; }); - arc.circle = circle; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomClosed"]; }); - var before = null, - node = _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"]._; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomOpen"]; }); - while (node) { - if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) { - if (node.L) node = node.L; - else { before = node.P; break; } - } else { - if (node.R) node = node.R; - else { before = node; break; } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRom"]; }); - _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].insert(before, circle); - if (!before) firstCircle = circle; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinearClosed"]; }); -function detachCircle(arc) { - var circle = arc.circle; - if (circle) { - if (!circle.P) firstCircle = circle.N; - _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].remove(circle); - circlePool.push(circle); - Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(circle); - arc.circle = null; - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinear"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneX"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneY"]; }); -/***/ "./node_modules/d3-voronoi/src/Diagram.js": -/*!************************************************!*\ - !*** ./node_modules/d3-voronoi/src/Diagram.js ***! - \************************************************/ -/*! exports provided: epsilon, epsilon2, beaches, cells, circles, edges, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveNatural"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beaches", function() { return beaches; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cells", function() { return cells; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circles", function() { return circles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "edges", function() { return edges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Diagram; }); -/* harmony import */ var _Beach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Beach */ "./node_modules/d3-voronoi/src/Beach.js"); -/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js"); -/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js"); -/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js"); -/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStep"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepAfter"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepBefore"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stack"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetExpand"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetDiverging"]; }); -var epsilon = 1e-6; -var epsilon2 = 1e-12; -var beaches; -var cells; -var circles; -var edges; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetNone"]; }); -function triangleArea(a, b, c) { - return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]); -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetSilhouette"]; }); -function lexicographic(a, b) { - return b[1] - a[1] - || b[0] - a[0]; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetWiggle"]; }); -function Diagram(sites, extent) { - var site = sites.sort(lexicographic).pop(), - x, - y, - circle; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAppearance"]; }); - edges = []; - cells = new Array(sites.length); - beaches = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"]; - circles = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"]; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAscending"]; }); - while (true) { - circle = _Circle__WEBPACK_IMPORTED_MODULE_2__["firstCircle"]; - if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) { - if (site[0] !== x || site[1] !== y) { - Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["addBeach"])(site); - x = site[0], y = site[1]; - } - site = sites.pop(); - } else if (circle) { - Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["removeBeach"])(circle.arc); - } else { - break; - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderDescending"]; }); - Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["sortCellHalfedges"])(); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderInsideOut"]; }); - if (extent) { - var x0 = +extent[0][0], - y0 = +extent[0][1], - x1 = +extent[1][0], - y1 = +extent[1][1]; - Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["clipEdges"])(x0, y0, x1, y1); - Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["clipCells"])(x0, y0, x1, y1); - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderNone"]; }); - this.edges = edges; - this.cells = cells; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderReverse"]; }); - beaches = - circles = - edges = - cells = null; -} +/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeInterval"]; }); -Diagram.prototype = { - constructor: Diagram, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMillisecond"]; }); - polygons: function() { - var edges = this.edges; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMilliseconds"]; }); - return this.cells.map(function(cell) { - var polygon = cell.halfedges.map(function(i) { return Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["cellHalfedgeStart"])(cell, edges[i]); }); - polygon.data = cell.site.data; - return polygon; - }); - }, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMillisecond"]; }); - triangles: function() { - var triangles = [], - edges = this.edges; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMilliseconds"]; }); - this.cells.forEach(function(cell, i) { - if (!(m = (halfedges = cell.halfedges).length)) return; - var site = cell.site, - halfedges, - j = -1, - m, - s0, - e1 = edges[halfedges[m - 1]], - s1 = e1.left === site ? e1.right : e1.left; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSecond"]; }); - while (++j < m) { - s0 = s1; - e1 = edges[halfedges[j]]; - s1 = e1.left === site ? e1.right : e1.left; - if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) { - triangles.push([site.data, s0.data, s1.data]); - } - } - }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSeconds"]; }); - return triangles; - }, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSecond"]; }); - links: function() { - return this.edges.filter(function(edge) { - return edge.right; - }).map(function(edge) { - return { - source: edge.left.data, - target: edge.right.data - }; - }); - }, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSeconds"]; }); - find: function(x, y, radius) { - var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinute"]; }); - // Use the previously-found cell, or start with an arbitrary one. - while (!(cell = that.cells[i1])) if (++i1 >= n) return null; - var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinutes"]; }); - // Traverse the half-edges to find a closer cell, if any. - do { - cell = that.cells[i0 = i1], i1 = null; - cell.halfedges.forEach(function(e) { - var edge = that.edges[e], v = edge.left; - if ((v === cell.site || !v) && !(v = edge.right)) return; - var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy; - if (v2 < d2) d2 = v2, i1 = v.index; - }); - } while (i1 !== null); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHour"]; }); - that._found = i0; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHours"]; }); - return radius == null || d2 <= radius * radius ? cell.site : null; - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDay"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDays"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeek"]; }); -/***/ "./node_modules/d3-voronoi/src/Edge.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-voronoi/src/Edge.js ***! - \*********************************************/ -/*! exports provided: createEdge, createBorderEdge, setEdgeEnd, clipEdges */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeeks"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEdge", function() { return createEdge; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBorderEdge", function() { return createBorderEdge; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setEdgeEnd", function() { return setEdgeEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipEdges", function() { return clipEdges; }); -/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSunday"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSundays"]; }); -function createEdge(left, right, v0, v1) { - var edge = [null, null], - index = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].push(edge) - 1; - edge.left = left; - edge.right = right; - if (v0) setEdgeEnd(edge, left, right, v0); - if (v1) setEdgeEnd(edge, right, left, v1); - _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][left.index].halfedges.push(index); - _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][right.index].halfedges.push(index); - return edge; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonday"]; }); -function createBorderEdge(left, v0, v1) { - var edge = [v0, v1]; - edge.left = left; - return edge; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMondays"]; }); -function setEdgeEnd(edge, left, right, vertex) { - if (!edge[0] && !edge[1]) { - edge[0] = vertex; - edge.left = left; - edge.right = right; - } else if (edge.left === right) { - edge[1] = vertex; - } else { - edge[0] = vertex; - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesday"]; }); -// Liang–Barsky line clipping. -function clipEdge(edge, x0, y0, x1, y1) { - var a = edge[0], - b = edge[1], - ax = a[0], - ay = a[1], - bx = b[0], - by = b[1], - t0 = 0, - t1 = 1, - dx = bx - ax, - dy = by - ay, - r; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesdays"]; }); - r = x0 - ax; - if (!dx && r > 0) return; - r /= dx; - if (dx < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dx > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesday"]; }); - r = x1 - ax; - if (!dx && r < 0) return; - r /= dx; - if (dx < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dx > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesdays"]; }); - r = y0 - ay; - if (!dy && r > 0) return; - r /= dy; - if (dy < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dy > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursday"]; }); - r = y1 - ay; - if (!dy && r < 0) return; - r /= dy; - if (dy < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dy > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursdays"]; }); - if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check? +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFriday"]; }); - if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy]; - if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy]; - return true; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFridays"]; }); -function connectEdge(edge, x0, y0, x1, y1) { - var v1 = edge[1]; - if (v1) return true; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturday"]; }); - var v0 = edge[0], - left = edge.left, - right = edge.right, - lx = left[0], - ly = left[1], - rx = right[0], - ry = right[1], - fx = (lx + rx) / 2, - fy = (ly + ry) / 2, - fm, - fb; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturdays"]; }); - if (ry === ly) { - if (fx < x0 || fx >= x1) return; - if (lx > rx) { - if (!v0) v0 = [fx, y0]; - else if (v0[1] >= y1) return; - v1 = [fx, y1]; - } else { - if (!v0) v0 = [fx, y1]; - else if (v0[1] < y0) return; - v1 = [fx, y0]; - } - } else { - fm = (lx - rx) / (ry - ly); - fb = fy - fm * fx; - if (fm < -1 || fm > 1) { - if (lx > rx) { - if (!v0) v0 = [(y0 - fb) / fm, y0]; - else if (v0[1] >= y1) return; - v1 = [(y1 - fb) / fm, y1]; - } else { - if (!v0) v0 = [(y1 - fb) / fm, y1]; - else if (v0[1] < y0) return; - v1 = [(y0 - fb) / fm, y0]; - } - } else { - if (ly < ry) { - if (!v0) v0 = [x0, fm * x0 + fb]; - else if (v0[0] >= x1) return; - v1 = [x1, fm * x1 + fb]; - } else { - if (!v0) v0 = [x1, fm * x1 + fb]; - else if (v0[0] < x0) return; - v1 = [x0, fm * x0 + fb]; - } - } - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonth"]; }); - edge[0] = v0; - edge[1] = v1; - return true; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonths"]; }); -function clipEdges(x0, y0, x1, y1) { - var i = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].length, - edge; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYear"]; }); - while (i--) { - if (!connectEdge(edge = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i], x0, y0, x1, y1) - || !clipEdge(edge, x0, y0, x1, y1) - || !(Math.abs(edge[0][0] - edge[1][0]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"] - || Math.abs(edge[0][1] - edge[1][1]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"])) { - delete _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i]; - } - } -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYears"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinute"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinutes"]; }); -/***/ "./node_modules/d3-voronoi/src/RedBlackTree.js": -/*!*****************************************************!*\ - !*** ./node_modules/d3-voronoi/src/RedBlackTree.js ***! - \*****************************************************/ -/*! exports provided: RedBlackNode, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHour"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedBlackNode", function() { return RedBlackNode; }); -function RedBlackTree() { - this._ = null; // root node -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHours"]; }); -function RedBlackNode(node) { - node.U = // parent node - node.C = // color - true for red, false for black - node.L = // left node - node.R = // right node - node.P = // previous node - node.N = null; // next node -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDay"]; }); -RedBlackTree.prototype = { - constructor: RedBlackTree, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDays"]; }); - insert: function(after, node) { - var parent, grandpa, uncle; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeek"]; }); - if (after) { - node.P = after; - node.N = after.N; - if (after.N) after.N.P = node; - after.N = node; - if (after.R) { - after = after.R; - while (after.L) after = after.L; - after.L = node; - } else { - after.R = node; - } - parent = after; - } else if (this._) { - after = RedBlackFirst(this._); - node.P = null; - node.N = after; - after.P = after.L = node; - parent = after; - } else { - node.P = node.N = null; - this._ = node; - parent = null; - } - node.L = node.R = null; - node.U = parent; - node.C = true; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeeks"]; }); - after = node; - while (parent && parent.C) { - grandpa = parent.U; - if (parent === grandpa.L) { - uncle = grandpa.R; - if (uncle && uncle.C) { - parent.C = uncle.C = false; - grandpa.C = true; - after = grandpa; - } else { - if (after === parent.R) { - RedBlackRotateLeft(this, parent); - after = parent; - parent = after.U; - } - parent.C = false; - grandpa.C = true; - RedBlackRotateRight(this, grandpa); - } - } else { - uncle = grandpa.L; - if (uncle && uncle.C) { - parent.C = uncle.C = false; - grandpa.C = true; - after = grandpa; - } else { - if (after === parent.L) { - RedBlackRotateRight(this, parent); - after = parent; - parent = after.U; - } - parent.C = false; - grandpa.C = true; - RedBlackRotateLeft(this, grandpa); - } - } - parent = after.U; - } - this._.C = false; - }, +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSunday"]; }); - remove: function(node) { - if (node.N) node.N.P = node.P; - if (node.P) node.P.N = node.N; - node.N = node.P = null; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSundays"]; }); - var parent = node.U, - sibling, - left = node.L, - right = node.R, - next, - red; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonday"]; }); - if (!left) next = right; - else if (!right) next = left; - else next = RedBlackFirst(right); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMondays"]; }); - if (parent) { - if (parent.L === node) parent.L = next; - else parent.R = next; - } else { - this._ = next; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesday"]; }); - if (left && right) { - red = next.C; - next.C = node.C; - next.L = left; - left.U = next; - if (next !== right) { - parent = next.U; - next.U = node.U; - node = next.R; - parent.L = node; - next.R = right; - right.U = next; - } else { - next.U = parent; - parent = next; - node = next.R; - } - } else { - red = node.C; - node = next; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesdays"]; }); - if (node) node.U = parent; - if (red) return; - if (node && node.C) { node.C = false; return; } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesday"]; }); - do { - if (node === this._) break; - if (node === parent.L) { - sibling = parent.R; - if (sibling.C) { - sibling.C = false; - parent.C = true; - RedBlackRotateLeft(this, parent); - sibling = parent.R; - } - if ((sibling.L && sibling.L.C) - || (sibling.R && sibling.R.C)) { - if (!sibling.R || !sibling.R.C) { - sibling.L.C = false; - sibling.C = true; - RedBlackRotateRight(this, sibling); - sibling = parent.R; - } - sibling.C = parent.C; - parent.C = sibling.R.C = false; - RedBlackRotateLeft(this, parent); - node = this._; - break; - } - } else { - sibling = parent.L; - if (sibling.C) { - sibling.C = false; - parent.C = true; - RedBlackRotateRight(this, parent); - sibling = parent.L; - } - if ((sibling.L && sibling.L.C) - || (sibling.R && sibling.R.C)) { - if (!sibling.L || !sibling.L.C) { - sibling.R.C = false; - sibling.C = true; - RedBlackRotateLeft(this, sibling); - sibling = parent.L; - } - sibling.C = parent.C; - parent.C = sibling.L.C = false; - RedBlackRotateRight(this, parent); - node = this._; - break; - } - } - sibling.C = true; - node = parent; - parent = parent.U; - } while (!node.C); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesdays"]; }); - if (node) node.C = false; - } -}; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursday"]; }); -function RedBlackRotateLeft(tree, node) { - var p = node, - q = node.R, - parent = p.U; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursdays"]; }); - if (parent) { - if (parent.L === p) parent.L = q; - else parent.R = q; - } else { - tree._ = q; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFriday"]; }); - q.U = parent; - p.U = q; - p.R = q.L; - if (p.R) p.R.U = p; - q.L = p; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFridays"]; }); -function RedBlackRotateRight(tree, node) { - var p = node, - q = node.L, - parent = p.U; +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturday"]; }); - if (parent) { - if (parent.L === p) parent.L = q; - else parent.R = q; - } else { - tree._ = q; - } +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturdays"]; }); - q.U = parent; - p.U = q; - p.L = q.R; - if (p.L) p.L.U = p; - q.R = p; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonth"]; }); -function RedBlackFirst(node) { - while (node.L) node = node.L; - return node; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonths"]; }); -/* harmony default export */ __webpack_exports__["default"] = (RedBlackTree); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYear"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYears"]; }); -/***/ }), +/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatDefaultLocale"]; }); -/***/ "./node_modules/d3-voronoi/src/constant.js": -/*!*************************************************!*\ - !*** ./node_modules/d3-voronoi/src/constant.js ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormat"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeParse"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcFormat"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcParse"]; }); -/***/ "./node_modules/d3-voronoi/src/index.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-voronoi/src/index.js ***! - \**********************************************/ -/*! exports provided: voronoi */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatLocale"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _voronoi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./voronoi */ "./node_modules/d3-voronoi/src/voronoi.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return _voronoi__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoFormat"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoParse"]; }); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["now"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timer"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timerFlush"]; }); -/***/ "./node_modules/d3-voronoi/src/point.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-voronoi/src/point.js ***! - \**********************************************/ -/*! exports provided: x, y */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timeout"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); -function x(d) { - return d[0]; -} +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["interval"]; }); -function y(d) { - return d[1]; -} +/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["transition"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["active"]; }); -/***/ }), +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["interrupt"]; }); -/***/ "./node_modules/d3-voronoi/src/voronoi.js": -/*!************************************************!*\ - !*** ./node_modules/d3-voronoi/src/voronoi.js ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var d3_voronoi__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-voronoi */ "./node_modules/d3-voronoi/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return d3_voronoi__WEBPACK_IMPORTED_MODULE_30__["voronoi"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-voronoi/src/constant.js"); -/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-voronoi/src/point.js"); -/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js"); +/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! d3-zoom */ "./node_modules/d3-zoom/src/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoom"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomTransform"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomIdentity"]; }); -/* harmony default export */ __webpack_exports__["default"] = (function() { - var x = _point__WEBPACK_IMPORTED_MODULE_1__["x"], - y = _point__WEBPACK_IMPORTED_MODULE_1__["y"], - extent = null; - function voronoi(data) { - return new _Diagram__WEBPACK_IMPORTED_MODULE_2__["default"](data.map(function(d, i) { - var s = [Math.round(x(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"], Math.round(y(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]]; - s.index = i; - s.data = d; - return s; - }), extent); - } - voronoi.polygons = function(data) { - return voronoi(data).polygons(); - }; - voronoi.links = function(data) { - return voronoi(data).links(); - }; - voronoi.triangles = function(data) { - return voronoi(data).triangles(); - }; - voronoi.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : x; - }; - voronoi.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : y; - }; - voronoi.extent = function(_) { - return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]]; - }; - voronoi.size = function(_) { - return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]]; - }; - return voronoi; -}); -/***/ }), -/***/ "./node_modules/d3-zoom/src/constant.js": -/*!**********************************************!*\ - !*** ./node_modules/d3-zoom/src/constant.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(x) { - return function() { - return x; - }; -}); -/***/ }), -/***/ "./node_modules/d3-zoom/src/event.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-zoom/src/event.js ***! - \*******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoomEvent; }); -function ZoomEvent(target, type, transform) { - this.target = target; - this.type = type; - this.transform = transform; -} -/***/ }), -/***/ "./node_modules/d3-zoom/src/index.js": -/*!*******************************************!*\ - !*** ./node_modules/d3-zoom/src/index.js ***! - \*******************************************/ -/*! exports provided: zoom, zoomTransform, zoomIdentity */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-zoom/src/zoom.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; }); -/***/ }), -/***/ "./node_modules/d3-zoom/src/noevent.js": -/*!*********************************************!*\ - !*** ./node_modules/d3-zoom/src/noevent.js ***! - \*********************************************/ -/*! exports provided: nopropagation, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -function nopropagation() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); -} -/* harmony default export */ __webpack_exports__["default"] = (function() { - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault(); - d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation(); -}); +/***/ }), + +/***/ "./node_modules/dagre-d3/index.js": +/*!****************************************!*\ + !*** ./node_modules/dagre-d3/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @license + * Copyright (c) 2012-2013 Chris Pettitt + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +module.exports = { + graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre-d3/lib/graphlib.js"), + dagre: __webpack_require__(/*! ./lib/dagre */ "./node_modules/dagre-d3/lib/dagre.js"), + intersect: __webpack_require__(/*! ./lib/intersect */ "./node_modules/dagre-d3/lib/intersect/index.js"), + render: __webpack_require__(/*! ./lib/render */ "./node_modules/dagre-d3/lib/render.js"), + util: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/lib/util.js"), + version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre-d3/lib/version.js") +}; /***/ }), -/***/ "./node_modules/d3-zoom/src/transform.js": -/*!***********************************************!*\ - !*** ./node_modules/d3-zoom/src/transform.js ***! - \***********************************************/ -/*! exports provided: Transform, identity, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/dagre-d3/lib/arrows.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre-d3/lib/arrows.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transform; }); -function Transform(k, x, y) { - this.k = k; - this.x = x; - this.y = y; -} +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -Transform.prototype = { - constructor: Transform, - scale: function(k) { - return k === 1 ? this : new Transform(this.k * k, this.x, this.y); - }, - translate: function(x, y) { - return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); - }, - apply: function(point) { - return [point[0] * this.k + this.x, point[1] * this.k + this.y]; - }, - applyX: function(x) { - return x * this.k + this.x; - }, - applyY: function(y) { - return y * this.k + this.y; - }, - invert: function(location) { - return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; - }, - invertX: function(x) { - return (x - this.x) / this.k; - }, - invertY: function(y) { - return (y - this.y) / this.k; - }, - rescaleX: function(x) { - return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); - }, - rescaleY: function(y) { - return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); - }, - toString: function() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; - } +module.exports = { + "default": normal, + "normal": normal, + "vee": vee, + "undirected": undirected }; -var identity = new Transform(1, 0, 0); - -transform.prototype = Transform.prototype; +function normal(parent, id, edge, type) { + var marker = parent.append("marker") + .attr("id", id) + .attr("viewBox", "0 0 10 10") + .attr("refX", 9) + .attr("refY", 5) + .attr("markerUnits", "strokeWidth") + .attr("markerWidth", 8) + .attr("markerHeight", 6) + .attr("orient", "auto"); -function transform(node) { - while (!node.__zoom) if (!(node = node.parentNode)) return identity; - return node.__zoom; + var path = marker.append("path") + .attr("d", "M 0 0 L 10 5 L 0 10 z") + .style("stroke-width", 1) + .style("stroke-dasharray", "1,0"); + util.applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } } +function vee(parent, id, edge, type) { + var marker = parent.append("marker") + .attr("id", id) + .attr("viewBox", "0 0 10 10") + .attr("refX", 9) + .attr("refY", 5) + .attr("markerUnits", "strokeWidth") + .attr("markerWidth", 8) + .attr("markerHeight", 6) + .attr("orient", "auto"); -/***/ }), + var path = marker.append("path") + .attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z") + .style("stroke-width", 1) + .style("stroke-dasharray", "1,0"); + util.applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } +} -/***/ "./node_modules/d3-zoom/src/zoom.js": -/*!******************************************!*\ - !*** ./node_modules/d3-zoom/src/zoom.js ***! - \******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function undirected(parent, id, edge, type) { + var marker = parent.append("marker") + .attr("id", id) + .attr("viewBox", "0 0 10 10") + .attr("refX", 9) + .attr("refY", 5) + .attr("markerUnits", "strokeWidth") + .attr("markerWidth", 8) + .attr("markerHeight", 6) + .attr("orient", "auto"); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-zoom/src/constant.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-zoom/src/event.js"); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js"); -/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-zoom/src/noevent.js"); + var path = marker.append("path") + .attr("d", "M 0 5 L 10 5") + .style("stroke-width", 1) + .style("stroke-dasharray", "1,0"); + util.applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } +} +/***/ }), + +/***/ "./node_modules/dagre-d3/lib/create-clusters.js": +/*!******************************************************!*\ + !*** ./node_modules/dagre-d3/lib/create-clusters.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); +var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); +module.exports = createClusters; +function createClusters(selection, g) { + var clusters = g.nodes().filter(function(v) { return util.isSubgraph(g, v); }); + var svgClusters = selection.selectAll("g.cluster") + .data(clusters, function(v) { return v; }); + svgClusters.selectAll("*").remove(); + svgClusters.enter().append("g") + .attr("class", "cluster") + .attr("id",function(v){ + var node = g.node(v); + return node.id; + }) + .style("opacity", 0); + + svgClusters = selection.selectAll("g.cluster"); + util.applyTransition(svgClusters, g) + .style("opacity", 1); + svgClusters.each(function(v) { + var node = g.node(v); + var thisGroup = d3.select(this); + d3.select(this).append("rect"); + var labelGroup = thisGroup.append("g").attr("class", "label"); + addLabel(labelGroup, node, node.clusterLabelPos); + }); + svgClusters.selectAll("rect").each(function(c) { + var node = g.node(c); + var domCluster = d3.select(this); + util.applyStyle(domCluster, node.style); + }); -// Ignore right-click, since that should open the context menu. -function defaultFilter() { - return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button; -} + var exitSelection; -function defaultExtent() { - var e = this; - if (e instanceof SVGElement) { - e = e.ownerSVGElement || e; - if (e.hasAttribute("viewBox")) { - e = e.viewBox.baseVal; - return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; - } - return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; + if (svgClusters.exit) { + exitSelection = svgClusters.exit(); + } else { + exitSelection = svgClusters.selectAll(null); // empty selection } - return [[0, 0], [e.clientWidth, e.clientHeight]]; -} -function defaultTransform() { - return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"]; -} + util.applyTransition(exitSelection, g) + .style("opacity", 0) + .remove(); -function defaultWheelDelta() { - return -d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaY * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode === 1 ? 0.05 : d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode ? 1 : 0.002); + return svgClusters; } -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} -function defaultConstrain(transform, extent, translateExtent) { - var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], - dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], - dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], - dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; - return transform.translate( - dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), - dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) - ); -} +/***/ }), -/* harmony default export */ __webpack_exports__["default"] = (function() { - var filter = defaultFilter, - extent = defaultExtent, - constrain = defaultConstrain, - wheelDelta = defaultWheelDelta, - touchable = defaultTouchable, - scaleExtent = [0, Infinity], - translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], - duration = 250, - interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolateZoom"], - listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "zoom", "end"), - touchstarting, - touchending, - touchDelay = 500, - wheelDelay = 150, - clickDistance2 = 0; +/***/ "./node_modules/dagre-d3/lib/create-edge-labels.js": +/*!*********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/create-edge-labels.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function zoom(selection) { - selection - .property("__zoom", defaultTransform) - .on("wheel.zoom", wheeled) - .on("mousedown.zoom", mousedowned) - .on("dblclick.zoom", dblclicked) - .filter(touchable) - .on("touchstart.zoom", touchstarted) - .on("touchmove.zoom", touchmoved) - .on("touchend.zoom touchcancel.zoom", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } +"use strict"; - zoom.transform = function(collection, transform, point) { - var selection = collection.selection ? collection.selection() : collection; - selection.property("__zoom", defaultTransform); - if (collection !== selection) { - schedule(collection, transform, point); - } else { - selection.interrupt().each(function() { - gesture(this, arguments) - .start() - .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) - .end(); - }); - } - }; - zoom.scaleBy = function(selection, k, p) { - zoom.scaleTo(selection, function() { - var k0 = this.__zoom.k, - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return k0 * k1; - }, p); - }; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); +var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - zoom.scaleTo = function(selection, k, p) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t0 = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, - p1 = t0.invert(p0), - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); - }, p); - }; +module.exports = createEdgeLabels; - zoom.translateBy = function(selection, x, y) { - zoom.transform(selection, function() { - return constrain(this.__zoom.translate( - typeof x === "function" ? x.apply(this, arguments) : x, - typeof y === "function" ? y.apply(this, arguments) : y - ), extent.apply(this, arguments), translateExtent); - }); - }; +function createEdgeLabels(selection, g) { + var svgEdgeLabels = selection.selectAll("g.edgeLabel") + .data(g.edges(), function(e) { return util.edgeToId(e); }) + .classed("update", true); - zoom.translateTo = function(selection, x, y, p) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; - return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"].translate(p0[0], p0[1]).scale(t.k).translate( - typeof x === "function" ? -x.apply(this, arguments) : -x, - typeof y === "function" ? -y.apply(this, arguments) : -y - ), e, translateExtent); - }, p); - }; + svgEdgeLabels.exit().remove(); + svgEdgeLabels.enter().append("g") + .classed("edgeLabel", true) + .style("opacity", 0); - function scale(transform, k) { - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); - return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, transform.x, transform.y); - } + svgEdgeLabels = selection.selectAll("g.edgeLabel"); - function translate(transform, p0, p1) { - var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; - return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](transform.k, x, y); - } + svgEdgeLabels.each(function(e) { + var root = d3.select(this); + root.select(".label").remove(); + var edge = g.edge(e); + var label = addLabel(root, g.edge(e), 0, 0).classed("label", true); + var bbox = label.node().getBBox(); - function centroid(extent) { - return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; - } + if (edge.labelId) { label.attr("id", edge.labelId); } + if (!_.has(edge, "width")) { edge.width = bbox.width; } + if (!_.has(edge, "height")) { edge.height = bbox.height; } + }); - function schedule(transition, transform, point) { - transition - .on("start.zoom", function() { gesture(this, arguments).start(); }) - .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); }) - .tween("zoom", function() { - var that = this, - args = arguments, - g = gesture(that, args), - e = extent.apply(that, args), - p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, - w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), - a = that.__zoom, - b = typeof transform === "function" ? transform.apply(that, args) : transform, - i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); - return function(t) { - if (t === 1) t = b; // Avoid rounding error on end. - else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, p[0] - l[0] * k, p[1] - l[1] * k); } - g.zoom(null, t); - }; - }); - } + var exitSelection; - function gesture(that, args, clean) { - return (!clean && that.__zooming) || new Gesture(that, args); + if (svgEdgeLabels.exit) { + exitSelection = svgEdgeLabels.exit(); + } else { + exitSelection = svgEdgeLabels.selectAll(null); // empty selection } - function Gesture(that, args) { - this.that = that; - this.args = args; - this.active = 0; - this.extent = extent.apply(that, args); - this.taps = 0; - } + util.applyTransition(exitSelection, g) + .style("opacity", 0) + .remove(); - Gesture.prototype = { - start: function() { - if (++this.active === 1) { - this.that.__zooming = this; - this.emit("start"); - } - return this; - }, - zoom: function(key, transform) { - if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); - if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); - if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); - this.that.__zoom = transform; - this.emit("zoom"); - return this; - }, - end: function() { - if (--this.active === 0) { - delete this.that.__zooming; - this.emit("end"); - } - return this; - }, - emit: function(type) { - Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]); - } - }; + return svgEdgeLabels; +} - function wheeled() { - if (!filter.apply(this, arguments)) return; - var g = gesture(this, arguments), - t = this.__zoom, - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), - p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this); - // If the mouse is in the same location as before, reuse it. - // If there were recent wheel events, reset the wheel idle timeout. - if (g.wheel) { - if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { - g.mouse[1] = t.invert(g.mouse[0] = p); - } - clearTimeout(g.wheel); - } +/***/ }), - // If this wheel event won’t trigger a transform change, ignore it. - else if (t.k === k) return; +/***/ "./node_modules/dagre-d3/lib/create-edge-paths.js": +/*!********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/create-edge-paths.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Otherwise, capture the mouse point and location at the start. - else { - g.mouse = [p, t.invert(p)]; - Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); - g.start(); - } +"use strict"; - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); - g.wheel = setTimeout(wheelidled, wheelDelay); - g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); - function wheelidled() { - g.wheel = null; - g.end(); - } - } +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); +var intersectNode = __webpack_require__(/*! ./intersect/intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); +module.exports = createEdgePaths; - function mousedowned() { - if (touchending || !filter.apply(this, arguments)) return; - var g = gesture(this, arguments, true), - v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), - p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this), - x0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX, - y0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY; +function createEdgePaths(selection, g, arrows) { + var previousPaths = selection.selectAll("g.edgePath") + .data(g.edges(), function(e) { return util.edgeToId(e); }) + .classed("update", true); - Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); - g.mouse = [p, this.__zoom.invert(p)]; - Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); - g.start(); + var newPaths = enter(previousPaths, g); + exit(previousPaths, g); - function mousemoved() { - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); - if (!g.moved) { - var dx = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX - x0, dy = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY - y0; - g.moved = dx * dx + dy * dy > clickDistance2; - } - g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(g.that), g.mouse[1]), g.extent, translateExtent)); - } + var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths; + util.applyTransition(svgPaths, g) + .style("opacity", 1); - function mouseupped() { - v.on("mousemove.zoom mouseup.zoom", null); - Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, g.moved); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); - g.end(); + // Save DOM element in the path group, and set ID and class + svgPaths.each(function(e) { + var domEdge = d3.select(this); + var edge = g.edge(e); + edge.elem = this; + + if (edge.id) { + domEdge.attr("id", edge.id); } - } - function dblclicked() { - if (!filter.apply(this, arguments)) return; - var t0 = this.__zoom, - p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this), - p1 = t0.invert(p0), - k1 = t0.k * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey ? 0.5 : 2), - t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent); + util.applyClass(domEdge, edge["class"], + (domEdge.classed("update") ? "update " : "") + "edgePath"); + }); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); - if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).transition().duration(duration).call(schedule, t1, p0); - else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).call(zoom.transform, t1); - } + svgPaths.selectAll("path.path") + .each(function(e) { + var edge = g.edge(e); + edge.arrowheadId = _.uniqueId("arrowhead"); - function touchstarted() { - if (!filter.apply(this, arguments)) return; - var touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches, - n = touches.length, - g = gesture(this, arguments, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches.length === n), - started, i, t, p; + var domEdge = d3.select(this) + .attr("marker-end", function() { + return "url(" + makeFragmentRef(location.href, edge.arrowheadId) + ")"; + }) + .style("fill", "none"); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); - for (i = 0; i < n; ++i) { - t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier); - p = [p, this.__zoom.invert(p), t.identifier]; - if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; - else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; - } + util.applyTransition(domEdge, g) + .attr("d", function(e) { return calcPoints(g, e); }); - if (touchstarting) touchstarting = clearTimeout(touchstarting); + util.applyStyle(domEdge, edge.style); + }); - if (started) { - if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); - Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); - g.start(); - } - } + svgPaths.selectAll("defs *").remove(); + svgPaths.selectAll("defs") + .each(function(e) { + var edge = g.edge(e); + var arrowhead = arrows[edge.arrowhead]; + arrowhead(d3.select(this), edge.arrowheadId, edge, "arrowhead"); + }); - function touchmoved() { - if (!this.__zooming) return; - var g = gesture(this, arguments), - touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches, - n = touches.length, i, t, p, l; + return svgPaths; +} - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(); - if (touchstarting) touchstarting = clearTimeout(touchstarting); - g.taps = 0; - for (i = 0; i < n; ++i) { - t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier); - if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; - else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; - } - t = g.that.__zoom; - if (g.touch1) { - var p0 = g.touch0[0], l0 = g.touch0[1], - p1 = g.touch1[0], l1 = g.touch1[1], - dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, - dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; - t = scale(t, Math.sqrt(dp / dl)); - p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; - l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; - } - else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; - else return; - g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); - } +function makeFragmentRef(url, fragmentId) { + var baseUrl = url.split("#")[0]; + return baseUrl + "#" + fragmentId; +} - function touchended() { - if (!this.__zooming) return; - var g = gesture(this, arguments), - touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches, - n = touches.length, i, t; +function calcPoints(g, e) { + var edge = g.edge(e); + var tail = g.node(e.v); + var head = g.node(e.w); + var points = edge.points.slice(1, edge.points.length - 1); + points.unshift(intersectNode(tail, points[0])); + points.push(intersectNode(head, points[points.length - 1])); - Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(); - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, touchDelay); - for (i = 0; i < n; ++i) { - t = touches[i]; - if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; - else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; - } - if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; - if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); - else { - g.end(); - // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. - if (g.taps === 2) { - var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).on("dblclick.zoom"); - if (p) p.apply(this, arguments); - } - } - } + return createLine(edge, points); +} - zoom.wheelDelta = function(_) { - return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(+_), zoom) : wheelDelta; - }; +function createLine(edge, points) { + var line = (d3.line || d3.svg.line)() + .x(function(d) { return d.x; }) + .y(function(d) { return d.y; }); + + (line.curve || line.interpolate)(edge.curve); - zoom.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : filter; - }; + return line(points); +} - zoom.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : touchable; - }; +function getCoords(elem) { + var bbox = elem.getBBox(); + var matrix = elem.ownerSVGElement.getScreenCTM() + .inverse() + .multiply(elem.getScreenCTM()) + .translate(bbox.width / 2, bbox.height / 2); + return { x: matrix.e, y: matrix.f }; +} - zoom.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; - }; +function enter(svgPaths, g) { + var svgPathsEnter = svgPaths.enter().append("g") + .attr("class", "edgePath") + .style("opacity", 0); + svgPathsEnter.append("path") + .attr("class", "path") + .attr("d", function(e) { + var edge = g.edge(e); + var sourceElem = g.node(e.v).elem; + var points = _.range(edge.points.length).map(function() { return getCoords(sourceElem); }); + return createLine(edge, points); + }); + svgPathsEnter.append("defs"); + return svgPathsEnter; +} - zoom.scaleExtent = function(_) { - return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; - }; +function exit(svgPaths, g) { + var svgPathExit = svgPaths.exit(); + util.applyTransition(svgPathExit, g) + .style("opacity", 0) + .remove(); +} - zoom.translateExtent = function(_) { - return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; - }; - zoom.constrain = function(_) { - return arguments.length ? (constrain = _, zoom) : constrain; - }; +/***/ }), - zoom.duration = function(_) { - return arguments.length ? (duration = +_, zoom) : duration; - }; +/***/ "./node_modules/dagre-d3/lib/create-nodes.js": +/*!***************************************************!*\ + !*** ./node_modules/dagre-d3/lib/create-nodes.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - zoom.interpolate = function(_) { - return arguments.length ? (interpolate = _, zoom) : interpolate; - }; +"use strict"; - zoom.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? zoom : value; - }; - zoom.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); - }; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); +var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - return zoom; -}); +module.exports = createNodes; +function createNodes(selection, g, shapes) { + var simpleNodes = g.nodes().filter(function(v) { return !util.isSubgraph(g, v); }); + var svgNodes = selection.selectAll("g.node") + .data(simpleNodes, function(v) { return v; }) + .classed("update", true); -/***/ }), + svgNodes.exit().remove(); -/***/ "./node_modules/d3/dist/package.js": -/*!*****************************************!*\ - !*** ./node_modules/d3/dist/package.js ***! - \*****************************************/ -/*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "description", function() { return description; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keywords", function() { return keywords; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepage", function() { return homepage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "license", function() { return license; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "author", function() { return author; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "main", function() { return main; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpkg", function() { return unpkg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsdelivr", function() { return jsdelivr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "module", function() { return module; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repository", function() { return repository; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "files", function() { return files; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scripts", function() { return scripts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "devDependencies", function() { return devDependencies; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; }); -var name = "d3"; -var version = "5.14.2"; -var description = "Data-Driven Documents"; -var keywords = ["dom","visualization","svg","animation","canvas"]; -var homepage = "https://d3js.org"; -var license = "BSD-3-Clause"; -var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"}; -var main = "dist/d3.node.js"; -var unpkg = "dist/d3.min.js"; -var jsdelivr = "dist/d3.min.js"; -var module = "index.js"; -var repository = {"type":"git","url":"https://github.com/d3/d3.git"}; -var files = ["dist/**/*.js","index.js"]; -var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"}; -var devDependencies = {"json2module":"0.0","rimraf":"2","rollup":"1","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"3","rollup-plugin-terser":"5","tape":"4"}; -var dependencies = {"d3-array":"1","d3-axis":"1","d3-brush":"1","d3-chord":"1","d3-collection":"1","d3-color":"1","d3-contour":"1","d3-dispatch":"1","d3-drag":"1","d3-dsv":"1","d3-ease":"1","d3-fetch":"1","d3-force":"1","d3-format":"1","d3-geo":"1","d3-hierarchy":"1","d3-interpolate":"1","d3-path":"1","d3-polygon":"1","d3-quadtree":"1","d3-random":"1","d3-scale":"2","d3-scale-chromatic":"1","d3-selection":"1","d3-shape":"1","d3-time":"1","d3-time-format":"2","d3-timer":"1","d3-transition":"1","d3-voronoi":"1","d3-zoom":"1"}; + svgNodes.enter().append("g") + .attr("class", "node") + .style("opacity", 0); + svgNodes = selection.selectAll("g.node"); -/***/ }), + svgNodes.each(function(v) { + var node = g.node(v); + var thisGroup = d3.select(this); + util.applyClass(thisGroup, node["class"], + (thisGroup.classed("update") ? "update " : "") + "node"); -/***/ "./node_modules/d3/index.js": -/*!**********************************!*\ - !*** ./node_modules/d3/index.js ***! - \**********************************/ -/*! exports provided: version, bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, ribbon, nest, set, map, keys, values, entries, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, voronoi, zoom, zoomTransform, zoomIdentity */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + thisGroup.select("g.label").remove(); + var labelGroup = thisGroup.append("g").attr("class", "label"); + var labelDom = addLabel(labelGroup, node); + var shape = shapes[node.shape]; + var bbox = _.pick(labelDom.node().getBBox(), "width", "height"); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ "./node_modules/d3/dist/package.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__["version"]; }); + node.elem = this; -/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisect"]; }); + if (node.id) { thisGroup.attr("id", node.id); } + if (node.labelId) { labelGroup.attr("id", node.labelId); } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectRight"]; }); + if (_.has(node, "width")) { bbox.width = node.width; } + if (_.has(node, "height")) { bbox.height = node.height; } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectLeft"]; }); + bbox.width += node.paddingLeft + node.paddingRight; + bbox.height += node.paddingTop + node.paddingBottom; + labelGroup.attr("transform", "translate(" + + ((node.paddingLeft - node.paddingRight) / 2) + "," + + ((node.paddingTop - node.paddingBottom) / 2) + ")"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ascending"]; }); + var root = d3.select(this); + root.select(".label-container").remove(); + var shapeSvg = shape(root, bbox, node).classed("label-container", true); + util.applyStyle(shapeSvg, node.style); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisector"]; }); + var shapeBBox = shapeSvg.node().getBBox(); + node.width = shapeBBox.width; + node.height = shapeBBox.height; + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cross"]; }); + var exitSelection; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["descending"]; }); + if (svgNodes.exit) { + exitSelection = svgNodes.exit(); + } else { + exitSelection = svgNodes.selectAll(null); // empty selection + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["deviation"]; }); + util.applyTransition(exitSelection, g) + .style("opacity", 0) + .remove(); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["extent"]; }); + return svgNodes; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["histogram"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdFreedmanDiaconis"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdScott"]; }); +/***/ "./node_modules/dagre-d3/lib/d3.js": +/*!*****************************************!*\ + !*** ./node_modules/dagre-d3/lib/d3.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdSturges"]; }); +// Stub to get D3 either via NPM or from the global object +var d3; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["max"]; }); +if (!d3) { + if (true) { + try { + d3 = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); + } + catch (e) { + // continue regardless of error + } + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["mean"]; }); +if (!d3) { + d3 = window.d3; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["median"]; }); +module.exports = d3; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["merge"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["min"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["pairs"]; }); +/***/ "./node_modules/dagre-d3/lib/dagre.js": +/*!********************************************!*\ + !*** ./node_modules/dagre-d3/lib/dagre.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["permute"]; }); +/* global window */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantile"]; }); +var dagre; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["range"]; }); +if (true) { + try { + dagre = __webpack_require__(/*! dagre */ "./node_modules/dagre-d3/node_modules/dagre/index.js"); + } catch (e) { + // continue regardless of error + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["scan"]; }); +if (!dagre) { + dagre = window.dagre; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffle"]; }); +module.exports = dagre; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sum"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ticks"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickIncrement"]; }); +/***/ "./node_modules/dagre-d3/lib/graphlib.js": +/*!***********************************************!*\ + !*** ./node_modules/dagre-d3/lib/graphlib.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickStep"]; }); +/* global window */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["transpose"]; }); +var graphlib; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["variance"]; }); +if (true) { + try { + graphlib = __webpack_require__(/*! graphlib */ "./node_modules/dagre-d3/node_modules/graphlib/index.js"); + } + catch (e) { + // continue regardless of error + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["zip"]; }); +if (!graphlib) { + graphlib = window.graphlib; +} -/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ "./node_modules/d3-axis/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisTop"]; }); +module.exports = graphlib; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisRight"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisBottom"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisLeft"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/index.js": +/*!******************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/index.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ "./node_modules/d3-brush/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brush"]; }); +module.exports = { + node: __webpack_require__(/*! ./intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js"), + circle: __webpack_require__(/*! ./intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js"), + ellipse: __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"), + polygon: __webpack_require__(/*! ./intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js"), + rect: __webpack_require__(/*! ./intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js") +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushX"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushY"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushSelection"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js": +/*!*****************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-circle.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ "./node_modules/d3-chord/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chord"]; }); +var intersectEllipse = __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbon"]; }); +module.exports = intersectCircle; -/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["nest"]; }); +function intersectCircle(node, rx, point) { + return intersectEllipse(node, rx, rx, point); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["set"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["map"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["keys"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["values"]; }); +module.exports = intersectEllipse; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["entries"]; }); +function intersectEllipse(node, rx, ry, point) { + // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html -/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["color"]; }); + var cx = node.x; + var cy = node.y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["rgb"]; }); + var px = cx - point.x; + var py = cy - point.y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hsl"]; }); + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lab"]; }); + var dx = Math.abs(rx * ry * px / det); + if (point.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point.y < cy) { + dy = -dy; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hcl"]; }); + return {x: cx + dx, y: cy + dy}; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lch"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["gray"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["cubehelix"]; }); +/***/ }), -/* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-contour */ "./node_modules/d3-contour/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contours"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-line.js": +/*!***************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-line.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contourDensity"]; }); +module.exports = intersectLine; -/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__["dispatch"]; }); +/* + * Returns the point at which two lines, p and q, intersect or returns + * undefined if they do not intersect. + */ +function intersectLine(p1, p2, q1, q2) { + // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, + // p7 and p473. -/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["drag"]; }); + var a1, a2, b1, b2, c1, c2; + var r1, r2 , r3, r4; + var denom, offset, num; + var x, y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragDisable"]; }); + // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + + // b1 y + c1 = 0. + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = (p2.x * p1.y) - (p1.x * p2.y); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragEnable"]; }); + // Compute r3 and r4. + r3 = ((a1 * q1.x) + (b1 * q1.y) + c1); + r4 = ((a1 * q2.x) + (b1 * q2.y) + c1); -/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["dsvFormat"]; }); + // Check signs of r3 and r4. If both point 3 and point 4 lie on + // same side of line 1, the line segments do not intersect. + if ((r3 !== 0) && (r4 !== 0) && sameSign(r3, r4)) { + return /*DONT_INTERSECT*/; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParse"]; }); + // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = (q2.x * q1.y) - (q1.x * q2.y); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParseRows"]; }); + // Compute r1 and r2 + r1 = (a2 * p1.x) + (b2 * p1.y) + c2; + r2 = (a2 * p2.x) + (b2 * p2.y) + c2; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormat"]; }); + // Check signs of r1 and r2. If both point 1 and point 2 lie + // on same side of second line segment, the line segments do + // not intersect. + if ((r1 !== 0) && (r2 !== 0) && (sameSign(r1, r2))) { + return /*DONT_INTERSECT*/; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatBody"]; }); + // Line segments intersect: compute intersection point. + denom = (a1 * b2) - (a2 * b1); + if (denom === 0) { + return /*COLLINEAR*/; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRows"]; }); + offset = Math.abs(denom / 2); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRow"]; }); + // The denom/2 is to get rounding instead of truncating. It + // is added or subtracted to the numerator, depending upon the + // sign of the numerator. + num = (b1 * c2) - (b2 * c1); + x = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatValue"]; }); + num = (a2 * c1) - (a1 * c2); + y = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParse"]; }); + return { x: x, y: y }; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParseRows"]; }); +function sameSign(r1, r2) { + return r1 * r2 > 0; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormat"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatBody"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRows"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-node.js": +/*!***************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-node.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRow"]; }); +module.exports = intersectNode; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatValue"]; }); +function intersectNode(node, point) { + return node.intersect(point); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["autoType"]; }); -/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeLinear"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuad"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-polygon.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadIn"]; }); +/* eslint "no-console": off */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadOut"]; }); +var intersectLine = __webpack_require__(/*! ./intersect-line */ "./node_modules/dagre-d3/lib/intersect/intersect-line.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadInOut"]; }); +module.exports = intersectPolygon; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubic"]; }); +/* + * Returns the point ({x, y}) at which the point argument intersects with the + * node argument assuming that it has the shape specified by polygon. + */ +function intersectPolygon(node, polyPoints, point) { + var x1 = node.x; + var y1 = node.y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicIn"]; }); + var intersections = []; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicOut"]; }); + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicInOut"]; }); + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePoly"]; }); + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect = intersectLine(node, point, + {x: left + p1.x, y: top + p1.y}, {x: left + p2.x, y: top + p2.y}); + if (intersect) { + intersections.push(intersect); + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyIn"]; }); + if (!intersections.length) { + console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", node); + return node; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyOut"]; }); + if (intersections.length > 1) { + // More intersections, find the one nearest to edge end point + intersections.sort(function(p, q) { + var pdx = p.x - point.x; + var pdy = p.y - point.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyInOut"]; }); + var qdx = q.x - point.x; + var qdy = q.y - point.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSin"]; }); + return (distp < distq) ? -1 : (distp === distq ? 0 : 1); + }); + } + return intersections[0]; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinIn"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinOut"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinInOut"]; }); +/***/ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js": +/*!***************************************************************!*\ + !*** ./node_modules/dagre-d3/lib/intersect/intersect-rect.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExp"]; }); +module.exports = intersectRect; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpIn"]; }); +function intersectRect(node, point) { + var x = node.x; + var y = node.y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpOut"]; }); + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = node.width / 2; + var h = node.height / 2; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpInOut"]; }); + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircle"]; }); + return {x: x + sx, y: y + sy}; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleIn"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleOut"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleInOut"]; }); +/***/ "./node_modules/dagre-d3/lib/label/add-html-label.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/label/add-html-label.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounce"]; }); +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceIn"]; }); +module.exports = addHtmlLabel; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceOut"]; }); +function addHtmlLabel(root, node) { + var fo = root + .append("foreignObject") + .attr("width", "100000"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceInOut"]; }); + var div = fo + .append("xhtml:div"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBack"]; }); + var label = node.label; + switch(typeof label) { + case "function": + div.insert(label); + break; + case "object": + // Currently we assume this is a DOM object. + div.insert(function() { return label; }); + break; + default: div.html(label); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackIn"]; }); + util.applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + // Fix for firefox + div.style("white-space", "nowrap"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackOut"]; }); + var client = div.node().getBoundingClientRect(); + fo + .attr("width", client.width) + .attr("height", client.height); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackInOut"]; }); + return fo; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElastic"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticIn"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticOut"]; }); +/***/ "./node_modules/dagre-d3/lib/label/add-label.js": +/*!******************************************************!*\ + !*** ./node_modules/dagre-d3/lib/label/add-label.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticInOut"]; }); - -/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ "./node_modules/d3-fetch/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["blob"]; }); +var addTextLabel = __webpack_require__(/*! ./add-text-label */ "./node_modules/dagre-d3/lib/label/add-text-label.js"); +var addHtmlLabel = __webpack_require__(/*! ./add-html-label */ "./node_modules/dagre-d3/lib/label/add-html-label.js"); +var addSVGLabel = __webpack_require__(/*! ./add-svg-label */ "./node_modules/dagre-d3/lib/label/add-svg-label.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["buffer"]; }); +module.exports = addLabel; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["dsv"]; }); +function addLabel(root, node, location) { + var label = node.label; + var labelSvg = root.append("g"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["csv"]; }); + // Allow the label to be a string, a function that returns a DOM element, or + // a DOM element itself. + if (node.labelType === "svg") { + addSVGLabel(labelSvg, node); + } else if (typeof label !== "string" || node.labelType === "html") { + addHtmlLabel(labelSvg, node); + } else { + addTextLabel(labelSvg, node); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["tsv"]; }); + var labelBBox = labelSvg.node().getBBox(); + var y; + switch(location) { + case "top": + y = (-node.height / 2); + break; + case "bottom": + y = (node.height / 2) - labelBBox.height; + break; + default: + y = (-labelBBox.height / 2); + } + labelSvg.attr( + "transform", + "translate(" + (-labelBBox.width / 2) + "," + y + ")"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["image"]; }); + return labelSvg; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["json"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["text"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["xml"]; }); +/***/ "./node_modules/dagre-d3/lib/label/add-svg-label.js": +/*!**********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/label/add-svg-label.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["html"]; }); +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["svg"]; }); +module.exports = addSVGLabel; -/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ "./node_modules/d3-force/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCenter"]; }); +function addSVGLabel(root, node) { + var domNode = root; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCollide"]; }); + domNode.node().appendChild(node.label); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceLink"]; }); + util.applyStyle(domNode, node.labelStyle); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceManyBody"]; }); + return domNode; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceRadial"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceSimulation"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceX"]; }); +/***/ "./node_modules/dagre-d3/lib/label/add-text-label.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/label/add-text-label.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceY"]; }); +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); -/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatDefaultLocale"]; }); +module.exports = addTextLabel; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["format"]; }); +/* + * Attaches a text label to the specified root. Handles escape sequences. + */ +function addTextLabel(root, node) { + var domNode = root.append("text"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatPrefix"]; }); + var lines = processEscapeSequences(node.label).split("\n"); + for (var i = 0; i < lines.length; i++) { + domNode.append("tspan") + .attr("xml:space", "preserve") + .attr("dy", "1em") + .attr("x", "1") + .text(lines[i]); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatLocale"]; }); + util.applyStyle(domNode, node.labelStyle); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatSpecifier"]; }); + return domNode; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["FormatSpecifier"]; }); +function processEscapeSequences(text) { + var newText = ""; + var escaped = false; + var ch; + for (var i = 0; i < text.length; ++i) { + ch = text[i]; + if (escaped) { + switch(ch) { + case "n": newText += "\n"; break; + default: newText += ch; + } + escaped = false; + } else if (ch === "\\") { + escaped = true; + } else { + newText += ch; + } + } + return newText; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionFixed"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionPrefix"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionRound"]; }); +/***/ "./node_modules/dagre-d3/lib/lodash.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre-d3/lib/lodash.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ "./node_modules/d3-geo/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoArea"]; }); +/* global window */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoBounds"]; }); +var lodash; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCentroid"]; }); +if (true) { + try { + lodash = { + defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), + each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), + isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), + isPlainObject: __webpack_require__(/*! lodash/isPlainObject */ "./node_modules/lodash/isPlainObject.js"), + pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), + has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), + range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), + uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js") + }; + } + catch (e) { + // continue regardless of error + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCircle"]; }); +if (!lodash) { + lodash = window._; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipAntimeridian"]; }); +module.exports = lodash; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipCircle"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipExtent"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipRectangle"]; }); +/***/ "./node_modules/dagre-d3/lib/position-clusters.js": +/*!********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/position-clusters.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoContains"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoDistance"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule"]; }); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule10"]; }); +module.exports = positionClusters; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoInterpolate"]; }); +function positionClusters(selection, g) { + var created = selection.filter(function() { return !d3.select(this).classed("update"); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoLength"]; }); + function translate(v) { + var node = g.node(v); + return "translate(" + node.x + "," + node.y + ")"; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoPath"]; }); + created.attr("transform", translate); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbers"]; }); + util.applyTransition(selection, g) + .style("opacity", 1) + .attr("transform", translate); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbersUsa"]; }); + util.applyTransition(created.selectAll("rect"), g) + .attr("width", function(v) { return g.node(v).width; }) + .attr("height", function(v) { return g.node(v).height; }) + .attr("x", function(v) { + var node = g.node(v); + return -node.width / 2; + }) + .attr("y", function(v) { + var node = g.node(v); + return -node.height / 2; + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualArea"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualAreaRaw"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistant"]; }); +/***/ "./node_modules/dagre-d3/lib/position-edge-labels.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre-d3/lib/position-edge-labels.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistantRaw"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformal"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformalRaw"]; }); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualArea"]; }); +module.exports = positionEdgeLabels; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualAreaRaw"]; }); +function positionEdgeLabels(selection, g) { + var created = selection.filter(function() { return !d3.select(this).classed("update"); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistant"]; }); + function translate(e) { + var edge = g.edge(e); + return _.has(edge, "x") ? "translate(" + edge.x + "," + edge.y + ")" : ""; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistantRaw"]; }); + created.attr("transform", translate); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarth"]; }); + util.applyTransition(selection, g) + .style("opacity", 1) + .attr("transform", translate); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarthRaw"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangular"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangularRaw"]; }); +/***/ "./node_modules/dagre-d3/lib/position-nodes.js": +/*!*****************************************************!*\ + !*** ./node_modules/dagre-d3/lib/position-nodes.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonic"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonicRaw"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoIdentity"]; }); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjection"]; }); +module.exports = positionNodes; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjectionMutator"]; }); +function positionNodes(selection, g) { + var created = selection.filter(function() { return !d3.select(this).classed("update"); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercator"]; }); + function translate(v) { + var node = g.node(v); + return "translate(" + node.x + "," + node.y + ")"; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercatorRaw"]; }); + created.attr("transform", translate); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1"]; }); + util.applyTransition(selection, g) + .style("opacity", 1) + .attr("transform", translate); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1Raw"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographic"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographicRaw"]; }); +/***/ "./node_modules/dagre-d3/lib/render.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre-d3/lib/render.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographic"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); +var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); +var layout = __webpack_require__(/*! ./dagre */ "./node_modules/dagre-d3/lib/dagre.js").layout; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographicRaw"]; }); +module.exports = render; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercator"]; }); +// This design is based on http://bost.ocks.org/mike/chart/. +function render() { + var createNodes = __webpack_require__(/*! ./create-nodes */ "./node_modules/dagre-d3/lib/create-nodes.js"); + var createClusters = __webpack_require__(/*! ./create-clusters */ "./node_modules/dagre-d3/lib/create-clusters.js"); + var createEdgeLabels = __webpack_require__(/*! ./create-edge-labels */ "./node_modules/dagre-d3/lib/create-edge-labels.js"); + var createEdgePaths = __webpack_require__(/*! ./create-edge-paths */ "./node_modules/dagre-d3/lib/create-edge-paths.js"); + var positionNodes = __webpack_require__(/*! ./position-nodes */ "./node_modules/dagre-d3/lib/position-nodes.js"); + var positionEdgeLabels = __webpack_require__(/*! ./position-edge-labels */ "./node_modules/dagre-d3/lib/position-edge-labels.js"); + var positionClusters = __webpack_require__(/*! ./position-clusters */ "./node_modules/dagre-d3/lib/position-clusters.js"); + var shapes = __webpack_require__(/*! ./shapes */ "./node_modules/dagre-d3/lib/shapes.js"); + var arrows = __webpack_require__(/*! ./arrows */ "./node_modules/dagre-d3/lib/arrows.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercatorRaw"]; }); + var fn = function(svg, g) { + preProcessGraph(g); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoRotation"]; }); + var outputGroup = createOrSelectGroup(svg, "output"); + var clustersGroup = createOrSelectGroup(outputGroup, "clusters"); + var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths"); + var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g); + var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStream"]; }); + layout(g); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransform"]; }); + positionNodes(nodes, g); + positionEdgeLabels(edgeLabels, g); + createEdgePaths(edgePathsGroup, g, arrows); -/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ "./node_modules/d3-hierarchy/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["cluster"]; }); + var clusters = createClusters(clustersGroup, g); + positionClusters(clusters, g); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["hierarchy"]; }); + postProcessGraph(g); + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["pack"]; }); + fn.createNodes = function(value) { + if (!arguments.length) return createNodes; + createNodes = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packSiblings"]; }); + fn.createClusters = function(value) { + if (!arguments.length) return createClusters; + createClusters = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packEnclose"]; }); + fn.createEdgeLabels = function(value) { + if (!arguments.length) return createEdgeLabels; + createEdgeLabels = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["partition"]; }); + fn.createEdgePaths = function(value) { + if (!arguments.length) return createEdgePaths; + createEdgePaths = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["stratify"]; }); + fn.shapes = function(value) { + if (!arguments.length) return shapes; + shapes = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["tree"]; }); + fn.arrows = function(value) { + if (!arguments.length) return arrows; + arrows = value; + return fn; + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemap"]; }); + return fn; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapBinary"]; }); +var NODE_DEFAULT_ATTRS = { + paddingLeft: 10, + paddingRight: 10, + paddingTop: 10, + paddingBottom: 10, + rx: 0, + ry: 0, + shape: "rect" +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapDice"]; }); +var EDGE_DEFAULT_ATTRS = { + arrowhead: "normal", + curve: d3.curveLinear +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSlice"]; }); +function preProcessGraph(g) { + g.nodes().forEach(function(v) { + var node = g.node(v); + if (!_.has(node, "label") && !g.children(v).length) { node.label = v; } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSliceDice"]; }); + if (_.has(node, "paddingX")) { + _.defaults(node, { + paddingLeft: node.paddingX, + paddingRight: node.paddingX + }); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSquarify"]; }); + if (_.has(node, "paddingY")) { + _.defaults(node, { + paddingTop: node.paddingY, + paddingBottom: node.paddingY + }); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapResquarify"]; }); + if (_.has(node, "padding")) { + _.defaults(node, { + paddingLeft: node.padding, + paddingRight: node.padding, + paddingTop: node.padding, + paddingBottom: node.padding + }); + } -/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolate"]; }); + _.defaults(node, NODE_DEFAULT_ATTRS); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateArray"]; }); + _.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(k) { + node[k] = Number(node[k]); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasis"]; }); + // Save dimensions for restore during post-processing + if (_.has(node, "width")) { node._prevWidth = node.width; } + if (_.has(node, "height")) { node._prevHeight = node.height; } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasisClosed"]; }); + g.edges().forEach(function(e) { + var edge = g.edge(e); + if (!_.has(edge, "label")) { edge.label = ""; } + _.defaults(edge, EDGE_DEFAULT_ATTRS); + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDate"]; }); +function postProcessGraph(g) { + _.each(g.nodes(), function(v) { + var node = g.node(v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDiscrete"]; }); + // Restore original dimensions + if (_.has(node, "_prevWidth")) { + node.width = node._prevWidth; + } else { + delete node.width; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHue"]; }); + if (_.has(node, "_prevHeight")) { + node.height = node._prevHeight; + } else { + delete node.height; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumber"]; }); + delete node._prevWidth; + delete node._prevHeight; + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumberArray"]; }); +function createOrSelectGroup(root, name) { + var selection = root.select("g." + name); + if (selection.empty()) { + selection = root.append("g").attr("class", name); + } + return selection; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateObject"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRound"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateString"]; }); +/***/ "./node_modules/dagre-d3/lib/shapes.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre-d3/lib/shapes.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformCss"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformSvg"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateZoom"]; }); +var intersectRect = __webpack_require__(/*! ./intersect/intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js"); +var intersectEllipse = __webpack_require__(/*! ./intersect/intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"); +var intersectCircle = __webpack_require__(/*! ./intersect/intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js"); +var intersectPolygon = __webpack_require__(/*! ./intersect/intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgb"]; }); +module.exports = { + rect: rect, + ellipse: ellipse, + circle: circle, + diamond: diamond +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasis"]; }); +function rect(parent, bbox, node) { + var shapeSvg = parent.insert("rect", ":first-child") + .attr("rx", node.rx) + .attr("ry", node.ry) + .attr("x", -bbox.width / 2) + .attr("y", -bbox.height / 2) + .attr("width", bbox.width) + .attr("height", bbox.height); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasisClosed"]; }); + node.intersect = function(point) { + return intersectRect(node, point); + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHsl"]; }); + return shapeSvg; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHslLong"]; }); +function ellipse(parent, bbox, node) { + var rx = bbox.width / 2; + var ry = bbox.height / 2; + var shapeSvg = parent.insert("ellipse", ":first-child") + .attr("x", -bbox.width / 2) + .attr("y", -bbox.height / 2) + .attr("rx", rx) + .attr("ry", ry); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateLab"]; }); + node.intersect = function(point) { + return intersectEllipse(node, rx, ry, point); + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHcl"]; }); + return shapeSvg; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHclLong"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelix"]; }); +function circle(parent, bbox, node) { + var r = Math.max(bbox.width, bbox.height) / 2; + var shapeSvg = parent.insert("circle", ":first-child") + .attr("x", -bbox.width / 2) + .attr("y", -bbox.height / 2) + .attr("r", r); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelixLong"]; }); + node.intersect = function(point) { + return intersectCircle(node, r, point); + }; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["piecewise"]; }); + return shapeSvg; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["quantize"]; }); +// Circumscribe an ellipse for the bounding box with a diamond shape. I derived +// the function to calculate the diamond shape from: +// http://mathforum.org/kb/message.jspa?messageID=3750236 +function diamond(parent, bbox, node) { + var w = (bbox.width * Math.SQRT2) / 2; + var h = (bbox.height * Math.SQRT2) / 2; + var points = [ + { x: 0, y: -h }, + { x: -w, y: 0 }, + { x: 0, y: h }, + { x: w, y: 0 } + ]; + var shapeSvg = parent.insert("polygon", ":first-child") + .attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" ")); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__["path"]; }); + node.intersect = function(p) { + return intersectPolygon(node, points, p); + }; -/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ "./node_modules/d3-polygon/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonArea"]; }); + return shapeSvg; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonCentroid"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonHull"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonContains"]; }); +/***/ "./node_modules/dagre-d3/lib/util.js": +/*!*******************************************!*\ + !*** ./node_modules/dagre-d3/lib/util.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonLength"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__["quadtree"]; }); +// Public utility functions +module.exports = { + isSubgraph: isSubgraph, + edgeToId: edgeToId, + applyStyle: applyStyle, + applyClass: applyClass, + applyTransition: applyTransition +}; -/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ "./node_modules/d3-random/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomUniform"]; }); +/* + * Returns true if the specified node in the graph is a subgraph node. A + * subgraph node is one that contains other nodes. + */ +function isSubgraph(g, v) { + return !!g.children(v).length; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomNormal"]; }); +function edgeToId(e) { + return escapeId(e.v) + ":" + escapeId(e.w) + ":" + escapeId(e.name); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogNormal"]; }); +var ID_DELIM = /:/g; +function escapeId(str) { + return str ? String(str).replace(ID_DELIM, "\\:") : ""; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBates"]; }); +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomIrwinHall"]; }); +function applyClass(dom, classFn, otherClasses) { + if (classFn) { + dom + .attr("class", classFn) + .attr("class", otherClasses + " " + dom.attr("class")); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomExponential"]; }); +function applyTransition(selection, g) { + var graph = g.graph(); -/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ "./node_modules/d3-scale/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleBand"]; }); + if (_.isPlainObject(graph)) { + var transition = graph.transition; + if (_.isFunction(transition)) { + return transition(selection); + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePoint"]; }); + return selection; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleIdentity"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLinear"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLog"]; }); +/***/ "./node_modules/dagre-d3/lib/version.js": +/*!**********************************************!*\ + !*** ./node_modules/dagre-d3/lib/version.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSymlog"]; }); +module.exports = "0.6.4"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleOrdinal"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleImplicit"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePow"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/index.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/index.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSqrt"]; }); +/* +Copyright (c) 2012-2014 Chris Pettitt -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantile"]; }); +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantize"]; }); +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleThreshold"]; }); +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleTime"]; }); +module.exports = { + graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js"), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleUtc"]; }); + layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre-d3/node_modules/dagre/lib/layout.js"), + debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre-d3/node_modules/dagre/lib/debug.js"), + util: { + time: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").time, + notime: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").notime + }, + version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre-d3/node_modules/dagre/lib/version.js") +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequential"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialLog"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialPow"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js": +/*!*****************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSqrt"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSymlog"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialQuantile"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDiverging"]; }); +module.exports = { + run: run, + undo: undo +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingLog"]; }); +function run(g) { + var fas = (g.graph().acyclicer === "greedy" + ? greedyFAS(g, weightFn(g)) + : dfsFAS(g)); + _.forEach(fas, function(e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, _.uniqueId("rev")); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingPow"]; }); + function weightFn(g) { + return function(e) { + return g.edge(e).weight; + }; + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSqrt"]; }); +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSymlog"]; }); + function dfs(v) { + if (_.has(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + _.forEach(g.outEdges(v), function(e) { + if (_.has(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["tickFormat"]; }); + _.forEach(g.nodes(), dfs); + return fas; +} -/* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ "./node_modules/d3-scale-chromatic/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeCategory10"]; }); +function undo(g) { + _.forEach(g.edges(), function(e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeAccent"]; }); + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeDark2"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePaired"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel1"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel2"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet1"]; }); +module.exports = addBorderSegments; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet2"]; }); +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + _.forEach(children, dfs); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet3"]; }); + if (_.has(node, "minRank")) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; + rank < maxRank; + ++rank) { + addBorderNode(g, "borderLeft", "_bl", v, node, rank); + addBorderNode(g, "borderRight", "_br", v, node, rank); + } + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeTableau10"]; }); + _.forEach(g.children(), dfs); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBrBG"]; }); +function addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = util.addDummyNode(g, "border", label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBrBG"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePRGn"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePRGn"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js": +/*!***************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePiYG"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePiYG"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuOr"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuOr"]; }); +module.exports = { + adjust: adjust, + undo: undo +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdBu"]; }); +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "lr" || rankDir === "rl") { + swapWidthHeight(g); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdBu"]; }); +function undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "bt" || rankDir === "rl") { + reverseY(g); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdGy"]; }); + if (rankDir === "lr" || rankDir === "rl") { + swapXY(g); + swapWidthHeight(g); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdGy"]; }); +function swapWidthHeight(g) { + _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); }); + _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlBu"]; }); +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlBu"]; }); +function reverseY(g) { + _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlGn"]; }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, reverseYOne); + if (_.has(edge, "y")) { + reverseYOne(edge); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlGn"]; }); +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSpectral"]; }); +function swapXY(g) { + _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSpectral"]; }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, swapXYOne); + if (_.has(edge, "x")) { + swapXYOne(edge); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuGn"]; }); +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuGn"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuPu"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuPu"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js": +/*!*******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGnBu"]; }); +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGnBu"]; }); +module.exports = List; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOrRd"]; }); +function List() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOrRd"]; }); +List.prototype.dequeue = function() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBuGn"]; }); +List.prototype.enqueue = function(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBuGn"]; }); +List.prototype.toString = function() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return "[" + strs.join(", ") + "]"; +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBu"]; }); +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBu"]; }); +function filterOutLinks(k, v) { + if (k !== "_next" && k !== "_prev") { + return v; + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuRd"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuRd"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdPu"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/debug.js": +/*!***************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/debug.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdPu"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGnBu"]; }); +module.exports = { + debugOrdering: debugOrdering +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGnBu"]; }); +/* istanbul ignore next */ +function debugOrdering(g) { + var layerMatrix = util.buildLayerMatrix(g); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGn"]; }); + var h = new Graph({ compound: true, multigraph: true }).setGraph({}); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGn"]; }); + _.forEach(g.nodes(), function(v) { + h.setNode(v, { label: v }); + h.setParent(v, "layer" + g.node(v).rank); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrBr"]; }); + _.forEach(g.edges(), function(e) { + h.setEdge(e.v, e.w, {}, e.name); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrBr"]; }); + _.forEach(layerMatrix, function(layer, i) { + var layerV = "layer" + i; + h.setNode(layerV, { rank: "same" }); + _.reduce(layer, function(u, v) { + h.setEdge(u, v, { style: "invis" }); + return v; + }); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrRd"]; }); + return h; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrRd"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBlues"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBlues"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreens"]; }); +/* global window */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreens"]; }); +var graphlib; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreys"]; }); +if (true) { + try { + graphlib = __webpack_require__(/*! graphlib */ "./node_modules/dagre-d3/node_modules/graphlib/index.js"); + } catch (e) { + // continue regardless of error + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreys"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePurples"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePurples"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateReds"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeReds"]; }); +if (!graphlib) { + graphlib = window.graphlib; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOranges"]; }); +module.exports = graphlib; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOranges"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCividis"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCubehelixDefault"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js": +/*!********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRainbow"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +var List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateWarm"]; }); +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ +module.exports = greedyFAS; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCool"]; }); +var DEFAULT_WEIGHT_FN = _.constant(1); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSinebow"]; }); +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateTurbo"]; }); + // Expand multi-edges + return _.flatten(_.map(results, function(e) { + return g.outEdges(e.v, e.w); + }), true); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateViridis"]; }); +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateMagma"]; }); + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } + while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateInferno"]; }); + return results; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePlasma"]; }); +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; -/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["create"]; }); + _.forEach(g.inEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["creator"]; }); + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["local"]; }); + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["matcher"]; }); + _.forEach(g.outEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry["in"] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["mouse"]; }); + g.removeNode(entry.v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespace"]; }); + return results; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespaces"]; }); +function buildState(g, weightFn) { + var fasGraph = new Graph(); + var maxIn = 0; + var maxOut = 0; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["clientPoint"]; }); + _.forEach(g.nodes(), function(v) { + fasGraph.setNode(v, { v: v, "in": 0, out: 0 }); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["select"]; }); + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + _.forEach(g.edges(), function(e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); + maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectAll"]; }); + var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); + var zeroIdx = maxIn + 1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selection"]; }); + _.forEach(fasGraph.nodes(), function(v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selector"]; }); + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectorAll"]; }); +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry["in"]) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["style"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touch"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touches"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/layout.js": +/*!****************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/layout.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["window"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["event"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["customEvent"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js"); +var normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js"); +var rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js"); +var normalizeRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").normalizeRanks; +var parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js"); +var removeEmptyRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").removeEmptyRanks; +var nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js"); +var addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js"); +var coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js"); +var order = __webpack_require__(/*! ./order */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js"); +var position = __webpack_require__(/*! ./position */ "./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ "./node_modules/d3-shape/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["arc"]; }); +module.exports = layout; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["area"]; }); +function layout(g, opts) { + var time = opts && opts.debugTiming ? util.time : util.notime; + time("layout", function() { + var layoutGraph = + time(" buildLayoutGraph", function() { return buildLayoutGraph(g); }); + time(" runLayout", function() { runLayout(layoutGraph, time); }); + time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); }); + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["line"]; }); +function runLayout(g, time) { + time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); }); + time(" removeSelfEdges", function() { removeSelfEdges(g); }); + time(" acyclic", function() { acyclic.run(g); }); + time(" nestingGraph.run", function() { nestingGraph.run(g); }); + time(" rank", function() { rank(util.asNonCompoundGraph(g)); }); + time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); }); + time(" removeEmptyRanks", function() { removeEmptyRanks(g); }); + time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); }); + time(" normalizeRanks", function() { normalizeRanks(g); }); + time(" assignRankMinMax", function() { assignRankMinMax(g); }); + time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); }); + time(" normalize.run", function() { normalize.run(g); }); + time(" parentDummyChains", function() { parentDummyChains(g); }); + time(" addBorderSegments", function() { addBorderSegments(g); }); + time(" order", function() { order(g); }); + time(" insertSelfEdges", function() { insertSelfEdges(g); }); + time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); }); + time(" position", function() { position(g); }); + time(" positionSelfEdges", function() { positionSelfEdges(g); }); + time(" removeBorderNodes", function() { removeBorderNodes(g); }); + time(" normalize.undo", function() { normalize.undo(g); }); + time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); }); + time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); }); + time(" translateGraph", function() { translateGraph(g); }); + time(" assignNodeIntersects", function() { assignNodeIntersects(g); }); + time(" reversePoints", function() { reversePointsForReversedEdges(g); }); + time(" acyclic.undo", function() { acyclic.undo(g); }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pie"]; }); +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + _.forEach(inputGraph.nodes(), function(v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["areaRadial"]; }); + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialArea"]; }); + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["lineRadial"]; }); + _.forEach(inputGraph.edges(), function(e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialLine"]; }); + inputLabel.points = layoutLabel.points; + if (_.has(layoutLabel, "x")) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pointRadial"]; }); + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkHorizontal"]; }); +var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"]; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }; +var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"]; +var nodeNumAttrs = ["width", "height"]; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"]; +var edgeDefaults = { + minlen: 1, weight: 1, width: 0, height: 0, + labeloffset: 10, labelpos: "r" +}; +var edgeAttrs = ["labelpos"]; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkVertical"]; }); +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new Graph({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkRadial"]; }); + g.setGraph(_.merge({}, + graphDefaults, + selectNumberAttrs(graph, graphNumAttrs), + _.pick(graph, graphAttrs))); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbol"]; }); + _.forEach(inputGraph.nodes(), function(v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbols"]; }); + _.forEach(inputGraph.edges(), function(e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge(e, _.merge({}, + edgeDefaults, + selectNumberAttrs(edge, edgeNumAttrs), + _.pick(edge, edgeAttrs))); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCircle"]; }); + return g; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCross"]; }); +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== "c") { + if (graph.rankdir === "TB" || graph.rankdir === "BT") { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolDiamond"]; }); +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + util.addDummyNode(g, "edge-proxy", label, "_ep"); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolSquare"]; }); +function assignRankMinMax(g) { + var maxRank = 0; + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + maxRank = _.max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolStar"]; }); +function removeEdgeLabelProxies(g) { + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "edge-proxy") { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolTriangle"]; }); +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolWye"]; }); + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisClosed"]; }); + _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (_.has(edge, "x")) { + getExtremes(edge); + } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisOpen"]; }); + minX -= marginX; + minY -= marginY; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasis"]; }); + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBundle"]; }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, function(p) { + p.x -= minX; + p.y -= minY; + }); + if (_.has(edge, "x")) { edge.x -= minX; } + if (_.has(edge, "y")) { edge.y -= minY; } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalClosed"]; }); + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalOpen"]; }); +function assignNodeIntersects(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(util.intersectRect(nodeV, p1)); + edge.points.push(util.intersectRect(nodeW, p2)); + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinal"]; }); +function fixupEdgeLabelCoords(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (_.has(edge, "x")) { + if (edge.labelpos === "l" || edge.labelpos === "r") { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case "l": edge.x -= edge.width / 2 + edge.labeloffset; break; + case "r": edge.x += edge.width / 2 + edge.labeloffset; break; + } + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomClosed"]; }); +function reversePointsForReversedEdges(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomOpen"]; }); +function removeBorderNodes(g) { + _.forEach(g.nodes(), function(v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(_.last(node.borderLeft)); + var r = g.node(_.last(node.borderRight)); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRom"]; }); + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinearClosed"]; }); + _.forEach(g.nodes(), function(v) { + if (g.node(v).dummy === "border") { + g.removeNode(v); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinear"]; }); +function removeSelfEdges(g) { + _.forEach(g.edges(), function(e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneX"]; }); +function insertSelfEdges(g) { + var layers = util.buildLayerMatrix(g); + _.forEach(layers, function(layer) { + var orderShift = 0; + _.forEach(layer, function(v, i) { + var node = g.node(v); + node.order = i + orderShift; + _.forEach(node.selfEdges, function(selfEdge) { + util.addDummyNode(g, "selfedge", { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + (++orderShift), + e: selfEdge.e, + label: selfEdge.label + }, "_se"); + }); + delete node.selfEdges; + }); + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneY"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveNatural"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStep"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepAfter"]; }); +function positionSelfEdges(g) { + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "selfedge") { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + 2 * dx / 3, y: y - dy }, + { x: x + 5 * dx / 6, y: y - dy }, + { x: x + dx , y: y }, + { x: x + 5 * dx / 6, y: y + dy }, + { x: x + 2 * dx / 3, y: y + dy } + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepBefore"]; }); +function selectNumberAttrs(obj, attrs) { + return _.mapValues(_.pick(obj, attrs), Number); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stack"]; }); +function canonicalize(attrs) { + var newAttrs = {}; + _.forEach(attrs, function(v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetExpand"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetDiverging"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetNone"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js": +/*!****************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetSilhouette"]; }); +/* global window */ -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetWiggle"]; }); +var lodash; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAppearance"]; }); +if (true) { + try { + lodash = { + cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"), + constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), + defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), + each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), + filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), + find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"), + flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"), + forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"), + forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"), + has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), + isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), + last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"), + map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), + mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"), + max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"), + merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"), + min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"), + minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"), + now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"), + pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), + range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), + reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), + sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"), + uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"), + values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"), + zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"), + }; + } catch (e) { + // continue regardless of error + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAscending"]; }); +if (!lodash) { + lodash = window._; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderDescending"]; }); +module.exports = lodash; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderInsideOut"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderNone"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderReverse"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js": +/*!***********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeInterval"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMillisecond"]; }); +module.exports = { + run: run, + cleanup: cleanup +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMilliseconds"]; }); +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function run(g) { + var root = util.addDummyNode(g, "root", {}, "_root"); + var depths = treeDepths(g); + var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMillisecond"]; }); + g.graph().nestingRoot = root; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMilliseconds"]; }); + // Multiply minlen by nodeSep to align nodes on non-border ranks. + _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSecond"]; }); + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSeconds"]; }); + // Create border nodes and link them up + _.forEach(g.children(), function(child) { + dfs(g, root, nodeSep, weight, height, depths, child); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSecond"]; }); + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSeconds"]; }); +function dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinute"]; }); + var top = util.addBorderNode(g, "_bt"); + var bottom = util.addBorderNode(g, "_bb"); + var label = g.node(v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinutes"]; }); + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHour"]; }); + _.forEach(children, function(child) { + dfs(g, root, nodeSep, weight, height, depths, child); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHours"]; }); + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDay"]; }); + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDays"]; }); + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true + }); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeek"]; }); + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeeks"]; }); +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + _.forEach(children, function(child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + _.forEach(g.children(), function(v) { dfs(v, 1); }); + return depths; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSunday"]; }); +function sumWeights(g) { + return _.reduce(g.edges(), function(acc, e) { + return acc + g.edge(e).weight; + }, 0); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSundays"]; }); +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonday"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMondays"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesday"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js": +/*!*******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesdays"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesday"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesdays"]; }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursday"]; }); +module.exports = { + run: run, + undo: undo +}; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursdays"]; }); +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function run(g) { + g.graph().dummyChains = []; + _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFriday"]; }); +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFridays"]; }); + if (wRank === vRank + 1) return; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturday"]; }); + g.removeEdge(e); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturdays"]; }); + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, height: 0, + edgeLabel: edgeLabel, edgeObj: e, + rank: vRank + }; + dummy = util.addDummyNode(g, "edge", attrs, "_d"); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + attrs.dummy = "edge-label"; + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonth"]; }); + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonths"]; }); +function undo(g) { + _.forEach(g.graph().dummyChains, function(v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === "edge-label") { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYear"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYears"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinute"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinutes"]; }); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHour"]; }); +module.exports = addSubgraphConstraints; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHours"]; }); +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDay"]; }); + _.forEach(vs, function(v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDays"]; }); + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeek"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeeks"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSunday"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js": +/*!**************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSundays"]; }); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonday"]; }); +module.exports = barycenter; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMondays"]; }); +function barycenter(g, movable) { + return _.map(movable, function(v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = _.reduce(inV, function(acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + (edge.weight * nodeU.order), + weight: acc.weight + edge.weight + }; + }, { sum: 0, weight: 0 }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesday"]; }); + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight + }; + } + }); +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesdays"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesday"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesdays"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursday"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursdays"]; }); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFriday"]; }); +module.exports = buildLayerGraph; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFridays"]; }); +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new Graph({ compound: true }).setGraph({ root: root }) + .setDefaultNodeLabel(function(v) { return g.node(v); }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturday"]; }); + _.forEach(g.nodes(), function(v) { + var node = g.node(v), + parent = g.parent(v); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturdays"]; }); + if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { + result.setNode(v); + result.setParent(v, parent || root); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonth"]; }); + // This assumes we have only short edges! + _.forEach(g[relationship](v), function(e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !_.isUndefined(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonths"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYear"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYears"]; }); - -/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatDefaultLocale"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormat"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeParse"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcFormat"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcParse"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatLocale"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoFormat"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoParse"]; }); + if (_.has(node, "minRank")) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank] + }); + } + } + }); -/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["now"]; }); + return result; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timer"]; }); +function createRootNode(g) { + var v; + while (g.hasNode((v = _.uniqueId("_root")))); + return v; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timerFlush"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timeout"]; }); +/***/ }), -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["interval"]; }); +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js": +/*!***************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["transition"]; }); +"use strict"; -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["active"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["interrupt"]; }); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -/* harmony import */ var d3_voronoi__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-voronoi */ "./node_modules/d3-voronoi/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return d3_voronoi__WEBPACK_IMPORTED_MODULE_30__["voronoi"]; }); +module.exports = crossCount; -/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! d3-zoom */ "./node_modules/d3-zoom/src/index.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoom"]; }); +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i-1], layering[i]); + } + return cc; +} -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomTransform"]; }); +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = _.zipObject(southLayer, + _.map(southLayer, function (v, i) { return i; })); + var southEntries = _.flatten(_.map(northLayer, function(v) { + return _.sortBy(_.map(g.outEdges(v), function(e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), "pos"); + }), true); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomIdentity"]; }); + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = _.map(new Array(treeSize), function() { return 0; }); + // Calculate the weighted crossings + var cc = 0; + _.forEach(southEntries.forEach(function(entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + while (index > 0) { + if (index % 2) { + weightSum += tree[index + 1]; + } + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + })); + return cc; +} +/***/ }), +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js": +/*!*********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js"); +var crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js"); +var sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js"); +var buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js"); +var addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js"); +var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +module.exports = order; +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util.maxRank(g), + downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"), + upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges"); + var layering = initOrder(g); + assignOrder(g, layering); + var bestCC = Number.POSITIVE_INFINITY, + best; + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + layering = util.buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = _.cloneDeep(layering); + bestCC = cc; + } + } + assignOrder(g, best); +} +function buildLayerGraphs(g, ranks, relationship) { + return _.map(ranks, function(rank) { + return buildLayerGraph(g, rank, relationship); + }); +} +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new Graph(); + _.forEach(layerGraphs, function(lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + _.forEach(sorted.vs, function(v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} +function assignOrder(g, layering) { + _.forEach(layering, function(layer) { + _.forEach(layer, function(v, i) { + g.node(v).order = i; + }); + }); +} +/***/ }), +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js": +/*!**************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +module.exports = initOrder; +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = _.filter(g.nodes(), function(v) { + return !g.children(v).length; + }); + var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })); + var layers = _.map(_.range(maxRank + 1), function() { return []; }); + function dfs(v) { + if (_.has(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + _.forEach(g.successors(v), dfs); + } + var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); + _.forEach(orderedVs, dfs); + return layers; +} +/***/ }), +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -/***/ }), +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -/***/ "./node_modules/dagre-d3/index.js": -/*!****************************************!*\ - !*** ./node_modules/dagre-d3/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +module.exports = resolveConflicts; -/** - * @license - * Copyright (c) 2012-2013 Chris Pettitt +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * Pre-conditions: * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. */ -module.exports = { - graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre-d3/lib/graphlib.js"), - dagre: __webpack_require__(/*! ./lib/dagre */ "./node_modules/dagre-d3/lib/dagre.js"), - intersect: __webpack_require__(/*! ./lib/intersect */ "./node_modules/dagre-d3/lib/intersect/index.js"), - render: __webpack_require__(/*! ./lib/render */ "./node_modules/dagre-d3/lib/render.js"), - util: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/lib/util.js"), - version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre-d3/lib/version.js") -}; +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + _.forEach(entries, function(entry, i) { + var tmp = mappedEntries[entry.v] = { + indegree: 0, + "in": [], + out: [], + vs: [entry.v], + i: i + }; + if (!_.isUndefined(entry.barycenter)) { + tmp.barycenter = entry.barycenter; + tmp.weight = entry.weight; + } + }); + _.forEach(cg.edges(), function(e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); -/***/ }), + var sourceSet = _.filter(mappedEntries, function(entry) { + return !entry.indegree; + }); -/***/ "./node_modules/dagre-d3/lib/arrows.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre-d3/lib/arrows.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return doResolveConflicts(sourceSet); +} -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); +function doResolveConflicts(sourceSet) { + var entries = []; -module.exports = { - "default": normal, - "normal": normal, - "vee": vee, - "undirected": undirected -}; + function handleIn(vEntry) { + return function(uEntry) { + if (uEntry.merged) { + return; + } + if (_.isUndefined(uEntry.barycenter) || + _.isUndefined(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter) { + mergeEntries(vEntry, uEntry); + } + }; + } -function normal(parent, id, edge, type) { - var marker = parent.append("marker") - .attr("id", id) - .attr("viewBox", "0 0 10 10") - .attr("refX", 9) - .attr("refY", 5) - .attr("markerUnits", "strokeWidth") - .attr("markerWidth", 8) - .attr("markerHeight", 6) - .attr("orient", "auto"); + function handleOut(vEntry) { + return function(wEntry) { + wEntry["in"].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } - var path = marker.append("path") - .attr("d", "M 0 0 L 10 5 L 0 10 z") - .style("stroke-width", 1) - .style("stroke-dasharray", "1,0"); - util.applyStyle(path, edge[type + "Style"]); - if (edge[type + "Class"]) { - path.attr("class", edge[type + "Class"]); + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + _.forEach(entry["in"].reverse(), handleIn(entry)); + _.forEach(entry.out, handleOut(entry)); } -} -function vee(parent, id, edge, type) { - var marker = parent.append("marker") - .attr("id", id) - .attr("viewBox", "0 0 10 10") - .attr("refX", 9) - .attr("refY", 5) - .attr("markerUnits", "strokeWidth") - .attr("markerWidth", 8) - .attr("markerHeight", 6) - .attr("orient", "auto"); + return _.map(_.filter(entries, function(entry) { return !entry.merged; }), + function(entry) { + return _.pick(entry, ["vs", "i", "barycenter", "weight"]); + }); - var path = marker.append("path") - .attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z") - .style("stroke-width", 1) - .style("stroke-dasharray", "1,0"); - util.applyStyle(path, edge[type + "Style"]); - if (edge[type + "Class"]) { - path.attr("class", edge[type + "Class"]); - } } -function undirected(parent, id, edge, type) { - var marker = parent.append("marker") - .attr("id", id) - .attr("viewBox", "0 0 10 10") - .attr("refX", 9) - .attr("refY", 5) - .attr("markerUnits", "strokeWidth") - .attr("markerWidth", 8) - .attr("markerHeight", 6) - .attr("orient", "auto"); +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; - var path = marker.append("path") - .attr("d", "M 0 5 L 10 5") - .style("stroke-width", 1) - .style("stroke-dasharray", "1,0"); - util.applyStyle(path, edge[type + "Style"]); - if (edge[type + "Class"]) { - path.attr("class", edge[type + "Class"]); + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/create-clusters.js": -/*!******************************************************!*\ - !*** ./node_modules/dagre-d3/lib/create-clusters.js ***! - \******************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); - -module.exports = createClusters; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js"); +var resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js"); +var sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js"); -function createClusters(selection, g) { - var clusters = g.nodes().filter(function(v) { return util.isSubgraph(g, v); }); - var svgClusters = selection.selectAll("g.cluster") - .data(clusters, function(v) { return v; }); +module.exports = sortSubgraph; - svgClusters.selectAll("*").remove(); - svgClusters.enter().append("g") - .attr("class", "cluster") - .attr("id",function(v){ - var node = g.node(v); - return node.id; - }) - .style("opacity", 0); - - svgClusters = selection.selectAll("g.cluster"); +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight: undefined; + var subgraphs = {}; - util.applyTransition(svgClusters, g) - .style("opacity", 1); + if (bl) { + movable = _.filter(movable, function(w) { + return w !== bl && w !== br; + }); + } - svgClusters.each(function(v) { - var node = g.node(v); - var thisGroup = d3.select(this); - d3.select(this).append("rect"); - var labelGroup = thisGroup.append("g").attr("class", "label"); - addLabel(labelGroup, node, node.clusterLabelPos); + var barycenters = barycenter(g, movable); + _.forEach(barycenters, function(entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (_.has(subgraphResult, "barycenter")) { + mergeBarycenters(entry, subgraphResult); + } + } }); - svgClusters.selectAll("rect").each(function(c) { - var node = g.node(c); - var domCluster = d3.select(this); - util.applyStyle(domCluster, node.style); - }); + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); - var exitSelection; + var result = sort(entries, biasRight); - if (svgClusters.exit) { - exitSelection = svgClusters.exit(); - } else { - exitSelection = svgClusters.selectAll(null); // empty selection + if (bl) { + result.vs = _.flatten([bl, result.vs, br], true); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!_.has(result, "barycenter")) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = (result.barycenter * result.weight + + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } } - util.applyTransition(exitSelection, g) - .style("opacity", 0) - .remove(); + return result; +} - return svgClusters; +function expandSubgraphs(entries, subgraphs) { + _.forEach(entries, function(entry) { + entry.vs = _.flatten(entry.vs.map(function(v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }), true); + }); +} + +function mergeBarycenters(target, other) { + if (!_.isUndefined(target.barycenter)) { + target.barycenter = (target.barycenter * target.weight + + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } } /***/ }), -/***/ "./node_modules/dagre-d3/lib/create-edge-labels.js": -/*!*********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/create-edge-labels.js ***! - \*********************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js": +/*!********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - -module.exports = createEdgeLabels; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -function createEdgeLabels(selection, g) { - var svgEdgeLabels = selection.selectAll("g.edgeLabel") - .data(g.edges(), function(e) { return util.edgeToId(e); }) - .classed("update", true); +module.exports = sort; - svgEdgeLabels.exit().remove(); - svgEdgeLabels.enter().append("g") - .classed("edgeLabel", true) - .style("opacity", 0); +function sort(entries, biasRight) { + var parts = util.partition(entries, function(entry) { + return _.has(entry, "barycenter"); + }); + var sortable = parts.lhs, + unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; - svgEdgeLabels = selection.selectAll("g.edgeLabel"); + sortable.sort(compareWithBias(!!biasRight)); - svgEdgeLabels.each(function(e) { - var root = d3.select(this); - root.select(".label").remove(); - var edge = g.edge(e); - var label = addLabel(root, g.edge(e), 0, 0).classed("label", true); - var bbox = label.node().getBBox(); + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - if (edge.labelId) { label.attr("id", edge.labelId); } - if (!_.has(edge, "width")) { edge.width = bbox.width; } - if (!_.has(edge, "height")) { edge.height = bbox.height; } + _.forEach(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); }); - var exitSelection; + var result = { vs: _.flatten(vs, true) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} - if (svgEdgeLabels.exit) { - exitSelection = svgEdgeLabels.exit(); - } else { - exitSelection = svgEdgeLabels.selectAll(null); // empty selection +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = _.last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; } + return index; +} - util.applyTransition(exitSelection, g) - .style("opacity", 0) - .remove(); +function compareWithBias(bias) { + return function(entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } - return svgEdgeLabels; + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/create-edge-paths.js": -/*!********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/create-edge-paths.js ***! - \********************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +module.exports = parentDummyChains; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -var intersectNode = __webpack_require__(/*! ./intersect/intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -module.exports = createEdgePaths; +function parentDummyChains(g) { + var postorderNums = postorder(g); -function createEdgePaths(selection, g, arrows) { - var previousPaths = selection.selectAll("g.edgePath") - .data(g.edges(), function(e) { return util.edgeToId(e); }) - .classed("update", true); + _.forEach(g.graph().dummyChains, function(v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; - var newPaths = enter(previousPaths, g); - exit(previousPaths, g); + while (v !== edgeObj.w) { + node = g.node(v); - var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths; - util.applyTransition(svgPaths, g) - .style("opacity", 1); + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && + g.node(pathV).maxRank < node.rank) { + pathIdx++; + } - // Save DOM element in the path group, and set ID and class - svgPaths.each(function(e) { - var domEdge = d3.select(this); - var edge = g.edge(e); - edge.elem = this; + if (pathV === lca) { + ascending = false; + } + } - if (edge.id) { - domEdge.attr("id", edge.id); - } + if (!ascending) { + while (pathIdx < path.length - 1 && + g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { + pathIdx++; + } + pathV = path[pathIdx]; + } - util.applyClass(domEdge, edge["class"], - (domEdge.classed("update") ? "update " : "") + "edgePath"); + g.setParent(v, pathV); + v = g.successors(v)[0]; + } }); - - svgPaths.selectAll("path.path") - .each(function(e) { - var edge = g.edge(e); - edge.arrowheadId = _.uniqueId("arrowhead"); - - var domEdge = d3.select(this) - .attr("marker-end", function() { - return "url(" + makeFragmentRef(location.href, edge.arrowheadId) + ")"; - }) - .style("fill", "none"); - - util.applyTransition(domEdge, g) - .attr("d", function(e) { return calcPoints(g, e); }); - - util.applyStyle(domEdge, edge.style); - }); - - svgPaths.selectAll("defs *").remove(); - svgPaths.selectAll("defs") - .each(function(e) { - var edge = g.edge(e); - var arrowhead = arrows[edge.arrowhead]; - arrowhead(d3.select(this), edge.arrowheadId, edge, "arrowhead"); - }); - - return svgPaths; -} - -function makeFragmentRef(url, fragmentId) { - var baseUrl = url.split("#")[0]; - return baseUrl + "#" + fragmentId; } -function calcPoints(g, e) { - var edge = g.edge(e); - var tail = g.node(e.v); - var head = g.node(e.w); - var points = edge.points.slice(1, edge.points.length - 1); - points.unshift(intersectNode(tail, points[0])); - points.push(intersectNode(head, points[points.length - 1])); +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; - return createLine(edge, points); -} + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && + (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; -function createLine(edge, points) { - var line = (d3.line || d3.svg.line)() - .x(function(d) { return d.x; }) - .y(function(d) { return d.y; }); - - (line.curve || line.interpolate)(edge.curve); + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } - return line(points); + return { path: vPath.concat(wPath.reverse()), lca: lca }; } -function getCoords(elem) { - var bbox = elem.getBBox(); - var matrix = elem.ownerSVGElement.getScreenCTM() - .inverse() - .multiply(elem.getScreenCTM()) - .translate(bbox.width / 2, bbox.height / 2); - return { x: matrix.e, y: matrix.f }; -} +function postorder(g) { + var result = {}; + var lim = 0; -function enter(svgPaths, g) { - var svgPathsEnter = svgPaths.enter().append("g") - .attr("class", "edgePath") - .style("opacity", 0); - svgPathsEnter.append("path") - .attr("class", "path") - .attr("d", function(e) { - var edge = g.edge(e); - var sourceElem = g.node(e.v).elem; - var points = _.range(edge.points.length).map(function() { return getCoords(sourceElem); }); - return createLine(edge, points); - }); - svgPathsEnter.append("defs"); - return svgPathsEnter; -} + function dfs(v) { + var low = lim; + _.forEach(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + _.forEach(g.children(), dfs); -function exit(svgPaths, g) { - var svgPathExit = svgPaths.exit(); - util.applyTransition(svgPathExit, g) - .style("opacity", 0) - .remove(); + return result; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/create-nodes.js": -/*!***************************************************!*\ - !*** ./node_modules/dagre-d3/lib/create-nodes.js ***! - \***************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js": +/*!*********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - -module.exports = createNodes; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -function createNodes(selection, g, shapes) { - var simpleNodes = g.nodes().filter(function(v) { return !util.isSubgraph(g, v); }); - var svgNodes = selection.selectAll("g.node") - .data(simpleNodes, function(v) { return v; }) - .classed("update", true); +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ - svgNodes.exit().remove(); +module.exports = { + positionX: positionX, + findType1Conflicts: findType1Conflicts, + findType2Conflicts: findType2Conflicts, + addConflict: addConflict, + hasConflict: hasConflict, + verticalAlignment: verticalAlignment, + horizontalCompaction: horizontalCompaction, + alignCoordinates: alignCoordinates, + findSmallestWidthAlignment: findSmallestWidthAlignment, + balance: balance +}; - svgNodes.enter().append("g") - .attr("class", "node") - .style("opacity", 0); +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; - svgNodes = selection.selectAll("g.node"); + function visitLayer(prevLayer, layer) { + var + // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = _.last(layer); - svgNodes.each(function(v) { - var node = g.node(v); - var thisGroup = d3.select(this); - util.applyClass(thisGroup, node["class"], - (thisGroup.classed("update") ? "update " : "") + "node"); + _.forEach(layer, function(v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; - thisGroup.select("g.label").remove(); - var labelGroup = thisGroup.append("g").attr("class", "label"); - var labelDom = addLabel(labelGroup, node); - var shape = shapes[node.shape]; - var bbox = _.pick(labelDom.node().getBBox(), "width", "height"); + if (w || v === lastNode) { + _.forEach(layer.slice(scanPos, i +1), function(scanNode) { + _.forEach(g.predecessors(scanNode), function(u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && + !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + scanPos = i + 1; + k0 = k1; + } + }); - node.elem = this; + return layer; + } - if (node.id) { thisGroup.attr("id", node.id); } - if (node.labelId) { labelGroup.attr("id", node.labelId); } + _.reduce(layering, visitLayer); + return conflicts; +} - if (_.has(node, "width")) { bbox.width = node.width; } - if (_.has(node, "height")) { bbox.height = node.height; } +function findType2Conflicts(g, layering) { + var conflicts = {}; - bbox.width += node.paddingLeft + node.paddingRight; - bbox.height += node.paddingTop + node.paddingBottom; - labelGroup.attr("transform", "translate(" + - ((node.paddingLeft - node.paddingRight) / 2) + "," + - ((node.paddingTop - node.paddingBottom) / 2) + ")"); + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + _.forEach(_.range(southPos, southEnd), function(i) { + v = south[i]; + if (g.node(v).dummy) { + _.forEach(g.predecessors(v), function(u) { + var uNode = g.node(u); + if (uNode.dummy && + (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } - var root = d3.select(this); - root.select(".label-container").remove(); - var shapeSvg = shape(root, bbox, node).classed("label-container", true); - util.applyStyle(shapeSvg, node.style); - var shapeBBox = shapeSvg.node().getBBox(); - node.width = shapeBBox.width; - node.height = shapeBBox.height; - }); + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; - var exitSelection; + _.forEach(south, function(v, southLookahead) { + if (g.node(v).dummy === "border") { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); - if (svgNodes.exit) { - exitSelection = svgNodes.exit(); - } else { - exitSelection = svgNodes.selectAll(null); // empty selection + return south; } - util.applyTransition(exitSelection, g) - .style("opacity", 0) - .remove(); - - return svgNodes; + _.reduce(layering, visitLayer); + return conflicts; } +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return _.find(g.predecessors(v), function(u) { + return g.node(u).dummy; + }); + } +} -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/d3.js": -/*!*****************************************!*\ - !*** ./node_modules/dagre-d3/lib/d3.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Stub to get D3 either via NPM or from the global object -var d3; +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } -if (!d3) { - if (true) { - try { - d3 = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); - } - catch (e) { - // continue regardless of error - } + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; } + conflictsV[w] = true; } -if (!d3) { - d3 = window.d3; +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return _.has(conflicts[v], w); } -module.exports = d3; +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + _.forEach(layering, function(layer) { + _.forEach(layer, function(v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); -/***/ }), + _.forEach(layering, function(layer) { + var prevIdx = -1; + _.forEach(layer, function(v) { + var ws = neighborFn(v); + if (ws.length) { + ws = _.sortBy(ws, function(w) { return pos[w]; }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && + prevIdx < pos[w] && + !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); -/***/ "./node_modules/dagre-d3/lib/dagre.js": -/*!********************************************!*\ - !*** ./node_modules/dagre-d3/lib/dagre.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return { root: root, align: align }; +} -/* global window */ +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? "borderLeft" : "borderRight"; -var dagre; + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } -if (true) { - try { - dagre = __webpack_require__(/*! dagre */ "./node_modules/dagre-d3/node_modules/dagre/index.js"); - } catch (e) { - // continue regardless of error + elem = stack.pop(); + } } -} -if (!dagre) { - dagre = window.dagre; + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function(acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + _.forEach(align, function(v) { + xs[v] = xs[root[v]]; + }); + + return xs; } -module.exports = dagre; +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new Graph(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); -/***/ }), + _.forEach(layering, function(layer) { + var u; + _.forEach(layer, function(v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); -/***/ "./node_modules/dagre-d3/lib/graphlib.js": -/*!***********************************************!*\ - !*** ./node_modules/dagre-d3/lib/graphlib.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return blockGraph; +} -/* global window */ +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return _.minBy(_.values(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; -var graphlib; + _.forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; -if (true) { - try { - graphlib = __webpack_require__(/*! graphlib */ "./node_modules/dagre-d3/node_modules/graphlib/index.js"); - } - catch (e) { - // continue regardless of error - } + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); } -if (!graphlib) { - graphlib = window.graphlib; +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = _.values(alignTo), + alignToMin = _.min(alignToVals), + alignToMax = _.max(alignToVals); + + _.forEach(["u", "d"], function(vert) { + _.forEach(["l", "r"], function(horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = _.values(xs); + delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); + + if (delta) { + xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); + } + }); + }); } -module.exports = graphlib; +function balance(xss, align) { + return _.mapValues(xss.ul, function(ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = _.sortBy(_.map(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} +function positionX(g) { + var layering = util.buildLayerMatrix(g); + var conflicts = _.merge( + findType1Conflicts(g, layering), + findType2Conflicts(g, layering)); -/***/ }), + var xss = {}; + var adjustedLayering; + _.forEach(["u", "d"], function(vert) { + adjustedLayering = vert === "u" ? layering : _.values(layering).reverse(); + _.forEach(["l", "r"], function(horiz) { + if (horiz === "r") { + adjustedLayering = _.map(adjustedLayering, function(inner) { + return _.values(inner).reverse(); + }); + } -/***/ "./node_modules/dagre-d3/lib/intersect/index.js": -/*!******************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/index.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, + align.root, align.align, horiz === "r"); + if (horiz === "r") { + xs = _.mapValues(xs, function(x) { return -x; }); + } + xss[vert + horiz] = xs; + }); + }); -module.exports = { - node: __webpack_require__(/*! ./intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js"), - circle: __webpack_require__(/*! ./intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js"), - ellipse: __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"), - polygon: __webpack_require__(/*! ./intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js"), - rect: __webpack_require__(/*! ./intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js") -}; + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} +function sep(nodeSep, edgeSep, reverseSep) { + return function(g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; -/***/ }), + sum += vLabel.width / 2; + if (_.has(vLabel, "labelpos")) { + switch (vLabel.labelpos.toLowerCase()) { + case "l": delta = -vLabel.width / 2; break; + case "r": delta = vLabel.width / 2; break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js": -/*!*****************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-circle.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; -var intersectEllipse = __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"); + sum += wLabel.width / 2; + if (_.has(wLabel, "labelpos")) { + switch (wLabel.labelpos.toLowerCase()) { + case "l": delta = wLabel.width / 2; break; + case "r": delta = -wLabel.width / 2; break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; -module.exports = intersectCircle; + return sum; + }; +} -function intersectCircle(node, rx, point) { - return intersectEllipse(node, rx, rx, point); +function width(g, v) { + return g.node(v).width; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js ***! - \******************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js": +/*!************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js ***! + \************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = intersectEllipse; +"use strict"; -function intersectEllipse(node, rx, ry, point) { - // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html - var cx = node.x; - var cy = node.y; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +var positionX = __webpack_require__(/*! ./bk */ "./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js").positionX; - var px = cx - point.x; - var py = cy - point.y; +module.exports = position; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); +function position(g) { + g = util.asNonCompoundGraph(g); - var dx = Math.abs(rx * ry * px / det); - if (point.x < cx) { - dx = -dx; - } - var dy = Math.abs(rx * ry * py / det); - if (point.y < cy) { - dy = -dy; - } + positionY(g); + _.forEach(positionX(g), function(x, v) { + g.node(v).x = x; + }); +} - return {x: cx + dx, y: cy + dy}; +function positionY(g) { + var layering = util.buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + _.forEach(layering, function(layer) { + var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); + _.forEach(layer, function(v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); } /***/ }), -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-line.js": -/*!***************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-line.js ***! - \***************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js": +/*!****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js ***! + \****************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = intersectLine; - -/* - * Returns the point at which two lines, p and q, intersect or returns - * undefined if they do not intersect. - */ -function intersectLine(p1, p2, q1, q2) { - // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, - // p7 and p473. - - var a1, a2, b1, b2, c1, c2; - var r1, r2 , r3, r4; - var denom, offset, num; - var x, y; +/***/ (function(module, exports, __webpack_require__) { - // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + - // b1 y + c1 = 0. - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = (p2.x * p1.y) - (p1.x * p2.y); +"use strict"; - // Compute r3 and r4. - r3 = ((a1 * q1.x) + (b1 * q1.y) + c1); - r4 = ((a1 * q2.x) + (b1 * q2.y) + c1); - // Check signs of r3 and r4. If both point 3 and point 4 lie on - // same side of line 1, the line segments do not intersect. - if ((r3 !== 0) && (r4 !== 0) && sameSign(r3, r4)) { - return /*DONT_INTERSECT*/; - } +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").slack; - // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = (q2.x * q1.y) - (q1.x * q2.y); +module.exports = feasibleTree; - // Compute r1 and r2 - r1 = (a2 * p1.x) + (b2 * p1.y) + c2; - r2 = (a2 * p2.x) + (b2 * p2.y) + c2; +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new Graph({ directed: false }); - // Check signs of r1 and r2. If both point 1 and point 2 lie - // on same side of second line segment, the line segments do - // not intersect. - if ((r1 !== 0) && (r2 !== 0) && (sameSign(r1, r2))) { - return /*DONT_INTERSECT*/; - } + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); - // Line segments intersect: compute intersection point. - denom = (a1 * b2) - (a2 * b1); - if (denom === 0) { - return /*COLLINEAR*/; + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); } - offset = Math.abs(denom / 2); + return t; +} - // The denom/2 is to get rounding instead of truncating. It - // is added or subtracted to the numerator, depending upon the - // sign of the numerator. - num = (b1 * c2) - (b2 * c1); - x = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom); +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + _.forEach(g.nodeEdges(v), function(e) { + var edgeV = e.v, + w = (v === edgeV) ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } - num = (a2 * c1) - (a1 * c2); - y = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom); + _.forEach(t.nodes(), dfs); + return t.nodeCount(); +} - return { x: x, y: y }; +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return _.minBy(g.edges(), function(e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); } -function sameSign(r1, r2) { - return r1 * r2 > 0; +function shiftRanks(t, g, delta) { + _.forEach(t.nodes(), function(v) { + g.node(v).rank += delta; + }); } /***/ }), -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-node.js": -/*!***************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-node.js ***! - \***************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js": +/*!********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js ***! + \********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = intersectNode; - -function intersectNode(node, point) { - return node.intersect(point); -} +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -/***/ }), -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-polygon.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* eslint "no-console": off */ - -var intersectLine = __webpack_require__(/*! ./intersect-line */ "./node_modules/dagre-d3/lib/intersect/intersect-line.js"); +var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js"); +var longestPath = rankUtil.longestPath; +var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js"); +var networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js"); -module.exports = intersectPolygon; +module.exports = rank; /* - * Returns the point ({x, y}) at which the point argument intersects with the - * node argument assuming that it has the shape specified by polygon. + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. */ -function intersectPolygon(node, polyPoints, point) { - var x1 = node.x; - var y1 = node.y; - - var intersections = []; - - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; - polyPoints.forEach(function(entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; - - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect = intersectLine(node, point, - {x: left + p1.x, y: top + p1.y}, {x: left + p2.x, y: top + p2.y}); - if (intersect) { - intersections.push(intersect); - } - } - - if (!intersections.length) { - console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", node); - return node; - } - - if (intersections.length > 1) { - // More intersections, find the one nearest to edge end point - intersections.sort(function(p, q) { - var pdx = p.x - point.x; - var pdy = p.y - point.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - - var qdx = q.x - point.x; - var qdy = q.y - point.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - - return (distp < distq) ? -1 : (distp === distq ? 0 : 1); - }); +function rank(g) { + switch(g.graph().ranker) { + case "network-simplex": networkSimplexRanker(g); break; + case "tight-tree": tightTreeRanker(g); break; + case "longest-path": longestPathRanker(g); break; + default: networkSimplexRanker(g); } - return intersections[0]; } +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js": -/*!***************************************************************!*\ - !*** ./node_modules/dagre-d3/lib/intersect/intersect-rect.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = intersectRect; - -function intersectRect(node, point) { - var x = node.x; - var y = node.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = node.width / 2; - var h = node.height / 2; - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} - return {x: x + sx, y: y + sy}; +function networkSimplexRanker(g) { + networkSimplex(g); } /***/ }), -/***/ "./node_modules/dagre-d3/lib/label/add-html-label.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/label/add-html-label.js ***! - \***********************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js": +/*!******************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); - -module.exports = addHtmlLabel; +"use strict"; -function addHtmlLabel(root, node) { - var fo = root - .append("foreignObject") - .attr("width", "100000"); - var div = fo - .append("xhtml:div"); - div.attr("xmlns", "http://www.w3.org/1999/xhtml"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js"); +var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").slack; +var initRank = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").longestPath; +var preorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").alg.preorder; +var postorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").alg.postorder; +var simplify = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").simplify; - var label = node.label; - switch(typeof label) { - case "function": - div.insert(label); - break; - case "object": - // Currently we assume this is a DOM object. - div.insert(function() { return label; }); - break; - default: div.html(label); - } +module.exports = networkSimplex; - util.applyStyle(div, node.labelStyle); - div.style("display", "inline-block"); - // Fix for firefox - div.style("white-space", "nowrap"); +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; - var client = div.node().getBoundingClientRect(); - fo - .attr("width", client.width) - .attr("height", client.height); +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + initRank(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); - return fo; + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } } +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + _.forEach(vs, function(v) { + assignCutValue(t, g, v); + }); +} -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/label/add-label.js": -/*!******************************************************!*\ - !*** ./node_modules/dagre-d3/lib/label/add-label.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var addTextLabel = __webpack_require__(/*! ./add-text-label */ "./node_modules/dagre-d3/lib/label/add-text-label.js"); -var addHtmlLabel = __webpack_require__(/*! ./add-html-label */ "./node_modules/dagre-d3/lib/label/add-html-label.js"); -var addSVGLabel = __webpack_require__(/*! ./add-svg-label */ "./node_modules/dagre-d3/lib/label/add-svg-label.js"); - -module.exports = addLabel; - -function addLabel(root, node, location) { - var label = node.label; - var labelSvg = root.append("g"); +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} - // Allow the label to be a string, a function that returns a DOM element, or - // a DOM element itself. - if (node.labelType === "svg") { - addSVGLabel(labelSvg, node); - } else if (typeof label !== "string" || node.labelType === "html") { - addHtmlLabel(labelSvg, node); - } else { - addTextLabel(labelSvg, node); - } +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; - var labelBBox = labelSvg.node().getBBox(); - var y; - switch(location) { - case "top": - y = (-node.height / 2); - break; - case "bottom": - y = (node.height / 2) - labelBBox.height; - break; - default: - y = (-labelBBox.height / 2); + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); } - labelSvg.attr( - "transform", - "translate(" + (-labelBBox.width / 2) + "," + y + ")"); - return labelSvg; -} + cutValue = graphEdge.weight; + _.forEach(g.nodeEdges(child), function(e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; -/***/ }), + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; -/***/ "./node_modules/dagre-d3/lib/label/add-svg-label.js": -/*!**********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/label/add-svg-label.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); + return cutValue; +} -module.exports = addSVGLabel; +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} -function addSVGLabel(root, node) { - var domNode = root; +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); - domNode.node().appendChild(node.label); + visited[v] = true; + _.forEach(tree.neighbors(v), function(w) { + if (!_.has(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); - util.applyStyle(domNode, node.labelStyle); + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } - return domNode; + return nextLim; } +function leaveEdge(tree) { + return _.find(tree.edges(), function(e) { + return tree.edge(e).cutvalue < 0; + }); +} -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/label/add-text-label.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/label/add-text-label.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js"); +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; -module.exports = addTextLabel; + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } -/* - * Attaches a text label to the specified root. Handles escape sequences. - */ -function addTextLabel(root, node) { - var domNode = root.append("text"); + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; - var lines = processEscapeSequences(node.label).split("\n"); - for (var i = 0; i < lines.length; i++) { - domNode.append("tspan") - .attr("xml:space", "preserve") - .attr("dy", "1em") - .attr("x", "1") - .text(lines[i]); + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; } - util.applyStyle(domNode, node.labelStyle); + var candidates = _.filter(g.edges(), function(edge) { + return flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel); + }); - return domNode; + return _.minBy(candidates, function(edge) { return slack(g, edge); }); } -function processEscapeSequences(text) { - var newText = ""; - var escaped = false; - var ch; - for (var i = 0; i < text.length; ++i) { - ch = text[i]; - if (escaped) { - switch(ch) { - case "n": newText += "\n"; break; - default: newText += ch; - } - escaped = false; - } else if (ch === "\\") { - escaped = true; - } else { - newText += ch; - } - } - return newText; +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); } +function updateRanks(t, g) { + var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }); + var vs = preorder(t, root); + vs = vs.slice(1); + _.forEach(vs, function(v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/lodash.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre-d3/lib/lodash.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* global window */ - -var lodash; + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } -if (true) { - try { - lodash = { - defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), - each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), - isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), - isPlainObject: __webpack_require__(/*! lodash/isPlainObject */ "./node_modules/lodash/isPlainObject.js"), - pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), - has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), - range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), - uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js") - }; - } - catch (e) { - // continue regardless of error - } + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); } -if (!lodash) { - lodash = window._; +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); } -module.exports = lodash; +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} /***/ }), -/***/ "./node_modules/dagre-d3/lib/position-clusters.js": -/*!********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/position-clusters.js ***! - \********************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js": +/*!*******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - -module.exports = positionClusters; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -function positionClusters(selection, g) { - var created = selection.filter(function() { return !d3.select(this).classed("update"); }); - - function translate(v) { - var node = g.node(v); - return "translate(" + node.x + "," + node.y + ")"; - } - - created.attr("transform", translate); - - util.applyTransition(selection, g) - .style("opacity", 1) - .attr("transform", translate); - - util.applyTransition(created.selectAll("rect"), g) - .attr("width", function(v) { return g.node(v).width; }) - .attr("height", function(v) { return g.node(v).height; }) - .attr("x", function(v) { - var node = g.node(v); - return -node.width / 2; - }) - .attr("y", function(v) { - var node = g.node(v); - return -node.height / 2; - }); -} - - -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/position-edge-labels.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre-d3/lib/position-edge-labels.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +module.exports = { + longestPath: longestPath, + slack: slack +}; +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); + function dfs(v) { + var label = g.node(v); + if (_.has(visited, v)) { + return label.rank; + } + visited[v] = true; -module.exports = positionEdgeLabels; + var rank = _.min(_.map(g.outEdges(v), function(e) { + return dfs(e.w) - g.edge(e).minlen; + })); -function positionEdgeLabels(selection, g) { - var created = selection.filter(function() { return !d3.select(this).classed("update"); }); + if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null) { // return value of _.map([null]) + rank = 0; + } - function translate(e) { - var edge = g.edge(e); - return _.has(edge, "x") ? "translate(" + edge.x + "," + edge.y + ")" : ""; + return (label.rank = rank); } - created.attr("transform", translate); + _.forEach(g.sources(), dfs); +} - util.applyTransition(selection, g) - .style("opacity", 1) - .attr("transform", translate); +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/position-nodes.js": -/*!*****************************************************!*\ - !*** ./node_modules/dagre-d3/lib/position-nodes.js ***! - \*****************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js": +/*!**************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/util.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* eslint "no-console": off */ -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); - -module.exports = positionNodes; -function positionNodes(selection, g) { - var created = selection.filter(function() { return !d3.select(this).classed("update"); }); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; - function translate(v) { - var node = g.node(v); - return "translate(" + node.x + "," + node.y + ")"; - } +module.exports = { + addDummyNode: addDummyNode, + simplify: simplify, + asNonCompoundGraph: asNonCompoundGraph, + successorWeights: successorWeights, + predecessorWeights: predecessorWeights, + intersectRect: intersectRect, + buildLayerMatrix: buildLayerMatrix, + normalizeRanks: normalizeRanks, + removeEmptyRanks: removeEmptyRanks, + addBorderNode: addBorderNode, + maxRank: maxRank, + partition: partition, + time: time, + notime: notime +}; - created.attr("transform", translate); +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = _.uniqueId(name); + } while (g.hasNode(v)); - util.applyTransition(selection, g) - .style("opacity", 1) - .attr("transform", translate); + attrs.dummy = type; + g.setNode(v, attrs); + return v; } +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new Graph().setGraph(g.graph()); + _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); + _.forEach(g.edges(), function(e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen) + }); + }); + return simplified; +} -/***/ }), - -/***/ "./node_modules/dagre-d3/lib/render.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre-d3/lib/render.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); -var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js"); -var layout = __webpack_require__(/*! ./dagre */ "./node_modules/dagre-d3/lib/dagre.js").layout; - -module.exports = render; - -// This design is based on http://bost.ocks.org/mike/chart/. -function render() { - var createNodes = __webpack_require__(/*! ./create-nodes */ "./node_modules/dagre-d3/lib/create-nodes.js"); - var createClusters = __webpack_require__(/*! ./create-clusters */ "./node_modules/dagre-d3/lib/create-clusters.js"); - var createEdgeLabels = __webpack_require__(/*! ./create-edge-labels */ "./node_modules/dagre-d3/lib/create-edge-labels.js"); - var createEdgePaths = __webpack_require__(/*! ./create-edge-paths */ "./node_modules/dagre-d3/lib/create-edge-paths.js"); - var positionNodes = __webpack_require__(/*! ./position-nodes */ "./node_modules/dagre-d3/lib/position-nodes.js"); - var positionEdgeLabels = __webpack_require__(/*! ./position-edge-labels */ "./node_modules/dagre-d3/lib/position-edge-labels.js"); - var positionClusters = __webpack_require__(/*! ./position-clusters */ "./node_modules/dagre-d3/lib/position-clusters.js"); - var shapes = __webpack_require__(/*! ./shapes */ "./node_modules/dagre-d3/lib/shapes.js"); - var arrows = __webpack_require__(/*! ./arrows */ "./node_modules/dagre-d3/lib/arrows.js"); - - var fn = function(svg, g) { - preProcessGraph(g); - - var outputGroup = createOrSelectGroup(svg, "output"); - var clustersGroup = createOrSelectGroup(outputGroup, "clusters"); - var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths"); - var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g); - var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes); - - layout(g); - - positionNodes(nodes, g); - positionEdgeLabels(edgeLabels, g); - createEdgePaths(edgePathsGroup, g, arrows); - - var clusters = createClusters(clustersGroup, g); - positionClusters(clusters, g); - - postProcessGraph(g); - }; +function asNonCompoundGraph(g) { + var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + _.forEach(g.nodes(), function(v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + _.forEach(g.edges(), function(e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} - fn.createNodes = function(value) { - if (!arguments.length) return createNodes; - createNodes = value; - return fn; - }; +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function(v) { + var sucs = {}; + _.forEach(g.outEdges(v), function(e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} - fn.createClusters = function(value) { - if (!arguments.length) return createClusters; - createClusters = value; - return fn; - }; +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function(v) { + var preds = {}; + _.forEach(g.inEdges(v), function(e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} - fn.createEdgeLabels = function(value) { - if (!arguments.length) return createEdgeLabels; - createEdgeLabels = value; - return fn; - }; +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; - fn.createEdgePaths = function(value) { - if (!arguments.length) return createEdgePaths; - createEdgePaths = value; - return fn; - }; + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; - fn.shapes = function(value) { - if (!arguments.length) return shapes; - shapes = value; - return fn; - }; + if (!dx && !dy) { + throw new Error("Not possible to find intersection inside of the rectangle"); + } - fn.arrows = function(value) { - if (!arguments.length) return arrows; - arrows = value; - return fn; - }; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = h * dx / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = w * dy / dx; + } - return fn; + return { x: x + sx, y: y + sy }; } -var NODE_DEFAULT_ATTRS = { - paddingLeft: 10, - paddingRight: 10, - paddingTop: 10, - paddingBottom: 10, - rx: 0, - ry: 0, - shape: "rect" -}; - -var EDGE_DEFAULT_ATTRS = { - arrowhead: "normal", - curve: d3.curveLinear -}; - -function preProcessGraph(g) { - g.nodes().forEach(function(v) { +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); + _.forEach(g.nodes(), function(v) { var node = g.node(v); - if (!_.has(node, "label") && !g.children(v).length) { node.label = v; } - - if (_.has(node, "paddingX")) { - _.defaults(node, { - paddingLeft: node.paddingX, - paddingRight: node.paddingX - }); - } - - if (_.has(node, "paddingY")) { - _.defaults(node, { - paddingTop: node.paddingY, - paddingBottom: node.paddingY - }); + var rank = node.rank; + if (!_.isUndefined(rank)) { + layering[rank][node.order] = v; } + }); + return layering; +} - if (_.has(node, "padding")) { - _.defaults(node, { - paddingLeft: node.padding, - paddingRight: node.padding, - paddingTop: node.padding, - paddingBottom: node.padding - }); +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (_.has(node, "rank")) { + node.rank -= min; } + }); +} - _.defaults(node, NODE_DEFAULT_ATTRS); - - _.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(k) { - node[k] = Number(node[k]); - }); +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - // Save dimensions for restore during post-processing - if (_.has(node, "width")) { node._prevWidth = node.width; } - if (_.has(node, "height")) { node._prevHeight = node.height; } + var layers = []; + _.forEach(g.nodes(), function(v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); }); - g.edges().forEach(function(e) { - var edge = g.edge(e); - if (!_.has(edge, "label")) { edge.label = ""; } - _.defaults(edge, EDGE_DEFAULT_ATTRS); + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + _.forEach(layers, function(vs, i) { + if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + _.forEach(vs, function(v) { g.node(v).rank += delta; }); + } }); } -function postProcessGraph(g) { - _.each(g.nodes(), function(v) { - var node = g.node(v); +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0 + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, "border", node, prefix); +} - // Restore original dimensions - if (_.has(node, "_prevWidth")) { - node.width = node._prevWidth; - } else { - delete node.width; +function maxRank(g) { + return _.max(_.map(g.nodes(), function(v) { + var rank = g.node(v).rank; + if (!_.isUndefined(rank)) { + return rank; } + })); +} - if (_.has(node, "_prevHeight")) { - node.height = node._prevHeight; +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + _.forEach(collection, function(value) { + if (fn(value)) { + result.lhs.push(value); } else { - delete node.height; + result.rhs.push(value); } - - delete node._prevWidth; - delete node._prevHeight; }); + return result; } -function createOrSelectGroup(root, name) { - var selection = root.select("g." + name); - if (selection.empty()) { - selection = root.append("g").attr("class", name); +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function time(name, fn) { + var start = _.now(); + try { + return fn(); + } finally { + console.log(name + " time: " + (_.now() - start) + "ms"); } - return selection; +} + +function notime(name, fn) { + return fn(); } /***/ }), -/***/ "./node_modules/dagre-d3/lib/shapes.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre-d3/lib/shapes.js ***! - \*********************************************/ +/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/version.js": +/*!*****************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/dagre/lib/version.js ***! + \*****************************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var intersectRect = __webpack_require__(/*! ./intersect/intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js"); -var intersectEllipse = __webpack_require__(/*! ./intersect/intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"); -var intersectCircle = __webpack_require__(/*! ./intersect/intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js"); -var intersectPolygon = __webpack_require__(/*! ./intersect/intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js"); +/***/ (function(module, exports) { -module.exports = { - rect: rect, - ellipse: ellipse, - circle: circle, - diamond: diamond -}; +module.exports = "0.8.5"; -function rect(parent, bbox, node) { - var shapeSvg = parent.insert("rect", ":first-child") - .attr("rx", node.rx) - .attr("ry", node.ry) - .attr("x", -bbox.width / 2) - .attr("y", -bbox.height / 2) - .attr("width", bbox.width) - .attr("height", bbox.height); - node.intersect = function(point) { - return intersectRect(node, point); - }; +/***/ }), - return shapeSvg; -} +/***/ "./node_modules/dagre-d3/node_modules/graphlib/index.js": +/*!**************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/index.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function ellipse(parent, bbox, node) { - var rx = bbox.width / 2; - var ry = bbox.height / 2; - var shapeSvg = parent.insert("ellipse", ":first-child") - .attr("x", -bbox.width / 2) - .attr("y", -bbox.height / 2) - .attr("rx", rx) - .attr("ry", ry); +/** + * Copyright (c) 2014, Chris Pettitt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ - node.intersect = function(point) { - return intersectEllipse(node, rx, ry, point); - }; +var lib = __webpack_require__(/*! ./lib */ "./node_modules/dagre-d3/node_modules/graphlib/lib/index.js"); - return shapeSvg; -} +module.exports = { + Graph: lib.Graph, + json: __webpack_require__(/*! ./lib/json */ "./node_modules/dagre-d3/node_modules/graphlib/lib/json.js"), + alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js"), + version: lib.version +}; -function circle(parent, bbox, node) { - var r = Math.max(bbox.width, bbox.height) / 2; - var shapeSvg = parent.insert("circle", ":first-child") - .attr("x", -bbox.width / 2) - .attr("y", -bbox.height / 2) - .attr("r", r); - node.intersect = function(point) { - return intersectCircle(node, r, point); - }; +/***/ }), - return shapeSvg; -} +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js": +/*!***************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -// Circumscribe an ellipse for the bounding box with a diamond shape. I derived -// the function to calculate the diamond shape from: -// http://mathforum.org/kb/message.jspa?messageID=3750236 -function diamond(parent, bbox, node) { - var w = (bbox.width * Math.SQRT2) / 2; - var h = (bbox.height * Math.SQRT2) / 2; - var points = [ - { x: 0, y: -h }, - { x: -w, y: 0 }, - { x: 0, y: h }, - { x: w, y: 0 } - ]; - var shapeSvg = parent.insert("polygon", ":first-child") - .attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" ")); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); - node.intersect = function(p) { - return intersectPolygon(node, points, p); - }; +module.exports = components; - return shapeSvg; +function components(g) { + var visited = {}; + var cmpts = []; + var cmpt; + + function dfs(v) { + if (_.has(visited, v)) return; + visited[v] = true; + cmpt.push(v); + _.each(g.successors(v), dfs); + _.each(g.predecessors(v), dfs); + } + + _.each(g.nodes(), function(v) { + cmpt = []; + dfs(v); + if (cmpt.length) { + cmpts.push(cmpt); + } + }); + + return cmpts; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/util.js": -/*!*******************************************!*\ - !*** ./node_modules/dagre-d3/lib/util.js ***! - \*******************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js": +/*!********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -// Public utility functions -module.exports = { - isSubgraph: isSubgraph, - edgeToId: edgeToId, - applyStyle: applyStyle, - applyClass: applyClass, - applyTransition: applyTransition -}; +module.exports = dfs; /* - * Returns true if the specified node in the graph is a subgraph node. A - * subgraph node is one that contains other nodes. + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". */ -function isSubgraph(g, v) { - return !!g.children(v).length; -} - -function edgeToId(e) { - return escapeId(e.v) + ":" + escapeId(e.w) + ":" + escapeId(e.name); -} +function dfs(g, vs, order) { + if (!_.isArray(vs)) { + vs = [vs]; + } -var ID_DELIM = /:/g; -function escapeId(str) { - return str ? String(str).replace(ID_DELIM, "\\:") : ""; -} + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr("style", styleFn); - } -} + var acc = []; + var visited = {}; + _.each(vs, function(v) { + if (!g.hasNode(v)) { + throw new Error("Graph does not have node: " + v); + } -function applyClass(dom, classFn, otherClasses) { - if (classFn) { - dom - .attr("class", classFn) - .attr("class", otherClasses + " " + dom.attr("class")); - } + doDfs(g, v, order === "post", visited, navigation, acc); + }); + return acc; } -function applyTransition(selection, g) { - var graph = g.graph(); +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!_.has(visited, v)) { + visited[v] = true; - if (_.isPlainObject(graph)) { - var transition = graph.transition; - if (_.isFunction(transition)) { - return transition(selection); - } + if (!postorder) { acc.push(v); } + _.each(navigation(v), function(w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { acc.push(v); } } - - return selection; } /***/ }), -/***/ "./node_modules/dagre-d3/lib/version.js": -/*!**********************************************!*\ - !*** ./node_modules/dagre-d3/lib/version.js ***! - \**********************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js ***! + \*****************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = "0.6.4"; +var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + +module.exports = dijkstraAll; + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform(g.nodes(), function(acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, {}); +} /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/index.js ***! - \***********************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js": +/*!*************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* -Copyright (c) 2012-2014 Chris Pettitt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -module.exports = { - graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js"), - - layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre-d3/node_modules/dagre/lib/layout.js"), - debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre-d3/node_modules/dagre/lib/debug.js"), - util: { - time: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").time, - notime: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").notime - }, - version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre-d3/node_modules/dagre/lib/version.js") -}; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js"); +module.exports = dijkstra; -/***/ }), +var DEFAULT_WEIGHT_FUNC = _.constant(1); -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js": -/*!*****************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra(g, String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { return g.outEdges(v); }); +} -"use strict"; +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + var updateNeighbors = function(edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js"); + if (weight < 0) { + throw new Error("dijkstra does not allow negative edge weights. " + + "Bad edge: " + edge + " Weight: " + weight); + } -module.exports = { - run: run, - undo: undo -}; + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; -function run(g) { - var fas = (g.graph().acyclicer === "greedy" - ? greedyFAS(g, weightFn(g)) - : dfsFAS(g)); - _.forEach(fas, function(e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, _.uniqueId("rev")); + g.nodes().forEach(function(v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); }); - function weightFn(g) { - return function(e) { - return g.edge(e).weight; - }; + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); } + + return results; } -function dfsFAS(g) { - var fas = []; - var stack = {}; - var visited = {}; - function dfs(v) { - if (_.has(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - _.forEach(g.outEdges(v), function(e) { - if (_.has(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } +/***/ }), - _.forEach(g.nodes(), dfs); - return fas; -} +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js": +/*!****************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function undo(g) { - _.forEach(g.edges(), function(e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +var tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js"); - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); - } +module.exports = findCycles; + +function findCycles(g) { + return _.filter(tarjan(g), function(cmpt) { + return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); }); } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js ***! - \*****************************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -module.exports = addBorderSegments; +module.exports = floydWarshall; -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v); - var node = g.node(v); - if (children.length) { - _.forEach(children, dfs); - } +var DEFAULT_WEIGHT_FUNC = _.constant(1); - if (_.has(node, "minRank")) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; - rank < maxRank; - ++rank) { - addBorderNode(g, "borderLeft", "_bl", v, node, rank); - addBorderNode(g, "borderRight", "_br", v, node, rank); +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall(g, + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { return g.outEdges(v); }); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function(v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function(w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; } - } - } + }); + edgeFn(v).forEach(function(edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); - _.forEach(g.children(), dfs); -} + nodes.forEach(function(k) { + var rowK = results[k]; + nodes.forEach(function(i) { + var rowI = results[i]; + nodes.forEach(function(j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); -function addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }; - var prev = sgNode[prop][rank - 1]; - var curr = util.addDummyNode(g, "border", label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } + return results; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js": -/*!***************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js ***! - \***************************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js": +/*!**********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +module.exports = { + components: __webpack_require__(/*! ./components */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js"), + dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js"), + dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js"), + findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js"), + floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js"), + isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js"), + postorder: __webpack_require__(/*! ./postorder */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js"), + preorder: __webpack_require__(/*! ./preorder */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js"), + prim: __webpack_require__(/*! ./prim */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js"), + tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js"), + topsort: __webpack_require__(/*! ./topsort */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js") +}; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +/***/ }), -module.exports = { - adjust: adjust, - undo: undo -}; +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js": +/*!***************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === "lr" || rankDir === "rl") { - swapWidthHeight(g); - } -} +var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js"); -function undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === "bt" || rankDir === "rl") { - reverseY(g); - } +module.exports = isAcyclic; - if (rankDir === "lr" || rankDir === "rl") { - swapXY(g); - swapWidthHeight(g); +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof topsort.CycleException) { + return false; + } + throw e; } + return true; } -function swapWidthHeight(g) { - _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); }); - _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); }); -} -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} +/***/ }), -function reverseY(g) { - _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); }); +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js": +/*!**************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, reverseYOne); - if (_.has(edge, "y")) { - reverseYOne(edge); - } - }); -} +var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js"); -function reverseYOne(attrs) { - attrs.y = -attrs.y; +module.exports = postorder; + +function postorder(g, vs) { + return dfs(g, vs, "post"); } -function swapXY(g) { - _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); }); - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, swapXYOne); - if (_.has(edge, "x")) { - swapXYOne(edge); - } - }); -} +/***/ }), -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js": +/*!*************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js"); + +module.exports = preorder; + +function preorder(g, vs) { + return dfs(g, vs, "pre"); } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js": -/*!*******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js ***! - \*******************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js": +/*!*********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js ***! + \*********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +var Graph = __webpack_require__(/*! ../graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"); +var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js"); -module.exports = List; +module.exports = prim; -function List() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; -} +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; -List.prototype.dequeue = function() { - var sentinel = this._sentinel; - var entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } } -}; -List.prototype.enqueue = function(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); + if (g.nodeCount() === 0) { + return result; } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; -}; -List.prototype.toString = function() { - var strs = []; - var sentinel = this._sentinel; - var curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return "[" + strs.join(", ") + "]"; -}; + _.each(g.nodes(), function(v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); -function filterOutLinks(k, v) { - if (k !== "_next" && k !== "_prev") { - return v; + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error("Input graph is not connected: " + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); } + + return result; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/debug.js": -/*!***************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/debug.js ***! - \***************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js": +/*!***********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -module.exports = { - debugOrdering: debugOrdering -}; +module.exports = tarjan; -/* istanbul ignore next */ -function debugOrdering(g) { - var layerMatrix = util.buildLayerMatrix(g); +function tarjan(g) { + var index = 0; + var stack = []; + var visited = {}; // node id -> { onStack, lowlink, index } + var results = []; - var h = new Graph({ compound: true, multigraph: true }).setGraph({}); + function dfs(v) { + var entry = visited[v] = { + onStack: true, + lowlink: index, + index: index++ + }; + stack.push(v); - _.forEach(g.nodes(), function(v) { - h.setNode(v, { label: v }); - h.setParent(v, "layer" + g.node(v).rank); - }); + g.successors(v).forEach(function(w) { + if (!_.has(visited, w)) { + dfs(w); + entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); + } else if (visited[w].onStack) { + entry.lowlink = Math.min(entry.lowlink, visited[w].index); + } + }); - _.forEach(g.edges(), function(e) { - h.setEdge(e.v, e.w, {}, e.name); - }); + if (entry.lowlink === entry.index) { + var cmpt = []; + var w; + do { + w = stack.pop(); + visited[w].onStack = false; + cmpt.push(w); + } while (v !== w); + results.push(cmpt); + } + } - _.forEach(layerMatrix, function(layer, i) { - var layerV = "layer" + i; - h.setNode(layerV, { rank: "same" }); - _.reduce(layer, function(u, v) { - h.setEdge(u, v, { style: "invis" }); - return v; - }); + g.nodes().forEach(function(v) { + if (!_.has(visited, v)) { + dfs(v); + } }); - return h; + return results; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js ***! - \******************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js": +/*!************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* global window */ +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -var graphlib; +module.exports = topsort; +topsort.CycleException = CycleException; -if (true) { - try { - graphlib = __webpack_require__(/*! graphlib */ "./node_modules/dagre-d3/node_modules/graphlib/index.js"); - } catch (e) { - // continue regardless of error +function topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (_.has(stack, node)) { + throw new CycleException(); + } + + if (!_.has(visited, node)) { + stack[node] = true; + visited[node] = true; + _.each(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } } -} -if (!graphlib) { - graphlib = window.graphlib; -} + _.each(g.sinks(), visit); -module.exports = graphlib; + if (_.size(visited) !== g.nodeCount()) { + throw new CycleException(); + } + return results; +} + +function CycleException() {} +CycleException.prototype = new Error(); // must be an instance of Error to pass testing /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js": -/*!********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/greedy-fas.js ***! - \********************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js": +/*!********************************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -var List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre-d3/node_modules/dagre/lib/data/list.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. +module.exports = PriorityQueue; + +/** + * A min-priority queue data structure. This algorithm is derived from Cormen, + * et al., "Introduction to Algorithms". The basic idea of a min-priority + * queue is that you can efficiently (in O(1) time) get the smallest key in + * the queue. Adding and removing elements takes O(log n) time. A key can + * have its priority decreased in O(log n) time. */ -module.exports = greedyFAS; +function PriorityQueue() { + this._arr = []; + this._keyIndices = {}; +} -var DEFAULT_WEIGHT_FN = _.constant(1); +/** + * Returns the number of elements in the queue. Takes `O(1)` time. + */ +PriorityQueue.prototype.size = function() { + return this._arr.length; +}; -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); +/** + * Returns the keys that are in the queue. Takes `O(n)` time. + */ +PriorityQueue.prototype.keys = function() { + return this._arr.map(function(x) { return x.key; }); +}; - // Expand multi-edges - return _.flatten(_.map(results, function(e) { - return g.outEdges(e.v, e.w); - }), true); -} +/** + * Returns `true` if **key** is in the queue and `false` if not. + */ +PriorityQueue.prototype.has = function(key) { + return _.has(this._keyIndices, key); +}; -function doGreedyFAS(g, buckets, zeroIdx) { - var results = []; - var sources = buckets[buckets.length - 1]; - var sinks = buckets[0]; +/** + * Returns the priority for **key**. If **key** is not present in the queue + * then this function returns `undefined`. Takes `O(1)` time. + * + * @param {Object} key + */ +PriorityQueue.prototype.priority = function(key) { + var index = this._keyIndices[key]; + if (index !== undefined) { + return this._arr[index].priority; + } +}; - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } - while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } +/** + * Returns the key for the minimum element in this queue. If the queue is + * empty this function throws an Error. Takes `O(1)` time. + */ +PriorityQueue.prototype.min = function() { + if (this.size() === 0) { + throw new Error("Queue underflow"); } + return this._arr[0].key; +}; - return results; -} +/** + * Inserts a new key into the priority queue. If the key already exists in + * the queue this function returns `false`; otherwise it will return `true`. + * Takes `O(n)` time. + * + * @param {Object} key the key to add + * @param {Number} priority the initial priority for the key + */ +PriorityQueue.prototype.add = function(key, priority) { + var keyIndices = this._keyIndices; + key = String(key); + if (!_.has(keyIndices, key)) { + var arr = this._arr; + var index = arr.length; + keyIndices[key] = index; + arr.push({key: key, priority: priority}); + this._decrease(index); + return true; + } + return false; +}; -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; +/** + * Removes and returns the smallest key in the queue. Takes `O(log n)` time. + */ +PriorityQueue.prototype.removeMin = function() { + this._swap(0, this._arr.length - 1); + var min = this._arr.pop(); + delete this._keyIndices[min.key]; + this._heapify(0); + return min.key; +}; - _.forEach(g.inEdges(entry.v), function(edge) { - var weight = g.edge(edge); - var uEntry = g.node(edge.v); +/** + * Decreases the priority for **key** to **priority**. If the new priority is + * greater than the previous priority, this function will throw an Error. + * + * @param {Object} key the key for which to raise priority + * @param {Number} priority the new priority for the key + */ +PriorityQueue.prototype.decrease = function(key, priority) { + var index = this._keyIndices[key]; + if (priority > this._arr[index].priority) { + throw new Error("New priority is greater than current priority. " + + "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); + } + this._arr[index].priority = priority; + this._decrease(index); +}; - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); +PriorityQueue.prototype._heapify = function(i) { + var arr = this._arr; + var l = 2 * i; + var r = l + 1; + var largest = i; + if (l < arr.length) { + largest = arr[l].priority < arr[largest].priority ? l : largest; + if (r < arr.length) { + largest = arr[r].priority < arr[largest].priority ? r : largest; + } + if (largest !== i) { + this._swap(i, largest); + this._heapify(largest); } + } +}; - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); +PriorityQueue.prototype._decrease = function(index) { + var arr = this._arr; + var priority = arr[index].priority; + var parent; + while (index !== 0) { + parent = index >> 1; + if (arr[parent].priority < priority) { + break; + } + this._swap(index, parent); + index = parent; + } +}; - _.forEach(g.outEdges(entry.v), function(edge) { - var weight = g.edge(edge); - var w = edge.w; - var wEntry = g.node(w); - wEntry["in"] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); +PriorityQueue.prototype._swap = function(i, j) { + var arr = this._arr; + var keyIndices = this._keyIndices; + var origArrI = arr[i]; + var origArrJ = arr[j]; + arr[i] = origArrJ; + arr[j] = origArrI; + keyIndices[origArrJ.key] = i; + keyIndices[origArrI.key] = j; +}; - g.removeNode(entry.v); - return results; -} +/***/ }), -function buildState(g, weightFn) { - var fasGraph = new Graph(); - var maxIn = 0; - var maxOut = 0; +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - _.forEach(g.nodes(), function(v) { - fasGraph.setNode(v, { v: v, "in": 0, out: 0 }); - }); +"use strict"; - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - _.forEach(g.edges(), function(e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0; - var weight = weightFn(e); - var edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); - maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); - }); - var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); - var zeroIdx = maxIn + 1; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); - _.forEach(fasGraph.nodes(), function(v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); +module.exports = Graph; - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} +var DEFAULT_EDGE_NAME = "\x00"; +var GRAPH_NODE = "\x00"; +var EDGE_KEY_DELIM = "\x01"; -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry["in"]) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); - } -} +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +function Graph(opts) { + this._isDirected = _.has(opts, "directed") ? opts.directed : true; + this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; + this._isCompound = _.has(opts, "compound") ? opts.compound : false; -/***/ }), + // Label for the graph itself + this._label = undefined; -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/layout.js": -/*!****************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/layout.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = _.constant(undefined); -"use strict"; + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = _.constant(undefined); + // v -> label + this._nodes = {}; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre-d3/node_modules/dagre/lib/acyclic.js"); -var normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js"); -var rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js"); -var normalizeRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").normalizeRanks; -var parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js"); -var removeEmptyRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").removeEmptyRanks; -var nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js"); -var addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre-d3/node_modules/dagre/lib/add-border-segments.js"); -var coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre-d3/node_modules/dagre/lib/coordinate-system.js"); -var order = __webpack_require__(/*! ./order */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js"); -var position = __webpack_require__(/*! ./position */ "./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; + if (this._isCompound) { + // v -> parent + this._parent = {}; -module.exports = layout; + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } -function layout(g, opts) { - var time = opts && opts.debugTiming ? util.time : util.notime; - time("layout", function() { - var layoutGraph = - time(" buildLayoutGraph", function() { return buildLayoutGraph(g); }); - time(" runLayout", function() { runLayout(layoutGraph, time); }); - time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); }); - }); -} + // v -> edgeObj + this._in = {}; -function runLayout(g, time) { - time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); }); - time(" removeSelfEdges", function() { removeSelfEdges(g); }); - time(" acyclic", function() { acyclic.run(g); }); - time(" nestingGraph.run", function() { nestingGraph.run(g); }); - time(" rank", function() { rank(util.asNonCompoundGraph(g)); }); - time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); }); - time(" removeEmptyRanks", function() { removeEmptyRanks(g); }); - time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); }); - time(" normalizeRanks", function() { normalizeRanks(g); }); - time(" assignRankMinMax", function() { assignRankMinMax(g); }); - time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); }); - time(" normalize.run", function() { normalize.run(g); }); - time(" parentDummyChains", function() { parentDummyChains(g); }); - time(" addBorderSegments", function() { addBorderSegments(g); }); - time(" order", function() { order(g); }); - time(" insertSelfEdges", function() { insertSelfEdges(g); }); - time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); }); - time(" position", function() { position(g); }); - time(" positionSelfEdges", function() { positionSelfEdges(g); }); - time(" removeBorderNodes", function() { removeBorderNodes(g); }); - time(" normalize.undo", function() { normalize.undo(g); }); - time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); }); - time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); }); - time(" translateGraph", function() { translateGraph(g); }); - time(" assignNodeIntersects", function() { assignNodeIntersects(g); }); - time(" reversePoints", function() { reversePointsForReversedEdges(g); }); - time(" acyclic.undo", function() { acyclic.undo(g); }); + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; } -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - _.forEach(inputGraph.nodes(), function(v) { - var inputLabel = inputGraph.node(v); - var layoutLabel = layoutGraph.node(v); +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - _.forEach(inputGraph.edges(), function(e) { - var inputLabel = inputGraph.edge(e); - var layoutLabel = layoutGraph.edge(e); +/* === Graph functions ========= */ - inputLabel.points = layoutLabel.points; - if (_.has(layoutLabel, "x")) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); +Graph.prototype.isDirected = function() { + return this._isDirected; +}; - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} +Graph.prototype.isMultigraph = function() { + return this._isMultigraph; +}; -var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"]; -var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }; -var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"]; -var nodeNumAttrs = ["width", "height"]; -var nodeDefaults = { width: 0, height: 0 }; -var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"]; -var edgeDefaults = { - minlen: 1, weight: 1, width: 0, height: 0, - labeloffset: 10, labelpos: "r" +Graph.prototype.isCompound = function() { + return this._isCompound; }; -var edgeAttrs = ["labelpos"]; -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new Graph({ multigraph: true, compound: true }); - var graph = canonicalize(inputGraph.graph()); +Graph.prototype.setGraph = function(label) { + this._label = label; + return this; +}; - g.setGraph(_.merge({}, - graphDefaults, - selectNumberAttrs(graph, graphNumAttrs), - _.pick(graph, graphAttrs))); +Graph.prototype.graph = function() { + return this._label; +}; - _.forEach(inputGraph.nodes(), function(v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - _.forEach(inputGraph.edges(), function(e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge(e, _.merge({}, - edgeDefaults, - selectNumberAttrs(edge, edgeNumAttrs), - _.pick(edge, edgeAttrs))); +/* === Node functions ========== */ + +Graph.prototype.setDefaultNodeLabel = function(newDefault) { + if (!_.isFunction(newDefault)) { + newDefault = _.constant(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; +}; + +Graph.prototype.nodeCount = function() { + return this._nodeCount; +}; + +Graph.prototype.nodes = function() { + return _.keys(this._nodes); +}; + +Graph.prototype.sources = function() { + var self = this; + return _.filter(this.nodes(), function(v) { + return _.isEmpty(self._in[v]); }); +}; - return g; -} +Graph.prototype.sinks = function() { + var self = this; + return _.filter(this.nodes(), function(v) { + return _.isEmpty(self._out[v]); + }); +}; -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== "c") { - if (graph.rankdir === "TB" || graph.rankdir === "BT") { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } +Graph.prototype.setNodes = function(vs, value) { + var args = arguments; + var self = this; + _.each(vs, function(v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); } }); -} + return this; +}; -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v); - var w = g.node(e.w); - var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - util.addDummyNode(g, "edge-proxy", label, "_ep"); +Graph.prototype.setNode = function(v, value) { + if (_.has(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; } - }); -} + return this; + } -function assignRankMinMax(g) { - var maxRank = 0; - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - maxRank = _.max(maxRank, node.maxRank); + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; +}; + +Graph.prototype.node = function(v) { + return this._nodes[v]; +}; + +Graph.prototype.hasNode = function(v) { + return _.has(this._nodes, v); +}; + +Graph.prototype.removeNode = function(v) { + var self = this; + if (_.has(this._nodes, v)) { + var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + _.each(this.children(v), function(child) { + self.setParent(child); + }); + delete this._children[v]; } - }); - g.graph().maxRank = maxRank; -} + _.each(_.keys(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + _.each(_.keys(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; +}; -function removeEdgeLabelProxies(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === "edge-proxy") { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); +Graph.prototype.setParent = function(v, parent) { + if (!this._isCompound) { + throw new Error("Cannot set parent in a non-compound graph"); + } + + if (_.isUndefined(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ""; + for (var ancestor = parent; + !_.isUndefined(ancestor); + ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error("Setting " + parent+ " as parent of " + v + + " would create a cycle"); + } } - }); -} -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY; - var maxX = 0; - var minY = Number.POSITIVE_INFINITY; - var maxY = 0; - var graphLabel = g.graph(); - var marginX = graphLabel.marginx || 0; - var marginY = graphLabel.marginy || 0; + this.setNode(parent); + } - function getExtremes(attrs) { - var x = attrs.x; - var y = attrs.y; - var w = attrs.width; - var h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; +}; + +Graph.prototype._removeFromParentsChildList = function(v) { + delete this._children[this._parent[v]][v]; +}; + +Graph.prototype.parent = function(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } } +}; - _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, "x")) { - getExtremes(edge); +Graph.prototype.children = function(v) { + if (_.isUndefined(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return _.keys(children); } - }); + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } +}; - minX -= marginX; - minY -= marginY; +Graph.prototype.predecessors = function(v) { + var predsV = this._preds[v]; + if (predsV) { + return _.keys(predsV); + } +}; - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); +Graph.prototype.successors = function(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return _.keys(sucsV); + } +}; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, function(p) { - p.x -= minX; - p.y -= minY; - }); - if (_.has(edge, "x")) { edge.x -= minX; } - if (_.has(edge, "y")) { edge.y -= minY; } +Graph.prototype.neighbors = function(v) { + var preds = this.predecessors(v); + if (preds) { + return _.union(preds, this.successors(v)); + } +}; + +Graph.prototype.isLeaf = function (v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; +}; + +Graph.prototype.filterNodes = function(filter) { + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound }); - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} + copy.setGraph(this.graph()); -function assignNodeIntersects(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - var nodeV = g.node(e.v); - var nodeW = g.node(e.w); - var p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; + var self = this; + _.each(this._nodes, function(value, v) { + if (filter(v)) { + copy.setNode(v, value); } - edge.points.unshift(util.intersectRect(nodeV, p1)); - edge.points.push(util.intersectRect(nodeW, p2)); }); -} -function fixupEdgeLabelCoords(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, "x")) { - if (edge.labelpos === "l" || edge.labelpos === "r") { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case "l": edge.x -= edge.width / 2 + edge.labeloffset; break; - case "r": edge.x += edge.width / 2 + edge.labeloffset; break; - } + _.each(this._edgeObjs, function(e) { + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); } }); -} -function reversePointsForReversedEdges(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); } - }); -} + } -function removeBorderNodes(g) { - _.forEach(g.nodes(), function(v) { - if (g.children(v).length) { - var node = g.node(v); - var t = g.node(node.borderTop); - var b = g.node(node.borderBottom); - var l = g.node(_.last(node.borderLeft)); - var r = g.node(_.last(node.borderRight)); + if (this._isCompound) { + _.each(copy.nodes(), function(v) { + copy.setParent(v, findParent(v)); + }); + } - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; + return copy; +}; + +/* === Edge functions ========== */ + +Graph.prototype.setDefaultEdgeLabel = function(newDefault) { + if (!_.isFunction(newDefault)) { + newDefault = _.constant(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; +}; + +Graph.prototype.edgeCount = function() { + return this._edgeCount; +}; + +Graph.prototype.edges = function() { + return _.values(this._edgeObjs); +}; + +Graph.prototype.setPath = function(vs, value) { + var self = this; + var args = arguments; + _.reduce(vs, function(v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); } + return w; }); + return this; +}; - _.forEach(g.nodes(), function(v) { - if (g.node(v).dummy === "border") { - g.removeNode(v); +/* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ +Graph.prototype.setEdge = function() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; } - }); -} + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } -function removeSelfEdges(g) { - _.forEach(g.edges(), function(e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); + v = "" + v; + w = "" + w; + if (!_.isUndefined(name)) { + name = "" + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (_.has(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; } - }); + return this; + } + + if (!_.isUndefined(name) && !this._isMultigraph) { + throw new Error("Cannot set a named edge when isMultigraph = false"); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; +}; + +Graph.prototype.edge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)); + return this._edgeLabels[e]; +}; + +Graph.prototype.hasEdge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)); + return _.has(this._edgeLabels, e); +}; + +Graph.prototype.removeEdge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; +}; + +Graph.prototype.inEdges = function(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = _.values(inV); + if (!u) { + return edges; + } + return _.filter(edges, function(edge) { return edge.v === u; }); + } +}; + +Graph.prototype.outEdges = function(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = _.values(outV); + if (!w) { + return edges; + } + return _.filter(edges, function(edge) { return edge.w === w; }); + } +}; + +Graph.prototype.nodeEdges = function(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } +}; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } } -function insertSelfEdges(g) { - var layers = util.buildLayerMatrix(g); - _.forEach(layers, function(layer) { - var orderShift = 0; - _.forEach(layer, function(v, i) { - var node = g.node(v); - node.order = i + orderShift; - _.forEach(node.selfEdges, function(selfEdge) { - util.addDummyNode(g, "selfedge", { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + (++orderShift), - e: selfEdge.e, - label: selfEdge.label - }, "_se"); - }); - delete node.selfEdges; - }); - }); +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { delete map[k]; } } -function positionSelfEdges(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === "selfedge") { - var selfNode = g.node(node.e.v); - var x = selfNode.x + selfNode.width / 2; - var y = selfNode.y; - var dx = node.x - x; - var dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + 2 * dx / 3, y: y - dy }, - { x: x + 5 * dx / 6, y: y - dy }, - { x: x + dx , y: y }, - { x: x + 5 * dx / 6, y: y + dy }, - { x: x + 2 * dx / 3, y: y + dy } - ]; - node.label.x = node.x; - node.label.y = node.y; +function edgeArgsToId(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/index.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/index.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Includes only the "core" of graphlib +module.exports = { + Graph: __webpack_require__(/*! ./graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"), + version: __webpack_require__(/*! ./version */ "./node_modules/dagre-d3/node_modules/graphlib/lib/version.js") +}; + + +/***/ }), + +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/json.js": +/*!*****************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/json.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +var Graph = __webpack_require__(/*! ./graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"); + +module.exports = { + write: write, + read: read +}; + +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound() + }, + nodes: writeNodes(g), + edges: writeEdges(g) + }; + if (!_.isUndefined(g.graph())) { + json.value = _.clone(g.graph()); + } + return json; +} + +function writeNodes(g) { + return _.map(g.nodes(), function(v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v: v }; + if (!_.isUndefined(nodeValue)) { + node.value = nodeValue; } + if (!_.isUndefined(parent)) { + node.parent = parent; + } + return node; }); } -function selectNumberAttrs(obj, attrs) { - return _.mapValues(_.pick(obj, attrs), Number); +function writeEdges(g) { + return _.map(g.edges(), function(e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!_.isUndefined(e.name)) { + edge.name = e.name; + } + if (!_.isUndefined(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); } -function canonicalize(attrs) { - var newAttrs = {}; - _.forEach(attrs, function(v, k) { - newAttrs[k.toLowerCase()] = v; +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function(entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } }); - return newAttrs; + _.each(json.edges, function(entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js": -/*!****************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js ***! - \****************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js": +/*!*******************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -36440,32 +34472,22 @@ var lodash; if (true) { try { lodash = { - cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"), + clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"), constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), - defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), - find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"), - flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"), - forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"), - forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"), has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), + isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"), + isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"), + isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), - last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"), + keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"), map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), - mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"), - max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"), - merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"), - min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"), - minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"), - now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"), - pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), - range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), - sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"), - uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"), - values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"), - zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"), + size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"), + transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"), + union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"), + values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js") }; } catch (e) { // continue regardless of error @@ -36481,142 +34503,134 @@ module.exports = lodash; /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js": -/*!***********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/nesting-graph.js ***! - \***********************************************************************/ +/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/version.js": +/*!********************************************************************!*\ + !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/version.js ***! + \********************************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +/***/ (function(module, exports) { -module.exports = { - run: run, - cleanup: cleanup -}; +module.exports = '2.1.8'; -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function run(g) { - var root = util.addDummyNode(g, "root", {}, "_root"); - var depths = treeDepths(g); - var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - g.graph().nestingRoot = root; +/***/ }), - // Multiply minlen by nodeSep to align nodes on non-border ranks. - _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); +/***/ "./node_modules/dagre/index.js": +/*!*************************************!*\ + !*** ./node_modules/dagre/index.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; +/* +Copyright (c) 2012-2014 Chris Pettitt - // Create border nodes and link them up - _.forEach(g.children(), function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); - }); +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -function dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ - var top = util.addBorderNode(g, "_bt"); - var bottom = util.addBorderNode(g, "_bb"); - var label = g.node(v); +module.exports = { + graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre/lib/graphlib.js"), - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; + layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre/lib/layout.js"), + debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre/lib/debug.js"), + util: { + time: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").time, + notime: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").notime + }, + version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre/lib/version.js") +}; - _.forEach(children, function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); - var childNode = g.node(child); - var childTop = childNode.borderTop ? childNode.borderTop : child; - var childBottom = childNode.borderBottom ? childNode.borderBottom : child; - var thisWeight = childNode.borderTop ? weight : 2 * weight; - var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; +/***/ }), - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); +/***/ "./node_modules/dagre/lib/acyclic.js": +/*!*******************************************!*\ + !*** ./node_modules/dagre/lib/acyclic.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); +"use strict"; + + +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre/lib/greedy-fas.js"); + +module.exports = { + run: run, + undo: undo +}; + +function run(g) { + var fas = (g.graph().acyclicer === "greedy" + ? greedyFAS(g, weightFn(g)) + : dfsFAS(g)); + _.forEach(fas, function(e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, _.uniqueId("rev")); }); - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + function weightFn(g) { + return function(e) { + return g.edge(e).weight; + }; } } -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - _.forEach(children, function(child) { - dfs(child, depth + 1); - }); +function dfsFAS(g) { + var fas = [], + stack = {}, + visited = {}; + + function dfs(v) { + if (_.has(visited, v)) { + return; } - depths[v] = depth; + visited[v] = true; + stack[v] = true; + _.forEach(g.outEdges(v), function(e) { + if (_.has(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; } - _.forEach(g.children(), function(v) { dfs(v, 1); }); - return depths; -} -function sumWeights(g) { - return _.reduce(g.edges(), function(acc, e) { - return acc + g.edge(e).weight; - }, 0); + _.forEach(g.nodes(), dfs); + return fas; } -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; +function undo(g) { _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.nestingEdge) { + var label = g.edge(e); + if (label.reversed) { g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); } }); } @@ -36624,13827 +34638,13126 @@ function cleanup(g) { /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js": -/*!*******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/normalize.js ***! - \*******************************************************************/ +/***/ "./node_modules/dagre/lib/add-border-segments.js": +/*!*******************************************************!*\ + !*** ./node_modules/dagre/lib/add-border-segments.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); - -module.exports = { - run: run, - undo: undo -}; - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function run(g) { - g.graph().dummyChains = []; - _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); -} - -function normalizeEdge(g, e) { - var v = e.v; - var vRank = g.node(v).rank; - var w = e.w; - var wRank = g.node(w).rank; - var name = e.name; - var edgeLabel = g.edge(e); - var labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); - g.removeEdge(e); +module.exports = addBorderSegments; - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, height: 0, - edgeLabel: edgeLabel, edgeObj: e, - rank: vRank - }; - dummy = util.addDummyNode(g, "edge", attrs, "_d"); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - attrs.dummy = "edge-label"; - attrs.labelpos = edgeLabel.labelpos; +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v), + node = g.node(v); + if (children.length) { + _.forEach(children, dfs); } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); + + if (_.has(node, "minRank")) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; + rank < maxRank; + ++rank) { + addBorderNode(g, "borderLeft", "_bl", v, node, rank); + addBorderNode(g, "borderRight", "_br", v, node, rank); + } } - v = dummy; } - g.setEdge(v, w, { weight: edgeLabel.weight }, name); + _.forEach(g.children(), dfs); } -function undo(g) { - _.forEach(g.graph().dummyChains, function(v) { - var node = g.node(v); - var origLabel = node.edgeLabel; - var w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === "edge-label") { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); +function addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }, + prev = sgNode[prop][rank - 1], + curr = util.addDummyNode(g, "border", label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js ***! - \****************************************************************************************/ +/***/ "./node_modules/dagre/lib/coordinate-system.js": +/*!*****************************************************!*\ + !*** ./node_modules/dagre/lib/coordinate-system.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +"use strict"; -module.exports = addSubgraphConstraints; -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); - _.forEach(vs, function(v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); +module.exports = { + adjust: adjust, + undo: undo +}; - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "lr" || rankDir === "rl") { + swapWidthHeight(g); } - dfs(undefined); - */ } +function undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "bt" || rankDir === "rl") { + reverseY(g); + } -/***/ }), + if (rankDir === "lr" || rankDir === "rl") { + swapXY(g); + swapWidthHeight(g); + } +} -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js": -/*!**************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function swapWidthHeight(g) { + _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); }); + _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); }); +} -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} -module.exports = barycenter; +function reverseY(g) { + _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); }); -function barycenter(g, movable) { - return _.map(movable, function(v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = _.reduce(inV, function(acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + (edge.weight * nodeU.order), - weight: acc.weight + edge.weight - }; - }, { sum: 0, weight: 0 }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, reverseYOne); + if (_.has(edge, "y")) { + reverseYOne(edge); + } + }); +} - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight - }; +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); }); + + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, swapXYOne); + if (_.has(edge, "x")) { + swapXYOne(edge); } }); } +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js ***! - \*********************************************************************************/ +/***/ "./node_modules/dagre/lib/data/list.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre/lib/data/list.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; - -module.exports = buildLayerGraph; +/***/ (function(module, exports) { /* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new Graph({ compound: true }).setGraph({ root: root }) - .setDefaultNodeLabel(function(v) { return g.node(v); }); - _.forEach(g.nodes(), function(v) { - var node = g.node(v), - parent = g.parent(v); +module.exports = List; - if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { - result.setNode(v); - result.setParent(v, parent || root); +function List() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; +} - // This assumes we have only short edges! - _.forEach(g[relationship](v), function(e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !_.isUndefined(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); +List.prototype.dequeue = function() { + var sentinel = this._sentinel, + entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } +}; - if (_.has(node, "minRank")) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank] - }); - } - } - }); +List.prototype.enqueue = function(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; +}; - return result; +List.prototype.toString = function() { + var strs = [], + sentinel = this._sentinel, + curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return "[" + strs.join(", ") + "]"; +}; + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; } -function createRootNode(g) { - var v; - while (g.hasNode((v = _.uniqueId("_root")))); - return v; +function filterOutLinks(k, v) { + if (k !== "_next" && k !== "_prev") { + return v; + } } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js": -/*!***************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js ***! - \***************************************************************************/ +/***/ "./node_modules/dagre/lib/debug.js": +/*!*****************************************!*\ + !*** ./node_modules/dagre/lib/debug.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"), + Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; +module.exports = { + debugOrdering: debugOrdering +}; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +/* istanbul ignore next */ +function debugOrdering(g) { + var layerMatrix = util.buildLayerMatrix(g); -module.exports = crossCount; + var h = new Graph({ compound: true, multigraph: true }).setGraph({}); -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i-1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = _.zipObject(southLayer, - _.map(southLayer, function (v, i) { return i; })); - var southEntries = _.flatten(_.map(northLayer, function(v) { - return _.sortBy(_.map(g.outEdges(v), function(e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), "pos"); - }), true); + _.forEach(g.nodes(), function(v) { + h.setNode(v, { label: v }); + h.setParent(v, "layer" + g.node(v).rank); + }); - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = _.map(new Array(treeSize), function() { return 0; }); + _.forEach(g.edges(), function(e) { + h.setEdge(e.v, e.w, {}, e.name); + }); - // Calculate the weighted crossings - var cc = 0; - _.forEach(southEntries.forEach(function(entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - while (index > 0) { - if (index % 2) { - weightSum += tree[index + 1]; - } - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - })); + _.forEach(layerMatrix, function(layer, i) { + var layerV = "layer" + i; + h.setNode(layerV, { rank: "same" }); + _.reduce(layer, function(u, v) { + h.setEdge(u, v, { style: "invis" }); + return v; + }); + }); - return cc; + return h; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js": -/*!*********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/index.js ***! - \*********************************************************************/ +/***/ "./node_modules/dagre/lib/graphlib.js": +/*!********************************************!*\ + !*** ./node_modules/dagre/lib/graphlib.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js"); -var crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/cross-count.js"); -var sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js"); -var buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/build-layer-graph.js"); -var addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/add-subgraph-constraints.js"); -var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); - -module.exports = order; - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util.maxRank(g), - downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"), - upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges"); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = util.buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = _.cloneDeep(layering); - bestCC = cc; - } - } +/* global window */ - assignOrder(g, best); -} +var graphlib; -function buildLayerGraphs(g, ranks, relationship) { - return _.map(ranks, function(rank) { - return buildLayerGraph(g, rank, relationship); - }); +if (true) { + try { + graphlib = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js"); + } catch (e) {} } -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new Graph(); - _.forEach(layerGraphs, function(lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - _.forEach(sorted.vs, function(v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); +if (!graphlib) { + graphlib = window.graphlib; } -function assignOrder(g, layering) { - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, i) { - g.node(v).order = i; - }); - }); -} +module.exports = graphlib; /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js": -/*!**************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/init-order.js ***! - \**************************************************************************/ +/***/ "./node_modules/dagre/lib/greedy-fas.js": +/*!**********************************************!*\ + !*** ./node_modules/dagre/lib/greedy-fas.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); - -module.exports = initOrder; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, + List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre/lib/data/list.js"); /* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. */ -function initOrder(g) { - var visited = {}; - var simpleNodes = _.filter(g.nodes(), function(v) { - return !g.children(v).length; - }); - var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })); - var layers = _.map(_.range(maxRank + 1), function() { return []; }); +module.exports = greedyFAS; - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - _.forEach(g.successors(v), dfs); - } +var DEFAULT_WEIGHT_FN = _.constant(1); - var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); - _.forEach(orderedVs, dfs); +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - return layers; + // Expand multi-edges + return _.flatten(_.map(results, function(e) { + return g.outEdges(e.v, e.w); + }), true); } +function doGreedyFAS(g, buckets, zeroIdx) { + var results = [], + sources = buckets[buckets.length - 1], + sinks = buckets[0]; -/***/ }), - -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } + while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + return results; +} -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; -module.exports = resolveConflicts; + _.forEach(g.inEdges(entry.v), function(edge) { + var weight = g.edge(edge), + uEntry = g.node(edge.v); -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - _.forEach(entries, function(entry, i) { - var tmp = mappedEntries[entry.v] = { - indegree: 0, - "in": [], - out: [], - vs: [entry.v], - i: i - }; - if (!_.isUndefined(entry.barycenter)) { - tmp.barycenter = entry.barycenter; - tmp.weight = entry.weight; + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); } - }); - _.forEach(cg.edges(), function(e) { - var entryV = mappedEntries[e.v]; - var entryW = mappedEntries[e.w]; - if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); }); - var sourceSet = _.filter(mappedEntries, function(entry) { - return !entry.indegree; + _.forEach(g.outEdges(entry.v), function(edge) { + var weight = g.edge(edge), + w = edge.w, + wEntry = g.node(w); + wEntry["in"] -= weight; + assignBucket(buckets, zeroIdx, wEntry); }); - return doResolveConflicts(sourceSet); + g.removeNode(entry.v); + + return results; } -function doResolveConflicts(sourceSet) { - var entries = []; +function buildState(g, weightFn) { + var fasGraph = new Graph(), + maxIn = 0, + maxOut = 0; - function handleIn(vEntry) { - return function(uEntry) { - if (uEntry.merged) { - return; - } - if (_.isUndefined(uEntry.barycenter) || - _.isUndefined(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter) { - mergeEntries(vEntry, uEntry); - } - }; - } + _.forEach(g.nodes(), function(v) { + fasGraph.setNode(v, { v: v, "in": 0, out: 0 }); + }); - function handleOut(vEntry) { - return function(wEntry) { - wEntry["in"].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + _.forEach(g.edges(), function(e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0, + weight = weightFn(e), + edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); + maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); + }); - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - _.forEach(entry["in"].reverse(), handleIn(entry)); - _.forEach(entry.out, handleOut(entry)); - } + var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); + var zeroIdx = maxIn + 1; - return _.map(_.filter(entries, function(entry) { return !entry.merged; }), - function(entry) { - return _.pick(entry, ["vs", "i", "barycenter", "weight"]); - }); + _.forEach(fasGraph.nodes(), function(v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; } -function mergeEntries(target, source) { - var sum = 0; - var weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry["in"]) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/sort-subgraph.js ***! - \*****************************************************************************/ +/***/ "./node_modules/dagre/lib/layout.js": +/*!******************************************!*\ + !*** ./node_modules/dagre/lib/layout.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/barycenter.js"); -var resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/resolve-conflicts.js"); -var sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js"); +"use strict"; -module.exports = sortSubgraph; -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v); - var node = g.node(v); - var bl = node ? node.borderLeft : undefined; - var br = node ? node.borderRight: undefined; - var subgraphs = {}; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre/lib/acyclic.js"), + normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre/lib/normalize.js"), + rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre/lib/rank/index.js"), + normalizeRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").normalizeRanks, + parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre/lib/parent-dummy-chains.js"), + removeEmptyRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").removeEmptyRanks, + nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre/lib/nesting-graph.js"), + addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre/lib/add-border-segments.js"), + coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre/lib/coordinate-system.js"), + order = __webpack_require__(/*! ./order */ "./node_modules/dagre/lib/order/index.js"), + position = __webpack_require__(/*! ./position */ "./node_modules/dagre/lib/position/index.js"), + util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"), + Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; - if (bl) { - movable = _.filter(movable, function(w) { - return w !== bl && w !== br; - }); - } +module.exports = layout; - var barycenters = barycenter(g, movable); - _.forEach(barycenters, function(entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (_.has(subgraphResult, "barycenter")) { - mergeBarycenters(entry, subgraphResult); +function layout(g, opts) { + var time = opts && opts.debugTiming ? util.time : util.notime; + time("layout", function() { + var layoutGraph = time(" buildLayoutGraph", + function() { return buildLayoutGraph(g); }); + time(" runLayout", function() { runLayout(layoutGraph, time); }); + time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); }); + }); +} + +function runLayout(g, time) { + time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); }); + time(" removeSelfEdges", function() { removeSelfEdges(g); }); + time(" acyclic", function() { acyclic.run(g); }); + time(" nestingGraph.run", function() { nestingGraph.run(g); }); + time(" rank", function() { rank(util.asNonCompoundGraph(g)); }); + time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); }); + time(" removeEmptyRanks", function() { removeEmptyRanks(g); }); + time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); }); + time(" normalizeRanks", function() { normalizeRanks(g); }); + time(" assignRankMinMax", function() { assignRankMinMax(g); }); + time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); }); + time(" normalize.run", function() { normalize.run(g); }); + time(" parentDummyChains", function() { parentDummyChains(g); }); + time(" addBorderSegments", function() { addBorderSegments(g); }); + time(" order", function() { order(g); }); + time(" insertSelfEdges", function() { insertSelfEdges(g); }); + time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); }); + time(" position", function() { position(g); }); + time(" positionSelfEdges", function() { positionSelfEdges(g); }); + time(" removeBorderNodes", function() { removeBorderNodes(g); }); + time(" normalize.undo", function() { normalize.undo(g); }); + time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); }); + time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); }); + time(" translateGraph", function() { translateGraph(g); }); + time(" assignNodeIntersects", function() { assignNodeIntersects(g); }); + time(" reversePoints", function() { reversePointsForReversedEdges(g); }); + time(" acyclic.undo", function() { acyclic.undo(g); }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + _.forEach(inputGraph.nodes(), function(v) { + var inputLabel = inputGraph.node(v), + layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; } } }); - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); + _.forEach(inputGraph.edges(), function(e) { + var inputLabel = inputGraph.edge(e), + layoutLabel = layoutGraph.edge(e); - var result = sort(entries, biasRight); - - if (bl) { - result.vs = _.flatten([bl, result.vs, br], true); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!_.has(result, "barycenter")) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = (result.barycenter * result.weight + - blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; + inputLabel.points = layoutLabel.points; + if (_.has(layoutLabel, "x")) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - _.forEach(entries, function(entry) { - entry.vs = _.flatten(entry.vs.map(function(v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }), true); }); -} -function mergeBarycenters(target, other) { - if (!_.isUndefined(target.barycenter)) { - target.barycenter = (target.barycenter * target.weight + - other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; } +var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], + graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, + graphAttrs = ["acyclicer", "ranker", "rankdir", "align"], + nodeNumAttrs = ["width", "height"], + nodeDefaults = { width: 0, height: 0 }, + edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"], + edgeDefaults = { + minlen: 1, weight: 1, width: 0, height: 0, + labeloffset: 10, labelpos: "r" + }, + edgeAttrs = ["labelpos"]; -/***/ }), - -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js": -/*!********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/order/sort.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new Graph({ multigraph: true, compound: true }), + graph = canonicalize(inputGraph.graph()); -module.exports = sort; + g.setGraph(_.merge({}, + graphDefaults, + selectNumberAttrs(graph, graphNumAttrs), + _.pick(graph, graphAttrs))); -function sort(entries, biasRight) { - var parts = util.partition(entries, function(entry) { - return _.has(entry, "barycenter"); + _.forEach(inputGraph.nodes(), function(v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); }); - var sortable = parts.lhs, - unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - _.forEach(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + _.forEach(inputGraph.edges(), function(e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge(e, _.merge({}, + edgeDefaults, + selectNumberAttrs(edge, edgeNumAttrs), + _.pick(edge, edgeAttrs))); }); - var result = { vs: _.flatten(vs, true) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; + return g; } -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = _.last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== "c") { + if (graph.rankdir === "TB" || graph.rankdir === "BT") { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); } -function compareWithBias(bias) { - return function(entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v), + w = g.node(e.w), + label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + util.addDummyNode(g, "edge-proxy", label, "_ep"); } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; + }); } +function assignRankMinMax(g) { + var maxRank = 0; + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + maxRank = _.max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} -/***/ }), +function removeEdgeLabelProxies(g) { + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "edge-proxy") { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/parent-dummy-chains.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY, + maxX = 0, + minY = Number.POSITIVE_INFINITY, + maxY = 0, + graphLabel = g.graph(), + marginX = graphLabel.marginx || 0, + marginY = graphLabel.marginy || 0; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); + function getExtremes(attrs) { + var x = attrs.x, + y = attrs.y, + w = attrs.width, + h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } -module.exports = parentDummyChains; + _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (_.has(edge, "x")) { + getExtremes(edge); + } + }); -function parentDummyChains(g) { - var postorderNums = postorder(g); + minX -= marginX; + minY -= marginY; - _.forEach(g.graph().dummyChains, function(v) { + _.forEach(g.nodes(), function(v) { var node = g.node(v); - var edgeObj = node.edgeObj; - var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); - var path = pathData.path; - var lca = pathData.lca; - var pathIdx = 0; - var pathV = path[pathIdx]; - var ascending = true; + node.x -= minX; + node.y -= minY; + }); - while (v !== edgeObj.w) { - node = g.node(v); + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + _.forEach(edge.points, function(p) { + p.x -= minX; + p.y -= minY; + }); + if (_.has(edge, "x")) { edge.x -= minX; } + if (_.has(edge, "y")) { edge.y -= minY; } + }); - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && - g.node(pathV).maxRank < node.rank) { - pathIdx++; - } + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} - if (pathV === lca) { - ascending = false; - } - } +function assignNodeIntersects(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e), + nodeV = g.node(e.v), + nodeW = g.node(e.w), + p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(util.intersectRect(nodeV, p1)); + edge.points.push(util.intersectRect(nodeW, p2)); + }); +} - if (!ascending) { - while (pathIdx < path.length - 1 && - g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { - pathIdx++; - } - pathV = path[pathIdx]; +function fixupEdgeLabelCoords(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (_.has(edge, "x")) { + if (edge.labelpos === "l" || edge.labelpos === "r") { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case "l": edge.x -= edge.width / 2 + edge.labeloffset; break; + case "r": edge.x += edge.width / 2 + edge.labeloffset; break; } + } + }); +} - g.setParent(v, pathV); - v = g.successors(v)[0]; +function reversePointsForReversedEdges(g) { + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); } }); } -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = []; - var wPath = []; - var low = Math.min(postorderNums[v].low, postorderNums[w].low); - var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); - var parent; - var lca; +function removeBorderNodes(g) { + _.forEach(g.nodes(), function(v) { + if (g.children(v).length) { + var node = g.node(v), + t = g.node(node.borderTop), + b = g.node(node.borderBottom), + l = g.node(_.last(node.borderLeft)), + r = g.node(_.last(node.borderRight)); - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && - (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } + _.forEach(g.nodes(), function(v) { + if (g.node(v).dummy === "border") { + g.removeNode(v); + } + }); +} - return { path: vPath.concat(wPath.reverse()), lca: lca }; +function removeSelfEdges(g) { + _.forEach(g.edges(), function(e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); } -function postorder(g) { - var result = {}; - var lim = 0; +function insertSelfEdges(g) { + var layers = util.buildLayerMatrix(g); + _.forEach(layers, function(layer) { + var orderShift = 0; + _.forEach(layer, function(v, i) { + var node = g.node(v); + node.order = i + orderShift; + _.forEach(node.selfEdges, function(selfEdge) { + util.addDummyNode(g, "selfedge", { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + (++orderShift), + e: selfEdge.e, + label: selfEdge.label + }, "_se"); + }); + delete node.selfEdges; + }); + }); +} - function dfs(v) { - var low = lim; - _.forEach(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - _.forEach(g.children(), dfs); +function positionSelfEdges(g) { + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "selfedge") { + var selfNode = g.node(node.e.v), + x = selfNode.x + selfNode.width / 2, + y = selfNode.y, + dx = node.x - x, + dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + 2 * dx / 3, y: y - dy }, + { x: x + 5 * dx / 6, y: y - dy }, + { x: x + dx , y: y }, + { x: x + 5 * dx / 6, y: y + dy }, + { x: x + 2 * dx / 3, y: y + dy } + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} - return result; +function selectNumberAttrs(obj, attrs) { + return _.mapValues(_.pick(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + _.forEach(attrs, function(v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js": -/*!*********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js ***! - \*********************************************************************/ +/***/ "./node_modules/dagre/lib/lodash.js": +/*!******************************************!*\ + !*** ./node_modules/dagre/lib/lodash.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +/* global window */ +var lodash; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); +if (true) { + try { + lodash = { + cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"), + constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), + defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), + each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), + filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), + find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"), + flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"), + forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"), + forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"), + has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), + isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), + last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"), + map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), + mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"), + max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"), + merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"), + min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"), + minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"), + now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"), + pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), + range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), + reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), + sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"), + uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"), + values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"), + zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"), + }; + } catch (e) {} +} -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ +if (!lodash) { + lodash = window._; +} + +module.exports = lodash; + + +/***/ }), + +/***/ "./node_modules/dagre/lib/nesting-graph.js": +/*!*************************************************!*\ + !*** ./node_modules/dagre/lib/nesting-graph.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); module.exports = { - positionX: positionX, - findType1Conflicts: findType1Conflicts, - findType2Conflicts: findType2Conflicts, - addConflict: addConflict, - hasConflict: hasConflict, - verticalAlignment: verticalAlignment, - horizontalCompaction: horizontalCompaction, - alignCoordinates: alignCoordinates, - findSmallestWidthAlignment: findSmallestWidthAlignment, - balance: balance + run: run, + cleanup: cleanup }; /* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." */ -function findType1Conflicts(g, layering) { - var conflicts = {}; +function run(g) { + var root = util.addDummyNode(g, "root", {}, "_root"); + var depths = treeDepths(g); + var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; - function visitLayer(prevLayer, layer) { - var - // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = _.last(layer); + g.graph().nestingRoot = root; - _.forEach(layer, function(v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; + // Multiply minlen by nodeSep to align nodes on non-border ranks. + _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); - if (w || v === lastNode) { - _.forEach(layer.slice(scanPos, i +1), function(scanNode) { - _.forEach(g.predecessors(scanNode), function(u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && - !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - scanPos = i + 1; - k0 = k1; - } - }); + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; - return layer; - } + // Create border nodes and link them up + _.forEach(g.children(), function(child) { + dfs(g, root, nodeSep, weight, height, depths, child); + }); - _.reduce(layering, visitLayer); - return conflicts; + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; } -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - _.forEach(_.range(southPos, southEnd), function(i) { - v = south[i]; - if (g.node(v).dummy) { - _.forEach(g.predecessors(v), function(u) { - var uNode = g.node(u); - if (uNode.dummy && - (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); +function dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; } + var top = util.addBorderNode(g, "_bt"), + bottom = util.addBorderNode(g, "_bb"), + label = g.node(v); - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - _.forEach(south, function(v, southLookahead) { - if (g.node(v).dummy === "border") { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; - return south; - } + _.forEach(children, function(child) { + dfs(g, root, nodeSep, weight, height, depths, child); - _.reduce(layering, visitLayer); - return conflicts; -} + var childNode = g.node(child), + childTop = childNode.borderTop ? childNode.borderTop : child, + childBottom = childNode.borderBottom ? childNode.borderBottom : child, + thisWeight = childNode.borderTop ? weight : 2 * weight, + minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return _.find(g.predecessors(v), function(u) { - return g.node(u).dummy; + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true }); - } -} -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true + }); + }); - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); } - conflictsV[w] = true; } -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + _.forEach(children, function(child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; } - return _.has(conflicts[v], w); + _.forEach(g.children(), function(v) { dfs(v, 1); }); + return depths; } -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; +function sumWeights(g) { + return _.reduce(g.edges(), function(acc, e) { + return acc + g.edge(e).weight; + }, 0); +} - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + _.forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } }); +} - _.forEach(layering, function(layer) { - var prevIdx = -1; - _.forEach(layer, function(v) { - var ws = neighborFn(v); - if (ws.length) { - ws = _.sortBy(ws, function(w) { return pos[w]; }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && - prevIdx < pos[w] && - !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - return { root: root, align: align }; -} +/***/ }), -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? "borderLeft" : "borderRight"; +/***/ "./node_modules/dagre/lib/normalize.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre/lib/normalize.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } +"use strict"; - elem = stack.pop(); - } - } - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function(acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); +module.exports = { + run: run, + undo: undo +}; - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function run(g) { + g.graph().dummyChains = []; + _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); +} - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); +function normalizeEdge(g, e) { + var v = e.v, + vRank = g.node(v).rank, + w = e.w, + wRank = g.node(w).rank, + name = e.name, + edgeLabel = g.edge(e), + labelRank = edgeLabel.labelRank; - // Assign x coordinates to all nodes - _.forEach(align, function(v) { - xs[v] = xs[root[v]]; - }); + if (wRank === vRank + 1) return; - return xs; -} + g.removeEdge(e); + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, height: 0, + edgeLabel: edgeLabel, edgeObj: e, + rank: vRank + }; + dummy = util.addDummyNode(g, "edge", attrs, "_d"); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + attrs.dummy = "edge-label"; + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new Graph(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} - _.forEach(layering, function(layer) { - var u; - _.forEach(layer, function(v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); +function undo(g) { + _.forEach(g.graph().dummyChains, function(v) { + var node = g.node(v), + origLabel = node.edgeLabel, + w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === "edge-label") { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; } - u = v; - }); + v = w; + node = g.node(v); + } }); - - return blockGraph; } -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return _.minBy(_.values(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - _.forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); +/***/ }), - return max - min; - }); -} +/***/ "./node_modules/dagre/lib/order/add-subgraph-constraints.js": +/*!******************************************************************!*\ + !*** ./node_modules/dagre/lib/order/add-subgraph-constraints.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = _.values(alignTo), - alignToMin = _.min(alignToVals), - alignToMax = _.max(alignToVals); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); - _.forEach(["u", "d"], function(vert) { - _.forEach(["l", "r"], function(horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; +module.exports = addSubgraphConstraints; - var xsVals = _.values(xs); - delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; - if (delta) { - xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); + _.forEach(vs, function(v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; } - }); + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } }); -} -function balance(xss, align) { - return _.mapValues(xss.ul, function(ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = _.sortBy(_.map(xss, v)); - return (xs[1] + xs[2]) / 2; + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; } - }); + return g.node(v).order; + } + dfs(undefined); + */ } -function positionX(g) { - var layering = util.buildLayerMatrix(g); - var conflicts = _.merge( - findType1Conflicts(g, layering), - findType2Conflicts(g, layering)); - var xss = {}; - var adjustedLayering; - _.forEach(["u", "d"], function(vert) { - adjustedLayering = vert === "u" ? layering : _.values(layering).reverse(); - _.forEach(["l", "r"], function(horiz) { - if (horiz === "r") { - adjustedLayering = _.map(adjustedLayering, function(inner) { - return _.values(inner).reverse(); - }); - } +/***/ }), - var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, - align.root, align.align, horiz === "r"); - if (horiz === "r") { - xs = _.mapValues(xs, function(x) { return -x; }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} +/***/ "./node_modules/dagre/lib/order/barycenter.js": +/*!****************************************************!*\ + !*** ./node_modules/dagre/lib/order/barycenter.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function sep(nodeSep, edgeSep, reverseSep) { - return function(g, v, w) { - var vLabel = g.node(v); - var wLabel = g.node(w); - var sum = 0; - var delta; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); - sum += vLabel.width / 2; - if (_.has(vLabel, "labelpos")) { - switch (vLabel.labelpos.toLowerCase()) { - case "l": delta = -vLabel.width / 2; break; - case "r": delta = vLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; +module.exports = barycenter; - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; +function barycenter(g, movable) { + return _.map(movable, function(v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = _.reduce(inV, function(acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + (edge.weight * nodeU.order), + weight: acc.weight + edge.weight + }; + }, { sum: 0, weight: 0 }); - sum += wLabel.width / 2; - if (_.has(wLabel, "labelpos")) { - switch (wLabel.labelpos.toLowerCase()) { - case "l": delta = wLabel.width / 2; break; - case "r": delta = -wLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight + }; } - delta = 0; - - return sum; - }; + }); } -function width(g, v) { - return g.node(v).width; -} /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js": -/*!************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/position/index.js ***! - \************************************************************************/ +/***/ "./node_modules/dagre/lib/order/build-layer-graph.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre/lib/order/build-layer-graph.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; +module.exports = buildLayerGraph; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js"); -var positionX = __webpack_require__(/*! ./bk */ "./node_modules/dagre-d3/node_modules/dagre/lib/position/bk.js").positionX; +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new Graph({ compound: true }).setGraph({ root: root }) + .setDefaultNodeLabel(function(v) { return g.node(v); }); -module.exports = position; + _.forEach(g.nodes(), function(v) { + var node = g.node(v), + parent = g.parent(v); -function position(g) { - g = util.asNonCompoundGraph(g); + if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { + result.setNode(v); + result.setParent(v, parent || root); - positionY(g); - _.forEach(positionX(g), function(x, v) { - g.node(v).x = x; - }); -} + // This assumes we have only short edges! + _.forEach(g[relationship](v), function(e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !_.isUndefined(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); -function positionY(g) { - var layering = util.buildLayerMatrix(g); - var rankSep = g.graph().ranksep; - var prevY = 0; - _.forEach(layering, function(layer) { - var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); - _.forEach(layer, function(v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; + if (_.has(node, "minRank")) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank] + }); + } + } }); + + return result; } +function createRootNode(g) { + var v; + while (g.hasNode((v = _.uniqueId("_root")))); + return v; +} /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js": -/*!****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js ***! - \****************************************************************************/ +/***/ "./node_modules/dagre/lib/order/cross-count.js": +/*!*****************************************************!*\ + !*** ./node_modules/dagre/lib/order/cross-count.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; -var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").slack; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); -module.exports = feasibleTree; +module.exports = crossCount; /* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. * * Pre-conditions: * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. * * Post-conditions: * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. + * 1. The graph and layering matrix are left unchanged. * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." */ -function feasibleTree(g) { - var t = new Graph({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0]; - var size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i-1], layering[i]); } - - return t; + return cc; } -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - _.forEach(g.nodeEdges(v), function(e) { - var edgeV = e.v, - w = (v === edgeV) ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = _.zipObject(southLayer, + _.map(southLayer, function (v, i) { return i; })); + var southEntries = _.flatten(_.map(northLayer, function(v) { + return _.sortBy(_.map(g.outEdges(v), function(e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), "pos"); + }), true); - _.forEach(t.nodes(), dfs); - return t.nodeCount(); -} + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = _.map(new Array(treeSize), function() { return 0; }); -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return _.minBy(g.edges(), function(e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); + // Calculate the weighted crossings + var cc = 0; + _.forEach(southEntries.forEach(function(entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + while (index > 0) { + if (index % 2) { + weightSum += tree[index + 1]; + } + index = (index - 1) >> 1; + tree[index] += entry.weight; } - }); -} + cc += entry.weight * weightSum; + })); -function shiftRanks(t, g, delta) { - _.forEach(t.nodes(), function(v) { - g.node(v).rank += delta; - }); + return cc; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js": -/*!********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/index.js ***! - \********************************************************************/ +/***/ "./node_modules/dagre/lib/order/index.js": +/*!***********************************************!*\ + !*** ./node_modules/dagre/lib/order/index.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js"); -var longestPath = rankUtil.longestPath; -var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js"); -var networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre/lib/order/init-order.js"), + crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre/lib/order/cross-count.js"), + sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre/lib/order/sort-subgraph.js"), + buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre/lib/order/build-layer-graph.js"), + addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre/lib/order/add-subgraph-constraints.js"), + Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, + util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); -module.exports = rank; +module.exports = order; /* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. * * Pre-conditions: * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute * * Post-conditions: * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. */ -function rank(g) { - switch(g.graph().ranker) { - case "network-simplex": networkSimplexRanker(g); break; - case "tight-tree": tightTreeRanker(g); break; - case "longest-path": longestPathRanker(g); break; - default: networkSimplexRanker(g); +function order(g) { + var maxRank = util.maxRank(g), + downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"), + upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges"); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = util.buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = _.cloneDeep(layering); + bestCC = cc; + } } + + assignOrder(g, best); } -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; +function buildLayerGraphs(g, ranks, relationship) { + return _.map(ranks, function(rank) { + return buildLayerGraph(g, rank, relationship); + }); +} -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new Graph(); + _.forEach(layerGraphs, function(lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + _.forEach(sorted.vs, function(v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); } -function networkSimplexRanker(g) { - networkSimplex(g); +function assignOrder(g, layering) { + _.forEach(layering, function(layer) { + _.forEach(layer, function(v, i) { + g.node(v).order = i; + }); + }); } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js": -/*!******************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/network-simplex.js ***! - \******************************************************************************/ +/***/ "./node_modules/dagre/lib/order/init-order.js": +/*!****************************************************!*\ + !*** ./node_modules/dagre/lib/order/init-order.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/feasible-tree.js"); -var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").slack; -var initRank = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js").longestPath; -var preorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").alg.preorder; -var postorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").alg.postorder; -var simplify = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js").simplify; - -module.exports = networkSimplex; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; +module.exports = initOrder; /* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. */ -function networkSimplex(g) { - g = simplify(g); - initRank(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); +function initOrder(g) { + var visited = {}, + simpleNodes = _.filter(g.nodes(), function(v) { + return !g.children(v).length; + }), + maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })), + layers = _.map(_.range(maxRank + 1), function() { return []; }); - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); + function dfs(v) { + if (_.has(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + _.forEach(g.successors(v), dfs); } -} -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - _.forEach(vs, function(v) { - assignCutValue(t, g, v); - }); -} + var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); + _.forEach(orderedVs, dfs); -function assignCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); + return layers; } -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child); - var parent = childLab.parent; - // True if the child is on the tail end of the edge in the directed graph - var childIsTail = true; - // The graph's view of the tree edge we're inspecting - var graphEdge = g.edge(child, parent); - // The accumulated cut value for the edge between this node and its parent - var cutValue = 0; - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } +/***/ }), - cutValue = graphEdge.weight; +/***/ "./node_modules/dagre/lib/order/resolve-conflicts.js": +/*!***********************************************************!*\ + !*** ./node_modules/dagre/lib/order/resolve-conflicts.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - _.forEach(g.nodeEdges(child), function(e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; +"use strict"; - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); + +module.exports = resolveConflicts; + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + _.forEach(entries, function(entry, i) { + var tmp = mappedEntries[entry.v] = { + indegree: 0, + "in": [], + out: [], + vs: [entry.v], + i: i + }; + if (!_.isUndefined(entry.barycenter)) { + tmp.barycenter = entry.barycenter; + tmp.weight = entry.weight; } }); - return cutValue; + _.forEach(cg.edges(), function(e) { + var entryV = mappedEntries[e.v], + entryW = mappedEntries[e.w]; + if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = _.filter(mappedEntries, function(entry) { + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); } -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function(uEntry) { + if (uEntry.merged) { + return; + } + if (_.isUndefined(uEntry.barycenter) || + _.isUndefined(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter) { + mergeEntries(vEntry, uEntry); + } + }; } - dfsAssignLowLim(tree, {}, 1, root); + + function handleOut(vEntry) { + return function(wEntry) { + wEntry["in"].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + _.forEach(entry["in"].reverse(), handleIn(entry)); + _.forEach(entry.out, handleOut(entry)); + } + + return _.map(_.filter(entries, function(entry) { return !entry.merged; }), + function(entry) { + return _.pick(entry, ["vs", "i", "barycenter", "weight"]); + }); + } -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim; - var label = tree.node(v); +function mergeEntries(target, source) { + var sum = 0, + weight = 0; - visited[v] = true; - _.forEach(tree.neighbors(v), function(w) { - if (!_.has(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; } - return nextLim; + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; } -function leaveEdge(tree) { - return _.find(tree.edges(), function(e) { - return tree.edge(e).cutvalue < 0; - }); -} -function enterEdge(t, g, edge) { - var v = edge.v; - var w = edge.w; +/***/ }), - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } +/***/ "./node_modules/dagre/lib/order/sort-subgraph.js": +/*!*******************************************************!*\ + !*** ./node_modules/dagre/lib/order/sort-subgraph.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var vLabel = t.node(v); - var wLabel = t.node(w); - var tailLabel = vLabel; - var flip = false; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre/lib/order/barycenter.js"), + resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre/lib/order/resolve-conflicts.js"), + sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre/lib/order/sort.js"); - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; +module.exports = sortSubgraph; + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v), + node = g.node(v), + bl = node ? node.borderLeft : undefined, + br = node ? node.borderRight: undefined, + subgraphs = {}; + + if (bl) { + movable = _.filter(movable, function(w) { + return w !== bl && w !== br; + }); } - var candidates = _.filter(g.edges(), function(edge) { - return flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel); + var barycenters = barycenter(g, movable); + _.forEach(barycenters, function(entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (_.has(subgraphResult, "barycenter")) { + mergeBarycenters(entry, subgraphResult); + } + } }); - return _.minBy(candidates, function(edge) { return slack(g, edge); }); + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = _.flatten([bl, result.vs, br], true); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!_.has(result, "barycenter")) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = (result.barycenter * result.weight + + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; } -function exchangeEdges(t, g, e, f) { - var v = e.v; - var w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); +function expandSubgraphs(entries, subgraphs) { + _.forEach(entries, function(entry) { + entry.vs = _.flatten(entry.vs.map(function(v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }), true); + }); } -function updateRanks(t, g) { - var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }); - var vs = preorder(t, root); - vs = vs.slice(1); - _.forEach(vs, function(v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; +function mergeBarycenters(target, other) { + if (!_.isUndefined(target.barycenter)) { + target.barycenter = (target.barycenter * target.weight + + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); +/***/ }), + +/***/ "./node_modules/dagre/lib/order/sort.js": +/*!**********************************************!*\ + !*** ./node_modules/dagre/lib/order/sort.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); + +module.exports = sort; + +function sort(entries, biasRight) { + var parts = util.partition(entries, function(entry) { + return _.has(entry, "barycenter"); + }); + var sortable = parts.lhs, + unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + _.forEach(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); }); + + var result = { vs: _.flatten(vs, true) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; } -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = _.last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; } -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +function compareWithBias(bias) { + return function(entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js": -/*!*******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/rank/util.js ***! - \*******************************************************************/ +/***/ "./node_modules/dagre/lib/parent-dummy-chains.js": +/*!*******************************************************!*\ + !*** ./node_modules/dagre/lib/parent-dummy-chains.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); +module.exports = parentDummyChains; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); +function parentDummyChains(g) { + var postorderNums = postorder(g); -module.exports = { - longestPath: longestPath, - slack: slack -}; + _.forEach(g.graph().dummyChains, function(v) { + var node = g.node(v), + edgeObj = node.edgeObj, + pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w), + path = pathData.path, + lca = pathData.lca, + pathIdx = 0, + pathV = path[pathIdx], + ascending = true; -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; + while (v !== edgeObj.w) { + node = g.node(v); - function dfs(v) { - var label = g.node(v); - if (_.has(visited, v)) { - return label.rank; - } - visited[v] = true; + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && + g.node(pathV).maxRank < node.rank) { + pathIdx++; + } - var rank = _.min(_.map(g.outEdges(v), function(e) { - return dfs(e.w) - g.edge(e).minlen; - })); + if (pathV === lca) { + ascending = false; + } + } - if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null) { // return value of _.map([null]) - rank = 0; + if (!ascending) { + while (pathIdx < path.length - 1 && + g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; } + }); +} - return (label.rank = rank); +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = [], + wPath = [], + low = Math.min(postorderNums[v].low, postorderNums[w].low), + lim = Math.max(postorderNums[v].lim, postorderNums[w].lim), + parent, + lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && + (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); } - _.forEach(g.sources(), dfs); + return { path: vPath.concat(wPath.reverse()), lca: lca }; } -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +function postorder(g) { + var result = {}, + lim = 0; + + function dfs(v) { + var low = lim; + _.forEach(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + _.forEach(g.children(), dfs); + + return result; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/util.js": -/*!**************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/util.js ***! - \**************************************************************/ +/***/ "./node_modules/dagre/lib/position/bk.js": +/*!***********************************************!*\ + !*** ./node_modules/dagre/lib/position/bk.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* eslint "no-console": off */ +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, + util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/dagre/lib/lodash.js"); -var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre-d3/node_modules/dagre/lib/graphlib.js").Graph; +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ module.exports = { - addDummyNode: addDummyNode, - simplify: simplify, - asNonCompoundGraph: asNonCompoundGraph, - successorWeights: successorWeights, - predecessorWeights: predecessorWeights, - intersectRect: intersectRect, - buildLayerMatrix: buildLayerMatrix, - normalizeRanks: normalizeRanks, - removeEmptyRanks: removeEmptyRanks, - addBorderNode: addBorderNode, - maxRank: maxRank, - partition: partition, - time: time, - notime: notime + positionX: positionX, + findType1Conflicts: findType1Conflicts, + findType2Conflicts: findType2Conflicts, + addConflict: addConflict, + hasConflict: hasConflict, + verticalAlignment: verticalAlignment, + horizontalCompaction: horizontalCompaction, + alignCoordinates: alignCoordinates, + findSmallestWidthAlignment: findSmallestWidthAlignment, + balance: balance }; /* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = _.uniqueId(name); - } while (g.hasNode(v)); + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} + function visitLayer(prevLayer, layer) { + var + // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = _.last(layer); -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new Graph().setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); - _.forEach(g.edges(), function(e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; - var label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen) + _.forEach(layer, function(v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + _.forEach(layer.slice(scanPos, i +1), function(scanNode) { + _.forEach(g.predecessors(scanNode), function(u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && + !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + scanPos = i + 1; + k0 = k1; + } }); - }); - return simplified; -} -function asNonCompoundGraph(g) { - var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - _.forEach(g.edges(), function(e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; + return layer; + } + + _.reduce(layering, visitLayer); + return conflicts; } -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var sucs = {}; - _.forEach(g.outEdges(v), function(e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + _.forEach(_.range(southPos, southEnd), function(i) { + v = south[i]; + if (g.node(v).dummy) { + _.forEach(g.predecessors(v), function(u) { + var uNode = g.node(u); + if (uNode.dummy && + (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} + } -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var preds = {}; - _.forEach(g.inEdges(v), function(e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + _.forEach(south, function(v, southLookahead) { + if (g.node(v).dummy === "border") { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; + return south; + } - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; + _.reduce(layering, visitLayer); + return conflicts; +} - if (!dx && !dy) { - throw new Error("Not possible to find intersection inside of the rectangle"); +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return _.find(g.predecessors(v), function(u) { + return g.node(u).dummy; + }); } +} - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = h * dx / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = w * dy / dx; +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; } - return { x: x + sx, y: y + sy }; + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; } -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - var rank = node.rank; - if (!_.isUndefined(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return _.has(conflicts[v], w); } /* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. */ -function normalizeRanks(g) { - var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (_.has(node, "rank")) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; - var layers = []; - _.forEach(g.nodes(), function(v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + _.forEach(layering, function(layer) { + _.forEach(layer, function(v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); }); - var delta = 0; - var nodeRankFactor = g.graph().nodeRankFactor; - _.forEach(layers, function(vs, i) { - if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - _.forEach(vs, function(v) { g.node(v).rank += delta; }); - } + _.forEach(layering, function(layer) { + var prevIdx = -1; + _.forEach(layer, function(v) { + var ws = neighborFn(v); + if (ws.length) { + ws = _.sortBy(ws, function(w) { return pos[w]; }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && + prevIdx < pos[w] && + !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); }); -} -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0 - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, "border", node, prefix); + return { root: root, align: align }; } -function maxRank(g) { - return _.max(_.map(g.nodes(), function(v) { - var rank = g.node(v).rank; - if (!_.isUndefined(rank)) { - return rank; - } - })); -} +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? "borderLeft" : "borderRight"; -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - _.forEach(collection, function(value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function time(name, fn) { - var start = _.now(); - try { - return fn(); - } finally { - console.log(name + " time: " + (_.now() - start) + "ms"); + elem = stack.pop(); + } } -} - -function notime(name, fn) { - return fn(); -} + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } -/***/ }), + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function(acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); -/***/ "./node_modules/dagre-d3/node_modules/dagre/lib/version.js": -/*!*****************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/dagre/lib/version.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } -module.exports = "0.8.5"; + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + // Assign x coordinates to all nodes + _.forEach(align, function(v) { + xs[v] = xs[root[v]]; + }); -/***/ }), + return xs; +} -/***/ "./node_modules/dagre-d3/node_modules/graphlib/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/index.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -/** - * Copyright (c) 2014, Chris Pettitt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new Graph(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); -var lib = __webpack_require__(/*! ./lib */ "./node_modules/dagre-d3/node_modules/graphlib/lib/index.js"); + _.forEach(layering, function(layer) { + var u; + _.forEach(layer, function(v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); -module.exports = { - Graph: lib.Graph, - json: __webpack_require__(/*! ./lib/json */ "./node_modules/dagre-d3/node_modules/graphlib/lib/json.js"), - alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js"), - version: lib.version -}; + return blockGraph; +} +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return _.minBy(_.values(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; -/***/ }), + _.forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js": -/*!***************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + return max - min; + }); +} -module.exports = components; +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = _.values(alignTo), + alignToMin = _.min(alignToVals), + alignToMax = _.max(alignToVals); -function components(g) { - var visited = {}; - var cmpts = []; - var cmpt; + _.forEach(["u", "d"], function(vert) { + _.forEach(["l", "r"], function(horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - cmpt.push(v); - _.each(g.successors(v), dfs); - _.each(g.predecessors(v), dfs); - } + var xsVals = _.values(xs); + delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); - _.each(g.nodes(), function(v) { - cmpt = []; - dfs(v); - if (cmpt.length) { - cmpts.push(cmpt); - } + if (delta) { + xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); + } + }); }); - - return cmpts; } - -/***/ }), - -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js": -/*!********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); - -module.exports = dfs; - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!_.isArray(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = []; - var visited = {}; - _.each(vs, function(v) { - if (!g.hasNode(v)) { - throw new Error("Graph does not have node: " + v); +function balance(xss, align) { + return _.mapValues(xss.ul, function(ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = _.sortBy(_.map(xss, v)); + return (xs[1] + xs[2]) / 2; } - - doDfs(g, v, order === "post", visited, navigation, acc); }); - return acc; } -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!_.has(visited, v)) { - visited[v] = true; +function positionX(g) { + var layering = util.buildLayerMatrix(g), + conflicts = _.merge(findType1Conflicts(g, layering), + findType2Conflicts(g, layering)); - if (!postorder) { acc.push(v); } - _.each(navigation(v), function(w) { - doDfs(g, w, postorder, visited, navigation, acc); + var xss = {}, + adjustedLayering; + _.forEach(["u", "d"], function(vert) { + adjustedLayering = vert === "u" ? layering : _.values(layering).reverse(); + _.forEach(["l", "r"], function(horiz) { + if (horiz === "r") { + adjustedLayering = _.map(adjustedLayering, function(inner) { + return _.values(inner).reverse(); + }); + } + + var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, + align.root, align.align, + horiz === "r"); + if (horiz === "r") { + xs = _.mapValues(xs, function(x) { return -x; }); + } + xss[vert + horiz] = xs; }); - if (postorder) { acc.push(v); } - } + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); } +function sep(nodeSep, edgeSep, reverseSep) { + return function(g, v, w) { + var vLabel = g.node(v), + wLabel = g.node(w), + sum = 0, + delta; -/***/ }), + sum += vLabel.width / 2; + if (_.has(vLabel, "labelpos")) { + switch (vLabel.labelpos.toLowerCase()) { + case "l": delta = -vLabel.width / 2; break; + case "r": delta = vLabel.width / 2; break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js ***! - \*****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; -var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js"); -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + sum += wLabel.width / 2; + if (_.has(wLabel, "labelpos")) { + switch (wLabel.labelpos.toLowerCase()) { + case "l": delta = wLabel.width / 2; break; + case "r": delta = -wLabel.width / 2; break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; -module.exports = dijkstraAll; + return sum; + }; +} -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform(g.nodes(), function(acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, {}); +function width(g, v) { + return g.node(v).width; } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js": -/*!*************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js ***! - \*************************************************************************/ +/***/ "./node_modules/dagre/lib/position/index.js": +/*!**************************************************!*\ + !*** ./node_modules/dagre/lib/position/index.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js"); - -module.exports = dijkstra; - -var DEFAULT_WEIGHT_FUNC = _.constant(1); - -function dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra(g, String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); -} +"use strict"; -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}; - var pq = new PriorityQueue(); - var v, vEntry; - var updateNeighbors = function(edge) { - var w = edge.v !== v ? edge.v : edge.w; - var wEntry = results[w]; - var weight = weightFn(edge); - var distance = vEntry.distance + weight; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"), + positionX = __webpack_require__(/*! ./bk */ "./node_modules/dagre/lib/position/bk.js").positionX; - if (weight < 0) { - throw new Error("dijkstra does not allow negative edge weights. " + - "Bad edge: " + edge + " Weight: " + weight); - } +module.exports = position; - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; +function position(g) { + g = util.asNonCompoundGraph(g); - g.nodes().forEach(function(v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); + positionY(g); + _.forEach(positionX(g), function(x, v) { + g.node(v).x = x; }); +} - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; +function positionY(g) { + var layering = util.buildLayerMatrix(g), + rankSep = g.graph().ranksep, + prevY = 0; + _.forEach(layering, function(layer) { + var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); + _.forEach(layer, function(v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); } + /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js": -/*!****************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js ***! - \****************************************************************************/ +/***/ "./node_modules/dagre/lib/rank/feasible-tree.js": +/*!******************************************************!*\ + !*** ./node_modules/dagre/lib/rank/feasible-tree.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -var tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js"); - -module.exports = findCycles; - -function findCycles(g) { - return _.filter(tarjan(g), function(cmpt) { - return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); - }); -} +"use strict"; -/***/ }), +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, + slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack; -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +module.exports = feasibleTree; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new Graph({ directed: false }); -module.exports = floydWarshall; + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0], + size = g.nodeCount(); + t.setNode(start, {}); -var DEFAULT_WEIGHT_FUNC = _.constant(1); + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall(g, - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); + return t; } -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}; - var nodes = g.nodes(); - - nodes.forEach(function(v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function(w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + _.forEach(g.nodeEdges(v), function(e) { + var edgeV = e.v, + w = (v === edgeV) ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); } }); - edgeFn(v).forEach(function(edge) { - var w = edge.v === v ? edge.w : edge.v; - var d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); + } - nodes.forEach(function(k) { - var rowK = results[k]; - nodes.forEach(function(i) { - var rowI = results[i]; - nodes.forEach(function(j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); + _.forEach(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return _.minBy(g.edges(), function(e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } }); +} - return results; +function shiftRanks(t, g, delta) { + _.forEach(t.nodes(), function(v) { + g.node(v).rank += delta; + }); } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js": -/*!**********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js ***! - \**********************************************************************/ +/***/ "./node_modules/dagre/lib/rank/index.js": +/*!**********************************************!*\ + !*** ./node_modules/dagre/lib/rank/index.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { - components: __webpack_require__(/*! ./components */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js"), - dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js"), - dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js"), - findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js"), - floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js"), - isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js"), - postorder: __webpack_require__(/*! ./postorder */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js"), - preorder: __webpack_require__(/*! ./preorder */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js"), - prim: __webpack_require__(/*! ./prim */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js"), - tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js"), - topsort: __webpack_require__(/*! ./topsort */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js") -}; - - -/***/ }), +"use strict"; -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js": -/*!***************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js"); +var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js"), + longestPath = rankUtil.longestPath, + feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"), + networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre/lib/rank/network-simplex.js"); -module.exports = isAcyclic; +module.exports = rank; -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof topsort.CycleException) { - return false; - } - throw e; +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch(g.graph().ranker) { + case "network-simplex": networkSimplexRanker(g); break; + case "tight-tree": tightTreeRanker(g); break; + case "longest-path": longestPathRanker(g); break; + default: networkSimplexRanker(g); } - return true; } +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; -/***/ }), - -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js": -/*!**************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js"); - -module.exports = postorder; - -function postorder(g, vs) { - return dfs(g, vs, "post"); +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); } - -/***/ }), - -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js": -/*!*************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js"); - -module.exports = preorder; - -function preorder(g, vs) { - return dfs(g, vs, "pre"); +function networkSimplexRanker(g) { + networkSimplex(g); } /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js": -/*!*********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js ***! - \*********************************************************************/ +/***/ "./node_modules/dagre/lib/rank/network-simplex.js": +/*!********************************************************!*\ + !*** ./node_modules/dagre/lib/rank/network-simplex.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -var Graph = __webpack_require__(/*! ../graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"); -var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js"); - -module.exports = prim; - -function prim(g, weightFunc) { - var result = new Graph(); - var parents = {}; - var pq = new PriorityQueue(); - var v; +"use strict"; - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v; - var pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - if (g.nodeCount() === 0) { - return result; - } +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), + feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"), + slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack, + initRank = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").longestPath, + preorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.preorder, + postorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.postorder, + simplify = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js").simplify; - _.each(g.nodes(), function(v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); +module.exports = networkSimplex; - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error("Input graph is not connected: " + g); - } else { - init = true; - } +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + initRank(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); - g.nodeEdges(v).forEach(updateNeighbors); + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); } - - return result; } +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + _.forEach(vs, function(v) { + assignCutValue(t, g, v); + }); +} -/***/ }), +function assignCutValue(t, g, child) { + var childLab = t.node(child), + parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js": -/*!***********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child), + parent = childLab.parent, + // True if the child is on the tail end of the edge in the directed graph + childIsTail = true, + // The graph's view of the tree edge we're inspecting + graphEdge = g.edge(child, parent), + // The accumulated cut value for the edge between this node and its parent + cutValue = 0; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } -module.exports = tarjan; + cutValue = graphEdge.weight; -function tarjan(g) { - var index = 0; - var stack = []; - var visited = {}; // node id -> { onStack, lowlink, index } - var results = []; + _.forEach(g.nodeEdges(child), function(e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; - function dfs(v) { - var entry = visited[v] = { - onStack: true, - lowlink: index, - index: index++ - }; - stack.push(v); + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; - g.successors(v).forEach(function(w) { - if (!_.has(visited, w)) { - dfs(w); - entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); - } else if (visited[w].onStack) { - entry.lowlink = Math.min(entry.lowlink, visited[w].index); + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; } - }); - - if (entry.lowlink === entry.index) { - var cmpt = []; - var w; - do { - w = stack.pop(); - visited[w].onStack = false; - cmpt.push(w); - } while (v !== w); - results.push(cmpt); - } - } - - g.nodes().forEach(function(v) { - if (!_.has(visited, v)) { - dfs(v); } }); - return results; + return cutValue; } +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} -/***/ }), +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim, + label = tree.node(v); -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js": -/*!************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + visited[v] = true; + _.forEach(tree.neighbors(v), function(w) { + if (!_.has(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } -module.exports = topsort; -topsort.CycleException = CycleException; + return nextLim; +} -function topsort(g) { - var visited = {}; - var stack = {}; - var results = []; +function leaveEdge(tree) { + return _.find(tree.edges(), function(e) { + return tree.edge(e).cutvalue < 0; + }); +} - function visit(node) { - if (_.has(stack, node)) { - throw new CycleException(); - } +function enterEdge(t, g, edge) { + var v = edge.v, + w = edge.w; - if (!_.has(visited, node)) { - stack[node] = true; - visited[node] = true; - _.each(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; } - _.each(g.sinks(), visit); + var vLabel = t.node(v), + wLabel = t.node(w), + tailLabel = vLabel, + flip = false; - if (_.size(visited) !== g.nodeCount()) { - throw new CycleException(); + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; } - return results; -} + var candidates = _.filter(g.edges(), function(edge) { + return flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel); + }); -function CycleException() {} -CycleException.prototype = new Error(); // must be an instance of Error to pass testing + return _.minBy(candidates, function(edge) { return slack(g, edge); }); +} -/***/ }), +function exchangeEdges(t, g, e, f) { + var v = e.v, + w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js": -/*!********************************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function updateRanks(t, g) { + var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }), + vs = preorder(t, root); + vs = vs.slice(1); + _.forEach(vs, function(v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } -module.exports = PriorityQueue; + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} -/** - * A min-priority queue data structure. This algorithm is derived from Cormen, - * et al., "Introduction to Algorithms". The basic idea of a min-priority - * queue is that you can efficiently (in O(1) time) get the smallest key in - * the queue. Adding and removing elements takes O(log n) time. A key can - * have its priority decreased in O(log n) time. +/* + * Returns true if the edge is in the tree. */ -function PriorityQueue() { - this._arr = []; - this._keyIndices = {}; +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); } -/** - * Returns the number of elements in the queue. Takes `O(1)` time. +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. */ -PriorityQueue.prototype.size = function() { - return this._arr.length; -}; +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} -/** - * Returns the keys that are in the queue. Takes `O(n)` time. - */ -PriorityQueue.prototype.keys = function() { - return this._arr.map(function(x) { return x.key; }); -}; -/** - * Returns `true` if **key** is in the queue and `false` if not. - */ -PriorityQueue.prototype.has = function(key) { - return _.has(this._keyIndices, key); -}; +/***/ }), -/** - * Returns the priority for **key**. If **key** is not present in the queue - * then this function returns `undefined`. Takes `O(1)` time. - * - * @param {Object} key - */ -PriorityQueue.prototype.priority = function(key) { - var index = this._keyIndices[key]; - if (index !== undefined) { - return this._arr[index].priority; - } -}; +/***/ "./node_modules/dagre/lib/rank/util.js": +/*!*********************************************!*\ + !*** ./node_modules/dagre/lib/rank/util.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Returns the key for the minimum element in this queue. If the queue is - * empty this function throws an Error. Takes `O(1)` time. - */ -PriorityQueue.prototype.min = function() { - if (this.size() === 0) { - throw new Error("Queue underflow"); - } - return this._arr[0].key; -}; +"use strict"; -/** - * Inserts a new key into the priority queue. If the key already exists in - * the queue this function returns `false`; otherwise it will return `true`. - * Takes `O(n)` time. - * - * @param {Object} key the key to add - * @param {Number} priority the initial priority for the key - */ -PriorityQueue.prototype.add = function(key, priority) { - var keyIndices = this._keyIndices; - key = String(key); - if (!_.has(keyIndices, key)) { - var arr = this._arr; - var index = arr.length; - keyIndices[key] = index; - arr.push({key: key, priority: priority}); - this._decrease(index); - return true; - } - return false; -}; -/** - * Removes and returns the smallest key in the queue. Takes `O(log n)` time. - */ -PriorityQueue.prototype.removeMin = function() { - this._swap(0, this._arr.length - 1); - var min = this._arr.pop(); - delete this._keyIndices[min.key]; - this._heapify(0); - return min.key; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); + +module.exports = { + longestPath: longestPath, + slack: slack }; -/** - * Decreases the priority for **key** to **priority**. If the new priority is - * greater than the previous priority, this function will throw an Error. +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. * - * @param {Object} key the key for which to raise priority - * @param {Number} priority the new priority for the key + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. */ -PriorityQueue.prototype.decrease = function(key, priority) { - var index = this._keyIndices[key]; - if (priority > this._arr[index].priority) { - throw new Error("New priority is greater than current priority. " + - "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); - } - this._arr[index].priority = priority; - this._decrease(index); -}; +function longestPath(g) { + var visited = {}; -PriorityQueue.prototype._heapify = function(i) { - var arr = this._arr; - var l = 2 * i; - var r = l + 1; - var largest = i; - if (l < arr.length) { - largest = arr[l].priority < arr[largest].priority ? l : largest; - if (r < arr.length) { - largest = arr[r].priority < arr[largest].priority ? r : largest; - } - if (largest !== i) { - this._swap(i, largest); - this._heapify(largest); + function dfs(v) { + var label = g.node(v); + if (_.has(visited, v)) { + return label.rank; } - } -}; + visited[v] = true; -PriorityQueue.prototype._decrease = function(index) { - var arr = this._arr; - var priority = arr[index].priority; - var parent; - while (index !== 0) { - parent = index >> 1; - if (arr[parent].priority < priority) { - break; + var rank = _.min(_.map(g.outEdges(v), function(e) { + return dfs(e.w) - g.edge(e).minlen; + })); + + if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null) { // return value of _.map([null]) + rank = 0; } - this._swap(index, parent); - index = parent; + + return (label.rank = rank); } -}; -PriorityQueue.prototype._swap = function(i, j) { - var arr = this._arr; - var keyIndices = this._keyIndices; - var origArrI = arr[i]; - var origArrJ = arr[j]; - arr[i] = origArrJ; - arr[j] = origArrI; - keyIndices[origArrJ.key] = i; - keyIndices[origArrI.key] = j; -}; + _.forEach(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js ***! - \******************************************************************/ +/***/ "./node_modules/dagre/lib/util.js": +/*!****************************************!*\ + !*** ./node_modules/dagre/lib/util.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), + Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; -module.exports = Graph; +module.exports = { + addDummyNode: addDummyNode, + simplify: simplify, + asNonCompoundGraph: asNonCompoundGraph, + successorWeights: successorWeights, + predecessorWeights: predecessorWeights, + intersectRect: intersectRect, + buildLayerMatrix: buildLayerMatrix, + normalizeRanks: normalizeRanks, + removeEmptyRanks: removeEmptyRanks, + addBorderNode: addBorderNode, + maxRank: maxRank, + partition: partition, + time: time, + notime: notime +}; -var DEFAULT_EDGE_NAME = "\x00"; -var GRAPH_NODE = "\x00"; -var EDGE_KEY_DELIM = "\x01"; +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = _.uniqueId(name); + } while (g.hasNode(v)); -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} -function Graph(opts) { - this._isDirected = _.has(opts, "directed") ? opts.directed : true; - this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; - this._isCompound = _.has(opts, "compound") ? opts.compound : false; +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new Graph().setGraph(g.graph()); + _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); + _.forEach(g.edges(), function(e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }, + label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen) + }); + }); + return simplified; +} - // Label for the graph itself - this._label = undefined; +function asNonCompoundGraph(g) { + var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + _.forEach(g.nodes(), function(v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + _.forEach(g.edges(), function(e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = _.constant(undefined); +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function(v) { + var sucs = {}; + _.forEach(g.outEdges(v), function(e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = _.constant(undefined); +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function(v) { + var preds = {}; + _.forEach(g.inEdges(v), function(e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} - // v -> label - this._nodes = {}; +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; - if (this._isCompound) { - // v -> parent - this._parent = {}; + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; + if (!dx && !dy) { + throw new Error("Not possible to find intersection inside of the rectangle"); } - // v -> edgeObj - this._in = {}; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = h * dx / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = w * dy / dx; + } - // u -> v -> Number - this._preds = {}; + return { x: x + sx, y: y + sy }; +} - // v -> edgeObj - this._out = {}; +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); + _.forEach(g.nodes(), function(v) { + var node = g.node(v), + rank = node.rank; + if (!_.isUndefined(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} - // v -> w -> Number - this._sucs = {}; +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); + _.forEach(g.nodes(), function(v) { + var node = g.node(v); + if (_.has(node, "rank")) { + node.rank -= min; + } + }); +} - // e -> edgeObj - this._edgeObjs = {}; +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - // e -> label - this._edgeLabels = {}; + var layers = []; + _.forEach(g.nodes(), function(v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0, + nodeRankFactor = g.graph().nodeRankFactor; + _.forEach(layers, function(vs, i) { + if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + _.forEach(vs, function(v) { g.node(v).rank += delta; }); + } + }); } -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0 + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, "border", node, prefix); +} -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; +function maxRank(g) { + return _.max(_.map(g.nodes(), function(v) { + var rank = g.node(v).rank; + if (!_.isUndefined(rank)) { + return rank; + } + })); +} +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + _.forEach(collection, function(value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} -/* === Graph functions ========= */ +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function time(name, fn) { + var start = _.now(); + try { + return fn(); + } finally { + console.log(name + " time: " + (_.now() - start) + "ms"); + } +} -Graph.prototype.isDirected = function() { - return this._isDirected; -}; +function notime(name, fn) { + return fn(); +} -Graph.prototype.isMultigraph = function() { - return this._isMultigraph; -}; -Graph.prototype.isCompound = function() { - return this._isCompound; -}; +/***/ }), -Graph.prototype.setGraph = function(label) { - this._label = label; - return this; -}; +/***/ "./node_modules/dagre/lib/version.js": +/*!*******************************************!*\ + !*** ./node_modules/dagre/lib/version.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -Graph.prototype.graph = function() { - return this._label; -}; +module.exports = "0.8.4"; -/* === Node functions ========== */ +/***/ }), -Graph.prototype.setDefaultNodeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; -}; +/***/ "./node_modules/element-resize-detector/src/browser-detector.js": +/*!**********************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/browser-detector.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.nodeCount = function() { - return this._nodeCount; -}; +"use strict"; -Graph.prototype.nodes = function() { - return _.keys(this._nodes); -}; -Graph.prototype.sources = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._in[v]); - }); -}; +var detector = module.exports = {}; -Graph.prototype.sinks = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._out[v]); - }); -}; +detector.isIE = function(version) { + function isAnyIeVersion() { + var agent = navigator.userAgent.toLowerCase(); + return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1; + } -Graph.prototype.setNodes = function(vs, value) { - var args = arguments; - var self = this; - _.each(vs, function(v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); + if(!isAnyIeVersion()) { + return false; } - }); - return this; -}; -Graph.prototype.setNode = function(v, value) { - if (_.has(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; + if(!version) { + return true; } - return this; - } - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; -}; + //Shamelessly stolen from https://gist.github.com/padolsey/527683 + var ieVersion = (function(){ + var undef, + v = 3, + div = document.createElement("div"), + all = div.getElementsByTagName("i"); -Graph.prototype.node = function(v) { - return this._nodes[v]; -}; + do { + div.innerHTML = ""; + } + while (all[0]); -Graph.prototype.hasNode = function(v) { - return _.has(this._nodes, v); -}; + return v > 4 ? v : undef; + }()); -Graph.prototype.removeNode = function(v) { - var self = this; - if (_.has(this._nodes, v)) { - var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - _.each(this.children(v), function(child) { - self.setParent(child); - }); - delete this._children[v]; - } - _.each(_.keys(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - _.each(_.keys(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; + return version === ieVersion; }; -Graph.prototype.setParent = function(v, parent) { - if (!this._isCompound) { - throw new Error("Cannot set parent in a non-compound graph"); - } +detector.isLegacyOpera = function() { + return !!window.opera; +}; - if (_.isUndefined(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ""; - for (var ancestor = parent; - !_.isUndefined(ancestor); - ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error("Setting " + parent+ " as parent of " + v + - " would create a cycle"); - } - } - this.setNode(parent); - } +/***/ }), - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; -}; +/***/ "./node_modules/element-resize-detector/src/collection-utils.js": +/*!**********************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/collection-utils.js ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype._removeFromParentsChildList = function(v) { - delete this._children[this._parent[v]][v]; -}; +"use strict"; -Graph.prototype.parent = function(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } -}; -Graph.prototype.children = function(v) { - if (_.isUndefined(v)) { - v = GRAPH_NODE; - } +var utils = module.exports = {}; - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return _.keys(children); +/** + * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value. + * @public + * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1. + * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned. + * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing. + */ +utils.forEach = function(collection, callback) { + for(var i = 0; i < collection.length; i++) { + var result = callback(collection[i]); + if(result) { + return result; + } } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } }; -Graph.prototype.predecessors = function(v) { - var predsV = this._preds[v]; - if (predsV) { - return _.keys(predsV); - } -}; -Graph.prototype.successors = function(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return _.keys(sucsV); - } -}; +/***/ }), -Graph.prototype.neighbors = function(v) { - var preds = this.predecessors(v); - if (preds) { - return _.union(preds, this.successors(v)); - } -}; +/***/ "./node_modules/element-resize-detector/src/detection-strategy/object.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/detection-strategy/object.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.isLeaf = function (v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; -}; +"use strict"; +/** + * Resize detection strategy that injects objects to elements in order to detect resize events. + * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ + */ -Graph.prototype.filterNodes = function(filter) { - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound - }); - copy.setGraph(this.graph()); - var self = this; - _.each(this._nodes, function(value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); +var browserDetector = __webpack_require__(/*! ../browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js"); - _.each(this._edgeObjs, function(e) { - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); +module.exports = function(options) { + options = options || {}; + var reporter = options.reporter; + var batchProcessor = options.batchProcessor; + var getState = options.stateHandler.getState; - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); + if(!reporter) { + throw new Error("Missing required dependency: reporter."); } - } - if (this._isCompound) { - _.each(copy.nodes(), function(v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; -}; - -/* === Edge functions ========== */ - -Graph.prototype.setDefaultEdgeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; -}; - -Graph.prototype.edgeCount = function() { - return this._edgeCount; -}; - -Graph.prototype.edges = function() { - return _.values(this._edgeObjs); -}; + /** + * Adds a resize event listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. + */ + function addListener(element, listener) { + function listenerProxy() { + listener(element); + } -Graph.prototype.setPath = function(vs, value) { - var self = this; - var args = arguments; - _.reduce(vs, function(v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; -}; + if(browserDetector.isIE(8)) { + //IE 8 does not support object, but supports the resize event directly on elements. + getState(element).object = { + proxy: listenerProxy + }; + element.attachEvent("onresize", listenerProxy); + } else { + var object = getObject(element); -/* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ -Graph.prototype.setEdge = function() { - var v, w, name, value; - var valueSpecified = false; - var arg0 = arguments[0]; + if(!object) { + throw new Error("Element is not detectable by this strategy."); + } - if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; + object.contentDocument.defaultView.addEventListener("resize", listenerProxy); + } } - } - v = "" + v; - w = "" + w; - if (!_.isUndefined(name)) { - name = "" + name; - } + function buildCssTextString(rules) { + var seperator = options.important ? " !important; " : "; "; - var e = edgeArgsToId(this._isDirected, v, w, name); - if (_.has(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; + return (rules.join(seperator) + seperator).trim(); } - return this; - } - if (!_.isUndefined(name) && !this._isMultigraph) { - throw new Error("Cannot set a named edge when isMultigraph = false"); - } + /** + * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. + * @private + * @param {object} options Optional options object. + * @param {element} element The element to make detectable + * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. + */ + function makeDetectable(options, element, callback) { + if (!callback) { + callback = element; + element = options; + options = null; + } - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); + options = options || {}; + var debug = options.debug; - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + function injectObject(element, callback) { + var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]); - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; + //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element. - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; -}; + // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not. + var positionCheckPerformed = false; -Graph.prototype.edge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return this._edgeLabels[e]; -}; + // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers. + // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM. + var style = window.getComputedStyle(element); + var width = element.offsetWidth; + var height = element.offsetHeight; -Graph.prototype.hasEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return _.has(this._edgeLabels, e); -}; + getState(element).startSize = { + width: width, + height: height + }; -Graph.prototype.removeEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - var edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; -}; + function mutateDom() { + function alterPositionStyles() { + if(style.position === "static") { + element.style.setProperty("position", "relative", options.important ? "important" : ""); -Graph.prototype.inEdges = function(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = _.values(inV); - if (!u) { - return edges; - } - return _.filter(edges, function(edge) { return edge.v === u; }); - } -}; + var removeRelativeStyles = function(reporter, element, style, property) { + function getNumericalValue(value) { + return value.replace(/[^-\d\.]/g, ""); + } -Graph.prototype.outEdges = function(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = _.values(outV); - if (!w) { - return edges; - } - return _.filter(edges, function(edge) { return edge.w === w; }); - } -}; + var value = style[property]; -Graph.prototype.nodeEdges = function(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } -}; + if(value !== "auto" && getNumericalValue(value) !== "0") { + reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); + element.style.setProperty(property, "0", options.important ? "important" : ""); + } + }; -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} + //Check so that there are no accidental styles that will make the element styled differently now that is is relative. + //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). + removeRelativeStyles(reporter, element, style, "top"); + removeRelativeStyles(reporter, element, style, "right"); + removeRelativeStyles(reporter, element, style, "bottom"); + removeRelativeStyles(reporter, element, style, "left"); + } + } -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { delete map[k]; } -} + function onObjectLoad() { + // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM. + if (!positionCheckPerformed) { + alterPositionStyles(); + } -function edgeArgsToId(isDirected, v_, w_, name) { - var v = "" + v_; - var w = "" + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + - (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); -} + /*jshint validthis: true */ -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = "" + v_; - var w = "" + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} + function getDocument(element, callback) { + //Opera 12 seem to call the object.onload before the actual document has been created. + //So if it is not present, poll it with an timeout until it is present. + //TODO: Could maybe be handled better with object.onreadystatechange or similar. + if(!element.contentDocument) { + var state = getState(element); + if (state.checkForObjectDocumentTimeoutId) { + window.clearTimeout(state.checkForObjectDocumentTimeoutId); + } + state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() { + state.checkForObjectDocumentTimeoutId = 0; + getDocument(element, callback); + }, 100); -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} + return; + } + callback(element.contentDocument); + } -/***/ }), + //Mutating the object element here seems to fire another load event. + //Mutating the inner document of the object element is fine though. + var objectElement = this; -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/index.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/index.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + //Create the style element to be added to the object. + getDocument(objectElement, function onObjectDocumentReady(objectDocument) { + //Notify that the element is ready to be listened to. + callback(element); + }); + } -// Includes only the "core" of graphlib -module.exports = { - Graph: __webpack_require__(/*! ./graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"), - version: __webpack_require__(/*! ./version */ "./node_modules/dagre-d3/node_modules/graphlib/lib/version.js") -}; + // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements. + // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible. + if (style.position !== "") { + alterPositionStyles(style); + positionCheckPerformed = true; + } + //Add an object element as a child to the target element that will be listened to for resize events. + var object = document.createElement("object"); + object.style.cssText = OBJECT_STYLE; + object.tabIndex = -1; + object.type = "text/html"; + object.setAttribute("aria-hidden", "true"); + object.onload = onObjectLoad; -/***/ }), + //Safari: This must occur before adding the object to the DOM. + //IE: Does not like that this happens before, even if it is also added after. + if(!browserDetector.isIE()) { + object.data = "about:blank"; + } -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/json.js": -/*!*****************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/json.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (!getState(element)) { + // The element has been uninstalled before the actual loading happened. + return; + } -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js"); -var Graph = __webpack_require__(/*! ./graph */ "./node_modules/dagre-d3/node_modules/graphlib/lib/graph.js"); + element.appendChild(object); + getState(element).object = object; -module.exports = { - write: write, - read: read -}; + //IE: This must occur after adding the object to the DOM. + if(browserDetector.isIE()) { + object.data = "about:blank"; + } + } -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound() - }, - nodes: writeNodes(g), - edges: writeEdges(g) - }; - if (!_.isUndefined(g.graph())) { - json.value = _.clone(g.graph()); - } - return json; -} + if(batchProcessor) { + batchProcessor.add(mutateDom); + } else { + mutateDom(); + } + } -function writeNodes(g) { - return _.map(g.nodes(), function(v) { - var nodeValue = g.node(v); - var parent = g.parent(v); - var node = { v: v }; - if (!_.isUndefined(nodeValue)) { - node.value = nodeValue; - } - if (!_.isUndefined(parent)) { - node.parent = parent; + if(browserDetector.isIE(8)) { + //IE 8 does not support objects properly. Luckily they do support the resize event. + //So do not inject the object and notify that the element is already ready to be listened to. + //The event handler for the resize event is attached in the utils.addListener instead. + callback(element); + } else { + injectObject(element, callback); + } } - return node; - }); -} -function writeEdges(g) { - return _.map(g.edges(), function(e) { - var edgeValue = g.edge(e); - var edge = { v: e.v, w: e.w }; - if (!_.isUndefined(e.name)) { - edge.name = e.name; - } - if (!_.isUndefined(edgeValue)) { - edge.value = edgeValue; + /** + * Returns the child object of the target element. + * @private + * @param {element} element The target element. + * @returns The object element of the target. + */ + function getObject(element) { + return getState(element).object; } - return edge; - }); -} -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function(entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function(entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} + function uninstall(element) { + if (!getState(element)) { + return; + } + var object = getObject(element); -/***/ }), + if (!object) { + return; + } -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js": -/*!*******************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (browserDetector.isIE(8)) { + element.detachEvent("onresize", object.proxy); + } else { + element.removeChild(object); + } -/* global window */ + if (getState(element).checkForObjectDocumentTimeoutId) { + window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId); + } -var lodash; + delete getState(element).object; + } -if (true) { - try { - lodash = { - clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"), - constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), - each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), - filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), - has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), - isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"), - isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"), - isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), - isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), - keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"), - map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), - reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), - size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"), - transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"), - union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"), - values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js") + return { + makeDetectable: makeDetectable, + addListener: addListener, + uninstall: uninstall }; - } catch (e) { - // continue regardless of error - } -} - -if (!lodash) { - lodash = window._; -} - -module.exports = lodash; +}; /***/ }), -/***/ "./node_modules/dagre-d3/node_modules/graphlib/lib/version.js": -/*!********************************************************************!*\ - !*** ./node_modules/dagre-d3/node_modules/graphlib/lib/version.js ***! - \********************************************************************/ +/***/ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/detection-strategy/scroll.js ***! + \*******************************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = '2.1.8'; +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +/** + * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events. + * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js + */ -/***/ }), -/***/ "./node_modules/dagre/index.js": -/*!*************************************!*\ - !*** ./node_modules/dagre/index.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -/* -Copyright (c) 2012-2014 Chris Pettitt +var forEach = __webpack_require__(/*! ../collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach; -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ +module.exports = function(options) { + options = options || {}; + var reporter = options.reporter; + var batchProcessor = options.batchProcessor; + var getState = options.stateHandler.getState; + var hasState = options.stateHandler.hasState; + var idHandler = options.idHandler; -module.exports = { - graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre/lib/graphlib.js"), + if (!batchProcessor) { + throw new Error("Missing required dependency: batchProcessor"); + } - layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre/lib/layout.js"), - debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre/lib/debug.js"), - util: { - time: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").time, - notime: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").notime - }, - version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre/lib/version.js") -}; + if (!reporter) { + throw new Error("Missing required dependency: reporter."); + } + //TODO: Could this perhaps be done at installation time? + var scrollbarSizes = getScrollbarSizes(); -/***/ }), + var styleId = "erd_scroll_detection_scrollbar_style"; + var detectionContainerClass = "erd_scroll_detection_container"; -/***/ "./node_modules/dagre/lib/acyclic.js": -/*!*******************************************!*\ - !*** ./node_modules/dagre/lib/acyclic.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function initDocument(targetDocument) { + // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome. + // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements). + injectScrollStyle(targetDocument, styleId, detectionContainerClass); + } -"use strict"; + initDocument(window.document); + function buildCssTextString(rules) { + var seperator = options.important ? " !important; " : "; "; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre/lib/greedy-fas.js"); + return (rules.join(seperator) + seperator).trim(); + } -module.exports = { - run: run, - undo: undo -}; + function getScrollbarSizes() { + var width = 500; + var height = 500; -function run(g) { - var fas = (g.graph().acyclicer === "greedy" - ? greedyFAS(g, weightFn(g)) - : dfsFAS(g)); - _.forEach(fas, function(e) { - var label = g.edge(e); - g.removeEdge(e); - label.forwardName = e.name; - label.reversed = true; - g.setEdge(e.w, e.v, label, _.uniqueId("rev")); - }); + var child = document.createElement("div"); + child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]); - function weightFn(g) { - return function(e) { - return g.edge(e).weight; - }; - } -} + var container = document.createElement("div"); + container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]); -function dfsFAS(g) { - var fas = [], - stack = {}, - visited = {}; + container.appendChild(child); - function dfs(v) { - if (_.has(visited, v)) { - return; - } - visited[v] = true; - stack[v] = true; - _.forEach(g.outEdges(v), function(e) { - if (_.has(stack, e.w)) { - fas.push(e); - } else { - dfs(e.w); - } - }); - delete stack[v]; - } + document.body.insertBefore(container, document.body.firstChild); - _.forEach(g.nodes(), dfs); - return fas; -} + var widthSize = width - container.clientWidth; + var heightSize = height - container.clientHeight; -function undo(g) { - _.forEach(g.edges(), function(e) { - var label = g.edge(e); - if (label.reversed) { - g.removeEdge(e); + document.body.removeChild(container); - var forwardName = label.forwardName; - delete label.reversed; - delete label.forwardName; - g.setEdge(e.w, e.v, label, forwardName); + return { + width: widthSize, + height: heightSize + }; } - }); -} + function injectScrollStyle(targetDocument, styleId, containerClass) { + function injectStyle(style, method) { + method = method || function (element) { + targetDocument.head.appendChild(element); + }; -/***/ }), + var styleElement = targetDocument.createElement("style"); + styleElement.innerHTML = style; + styleElement.id = styleId; + method(styleElement); + return styleElement; + } -/***/ "./node_modules/dagre/lib/add-border-segments.js": -/*!*******************************************************!*\ - !*** ./node_modules/dagre/lib/add-border-segments.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (!targetDocument.getElementById(styleId)) { + var containerAnimationClass = containerClass + "_animation"; + var containerAnimationActiveClass = containerClass + "_animation_active"; + var style = "/* Created by the element-resize-detector library. */\n"; + style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n"; + style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n"; + style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; + style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"; + injectStyle(style); + } + } -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); + function addAnimationClass(element) { + element.className += " " + detectionContainerClass + "_animation_active"; + } -module.exports = addBorderSegments; + function addEvent(el, name, cb) { + if (el.addEventListener) { + el.addEventListener(name, cb); + } else if(el.attachEvent) { + el.attachEvent("on" + name, cb); + } else { + return reporter.error("[scroll] Don't know how to add event listeners."); + } + } -function addBorderSegments(g) { - function dfs(v) { - var children = g.children(v), - node = g.node(v); - if (children.length) { - _.forEach(children, dfs); + function removeEvent(el, name, cb) { + if (el.removeEventListener) { + el.removeEventListener(name, cb); + } else if(el.detachEvent) { + el.detachEvent("on" + name, cb); + } else { + return reporter.error("[scroll] Don't know how to remove event listeners."); + } } - if (_.has(node, "minRank")) { - node.borderLeft = []; - node.borderRight = []; - for (var rank = node.minRank, maxRank = node.maxRank + 1; - rank < maxRank; - ++rank) { - addBorderNode(g, "borderLeft", "_bl", v, node, rank); - addBorderNode(g, "borderRight", "_br", v, node, rank); - } + function getExpandElement(element) { + return getState(element).container.childNodes[0].childNodes[0].childNodes[0]; } - } - _.forEach(g.children(), dfs); -} + function getShrinkElement(element) { + return getState(element).container.childNodes[0].childNodes[0].childNodes[1]; + } -function addBorderNode(g, prop, prefix, sg, sgNode, rank) { - var label = { width: 0, height: 0, rank: rank, borderType: prop }, - prev = sgNode[prop][rank - 1], - curr = util.addDummyNode(g, "border", label, prefix); - sgNode[prop][rank] = curr; - g.setParent(curr, sg); - if (prev) { - g.setEdge(prev, curr, { weight: 1 }); - } -} + /** + * Adds a resize event listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. + */ + function addListener(element, listener) { + var listeners = getState(element).listeners; + if (!listeners.push) { + throw new Error("Cannot add listener to an element that is not detectable."); + } -/***/ }), + getState(element).listeners.push(listener); + } -/***/ "./node_modules/dagre/lib/coordinate-system.js": -/*!*****************************************************!*\ - !*** ./node_modules/dagre/lib/coordinate-system.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. + * @private + * @param {object} options Optional options object. + * @param {element} element The element to make detectable + * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. + */ + function makeDetectable(options, element, callback) { + if (!callback) { + callback = element; + element = options; + options = null; + } -"use strict"; + options = options || {}; + function debug() { + if (options.debug) { + var args = Array.prototype.slice.call(arguments); + args.unshift(idHandler.get(element), "Scroll: "); + if (reporter.log.apply) { + reporter.log.apply(null, args); + } else { + for (var i = 0; i < args.length; i++) { + reporter.log(args[i]); + } + } + } + } -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); + function isDetached(element) { + function isInDocument(element) { + return element === element.ownerDocument.body || element.ownerDocument.body.contains(element); + } -module.exports = { - adjust: adjust, - undo: undo -}; + if (!isInDocument(element)) { + return true; + } -function adjust(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === "lr" || rankDir === "rl") { - swapWidthHeight(g); - } -} + // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520 + if (window.getComputedStyle(element) === null) { + return true; + } -function undo(g) { - var rankDir = g.graph().rankdir.toLowerCase(); - if (rankDir === "bt" || rankDir === "rl") { - reverseY(g); - } + return false; + } - if (rankDir === "lr" || rankDir === "rl") { - swapXY(g); - swapWidthHeight(g); - } -} + function isUnrendered(element) { + // Check the absolute positioned container since the top level container is display: inline. + var container = getState(element).container.childNodes[0]; + var style = window.getComputedStyle(container); + return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered. + } -function swapWidthHeight(g) { - _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); }); - _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); }); -} + function getStyle() { + // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here, + // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching). + var elementStyle = window.getComputedStyle(element); + var style = {}; + style.position = elementStyle.position; + style.width = element.offsetWidth; + style.height = element.offsetHeight; + style.top = elementStyle.top; + style.right = elementStyle.right; + style.bottom = elementStyle.bottom; + style.left = elementStyle.left; + style.widthCSS = elementStyle.width; + style.heightCSS = elementStyle.height; + return style; + } -function swapWidthHeightOne(attrs) { - var w = attrs.width; - attrs.width = attrs.height; - attrs.height = w; -} + function storeStartSize() { + var style = getStyle(); + getState(element).startSize = { + width: style.width, + height: style.height + }; + debug("Element start size", getState(element).startSize); + } -function reverseY(g) { - _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); }); + function initListeners() { + getState(element).listeners = []; + } - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, reverseYOne); - if (_.has(edge, "y")) { - reverseYOne(edge); - } - }); -} + function storeStyle() { + debug("storeStyle invoked."); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } -function reverseYOne(attrs) { - attrs.y = -attrs.y; -} + var style = getStyle(); + getState(element).style = style; + } -function swapXY(g) { - _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); }); + function storeCurrentSize(element, width, height) { + getState(element).lastWidth = width; + getState(element).lastHeight = height; + } - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, swapXYOne); - if (_.has(edge, "x")) { - swapXYOne(edge); - } - }); -} + function getExpandChildElement(element) { + return getExpandElement(element).childNodes[0]; + } -function swapXYOne(attrs) { - var x = attrs.x; - attrs.x = attrs.y; - attrs.y = x; -} + function getWidthOffset() { + return 2 * scrollbarSizes.width + 1; + } + function getHeightOffset() { + return 2 * scrollbarSizes.height + 1; + } -/***/ }), + function getExpandWidth(width) { + return width + 10 + getWidthOffset(); + } -/***/ "./node_modules/dagre/lib/data/list.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre/lib/data/list.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + function getExpandHeight(height) { + return height + 10 + getHeightOffset(); + } -/* - * Simple doubly linked list implementation derived from Cormen, et al., - * "Introduction to Algorithms". - */ + function getShrinkWidth(width) { + return width * 2 + getWidthOffset(); + } -module.exports = List; + function getShrinkHeight(height) { + return height * 2 + getHeightOffset(); + } -function List() { - var sentinel = {}; - sentinel._next = sentinel._prev = sentinel; - this._sentinel = sentinel; -} + function positionScrollbars(element, width, height) { + var expand = getExpandElement(element); + var shrink = getShrinkElement(element); + var expandWidth = getExpandWidth(width); + var expandHeight = getExpandHeight(height); + var shrinkWidth = getShrinkWidth(width); + var shrinkHeight = getShrinkHeight(height); + expand.scrollLeft = expandWidth; + expand.scrollTop = expandHeight; + shrink.scrollLeft = shrinkWidth; + shrink.scrollTop = shrinkHeight; + } -List.prototype.dequeue = function() { - var sentinel = this._sentinel, - entry = sentinel._prev; - if (entry !== sentinel) { - unlink(entry); - return entry; - } -}; + function injectContainerElement() { + var container = getState(element).container; -List.prototype.enqueue = function(entry) { - var sentinel = this._sentinel; - if (entry._prev && entry._next) { - unlink(entry); - } - entry._next = sentinel._next; - sentinel._next._prev = entry; - sentinel._next = entry; - entry._prev = sentinel; -}; + if (!container) { + container = document.createElement("div"); + container.className = detectionContainerClass; + container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]); + getState(element).container = container; + addAnimationClass(container); + element.appendChild(container); -List.prototype.toString = function() { - var strs = [], - sentinel = this._sentinel, - curr = sentinel._prev; - while (curr !== sentinel) { - strs.push(JSON.stringify(curr, filterOutLinks)); - curr = curr._prev; - } - return "[" + strs.join(", ") + "]"; -}; + var onAnimationStart = function () { + getState(element).onRendered && getState(element).onRendered(); + }; -function unlink(entry) { - entry._prev._next = entry._next; - entry._next._prev = entry._prev; - delete entry._next; - delete entry._prev; -} + addEvent(container, "animationstart", onAnimationStart); -function filterOutLinks(k, v) { - if (k !== "_next" && k !== "_prev") { - return v; - } -} + // Store the event handler here so that they may be removed when uninstall is called. + // See uninstall function for an explanation why it is needed. + getState(element).onAnimationStart = onAnimationStart; + } + return container; + } -/***/ }), + function injectScrollElements() { + function alterPositionStyles() { + var style = getState(element).style; -/***/ "./node_modules/dagre/lib/debug.js": -/*!*****************************************!*\ - !*** ./node_modules/dagre/lib/debug.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if(style.position === "static") { + element.style.setProperty("position", "relative",options.important ? "important" : ""); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"), - Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; + var removeRelativeStyles = function(reporter, element, style, property) { + function getNumericalValue(value) { + return value.replace(/[^-\d\.]/g, ""); + } -module.exports = { - debugOrdering: debugOrdering -}; + var value = style[property]; -/* istanbul ignore next */ -function debugOrdering(g) { - var layerMatrix = util.buildLayerMatrix(g); - - var h = new Graph({ compound: true, multigraph: true }).setGraph({}); + if(value !== "auto" && getNumericalValue(value) !== "0") { + reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); + element.style[property] = 0; + } + }; - _.forEach(g.nodes(), function(v) { - h.setNode(v, { label: v }); - h.setParent(v, "layer" + g.node(v).rank); - }); + //Check so that there are no accidental styles that will make the element styled differently now that is is relative. + //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). + removeRelativeStyles(reporter, element, style, "top"); + removeRelativeStyles(reporter, element, style, "right"); + removeRelativeStyles(reporter, element, style, "bottom"); + removeRelativeStyles(reporter, element, style, "left"); + } + } - _.forEach(g.edges(), function(e) { - h.setEdge(e.v, e.w, {}, e.name); - }); + function getLeftTopBottomRightCssText(left, top, bottom, right) { + left = (!left ? "0" : (left + "px")); + top = (!top ? "0" : (top + "px")); + bottom = (!bottom ? "0" : (bottom + "px")); + right = (!right ? "0" : (right + "px")); - _.forEach(layerMatrix, function(layer, i) { - var layerV = "layer" + i; - h.setNode(layerV, { rank: "same" }); - _.reduce(layer, function(u, v) { - h.setEdge(u, v, { style: "invis" }); - return v; - }); - }); + return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom]; + } - return h; -} + debug("Injecting elements"); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } -/***/ }), + alterPositionStyles(); -/***/ "./node_modules/dagre/lib/graphlib.js": -/*!********************************************!*\ - !*** ./node_modules/dagre/lib/graphlib.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var rootContainer = getState(element).container; -/* global window */ + if (!rootContainer) { + rootContainer = injectContainerElement(); + } -var graphlib; + // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari), + // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than + // the targeted element. + // When the bug is resolved, "containerContainer" may be removed. -if (true) { - try { - graphlib = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js"); - } catch (e) {} -} + // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980). + // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px. -if (!graphlib) { - graphlib = window.graphlib; -} + var scrollbarWidth = scrollbarSizes.width; + var scrollbarHeight = scrollbarSizes.height; + var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]); + var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth))); + var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); + var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); + var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]); + var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]); -module.exports = graphlib; + var containerContainer = document.createElement("div"); + var container = document.createElement("div"); + var expand = document.createElement("div"); + var expandChild = document.createElement("div"); + var shrink = document.createElement("div"); + var shrinkChild = document.createElement("div"); + // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56 + // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers. + containerContainer.dir = "ltr"; -/***/ }), + containerContainer.style.cssText = containerContainerStyle; + containerContainer.className = detectionContainerClass; + container.className = detectionContainerClass; + container.style.cssText = containerStyle; + expand.style.cssText = expandStyle; + expandChild.style.cssText = expandChildStyle; + shrink.style.cssText = shrinkStyle; + shrinkChild.style.cssText = shrinkChildStyle; -/***/ "./node_modules/dagre/lib/greedy-fas.js": -/*!**********************************************!*\ - !*** ./node_modules/dagre/lib/greedy-fas.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + expand.appendChild(expandChild); + shrink.appendChild(shrinkChild); + container.appendChild(expand); + container.appendChild(shrink); + containerContainer.appendChild(container); + rootContainer.appendChild(containerContainer); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, - List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre/lib/data/list.js"); + function onExpandScroll() { + getState(element).onExpand && getState(element).onExpand(); + } -/* - * A greedy heuristic for finding a feedback arc set for a graph. A feedback - * arc set is a set of edges that can be removed to make a graph acyclic. - * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and - * effective heuristic for the feedback arc set problem." This implementation - * adjusts that from the paper to allow for weighted edges. - */ -module.exports = greedyFAS; + function onShrinkScroll() { + getState(element).onShrink && getState(element).onShrink(); + } -var DEFAULT_WEIGHT_FN = _.constant(1); + addEvent(expand, "scroll", onExpandScroll); + addEvent(shrink, "scroll", onShrinkScroll); -function greedyFAS(g, weightFn) { - if (g.nodeCount() <= 1) { - return []; - } - var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); - var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + // Store the event handlers here so that they may be removed when uninstall is called. + // See uninstall function for an explanation why it is needed. + getState(element).onExpandScroll = onExpandScroll; + getState(element).onShrinkScroll = onShrinkScroll; + } - // Expand multi-edges - return _.flatten(_.map(results, function(e) { - return g.outEdges(e.v, e.w); - }), true); -} + function registerListenersAndPositionElements() { + function updateChildSizes(element, width, height) { + var expandChild = getExpandChildElement(element); + var expandWidth = getExpandWidth(width); + var expandHeight = getExpandHeight(height); + expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : ""); + expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : ""); + } -function doGreedyFAS(g, buckets, zeroIdx) { - var results = [], - sources = buckets[buckets.length - 1], - sinks = buckets[0]; + function updateDetectorElements(done) { + var width = element.offsetWidth; + var height = element.offsetHeight; - var entry; - while (g.nodeCount()) { - while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } - while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } - if (g.nodeCount()) { - for (var i = buckets.length - 2; i > 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } + // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped. + var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight; - return results; -} + debug("Storing current size", width, height); -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; + // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners. + // Otherwise the if-check in handleScroll is useless. + storeCurrentSize(element, width, height); - _.forEach(g.inEdges(entry.v), function(edge) { - var weight = g.edge(edge), - uEntry = g.node(edge.v); + // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute. + // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch. - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } + batchProcessor.add(0, function performUpdateChildSizes() { + if (!sizeChanged) { + return; + } - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } - _.forEach(g.outEdges(entry.v), function(edge) { - var weight = g.edge(edge), - w = edge.w, - wEntry = g.node(w); - wEntry["in"] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } - g.removeNode(entry.v); + if (options.debug) { + var w = element.offsetWidth; + var h = element.offsetHeight; - return results; -} + if (w !== width || h !== height) { + reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements."); + } + } -function buildState(g, weightFn) { - var fasGraph = new Graph(), - maxIn = 0, - maxOut = 0; + updateChildSizes(element, width, height); + }); - _.forEach(g.nodes(), function(v) { - fasGraph.setNode(v, { v: v, "in": 0, out: 0 }); - }); + batchProcessor.add(1, function updateScrollbars() { + // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then + // been restored to the original size, which will have changed the scrollbar positions. - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - _.forEach(g.edges(), function(e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0, - weight = weightFn(e), - edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); - maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); - }); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } - var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); - var zeroIdx = maxIn + 1; + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } - _.forEach(fasGraph.nodes(), function(v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); + positionScrollbars(element, width, height); + }); - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} + if (sizeChanged && done) { + batchProcessor.add(2, function () { + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry["in"]) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); - } -} + if (!areElementsInjected()) { + debug("Aborting because element container has not been initialized"); + return; + } + done(); + }); + } + } -/***/ }), + function areElementsInjected() { + return !!getState(element).container; + } -/***/ "./node_modules/dagre/lib/layout.js": -/*!******************************************!*\ - !*** ./node_modules/dagre/lib/layout.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + function notifyListenersIfNeeded() { + function isFirstNotify() { + return getState(element).lastNotifiedWidth === undefined; + } -"use strict"; + debug("notifyListenersIfNeeded invoked"); + var state = getState(element); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre/lib/acyclic.js"), - normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre/lib/normalize.js"), - rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre/lib/rank/index.js"), - normalizeRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").normalizeRanks, - parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre/lib/parent-dummy-chains.js"), - removeEmptyRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").removeEmptyRanks, - nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre/lib/nesting-graph.js"), - addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre/lib/add-border-segments.js"), - coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre/lib/coordinate-system.js"), - order = __webpack_require__(/*! ./order */ "./node_modules/dagre/lib/order/index.js"), - position = __webpack_require__(/*! ./position */ "./node_modules/dagre/lib/position/index.js"), - util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"), - Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; + // Don't notify if the current size is the start size, and this is the first notification. + if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) { + return debug("Not notifying: Size is the same as the start size, and there has been no notification yet."); + } -module.exports = layout; + // Don't notify if the size already has been notified. + if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) { + return debug("Not notifying: Size already notified"); + } -function layout(g, opts) { - var time = opts && opts.debugTiming ? util.time : util.notime; - time("layout", function() { - var layoutGraph = time(" buildLayoutGraph", - function() { return buildLayoutGraph(g); }); - time(" runLayout", function() { runLayout(layoutGraph, time); }); - time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); }); - }); -} -function runLayout(g, time) { - time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); }); - time(" removeSelfEdges", function() { removeSelfEdges(g); }); - time(" acyclic", function() { acyclic.run(g); }); - time(" nestingGraph.run", function() { nestingGraph.run(g); }); - time(" rank", function() { rank(util.asNonCompoundGraph(g)); }); - time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); }); - time(" removeEmptyRanks", function() { removeEmptyRanks(g); }); - time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); }); - time(" normalizeRanks", function() { normalizeRanks(g); }); - time(" assignRankMinMax", function() { assignRankMinMax(g); }); - time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); }); - time(" normalize.run", function() { normalize.run(g); }); - time(" parentDummyChains", function() { parentDummyChains(g); }); - time(" addBorderSegments", function() { addBorderSegments(g); }); - time(" order", function() { order(g); }); - time(" insertSelfEdges", function() { insertSelfEdges(g); }); - time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); }); - time(" position", function() { position(g); }); - time(" positionSelfEdges", function() { positionSelfEdges(g); }); - time(" removeBorderNodes", function() { removeBorderNodes(g); }); - time(" normalize.undo", function() { normalize.undo(g); }); - time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); }); - time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); }); - time(" translateGraph", function() { translateGraph(g); }); - time(" assignNodeIntersects", function() { assignNodeIntersects(g); }); - time(" reversePoints", function() { reversePointsForReversedEdges(g); }); - time(" acyclic.undo", function() { acyclic.undo(g); }); -} + debug("Current size not notified, notifying..."); + state.lastNotifiedWidth = state.lastWidth; + state.lastNotifiedHeight = state.lastHeight; + forEach(getState(element).listeners, function (listener) { + listener(element); + }); + } -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies whitelisted attributes from the layout graph - * to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - _.forEach(inputGraph.nodes(), function(v) { - var inputLabel = inputGraph.node(v), - layoutLabel = layoutGraph.node(v); + function handleRender() { + debug("startanimation triggered."); - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; + if (isUnrendered(element)) { + debug("Ignoring since element is still unrendered..."); + return; + } - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); + debug("Element rendered."); + var expand = getExpandElement(element); + var shrink = getShrinkElement(element); + if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) { + debug("Scrollbars out of sync. Updating detector elements..."); + updateDetectorElements(notifyListenersIfNeeded); + } + } - _.forEach(inputGraph.edges(), function(e) { - var inputLabel = inputGraph.edge(e), - layoutLabel = layoutGraph.edge(e); + function handleScroll() { + debug("Scroll detected."); - inputLabel.points = layoutLabel.points; - if (_.has(layoutLabel, "x")) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); + if (isUnrendered(element)) { + // Element is still unrendered. Skip this scroll event. + debug("Scroll event fired while unrendered. Ignoring..."); + return; + } - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} + updateDetectorElements(notifyListenersIfNeeded); + } -var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], - graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, - graphAttrs = ["acyclicer", "ranker", "rankdir", "align"], - nodeNumAttrs = ["width", "height"], - nodeDefaults = { width: 0, height: 0 }, - edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"], - edgeDefaults = { - minlen: 1, weight: 1, width: 0, height: 0, - labeloffset: 10, labelpos: "r" - }, - edgeAttrs = ["labelpos"]; + debug("registerListenersAndPositionElements invoked."); -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only whitelisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new Graph({ multigraph: true, compound: true }), - graph = canonicalize(inputGraph.graph()); + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } - g.setGraph(_.merge({}, - graphDefaults, - selectNumberAttrs(graph, graphNumAttrs), - _.pick(graph, graphAttrs))); + getState(element).onRendered = handleRender; + getState(element).onExpand = handleScroll; + getState(element).onShrink = handleScroll; - _.forEach(inputGraph.nodes(), function(v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); + var style = getState(element).style; + updateChildSizes(element, style.width, style.height); + } - _.forEach(inputGraph.edges(), function(e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge(e, _.merge({}, - edgeDefaults, - selectNumberAttrs(edge, edgeNumAttrs), - _.pick(edge, edgeAttrs))); - }); + function finalizeDomMutation() { + debug("finalizeDomMutation invoked."); - return g; -} + if (!getState(element)) { + debug("Aborting because element has been uninstalled"); + return; + } -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== "c") { - if (graph.rankdir === "TB" || graph.rankdir === "BT") { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} + var style = getState(element).style; + storeCurrentSize(element, style.width, style.height); + positionScrollbars(element, style.width, style.height); + } -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v), - w = g.node(e.w), - label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - util.addDummyNode(g, "edge-proxy", label, "_ep"); - } - }); -} + function ready() { + callback(element); + } -function assignRankMinMax(g) { - var maxRank = 0; - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - maxRank = _.max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} + function install() { + debug("Installing..."); + initListeners(); + storeStartSize(); -function removeEdgeLabelProxies(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === "edge-proxy") { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} + batchProcessor.add(0, storeStyle); + batchProcessor.add(1, injectScrollElements); + batchProcessor.add(2, registerListenersAndPositionElements); + batchProcessor.add(3, finalizeDomMutation); + batchProcessor.add(4, ready); + } -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY, - maxX = 0, - minY = Number.POSITIVE_INFINITY, - maxY = 0, - graphLabel = g.graph(), - marginX = graphLabel.marginx || 0, - marginY = graphLabel.marginy || 0; + debug("Making detectable..."); - function getExtremes(attrs) { - var x = attrs.x, - y = attrs.y, - w = attrs.width, - h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } + if (isDetached(element)) { + debug("Element is detached"); - _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, "x")) { - getExtremes(edge); + injectContainerElement(); + + debug("Waiting until element is attached..."); + + getState(element).onRendered = function () { + debug("Element is now attached"); + install(); + }; + } else { + install(); + } } - }); - minX -= marginX; - minY -= marginY; + function uninstall(element) { + var state = getState(element); - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); + if (!state) { + // Uninstall has been called on a non-erd element. + return; + } - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, function(p) { - p.x -= minX; - p.y -= minY; - }); - if (_.has(edge, "x")) { edge.x -= minX; } - if (_.has(edge, "y")) { edge.y -= minY; } - }); + // Uninstall may have been called in the following scenarios: + // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected). + // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected). + // (3) After the installation process (here, state.busy = false and all the stuff has been injected). + // So to be on the safe side, let's check for each thing before removing. - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} + // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element. + state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll); + state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll); + state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart); -function assignNodeIntersects(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e), - nodeV = g.node(e.v), - nodeW = g.node(e.w), - p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; + state.container && element.removeChild(state.container); } - edge.points.unshift(util.intersectRect(nodeV, p1)); - edge.points.push(util.intersectRect(nodeW, p2)); - }); -} -function fixupEdgeLabelCoords(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, "x")) { - if (edge.labelpos === "l" || edge.labelpos === "r") { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case "l": edge.x -= edge.width / 2 + edge.labeloffset; break; - case "r": edge.x += edge.width / 2 + edge.labeloffset; break; - } - } - }); -} + return { + makeDetectable: makeDetectable, + addListener: addListener, + uninstall: uninstall, + initDocument: initDocument + }; +}; -function reversePointsForReversedEdges(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} -function removeBorderNodes(g) { - _.forEach(g.nodes(), function(v) { - if (g.children(v).length) { - var node = g.node(v), - t = g.node(node.borderTop), - b = g.node(node.borderBottom), - l = g.node(_.last(node.borderLeft)), - r = g.node(_.last(node.borderRight)); +/***/ }), - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); +/***/ "./node_modules/element-resize-detector/src/element-resize-detector.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/element-resize-detector.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - _.forEach(g.nodes(), function(v) { - if (g.node(v).dummy === "border") { - g.removeNode(v); - } - }); -} +"use strict"; -function removeSelfEdges(g) { - _.forEach(g.edges(), function(e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} -function insertSelfEdges(g) { - var layers = util.buildLayerMatrix(g); - _.forEach(layers, function(layer) { - var orderShift = 0; - _.forEach(layer, function(v, i) { - var node = g.node(v); - node.order = i + orderShift; - _.forEach(node.selfEdges, function(selfEdge) { - util.addDummyNode(g, "selfedge", { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + (++orderShift), - e: selfEdge.e, - label: selfEdge.label - }, "_se"); - }); - delete node.selfEdges; - }); - }); +var forEach = __webpack_require__(/*! ./collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach; +var elementUtilsMaker = __webpack_require__(/*! ./element-utils */ "./node_modules/element-resize-detector/src/element-utils.js"); +var listenerHandlerMaker = __webpack_require__(/*! ./listener-handler */ "./node_modules/element-resize-detector/src/listener-handler.js"); +var idGeneratorMaker = __webpack_require__(/*! ./id-generator */ "./node_modules/element-resize-detector/src/id-generator.js"); +var idHandlerMaker = __webpack_require__(/*! ./id-handler */ "./node_modules/element-resize-detector/src/id-handler.js"); +var reporterMaker = __webpack_require__(/*! ./reporter */ "./node_modules/element-resize-detector/src/reporter.js"); +var browserDetector = __webpack_require__(/*! ./browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js"); +var batchProcessorMaker = __webpack_require__(/*! batch-processor */ "./node_modules/batch-processor/src/batch-processor.js"); +var stateHandler = __webpack_require__(/*! ./state-handler */ "./node_modules/element-resize-detector/src/state-handler.js"); + +//Detection strategies. +var objectStrategyMaker = __webpack_require__(/*! ./detection-strategy/object.js */ "./node_modules/element-resize-detector/src/detection-strategy/object.js"); +var scrollStrategyMaker = __webpack_require__(/*! ./detection-strategy/scroll.js */ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js"); + +function isCollection(obj) { + return Array.isArray(obj) || obj.length !== undefined; } -function positionSelfEdges(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === "selfedge") { - var selfNode = g.node(node.e.v), - x = selfNode.x + selfNode.width / 2, - y = selfNode.y, - dx = node.x - x, - dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + 2 * dx / 3, y: y - dy }, - { x: x + 5 * dx / 6, y: y - dy }, - { x: x + dx , y: y }, - { x: x + 5 * dx / 6, y: y + dy }, - { x: x + 2 * dx / 3, y: y + dy } - ]; - node.label.x = node.x; - node.label.y = node.y; +function toArray(collection) { + if (!Array.isArray(collection)) { + var array = []; + forEach(collection, function (obj) { + array.push(obj); + }); + return array; + } else { + return collection; } - }); } -function selectNumberAttrs(obj, attrs) { - return _.mapValues(_.pick(obj, attrs), Number); +function isElement(obj) { + return obj && obj.nodeType === 1; } -function canonicalize(attrs) { - var newAttrs = {}; - _.forEach(attrs, function(v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} +/** + * @typedef idHandler + * @type {object} + * @property {function} get Gets the resize detector id of the element. + * @property {function} set Generate and sets the resize detector id of the element. + */ +/** + * @typedef Options + * @type {object} + * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added. + Default is true. If true, the listener is guaranteed to be called when it has been added. + If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called). + * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements. + If not provided, a default id handler will be used. + * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors. + If not provided, a default id handler will be used. + If set to false, then nothing will be reported. + * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method. + */ -/***/ }), +/** + * Creates an element resize detector instance. + * @public + * @param {Options?} options Optional global options object that will decide how this instance will work. + */ +module.exports = function(options) { + options = options || {}; -/***/ "./node_modules/dagre/lib/lodash.js": -/*!******************************************!*\ - !*** ./node_modules/dagre/lib/lodash.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions. + var idHandler; -/* global window */ + if (options.idHandler) { + // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler + // so that readonly flag always is true when it's used here. This may be removed next major version bump. + idHandler = { + get: function (element) { return options.idHandler.get(element, true); }, + set: options.idHandler.set + }; + } else { + var idGenerator = idGeneratorMaker(); + var defaultIdHandler = idHandlerMaker({ + idGenerator: idGenerator, + stateHandler: stateHandler + }); + idHandler = defaultIdHandler; + } -var lodash; + //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions. + var reporter = options.reporter; -if (true) { - try { - lodash = { - cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"), - constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), - defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), - each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), - filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), - find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"), - flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"), - forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"), - forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"), - has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), - isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), - last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"), - map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), - mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"), - max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"), - merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"), - min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"), - minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"), - now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"), - pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), - range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), - reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), - sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"), - uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"), - values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"), - zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"), - }; - } catch (e) {} -} + if(!reporter) { + //If options.reporter is false, then the reporter should be quiet. + var quiet = reporter === false; + reporter = reporterMaker(quiet); + } -if (!lodash) { - lodash = window._; -} + //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions. + var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter })); -module.exports = lodash; + //Options to be used as default for the listenTo function. + var globalOptions = {}; + globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true); + globalOptions.debug = !!getOption(options, "debug", false); + var eventListenerHandler = listenerHandlerMaker(idHandler); + var elementUtils = elementUtilsMaker({ + stateHandler: stateHandler + }); -/***/ }), + //The detection strategy to be used. + var detectionStrategy; + var desiredStrategy = getOption(options, "strategy", "object"); + var importantCssRules = getOption(options, "important", false); + var strategyOptions = { + reporter: reporter, + batchProcessor: batchProcessor, + stateHandler: stateHandler, + idHandler: idHandler, + important: importantCssRules + }; -/***/ "./node_modules/dagre/lib/nesting-graph.js": -/*!*************************************************!*\ - !*** ./node_modules/dagre/lib/nesting-graph.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if(desiredStrategy === "scroll") { + if (browserDetector.isLegacyOpera()) { + reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."); + desiredStrategy = "object"; + } else if (browserDetector.isIE(9)) { + reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."); + desiredStrategy = "object"; + } + } -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); + if(desiredStrategy === "scroll") { + detectionStrategy = scrollStrategyMaker(strategyOptions); + } else if(desiredStrategy === "object") { + detectionStrategy = objectStrategyMaker(strategyOptions); + } else { + throw new Error("Invalid strategy name: " + desiredStrategy); + } -module.exports = { - run: run, - cleanup: cleanup -}; + //Calls can be made to listenTo with elements that are still being installed. + //Also, same elements can occur in the elements list in the listenTo function. + //With this map, the ready callbacks can be synchronized between the calls + //so that the ready callback can always be called when an element is ready - even if + //it wasn't installed from the function itself. + var onReadyCallbacks = {}; -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function run(g) { - var root = util.addDummyNode(g, "root", {}, "_root"); - var depths = treeDepths(g); - var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; + /** + * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element. + * @public + * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler. + * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid. + * @param {function} listener The callback to be executed for each resize event for each element. + */ + function listenTo(options, elements, listener) { + function onResizeCallback(element) { + var listeners = eventListenerHandler.get(element); + forEach(listeners, function callListenerProxy(listener) { + listener(element); + }); + } - g.graph().nestingRoot = root; + function addListener(callOnAdd, element, listener) { + eventListenerHandler.add(element, listener); - // Multiply minlen by nodeSep to align nodes on non-border ranks. - _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); + if(callOnAdd) { + listener(element); + } + } - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; + //Options object may be omitted. + if(!listener) { + listener = elements; + elements = options; + options = {}; + } - // Create border nodes and link them up - _.forEach(g.children(), function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); - }); + if(!elements) { + throw new Error("At least one element required."); + } - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} + if(!listener) { + throw new Error("Listener required."); + } -function dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } + if (isElement(elements)) { + // A single element has been passed in. + elements = [elements]; + } else if (isCollection(elements)) { + // Convert collection to array for plugins. + // TODO: May want to check so that all the elements in the collection are valid elements. + elements = toArray(elements); + } else { + return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); + } - var top = util.addBorderNode(g, "_bt"), - bottom = util.addBorderNode(g, "_bb"), - label = g.node(v); + var elementsReady = 0; - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; + var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd); + var onReadyCallback = getOption(options, "onReady", function noop() {}); + var debug = getOption(options, "debug", globalOptions.debug); - _.forEach(children, function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); + forEach(elements, function attachListenerToElement(element) { + if (!stateHandler.getState(element)) { + stateHandler.initState(element); + idHandler.set(element); + } - var childNode = g.node(child), - childTop = childNode.borderTop ? childNode.borderTop : child, - childBottom = childNode.borderBottom ? childNode.borderBottom : child, - thisWeight = childNode.borderTop ? weight : 2 * weight, - minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + var id = idHandler.get(element); - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); + debug && reporter.log("Attaching listener to element", id, element); - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); - }); + if(!elementUtils.isDetectable(element)) { + debug && reporter.log(id, "Not detectable."); + if(elementUtils.isBusy(element)) { + debug && reporter.log(id, "System busy making it detectable"); - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} + //The element is being prepared to be detectable. Do not make it detectable. + //Just add the listener, because the element will soon be detectable. + addListener(callOnAdd, element, listener); + onReadyCallbacks[id] = onReadyCallbacks[id] || []; + onReadyCallbacks[id].push(function onReady() { + elementsReady++; -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - _.forEach(children, function(child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - _.forEach(g.children(), function(v) { dfs(v, 1); }); - return depths; -} + if(elementsReady === elements.length) { + onReadyCallback(); + } + }); + return; + } -function sumWeights(g) { - return _.reduce(g.edges(), function(acc, e) { - return acc + g.edge(e).weight; - }, 0); -} + debug && reporter.log(id, "Making detectable..."); + //The element is not prepared to be detectable, so do prepare it and add a listener to it. + elementUtils.markBusy(element, true); + return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) { + debug && reporter.log(id, "onElementDetectable"); -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} + if (stateHandler.getState(element)) { + elementUtils.markAsDetectable(element); + elementUtils.markBusy(element, false); + detectionStrategy.addListener(element, onResizeCallback); + addListener(callOnAdd, element, listener); + // Since the element size might have changed since the call to "listenTo", we need to check for this change, + // so that a resize event may be emitted. + // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before. + // Also, check the state existance before since the element may have been uninstalled in the installation process. + var state = stateHandler.getState(element); + if (state && state.startSize) { + var width = element.offsetWidth; + var height = element.offsetHeight; + if (state.startSize.width !== width || state.startSize.height !== height) { + onResizeCallback(element); + } + } -/***/ }), + if(onReadyCallbacks[id]) { + forEach(onReadyCallbacks[id], function(callback) { + callback(); + }); + } + } else { + // The element has been unisntalled before being detectable. + debug && reporter.log(id, "Element uninstalled before being detectable."); + } -/***/ "./node_modules/dagre/lib/normalize.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre/lib/normalize.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + delete onReadyCallbacks[id]; -"use strict"; + elementsReady++; + if(elementsReady === elements.length) { + onReadyCallback(); + } + }); + } + debug && reporter.log(id, "Already detecable, adding listener."); -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); + //The element has been prepared to be detectable and is ready to be listened to. + addListener(callOnAdd, element, listener); + elementsReady++; + }); -module.exports = { - run: run, - undo: undo -}; + if(elementsReady === elements.length) { + onReadyCallback(); + } + } -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function run(g) { - g.graph().dummyChains = []; - _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); -} + function uninstall(elements) { + if(!elements) { + return reporter.error("At least one element is required."); + } -function normalizeEdge(g, e) { - var v = e.v, - vRank = g.node(v).rank, - w = e.w, - wRank = g.node(w).rank, - name = e.name, - edgeLabel = g.edge(e), - labelRank = edgeLabel.labelRank; + if (isElement(elements)) { + // A single element has been passed in. + elements = [elements]; + } else if (isCollection(elements)) { + // Convert collection to array for plugins. + // TODO: May want to check so that all the elements in the collection are valid elements. + elements = toArray(elements); + } else { + return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); + } - if (wRank === vRank + 1) return; + forEach(elements, function (element) { + eventListenerHandler.removeAllListeners(element); + detectionStrategy.uninstall(element); + stateHandler.cleanState(element); + }); + } - g.removeEdge(e); + function initDocument(targetDocument) { + detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument); + } - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, height: 0, - edgeLabel: edgeLabel, edgeObj: e, - rank: vRank + return { + listenTo: listenTo, + removeListener: eventListenerHandler.removeListener, + removeAllListeners: eventListenerHandler.removeAllListeners, + uninstall: uninstall, + initDocument: initDocument }; - dummy = util.addDummyNode(g, "edge", attrs, "_d"); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - attrs.dummy = "edge-label"; - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } +}; - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} +function getOption(options, name, defaultValue) { + var value = options[name]; -function undo(g) { - _.forEach(g.graph().dummyChains, function(v) { - var node = g.node(v), - origLabel = node.edgeLabel, - w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === "edge-label") { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); + if((value === undefined || value === null) && defaultValue !== undefined) { + return defaultValue; } - }); + + return value; } /***/ }), -/***/ "./node_modules/dagre/lib/order/add-subgraph-constraints.js": -/*!******************************************************************!*\ - !*** ./node_modules/dagre/lib/order/add-subgraph-constraints.js ***! - \******************************************************************/ +/***/ "./node_modules/element-resize-detector/src/element-utils.js": +/*!*******************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/element-utils.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); +"use strict"; -module.exports = addSubgraphConstraints; -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; +module.exports = function(options) { + var getState = options.stateHandler.getState; - _.forEach(vs, function(v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; + /** + * Tells if the element has been made detectable and ready to be listened for resize events. + * @public + * @param {element} The element to check. + * @returns {boolean} True or false depending on if the element is detectable or not. + */ + function isDetectable(element) { + var state = getState(element); + return state && !!state.isDetectable; } - }); - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; + /** + * Marks the element that it has been made detectable and ready to be listened for resize events. + * @public + * @param {element} The element to mark. + */ + function markAsDetectable(element) { + getState(element).isDetectable = true; } - return g.node(v).order; - } - dfs(undefined); - */ -} - - -/***/ }), - -/***/ "./node_modules/dagre/lib/order/barycenter.js": -/*!****************************************************!*\ - !*** ./node_modules/dagre/lib/order/barycenter.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); -module.exports = barycenter; - -function barycenter(g, movable) { - return _.map(movable, function(v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = _.reduce(inV, function(acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + (edge.weight * nodeU.order), - weight: acc.weight + edge.weight - }; - }, { sum: 0, weight: 0 }); + /** + * Tells if the element is busy or not. + * @public + * @param {element} The element to check. + * @returns {boolean} True or false depending on if the element is busy or not. + */ + function isBusy(element) { + return !!getState(element).busy; + } - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight - }; + /** + * Marks the object is busy and should not be made detectable. + * @public + * @param {element} element The element to mark. + * @param {boolean} busy If the element is busy or not. + */ + function markBusy(element, busy) { + getState(element).busy = !!busy; } - }); -} + return { + isDetectable: isDetectable, + markAsDetectable: markAsDetectable, + isBusy: isBusy, + markBusy: markBusy + }; +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/build-layer-graph.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre/lib/order/build-layer-graph.js ***! - \***********************************************************/ +/***/ "./node_modules/element-resize-detector/src/id-generator.js": +/*!******************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/id-generator.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; - -module.exports = buildLayerGraph; - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new Graph({ compound: true }).setGraph({ root: root }) - .setDefaultNodeLabel(function(v) { return g.node(v); }); - - _.forEach(g.nodes(), function(v) { - var node = g.node(v), - parent = g.parent(v); +"use strict"; - if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { - result.setNode(v); - result.setParent(v, parent || root); - // This assumes we have only short edges! - _.forEach(g[relationship](v), function(e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !_.isUndefined(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); +module.exports = function() { + var idCount = 1; - if (_.has(node, "minRank")) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank] - }); - } + /** + * Generates a new unique id in the context. + * @public + * @returns {number} A unique id in the context. + */ + function generate() { + return idCount++; } - }); - - return result; -} -function createRootNode(g) { - var v; - while (g.hasNode((v = _.uniqueId("_root")))); - return v; -} + return { + generate: generate + }; +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/cross-count.js": -/*!*****************************************************!*\ - !*** ./node_modules/dagre/lib/order/cross-count.js ***! - \*****************************************************/ +/***/ "./node_modules/element-resize-detector/src/id-handler.js": +/*!****************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/id-handler.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); - -module.exports = crossCount; +module.exports = function(options) { + var idGenerator = options.idGenerator; + var getState = options.stateHandler.getState; -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i-1], layering[i]); - } - return cc; -} + /** + * Gets the resize detector id of the element. + * @public + * @param {element} element The target element to get the id of. + * @returns {string|number|null} The id of the element. Null if it has no id. + */ + function getId(element) { + var state = getState(element); -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = _.zipObject(southLayer, - _.map(southLayer, function (v, i) { return i; })); - var southEntries = _.flatten(_.map(northLayer, function(v) { - return _.sortBy(_.map(g.outEdges(v), function(e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), "pos"); - }), true); + if (state && state.id !== undefined) { + return state.id; + } - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = _.map(new Array(treeSize), function() { return 0; }); + return null; + } - // Calculate the weighted crossings - var cc = 0; - _.forEach(southEntries.forEach(function(entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - while (index > 0) { - if (index % 2) { - weightSum += tree[index + 1]; - } - index = (index - 1) >> 1; - tree[index] += entry.weight; + /** + * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized. + * @public + * @param {element} element The target element to set the id of. + * @returns {string|number|null} The id of the element. + */ + function setId(element) { + var state = getState(element); + + if (!state) { + throw new Error("setId required the element to have a resize detection state."); + } + + var id = idGenerator.generate(); + + state.id = id; + + return id; } - cc += entry.weight * weightSum; - })); - return cc; -} + return { + get: getId, + set: setId + }; +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/index.js": -/*!***********************************************!*\ - !*** ./node_modules/dagre/lib/order/index.js ***! - \***********************************************/ +/***/ "./node_modules/element-resize-detector/src/listener-handler.js": +/*!**********************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/listener-handler.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre/lib/order/init-order.js"), - crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre/lib/order/cross-count.js"), - sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre/lib/order/sort-subgraph.js"), - buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre/lib/order/build-layer-graph.js"), - addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre/lib/order/add-subgraph-constraints.js"), - Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, - util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); +module.exports = function(idHandler) { + var eventListeners = {}; -module.exports = order; + /** + * Gets all listeners for the given element. + * @public + * @param {element} element The element to get all listeners for. + * @returns All listeners for the given element. + */ + function getListeners(element) { + var id = idHandler.get(element); -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util.maxRank(g), - downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"), - upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges"); + if (id === undefined) { + return []; + } - var layering = initOrder(g); - assignOrder(g, layering); + return eventListeners[id] || []; + } - var bestCC = Number.POSITIVE_INFINITY, - best; + /** + * Stores the given listener for the given element. Will not actually add the listener to the element. + * @public + * @param {element} element The element that should have the listener added. + * @param {function} listener The callback that the element has added. + */ + function addListener(element, listener) { + var id = idHandler.get(element); - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + if(!eventListeners[id]) { + eventListeners[id] = []; + } - layering = util.buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = _.cloneDeep(layering); - bestCC = cc; + eventListeners[id].push(listener); } - } - - assignOrder(g, best); -} -function buildLayerGraphs(g, ranks, relationship) { - return _.map(ranks, function(rank) { - return buildLayerGraph(g, rank, relationship); - }); -} + function removeListener(element, listener) { + var listeners = getListeners(element); + for (var i = 0, len = listeners.length; i < len; ++i) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + } -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new Graph(); - _.forEach(layerGraphs, function(lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - _.forEach(sorted.vs, function(v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} + function removeAllListeners(element) { + var listeners = getListeners(element); + if (!listeners) { return; } + listeners.length = 0; + } -function assignOrder(g, layering) { - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, i) { - g.node(v).order = i; - }); - }); -} + return { + get: getListeners, + add: addListener, + removeListener: removeListener, + removeAllListeners: removeAllListeners + }; +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/init-order.js": -/*!****************************************************!*\ - !*** ./node_modules/dagre/lib/order/init-order.js ***! - \****************************************************/ +/***/ "./node_modules/element-resize-detector/src/reporter.js": +/*!**************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/reporter.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); - -module.exports = initOrder; +/* global console: false */ -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. +/** + * Reporter that handles the reporting of logs, warnings and errors. + * @public + * @param {boolean} quiet Tells if the reporter should be quiet or not. */ -function initOrder(g) { - var visited = {}, - simpleNodes = _.filter(g.nodes(), function(v) { - return !g.children(v).length; - }), - maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })), - layers = _.map(_.range(maxRank + 1), function() { return []; }); +module.exports = function(quiet) { + function noop() { + //Does nothing. + } - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - _.forEach(g.successors(v), dfs); - } + var reporter = { + log: noop, + warn: noop, + error: noop + }; - var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); - _.forEach(orderedVs, dfs); + if(!quiet && window.console) { + var attachFunction = function(reporter, name) { + //The proxy is needed to be able to call the method with the console context, + //since we cannot use bind. + reporter[name] = function reporterProxy() { + var f = console[name]; + if (f.apply) { //IE9 does not support console.log.apply :) + f.apply(console, arguments); + } else { + for (var i = 0; i < arguments.length; i++) { + f(arguments[i]); + } + } + }; + }; - return layers; -} + attachFunction(reporter, "log"); + attachFunction(reporter, "warn"); + attachFunction(reporter, "error"); + } + return reporter; +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/resolve-conflicts.js": -/*!***********************************************************!*\ - !*** ./node_modules/dagre/lib/order/resolve-conflicts.js ***! - \***********************************************************/ +/***/ "./node_modules/element-resize-detector/src/state-handler.js": +/*!*******************************************************************!*\ + !*** ./node_modules/element-resize-detector/src/state-handler.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); +var prop = "_erd"; -module.exports = resolveConflicts; +function initState(element) { + element[prop] = {}; + return getState(element); +} -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - _.forEach(entries, function(entry, i) { - var tmp = mappedEntries[entry.v] = { - indegree: 0, - "in": [], - out: [], - vs: [entry.v], - i: i - }; - if (!_.isUndefined(entry.barycenter)) { - tmp.barycenter = entry.barycenter; - tmp.weight = entry.weight; - } - }); +function getState(element) { + return element[prop]; +} - _.forEach(cg.edges(), function(e) { - var entryV = mappedEntries[e.v], - entryW = mappedEntries[e.w]; - if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); +function cleanState(element) { + delete element[prop]; +} - var sourceSet = _.filter(mappedEntries, function(entry) { - return !entry.indegree; - }); +module.exports = { + initState: initState, + getState: getState, + cleanState: cleanState +}; - return doResolveConflicts(sourceSet); -} -function doResolveConflicts(sourceSet) { - var entries = []; +/***/ }), - function handleIn(vEntry) { - return function(uEntry) { - if (uEntry.merged) { - return; - } - if (_.isUndefined(uEntry.barycenter) || - _.isUndefined(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter) { - mergeEntries(vEntry, uEntry); - } - }; - } +/***/ "./node_modules/entity-decode/browser.js": +/*!***********************************************!*\ + !*** ./node_modules/entity-decode/browser.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function handleOut(vEntry) { - return function(wEntry) { - wEntry["in"].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return decode; }); +/** + * @see https://github.com/vuejs/vue/commit/a855dd0564a657a73b7249469490d39817f27cf7#diff-c0a2623ea5896a83e3b630f236b47b52 + * @see https://stackoverflow.com/a/13091266/4936667 + */ - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - _.forEach(entry["in"].reverse(), handleIn(entry)); - _.forEach(entry.out, handleOut(entry)); - } +var decoder; - return _.map(_.filter(entries, function(entry) { return !entry.merged; }), - function(entry) { - return _.pick(entry, ["vs", "i", "barycenter", "weight"]); - }); +function decode(html) { + decoder = decoder || document.createElement('div'); + // Escape HTML before decoding for HTML Entities + html = escape(html).replace(/%26/g,'&').replace(/%23/g,'#').replace(/%3B/g,';'); + // decoding + decoder.innerHTML = html; + return unescape(decoder.textContent); } -function mergeEntries(target, source) { - var sum = 0, - weight = 0; - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } +/***/ }), - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } +/***/ "./node_modules/graphlib/index.js": +/*!****************************************!*\ + !*** ./node_modules/graphlib/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} +/** + * Copyright (c) 2014, Chris Pettitt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var lib = __webpack_require__(/*! ./lib */ "./node_modules/graphlib/lib/index.js"); + +module.exports = { + Graph: lib.Graph, + json: __webpack_require__(/*! ./lib/json */ "./node_modules/graphlib/lib/json.js"), + alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/graphlib/lib/alg/index.js"), + version: lib.version +}; /***/ }), -/***/ "./node_modules/dagre/lib/order/sort-subgraph.js": -/*!*******************************************************!*\ - !*** ./node_modules/dagre/lib/order/sort-subgraph.js ***! - \*******************************************************/ +/***/ "./node_modules/graphlib/lib/alg/components.js": +/*!*****************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/components.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre/lib/order/barycenter.js"), - resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre/lib/order/resolve-conflicts.js"), - sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre/lib/order/sort.js"); - -module.exports = sortSubgraph; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v), - node = g.node(v), - bl = node ? node.borderLeft : undefined, - br = node ? node.borderRight: undefined, - subgraphs = {}; +module.exports = components; - if (bl) { - movable = _.filter(movable, function(w) { - return w !== bl && w !== br; - }); - } +function components(g) { + var visited = {}, + cmpts = [], + cmpt; - var barycenters = barycenter(g, movable); - _.forEach(barycenters, function(entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (_.has(subgraphResult, "barycenter")) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = _.flatten([bl, result.vs, br], true); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!_.has(result, "barycenter")) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = (result.barycenter * result.weight + - blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } + function dfs(v) { + if (_.has(visited, v)) return; + visited[v] = true; + cmpt.push(v); + _.each(g.successors(v), dfs); + _.each(g.predecessors(v), dfs); } - return result; -} - -function expandSubgraphs(entries, subgraphs) { - _.forEach(entries, function(entry) { - entry.vs = _.flatten(entry.vs.map(function(v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }), true); + _.each(g.nodes(), function(v) { + cmpt = []; + dfs(v); + if (cmpt.length) { + cmpts.push(cmpt); + } }); -} -function mergeBarycenters(target, other) { - if (!_.isUndefined(target.barycenter)) { - target.barycenter = (target.barycenter * target.weight + - other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } + return cmpts; } /***/ }), -/***/ "./node_modules/dagre/lib/order/sort.js": +/***/ "./node_modules/graphlib/lib/alg/dfs.js": /*!**********************************************!*\ - !*** ./node_modules/dagre/lib/order/sort.js ***! + !*** ./node_modules/graphlib/lib/alg/dfs.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); -module.exports = sort; +module.exports = dfs; -function sort(entries, biasRight) { - var parts = util.partition(entries, function(entry) { - return _.has(entry, "barycenter"); - }); - var sortable = parts.lhs, - unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!_.isArray(vs)) { + vs = [vs]; + } - sortable.sort(compareWithBias(!!biasRight)); + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + var acc = [], + visited = {}; + _.each(vs, function(v) { + if (!g.hasNode(v)) { + throw new Error("Graph does not have node: " + v); + } - _.forEach(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + doDfs(g, v, order === "post", visited, navigation, acc); }); - - var result = { vs: _.flatten(vs, true) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = _.last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; + return acc; } -function compareWithBias(bias) { - return function(entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!_.has(visited, v)) { + visited[v] = true; - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; + if (!postorder) { acc.push(v); } + _.each(navigation(v), function(w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { acc.push(v); } + } } /***/ }), -/***/ "./node_modules/dagre/lib/parent-dummy-chains.js": +/***/ "./node_modules/graphlib/lib/alg/dijkstra-all.js": /*!*******************************************************!*\ - !*** ./node_modules/dagre/lib/parent-dummy-chains.js ***! + !*** ./node_modules/graphlib/lib/alg/dijkstra-all.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); +var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"), + _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); -module.exports = parentDummyChains; +module.exports = dijkstraAll; -function parentDummyChains(g) { - var postorderNums = postorder(g); +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform(g.nodes(), function(acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, {}); +} - _.forEach(g.graph().dummyChains, function(v) { - var node = g.node(v), - edgeObj = node.edgeObj, - pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w), - path = pathData.path, - lca = pathData.lca, - pathIdx = 0, - pathV = path[pathIdx], - ascending = true; - while (v !== edgeObj.w) { - node = g.node(v); +/***/ }), - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && - g.node(pathV).maxRank < node.rank) { - pathIdx++; - } +/***/ "./node_modules/graphlib/lib/alg/dijkstra.js": +/*!***************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/dijkstra.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (pathV === lca) { - ascending = false; - } - } +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), + PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); - if (!ascending) { - while (pathIdx < path.length - 1 && - g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { - pathIdx++; - } - pathV = path[pathIdx]; - } +module.exports = dijkstra; - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); +var DEFAULT_WEIGHT_FUNC = _.constant(1); + +function dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra(g, String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { return g.outEdges(v); }); } -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = [], - wPath = [], - low = Math.min(postorderNums[v].low, postorderNums[w].low), - lim = Math.max(postorderNums[v].lim, postorderNums[w].lim), - parent, - lca; +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}, + pq = new PriorityQueue(), + v, vEntry; - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && - (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; + var updateNeighbors = function(edge) { + var w = edge.v !== v ? edge.v : edge.w, + wEntry = results[w], + weight = weightFn(edge), + distance = vEntry.distance + weight; - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } + if (weight < 0) { + throw new Error("dijkstra does not allow negative edge weights. " + + "Bad edge: " + edge + " Weight: " + weight); + } - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; -function postorder(g) { - var result = {}, - lim = 0; + g.nodes().forEach(function(v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); - function dfs(v) { - var low = lim; - _.forEach(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); } - _.forEach(g.children(), dfs); - return result; + return results; } /***/ }), -/***/ "./node_modules/dagre/lib/position/bk.js": -/*!***********************************************!*\ - !*** ./node_modules/dagre/lib/position/bk.js ***! - \***********************************************/ +/***/ "./node_modules/graphlib/lib/alg/find-cycles.js": +/*!******************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/find-cycles.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), + tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"); +module.exports = findCycles; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, - util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); +function findCycles(g) { + return _.filter(tarjan(g), function(cmpt) { + return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); + }); +} -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ -module.exports = { - positionX: positionX, - findType1Conflicts: findType1Conflicts, - findType2Conflicts: findType2Conflicts, - addConflict: addConflict, - hasConflict: hasConflict, - verticalAlignment: verticalAlignment, - horizontalCompaction: horizontalCompaction, - alignCoordinates: alignCoordinates, - findSmallestWidthAlignment: findSmallestWidthAlignment, - balance: balance -}; +/***/ }), -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; +/***/ "./node_modules/graphlib/lib/alg/floyd-warshall.js": +/*!*********************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/floyd-warshall.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function visitLayer(prevLayer, layer) { - var - // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = _.last(layer); +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); - _.forEach(layer, function(v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; +module.exports = floydWarshall; - if (w || v === lastNode) { - _.forEach(layer.slice(scanPos, i +1), function(scanNode) { - _.forEach(g.predecessors(scanNode), function(u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && - !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - scanPos = i + 1; - k0 = k1; +var DEFAULT_WEIGHT_FUNC = _.constant(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall(g, + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { return g.outEdges(v); }); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}, + nodes = g.nodes(); + + nodes.forEach(function(v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function(w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; } }); + edgeFn(v).forEach(function(edge) { + var w = edge.v === v ? edge.w : edge.v, + d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); - return layer; - } + nodes.forEach(function(k) { + var rowK = results[k]; + nodes.forEach(function(i) { + var rowI = results[i]; + nodes.forEach(function(j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); - _.reduce(layering, visitLayer); - return conflicts; + return results; } -function findType2Conflicts(g, layering) { - var conflicts = {}; - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - _.forEach(_.range(southPos, southEnd), function(i) { - v = south[i]; - if (g.node(v).dummy) { - _.forEach(g.predecessors(v), function(u) { - var uNode = g.node(u); - if (uNode.dummy && - (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } +/***/ }), +/***/ "./node_modules/graphlib/lib/alg/index.js": +/*!************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/index.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; +module.exports = { + components: __webpack_require__(/*! ./components */ "./node_modules/graphlib/lib/alg/components.js"), + dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"), + dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/graphlib/lib/alg/dijkstra-all.js"), + findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/graphlib/lib/alg/find-cycles.js"), + floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/graphlib/lib/alg/floyd-warshall.js"), + isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/graphlib/lib/alg/is-acyclic.js"), + postorder: __webpack_require__(/*! ./postorder */ "./node_modules/graphlib/lib/alg/postorder.js"), + preorder: __webpack_require__(/*! ./preorder */ "./node_modules/graphlib/lib/alg/preorder.js"), + prim: __webpack_require__(/*! ./prim */ "./node_modules/graphlib/lib/alg/prim.js"), + tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"), + topsort: __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js") +}; - _.forEach(south, function(v, southLookahead) { - if (g.node(v).dummy === "border") { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - return south; - } +/***/ }), - _.reduce(layering, visitLayer); - return conflicts; -} +/***/ "./node_modules/graphlib/lib/alg/is-acyclic.js": +/*!*****************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/is-acyclic.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return _.find(g.predecessors(v), function(u) { - return g.node(u).dummy; - }); - } -} +var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js"); -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } +module.exports = isAcyclic; - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof topsort.CycleException) { + return false; + } + throw e; } - conflictsV[w] = true; + return true; } -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return _.has(conflicts[v], w); -} -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; +/***/ }), - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); +/***/ "./node_modules/graphlib/lib/alg/postorder.js": +/*!****************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/postorder.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - _.forEach(layering, function(layer) { - var prevIdx = -1; - _.forEach(layer, function(v) { - var ws = neighborFn(v); - if (ws.length) { - ws = _.sortBy(ws, function(w) { return pos[w]; }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && - prevIdx < pos[w] && - !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); +var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); - return { root: root, align: align }; +module.exports = postorder; + +function postorder(g, vs) { + return dfs(g, vs, "post"); } -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? "borderLeft" : "borderRight"; - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } +/***/ }), - elem = stack.pop(); - } - } +/***/ "./node_modules/graphlib/lib/alg/preorder.js": +/*!***************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/preorder.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } +var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function(acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); +module.exports = preorder; - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } +function preorder(g, vs) { + return dfs(g, vs, "pre"); +} - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - // Assign x coordinates to all nodes - _.forEach(align, function(v) { - xs[v] = xs[root[v]]; - }); +/***/ }), - return xs; -} +/***/ "./node_modules/graphlib/lib/alg/prim.js": +/*!***********************************************!*\ + !*** ./node_modules/graphlib/lib/alg/prim.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), + Graph = __webpack_require__(/*! ../graph */ "./node_modules/graphlib/lib/graph.js"), + PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new Graph(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); +module.exports = prim; - _.forEach(layering, function(layer) { - var u; - _.forEach(layer, function(v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); +function prim(g, weightFunc) { + var result = new Graph(), + parents = {}, + pq = new PriorityQueue(), + v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v, + pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); } - u = v; - }); - }); + } + } - return blockGraph; -} + if (g.nodeCount() === 0) { + return result; + } -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return _.minBy(_.values(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; + _.each(g.nodes(), function(v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); - _.forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error("Input graph is not connected: " + g); + } else { + init = true; + } - return max - min; - }); + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; } -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = _.values(alignTo), - alignToMin = _.min(alignToVals), - alignToMax = _.max(alignToVals); - _.forEach(["u", "d"], function(vert) { - _.forEach(["l", "r"], function(horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; +/***/ }), - var xsVals = _.values(xs); - delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); +/***/ "./node_modules/graphlib/lib/alg/tarjan.js": +/*!*************************************************!*\ + !*** ./node_modules/graphlib/lib/alg/tarjan.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (delta) { - xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); - } - }); - }); -} +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); -function balance(xss, align) { - return _.mapValues(xss.ul, function(ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = _.sortBy(_.map(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} +module.exports = tarjan; -function positionX(g) { - var layering = util.buildLayerMatrix(g), - conflicts = _.merge(findType1Conflicts(g, layering), - findType2Conflicts(g, layering)); +function tarjan(g) { + var index = 0, + stack = [], + visited = {}, // node id -> { onStack, lowlink, index } + results = []; - var xss = {}, - adjustedLayering; - _.forEach(["u", "d"], function(vert) { - adjustedLayering = vert === "u" ? layering : _.values(layering).reverse(); - _.forEach(["l", "r"], function(horiz) { - if (horiz === "r") { - adjustedLayering = _.map(adjustedLayering, function(inner) { - return _.values(inner).reverse(); - }); - } + function dfs(v) { + var entry = visited[v] = { + onStack: true, + lowlink: index, + index: index++ + }; + stack.push(v); - var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, - align.root, align.align, - horiz === "r"); - if (horiz === "r") { - xs = _.mapValues(xs, function(x) { return -x; }); + g.successors(v).forEach(function(w) { + if (!_.has(visited, w)) { + dfs(w); + entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); + } else if (visited[w].onStack) { + entry.lowlink = Math.min(entry.lowlink, visited[w].index); } - xss[vert + horiz] = xs; }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function(g, v, w) { - var vLabel = g.node(v), - wLabel = g.node(w), - sum = 0, - delta; - sum += vLabel.width / 2; - if (_.has(vLabel, "labelpos")) { - switch (vLabel.labelpos.toLowerCase()) { - case "l": delta = -vLabel.width / 2; break; - case "r": delta = vLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; + if (entry.lowlink === entry.index) { + var cmpt = [], + w; + do { + w = stack.pop(); + visited[w].onStack = false; + cmpt.push(w); + } while (v !== w); + results.push(cmpt); } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + } - sum += wLabel.width / 2; - if (_.has(wLabel, "labelpos")) { - switch (wLabel.labelpos.toLowerCase()) { - case "l": delta = wLabel.width / 2; break; - case "r": delta = -wLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; + g.nodes().forEach(function(v) { + if (!_.has(visited, v)) { + dfs(v); } - delta = 0; - - return sum; - }; -} + }); -function width(g, v) { - return g.node(v).width; + return results; } /***/ }), -/***/ "./node_modules/dagre/lib/position/index.js": +/***/ "./node_modules/graphlib/lib/alg/topsort.js": /*!**************************************************!*\ - !*** ./node_modules/dagre/lib/position/index.js ***! + !*** ./node_modules/graphlib/lib/alg/topsort.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +module.exports = topsort; +topsort.CycleException = CycleException; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"), - positionX = __webpack_require__(/*! ./bk */ "./node_modules/dagre/lib/position/bk.js").positionX; +function topsort(g) { + var visited = {}, + stack = {}, + results = []; -module.exports = position; + function visit(node) { + if (_.has(stack, node)) { + throw new CycleException(); + } -function position(g) { - g = util.asNonCompoundGraph(g); + if (!_.has(visited, node)) { + stack[node] = true; + visited[node] = true; + _.each(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } - positionY(g); - _.forEach(positionX(g), function(x, v) { - g.node(v).x = x; - }); -} + _.each(g.sinks(), visit); -function positionY(g) { - var layering = util.buildLayerMatrix(g), - rankSep = g.graph().ranksep, - prevY = 0; - _.forEach(layering, function(layer) { - var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); - _.forEach(layer, function(v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} + if (_.size(visited) !== g.nodeCount()) { + throw new CycleException(); + } + return results; +} +function CycleException() {} +CycleException.prototype = new Error(); // must be an instance of Error to pass testing /***/ }), -/***/ "./node_modules/dagre/lib/rank/feasible-tree.js": -/*!******************************************************!*\ - !*** ./node_modules/dagre/lib/rank/feasible-tree.js ***! - \******************************************************/ +/***/ "./node_modules/graphlib/lib/data/priority-queue.js": +/*!**********************************************************!*\ + !*** ./node_modules/graphlib/lib/data/priority-queue.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +module.exports = PriorityQueue; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph, - slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack; +/** + * A min-priority queue data structure. This algorithm is derived from Cormen, + * et al., "Introduction to Algorithms". The basic idea of a min-priority + * queue is that you can efficiently (in O(1) time) get the smallest key in + * the queue. Adding and removing elements takes O(log n) time. A key can + * have its priority decreased in O(log n) time. + */ +function PriorityQueue() { + this._arr = []; + this._keyIndices = {}; +} -module.exports = feasibleTree; +/** + * Returns the number of elements in the queue. Takes `O(1)` time. + */ +PriorityQueue.prototype.size = function() { + return this._arr.length; +}; -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. +/** + * Returns the keys that are in the queue. Takes `O(n)` time. */ -function feasibleTree(g) { - var t = new Graph({ directed: false }); +PriorityQueue.prototype.keys = function() { + return this._arr.map(function(x) { return x.key; }); +}; - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0], - size = g.nodeCount(); - t.setNode(start, {}); +/** + * Returns `true` if **key** is in the queue and `false` if not. + */ +PriorityQueue.prototype.has = function(key) { + return _.has(this._keyIndices, key); +}; - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); +/** + * Returns the priority for **key**. If **key** is not present in the queue + * then this function returns `undefined`. Takes `O(1)` time. + * + * @param {Object} key + */ +PriorityQueue.prototype.priority = function(key) { + var index = this._keyIndices[key]; + if (index !== undefined) { + return this._arr[index].priority; } +}; - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. +/** + * Returns the key for the minimum element in this queue. If the queue is + * empty this function throws an Error. Takes `O(1)` time. */ -function tightTree(t, g) { - function dfs(v) { - _.forEach(g.nodeEdges(v), function(e) { - var edgeV = e.v, - w = (v === edgeV) ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); +PriorityQueue.prototype.min = function() { + if (this.size() === 0) { + throw new Error("Queue underflow"); } + return this._arr[0].key; +}; - _.forEach(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. +/** + * Inserts a new key into the priority queue. If the key already exists in + * the queue this function returns `false`; otherwise it will return `true`. + * Takes `O(n)` time. + * + * @param {Object} key the key to add + * @param {Number} priority the initial priority for the key */ -function findMinSlackEdge(t, g) { - return _.minBy(g.edges(), function(e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - _.forEach(t.nodes(), function(v) { - g.node(v).rank += delta; - }); -} - - -/***/ }), - -/***/ "./node_modules/dagre/lib/rank/index.js": -/*!**********************************************!*\ - !*** ./node_modules/dagre/lib/rank/index.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js"), - longestPath = rankUtil.longestPath, - feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"), - networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre/lib/rank/network-simplex.js"); +PriorityQueue.prototype.add = function(key, priority) { + var keyIndices = this._keyIndices; + key = String(key); + if (!_.has(keyIndices, key)) { + var arr = this._arr; + var index = arr.length; + keyIndices[key] = index; + arr.push({key: key, priority: priority}); + this._decrease(index); + return true; + } + return false; +}; -module.exports = rank; +/** + * Removes and returns the smallest key in the queue. Takes `O(log n)` time. + */ +PriorityQueue.prototype.removeMin = function() { + this._swap(0, this._arr.length - 1); + var min = this._arr.pop(); + delete this._keyIndices[min.key]; + this._heapify(0); + return min.key; +}; -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: +/** + * Decreases the priority for **key** to **priority**. If the new priority is + * greater than the previous priority, this function will throw an Error. * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. + * @param {Object} key the key for which to raise priority + * @param {Number} priority the new priority for the key */ -function rank(g) { - switch(g.graph().ranker) { - case "network-simplex": networkSimplexRanker(g); break; - case "tight-tree": tightTreeRanker(g); break; - case "longest-path": longestPathRanker(g); break; - default: networkSimplexRanker(g); +PriorityQueue.prototype.decrease = function(key, priority) { + var index = this._keyIndices[key]; + if (priority > this._arr[index].priority) { + throw new Error("New priority is greater than current priority. " + + "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); } -} + this._arr[index].priority = priority; + this._decrease(index); +}; -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; +PriorityQueue.prototype._heapify = function(i) { + var arr = this._arr; + var l = 2 * i, + r = l + 1, + largest = i; + if (l < arr.length) { + largest = arr[l].priority < arr[largest].priority ? l : largest; + if (r < arr.length) { + largest = arr[r].priority < arr[largest].priority ? r : largest; + } + if (largest !== i) { + this._swap(i, largest); + this._heapify(largest); + } + } +}; -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} +PriorityQueue.prototype._decrease = function(index) { + var arr = this._arr; + var priority = arr[index].priority; + var parent; + while (index !== 0) { + parent = index >> 1; + if (arr[parent].priority < priority) { + break; + } + this._swap(index, parent); + index = parent; + } +}; -function networkSimplexRanker(g) { - networkSimplex(g); -} +PriorityQueue.prototype._swap = function(i, j) { + var arr = this._arr; + var keyIndices = this._keyIndices; + var origArrI = arr[i]; + var origArrJ = arr[j]; + arr[i] = origArrJ; + arr[j] = origArrI; + keyIndices[origArrJ.key] = i; + keyIndices[origArrI.key] = j; +}; /***/ }), -/***/ "./node_modules/dagre/lib/rank/network-simplex.js": -/*!********************************************************!*\ - !*** ./node_modules/dagre/lib/rank/network-simplex.js ***! - \********************************************************/ +/***/ "./node_modules/graphlib/lib/graph.js": +/*!********************************************!*\ + !*** ./node_modules/graphlib/lib/graph.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"), - feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"), - slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack, - initRank = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").longestPath, - preorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.preorder, - postorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.postorder, - simplify = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js").simplify; +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"); -module.exports = networkSimplex; +module.exports = Graph; -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; +var DEFAULT_EDGE_NAME = "\x00", + GRAPH_NODE = "\x00", + EDGE_KEY_DELIM = "\x01"; -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - initRank(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} +function Graph(opts) { + this._isDirected = _.has(opts, "directed") ? opts.directed : true; + this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; + this._isCompound = _.has(opts, "compound") ? opts.compound : false; -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - _.forEach(vs, function(v) { - assignCutValue(t, g, v); - }); -} + // Label for the graph itself + this._label = undefined; -function assignCutValue(t, g, child) { - var childLab = t.node(child), - parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = _.constant(undefined); -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child), - parent = childLab.parent, - // True if the child is on the tail end of the edge in the directed graph - childIsTail = true, - // The graph's view of the tree edge we're inspecting - graphEdge = g.edge(child, parent), - // The accumulated cut value for the edge between this node and its parent - cutValue = 0; + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = _.constant(undefined); - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; } - cutValue = graphEdge.weight; + // v -> edgeObj + this._in = {}; - _.forEach(g.nodeEdges(child), function(e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; + // u -> v -> Number + this._preds = {}; - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; + // v -> edgeObj + this._out = {}; - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); + // v -> w -> Number + this._sucs = {}; - return cutValue; -} + // e -> edgeObj + this._edgeObjs = {}; -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); + // e -> label + this._edgeLabels = {}; } -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim, - label = tree.node(v); +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; - visited[v] = true; - _.forEach(tree.neighbors(v), function(w) { - if (!_.has(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - return nextLim; -} +/* === Graph functions ========= */ -function leaveEdge(tree) { - return _.find(tree.edges(), function(e) { - return tree.edge(e).cutvalue < 0; - }); -} +Graph.prototype.isDirected = function() { + return this._isDirected; +}; -function enterEdge(t, g, edge) { - var v = edge.v, - w = edge.w; +Graph.prototype.isMultigraph = function() { + return this._isMultigraph; +}; - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } +Graph.prototype.isCompound = function() { + return this._isCompound; +}; - var vLabel = t.node(v), - wLabel = t.node(w), - tailLabel = vLabel, - flip = false; +Graph.prototype.setGraph = function(label) { + this._label = label; + return this; +}; - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } +Graph.prototype.graph = function() { + return this._label; +}; - var candidates = _.filter(g.edges(), function(edge) { - return flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel); - }); - return _.minBy(candidates, function(edge) { return slack(g, edge); }); -} +/* === Node functions ========== */ -function exchangeEdges(t, g, e, f) { - var v = e.v, - w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} +Graph.prototype.setDefaultNodeLabel = function(newDefault) { + if (!_.isFunction(newDefault)) { + newDefault = _.constant(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; +}; -function updateRanks(t, g) { - var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }), - vs = preorder(t, root); - vs = vs.slice(1); - _.forEach(vs, function(v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; +Graph.prototype.nodeCount = function() { + return this._nodeCount; +}; - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } +Graph.prototype.nodes = function() { + return _.keys(this._nodes); +}; - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); +Graph.prototype.sources = function() { + var self = this; + return _.filter(this.nodes(), function(v) { + return _.isEmpty(self._in[v]); }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - +}; -/***/ }), +Graph.prototype.sinks = function() { + var self = this; + return _.filter(this.nodes(), function(v) { + return _.isEmpty(self._out[v]); + }); +}; -/***/ "./node_modules/dagre/lib/rank/util.js": -/*!*********************************************!*\ - !*** ./node_modules/dagre/lib/rank/util.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +Graph.prototype.setNodes = function(vs, value) { + var args = arguments; + var self = this; + _.each(vs, function(v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; +}; -"use strict"; +Graph.prototype.setNode = function(v, value) { + if (_.has(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; +}; -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); +Graph.prototype.node = function(v) { + return this._nodes[v]; +}; -module.exports = { - longestPath: longestPath, - slack: slack +Graph.prototype.hasNode = function(v) { + return _.has(this._nodes, v); }; -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (_.has(visited, v)) { - return label.rank; +Graph.prototype.removeNode = function(v) { + var self = this; + if (_.has(this._nodes, v)) { + var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + _.each(this.children(v), function(child) { + self.setParent(child); + }); + delete this._children[v]; } - visited[v] = true; + _.each(_.keys(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + _.each(_.keys(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; +}; - var rank = _.min(_.map(g.outEdges(v), function(e) { - return dfs(e.w) - g.edge(e).minlen; - })); +Graph.prototype.setParent = function(v, parent) { + if (!this._isCompound) { + throw new Error("Cannot set parent in a non-compound graph"); + } - if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null) { // return value of _.map([null]) - rank = 0; + if (_.isUndefined(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ""; + for (var ancestor = parent; + !_.isUndefined(ancestor); + ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error("Setting " + parent+ " as parent of " + v + + " would create a cycle"); + } } - return (label.rank = rank); + this.setNode(parent); } - _.forEach(g.sources(), dfs); -} + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; +}; -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} +Graph.prototype._removeFromParentsChildList = function(v) { + delete this._children[this._parent[v]][v]; +}; +Graph.prototype.parent = function(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } +}; -/***/ }), +Graph.prototype.children = function(v) { + if (_.isUndefined(v)) { + v = GRAPH_NODE; + } -/***/ "./node_modules/dagre/lib/util.js": -/*!****************************************!*\ - !*** ./node_modules/dagre/lib/util.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return _.keys(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } +}; -"use strict"; +Graph.prototype.predecessors = function(v) { + var predsV = this._preds[v]; + if (predsV) { + return _.keys(predsV); + } +}; +Graph.prototype.successors = function(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return _.keys(sucsV); + } +}; -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"), - Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph; +Graph.prototype.neighbors = function(v) { + var preds = this.predecessors(v); + if (preds) { + return _.union(preds, this.successors(v)); + } +}; -module.exports = { - addDummyNode: addDummyNode, - simplify: simplify, - asNonCompoundGraph: asNonCompoundGraph, - successorWeights: successorWeights, - predecessorWeights: predecessorWeights, - intersectRect: intersectRect, - buildLayerMatrix: buildLayerMatrix, - normalizeRanks: normalizeRanks, - removeEmptyRanks: removeEmptyRanks, - addBorderNode: addBorderNode, - maxRank: maxRank, - partition: partition, - time: time, - notime: notime +Graph.prototype.isLeaf = function (v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; }; -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = _.uniqueId(name); - } while (g.hasNode(v)); +Graph.prototype.filterNodes = function(filter) { + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound + }); - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} + copy.setGraph(this.graph()); -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new Graph().setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); - _.forEach(g.edges(), function(e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }, - label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen) - }); + var self = this; + _.each(this._nodes, function(value, v) { + if (filter(v)) { + copy.setNode(v, value); + } }); - return simplified; -} -function asNonCompoundGraph(g) { - var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); + _.each(this._edgeObjs, function(e) { + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); } }); - _.forEach(g.edges(), function(e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var sucs = {}; - _.forEach(g.outEdges(v), function(e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var preds = {}; - _.forEach(g.inEdges(v), function(e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + if (this._isCompound) { + _.each(copy.nodes(), function(v) { + copy.setParent(v, findParent(v)); }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} + } -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; + return copy; +}; - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; +/* === Edge functions ========== */ - if (!dx && !dy) { - throw new Error("Not possible to find intersection inside of the rectangle"); +Graph.prototype.setDefaultEdgeLabel = function(newDefault) { + if (!_.isFunction(newDefault)) { + newDefault = _.constant(newDefault); } + this._defaultEdgeLabelFn = newDefault; + return this; +}; - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = h * dx / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = w * dy / dx; - } +Graph.prototype.edgeCount = function() { + return this._edgeCount; +}; - return { x: x + sx, y: y + sy }; -} +Graph.prototype.edges = function() { + return _.values(this._edgeObjs); +}; -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); - _.forEach(g.nodes(), function(v) { - var node = g.node(v), - rank = node.rank; - if (!_.isUndefined(rank)) { - layering[rank][node.order] = v; +Graph.prototype.setPath = function(vs, value) { + var self = this, + args = arguments; + _.reduce(vs, function(v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); } + return w; }); - return layering; -} + return this; +}; /* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) */ -function normalizeRanks(g) { - var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (_.has(node, "rank")) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); +Graph.prototype.setEdge = function() { + var v, w, name, value, + valueSpecified = false, + arg0 = arguments[0]; - var layers = []; - _.forEach(g.nodes(), function(v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; + if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; } - layers[rank].push(v); - }); - - var delta = 0, - nodeRankFactor = g.graph().nodeRankFactor; - _.forEach(layers, function(vs, i) { - if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - _.forEach(vs, function(v) { g.node(v).rank += delta; }); + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0 - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; } - return addDummyNode(g, "border", node, prefix); -} -function maxRank(g) { - return _.max(_.map(g.nodes(), function(v) { - var rank = g.node(v).rank; - if (!_.isUndefined(rank)) { - return rank; - } - })); -} + v = "" + v; + w = "" + w; + if (!_.isUndefined(name)) { + name = "" + name; + } -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - _.forEach(collection, function(value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); + var e = edgeArgsToId(this._isDirected, v, w, name); + if (_.has(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function time(name, fn) { - var start = _.now(); - try { - return fn(); - } finally { - console.log(name + " time: " + (_.now() - start) + "ms"); + return this; } -} - -function notime(name, fn) { - return fn(); -} - - -/***/ }), - -/***/ "./node_modules/dagre/lib/version.js": -/*!*******************************************!*\ - !*** ./node_modules/dagre/lib/version.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -module.exports = "0.8.4"; + if (!_.isUndefined(name) && !this._isMultigraph) { + throw new Error("Cannot set a named edge when isMultigraph = false"); + } + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); -/***/ }), + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); -/***/ "./node_modules/element-resize-detector/src/browser-detector.js": -/*!**********************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/browser-detector.js ***! - \**********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; -"use strict"; + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; +}; +Graph.prototype.edge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)); + return this._edgeLabels[e]; +}; -var detector = module.exports = {}; +Graph.prototype.hasEdge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)); + return _.has(this._edgeLabels, e); +}; -detector.isIE = function(version) { - function isAnyIeVersion() { - var agent = navigator.userAgent.toLowerCase(); - return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1; - } +Graph.prototype.removeEdge = function(v, w, name) { + var e = (arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name)), + edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; +}; - if(!isAnyIeVersion()) { - return false; +Graph.prototype.inEdges = function(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = _.values(inV); + if (!u) { + return edges; } + return _.filter(edges, function(edge) { return edge.v === u; }); + } +}; - if(!version) { - return true; +Graph.prototype.outEdges = function(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = _.values(outV); + if (!w) { + return edges; } + return _.filter(edges, function(edge) { return edge.w === w; }); + } +}; - //Shamelessly stolen from https://gist.github.com/padolsey/527683 - var ieVersion = (function(){ - var undef, - v = 3, - div = document.createElement("div"), - all = div.getElementsByTagName("i"); +Graph.prototype.nodeEdges = function(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } +}; - do { - div.innerHTML = ""; - } - while (all[0]); +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} - return v > 4 ? v : undef; - }()); +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { delete map[k]; } +} - return version === ieVersion; -}; +function edgeArgsToId(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); +} -detector.isLegacyOpera = function() { - return !!window.opera; -}; +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} /***/ }), -/***/ "./node_modules/element-resize-detector/src/collection-utils.js": -/*!**********************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/collection-utils.js ***! - \**********************************************************************/ +/***/ "./node_modules/graphlib/lib/index.js": +/*!********************************************!*\ + !*** ./node_modules/graphlib/lib/index.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var utils = module.exports = {}; - -/** - * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value. - * @public - * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1. - * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned. - * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing. - */ -utils.forEach = function(collection, callback) { - for(var i = 0; i < collection.length; i++) { - var result = callback(collection[i]); - if(result) { - return result; - } - } +// Includes only the "core" of graphlib +module.exports = { + Graph: __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"), + version: __webpack_require__(/*! ./version */ "./node_modules/graphlib/lib/version.js") }; /***/ }), -/***/ "./node_modules/element-resize-detector/src/detection-strategy/object.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/detection-strategy/object.js ***! - \*******************************************************************************/ +/***/ "./node_modules/graphlib/lib/json.js": +/*!*******************************************!*\ + !*** ./node_modules/graphlib/lib/json.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Resize detection strategy that injects objects to elements in order to detect resize events. - * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ - */ - - +var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"), + Graph = __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"); -var browserDetector = __webpack_require__(/*! ../browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js"); +module.exports = { + write: write, + read: read +}; -module.exports = function(options) { - options = options || {}; - var reporter = options.reporter; - var batchProcessor = options.batchProcessor; - var getState = options.stateHandler.getState; +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound() + }, + nodes: writeNodes(g), + edges: writeEdges(g) + }; + if (!_.isUndefined(g.graph())) { + json.value = _.clone(g.graph()); + } + return json; +} - if(!reporter) { - throw new Error("Missing required dependency: reporter."); +function writeNodes(g) { + return _.map(g.nodes(), function(v) { + var nodeValue = g.node(v), + parent = g.parent(v), + node = { v: v }; + if (!_.isUndefined(nodeValue)) { + node.value = nodeValue; } - - /** - * Adds a resize event listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. - */ - function addListener(element, listener) { - function listenerProxy() { - listener(element); - } - - if(browserDetector.isIE(8)) { - //IE 8 does not support object, but supports the resize event directly on elements. - getState(element).object = { - proxy: listenerProxy - }; - element.attachEvent("onresize", listenerProxy); - } else { - var object = getObject(element); - - if(!object) { - throw new Error("Element is not detectable by this strategy."); - } - - object.contentDocument.defaultView.addEventListener("resize", listenerProxy); - } + if (!_.isUndefined(parent)) { + node.parent = parent; } + return node; + }); +} - function buildCssTextString(rules) { - var seperator = options.important ? " !important; " : "; "; - - return (rules.join(seperator) + seperator).trim(); +function writeEdges(g) { + return _.map(g.edges(), function(e) { + var edgeValue = g.edge(e), + edge = { v: e.v, w: e.w }; + if (!_.isUndefined(e.name)) { + edge.name = e.name; } + if (!_.isUndefined(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} - /** - * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. - * @private - * @param {object} options Optional options object. - * @param {element} element The element to make detectable - * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. - */ - function makeDetectable(options, element, callback) { - if (!callback) { - callback = element; - element = options; - options = null; - } - - options = options || {}; - var debug = options.debug; - - function injectObject(element, callback) { - var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]); - - //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element. +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function(entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _.each(json.edges, function(entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; +} - // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not. - var positionCheckPerformed = false; - // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers. - // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM. - var style = window.getComputedStyle(element); - var width = element.offsetWidth; - var height = element.offsetHeight; +/***/ }), - getState(element).startSize = { - width: width, - height: height - }; +/***/ "./node_modules/graphlib/lib/lodash.js": +/*!*********************************************!*\ + !*** ./node_modules/graphlib/lib/lodash.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function mutateDom() { - function alterPositionStyles() { - if(style.position === "static") { - element.style.setProperty("position", "relative", options.important ? "important" : ""); +/* global window */ - var removeRelativeStyles = function(reporter, element, style, property) { - function getNumericalValue(value) { - return value.replace(/[^-\d\.]/g, ""); - } +var lodash; - var value = style[property]; +if (true) { + try { + lodash = { + clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"), + constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), + each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), + filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), + has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), + isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"), + isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"), + isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), + isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), + keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"), + map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), + reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), + size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"), + transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"), + union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"), + values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js") + }; + } catch (e) {} +} - if(value !== "auto" && getNumericalValue(value) !== "0") { - reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); - element.style.setProperty(property, "0", options.important ? "important" : ""); - } - }; +if (!lodash) { + lodash = window._; +} - //Check so that there are no accidental styles that will make the element styled differently now that is is relative. - //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). - removeRelativeStyles(reporter, element, style, "top"); - removeRelativeStyles(reporter, element, style, "right"); - removeRelativeStyles(reporter, element, style, "bottom"); - removeRelativeStyles(reporter, element, style, "left"); - } - } +module.exports = lodash; - function onObjectLoad() { - // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM. - if (!positionCheckPerformed) { - alterPositionStyles(); - } - /*jshint validthis: true */ +/***/ }), - function getDocument(element, callback) { - //Opera 12 seem to call the object.onload before the actual document has been created. - //So if it is not present, poll it with an timeout until it is present. - //TODO: Could maybe be handled better with object.onreadystatechange or similar. - if(!element.contentDocument) { - var state = getState(element); - if (state.checkForObjectDocumentTimeoutId) { - window.clearTimeout(state.checkForObjectDocumentTimeoutId); - } - state.checkForObjectDocumentTimeoutId = setTimeout(function checkForObjectDocument() { - state.checkForObjectDocumentTimeoutId = 0; - getDocument(element, callback); - }, 100); +/***/ "./node_modules/graphlib/lib/version.js": +/*!**********************************************!*\ + !*** ./node_modules/graphlib/lib/version.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return; - } +module.exports = '2.1.7'; - callback(element.contentDocument); - } - //Mutating the object element here seems to fire another load event. - //Mutating the inner document of the object element is fine though. - var objectElement = this; +/***/ }), - //Create the style element to be added to the object. - getDocument(objectElement, function onObjectDocumentReady(objectDocument) { - //Notify that the element is ready to be listened to. - callback(element); - }); - } +/***/ "./node_modules/ieee754/index.js": +/*!***************************************!*\ + !*** ./node_modules/ieee754/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements. - // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible. - if (style.position !== "") { - alterPositionStyles(style); - positionCheckPerformed = true; - } +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] - //Add an object element as a child to the target element that will be listened to for resize events. - var object = document.createElement("object"); - object.style.cssText = OBJECT_STYLE; - object.tabIndex = -1; - object.type = "text/html"; - object.setAttribute("aria-hidden", "true"); - object.onload = onObjectLoad; + i += d - //Safari: This must occur before adding the object to the DOM. - //IE: Does not like that this happens before, even if it is also added after. - if(!browserDetector.isIE()) { - object.data = "about:blank"; - } + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - if (!getState(element)) { - // The element has been uninstalled before the actual loading happened. - return; - } + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - element.appendChild(object); - getState(element).object = object; + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} - //IE: This must occur after adding the object to the DOM. - if(browserDetector.isIE()) { - object.data = "about:blank"; - } - } +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - if(batchProcessor) { - batchProcessor.add(mutateDom); - } else { - mutateDom(); - } - } + value = Math.abs(value) - if(browserDetector.isIE(8)) { - //IE 8 does not support objects properly. Luckily they do support the resize event. - //So do not inject the object and notify that the element is already ready to be listened to. - //The event handler for the resize event is attached in the utils.addListener instead. - callback(element); - } else { - injectObject(element, callback); - } + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 } - /** - * Returns the child object of the target element. - * @private - * @param {element} element The target element. - * @returns The object element of the target. - */ - function getObject(element) { - return getState(element).object; + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 } + } - function uninstall(element) { - if (!getState(element)) { - return; - } + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - var object = getObject(element); + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - if (!object) { - return; - } + buffer[offset + i - d] |= s * 128 +} - if (browserDetector.isIE(8)) { - element.detachEvent("onresize", object.proxy); - } else { - element.removeChild(object); - } - if (getState(element).checkForObjectDocumentTimeoutId) { - window.clearTimeout(getState(element).checkForObjectDocumentTimeoutId); - } +/***/ }), - delete getState(element).object; - } +/***/ "./node_modules/isarray/index.js": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return { - makeDetectable: makeDetectable, - addListener: addListener, - uninstall: uninstall - }; +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; }; /***/ }), -/***/ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/detection-strategy/scroll.js ***! - \*******************************************************************************/ +/***/ "./node_modules/js-base64/base64.js": +/*!******************************************!*\ + !*** ./node_modules/js-base64/base64.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events. - * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js +/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* + * base64.js + * + * Licensed under the BSD 3-Clause License. + * http://opensource.org/licenses/BSD-3-Clause + * + * References: + * http://en.wikipedia.org/wiki/Base64 */ +;(function (global, factory) { + true + ? module.exports = factory(global) + : undefined +}(( + typeof self !== 'undefined' ? self + : typeof window !== 'undefined' ? window + : typeof global !== 'undefined' ? global +: this +), function(global) { + 'use strict'; + // existing version for noConflict() + global = global || {}; + var _Base64 = global.Base64; + var version = "2.5.1"; + // if node.js and NOT React Native, we use Buffer + var buffer; + if ( true && module.exports) { + try { + buffer = eval("require('buffer').Buffer"); + } catch (err) { + buffer = undefined; + } + } + // constants + var b64chars + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + var b64tab = function(bin) { + var t = {}; + for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; + return t; + }(b64chars); + var fromCharCode = String.fromCharCode; + // encoder stuff + var cb_utob = function(c) { + if (c.length < 2) { + var cc = c.charCodeAt(0); + return cc < 0x80 ? c + : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) + + fromCharCode(0x80 | (cc & 0x3f))) + : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } else { + var cc = 0x10000 + + (c.charCodeAt(0) - 0xD800) * 0x400 + + (c.charCodeAt(1) - 0xDC00); + return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) + + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) + + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + + fromCharCode(0x80 | ( cc & 0x3f))); + } + }; + var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; + var utob = function(u) { + return u.replace(re_utob, cb_utob); + }; + var cb_encode = function(ccc) { + var padlen = [0, 2, 1][ccc.length % 3], + ord = ccc.charCodeAt(0) << 16 + | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) + | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), + chars = [ + b64chars.charAt( ord >>> 18), + b64chars.charAt((ord >>> 12) & 63), + padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), + padlen >= 1 ? '=' : b64chars.charAt(ord & 63) + ]; + return chars.join(''); + }; + var btoa = global.btoa ? function(b) { + return global.btoa(b); + } : function(b) { + return b.replace(/[\s\S]{1,3}/g, cb_encode); + }; + var _encode = buffer ? + buffer.from && Uint8Array && buffer.from !== Uint8Array.from + ? function (u) { + return (u.constructor === buffer.constructor ? u : buffer.from(u)) + .toString('base64') + } + : function (u) { + return (u.constructor === buffer.constructor ? u : new buffer(u)) + .toString('base64') + } + : function (u) { return btoa(utob(u)) } + ; + var encode = function(u, urisafe) { + return !urisafe + ? _encode(String(u)) + : _encode(String(u)).replace(/[+\/]/g, function(m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); + }; + var encodeURI = function(u) { return encode(u, true) }; + // decoder stuff + var re_btou = new RegExp([ + '[\xC0-\xDF][\x80-\xBF]', + '[\xE0-\xEF][\x80-\xBF]{2}', + '[\xF0-\xF7][\x80-\xBF]{3}' + ].join('|'), 'g'); + var cb_btou = function(cccc) { + switch(cccc.length) { + case 4: + var cp = ((0x07 & cccc.charCodeAt(0)) << 18) + | ((0x3f & cccc.charCodeAt(1)) << 12) + | ((0x3f & cccc.charCodeAt(2)) << 6) + | (0x3f & cccc.charCodeAt(3)), + offset = cp - 0x10000; + return (fromCharCode((offset >>> 10) + 0xD800) + + fromCharCode((offset & 0x3FF) + 0xDC00)); + case 3: + return fromCharCode( + ((0x0f & cccc.charCodeAt(0)) << 12) + | ((0x3f & cccc.charCodeAt(1)) << 6) + | (0x3f & cccc.charCodeAt(2)) + ); + default: + return fromCharCode( + ((0x1f & cccc.charCodeAt(0)) << 6) + | (0x3f & cccc.charCodeAt(1)) + ); + } + }; + var btou = function(b) { + return b.replace(re_btou, cb_btou); + }; + var cb_decode = function(cccc) { + var len = cccc.length, + padlen = len % 4, + n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) + | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) + | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) + | (len > 3 ? b64tab[cccc.charAt(3)] : 0), + chars = [ + fromCharCode( n >>> 16), + fromCharCode((n >>> 8) & 0xff), + fromCharCode( n & 0xff) + ]; + chars.length -= [0, 0, 2, 1][padlen]; + return chars.join(''); + }; + var _atob = global.atob ? function(a) { + return global.atob(a); + } : function(a){ + return a.replace(/\S{1,4}/g, cb_decode); + }; + var atob = function(a) { + return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, '')); + }; + var _decode = buffer ? + buffer.from && Uint8Array && buffer.from !== Uint8Array.from + ? function(a) { + return (a.constructor === buffer.constructor + ? a : buffer.from(a, 'base64')).toString(); + } + : function(a) { + return (a.constructor === buffer.constructor + ? a : new buffer(a, 'base64')).toString(); + } + : function(a) { return btou(_atob(a)) }; + var decode = function(a){ + return _decode( + String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) + .replace(/[^A-Za-z0-9\+\/]/g, '') + ); + }; + var noConflict = function() { + var Base64 = global.Base64; + global.Base64 = _Base64; + return Base64; + }; + // export Base64 + global.Base64 = { + VERSION: version, + atob: atob, + btoa: btoa, + fromBase64: decode, + toBase64: encode, + utob: utob, + encode: encode, + encodeURI: encodeURI, + btou: btou, + decode: decode, + noConflict: noConflict, + __buffer__: buffer + }; + // if ES5 is available, make Base64.extendString() available + if (typeof Object.defineProperty === 'function') { + var noEnum = function(v){ + return {value:v,enumerable:false,writable:true,configurable:true}; + }; + global.Base64.extendString = function () { + Object.defineProperty( + String.prototype, 'fromBase64', noEnum(function () { + return decode(this) + })); + Object.defineProperty( + String.prototype, 'toBase64', noEnum(function (urisafe) { + return encode(this, urisafe) + })); + Object.defineProperty( + String.prototype, 'toBase64URI', noEnum(function () { + return encode(this, true) + })); + }; + } + // + // export Base64 to the namespace + // + if (global['Meteor']) { // Meteor.js + Base64 = global.Base64; + } + // module.exports and AMD are mutually exclusive. + // module.exports has precedence. + if ( true && module.exports) { + module.exports.Base64 = global.Base64; + } + else if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // that's it! + return {Base64: global.Base64} +})); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) +/***/ }), -var forEach = __webpack_require__(/*! ../collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach; - -module.exports = function(options) { - options = options || {}; - var reporter = options.reporter; - var batchProcessor = options.batchProcessor; - var getState = options.stateHandler.getState; - var hasState = options.stateHandler.hasState; - var idHandler = options.idHandler; +/***/ "./node_modules/khroma/dist/channels/index.js": +/*!****************************************************!*\ + !*** ./node_modules/khroma/dist/channels/index.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!batchProcessor) { - throw new Error("Missing required dependency: batchProcessor"); - } +"use strict"; - if (!reporter) { - throw new Error("Missing required dependency: reporter."); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); +var type_1 = __webpack_require__(/*! ./type */ "./node_modules/khroma/dist/channels/type.js"); +/* CHANNELS */ +var Channels = /** @class */ (function () { + /* CONSTRUCTOR */ + function Channels(data, color) { + this.color = color; + this.changed = false; + this.data = data; //TSC + this.type = new type_1.default(); } + /* API */ + Channels.prototype.set = function (data, color) { + this.color = color; + this.changed = false; + this.data = data; //TSC + this.type.type = types_1.TYPE.ALL; + return this; + }; + /* HELPERS */ + Channels.prototype._ensureHSL = function () { + if (this.data.h === undefined) + this.data.h = utils_1.default.channel.rgb2hsl(this.data, 'h'); + if (this.data.s === undefined) + this.data.s = utils_1.default.channel.rgb2hsl(this.data, 's'); + if (this.data.l === undefined) + this.data.l = utils_1.default.channel.rgb2hsl(this.data, 'l'); + }; + Channels.prototype._ensureRGB = function () { + if (this.data.r === undefined) + this.data.r = utils_1.default.channel.hsl2rgb(this.data, 'r'); + if (this.data.g === undefined) + this.data.g = utils_1.default.channel.hsl2rgb(this.data, 'g'); + if (this.data.b === undefined) + this.data.b = utils_1.default.channel.hsl2rgb(this.data, 'b'); + }; + Object.defineProperty(Channels.prototype, "r", { + /* GETTERS */ + get: function () { + if (!this.type.is(types_1.TYPE.HSL) && this.data.r !== undefined) + return this.data.r; + this._ensureHSL(); + return utils_1.default.channel.hsl2rgb(this.data, 'r'); + }, + /* SETTERS */ + set: function (r) { + this.type.set(types_1.TYPE.RGB); + this.changed = true; + this.data.r = r; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "g", { + get: function () { + if (!this.type.is(types_1.TYPE.HSL) && this.data.g !== undefined) + return this.data.g; + this._ensureHSL(); + return utils_1.default.channel.hsl2rgb(this.data, 'g'); + }, + set: function (g) { + this.type.set(types_1.TYPE.RGB); + this.changed = true; + this.data.g = g; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "b", { + get: function () { + if (!this.type.is(types_1.TYPE.HSL) && this.data.b !== undefined) + return this.data.b; + this._ensureHSL(); + return utils_1.default.channel.hsl2rgb(this.data, 'b'); + }, + set: function (b) { + this.type.set(types_1.TYPE.RGB); + this.changed = true; + this.data.b = b; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "h", { + get: function () { + if (!this.type.is(types_1.TYPE.RGB) && this.data.h !== undefined) + return this.data.h; + this._ensureRGB(); + return utils_1.default.channel.rgb2hsl(this.data, 'h'); + }, + set: function (h) { + this.type.set(types_1.TYPE.HSL); + this.changed = true; + this.data.h = h; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "s", { + get: function () { + if (!this.type.is(types_1.TYPE.RGB) && this.data.s !== undefined) + return this.data.s; + this._ensureRGB(); + return utils_1.default.channel.rgb2hsl(this.data, 's'); + }, + set: function (s) { + this.type.set(types_1.TYPE.HSL); + this.changed = true; + this.data.s = s; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "l", { + get: function () { + if (!this.type.is(types_1.TYPE.RGB) && this.data.l !== undefined) + return this.data.l; + this._ensureRGB(); + return utils_1.default.channel.rgb2hsl(this.data, 'l'); + }, + set: function (l) { + this.type.set(types_1.TYPE.HSL); + this.changed = true; + this.data.l = l; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Channels.prototype, "a", { + get: function () { + return this.data.a; + }, + set: function (a) { + this.changed = true; + this.data.a = a; + }, + enumerable: true, + configurable: true + }); + return Channels; +}()); +/* EXPORT */ +exports.default = Channels; - //TODO: Could this perhaps be done at installation time? - var scrollbarSizes = getScrollbarSizes(); - - var styleId = "erd_scroll_detection_scrollbar_style"; - var detectionContainerClass = "erd_scroll_detection_container"; - - function initDocument(targetDocument) { - // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome. - // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements). - injectScrollStyle(targetDocument, styleId, detectionContainerClass); - } - initDocument(window.document); +/***/ }), - function buildCssTextString(rules) { - var seperator = options.important ? " !important; " : "; "; +/***/ "./node_modules/khroma/dist/channels/reusable.js": +/*!*******************************************************!*\ + !*** ./node_modules/khroma/dist/channels/reusable.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return (rules.join(seperator) + seperator).trim(); - } +"use strict"; - function getScrollbarSizes() { - var width = 500; - var height = 500; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var _1 = __webpack_require__(/*! . */ "./node_modules/khroma/dist/channels/index.js"); +/* REUSABLE */ +var channels = new _1.default({ r: 0, g: 0, b: 0, a: 0 }, 'transparent'); +/* EXPORT */ +exports.default = channels; - var child = document.createElement("div"); - child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]); - var container = document.createElement("div"); - container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]); +/***/ }), - container.appendChild(child); +/***/ "./node_modules/khroma/dist/channels/type.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/channels/type.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - document.body.insertBefore(container, document.body.firstChild); +"use strict"; - var widthSize = width - container.clientWidth; - var heightSize = height - container.clientHeight; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); +/* TYPE */ +var Type = /** @class */ (function () { + function Type() { + this.type = types_1.TYPE.ALL; + } + Type.prototype.get = function () { + return this.type; + }; + Type.prototype.set = function (type) { + if (this.type && this.type !== type) + throw new Error('Cannot change both RGB and HSL channels at the same time'); + this.type = type; + }; + Type.prototype.reset = function () { + this.type = types_1.TYPE.ALL; + }; + Type.prototype.is = function (type) { + return this.type === type; + }; + return Type; +}()); +/* EXPORT */ +exports.default = Type; - document.body.removeChild(container); - return { - width: widthSize, - height: heightSize - }; - } +/***/ }), - function injectScrollStyle(targetDocument, styleId, containerClass) { - function injectStyle(style, method) { - method = method || function (element) { - targetDocument.head.appendChild(element); - }; +/***/ "./node_modules/khroma/dist/color/hex.js": +/*!***********************************************!*\ + !*** ./node_modules/khroma/dist/color/hex.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var styleElement = targetDocument.createElement("style"); - styleElement.innerHTML = style; - styleElement.id = styleId; - method(styleElement); - return styleElement; - } +"use strict"; - if (!targetDocument.getElementById(styleId)) { - var containerAnimationClass = containerClass + "_animation"; - var containerAnimationActiveClass = containerClass + "_animation_active"; - var style = "/* Created by the element-resize-detector library. */\n"; - style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n"; - style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n"; - style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; - style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"; - injectStyle(style); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); +var consts_1 = __webpack_require__(/*! ../consts */ "./node_modules/khroma/dist/consts.js"); +/* HEX */ +var Hex = { + /* VARIABLES */ + re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, + /* API */ + parse: function (color) { + if (color.charCodeAt(0) !== 35) + return; // '#' + var match = color.match(Hex.re); + if (!match) + return; + var hex = match[1], dec = parseInt(hex, 16), length = hex.length, hasAlpha = length % 4 === 0, isFullLength = length > 4, multiplier = isFullLength ? 1 : 17, bits = isFullLength ? 8 : 4, bitsOffset = hasAlpha ? 0 : -1, mask = isFullLength ? 255 : 15; + return reusable_1.default.set({ + r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier, + g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier, + b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier, + a: hasAlpha ? (dec & mask) * multiplier / 255 : 1 + }, color); + }, + stringify: function (channels) { + if (channels.a < 1) { // #RRGGBBAA + return "#" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)] + utils_1.default.unit.frac2hex(channels.a); } - } - - function addAnimationClass(element) { - element.className += " " + detectionContainerClass + "_animation_active"; - } - - function addEvent(el, name, cb) { - if (el.addEventListener) { - el.addEventListener(name, cb); - } else if(el.attachEvent) { - el.attachEvent("on" + name, cb); - } else { - return reporter.error("[scroll] Don't know how to add event listeners."); + else { // #RRGGBB + return "#" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)]; } } +}; +/* EXPORT */ +exports.default = Hex; - function removeEvent(el, name, cb) { - if (el.removeEventListener) { - el.removeEventListener(name, cb); - } else if(el.detachEvent) { - el.detachEvent("on" + name, cb); - } else { - return reporter.error("[scroll] Don't know how to remove event listeners."); - } - } - function getExpandElement(element) { - return getState(element).container.childNodes[0].childNodes[0].childNodes[0]; - } +/***/ }), - function getShrinkElement(element) { - return getState(element).container.childNodes[0].childNodes[0].childNodes[1]; - } +/***/ "./node_modules/khroma/dist/color/hsl.js": +/*!***********************************************!*\ + !*** ./node_modules/khroma/dist/color/hsl.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Adds a resize event listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. - */ - function addListener(element, listener) { - var listeners = getState(element).listeners; +"use strict"; - if (!listeners.push) { - throw new Error("Cannot add listener to an element that is not detectable."); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); +/* HSL */ +var HSL = { + /* VARIABLES */ + re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i, + hueRe: /^(.+?)(deg|grad|rad|turn)$/i, + /* HELPERS */ + _hue2deg: function (hue) { + var match = hue.match(HSL.hueRe); + if (match) { + var number = match[1], unit = match[2]; + switch (unit) { + case 'grad': return utils_1.default.channel.clamp.h(parseFloat(number) * .9); + case 'rad': return utils_1.default.channel.clamp.h(parseFloat(number) * 180 / Math.PI); + case 'turn': return utils_1.default.channel.clamp.h(parseFloat(number) * 360); + } } - - getState(element).listeners.push(listener); - } - - /** - * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. - * @private - * @param {object} options Optional options object. - * @param {element} element The element to make detectable - * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. - */ - function makeDetectable(options, element, callback) { - if (!callback) { - callback = element; - element = options; - options = null; + return utils_1.default.channel.clamp.h(parseFloat(hue)); + }, + /* API */ + parse: function (color) { + var charCode = color.charCodeAt(0); + if (charCode !== 104 && charCode !== 72) + return; // 'h'/'H' + var match = color.match(HSL.re); + if (!match) + return; + var h = match[1], s = match[2], l = match[3], a = match[4], isAlphaPercentage = match[5]; + return reusable_1.default.set({ + h: HSL._hue2deg(h), + s: utils_1.default.channel.clamp.s(parseFloat(s)), + l: utils_1.default.channel.clamp.l(parseFloat(l)), + a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color); + }, + stringify: function (channels) { + if (channels.a < 1) { // HSLA + return "hsla(" + utils_1.default.lang.round(channels.h) + ", " + utils_1.default.lang.round(channels.s) + "%, " + utils_1.default.lang.round(channels.l) + "%, " + channels.a + ")"; } - - options = options || {}; - - function debug() { - if (options.debug) { - var args = Array.prototype.slice.call(arguments); - args.unshift(idHandler.get(element), "Scroll: "); - if (reporter.log.apply) { - reporter.log.apply(null, args); - } else { - for (var i = 0; i < args.length; i++) { - reporter.log(args[i]); - } - } - } + else { // HSL + return "hsl(" + utils_1.default.lang.round(channels.h) + ", " + utils_1.default.lang.round(channels.s) + "%, " + utils_1.default.lang.round(channels.l) + "%)"; } + } +}; +/* EXPORT */ +exports.default = HSL; - function isDetached(element) { - function isInDocument(element) { - return element === element.ownerDocument.body || element.ownerDocument.body.contains(element); - } - if (!isInDocument(element)) { - return true; - } +/***/ }), - // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520 - if (window.getComputedStyle(element) === null) { - return true; - } +/***/ "./node_modules/khroma/dist/color/index.js": +/*!*************************************************!*\ + !*** ./node_modules/khroma/dist/color/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return false; - } +"use strict"; - function isUnrendered(element) { - // Check the absolute positioned container since the top level container is display: inline. - var container = getState(element).container.childNodes[0]; - var style = window.getComputedStyle(container); - return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered. +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); +var hex_1 = __webpack_require__(/*! ./hex */ "./node_modules/khroma/dist/color/hex.js"); +var keyword_1 = __webpack_require__(/*! ./keyword */ "./node_modules/khroma/dist/color/keyword.js"); +var rgb_1 = __webpack_require__(/*! ./rgb */ "./node_modules/khroma/dist/color/rgb.js"); +var hsl_1 = __webpack_require__(/*! ./hsl */ "./node_modules/khroma/dist/color/hsl.js"); +/* COLOR */ +var Color = { + /* VARIABLES */ + format: { + keyword: keyword_1.default, + hex: hex_1.default, + rgb: rgb_1.default, + rgba: rgb_1.default, + hsl: hsl_1.default, + hsla: hsl_1.default + }, + /* API */ + parse: function (color) { + if (typeof color !== 'string') + return color; + var channels = hex_1.default.parse(color) || rgb_1.default.parse(color) || hsl_1.default.parse(color) || keyword_1.default.parse(color); // Color providers ordered with performance in mind + if (channels) + return channels; + throw new Error("Unsupported color format: \"" + color + "\""); + }, + stringify: function (channels) { + // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value + if (!channels.changed && channels.color) + return channels.color; + if (channels.type.is(types_1.TYPE.HSL) || channels.data.r === undefined) { + return hsl_1.default.stringify(channels); } - - function getStyle() { - // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here, - // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching). - var elementStyle = window.getComputedStyle(element); - var style = {}; - style.position = elementStyle.position; - style.width = element.offsetWidth; - style.height = element.offsetHeight; - style.top = elementStyle.top; - style.right = elementStyle.right; - style.bottom = elementStyle.bottom; - style.left = elementStyle.left; - style.widthCSS = elementStyle.width; - style.heightCSS = elementStyle.height; - return style; + else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) { + return rgb_1.default.stringify(channels); } - - function storeStartSize() { - var style = getStyle(); - getState(element).startSize = { - width: style.width, - height: style.height - }; - debug("Element start size", getState(element).startSize); + else { + return hex_1.default.stringify(channels); } + } +}; +/* EXPORT */ +exports.default = Color; - function initListeners() { - getState(element).listeners = []; - } - function storeStyle() { - debug("storeStyle invoked."); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +/***/ }), - var style = getStyle(); - getState(element).style = style; - } +/***/ "./node_modules/khroma/dist/color/keyword.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/color/keyword.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function storeCurrentSize(element, width, height) { - getState(element).lastWidth = width; - getState(element).lastHeight = height; - } +"use strict"; - function getExpandChildElement(element) { - return getExpandElement(element).childNodes[0]; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var hex_1 = __webpack_require__(/*! ./hex */ "./node_modules/khroma/dist/color/hex.js"); +/* KEYWORD */ +var Keyword = { + /* VARIABLES */ + colors: { + aliceblue: '#f0f8ff', + antiquewhite: '#faebd7', + aqua: '#00ffff', + aquamarine: '#7fffd4', + azure: '#f0ffff', + beige: '#f5f5dc', + bisque: '#ffe4c4', + black: '#000000', + blanchedalmond: '#ffebcd', + blue: '#0000ff', + blueviolet: '#8a2be2', + brown: '#a52a2a', + burlywood: '#deb887', + cadetblue: '#5f9ea0', + chartreuse: '#7fff00', + chocolate: '#d2691e', + coral: '#ff7f50', + cornflowerblue: '#6495ed', + cornsilk: '#fff8dc', + crimson: '#dc143c', + cyanaqua: '#00ffff', + darkblue: '#00008b', + darkcyan: '#008b8b', + darkgoldenrod: '#b8860b', + darkgray: '#a9a9a9', + darkgreen: '#006400', + darkgrey: '#a9a9a9', + darkkhaki: '#bdb76b', + darkmagenta: '#8b008b', + darkolivegreen: '#556b2f', + darkorange: '#ff8c00', + darkorchid: '#9932cc', + darkred: '#8b0000', + darksalmon: '#e9967a', + darkseagreen: '#8fbc8f', + darkslateblue: '#483d8b', + darkslategray: '#2f4f4f', + darkslategrey: '#2f4f4f', + darkturquoise: '#00ced1', + darkviolet: '#9400d3', + deeppink: '#ff1493', + deepskyblue: '#00bfff', + dimgray: '#696969', + dimgrey: '#696969', + dodgerblue: '#1e90ff', + firebrick: '#b22222', + floralwhite: '#fffaf0', + forestgreen: '#228b22', + fuchsia: '#ff00ff', + gainsboro: '#dcdcdc', + ghostwhite: '#f8f8ff', + gold: '#ffd700', + goldenrod: '#daa520', + gray: '#808080', + green: '#008000', + greenyellow: '#adff2f', + grey: '#808080', + honeydew: '#f0fff0', + hotpink: '#ff69b4', + indianred: '#cd5c5c', + indigo: '#4b0082', + ivory: '#fffff0', + khaki: '#f0e68c', + lavender: '#e6e6fa', + lavenderblush: '#fff0f5', + lawngreen: '#7cfc00', + lemonchiffon: '#fffacd', + lightblue: '#add8e6', + lightcoral: '#f08080', + lightcyan: '#e0ffff', + lightgoldenrodyellow: '#fafad2', + lightgray: '#d3d3d3', + lightgreen: '#90ee90', + lightgrey: '#d3d3d3', + lightpink: '#ffb6c1', + lightsalmon: '#ffa07a', + lightseagreen: '#20b2aa', + lightskyblue: '#87cefa', + lightslategray: '#778899', + lightslategrey: '#778899', + lightsteelblue: '#b0c4de', + lightyellow: '#ffffe0', + lime: '#00ff00', + limegreen: '#32cd32', + linen: '#faf0e6', + magenta: '#ff00ff', + maroon: '#800000', + mediumaquamarine: '#66cdaa', + mediumblue: '#0000cd', + mediumorchid: '#ba55d3', + mediumpurple: '#9370db', + mediumseagreen: '#3cb371', + mediumslateblue: '#7b68ee', + mediumspringgreen: '#00fa9a', + mediumturquoise: '#48d1cc', + mediumvioletred: '#c71585', + midnightblue: '#191970', + mintcream: '#f5fffa', + mistyrose: '#ffe4e1', + moccasin: '#ffe4b5', + navajowhite: '#ffdead', + navy: '#000080', + oldlace: '#fdf5e6', + olive: '#808000', + olivedrab: '#6b8e23', + orange: '#ffa500', + orangered: '#ff4500', + orchid: '#da70d6', + palegoldenrod: '#eee8aa', + palegreen: '#98fb98', + paleturquoise: '#afeeee', + palevioletred: '#db7093', + papayawhip: '#ffefd5', + peachpuff: '#ffdab9', + peru: '#cd853f', + pink: '#ffc0cb', + plum: '#dda0dd', + powderblue: '#b0e0e6', + purple: '#800080', + rebeccapurple: '#663399', + red: '#ff0000', + rosybrown: '#bc8f8f', + royalblue: '#4169e1', + saddlebrown: '#8b4513', + salmon: '#fa8072', + sandybrown: '#f4a460', + seagreen: '#2e8b57', + seashell: '#fff5ee', + sienna: '#a0522d', + silver: '#c0c0c0', + skyblue: '#87ceeb', + slateblue: '#6a5acd', + slategray: '#708090', + slategrey: '#708090', + snow: '#fffafa', + springgreen: '#00ff7f', + tan: '#d2b48c', + teal: '#008080', + thistle: '#d8bfd8', + transparent: '#00000000', + turquoise: '#40e0d0', + violet: '#ee82ee', + wheat: '#f5deb3', + white: '#ffffff', + whitesmoke: '#f5f5f5', + yellow: '#ffff00', + yellowgreen: '#9acd32' + }, + /* API */ + parse: function (color) { + color = color.toLowerCase(); + var hex = Keyword.colors[color]; + if (!hex) + return; + return hex_1.default.parse(hex); + }, + stringify: function (channels) { + var hex = hex_1.default.stringify(channels); + for (var name_1 in Keyword.colors) { + if (Keyword.colors[name_1] === hex) + return name_1; } + } +}; +/* EXPORT */ +exports.default = Keyword; - function getWidthOffset() { - return 2 * scrollbarSizes.width + 1; - } - function getHeightOffset() { - return 2 * scrollbarSizes.height + 1; - } +/***/ }), - function getExpandWidth(width) { - return width + 10 + getWidthOffset(); - } +/***/ "./node_modules/khroma/dist/color/rgb.js": +/*!***********************************************!*\ + !*** ./node_modules/khroma/dist/color/rgb.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function getExpandHeight(height) { - return height + 10 + getHeightOffset(); - } +"use strict"; - function getShrinkWidth(width) { - return width * 2 + getWidthOffset(); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); +/* RGB */ +var RGB = { + /* VARIABLES */ + re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i, + /* API */ + parse: function (color) { + var charCode = color.charCodeAt(0); + if (charCode !== 114 && charCode !== 82) + return; // 'r'/'R' + var match = color.match(RGB.re); + if (!match) + return; + var r = match[1], isRedPercentage = match[2], g = match[3], isGreenPercentage = match[4], b = match[5], isBluePercentage = match[6], a = match[7], isAlphaPercentage = match[8]; + return reusable_1.default.set({ + r: utils_1.default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)), + g: utils_1.default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)), + b: utils_1.default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)), + a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color); + }, + stringify: function (channels) { + if (channels.a < 1) { // RGBA + return "rgba(" + utils_1.default.lang.round(channels.r) + ", " + utils_1.default.lang.round(channels.g) + ", " + utils_1.default.lang.round(channels.b) + ", " + utils_1.default.lang.round(channels.a) + ")"; } - - function getShrinkHeight(height) { - return height * 2 + getHeightOffset(); + else { // RGB + return "rgb(" + utils_1.default.lang.round(channels.r) + ", " + utils_1.default.lang.round(channels.g) + ", " + utils_1.default.lang.round(channels.b) + ")"; } + } +}; +/* EXPORT */ +exports.default = RGB; - function positionScrollbars(element, width, height) { - var expand = getExpandElement(element); - var shrink = getShrinkElement(element); - var expandWidth = getExpandWidth(width); - var expandHeight = getExpandHeight(height); - var shrinkWidth = getShrinkWidth(width); - var shrinkHeight = getShrinkHeight(height); - expand.scrollLeft = expandWidth; - expand.scrollTop = expandHeight; - shrink.scrollLeft = shrinkWidth; - shrink.scrollTop = shrinkHeight; - } - function injectContainerElement() { - var container = getState(element).container; +/***/ }), - if (!container) { - container = document.createElement("div"); - container.className = detectionContainerClass; - container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]); - getState(element).container = container; - addAnimationClass(container); - element.appendChild(container); +/***/ "./node_modules/khroma/dist/consts.js": +/*!********************************************!*\ + !*** ./node_modules/khroma/dist/consts.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var onAnimationStart = function () { - getState(element).onRendered && getState(element).onRendered(); - }; +"use strict"; - addEvent(container, "animationstart", onAnimationStart); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/khroma/dist/utils/index.js"); +/* CONSTS */ +var DEC2HEX = {}; +exports.DEC2HEX = DEC2HEX; +for (var i = 0; i <= 255; i++) + DEC2HEX[i] = utils_1.default.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance - // Store the event handler here so that they may be removed when uninstall is called. - // See uninstall function for an explanation why it is needed. - getState(element).onAnimationStart = onAnimationStart; - } - return container; - } +/***/ }), - function injectScrollElements() { - function alterPositionStyles() { - var style = getState(element).style; +/***/ "./node_modules/khroma/dist/index.js": +/*!*******************************************!*\ + !*** ./node_modules/khroma/dist/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if(style.position === "static") { - element.style.setProperty("position", "relative",options.important ? "important" : ""); +"use strict"; - var removeRelativeStyles = function(reporter, element, style, property) { - function getNumericalValue(value) { - return value.replace(/[^-\d\.]/g, ""); - } +/* EXPORT */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(__webpack_require__(/*! ./methods */ "./node_modules/khroma/dist/methods/index.js")); - var value = style[property]; - if(value !== "auto" && getNumericalValue(value) !== "0") { - reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); - element.style[property] = 0; - } - }; +/***/ }), - //Check so that there are no accidental styles that will make the element styled differently now that is is relative. - //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). - removeRelativeStyles(reporter, element, style, "top"); - removeRelativeStyles(reporter, element, style, "right"); - removeRelativeStyles(reporter, element, style, "bottom"); - removeRelativeStyles(reporter, element, style, "left"); - } - } +/***/ "./node_modules/khroma/dist/methods/adjust.js": +/*!****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/adjust.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function getLeftTopBottomRightCssText(left, top, bottom, right) { - left = (!left ? "0" : (left + "px")); - top = (!top ? "0" : (top + "px")); - bottom = (!bottom ? "0" : (bottom + "px")); - right = (!right ? "0" : (right + "px")); +"use strict"; - return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom]; - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); +/* ADJUST */ +function adjust(color, channels) { + var ch = color_1.default.parse(color), changes = {}; + for (var c in channels) { + if (!channels[c]) + continue; + changes[c] = ch[c] + channels[c]; + } + return change_1.default(color, changes); +} +/* EXPORT */ +exports.default = adjust; - debug("Injecting elements"); - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +/***/ }), - alterPositionStyles(); +/***/ "./node_modules/khroma/dist/methods/adjust_channel.js": +/*!************************************************************!*\ + !*** ./node_modules/khroma/dist/methods/adjust_channel.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var rootContainer = getState(element).container; +"use strict"; - if (!rootContainer) { - rootContainer = injectContainerElement(); - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* ADJUST CHANNEL */ +function adjustChannel(color, channel, amount) { + var channels = color_1.default.parse(color), amountCurrent = channels[channel], amountNext = utils_1.default.channel.clamp[channel](amountCurrent + amount); + if (amountCurrent !== amountNext) + channels[channel] = amountNext; + return color_1.default.stringify(channels); +} +/* EXPORT */ +exports.default = adjustChannel; - // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari), - // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than - // the targeted element. - // When the bug is resolved, "containerContainer" may be removed. - // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980). - // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px. +/***/ }), - var scrollbarWidth = scrollbarSizes.width; - var scrollbarHeight = scrollbarSizes.height; - var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]); - var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth))); - var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); - var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]); - var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]); - var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]); +/***/ "./node_modules/khroma/dist/methods/alpha.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/methods/alpha.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var containerContainer = document.createElement("div"); - var container = document.createElement("div"); - var expand = document.createElement("div"); - var expandChild = document.createElement("div"); - var shrink = document.createElement("div"); - var shrinkChild = document.createElement("div"); +"use strict"; - // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56 - // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers. - containerContainer.dir = "ltr"; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* ALPHA */ +function alpha(color) { + return channel_1.default(color, 'a'); +} +/* EXPORT */ +exports.default = alpha; - containerContainer.style.cssText = containerContainerStyle; - containerContainer.className = detectionContainerClass; - container.className = detectionContainerClass; - container.style.cssText = containerStyle; - expand.style.cssText = expandStyle; - expandChild.style.cssText = expandChildStyle; - shrink.style.cssText = shrinkStyle; - shrinkChild.style.cssText = shrinkChildStyle; - expand.appendChild(expandChild); - shrink.appendChild(shrinkChild); - container.appendChild(expand); - container.appendChild(shrink); - containerContainer.appendChild(container); - rootContainer.appendChild(containerContainer); +/***/ }), - function onExpandScroll() { - getState(element).onExpand && getState(element).onExpand(); - } +/***/ "./node_modules/khroma/dist/methods/blue.js": +/*!**************************************************!*\ + !*** ./node_modules/khroma/dist/methods/blue.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function onShrinkScroll() { - getState(element).onShrink && getState(element).onShrink(); - } +"use strict"; - addEvent(expand, "scroll", onExpandScroll); - addEvent(shrink, "scroll", onShrinkScroll); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* BLUE */ +function blue(color) { + return channel_1.default(color, 'b'); +} +/* EXPORT */ +exports.default = blue; - // Store the event handlers here so that they may be removed when uninstall is called. - // See uninstall function for an explanation why it is needed. - getState(element).onExpandScroll = onExpandScroll; - getState(element).onShrinkScroll = onShrinkScroll; - } - function registerListenersAndPositionElements() { - function updateChildSizes(element, width, height) { - var expandChild = getExpandChildElement(element); - var expandWidth = getExpandWidth(width); - var expandHeight = getExpandHeight(height); - expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : ""); - expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : ""); - } +/***/ }), - function updateDetectorElements(done) { - var width = element.offsetWidth; - var height = element.offsetHeight; +/***/ "./node_modules/khroma/dist/methods/change.js": +/*!****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/change.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped. - var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight; +"use strict"; - debug("Storing current size", width, height); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* CHANGE */ +function change(color, channels) { + var ch = color_1.default.parse(color); + for (var c in channels) { + ch[c] = utils_1.default.channel.clamp[c](channels[c]); + } + return color_1.default.stringify(ch); +} +/* EXPORT */ +exports.default = change; - // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners. - // Otherwise the if-check in handleScroll is useless. - storeCurrentSize(element, width, height); - // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute. - // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch. +/***/ }), - batchProcessor.add(0, function performUpdateChildSizes() { - if (!sizeChanged) { - return; - } +/***/ "./node_modules/khroma/dist/methods/channel.js": +/*!*****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/channel.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +"use strict"; - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* CHANNEL */ +function channel(color, channel) { + return utils_1.default.lang.round(color_1.default.parse(color)[channel]); +} +/* EXPORT */ +exports.default = channel; - if (options.debug) { - var w = element.offsetWidth; - var h = element.offsetHeight; - if (w !== width || h !== height) { - reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements."); - } - } +/***/ }), - updateChildSizes(element, width, height); - }); +/***/ "./node_modules/khroma/dist/methods/complement.js": +/*!********************************************************!*\ + !*** ./node_modules/khroma/dist/methods/complement.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - batchProcessor.add(1, function updateScrollbars() { - // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then - // been restored to the original size, which will have changed the scrollbar positions. +"use strict"; - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* COMPLEMENT */ +function complement(color) { + return adjust_channel_1.default(color, 'h', 180); +} +/* EXPORT */ +exports.default = complement; - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } - positionScrollbars(element, width, height); - }); +/***/ }), - if (sizeChanged && done) { - batchProcessor.add(2, function () { - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +/***/ "./node_modules/khroma/dist/methods/darken.js": +/*!****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/darken.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (!areElementsInjected()) { - debug("Aborting because element container has not been initialized"); - return; - } +"use strict"; - done(); - }); - } - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* DARKEN */ +function darken(color, amount) { + return adjust_channel_1.default(color, 'l', -amount); +} +/* EXPORT */ +exports.default = darken; - function areElementsInjected() { - return !!getState(element).container; - } - function notifyListenersIfNeeded() { - function isFirstNotify() { - return getState(element).lastNotifiedWidth === undefined; - } +/***/ }), - debug("notifyListenersIfNeeded invoked"); +/***/ "./node_modules/khroma/dist/methods/desaturate.js": +/*!********************************************************!*\ + !*** ./node_modules/khroma/dist/methods/desaturate.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var state = getState(element); +"use strict"; - // Don't notify if the current size is the start size, and this is the first notification. - if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) { - return debug("Not notifying: Size is the same as the start size, and there has been no notification yet."); - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* DESATURATE */ +function desaturate(color, amount) { + return adjust_channel_1.default(color, 's', -amount); +} +/* EXPORT */ +exports.default = desaturate; - // Don't notify if the size already has been notified. - if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) { - return debug("Not notifying: Size already notified"); - } +/***/ }), - debug("Current size not notified, notifying..."); - state.lastNotifiedWidth = state.lastWidth; - state.lastNotifiedHeight = state.lastHeight; - forEach(getState(element).listeners, function (listener) { - listener(element); - }); - } +/***/ "./node_modules/khroma/dist/methods/grayscale.js": +/*!*******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/grayscale.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function handleRender() { - debug("startanimation triggered."); +"use strict"; - if (isUnrendered(element)) { - debug("Ignoring since element is still unrendered..."); - return; - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); +/* GRAYSCALE */ +function grayscale(color) { + return change_1.default(color, { s: 0 }); +} +/* EXPORT */ +exports.default = grayscale; - debug("Element rendered."); - var expand = getExpandElement(element); - var shrink = getShrinkElement(element); - if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) { - debug("Scrollbars out of sync. Updating detector elements..."); - updateDetectorElements(notifyListenersIfNeeded); - } - } - function handleScroll() { - debug("Scroll detected."); +/***/ }), - if (isUnrendered(element)) { - // Element is still unrendered. Skip this scroll event. - debug("Scroll event fired while unrendered. Ignoring..."); - return; - } +/***/ "./node_modules/khroma/dist/methods/green.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/methods/green.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - updateDetectorElements(notifyListenersIfNeeded); - } +"use strict"; - debug("registerListenersAndPositionElements invoked."); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* GREEN */ +function green(color) { + return channel_1.default(color, 'g'); +} +/* EXPORT */ +exports.default = green; - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } - getState(element).onRendered = handleRender; - getState(element).onExpand = handleScroll; - getState(element).onShrink = handleScroll; +/***/ }), - var style = getState(element).style; - updateChildSizes(element, style.width, style.height); - } +/***/ "./node_modules/khroma/dist/methods/hsla.js": +/*!**************************************************!*\ + !*** ./node_modules/khroma/dist/methods/hsla.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function finalizeDomMutation() { - debug("finalizeDomMutation invoked."); +"use strict"; - if (!getState(element)) { - debug("Aborting because element has been uninstalled"); - return; - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* HSLA */ +function hsla(h, s, l, a) { + if (a === void 0) { a = 1; } + var channels = reusable_1.default.set({ + h: utils_1.default.channel.clamp.h(h), + s: utils_1.default.channel.clamp.s(s), + l: utils_1.default.channel.clamp.l(l), + a: utils_1.default.channel.clamp.a(a) + }); + return color_1.default.stringify(channels); +} +/* EXPORT */ +exports.default = hsla; - var style = getState(element).style; - storeCurrentSize(element, style.width, style.height); - positionScrollbars(element, style.width, style.height); - } - function ready() { - callback(element); - } +/***/ }), - function install() { - debug("Installing..."); - initListeners(); - storeStartSize(); +/***/ "./node_modules/khroma/dist/methods/hue.js": +/*!*************************************************!*\ + !*** ./node_modules/khroma/dist/methods/hue.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - batchProcessor.add(0, storeStyle); - batchProcessor.add(1, injectScrollElements); - batchProcessor.add(2, registerListenersAndPositionElements); - batchProcessor.add(3, finalizeDomMutation); - batchProcessor.add(4, ready); - } +"use strict"; - debug("Making detectable..."); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* HUE */ +function hue(color) { + return channel_1.default(color, 'h'); +} +/* EXPORT */ +exports.default = hue; - if (isDetached(element)) { - debug("Element is detached"); - injectContainerElement(); +/***/ }), - debug("Waiting until element is attached..."); +/***/ "./node_modules/khroma/dist/methods/index.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/methods/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - getState(element).onRendered = function () { - debug("Element is now attached"); - install(); - }; - } else { - install(); - } - } +"use strict"; - function uninstall(element) { - var state = getState(element); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var rgba_1 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); // Alias +exports.hex = rgba_1.default; +var rgba_2 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); // Alias +exports.rgb = rgba_2.default; +var rgba_3 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); +exports.rgba = rgba_3.default; +var hsla_1 = __webpack_require__(/*! ./hsla */ "./node_modules/khroma/dist/methods/hsla.js"); // Alias +exports.hsl = hsla_1.default; +var hsla_2 = __webpack_require__(/*! ./hsla */ "./node_modules/khroma/dist/methods/hsla.js"); +exports.hsla = hsla_2.default; +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +exports.channel = channel_1.default; +var red_1 = __webpack_require__(/*! ./red */ "./node_modules/khroma/dist/methods/red.js"); +exports.red = red_1.default; +var green_1 = __webpack_require__(/*! ./green */ "./node_modules/khroma/dist/methods/green.js"); +exports.green = green_1.default; +var blue_1 = __webpack_require__(/*! ./blue */ "./node_modules/khroma/dist/methods/blue.js"); +exports.blue = blue_1.default; +var hue_1 = __webpack_require__(/*! ./hue */ "./node_modules/khroma/dist/methods/hue.js"); +exports.hue = hue_1.default; +var saturation_1 = __webpack_require__(/*! ./saturation */ "./node_modules/khroma/dist/methods/saturation.js"); +exports.saturation = saturation_1.default; +var lightness_1 = __webpack_require__(/*! ./lightness */ "./node_modules/khroma/dist/methods/lightness.js"); +exports.lightness = lightness_1.default; +var alpha_1 = __webpack_require__(/*! ./alpha */ "./node_modules/khroma/dist/methods/alpha.js"); +exports.alpha = alpha_1.default; +var alpha_2 = __webpack_require__(/*! ./alpha */ "./node_modules/khroma/dist/methods/alpha.js"); // Alias +exports.opacity = alpha_2.default; +var luminance_1 = __webpack_require__(/*! ./luminance */ "./node_modules/khroma/dist/methods/luminance.js"); +exports.luminance = luminance_1.default; +var is_dark_1 = __webpack_require__(/*! ./is_dark */ "./node_modules/khroma/dist/methods/is_dark.js"); +exports.isDark = is_dark_1.default; +var is_light_1 = __webpack_require__(/*! ./is_light */ "./node_modules/khroma/dist/methods/is_light.js"); +exports.isLight = is_light_1.default; +var is_valid_1 = __webpack_require__(/*! ./is_valid */ "./node_modules/khroma/dist/methods/is_valid.js"); +exports.isValid = is_valid_1.default; +var saturate_1 = __webpack_require__(/*! ./saturate */ "./node_modules/khroma/dist/methods/saturate.js"); +exports.saturate = saturate_1.default; +var desaturate_1 = __webpack_require__(/*! ./desaturate */ "./node_modules/khroma/dist/methods/desaturate.js"); +exports.desaturate = desaturate_1.default; +var lighten_1 = __webpack_require__(/*! ./lighten */ "./node_modules/khroma/dist/methods/lighten.js"); +exports.lighten = lighten_1.default; +var darken_1 = __webpack_require__(/*! ./darken */ "./node_modules/khroma/dist/methods/darken.js"); +exports.darken = darken_1.default; +var opacify_1 = __webpack_require__(/*! ./opacify */ "./node_modules/khroma/dist/methods/opacify.js"); +exports.opacify = opacify_1.default; +var opacify_2 = __webpack_require__(/*! ./opacify */ "./node_modules/khroma/dist/methods/opacify.js"); // Alias +exports.fadeIn = opacify_2.default; +var transparentize_1 = __webpack_require__(/*! ./transparentize */ "./node_modules/khroma/dist/methods/transparentize.js"); +exports.transparentize = transparentize_1.default; +var transparentize_2 = __webpack_require__(/*! ./transparentize */ "./node_modules/khroma/dist/methods/transparentize.js"); // Alias +exports.fadeOut = transparentize_2.default; +var complement_1 = __webpack_require__(/*! ./complement */ "./node_modules/khroma/dist/methods/complement.js"); +exports.complement = complement_1.default; +var grayscale_1 = __webpack_require__(/*! ./grayscale */ "./node_modules/khroma/dist/methods/grayscale.js"); +exports.grayscale = grayscale_1.default; +var adjust_1 = __webpack_require__(/*! ./adjust */ "./node_modules/khroma/dist/methods/adjust.js"); +exports.adjust = adjust_1.default; +var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); +exports.change = change_1.default; +var invert_1 = __webpack_require__(/*! ./invert */ "./node_modules/khroma/dist/methods/invert.js"); +exports.invert = invert_1.default; +var mix_1 = __webpack_require__(/*! ./mix */ "./node_modules/khroma/dist/methods/mix.js"); +exports.mix = mix_1.default; +var scale_1 = __webpack_require__(/*! ./scale */ "./node_modules/khroma/dist/methods/scale.js"); +exports.scale = scale_1.default; - if (!state) { - // Uninstall has been called on a non-erd element. - return; - } - // Uninstall may have been called in the following scenarios: - // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected). - // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected). - // (3) After the installation process (here, state.busy = false and all the stuff has been injected). - // So to be on the safe side, let's check for each thing before removing. +/***/ }), - // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element. - state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll); - state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll); - state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart); +/***/ "./node_modules/khroma/dist/methods/invert.js": +/*!****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/invert.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - state.container && element.removeChild(state.container); - } +"use strict"; - return { - makeDetectable: makeDetectable, - addListener: addListener, - uninstall: uninstall, - initDocument: initDocument - }; -}; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +var mix_1 = __webpack_require__(/*! ./mix */ "./node_modules/khroma/dist/methods/mix.js"); +/* INVERT */ +function invert(color, weight) { + if (weight === void 0) { weight = 100; } + var inverse = color_1.default.parse(color); + inverse.r = 255 - inverse.r; + inverse.g = 255 - inverse.g; + inverse.b = 255 - inverse.b; + return mix_1.default(inverse, color, weight); +} +/* EXPORT */ +exports.default = invert; /***/ }), -/***/ "./node_modules/element-resize-detector/src/element-resize-detector.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/element-resize-detector.js ***! - \*****************************************************************************/ +/***/ "./node_modules/khroma/dist/methods/is_dark.js": +/*!*****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/is_dark.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var is_light_1 = __webpack_require__(/*! ./is_light */ "./node_modules/khroma/dist/methods/is_light.js"); +/* IS DARK */ +function isDark(color) { + return !is_light_1.default(color); +} +/* EXPORT */ +exports.default = isDark; -var forEach = __webpack_require__(/*! ./collection-utils */ "./node_modules/element-resize-detector/src/collection-utils.js").forEach; -var elementUtilsMaker = __webpack_require__(/*! ./element-utils */ "./node_modules/element-resize-detector/src/element-utils.js"); -var listenerHandlerMaker = __webpack_require__(/*! ./listener-handler */ "./node_modules/element-resize-detector/src/listener-handler.js"); -var idGeneratorMaker = __webpack_require__(/*! ./id-generator */ "./node_modules/element-resize-detector/src/id-generator.js"); -var idHandlerMaker = __webpack_require__(/*! ./id-handler */ "./node_modules/element-resize-detector/src/id-handler.js"); -var reporterMaker = __webpack_require__(/*! ./reporter */ "./node_modules/element-resize-detector/src/reporter.js"); -var browserDetector = __webpack_require__(/*! ./browser-detector */ "./node_modules/element-resize-detector/src/browser-detector.js"); -var batchProcessorMaker = __webpack_require__(/*! batch-processor */ "./node_modules/batch-processor/src/batch-processor.js"); -var stateHandler = __webpack_require__(/*! ./state-handler */ "./node_modules/element-resize-detector/src/state-handler.js"); -//Detection strategies. -var objectStrategyMaker = __webpack_require__(/*! ./detection-strategy/object.js */ "./node_modules/element-resize-detector/src/detection-strategy/object.js"); -var scrollStrategyMaker = __webpack_require__(/*! ./detection-strategy/scroll.js */ "./node_modules/element-resize-detector/src/detection-strategy/scroll.js"); +/***/ }), -function isCollection(obj) { - return Array.isArray(obj) || obj.length !== undefined; -} +/***/ "./node_modules/khroma/dist/methods/is_light.js": +/*!******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/is_light.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function toArray(collection) { - if (!Array.isArray(collection)) { - var array = []; - forEach(collection, function (obj) { - array.push(obj); - }); - return array; - } else { - return collection; - } -} +"use strict"; -function isElement(obj) { - return obj && obj.nodeType === 1; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var luminance_1 = __webpack_require__(/*! ./luminance */ "./node_modules/khroma/dist/methods/luminance.js"); +/* IS LIGHT */ +function isLight(color) { + return luminance_1.default(color) >= .5; } +/* EXPORT */ +exports.default = isLight; -/** - * @typedef idHandler - * @type {object} - * @property {function} get Gets the resize detector id of the element. - * @property {function} set Generate and sets the resize detector id of the element. - */ -/** - * @typedef Options - * @type {object} - * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added. - Default is true. If true, the listener is guaranteed to be called when it has been added. - If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called). - * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements. - If not provided, a default id handler will be used. - * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors. - If not provided, a default id handler will be used. - If set to false, then nothing will be reported. - * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method. - */ +/***/ }), -/** - * Creates an element resize detector instance. - * @public - * @param {Options?} options Optional global options object that will decide how this instance will work. - */ -module.exports = function(options) { - options = options || {}; +/***/ "./node_modules/khroma/dist/methods/is_valid.js": +/*!******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/is_valid.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions. - var idHandler; +"use strict"; - if (options.idHandler) { - // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler - // so that readonly flag always is true when it's used here. This may be removed next major version bump. - idHandler = { - get: function (element) { return options.idHandler.get(element, true); }, - set: options.idHandler.set - }; - } else { - var idGenerator = idGeneratorMaker(); - var defaultIdHandler = idHandlerMaker({ - idGenerator: idGenerator, - stateHandler: stateHandler - }); - idHandler = defaultIdHandler; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* IS VALID */ +function isValid(color) { + try { + color_1.default.parse(color); + return true; } - - //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions. - var reporter = options.reporter; - - if(!reporter) { - //If options.reporter is false, then the reporter should be quiet. - var quiet = reporter === false; - reporter = reporterMaker(quiet); + catch (_a) { + return false; } +} +/* EXPORT */ +exports.default = isValid; - //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions. - var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter })); - //Options to be used as default for the listenTo function. - var globalOptions = {}; - globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true); - globalOptions.debug = !!getOption(options, "debug", false); +/***/ }), - var eventListenerHandler = listenerHandlerMaker(idHandler); - var elementUtils = elementUtilsMaker({ - stateHandler: stateHandler - }); +/***/ "./node_modules/khroma/dist/methods/lighten.js": +/*!*****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/lighten.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - //The detection strategy to be used. - var detectionStrategy; - var desiredStrategy = getOption(options, "strategy", "object"); - var importantCssRules = getOption(options, "important", false); - var strategyOptions = { - reporter: reporter, - batchProcessor: batchProcessor, - stateHandler: stateHandler, - idHandler: idHandler, - important: importantCssRules - }; +"use strict"; - if(desiredStrategy === "scroll") { - if (browserDetector.isLegacyOpera()) { - reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."); - desiredStrategy = "object"; - } else if (browserDetector.isIE(9)) { - reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."); - desiredStrategy = "object"; - } - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* LIGHTEN */ +function lighten(color, amount) { + return adjust_channel_1.default(color, 'l', amount); +} +/* EXPORT */ +exports.default = lighten; - if(desiredStrategy === "scroll") { - detectionStrategy = scrollStrategyMaker(strategyOptions); - } else if(desiredStrategy === "object") { - detectionStrategy = objectStrategyMaker(strategyOptions); - } else { - throw new Error("Invalid strategy name: " + desiredStrategy); - } - //Calls can be made to listenTo with elements that are still being installed. - //Also, same elements can occur in the elements list in the listenTo function. - //With this map, the ready callbacks can be synchronized between the calls - //so that the ready callback can always be called when an element is ready - even if - //it wasn't installed from the function itself. - var onReadyCallbacks = {}; +/***/ }), - /** - * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element. - * @public - * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler. - * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid. - * @param {function} listener The callback to be executed for each resize event for each element. - */ - function listenTo(options, elements, listener) { - function onResizeCallback(element) { - var listeners = eventListenerHandler.get(element); - forEach(listeners, function callListenerProxy(listener) { - listener(element); - }); - } +/***/ "./node_modules/khroma/dist/methods/lightness.js": +/*!*******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/lightness.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function addListener(callOnAdd, element, listener) { - eventListenerHandler.add(element, listener); +"use strict"; - if(callOnAdd) { - listener(element); - } - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* LIGHTNESS */ +function lightness(color) { + return channel_1.default(color, 'l'); +} +/* EXPORT */ +exports.default = lightness; - //Options object may be omitted. - if(!listener) { - listener = elements; - elements = options; - options = {}; - } - if(!elements) { - throw new Error("At least one element required."); - } +/***/ }), - if(!listener) { - throw new Error("Listener required."); - } +/***/ "./node_modules/khroma/dist/methods/luminance.js": +/*!*******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/luminance.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (isElement(elements)) { - // A single element has been passed in. - elements = [elements]; - } else if (isCollection(elements)) { - // Convert collection to array for plugins. - // TODO: May want to check so that all the elements in the collection are valid elements. - elements = toArray(elements); - } else { - return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - } +"use strict"; - var elementsReady = 0; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +/* LUMINANCE */ +//SOURCE: https://planetcalc.com/7779 +function luminance(color) { + var _a = color_1.default.parse(color), r = _a.r, g = _a.g, b = _a.b, luminance = .2126 * utils_1.default.channel.toLinear(r) + .7152 * utils_1.default.channel.toLinear(g) + .0722 * utils_1.default.channel.toLinear(b); + return utils_1.default.lang.round(luminance); +} +/* EXPORT */ +exports.default = luminance; - var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd); - var onReadyCallback = getOption(options, "onReady", function noop() {}); - var debug = getOption(options, "debug", globalOptions.debug); - forEach(elements, function attachListenerToElement(element) { - if (!stateHandler.getState(element)) { - stateHandler.initState(element); - idHandler.set(element); - } +/***/ }), - var id = idHandler.get(element); +/***/ "./node_modules/khroma/dist/methods/mix.js": +/*!*************************************************!*\ + !*** ./node_modules/khroma/dist/methods/mix.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - debug && reporter.log("Attaching listener to element", id, element); +"use strict"; - if(!elementUtils.isDetectable(element)) { - debug && reporter.log(id, "Not detectable."); - if(elementUtils.isBusy(element)) { - debug && reporter.log(id, "System busy making it detectable"); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +var rgba_1 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); +/* MIX */ +//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756 +function mix(color1, color2, weight) { + if (weight === void 0) { weight = 50; } + var _a = color_1.default.parse(color1), r1 = _a.r, g1 = _a.g, b1 = _a.b, a1 = _a.a, _b = color_1.default.parse(color2), r2 = _b.r, g2 = _b.g, b2 = _b.b, a2 = _b.a, weightScale = weight / 100, weightNormalized = (weightScale * 2) - 1, alphaDelta = a1 - a2, weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta), weight1 = (weight1combined + 1) / 2, weight2 = 1 - weight1, r = (r1 * weight1) + (r2 * weight2), g = (g1 * weight1) + (g2 * weight2), b = (b1 * weight1) + (b2 * weight2), a = (a1 * weightScale) + (a2 * (1 - weightScale)); + return rgba_1.default(r, g, b, a); +} +/* EXPORT */ +exports.default = mix; - //The element is being prepared to be detectable. Do not make it detectable. - //Just add the listener, because the element will soon be detectable. - addListener(callOnAdd, element, listener); - onReadyCallbacks[id] = onReadyCallbacks[id] || []; - onReadyCallbacks[id].push(function onReady() { - elementsReady++; - if(elementsReady === elements.length) { - onReadyCallback(); - } - }); - return; - } +/***/ }), - debug && reporter.log(id, "Making detectable..."); - //The element is not prepared to be detectable, so do prepare it and add a listener to it. - elementUtils.markBusy(element, true); - return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) { - debug && reporter.log(id, "onElementDetectable"); +/***/ "./node_modules/khroma/dist/methods/opacify.js": +/*!*****************************************************!*\ + !*** ./node_modules/khroma/dist/methods/opacify.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (stateHandler.getState(element)) { - elementUtils.markAsDetectable(element); - elementUtils.markBusy(element, false); - detectionStrategy.addListener(element, onResizeCallback); - addListener(callOnAdd, element, listener); +"use strict"; - // Since the element size might have changed since the call to "listenTo", we need to check for this change, - // so that a resize event may be emitted. - // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before. - // Also, check the state existance before since the element may have been uninstalled in the installation process. - var state = stateHandler.getState(element); - if (state && state.startSize) { - var width = element.offsetWidth; - var height = element.offsetHeight; - if (state.startSize.width !== width || state.startSize.height !== height) { - onResizeCallback(element); - } - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* OPACIFY */ +function opacify(color, amount) { + return adjust_channel_1.default(color, 'a', amount); +} +/* EXPORT */ +exports.default = opacify; - if(onReadyCallbacks[id]) { - forEach(onReadyCallbacks[id], function(callback) { - callback(); - }); - } - } else { - // The element has been unisntalled before being detectable. - debug && reporter.log(id, "Element uninstalled before being detectable."); - } - delete onReadyCallbacks[id]; +/***/ }), - elementsReady++; - if(elementsReady === elements.length) { - onReadyCallback(); - } - }); - } +/***/ "./node_modules/khroma/dist/methods/red.js": +/*!*************************************************!*\ + !*** ./node_modules/khroma/dist/methods/red.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - debug && reporter.log(id, "Already detecable, adding listener."); +"use strict"; - //The element has been prepared to be detectable and is ready to be listened to. - addListener(callOnAdd, element, listener); - elementsReady++; - }); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* RED */ +function red(color) { + return channel_1.default(color, 'r'); +} +/* EXPORT */ +exports.default = red; - if(elementsReady === elements.length) { - onReadyCallback(); - } - } - function uninstall(elements) { - if(!elements) { - return reporter.error("At least one element is required."); - } +/***/ }), - if (isElement(elements)) { - // A single element has been passed in. - elements = [elements]; - } else if (isCollection(elements)) { - // Convert collection to array for plugins. - // TODO: May want to check so that all the elements in the collection are valid elements. - elements = toArray(elements); - } else { - return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); - } +/***/ "./node_modules/khroma/dist/methods/rgba.js": +/*!**************************************************!*\ + !*** ./node_modules/khroma/dist/methods/rgba.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - forEach(elements, function (element) { - eventListenerHandler.removeAllListeners(element); - detectionStrategy.uninstall(element); - stateHandler.cleanState(element); - }); - } +"use strict"; - function initDocument(targetDocument) { - detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument); - } +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); +function rgba(r, g, b, a) { + if (b === void 0) { b = 0; } + if (a === void 0) { a = 1; } + if (typeof r !== 'number') + return change_1.default(r, { a: g }); + var channels = reusable_1.default.set({ + r: utils_1.default.channel.clamp.r(r), + g: utils_1.default.channel.clamp.g(g), + b: utils_1.default.channel.clamp.b(b), + a: utils_1.default.channel.clamp.a(a) + }); + return color_1.default.stringify(channels); +} +/* EXPORT */ +exports.default = rgba; - return { - listenTo: listenTo, - removeListener: eventListenerHandler.removeListener, - removeAllListeners: eventListenerHandler.removeAllListeners, - uninstall: uninstall, - initDocument: initDocument - }; -}; -function getOption(options, name, defaultValue) { - var value = options[name]; +/***/ }), - if((value === undefined || value === null) && defaultValue !== undefined) { - return defaultValue; - } +/***/ "./node_modules/khroma/dist/methods/saturate.js": +/*!******************************************************!*\ + !*** ./node_modules/khroma/dist/methods/saturate.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - return value; +"use strict"; + +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* SATURATE */ +function saturate(color, amount) { + return adjust_channel_1.default(color, 's', amount); } +/* EXPORT */ +exports.default = saturate; /***/ }), -/***/ "./node_modules/element-resize-detector/src/element-utils.js": -/*!*******************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/element-utils.js ***! - \*******************************************************************/ +/***/ "./node_modules/khroma/dist/methods/saturation.js": +/*!********************************************************!*\ + !*** ./node_modules/khroma/dist/methods/saturation.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); +/* SATURATION */ +function saturation(color) { + return channel_1.default(color, 's'); +} +/* EXPORT */ +exports.default = saturation; -module.exports = function(options) { - var getState = options.stateHandler.getState; - /** - * Tells if the element has been made detectable and ready to be listened for resize events. - * @public - * @param {element} The element to check. - * @returns {boolean} True or false depending on if the element is detectable or not. - */ - function isDetectable(element) { - var state = getState(element); - return state && !!state.isDetectable; - } +/***/ }), - /** - * Marks the element that it has been made detectable and ready to be listened for resize events. - * @public - * @param {element} The element to mark. - */ - function markAsDetectable(element) { - getState(element).isDetectable = true; - } +/***/ "./node_modules/khroma/dist/methods/scale.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/methods/scale.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Tells if the element is busy or not. - * @public - * @param {element} The element to check. - * @returns {boolean} True or false depending on if the element is busy or not. - */ - function isBusy(element) { - return !!getState(element).busy; - } +"use strict"; - /** - * Marks the object is busy and should not be made detectable. - * @public - * @param {element} element The element to mark. - * @param {boolean} busy If the element is busy or not. - */ - function markBusy(element, busy) { - getState(element).busy = !!busy; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); +var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); +var adjust_1 = __webpack_require__(/*! ./adjust */ "./node_modules/khroma/dist/methods/adjust.js"); +/* SCALE */ +function scale(color, channels) { + var ch = color_1.default.parse(color), adjustments = {}, delta = function (amount, weight, max) { return weight > 0 ? (max - amount) * weight / 100 : amount * weight / 100; }; + for (var c in channels) { + adjustments[c] = delta(ch[c], channels[c], utils_1.default.channel.max[c]); } - - return { - isDetectable: isDetectable, - markAsDetectable: markAsDetectable, - isBusy: isBusy, - markBusy: markBusy - }; -}; + return adjust_1.default(color, adjustments); +} +/* EXPORT */ +exports.default = scale; /***/ }), -/***/ "./node_modules/element-resize-detector/src/id-generator.js": -/*!******************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/id-generator.js ***! - \******************************************************************/ +/***/ "./node_modules/khroma/dist/methods/transparentize.js": +/*!************************************************************!*\ + !*** ./node_modules/khroma/dist/methods/transparentize.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -module.exports = function() { - var idCount = 1; - - /** - * Generates a new unique id in the context. - * @public - * @returns {number} A unique id in the context. - */ - function generate() { - return idCount++; - } - - return { - generate: generate - }; -}; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); +/* TRANSPARENTIZE */ +function transparentize(color, amount) { + return adjust_channel_1.default(color, 'a', -amount); +} +/* EXPORT */ +exports.default = transparentize; /***/ }), -/***/ "./node_modules/element-resize-detector/src/id-handler.js": -/*!****************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/id-handler.js ***! - \****************************************************************/ +/***/ "./node_modules/khroma/dist/types.js": +/*!*******************************************!*\ + !*** ./node_modules/khroma/dist/types.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* ENUMS */ +Object.defineProperty(exports, "__esModule", { value: true }); +var TYPE; +(function (TYPE) { + TYPE[TYPE["ALL"] = 0] = "ALL"; + TYPE[TYPE["RGB"] = 1] = "RGB"; + TYPE[TYPE["HSL"] = 2] = "HSL"; +})(TYPE || (TYPE = {})); +exports.TYPE = TYPE; +; -module.exports = function(options) { - var idGenerator = options.idGenerator; - var getState = options.stateHandler.getState; - - /** - * Gets the resize detector id of the element. - * @public - * @param {element} element The target element to get the id of. - * @returns {string|number|null} The id of the element. Null if it has no id. - */ - function getId(element) { - var state = getState(element); - if (state && state.id !== undefined) { - return state.id; - } +/***/ }), - return null; - } +/***/ "./node_modules/khroma/dist/utils/channel.js": +/*!***************************************************!*\ + !*** ./node_modules/khroma/dist/utils/channel.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized. - * @public - * @param {element} element The target element to set the id of. - * @returns {string|number|null} The id of the element. - */ - function setId(element) { - var state = getState(element); +"use strict"; - if (!state) { - throw new Error("setId required the element to have a resize detection state."); +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +/* CHANNEL */ +var Channel = { + /* CLAMP */ + min: { + r: 0, + g: 0, + b: 0, + s: 0, + l: 0, + a: 0 + }, + max: { + r: 255, + g: 255, + b: 255, + h: 360, + s: 100, + l: 100, + a: 1 + }, + clamp: { + r: function (r) { return r >= 255 ? 255 : (r < 0 ? 0 : r); }, + g: function (g) { return g >= 255 ? 255 : (g < 0 ? 0 : g); }, + b: function (b) { return b >= 255 ? 255 : (b < 0 ? 0 : b); }, + h: function (h) { return h % 360; }, + s: function (s) { return s >= 100 ? 100 : (s < 0 ? 0 : s); }, + l: function (l) { return l >= 100 ? 100 : (l < 0 ? 0 : l); }, + a: function (a) { return a >= 1 ? 1 : (a < 0 ? 0 : a); } + }, + /* CONVERSION */ + //SOURCE: https://planetcalc.com/7779 + toLinear: function (c) { + var n = c / 255; + return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92; + }, + //SOURCE: https://gist.github.com/mjackson/5311256 + hue2rgb: function (p, q, t) { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; + return p; + }, + hsl2rgb: function (_a, channel) { + var h = _a.h, s = _a.s, l = _a.l; + if (s === 100) + return l * 2.55; // Achromatic + h /= 360; + s /= 100; + l /= 100; + var q = (l < .5) ? l * (1 + s) : (l + s) - (l * s), p = 2 * l - q; + switch (channel) { + case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255; + case 'g': return Channel.hue2rgb(p, q, h) * 255; + case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255; + } + }, + rgb2hsl: function (_a, channel) { + var r = _a.r, g = _a.g, b = _a.b; + r /= 255; + g /= 255; + b /= 255; + var max = Math.max(r, g, b), min = Math.min(r, g, b), l = (max + min) / 2; + if (channel === 'l') + return l * 100; + if (max === min) + return 0; // Achromatic + var d = max - min, s = (l > .5) ? d / (2 - max - min) : d / (max + min); + if (channel === 's') + return s * 100; + switch (max) { + case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60; + case g: return ((b - r) / d + 2) * 60; + case b: return ((r - g) / d + 4) * 60; + default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement } - - var id = idGenerator.generate(); - - state.id = id; - - return id; } - - return { - get: getId, - set: setId - }; }; +/* EXPORT */ +exports.default = Channel; /***/ }), -/***/ "./node_modules/element-resize-detector/src/listener-handler.js": -/*!**********************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/listener-handler.js ***! - \**********************************************************************/ +/***/ "./node_modules/khroma/dist/utils/index.js": +/*!*************************************************!*\ + !*** ./node_modules/khroma/dist/utils/index.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* IMPORT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/utils/channel.js"); +var lang_1 = __webpack_require__(/*! ./lang */ "./node_modules/khroma/dist/utils/lang.js"); +var unit_1 = __webpack_require__(/*! ./unit */ "./node_modules/khroma/dist/utils/unit.js"); +/* UTILS */ +var Utils = { + channel: channel_1.default, + lang: lang_1.default, + unit: unit_1.default +}; +/* EXPORT */ +exports.default = Utils; -module.exports = function(idHandler) { - var eventListeners = {}; - - /** - * Gets all listeners for the given element. - * @public - * @param {element} element The element to get all listeners for. - * @returns All listeners for the given element. - */ - function getListeners(element) { - var id = idHandler.get(element); - - if (id === undefined) { - return []; - } - - return eventListeners[id] || []; - } - - /** - * Stores the given listener for the given element. Will not actually add the listener to the element. - * @public - * @param {element} element The element that should have the listener added. - * @param {function} listener The callback that the element has added. - */ - function addListener(element, listener) { - var id = idHandler.get(element); - if(!eventListeners[id]) { - eventListeners[id] = []; - } +/***/ }), - eventListeners[id].push(listener); - } +/***/ "./node_modules/khroma/dist/utils/lang.js": +/*!************************************************!*\ + !*** ./node_modules/khroma/dist/utils/lang.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - function removeListener(element, listener) { - var listeners = getListeners(element); - for (var i = 0, len = listeners.length; i < len; ++i) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - } +"use strict"; - function removeAllListeners(element) { - var listeners = getListeners(element); - if (!listeners) { return; } - listeners.length = 0; +/* LANG */ +Object.defineProperty(exports, "__esModule", { value: true }); +var Lang = { + round: function (number) { + return Math.round(number * 10000000000) / 10000000000; } - - return { - get: getListeners, - add: addListener, - removeListener: removeListener, - removeAllListeners: removeAllListeners - }; }; +/* EXPORT */ +exports.default = Lang; /***/ }), -/***/ "./node_modules/element-resize-detector/src/reporter.js": -/*!**************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/reporter.js ***! - \**************************************************************/ +/***/ "./node_modules/khroma/dist/utils/unit.js": +/*!************************************************!*\ + !*** ./node_modules/khroma/dist/utils/unit.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -/* global console: false */ - -/** - * Reporter that handles the reporting of logs, warnings and errors. - * @public - * @param {boolean} quiet Tells if the reporter should be quiet or not. - */ -module.exports = function(quiet) { - function noop() { - //Does nothing. +/* UNIT */ +Object.defineProperty(exports, "__esModule", { value: true }); +var Unit = { + frac2hex: function (frac) { + var hex = Math.round(frac * 255).toString(16); + return hex.length > 1 ? hex : "0" + hex; + }, + dec2hex: function (dec) { + var hex = Math.round(dec).toString(16); + return hex.length > 1 ? hex : "0" + hex; } +}; +/* EXPORT */ +exports.default = Unit; - var reporter = { - log: noop, - warn: noop, - error: noop - }; - if(!quiet && window.console) { - var attachFunction = function(reporter, name) { - //The proxy is needed to be able to call the method with the console context, - //since we cannot use bind. - reporter[name] = function reporterProxy() { - var f = console[name]; - if (f.apply) { //IE9 does not support console.log.apply :) - f.apply(console, arguments); - } else { - for (var i = 0; i < arguments.length; i++) { - f(arguments[i]); - } - } - }; - }; +/***/ }), - attachFunction(reporter, "log"); - attachFunction(reporter, "warn"); - attachFunction(reporter, "error"); - } +/***/ "./node_modules/lodash/_DataView.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_DataView.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), + root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; - return reporter; -}; /***/ }), -/***/ "./node_modules/element-resize-detector/src/state-handler.js": -/*!*******************************************************************!*\ - !*** ./node_modules/element-resize-detector/src/state-handler.js ***! - \*******************************************************************/ +/***/ "./node_modules/lodash/_Hash.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/_Hash.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var prop = "_erd"; +var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/lodash/_hashClear.js"), + hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/lodash/_hashDelete.js"), + hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/lodash/_hashGet.js"), + hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/lodash/_hashHas.js"), + hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/lodash/_hashSet.js"); -function initState(element) { - element[prop] = {}; - return getState(element); -} +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -function getState(element) { - return element[prop]; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } } -function cleanState(element) { - delete element[prop]; -} +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; -module.exports = { - initState: initState, - getState: getState, - cleanState: cleanState -}; +module.exports = Hash; /***/ }), -/***/ "./node_modules/entity-decode/browser.js": -/*!***********************************************!*\ - !*** ./node_modules/entity-decode/browser.js ***! - \***********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "./node_modules/lodash/_ListCache.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_ListCache.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"), + listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"), + listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"), + listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"), + listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js"); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return decode; }); /** - * @see https://github.com/vuejs/vue/commit/a855dd0564a657a73b7249469490d39817f27cf7#diff-c0a2623ea5896a83e3b630f236b47b52 - * @see https://stackoverflow.com/a/13091266/4936667 + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -var decoder; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -function decode(html) { - decoder = decoder || document.createElement('div'); - // Escape HTML before decoding for HTML Entities - html = escape(html).replace(/%26/g,'&').replace(/%23/g,'#').replace(/%3B/g,';'); - // decoding - decoder.innerHTML = html; +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; - return unescape(decoder.textContent); -} +module.exports = ListCache; /***/ }), -/***/ "./node_modules/graphlib/index.js": -/*!****************************************!*\ - !*** ./node_modules/graphlib/index.js ***! - \****************************************/ +/***/ "./node_modules/lodash/_Map.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/_Map.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/** - * Copyright (c) 2014, Chris Pettitt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), + root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); -var lib = __webpack_require__(/*! ./lib */ "./node_modules/graphlib/lib/index.js"); +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); -module.exports = { - Graph: lib.Graph, - json: __webpack_require__(/*! ./lib/json */ "./node_modules/graphlib/lib/json.js"), - alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/graphlib/lib/alg/index.js"), - version: lib.version -}; +module.exports = Map; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/components.js": -/*!*****************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/components.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_MapCache.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_MapCache.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); - -module.exports = components; +var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/lodash/_mapCacheClear.js"), + mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/lodash/_mapCacheDelete.js"), + mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/lodash/_mapCacheGet.js"), + mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/lodash/_mapCacheHas.js"), + mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/lodash/_mapCacheSet.js"); -function components(g) { - var visited = {}, - cmpts = [], - cmpt; +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - cmpt.push(v); - _.each(g.successors(v), dfs); - _.each(g.predecessors(v), dfs); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } +} - _.each(g.nodes(), function(v) { - cmpt = []; - dfs(v); - if (cmpt.length) { - cmpts.push(cmpt); - } - }); +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; - return cmpts; -} +module.exports = MapCache; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/dfs.js": -/*!**********************************************!*\ - !*** ./node_modules/graphlib/lib/alg/dfs.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_Promise.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_Promise.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), + root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); -module.exports = dfs; +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!_.isArray(vs)) { - vs = [vs]; - } +module.exports = Promise; - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - var acc = [], - visited = {}; - _.each(vs, function(v) { - if (!g.hasNode(v)) { - throw new Error("Graph does not have node: " + v); - } +/***/ }), - doDfs(g, v, order === "post", visited, navigation, acc); - }); - return acc; -} +/***/ "./node_modules/lodash/_Set.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/_Set.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!_.has(visited, v)) { - visited[v] = true; +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), + root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - if (!postorder) { acc.push(v); } - _.each(navigation(v), function(w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { acc.push(v); } - } -} +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/dijkstra-all.js": -/*!*******************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/dijkstra-all.js ***! - \*******************************************************/ +/***/ "./node_modules/lodash/_SetCache.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_SetCache.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"), - _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"), + setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/lodash/_setCacheAdd.js"), + setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/lodash/_setCacheHas.js"); -module.exports = dijkstraAll; +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform(g.nodes(), function(acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, {}); + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } } +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/dijkstra.js": -/*!***************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/dijkstra.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_Stack.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_Stack.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), - PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); - -module.exports = dijkstra; - -var DEFAULT_WEIGHT_FUNC = _.constant(1); +var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), + stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/lodash/_stackClear.js"), + stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/lodash/_stackDelete.js"), + stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/lodash/_stackGet.js"), + stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/lodash/_stackHas.js"), + stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/lodash/_stackSet.js"); -function dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra(g, String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}, - pq = new PriorityQueue(), - v, vEntry; +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; - var updateNeighbors = function(edge) { - var w = edge.v !== v ? edge.v : edge.w, - wEntry = results[w], - weight = weightFn(edge), - distance = vEntry.distance + weight; +module.exports = Stack; - if (weight < 0) { - throw new Error("dijkstra does not allow negative edge weights. " + - "Bad edge: " + edge + " Weight: " + weight); - } - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; +/***/ }), - g.nodes().forEach(function(v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); +/***/ "./node_modules/lodash/_Symbol.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_Symbol.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } +var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - edgeFn(v).forEach(updateNeighbors); - } +/** Built-in value references. */ +var Symbol = root.Symbol; - return results; -} +module.exports = Symbol; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/find-cycles.js": -/*!******************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/find-cycles.js ***! - \******************************************************/ +/***/ "./node_modules/lodash/_Uint8Array.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_Uint8Array.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), - tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"); +var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); -module.exports = findCycles; +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; -function findCycles(g) { - return _.filter(tarjan(g), function(cmpt) { - return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); - }); -} +module.exports = Uint8Array; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/floyd-warshall.js": -/*!*********************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/floyd-warshall.js ***! - \*********************************************************/ +/***/ "./node_modules/lodash/_WeakMap.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_WeakMap.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), + root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); -module.exports = floydWarshall; +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); -var DEFAULT_WEIGHT_FUNC = _.constant(1); +module.exports = WeakMap; -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall(g, - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); -} -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}, - nodes = g.nodes(); +/***/ }), - nodes.forEach(function(v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function(w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function(edge) { - var w = edge.v === v ? edge.w : edge.v, - d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function(k) { - var rowK = results[k]; - nodes.forEach(function(i) { - var rowI = results[i]; - nodes.forEach(function(j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); +/***/ "./node_modules/lodash/_apply.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_apply.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - return results; +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); } +module.exports = apply; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/index.js": -/*!************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/index.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_arrayEach.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arrayEach.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -module.exports = { - components: __webpack_require__(/*! ./components */ "./node_modules/graphlib/lib/alg/components.js"), - dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"), - dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/graphlib/lib/alg/dijkstra-all.js"), - findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/graphlib/lib/alg/find-cycles.js"), - floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/graphlib/lib/alg/floyd-warshall.js"), - isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/graphlib/lib/alg/is-acyclic.js"), - postorder: __webpack_require__(/*! ./postorder */ "./node_modules/graphlib/lib/alg/postorder.js"), - preorder: __webpack_require__(/*! ./preorder */ "./node_modules/graphlib/lib/alg/preorder.js"), - prim: __webpack_require__(/*! ./prim */ "./node_modules/graphlib/lib/alg/prim.js"), - tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"), - topsort: __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js") -}; +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; /***/ }), -/***/ "./node_modules/graphlib/lib/alg/is-acyclic.js": -/*!*****************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/is-acyclic.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_arrayFilter.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_arrayFilter.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js"); +/***/ (function(module, exports) { -module.exports = isAcyclic; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof topsort.CycleException) { - return false; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; } - throw e; } - return true; + return result; } +module.exports = arrayFilter; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/postorder.js": -/*!****************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/postorder.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/_arrayIncludes.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_arrayIncludes.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); - -module.exports = postorder; +var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/lodash/_baseIndexOf.js"); -function postorder(g, vs) { - return dfs(g, vs, "post"); +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } +module.exports = arrayIncludes; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/preorder.js": +/***/ "./node_modules/lodash/_arrayIncludesWith.js": /*!***************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/preorder.js ***! + !*** ./node_modules/lodash/_arrayIncludesWith.js ***! \***************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); +/***/ (function(module, exports) { -module.exports = preorder; +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; -function preorder(g, vs) { - return dfs(g, vs, "pre"); + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; } +module.exports = arrayIncludesWith; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/prim.js": +/***/ "./node_modules/lodash/_arrayLikeKeys.js": /*!***********************************************!*\ - !*** ./node_modules/graphlib/lib/alg/prim.js ***! + !*** ./node_modules/lodash/_arrayLikeKeys.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"), - Graph = __webpack_require__(/*! ../graph */ "./node_modules/graphlib/lib/graph.js"), - PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); +var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); -module.exports = prim; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -function prim(g, weightFunc) { - var result = new Graph(), - parents = {}, - pq = new PriorityQueue(), - v; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v, - pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); } } + return result; +} - if (g.nodeCount() === 0) { - return result; - } +module.exports = arrayLikeKeys; - _.each(g.nodes(), function(v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); +/***/ }), - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error("Input graph is not connected: " + g); - } else { - init = true; - } +/***/ "./node_modules/lodash/_arrayMap.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_arrayMap.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - g.nodeEdges(v).forEach(updateNeighbors); - } +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } return result; } +module.exports = arrayMap; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/tarjan.js": -/*!*************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/tarjan.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_arrayPush.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arrayPush.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; -module.exports = tarjan; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} -function tarjan(g) { - var index = 0, - stack = [], - visited = {}, // node id -> { onStack, lowlink, index } - results = []; +module.exports = arrayPush; - function dfs(v) { - var entry = visited[v] = { - onStack: true, - lowlink: index, - index: index++ - }; - stack.push(v); - g.successors(v).forEach(function(w) { - if (!_.has(visited, w)) { - dfs(w); - entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); - } else if (visited[w].onStack) { - entry.lowlink = Math.min(entry.lowlink, visited[w].index); - } - }); +/***/ }), - if (entry.lowlink === entry.index) { - var cmpt = [], - w; - do { - w = stack.pop(); - visited[w].onStack = false; - cmpt.push(w); - } while (v !== w); - results.push(cmpt); - } - } +/***/ "./node_modules/lodash/_arrayReduce.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_arrayReduce.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { - g.nodes().forEach(function(v) { - if (!_.has(visited, v)) { - dfs(v); - } - }); +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; - return results; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; } +module.exports = arrayReduce; + /***/ }), -/***/ "./node_modules/graphlib/lib/alg/topsort.js": -/*!**************************************************!*\ - !*** ./node_modules/graphlib/lib/alg/topsort.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_arraySome.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arraySome.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; -module.exports = topsort; -topsort.CycleException = CycleException; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} -function topsort(g) { - var visited = {}, - stack = {}, - results = []; +module.exports = arraySome; - function visit(node) { - if (_.has(stack, node)) { - throw new CycleException(); - } - if (!_.has(visited, node)) { - stack[node] = true; - visited[node] = true; - _.each(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } +/***/ }), - _.each(g.sinks(), visit); +/***/ "./node_modules/lodash/_asciiSize.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_asciiSize.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (_.size(visited) !== g.nodeCount()) { - throw new CycleException(); - } +var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"); - return results; -} +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; -function CycleException() {} -CycleException.prototype = new Error(); // must be an instance of Error to pass testing /***/ }), -/***/ "./node_modules/graphlib/lib/data/priority-queue.js": -/*!**********************************************************!*\ - !*** ./node_modules/graphlib/lib/data/priority-queue.js ***! - \**********************************************************/ +/***/ "./node_modules/lodash/_assignMergeValue.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_assignMergeValue.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); - -module.exports = PriorityQueue; +var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), + eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); /** - * A min-priority queue data structure. This algorithm is derived from Cormen, - * et al., "Introduction to Algorithms". The basic idea of a min-priority - * queue is that you can efficiently (in O(1) time) get the smallest key in - * the queue. Adding and removing elements takes O(log n) time. A key can - * have its priority decreased in O(log n) time. + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -function PriorityQueue() { - this._arr = []; - this._keyIndices = {}; +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } } -/** - * Returns the number of elements in the queue. Takes `O(1)` time. - */ -PriorityQueue.prototype.size = function() { - return this._arr.length; -}; +module.exports = assignMergeValue; -/** - * Returns the keys that are in the queue. Takes `O(n)` time. - */ -PriorityQueue.prototype.keys = function() { - return this._arr.map(function(x) { return x.key; }); -}; -/** - * Returns `true` if **key** is in the queue and `false` if not. - */ -PriorityQueue.prototype.has = function(key) { - return _.has(this._keyIndices, key); -}; +/***/ }), -/** - * Returns the priority for **key**. If **key** is not present in the queue - * then this function returns `undefined`. Takes `O(1)` time. - * - * @param {Object} key - */ -PriorityQueue.prototype.priority = function(key) { - var index = this._keyIndices[key]; - if (index !== undefined) { - return this._arr[index].priority; - } -}; +/***/ "./node_modules/lodash/_assignValue.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_assignValue.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Returns the key for the minimum element in this queue. If the queue is - * empty this function throws an Error. Takes `O(1)` time. - */ -PriorityQueue.prototype.min = function() { - if (this.size() === 0) { - throw new Error("Queue underflow"); - } - return this._arr[0].key; -}; +var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), + eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Inserts a new key into the priority queue. If the key already exists in - * the queue this function returns `false`; otherwise it will return `true`. - * Takes `O(n)` time. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * - * @param {Object} key the key to add - * @param {Number} priority the initial priority for the key + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -PriorityQueue.prototype.add = function(key, priority) { - var keyIndices = this._keyIndices; - key = String(key); - if (!_.has(keyIndices, key)) { - var arr = this._arr; - var index = arr.length; - keyIndices[key] = index; - arr.push({key: key, priority: priority}); - this._decrease(index); - return true; +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } - return false; -}; +} -/** - * Removes and returns the smallest key in the queue. Takes `O(log n)` time. - */ -PriorityQueue.prototype.removeMin = function() { - this._swap(0, this._arr.length - 1); - var min = this._arr.pop(); - delete this._keyIndices[min.key]; - this._heapify(0); - return min.key; -}; +module.exports = assignValue; + + +/***/ }), + +/***/ "./node_modules/lodash/_assocIndexOf.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_assocIndexOf.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); /** - * Decreases the priority for **key** to **priority**. If the new priority is - * greater than the previous priority, this function will throw an Error. + * Gets the index at which the `key` is found in `array` of key-value pairs. * - * @param {Object} key the key for which to raise priority - * @param {Number} priority the new priority for the key + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. */ -PriorityQueue.prototype.decrease = function(key, priority) { - var index = this._keyIndices[key]; - if (priority > this._arr[index].priority) { - throw new Error("New priority is greater than current priority. " + - "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); - } - this._arr[index].priority = priority; - this._decrease(index); -}; - -PriorityQueue.prototype._heapify = function(i) { - var arr = this._arr; - var l = 2 * i, - r = l + 1, - largest = i; - if (l < arr.length) { - largest = arr[l].priority < arr[largest].priority ? l : largest; - if (r < arr.length) { - largest = arr[r].priority < arr[largest].priority ? r : largest; - } - if (largest !== i) { - this._swap(i, largest); - this._heapify(largest); - } - } -}; - -PriorityQueue.prototype._decrease = function(index) { - var arr = this._arr; - var priority = arr[index].priority; - var parent; - while (index !== 0) { - parent = index >> 1; - if (arr[parent].priority < priority) { - break; +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; } - this._swap(index, parent); - index = parent; } -}; + return -1; +} -PriorityQueue.prototype._swap = function(i, j) { - var arr = this._arr; - var keyIndices = this._keyIndices; - var origArrI = arr[i]; - var origArrJ = arr[j]; - arr[i] = origArrJ; - arr[j] = origArrI; - keyIndices[origArrJ.key] = i; - keyIndices[origArrI.key] = j; -}; +module.exports = assocIndexOf; /***/ }), -/***/ "./node_modules/graphlib/lib/graph.js": +/***/ "./node_modules/lodash/_baseAssign.js": /*!********************************************!*\ - !*** ./node_modules/graphlib/lib/graph.js ***! + !*** ./node_modules/lodash/_baseAssign.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"); +module.exports = baseAssign; -module.exports = Graph; -var DEFAULT_EDGE_NAME = "\x00", - GRAPH_NODE = "\x00", - EDGE_KEY_DELIM = "\x01"; +/***/ }), -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. +/***/ "./node_modules/lodash/_baseAssignIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseAssignIn.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function Graph(opts) { - this._isDirected = _.has(opts, "directed") ? opts.directed : true; - this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; - this._isCompound = _.has(opts, "compound") ? opts.compound : false; +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); - // Label for the graph itself - this._label = undefined; +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = _.constant(undefined); +module.exports = baseAssignIn; - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = _.constant(undefined); - // v -> label - this._nodes = {}; +/***/ }), - if (this._isCompound) { - // v -> parent - this._parent = {}; +/***/ "./node_modules/lodash/_baseAssignValue.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseAssignValue.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } +var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"); - // v -> edgeObj - this._in = {}; +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} - // u -> v -> Number - this._preds = {}; +module.exports = baseAssignValue; - // v -> edgeObj - this._out = {}; - // v -> w -> Number - this._sucs = {}; +/***/ }), - // e -> edgeObj - this._edgeObjs = {}; +/***/ "./node_modules/lodash/_baseClone.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseClone.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // e -> label - this._edgeLabels = {}; -} +var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), + arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), + assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + baseAssign = __webpack_require__(/*! ./_baseAssign */ "./node_modules/lodash/_baseAssign.js"), + baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "./node_modules/lodash/_baseAssignIn.js"), + cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), + copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), + copySymbols = __webpack_require__(/*! ./_copySymbols */ "./node_modules/lodash/_copySymbols.js"), + copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "./node_modules/lodash/_copySymbolsIn.js"), + getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"), + getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "./node_modules/lodash/_getAllKeysIn.js"), + getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "./node_modules/lodash/_initCloneArray.js"), + initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "./node_modules/lodash/_initCloneByTag.js"), + initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isMap = __webpack_require__(/*! ./isMap */ "./node_modules/lodash/isMap.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isSet = __webpack_require__(/*! ./isSet */ "./node_modules/lodash/isSet.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; -/* === Graph functions ========= */ +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; -Graph.prototype.isDirected = function() { - return this._isDirected; -}; +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; -Graph.prototype.isMultigraph = function() { - return this._isMultigraph; -}; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; -Graph.prototype.isCompound = function() { - return this._isCompound; -}; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); -Graph.prototype.setGraph = function(label) { - this._label = label; - return this; -}; + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } -Graph.prototype.graph = function() { - return this._label; -}; + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} -/* === Node functions ========== */ +module.exports = baseClone; -Graph.prototype.setDefaultNodeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; -}; -Graph.prototype.nodeCount = function() { - return this._nodeCount; -}; +/***/ }), -Graph.prototype.nodes = function() { - return _.keys(this._nodes); -}; +/***/ "./node_modules/lodash/_baseCreate.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseCreate.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.sources = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._in[v]); - }); -}; +var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); -Graph.prototype.sinks = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._out[v]); - }); -}; +/** Built-in value references. */ +var objectCreate = Object.create; -Graph.prototype.setNodes = function(vs, value) { - var args = arguments; - var self = this; - _.each(vs, function(v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; } - }); - return this; -}; - -Graph.prototype.setNode = function(v, value) { - if (_.has(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; + if (objectCreate) { + return objectCreate(proto); } - return this; - } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; -}; +module.exports = baseCreate; -Graph.prototype.node = function(v) { - return this._nodes[v]; -}; -Graph.prototype.hasNode = function(v) { - return _.has(this._nodes, v); -}; +/***/ }), -Graph.prototype.removeNode = function(v) { - var self = this; - if (_.has(this._nodes, v)) { - var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - _.each(this.children(v), function(child) { - self.setParent(child); - }); - delete this._children[v]; - } - _.each(_.keys(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - _.each(_.keys(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; -}; +/***/ "./node_modules/lodash/_baseEach.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseEach.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.setParent = function(v, parent) { - if (!this._isCompound) { - throw new Error("Cannot set parent in a non-compound graph"); - } +var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), + createBaseEach = __webpack_require__(/*! ./_createBaseEach */ "./node_modules/lodash/_createBaseEach.js"); - if (_.isUndefined(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ""; - for (var ancestor = parent; - !_.isUndefined(ancestor); - ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error("Setting " + parent+ " as parent of " + v + - " would create a cycle"); - } - } +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); - this.setNode(parent); - } +module.exports = baseEach; - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; -}; -Graph.prototype._removeFromParentsChildList = function(v) { - delete this._children[this._parent[v]][v]; -}; +/***/ }), -Graph.prototype.parent = function(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } -}; +/***/ "./node_modules/lodash/_baseExtremum.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseExtremum.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.children = function(v) { - if (_.isUndefined(v)) { - v = GRAPH_NODE; - } +var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return _.keys(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } -}; +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; -Graph.prototype.predecessors = function(v) { - var predsV = this._preds[v]; - if (predsV) { - return _.keys(predsV); - } -}; + while (++index < length) { + var value = array[index], + current = iteratee(value); -Graph.prototype.successors = function(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return _.keys(sucsV); + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } } -}; + return result; +} -Graph.prototype.neighbors = function(v) { - var preds = this.predecessors(v); - if (preds) { - return _.union(preds, this.successors(v)); - } -}; +module.exports = baseExtremum; -Graph.prototype.isLeaf = function (v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; -}; -Graph.prototype.filterNodes = function(filter) { - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound - }); +/***/ }), - copy.setGraph(this.graph()); +/***/ "./node_modules/lodash/_baseFilter.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseFilter.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - var self = this; - _.each(this._nodes, function(value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); +var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"); - _.each(this._edgeObjs, function(e) { - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); } }); + return result; +} - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } +module.exports = baseFilter; - if (this._isCompound) { - _.each(copy.nodes(), function(v) { - copy.setParent(v, findParent(v)); - }); - } - return copy; -}; +/***/ }), -/* === Edge functions ========== */ +/***/ "./node_modules/lodash/_baseFindIndex.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_baseFindIndex.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -Graph.prototype.setDefaultEdgeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } } - this._defaultEdgeLabelFn = newDefault; - return this; -}; + return -1; +} -Graph.prototype.edgeCount = function() { - return this._edgeCount; -}; +module.exports = baseFindIndex; -Graph.prototype.edges = function() { - return _.values(this._edgeObjs); -}; -Graph.prototype.setPath = function(vs, value) { - var self = this, - args = arguments; - _.reduce(vs, function(v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; -}; +/***/ }), -/* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ -Graph.prototype.setEdge = function() { - var v, w, name, value, - valueSpecified = false, - arg0 = arguments[0]; +/***/ "./node_modules/lodash/_baseFlatten.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseFlatten.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } +var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), + isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js"); - v = "" + v; - w = "" + w; - if (!_.isUndefined(name)) { - name = "" + name; - } +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; - var e = edgeArgsToId(this._isDirected, v, w, name); - if (_.has(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } + predicate || (predicate = isFlattenable); + result || (result = []); - if (!_.isUndefined(name) && !this._isMultigraph) { - throw new Error("Cannot set a named edge when isMultigraph = false"); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } } + return result; +} - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); +module.exports = baseFlatten; - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; +/***/ }), - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; -}; +/***/ "./node_modules/lodash/_baseFor.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseFor.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -Graph.prototype.edge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return this._edgeLabels[e]; -}; +var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js"); -Graph.prototype.hasEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return _.has(this._edgeLabels, e); -}; +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); -Graph.prototype.removeEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)), - edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; -}; +module.exports = baseFor; -Graph.prototype.inEdges = function(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = _.values(inV); - if (!u) { - return edges; - } - return _.filter(edges, function(edge) { return edge.v === u; }); - } -}; -Graph.prototype.outEdges = function(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = _.values(outV); - if (!w) { - return edges; - } - return _.filter(edges, function(edge) { return edge.w === w; }); - } -}; +/***/ }), -Graph.prototype.nodeEdges = function(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } -}; +/***/ "./node_modules/lodash/_baseForOwn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseForOwn.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} +var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { delete map[k]; } +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } -function edgeArgsToId(isDirected, v_, w_, name) { - var v = "" + v_; - var w = "" + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + - (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); -} +module.exports = baseForOwn; -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = "" + v_; - var w = "" + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; + +/***/ }), + +/***/ "./node_modules/lodash/_baseGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseGet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), + toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; } - return edgeObj; + return (index && index == length) ? object : undefined; } -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} +module.exports = baseGet; /***/ }), -/***/ "./node_modules/graphlib/lib/index.js": -/*!********************************************!*\ - !*** ./node_modules/graphlib/lib/index.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_baseGetAllKeys.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_baseGetAllKeys.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// Includes only the "core" of graphlib -module.exports = { - Graph: __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"), - version: __webpack_require__(/*! ./version */ "./node_modules/graphlib/lib/version.js") -}; +var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; /***/ }), -/***/ "./node_modules/graphlib/lib/json.js": -/*!*******************************************!*\ - !*** ./node_modules/graphlib/lib/json.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_baseGetTag.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseGetTag.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"), - Graph = __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"); +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), + getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"), + objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js"); -module.exports = { - write: write, - read: read -}; +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound() - }, - nodes: writeNodes(g), - edges: writeEdges(g) - }; - if (!_.isUndefined(g.graph())) { - json.value = _.clone(g.graph()); +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } - return json; + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } -function writeNodes(g) { - return _.map(g.nodes(), function(v) { - var nodeValue = g.node(v), - parent = g.parent(v), - node = { v: v }; - if (!_.isUndefined(nodeValue)) { - node.value = nodeValue; - } - if (!_.isUndefined(parent)) { - node.parent = parent; - } - return node; - }); -} +module.exports = baseGetTag; -function writeEdges(g) { - return _.map(g.edges(), function(e) { - var edgeValue = g.edge(e), - edge = { v: e.v, w: e.w }; - if (!_.isUndefined(e.name)) { - edge.name = e.name; - } - if (!_.isUndefined(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function(entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function(entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; +/***/ }), + +/***/ "./node_modules/lodash/_baseGt.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_baseGt.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; } +module.exports = baseGt; + /***/ }), -/***/ "./node_modules/graphlib/lib/lodash.js": -/*!*********************************************!*\ - !*** ./node_modules/graphlib/lib/lodash.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_baseHas.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseHas.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* global window */ +/***/ (function(module, exports) { -var lodash; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -if (true) { - try { - lodash = { - clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"), - constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), - each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), - filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), - has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), - isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"), - isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"), - isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), - isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), - keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"), - map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), - reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), - size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"), - transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"), - union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"), - values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js") - }; - } catch (e) {} -} +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -if (!lodash) { - lodash = window._; +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); } -module.exports = lodash; +module.exports = baseHas; /***/ }), -/***/ "./node_modules/graphlib/lib/version.js": -/*!**********************************************!*\ - !*** ./node_modules/graphlib/lib/version.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_baseHasIn.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseHasIn.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { -module.exports = '2.1.7'; +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; /***/ }), -/***/ "./node_modules/ieee754/index.js": -/*!***************************************!*\ - !*** ./node_modules/ieee754/index.js ***! - \***************************************/ +/***/ "./node_modules/lodash/_baseIndexOf.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseIndexOf.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} +/***/ (function(module, exports, __webpack_require__) { - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} +var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), + baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/lodash/_baseIsNaN.js"), + strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/lodash/_strictIndexOf.js"); - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); } -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 +module.exports = baseIndexOf; - value = Math.abs(value) - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } +/***/ }), - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } +/***/ "./node_modules/lodash/_baseIsArguments.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseIsArguments.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; - buffer[offset + i - d] |= s * 128 +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } +module.exports = baseIsArguments; + /***/ }), -/***/ "./node_modules/isarray/index.js": -/*!***************************************!*\ - !*** ./node_modules/isarray/index.js ***! - \***************************************/ +/***/ "./node_modules/lodash/_baseIsEqual.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseIsEqual.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -var toString = {}.toString; +var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/lodash/_baseIsEqualDeep.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; /***/ }), -/***/ "./node_modules/js-base64/base64.js": -/*!******************************************!*\ - !*** ./node_modules/js-base64/base64.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_baseIsEqualDeep.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseIsEqualDeep.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* - * base64.js - * - * Licensed under the BSD 3-Clause License. - * http://opensource.org/licenses/BSD-3-Clause +var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), + equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), + equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/lodash/_equalByTag.js"), + equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/lodash/_equalObjects.js"), + getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. * - * References: - * http://en.wikipedia.org/wiki/Base64 + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -;(function (global, factory) { - true - ? module.exports = factory(global) - : undefined -}(( - typeof self !== 'undefined' ? self - : typeof window !== 'undefined' ? window - : typeof global !== 'undefined' ? global -: this -), function(global) { - 'use strict'; - // existing version for noConflict() - global = global || {}; - var _Base64 = global.Base64; - var version = "2.5.1"; - // if node.js and NOT React Native, we use Buffer - var buffer; - if ( true && module.exports) { - try { - buffer = eval("require('buffer').Buffer"); - } catch (err) { - buffer = undefined; - } - } - // constants - var b64chars - = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - var b64tab = function(bin) { - var t = {}; - for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; - return t; - }(b64chars); - var fromCharCode = String.fromCharCode; - // encoder stuff - var cb_utob = function(c) { - if (c.length < 2) { - var cc = c.charCodeAt(0); - return cc < 0x80 ? c - : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) - + fromCharCode(0x80 | (cc & 0x3f))) - : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) - + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) - + fromCharCode(0x80 | ( cc & 0x3f))); - } else { - var cc = 0x10000 - + (c.charCodeAt(0) - 0xD800) * 0x400 - + (c.charCodeAt(1) - 0xDC00); - return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) - + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) - + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) - + fromCharCode(0x80 | ( cc & 0x3f))); - } - }; - var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; - var utob = function(u) { - return u.replace(re_utob, cb_utob); - }; - var cb_encode = function(ccc) { - var padlen = [0, 2, 1][ccc.length % 3], - ord = ccc.charCodeAt(0) << 16 - | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) - | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), - chars = [ - b64chars.charAt( ord >>> 18), - b64chars.charAt((ord >>> 12) & 63), - padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), - padlen >= 1 ? '=' : b64chars.charAt(ord & 63) - ]; - return chars.join(''); - }; - var btoa = global.btoa ? function(b) { - return global.btoa(b); - } : function(b) { - return b.replace(/[\s\S]{1,3}/g, cb_encode); - }; - var _encode = buffer ? - buffer.from && Uint8Array && buffer.from !== Uint8Array.from - ? function (u) { - return (u.constructor === buffer.constructor ? u : buffer.from(u)) - .toString('base64') - } - : function (u) { - return (u.constructor === buffer.constructor ? u : new buffer(u)) - .toString('base64') - } - : function (u) { return btoa(utob(u)) } - ; - var encode = function(u, urisafe) { - return !urisafe - ? _encode(String(u)) - : _encode(String(u)).replace(/[+\/]/g, function(m0) { - return m0 == '+' ? '-' : '_'; - }).replace(/=/g, ''); - }; - var encodeURI = function(u) { return encode(u, true) }; - // decoder stuff - var re_btou = new RegExp([ - '[\xC0-\xDF][\x80-\xBF]', - '[\xE0-\xEF][\x80-\xBF]{2}', - '[\xF0-\xF7][\x80-\xBF]{3}' - ].join('|'), 'g'); - var cb_btou = function(cccc) { - switch(cccc.length) { - case 4: - var cp = ((0x07 & cccc.charCodeAt(0)) << 18) - | ((0x3f & cccc.charCodeAt(1)) << 12) - | ((0x3f & cccc.charCodeAt(2)) << 6) - | (0x3f & cccc.charCodeAt(3)), - offset = cp - 0x10000; - return (fromCharCode((offset >>> 10) + 0xD800) - + fromCharCode((offset & 0x3FF) + 0xDC00)); - case 3: - return fromCharCode( - ((0x0f & cccc.charCodeAt(0)) << 12) - | ((0x3f & cccc.charCodeAt(1)) << 6) - | (0x3f & cccc.charCodeAt(2)) - ); - default: - return fromCharCode( - ((0x1f & cccc.charCodeAt(0)) << 6) - | (0x3f & cccc.charCodeAt(1)) - ); - } - }; - var btou = function(b) { - return b.replace(re_btou, cb_btou); - }; - var cb_decode = function(cccc) { - var len = cccc.length, - padlen = len % 4, - n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) - | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) - | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) - | (len > 3 ? b64tab[cccc.charAt(3)] : 0), - chars = [ - fromCharCode( n >>> 16), - fromCharCode((n >>> 8) & 0xff), - fromCharCode( n & 0xff) - ]; - chars.length -= [0, 0, 2, 1][padlen]; - return chars.join(''); - }; - var _atob = global.atob ? function(a) { - return global.atob(a); - } : function(a){ - return a.replace(/\S{1,4}/g, cb_decode); - }; - var atob = function(a) { - return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, '')); - }; - var _decode = buffer ? - buffer.from && Uint8Array && buffer.from !== Uint8Array.from - ? function(a) { - return (a.constructor === buffer.constructor - ? a : buffer.from(a, 'base64')).toString(); - } - : function(a) { - return (a.constructor === buffer.constructor - ? a : new buffer(a, 'base64')).toString(); - } - : function(a) { return btou(_atob(a)) }; - var decode = function(a){ - return _decode( - String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) - .replace(/[^A-Za-z0-9\+\/]/g, '') - ); - }; - var noConflict = function() { - var Base64 = global.Base64; - global.Base64 = _Base64; - return Base64; - }; - // export Base64 - global.Base64 = { - VERSION: version, - atob: atob, - btoa: btoa, - fromBase64: decode, - toBase64: encode, - utob: utob, - encode: encode, - encodeURI: encodeURI, - btou: btou, - decode: decode, - noConflict: noConflict, - __buffer__: buffer - }; - // if ES5 is available, make Base64.extendString() available - if (typeof Object.defineProperty === 'function') { - var noEnum = function(v){ - return {value:v,enumerable:false,writable:true,configurable:true}; - }; - global.Base64.extendString = function () { - Object.defineProperty( - String.prototype, 'fromBase64', noEnum(function () { - return decode(this) - })); - Object.defineProperty( - String.prototype, 'toBase64', noEnum(function (urisafe) { - return encode(this, urisafe) - })); - Object.defineProperty( - String.prototype, 'toBase64URI', noEnum(function () { - return encode(this, true) - })); - }; - } - // - // export Base64 to the namespace - // - if (global['Meteor']) { // Meteor.js - Base64 = global.Base64; - } - // module.exports and AMD are mutually exclusive. - // module.exports has precedence. - if ( true && module.exports) { - module.exports.Base64 = global.Base64; - } - else if (true) { - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - // that's it! - return {Base64: global.Base64} -})); +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; -/***/ }), + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; -/***/ "./node_modules/khroma/dist/channels/index.js": -/*!****************************************************!*\ - !*** ./node_modules/khroma/dist/channels/index.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); -"use strict"; + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); -var type_1 = __webpack_require__(/*! ./type */ "./node_modules/khroma/dist/channels/type.js"); -/* CHANNELS */ -var Channels = /** @class */ (function () { - /* CONSTRUCTOR */ - function Channels(data, color) { - this.color = color; - this.changed = false; - this.data = data; //TSC - this.type = new type_1.default(); + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } - /* API */ - Channels.prototype.set = function (data, color) { - this.color = color; - this.changed = false; - this.data = data; //TSC - this.type.type = types_1.TYPE.ALL; - return this; - }; - /* HELPERS */ - Channels.prototype._ensureHSL = function () { - if (this.data.h === undefined) - this.data.h = utils_1.default.channel.rgb2hsl(this.data, 'h'); - if (this.data.s === undefined) - this.data.s = utils_1.default.channel.rgb2hsl(this.data, 's'); - if (this.data.l === undefined) - this.data.l = utils_1.default.channel.rgb2hsl(this.data, 'l'); - }; - Channels.prototype._ensureRGB = function () { - if (this.data.r === undefined) - this.data.r = utils_1.default.channel.hsl2rgb(this.data, 'r'); - if (this.data.g === undefined) - this.data.g = utils_1.default.channel.hsl2rgb(this.data, 'g'); - if (this.data.b === undefined) - this.data.b = utils_1.default.channel.hsl2rgb(this.data, 'b'); - }; - Object.defineProperty(Channels.prototype, "r", { - /* GETTERS */ - get: function () { - if (!this.type.is(types_1.TYPE.HSL) && this.data.r !== undefined) - return this.data.r; - this._ensureHSL(); - return utils_1.default.channel.hsl2rgb(this.data, 'r'); - }, - /* SETTERS */ - set: function (r) { - this.type.set(types_1.TYPE.RGB); - this.changed = true; - this.data.r = r; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "g", { - get: function () { - if (!this.type.is(types_1.TYPE.HSL) && this.data.g !== undefined) - return this.data.g; - this._ensureHSL(); - return utils_1.default.channel.hsl2rgb(this.data, 'g'); - }, - set: function (g) { - this.type.set(types_1.TYPE.RGB); - this.changed = true; - this.data.g = g; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "b", { - get: function () { - if (!this.type.is(types_1.TYPE.HSL) && this.data.b !== undefined) - return this.data.b; - this._ensureHSL(); - return utils_1.default.channel.hsl2rgb(this.data, 'b'); - }, - set: function (b) { - this.type.set(types_1.TYPE.RGB); - this.changed = true; - this.data.b = b; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "h", { - get: function () { - if (!this.type.is(types_1.TYPE.RGB) && this.data.h !== undefined) - return this.data.h; - this._ensureRGB(); - return utils_1.default.channel.rgb2hsl(this.data, 'h'); - }, - set: function (h) { - this.type.set(types_1.TYPE.HSL); - this.changed = true; - this.data.h = h; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "s", { - get: function () { - if (!this.type.is(types_1.TYPE.RGB) && this.data.s !== undefined) - return this.data.s; - this._ensureRGB(); - return utils_1.default.channel.rgb2hsl(this.data, 's'); - }, - set: function (s) { - this.type.set(types_1.TYPE.HSL); - this.changed = true; - this.data.s = s; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "l", { - get: function () { - if (!this.type.is(types_1.TYPE.RGB) && this.data.l !== undefined) - return this.data.l; - this._ensureRGB(); - return utils_1.default.channel.rgb2hsl(this.data, 'l'); - }, - set: function (l) { - this.type.set(types_1.TYPE.HSL); - this.changed = true; - this.data.l = l; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Channels.prototype, "a", { - get: function () { - return this.data.a; - }, - set: function (a) { - this.changed = true; - this.data.a = a; - }, - enumerable: true, - configurable: true - }); - return Channels; -}()); -/* EXPORT */ -exports.default = Channels; + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; /***/ }), -/***/ "./node_modules/khroma/dist/channels/reusable.js": -/*!*******************************************************!*\ - !*** ./node_modules/khroma/dist/channels/reusable.js ***! - \*******************************************************/ +/***/ "./node_modules/lodash/_baseIsMap.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseIsMap.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var _1 = __webpack_require__(/*! . */ "./node_modules/khroma/dist/channels/index.js"); -/* REUSABLE */ -var channels = new _1.default({ r: 0, g: 0, b: 0, a: 0 }, 'transparent'); -/* EXPORT */ -exports.default = channels; - - -/***/ }), +var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/***/ "./node_modules/khroma/dist/channels/type.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/channels/type.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; -"use strict"; +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); -/* TYPE */ -var Type = /** @class */ (function () { - function Type() { - this.type = types_1.TYPE.ALL; - } - Type.prototype.get = function () { - return this.type; - }; - Type.prototype.set = function (type) { - if (this.type && this.type !== type) - throw new Error('Cannot change both RGB and HSL channels at the same time'); - this.type = type; - }; - Type.prototype.reset = function () { - this.type = types_1.TYPE.ALL; - }; - Type.prototype.is = function (type) { - return this.type === type; - }; - return Type; -}()); -/* EXPORT */ -exports.default = Type; +module.exports = baseIsMap; /***/ }), -/***/ "./node_modules/khroma/dist/color/hex.js": -/*!***********************************************!*\ - !*** ./node_modules/khroma/dist/color/hex.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_baseIsMatch.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseIsMatch.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), + baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); -var consts_1 = __webpack_require__(/*! ../consts */ "./node_modules/khroma/dist/consts.js"); -/* HEX */ -var Hex = { - /* VARIABLES */ - re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, - /* API */ - parse: function (color) { - if (color.charCodeAt(0) !== 35) - return; // '#' - var match = color.match(Hex.re); - if (!match) - return; - var hex = match[1], dec = parseInt(hex, 16), length = hex.length, hasAlpha = length % 4 === 0, isFullLength = length > 4, multiplier = isFullLength ? 1 : 17, bits = isFullLength ? 8 : 4, bitsOffset = hasAlpha ? 0 : -1, mask = isFullLength ? 255 : 15; - return reusable_1.default.set({ - r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier, - g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier, - b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier, - a: hasAlpha ? (dec & mask) * multiplier / 255 : 1 - }, color); - }, - stringify: function (channels) { - if (channels.a < 1) { // #RRGGBBAA - return "#" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)] + utils_1.default.unit.frac2hex(channels.a); - } - else { // #RRGGBB - return "#" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)]; - } - } -}; -/* EXPORT */ -exports.default = Hex; - - -/***/ }), +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -/***/ "./node_modules/khroma/dist/color/hsl.js": -/*!***********************************************!*\ - !*** ./node_modules/khroma/dist/color/hsl.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; -"use strict"; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); -/* HSL */ -var HSL = { - /* VARIABLES */ - re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i, - hueRe: /^(.+?)(deg|grad|rad|turn)$/i, - /* HELPERS */ - _hue2deg: function (hue) { - var match = hue.match(HSL.hueRe); - if (match) { - var number = match[1], unit = match[2]; - switch (unit) { - case 'grad': return utils_1.default.channel.clamp.h(parseFloat(number) * .9); - case 'rad': return utils_1.default.channel.clamp.h(parseFloat(number) * 180 / Math.PI); - case 'turn': return utils_1.default.channel.clamp.h(parseFloat(number) * 360); - } - } - return utils_1.default.channel.clamp.h(parseFloat(hue)); - }, - /* API */ - parse: function (color) { - var charCode = color.charCodeAt(0); - if (charCode !== 104 && charCode !== 72) - return; // 'h'/'H' - var match = color.match(HSL.re); - if (!match) - return; - var h = match[1], s = match[2], l = match[3], a = match[4], isAlphaPercentage = match[5]; - return reusable_1.default.set({ - h: HSL._hue2deg(h), - s: utils_1.default.channel.clamp.s(parseFloat(s)), - l: utils_1.default.channel.clamp.l(parseFloat(l)), - a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 - }, color); - }, - stringify: function (channels) { - if (channels.a < 1) { // HSLA - return "hsla(" + utils_1.default.lang.round(channels.h) + ", " + utils_1.default.lang.round(channels.s) + "%, " + utils_1.default.lang.round(channels.l) + "%, " + channels.a + ")"; - } - else { // HSL - return "hsl(" + utils_1.default.lang.round(channels.h) + ", " + utils_1.default.lang.round(channels.s) + "%, " + utils_1.default.lang.round(channels.l) + "%)"; - } + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } } -}; -/* EXPORT */ -exports.default = HSL; + } + return true; +} + +module.exports = baseIsMatch; /***/ }), -/***/ "./node_modules/khroma/dist/color/index.js": -/*!*************************************************!*\ - !*** ./node_modules/khroma/dist/color/index.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_baseIsNaN.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseIsNaN.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var types_1 = __webpack_require__(/*! ../types */ "./node_modules/khroma/dist/types.js"); -var hex_1 = __webpack_require__(/*! ./hex */ "./node_modules/khroma/dist/color/hex.js"); -var keyword_1 = __webpack_require__(/*! ./keyword */ "./node_modules/khroma/dist/color/keyword.js"); -var rgb_1 = __webpack_require__(/*! ./rgb */ "./node_modules/khroma/dist/color/rgb.js"); -var hsl_1 = __webpack_require__(/*! ./hsl */ "./node_modules/khroma/dist/color/hsl.js"); -/* COLOR */ -var Color = { - /* VARIABLES */ - format: { - keyword: keyword_1.default, - hex: hex_1.default, - rgb: rgb_1.default, - rgba: rgb_1.default, - hsl: hsl_1.default, - hsla: hsl_1.default - }, - /* API */ - parse: function (color) { - if (typeof color !== 'string') - return color; - var channels = hex_1.default.parse(color) || rgb_1.default.parse(color) || hsl_1.default.parse(color) || keyword_1.default.parse(color); // Color providers ordered with performance in mind - if (channels) - return channels; - throw new Error("Unsupported color format: \"" + color + "\""); - }, - stringify: function (channels) { - // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value - if (!channels.changed && channels.color) - return channels.color; - if (channels.type.is(types_1.TYPE.HSL) || channels.data.r === undefined) { - return hsl_1.default.stringify(channels); - } - else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) { - return rgb_1.default.stringify(channels); - } - else { - return hex_1.default.stringify(channels); - } - } -}; -/* EXPORT */ -exports.default = Color; +module.exports = baseIsNaN; /***/ }), -/***/ "./node_modules/khroma/dist/color/keyword.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/color/keyword.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_baseIsNative.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseIsNative.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var hex_1 = __webpack_require__(/*! ./hex */ "./node_modules/khroma/dist/color/hex.js"); -/* KEYWORD */ -var Keyword = { - /* VARIABLES */ - colors: { - aliceblue: '#f0f8ff', - antiquewhite: '#faebd7', - aqua: '#00ffff', - aquamarine: '#7fffd4', - azure: '#f0ffff', - beige: '#f5f5dc', - bisque: '#ffe4c4', - black: '#000000', - blanchedalmond: '#ffebcd', - blue: '#0000ff', - blueviolet: '#8a2be2', - brown: '#a52a2a', - burlywood: '#deb887', - cadetblue: '#5f9ea0', - chartreuse: '#7fff00', - chocolate: '#d2691e', - coral: '#ff7f50', - cornflowerblue: '#6495ed', - cornsilk: '#fff8dc', - crimson: '#dc143c', - cyanaqua: '#00ffff', - darkblue: '#00008b', - darkcyan: '#008b8b', - darkgoldenrod: '#b8860b', - darkgray: '#a9a9a9', - darkgreen: '#006400', - darkgrey: '#a9a9a9', - darkkhaki: '#bdb76b', - darkmagenta: '#8b008b', - darkolivegreen: '#556b2f', - darkorange: '#ff8c00', - darkorchid: '#9932cc', - darkred: '#8b0000', - darksalmon: '#e9967a', - darkseagreen: '#8fbc8f', - darkslateblue: '#483d8b', - darkslategray: '#2f4f4f', - darkslategrey: '#2f4f4f', - darkturquoise: '#00ced1', - darkviolet: '#9400d3', - deeppink: '#ff1493', - deepskyblue: '#00bfff', - dimgray: '#696969', - dimgrey: '#696969', - dodgerblue: '#1e90ff', - firebrick: '#b22222', - floralwhite: '#fffaf0', - forestgreen: '#228b22', - fuchsia: '#ff00ff', - gainsboro: '#dcdcdc', - ghostwhite: '#f8f8ff', - gold: '#ffd700', - goldenrod: '#daa520', - gray: '#808080', - green: '#008000', - greenyellow: '#adff2f', - grey: '#808080', - honeydew: '#f0fff0', - hotpink: '#ff69b4', - indianred: '#cd5c5c', - indigo: '#4b0082', - ivory: '#fffff0', - khaki: '#f0e68c', - lavender: '#e6e6fa', - lavenderblush: '#fff0f5', - lawngreen: '#7cfc00', - lemonchiffon: '#fffacd', - lightblue: '#add8e6', - lightcoral: '#f08080', - lightcyan: '#e0ffff', - lightgoldenrodyellow: '#fafad2', - lightgray: '#d3d3d3', - lightgreen: '#90ee90', - lightgrey: '#d3d3d3', - lightpink: '#ffb6c1', - lightsalmon: '#ffa07a', - lightseagreen: '#20b2aa', - lightskyblue: '#87cefa', - lightslategray: '#778899', - lightslategrey: '#778899', - lightsteelblue: '#b0c4de', - lightyellow: '#ffffe0', - lime: '#00ff00', - limegreen: '#32cd32', - linen: '#faf0e6', - magenta: '#ff00ff', - maroon: '#800000', - mediumaquamarine: '#66cdaa', - mediumblue: '#0000cd', - mediumorchid: '#ba55d3', - mediumpurple: '#9370db', - mediumseagreen: '#3cb371', - mediumslateblue: '#7b68ee', - mediumspringgreen: '#00fa9a', - mediumturquoise: '#48d1cc', - mediumvioletred: '#c71585', - midnightblue: '#191970', - mintcream: '#f5fffa', - mistyrose: '#ffe4e1', - moccasin: '#ffe4b5', - navajowhite: '#ffdead', - navy: '#000080', - oldlace: '#fdf5e6', - olive: '#808000', - olivedrab: '#6b8e23', - orange: '#ffa500', - orangered: '#ff4500', - orchid: '#da70d6', - palegoldenrod: '#eee8aa', - palegreen: '#98fb98', - paleturquoise: '#afeeee', - palevioletred: '#db7093', - papayawhip: '#ffefd5', - peachpuff: '#ffdab9', - peru: '#cd853f', - pink: '#ffc0cb', - plum: '#dda0dd', - powderblue: '#b0e0e6', - purple: '#800080', - rebeccapurple: '#663399', - red: '#ff0000', - rosybrown: '#bc8f8f', - royalblue: '#4169e1', - saddlebrown: '#8b4513', - salmon: '#fa8072', - sandybrown: '#f4a460', - seagreen: '#2e8b57', - seashell: '#fff5ee', - sienna: '#a0522d', - silver: '#c0c0c0', - skyblue: '#87ceeb', - slateblue: '#6a5acd', - slategray: '#708090', - slategrey: '#708090', - snow: '#fffafa', - springgreen: '#00ff7f', - tan: '#d2b48c', - teal: '#008080', - thistle: '#d8bfd8', - transparent: '#00000000', - turquoise: '#40e0d0', - violet: '#ee82ee', - wheat: '#f5deb3', - white: '#ffffff', - whitesmoke: '#f5f5f5', - yellow: '#ffff00', - yellowgreen: '#9acd32' - }, - /* API */ - parse: function (color) { - color = color.toLowerCase(); - var hex = Keyword.colors[color]; - if (!hex) - return; - return hex_1.default.parse(hex); - }, - stringify: function (channels) { - var hex = hex_1.default.stringify(channels); - for (var name_1 in Keyword.colors) { - if (Keyword.colors[name_1] === hex) - return name_1; - } - } -}; -/* EXPORT */ -exports.default = Keyword; - - -/***/ }), +var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); -/***/ "./node_modules/khroma/dist/color/rgb.js": -/*!***********************************************!*\ - !*** ./node_modules/khroma/dist/color/rgb.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; -"use strict"; +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); -/* RGB */ -var RGB = { - /* VARIABLES */ - re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i, - /* API */ - parse: function (color) { - var charCode = color.charCodeAt(0); - if (charCode !== 114 && charCode !== 82) - return; // 'r'/'R' - var match = color.match(RGB.re); - if (!match) - return; - var r = match[1], isRedPercentage = match[2], g = match[3], isGreenPercentage = match[4], b = match[5], isBluePercentage = match[6], a = match[7], isAlphaPercentage = match[8]; - return reusable_1.default.set({ - r: utils_1.default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)), - g: utils_1.default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)), - b: utils_1.default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)), - a: a ? utils_1.default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 - }, color); - }, - stringify: function (channels) { - if (channels.a < 1) { // RGBA - return "rgba(" + utils_1.default.lang.round(channels.r) + ", " + utils_1.default.lang.round(channels.g) + ", " + utils_1.default.lang.round(channels.b) + ", " + utils_1.default.lang.round(channels.a) + ")"; - } - else { // RGB - return "rgb(" + utils_1.default.lang.round(channels.r) + ", " + utils_1.default.lang.round(channels.g) + ", " + utils_1.default.lang.round(channels.b) + ")"; - } - } -}; -/* EXPORT */ -exports.default = RGB; +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; -/***/ }), +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -/***/ "./node_modules/khroma/dist/consts.js": -/*!********************************************!*\ - !*** ./node_modules/khroma/dist/consts.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); -"use strict"; +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/khroma/dist/utils/index.js"); -/* CONSTS */ -var DEC2HEX = {}; -exports.DEC2HEX = DEC2HEX; -for (var i = 0; i <= 255; i++) - DEC2HEX[i] = utils_1.default.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance +module.exports = baseIsNative; /***/ }), -/***/ "./node_modules/khroma/dist/index.js": +/***/ "./node_modules/lodash/_baseIsSet.js": /*!*******************************************!*\ - !*** ./node_modules/khroma/dist/index.js ***! + !*** ./node_modules/lodash/_baseIsSet.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/* EXPORT */ -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; } -Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./methods */ "./node_modules/khroma/dist/methods/index.js")); + +module.exports = baseIsSet; /***/ }), -/***/ "./node_modules/khroma/dist/methods/adjust.js": -/*!****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/adjust.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/_baseIsTypedArray.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_baseIsTypedArray.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); -/* ADJUST */ -function adjust(color, channels) { - var ch = color_1.default.parse(color), changes = {}; - for (var c in channels) { - if (!channels[c]) - continue; - changes[c] = ch[c] + channels[c]; - } - return change_1.default(color, changes); -} -/* EXPORT */ -exports.default = adjust; - - -/***/ }), +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; -/***/ "./node_modules/khroma/dist/methods/adjust_channel.js": -/*!************************************************************!*\ - !*** ./node_modules/khroma/dist/methods/adjust_channel.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; -"use strict"; +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* ADJUST CHANNEL */ -function adjustChannel(color, channel, amount) { - var channels = color_1.default.parse(color), amountCurrent = channels[channel], amountNext = utils_1.default.channel.clamp[channel](amountCurrent + amount); - if (amountCurrent !== amountNext) - channels[channel] = amountNext; - return color_1.default.stringify(channels); +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } -/* EXPORT */ -exports.default = adjustChannel; + +module.exports = baseIsTypedArray; /***/ }), -/***/ "./node_modules/khroma/dist/methods/alpha.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/methods/alpha.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_baseIteratee.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseIteratee.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/lodash/_baseMatches.js"), + baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/lodash/_baseMatchesProperty.js"), + identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + property = __webpack_require__(/*! ./property */ "./node_modules/lodash/property.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* ALPHA */ -function alpha(color) { - return channel_1.default(color, 'a'); +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); } -/* EXPORT */ -exports.default = alpha; + +module.exports = baseIteratee; /***/ }), -/***/ "./node_modules/khroma/dist/methods/blue.js": -/*!**************************************************!*\ - !*** ./node_modules/khroma/dist/methods/blue.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_baseKeys.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseKeys.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* BLUE */ -function blue(color) { - return channel_1.default(color, 'b'); -} -/* EXPORT */ -exports.default = blue; - - -/***/ }), +var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), + nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/lodash/_nativeKeys.js"); -/***/ "./node_modules/khroma/dist/methods/change.js": -/*!****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/change.js ***! - \****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; -"use strict"; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* CHANGE */ -function change(color, channels) { - var ch = color_1.default.parse(color); - for (var c in channels) { - ch[c] = utils_1.default.channel.clamp[c](channels[c]); +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); } - return color_1.default.stringify(ch); + } + return result; } -/* EXPORT */ -exports.default = change; + +module.exports = baseKeys; /***/ }), -/***/ "./node_modules/khroma/dist/methods/channel.js": -/*!*****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/channel.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_baseKeysIn.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseKeysIn.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* CHANNEL */ -function channel(color, channel) { - return utils_1.default.lang.round(color_1.default.parse(color)[channel]); -} -/* EXPORT */ -exports.default = channel; - +var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), + nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js"); -/***/ }), +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ "./node_modules/khroma/dist/methods/complement.js": -/*!********************************************************!*\ - !*** ./node_modules/khroma/dist/methods/complement.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -"use strict"; +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* COMPLEMENT */ -function complement(color) { - return adjust_channel_1.default(color, 'h', 180); + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; } -/* EXPORT */ -exports.default = complement; + +module.exports = baseKeysIn; /***/ }), -/***/ "./node_modules/khroma/dist/methods/darken.js": -/*!****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/darken.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/_baseLt.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/_baseLt.js ***! + \****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ (function(module, exports) { -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* DARKEN */ -function darken(color, amount) { - return adjust_channel_1.default(color, 'l', -amount); +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; } -/* EXPORT */ -exports.default = darken; + +module.exports = baseLt; /***/ }), -/***/ "./node_modules/khroma/dist/methods/desaturate.js": -/*!********************************************************!*\ - !*** ./node_modules/khroma/dist/methods/desaturate.js ***! - \********************************************************/ +/***/ "./node_modules/lodash/_baseMap.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseMap.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* DESATURATE */ -function desaturate(color, amount) { - return adjust_channel_1.default(color, 's', -amount); +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; } -/* EXPORT */ -exports.default = desaturate; + +module.exports = baseMap; /***/ }), -/***/ "./node_modules/khroma/dist/methods/grayscale.js": -/*!*******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/grayscale.js ***! - \*******************************************************/ +/***/ "./node_modules/lodash/_baseMatches.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseMatches.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/lodash/_baseIsMatch.js"), + getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/lodash/_getMatchData.js"), + matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); -/* GRAYSCALE */ -function grayscale(color) { - return change_1.default(color, { s: 0 }); +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; } -/* EXPORT */ -exports.default = grayscale; + +module.exports = baseMatches; /***/ }), -/***/ "./node_modules/khroma/dist/methods/green.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/methods/green.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_baseMatchesProperty.js": +/*!*****************************************************!*\ + !*** ./node_modules/lodash/_baseMatchesProperty.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"), + get = __webpack_require__(/*! ./get */ "./node_modules/lodash/get.js"), + hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"), + isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), + isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), + matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"), + toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* GREEN */ -function green(color) { - return channel_1.default(color, 'g'); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; } -/* EXPORT */ -exports.default = green; + +module.exports = baseMatchesProperty; /***/ }), -/***/ "./node_modules/khroma/dist/methods/hsla.js": -/*!**************************************************!*\ - !*** ./node_modules/khroma/dist/methods/hsla.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_baseMerge.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseMerge.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), + assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), + baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), + baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"), + safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* HSLA */ -function hsla(h, s, l, a) { - if (a === void 0) { a = 1; } - var channels = reusable_1.default.set({ - h: utils_1.default.channel.clamp.h(h), - s: utils_1.default.channel.clamp.s(s), - l: utils_1.default.channel.clamp.l(l), - a: utils_1.default.channel.clamp.a(a) - }); - return color_1.default.stringify(channels); +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); } -/* EXPORT */ -exports.default = hsla; + +module.exports = baseMerge; /***/ }), -/***/ "./node_modules/khroma/dist/methods/hue.js": -/*!*************************************************!*\ - !*** ./node_modules/khroma/dist/methods/hue.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_baseMergeDeep.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_baseMergeDeep.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), + cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), + cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"), + copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), + initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"), + safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"), + toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* HUE */ -function hue(color) { - return channel_1.default(color, 'h'); -} -/* EXPORT */ -exports.default = hue; +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; -/***/ }), + var isCommon = newValue === undefined; -/***/ "./node_modules/khroma/dist/methods/index.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/methods/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); -"use strict"; + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var rgba_1 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); // Alias -exports.hex = rgba_1.default; -var rgba_2 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); // Alias -exports.rgb = rgba_2.default; -var rgba_3 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); -exports.rgba = rgba_3.default; -var hsla_1 = __webpack_require__(/*! ./hsla */ "./node_modules/khroma/dist/methods/hsla.js"); // Alias -exports.hsl = hsla_1.default; -var hsla_2 = __webpack_require__(/*! ./hsla */ "./node_modules/khroma/dist/methods/hsla.js"); -exports.hsla = hsla_2.default; -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -exports.channel = channel_1.default; -var red_1 = __webpack_require__(/*! ./red */ "./node_modules/khroma/dist/methods/red.js"); -exports.red = red_1.default; -var green_1 = __webpack_require__(/*! ./green */ "./node_modules/khroma/dist/methods/green.js"); -exports.green = green_1.default; -var blue_1 = __webpack_require__(/*! ./blue */ "./node_modules/khroma/dist/methods/blue.js"); -exports.blue = blue_1.default; -var hue_1 = __webpack_require__(/*! ./hue */ "./node_modules/khroma/dist/methods/hue.js"); -exports.hue = hue_1.default; -var saturation_1 = __webpack_require__(/*! ./saturation */ "./node_modules/khroma/dist/methods/saturation.js"); -exports.saturation = saturation_1.default; -var lightness_1 = __webpack_require__(/*! ./lightness */ "./node_modules/khroma/dist/methods/lightness.js"); -exports.lightness = lightness_1.default; -var alpha_1 = __webpack_require__(/*! ./alpha */ "./node_modules/khroma/dist/methods/alpha.js"); -exports.alpha = alpha_1.default; -var alpha_2 = __webpack_require__(/*! ./alpha */ "./node_modules/khroma/dist/methods/alpha.js"); // Alias -exports.opacity = alpha_2.default; -var luminance_1 = __webpack_require__(/*! ./luminance */ "./node_modules/khroma/dist/methods/luminance.js"); -exports.luminance = luminance_1.default; -var is_dark_1 = __webpack_require__(/*! ./is_dark */ "./node_modules/khroma/dist/methods/is_dark.js"); -exports.isDark = is_dark_1.default; -var is_light_1 = __webpack_require__(/*! ./is_light */ "./node_modules/khroma/dist/methods/is_light.js"); -exports.isLight = is_light_1.default; -var is_valid_1 = __webpack_require__(/*! ./is_valid */ "./node_modules/khroma/dist/methods/is_valid.js"); -exports.isValid = is_valid_1.default; -var saturate_1 = __webpack_require__(/*! ./saturate */ "./node_modules/khroma/dist/methods/saturate.js"); -exports.saturate = saturate_1.default; -var desaturate_1 = __webpack_require__(/*! ./desaturate */ "./node_modules/khroma/dist/methods/desaturate.js"); -exports.desaturate = desaturate_1.default; -var lighten_1 = __webpack_require__(/*! ./lighten */ "./node_modules/khroma/dist/methods/lighten.js"); -exports.lighten = lighten_1.default; -var darken_1 = __webpack_require__(/*! ./darken */ "./node_modules/khroma/dist/methods/darken.js"); -exports.darken = darken_1.default; -var opacify_1 = __webpack_require__(/*! ./opacify */ "./node_modules/khroma/dist/methods/opacify.js"); -exports.opacify = opacify_1.default; -var opacify_2 = __webpack_require__(/*! ./opacify */ "./node_modules/khroma/dist/methods/opacify.js"); // Alias -exports.fadeIn = opacify_2.default; -var transparentize_1 = __webpack_require__(/*! ./transparentize */ "./node_modules/khroma/dist/methods/transparentize.js"); -exports.transparentize = transparentize_1.default; -var transparentize_2 = __webpack_require__(/*! ./transparentize */ "./node_modules/khroma/dist/methods/transparentize.js"); // Alias -exports.fadeOut = transparentize_2.default; -var complement_1 = __webpack_require__(/*! ./complement */ "./node_modules/khroma/dist/methods/complement.js"); -exports.complement = complement_1.default; -var grayscale_1 = __webpack_require__(/*! ./grayscale */ "./node_modules/khroma/dist/methods/grayscale.js"); -exports.grayscale = grayscale_1.default; -var adjust_1 = __webpack_require__(/*! ./adjust */ "./node_modules/khroma/dist/methods/adjust.js"); -exports.adjust = adjust_1.default; -var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); -exports.change = change_1.default; -var invert_1 = __webpack_require__(/*! ./invert */ "./node_modules/khroma/dist/methods/invert.js"); -exports.invert = invert_1.default; -var mix_1 = __webpack_require__(/*! ./mix */ "./node_modules/khroma/dist/methods/mix.js"); -exports.mix = mix_1.default; -var scale_1 = __webpack_require__(/*! ./scale */ "./node_modules/khroma/dist/methods/scale.js"); -exports.scale = scale_1.default; +module.exports = baseMergeDeep; /***/ }), -/***/ "./node_modules/khroma/dist/methods/invert.js": -/*!****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/invert.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/_baseOrderBy.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_baseOrderBy.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -var mix_1 = __webpack_require__(/*! ./mix */ "./node_modules/khroma/dist/methods/mix.js"); -/* INVERT */ -function invert(color, weight) { - if (weight === void 0) { weight = 100; } - var inverse = color_1.default.parse(color); - inverse.r = 255 - inverse.r; - inverse.g = 255 - inverse.g; - inverse.b = 255 - inverse.b; - return mix_1.default(inverse, color, weight); -} -/* EXPORT */ -exports.default = invert; - - -/***/ }), +var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), + baseSortBy = __webpack_require__(/*! ./_baseSortBy */ "./node_modules/lodash/_baseSortBy.js"), + baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), + compareMultiple = __webpack_require__(/*! ./_compareMultiple */ "./node_modules/lodash/_compareMultiple.js"), + identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); -/***/ "./node_modules/khroma/dist/methods/is_dark.js": -/*!*****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/is_dark.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); -"use strict"; + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var is_light_1 = __webpack_require__(/*! ./is_light */ "./node_modules/khroma/dist/methods/is_light.js"); -/* IS DARK */ -function isDark(color) { - return !is_light_1.default(color); + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); } -/* EXPORT */ -exports.default = isDark; + +module.exports = baseOrderBy; /***/ }), -/***/ "./node_modules/khroma/dist/methods/is_light.js": -/*!******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/is_light.js ***! - \******************************************************/ +/***/ "./node_modules/lodash/_basePick.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_basePick.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var basePickBy = __webpack_require__(/*! ./_basePickBy */ "./node_modules/lodash/_basePickBy.js"), + hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var luminance_1 = __webpack_require__(/*! ./luminance */ "./node_modules/khroma/dist/methods/luminance.js"); -/* IS LIGHT */ -function isLight(color) { - return luminance_1.default(color) >= .5; +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); } -/* EXPORT */ -exports.default = isLight; + +module.exports = basePick; /***/ }), -/***/ "./node_modules/khroma/dist/methods/is_valid.js": -/*!******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/is_valid.js ***! - \******************************************************/ +/***/ "./node_modules/lodash/_basePickBy.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_basePickBy.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"), + baseSet = __webpack_require__(/*! ./_baseSet */ "./node_modules/lodash/_baseSet.js"), + castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* IS VALID */ -function isValid(color) { - try { - color_1.default.parse(color); - return true; - } - catch (_a) { - return false; +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } + } + return result; } -/* EXPORT */ -exports.default = isValid; + +module.exports = basePickBy; /***/ }), -/***/ "./node_modules/khroma/dist/methods/lighten.js": -/*!*****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/lighten.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_baseProperty.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseProperty.js ***! + \**********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ (function(module, exports) { -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* LIGHTEN */ -function lighten(color, amount) { - return adjust_channel_1.default(color, 'l', amount); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; } -/* EXPORT */ -exports.default = lighten; + +module.exports = baseProperty; /***/ }), -/***/ "./node_modules/khroma/dist/methods/lightness.js": -/*!*******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/lightness.js ***! - \*******************************************************/ +/***/ "./node_modules/lodash/_basePropertyDeep.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_basePropertyDeep.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* LIGHTNESS */ -function lightness(color) { - return channel_1.default(color, 'l'); +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; } -/* EXPORT */ -exports.default = lightness; + +module.exports = basePropertyDeep; /***/ }), -/***/ "./node_modules/khroma/dist/methods/luminance.js": -/*!*******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/luminance.js ***! - \*******************************************************/ +/***/ "./node_modules/lodash/_baseRange.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseRange.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -/* LUMINANCE */ -//SOURCE: https://planetcalc.com/7779 -function luminance(color) { - var _a = color_1.default.parse(color), r = _a.r, g = _a.g, b = _a.b, luminance = .2126 * utils_1.default.channel.toLinear(r) + .7152 * utils_1.default.channel.toLinear(g) + .0722 * utils_1.default.channel.toLinear(b); - return utils_1.default.lang.round(luminance); +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; } -/* EXPORT */ -exports.default = luminance; + +module.exports = baseRange; /***/ }), -/***/ "./node_modules/khroma/dist/methods/mix.js": -/*!*************************************************!*\ - !*** ./node_modules/khroma/dist/methods/mix.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_baseReduce.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseReduce.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/***/ (function(module, exports) { -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -var rgba_1 = __webpack_require__(/*! ./rgba */ "./node_modules/khroma/dist/methods/rgba.js"); -/* MIX */ -//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756 -function mix(color1, color2, weight) { - if (weight === void 0) { weight = 50; } - var _a = color_1.default.parse(color1), r1 = _a.r, g1 = _a.g, b1 = _a.b, a1 = _a.a, _b = color_1.default.parse(color2), r2 = _b.r, g2 = _b.g, b2 = _b.b, a2 = _b.a, weightScale = weight / 100, weightNormalized = (weightScale * 2) - 1, alphaDelta = a1 - a2, weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta), weight1 = (weight1combined + 1) / 2, weight2 = 1 - weight1, r = (r1 * weight1) + (r2 * weight2), g = (g1 * weight1) + (g2 * weight2), b = (b1 * weight1) + (b2 * weight2), a = (a1 * weightScale) + (a2 * (1 - weightScale)); - return rgba_1.default(r, g, b, a); +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; } -/* EXPORT */ -exports.default = mix; + +module.exports = baseReduce; /***/ }), -/***/ "./node_modules/khroma/dist/methods/opacify.js": -/*!*****************************************************!*\ - !*** ./node_modules/khroma/dist/methods/opacify.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_baseRest.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseRest.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), + overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), + setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* OPACIFY */ -function opacify(color, amount) { - return adjust_channel_1.default(color, 'a', amount); +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } -/* EXPORT */ -exports.default = opacify; + +module.exports = baseRest; /***/ }), -/***/ "./node_modules/khroma/dist/methods/red.js": -/*!*************************************************!*\ - !*** ./node_modules/khroma/dist/methods/red.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_baseSet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_baseSet.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* RED */ -function red(color) { - return channel_1.default(color, 'r'); -} -/* EXPORT */ -exports.default = red; - +var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), + isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); -/***/ }), +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); -/***/ "./node_modules/khroma/dist/methods/rgba.js": -/*!**************************************************!*\ - !*** ./node_modules/khroma/dist/methods/rgba.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; -"use strict"; + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var reusable_1 = __webpack_require__(/*! ../channels/reusable */ "./node_modules/khroma/dist/channels/reusable.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -var change_1 = __webpack_require__(/*! ./change */ "./node_modules/khroma/dist/methods/change.js"); -function rgba(r, g, b, a) { - if (b === void 0) { b = 0; } - if (a === void 0) { a = 1; } - if (typeof r !== 'number') - return change_1.default(r, { a: g }); - var channels = reusable_1.default.set({ - r: utils_1.default.channel.clamp.r(r), - g: utils_1.default.channel.clamp.g(g), - b: utils_1.default.channel.clamp.b(b), - a: utils_1.default.channel.clamp.a(a) - }); - return color_1.default.stringify(channels); + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; } -/* EXPORT */ -exports.default = rgba; + +module.exports = baseSet; /***/ }), -/***/ "./node_modules/khroma/dist/methods/saturate.js": -/*!******************************************************!*\ - !*** ./node_modules/khroma/dist/methods/saturate.js ***! - \******************************************************/ +/***/ "./node_modules/lodash/_baseSetToString.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseSetToString.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"), + defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"), + identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* SATURATE */ -function saturate(color, amount) { - return adjust_channel_1.default(color, 's', amount); -} -/* EXPORT */ -exports.default = saturate; +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; /***/ }), -/***/ "./node_modules/khroma/dist/methods/saturation.js": -/*!********************************************************!*\ - !*** ./node_modules/khroma/dist/methods/saturation.js ***! - \********************************************************/ +/***/ "./node_modules/lodash/_baseSortBy.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseSortBy.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/methods/channel.js"); -/* SATURATION */ -function saturation(color) { - return channel_1.default(color, 's'); + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; } -/* EXPORT */ -exports.default = saturation; + +module.exports = baseSortBy; /***/ }), -/***/ "./node_modules/khroma/dist/methods/scale.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/methods/scale.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_baseTimes.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_baseTimes.js ***! + \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var utils_1 = __webpack_require__(/*! ../utils */ "./node_modules/khroma/dist/utils/index.js"); -var color_1 = __webpack_require__(/*! ../color */ "./node_modules/khroma/dist/color/index.js"); -var adjust_1 = __webpack_require__(/*! ./adjust */ "./node_modules/khroma/dist/methods/adjust.js"); -/* SCALE */ -function scale(color, channels) { - var ch = color_1.default.parse(color), adjustments = {}, delta = function (amount, weight, max) { return weight > 0 ? (max - amount) * weight / 100 : amount * weight / 100; }; - for (var c in channels) { - adjustments[c] = delta(ch[c], channels[c], utils_1.default.channel.max[c]); - } - return adjust_1.default(color, adjustments); + while (++index < n) { + result[index] = iteratee(index); + } + return result; } -/* EXPORT */ -exports.default = scale; + +module.exports = baseTimes; /***/ }), -/***/ "./node_modules/khroma/dist/methods/transparentize.js": -/*!************************************************************!*\ - !*** ./node_modules/khroma/dist/methods/transparentize.js ***! - \************************************************************/ +/***/ "./node_modules/lodash/_baseToString.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_baseToString.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), + arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var adjust_channel_1 = __webpack_require__(/*! ./adjust_channel */ "./node_modules/khroma/dist/methods/adjust_channel.js"); -/* TRANSPARENTIZE */ -function transparentize(color, amount) { - return adjust_channel_1.default(color, 'a', -amount); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -/* EXPORT */ -exports.default = transparentize; + +module.exports = baseToString; /***/ }), -/***/ "./node_modules/khroma/dist/types.js": +/***/ "./node_modules/lodash/_baseUnary.js": /*!*******************************************!*\ - !*** ./node_modules/khroma/dist/types.js ***! + !*** ./node_modules/lodash/_baseUnary.js ***! \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} -/* ENUMS */ -Object.defineProperty(exports, "__esModule", { value: true }); -var TYPE; -(function (TYPE) { - TYPE[TYPE["ALL"] = 0] = "ALL"; - TYPE[TYPE["RGB"] = 1] = "RGB"; - TYPE[TYPE["HSL"] = 2] = "HSL"; -})(TYPE || (TYPE = {})); -exports.TYPE = TYPE; -; +module.exports = baseUnary; /***/ }), -/***/ "./node_modules/khroma/dist/utils/channel.js": -/*!***************************************************!*\ - !*** ./node_modules/khroma/dist/utils/channel.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_baseUniq.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseUniq.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), + arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/lodash/_arrayIncludes.js"), + arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/lodash/_arrayIncludesWith.js"), + cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"), + createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/lodash/_createSet.js"), + setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -/* CHANNEL */ -var Channel = { - /* CLAMP */ - min: { - r: 0, - g: 0, - b: 0, - s: 0, - l: 0, - a: 0 - }, - max: { - r: 255, - g: 255, - b: 255, - h: 360, - s: 100, - l: 100, - a: 1 - }, - clamp: { - r: function (r) { return r >= 255 ? 255 : (r < 0 ? 0 : r); }, - g: function (g) { return g >= 255 ? 255 : (g < 0 ? 0 : g); }, - b: function (b) { return b >= 255 ? 255 : (b < 0 ? 0 : b); }, - h: function (h) { return h % 360; }, - s: function (s) { return s >= 100 ? 100 : (s < 0 ? 0 : s); }, - l: function (l) { return l >= 100 ? 100 : (l < 0 ? 0 : l); }, - a: function (a) { return a >= 1 ? 1 : (a < 0 ? 0 : a); } - }, - /* CONVERSION */ - //SOURCE: https://planetcalc.com/7779 - toLinear: function (c) { - var n = c / 255; - return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92; - }, - //SOURCE: https://gist.github.com/mjackson/5311256 - hue2rgb: function (p, q, t) { - if (t < 0) - t += 1; - if (t > 1) - t -= 1; - if (t < 1 / 6) - return p + (q - p) * 6 * t; - if (t < 1 / 2) - return q; - if (t < 2 / 3) - return p + (q - p) * (2 / 3 - t) * 6; - return p; - }, - hsl2rgb: function (_a, channel) { - var h = _a.h, s = _a.s, l = _a.l; - if (s === 100) - return l * 2.55; // Achromatic - h /= 360; - s /= 100; - l /= 100; - var q = (l < .5) ? l * (1 + s) : (l + s) - (l * s), p = 2 * l - q; - switch (channel) { - case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255; - case 'g': return Channel.hue2rgb(p, q, h) * 255; - case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255; - } - }, - rgb2hsl: function (_a, channel) { - var r = _a.r, g = _a.g, b = _a.b; - r /= 255; - g /= 255; - b /= 255; - var max = Math.max(r, g, b), min = Math.min(r, g, b), l = (max + min) / 2; - if (channel === 'l') - return l * 100; - if (max === min) - return 0; // Achromatic - var d = max - min, s = (l > .5) ? d / (2 - max - min) : d / (max + min); - if (channel === 's') - return s * 100; - switch (max) { - case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60; - case g: return ((b - r) / d + 2) * 60; - case b: return ((r - g) / d + 4) * 60; - default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); } -}; -/* EXPORT */ -exports.default = Channel; + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; /***/ }), -/***/ "./node_modules/khroma/dist/utils/index.js": -/*!*************************************************!*\ - !*** ./node_modules/khroma/dist/utils/index.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_baseValues.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_baseValues.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"); -/* IMPORT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var channel_1 = __webpack_require__(/*! ./channel */ "./node_modules/khroma/dist/utils/channel.js"); -var lang_1 = __webpack_require__(/*! ./lang */ "./node_modules/khroma/dist/utils/lang.js"); -var unit_1 = __webpack_require__(/*! ./unit */ "./node_modules/khroma/dist/utils/unit.js"); -/* UTILS */ -var Utils = { - channel: channel_1.default, - lang: lang_1.default, - unit: unit_1.default -}; -/* EXPORT */ -exports.default = Utils; +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; /***/ }), -/***/ "./node_modules/khroma/dist/utils/lang.js": -/*!************************************************!*\ - !*** ./node_modules/khroma/dist/utils/lang.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_baseZipObject.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_baseZipObject.js ***! + \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; -/* LANG */ -Object.defineProperty(exports, "__esModule", { value: true }); -var Lang = { - round: function (number) { - return Math.round(number * 10000000000) / 10000000000; - } -}; -/* EXPORT */ -exports.default = Lang; + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; /***/ }), -/***/ "./node_modules/khroma/dist/utils/unit.js": -/*!************************************************!*\ - !*** ./node_modules/khroma/dist/utils/unit.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_cacheHas.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_cacheHas.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} -/* UNIT */ -Object.defineProperty(exports, "__esModule", { value: true }); -var Unit = { - frac2hex: function (frac) { - var hex = Math.round(frac * 255).toString(16); - return hex.length > 1 ? hex : "0" + hex; - }, - dec2hex: function (dec) { - var hex = Math.round(dec).toString(16); - return hex.length > 1 ? hex : "0" + hex; - } -}; -/* EXPORT */ -exports.default = Unit; +module.exports = cacheHas; /***/ }), -/***/ "./node_modules/lodash/_DataView.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_DataView.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_castFunction.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_castFunction.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), - root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} -module.exports = DataView; +module.exports = castFunction; /***/ }), -/***/ "./node_modules/lodash/_Hash.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/_Hash.js ***! - \**************************************/ +/***/ "./node_modules/lodash/_castPath.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_castPath.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/lodash/_hashClear.js"), - hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/lodash/_hashDelete.js"), - hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/lodash/_hashGet.js"), - hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/lodash/_hashHas.js"), - hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/lodash/_hashSet.js"); +var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), + stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"), + toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); /** - * Creates a hash object. + * Casts `value` to a path array if it's not one. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); +function castPath(value, object) { + if (isArray(value)) { + return value; } + return isKey(value, object) ? [value] : stringToPath(toString(value)); } -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; +module.exports = castPath; /***/ }), -/***/ "./node_modules/lodash/_ListCache.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_ListCache.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_cloneArrayBuffer.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"), - listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"), - listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"), - listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"), - listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js"); +var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"); /** - * Creates an list cache object. + * Creates a clone of `arrayBuffer`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; } -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; +module.exports = cloneArrayBuffer; /***/ }), -/***/ "./node_modules/lodash/_Map.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/_Map.js ***! - \*************************************/ +/***/ "./node_modules/lodash/_cloneBuffer.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneBuffer.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), - root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -module.exports = Map; +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; -/***/ }), +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -/***/ "./node_modules/lodash/_MapCache.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_MapCache.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; -var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/lodash/_mapCacheClear.js"), - mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/lodash/_mapCacheDelete.js"), - mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/lodash/_mapCacheGet.js"), - mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/lodash/_mapCacheHas.js"), - mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/lodash/_mapCacheSet.js"); +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** - * Creates a map cache object to store key-value pairs. + * Creates a clone of `buffer`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); } -} + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; + buffer.copy(result); + return result; +} -module.exports = MapCache; +module.exports = cloneBuffer; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/lodash/_Promise.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_Promise.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/_cloneDataView.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_cloneDataView.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), - root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} -module.exports = Promise; +module.exports = cloneDataView; /***/ }), -/***/ "./node_modules/lodash/_Set.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/_Set.js ***! - \*************************************/ +/***/ "./node_modules/lodash/_cloneRegExp.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneRegExp.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), - root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} -module.exports = Set; +module.exports = cloneRegExp; /***/ }), -/***/ "./node_modules/lodash/_SetCache.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_SetCache.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_cloneSymbol.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_cloneSymbol.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"), - setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/lodash/_setCacheAdd.js"), - setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/lodash/_setCacheHas.js"); +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * - * Creates an array cache object to store unique values. + * Creates a clone of the `symbol` object. * * @private - * @constructor - * @param {Array} [values] The values to cache. + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -module.exports = SetCache; +module.exports = cloneSymbol; /***/ }), -/***/ "./node_modules/lodash/_Stack.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_Stack.js ***! - \***************************************/ +/***/ "./node_modules/lodash/_cloneTypedArray.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_cloneTypedArray.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), - stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/lodash/_stackClear.js"), - stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/lodash/_stackDelete.js"), - stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/lodash/_stackGet.js"), - stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/lodash/_stackHas.js"), - stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/lodash/_stackSet.js"); +var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); /** - * Creates a stack cache object to store key-value pairs. + * Creates a clone of `typedArray`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -module.exports = Stack; +module.exports = cloneTypedArray; /***/ }), -/***/ "./node_modules/lodash/_Symbol.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/_Symbol.js ***! - \****************************************/ +/***/ "./node_modules/lodash/_compareAscending.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/_compareAscending.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), +var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); -/***/ "./node_modules/lodash/_Uint8Array.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_Uint8Array.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} -module.exports = Uint8Array; +module.exports = compareAscending; /***/ }), -/***/ "./node_modules/lodash/_WeakMap.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_WeakMap.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/_compareMultiple.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_compareMultiple.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), - root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; - - -/***/ }), - -/***/ "./node_modules/lodash/_apply.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_apply.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +var compareAscending = __webpack_require__(/*! ./_compareAscending */ "./node_modules/lodash/_compareAscending.js"); /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. * * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } } - return func.apply(thisArg, args); + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; } -module.exports = apply; +module.exports = compareMultiple; /***/ }), -/***/ "./node_modules/lodash/_arrayEach.js": +/***/ "./node_modules/lodash/_copyArray.js": /*!*******************************************!*\ - !*** ./node_modules/lodash/_arrayEach.js ***! + !*** ./node_modules/lodash/_copyArray.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. + * Copies the values of `source` to `array`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ -function arrayEach(array, iteratee) { +function copyArray(source, array) { var index = -1, - length = array == null ? 0 : array.length; + length = source.length; + array || (array = Array(length)); while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } + array[index] = source[index]; } return array; } -module.exports = arrayEach; +module.exports = copyArray; /***/ }), -/***/ "./node_modules/lodash/_arrayFilter.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_arrayFilter.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_copyObject.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_copyObject.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"); /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * Copies properties of `source` to `object`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. */ -function arrayFilter(array, predicate) { +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + length = props.length; while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); } } - return result; + return object; } -module.exports = arrayFilter; +module.exports = copyObject; /***/ }), -/***/ "./node_modules/lodash/_arrayIncludes.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_arrayIncludes.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_copySymbols.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_copySymbols.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/lodash/_baseIndexOf.js"); +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"); /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. + * Copies own symbols of `source` to `object`. * * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); } -module.exports = arrayIncludes; +module.exports = copySymbols; /***/ }), -/***/ "./node_modules/lodash/_arrayIncludesWith.js": -/*!***************************************************!*\ - !*** ./node_modules/lodash/_arrayIncludesWith.js ***! - \***************************************************/ +/***/ "./node_modules/lodash/_copySymbolsIn.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_copySymbolsIn.js ***! + \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"); /** - * This function is like `arrayIncludes` except that it accepts a comparator. + * Copies own and inherited symbols of `source` to `object`. * * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); } -module.exports = arrayIncludesWith; +module.exports = copySymbolsIn; /***/ }), -/***/ "./node_modules/lodash/_arrayLikeKeys.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_arrayLikeKeys.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_coreJsData.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_coreJsData.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); +var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +module.exports = coreJsData; + + +/***/ }), + +/***/ "./node_modules/lodash/_createAssigner.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_createAssigner.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); /** - * Creates an array of the enumerable property names of the array-like `value`. + * Creates a function like `_.assign`. * * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; } - } - return result; + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } -module.exports = arrayLikeKeys; +module.exports = createAssigner; /***/ }), -/***/ "./node_modules/lodash/_arrayMap.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_arrayMap.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_createBaseEach.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_createBaseEach.js ***! + \************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. + * Creates a `baseEach` or `baseEachRight` function. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; } -module.exports = arrayMap; +module.exports = createBaseEach; /***/ }), -/***/ "./node_modules/lodash/_arrayPush.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_arrayPush.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_createBaseFor.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_createBaseFor.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * Appends the elements of `values` to `array`. + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; - while (++index < length) { - array[offset + index] = values[index]; - } - return array; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; } -module.exports = arrayPush; +module.exports = createBaseFor; /***/ }), -/***/ "./node_modules/lodash/_arrayReduce.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_arrayReduce.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_createFind.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_createFind.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. + * Creates a `_.find` or `_.findLast` function. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; } -module.exports = arrayReduce; +module.exports = createFind; /***/ }), -/***/ "./node_modules/lodash/_arraySome.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_arraySome.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_createRange.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_createRange.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseRange = __webpack_require__(/*! ./_baseRange */ "./node_modules/lodash/_baseRange.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), + toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. + * Creates a `_.range` or `_.rangeRight` function. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; } - } - return false; + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; } -module.exports = arraySome; +module.exports = createRange; /***/ }), -/***/ "./node_modules/lodash/_asciiSize.js": +/***/ "./node_modules/lodash/_createSet.js": /*!*******************************************!*\ - !*** ./node_modules/lodash/_asciiSize.js ***! + !*** ./node_modules/lodash/_createSet.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"); +var Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), + noop = __webpack_require__(/*! ./noop */ "./node_modules/lodash/noop.js"), + setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** - * Gets the size of an ASCII `string`. + * Creates a set object of `values`. * * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. */ -var asciiSize = baseProperty('length'); +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; -module.exports = asciiSize; +module.exports = createSet; /***/ }), -/***/ "./node_modules/lodash/_assignMergeValue.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_assignMergeValue.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_defineProperty.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_defineProperty.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); -module.exports = assignMergeValue; +module.exports = defineProperty; /***/ }), -/***/ "./node_modules/lodash/_assignValue.js": +/***/ "./node_modules/lodash/_equalArrays.js": /*!*********************************************!*\ - !*** ./node_modules/lodash/_assignValue.js ***! + !*** ./node_modules/lodash/_equalArrays.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), + arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/lodash/_arraySome.js"), + cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignValue; +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; -/***/ }), - -/***/ "./node_modules/lodash/_assocIndexOf.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_assocIndexOf.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + stack.set(array, other); + stack.set(other, array); -var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; } } - return -1; + stack['delete'](array); + stack['delete'](other); + return result; } -module.exports = assocIndexOf; +module.exports = equalArrays; /***/ }), -/***/ "./node_modules/lodash/_baseAssign.js": +/***/ "./node_modules/lodash/_equalByTag.js": /*!********************************************!*\ - !*** ./node_modules/lodash/_baseAssign.js ***! + !*** ./node_modules/lodash/_equalByTag.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -module.exports = baseAssign; +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), + Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"), + eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), + equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), + mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"), + setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -/***/ }), +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; -/***/ "./node_modules/lodash/_baseAssignIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseAssignIn.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; -module.exports = baseAssignIn; + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); -/***/ }), + case errorTag: + return object.name == other.name && object.message == other.message; -/***/ "./node_modules/lodash/_baseAssignValue.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_baseAssignValue.js ***! - \*************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); -var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"); + case mapTag: + var convert = mapToArray; -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } } + return false; } -module.exports = baseAssignValue; +module.exports = equalByTag; /***/ }), -/***/ "./node_modules/lodash/_baseClone.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseClone.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_equalObjects.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_equalObjects.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), - assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - baseAssign = __webpack_require__(/*! ./_baseAssign */ "./node_modules/lodash/_baseAssign.js"), - baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "./node_modules/lodash/_baseAssignIn.js"), - cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), - copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), - copySymbols = __webpack_require__(/*! ./_copySymbols */ "./node_modules/lodash/_copySymbols.js"), - copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "./node_modules/lodash/_copySymbolsIn.js"), - getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"), - getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "./node_modules/lodash/_getAllKeysIn.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "./node_modules/lodash/_initCloneArray.js"), - initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "./node_modules/lodash/_initCloneByTag.js"), - initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isMap = __webpack_require__(/*! ./isMap */ "./node_modules/lodash/isMap.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isSet = __webpack_require__(/*! ./isSet */ "./node_modules/lodash/isSet.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; +var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); + if (objLength != othLength && !isPartial) { + return false; } - if (result !== undefined) { - return result; + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } } - if (!isObject(value)) { - return value; + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; + var result = true; + stack.set(object, other); + stack.set(other, object); - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; } + skipCtor || (skipCtor = key == 'constructor'); } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); + } + stack['delete'](object); + stack['delete'](other); return result; } -module.exports = baseClone; +module.exports = equalObjects; /***/ }), -/***/ "./node_modules/lodash/_baseCreate.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseCreate.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_flatRest.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_flatRest.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); - -/** Built-in value references. */ -var objectCreate = Object.create; +var flatten = __webpack_require__(/*! ./flatten */ "./node_modules/lodash/flatten.js"), + overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), + setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * A specialized version of `baseRest` which flattens the rest array. * * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} -module.exports = baseCreate; +module.exports = flatRest; /***/ }), -/***/ "./node_modules/lodash/_baseEach.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_baseEach.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_freeGlobal.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_freeGlobal.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), - createBaseEach = __webpack_require__(/*! ./_createBaseEach */ "./node_modules/lodash/_createBaseEach.js"); +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; +module.exports = freeGlobal; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/lodash/_baseExtremum.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseExtremum.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_getAllKeys.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getAllKeys.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); +var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), + getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. + * Creates an array of own enumerable property names and symbols of `object`. * * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } -module.exports = baseExtremum; +module.exports = getAllKeys; /***/ }), -/***/ "./node_modules/lodash/_baseFilter.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseFilter.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_getAllKeysIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getAllKeysIn.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"); +var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), + getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** - * The base implementation of `_.filter` without support for iteratee shorthands. + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. */ -function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); } -module.exports = baseFilter; +module.exports = getAllKeysIn; /***/ }), -/***/ "./node_modules/lodash/_baseFindIndex.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_baseFindIndex.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_getMapData.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getMapData.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/lodash/_isKeyable.js"); /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. + * Gets the data for `map`. * * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; } -module.exports = baseFindIndex; +module.exports = getMapData; /***/ }), -/***/ "./node_modules/lodash/_baseFlatten.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseFlatten.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_getMatchData.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getMatchData.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), - isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js"); +var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** - * The base implementation of `_.flatten` with support for restricting flattening. + * Gets the property names, values, and compare flags of `object`. * * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; +function getMatchData(object) { + var result = keys(object), + length = result.length; - predicate || (predicate = isFlattenable); - result || (result = []); + while (length--) { + var key = result[length], + value = object[key]; - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } + result[length] = [key, value, isStrictComparable(value)]; } return result; } -module.exports = baseFlatten; +module.exports = getMatchData; /***/ }), -/***/ "./node_modules/lodash/_baseFor.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_baseFor.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/_getNative.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getNative.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js"); +var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"), + getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js"); /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. + * Gets the native function at `key` of `object`. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. */ -var baseFor = createBaseFor(); +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} -module.exports = baseFor; +module.exports = getNative; /***/ }), -/***/ "./node_modules/lodash/_baseForOwn.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseForOwn.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_getPrototype.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getPrototype.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); -module.exports = baseForOwn; +module.exports = getPrototype; /***/ }), -/***/ "./node_modules/lodash/_baseGet.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_baseGet.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/_getRawTag.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getRawTag.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), - toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.get` without support for default values. + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. */ -function baseGet(object, path) { - path = castPath(path, object); +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; - var index = 0, - length = path.length; + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} - while (object != null && index < length) { - object = object[toKey(path[index++])]; + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } } - return (index && index == length) ? object : undefined; + return result; } -module.exports = baseGet; +module.exports = getRawTag; /***/ }), -/***/ "./node_modules/lodash/_baseGetAllKeys.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_baseGetAllKeys.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_getSymbols.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_getSymbols.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); +var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), + stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. + * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. + * @returns {Array} Returns the array of symbols. */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; -module.exports = baseGetAllKeys; +module.exports = getSymbols; /***/ }), -/***/ "./node_modules/lodash/_baseGetTag.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseGetTag.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_getSymbolsIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_getSymbolsIn.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), - getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"), - objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js"); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; +var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), + stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * The base implementation of `getTag` without fallbacks for buggy environments. + * Creates an array of the own and inherited enumerable symbols of `object`. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} + return result; +}; -module.exports = baseGetTag; +module.exports = getSymbolsIn; /***/ }), -/***/ "./node_modules/lodash/_baseGt.js": +/***/ "./node_modules/lodash/_getTag.js": /*!****************************************!*\ - !*** ./node_modules/lodash/_baseGt.js ***! + !*** ./node_modules/lodash/_getTag.js ***! \****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -module.exports = baseGt; - +/***/ (function(module, exports, __webpack_require__) { -/***/ }), +var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/lodash/_DataView.js"), + Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), + Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/lodash/_Promise.js"), + Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), + WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/lodash/_WeakMap.js"), + baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); -/***/ "./node_modules/lodash/_baseHas.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_baseHas.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var dataViewTag = '[object DataView]'; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); /** - * The base implementation of `_.has` without support for deep paths. + * Gets the `toStringTag` of `value`. * * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; } -module.exports = baseHas; +module.exports = getTag; /***/ }), -/***/ "./node_modules/lodash/_baseHasIn.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseHasIn.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_getValue.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_getValue.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * The base implementation of `_.hasIn` without support for deep paths. + * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ -function baseHasIn(object, key) { - return object != null && key in Object(object); +function getValue(object, key) { + return object == null ? undefined : object[key]; } -module.exports = baseHasIn; +module.exports = getValue; /***/ }), -/***/ "./node_modules/lodash/_baseIndexOf.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseIndexOf.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_hasPath.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hasPath.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), - baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/lodash/_baseIsNaN.js"), - strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/lodash/_strictIndexOf.js"); +var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), + isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), + toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * Checks if `path` exists on `object`. * * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); } -module.exports = baseIndexOf; +module.exports = hasPath; /***/ }), -/***/ "./node_modules/lodash/_baseIsArguments.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_baseIsArguments.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_hasUnicode.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_hasUnicode.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** - * The base implementation of `_.isArguments`. + * Checks if `string` contains Unicode symbols. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; +function hasUnicode(string) { + return reHasUnicode.test(string); } -module.exports = baseIsArguments; +module.exports = hasUnicode; /***/ }), -/***/ "./node_modules/lodash/_baseIsEqual.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseIsEqual.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_hashClear.js": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_hashClear.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/lodash/_baseIsEqualDeep.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. + * Removes all key-value entries from the hash. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @name clear + * @memberOf Hash */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; } -module.exports = baseIsEqual; +module.exports = hashClear; /***/ }), -/***/ "./node_modules/lodash/_baseIsEqualDeep.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_baseIsEqualDeep.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_hashDelete.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_hashDelete.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), - equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/lodash/_equalByTag.js"), - equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/lodash/_equalObjects.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/***/ (function(module, exports) { /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. + * Removes `key` and its value from the hash. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } -module.exports = baseIsEqualDeep; +module.exports = hashDelete; /***/ }), -/***/ "./node_modules/lodash/_baseIsMap.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseIsMap.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_hashGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashGet.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.isMap` without Node.js optimizations. + * Gets the hash value for `key`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; } -module.exports = baseIsMap; +module.exports = hashGet; /***/ }), -/***/ "./node_modules/lodash/_baseIsMatch.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseIsMatch.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_hashHas.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashHas.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -module.exports = baseIsMatch; - +var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); -/***/ }), +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ "./node_modules/lodash/_baseIsNaN.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseIsNaN.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.isNaN` without support for number objects. + * Checks if a hash value for `key` exists. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function baseIsNaN(value) { - return value !== value; +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } -module.exports = baseIsNaN; +module.exports = hashHas; /***/ }), -/***/ "./node_modules/lodash/_baseIsNative.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseIsNative.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_hashSet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashSet.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** - * The base implementation of `_.isNative` without bad shim checks. + * Sets the hash `key` to `value`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } -module.exports = baseIsNative; +module.exports = hashSet; /***/ }), -/***/ "./node_modules/lodash/_baseIsSet.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseIsSet.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_initCloneArray.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneArray.js ***! + \************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/** `Object#toString` result references. */ -var setTag = '[object Set]'; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.isSet` without Node.js optimizations. + * Initializes an array clone. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; } -module.exports = baseIsSet; +module.exports = initCloneArray; /***/ }), -/***/ "./node_modules/lodash/_baseIsTypedArray.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_baseIsTypedArray.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_initCloneByTag.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_initCloneByTag.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"), + cloneDataView = __webpack_require__(/*! ./_cloneDataView */ "./node_modules/lodash/_cloneDataView.js"), + cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/lodash/_cloneRegExp.js"), + cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ "./node_modules/lodash/_cloneSymbol.js"), + cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"); /** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', +var boolTag = '[object Boolean]', dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', - objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; + symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', @@ -50458,2416 +47771,2302 @@ var arrayBufferTag = '[object ArrayBuffer]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); -module.exports = baseIsTypedArray; + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); -/***/ }), + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); -/***/ "./node_modules/lodash/_baseIteratee.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseIteratee.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + case mapTag: + return new Ctor; -var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/lodash/_baseMatches.js"), - baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/lodash/_baseMatchesProperty.js"), - identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - property = __webpack_require__(/*! ./property */ "./node_modules/lodash/property.js"); + case numberTag: + case stringTag: + return new Ctor(object); -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); } - return property(value); } -module.exports = baseIteratee; +module.exports = initCloneByTag; /***/ }), -/***/ "./node_modules/lodash/_baseKeys.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_baseKeys.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_initCloneObject.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_initCloneObject.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), - nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/lodash/_nativeKeys.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"); /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * Initializes an object clone. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; } -module.exports = baseKeys; +module.exports = initCloneObject; /***/ }), -/***/ "./node_modules/lodash/_baseKeysIn.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseKeysIn.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_isFlattenable.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_isFlattenable.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), - nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; - - -/***/ }), +var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); -/***/ "./node_modules/lodash/_baseLt.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/_baseLt.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** - * The base implementation of `_.lt` which doesn't coerce arguments. + * Checks if `value` is a flattenable `arguments` object or array. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ -function baseLt(value, other) { - return value < other; +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } -module.exports = baseLt; +module.exports = isFlattenable; /***/ }), -/***/ "./node_modules/lodash/_baseMap.js": +/***/ "./node_modules/lodash/_isIndex.js": /*!*****************************************!*\ - !*** ./node_modules/lodash/_baseMap.js ***! + !*** ./node_modules/lodash/_isIndex.js ***! \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; /** - * The base implementation of `_.map` without support for iteratee shorthands. + * Checks if `value` is a valid array-like index. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } -module.exports = baseMap; +module.exports = isIndex; /***/ }), -/***/ "./node_modules/lodash/_baseMatches.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_baseMatches.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_isIterateeCall.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_isIterateeCall.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/lodash/_baseIsMatch.js"), - getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/lodash/_getMatchData.js"), - matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"); +var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** - * The base implementation of `_.matches` which doesn't clone `source`. + * Checks if the given arguments are from an iteratee call. * * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } -module.exports = baseMatches; +module.exports = isIterateeCall; /***/ }), -/***/ "./node_modules/lodash/_baseMatchesProperty.js": -/*!*****************************************************!*\ - !*** ./node_modules/lodash/_baseMatchesProperty.js ***! - \*****************************************************/ +/***/ "./node_modules/lodash/_isKey.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_isKey.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"), - get = __webpack_require__(/*! ./get */ "./node_modules/lodash/get.js"), - hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"), - isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), - isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), - matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"), - toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); +var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * Checks if `value` is a property name and not a property path. * * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); +function isKey(value, object) { + if (isArray(value)) { + return false; } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } -module.exports = baseMatchesProperty; +module.exports = isKey; /***/ }), -/***/ "./node_modules/lodash/_baseMerge.js": +/***/ "./node_modules/lodash/_isKeyable.js": /*!*******************************************!*\ - !*** ./node_modules/lodash/_baseMerge.js ***! + !*** ./node_modules/lodash/_isKeyable.js ***! \*******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), - assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), - baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), - baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"), - safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"); +/***/ (function(module, exports) { /** - * The base implementation of `_.merge` without support for multiple sources. + * Checks if `value` is suitable for use as unique object key. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } -module.exports = baseMerge; +module.exports = isKeyable; /***/ }), -/***/ "./node_modules/lodash/_baseMergeDeep.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_baseMergeDeep.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_isMasked.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_isMasked.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), - cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), - cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"), - copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), - initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"), - safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"), - toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js"); +var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js"); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. + * Checks if `func` has its source masked. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } -module.exports = baseMergeDeep; +module.exports = isMasked; /***/ }), -/***/ "./node_modules/lodash/_baseOrderBy.js": +/***/ "./node_modules/lodash/_isPrototype.js": /*!*********************************************!*\ - !*** ./node_modules/lodash/_baseOrderBy.js ***! + !*** ./node_modules/lodash/_isPrototype.js ***! \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), - baseSortBy = __webpack_require__(/*! ./_baseSortBy */ "./node_modules/lodash/_baseSortBy.js"), - baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), - compareMultiple = __webpack_require__(/*! ./_compareMultiple */ "./node_modules/lodash/_compareMultiple.js"), - identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); +/** Used for built-in method references. */ +var objectProto = Object.prototype; /** - * The base implementation of `_.orderBy` without param guards. + * Checks if `value` is likely a prototype object. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ -function baseOrderBy(collection, iteratees, orders) { - var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); + return value === proto; } -module.exports = baseOrderBy; +module.exports = isPrototype; /***/ }), -/***/ "./node_modules/lodash/_basePick.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_basePick.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_isStrictComparable.js": +/*!****************************************************!*\ + !*** ./node_modules/lodash/_isStrictComparable.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var basePickBy = __webpack_require__(/*! ./_basePickBy */ "./node_modules/lodash/_basePickBy.js"), - hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"); +var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** - * The base implementation of `_.pick` without support for individual - * property identifiers. + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} +function isStrictComparable(value) { + return value === value && !isObject(value); +} -module.exports = basePick; +module.exports = isStrictComparable; /***/ }), -/***/ "./node_modules/lodash/_basePickBy.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_basePickBy.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_listCacheClear.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_listCacheClear.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + + +/***/ }), + +/***/ "./node_modules/lodash/_listCacheDelete.js": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_listCacheDelete.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"), - baseSet = __webpack_require__(/*! ./_baseSet */ "./node_modules/lodash/_baseSet.js"), - castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"); +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. + * Removes `key` and its value from the list cache. * * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } + if (index < 0) { + return false; } - return result; + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; } -module.exports = basePickBy; +module.exports = listCacheDelete; /***/ }), -/***/ "./node_modules/lodash/_baseProperty.js": +/***/ "./node_modules/lodash/_listCacheGet.js": /*!**********************************************!*\ - !*** ./node_modules/lodash/_baseProperty.js ***! + !*** ./node_modules/lodash/_listCacheGet.js ***! \**********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** - * The base implementation of `_.property` without support for deep paths. + * Gets the list cache value for `key`. * * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; } -module.exports = baseProperty; +module.exports = listCacheGet; /***/ }), -/***/ "./node_modules/lodash/_basePropertyDeep.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_basePropertyDeep.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_listCacheHas.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheHas.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** - * A specialized version of `baseProperty` which supports deep paths. + * Checks if a list cache value for `key` exists. * * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } -module.exports = basePropertyDeep; +module.exports = listCacheHas; /***/ }), -/***/ "./node_modules/lodash/_baseRange.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseRange.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_listCacheSet.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheSet.js ***! + \**********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. + * Sets the list cache `key` to `value`. * * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - return result; + return this; } -module.exports = baseRange; +module.exports = listCacheSet; /***/ }), -/***/ "./node_modules/lodash/_baseReduce.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseReduce.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_mapCacheClear.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_mapCacheClear.js ***! + \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/lodash/_Hash.js"), + ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), + Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"); /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * Removes all key-value entries from the map. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. + * @name clear + * @memberOf MapCache */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; } -module.exports = baseReduce; +module.exports = mapCacheClear; /***/ }), -/***/ "./node_modules/lodash/_baseRest.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_baseRest.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_mapCacheDelete.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_mapCacheDelete.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), - overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), - setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); +var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * Removes `key` and its value from the map. * * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } -module.exports = baseRest; +module.exports = mapCacheDelete; /***/ }), -/***/ "./node_modules/lodash/_baseSet.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_baseSet.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/_mapCacheGet.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheGet.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), - isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); +var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** - * The base implementation of `_.set`. + * Gets the map value for `key`. * * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; +function mapCacheGet(key) { + return getMapData(this, key).get(key); } -module.exports = baseSet; +module.exports = mapCacheGet; /***/ }), -/***/ "./node_modules/lodash/_baseSetToString.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_baseSetToString.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_mapCacheHas.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheHas.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"), - defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"), - identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); +var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** - * The base implementation of `setToString` without support for hot loop shorting. + * Checks if a map value for `key` exists. * * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} -module.exports = baseSetToString; +module.exports = mapCacheHas; /***/ }), -/***/ "./node_modules/lodash/_baseSortBy.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_baseSortBy.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_mapCacheSet.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheSet.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. + * Sets the map `key` to `value`. * * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. */ -function baseSortBy(array, comparer) { - var length = array.length; +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; } -module.exports = baseSortBy; +module.exports = mapCacheSet; /***/ }), -/***/ "./node_modules/lodash/_baseTimes.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseTimes.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_mapToArray.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_mapToArray.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. + * Converts `map` to its key-value pairs. * * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. */ -function baseTimes(n, iteratee) { +function mapToArray(map) { var index = -1, - result = Array(n); + result = Array(map.size); - while (++index < n) { - result[index] = iteratee(index); - } + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); return result; } -module.exports = baseTimes; +module.exports = mapToArray; /***/ }), -/***/ "./node_modules/lodash/_baseToString.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_baseToString.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_matchesStrictComparable.js": +/*!*********************************************************!*\ + !*** ./node_modules/lodash/_matchesStrictComparable.js ***! + \*********************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), - arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +/***/ (function(module, exports) { /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. * * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; } -module.exports = baseToString; +module.exports = matchesStrictComparable; /***/ }), -/***/ "./node_modules/lodash/_baseUnary.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_baseUnary.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_memoizeCapped.js": +/*!***********************************************!*\ + !*** ./node_modules/lodash/_memoizeCapped.js ***! + \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/lodash/memoize.js"); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; /** - * The base implementation of `_.unary` without support for storing metadata. + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. */ -function baseUnary(func) { - return function(value) { - return func(value); - }; +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; } -module.exports = baseUnary; +module.exports = memoizeCapped; /***/ }), -/***/ "./node_modules/lodash/_baseUniq.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_baseUniq.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), - arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/lodash/_arrayIncludes.js"), - arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/lodash/_arrayIncludesWith.js"), - cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"), - createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/lodash/_createSet.js"), - setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; +/***/ "./node_modules/lodash/_nativeCreate.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_nativeCreate.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; +var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); -module.exports = baseUniq; +module.exports = nativeCreate; /***/ }), -/***/ "./node_modules/lodash/_baseValues.js": +/***/ "./node_modules/lodash/_nativeKeys.js": /*!********************************************!*\ - !*** ./node_modules/lodash/_baseValues.js ***! + !*** ./node_modules/lodash/_nativeKeys.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"); +var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); -module.exports = baseValues; +module.exports = nativeKeys; /***/ }), -/***/ "./node_modules/lodash/_baseZipObject.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_baseZipObject.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_nativeKeysIn.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_nativeKeysIn.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } } return result; } -module.exports = baseZipObject; +module.exports = nativeKeysIn; /***/ }), -/***/ "./node_modules/lodash/_cacheHas.js": +/***/ "./node_modules/lodash/_nodeUtil.js": /*!******************************************!*\ - !*** ./node_modules/lodash/_cacheHas.js ***! + !*** ./node_modules/lodash/_nodeUtil.js ***! \******************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); -module.exports = cacheHas; +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/lodash/_castFunction.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_castFunction.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/_objectToString.js": +/*!************************************************!*\ + !*** ./node_modules/lodash/_objectToString.js ***! + \************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); +/** Used for built-in method references. */ +var objectProto = Object.prototype; /** - * Casts `value` to `identity` if it's not a function. + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; +function objectToString(value) { + return nativeObjectToString.call(value); } -module.exports = castFunction; +module.exports = objectToString; /***/ }), -/***/ "./node_modules/lodash/_castPath.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_castPath.js ***! - \******************************************/ +/***/ "./node_modules/lodash/_overArg.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_overArg.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), - stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"), - toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); +/***/ (function(module, exports) { /** - * Casts `value` to a path array if it's not one. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } -module.exports = castPath; +module.exports = overArg; /***/ }), -/***/ "./node_modules/lodash/_cloneArrayBuffer.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_overRest.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_overRest.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"); +var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** - * Creates a clone of `arrayBuffer`. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; } -module.exports = cloneArrayBuffer; +module.exports = overRest; /***/ }), -/***/ "./node_modules/lodash/_cloneBuffer.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_cloneBuffer.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_root.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/_root.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +module.exports = root; -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/***/ }), + +/***/ "./node_modules/lodash/_safeGet.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_safeGet.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { /** - * Creates a clone of `buffer`. + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - buffer.copy(result); - return result; + if (key == '__proto__') { + return; + } + + return object[key]; } -module.exports = cloneBuffer; +module.exports = safeGet; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/lodash/_cloneDataView.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_cloneDataView.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_setCacheAdd.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setCacheAdd.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** - * Creates a clone of `dataView`. + * Adds `value` to the array cache. * * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } -module.exports = cloneDataView; +module.exports = setCacheAdd; /***/ }), -/***/ "./node_modules/lodash/_cloneRegExp.js": +/***/ "./node_modules/lodash/_setCacheHas.js": /*!*********************************************!*\ - !*** ./node_modules/lodash/_cloneRegExp.js ***! + !*** ./node_modules/lodash/_setCacheHas.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - /** - * Creates a clone of `regexp`. + * Checks if `value` is in the array cache. * * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; +function setCacheHas(value) { + return this.__data__.has(value); } -module.exports = cloneRegExp; +module.exports = setCacheHas; /***/ }), -/***/ "./node_modules/lodash/_cloneSymbol.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_cloneSymbol.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_setToArray.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_setToArray.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; +/***/ (function(module, exports) { /** - * Creates a clone of the `symbol` object. + * Converts `set` to an array of its values. * * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; } -module.exports = cloneSymbol; +module.exports = setToArray; /***/ }), -/***/ "./node_modules/lodash/_cloneTypedArray.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_cloneTypedArray.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_setToString.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setToString.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); +var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"), + shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js"); /** - * Creates a clone of `typedArray`. + * Sets the `toString` method of `func` to return `string`. * * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} +var setToString = shortOut(baseSetToString); -module.exports = cloneTypedArray; +module.exports = setToString; /***/ }), -/***/ "./node_modules/lodash/_compareAscending.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/_compareAscending.js ***! - \**************************************************/ +/***/ "./node_modules/lodash/_shortOut.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_shortOut.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; /** - * Compares values to sort them in ascending order. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); +function shortOut(func) { + var count = 0, + lastCalled = 0; - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; } - } - return 0; + return func.apply(undefined, arguments); + }; } -module.exports = compareAscending; +module.exports = shortOut; /***/ }), -/***/ "./node_modules/lodash/_compareMultiple.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_compareMultiple.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/_stackClear.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/_stackClear.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var compareAscending = __webpack_require__(/*! ./_compareAscending */ "./node_modules/lodash/_compareAscending.js"); +var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"); /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. + * Removes all key-value entries from the stack. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. + * @name clear + * @memberOf Stack */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; } -module.exports = compareMultiple; +module.exports = stackClear; /***/ }), -/***/ "./node_modules/lodash/_copyArray.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_copyArray.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/_stackDelete.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_stackDelete.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { /** - * Copies the values of `source` to `array`. + * Removes `key` and its value from the stack. * * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function copyArray(source, array) { - var index = -1, - length = source.length; +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; + this.size = data.size; + return result; } -module.exports = copyArray; +module.exports = stackDelete; /***/ }), -/***/ "./node_modules/lodash/_copyObject.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_copyObject.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_stackGet.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackGet.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"); +/***/ (function(module, exports) { /** - * Copies properties of `source` to `object`. + * Gets the stack value for `key`. * * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); +function stackGet(key) { + return this.__data__.get(key); +} - var index = -1, - length = props.length; +module.exports = stackGet; - while (++index < length) { - var key = props[index]; - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; +/***/ }), - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; +/***/ "./node_modules/lodash/_stackHas.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackHas.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); } -module.exports = copyObject; +module.exports = stackHas; /***/ }), -/***/ "./node_modules/lodash/_copySymbols.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_copySymbols.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/_stackSet.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackSet.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"); +var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), + Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), + MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; /** - * Copies own symbols of `source` to `object`. + * Sets the stack `key` to `value`. * * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; } -module.exports = copySymbols; +module.exports = stackSet; /***/ }), -/***/ "./node_modules/lodash/_copySymbolsIn.js": +/***/ "./node_modules/lodash/_strictIndexOf.js": /*!***********************************************!*\ - !*** ./node_modules/lodash/_copySymbolsIn.js ***! + !*** ./node_modules/lodash/_strictIndexOf.js ***! \***********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"); +/***/ (function(module, exports) { /** - * Copies own and inherited symbols of `source` to `object`. + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. * * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; } -module.exports = copySymbolsIn; +module.exports = strictIndexOf; /***/ }), -/***/ "./node_modules/lodash/_coreJsData.js": +/***/ "./node_modules/lodash/_stringSize.js": /*!********************************************!*\ - !*** ./node_modules/lodash/_coreJsData.js ***! + !*** ./node_modules/lodash/_stringSize.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); +var asciiSize = __webpack_require__(/*! ./_asciiSize */ "./node_modules/lodash/_asciiSize.js"), + hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "./node_modules/lodash/_hasUnicode.js"), + unicodeSize = __webpack_require__(/*! ./_unicodeSize */ "./node_modules/lodash/_unicodeSize.js"); -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} -module.exports = coreJsData; +module.exports = stringSize; /***/ }), -/***/ "./node_modules/lodash/_createAssigner.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_createAssigner.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_stringToPath.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_stringToPath.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); +var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/lodash/_memoizeCapped.js"); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** - * Creates a function like `_.assign`. + * Converts `string` to a property path array. * * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); -} + return result; +}); -module.exports = createAssigner; +module.exports = stringToPath; /***/ }), -/***/ "./node_modules/lodash/_createBaseEach.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_createBaseEach.js ***! - \************************************************/ +/***/ "./node_modules/lodash/_toKey.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/_toKey.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); +var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** - * Creates a `baseEach` or `baseEachRight` function. + * Converts `value` to a string key if it's not a string or symbol. * * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -module.exports = createBaseEach; +module.exports = toKey; /***/ }), -/***/ "./node_modules/lodash/_createBaseFor.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_createBaseFor.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/_toSource.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/_toSource.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports) { +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * Converts `func` to its source code. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; } -module.exports = createBaseFor; +module.exports = toSource; /***/ }), -/***/ "./node_modules/lodash/_createFind.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_createFind.js ***! - \********************************************/ +/***/ "./node_modules/lodash/_unicodeSize.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_unicodeSize.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** - * Creates a `_.find` or `_.findLast` function. + * Gets the size of a Unicode `string`. * * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. + * @param {string} string The string inspect. + * @returns {number} Returns the string size. */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; } -module.exports = createFind; +module.exports = unicodeSize; /***/ }), -/***/ "./node_modules/lodash/_createRange.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_createRange.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/clone.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/clone.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseRange = __webpack_require__(/*! ./_baseRange */ "./node_modules/lodash/_baseRange.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), - toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); +var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; /** - * Creates a `_.range` or `_.rangeRight` function. + * Creates a shallow clone of `value`. * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); } -module.exports = createRange; +module.exports = clone; /***/ }), -/***/ "./node_modules/lodash/_createSet.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_createSet.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/cloneDeep.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/cloneDeep.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), - noop = __webpack_require__(/*! ./noop */ "./node_modules/lodash/noop.js"), - setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); +var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; /** - * Creates a set object of `values`. + * This method is like `_.clone` except that it recursively clones `value`. * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} -module.exports = createSet; +module.exports = cloneDeep; /***/ }), -/***/ "./node_modules/lodash/_defineProperty.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_defineProperty.js ***! - \************************************************/ +/***/ "./node_modules/lodash/constant.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/constant.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); +/***/ (function(module, exports) { -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} -module.exports = defineProperty; +module.exports = constant; /***/ }), -/***/ "./node_modules/lodash/_equalArrays.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_equalArrays.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/defaults.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/defaults.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), - arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/lodash/_arraySome.js"), - cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"); +var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; +var defaults = baseRest(function(object, sources) { + object = Object(object); - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - stack.set(array, other); - stack.set(other, array); + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; } } - stack['delete'](array); - stack['delete'](other); - return result; -} -module.exports = equalArrays; + return object; +}); + +module.exports = defaults; /***/ }), -/***/ "./node_modules/lodash/_equalByTag.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_equalByTag.js ***! - \********************************************/ +/***/ "./node_modules/lodash/each.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/each.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), - Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), - equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), - mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"), - setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +module.exports = __webpack_require__(/*! ./forEach */ "./node_modules/lodash/forEach.js"); -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; +/***/ }), -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; +/***/ "./node_modules/lodash/eq.js": +/*!***********************************!*\ + !*** ./node_modules/lodash/eq.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; +function eq(value, other) { + return value === other || (value !== value && other !== other); +} - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); +module.exports = eq; - case mapTag: - var convert = mapToArray; - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); +/***/ }), - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; +/***/ "./node_modules/lodash/filter.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/filter.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; +var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), + baseFilter = __webpack_require__(/*! ./_baseFilter */ "./node_modules/lodash/_baseFilter.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); } -module.exports = equalByTag; +module.exports = filter; /***/ }), -/***/ "./node_modules/lodash/_equalObjects.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_equalObjects.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/find.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/find.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var createFind = __webpack_require__(/*! ./_createFind */ "./node_modules/lodash/_createFind.js"), + findIndex = __webpack_require__(/*! ./findIndex */ "./node_modules/lodash/findIndex.js"); /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); -module.exports = equalObjects; +module.exports = find; /***/ }), -/***/ "./node_modules/lodash/_flatRest.js": +/***/ "./node_modules/lodash/findIndex.js": /*!******************************************!*\ - !*** ./node_modules/lodash/_flatRest.js ***! + !*** ./node_modules/lodash/findIndex.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var flatten = __webpack_require__(/*! ./flatten */ "./node_modules/lodash/flatten.js"), - overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), - setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); +var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + toInteger = __webpack_require__(/*! ./toInteger */ "./node_modules/lodash/toInteger.js"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** - * A specialized version of `baseRest` which flattens the rest array. + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); } -module.exports = flatRest; +module.exports = findIndex; /***/ }), -/***/ "./node_modules/lodash/_freeGlobal.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_freeGlobal.js ***! - \********************************************/ +/***/ "./node_modules/lodash/flatten.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/flatten.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"); -module.exports = freeGlobal; +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), -/***/ "./node_modules/lodash/_getAllKeys.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_getAllKeys.js ***! - \********************************************/ +/***/ "./node_modules/lodash/forEach.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/forEach.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), - getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), + baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), + castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** - * Creates an array of own enumerable property names and symbols of `object`. + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); } -module.exports = getAllKeys; +module.exports = forEach; /***/ }), -/***/ "./node_modules/lodash/_getAllKeysIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getAllKeysIn.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/forIn.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/forIn.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), - getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"), +var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), + castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); } -module.exports = getAllKeysIn; +module.exports = forIn; /***/ }), -/***/ "./node_modules/lodash/_getMapData.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_getMapData.js ***! - \********************************************/ +/***/ "./node_modules/lodash/get.js": +/*!************************************!*\ + !*** ./node_modules/lodash/get.js ***! + \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/lodash/_isKeyable.js"); +var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); /** - * Gets the data for `map`. + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; } -module.exports = getMapData; +module.exports = get; /***/ }), -/***/ "./node_modules/lodash/_getMatchData.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getMatchData.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/has.js": +/*!************************************!*\ + !*** ./node_modules/lodash/has.js ***! + \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +var baseHas = __webpack_require__(/*! ./_baseHas */ "./node_modules/lodash/_baseHas.js"), + hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); /** - * Gets the property names, values, and compare flags of `object`. + * Checks if `path` is a direct property of `object`. * - * @private + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; +function has(object, path) { + return object != null && hasPath(object, path, baseHas); } -module.exports = getMatchData; +module.exports = has; /***/ }), -/***/ "./node_modules/lodash/_getNative.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_getNative.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/hasIn.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/hasIn.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"), - getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js"); +var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/lodash/_baseHasIn.js"), + hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); /** - * Gets the native function at `key` of `object`. + * Checks if `path` is a direct or inherited property of `object`. * - * @private + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); } -module.exports = getNative; +module.exports = hasIn; /***/ }), -/***/ "./node_modules/lodash/_getPrototype.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getPrototype.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/identity.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/identity.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); +/***/ (function(module, exports) { -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} -module.exports = getPrototype; +module.exports = identity; /***/ }), -/***/ "./node_modules/lodash/_getRawTag.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_getRawTag.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/isArguments.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArguments.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); +var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -52875,7878 +50074,8206 @@ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - /** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * Checks if `value` is likely an `arguments` object. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; +module.exports = isArguments; /***/ }), -/***/ "./node_modules/lodash/_getSymbols.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_getSymbols.js ***! - \********************************************/ +/***/ "./node_modules/lodash/isArray.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/isArray.js ***! + \****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), - stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; +/***/ (function(module, exports) { /** - * Creates an array of the own enumerable symbols of `object`. + * Checks if `value` is classified as an `Array` object. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; +var isArray = Array.isArray; -module.exports = getSymbols; +module.exports = isArray; /***/ }), -/***/ "./node_modules/lodash/_getSymbolsIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_getSymbolsIn.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/isArrayLike.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArrayLike.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), - stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; +var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"); /** - * Creates an array of the own and inherited enumerable symbols of `object`. + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} -module.exports = getSymbolsIn; +module.exports = isArrayLike; /***/ }), -/***/ "./node_modules/lodash/_getTag.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/_getTag.js ***! - \****************************************/ +/***/ "./node_modules/lodash/isArrayLikeObject.js": +/*!**************************************************!*\ + !*** ./node_modules/lodash/isArrayLikeObject.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/lodash/_DataView.js"), - Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), - Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/lodash/_Promise.js"), - Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), - WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/lodash/_WeakMap.js"), - baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; - -var dataViewTag = '[object DataView]'; - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); +var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** - * Gets the `toStringTag` of `value`. + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); } -module.exports = getTag; +module.exports = isArrayLikeObject; /***/ }), -/***/ "./node_modules/lodash/_getValue.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_getValue.js ***! - \******************************************/ +/***/ "./node_modules/lodash/isBuffer.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isBuffer.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"), + stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js"); -module.exports = getValue; +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -/***/ }), +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; -/***/ "./node_modules/lodash/_hasPath.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_hasPath.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; -var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), - isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), - toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** - * Checks if `path` exists on `object`. + * Checks if `value` is a buffer. * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} +var isBuffer = nativeIsBuffer || stubFalse; -module.exports = hasPath; +module.exports = isBuffer; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/lodash/_hasUnicode.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_hasUnicode.js ***! - \********************************************/ +/***/ "./node_modules/lodash/isEmpty.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/isEmpty.js ***! + \****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; +var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), + getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Checks if `string` contains Unicode symbols. + * Checks if `value` is an empty object, collection, map, or set. * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false */ -function hasUnicode(string) { - return reHasUnicode.test(string); +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } -module.exports = hasUnicode; +module.exports = isEmpty; /***/ }), -/***/ "./node_modules/lodash/_hashClear.js": +/***/ "./node_modules/lodash/isFunction.js": /*!*******************************************!*\ - !*** ./node_modules/lodash/_hashClear.js ***! + !*** ./node_modules/lodash/isFunction.js ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; /** - * Removes all key-value entries from the hash. + * Checks if `value` is classified as a `Function` object. * - * @private - * @name clear - * @memberOf Hash + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } -module.exports = hashClear; +module.exports = isFunction; /***/ }), -/***/ "./node_modules/lodash/_hashDelete.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_hashDelete.js ***! - \********************************************/ +/***/ "./node_modules/lodash/isLength.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isLength.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + /** - * Removes `key` and its value from the hash. + * Checks if `value` is a valid array-like length. * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } -module.exports = hashDelete; +module.exports = isLength; /***/ }), -/***/ "./node_modules/lodash/_hashGet.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_hashGet.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/isMap.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isMap.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); +var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ "./node_modules/lodash/_baseIsMap.js"), + baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), + nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; /** - * Gets the hash value for `key`. + * Checks if `value` is classified as a `Map` object. * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; -module.exports = hashGet; +module.exports = isMap; /***/ }), -/***/ "./node_modules/lodash/_hashHas.js": +/***/ "./node_modules/lodash/isObject.js": /*!*****************************************!*\ - !*** ./node_modules/lodash/_hashHas.js ***! + !*** ./node_modules/lodash/isObject.js ***! \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/***/ (function(module, exports) { /** - * Checks if a hash value for `key` exists. + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } -module.exports = hashHas; +module.exports = isObject; /***/ }), -/***/ "./node_modules/lodash/_hashSet.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_hashSet.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/isObjectLike.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isObjectLike.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/***/ (function(module, exports) { /** - * Sets the hash `key` to `value`. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; +function isObjectLike(value) { + return value != null && typeof value == 'object'; } -module.exports = hashSet; +module.exports = isObjectLike; /***/ }), -/***/ "./node_modules/lodash/_initCloneArray.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_initCloneArray.js ***! - \************************************************/ +/***/ "./node_modules/lodash/isPlainObject.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/isPlainObject.js ***! + \**********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; /** Used for built-in method references. */ -var objectProto = Object.prototype; +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + /** - * Initializes an array clone. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; } - return result; + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } -module.exports = initCloneArray; +module.exports = isPlainObject; /***/ }), -/***/ "./node_modules/lodash/_initCloneByTag.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_initCloneByTag.js ***! - \************************************************/ +/***/ "./node_modules/lodash/isSet.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/isSet.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"), - cloneDataView = __webpack_require__(/*! ./_cloneDataView */ "./node_modules/lodash/_cloneDataView.js"), - cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/lodash/_cloneRegExp.js"), - cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ "./node_modules/lodash/_cloneSymbol.js"), - cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; +var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ "./node_modules/lodash/_baseIsSet.js"), + baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), + nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; /** - * Initializes an object clone based on its `toStringTag`. + * Checks if `value` is classified as a `Set` object. * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } -} +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; -module.exports = initCloneByTag; +module.exports = isSet; /***/ }), -/***/ "./node_modules/lodash/_initCloneObject.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_initCloneObject.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/isString.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isString.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"); +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; /** - * Initializes an object clone. + * Checks if `value` is classified as a `String` primitive or object. * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } -module.exports = initCloneObject; +module.exports = isString; /***/ }), -/***/ "./node_modules/lodash/_isFlattenable.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_isFlattenable.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/isSymbol.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isSymbol.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); +var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; /** - * Checks if `value` is a flattenable `arguments` object or array. + * Checks if `value` is classified as a `Symbol` primitive or object. * - * @private + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); } -module.exports = isFlattenable; +module.exports = isSymbol; /***/ }), -/***/ "./node_modules/lodash/_isIndex.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/_isIndex.js ***! - \*****************************************/ +/***/ "./node_modules/lodash/isTypedArray.js": +/*!*********************************************!*\ + !*** ./node_modules/lodash/isTypedArray.js ***! + \*********************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"), + baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), + nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** - * Checks if `value` is a valid array-like index. + * Checks if `value` is classified as a typed array. * - * @private + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; -module.exports = isIndex; +module.exports = isTypedArray; /***/ }), -/***/ "./node_modules/lodash/_isIterateeCall.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_isIterateeCall.js ***! - \************************************************/ +/***/ "./node_modules/lodash/isUndefined.js": +/*!********************************************!*\ + !*** ./node_modules/lodash/isUndefined.js ***! + \********************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); +/***/ (function(module, exports) { /** - * Checks if the given arguments are from an iteratee call. + * Checks if `value` is `undefined`. * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; +function isUndefined(value) { + return value === undefined; } -module.exports = isIterateeCall; +module.exports = isUndefined; /***/ }), -/***/ "./node_modules/lodash/_isKey.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_isKey.js ***! - \***************************************/ +/***/ "./node_modules/lodash/keys.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/keys.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; +var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), + baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** - * Checks if `value` is a property name and not a property path. + * Creates an array of the own enumerable property names of `object`. * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } -module.exports = isKey; +module.exports = keys; /***/ }), -/***/ "./node_modules/lodash/_isKeyable.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/_isKeyable.js ***! - \*******************************************/ +/***/ "./node_modules/lodash/keysIn.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/keysIn.js ***! + \***************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), + baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** - * Checks if `value` is suitable for use as unique object key. + * Creates an array of the own and inherited enumerable property names of `object`. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } -module.exports = isKeyable; +module.exports = keysIn; /***/ }), -/***/ "./node_modules/lodash/_isMasked.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_isMasked.js ***! - \******************************************/ +/***/ "./node_modules/lodash/last.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/last.js ***! + \*************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js"); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); +/***/ (function(module, exports) { /** - * Checks if `func` has its source masked. + * Gets the last element of `array`. * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; } -module.exports = isMasked; +module.exports = last; /***/ }), -/***/ "./node_modules/lodash/_isPrototype.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_isPrototype.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/map.js": +/*!************************************!*\ + !*** ./node_modules/lodash/map.js ***! + \************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** - * Checks if `value` is likely a prototype object. + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); } -module.exports = isPrototype; +module.exports = map; /***/ }), -/***/ "./node_modules/lodash/_isStrictComparable.js": -/*!****************************************************!*\ - !*** ./node_modules/lodash/_isStrictComparable.js ***! - \****************************************************/ +/***/ "./node_modules/lodash/mapValues.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/mapValues.js ***! + \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); +var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), + baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"); /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ -function isStrictComparable(value) { - return value === value && !isObject(value); +function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; } -module.exports = isStrictComparable; +module.exports = mapValues; /***/ }), -/***/ "./node_modules/lodash/_listCacheClear.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_listCacheClear.js ***! - \************************************************/ +/***/ "./node_modules/lodash/max.js": +/*!************************************!*\ + !*** ./node_modules/lodash/max.js ***! + \************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), + baseGt = __webpack_require__(/*! ./_baseGt */ "./node_modules/lodash/_baseGt.js"), + identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** - * Removes all key-value entries from the list cache. + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. * - * @private - * @name clear - * @memberOf ListCache + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; +function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; } -module.exports = listCacheClear; +module.exports = max; /***/ }), -/***/ "./node_modules/lodash/_listCacheDelete.js": -/*!*************************************************!*\ - !*** ./node_modules/lodash/_listCacheDelete.js ***! - \*************************************************/ +/***/ "./node_modules/lodash/memoize.js": +/*!****************************************!*\ + !*** ./node_modules/lodash/memoize.js ***! + \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; +var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); -/** Built-in value references. */ -var splice = arrayProto.splice; +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; /** - * Removes `key` and its value from the list cache. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); } - --this.size; - return true; + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; } -module.exports = listCacheDelete; +// Expose `MapCache`. +memoize.Cache = MapCache; + +module.exports = memoize; /***/ }), -/***/ "./node_modules/lodash/_listCacheGet.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheGet.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/merge.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/merge.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); +var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), + createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"); /** - * Gets the list cache value for `key`. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); -module.exports = listCacheGet; +module.exports = merge; /***/ }), -/***/ "./node_modules/lodash/_listCacheHas.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheHas.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/min.js": +/*!************************************!*\ + !*** ./node_modules/lodash/min.js ***! + \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); +var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), + baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"), + identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** - * Checks if a list cache value for `key` exists. + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; +function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; } -module.exports = listCacheHas; +module.exports = min; /***/ }), -/***/ "./node_modules/lodash/_listCacheSet.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_listCacheSet.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/minBy.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/minBy.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); +var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"); /** - * Sets the list cache `key` to `value`. + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; +function minBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) + : undefined; } -module.exports = listCacheSet; +module.exports = minBy; /***/ }), -/***/ "./node_modules/lodash/_mapCacheClear.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_mapCacheClear.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/noop.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/noop.js ***! + \*************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/lodash/_Hash.js"), - ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), - Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"); +/***/ (function(module, exports) { /** - * Removes all key-value entries from the map. + * This method returns `undefined`. * - * @private - * @name clear - * @memberOf MapCache + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; +function noop() { + // No operation performed. } -module.exports = mapCacheClear; +module.exports = noop; /***/ }), -/***/ "./node_modules/lodash/_mapCacheDelete.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_mapCacheDelete.js ***! - \************************************************/ +/***/ "./node_modules/lodash/now.js": +/*!************************************!*\ + !*** ./node_modules/lodash/now.js ***! + \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); +var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** - * Removes `key` and its value from the map. + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} +var now = function() { + return root.Date.now(); +}; -module.exports = mapCacheDelete; +module.exports = now; /***/ }), -/***/ "./node_modules/lodash/_mapCacheGet.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_mapCacheGet.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/pick.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/pick.js ***! + \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); +var basePick = __webpack_require__(/*! ./_basePick */ "./node_modules/lodash/_basePick.js"), + flatRest = __webpack_require__(/*! ./_flatRest */ "./node_modules/lodash/_flatRest.js"); /** - * Gets the map value for `key`. + * Creates an object composed of the picked `object` properties. * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); +}); -module.exports = mapCacheGet; +module.exports = pick; /***/ }), -/***/ "./node_modules/lodash/_mapCacheHas.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_mapCacheHas.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/property.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/property.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); +var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"), + basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/lodash/_basePropertyDeep.js"), + isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), + toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** - * Checks if a map value for `key` exists. + * Creates a function that returns the value at `path` of a given object. * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); +function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } -module.exports = mapCacheHas; +module.exports = property; /***/ }), -/***/ "./node_modules/lodash/_mapCacheSet.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_mapCacheSet.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/range.js": +/*!**************************************!*\ + !*** ./node_modules/lodash/range.js ***! + \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); +var createRange = __webpack_require__(/*! ./_createRange */ "./node_modules/lodash/_createRange.js"); /** - * Sets the map `key` to `value`. + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} +var range = createRange(); -module.exports = mapCacheSet; +module.exports = range; /***/ }), -/***/ "./node_modules/lodash/_mapToArray.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_mapToArray.js ***! - \********************************************/ +/***/ "./node_modules/lodash/reduce.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/reduce.js ***! + \***************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var arrayReduce = __webpack_require__(/*! ./_arrayReduce */ "./node_modules/lodash/_arrayReduce.js"), + baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + baseReduce = __webpack_require__(/*! ./_baseReduce */ "./node_modules/lodash/_baseReduce.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** - * Converts `map` to its key-value pairs. + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); +function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; + return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); } -module.exports = mapToArray; +module.exports = reduce; /***/ }), -/***/ "./node_modules/lodash/_matchesStrictComparable.js": -/*!*********************************************************!*\ - !*** ./node_modules/lodash/_matchesStrictComparable.js ***! - \*********************************************************/ +/***/ "./node_modules/lodash/size.js": +/*!*************************************!*\ + !*** ./node_modules/lodash/size.js ***! + \*************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), + getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), + isString = __webpack_require__(/*! ./isString */ "./node_modules/lodash/isString.js"), + stringSize = __webpack_require__(/*! ./_stringSize */ "./node_modules/lodash/_stringSize.js"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; +function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; } -module.exports = matchesStrictComparable; +module.exports = size; /***/ }), -/***/ "./node_modules/lodash/_memoizeCapped.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_memoizeCapped.js ***! - \***********************************************/ +/***/ "./node_modules/lodash/sortBy.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/sortBy.js ***! + \***************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/lodash/memoize.js"); - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; +var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), + baseOrderBy = __webpack_require__(/*! ./_baseOrderBy */ "./node_modules/lodash/_baseOrderBy.js"), + baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); -module.exports = memoizeCapped; +module.exports = sortBy; /***/ }), -/***/ "./node_modules/lodash/_nativeCreate.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_nativeCreate.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/stubArray.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubArray.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); +/***/ (function(module, exports) { -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} -module.exports = nativeCreate; +module.exports = stubArray; /***/ }), -/***/ "./node_modules/lodash/_nativeKeys.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_nativeKeys.js ***! - \********************************************/ +/***/ "./node_modules/lodash/stubFalse.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubFalse.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); +/***/ (function(module, exports) { -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} -module.exports = nativeKeys; +module.exports = stubFalse; /***/ }), -/***/ "./node_modules/lodash/_nativeKeysIn.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_nativeKeysIn.js ***! - \**********************************************/ +/***/ "./node_modules/lodash/toFinite.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/toFinite.js ***! + \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. + * Converts `value` to a finite number. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; } - return result; + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; } -module.exports = nativeKeysIn; +module.exports = toFinite; /***/ }), -/***/ "./node_modules/lodash/_nodeUtil.js": +/***/ "./node_modules/lodash/toInteger.js": /*!******************************************!*\ - !*** ./node_modules/lodash/_nodeUtil.js ***! + !*** ./node_modules/lodash/toInteger.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); +var toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + return result === result ? (remainder ? result - remainder : result) : 0; +} -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +module.exports = toInteger; -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; +/***/ }), - if (types) { - return types; - } +/***/ "./node_modules/lodash/toNumber.js": +/*!*****************************************!*\ + !*** ./node_modules/lodash/toNumber.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); +var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); -module.exports = nodeUtil; +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; -/***/ }), +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -/***/ "./node_modules/lodash/_objectToString.js": -/*!************************************************!*\ - !*** ./node_modules/lodash/_objectToString.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 */ -var nativeObjectToString = objectProto.toString; +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = toNumber; + + +/***/ }), + +/***/ "./node_modules/lodash/toPlainObject.js": +/*!**********************************************!*\ + !*** ./node_modules/lodash/toPlainObject.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), + keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** - * Converts `value` to a string using `Object.prototype.toString`. + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * - * @private + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } */ -function objectToString(value) { - return nativeObjectToString.call(value); +function toPlainObject(value) { + return copyObject(value, keysIn(value)); } -module.exports = objectToString; +module.exports = toPlainObject; /***/ }), -/***/ "./node_modules/lodash/_overArg.js": +/***/ "./node_modules/lodash/toString.js": /*!*****************************************!*\ - !*** ./node_modules/lodash/_overArg.js ***! + !*** ./node_modules/lodash/toString.js ***! \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js"); /** - * Creates a unary function that invokes `func` with its argument transformed. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; +function toString(value) { + return value == null ? '' : baseToString(value); } -module.exports = overArg; +module.exports = toString; /***/ }), -/***/ "./node_modules/lodash/_overRest.js": +/***/ "./node_modules/lodash/transform.js": /*!******************************************!*\ - !*** ./node_modules/lodash/_overRest.js ***! + !*** ./node_modules/lodash/transform.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; +var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), + baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), + baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), + baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), + getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), + isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), + isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), + isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), + isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), + isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); /** - * A specialized version of `baseRest` which transforms the rest array. + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); +function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); - while (++index < length) { - array[index] = args[start + index]; + iteratee = baseIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; } -module.exports = overRest; +module.exports = transform; /***/ }), -/***/ "./node_modules/lodash/_root.js": +/***/ "./node_modules/lodash/union.js": /*!**************************************!*\ - !*** ./node_modules/lodash/_root.js ***! + !*** ./node_modules/lodash/union.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), + baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), + baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/lodash/_baseUniq.js"), + isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"); -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); +}); -module.exports = root; +module.exports = union; /***/ }), -/***/ "./node_modules/lodash/_safeGet.js": +/***/ "./node_modules/lodash/uniqueId.js": /*!*****************************************!*\ - !*** ./node_modules/lodash/_safeGet.js ***! + !*** ./node_modules/lodash/uniqueId.js ***! \*****************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); + +/** Used to generate unique IDs. */ +var idCounter = 0; /** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * Generates a unique ID. If `prefix` is given, the ID is appended to it. * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' */ -function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; - } - - return object[key]; +function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; } -module.exports = safeGet; +module.exports = uniqueId; /***/ }), -/***/ "./node_modules/lodash/_setCacheAdd.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_setCacheAdd.js ***! - \*********************************************/ +/***/ "./node_modules/lodash/values.js": +/*!***************************************!*\ + !*** ./node_modules/lodash/values.js ***! + \***************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var baseValues = __webpack_require__(/*! ./_baseValues */ "./node_modules/lodash/_baseValues.js"), + keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** - * Adds `value` to the array cache. + * Creates an array of the own enumerable string keyed property values of `object`. * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -module.exports = setCacheAdd; - - -/***/ }), - -/***/ "./node_modules/lodash/_setCacheHas.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_setCacheHas.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is in the array cache. + * **Note:** Non-object values are coerced to objects. * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] */ -function setCacheHas(value) { - return this.__data__.has(value); +function values(object) { + return object == null ? [] : baseValues(object, keys(object)); } -module.exports = setCacheHas; +module.exports = values; /***/ }), -/***/ "./node_modules/lodash/_setToArray.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_setToArray.js ***! - \********************************************/ +/***/ "./node_modules/lodash/zipObject.js": +/*!******************************************!*\ + !*** ./node_modules/lodash/zipObject.js ***! + \******************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), + baseZipObject = __webpack_require__(/*! ./_baseZipObject */ "./node_modules/lodash/_baseZipObject.js"); /** - * Converts `set` to an array of its values. + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; +function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); } -module.exports = setToArray; +module.exports = zipObject; /***/ }), -/***/ "./node_modules/lodash/_setToString.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_setToString.js ***! - \*********************************************/ +/***/ "./node_modules/mermaid/dist/mermaid.core.js": +/*!***************************************************!*\ + !*** ./node_modules/mermaid/dist/mermaid.core.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"), - shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js"); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; - - -/***/ }), +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else {} +})(typeof self !== "undefined" ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./src/mermaid.js"); +/******/ }) +/************************************************************************/ +/******/ ({ -/***/ "./node_modules/lodash/_shortOut.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_shortOut.js ***! - \******************************************/ +/***/ "./node_modules/node-libs-browser/mock/empty.js": +/*!******************************************************!*\ + !*** ./node_modules/node-libs-browser/mock/empty.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -module.exports = shortOut; /***/ }), -/***/ "./node_modules/lodash/_stackClear.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_stackClear.js ***! - \********************************************/ +/***/ "./node_modules/path-browserify/index.js": +/*!***********************************************!*\ + !*** ./node_modules/path-browserify/index.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"); +/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, +// backported and transplited with Babel, with backwards-compat fixes -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -module.exports = stackClear; +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } -/***/ }), + return parts; +} -/***/ "./node_modules/lodash/_stackDelete.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_stackDelete.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); - this.size = data.size; - return result; -} + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } -module.exports = stackDelete; + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) -/***/ }), + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); -/***/ "./node_modules/lodash/_stackGet.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_stackGet.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; -module.exports = stackGet; + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } -/***/ }), + return (isAbsolute ? '/' : '') + path; +}; -/***/ "./node_modules/lodash/_stackHas.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_stackHas.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; -module.exports = stackHas; +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); -/***/ }), + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } -/***/ "./node_modules/lodash/_stackSet.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_stackSet.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } -var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), - Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), - MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); + if (start > end) return []; + return arr.slice(start, end - start + 1); + } -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; } - data = this.__data__ = new MapCache(pairs); } - data.set(key, value); - this.size = data.size; - return this; -} -module.exports = stackSet; + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); -/***/ }), + return outputParts.join('/'); +}; -/***/ "./node_modules/lodash/_strictIndexOf.js": -/*!***********************************************!*\ - !*** ./node_modules/lodash/_strictIndexOf.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +exports.sep = '/'; +exports.delimiter = ':'; -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; +exports.dirname = function (path) { + if (typeof path !== 'string') path = path + ''; + if (path.length === 0) return '.'; + var code = path.charCodeAt(0); + var hasRoot = code === 47 /*/*/; + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47 /*/*/) { + if (!matchedSlash) { + end = i; + break; + } + } else { + // We saw the first non-path separator + matchedSlash = false; } } - return -1; -} - -module.exports = strictIndexOf; + if (end === -1) return hasRoot ? '/' : '.'; + if (hasRoot && end === 1) { + // return '//'; + // Backwards-compat fix: + return '/'; + } + return path.slice(0, end); +}; -/***/ }), +function basename(path) { + if (typeof path !== 'string') path = path + ''; -/***/ "./node_modules/lodash/_stringSize.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/_stringSize.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var start = 0; + var end = -1; + var matchedSlash = true; + var i; -var asciiSize = __webpack_require__(/*! ./_asciiSize */ "./node_modules/lodash/_asciiSize.js"), - hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "./node_modules/lodash/_hasUnicode.js"), - unicodeSize = __webpack_require__(/*! ./_unicodeSize */ "./node_modules/lodash/_unicodeSize.js"); + for (i = path.length - 1; i >= 0; --i) { + if (path.charCodeAt(i) === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + start = i + 1; + break; + } + } else if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // path component + matchedSlash = false; + end = i + 1; + } + } -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); + if (end === -1) return ''; + return path.slice(start, end); } -module.exports = stringSize; - - -/***/ }), - -/***/ "./node_modules/lodash/_stringToPath.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/_stringToPath.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/lodash/_memoizeCapped.js"); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); +// Uses a mixed approach for backwards-compatibility, as ext behavior changed +// in new Node.js versions, so only basename() above is backported here +exports.basename = function (path, ext) { + var f = basename(path); + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -module.exports = stringToPath; - - -/***/ }), - -/***/ "./node_modules/lodash/_toKey.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/_toKey.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); + return f; +}; -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +exports.extname = function (path) { + if (typeof path !== 'string') path = path + ''; + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + // Track the state of characters (if any) we see before our first dot and + // after any path separator we find + var preDotState = 0; + for (var i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47 /*/*/) { + // If we reached a path separator that was not part of a set of path + // separators at the end of the string, stop now + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + // We saw the first non-path separator, mark this as the end of our + // extension + matchedSlash = false; + end = i + 1; + } + if (code === 46 /*.*/) { + // If this is our first dot, mark it as the start of our extension + if (startDot === -1) + startDot = i; + else if (preDotState !== 1) + preDotState = 1; + } else if (startDot !== -1) { + // We saw a non-dot and non-path separator before our dot, so we should + // have a good chance at having a non-empty extension + preDotState = -1; + } + } -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; + if (startDot === -1 || end === -1 || + // We saw a non-dot character immediately before the dot + preDotState === 0 || + // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ''; } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return path.slice(startDot, end); +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; } -module.exports = toKey; +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), -/***/ "./node_modules/lodash/_toSource.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/_toSource.js ***! - \******************************************/ +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { -/** Used for built-in method references. */ -var funcProto = Function.prototype; +// shim for using process in browser +var process = module.exports = {}; -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { try { - return funcToString.call(func); - } catch (e) {} + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } -/***/ }), +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } -/***/ "./node_modules/lodash/_unicodeSize.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/_unicodeSize.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); } -module.exports = unicodeSize; - +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; -/***/ }), +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; -/***/ "./node_modules/lodash/clone.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/clone.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +function noop() {} -var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; +process.listeners = function (name) { return [] } -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; -module.exports = clone; +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; /***/ }), -/***/ "./node_modules/lodash/cloneDeep.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/cloneDeep.js ***! - \******************************************/ +/***/ "./node_modules/webpack/buildin/module.js": +/*!***********************************!*\ + !*** (webpack)/buildin/module.js ***! + \***********************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -module.exports = cloneDeep; +module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; /***/ }), -/***/ "./node_modules/lodash/constant.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/constant.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/***/ "./package.json": +/*!**********************!*\ + !*** ./package.json ***! + \**********************/ +/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, husky, default */function(e){e.exports=JSON.parse('{"name":"mermaid","version":"8.9.3","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^5.0.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},"./src/config.js": +/*!***********************!*\ + !*** ./src/config.js ***! + \***********************/ +/*! exports provided: defaultConfig, updateCurrentConfig, setSiteConfig, saveConfigFromInitilize, updateSiteConfig, getSiteConfig, setConfig, getConfig, sanitize, addDirective, reset */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultConfig", function() { return defaultConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateCurrentConfig", function() { return updateCurrentConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSiteConfig", function() { return setSiteConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveConfigFromInitilize", function() { return saveConfigFromInitilize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSiteConfig", function() { return updateSiteConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSiteConfig", function() { return getSiteConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitize", function() { return sanitize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDirective", function() { return addDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./src/utils.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); +/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js"); +/* harmony import */ var _defaultConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultConfig */ "./src/defaultConfig.js"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -module.exports = constant; -/***/ }), -/***/ "./node_modules/lodash/defaults.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/defaults.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // debugger; -var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +var defaultConfig = Object.freeze(_defaultConfig__WEBPACK_IMPORTED_MODULE_3__["default"]); +var siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); +var configFromInitialize; +var directives = []; +var currentConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); +var updateCurrentConfig = function updateCurrentConfig(siteCfg, _directives) { + // start with config beeing the siteConfig + var cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, siteCfg); // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta); + // Join directives -/** Used for built-in method references. */ -var objectProto = Object.prototype; + var sumOfDirectives = {}; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + for (var i = 0; i < _directives.length; i++) { + var d = _directives[i]; + sanitize(d); // Apply the data from the directive where the the overrides the themeVaraibles -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); + sumOfDirectives = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(sumOfDirectives, d); + } - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; + cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(cfg, sumOfDirectives); - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; + if (sumOfDirectives.theme) { + var tmpConfigFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, configFromInitialize); + var themeVariables = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(tmpConfigFromInitialize.themeVariables || {}, sumOfDirectives.themeVariables); + cfg.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__["default"][cfg.theme].getThemeVariables(themeVariables); } - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; + currentConfig = cfg; + return cfg; +}; +/** + *## setSiteConfig + *| Function | Description | Type | Values | + *| --------- | ------------------- | ------- | ------------------ | + *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array| + ***Notes:** + *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset + *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig + *to the defaultConfig + *Note: currentConfig is set in this function + **Default value: At default, will mirror Global Config** + * @param conf - the base currentConfig to use as siteConfig + * @returns {*} - the siteConfig + */ - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; +var setSiteConfig = function setSiteConfig(conf) { + siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); + siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(siteConfig, conf); - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } + if (conf.theme) { + siteConfig.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__["default"][conf.theme].getThemeVariables(conf.themeVariables); } - return object; -}); - -module.exports = defaults; + currentConfig = updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +var saveConfigFromInitilize = function saveConfigFromInitilize(conf) { + configFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, conf); +}; +var updateSiteConfig = function updateSiteConfig(conf) { + siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(siteConfig, conf); + updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +/** + *## getSiteConfig + *| Function | Description | Type | Values | + *| --------- | ------------------- | ------- | ------------------ | + *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig| + ***Notes**: + *Returns **any** values in siteConfig. + * @returns {*} + */ +var getSiteConfig = function getSiteConfig() { + return Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, siteConfig); +}; +/** + *## setConfig + *| Function | Description | Type | Values | + *| --------- | ------------------- | ------- | ------------------ | + *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array| + ***Notes**: + *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any + *values found in conf with key found in siteConfig.secure will be replaced with the corresponding + *siteConfig value. + * @param conf - the potential currentConfig + * @returns {*} - the currentConfig merged with the sanitized conf + */ -/***/ }), +var setConfig = function setConfig(conf) { + // sanitize(conf); + // Object.keys(conf).forEach(key => { + // const manipulator = manipulators[key]; + // conf[key] = manipulator ? manipulator(conf[key]) : conf[key]; + // }); + Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(currentConfig, conf); + return getConfig(); +}; +/** + * ## getConfig + *| Function | Description | Type | Return Values | + *| --------- | ------------------- | ------- | ------------------ | + *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig| + ***Notes**: + *Returns **any** the currentConfig + * @returns {*} - the currentConfig + */ -/***/ "./node_modules/lodash/each.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/each.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var getConfig = function getConfig() { + return Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, currentConfig); +}; +/** + *## sanitize + *| Function | Description | Type | Values | + *| --------- | ------------------- | ------- | ------------------ | + *| sanitize |Sets the siteConfig to desired values. | Put Request |None| + *Ensures options parameter does not attempt to override siteConfig secure keys + *Note: modifies options in-place + * @param options - the potential setConfig parameter + */ -module.exports = __webpack_require__(/*! ./forEach */ "./node_modules/lodash/forEach.js"); +var sanitize = function sanitize(options) { + // Checking that options are not in the list of excluded options + Object.keys(siteConfig.secure).forEach(function (key) { + if (typeof options[siteConfig.secure[key]] !== 'undefined') { + // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script + // can exploit the logger's attempt to stringify the value and execute arbitrary code + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug("Denied attempt to modify a secure key ".concat(siteConfig.secure[key]), options[siteConfig.secure[key]]); + delete options[siteConfig.secure[key]]; + } + }); // Check that there no attempts of prototype pollution + Object.keys(options).forEach(function (key) { + if (key.indexOf('__') === 0) { + delete options[key]; + } + }); // Check that there no attempts of xss, there should be no tags at all in the directive + // blocking data urls as base64 urls can contain svgs with inline script tags -/***/ }), + Object.keys(options).forEach(function (key) { + if (typeof options[key] === 'string') { + if (options[key].indexOf('<') > -1 || options[key].indexOf('>') > -1 || options[key].indexOf('url(data:') > -1) { + delete options[key]; + } + } -/***/ "./node_modules/lodash/eq.js": -/*!***********************************!*\ - !*** ./node_modules/lodash/eq.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + if (_typeof(options[key]) === 'object') { + sanitize(options[key]); + } + }); +}; +var addDirective = function addDirective(directive) { + if (directive.fontFamily) { + if (!directive.themeVariables) { + directive.themeVariables = { + fontFamily: directive.fontFamily + }; + } else { + if (!directive.themeVariables.fontFamily) { + directive.themeVariables = { + fontFamily: directive.fontFamily + }; + } + } + } + directives.push(directive); + updateCurrentConfig(siteConfig, directives); +}; /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true + *## reset + *| Function | Description | Type | Required | Values | + *| --------- | ------------------- | ------- | -------- | ------------------ | + *| reset|Resets currentConfig to conf| Put Request | Required | None| * - * _.eq('a', Object('a')); - * // => false + *| Parameter | Description |Type | Required | Values| + *| --- | --- | --- | --- | --- | + *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array| * - * _.eq(NaN, NaN); - * // => true + **Notes : + (default: current siteConfig ) (optional, default `getSiteConfig()`) + * @param conf the base currentConfig to reset to (default: current siteConfig ) (optional, default `getSiteConfig()`) */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; +var reset = function reset() { + // Replace current config with siteConfig + directives = []; + updateCurrentConfig(siteConfig, directives); +}; /***/ }), -/***/ "./node_modules/lodash/filter.js": +/***/ "./src/dagre-wrapper/clusters.js": /*!***************************************!*\ - !*** ./node_modules/lodash/filter.js ***! + !*** ./src/dagre-wrapper/clusters.js ***! \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), - baseFilter = __webpack_require__(/*! ./_baseFilter */ "./node_modules/lodash/_baseFilter.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); +/*! exports provided: insertCluster, getClusterTitleWidth, clear, positionCluster */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertCluster", function() { return insertCluster; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClusterTitleWidth", function() { return getClusterTitleWidth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionCluster", function() { return positionCluster; }); +/* harmony import */ var _intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect/intersect-rect */ "./src/dagre-wrapper/intersect/intersect-rect.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); +/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config */ "./src/config.js"); -module.exports = filter; -/***/ }), -/***/ "./node_modules/lodash/find.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/find.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -var createFind = __webpack_require__(/*! ./_createFind */ "./node_modules/lodash/_createFind.js"), - findIndex = __webpack_require__(/*! ./findIndex */ "./node_modules/lodash/findIndex.js"); -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = createFind(findIndex); +var rect = function rect(parent, node) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Creating subgraph rect for ', node.id, node); // Add outer g element -module.exports = find; + var shapeSvg = parent.insert('g').attr('class', 'cluster' + (node.class ? ' ' + node.class : '')).attr('id', node.id); // add the rect + var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect -/***/ }), + var label = shapeSvg.insert('g').attr('class', 'cluster-label'); + var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label -/***/ "./node_modules/lodash/findIndex.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/findIndex.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var bbox = text.getBBox(); -var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - toInteger = __webpack_require__(/*! ./toInteger */ "./node_modules/lodash/toInteger.js"); + if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { + var div = text.children[0]; + var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__["select"])(text); + bbox = div.getBoundingClientRect(); + dv.attr('width', bbox.width); + dv.attr('height', bbox.height); + } -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; + var padding = 0 * node.padding; + var halfPadding = padding / 2; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Data ', node, JSON.stringify(node)); // center the rect around its coordinate + + rect.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding); // Center the label + + label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 + node.padding / 3) + ')'); + var rectBox = rect.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + + node.intersect = function (point) { + return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); + }; + return shapeSvg; +}; /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 + * Non visiable cluster where the note is group with its */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); -} -module.exports = findIndex; +var noteGroup = function noteGroup(parent, node) { + // Add outer g element + var shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id); // add the rect -/***/ }), + var rect = shapeSvg.insert('rect', ':first-child'); + var padding = 0 * node.padding; + var halfPadding = padding / 2; // center the rect around its coordinate -/***/ "./node_modules/lodash/flatten.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/flatten.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding).attr('fill', 'none'); + var rectBox = rect.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; -var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"); + node.intersect = function (point) { + return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); + }; -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; -} + return shapeSvg; +}; -module.exports = flatten; +var roundedWithTitle = function roundedWithTitle(parent, node) { + // Add outer g element + var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect + var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect -/***/ }), + var label = shapeSvg.insert('g').attr('class', 'cluster-label'); + var innerRect = shapeSvg.append('rect'); + var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label -/***/ "./node_modules/lodash/forEach.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/forEach.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var bbox = text.getBBox(); -var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), - baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), - castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); + if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { + var div = text.children[0]; + var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__["select"])(text); + bbox = div.getBoundingClientRect(); + dv.attr('width', bbox.width); + dv.attr('height', bbox.height); + } -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} + bbox = text.getBBox(); + var padding = 0 * node.padding; + var halfPadding = padding / 2; // center the rect around its coordinate -module.exports = forEach; + rect.attr('class', 'outer').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding); + innerRect.attr('class', 'inner').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', node.width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label + label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels ? 5 : 3)) + ')'); + var rectBox = rect.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; -/***/ }), + node.intersect = function (point) { + return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); + }; -/***/ "./node_modules/lodash/forIn.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/forIn.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return shapeSvg; +}; -var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), - castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); +var divider = function divider(parent, node) { + // Add outer g element + var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, castFunction(iteratee), keysIn); -} + var rect = shapeSvg.insert('rect', ':first-child'); + var padding = 0 * node.padding; + var halfPadding = padding / 2; // center the rect around its coordinate -module.exports = forIn; + rect.attr('class', 'divider').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2).attr('width', node.width + padding).attr('height', node.height + padding); + var rectBox = rect.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + + node.intersect = function (point) { + return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); + }; + + return shapeSvg; +}; +var shapes = { + rect: rect, + roundedWithTitle: roundedWithTitle, + noteGroup: noteGroup, + divider: divider +}; +var clusterElems = {}; +var insertCluster = function insertCluster(elem, node) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Inserting cluster'); + var shape = node.shape || 'rect'; + clusterElems[node.id] = shapes[shape](elem, node); +}; +var getClusterTitleWidth = function getClusterTitleWidth(elem, node) { + var label = Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true); + elem.node().appendChild(label); + var width = label.getBBox().width; + elem.node().removeChild(label); + return width; +}; +var clear = function clear() { + clusterElems = {}; +}; +var positionCluster = function positionCluster(node) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Position cluster'); + var el = clusterElems[node.id]; + el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')'); +}; /***/ }), -/***/ "./node_modules/lodash/get.js": -/*!************************************!*\ - !*** ./node_modules/lodash/get.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/createLabel.js": +/*!******************************************!*\ + !*** ./src/dagre-wrapper/createLabel.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config */ "./src/config.js"); -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; + // eslint-disable-line +// let vertexNode; +// if (getConfig().flowchart.htmlLabels) { +// // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? +// const node = { +// label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => ``) +// }; +// vertexNode = addHtmlLabel(svg, node).node(); +// vertexNode.parentNode.removeChild(vertexNode); +// } else { +// const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); +// svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); +// const rows = vertexText.split(common.lineBreakRegex); +// for (let j = 0; j < rows.length; j++) { +// const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); +// tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); +// tspan.setAttribute('dy', '1em'); +// tspan.setAttribute('x', '1'); +// tspan.textContent = rows[j]; +// svgLabel.appendChild(tspan); +// } +// vertexNode = svgLabel; +// } + + + +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr('style', styleFn); + } } -module.exports = get; +function addHtmlLabel(node) { + // var fo = root.append('foreignObject').attr('width', '100000'); + // var div = fo.append('xhtml:div'); + // div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); + // var label = node.label; + // switch (typeof label) { + // case 'function': + // div.insert(label); + // break; + // case 'object': + // // Currently we assume this is a DOM object. + // div.insert(function() { + // return label; + // }); + // break; + // default: + // div.html(label); + // } + // applyStyle(div, node.labelStyle); + // div.style('display', 'inline-block'); + // // Fix for firefox + // div.style('white-space', 'nowrap'); + // var client = div.node().getBoundingClientRect(); + // fo.attr('width', client.width).attr('height', client.height); + var fo = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')); + var div = fo.append('xhtml:div'); + var label = node.label; + var labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel'; + div.html('' + label + ''); + applyStyle(div, node.labelStyle); + div.style('display', 'inline-block'); // Fix for firefox + + div.style('white-space', 'nowrap'); + div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); + return fo.node(); +} + +var createLabel = function createLabel(_vertexText, style, isTitle, isNode) { + var vertexText = _vertexText || ''; + + if (Object(_config__WEBPACK_IMPORTED_MODULE_2__["getConfig"])().flowchart.htmlLabels) { + // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? + vertexText = vertexText.replace(/\\n|\n/g, '
'); + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('vertexText' + vertexText); + var node = { + isNode: isNode, + label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { + return ""); + }), + labelStyle: style.replace('fill:', 'color:') + }; + var vertexNode = addHtmlLabel(node); // vertexNode.parentNode.removeChild(vertexNode); + + return vertexNode; + } else { + var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); + svgLabel.setAttribute('style', style.replace('color:', 'fill:')); + var rows = []; + + if (typeof vertexText === 'string') { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + + for (var j = 0; j < rows.length; j++) { + var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); + tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + tspan.setAttribute('dy', '1em'); + tspan.setAttribute('x', '0'); + + if (isTitle) { + tspan.setAttribute('class', 'title-row'); + } else { + tspan.setAttribute('class', 'row'); + } + + tspan.textContent = rows[j].trim(); + svgLabel.appendChild(tspan); + } + + return svgLabel; + } +}; +/* harmony default export */ __webpack_exports__["default"] = (createLabel); /***/ }), -/***/ "./node_modules/lodash/has.js": +/***/ "./src/dagre-wrapper/edges.js": /*!************************************!*\ - !*** ./node_modules/lodash/has.js ***! + !*** ./src/dagre-wrapper/edges.js ***! \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/*! exports provided: clear, insertEdgeLabel, positionEdgeLabel, intersection, insertEdge */function(e,t,n){"use strict";n.r(t),n.d(t,"clear",(function(){return d})),n.d(t,"insertEdgeLabel",(function(){return u})),n.d(t,"positionEdgeLabel",(function(){return h})),n.d(t,"intersection",(function(){return g})),n.d(t,"insertEdge",(function(){return p}));var i=n(/*! ../logger */"./src/logger.js"),r=n(/*! ./createLabel */"./src/dagre-wrapper/createLabel.js"),o=n(/*! d3 */"d3"),s=n(/*! ../config */"./src/config.js"),a=n(/*! ../utils */"./src/utils.js"),l={},c={},d=function(){l={},c={}},u=function(e,t){var n=Object(r.default)(t.label,t.labelStyle),i=e.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);var d=n.getBBox();if(Object(s.getConfig)().flowchart.htmlLabels){var u=n.children[0],h=Object(o.select)(n);d=u.getBoundingClientRect(),h.attr("width",d.width),h.attr("height",d.height)}if(a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l[t.id]=i,t.width=d.width,t.height=d.height,t.startLabelLeft){var f=Object(r.default)(t.startLabelLeft,t.labelStyle),g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner");p.node().appendChild(f);var m=f.getBBox();p.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),c[t.id]||(c[t.id]={}),c[t.id].startLeft=g}if(t.startLabelRight){var _=Object(r.default)(t.startLabelRight,t.labelStyle),b=e.insert("g").attr("class","edgeTerminals"),v=b.insert("g").attr("class","inner");b.node().appendChild(_),v.node().appendChild(_);var y=_.getBBox();v.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c[t.id]||(c[t.id]={}),c[t.id].startRight=b}if(t.endLabelLeft){var w=Object(r.default)(t.endLabelLeft,t.labelStyle),C=e.insert("g").attr("class","edgeTerminals"),S=C.insert("g").attr("class","inner");S.node().appendChild(w);var k=w.getBBox();S.attr("transform","translate("+-k.width/2+", "+-k.height/2+")"),C.node().appendChild(w),c[t.id]||(c[t.id]={}),c[t.id].endLeft=C}if(t.endLabelRight){var x=Object(r.default)(t.endLabelRight,t.labelStyle),L=e.insert("g").attr("class","edgeTerminals"),M=L.insert("g").attr("class","inner");M.node().appendChild(x);var D=x.getBBox();M.attr("transform","translate("+-D.width/2+", "+-D.height/2+")"),L.node().appendChild(x),c[t.id]||(c[t.id]={}),c[t.id].endRight=L}},h=function(e,t){i.log.info("Moving label",e.id,e.label,l[e.id]);var n=t.updatedPath?t.updatedPath:t.originalPath;if(e.label){var r=l[e.id],o=e.x,s=e.y;if(n){var d=a.default.calcLabelPosition(n);i.log.info("Moving label from (",o,",",s,") to (",d.x,",",d.y,")")}r.attr("transform","translate("+o+", "+s+")")}if(e.startLabelLeft){var u=c[e.id].startLeft,h=e.x,f=e.y;if(n){var g=a.default.calcTerminalLabelPosition(0,"start_left",n);h=g.x,f=g.y}u.attr("transform","translate("+h+", "+f+")")}if(e.startLabelRight){var p=c[e.id].startRight,m=e.x,_=e.y;if(n){var b=a.default.calcTerminalLabelPosition(0,"start_right",n);m=b.x,_=b.y}p.attr("transform","translate("+m+", "+_+")")}if(e.endLabelLeft){var v=c[e.id].endLeft,y=e.x,w=e.y;if(n){var C=a.default.calcTerminalLabelPosition(0,"end_left",n);y=C.x,w=C.y}v.attr("transform","translate("+y+", "+w+")")}if(e.endLabelRight){var S=c[e.id].endRight,k=e.x,x=e.y;if(n){var L=a.default.calcTerminalLabelPosition(0,"end_right",n);k=L.x,x=L.y}S.attr("transform","translate("+k+", "+x+")")}},f=function(e,t){var n=e.x,i=e.y,r=Math.abs(t.x-n),o=Math.abs(t.y-i),s=e.width/2,a=e.height/2;return r>=s||o>=a},g=function(e,t,n){i.log.warn("intersection calc o:",t," i:",n,e);var r=e.x,o=e.y,s=Math.abs(r-n.x),a=e.width/2,l=n.xMath.abs(r-t.x)*c){var m=n.y=0;y--){var w=c[y],C=r[n.fromCluster].node;if(f(C,w)||v)i.log.trace("Outside point",w),v||b.unshift(w);else{i.log.warn("inside",n.fromCluster,w,C);var S=g(C,_,w);b.unshift(S),v=!0}_=w}c=b,d=!0}var k,x=c.filter((function(e){return!Number.isNaN(e.y)}));k=("graph"===a||"flowchart"===a)&&n.curve||o.curveBasis;var L,M=Object(o.line)().x((function(e){return e.x})).y((function(e){return e.y})).curve(k);switch(n.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;default:L=""}switch(n.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed"}var D=e.append("path").attr("d",M(x)).attr("id",n.id).attr("class"," "+L+(n.classes?" "+n.classes:"")).attr("style",n.style),E="";switch(Object(s.getConfig)().state.arrowMarkerAbsolute&&(E=(E=(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),i.log.info("arrowTypeStart",n.arrowTypeStart),i.log.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":D.attr("marker-start","url("+E+"#"+a+"-crossStart)");break;case"arrow_point":D.attr("marker-start","url("+E+"#"+a+"-pointStart)");break;case"arrow_barb":D.attr("marker-start","url("+E+"#"+a+"-barbStart)");break;case"arrow_circle":D.attr("marker-start","url("+E+"#"+a+"-circleStart)");break;case"aggregation":D.attr("marker-start","url("+E+"#"+a+"-aggregationStart)");break;case"extension":D.attr("marker-start","url("+E+"#"+a+"-extensionStart)");break;case"composition":D.attr("marker-start","url("+E+"#"+a+"-compositionStart)");break;case"dependency":D.attr("marker-start","url("+E+"#"+a+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":D.attr("marker-end","url("+E+"#"+a+"-crossEnd)");break;case"arrow_point":D.attr("marker-end","url("+E+"#"+a+"-pointEnd)");break;case"arrow_barb":D.attr("marker-end","url("+E+"#"+a+"-barbEnd)");break;case"arrow_circle":D.attr("marker-end","url("+E+"#"+a+"-circleEnd)");break;case"aggregation":D.attr("marker-end","url("+E+"#"+a+"-aggregationEnd)");break;case"extension":D.attr("marker-end","url("+E+"#"+a+"-extensionEnd)");break;case"composition":D.attr("marker-end","url("+E+"#"+a+"-compositionEnd)");break;case"dependency":D.attr("marker-end","url("+E+"#"+a+"-dependencyEnd)")}var T={};return d&&(T.updatedPath=c),T.originalPath=n.points,T}},"./src/dagre-wrapper/index.js": +/*!************************************!*\ + !*** ./src/dagre-wrapper/index.js ***! + \************************************/ +/*! exports provided: render */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var baseHas = __webpack_require__(/*! ./_baseHas */ "./node_modules/lodash/_baseHas.js"), - hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre */ "dagre"); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./markers */ "./src/dagre-wrapper/markers.js"); +/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js"); +/* harmony import */ var _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mermaid-graphlib */ "./src/dagre-wrapper/mermaid-graphlib.js"); +/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes */ "./src/dagre-wrapper/nodes.js"); +/* harmony import */ var _clusters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clusters */ "./src/dagre-wrapper/clusters.js"); +/* harmony import */ var _edges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edges */ "./src/dagre-wrapper/edges.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && hasPath(object, path, baseHas); -} -module.exports = has; -/***/ }), -/***/ "./node_modules/lodash/hasIn.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/hasIn.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/lodash/_baseHasIn.js"), - hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} -module.exports = hasIn; -/***/ }), +var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parentCluster) { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Graph in recursive render: XXX', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), parentCluster); + var dir = graph.graph().rankdir; + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Dir in recursive render - dir:', dir); -/***/ "./node_modules/lodash/identity.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/identity.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var elem = _elem.insert('g').attr('class', 'root'); // eslint-disable-line -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} -module.exports = identity; + if (!graph.nodes()) { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('No nodes found for', graph); + } else { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Recursive render XXX', graph.nodes()); + } + if (graph.edges().length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Recursive edges', graph.edge(graph.edges()[0])); + } -/***/ }), + var clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line -/***/ "./node_modules/lodash/isArguments.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/isArguments.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var edgePaths = elem.insert('g').attr('class', 'edgePaths'); + var edgeLabels = elem.insert('g').attr('class', 'edgeLabels'); + var nodes = elem.insert('g').attr('class', 'nodes'); // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated + // to the abstract node and is later used by dagre for the layout -var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + graph.nodes().forEach(function (v) { + var node = graph.node(v); -/** Used for built-in method references. */ -var objectProto = Object.prototype; + if (typeof parentCluster !== 'undefined') { + var data = JSON.parse(JSON.stringify(parentCluster.clusterData)); // data.clusterPositioning = true; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Setting data for cluster XXX (', v, ') ', data, parentCluster); + graph.setNode(parentCluster.id, data); -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; + if (!graph.parent(v)) { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Setting parent', v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v))); + + if (node && node.clusterNode) { + // const children = graph.children(v); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Cluster identified', v, node, graph.node(v)); + var newEl = recursiveRender(nodes, node.graph, diagramtype, graph.node(v)); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, newEl); + Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["setNodeElem"])(newEl, node); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Recursive render complete', newEl, node); + } else { + if (graph.children(v).length > 0) { + // This is a cluster but not to be rendered recusively + // Render as before + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Cluster - the non recursive path XXX', v, node.id, node, graph); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph)); + _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][node.id] = { + id: Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph), + node: node + }; // insertCluster(clusters, graph.node(v)); + } else { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Node - the non recursive path', v, node.id, node); + Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["insertNode"])(nodes, graph.node(v), dir); + } + } + }); // Insert labels, this will insert them into the dom so that the width can be calculated + // Also figure out which edges point to/from clusters and adjust them accordingly + // Edges from/to clusters really points to the first child in the cluster. + // TODO: pick optimal child in the cluster to us as link anchor + + graph.edges().forEach(function (e) { + var edge = graph.edge(e.v, e.w, e.name); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster + + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.w]); + Object(_edges__WEBPACK_IMPORTED_MODULE_7__["insertEdgeLabel"])(edgeLabels, edge); + }); + graph.edges().forEach(function (e) { + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); + }); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('#############################################'); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('### Layout ###'); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('#############################################'); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info(graph); + dagre__WEBPACK_IMPORTED_MODULE_0___default.a.layout(graph); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place + + Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["sortNodesByHierarchy"])(graph).forEach(function (v) { + var node = graph.node(v); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Position ' + v + ': ' + JSON.stringify(graph.node(v))); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Position ' + v + ': (' + node.x, ',' + node.y, ') width: ', node.width, ' height: ', node.height); + + if (node && node.clusterNode) { + // clusterDb[node.id].node = node; + Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["positionNode"])(node); + } else { + // Non cluster node + if (graph.children(v).length > 0) { + // A cluster in the non-recurive way + // positionCluster(node); + Object(_clusters__WEBPACK_IMPORTED_MODULE_6__["insertCluster"])(clusters, node); + _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][node.id].node = node; + } else { + Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["positionNode"])(node); + } + } + }); // Move the edge labels to the correct place after layout + + graph.edges().forEach(function (e) { + var edge = graph.edge(e); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge); + var paths = Object(_edges__WEBPACK_IMPORTED_MODULE_7__["insertEdge"])(edgePaths, e, edge, _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], diagramtype, graph); + Object(_edges__WEBPACK_IMPORTED_MODULE_7__["positionEdgeLabel"])(edge, paths); + }); + return elem; }; -module.exports = isArguments; +var render = function render(elem, graph, markers, diagramtype, id) { + Object(_markers__WEBPACK_IMPORTED_MODULE_2__["default"])(elem, markers, diagramtype, id); + Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["clear"])(); + Object(_edges__WEBPACK_IMPORTED_MODULE_7__["clear"])(); + Object(_clusters__WEBPACK_IMPORTED_MODULE_6__["clear"])(); + Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clear"])(); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Graph at first:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); + Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["adjustClustersAndEdges"])(graph); + _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Graph after:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph)); + recursiveRender(elem, graph, diagramtype); +}; // const shapeDefinitions = {}; +// export const addShape = ({ shapeType: fun }) => { +// shapeDefinitions[shapeType] = fun; +// }; +// const arrowDefinitions = {}; +// export const addArrow = ({ arrowType: fun }) => { +// arrowDefinitions[arrowType] = fun; +// }; /***/ }), -/***/ "./node_modules/lodash/isArray.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/isArray.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/***/ "./src/dagre-wrapper/intersect/index.js": +/*!**********************************************!*\ + !*** ./src/dagre-wrapper/intersect/index.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-node.js */ "./src/dagre-wrapper/intersect/intersect-node.js"); +/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_intersect_node_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intersect-circle.js */ "./src/dagre-wrapper/intersect/intersect-circle.js"); +/* harmony import */ var _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intersect-ellipse.js */ "./src/dagre-wrapper/intersect/intersect-ellipse.js"); +/* harmony import */ var _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./intersect-polygon.js */ "./src/dagre-wrapper/intersect/intersect-polygon.js"); +/* harmony import */ var _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect-rect.js */ "./src/dagre-wrapper/intersect/intersect-rect.js"); +/* + * Borrowed with love from from dagrge-d3. Many thanks to cpettitt! */ -var isArray = Array.isArray; -module.exports = isArray; + + +/* harmony default export */ __webpack_exports__["default"] = ({ + node: _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default.a, + circle: _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], + ellipse: _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__["default"], + polygon: _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__["default"], + rect: _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__["default"] +}); + /***/ }), -/***/ "./node_modules/lodash/isArrayLike.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/isArrayLike.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/intersect/intersect-circle.js": +/*!*********************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-circle.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-ellipse */ "./src/dagre-wrapper/intersect/intersect-ellipse.js"); -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} -module.exports = isArrayLike; +function intersectCircle(node, rx, point) { + return Object(_intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__["default"])(node, rx, rx, point); +} +/* harmony default export */ __webpack_exports__["default"] = (intersectCircle); /***/ }), -/***/ "./node_modules/lodash/isArrayLikeObject.js": -/*!**************************************************!*\ - !*** ./node_modules/lodash/isArrayLikeObject.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/intersect/intersect-ellipse.js": +/*!**********************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-ellipse.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +function intersectEllipse(node, rx, ry, point) { + // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html + var cx = node.x; + var cy = node.y; + var px = cx - point.x; + var py = cy - point.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} + if (point.x < cx) { + dx = -dx; + } -module.exports = isArrayLikeObject; + var dy = Math.abs(rx * ry * py / det); + + if (point.y < cy) { + dy = -dy; + } + + return { + x: cx + dx, + y: cy + dy + }; +} +/* harmony default export */ __webpack_exports__["default"] = (intersectEllipse); /***/ }), -/***/ "./node_modules/lodash/isBuffer.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isBuffer.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/intersect/intersect-line.js": +/*!*******************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-line.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"), - stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* + * Returns the point at which two lines, p and q, intersect or returns + * undefined if they do not intersect. + */ +function intersectLine(p1, p2, q1, q2) { + // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, + // p7 and p473. + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + + // b1 y + c1 = 0. -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; // Compute r3 and r4. -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; // Check signs of r3 and r4. If both point 3 and point 4 lie on + // same side of line 1, the line segments do not intersect. -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; // Compute r1 and r2 -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; // Check signs of r1 and r2. If both point 1 and point 2 lie + // on same side of second line segment, the line segments do + // not intersect. -module.exports = isBuffer; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } // Line segments intersect: compute intersection point. -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) -/***/ }), + denom = a1 * b2 - a2 * b1; -/***/ "./node_modules/lodash/isEmpty.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/isEmpty.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (denom === 0) { + return; + } -var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); + offset = Math.abs(denom / 2); // The denom/2 is to get rounding instead of truncating. It + // is added or subtracted to the numerator, depending upon the + // sign of the numerator. -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { + x: x, + y: y + }; +} -/** Used for built-in method references. */ -var objectProto = Object.prototype; +function sameSign(r1, r2) { + return r1 * r2 > 0; +} -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/* harmony default export */ __webpack_exports__["default"] = (intersectLine); -/** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false +/***/ }), + +/***/ "./src/dagre-wrapper/intersect/intersect-node.js": +/*!*******************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-node.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = intersectNode; + +function intersectNode(node, point) { + // console.info('Intersect Node'); + return node.intersect(point); +} + +/***/ }), + +/***/ "./src/dagre-wrapper/intersect/intersect-polygon.js": +/*!**********************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-polygon.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _intersect_line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-line */ "./src/dagre-wrapper/intersect/intersect-line.js"); +/* eslint "no-console": off */ + +/* harmony default export */ __webpack_exports__["default"] = (intersectPolygon); +/* + * Returns the point ({x, y}) at which the point argument intersects with the + * node argument assuming that it has the shape specified by polygon. */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; + +function intersectPolygon(node, polyPoints, point) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + + if (typeof polyPoints.forEach === 'function') { + polyPoints.forEach(function (entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; + + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect = Object(_intersect_line__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point, { + x: left + p1.x, + y: top + p1.y + }, { + x: left + p2.x, + y: top + p2.y + }); + + if (intersect) { + intersections.push(intersect); + } } - if (isPrototype(value)) { - return !baseKeys(value).length; + + if (!intersections.length) { + // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); + return node; } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } + + if (intersections.length > 1) { + // More intersections, find the one nearest to edge end point + intersections.sort(function (p, q) { + var pdx = p.x - point.x; + var pdy = p.y - point.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point.x; + var qdy = q.y - point.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); } - return true; + + return intersections[0]; } -module.exports = isEmpty; +/***/ }), +/***/ "./src/dagre-wrapper/intersect/intersect-rect.js": +/*!*******************************************************!*\ + !*** ./src/dagre-wrapper/intersect/intersect-rect.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/***/ }), +"use strict"; +__webpack_require__.r(__webpack_exports__); +var intersectRect = function intersectRect(node, point) { + var x = node.x; + var y = node.y; // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes -/***/ "./node_modules/lodash/isFunction.js": -/*!*******************************************!*\ - !*** ./node_modules/lodash/isFunction.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var dx = point.x - x; + var dy = point.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} -module.exports = isFunction; + return { + x: x + sx, + y: y + sy + }; +}; +/* harmony default export */ __webpack_exports__["default"] = (intersectRect); /***/ }), -/***/ "./node_modules/lodash/isLength.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isLength.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/***/ "./src/dagre-wrapper/markers.js": +/*!**************************************!*\ + !*** ./src/dagre-wrapper/markers.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false + * Setup arrow head and define the marker. The result is appended to the svg. */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} + // Only add the number of markers that the diagram needs -module.exports = isLength; +var insertMarkers = function insertMarkers(elem, markerArray, type, id) { + markerArray.forEach(function (markerName) { + markers[markerName](elem, type, id); + }); +}; +var extension = function extension(elem, type, id) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Making markers for ', id); + elem.append('defs').append('marker').attr('id', type + '-extensionStart').attr('class', 'marker extension ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z'); + elem.append('defs').append('marker').attr('id', type + '-extensionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead +}; -/***/ }), +var composition = function composition(elem, type) { + elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker composition ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', type + '-compositionEnd').attr('class', 'marker composition ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); +}; -/***/ "./node_modules/lodash/isMap.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/isMap.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var aggregation = function aggregation(elem, type) { + elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker aggregation ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', type + '-aggregationEnd').attr('class', 'marker aggregation ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); +}; -var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ "./node_modules/lodash/_baseIsMap.js"), - baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), - nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); +var dependency = function dependency(elem, type) { + elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker dependency ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', type + '-dependencyEnd').attr('class', 'marker dependency ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); +}; -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; +var point = function point(elem, type) { + elem.append('marker').attr('id', type + '-pointEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); + elem.append('marker').attr('id', type + '-pointStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 0).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 5 L 10 10 L 10 0 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); +}; -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; +var circle = function circle(elem, type) { + elem.append('marker').attr('id', type + '-circleEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 11).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); + elem.append('marker').attr('id', type + '-circleStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', -1).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); +}; + +var cross = function cross(elem, type) { + elem.append('marker').attr('id', type + '-crossEnd').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', 12).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black') + .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0'); + elem.append('marker').attr('id', type + '-crossStart').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', -1).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black') + .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0'); +}; + +var barb = function barb(elem, type) { + elem.append('defs').append('marker').attr('id', type + '-barbEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 14).attr('markerUnits', 'strokeWidth').attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); +}; // TODO rename the class diagram markers to something shape descriptive and semanitc free -module.exports = isMap; +var markers = { + extension: extension, + composition: composition, + aggregation: aggregation, + dependency: dependency, + point: point, + circle: circle, + cross: cross, + barb: barb +}; +/* harmony default export */ __webpack_exports__["default"] = (insertMarkers); /***/ }), -/***/ "./node_modules/lodash/isObject.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isObject.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/***/ "./src/dagre-wrapper/mermaid-graphlib.js": +/*!***********************************************!*\ + !*** ./src/dagre-wrapper/mermaid-graphlib.js ***! + \***********************************************/ +/*! exports provided: clusterDb, clear, extractDecendants, validate, findNonClusterChild, adjustClustersAndEdges, extractor, sortNodesByHierarchy */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clusterDb", function() { return clusterDb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractDecendants", function() { return extractDecendants; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validate", function() { return validate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findNonClusterChild", function() { return findNonClusterChild; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustClustersAndEdges", function() { return adjustClustersAndEdges; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractor", function() { return extractor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortNodesByHierarchy", function() { return sortNodesByHierarchy; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__); /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false + * Decorates with functions required by mermaids dagre-wrapper. */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} -module.exports = isObject; +var clusterDb = {}; +var decendants = {}; +var parents = {}; +var clear = function clear() { + decendants = {}; + parents = {}; + clusterDb = {}; +}; -/***/ }), +var isDecendant = function isDecendant(id, ancenstorId) { + // if (id === ancenstorId) return true; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('In isDecendant', ancenstorId, ' ', id, ' = ', decendants[ancenstorId].indexOf(id) >= 0); + if (decendants[ancenstorId].indexOf(id) >= 0) return true; + return false; +}; -/***/ "./node_modules/lodash/isObjectLike.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/isObjectLike.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +var edgeInCluster = function edgeInCluster(edge, clusterId) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Decendants of ', clusterId, ' is ', decendants[clusterId]); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge is ', edge); // Edges to/from the cluster is not in the cluster, they are in the parent -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} + if (edge.v === clusterId) return false; + if (edge.w === clusterId) return false; -module.exports = isObjectLike; + if (!decendants[clusterId]) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Tilt, ', clusterId, ',not in decendants'); + return false; + } + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Here '); + if (decendants[clusterId].indexOf(edge.v) >= 0) return true; + if (isDecendant(edge.v, clusterId)) return true; + if (isDecendant(edge.w, clusterId)) return true; + if (decendants[clusterId].indexOf(edge.w) >= 0) return true; + return false; +}; -/***/ }), +var copy = function copy(clusterId, graph, newGraph, rootId) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Copying children of ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId); + var nodes = graph.children(clusterId) || []; // Include cluster node if it is not the root -/***/ "./node_modules/lodash/isPlainObject.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/isPlainObject.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (clusterId !== rootId) { + nodes.push(clusterId); + } -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes); + nodes.forEach(function (node) { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + var data = graph.node(node); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId); -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; + newGraph.setNode(node, data); -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; + if (rootId !== graph.parent(node)) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Setting parent', node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; + if (clusterId !== rootId && node !== clusterId) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Setting parent', node, clusterId); + newGraph.setParent(node, clusterId); + } else { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not Setting parent for node=', node, 'cluster!==rootId', clusterId !== rootId, 'node!==clusterId', node !== clusterId); + } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + var edges = graph.edges(node); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Copying Edges', edges); + edges.forEach(function (edge) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge', edge); + var data = graph.edge(edge.v, edge.w, edge.name); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge data', data, rootId); -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); + try { + // Do not copy edges in and out of the root cluster, they belong to the parent graph + if (edgeInCluster(edge, rootId)) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Copying as ', edge.v, edge.w, data, edge.name); + newGraph.setEdge(edge.v, edge.w, data, edge.name); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Skipping copy of edge ', edge.v, '-->', edge.w, ' rootId: ', rootId, ' clusterId:', clusterId); + } + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error(e); + } + }); + } -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Removing node', node); + graph.removeNode(node); + }); +}; -module.exports = isPlainObject; +var extractDecendants = function extractDecendants(id, graph) { + // log.debug('Extracting ', id); + var children = graph.children(id); + var res = [].concat(children); + for (var i = 0; i < children.length; i++) { + parents[children[i]] = id; + res = res.concat(extractDecendants(children[i], graph)); + } -/***/ }), + return res; +}; +/** + * Validates the graph, checking that all parent child relation points to existing nodes and that + * edges between nodes also ia correct. When not correct the function logs the discrepancies. + * @param {graphlib graph} g + */ -/***/ "./node_modules/lodash/isSet.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/isSet.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var validate = function validate(graph) { + var edges = graph.edges(); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Edges: ', edges); -var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ "./node_modules/lodash/_baseIsSet.js"), - baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), - nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); + for (var i = 0; i < edges.length; i++) { + if (graph.children(edges[i].v).length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('The node ', edges[i].v, ' is part of and edge even though it has children'); + return false; + } -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; + if (graph.children(edges[i].w).length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('The node ', edges[i].w, ' is part of and edge even though it has children'); + return false; + } + } + return true; +}; /** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false + * Finds a child that is not a cluster. When faking a edge between a node and a cluster. + * @param {Finds a } id + * @param {*} graph */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; -module.exports = isSet; +var findNonClusterChild = function findNonClusterChild(id, graph) { + // const node = graph.node(id); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Searching', id); // const children = graph.children(id).reverse(); + var children = graph.children(id); //.reverse(); -/***/ }), + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Searching children of id ', id, children); -/***/ "./node_modules/lodash/isString.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isString.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (children.length < 1) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('This is a valid node', id); + return id; + } -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + for (var i = 0; i < children.length; i++) { + var _id = findNonClusterChild(children[i], graph); -/** `Object#toString` result references. */ -var stringTag = '[object String]'; + if (_id) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Found replacement for', id, ' => ', _id); + return _id; + } + } +}; -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} +var getAnchorId = function getAnchorId(id) { + if (!clusterDb[id]) { + return id; + } // If the cluster has no external connections -module.exports = isString; + if (!clusterDb[id].externalConnections) { + return id; + } // Return the replacement node -/***/ }), -/***/ "./node_modules/lodash/isSymbol.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/isSymbol.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (clusterDb[id]) { + return clusterDb[id].id; + } -var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), - isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); + return id; +}; -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; +var adjustClustersAndEdges = function adjustClustersAndEdges(graph, depth) { + if (!graph || depth > 10) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Opting out, no graph '); + return; + } else { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Opting in, graph '); + } // Go through the nodes and for each cluster found, save a replacment node, this can be used when + // faking a link to a cluster -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} -module.exports = isSymbol; + graph.nodes().forEach(function (id) { + var children = graph.children(id); + if (children.length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster identified', id, ' Replacement id in edges: ', findNonClusterChild(id, graph)); + decendants[id] = extractDecendants(id, graph); + clusterDb[id] = { + id: findNonClusterChild(id, graph), + clusterData: graph.node(id) + }; + } + }); // Check incoming and outgoing edges for each cluster -/***/ }), + graph.nodes().forEach(function (id) { + var children = graph.children(id); + var edges = graph.edges(); -/***/ "./node_modules/lodash/isTypedArray.js": -/*!*********************************************!*\ - !*** ./node_modules/lodash/isTypedArray.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (children.length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Cluster identified', id, decendants); + edges.forEach(function (edge) { + // log.debug('Edge, decendants: ', edge, decendants[id]); + // Check if any edge leaves the cluster (not the actual cluster, thats a link from the box) + if (edge.v !== id && edge.w !== id) { + // Any edge where either the one of the nodes is decending to the cluster but not the other + // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) { + var d1 = isDecendant(edge.v, id); + var d2 = isDecendant(edge.w, id); // d1 xor d2 - if either d1 is true and d2 is false or the other way around -var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"), - baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), - nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); + if (d1 ^ d2) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge: ', edge, ' leaves cluster ', id); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Decendants of XXX ', id, ': ', decendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not a cluster ', id, decendants); + } + }); // For clusters with incoming and/or outgoing edges translate those edges to a real node + // in the cluster inorder to fake the edge -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + graph.edges().forEach(function (e) { + var edge = graph.edge(e); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e))); + var v = e.v; + var w = e.w; // Check if link is either from or to a cluster -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fix XXX', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], ' --- ', clusterDb[e.w]); -module.exports = isTypedArray; + if (clusterDb[e.v] || clusterDb[e.w]) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fixing and trixing - removing XXX', e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) edge.fromCluster = e.v; + if (w !== e.w) edge.toCluster = e.w; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fix Replacing with XXX', v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Adjusted Graph', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); + extractor(graph, 0); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace(clusterDb); // Remove references to extracted cluster + // graph.edges().forEach(edge => { + // if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) { + // graph.removeEdge(edge); + // } + // }); +}; +var extractor = function extractor(graph, depth) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('extractor - ', depth, graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), graph.children('D')); + if (depth > 10) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error('Bailing out'); + return; + } // For clusters without incoming and/or outgoing edges, create a new cluster-node + // containing the nodes and edges in the custer in a new graph + // for (let i = 0;) -/***/ }), -/***/ "./node_modules/lodash/isUndefined.js": -/*!********************************************!*\ - !*** ./node_modules/lodash/isUndefined.js ***! - \********************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var nodes = graph.nodes(); + var hasChildren = false; -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } -module.exports = isUndefined; + if (!hasChildren) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Done, no node has children', graph.nodes()); + return; + } // const clusters = Object.keys(clusterDb); + // clusters.forEach(clusterId => { -/***/ }), + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Nodes = ', nodes, depth); -/***/ "./node_modules/lodash/keys.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/keys.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Extracting node', _node, clusterDb, clusterDb[_node] && !clusterDb[_node].externalConnections, !graph.parent(_node), graph.node(_node), graph.children('D'), ' Depth ', depth); // Note that the node might have been removed after the Object.keys call so better check + // that it still is in the game -var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), - baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); + if (!clusterDb[_node]) { + // Skip if the node is not a cluster + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not a cluster', _node, depth); // break; + } else if (!clusterDb[_node].externalConnections && // !graph.parent(node) && + graph.children(_node) && graph.children(_node).length > 0) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster without external connections, without a parent and with children', _node, depth); + var graphSettings = graph.graph(); + var clusterGraph = new graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: graphSettings.rankdir === 'TB' ? 'LR' : 'TB', + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function () { + return {}; + }); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Old graph before copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); + copy(_node, graph, clusterGraph, _node); + graph.setNode(_node, { + clusterNode: true, + id: _node, + clusterData: clusterDb[_node].clusterData, + labelText: clusterDb[_node].labelText, + graph: clusterGraph + }); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('New graph after copy node: (', _node, ')', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(clusterGraph)); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Old graph after copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); + } else { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster ** ', _node, ' **not meeting the criteria !externalConnections:', !clusterDb[_node].externalConnections, ' no parent: ', !graph.parent(_node), ' children ', graph.children(_node) && graph.children(_node).length > 0, graph.children('D'), depth); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(clusterDb); + } + } -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} + nodes = graph.nodes(); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('New list of nodes', nodes); -module.exports = keys; + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _node2 = nodes[_i2]; + var data = graph.node(_node2); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn(' Now next level', _node2, data); + + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +var sorter = function sorter(graph, nodes) { + if (nodes.length === 0) return []; + var result = Object.assign(nodes); + nodes.forEach(function (node) { + var children = graph.children(node); + var sorted = sorter(graph, children); + result = result.concat(sorted); + }); + return result; +}; + +var sortNodesByHierarchy = function sortNodesByHierarchy(graph) { + return sorter(graph, graph.children()); +}; /***/ }), -/***/ "./node_modules/lodash/keysIn.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/keysIn.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/nodes.js": +/*!************************************!*\ + !*** ./src/dagre-wrapper/nodes.js ***! + \************************************/ +/*! exports provided: insertNode, setNodeElem, clear, positionNode */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), - baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertNode", function() { return insertNode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeElem", function() { return setNodeElem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionNode", function() { return positionNode; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); +/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ "./src/config.js"); +/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect/index.js */ "./src/dagre-wrapper/intersect/index.js"); +/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js"); +/* harmony import */ var _shapes_note__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shapes/note */ "./src/dagre-wrapper/shapes/note.js"); +/* harmony import */ var _diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../diagrams/class/svgDraw */ "./src/diagrams/class/svgDraw.js"); -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} + // eslint-disable-line -module.exports = keysIn; -/***/ }), -/***/ "./node_modules/lodash/last.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/last.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} -module.exports = last; -/***/ }), +var question = function question(parent, node) { + var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper.shapeSvg, + bbox = _labelHelper.bbox; -/***/ "./node_modules/lodash/map.js": -/*!************************************!*\ - !*** ./node_modules/lodash/map.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var s = w + h; + var points = [{ + x: s / 2, + y: 0 + }, { + x: s, + y: -s / 2 + }, { + x: s / 2, + y: -s + }, { + x: 0, + y: -s / 2 + }]; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Question main (Circle)'); + var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, s, s, points); + questionElem.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, questionElem); -var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); + node.intersect = function (point) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn('Intersect called'); + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); -} + return shapeSvg; +}; -module.exports = map; +var hexagon = function hexagon(parent, node) { + var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper2.shapeSvg, + bbox = _labelHelper2.bbox; + var f = 4; + var h = bbox.height + node.padding; + var m = h / f; + var w = bbox.width + 2 * m + node.padding; + var points = [{ + x: m, + y: 0 + }, { + x: w - m, + y: 0 + }, { + x: w, + y: -h / 2 + }, { + x: w - m, + y: -h + }, { + x: m, + y: -h + }, { + x: 0, + y: -h / 2 + }]; + var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + hex.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, hex); -/***/ }), + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/***/ "./node_modules/lodash/mapValues.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/mapValues.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return shapeSvg; +}; -var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), - baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"); +var rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) { + var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper3.shapeSvg, + bbox = _labelHelper3.bbox; -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: -h / 2, + y: 0 + }, { + x: w, + y: 0 + }, { + x: w, + y: -h + }, { + x: -h / 2, + y: -h + }, { + x: 0, + y: -h / 2 + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + node.width = w + h; + node.height = h; - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; -} + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -module.exports = mapValues; + return shapeSvg; +}; +var lean_right = function lean_right(parent, node) { + var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper4.shapeSvg, + bbox = _labelHelper4.bbox; -/***/ }), + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: -2 * h / 6, + y: 0 + }, { + x: w - h / 6, + y: 0 + }, { + x: w + 2 * h / 6, + y: -h + }, { + x: h / 6, + y: -h + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); -/***/ "./node_modules/lodash/max.js": -/*!************************************!*\ - !*** ./node_modules/lodash/max.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), - baseGt = __webpack_require__(/*! ./_baseGt */ "./node_modules/lodash/_baseGt.js"), - identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); + return shapeSvg; +}; -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; -} +var lean_left = function lean_left(parent, node) { + var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper5.shapeSvg, + bbox = _labelHelper5.bbox; -module.exports = max; + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: 2 * h / 6, + y: 0 + }, { + x: w + h / 6, + y: 0 + }, { + x: w - 2 * h / 6, + y: -h + }, { + x: -h / 6, + y: -h + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/***/ }), + return shapeSvg; +}; -/***/ "./node_modules/lodash/memoize.js": -/*!****************************************!*\ - !*** ./node_modules/lodash/memoize.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var trapezoid = function trapezoid(parent, node) { + var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper6.shapeSvg, + bbox = _labelHelper6.bbox; -var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: -2 * h / 6, + y: 0 + }, { + x: w + 2 * h / 6, + y: 0 + }, { + x: w - h / 6, + y: -h + }, { + x: h / 6, + y: -h + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; + return shapeSvg; +}; - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; +var inv_trapezoid = function inv_trapezoid(parent, node) { + var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper7.shapeSvg, + bbox = _labelHelper7.bbox; + + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: h / 6, + y: 0 + }, { + x: w - h / 6, + y: 0 + }, { + x: w + 2 * h / 6, + y: -h + }, { + x: -2 * h / 6, + y: -h + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} -// Expose `MapCache`. -memoize.Cache = MapCache; + return shapeSvg; +}; -module.exports = memoize; +var rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) { + var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper8.shapeSvg, + bbox = _labelHelper8.bbox; + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: 0, + y: 0 + }, { + x: w + h / 2, + y: 0 + }, { + x: w, + y: -h / 2 + }, { + x: w + h / 2, + y: -h + }, { + x: 0, + y: -h + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); -/***/ }), + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/***/ "./node_modules/lodash/merge.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/merge.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + return shapeSvg; +}; -var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), - createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"); - -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); -}); - -module.exports = merge; +var cylinder = function cylinder(parent, node) { + var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper9.shapeSvg, + bbox = _labelHelper9.bbox; + var w = bbox.width + node.padding; + var rx = w / 2; + var ry = rx / (2.5 + w / 50); + var h = bbox.height + ry + node.padding; + var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h; + var el = shapeSvg.attr('label-offset-y', ry).insert('path', ':first-child').attr('style', node.style).attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')'); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); -/***/ }), + node.intersect = function (point) { + var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + var x = pos.x - node.x; -/***/ "./node_modules/lodash/min.js": -/*!************************************!*\ - !*** ./node_modules/lodash/min.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + // ellipsis equation: x*x / a*a + y*y / b*b = 1 + // solve for y to get adjustion value for pos.y + var y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) y = Math.sqrt(y); + y = ry - y; + if (point.y - node.y > 0) y = -y; + pos.y += y; + } -var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), - baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"), - identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); + return pos; + }; -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; -} + return shapeSvg; +}; -module.exports = min; +var rect = function rect(parent, node) { + var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, 'node ' + node.classes, true), + shapeSvg = _labelHelper10.shapeSvg, + bbox = _labelHelper10.bbox, + halfPadding = _labelHelper10.halfPadding; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Classes = ', node.classes); // add the rect -/***/ }), + var rect = shapeSvg.insert('rect', ':first-child'); + rect.attr('class', 'basic label-container').attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); -/***/ "./node_modules/lodash/minBy.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/minBy.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + }; -var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"); + return shapeSvg; +}; -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) - : undefined; -} +var rectWithTitle = function rectWithTitle(parent, node) { + // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes); + var classes; -module.exports = minBy; + if (!node.classes) { + classes = 'node default'; + } else { + classes = 'node ' + node.classes; + } // Add outer g element -/***/ }), + var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect -/***/ "./node_modules/lodash/noop.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/noop.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var rect = shapeSvg.insert('rect', ':first-child'); // const innerRect = shapeSvg.insert('rect'); -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} + var innerLine = shapeSvg.insert('line'); + var label = shapeSvg.insert('g').attr('class', 'label'); + var text2 = node.labelText.flat(); + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Label text', text2[0]); + var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(text2[0], node.labelStyle, true, true)); + var bbox; -module.exports = noop; + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var div = text.children[0]; + var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text); + bbox = div.getBoundingClientRect(); + dv.attr('width', bbox.width); + dv.attr('height', bbox.height); + } + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Text 2', text2); + var textRows = text2.slice(1, text2.length); + var titleBox = text.getBBox(); + var descr = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(textRows.join('
'), node.labelStyle, true, true)); -/***/ }), + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var _div = descr.children[0]; -/***/ "./node_modules/lodash/now.js": -/*!************************************!*\ - !*** ./node_modules/lodash/now.js ***! - \************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(descr); -var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); + bbox = _div.getBoundingClientRect(); -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; + _dv.attr('width', bbox.width); -module.exports = now; + _dv.attr('height', bbox.height); + } // bbox = label.getBBox(); + // log.info(descr); -/***/ }), + var halfPadding = node.padding / 2; + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(descr).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 + + bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ', ' + (titleBox.height + halfPadding + 5) + ')'); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 + + bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ', ' + 0 + ')'); // Get the size of the label + // Bounding box for title and text -/***/ "./node_modules/lodash/pick.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/pick.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + bbox = label.node().getBBox(); // Center the label -var basePick = __webpack_require__(/*! ./_basePick */ "./node_modules/lodash/_basePick.js"), - flatRest = __webpack_require__(/*! ./_flatRest */ "./node_modules/lodash/_flatRest.js"); + label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'); + rect.attr('class', 'outer title-state').attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); + innerLine.attr('class', 'divider').attr('x1', -bbox.width / 2 - halfPadding).attr('x2', bbox.width / 2 + halfPadding).attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); -}); + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + }; -module.exports = pick; + return shapeSvg; +}; +var stadium = function stadium(parent, node) { + var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper11.shapeSvg, + bbox = _labelHelper11.bbox; -/***/ }), + var h = bbox.height + node.padding; + var w = bbox.width + h / 4 + node.padding; // add the rect -/***/ "./node_modules/lodash/property.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/property.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + var rect = shapeSvg.insert('rect', ':first-child').attr('style', node.style).attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); -var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"), - basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/lodash/_basePropertyDeep.js"), - isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), - toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + }; -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); -} + return shapeSvg; +}; -module.exports = property; +var circle = function circle(parent, node) { + var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper12.shapeSvg, + bbox = _labelHelper12.bbox, + halfPadding = _labelHelper12.halfPadding; + var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate -/***/ }), + circle.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('r', bbox.width / 2 + halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Circle main'); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); -/***/ "./node_modules/lodash/range.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/range.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + node.intersect = function (point) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point); + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, bbox.width / 2 + halfPadding, point); + }; -var createRange = __webpack_require__(/*! ./_createRange */ "./node_modules/lodash/_createRange.js"); + return shapeSvg; +}; -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = createRange(); +var subroutine = function subroutine(parent, node) { + var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), + shapeSvg = _labelHelper13.shapeSvg, + bbox = _labelHelper13.bbox; -module.exports = range; + var w = bbox.width + node.padding; + var h = bbox.height + node.padding; + var points = [{ + x: 0, + y: 0 + }, { + x: w, + y: 0 + }, { + x: w, + y: -h + }, { + x: 0, + y: -h + }, { + x: 0, + y: 0 + }, { + x: -8, + y: 0 + }, { + x: w + 8, + y: 0 + }, { + x: w + 8, + y: -h + }, { + x: -8, + y: -h + }, { + x: -8, + y: 0 + }]; + var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); + el.attr('style', node.style); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + }; -/***/ }), + return shapeSvg; +}; -/***/ "./node_modules/lodash/reduce.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/reduce.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var start = function start(parent, node) { + var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); + var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate -var arrayReduce = __webpack_require__(/*! ./_arrayReduce */ "./node_modules/lodash/_arrayReduce.js"), - baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - baseReduce = __webpack_require__(/*! ./_baseReduce */ "./node_modules/lodash/_baseReduce.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); + circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point); + }; - return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); -} + return shapeSvg; +}; -module.exports = reduce; +var forkJoin = function forkJoin(parent, node, dir) { + var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); + var width = 70; + var height = 10; + if (dir === 'LR') { + width = 10; + height = 70; + } -/***/ }), - -/***/ "./node_modules/lodash/size.js": -/*!*************************************!*\ - !*** ./node_modules/lodash/size.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), - getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), - isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), - isString = __webpack_require__(/*! ./isString */ "./node_modules/lodash/isString.js"), - stringSize = __webpack_require__(/*! ./_stringSize */ "./node_modules/lodash/_stringSize.js"); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; -} + var shape = shapeSvg.append('rect').style('stroke', 'black').style('fill', 'black').attr('x', -1 * width / 2).attr('y', -1 * height / 2).attr('width', width).attr('height', height).attr('class', 'fork-join'); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; -module.exports = size; + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + }; + return shapeSvg; +}; -/***/ }), +var end = function end(parent, node) { + var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); + var innerCircle = shapeSvg.insert('circle', ':first-child'); + var circle = shapeSvg.insert('circle', ':first-child'); + circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14); + innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); -/***/ "./node_modules/lodash/sortBy.js": -/*!***************************************!*\ - !*** ./node_modules/lodash/sortBy.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point); + }; -var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), - baseOrderBy = __webpack_require__(/*! ./_baseOrderBy */ "./node_modules/lodash/_baseOrderBy.js"), - baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); + return shapeSvg; +}; -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); +var class_box = function class_box(parent, node) { + var halfPadding = node.padding / 2; + var rowPadding = 4; + var lineHeight = 8; + var classes; -module.exports = sortBy; + if (!node.classes) { + classes = 'node default'; + } else { + classes = 'node ' + node.classes; + } // Add outer g element -/***/ }), + var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect -/***/ "./node_modules/lodash/stubArray.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/stubArray.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + var rect = shapeSvg.insert('rect', ':first-child'); + var topLine = shapeSvg.insert('line'); + var bottomLine = shapeSvg.insert('line'); + var maxWidth = 0; + var maxHeight = rowPadding; + var labelContainer = shapeSvg.insert('g').attr('class', 'label'); + var verticalPos = 0; + var hasInterface = node.classData.annotations && node.classData.annotations[0]; // 1. Create the labels -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} + var interfaceLabelText = node.classData.annotations[0] ? '«' + node.classData.annotations[0] + '»' : ''; + var interfaceLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(interfaceLabelText, node.labelStyle, true, true)); + var interfaceBBox = interfaceLabel.getBBox(); -module.exports = stubArray; + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var div = interfaceLabel.children[0]; + var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr('width', interfaceBBox.width); + dv.attr('height', interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } -/***/ }), + var classTitleString = node.classData.id; -/***/ "./node_modules/lodash/stubFalse.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/stubFalse.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + if (node.classData.type !== undefined && node.classData.type !== '') { + classTitleString += '<' + node.classData.type + '>'; + } -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} + var classTitleLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(classTitleString, node.labelStyle, true, true)); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel).attr('class', 'classTitle'); + var classTitleBBox = classTitleLabel.getBBox(); -module.exports = stubFalse; + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var _div2 = classTitleLabel.children[0]; + var _dv2 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel); -/***/ }), + classTitleBBox = _div2.getBoundingClientRect(); -/***/ "./node_modules/lodash/toFinite.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/toFinite.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + _dv2.attr('width', classTitleBBox.width); -var toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js"); + _dv2.attr('height', classTitleBBox.height); + } -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; + maxHeight += classTitleBBox.height + rowPadding; -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; } - return value === value ? value : 0; -} -module.exports = toFinite; + var classAttributes = []; + node.classData.members.forEach(function (str) { + var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__["parseMember"])(str).displayText; + var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(parsedText, node.labelStyle, true, true)); + var bbox = lbl.getBBox(); + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var _div3 = lbl.children[0]; -/***/ }), + var _dv3 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl); -/***/ "./node_modules/lodash/toInteger.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/toInteger.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + bbox = _div3.getBoundingClientRect(); -var toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); + _dv3.attr('width', bbox.width); -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; + _dv3.attr('height', bbox.height); + } - return result === result ? (remainder ? result - remainder : result) : 0; -} + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } -module.exports = toInteger; + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + var classMethods = []; + node.classData.methods.forEach(function (str) { + var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__["parseMember"])(str).displayText; + var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(parsedText, node.labelStyle, true, true)); + var bbox = lbl.getBBox(); + if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { + var _div4 = lbl.children[0]; -/***/ }), + var _dv4 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl); -/***/ "./node_modules/lodash/toNumber.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/toNumber.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + bbox = _div4.getBoundingClientRect(); -var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); + _dv4.attr('width', bbox.width); -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; + _dv4.attr('height', bbox.height); + } -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; // 2. Position the labels + // position the interface label -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; + if (hasInterface) { + var _diffX = (maxWidth - interfaceBBox.width) / 2; -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + _diffX) + ', ' + -1 * maxHeight / 2 + ')'); + verticalPos = interfaceBBox.height + rowPadding; + } // Positin the class title label -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} + var diffX = (maxWidth - classTitleBBox.width) / 2; + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + diffX) + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')'); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach(function (lbl) { + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ')'); + verticalPos += classTitleBBox.height + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach(function (lbl) { + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')'); + verticalPos += classTitleBBox.height + rowPadding; + }); // + // let bbox; + // if (getConfig().flowchart.htmlLabels) { + // const div = interfaceLabel.children[0]; + // const dv = select(interfaceLabel); + // bbox = div.getBoundingClientRect(); + // dv.attr('width', bbox.width); + // dv.attr('height', bbox.height); + // } + // bbox = labelContainer.getBBox(); + // log.info('Text 2', text2); + // const textRows = text2.slice(1, text2.length); + // let titleBox = text.getBBox(); + // const descr = label + // .node() + // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true)); + // if (getConfig().flowchart.htmlLabels) { + // const div = descr.children[0]; + // const dv = select(descr); + // bbox = div.getBoundingClientRect(); + // dv.attr('width', bbox.width); + // dv.attr('height', bbox.height); + // } + // // bbox = label.getBBox(); + // // log.info(descr); + // select(descr).attr( + // 'transform', + // 'translate( ' + + // // (titleBox.width - bbox.width) / 2 + + // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + + // ', ' + + // (titleBox.height + halfPadding + 5) + + // ')' + // ); + // select(text).attr( + // 'transform', + // 'translate( ' + + // // (titleBox.width - bbox.width) / 2 + + // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + + // ', ' + + // 0 + + // ')' + // ); + // // Get the size of the label + // // Bounding box for title and text + // bbox = label.node().getBBox(); + // // Center the label + // label.attr( + // 'transform', + // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')' + // ); -module.exports = toNumber; + rect.attr('class', 'outer title-state').attr('x', -maxWidth / 2 - halfPadding).attr('y', -(maxHeight / 2) - halfPadding).attr('width', maxWidth + node.padding).attr('height', maxHeight + node.padding); // innerLine + // .attr('class', 'divider') + // .attr('x1', -bbox.width / 2 - halfPadding) + // .attr('x2', bbox.width / 2 + halfPadding) + // .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding) + // .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); -/***/ }), + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + }; -/***/ "./node_modules/lodash/toPlainObject.js": -/*!**********************************************!*\ - !*** ./node_modules/lodash/toPlainObject.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), - keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); - -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); -} - -module.exports = toPlainObject; + return shapeSvg; +}; +var shapes = { + question: question, + rect: rect, + rectWithTitle: rectWithTitle, + circle: circle, + stadium: stadium, + hexagon: hexagon, + rect_left_inv_arrow: rect_left_inv_arrow, + lean_right: lean_right, + lean_left: lean_left, + trapezoid: trapezoid, + inv_trapezoid: inv_trapezoid, + rect_right_inv_arrow: rect_right_inv_arrow, + cylinder: cylinder, + start: start, + end: end, + note: _shapes_note__WEBPACK_IMPORTED_MODULE_6__["default"], + subroutine: subroutine, + fork: forkJoin, + join: forkJoin, + class_box: class_box +}; +var nodeElems = {}; +var insertNode = function insertNode(elem, node, dir) { + var newEl; + var el; // Add link when appropriate -/***/ }), + if (node.link) { + newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', node.linkTarget || '_blank'); + el = shapes[node.shape](newEl, node, dir); + } else { + el = shapes[node.shape](elem, node, dir); + newEl = el; + } -/***/ "./node_modules/lodash/toString.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/toString.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + if (node.tooltip) { + el.attr('title', node.tooltip); + } -var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js"); + if (node.class) { + el.attr('class', 'node default ' + node.class); + } -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} + nodeElems[node.id] = newEl; -module.exports = toString; + if (node.haveCallback) { + nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable'); + } +}; +var setNodeElem = function setNodeElem(elem, node) { + nodeElems[node.id] = elem; +}; +var clear = function clear() { + nodeElems = {}; +}; +var positionNode = function positionNode(node) { + var el = nodeElems[node.id]; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Transforming node', node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + (node.y - node.height / 2 - 5) + ')'); + var padding = 8; + if (node.clusterNode) { + el.attr('transform', 'translate(' + (node.x - node.width / 2 - padding) + ', ' + (node.y - node.height / 2 - padding) + ')'); + } else { + el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')'); + } +}; /***/ }), -/***/ "./node_modules/lodash/transform.js": +/***/ "./src/dagre-wrapper/shapes/note.js": /*!******************************************!*\ - !*** ./node_modules/lodash/transform.js ***! + !*** ./src/dagre-wrapper/shapes/note.js ***! \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), - baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), - baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), - baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), - getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), - isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), - isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), - isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), - isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), - isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./src/dagre-wrapper/shapes/util.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../intersect/index.js */ "./src/dagre-wrapper/intersect/index.js"); -/** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ -function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); + // eslint-disable-line - iteratee = baseIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; -} -module.exports = transform; +var note = function note(parent, node) { + var _labelHelper = Object(_util__WEBPACK_IMPORTED_MODULE_0__["labelHelper"])(parent, node, 'node ' + node.classes, true), + shapeSvg = _labelHelper.shapeSvg, + bbox = _labelHelper.bbox, + halfPadding = _labelHelper.halfPadding; + + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Classes = ', node.classes); // add the rect + + var rect = shapeSvg.insert('rect', ':first-child'); + rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); + Object(_util__WEBPACK_IMPORTED_MODULE_0__["updateNodeBounds"])(node, rect); + + node.intersect = function (point) { + return _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].rect(node, point); + }; + + return shapeSvg; +}; + +/* harmony default export */ __webpack_exports__["default"] = (note); /***/ }), -/***/ "./node_modules/lodash/union.js": -/*!**************************************!*\ - !*** ./node_modules/lodash/union.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/dagre-wrapper/shapes/util.js": +/*!******************************************!*\ + !*** ./src/dagre-wrapper/shapes/util.js ***! + \******************************************/ +/*! exports provided: labelHelper, updateNodeBounds, insertPolygonShape */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), - baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), - baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/lodash/_baseUniq.js"), - isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "labelHelper", function() { return labelHelper; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateNodeBounds", function() { return updateNodeBounds; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertPolygonShape", function() { return insertPolygonShape; }); +/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLabel */ "./src/dagre-wrapper/createLabel.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__); -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); -}); -module.exports = union; +var labelHelper = function labelHelper(parent, node, _classes, isNode) { + var classes; -/***/ }), + if (!_classes) { + classes = 'node default'; + } else { + classes = _classes; + } // Add outer g element -/***/ "./node_modules/lodash/uniqueId.js": -/*!*****************************************!*\ - !*** ./node_modules/lodash/uniqueId.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); + var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the label and insert it after the rect -/** Used to generate unique IDs. */ -var idCounter = 0; + var label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle); + var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_0__["default"])(node.labelText, node.labelStyle, false, isNode)); // Get the size of the label -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; -} + var bbox = text.getBBox(); -module.exports = uniqueId; + if (Object(_config__WEBPACK_IMPORTED_MODULE_1__["getConfig"])().flowchart.htmlLabels) { + var div = text.children[0]; + var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__["select"])(text); + bbox = div.getBoundingClientRect(); + dv.attr('width', bbox.width); + dv.attr('height', bbox.height); + } + + var halfPadding = node.padding / 2; // Center the label + label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')'); + return { + shapeSvg: shapeSvg, + bbox: bbox, + halfPadding: halfPadding, + label: label + }; +}; +var updateNodeBounds = function updateNodeBounds(node, element) { + var bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) { + return d.x + ',' + d.y; + }).join(' ')).attr('class', 'label-container').attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')'); +} /***/ }), -/***/ "./node_modules/lodash/values.js": +/***/ "./src/defaultConfig.js": +/*!******************************!*\ + !*** ./src/defaultConfig.js ***! + \******************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var i={theme:"default",themeVariables:n(/*! ./themes */"./src/themes/index.js").default.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,i.git.arrowMarkerAbsolute=i.arrowMarkerAbsolute,t.default=i},"./src/diagrams/class/classDb.js": /*!***************************************!*\ - !*** ./node_modules/lodash/values.js ***! + !*** ./src/diagrams/class/classDb.js ***! \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/*! exports provided: parseDirective, addClass, lookUpDomId, clear, getClass, getClasses, getRelations, addRelation, addAnnotation, addMember, addMembers, cleanupLabel, setCssClass, setLink, setClickEvent, bindFunctions, lineType, relationType, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var baseValues = __webpack_require__(/*! ./_baseValues */ "./node_modules/lodash/_baseValues.js"), - keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lookUpDomId", function() { return lookUpDomId; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAnnotation", function() { return addAnnotation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCssClass", function() { return setCssClass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : baseValues(object, keys(object)); -} +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } -module.exports = values; +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } -/***/ }), -/***/ "./node_modules/lodash/zipObject.js": -/*!******************************************!*\ - !*** ./node_modules/lodash/zipObject.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { -var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), - baseZipObject = __webpack_require__(/*! ./_baseZipObject */ "./node_modules/lodash/_baseZipObject.js"); + + + +var MERMAID_DOM_ID_PREFIX = 'classid-'; +var relations = []; +var classes = {}; +var classCounter = 0; +var funs = []; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__["default"].parseDirective(this, statement, context, type); +}; + +var splitClassNameAndType = function splitClassNameAndType(id) { + var genericType = ''; + var className = id; + + if (id.indexOf('~') > 0) { + var split = id.split('~'); + className = split[0]; + genericType = split[1]; + } + + return { + className: className, + type: genericType + }; +}; /** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } + * Function called by parser when a node definition has been found. + * @param id + * @public */ -function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); -} -module.exports = zipObject; +var addClass = function addClass(id) { + var classId = splitClassNameAndType(id); // Only add class if not exists -/***/ }), + if (typeof classes[classId.className] !== 'undefined') return; + classes[classId.className] = { + id: classId.className, + type: classId.type, + cssClasses: [], + methods: [], + members: [], + annotations: [], + domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter + }; + classCounter++; +}; +/** + * Function to lookup domId from id in the graph definition. + * @param id + * @public + */ -/***/ "./node_modules/mermaid/dist/mermaid.core.js": -/*!***************************************************!*\ - !*** ./node_modules/mermaid/dist/mermaid.core.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +var lookUpDomId = function lookUpDomId(id) { + var classKeys = Object.keys(classes); -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else {} -})(typeof self !== "undefined" ? self : this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./src/mermaid.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/node-libs-browser/mock/empty.js": -/*!******************************************************!*\ - !*** ./node_modules/node-libs-browser/mock/empty.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - - - -/***/ }), - -/***/ "./node_modules/path-browserify/index.js": -/*!***********************************************!*\ - !*** ./node_modules/path-browserify/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, -// backported and transplited with Babel, with backwards-compat fixes - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); + for (var i = 0; i < classKeys.length; i++) { + if (classes[classKeys[i]].id === id) { + return classes[classKeys[i]].domId; } } +}; +var clear = function clear() { + relations = []; + classes = {}; + funs = []; + funs.push(setupToolTips); +}; +var getClass = function getClass(id) { + return classes[id]; +}; +var getClasses = function getClasses() { + return classes; +}; +var getRelations = function getRelations() { + return relations; +}; +var addRelation = function addRelation(relation) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Adding relation: ' + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relations.push(relation); +}; +/** + * Adds an annotation to the specified class + * Annotations mark special properties of the given type (like 'interface' or 'service') + * @param className The class name + * @param annotation The name of the annotation without any brackets + * @public + */ - return parts; -} +var addAnnotation = function addAnnotation(className, annotation) { + var validatedClassName = splitClassNameAndType(className).className; + classes[validatedClassName].annotations.push(annotation); +}; +/** + * Adds a member to the specified class + * @param className The class name + * @param member The full name of the member. + * If the member is enclosed in <> it is treated as an annotation + * If the member is ending with a closing bracket ) it is treated as a method + * Otherwise the member will be treated as a normal property + * @public + */ -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; +var addMember = function addMember(className, member) { + var validatedClassName = splitClassNameAndType(className).className; + var theClass = classes[validatedClassName]; - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); + if (typeof member === 'string') { + // Member can contain white spaces, we trim them out + var memberString = member.trim(); - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; + if (memberString.startsWith('<<') && memberString.endsWith('>>')) { + // Remove leading and trailing brackets + theClass.annotations.push(memberString.substring(2, memberString.length - 2)); + } else if (memberString.indexOf(')') > 0) { + theClass.methods.push(memberString); + } else if (memberString) { + theClass.members.push(memberString); } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; +var addMembers = function addMembers(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach(function (member) { + return addMember(className, member); + }); } - if (path && trailingSlash) { - path += '/'; +}; +var cleanupLabel = function cleanupLabel(label) { + if (label.substring(0, 1) === ':') { + return label.substr(1).trim(); + } else { + return label.trim(); } - - return (isAbsolute ? '/' : '') + path; }; +/** + * Called by parser when a special node is found, e.g. a clickable element. + * @param ids Comma separated list of ids + * @param className Class to add + */ -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; +var setCssClass = function setCssClass(ids, className) { + ids.split(',').forEach(function (_id) { + var id = _id; + if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; + + if (typeof classes[id] !== 'undefined') { + classes[id].cssClasses.push(className); + } + }); }; +/** + * Called by parser when a tooltip is found, e.g. a clickable element. + * @param ids Comma separated list of ids + * @param tooltip Tooltip to add + */ -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); +var setTooltip = function setTooltip(ids, tooltip) { + var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); + ids.split(',').forEach(function (id) { + if (typeof tooltip !== 'undefined') { + classes[id].tooltip = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(tooltip, config); } - return p; - }).join('/')); + }); }; +/** + * Called by parser when a link is found. Adds the URL to the vertex data. + * @param ids Comma separated list of ids + * @param linkStr URL to create a link for + * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file + */ -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); +var setLink = function setLink(ids, linkStr, target) { + var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); + ids.split(',').forEach(function (_id) { + var id = _id; + if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } + if (typeof classes[id] !== 'undefined') { + classes[id].link = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].formatUrl(linkStr, config); - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; + if (typeof target === 'string') { + classes[id].linkTarget = target; + } else { + classes[id].linkTarget = '_blank'; + } } + }); + setCssClass(ids, 'clickable'); +}; +/** + * Called by parser when a click definition is found. Registers an event handler. + * @param ids Comma separated list of ids + * @param functionName Function to be called on click + * @param functionArgs Function args the function should be called with + */ - if (start > end) return []; - return arr.slice(start, end - start + 1); - } +var setClickEvent = function setClickEvent(ids, functionName, functionArgs) { + ids.split(',').forEach(function (id) { + setClickFunc(id, functionName, functionArgs); + classes[id].haveCallback = true; + }); + setCssClass(ids, 'clickable'); +}; - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); +var setClickFunc = function setClickFunc(domId, functionName, functionArgs) { + var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); + var id = domId; + var elemId = lookUpDomId(id); - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } + if (config.securityLevel !== 'loose') { + return; } - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); + if (typeof functionName === 'undefined') { + return; } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); + if (typeof classes[id] !== 'undefined') { + var argList = []; - return outputParts.join('/'); -}; + if (typeof functionArgs === 'string') { + /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */ + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); -exports.sep = '/'; -exports.delimiter = ':'; + for (var i = 0; i < argList.length; i++) { + var item = argList[i].trim(); + /* Removes all double quotes at the start and end of an argument */ -exports.dirname = function (path) { - if (typeof path !== 'string') path = path + ''; - if (path.length === 0) return '.'; - var code = path.charCodeAt(0); - var hasRoot = code === 47 /*/*/; - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47 /*/*/) { - if (!matchedSlash) { - end = i; - break; + /* This preserves all starting and ending whitespace inside */ + + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); } - } else { - // We saw the first non-path separator - matchedSlash = false; + + argList[i] = item; + } } - } + /* if no arguments passed into callback, default to passing in id */ - if (end === -1) return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) { - // return '//'; - // Backwards-compat fix: - return '/'; + + if (argList.length === 0) { + argList.push(elemId); + } + + funs.push(function () { + var elem = document.querySelector("[id=\"".concat(elemId, "\"]")); + + if (elem !== null) { + elem.addEventListener('click', function () { + _utils__WEBPACK_IMPORTED_MODULE_4__["default"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__["default"], [functionName].concat(_toConsumableArray(argList))); + }, false); + } + }); } - return path.slice(0, end); }; -function basename(path) { - if (typeof path !== 'string') path = path + ''; +var bindFunctions = function bindFunctions(element) { + funs.forEach(function (fun) { + fun(element); + }); +}; +var lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +var relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; - var start = 0; - var end = -1; - var matchedSlash = true; - var i; +var setupToolTips = function setupToolTips(element) { + var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('.mermaidTooltip'); - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0); } - if (end === -1) return ''; - return path.slice(start, end); -} + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(element).select('svg'); + var nodes = svg.selectAll('g.node'); + nodes.on('mouseover', function () { + var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); + var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided -// Uses a mixed approach for backwards-compatibility, as ext behavior changed -// in new Node.js versions, so only basename() above is backported here -exports.basename = function (path, ext) { - var f = basename(path); - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; + if (title === null) { + return; + } + + var rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style('opacity', '.9'); + tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px'); + el.classed('hover', true); + }).on('mouseout', function () { + tooltipElem.transition().duration(500).style('opacity', 0); + var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); + el.classed('hover', false); + }); }; -exports.extname = function (path) { - if (typeof path !== 'string') path = path + ''; - var startDot = -1; - var startPart = 0; - var end = -1; - var matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - var preDotState = 0; - for (var i = path.length - 1; i >= 0; --i) { - var code = path.charCodeAt(i); - if (code === 47 /*/*/) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === 46 /*.*/) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) - startDot = i; - else if (preDotState !== 1) - preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - - if (startDot === -1 || end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ''; - } - return path.slice(startDot, end); -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js"))) +funs.push(setupToolTips); +/* harmony default export */ __webpack_exports__["default"] = ({ + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().class; + }, + addClass: addClass, + bindFunctions: bindFunctions, + clear: clear, + getClass: getClass, + getClasses: getClasses, + addAnnotation: addAnnotation, + getRelations: getRelations, + addRelation: addRelation, + addMember: addMember, + addMembers: addMembers, + cleanupLabel: cleanupLabel, + lineType: lineType, + relationType: relationType, + setClickEvent: setClickEvent, + setCssClass: setCssClass, + setLink: setLink, + setTooltip: setTooltip, + lookUpDomId: lookUpDomId +}); /***/ }), -/***/ "./node_modules/process/browser.js": -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/***/ "./src/diagrams/class/classRenderer-v2.js": +/*!************************************************!*\ + !*** ./src/diagrams/class/classRenderer-v2.js ***! + \************************************************/ +/*! exports provided: addClasses, addRelations, setConf, drawOld, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -// shim for using process in browser -var process = module.exports = {}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClasses", function() { return addClasses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelations", function() { return addRelations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawOld", function() { return drawOld; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); +/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison"); +/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/class/svgDraw.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. -var cachedSetTimeout; -var cachedClearTimeout; -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; + // import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js'; -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } +_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"]; +var idCache = {}; +var padding = 20; +var conf = { + dividerMargin: 10, + padding: 5, + textHeight: 10 }; +/** + * Function that adds the vertices found during parsing to the graph to be rendered. + * @param vert Object containing the vertices. + * @param g The graph that is to be drawn. + */ -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; +var addClasses = function addClasses(classes, g) { + // const svg = select(`[id="${svgId}"]`); + var keys = Object.keys(classes); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('keys:', keys); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(classes); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition -function noop() {} + keys.forEach(function (id) { + var vertex = classes[id]; + /** + * Variable for storing the classes for the vertex + * @type {string} + */ -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; + var cssClassStr = ''; -process.listeners = function (name) { return [] } + if (vertex.cssClasses.length > 0) { + cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' '); + } // if (vertex.classes.length > 0) { + // classStr = vertex.classes.join(' '); + // } -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; + var styles = { + labelStyle: '' + }; //getStylesFromArray(vertex.styles); + // Use vertex id as text in the box if no text is provided by the graph definition + var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually + // let vertexNode; + // if (getConfig().flowchart.htmlLabels) { + // const node = { + // label: vertexText.replace( + // /fa[lrsb]?:fa-[\w-]+/g, + // s => `` + // ) + // }; + // vertexNode = addHtmlLabel(svg, node).node(); + // vertexNode.parentNode.removeChild(vertexNode); + // } else { + // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); + // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); + // const rows = vertexText.split(common.lineBreakRegex); + // for (let j = 0; j < rows.length; j++) { + // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); + // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + // tspan.setAttribute('dy', '1em'); + // tspan.setAttribute('x', '1'); + // tspan.textContent = rows[j]; + // svgLabel.appendChild(tspan); + // } + // vertexNode = svgLabel; + // } -/***/ }), + var radious = 0; + var _shape = ''; // Set the shape based parameters -/***/ "./node_modules/webpack/buildin/module.js": -/*!***********************************!*\ - !*** (webpack)/buildin/module.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { + switch (vertex.type) { + case 'class': + _shape = 'class_box'; + break; -module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if (!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; + default: + _shape = 'class_box'; + } // Add the node -/***/ }), + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + classData: vertex, + rx: radious, + ry: radious, + class: cssClassStr, + style: styles.style, + id: vertex.id, + domId: vertex.domId, + haveCallback: vertex.haveCallback, + link: vertex.link, + width: vertex.type === 'group' ? 500 : undefined, + type: vertex.type, + padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding + }); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('setNode', { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: cssClassStr, + style: styles.style, + id: vertex.id, + width: vertex.type === 'group' ? 500 : undefined, + type: vertex.type, + padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding + }); + }); +}; +/** + * Add edges to graph based on parsed graph defninition + * @param {Object} edges The edges to add to the graph + * @param {Object} g The graph object + */ -/***/ "./package.json": -/*!**********************!*\ - !*** ./package.json ***! - \**********************/ -/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, husky, default */ -/***/ (function(module) { +var addRelations = function addRelations(relations, g) { + var cnt = 0; + var defaultStyle; + var defaultLabelStyle; // if (typeof relations.defaultStyle !== 'undefined') { + // const defaultStyles = getStylesFromArray(relations.defaultStyle); + // defaultStyle = defaultStyles.style; + // defaultLabelStyle = defaultStyles.labelStyle; + // } -module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.9.2\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --colors\",\"build:production\":\"yarn build:development -p --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"minify\":\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack-dev-server --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"d3\":\"^5.7.0\",\"dagre\":\"^0.8.4\",\"dagre-d3\":\"^0.6.4\",\"entity-decode\":\"^2.0.2\",\"graphlib\":\"^2.1.7\",\"he\":\"^1.2.0\",\"khroma\":\"^1.1.0\",\"minify\":\"^4.1.1\",\"moment-mini\":\"^2.22.1\",\"stylis\":\"^3.5.2\"},\"devDependencies\":{\"@babel/core\":\"^7.2.2\",\"@babel/preset-env\":\"^7.8.4\",\"@babel/register\":\"^7.0.0\",\"@percy/cypress\":\"*\",\"babel-core\":\"7.0.0-bridge.0\",\"babel-eslint\":\"^10.1.0\",\"babel-jest\":\"^24.9.0\",\"babel-loader\":\"^8.0.4\",\"coveralls\":\"^3.0.2\",\"css-loader\":\"^2.0.1\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"4.0.1\",\"documentation\":\"^12.0.1\",\"eslint\":\"^6.3.0\",\"eslint-config-prettier\":\"^6.3.0\",\"eslint-plugin-prettier\":\"^3.1.0\",\"husky\":\"^1.2.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^24.9.0\",\"jison\":\"^0.4.18\",\"moment\":\"^2.23.0\",\"node-sass\":\"^5.0.0\",\"prettier\":\"^1.18.2\",\"puppeteer\":\"^1.17.0\",\"sass-loader\":\"^7.1.0\",\"start-server-and-test\":\"^1.10.6\",\"terser-webpack-plugin\":\"^2.2.2\",\"webpack\":\"^4.41.2\",\"webpack-bundle-analyzer\":\"^3.7.0\",\"webpack-cli\":\"^3.1.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^1.7.2\",\"yarn-upgrade-all\":\"^0.5.0\"},\"files\":[\"dist\"],\"yarn-upgrade-all\":{\"ignore\":[\"babel-core\"]},\"sideEffects\":[\"**/*.css\",\"**/*.scss\"],\"husky\":{\"hooks\":{\"pre-push\":\"yarn test\"}}}"); + relations.forEach(function (edge) { + cnt++; + var edgeData = {}; //Set relationship style and line type -/***/ }), + edgeData.classes = 'relation'; + edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid'; + edgeData.id = 'id' + cnt; // Set link type for rendering -/***/ "./src/config.js": -/*!***********************!*\ - !*** ./src/config.js ***! - \***********************/ -/*! exports provided: defaultConfig, updateCurrentConfig, setSiteConfig, saveConfigFromInitilize, updateSiteConfig, getSiteConfig, setConfig, getConfig, sanitize, addDirective, reset */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (edge.type === 'arrow_open') { + edgeData.arrowhead = 'none'; + } else { + edgeData.arrowhead = 'normal'; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultConfig", function() { return defaultConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateCurrentConfig", function() { return updateCurrentConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSiteConfig", function() { return setSiteConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveConfigFromInitilize", function() { return saveConfigFromInitilize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSiteConfig", function() { return updateSiteConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSiteConfig", function() { return getSiteConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitize", function() { return sanitize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDirective", function() { return addDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./src/utils.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); -/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js"); -/* harmony import */ var _defaultConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultConfig */ "./src/defaultConfig.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(edgeData, edge); //Set edge extra labels + //edgeData.startLabelLeft = edge.relationTitle1; + edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1; + edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2; //edgeData.endLabelRight = edge.relationTitle2; + //Set relation arrow types + edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1); + edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2); + var style = ''; + var labelStyle = ''; + if (typeof edge.style !== 'undefined') { + var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } else { + style = 'fill:none'; - // debugger; + if (typeof defaultStyle !== 'undefined') { + style = defaultStyle; + } -var defaultConfig = Object.freeze(_defaultConfig__WEBPACK_IMPORTED_MODULE_3__["default"]); -var siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); -var configFromInitialize; -var directives = []; -var currentConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); -var updateCurrentConfig = function updateCurrentConfig(siteCfg, _directives) { - // start with config beeing the siteConfig - var cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, siteCfg); // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta); - // Join directives + if (typeof defaultLabelStyle !== 'undefined') { + labelStyle = defaultLabelStyle; + } + } - var sumOfDirectives = {}; + edgeData.style = style; + edgeData.labelStyle = labelStyle; - for (var i = 0; i < _directives.length; i++) { - var d = _directives[i]; - sanitize(d); // Apply the data from the directive where the the overrides the themeVaraibles + if (typeof edge.interpolate !== 'undefined') { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); + } else if (typeof relations.defaultInterpolate !== 'undefined') { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(relations.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); + } else { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); + } - sumOfDirectives = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(sumOfDirectives, d); - } + edge.text = edge.title; - cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(cfg, sumOfDirectives); + if (typeof edge.text === 'undefined') { + if (typeof edge.style !== 'undefined') { + edgeData.arrowheadStyle = 'fill: #333'; + } + } else { + edgeData.arrowheadStyle = 'fill: #333'; + edgeData.labelpos = 'c'; - if (sumOfDirectives.theme) { - var tmpConfigFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, configFromInitialize); - var themeVariables = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(tmpConfigFromInitialize.themeVariables || {}, sumOfDirectives.themeVariables); - cfg.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__["default"][cfg.theme].getThemeVariables(themeVariables); - } + if (Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.htmlLabels && false) { + // eslint-disable-line + edgeData.labelType = 'html'; + edgeData.label = '' + edge.text + ''; + } else { + edgeData.labelType = 'text'; + edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_10__["default"].lineBreakRegex, '\n'); - currentConfig = cfg; - return cfg; -}; -/** - *## setSiteConfig - *| Function | Description | Type | Values | - *| --------- | ------------------- | ------- | ------------------ | - *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array| - ***Notes:** - *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset - *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig - *to the defaultConfig - *Note: currentConfig is set in this function - **Default value: At default, will mirror Global Config** - * @param conf - the base currentConfig to use as siteConfig - * @returns {*} - the siteConfig - */ + if (typeof edge.style === 'undefined') { + edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none'; + } -var setSiteConfig = function setSiteConfig(conf) { - siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, defaultConfig); - siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(siteConfig, conf); + edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); + } + } // Add the edge to the graph - if (conf.theme) { - siteConfig.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__["default"][conf.theme].getThemeVariables(conf.themeVariables); + + g.setEdge(edge.id1, edge.id2, edgeData, cnt); + }); +}; // Todo optimize + +var getGraphId = function getGraphId(label) { + var keys = Object.keys(idCache); + + for (var i = 0; i < keys.length; i++) { + if (idCache[keys[i]].label === label) { + return keys[i]; + } } - currentConfig = updateCurrentConfig(siteConfig, directives); - return siteConfig; -}; -var saveConfigFromInitilize = function saveConfigFromInitilize(conf) { - configFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, conf); -}; -var updateSiteConfig = function updateSiteConfig(conf) { - siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(siteConfig, conf); - updateCurrentConfig(siteConfig, directives); - return siteConfig; + return undefined; }; -/** - *## getSiteConfig - *| Function | Description | Type | Values | - *| --------- | ------------------- | ------- | ------------------ | - *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig| - ***Notes**: - *Returns **any** values in siteConfig. - * @returns {*} - */ -var getSiteConfig = function getSiteConfig() { - return Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, siteConfig); +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); + keys.forEach(function (key) { + conf[key] = cnf[key]; + }); }; /** - *## setConfig - *| Function | Description | Type | Values | - *| --------- | ------------------- | ------- | ------------------ | - *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array| - ***Notes**: - *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any - *values found in conf with key found in siteConfig.secure will be replaced with the corresponding - *siteConfig value. - * @param conf - the potential currentConfig - * @returns {*} - the currentConfig merged with the sanitized conf + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id */ -var setConfig = function setConfig(conf) { - // sanitize(conf); - // Object.keys(conf).forEach(key => { - // const manipulator = manipulators[key]; - // conf[key] = manipulator ? manipulator(conf[key]) : conf[key]; - // }); - Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])(currentConfig, conf); - return getConfig(); -}; -/** - * ## getConfig - *| Function | Description | Type | Return Values | - *| --------- | ------------------- | ------- | ------------------ | - *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig| - ***Notes**: - *Returns **any** the currentConfig - * @returns {*} - the currentConfig - */ +var drawOld = function drawOld(text, id) { + idCache = {}; + _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear(); + _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found -var getConfig = function getConfig() { - return Object(_utils__WEBPACK_IMPORTED_MODULE_0__["assignWithDepth"])({}, currentConfig); -}; -/** - *## sanitize - *| Function | Description | Type | Values | - *| --------- | ------------------- | ------- | ------------------ | - *| sanitize |Sets the siteConfig to desired values. | Put Request |None| - *Ensures options parameter does not attempt to override siteConfig secure keys - *Note: modifies options in-place - * @param options - the potential setConfig parameter - */ + var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); // insertMarkers(diagram); + // Layout graph, Create a new directed graph -var sanitize = function sanitize(options) { - // Checking that options are not in the list of excluded options - Object.keys(siteConfig.secure).forEach(function (key) { - if (typeof options[siteConfig.secure[key]] !== 'undefined') { - // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script - // can exploit the logger's attempt to stringify the value and execute arbitrary code - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug("Denied attempt to modify a secure key ".concat(siteConfig.secure[key]), options[siteConfig.secure[key]]); - delete options[siteConfig.secure[key]]; - } - }); // Check that there no attempts of prototype pollution + var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ + multigraph: true + }); // Set an object for the graph label - Object.keys(options).forEach(function (key) { - if (key.indexOf('__') === 0) { - delete options[key]; - } - }); // Check that there no attempts of xss, there should be no tags at all in the directive - // blocking data urls as base64 urls can contain svgs with inline script tags + g.setGraph({ + isMultiGraph: true + }); // Default to assigning a new object as a label for each new edge. - Object.keys(options).forEach(function (key) { - if (typeof options[key] === 'string') { - if (options[key].indexOf('<') > -1 || options[key].indexOf('>') > -1 || options[key].indexOf('url(data:') > -1) { - delete options[key]; - } - } + g.setDefaultEdgeLabel(function () { + return {}; + }); + var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('classes:'); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(classes); + var keys = Object.keys(classes); - if (_typeof(options[key]) === 'object') { - sanitize(options[key]); + for (var i = 0; i < keys.length; i++) { + var classDef = classes[keys[i]]; + var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawClass(diagram, classDef, conf); + idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is + // metadata about the node. In this case we're going to add labels to each of + // our nodes. + + g.setNode(node.id, node); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Org height: ' + node.height); + } + + var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('relations:', relations); + relations.forEach(function (relation) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)); + g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { + relation: relation + }, relation.title || 'DEFAULT'); + }); + dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g); + g.nodes().forEach(function (v) { + if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v))); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__["lookUpDomId"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )'); } }); -}; -var addDirective = function addDirective(directive) { - if (directive.fontFamily) { - if (!directive.themeVariables) { - directive.themeVariables = { - fontFamily: directive.fontFamily - }; - } else { - if (!directive.themeVariables.fontFamily) { - directive.themeVariables = { - fontFamily: directive.fontFamily - }; - } + g.edges().forEach(function (e) { + if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e))); + _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf); } - } + }); + var svgBounds = diagram.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - directives.push(directive); - updateCurrentConfig(siteConfig, directives); + var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("viewBox ".concat(vBox)); + diagram.attr('viewBox', vBox); }; -/** - *## reset - *| Function | Description | Type | Required | Values | - *| --------- | ------------------- | ------- | -------- | ------------------ | - *| reset|Resets currentConfig to conf| Put Request | Required | None| - * - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array| - * - **Notes : - (default: current siteConfig ) (optional, default `getSiteConfig()`) - * @param conf the base currentConfig to reset to (default: current siteConfig ) (optional, default `getSiteConfig()`) - */ +var draw = function draw(text, id) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Drawing class'); + _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].clear(); // const parser = classDb.parser; + // parser.yy = classDb; + // Parse the graph definition + // try { -var reset = function reset() { - // Replace current config with siteConfig - directives = []; - updateCurrentConfig(siteConfig, directives); -}; + _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); // } catch (err) { + // log.debug('Parsing failed'); + // } + // Fetch the default direction, use TD if none was found -/***/ }), + var dir = 'TD'; + var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('config:', conf); + var nodeSpacing = conf.nodeSpacing || 50; + var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph -/***/ "./src/dagre-wrapper/clusters.js": -/*!***************************************!*\ - !*** ./src/dagre-wrapper/clusters.js ***! - \***************************************/ -/*! exports provided: insertCluster, getClusterTitleWidth, clear, positionCluster */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function () { + return {}; + }); // let subG; + // const subGraphs = flowDb.getSubGraphs(); + // log.info('Subgraphs - ', subGraphs); + // for (let i = subGraphs.length - 1; i >= 0; i--) { + // subG = subGraphs[i]; + // log.info('Subgraph - ', subG); + // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes); + // } + // Fetch the verices/nodes and edges/links from the parsed graph definition -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertCluster", function() { return insertCluster; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClusterTitleWidth", function() { return getClusterTitleWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionCluster", function() { return positionCluster; }); -/* harmony import */ var _intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect/intersect-rect */ "./src/dagre-wrapper/intersect/intersect-rect.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config */ "./src/config.js"); + var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); + var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(relations); // let i = 0; + // for (i = subGraphs.length - 1; i >= 0; i--) { + // subG = subGraphs[i]; + // selectAll('cluster').append('text'); + // for (let j = 0; j < subG.nodes.length; j++) { + // g.setParent(subG.nodes[j], subG.id); + // } + // } + addClasses(classes, g, id); + addRelations(relations, g); // Add custom shapes + // flowChartShapes.addToRenderV2(addShape); + // Set up an SVG group so that we can translate the final graph. + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); + svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph. + var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id + ' g'); + Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__["render"])(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id); // element.selectAll('g.node').attr('title', function() { + // return flowDb.getTooltip(this.id); + // }); + var padding = 8; + var svgBounds = svg.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")")); + Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); + svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height)); + svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")")); // Index nodes + // flowDb.indexNodes('subGraph' + i); + // Add label rects for non html labels + if (!conf.htmlLabels) { + var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); -var rect = function rect(parent, node) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Creating subgraph rect for ', node.id, node); // Add outer g element + for (var k = 0; k < labels.length; k++) { + var label = labels[k]; // Get dimensions of label - var shapeSvg = parent.insert('g').attr('class', 'cluster' + (node.class ? ' ' + node.class : '')).attr('id', node.id); // add the rect + var dim = label.getBBox(); + var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); + rect.setAttribute('rx', 0); + rect.setAttribute('ry', 0); + rect.setAttribute('width', dim.width); + rect.setAttribute('height', dim.height); + rect.setAttribute('style', 'fill:#e8e8e8;'); + label.insertBefore(rect, label.firstChild); + } + } // If node has a link, wrap it in an anchor SVG object. + // const keys = Object.keys(classes); + // keys.forEach(function(key) { + // const vertex = classes[key]; + // if (vertex.link) { + // const node = select('#' + id + ' [id="' + key + '"]'); + // if (node) { + // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); + // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); + // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); + // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); + // const linkNode = node.insert(function() { + // return link; + // }, ':first-child'); + // const shape = node.select('.label-container'); + // if (shape) { + // linkNode.append(function() { + // return shape.node(); + // }); + // } + // const label = node.select('.label'); + // if (label) { + // linkNode.append(function() { + // return label.node(); + // }); + // } + // } + // } + // }); - var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); - var label = shapeSvg.insert('g').attr('class', 'cluster-label'); - var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label +function getArrowMarker(type) { + var marker; - var bbox = text.getBBox(); + switch (type) { + case 0: + marker = 'aggregation'; + break; - if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { - var div = text.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__["select"])(text); - bbox = div.getBoundingClientRect(); - dv.attr('width', bbox.width); - dv.attr('height', bbox.height); - } + case 1: + marker = 'extension'; + break; - var padding = 0 * node.padding; - var halfPadding = padding / 2; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Data ', node, JSON.stringify(node)); // center the rect around its coordinate + case 2: + marker = 'composition'; + break; - rect.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding); // Center the label + case 3: + marker = 'dependency'; + break; - label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 + node.padding / 3) + ')'); - var rectBox = rect.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; + default: + marker = 'none'; + } - node.intersect = function (point) { - return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); - }; + return marker; +} - return shapeSvg; -}; -/** - * Non visiable cluster where the note is group with its - */ +/***/ }), +/***/ "./src/diagrams/class/classRenderer.js": +/*!*********************************************!*\ + !*** ./src/diagrams/class/classRenderer.js ***! + \*********************************************/ +/*! exports provided: setConf, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var noteGroup = function noteGroup(parent, node) { - // Add outer g element - var shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id); // add the rect +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); +/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison"); +/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/class/svgDraw.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - var rect = shapeSvg.insert('rect', ':first-child'); - var padding = 0 * node.padding; - var halfPadding = padding / 2; // center the rect around its coordinate - rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding).attr('fill', 'none'); - var rectBox = rect.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function (point) { - return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); - }; - return shapeSvg; -}; -var roundedWithTitle = function roundedWithTitle(parent, node) { - // Add outer g element - var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect - var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect - var label = shapeSvg.insert('g').attr('class', 'cluster-label'); - var innerRect = shapeSvg.append('rect'); - var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label - var bbox = text.getBBox(); +_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"]; +var idCache = {}; +var padding = 20; +var conf = { + dividerMargin: 10, + padding: 5, + textHeight: 10 +}; // Todo optimize - if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { - var div = text.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__["select"])(text); - bbox = div.getBoundingClientRect(); - dv.attr('width', bbox.width); - dv.attr('height', bbox.height); - } +var getGraphId = function getGraphId(label) { + var keys = Object.keys(idCache); - bbox = text.getBBox(); - var padding = 0 * node.padding; - var halfPadding = padding / 2; // center the rect around its coordinate + for (var i = 0; i < keys.length; i++) { + if (idCache[keys[i]].label === label) { + return keys[i]; + } + } - rect.attr('class', 'outer').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding); - innerRect.attr('class', 'inner').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', node.width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label + return undefined; +}; +/** + * Setup arrow head and define the marker. The result is appended to the svg. + */ - label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels ? 5 : 3)) + ')'); - var rectBox = rect.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - node.intersect = function (point) { - return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); - }; +var insertMarkers = function insertMarkers(elem) { + elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z'); + elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead - return shapeSvg; + elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z'); + elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); }; -var divider = function divider(parent, node) { - // Add outer g element - var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect - - var rect = shapeSvg.insert('rect', ':first-child'); - var padding = 0 * node.padding; - var halfPadding = padding / 2; // center the rect around its coordinate - - rect.attr('class', 'divider').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2).attr('width', node.width + padding).attr('height', node.height + padding); - var rectBox = rect.node().getBBox(); - node.width = rectBox.width; - node.height = rectBox.height; - - node.intersect = function (point) { - return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point); - }; - - return shapeSvg; -}; - -var shapes = { - rect: rect, - roundedWithTitle: roundedWithTitle, - noteGroup: noteGroup, - divider: divider -}; -var clusterElems = {}; -var insertCluster = function insertCluster(elem, node) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Inserting cluster'); - var shape = node.shape || 'rect'; - clusterElems[node.id] = shapes[shape](elem, node); -}; -var getClusterTitleWidth = function getClusterTitleWidth(elem, node) { - var label = Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__["default"])(node.labelText, node.labelStyle, undefined, true); - elem.node().appendChild(label); - var width = label.getBBox().width; - elem.node().removeChild(label); - return width; -}; -var clear = function clear() { - clusterElems = {}; -}; -var positionCluster = function positionCluster(node) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Position cluster'); - var el = clusterElems[node.id]; - el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')'); +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); + keys.forEach(function (key) { + conf[key] = cnf[key]; + }); }; +/** + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ -/***/ }), +var draw = function draw(text, id) { + idCache = {}; + _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear(); + _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found -/***/ "./src/dagre-wrapper/createLabel.js": -/*!******************************************!*\ - !*** ./src/dagre-wrapper/createLabel.js ***! - \******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); + diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + insertMarkers(diagram); // Layout graph, Create a new directed graph -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config */ "./src/config.js"); + var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ + multigraph: true + }); // Set an object for the graph label - // eslint-disable-line -// let vertexNode; -// if (getConfig().flowchart.htmlLabels) { -// // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? -// const node = { -// label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => ``) -// }; -// vertexNode = addHtmlLabel(svg, node).node(); -// vertexNode.parentNode.removeChild(vertexNode); -// } else { -// const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); -// svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); -// const rows = vertexText.split(common.lineBreakRegex); -// for (let j = 0; j < rows.length; j++) { -// const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); -// tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); -// tspan.setAttribute('dy', '1em'); -// tspan.setAttribute('x', '1'); -// tspan.textContent = rows[j]; -// svgLabel.appendChild(tspan); -// } -// vertexNode = svgLabel; -// } + g.setGraph({ + isMultiGraph: true + }); // Default to assigning a new object as a label for each new edge. + g.setDefaultEdgeLabel(function () { + return {}; + }); + var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); + var keys = Object.keys(classes); + for (var i = 0; i < keys.length; i++) { + var classDef = classes[keys[i]]; + var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawClass(diagram, classDef, conf); + idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is + // metadata about the node. In this case we're going to add labels to each of + // our nodes. -function applyStyle(dom, styleFn) { - if (styleFn) { - dom.attr('style', styleFn); + g.setNode(node.id, node); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Org height: ' + node.height); } -} - -function addHtmlLabel(node) { - // var fo = root.append('foreignObject').attr('width', '100000'); - // var div = fo.append('xhtml:div'); - // div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); - // var label = node.label; - // switch (typeof label) { - // case 'function': - // div.insert(label); - // break; - // case 'object': - // // Currently we assume this is a DOM object. - // div.insert(function() { - // return label; - // }); - // break; - // default: - // div.html(label); - // } - // applyStyle(div, node.labelStyle); - // div.style('display', 'inline-block'); - // // Fix for firefox - // div.style('white-space', 'nowrap'); - // var client = div.node().getBoundingClientRect(); - // fo.attr('width', client.width).attr('height', client.height); - var fo = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')); - var div = fo.append('xhtml:div'); - var label = node.label; - var labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel'; - div.html('' + label + ''); - applyStyle(div, node.labelStyle); - div.style('display', 'inline-block'); // Fix for firefox - - div.style('white-space', 'nowrap'); - div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); - return fo.node(); -} - -var createLabel = function createLabel(_vertexText, style, isTitle, isNode) { - var vertexText = _vertexText || ''; - if (Object(_config__WEBPACK_IMPORTED_MODULE_2__["getConfig"])().flowchart.htmlLabels) { - // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? - vertexText = vertexText.replace(/\\n|\n/g, '
'); - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('vertexText' + vertexText); - var node = { - isNode: isNode, - label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { - return ""); - }), - labelStyle: style.replace('fill:', 'color:') - }; - var vertexNode = addHtmlLabel(node); // vertexNode.parentNode.removeChild(vertexNode); - - return vertexNode; - } else { - var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - svgLabel.setAttribute('style', style.replace('color:', 'fill:')); - var rows = []; - - if (typeof vertexText === 'string') { - rows = vertexText.split(/\\n|\n|/gi); - } else if (Array.isArray(vertexText)) { - rows = vertexText; - } else { - rows = []; + var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); + relations.forEach(function (relation) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)); + g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { + relation: relation + }, relation.title || 'DEFAULT'); + }); + dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g); + g.nodes().forEach(function (v) { + if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v))); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__["lookUpDomId"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )'); + } + }); + g.edges().forEach(function (e) { + if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e))); + _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf); } + }); + var svgBounds = diagram.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - for (var j = 0; j < rows.length; j++) { - var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); - tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); - tspan.setAttribute('dy', '1em'); - tspan.setAttribute('x', '0'); + var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("viewBox ".concat(vBox)); + diagram.attr('viewBox', vBox); +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); - if (isTitle) { - tspan.setAttribute('class', 'title-row'); - } else { - tspan.setAttribute('class', 'row'); - } +/***/ }), - tspan.textContent = rows[j].trim(); - svgLabel.appendChild(tspan); - } +/***/ "./src/diagrams/class/parser/classDiagram.jison": +/*!******************************************************!*\ + !*** ./src/diagrams/class/parser/classDiagram.jison ***! + \******************************************************/ +/*! no static exports found */function(e,t,n){(function(e,i){var r=function(){var e=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},t=[1,7],n=[1,6],i=[1,14],r=[1,25],o=[1,28],s=[1,26],a=[1,27],l=[1,29],c=[1,30],d=[1,31],u=[1,32],h=[1,35],f=[1,36],g=[1,37],p=[1,38],m=[10,19],_=[1,50],b=[1,51],v=[1,52],y=[1,53],w=[1,54],C=[1,55],S=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],k=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],x=[10,13,17,19],L=[42,72,73,74,75],M=[42,49,50,72,73,74,75],D=[42,45,46,47,48,72,73,74,75],E=[10,19,26],T=[1,87],O={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(e,t,n,i,r,o,s){var a=o.length-1;switch(r){case 6:i.parseDirective("%%{","open_directive");break;case 7:i.parseDirective(o[a],"type_directive");break;case 8:o[a]=o[a].trim().replace(/'/g,'"'),i.parseDirective(o[a],"arg_directive");break;case 9:i.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=o[a];break;case 16:this.$=o[a-1]+o[a];break;case 17:case 18:this.$=o[a-1]+"~"+o[a];break;case 19:i.addRelation(o[a]);break;case 20:o[a-1].title=i.cleanupLabel(o[a]),i.addRelation(o[a-1]);break;case 27:i.addClass(o[a]);break;case 28:i.addClass(o[a-2]),i.setCssClass(o[a-2],o[a]);break;case 29:i.addClass(o[a-3]),i.addMembers(o[a-3],o[a-1]);break;case 30:i.addClass(o[a-5]),i.setCssClass(o[a-5],o[a-3]),i.addMembers(o[a-5],o[a-1]);break;case 31:i.addAnnotation(o[a],o[a-2]);break;case 32:this.$=[o[a]];break;case 33:o[a].push(o[a-1]),this.$=o[a];break;case 34:break;case 35:i.addMember(o[a-1],i.cleanupLabel(o[a]));break;case 36:case 37:break;case 38:this.$={id1:o[a-2],id2:o[a],relation:o[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:o[a-3],id2:o[a],relation:o[a-1],relationTitle1:o[a-2],relationTitle2:"none"};break;case 40:this.$={id1:o[a-3],id2:o[a],relation:o[a-2],relationTitle1:"none",relationTitle2:o[a-1]};break;case 41:this.$={id1:o[a-4],id2:o[a],relation:o[a-2],relationTitle1:o[a-3],relationTitle2:o[a-1]};break;case 42:this.$={type1:o[a-2],type2:o[a],lineType:o[a-1]};break;case 43:this.$={type1:"none",type2:o[a],lineType:o[a-1]};break;case 44:this.$={type1:o[a-1],type2:"none",lineType:o[a]};break;case 45:this.$={type1:"none",type2:"none",lineType:o[a]};break;case 46:this.$=i.relationType.AGGREGATION;break;case 47:this.$=i.relationType.EXTENSION;break;case 48:this.$=i.relationType.COMPOSITION;break;case 49:this.$=i.relationType.DEPENDENCY;break;case 50:this.$=i.lineType.LINE;break;case 51:this.$=i.lineType.DOTTED_LINE;break;case 52:case 58:this.$=o[a-2],i.setClickEvent(o[a-1],o[a]);break;case 53:case 59:this.$=o[a-3],i.setClickEvent(o[a-2],o[a-1]),i.setTooltip(o[a-2],o[a]);break;case 54:case 62:this.$=o[a-2],i.setLink(o[a-1],o[a]);break;case 55:this.$=o[a-3],i.setLink(o[a-2],o[a-1],o[a]);break;case 56:case 64:this.$=o[a-3],i.setLink(o[a-2],o[a-1]),i.setTooltip(o[a-2],o[a]);break;case 57:case 65:this.$=o[a-4],i.setLink(o[a-3],o[a-2],o[a]),i.setTooltip(o[a-3],o[a-1]);break;case 60:this.$=o[a-3],i.setClickEvent(o[a-2],o[a-1],o[a]);break;case 61:this.$=o[a-4],i.setClickEvent(o[a-3],o[a-2],o[a-1]),i.setTooltip(o[a-3],o[a]);break;case 63:this.$=o[a-3],i.setLink(o[a-2],o[a-1],o[a]);break;case 66:i.setCssClass(o[a-1],o[a])}},table:[{3:1,4:2,5:3,6:4,7:5,13:t,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:t,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:i},e([11,16],[2,7]),{5:23,7:5,13:t,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:r,37:o,39:s,40:a,51:l,52:c,54:d,58:u,72:h,73:f,74:g,75:p},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},e(m,[2,19],{26:[1,44]}),e(m,[2,21]),e(m,[2,22]),e(m,[2,23]),e(m,[2,24]),e(m,[2,25]),e(m,[2,26]),e(m,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:_,46:b,47:v,48:y,49:w,50:C}),{21:56,22:33,23:34,72:h,73:f,74:g,75:p},e(m,[2,36]),e(m,[2,37]),{22:57,72:h,73:f,74:g},{21:58,22:33,23:34,72:h,73:f,74:g,75:p},{21:59,22:33,23:34,72:h,73:f,74:g,75:p},{21:60,22:33,23:34,72:h,73:f,74:g,75:p},{42:[1,61]},e(S,[2,14],{22:33,23:34,21:62,24:[1,63],72:h,73:f,74:g,75:p}),e(S,[2,15],{24:[1,64]}),e(k,[2,80]),e(k,[2,81]),e(k,[2,82]),e([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),e(x,[2,4]),{9:65,16:i},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:t,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:r,37:o,39:s,40:a,51:l,52:c,54:d,58:u,72:h,73:f,74:g,75:p},e(m,[2,20]),{21:67,22:33,23:34,42:[1,68],72:h,73:f,74:g,75:p},{41:69,43:48,44:49,45:_,46:b,47:v,48:y,49:w,50:C},e(m,[2,35]),{44:70,49:w,50:C},e(L,[2,45],{43:71,45:_,46:b,47:v,48:y}),e(M,[2,46]),e(M,[2,47]),e(M,[2,48]),e(M,[2,49]),e(D,[2,50]),e(D,[2,51]),e(m,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:h,73:f,74:g},e(S,[2,16]),e(S,[2,17]),e(S,[2,18]),{10:[1,80]},{19:[2,13]},e(E,[2,38]),{21:81,22:33,23:34,72:h,73:f,74:g,75:p},{21:82,22:33,23:34,42:[1,83],72:h,73:f,74:g,75:p},e(L,[2,44],{43:84,45:_,46:b,47:v,48:y}),e(L,[2,43]),{22:85,72:h,73:f,74:g},{35:86,39:T},{21:88,22:33,23:34,72:h,73:f,74:g,75:p},e(m,[2,52],{42:[1,89]}),e(m,[2,54],{42:[1,91],53:[1,90]}),e(m,[2,58],{42:[1,92],56:[1,93]}),e(m,[2,62],{42:[1,95],53:[1,94]}),e(m,[2,66]),e(x,[2,5]),e(E,[2,40]),e(E,[2,39]),{21:96,22:33,23:34,72:h,73:f,74:g,75:p},e(L,[2,42]),e(m,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:T},e(m,[2,31]),e(m,[2,53]),e(m,[2,55]),e(m,[2,56],{53:[1,100]}),e(m,[2,59]),e(m,[2,60],{42:[1,101]}),e(m,[2,63]),e(m,[2,64],{53:[1,102]}),e(E,[2,41]),{35:103,39:T},e(m,[2,29]),{36:[2,33]},e(m,[2,57]),e(m,[2,61]),e(m,[2,65]),{36:[1,104]},e(m,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],i=[],r=[null],o=[],s=this.table,a="",l=0,c=0,d=0,u=2,h=1,f=o.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(p.yy[m]=this.yy[m]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var _=g.yylloc;o.push(_);var b=g.options&&g.options.ranges;function v(){var e;return"number"!=typeof(e=i.pop()||g.lex()||h)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,w,C,S,k,x,L,M,D,E={};;){if(C=n[n.length-1],this.defaultActions[C]?S=this.defaultActions[C]:(null==y&&(y=v()),S=s[C]&&s[C][y]),void 0===S||!S.length||!S[0]){var T="";for(x in D=[],s[C])this.terminals_[x]&&x>u&&D.push("'"+this.terminals_[x]+"'");T=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:_,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+y);switch(S[0]){case 1:n.push(y),r.push(g.yytext),o.push(g.yylloc),n.push(S[1]),y=null,w?(y=w,w=null):(c=g.yyleng,a=g.yytext,l=g.yylineno,_=g.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[S[1]][1],E.$=r[r.length-L],E._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},b&&(E._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[a,c,l,p.yy,S[1],r,o].concat(f))))return k;L&&(n=n.slice(0,-1*L*2),r=r.slice(0,-1*L),o=o.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),r.push(E.$),o.push(E._$),M=s[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;ot[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,r[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,i){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function I(){this.yy={}}return O.lexer=N,I.prototype=O,O.Parser=I,new I}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)},t.main=function(i){i[1]||(console.log("Usage: "+i[0]+" FILE"),e.exit(1));var r=n(/*! fs */"./node_modules/node-libs-browser/mock/empty.js").readFileSync(n(/*! path */"./node_modules/path-browserify/index.js").normalize(i[1]),"utf8");return t.parser.parse(r)},n.c[n.s]===i&&t.main(e.argv.slice(1))}).call(this,n(/*! ./../../../../node_modules/process/browser.js */"./node_modules/process/browser.js"),n(/*! ./../../../../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./src/diagrams/class/styles.js": +/*!**************************************!*\ + !*** ./src/diagrams/class/styles.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return svgLabel; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +var getStyles = function getStyles(options) { + return "g.classGroup text {\n fill: ".concat(options.nodeBorder, ";\n fill: ").concat(options.classText, ";\n stroke: none;\n font-family: ").concat(options.fontFamily, ";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(options.nodeBorder, ";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.classGroup line {\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(options.nodeBorder, ";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n"); }; -/* harmony default export */ __webpack_exports__["default"] = (createLabel); +/* harmony default export */ __webpack_exports__["default"] = (getStyles); /***/ }), -/***/ "./src/dagre-wrapper/edges.js": -/*!************************************!*\ - !*** ./src/dagre-wrapper/edges.js ***! - \************************************/ -/*! exports provided: clear, insertEdgeLabel, positionEdgeLabel, intersection, insertEdge */ +/***/ "./src/diagrams/class/svgDraw.js": +/*!***************************************!*\ + !*** ./src/diagrams/class/svgDraw.js ***! + \***************************************/ +/*! exports provided: drawEdge, drawClass, parseMember, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertEdgeLabel", function() { return insertEdgeLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionEdgeLabel", function() { return positionEdgeLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return intersection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertEdge", function() { return insertEdge; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ "./src/config.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils.js"); - // eslint-disable-line - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawEdge", function() { return drawEdge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawClass", function() { return drawClass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMember", function() { return parseMember; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); - // import { calcLabelPosition } from '../utils'; -var edgeLabels = {}; -var terminalLabels = {}; -var clear = function clear() { - edgeLabels = {}; - terminalLabels = {}; -}; -var insertEdgeLabel = function insertEdgeLabel(elem, edge) { - // Create the actual text element - var labelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__["default"])(edge.label, edge.labelStyle); // Create outer g, edgeLabel, this will be positioned after graph layout +var edgeCount = 0; +var drawEdge = function drawEdge(elem, path, relation, conf) { + var getRelationType = function getRelationType(type) { + switch (type) { + case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].AGGREGATION: + return 'aggregation'; - var edgeLabel = elem.insert('g').attr('class', 'edgeLabel'); // Create inner g, label, this will be positioned now for centering the text + case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].EXTENSION: + return 'extension'; - var label = edgeLabel.insert('g').attr('class', 'label'); - label.node().appendChild(labelElement); // Center the label + case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].COMPOSITION: + return 'composition'; - var bbox = labelElement.getBBox(); + case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].DEPENDENCY: + return 'dependency'; + } + }; - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var div = labelElement.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__["select"])(labelElement); - bbox = div.getBoundingClientRect(); - dv.attr('width', bbox.width); - dv.attr('height', bbox.height); - } + path.points = path.points.filter(function (p) { + return !Number.isNaN(p.y); + }); // The data for our line - label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')'); // Make element accessible by id for positioning + var lineData = path.points; // This is the accessor function we talked about above - edgeLabels[edge.id] = edgeLabel; // Update the abstract data of the edge with the new information about its width and height + var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { + return d.x; + }).y(function (d) { + return d.y; + }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); + var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation'); + var url = ''; - edge.width = bbox.width; - edge.height = bbox.height; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, '\\('); + url = url.replace(/\)/g, '\\)'); + } - if (edge.startLabelLeft) { - // Create the actual text element - var startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__["default"])(edge.startLabelLeft, edge.labelStyle); - var startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals'); - var inner = startEdgeLabelLeft.insert('g').attr('class', 'inner'); - inner.node().appendChild(startLabelElement); - var slBox = startLabelElement.getBBox(); - inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')'); + if (relation.relation.lineType == 1) { + svgPath.attr('class', 'relation dashed-line'); + } - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } + if (relation.relation.type1 !== 'none') { + svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')'); + } - terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + if (relation.relation.type2 !== 'none') { + svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')'); } - if (edge.startLabelRight) { - // Create the actual text element - var _startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__["default"])(edge.startLabelRight, edge.labelStyle); + var x, y; + var l = path.points.length; // Calculate Label position - var startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals'); + var labelPosition = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcLabelPosition(path.points); + x = labelPosition.x; + y = labelPosition.y; + var p1_card_x, p1_card_y; + var p2_card_x, p2_card_y; - var _inner = startEdgeLabelRight.insert('g').attr('class', 'inner'); + if (l % 2 !== 0 && l > 1) { + var cardinality_1_point = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcCardinalityPosition(relation.relation.type1 !== 'none', path.points, path.points[0]); + var cardinality_2_point = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcCardinalityPosition(relation.relation.type2 !== 'none', path.points, path.points[l - 1]); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point)); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point)); + p1_card_x = cardinality_1_point.x; + p1_card_y = cardinality_1_point.y; + p2_card_x = cardinality_2_point.x; + p2_card_y = cardinality_2_point.y; + } - startEdgeLabelRight.node().appendChild(_startLabelElement); + if (typeof relation.title !== 'undefined') { + var g = elem.append('g').attr('class', 'classLabel'); + var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title); + window.label = label; + var bounds = label.node().getBBox(); + g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding); + } - _inner.node().appendChild(_startLabelElement); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering relation ' + JSON.stringify(relation)); - var _slBox = _startLabelElement.getBBox(); + if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') { + var _g = elem.append('g').attr('class', 'cardinality'); - _inner.attr('transform', 'translate(' + -_slBox.width / 2 + ', ' + -_slBox.height / 2 + ')'); + _g.append('text').attr('class', 'type1').attr('x', p1_card_x).attr('y', p1_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle1); + } - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } + if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') { + var _g2 = elem.append('g').attr('class', 'cardinality'); - terminalLabels[edge.id].startRight = startEdgeLabelRight; + _g2.append('text').attr('class', 'type2').attr('x', p2_card_x).attr('y', p2_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle2); } - if (edge.endLabelLeft) { - // Create the actual text element - var endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__["default"])(edge.endLabelLeft, edge.labelStyle); - var endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals'); - - var _inner2 = endEdgeLabelLeft.insert('g').attr('class', 'inner'); + edgeCount++; +}; +var drawClass = function drawClass(elem, classDef, conf) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering class ' + classDef); + var id = classDef.id; + var classInfo = { + id: id, + label: classDef.id, + width: 0, + height: 0 + }; // add class group - _inner2.node().appendChild(endLabelElement); + var g = elem.append('g').attr('id', Object(_classDb__WEBPACK_IMPORTED_MODULE_1__["lookUpDomId"])(id)).attr('class', 'classGroup'); // add title - var _slBox2 = endLabelElement.getBBox(); + var title; - _inner2.attr('transform', 'translate(' + -_slBox2.width / 2 + ', ' + -_slBox2.height / 2 + ')'); + if (classDef.link) { + title = g.append('svg:a').attr('xlink:href', classDef.link).attr('target', classDef.linkTarget).append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0); + } else { + title = g.append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0); + } // add annotations - endEdgeLabelLeft.node().appendChild(endLabelElement); - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } + var isFirst = true; + classDef.annotations.forEach(function (member) { + var titleText2 = title.append('tspan').text('«' + member + '»'); + if (!isFirst) titleText2.attr('dy', conf.textHeight); + isFirst = false; + }); + var classTitleString = classDef.id; - terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + if (classDef.type !== undefined && classDef.type !== '') { + classTitleString += '<' + classDef.type + '>'; } - if (edge.endLabelRight) { - // Create the actual text element - var _endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__["default"])(edge.endLabelRight, edge.labelStyle); - - var endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals'); + var classTitle = title.append('tspan').text(classTitleString).attr('class', 'title'); // If class has annotations the title needs to have an offset of the text height - var _inner3 = endEdgeLabelRight.insert('g').attr('class', 'inner'); + if (!isFirst) classTitle.attr('dy', conf.textHeight); + var titleHeight = title.node().getBBox().height; + var membersLine = g.append('line') // text label for the x axis + .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2); + var members = g.append('text') // text label for the x axis + .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText'); + isFirst = true; + classDef.members.forEach(function (member) { + addTspan(members, member, isFirst, conf); + isFirst = false; + }); + var membersBox = members.node().getBBox(); + var methodsLine = g.append('line') // text label for the x axis + .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height); + var methods = g.append('text') // text label for the x axis + .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText'); + isFirst = true; + classDef.methods.forEach(function (method) { + addTspan(methods, method, isFirst, conf); + isFirst = false; + }); + var classBox = g.node().getBBox(); + var cssClassStr = ' '; - _inner3.node().appendChild(_endLabelElement); + if (classDef.cssClasses.length > 0) { + cssClassStr = cssClassStr + classDef.cssClasses.join(' '); + } - var _slBox3 = _endLabelElement.getBBox(); + var rect = g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr('class', cssClassStr); + var rectWidth = rect.node().getBBox().width; // Center title + // We subtract the width of each text element from the class box width and divide it by 2 - _inner3.attr('transform', 'translate(' + -_slBox3.width / 2 + ', ' + -_slBox3.height / 2 + ')'); + title.node().childNodes.forEach(function (x) { + x.setAttribute('x', (rectWidth - x.getBBox().width) / 2); + }); - endEdgeLabelRight.node().appendChild(_endLabelElement); + if (classDef.tooltip) { + title.insert('title').text(classDef.tooltip); + } - if (!terminalLabels[edge.id]) { - terminalLabels[edge.id] = {}; - } + membersLine.attr('x2', rectWidth); + methodsLine.attr('x2', rectWidth); + classInfo.width = rectWidth; + classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; + return classInfo; +}; +var parseMember = function parseMember(text) { + var fieldRegEx = /(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/; + var methodRegEx = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/; + var fieldMatch = text.match(fieldRegEx); + var methodMatch = text.match(methodRegEx); - terminalLabels[edge.id].endRight = endEdgeLabelRight; + if (fieldMatch && !methodMatch) { + return buildFieldDisplay(fieldMatch); + } else if (methodMatch) { + return buildMethodDisplay(methodMatch); + } else { + return buildLegacyDisplay(text); } }; -var positionEdgeLabel = function positionEdgeLabel(edge, paths) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Moving label', edge.id, edge.label, edgeLabels[edge.id]); - var path = paths.updatedPath ? paths.updatedPath : paths.originalPath; - if (edge.label) { - var el = edgeLabels[edge.id]; - var x = edge.x; - var y = edge.y; - - if (path) { - // // debugger; - var pos = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcLabelPosition(path); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ')'); // x = pos.x; - // y = pos.y; - } +var buildFieldDisplay = function buildFieldDisplay(parsedText) { + var displayText = ''; - el.attr('transform', 'translate(' + x + ', ' + y + ')'); - } //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + try { + var visibility = parsedText[1] ? parsedText[1].trim() : ''; + var fieldType = parsedText[2] ? parsedText[2].trim() : ''; + var genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : ''; + var fieldName = parsedText[4] ? parsedText[4].trim() : ''; + displayText = visibility + fieldType + genericType + ' ' + fieldName; + } catch (err) { + displayText = parsedText; + } + return { + displayText: displayText, + cssStyle: '' + }; +}; - if (edge.startLabelLeft) { - var _el = terminalLabels[edge.id].startLeft; - var _x = edge.x; - var _y = edge.y; +var buildMethodDisplay = function buildMethodDisplay(parsedText) { + var cssStyle = ''; + var displayText = ''; - if (path) { - // debugger; - var _pos = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'start_left', path); + try { + var visibility = parsedText[1] ? parsedText[1].trim() : ''; + var methodName = parsedText[2] ? parsedText[2].trim() : ''; + var parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : ''; + var classifier = parsedText[4] ? parsedText[4].trim() : ''; + var returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : ''; + displayText = visibility + methodName + '(' + parameters + ')' + returnType; + cssStyle = parseClassifier(classifier); + } catch (err) { + displayText = parsedText; + } - _x = _pos.x; - _y = _pos.y; - } + return { + displayText: displayText, + cssStyle: cssStyle + }; +}; - _el.attr('transform', 'translate(' + _x + ', ' + _y + ')'); - } +var buildLegacyDisplay = function buildLegacyDisplay(text) { + // if for some reason we dont have any match, use old format to parse text + var displayText = ''; + var cssStyle = ''; + var memberText = ''; + var returnType = ''; + var methodStart = text.indexOf('('); + var methodEnd = text.indexOf(')'); - if (edge.startLabelRight) { - var _el2 = terminalLabels[edge.id].startRight; - var _x2 = edge.x; - var _y2 = edge.y; + if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) { + var visibility = ''; + var methodName = ''; + var firstChar = text.substring(0, 1); - if (path) { - // debugger; - var _pos2 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'start_right', path); + if (firstChar.match(/\w/)) { + methodName = text.substring(0, methodStart).trim(); + } else { + if (firstChar.match(/\+|-|~|#/)) { + visibility = firstChar; + } - _x2 = _pos2.x; - _y2 = _pos2.y; + methodName = text.substring(1, methodStart).trim(); } - _el2.attr('transform', 'translate(' + _x2 + ', ' + _y2 + ')'); - } - - if (edge.endLabelLeft) { - var _el3 = terminalLabels[edge.id].endLeft; - var _x3 = edge.x; - var _y3 = edge.y; + var parameters = text.substring(methodStart + 1, methodEnd); + var classifier = text.substring(methodEnd + 1, 1); + cssStyle = parseClassifier(classifier); + displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')'; - if (path) { - // debugger; - var _pos3 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'end_left', path); + if (methodEnd < memberText.length) { + returnType = text.substring(methodEnd + 2).trim(); - _x3 = _pos3.x; - _y3 = _pos3.y; + if (returnType !== '') { + returnType = ' : ' + parseGenericTypes(returnType); + } } - - _el3.attr('transform', 'translate(' + _x3 + ', ' + _y3 + ')'); + } else { + // finally - if all else fails, just send the text back as written (other than parsing for generic types) + displayText = parseGenericTypes(text); } - if (edge.endLabelRight) { - var _el4 = terminalLabels[edge.id].endRight; - var _x4 = edge.x; - var _y4 = edge.y; + return { + displayText: displayText, + cssStyle: cssStyle + }; +}; - if (path) { - // debugger; - var _pos4 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'end_right', path); +var addTspan = function addTspan(textEl, txt, isFirst, conf) { + var member = parseMember(txt); + var tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText); - _x4 = _pos4.x; - _y4 = _pos4.y; - } + if (member.cssStyle !== '') { + tSpan.attr('style', member.cssStyle); + } - _el4.attr('transform', 'translate(' + _x4 + ', ' + _y4 + ')'); + if (!isFirst) { + tSpan.attr('dy', conf.textHeight); } -}; // const getRelationType = function(type) { -// switch (type) { -// case stateDb.relationType.AGGREGATION: -// return 'aggregation'; -// case stateDb.relationType.EXTENSION: -// return 'extension'; -// case stateDb.relationType.COMPOSITION: -// return 'composition'; -// case stateDb.relationType.DEPENDENCY: -// return 'dependency'; -// } -// }; +}; -var outsideNode = function outsideNode(node, point) { - // log.warn('Checking bounds ', node, point); - var x = node.x; - var y = node.y; - var dx = Math.abs(point.x - x); - var dy = Math.abs(point.y - y); - var w = node.width / 2; - var h = node.height / 2; +var parseGenericTypes = function parseGenericTypes(text) { + var cleanedText = text; - if (dx >= w || dy >= h) { - return true; + if (text.indexOf('~') != -1) { + cleanedText = cleanedText.replace('~', '<'); + cleanedText = cleanedText.replace('~', '>'); + return parseGenericTypes(cleanedText); + } else { + return cleanedText; } - - return false; }; -var intersection = function intersection(node, outsidePoint, insidePoint) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('intersection calc o:', outsidePoint, ' i:', insidePoint, node); - var x = node.x; - var y = node.y; - var dx = Math.abs(x - insidePoint.x); - var w = node.width / 2; - var r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; - var h = node.height / 2; - var edges = { - x1: x - w, - x2: x + w, - y1: y - h, - y2: y + h - }; +var parseClassifier = function parseClassifier(classifier) { + switch (classifier) { + case '*': + return 'font-style:italic;'; - if (outsidePoint.x === edges.x1 || outsidePoint.x === edges.x2 || outsidePoint.y === edges.y1 || outsidePoint.y === edges.y2) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('calc equals on edge'); - return outsidePoint; + case '$': + return 'text-decoration:underline;'; + + default: + return ''; } +}; - var Q = Math.abs(outsidePoint.y - insidePoint.y); - var R = Math.abs(outsidePoint.x - insidePoint.x); // log.warn(); +/* harmony default export */ __webpack_exports__["default"] = ({ + drawClass: drawClass, + drawEdge: drawEdge, + parseMember: parseMember +}); - if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { - // eslint-disable-line - // Intersection is top or bottom of rect. - // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - var q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; - r = R * q / Q; - var res = { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - r, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - q - }; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn("topp/bott calc, Q ".concat(Q, ", q ").concat(q, ", R ").concat(R, ", r ").concat(r), res); - return res; - } else { - // Intersection onn sides of rect - // q = (Q * r) / R; - // q = 2; - // r = (R * q) / Q; - if (insidePoint.x < outsidePoint.x) { - r = outsidePoint.x - w - x; - } else { - // r = outsidePoint.x - w - x; - r = x - w - outsidePoint.x; - } +/***/ }), + +/***/ "./src/diagrams/common/common.js": +/*!***************************************!*\ + !*** ./src/diagrams/common/common.js ***! + \***************************************/ +/*! exports provided: getRows, removeScript, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, default */function(e,t,n){"use strict";n.r(t),n.d(t,"getRows",(function(){return i})),n.d(t,"removeScript",(function(){return r})),n.d(t,"sanitizeText",(function(){return o})),n.d(t,"lineBreakRegex",(function(){return s})),n.d(t,"hasBreaks",(function(){return a})),n.d(t,"splitBreaks",(function(){return l}));var i=function(e){if(!e)return 1;var t=c(e);return(t=t.replace(/\\n/g,"#br#")).split("#br#")},r=function(e){for(var t="",n=0;n>=0;){if(!((n=e.indexOf("=0)){t+=e,n=-1;break}t+=e.substr(0,n),(n=(e=e.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,e=e.substr(n))}return t},o=function(e,t){var n=e,i=!0;if(!t.flowchart||!1!==t.flowchart.htmlLabels&&"false"!==t.flowchart.htmlLabels||(i=!1),i){var o=t.securityLevel;"antiscript"===o?n=r(n):"loose"!==o&&(n=(n=(n=c(n)).replace(//g,">")).replace(/=/g,"="),n=d(n))}return n},s=//gi,a=function(e){return//gi.test(e)},l=function(e){return e.split(//gi)},c=function(e){return e.replace(s,"#br#")},d=function(e){return e.replace(/#br#/g,"
")};t.default={getRows:i,sanitizeText:o,hasBreaks:a,splitBreaks:l,lineBreakRegex:s,removeScript:r,getUrl:function(e){var t="";return e&&(t=(t=(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),t}}},"./src/diagrams/er/erDb.js": +/*!*********************************!*\ + !*** ./src/diagrams/er/erDb.js ***! + \*********************************/ +/*! exports provided: parseDirective, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/** + * + */ - var _q = _q = Q * r / R; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn("sides calc, Q ".concat(Q, ", q ").concat(_q, ", R ").concat(R, ", r ").concat(r), { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + _q : insidePoint.y - _q - }); - return { - x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w, - y: insidePoint.y < outsidePoint.y ? insidePoint.y + _q : insidePoint.y - _q + +var entities = {}; +var relationships = []; +var title = ''; +var Cardinality = { + ZERO_OR_ONE: 'ZERO_OR_ONE', + ZERO_OR_MORE: 'ZERO_OR_MORE', + ONE_OR_MORE: 'ONE_OR_MORE', + ONLY_ONE: 'ONLY_ONE' +}; +var Identification = { + NON_IDENTIFYING: 'NON_IDENTIFYING', + IDENTIFYING: 'IDENTIFYING' +}; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parseDirective(this, statement, context, type); +}; + +var addEntity = function addEntity(name) { + if (typeof entities[name] === 'undefined') { + entities[name] = { + attributes: [] }; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Added new entity :', name); } -}; //(edgePaths, e, edge, clusterDb, diagramtype, graph) - -var insertEdge = function insertEdge(elem, e, edge, clusterDb, diagramType, graph) { - var points = edge.points; - var pointsHasChanged = false; - var tail = graph.node(e.v); - var head = graph.node(e.w); - - if (head.intersect && tail.intersect) { - points = points.slice(1, edge.points.length - 1); - points.unshift(tail.intersect(points[0])); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Last point', points[points.length - 1], head, head.intersect(points[points.length - 1])); - points.push(head.intersect(points[points.length - 1])); - } - - if (edge.toCluster) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('edge', edge); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('to cluster', clusterDb[edge.toCluster]); - points = []; - var lastPointOutside; - var isInside = false; - edge.points.forEach(function (point) { - var node = clusterDb[edge.toCluster].node; - - if (!outsideNode(node, point) && !isInside) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('inside', edge.toCluster, point, lastPointOutside); // First point inside the rect - - var inter = intersection(node, lastPointOutside, point); - var pointPresent = false; - points.forEach(function (p) { - pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; - }); // if (!pointPresent) { - - if (!points.find(function (e) { - return e.x === inter.x && e.y === inter.y; - })) { - points.push(inter); - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('no intersect', inter, points); - } - isInside = true; - } else { - if (!isInside) points.push(point); - } + return entities[name]; +}; - lastPointOutside = point; - }); - pointsHasChanged = true; +var getEntities = function getEntities() { + return entities; +}; + +var addAttributes = function addAttributes(entityName, attribs) { + var entity = addEntity(entityName); // May do nothing (if entity has already been added) + // Process attribs in reverse order due to effect of recursive construction (last attribute is first) + + var i; + + for (i = attribs.length - 1; i >= 0; i--) { + entity.attributes.push(attribs[i]); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added attribute ', attribs[i].attributeName); } +}; +/** + * Add a relationship + * @param entA The first entity in the relationship + * @param rolA The role played by the first entity in relation to the second + * @param entB The second entity in the relationship + * @param rSpec The details of the relationship between the two entities + */ - if (edge.fromCluster) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('edge', edge); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('from cluster', clusterDb[edge.fromCluster]); - var updatedPoints = []; - var _lastPointOutside; +var addRelationship = function addRelationship(entA, rolA, entB, rSpec) { + var rel = { + entityA: entA, + roleA: rolA, + entityB: entB, + relSpec: rSpec + }; + relationships.push(rel); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added new relationship :', rel); +}; - var _isInside = false; +var getRelationships = function getRelationships() { + return relationships; +}; // Keep this - TODO: revisit...allow the diagram to have a title - for (var i = points.length - 1; i >= 0; i--) { - var point = points[i]; - var node = clusterDb[edge.fromCluster].node; - if (!outsideNode(node, point) && !_isInside) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('inside', edge.fromCluster, point, node); // First point inside the rect +var setTitle = function setTitle(txt) { + title = txt; +}; - var insterection = intersection(node, _lastPointOutside, point); // log.trace('intersect', intersection(node, lastPointOutside, point)); +var getTitle = function getTitle() { + return title; +}; - updatedPoints.unshift(insterection); // points.push(insterection); +var clear = function clear() { + entities = {}; + relationships = []; + title = ''; +}; - _isInside = true; - } else { - // at the outside - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Outside point', point); - if (!_isInside) updatedPoints.unshift(point); - } +/* harmony default export */ __webpack_exports__["default"] = ({ + Cardinality: Cardinality, + Identification: Identification, + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().er; + }, + addEntity: addEntity, + addAttributes: addAttributes, + getEntities: getEntities, + addRelationship: addRelationship, + getRelationships: getRelationships, + clear: clear, + setTitle: setTitle, + getTitle: getTitle +}); - _lastPointOutside = point; - } +/***/ }), - points = updatedPoints; - pointsHasChanged = true; - } // The data for our line +/***/ "./src/diagrams/er/erMarkers.js": +/*!**************************************!*\ + !*** ./src/diagrams/er/erMarkers.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +var ERMarkers = { + ONLY_ONE_START: 'ONLY_ONE_START', + ONLY_ONE_END: 'ONLY_ONE_END', + ZERO_OR_ONE_START: 'ZERO_OR_ONE_START', + ZERO_OR_ONE_END: 'ZERO_OR_ONE_END', + ONE_OR_MORE_START: 'ONE_OR_MORE_START', + ONE_OR_MORE_END: 'ONE_OR_MORE_END', + ZERO_OR_MORE_START: 'ZERO_OR_MORE_START', + ZERO_OR_MORE_END: 'ZERO_OR_MORE_END' +}; +/** + * Put the markers into the svg DOM for later use with edge paths + */ - var lineData = points.filter(function (p) { - return !Number.isNaN(p.y); - }); // This is the accessor function we talked about above +var insertMarkers = function insertMarkers(elem, conf) { + var marker; + elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18 M15,0 L15,18'); + elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_END).attr('refX', 18).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,0 L3,18 M9,0 L9,18'); + marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto'); + marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 21).attr('cy', 9).attr('r', 6); + marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18'); + marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_END).attr('refX', 30).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto'); + marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 9).attr('r', 6); + marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18'); + elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27'); + elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_END).attr('refX', 27).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18'); + marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto'); + marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 48).attr('cy', 18).attr('r', 6); + marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18'); + marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_END).attr('refX', 39).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto'); + marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 18).attr('r', 6); + marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18'); + return; +}; - var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_2__["line"])().x(function (d) { - return d.x; - }).y(function (d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_2__["curveBasis"]); // Contruct stroke classes based on properties +/* harmony default export */ __webpack_exports__["default"] = ({ + ERMarkers: ERMarkers, + insertMarkers: insertMarkers +}); - var strokeClasses; +/***/ }), - switch (edge.thickness) { - case 'normal': - strokeClasses = 'edge-thickness-normal'; - break; +/***/ "./src/diagrams/er/erRenderer.js": +/*!***************************************!*\ + !*** ./src/diagrams/er/erRenderer.js ***! + \***************************************/ +/*! exports provided: setConf, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - case 'thick': - strokeClasses = 'edge-thickness-thick'; - break; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _erDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./erDb */ "./src/diagrams/er/erDb.js"); +/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/erDiagram */ "./src/diagrams/er/parser/erDiagram.jison"); +/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dagre */ "dagre"); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _erMarkers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./erMarkers */ "./src/diagrams/er/erMarkers.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - default: - strokeClasses = ''; - } - switch (edge.pattern) { - case 'solid': - strokeClasses += ' edge-pattern-solid'; - break; - case 'dotted': - strokeClasses += ' edge-pattern-dotted'; - break; - case 'dashed': - strokeClasses += ' edge-pattern-dashed'; - break; - } - var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', edge.id).attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : '')).attr('style', edge.style); // DEBUG code, adds a red circle at each edge coordinate - // edge.points.forEach(point => { - // elem - // .append('circle') - // .style('stroke', 'red') - // .style('fill', 'red') - // .attr('r', 1) - // .attr('cx', point.x) - // .attr('cy', point.y); - // }); - var url = ''; - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().state.arrowMarkerAbsolute) { - url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('arrowTypeStart', edge.arrowTypeStart); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('arrowTypeEnd', edge.arrowTypeEnd); - switch (edge.arrowTypeStart) { - case 'arrow_cross': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')'); - break; +var conf = {}; +/** + * Allows the top-level API module to inject config specific to this renderer, + * storing it in the local conf object. Note that generic config still needs to be + * retrieved using getConfig() imported from the config module + */ - case 'arrow_point': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')'); - break; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); - case 'arrow_barb': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')'); - break; + for (var i = 0; i < keys.length; i++) { + conf[keys[i]] = cnf[keys[i]]; + } +}; +/** + * Draw attributes for an entity + * @param groupNode the svg group node for the entity + * @param entityTextNode the svg node for the entity label text + * @param attributes an array of attributes defined for the entity (each attribute has a type and a name) + * @return the bounding box of the entity, after attributes have been added + */ - case 'arrow_circle': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')'); - break; +var drawAttributes = function drawAttributes(groupNode, entityTextNode, attributes) { + var heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes - case 'aggregation': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')'); - break; + var widthPadding = conf.entityPadding / 3; // Ditto - case 'extension': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')'); - break; + var attrFontSize = conf.fontSize * 0.85; + var labelBBox = entityTextNode.node().getBBox(); + var attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass - case 'composition': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')'); - break; + var maxTypeWidth = 0; + var maxNameWidth = 0; + var cumulativeHeight = labelBBox.height + heightPadding * 2; + var attrNum = 1; + attributes.forEach(function (item) { + var attrPrefix = "".concat(entityTextNode.node().id, "-attr-").concat(attrNum); // Add a text node for the attribute type - case 'dependency': - svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')'); - break; + var typeNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', "".concat(attrPrefix, "-type")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeType); // Add a text node for the attribute name - default: - } + var nameNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', "".concat(attrPrefix, "-name")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeName); // Keep a reference to the nodes so that we can iterate through them later - switch (edge.arrowTypeEnd) { - case 'arrow_cross': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')'); - break; + attributeNodes.push({ + tn: typeNode, + nn: nameNode + }); + var typeBBox = typeNode.node().getBBox(); + var nameBBox = nameNode.node().getBBox(); + maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); + maxNameWidth = Math.max(maxNameWidth, nameBBox.width); + cumulativeHeight += Math.max(typeBBox.height, nameBBox.height) + heightPadding * 2; + attrNum += 1; + }); // Calculate the new bounding box of the overall entity, now that attributes have been added - case 'arrow_point': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')'); - break; + var bBox = { + width: Math.max(conf.minEntityWidth, Math.max(labelBBox.width + conf.entityPadding * 2, maxTypeWidth + maxNameWidth + widthPadding * 4)), + height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) + }; // There might be some spare width for padding out attributes if the entity name is very long - case 'arrow_barb': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')'); - break; + var spareWidth = Math.max(0, bBox.width - (maxTypeWidth + maxNameWidth) - widthPadding * 4); - case 'arrow_circle': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')'); - break; + if (attributes.length > 0) { + // Position the entity label near the top of the entity bounding box + entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'); // Add rectangular boxes for the attribute types/names - case 'aggregation': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')'); - break; + var heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label - case 'extension': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')'); - break; + var attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect - case 'composition': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')'); - break; + attributeNodes.forEach(function (nodePair) { + // Calculate the alignment y co-ordinate for the type/name of the attribute + var alignY = heightOffset + heightPadding + Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) / 2; // Position the type of the attribute - case 'dependency': - svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')'); - break; + nodePair.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')'); // Insert a rectangle for the type - default: - } + var typeRect = groupNode.insert('rect', '#' + nodePair.tn.node().id).attr('class', "er ".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', heightOffset).attr('width', maxTypeWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.tn.node().getBBox().height + heightPadding * 2); // Position the name of the attribute + + nodePair.nn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name + + groupNode.insert('rect', '#' + nodePair.nn.node().id).attr('class', "er ".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', "".concat(typeRect.attr('x') + typeRect.attr('width'))) //.attr('x', maxTypeWidth + (widthPadding * 2)) + .attr('y', heightOffset).attr('width', maxNameWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.nn.node().getBBox().height + heightPadding * 2); // Increment the height offset to move to the next row + + heightOffset += Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) + heightPadding * 2; // Flip the attribute style for row banding - var paths = {}; + attribStyle = attribStyle == 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd'; + }); + } else { + // Ensure the entity box is a decent size without any attributes + bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); // Position the entity label in the middle of the box - if (pointsHasChanged) { - paths.updatedPath = points; + entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')'); } - paths.originalPath = edge.points; - return paths; + return bBox; }; +/** + * Use D3 to construct the svg elements for the entities + * @param svgNode the svg node that contains the diagram + * @param entities The entities to be drawn + * @param graph The graph that contains the vertex and edge definitions post-layout + * @return The first entity that was inserted + */ -/***/ }), -/***/ "./src/dagre-wrapper/index.js": -/*!************************************!*\ - !*** ./src/dagre-wrapper/index.js ***! - \************************************/ -/*! exports provided: render */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var drawEntities = function drawEntities(svgNode, entities, graph) { + var keys = Object.keys(entities); + var firstOne; + keys.forEach(function (id) { + // Create a group for each entity + var groupNode = svgNode.append('g').attr('id', id); + firstOne = firstOne === undefined ? id : firstOne; // Label the entity - this is done first so that we can get the bounding box + // which then determines the size of the rectangle -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre */ "dagre"); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./markers */ "./src/dagre-wrapper/markers.js"); -/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js"); -/* harmony import */ var _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mermaid-graphlib */ "./src/dagre-wrapper/mermaid-graphlib.js"); -/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes */ "./src/dagre-wrapper/nodes.js"); -/* harmony import */ var _clusters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clusters */ "./src/dagre-wrapper/clusters.js"); -/* harmony import */ var _edges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edges */ "./src/dagre-wrapper/edges.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); + var textId = 'entity-' + id; + var textNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id); + var _drawAttributes = drawAttributes(groupNode, textNode, entities[id].attributes), + entityWidth = _drawAttributes.width, + entityHeight = _drawAttributes.height; // Draw the rectangle - insert it before the text so that the text is not obscured + var rectNode = groupNode.insert('rect', '#' + textId).attr('class', 'er entityBox').attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight); + var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph + graph.setNode(id, { + width: rectBBox.width, + height: rectBBox.height, + shape: 'rect', + id: id + }); + }); + return firstOne; +}; // drawEntities +var adjustEntities = function adjustEntities(svgNode, graph) { + graph.nodes().forEach(function (v) { + if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') { + svgNode.select('#' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y - graph.node(v).height / 2) + ' )'); + } + }); + return; +}; +var getEdgeName = function getEdgeName(rel) { + return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ''); +}; +/** + * Add each relationship to the graph + * @param relationships the relationships to be added + * @param g the graph + * @return {Array} The array of relationships + */ +var addRelationships = function addRelationships(relationships, g) { + relationships.forEach(function (r) { + g.setEdge(r.entityA, r.entityB, { + relationship: r + }, getEdgeName(r)); + }); + return relationships; +}; // addRelationships -var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parentCluster) { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Graph in recursive render: XXX', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), parentCluster); - var dir = graph.graph().rankdir; - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Dir in recursive render - dir:', dir); - var elem = _elem.insert('g').attr('class', 'root'); // eslint-disable-line +var relCnt = 0; +/** + * Draw a relationship using edge information from the graph + * @param svg the svg node + * @param rel the relationship to draw in the svg + * @param g the graph containing the edge information + * @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes) + */ +var drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g, insert) { + relCnt++; // Find the edge relating to this relationship - if (!graph.nodes()) { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('No nodes found for', graph); - } else { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Recursive render XXX', graph.nodes()); - } + var edge = g.edge(rel.entityA, rel.entityB, getEdgeName(rel)); // Get a function that will generate the line path - if (graph.edges().length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Recursive edges', graph.edge(graph.edges()[0])); - } + var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_1__["line"])().x(function (d) { + return d.x; + }).y(function (d) { + return d.y; + }).curve(d3__WEBPACK_IMPORTED_MODULE_1__["curveBasis"]); // Insert the line at the right place - var clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line + var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary - var edgePaths = elem.insert('g').attr('class', 'edgePaths'); - var edgeLabels = elem.insert('g').attr('class', 'edgeLabels'); - var nodes = elem.insert('g').attr('class', 'nodes'); // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated - // to the abstract node and is later used by dagre for the layout + if (rel.relSpec.relType === _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Identification.NON_IDENTIFYING) { + svgPath.attr('stroke-dasharray', '8,8'); + } // TODO: Understand this better - graph.nodes().forEach(function (v) { - var node = graph.node(v); - if (typeof parentCluster !== 'undefined') { - var data = JSON.parse(JSON.stringify(parentCluster.clusterData)); // data.clusterPositioning = true; + var url = ''; - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Setting data for cluster XXX (', v, ') ', data, parentCluster); - graph.setNode(parentCluster.id, data); + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, '\\('); + url = url.replace(/\)/g, '\\)'); + } // Decide which start and end markers it needs. It may be possible to be more concise here + // by reversing a start marker to make an end marker...but this will do for now + // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start - if (!graph.parent(v)) { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Setting parent', v, parentCluster.id); - graph.setParent(v, parentCluster.id, data); - } - } - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v))); + switch (rel.relSpec.cardA) { + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_ONE: + svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_ONE_END + ')'); + break; - if (node && node.clusterNode) { - // const children = graph.children(v); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Cluster identified', v, node, graph.node(v)); - var newEl = recursiveRender(nodes, node.graph, diagramtype, graph.node(v)); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__["updateNodeBounds"])(node, newEl); - Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["setNodeElem"])(newEl, node); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Recursive render complete', newEl, node); - } else { - if (graph.children(v).length > 0) { - // This is a cluster but not to be rendered recusively - // Render as before - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Cluster - the non recursive path XXX', v, node.id, node, graph); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph)); - _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][node.id] = { - id: Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["findNonClusterChild"])(node.id, graph), - node: node - }; // insertCluster(clusters, graph.node(v)); - } else { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Node - the non recursive path', v, node.id, node); - Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["insertNode"])(nodes, graph.node(v), dir); - } - } - }); // Insert labels, this will insert them into the dom so that the width can be calculated - // Also figure out which edges point to/from clusters and adjust them accordingly - // Edges from/to clusters really points to the first child in the cluster. - // TODO: pick optimal child in the cluster to us as link anchor - - graph.edges().forEach(function (e) { - var edge = graph.edge(e.v, e.w, e.name); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster - - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][e.w]); - Object(_edges__WEBPACK_IMPORTED_MODULE_7__["insertEdgeLabel"])(edgeLabels, edge); - }); - graph.edges().forEach(function (e) { - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); - }); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('#############################################'); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('### Layout ###'); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('#############################################'); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info(graph); - dagre__WEBPACK_IMPORTED_MODULE_0___default.a.layout(graph); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place - - Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["sortNodesByHierarchy"])(graph).forEach(function (v) { - var node = graph.node(v); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Position ' + v + ': ' + JSON.stringify(graph.node(v))); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Position ' + v + ': (' + node.x, ',' + node.y, ') width: ', node.width, ' height: ', node.height); - - if (node && node.clusterNode) { - // clusterDb[node.id].node = node; - Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["positionNode"])(node); - } else { - // Non cluster node - if (graph.children(v).length > 0) { - // A cluster in the non-recurive way - // positionCluster(node); - Object(_clusters__WEBPACK_IMPORTED_MODULE_6__["insertCluster"])(clusters, node); - _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"][node.id].node = node; - } else { - Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["positionNode"])(node); - } - } - }); // Move the edge labels to the correct place after layout - - graph.edges().forEach(function (e) { - var edge = graph.edge(e); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge); - var paths = Object(_edges__WEBPACK_IMPORTED_MODULE_7__["insertEdge"])(edgePaths, e, edge, _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clusterDb"], diagramtype, graph); - Object(_edges__WEBPACK_IMPORTED_MODULE_7__["positionEdgeLabel"])(edge, paths); - }); - return elem; -}; - -var render = function render(elem, graph, markers, diagramtype, id) { - Object(_markers__WEBPACK_IMPORTED_MODULE_2__["default"])(elem, markers, diagramtype, id); - Object(_nodes__WEBPACK_IMPORTED_MODULE_5__["clear"])(); - Object(_edges__WEBPACK_IMPORTED_MODULE_7__["clear"])(); - Object(_clusters__WEBPACK_IMPORTED_MODULE_6__["clear"])(); - Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["clear"])(); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Graph at first:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); - Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__["adjustClustersAndEdges"])(graph); - _logger__WEBPACK_IMPORTED_MODULE_8__["log"].warn('Graph after:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph)); - - recursiveRender(elem, graph, diagramtype); -}; // const shapeDefinitions = {}; -// export const addShape = ({ shapeType: fun }) => { -// shapeDefinitions[shapeType] = fun; -// }; -// const arrowDefinitions = {}; -// export const addArrow = ({ arrowType: fun }) => { -// arrowDefinitions[arrowType] = fun; -// }; - -/***/ }), - -/***/ "./src/dagre-wrapper/intersect/index.js": -/*!**********************************************!*\ - !*** ./src/dagre-wrapper/intersect/index.js ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-node.js */ "./src/dagre-wrapper/intersect/intersect-node.js"); -/* harmony import */ var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_intersect_node_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intersect-circle.js */ "./src/dagre-wrapper/intersect/intersect-circle.js"); -/* harmony import */ var _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./intersect-ellipse.js */ "./src/dagre-wrapper/intersect/intersect-ellipse.js"); -/* harmony import */ var _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./intersect-polygon.js */ "./src/dagre-wrapper/intersect/intersect-polygon.js"); -/* harmony import */ var _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect-rect.js */ "./src/dagre-wrapper/intersect/intersect-rect.js"); -/* - * Borrowed with love from from dagrge-d3. Many thanks to cpettitt! - */ - - - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - node: _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default.a, - circle: _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], - ellipse: _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__["default"], - polygon: _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__["default"], - rect: _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__["default"] -}); - -/***/ }), - -/***/ "./src/dagre-wrapper/intersect/intersect-circle.js": -/*!*********************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-circle.js ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-ellipse */ "./src/dagre-wrapper/intersect/intersect-ellipse.js"); - - -function intersectCircle(node, rx, point) { - return Object(_intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__["default"])(node, rx, rx, point); -} - -/* harmony default export */ __webpack_exports__["default"] = (intersectCircle); + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_MORE: + svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_MORE_END + ')'); + break; -/***/ }), + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONE_OR_MORE: + svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONE_OR_MORE_END + ')'); + break; -/***/ "./src/dagre-wrapper/intersect/intersect-ellipse.js": -/*!**********************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-ellipse.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONLY_ONE: + svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONLY_ONE_END + ')'); + break; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -function intersectEllipse(node, rx, ry, point) { - // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html - var cx = node.x; - var cy = node.y; - var px = cx - point.x; - var py = cy - point.y; - var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); - var dx = Math.abs(rx * ry * px / det); + switch (rel.relSpec.cardB) { + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_ONE: + svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_ONE_START + ')'); + break; - if (point.x < cx) { - dx = -dx; - } + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_MORE: + svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_MORE_START + ')'); + break; - var dy = Math.abs(rx * ry * py / det); + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONE_OR_MORE: + svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONE_OR_MORE_START + ')'); + break; - if (point.y < cy) { - dy = -dy; - } + case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONLY_ONE: + svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONLY_ONE_START + ')'); + break; + } // Now label the relationship + // Find the half-way point - return { - x: cx + dx, - y: cy + dy - }; -} -/* harmony default export */ __webpack_exports__["default"] = (intersectEllipse); + var len = svgPath.node().getTotalLength(); + var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label -/***/ }), + var labelId = 'rel' + relCnt; + var labelNode = svg.append('text').attr('class', 'er relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be -/***/ "./src/dagre-wrapper/intersect/intersect-line.js": -/*!*******************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-line.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* - * Returns the point at which two lines, p and q, intersect or returns - * undefined if they do not intersect. + svg.insert('rect', '#' + labelId).attr('class', 'er relationshipLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%'); + return; +}; +/** + * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram + * @param text the text of the diagram + * @param id the unique id of the DOM node that contains the diagram */ -function intersectLine(p1, p2, q1, q2) { - // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, - // p7 and p473. - var a1, a2, b1, b2, c1, c2; - var r1, r2, r3, r4; - var denom, offset, num; - var x, y; // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + - // b1 y + c1 = 0. - - a1 = p2.y - p1.y; - b1 = p1.x - p2.x; - c1 = p2.x * p1.y - p1.x * p2.y; // Compute r3 and r4. - r3 = a1 * q1.x + b1 * q1.y + c1; - r4 = a1 * q2.x + b1 * q2.y + c1; // Check signs of r3 and r4. If both point 3 and point 4 lie on - // same side of line 1, the line segments do not intersect. - if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { - return; - } // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 +var draw = function draw(text, id) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Drawing ER diagram'); + _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + var parser = _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _erDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the text to populate erDb + try { + parser.parse(text); + } catch (err) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].debug('Parsing failed'); + } // Get a reference to the svg node that contains the text - a2 = q2.y - q1.y; - b2 = q1.x - q2.x; - c2 = q2.x * q1.y - q1.x * q2.y; // Compute r1 and r2 - r1 = a2 * p1.x + b2 * p1.y + c2; - r2 = a2 * p2.x + b2 * p2.y + c2; // Check signs of r1 and r2. If both point 1 and point 2 lie - // on same side of second line segment, the line segments do - // not intersect. + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id='".concat(id, "']")); // Add cardinality marker definitions to the svg - if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { - return; - } // Line segments intersect: compute intersection point. + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].insertMarkers(svg, conf); // Now we have to construct the diagram in a specific way: + // --- + // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content) + // 2. Make sure they are all added to the graph + // 3. Add all the edges (relationships) to the graph aswell + // 4. Let dagre do its magic to layout the graph. This assigns: + // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships + // - the path co-ordinates for each edge + // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0 + // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by + // its centre point, which is obtained from the graph, and it's width and height + // 6. And finally, create all the edges in the svg node using information from the graph + // --- + // Create the graph + var g; // TODO: Explore directed vs undirected graphs, and how the layout is affected + // An E-R diagram could be said to be undirected, but there is merit in setting + // the direction from parent to child in a one-to-many as this influences graphlib to + // put the parent above the child (does it?), which is intuitive. Most relationships + // in ER diagrams are one-to-many. - denom = a1 * b2 - a2 * b1; + g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ + multigraph: true, + directed: true, + compound: false + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function () { + return {}; + }); // Draw the entities (at 0,0), returning the first svg node that got + // inserted - this represents the insertion point for relationship paths - if (denom === 0) { - return; - } + var firstEntity = drawEntities(svg, _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEntities(), g); // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above + // Add all the relationships to the graph - offset = Math.abs(denom / 2); // The denom/2 is to get rounding instead of truncating. It - // is added or subtracted to the numerator, depending upon the - // sign of the numerator. + var relationships = addRelationships(_erDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRelationships(), g); + dagre__WEBPACK_IMPORTED_MODULE_4___default.a.layout(g); // Node and edge positions will be updated + // Adjust the positions of the entities so that they adhere to the layout - num = b1 * c2 - b2 * c1; - x = num < 0 ? (num - offset) / denom : (num + offset) / denom; - num = a2 * c1 - a1 * c2; - y = num < 0 ? (num - offset) / denom : (num + offset) / denom; - return { - x: x, - y: y - }; -} + adjustEntities(svg, g); // Draw the relationships -function sameSign(r1, r2) { - return r1 * r2 > 0; -} + relationships.forEach(function (rel) { + drawRelationshipFromLayout(svg, rel, g, firstEntity); + }); + var padding = conf.diagramPadding; + var svgBounds = svg.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + Object(_utils__WEBPACK_IMPORTED_MODULE_8__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); + svg.attr('viewBox', "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height)); +}; // draw -/* harmony default export */ __webpack_exports__["default"] = (intersectLine); +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); /***/ }), -/***/ "./src/dagre-wrapper/intersect/intersect-node.js": -/*!*******************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-node.js ***! - \*******************************************************/ +/***/ "./src/diagrams/er/parser/erDiagram.jison": +/*!************************************************!*\ + !*** ./src/diagrams/er/parser/erDiagram.jison ***! + \************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = intersectNode; - -function intersectNode(node, point) { - // console.info('Intersect Node'); - return node.intersect(point); -} - -/***/ }), - -/***/ "./src/dagre-wrapper/intersect/intersect-polygon.js": -/*!**********************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-polygon.js ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _intersect_line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./intersect-line */ "./src/dagre-wrapper/intersect/intersect-line.js"); -/* eslint "no-console": off */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["default"] = (intersectPolygon); +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ /* - * Returns the point ({x, y}) at which the point argument intersects with the - * node argument assuming that it has the shape specified by polygon. - */ - -function intersectPolygon(node, polyPoints, point) { - var x1 = node.x; - var y1 = node.y; - var intersections = []; - var minX = Number.POSITIVE_INFINITY; - var minY = Number.POSITIVE_INFINITY; + Returns a Parser object of the following structure: - if (typeof polyPoints.forEach === 'function') { - polyPoints.forEach(function (entry) { - minX = Math.min(minX, entry.x); - minY = Math.min(minY, entry.y); - }); - } else { - minX = Math.min(minX, polyPoints.x); - minY = Math.min(minY, polyPoints.y); + Parser: { + yy: {} } - var left = x1 - node.width / 2 - minX; - var top = y1 - node.height / 2 - minY; + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), - for (var i = 0; i < polyPoints.length; i++) { - var p1 = polyPoints[i]; - var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect = Object(_intersect_line__WEBPACK_IMPORTED_MODULE_0__["default"])(node, point, { - x: left + p1.x, - y: top + p1.y - }, { - x: left + p2.x, - y: top + p2.y - }); + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), - if (intersect) { - intersections.push(intersect); + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, } } - if (!intersections.length) { - // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); - return node; - } - if (intersections.length > 1) { - // More intersections, find the one nearest to edge end point - intersections.sort(function (p, q) { - var pdx = p.x - point.x; - var pdy = p.y - point.y; - var distp = Math.sqrt(pdx * pdx + pdy * pdy); - var qdx = q.x - point.x; - var qdy = q.y - point.y; - var distq = Math.sqrt(qdx * qdx + qdy * qdy); - return distp < distq ? -1 : distp === distq ? 0 : 1; - }); + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) } - return intersections[0]; -} - -/***/ }), -/***/ "./src/dagre-wrapper/intersect/intersect-rect.js": -/*!*******************************************************!*\ - !*** ./src/dagre-wrapper/intersect/intersect-rect.js ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,23,37],$V3=[1,17],$V4=[1,20],$V5=[1,25],$V6=[1,26],$V7=[1,27],$V8=[1,28],$V9=[1,37],$Va=[23,34,35],$Vb=[4,6,9,11,23,37],$Vc=[30,31,32,33],$Vd=[22,27]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"ER_DIAGRAM":4,"document":5,"EOF":6,"directive":7,"line":8,"SPACE":9,"statement":10,"NEWLINE":11,"openDirective":12,"typeDirective":13,"closeDirective":14,":":15,"argDirective":16,"entityName":17,"relSpec":18,"role":19,"BLOCK_START":20,"attributes":21,"BLOCK_STOP":22,"ALPHANUM":23,"attribute":24,"attributeType":25,"attributeName":26,"ATTRIBUTE_WORD":27,"cardinality":28,"relType":29,"ZERO_OR_ONE":30,"ZERO_OR_MORE":31,"ONE_OR_MORE":32,"ONLY_ONE":33,"NON_IDENTIFYING":34,"IDENTIFYING":35,"WORD":36,"open_directive":37,"type_directive":38,"arg_directive":39,"close_directive":40,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"}, +productions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -var intersectRect = function intersectRect(node, point) { - var x = node.x; - var y = node.y; // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes +var $0 = $$.length - 1; +switch (yystate) { +case 1: + /*console.log('finished parsing');*/ +break; +case 3: + this.$ = [] +break; +case 4: +$$[$0-1].push($$[$0]);this.$ = $$[$0-1] +break; +case 5: case 6: + this.$ = $$[$0] +break; +case 7: case 8: + this.$=[]; +break; +case 12: - var dx = point.x - x; - var dy = point.y - y; - var w = node.width / 2; - var h = node.height / 2; - var sx, sy; + yy.addEntity($$[$0-4]); + yy.addEntity($$[$0-2]); + yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]); + /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/ + +break; +case 13: - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } + /* console.log('detected block'); */ + yy.addEntity($$[$0-3]); + yy.addAttributes($$[$0-3], $$[$0-1]); + /* console.log('handled block'); */ + +break; +case 14: + yy.addEntity($$[$0-2]); +break; +case 15: + yy.addEntity($$[$0]); +break; +case 16: + this.$ = $$[$0]; /*console.log('Entity: ' + $$[$0]);*/ +break; +case 17: + this.$ = [$$[$0]]; +break; +case 18: + $$[$0].push($$[$0-1]); this.$=$$[$0]; +break; +case 19: + this.$ = { attributeType: $$[$0-1], attributeName: $$[$0] }; +break; +case 20: case 21: + this.$=$$[$0]; +break; +case 22: - sx = dy === 0 ? 0 : h * dx / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; + this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] }; + /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/ + +break; +case 23: + this.$ = yy.Cardinality.ZERO_OR_ONE; +break; +case 24: + this.$ = yy.Cardinality.ZERO_OR_MORE; +break; +case 25: + this.$ = yy.Cardinality.ONE_OR_MORE; +break; +case 26: + this.$ = yy.Cardinality.ONLY_ONE; +break; +case 27: + this.$ = yy.Identification.NON_IDENTIFYING; +break; +case 28: + this.$ = yy.Identification.IDENTIFYING; +break; +case 29: + this.$ = $$[$0].replace(/"/g, ''); +break; +case 30: + this.$ = $$[$0]; +break; +case 31: + yy.parseDirective('%%{', 'open_directive'); +break; +case 32: + yy.parseDirective($$[$0], 'type_directive'); +break; +case 33: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); +break; +case 34: + yy.parseDirective('}%%', 'close_directive', 'er'); +break; +} +}, +table: [{3:1,4:$V0,7:3,12:4,37:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,37:$V1},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:$V3,37:$V1},{1:[2,2]},{14:18,15:[1,19],40:$V4},o([15,40],[2,32]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:15,10:21,12:4,17:16,23:$V3,37:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,15],{18:22,28:24,20:[1,23],30:$V5,31:$V6,32:$V7,33:$V8}),o([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},o($V2,[2,5]),{17:32,23:$V3},{21:33,22:[1,34],24:35,25:36,27:$V9},{29:38,34:[1,39],35:[1,40]},o($Va,[2,23]),o($Va,[2,24]),o($Va,[2,25]),o($Va,[2,26]),o($Vb,[2,9]),{14:41,40:$V4},{40:[2,33]},{15:[1,42]},{22:[1,43]},o($V2,[2,14]),{21:44,22:[2,17],24:35,25:36,27:$V9},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:$V5,31:$V6,32:$V7,33:$V8},o($Vc,[2,27]),o($Vc,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},o($V2,[2,13]),{22:[2,18]},o($Vd,[2,19]),o($Vd,[2,21]),{23:[2,22]},o($Vb,[2,10]),o($V2,[2,12]),o($V2,[2,29]),o($V2,[2,30])], +defaultActions: {5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; - sx = w; - sy = dx === 0 ? 0 : w * dy / dx; - } - - return { - x: x + sx, - y: y + sy - }; -}; - -/* harmony default export */ __webpack_exports__["default"] = (intersectRect); - -/***/ }), - -/***/ "./src/dagre-wrapper/markers.js": -/*!**************************************!*\ - !*** ./src/dagre-wrapper/markers.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - // Only add the number of markers that the diagram needs - -var insertMarkers = function insertMarkers(elem, markerArray, type, id) { - markerArray.forEach(function (markerName) { - markers[markerName](elem, type, id); - }); -}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ -var extension = function extension(elem, type, id) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Making markers for ', id); - elem.append('defs').append('marker').attr('id', type + '-extensionStart').attr('class', 'marker extension ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z'); - elem.append('defs').append('marker').attr('id', type + '-extensionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead -}; +EOF:1, -var composition = function composition(elem, type) { - elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker composition ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', type + '-compositionEnd').attr('class', 'marker composition ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); -}; +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, -var aggregation = function aggregation(elem, type) { - elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker aggregation ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', type + '-aggregationEnd').attr('class', 'marker aggregation ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); -}; +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, -var dependency = function dependency(elem, type) { - elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker dependency ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', type + '-dependencyEnd').attr('class', 'marker dependency ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); -}; +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } -var point = function point(elem, type) { - elem.append('marker').attr('id', type + '-pointEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); - elem.append('marker').attr('id', type + '-pointStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 0).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 5 L 10 10 L 10 0 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); -}; + this._input = this._input.slice(1); + return ch; + }, -var circle = function circle(elem, type) { - elem.append('marker').attr('id', type + '-circleEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 11).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); - elem.append('marker').attr('id', type + '-circleStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', -1).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); -}; +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); -var cross = function cross(elem, type) { - elem.append('marker').attr('id', type + '-crossEnd').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', 12).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black') - .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0'); - elem.append('marker').attr('id', type + '-crossStart').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', -1).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black') - .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0'); -}; + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); -var barb = function barb(elem, type) { - elem.append('defs').append('marker').attr('id', type + '-barbEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 14).attr('markerUnits', 'strokeWidth').attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); -}; // TODO rename the class diagram markers to something shape descriptive and semanitc free + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; -var markers = { - extension: extension, - composition: composition, - aggregation: aggregation, - dependency: dependency, - point: point, - circle: circle, - cross: cross, - barb: barb -}; -/* harmony default export */ __webpack_exports__["default"] = (insertMarkers); + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, -/***/ }), +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, -/***/ "./src/dagre-wrapper/mermaid-graphlib.js": -/*!***********************************************!*\ - !*** ./src/dagre-wrapper/mermaid-graphlib.js ***! - \***********************************************/ -/*! exports provided: clusterDb, clear, extractDecendants, validate, findNonClusterChild, adjustClustersAndEdges, extractor, sortNodesByHierarchy */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clusterDb", function() { return clusterDb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractDecendants", function() { return extractDecendants; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validate", function() { return validate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findNonClusterChild", function() { return findNonClusterChild; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustClustersAndEdges", function() { return adjustClustersAndEdges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractor", function() { return extractor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortNodesByHierarchy", function() { return sortNodesByHierarchy; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__); -/** - * Decorates with functions required by mermaids dagre-wrapper. - */ + } + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, -var clusterDb = {}; -var decendants = {}; -var parents = {}; -var clear = function clear() { - decendants = {}; - parents = {}; - clusterDb = {}; -}; +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, -var isDecendant = function isDecendant(id, ancenstorId) { - // if (id === ancenstorId) return true; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('In isDecendant', ancenstorId, ' ', id, ' = ', decendants[ancenstorId].indexOf(id) >= 0); - if (decendants[ancenstorId].indexOf(id) >= 0) return true; - return false; -}; +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, -var edgeInCluster = function edgeInCluster(edge, clusterId) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Decendants of ', clusterId, ' is ', decendants[clusterId]); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge is ', edge); // Edges to/from the cluster is not in the cluster, they are in the parent +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, - if (edge.v === clusterId) return false; - if (edge.w === clusterId) return false; +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; - if (!decendants[clusterId]) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Tilt, ', clusterId, ',not in decendants'); - return false; - } + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Here '); - if (decendants[clusterId].indexOf(edge.v) >= 0) return true; - if (isDecendant(edge.v, clusterId)) return true; - if (isDecendant(edge.w, clusterId)) return true; - if (decendants[clusterId].indexOf(edge.w) >= 0) return true; - return false; -}; - -var copy = function copy(clusterId, graph, newGraph, rootId) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Copying children of ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId); - var nodes = graph.children(clusterId) || []; // Include cluster node if it is not the root + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, - if (clusterId !== rootId) { - nodes.push(clusterId); - } +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes); - nodes.forEach(function (node) { - if (graph.children(node).length > 0) { - copy(node, graph, newGraph, rootId); - } else { - var data = graph.node(node); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId); + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, - newGraph.setNode(node, data); +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, - if (rootId !== graph.parent(node)) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Setting parent', node, graph.parent(node)); - newGraph.setParent(node, graph.parent(node)); - } +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, - if (clusterId !== rootId && node !== clusterId) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Setting parent', node, clusterId); - newGraph.setParent(node, clusterId); - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not Setting parent for node=', node, 'cluster!==rootId', clusterId !== rootId, 'node!==clusterId', node !== clusterId); - } +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, - var edges = graph.edges(node); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Copying Edges', edges); - edges.forEach(function (edge) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge', edge); - var data = graph.edge(edge.v, edge.w, edge.name); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Edge data', data, rootId); +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, - try { - // Do not copy edges in and out of the root cluster, they belong to the parent graph - if (edgeInCluster(edge, rootId)) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Copying as ', edge.v, edge.w, data, edge.name); - newGraph.setEdge(edge.v, edge.w, data, edge.name); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0])); - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Skipping copy of edge ', edge.v, '-->', edge.w, ' rootId: ', rootId, ' clusterId:', clusterId); - } - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error(e); +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; } - }); - } + }, - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Removing node', node); - graph.removeNode(node); - }); -}; +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, -var extractDecendants = function extractDecendants(id, graph) { - // log.debug('Extracting ', id); - var children = graph.children(id); - var res = [].concat(children); +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0: this.begin('open_directive'); return 37; +break; +case 1: this.begin('type_directive'); return 38; +break; +case 2: this.popState(); this.begin('arg_directive'); return 15; +break; +case 3: this.popState(); this.popState(); return 40; +break; +case 4:return 39; +break; +case 5:/* skip comments */ +break; +case 6:/* skip comments */ +break; +case 7:return 11; +break; +case 8:/* skip whitespace */ +break; +case 9:return 9; +break; +case 10:return 36; +break; +case 11:return 4; +break; +case 12: this.begin("block"); return 20; +break; +case 13:/* skip whitespace in block */ +break; +case 14: return 27; +break; +case 15:/* nothing */ +break; +case 16: this.popState(); return 22; +break; +case 17:return yy_.yytext[0]; +break; +case 18:return 30; +break; +case 19:return 31; +break; +case 20:return 32; +break; +case 21:return 33; +break; +case 22:return 30; +break; +case 23:return 31; +break; +case 24:return 32; +break; +case 25:return 34; +break; +case 26:return 35; +break; +case 27:return 34; +break; +case 28:return 34; +break; +case 29:return 23; +break; +case 30:return yy_.yytext[0]; +break; +case 31:return 6; +break; +} +}, +rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i], +conditions: {"open_directive":{"rules":[1],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"block":{"rules":[13,14,15,16,17],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); - for (var i = 0; i < children.length; i++) { - parents[children[i]] = id; - res = res.concat(extractDecendants(children[i], graph)); - } - return res; +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); }; -/** - * Validates the graph, checking that all parent child relation points to existing nodes and that - * edges between nodes also ia correct. When not correct the function logs the discrepancies. - * @param {graphlib graph} g - */ - -var validate = function validate(graph) { - var edges = graph.edges(); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Edges: ', edges); +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); +} +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - for (var i = 0; i < edges.length; i++) { - if (graph.children(edges[i].v).length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('The node ', edges[i].v, ' is part of and edge even though it has children'); - return false; - } +/***/ }), - if (graph.children(edges[i].w).length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('The node ', edges[i].w, ' is part of and edge even though it has children'); - return false; - } - } +/***/ "./src/diagrams/er/styles.js": +/*!***********************************!*\ + !*** ./src/diagrams/er/styles.js ***! + \***********************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return true; +"use strict"; +__webpack_require__.r(__webpack_exports__); +var getStyles = function getStyles(options) { + return "\n .entityBox {\n fill: ".concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .relationshipLabelBox {\n fill: ").concat(options.tertiaryColor, ";\n opacity: 0.7;\n background-color: ").concat(options.tertiaryColor, ";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(options.lineColor, ";\n }\n"); }; -/** - * Finds a child that is not a cluster. When faking a edge between a node and a cluster. - * @param {Finds a } id - * @param {*} graph - */ -var findNonClusterChild = function findNonClusterChild(id, graph) { - // const node = graph.node(id); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Searching', id); // const children = graph.children(id).reverse(); - - var children = graph.children(id); //.reverse(); +/* harmony default export */ __webpack_exports__["default"] = (getStyles); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Searching children of id ', id, children); +/***/ }), - if (children.length < 1) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('This is a valid node', id); - return id; - } +/***/ "./src/diagrams/flowchart/flowChartShapes.js": +/*!***************************************************!*\ + !*** ./src/diagrams/flowchart/flowChartShapes.js ***! + \***************************************************/ +/*! exports provided: addToRender, addToRenderV2, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - for (var i = 0; i < children.length; i++) { - var _id = findNonClusterChild(children[i], graph); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToRender", function() { return addToRender; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToRenderV2", function() { return addToRenderV2; }); +/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre-d3 */ "dagre-d3"); +/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_0__); - if (_id) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace('Found replacement for', id, ' => ', _id); - return _id; - } - } -}; -var getAnchorId = function getAnchorId(id) { - if (!clusterDb[id]) { - return id; - } // If the cluster has no external connections +function question(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; + var s = (w + h) * 0.9; + var points = [{ + x: s / 2, + y: 0 + }, { + x: s, + y: -s / 2 + }, { + x: s / 2, + y: -s + }, { + x: 0, + y: -s / 2 + }]; + var shapeSvg = insertPolygonShape(parent, s, s, points); + node.intersect = function (point) { + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); + }; - if (!clusterDb[id].externalConnections) { - return id; - } // Return the replacement node + return shapeSvg; +} +function hexagon(parent, bbox, node) { + var f = 4; + var h = bbox.height; + var m = h / f; + var w = bbox.width + 2 * m; + var points = [{ + x: m, + y: 0 + }, { + x: w - m, + y: 0 + }, { + x: w, + y: -h / 2 + }, { + x: w - m, + y: -h + }, { + x: m, + y: -h + }, { + x: 0, + y: -h / 2 + }]; + var shapeSvg = insertPolygonShape(parent, w, h, points); - if (clusterDb[id]) { - return clusterDb[id].id; - } + node.intersect = function (point) { + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); + }; - return id; -}; + return shapeSvg; +} -var adjustClustersAndEdges = function adjustClustersAndEdges(graph, depth) { - if (!graph || depth > 10) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Opting out, no graph '); - return; - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Opting in, graph '); - } // Go through the nodes and for each cluster found, save a replacment node, this can be used when - // faking a link to a cluster +function rect_left_inv_arrow(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; + var points = [{ + x: -h / 2, + y: 0 + }, { + x: w, + y: 0 + }, { + x: w, + y: -h + }, { + x: -h / 2, + y: -h + }, { + x: 0, + y: -h / 2 + }]; + var shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function (point) { + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); + }; - graph.nodes().forEach(function (id) { - var children = graph.children(id); + return shapeSvg; +} - if (children.length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster identified', id, ' Replacement id in edges: ', findNonClusterChild(id, graph)); - decendants[id] = extractDecendants(id, graph); - clusterDb[id] = { - id: findNonClusterChild(id, graph), - clusterData: graph.node(id) - }; - } - }); // Check incoming and outgoing edges for each cluster +function lean_right(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; + var points = [{ + x: -2 * h / 6, + y: 0 + }, { + x: w - h / 6, + y: 0 + }, { + x: w + 2 * h / 6, + y: -h + }, { + x: h / 6, + y: -h + }]; + var shapeSvg = insertPolygonShape(parent, w, h, points); - graph.nodes().forEach(function (id) { - var children = graph.children(id); - var edges = graph.edges(); + node.intersect = function (point) { + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); + }; - if (children.length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Cluster identified', id, decendants); - edges.forEach(function (edge) { - // log.debug('Edge, decendants: ', edge, decendants[id]); - // Check if any edge leaves the cluster (not the actual cluster, thats a link from the box) - if (edge.v !== id && edge.w !== id) { - // Any edge where either the one of the nodes is decending to the cluster but not the other - // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) { - var d1 = isDecendant(edge.v, id); - var d2 = isDecendant(edge.w, id); // d1 xor d2 - if either d1 is true and d2 is false or the other way around + return shapeSvg; +} - if (d1 ^ d2) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge: ', edge, ' leaves cluster ', id); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Decendants of XXX ', id, ': ', decendants[id]); - clusterDb[id].externalConnections = true; - } - } - }); - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not a cluster ', id, decendants); - } - }); // For clusters with incoming and/or outgoing edges translate those edges to a real node - // in the cluster inorder to fake the edge - - graph.edges().forEach(function (e) { - var edge = graph.edge(e); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e))); - var v = e.v; - var w = e.w; // Check if link is either from or to a cluster - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fix XXX', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], ' --- ', clusterDb[e.w]); - - if (clusterDb[e.v] || clusterDb[e.w]) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fixing and trixing - removing XXX', e.v, e.w, e.name); - v = getAnchorId(e.v); - w = getAnchorId(e.w); - graph.removeEdge(e.v, e.w, e.name); - if (v !== e.v) edge.fromCluster = e.v; - if (w !== e.w) edge.toCluster = e.w; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Fix Replacing with XXX', v, w, e.name); - graph.setEdge(v, w, edge, e.name); - } - }); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Adjusted Graph', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); - extractor(graph, 0); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].trace(clusterDb); // Remove references to extracted cluster - // graph.edges().forEach(edge => { - // if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) { - // graph.removeEdge(edge); - // } - // }); -}; -var extractor = function extractor(graph, depth) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('extractor - ', depth, graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), graph.children('D')); - - if (depth > 10) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error('Bailing out'); - return; - } // For clusters without incoming and/or outgoing edges, create a new cluster-node - // containing the nodes and edges in the custer in a new graph - // for (let i = 0;) - - - var nodes = graph.nodes(); - var hasChildren = false; - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var children = graph.children(node); - hasChildren = hasChildren || children.length > 0; - } - - if (!hasChildren) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Done, no node has children', graph.nodes()); - return; - } // const clusters = Object.keys(clusterDb); - // clusters.forEach(clusterId => { - - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Nodes = ', nodes, depth); - - for (var _i = 0; _i < nodes.length; _i++) { - var _node = nodes[_i]; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Extracting node', _node, clusterDb, clusterDb[_node] && !clusterDb[_node].externalConnections, !graph.parent(_node), graph.node(_node), graph.children('D'), ' Depth ', depth); // Note that the node might have been removed after the Object.keys call so better check - // that it still is in the game - - if (!clusterDb[_node]) { - // Skip if the node is not a cluster - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Not a cluster', _node, depth); // break; - } else if (!clusterDb[_node].externalConnections && // !graph.parent(node) && - graph.children(_node) && graph.children(_node).length > 0) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster without external connections, without a parent and with children', _node, depth); - var graphSettings = graph.graph(); - var clusterGraph = new graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.Graph({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: graphSettings.rankdir === 'TB' ? 'LR' : 'TB', - // Todo: set proper spacing - nodesep: 50, - ranksep: 50, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function () { - return {}; - }); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Old graph before copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); - copy(_node, graph, clusterGraph, _node); - graph.setNode(_node, { - clusterNode: true, - id: _node, - clusterData: clusterDb[_node].clusterData, - labelText: clusterDb[_node].labelText, - graph: clusterGraph - }); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('New graph after copy node: (', _node, ')', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(clusterGraph)); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Old graph after copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); - } else { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('Cluster ** ', _node, ' **not meeting the criteria !externalConnections:', !clusterDb[_node].externalConnections, ' no parent: ', !graph.parent(_node), ' children ', graph.children(_node) && graph.children(_node).length > 0, graph.children('D'), depth); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(clusterDb); - } - } - - nodes = graph.nodes(); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn('New list of nodes', nodes); - - for (var _i2 = 0; _i2 < nodes.length; _i2++) { - var _node2 = nodes[_i2]; - var data = graph.node(_node2); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].warn(' Now next level', _node2, data); - - if (data.clusterNode) { - extractor(data.graph, depth + 1); - } - } -}; - -var sorter = function sorter(graph, nodes) { - if (nodes.length === 0) return []; - var result = Object.assign(nodes); - nodes.forEach(function (node) { - var children = graph.children(node); - var sorted = sorter(graph, children); - result = result.concat(sorted); - }); - return result; -}; - -var sortNodesByHierarchy = function sortNodesByHierarchy(graph) { - return sorter(graph, graph.children()); -}; - -/***/ }), - -/***/ "./src/dagre-wrapper/nodes.js": -/*!************************************!*\ - !*** ./src/dagre-wrapper/nodes.js ***! - \************************************/ -/*! exports provided: insertNode, setNodeElem, clear, positionNode */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertNode", function() { return insertNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeElem", function() { return setNodeElem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "positionNode", function() { return positionNode; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../logger */ "./src/logger.js"); -/* harmony import */ var _shapes_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shapes/util */ "./src/dagre-wrapper/shapes/util.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config */ "./src/config.js"); -/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./intersect/index.js */ "./src/dagre-wrapper/intersect/index.js"); -/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createLabel */ "./src/dagre-wrapper/createLabel.js"); -/* harmony import */ var _shapes_note__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shapes/note */ "./src/dagre-wrapper/shapes/note.js"); -/* harmony import */ var _diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../diagrams/class/svgDraw */ "./src/diagrams/class/svgDraw.js"); - - // eslint-disable-line - - - - - - - - -var question = function question(parent, node) { - var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper.shapeSvg, - bbox = _labelHelper.bbox; - - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; - var s = w + h; - var points = [{ - x: s / 2, - y: 0 - }, { - x: s, - y: -s / 2 - }, { - x: s / 2, - y: -s - }, { - x: 0, - y: -s / 2 - }]; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Question main (Circle)'); - var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, s, s, points); - questionElem.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, questionElem); - - node.intersect = function (point) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn('Intersect called'); - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); - }; - - return shapeSvg; -}; - -var hexagon = function hexagon(parent, node) { - var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper2.shapeSvg, - bbox = _labelHelper2.bbox; - - var f = 4; - var h = bbox.height + node.padding; - var m = h / f; - var w = bbox.width + 2 * m + node.padding; +function lean_left(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; var points = [{ - x: m, + x: 2 * h / 6, y: 0 }, { - x: w - m, + x: w + h / 6, y: 0 }, { - x: w, - y: -h / 2 - }, { - x: w - m, + x: w - 2 * h / 6, y: -h }, { - x: m, + x: -h / 6, y: -h - }, { - x: 0, - y: -h / 2 }]; - var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - hex.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, hex); + var shapeSvg = insertPolygonShape(parent, w, h, points); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); }; return shapeSvg; -}; - -var rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) { - var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper3.shapeSvg, - bbox = _labelHelper3.bbox; +} - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; +function trapezoid(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; var points = [{ - x: -h / 2, + x: -2 * h / 6, y: 0 }, { - x: w, + x: w + 2 * h / 6, y: 0 }, { - x: w, + x: w - h / 6, y: -h }, { - x: -h / 2, + x: h / 6, y: -h - }, { - x: 0, - y: -h / 2 }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - node.width = w + h; - node.height = h; + var shapeSvg = insertPolygonShape(parent, w, h, points); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); }; return shapeSvg; -}; - -var lean_right = function lean_right(parent, node) { - var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper4.shapeSvg, - bbox = _labelHelper4.bbox; +} - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; +function inv_trapezoid(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; var points = [{ - x: -2 * h / 6, + x: h / 6, y: 0 }, { x: w - h / 6, @@ -60755,162 +58282,111 @@ var lean_right = function lean_right(parent, node) { x: w + 2 * h / 6, y: -h }, { - x: h / 6, + x: -2 * h / 6, y: -h }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + var shapeSvg = insertPolygonShape(parent, w, h, points); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); }; return shapeSvg; -}; - -var lean_left = function lean_left(parent, node) { - var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper5.shapeSvg, - bbox = _labelHelper5.bbox; +} - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; +function rect_right_inv_arrow(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; var points = [{ - x: 2 * h / 6, + x: 0, y: 0 }, { - x: w + h / 6, + x: w + h / 2, y: 0 }, { - x: w - 2 * h / 6, + x: w, + y: -h / 2 + }, { + x: w + h / 2, y: -h }, { - x: -h / 6, + x: 0, y: -h }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + var shapeSvg = insertPolygonShape(parent, w, h, points); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); }; return shapeSvg; -}; - -var trapezoid = function trapezoid(parent, node) { - var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper6.shapeSvg, - bbox = _labelHelper6.bbox; +} - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; - var points = [{ - x: -2 * h / 6, - y: 0 - }, { - x: w + 2 * h / 6, - y: 0 - }, { - x: w - h / 6, - y: -h - }, { - x: h / 6, - y: -h - }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); +function stadium(parent, bbox, node) { + var h = bbox.height; + var w = bbox.width + h / 4; + var shapeSvg = parent.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point); }; return shapeSvg; -}; - -var inv_trapezoid = function inv_trapezoid(parent, node) { - var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper7.shapeSvg, - bbox = _labelHelper7.bbox; +} - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; +function subroutine(parent, bbox, node) { + var w = bbox.width; + var h = bbox.height; var points = [{ - x: h / 6, + x: 0, y: 0 }, { - x: w - h / 6, + x: w, y: 0 }, { - x: w + 2 * h / 6, + x: w, y: -h }, { - x: -2 * h / 6, + x: 0, y: -h - }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); - - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); - }; - - return shapeSvg; -}; - -var rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) { - var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper8.shapeSvg, - bbox = _labelHelper8.bbox; - - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; - var points = [{ + }, { x: 0, y: 0 }, { - x: w + h / 2, + x: -8, y: 0 }, { - x: w, - y: -h / 2 + x: w + 8, + y: 0 }, { - x: w + h / 2, + x: w + 8, y: -h }, { - x: 0, + x: -8, y: -h + }, { + x: -8, + y: 0 }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + var shapeSvg = insertPolygonShape(parent, w, h, points); node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); + return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); }; return shapeSvg; -}; - -var cylinder = function cylinder(parent, node) { - var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper9.shapeSvg, - bbox = _labelHelper9.bbox; +} - var w = bbox.width + node.padding; +function cylinder(parent, bbox, node) { + var w = bbox.width; var rx = w / 2; var ry = rx / (2.5 + w / 50); - var h = bbox.height + ry + node.padding; + var h = bbox.height + ry; var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h; - var el = shapeSvg.attr('label-offset-y', ry).insert('path', ':first-child').attr('style', node.style).attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')'); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + var shapeSvg = parent.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')'); node.intersect = function (point) { - var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); + var pos = dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point); var x = pos.x - node.x; if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { @@ -60927,151194 +58403,12362 @@ var cylinder = function cylinder(parent, node) { }; return shapeSvg; -}; - -var rect = function rect(parent, node) { - var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, 'node ' + node.classes, true), - shapeSvg = _labelHelper10.shapeSvg, - bbox = _labelHelper10.bbox, - halfPadding = _labelHelper10.halfPadding; +} - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Classes = ', node.classes); // add the rect +function addToRender(render) { + render.shapes().question = question; + render.shapes().hexagon = hexagon; + render.shapes().stadium = stadium; + render.shapes().subroutine = subroutine; + render.shapes().cylinder = cylinder; // Add custom shape for box with inverted arrow on left side - var rect = shapeSvg.insert('rect', ':first-child'); - rect.attr('class', 'basic label-container').attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); + render.shapes().rect_left_inv_arrow = rect_left_inv_arrow; // Add custom shape for box with inverted arrow on left side - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); - }; + render.shapes().lean_right = lean_right; // Add custom shape for box with inverted arrow on left side - return shapeSvg; -}; + render.shapes().lean_left = lean_left; // Add custom shape for box with inverted arrow on left side -var rectWithTitle = function rectWithTitle(parent, node) { - // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes); - var classes; + render.shapes().trapezoid = trapezoid; // Add custom shape for box with inverted arrow on left side - if (!node.classes) { - classes = 'node default'; - } else { - classes = 'node ' + node.classes; - } // Add outer g element + render.shapes().inv_trapezoid = inv_trapezoid; // Add custom shape for box with inverted arrow on right side + render.shapes().rect_right_inv_arrow = rect_right_inv_arrow; +} +function addToRenderV2(addShape) { + addShape({ + question: question + }); + addShape({ + hexagon: hexagon + }); + addShape({ + stadium: stadium + }); + addShape({ + subroutine: subroutine + }); + addShape({ + cylinder: cylinder + }); // Add custom shape for box with inverted arrow on left side - var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect + addShape({ + rect_left_inv_arrow: rect_left_inv_arrow + }); // Add custom shape for box with inverted arrow on left side - var rect = shapeSvg.insert('rect', ':first-child'); // const innerRect = shapeSvg.insert('rect'); + addShape({ + lean_right: lean_right + }); // Add custom shape for box with inverted arrow on left side - var innerLine = shapeSvg.insert('line'); - var label = shapeSvg.insert('g').attr('class', 'label'); - var text2 = node.labelText.flat(); - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Label text', text2[0]); - var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(text2[0], node.labelStyle, true, true)); - var bbox; + addShape({ + lean_left: lean_left + }); // Add custom shape for box with inverted arrow on left side - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var div = text.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text); - bbox = div.getBoundingClientRect(); - dv.attr('width', bbox.width); - dv.attr('height', bbox.height); - } + addShape({ + trapezoid: trapezoid + }); // Add custom shape for box with inverted arrow on left side - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Text 2', text2); - var textRows = text2.slice(1, text2.length); - var titleBox = text.getBBox(); - var descr = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(textRows.join('
'), node.labelStyle, true, true)); - - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var _div = descr.children[0]; + addShape({ + inv_trapezoid: inv_trapezoid + }); // Add custom shape for box with inverted arrow on right side - var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(descr); + addShape({ + rect_right_inv_arrow: rect_right_inv_arrow + }); +} - bbox = _div.getBoundingClientRect(); +function insertPolygonShape(parent, w, h, points) { + return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) { + return d.x + ',' + d.y; + }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')'); +} - _dv.attr('width', bbox.width); +/* harmony default export */ __webpack_exports__["default"] = ({ + addToRender: addToRender, + addToRenderV2: addToRenderV2 +}); - _dv.attr('height', bbox.height); - } // bbox = label.getBBox(); - // log.info(descr); +/***/ }), +/***/ "./src/diagrams/flowchart/flowDb.js": +/*!******************************************!*\ + !*** ./src/diagrams/flowchart/flowDb.js ***! + \******************************************/ +/*! exports provided: parseDirective, lookUpDomId, addVertex, addSingleLink, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, setGen, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, firstGraph, default */function(e,t,n){"use strict";n.r(t),n.d(t,"parseDirective",(function(){return k})),n.d(t,"lookUpDomId",(function(){return x})),n.d(t,"addVertex",(function(){return L})),n.d(t,"addSingleLink",(function(){return M})),n.d(t,"addLink",(function(){return D})),n.d(t,"updateLinkInterpolate",(function(){return E})),n.d(t,"updateLink",(function(){return T})),n.d(t,"addClass",(function(){return O})),n.d(t,"setDirection",(function(){return N})),n.d(t,"setClass",(function(){return I})),n.d(t,"setLink",(function(){return A})),n.d(t,"getTooltip",(function(){return R})),n.d(t,"setClickEvent",(function(){return P})),n.d(t,"bindFunctions",(function(){return j})),n.d(t,"getDirection",(function(){return F})),n.d(t,"getVertices",(function(){return B})),n.d(t,"getEdges",(function(){return W})),n.d(t,"getClasses",(function(){return H})),n.d(t,"clear",(function(){return V})),n.d(t,"setGen",(function(){return z})),n.d(t,"defaultStyle",(function(){return U})),n.d(t,"addSubGraph",(function(){return $})),n.d(t,"getDepthFirstPos",(function(){return Z})),n.d(t,"indexNodes",(function(){return J})),n.d(t,"getSubGraphs",(function(){return X})),n.d(t,"firstGraph",(function(){return Q}));var i=n(/*! d3 */"d3"),r=n(/*! ../../utils */"./src/utils.js"),o=n(/*! ../../config */"./src/config.js"),s=n(/*! ../common/common */"./src/diagrams/common/common.js"),a=n(/*! ../../mermaidAPI */"./src/mermaidAPI.js"),l=n(/*! ../../logger */"./src/logger.js");function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t/)&&(u="LR"),u.match(/.*v/)&&(u="TB")},I=function(e,t){e.split(",").forEach((function(e){var n=e;void 0!==p[n]&&p[n].classes.push(t),void 0!==v[n]&&v[n].classes.push(t)}))},A=function(e,t,n){e.split(",").forEach((function(e){void 0!==p[e]&&(p[e].link=r.default.formatUrl(t,g),p[e].linkTarget=n)})),I(e,"clickable")},R=function(e){return y[e]},P=function(e,t,n){e.split(",").forEach((function(e){!function(e,t,n){var i=x(e);if("loose"===o.getConfig().securityLevel&&void 0!==t){var s=[];if("string"==typeof n){s=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a=0)&&d.push(e))})),"gen-1"===h){l.log.warn("LOOKING UP");for(var f=0;f0&&function e(t,n){var i=b[n].nodes;if(!((K+=1)>2e3)){if(G[K]=n,b[n].id===t)return{result:!0,count:0};for(var r=0,o=1;r=0){var a=e(t,s);if(a.result)return{result:!0,count:o+a.count};o+=a.count}r+=1}return{result:!1,count:o}}}("none",b.length-1)},X=function(){return b},Q=function(){return!!C&&(C=!1,!0)},ee=function(e,t){var n=!1;return e.forEach((function(e){e.nodes.indexOf(t)>=0&&(n=!0)})),n},te=function(e,t){var n=[];return e.nodes.forEach((function(i,r){ee(t,i)||n.push(e.nodes[r])})),{nodes:n}};t.default={parseDirective:k,defaultConfig:function(){return o.defaultConfig.flowchart},addVertex:L,lookUpDomId:x,addLink:D,updateLinkInterpolate:E,updateLink:T,addClass:O,setDirection:N,setClass:I,setTooltip:function(e,t){e.split(",").forEach((function(e){void 0!==t&&(y["gen-1"===h?x(e):e]=s.default.sanitizeText(t,g))}))},getTooltip:R,setClickEvent:P,setLink:A,bindFunctions:j,getDirection:F,getVertices:B,getEdges:W,getClasses:H,clear:V,setGen:z,defaultStyle:U,addSubGraph:$,getDepthFirstPos:Z,indexNodes:J,getSubGraphs:X,destructLink:function(e,t){var n,i=function(e){var t=e.trim(),n=t.slice(0,-1),i="arrow_open";switch(t.slice(-1)){case"x":i="arrow_cross","x"===t[0]&&(i="double_"+i,n=n.slice(1));break;case">":i="arrow_point","<"===t[0]&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle","o"===t[0]&&(i="double_"+i,n=n.slice(1))}var r="normal",o=n.length-1;"="===n[0]&&(r="thick");var s=function(e,t){for(var n=t.length,i=0,r=0;r titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ', ' + (titleBox.height + halfPadding + 5) + ')'); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(text).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 + - bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ', ' + 0 + ')'); // Get the size of the label - // Bounding box for title and text +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js"); +/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison"); +/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); +/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "dagre-d3/lib/label/add-html-label.js"); +/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - bbox = label.node().getBBox(); // Center the label - label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'); - rect.attr('class', 'outer title-state').attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); - innerLine.attr('class', 'divider').attr('x1', -bbox.width / 2 - halfPadding).attr('x2', bbox.width / 2 + halfPadding).attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); - }; - return shapeSvg; -}; -var stadium = function stadium(parent, node) { - var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper11.shapeSvg, - bbox = _labelHelper11.bbox; - var h = bbox.height + node.padding; - var w = bbox.width + h / 4 + node.padding; // add the rect - var rect = shapeSvg.insert('rect', ':first-child').attr('style', node.style).attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); - }; - return shapeSvg; -}; -var circle = function circle(parent, node) { - var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper12.shapeSvg, - bbox = _labelHelper12.bbox, - halfPadding = _labelHelper12.halfPadding; +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); - var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate + for (var i = 0; i < keys.length; i++) { + conf[keys[i]] = cnf[keys[i]]; + } +}; +/** + * Function that adds the vertices found during parsing to the graph to be rendered. + * @param vert Object containing the vertices. + * @param g The graph that is to be drawn. + */ - circle.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('r', bbox.width / 2 + halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Circle main'); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); +var addVertices = function addVertices(vert, g, svgId) { + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(svgId, "\"]")); + var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition - node.intersect = function (point) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point); - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, bbox.width / 2 + halfPadding, point); - }; + keys.forEach(function (id) { + var vertex = vert[id]; + /** + * Variable for storing the classes for the vertex + * @type {string} + */ - return shapeSvg; -}; + var classStr = 'default'; -var subroutine = function subroutine(parent, node) { - var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["labelHelper"])(parent, node, undefined, true), - shapeSvg = _labelHelper13.shapeSvg, - bbox = _labelHelper13.bbox; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(' '); + } - var w = bbox.width + node.padding; - var h = bbox.height + node.padding; - var points = [{ - x: 0, - y: 0 - }, { - x: w, - y: 0 - }, { - x: w, - y: -h - }, { - x: 0, - y: -h - }, { - x: 0, - y: 0 - }, { - x: -8, - y: 0 - }, { - x: w + 8, - y: 0 - }, { - x: w + 8, - y: -h - }, { - x: -8, - y: -h - }, { - x: -8, - y: 0 - }]; - var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["insertPolygonShape"])(shapeSvg, w, h, points); - el.attr('style', node.style); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, el); + var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].polygon(node, points, point); - }; + var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually - return shapeSvg; -}; + var vertexNode; -var start = function start(parent, node) { - var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); - var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate + if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { + // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? + var node = { + label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { + return ""); + }) + }; + vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); + svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); + var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex); - circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); + for (var j = 0; j < rows.length; j++) { + var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); + tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + tspan.setAttribute('dy', '1em'); + tspan.setAttribute('x', '1'); + tspan.textContent = rows[j]; + svgLabel.appendChild(tspan); + } - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point); - }; + vertexNode = svgLabel; + } - return shapeSvg; -}; + var radious = 0; + var _shape = ''; // Set the shape based parameters -var forkJoin = function forkJoin(parent, node, dir) { - var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); - var width = 70; - var height = 10; + switch (vertex.type) { + case 'round': + radious = 5; + _shape = 'rect'; + break; - if (dir === 'LR') { - width = 10; - height = 70; - } + case 'square': + _shape = 'rect'; + break; - var shape = shapeSvg.append('rect').style('stroke', 'black').style('fill', 'black').attr('x', -1 * width / 2).attr('y', -1 * height / 2).attr('width', width).attr('height', height).attr('class', 'fork-join'); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, shape); - node.height = node.height + node.padding / 2; - node.width = node.width + node.padding / 2; + case 'diamond': + _shape = 'question'; + break; - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); - }; + case 'hexagon': + _shape = 'hexagon'; + break; - return shapeSvg; -}; + case 'odd': + _shape = 'rect_left_inv_arrow'; + break; -var end = function end(parent, node) { - var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id); - var innerCircle = shapeSvg.insert('circle', ':first-child'); - var circle = shapeSvg.insert('circle', ':first-child'); - circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14); - innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, circle); + case 'lean_right': + _shape = 'lean_right'; + break; - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].circle(node, 7, point); - }; + case 'lean_left': + _shape = 'lean_left'; + break; - return shapeSvg; -}; + case 'trapezoid': + _shape = 'trapezoid'; + break; -var class_box = function class_box(parent, node) { - var halfPadding = node.padding / 2; - var rowPadding = 4; - var lineHeight = 8; - var classes; + case 'inv_trapezoid': + _shape = 'inv_trapezoid'; + break; - if (!node.classes) { - classes = 'node default'; - } else { - classes = 'node ' + node.classes; - } // Add outer g element + case 'odd_right': + _shape = 'rect_left_inv_arrow'; + break; + case 'circle': + _shape = 'circle'; + break; - var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect + case 'ellipse': + _shape = 'ellipse'; + break; - var rect = shapeSvg.insert('rect', ':first-child'); - var topLine = shapeSvg.insert('line'); - var bottomLine = shapeSvg.insert('line'); - var maxWidth = 0; - var maxHeight = rowPadding; - var labelContainer = shapeSvg.insert('g').attr('class', 'label'); - var verticalPos = 0; - var hasInterface = node.classData.annotations && node.classData.annotations[0]; // 1. Create the labels + case 'stadium': + _shape = 'stadium'; + break; - var interfaceLabelText = node.classData.annotations[0] ? '«' + node.classData.annotations[0] + '»' : ''; - var interfaceLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(interfaceLabelText, node.labelStyle, true, true)); - var interfaceBBox = interfaceLabel.getBBox(); + case 'subroutine': + _shape = 'subroutine'; + break; - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var div = interfaceLabel.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel); - interfaceBBox = div.getBoundingClientRect(); - dv.attr('width', interfaceBBox.width); - dv.attr('height', interfaceBBox.height); - } + case 'cylinder': + _shape = 'cylinder'; + break; - if (node.classData.annotations[0]) { - maxHeight += interfaceBBox.height + rowPadding; - maxWidth += interfaceBBox.width; - } + case 'group': + _shape = 'rect'; + break; - var classTitleString = node.classData.id; + default: + _shape = 'rect'; + } // Add the node - if (node.classData.type !== undefined && node.classData.type !== '') { - classTitleString += '<' + node.classData.type + '>'; - } - var classTitleLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(classTitleString, node.labelStyle, true, true)); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel).attr('class', 'classTitle'); - var classTitleBBox = classTitleLabel.getBBox(); + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(vertex.id) || '', + domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === 'group' ? 500 : undefined, + type: vertex.type, + padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.padding + }); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('setNode', { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), + width: vertex.type === 'group' ? 500 : undefined, + type: vertex.type, + padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.padding + }); + }); +}; +/** + * Add edges to graph based on parsed graph defninition + * @param {Object} edges The edges to add to the graph + * @param {Object} g The graph object + */ - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var _div2 = classTitleLabel.children[0]; +var addEdges = function addEdges(edges, g) { + var cnt = 0; + var defaultStyle; + var defaultLabelStyle; - var _dv2 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel); + if (typeof edges.defaultStyle !== 'undefined') { + var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } - classTitleBBox = _div2.getBoundingClientRect(); + edges.forEach(function (edge) { + cnt++; // Identify Link - _dv2.attr('width', classTitleBBox.width); + var linkId = 'L-' + edge.start + '-' + edge.end; + var linkNameStart = 'LS-' + edge.start; + var linkNameEnd = 'LE-' + edge.end; + var edgeData = { + style: '', + labelStyle: '' + }; + edgeData.minlen = edge.length || 1; //edgeData.id = 'id' + cnt; + // Set link type for rendering - _dv2.attr('height', classTitleBBox.height); - } + if (edge.type === 'arrow_open') { + edgeData.arrowhead = 'none'; + } else { + edgeData.arrowhead = 'normal'; + } // Check of arrow types, placed here in order not to break old rendering - maxHeight += classTitleBBox.height + rowPadding; - if (classTitleBBox.width > maxWidth) { - maxWidth = classTitleBBox.width; - } + edgeData.arrowTypeStart = 'arrow_open'; + edgeData.arrowTypeEnd = 'arrow_open'; + /* eslint-disable no-fallthrough */ - var classAttributes = []; - node.classData.members.forEach(function (str) { - var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__["parseMember"])(str).displayText; - var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(parsedText, node.labelStyle, true, true)); - var bbox = lbl.getBBox(); + switch (edge.type) { + case 'double_arrow_cross': + edgeData.arrowTypeStart = 'arrow_cross'; - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var _div3 = lbl.children[0]; + case 'arrow_cross': + edgeData.arrowTypeEnd = 'arrow_cross'; + break; - var _dv3 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl); + case 'double_arrow_point': + edgeData.arrowTypeStart = 'arrow_point'; - bbox = _div3.getBoundingClientRect(); + case 'arrow_point': + edgeData.arrowTypeEnd = 'arrow_point'; + break; - _dv3.attr('width', bbox.width); + case 'double_arrow_circle': + edgeData.arrowTypeStart = 'arrow_circle'; - _dv3.attr('height', bbox.height); + case 'arrow_circle': + edgeData.arrowTypeEnd = 'arrow_circle'; + break; } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; - } + var style = ''; + var labelStyle = ''; - maxHeight += bbox.height + rowPadding; - classAttributes.push(lbl); - }); - maxHeight += lineHeight; - var classMethods = []; - node.classData.methods.forEach(function (str) { - var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__["parseMember"])(str).displayText; - var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__["default"])(parsedText, node.labelStyle, true, true)); - var bbox = lbl.getBBox(); + switch (edge.stroke) { + case 'normal': + style = 'fill:none;'; - if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels) { - var _div4 = lbl.children[0]; + if (typeof defaultStyle !== 'undefined') { + style = defaultStyle; + } - var _dv4 = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl); + if (typeof defaultLabelStyle !== 'undefined') { + labelStyle = defaultLabelStyle; + } - bbox = _div4.getBoundingClientRect(); + edgeData.thickness = 'normal'; + edgeData.pattern = 'solid'; + break; - _dv4.attr('width', bbox.width); + case 'dotted': + edgeData.thickness = 'normal'; + edgeData.pattern = 'dotted'; + edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;'; + break; - _dv4.attr('height', bbox.height); + case 'thick': + edgeData.thickness = 'thick'; + edgeData.pattern = 'solid'; + edgeData.style = 'stroke-width: 3.5px;fill:none;'; + break; } - if (bbox.width > maxWidth) { - maxWidth = bbox.width; + if (typeof edge.style !== 'undefined') { + var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; } - maxHeight += bbox.height + rowPadding; - classMethods.push(lbl); - }); - maxHeight += lineHeight; // 2. Position the labels - // position the interface label - - if (hasInterface) { - var _diffX = (maxWidth - interfaceBBox.width) / 2; - - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(interfaceLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + _diffX) + ', ' + -1 * maxHeight / 2 + ')'); - verticalPos = interfaceBBox.height + rowPadding; - } // Positin the class title label + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (typeof edge.interpolate !== 'undefined') { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } else if (typeof edges.defaultInterpolate !== 'undefined') { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } else { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } - var diffX = (maxWidth - classTitleBBox.width) / 2; - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(classTitleLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + diffX) + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')'); - verticalPos += classTitleBBox.height + rowPadding; - topLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classAttributes.forEach(function (lbl) { - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ')'); - verticalPos += classTitleBBox.height + rowPadding; - }); - verticalPos += lineHeight; - bottomLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos); - verticalPos += lineHeight; - classMethods.forEach(function (lbl) { - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')'); - verticalPos += classTitleBBox.height + rowPadding; - }); // - // let bbox; - // if (getConfig().flowchart.htmlLabels) { - // const div = interfaceLabel.children[0]; - // const dv = select(interfaceLabel); - // bbox = div.getBoundingClientRect(); - // dv.attr('width', bbox.width); - // dv.attr('height', bbox.height); - // } - // bbox = labelContainer.getBBox(); - // log.info('Text 2', text2); - // const textRows = text2.slice(1, text2.length); - // let titleBox = text.getBBox(); - // const descr = label - // .node() - // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true)); - // if (getConfig().flowchart.htmlLabels) { - // const div = descr.children[0]; - // const dv = select(descr); - // bbox = div.getBoundingClientRect(); - // dv.attr('width', bbox.width); - // dv.attr('height', bbox.height); - // } - // // bbox = label.getBBox(); - // // log.info(descr); - // select(descr).attr( - // 'transform', - // 'translate( ' + - // // (titleBox.width - bbox.width) / 2 + - // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + - // ', ' + - // (titleBox.height + halfPadding + 5) + - // ')' - // ); - // select(text).attr( - // 'transform', - // 'translate( ' + - // // (titleBox.width - bbox.width) / 2 + - // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + - // ', ' + - // 0 + - // ')' - // ); - // // Get the size of the label - // // Bounding box for title and text - // bbox = label.node().getBBox(); - // // Center the label - // label.attr( - // 'transform', - // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')' - // ); + if (typeof edge.text === 'undefined') { + if (typeof edge.style !== 'undefined') { + edgeData.arrowheadStyle = 'fill: #333'; + } + } else { + edgeData.arrowheadStyle = 'fill: #333'; + edgeData.labelpos = 'c'; + } // if (getConfig().flowchart.htmlLabels && false) { + // // eslint-disable-line + // edgeData.labelType = 'html'; + // edgeData.label = `${edge.text}`; + // } else { - rect.attr('class', 'outer title-state').attr('x', -maxWidth / 2 - halfPadding).attr('y', -(maxHeight / 2) - halfPadding).attr('width', maxWidth + node.padding).attr('height', maxHeight + node.padding); // innerLine - // .attr('class', 'divider') - // .attr('x1', -bbox.width / 2 - halfPadding) - // .attr('x2', bbox.width / 2 + halfPadding) - // .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding) - // .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); - Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__["updateNodeBounds"])(node, rect); + edgeData.labelType = 'text'; + edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex, '\n'); - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].rect(node, point); - }; + if (typeof edge.style === 'undefined') { + edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;'; + } - return shapeSvg; -}; + edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); // } -var shapes = { - question: question, - rect: rect, - rectWithTitle: rectWithTitle, - circle: circle, - stadium: stadium, - hexagon: hexagon, - rect_left_inv_arrow: rect_left_inv_arrow, - lean_right: lean_right, - lean_left: lean_left, - trapezoid: trapezoid, - inv_trapezoid: inv_trapezoid, - rect_right_inv_arrow: rect_right_inv_arrow, - cylinder: cylinder, - start: start, - end: end, - note: _shapes_note__WEBPACK_IMPORTED_MODULE_6__["default"], - subroutine: subroutine, - fork: forkJoin, - join: forkJoin, - class_box: class_box -}; -var nodeElems = {}; -var insertNode = function insertNode(elem, node, dir) { - var newEl; - var el; // Add link when appropriate + edgeData.id = linkId; + edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd; // Add the edge to the graph - if (node.link) { - newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', node.linkTarget || '_blank'); - el = shapes[node.shape](newEl, node, dir); - } else { - el = shapes[node.shape](elem, node, dir); - newEl = el; - } + g.setEdge(edge.start, edge.end, edgeData, cnt); + }); +}; +/** + * Returns the all the styles from classDef statements in the graph definition. + * @returns {object} classDef styles + */ - if (node.tooltip) { - el.attr('title', node.tooltip); - } +var getClasses = function getClasses(text) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Extracting classes'); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; - if (node.class) { - el.attr('class', 'node default ' + node.class); + try { + // Parse the graph definition + parser.parse(text); + } catch (e) { + return; } - nodeElems[node.id] = newEl; - - if (node.haveCallback) { - nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable'); - } -}; -var setNodeElem = function setNodeElem(elem, node) { - nodeElems[node.id] = elem; -}; -var clear = function clear() { - nodeElems = {}; + return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); }; -var positionNode = function positionNode(node) { - var el = nodeElems[node.id]; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].trace('Transforming node', node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + (node.y - node.height / 2 - 5) + ')'); - var padding = 8; +/** + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ - if (node.clusterNode) { - el.attr('transform', 'translate(' + (node.x - node.width / 2 - padding) + ', ' + (node.y - node.height / 2 - padding) + ')'); - } else { - el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')'); - } -}; +var draw = function draw(text, id) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Drawing flowchart'); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].setGen('gen-2'); + var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition + // try { -/***/ }), + parser.parse(text); // } catch (err) { + // log.debug('Parsing failed'); + // } + // Fetch the default direction, use TD if none was found -/***/ "./src/dagre-wrapper/shapes/note.js": -/*!******************************************!*\ - !*** ./src/dagre-wrapper/shapes/note.js ***! - \******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./src/dagre-wrapper/shapes/util.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../intersect/index.js */ "./src/dagre-wrapper/intersect/index.js"); + if (typeof dir === 'undefined') { + dir = 'TD'; + } - // eslint-disable-line + var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart; + var nodeSpacing = conf.nodeSpacing || 50; + var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph + var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function () { + return {}; + }); + var subG; + var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs(); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Subgraphs - ', subGraphs); + for (var _i = subGraphs.length - 1; _i >= 0; _i--) { + subG = subGraphs[_i]; + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Subgraph - ', subG); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes); + } // Fetch the verices/nodes and edges/links from the parsed graph definition -var note = function note(parent, node) { - var _labelHelper = Object(_util__WEBPACK_IMPORTED_MODULE_0__["labelHelper"])(parent, node, 'node ' + node.classes, true), - shapeSvg = _labelHelper.shapeSvg, - bbox = _labelHelper.bbox, - halfPadding = _labelHelper.halfPadding; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].info('Classes = ', node.classes); // add the rect + var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices(); + var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges(); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info(edges); + var i = 0; - var rect = shapeSvg.insert('rect', ':first-child'); - rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding); - Object(_util__WEBPACK_IMPORTED_MODULE_0__["updateNodeBounds"])(node, rect); + for (i = subGraphs.length - 1; i >= 0; i--) { + // for (let i = 0; i < subGraphs.length; i++) { + subG = subGraphs[i]; + Object(d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"])('cluster').append('text'); - node.intersect = function (point) { - return _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].rect(node, point); - }; + for (var j = 0; j < subG.nodes.length; j++) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Setting up subgraphs', subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } - return shapeSvg; -}; + addVertices(vert, g, id); + addEdges(edges, g); // Add custom shapes + // flowChartShapes.addToRenderV2(addShape); + // Set up an SVG group so that we can translate the final graph. -/* harmony default export */ __webpack_exports__["default"] = (note); + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); + svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph. -/***/ }), + var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); + Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__["render"])(element, g, ['point', 'circle', 'cross'], 'flowchart', id); + var padding = conf.diagramPadding; + var svgBounds = svg.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")")); + Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); + svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height)); + svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")")); // Index nodes -/***/ "./src/dagre-wrapper/shapes/util.js": -/*!******************************************!*\ - !*** ./src/dagre-wrapper/shapes/util.js ***! - \******************************************/ -/*! exports provided: labelHelper, updateNodeBounds, insertPolygonShape */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // Add label rects for non html labels -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "labelHelper", function() { return labelHelper; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateNodeBounds", function() { return updateNodeBounds; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertPolygonShape", function() { return insertPolygonShape; }); -/* harmony import */ var _createLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../createLabel */ "./src/dagre-wrapper/createLabel.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__); + if (!conf.htmlLabels) { + var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (var k = 0; k < labels.length; k++) { + var label = labels[k]; // Get dimensions of label + var dim = label.getBBox(); + var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); + rect.setAttribute('rx', 0); + rect.setAttribute('ry', 0); + rect.setAttribute('width', dim.width); + rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;'); -var labelHelper = function labelHelper(parent, node, _classes, isNode) { - var classes; + label.insertBefore(rect, label.firstChild); + } + } // If node has a link, wrap it in an anchor SVG object. - if (!_classes) { - classes = 'node default'; - } else { - classes = _classes; - } // Add outer g element + var keys = Object.keys(vert); + keys.forEach(function (key) { + var vertex = vert[key]; - var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the label and insert it after the rect + if (vertex.link) { + var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' [id="' + key + '"]'); - var label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle); - var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_0__["default"])(node.labelText, node.labelStyle, false, isNode)); // Get the size of the label + if (node) { + var link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); + link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); + link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); + link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); - var bbox = text.getBBox(); + if (vertex.linkTarget) { + link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget); + } - if (Object(_config__WEBPACK_IMPORTED_MODULE_1__["getConfig"])().flowchart.htmlLabels) { - var div = text.children[0]; - var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__["select"])(text); - bbox = div.getBoundingClientRect(); - dv.attr('width', bbox.width); - dv.attr('height', bbox.height); - } + var linkNode = node.insert(function () { + return link; + }, ':first-child'); + var shape = node.select('.label-container'); - var halfPadding = node.padding / 2; // Center the label + if (shape) { + linkNode.append(function () { + return shape.node(); + }); + } - label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')'); - return { - shapeSvg: shapeSvg, - bbox: bbox, - halfPadding: halfPadding, - label: label - }; -}; -var updateNodeBounds = function updateNodeBounds(node, element) { - var bbox = element.node().getBBox(); - node.width = bbox.width; - node.height = bbox.height; + var _label = node.select('.label'); + + if (_label) { + linkNode.append(function () { + return _label.node(); + }); + } + } + } + }); }; -function insertPolygonShape(parent, w, h, points) { - return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) { - return d.x + ',' + d.y; - }).join(' ')).attr('class', 'label-container').attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')'); -} +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + addVertices: addVertices, + addEdges: addEdges, + getClasses: getClasses, + draw: draw +}); /***/ }), -/***/ "./src/defaultConfig.js": -/*!******************************!*\ - !*** ./src/defaultConfig.js ***! - \******************************/ -/*! exports provided: default */ +/***/ "./src/diagrams/flowchart/flowRenderer.js": +/*!************************************************!*\ + !*** ./src/diagrams/flowchart/flowRenderer.js ***! + \************************************************/ +/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js"); +/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison"); +/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3 */ "dagre-d3"); +/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "dagre-d3/lib/label/add-html-label.js"); +/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./flowChartShapes */ "./src/diagrams/flowchart/flowChartShapes.js"); -/** - * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].** - * - * ## **What follows are config instructions for older versions** - * These are the default options which can be overridden with the initialization call like so: - * **Example 1:** - *
- * mermaid.initialize({
- *   flowchart:{
- *     htmlLabels: false
- *   }
- * });
- * 
- * - * **Example 2:** - *
- * <script>
- *   var config = {
- *     startOnLoad:true,
- *     flowchart:{
- *       useMaxWidth:true,
- *       htmlLabels:true,
- *       curve:'cardinal',
- *     },
- *
- *     securityLevel:'loose',
- *   };
- *   mermaid.initialize(config);
- * </script>
- * 
- * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below. - * - * @name Configuration - */ -var config = { - /** theme , the CSS style sheet - * - * theme , the CSS style sheet - * - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| Theme |Built in Themes| String | Optional | Values include, default, forest, dark, neutral, null| - * - ***Notes:**To disable any pre-defined mermaid theme, use "null". - *
-   *  "theme": "forest",
-   *  "themeCSS": ".node rect { fill: red; }"
-   * 
- */ - theme: 'default', - themeVariables: _themes__WEBPACK_IMPORTED_MODULE_0__["default"]['default'].getThemeVariables(), - themeCSS: undefined, - - /* **maxTextSize** - The maximum allowed size of the users text diamgram */ - maxTextSize: 50000, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *|fontFamily | specifies the font to be used in the rendered diagrams| String | Required | Trebuchet MS, Verdana, Arial, Sans-Serif | - * - ***notes: Default value is \\"trebuchet ms\\". - */ - fontFamily: '"trebuchet ms", verdana, arial, sans-serif;', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| logLevel |This option decides the amount of logging to be used.| String | Required | 1, 2, 3, 4, 5 | - * - * - ***Notes:** - *- debug: 1. - *- info: 2. - *- warn: 3. - *- error: 4. - *- fatal: 5(default). - */ - logLevel: 5, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose, antiscript | - * - ***Notes: - *- **strict**: (**default**) tags in text are encoded, click functionality is disabeled - *- **loose**: tags in text are allowed, click functionality is enabled - *- **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled - */ - securityLevel: 'strict', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| startOnLoad| Dictates whether mermaind starts on Page load | Boolean | Required | True, False | - * - ***Notes:** - ***Default value: true** - */ - startOnLoad: true, - - /** - *| Parameter | Description |Type | Required |Values| - *| --- | --- | --- | --- | --- | - *| arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | Boolean | Required | True, False | - * - * - *## Notes**: This matters if you are using base tag settings. - ***Default value: false**. - */ - arrowMarkerAbsolute: false, - /** - * This option controls which currentConfig keys are considered _secure_ and can only be changed via - * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to - * the `secure` keys in the current currentConfig. This prevents malicious graph directives from - * overriding a site's default security. - */ - secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'], - - /** - * This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed. - * If set to false, the IDs are generated based on the current date and thus are not deterministic. This is the default behaviour. - * - *## Notes**: This matters if your files are checked into sourcecontrol e.g. git and should not change unless content is changed. - ***Default value: false** - */ - deterministicIds: false, - /** - * This option is the optional seed for deterministic ids. if set to undefined but deterministicIds is true, a simple number iterator is used. - * You can set this attribute to base the seed on a static string. - */ - deterministicIDSeed: undefined, - /** - * The object containing configurations specific for flowcharts - */ - flowchart: { - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value | - * - ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels - ***Default value: 8**. - */ - diagramPadding: 8, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | Boolean| Required | True, False| - * - ***Notes: Default value: true**. - */ - htmlLabels: true, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| nodeSpacing | Defines the spacing between nodes on the same level | Integer| Required | Any positive Numbers | - * - ***Notes: - *Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.** - ***Default value 50**. - */ - nodeSpacing: 50, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| rankSpacing | Defines the spacing between nodes on different levels | Integer | Required| Any Positive Numbers | - * - ***Notes: pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs. - ***Default value 50**. - */ - rankSpacing: 50, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| curve | Defines how mermaid renders curves for flowcharts. | String | Required | Basis, Linear, Cardinal| - * - ***Notes: - *Default Vaue: Linear** - */ - curve: 'linear', - // Only used in new experimental rendering - // represents the padding between the labels and the shape - padding: 15, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true - }, - /** - * The object containing configurations specific for sequence diagrams - */ - sequence: { - /** - * widt of the activation rect - * **Default value 10**. - */ - activationWidth: 10, +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Values | - * - ***Notes:** - ***Default value 50**. - */ - diagramMarginX: 50, + for (var i = 0; i < keys.length; i++) { + conf[keys[i]] = cnf[keys[i]]; + } +}; +/** + * Function that adds the vertices found in the graph definition to the graph to be rendered. + * @param vert Object containing the vertices. + * @param g The graph that is to be drawn. + */ - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Values| - * - ***Notes:** - ***Default value 10**. - */ - diagramMarginY: 10, +var addVertices = function addVertices(vert, g, svgId) { + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(svgId, "\"]")); + var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition + keys.forEach(function (id) { + var vertex = vert[id]; /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 50**. + * Variable for storing the classes for the vertex + * @type {string} */ - actorMargin: 50, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| width | Width of actor boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 150**. - */ - width: 150, + var classStr = 'default'; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| height | Height of actor boxes | Integer | Required | Any Positive Value| - * - ***Notes:** - ***Default value 65**.. - */ - height: 65, + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(' '); + } - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - * - ***Default value 10**. - */ - boxMargin: 10, + var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| boxTextMargin| margin around the text in loop/alt/opt boxes | Integer | Required| Any Positive Value| - * - ***Notes:** - * - ***Default value 5**. - */ - boxTextMargin: 5, + var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| noteMargin | margin around notes. | Integer | Required | Any Positive Value | - * - ***Notes:** - * - ***Default value 10**. - */ - noteMargin: 10, + var vertexNode; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageMargin | Space between messages. | Integer | Required | Any Positive Value | - * - ***Notes:** - * - *Space between messages. - ***Default value 35**. - */ - messageMargin: 35, + if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { + // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? + var node = { + label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { + return ""); + }) + }; + vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); + svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); + var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex); - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageAlign | Multiline message alignment | Integer | Required | left, center, right | - * - ***Notes:**center **default** - */ - messageAlign: 'center', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| mirrorActors | mirror actors under diagram. | Boolean| Required | True, False | - * - ***Notes:** - * - ***Default value true**. - */ - mirrorActors: true, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | Required | Any Positive Value | - * - ***Notes:**Depending on css styling this might need adjustment. - ***Default value 1**. - */ - bottomMarginAdj: 1, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See Notes | Boolean | Required | True, False | - * - ***Notes:** - *when this flag is set to true, the height and width is set to 100% and is then scaling with the - *available space. If set to false, the absolute space required is used. - ***Default value: True**. - */ - useMaxWidth: true, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| rightAngles | display curve arrows as right angles| Boolean | Required | True, False | - * - ***Notes:** - * - *This will display arrows that start and begin at the same node as right angles, rather than a curve - ***Default value false**. - */ - rightAngles: false, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| showSequenceNumbers | This will show the node numbers | Boolean | Required | True, False | - * - ***Notes:** - ***Default value false**. - */ - showSequenceNumbers: false, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value | - * - ***Notes:** - ***Default value 14**.. - */ - actorFontSize: 14, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| actorFontFamily |This sets the font family of the actor's description | 3 | 4 | Open-Sans, Sans-Serif | - * - ***Notes:** - ***Default value "Open-Sans", "sans-serif"**. - */ - actorFontFamily: '"Open-Sans", "sans-serif"', - - /** - * This sets the font weight of the actor's description - * **Default value 400. - */ - actorFontWeight: 400, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| noteFontSize |This sets the font size of actor-attached notes. | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 14**.. - */ - noteFontSize: 14, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| noteFontFamily| This sets the font family of actor-attached notes. | String | Required | trebuchet ms, verdana, arial, sans-serif | - * - ***Notes:** - ***Default value: trebuchet ms **. - */ - noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif', - - /** - * This sets the font weight of the note's description - * **Default value 400. - */ - noteFontWeight: 400, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| noteAlign | This sets the text alignment of actor-attached notes. | string | required | left, center, right| - * - ***Notes:** - ***Default value center**. - */ - noteAlign: 'center', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageFontSize | This sets the font size of actor messages. | Integer | Required | Any Positive Number | - * - ***Notes:** - ***Default value 16**. - */ - messageFontSize: 16, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageFontFamily | This sets the font family of actor messages. | String| Required | trebuchet ms", verdana, arial, sans-serif | - * - ***Notes:** - ***Default value: "trebuchet ms**. - */ - messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif', - - /** - * This sets the font weight of the message's description - * **Default value 400. - */ - messageFontWeight: 400, - - /** - * This sets the auto-wrap state for the diagram - * **Default value false. - */ - wrap: false, - - /** - * This sets the auto-wrap padding for the diagram (sides only) - * **Default value 10. - */ - wrapPadding: 10, - - /** - * This sets the width of the loop-box (loop, alt, opt, par) - * **Default value 50. - */ - labelBoxWidth: 50, + for (var j = 0; j < rows.length; j++) { + var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); + tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + tspan.setAttribute('dy', '1em'); + tspan.setAttribute('x', '1'); + tspan.textContent = rows[j]; + svgLabel.appendChild(tspan); + } - /** - * This sets the height of the loop-box (loop, alt, opt, par) - * **Default value 20. - */ - labelBoxHeight: 20, - messageFont: function messageFont() { - return { - fontFamily: this.messageFontFamily, - fontSize: this.messageFontSize, - fontWeight: this.messageFontWeight - }; - }, - noteFont: function noteFont() { - return { - fontFamily: this.noteFontFamily, - fontSize: this.noteFontSize, - fontWeight: this.noteFontWeight - }; - }, - actorFont: function actorFont() { - return { - fontFamily: this.actorFontFamily, - fontSize: this.actorFontSize, - fontWeight: this.actorFontWeight - }; + vertexNode = svgLabel; } - }, - - /** - * The object containing configurations specific for gantt diagrams* - */ - gantt: { - /** - *### titleTopMargin - * - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 25**. - */ - titleTopMargin: 25, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 20**. - */ - barHeight: 20, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| barGap | The margin between the different activities in the gantt diagram. | Integer | Optional |Any Positive Value | - * - ***Notes:** - ***Default value 4**. - */ - barGap: 4, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 50**. - */ - topPadding: 50, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| leftPadding | The space allocated for the section name to the left of the activities. | Integer| Required | Any Positive Value | - * - ***Notes:** - ***Default value 75**. - */ - leftPadding: 75, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| gridLineStartPadding | Vertical starting position of the grid lines. | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 35**. - */ - gridLineStartPadding: 35, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| fontSize | Font size| Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 11**. - */ - fontSize: 11, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| fontFamily | font Family | string | required |"Open-Sans", "sans-serif" | - * - ***Notes:** - * - ***Default value '"Open-Sans", "sans-serif"'**. - */ - fontFamily: '"Open-Sans", "sans-serif"', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value | - * - ***Notes:** - ***Default value 4**. - */ - numberSectionStyles: 4, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| axisFormat | Datetime format of the axis. | 3 | Required | Date in yy-mm-dd | - * - ***Notes:** - * - * This might need adjustment to match your locale and preferences - ***Default value '%Y-%m-%d'**. - */ - axisFormat: '%Y-%m-%d', - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true, - useWidth: undefined - }, - - /** - * The object containing configurations specific for journey diagrams - */ - journey: { - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 50**. - */ - diagramMarginX: 50, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramMarginY | margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value| - * - ***Notes:** - ***Default value 10**.. - */ - diagramMarginY: 10, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value| - * - ***Notes:** - ***Default value 50**. - */ - actorMargin: 50, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| width | Width of actor boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 150**. - */ - width: 150, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| height | Height of actor boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 65**. - */ - height: 65, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 10**. - */ - boxMargin: 10, - - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| boxTextMargin | margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value | - * - ***Notes:** - */ - boxTextMargin: 5, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| noteMargin | margin around notes. | Integer | Required | Any Positive Value | - * - ***Notes:** - ***Default value 10**. - */ - noteMargin: 10, + var radious = 0; + var _shape = ''; // Set the shape based parameters - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageMargin |Space between messages. | Integer | Required | Any Positive Value | - * - ***Notes:** - * - *Space between messages. - ***Default value 35**. - */ - messageMargin: 35, + switch (vertex.type) { + case 'round': + radious = 5; + _shape = 'rect'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| messageAlign |Multiline message alignment | 3 | 4 | left, center, right | - * - ***Notes:**default:center** - */ - messageAlign: 'center', + case 'square': + _shape = 'rect'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | 4 | Any Positive Value | - * - ***Notes:**Depending on css styling this might need adjustment. - ***Default value 1**. - */ - bottomMarginAdj: 1, + case 'diamond': + _shape = 'question'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true, + case 'hexagon': + _shape = 'hexagon'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| rightAngles | Curved Arrows become Right Angles, | 3 | 4 | True, False | - * - ***Notes:**This will display arrows that start and begin at the same node as right angles, rather than a curves - ***Default value false**. - */ - rightAngles: false - }, - class: { - arrowMarkerAbsolute: false, + case 'odd': + _shape = 'rect_left_inv_arrow'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true - }, - git: { - arrowMarkerAbsolute: false, - useWidth: undefined, + case 'lean_right': + _shape = 'lean_right'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true - }, - state: { - dividerMargin: 10, - sizeUnit: 5, - padding: 8, - textHeight: 10, - titleShift: -15, - noteMargin: 10, - forkWidth: 70, - forkHeight: 7, - // Used - miniPadding: 2, - // Font size factor, this is used to guess the width of the edges labels before rendering by dagre - // layout. This might need updating if/when switching font - fontSizeFactor: 5.02, - fontSize: 24, - labelHeight: 16, - edgeLengthFactor: '20', - compositTitleSize: 35, - radius: 5, + case 'lean_left': + _shape = 'lean_left'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See notes | Boolean | 4 | True, False | - * - ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the - *available space if not the absolute space required is used. - * - ***Default value true**. - */ - useMaxWidth: true - }, + case 'trapezoid': + _shape = 'trapezoid'; + break; - /** - * The object containing configurations specific for entity relationship diagrams - */ - er: { - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value | - * - ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels - ***Default value: 20**. - */ - diagramPadding: 20, + case 'inv_trapezoid': + _shape = 'inv_trapezoid'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| layoutDirection | Directional bias for layout of entities. | String | Required | "TB", "BT","LR","RL" | - * - ***Notes:** - *'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left. - * T = top, B = bottom, L = left, and R = right. - ***Default value: TB **. - */ - layoutDirection: 'TB', + case 'odd_right': + _shape = 'rect_left_inv_arrow'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| minEntityWidth | The mimimum width of an entity box, | Integer | Required| Any Positive Value | - * - ***Notes:**expressed in pixels - ***Default value: 100**. - */ - minEntityWidth: 100, + case 'circle': + _shape = 'circle'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| minEntityHeight| The minimum height of an entity box, | Integer | 4 | Any Positive Value | - * - ***Notes:**expressed in pixels - ***Default value: 75 ** - */ - minEntityHeight: 75, + case 'ellipse': + _shape = 'ellipse'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| entityPadding|minimum internal padding betweentext in box and box borders| Integer | 4 | Any Positive Value | - * - ***Notes:**The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels. - ***Default value: 15 ** - */ - entityPadding: 15, + case 'stadium': + _shape = 'stadium'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| stroke | Stroke color of box edges and lines | String | 4 | Any recognized color | - ***Default value: gray ** - */ - stroke: 'gray', + case 'subroutine': + _shape = 'subroutine'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| fill | Fill color of entity boxes | String | 4 | Any recognized color | - * - ***Notes:** - ***Default value:'honeydew'** - */ - fill: 'honeydew', + case 'cylinder': + _shape = 'cylinder'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| fontSize| Font Size in pixels| Integer | | Any Positive Value | - * - ***Notes:**Font size (expressed as an integer representing a number of pixels) - ***Default value: 12 ** - */ - fontSize: 12, + case 'group': + _shape = 'rect'; + break; - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See Notes | Boolean | Required | true, false | - * - ***Notes:** - *When this flag is set to true, the diagram width is locked to 100% and - *scaled based on available space. If set to false, the diagram reserves its - *absolute width. - ***Default value: true**. - */ - useMaxWidth: true - }, + default: + _shape = 'rect'; + } // Add the node - /** - * The object containing configurations specific for pie diagrams - */ - pie: { - useWidth: undefined, - /** - *| Parameter | Description |Type | Required | Values| - *| --- | --- | --- | --- | --- | - *| useMaxWidth | See Notes | Boolean | Required | true, false | - * - ***Notes:** - *When this flag is set to true, the diagram width is locked to 100% and - *scaled based on available space. If set to false, the diagram reserves its - *absolute width. - ***Default value: true**. - */ - useMaxWidth: true - } + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Adding node', vertex.id, vertex.domId); + g.setNode(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), { + labelType: 'svg', + labelStyle: styles.labelStyle, + shape: _shape, + label: vertexNode, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id) + }); + }); }; -config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute; -config.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute; -/* harmony default export */ __webpack_exports__["default"] = (config); - -/***/ }), - -/***/ "./src/diagrams/class/classDb.js": -/*!***************************************!*\ - !*** ./src/diagrams/class/classDb.js ***! - \***************************************/ -/*! exports provided: parseDirective, addClass, lookUpDomId, clear, getClass, getClasses, getRelations, addRelation, addAnnotation, addMember, addMembers, cleanupLabel, setCssClass, setLink, setClickEvent, bindFunctions, lineType, relationType, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lookUpDomId", function() { return lookUpDomId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAnnotation", function() { return addAnnotation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCssClass", function() { return setCssClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - +/** + * Add edges to graph based on parsed graph defninition + * @param {Object} edges The edges to add to the graph + * @param {Object} g The graph object + */ +var addEdges = function addEdges(edges, g) { + var cnt = 0; + var defaultStyle; + var defaultLabelStyle; + if (typeof edges.defaultStyle !== 'undefined') { + var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function (edge) { + cnt++; // Identify Link -var MERMAID_DOM_ID_PREFIX = 'classid-'; -var relations = []; -var classes = {}; -var classCounter = 0; -var funs = []; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__["default"].parseDirective(this, statement, context, type); -}; + var linkId = 'L-' + edge.start + '-' + edge.end; + var linkNameStart = 'LS-' + edge.start; + var linkNameEnd = 'LE-' + edge.end; + var edgeData = {}; // Set link type for rendering -var splitClassNameAndType = function splitClassNameAndType(id) { - var genericType = ''; - var className = id; + if (edge.type === 'arrow_open') { + edgeData.arrowhead = 'none'; + } else { + edgeData.arrowhead = 'normal'; + } - if (id.indexOf('~') > 0) { - var split = id.split('~'); - className = split[0]; - genericType = split[1]; - } + var style = ''; + var labelStyle = ''; - return { - className: className, - type: genericType - }; -}; -/** - * Function called by parser when a node definition has been found. - * @param id - * @public - */ + if (typeof edge.style !== 'undefined') { + var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } else { + switch (edge.stroke) { + case 'normal': + style = 'fill:none'; + if (typeof defaultStyle !== 'undefined') { + style = defaultStyle; + } -var addClass = function addClass(id) { - var classId = splitClassNameAndType(id); // Only add class if not exists + if (typeof defaultLabelStyle !== 'undefined') { + labelStyle = defaultLabelStyle; + } - if (typeof classes[classId.className] !== 'undefined') return; - classes[classId.className] = { - id: classId.className, - type: classId.type, - cssClasses: [], - methods: [], - members: [], - annotations: [], - domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter - }; - classCounter++; -}; -/** - * Function to lookup domId from id in the graph definition. - * @param id - * @public - */ + break; -var lookUpDomId = function lookUpDomId(id) { - var classKeys = Object.keys(classes); + case 'dotted': + style = 'fill:none;stroke-width:2px;stroke-dasharray:3;'; + break; - for (var i = 0; i < classKeys.length; i++) { - if (classes[classKeys[i]].id === id) { - return classes[classKeys[i]].domId; + case 'thick': + style = ' stroke-width: 3.5px;fill:none'; + break; + } } - } -}; -var clear = function clear() { - relations = []; - classes = {}; - funs = []; - funs.push(setupToolTips); -}; -var getClass = function getClass(id) { - return classes[id]; -}; -var getClasses = function getClasses() { - return classes; -}; -var getRelations = function getRelations() { - return relations; -}; -var addRelation = function addRelation(relation) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Adding relation: ' + JSON.stringify(relation)); - addClass(relation.id1); - addClass(relation.id2); - relation.id1 = splitClassNameAndType(relation.id1).className; - relation.id2 = splitClassNameAndType(relation.id2).className; - relations.push(relation); -}; -/** - * Adds an annotation to the specified class - * Annotations mark special properties of the given type (like 'interface' or 'service') - * @param className The class name - * @param annotation The name of the annotation without any brackets - * @public - */ - -var addAnnotation = function addAnnotation(className, annotation) { - var validatedClassName = splitClassNameAndType(className).className; - classes[validatedClassName].annotations.push(annotation); -}; -/** - * Adds a member to the specified class - * @param className The class name - * @param member The full name of the member. - * If the member is enclosed in <> it is treated as an annotation - * If the member is ending with a closing bracket ) it is treated as a method - * Otherwise the member will be treated as a normal property - * @public - */ - -var addMember = function addMember(className, member) { - var validatedClassName = splitClassNameAndType(className).className; - var theClass = classes[validatedClassName]; - if (typeof member === 'string') { - // Member can contain white spaces, we trim them out - var memberString = member.trim(); - - if (memberString.startsWith('<<') && memberString.endsWith('>>')) { - // Remove leading and trailing brackets - theClass.annotations.push(memberString.substring(2, memberString.length - 2)); - } else if (memberString.indexOf(')') > 0) { - theClass.methods.push(memberString); - } else if (memberString) { - theClass.members.push(memberString); - } - } -}; -var addMembers = function addMembers(className, members) { - if (Array.isArray(members)) { - members.reverse(); - members.forEach(function (member) { - return addMember(className, member); - }); - } -}; -var cleanupLabel = function cleanupLabel(label) { - if (label.substring(0, 1) === ':') { - return label.substr(1).trim(); - } else { - return label.trim(); - } -}; -/** - * Called by parser when a special node is found, e.g. a clickable element. - * @param ids Comma separated list of ids - * @param className Class to add - */ - -var setCssClass = function setCssClass(ids, className) { - ids.split(',').forEach(function (_id) { - var id = _id; - if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - - if (typeof classes[id] !== 'undefined') { - classes[id].cssClasses.push(className); - } - }); -}; -/** - * Called by parser when a tooltip is found, e.g. a clickable element. - * @param ids Comma separated list of ids - * @param tooltip Tooltip to add - */ - -var setTooltip = function setTooltip(ids, tooltip) { - var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); - ids.split(',').forEach(function (id) { - if (typeof tooltip !== 'undefined') { - classes[id].tooltip = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(tooltip, config); - } - }); -}; -/** - * Called by parser when a link is found. Adds the URL to the vertex data. - * @param ids Comma separated list of ids - * @param linkStr URL to create a link for - * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file - */ - - -var setLink = function setLink(ids, linkStr, target) { - var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); - ids.split(',').forEach(function (_id) { - var id = _id; - if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - - if (typeof classes[id] !== 'undefined') { - classes[id].link = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].formatUrl(linkStr, config); - - if (typeof target === 'string') { - classes[id].linkTarget = target; - } else { - classes[id].linkTarget = '_blank'; - } - } - }); - setCssClass(ids, 'clickable'); -}; -/** - * Called by parser when a click definition is found. Registers an event handler. - * @param ids Comma separated list of ids - * @param functionName Function to be called on click - * @param functionArgs Function args the function should be called with - */ - -var setClickEvent = function setClickEvent(ids, functionName, functionArgs) { - ids.split(',').forEach(function (id) { - setClickFunc(id, functionName, functionArgs); - classes[id].haveCallback = true; - }); - setCssClass(ids, 'clickable'); -}; - -var setClickFunc = function setClickFunc(domId, functionName, functionArgs) { - var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); - var id = domId; - var elemId = lookUpDomId(id); - - if (config.securityLevel !== 'loose') { - return; - } - - if (typeof functionName === 'undefined') { - return; - } - - if (typeof classes[id] !== 'undefined') { - var argList = []; - - if (typeof functionArgs === 'string') { - /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */ - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - - for (var i = 0; i < argList.length; i++) { - var item = argList[i].trim(); - /* Removes all double quotes at the start and end of an argument */ - - /* This preserves all starting and ending whitespace inside */ - - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - - argList[i] = item; - } - } - /* if no arguments passed into callback, default to passing in id */ - - - if (argList.length === 0) { - argList.push(elemId); - } - - funs.push(function () { - var elem = document.querySelector("[id=\"".concat(elemId, "\"]")); - - if (elem !== null) { - elem.addEventListener('click', function () { - _utils__WEBPACK_IMPORTED_MODULE_4__["default"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__["default"], [functionName].concat(_toConsumableArray(argList))); - }, false); - } - }); - } -}; - -var bindFunctions = function bindFunctions(element) { - funs.forEach(function (fun) { - fun(element); - }); -}; -var lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -var relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3 -}; - -var setupToolTips = function setupToolTips(element) { - var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('.mermaidTooltip'); - - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0); - } - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(element).select('svg'); - var nodes = svg.selectAll('g.node'); - nodes.on('mouseover', function () { - var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); - var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided - - if (title === null) { - return; - } - - var rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style('opacity', '.9'); - tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px'); - el.classed('hover', true); - }).on('mouseout', function () { - tooltipElem.transition().duration(500).style('opacity', 0); - var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); - el.classed('hover', false); - }); -}; - -funs.push(setupToolTips); -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().class; - }, - addClass: addClass, - bindFunctions: bindFunctions, - clear: clear, - getClass: getClass, - getClasses: getClasses, - addAnnotation: addAnnotation, - getRelations: getRelations, - addRelation: addRelation, - addMember: addMember, - addMembers: addMembers, - cleanupLabel: cleanupLabel, - lineType: lineType, - relationType: relationType, - setClickEvent: setClickEvent, - setCssClass: setCssClass, - setLink: setLink, - setTooltip: setTooltip, - lookUpDomId: lookUpDomId -}); - -/***/ }), - -/***/ "./src/diagrams/class/classRenderer-v2.js": -/*!************************************************!*\ - !*** ./src/diagrams/class/classRenderer-v2.js ***! - \************************************************/ -/*! exports provided: addClasses, addRelations, setConf, drawOld, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClasses", function() { return addClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelations", function() { return addRelations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawOld", function() { return drawOld; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); -/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison"); -/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/class/svgDraw.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); - - - - - - - - - // import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js'; - - - - -_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"]; -var idCache = {}; -var padding = 20; -var conf = { - dividerMargin: 10, - padding: 5, - textHeight: 10 -}; -/** - * Function that adds the vertices found during parsing to the graph to be rendered. - * @param vert Object containing the vertices. - * @param g The graph that is to be drawn. - */ - -var addClasses = function addClasses(classes, g) { - // const svg = select(`[id="${svgId}"]`); - var keys = Object.keys(classes); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('keys:', keys); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(classes); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition - - keys.forEach(function (id) { - var vertex = classes[id]; - /** - * Variable for storing the classes for the vertex - * @type {string} - */ - - var cssClassStr = ''; - - if (vertex.cssClasses.length > 0) { - cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' '); - } // if (vertex.classes.length > 0) { - // classStr = vertex.classes.join(' '); - // } - - - var styles = { - labelStyle: '' - }; //getStylesFromArray(vertex.styles); - // Use vertex id as text in the box if no text is provided by the graph definition - - var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually - // let vertexNode; - // if (getConfig().flowchart.htmlLabels) { - // const node = { - // label: vertexText.replace( - // /fa[lrsb]?:fa-[\w-]+/g, - // s => `` - // ) - // }; - // vertexNode = addHtmlLabel(svg, node).node(); - // vertexNode.parentNode.removeChild(vertexNode); - // } else { - // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); - // const rows = vertexText.split(common.lineBreakRegex); - // for (let j = 0; j < rows.length; j++) { - // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); - // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); - // tspan.setAttribute('dy', '1em'); - // tspan.setAttribute('x', '1'); - // tspan.textContent = rows[j]; - // svgLabel.appendChild(tspan); - // } - // vertexNode = svgLabel; - // } - - var radious = 0; - var _shape = ''; // Set the shape based parameters - - switch (vertex.type) { - case 'class': - _shape = 'class_box'; - break; - - default: - _shape = 'class_box'; - } // Add the node - - - g.setNode(vertex.id, { - labelStyle: styles.labelStyle, - shape: _shape, - labelText: vertexText, - classData: vertex, - rx: radious, - ry: radious, - class: cssClassStr, - style: styles.style, - id: vertex.id, - domId: vertex.domId, - haveCallback: vertex.haveCallback, - link: vertex.link, - width: vertex.type === 'group' ? 500 : undefined, - type: vertex.type, - padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding - }); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('setNode', { - labelStyle: styles.labelStyle, - shape: _shape, - labelText: vertexText, - rx: radious, - ry: radious, - class: cssClassStr, - style: styles.style, - id: vertex.id, - width: vertex.type === 'group' ? 500 : undefined, - type: vertex.type, - padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.padding - }); - }); -}; -/** - * Add edges to graph based on parsed graph defninition - * @param {Object} edges The edges to add to the graph - * @param {Object} g The graph object - */ - -var addRelations = function addRelations(relations, g) { - var cnt = 0; - var defaultStyle; - var defaultLabelStyle; // if (typeof relations.defaultStyle !== 'undefined') { - // const defaultStyles = getStylesFromArray(relations.defaultStyle); - // defaultStyle = defaultStyles.style; - // defaultLabelStyle = defaultStyles.labelStyle; - // } - - relations.forEach(function (edge) { - cnt++; - var edgeData = {}; //Set relationship style and line type - - edgeData.classes = 'relation'; - edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid'; - edgeData.id = 'id' + cnt; // Set link type for rendering - - if (edge.type === 'arrow_open') { - edgeData.arrowhead = 'none'; - } else { - edgeData.arrowhead = 'normal'; - } - - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(edgeData, edge); //Set edge extra labels - //edgeData.startLabelLeft = edge.relationTitle1; - - edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1; - edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2; //edgeData.endLabelRight = edge.relationTitle2; - //Set relation arrow types - - edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1); - edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2); - var style = ''; - var labelStyle = ''; - - if (typeof edge.style !== 'undefined') { - var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } else { - style = 'fill:none'; - - if (typeof defaultStyle !== 'undefined') { - style = defaultStyle; - } - - if (typeof defaultLabelStyle !== 'undefined') { - labelStyle = defaultLabelStyle; - } - } - - edgeData.style = style; - edgeData.labelStyle = labelStyle; + edgeData.style = style; + edgeData.labelStyle = labelStyle; if (typeof edge.interpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); - } else if (typeof relations.defaultInterpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(relations.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); - } else { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__["curveLinear"]); - } - - edge.text = edge.title; - - if (typeof edge.text === 'undefined') { - if (typeof edge.style !== 'undefined') { - edgeData.arrowheadStyle = 'fill: #333'; - } - } else { - edgeData.arrowheadStyle = 'fill: #333'; - edgeData.labelpos = 'c'; - - if (Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart.htmlLabels && false) { - // eslint-disable-line - edgeData.labelType = 'html'; - edgeData.label = '' + edge.text + ''; - } else { - edgeData.labelType = 'text'; - edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_10__["default"].lineBreakRegex, '\n'); - - if (typeof edge.style === 'undefined') { - edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none'; - } - - edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); - } - } // Add the edge to the graph - - - g.setEdge(edge.id1, edge.id2, edgeData, cnt); - }); -}; // Todo optimize - -var getGraphId = function getGraphId(label) { - var keys = Object.keys(idCache); - - for (var i = 0; i < keys.length; i++) { - if (idCache[keys[i]].label === label) { - return keys[i]; - } - } - - return undefined; -}; - -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var drawOld = function drawOld(text, id) { - idCache = {}; - _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear(); - _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found - - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); // insertMarkers(diagram); - // Layout graph, Create a new directed graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ - multigraph: true - }); // Set an object for the graph label - - g.setGraph({ - isMultiGraph: true - }); // Default to assigning a new object as a label for each new edge. - - g.setDefaultEdgeLabel(function () { - return {}; - }); - var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('classes:'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(classes); - var keys = Object.keys(classes); - - for (var i = 0; i < keys.length; i++) { - var classDef = classes[keys[i]]; - var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawClass(diagram, classDef, conf); - idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is - // metadata about the node. In this case we're going to add labels to each of - // our nodes. - - g.setNode(node.id, node); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Org height: ' + node.height); - } - - var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('relations:', relations); - relations.forEach(function (relation) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)); - g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { - relation: relation - }, relation.title || 'DEFAULT'); - }); - dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g); - g.nodes().forEach(function (v) { - if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v))); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__["lookUpDomId"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )'); - } - }); - g.edges().forEach(function (e) { - if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e))); - _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf); - } - }); - var svgBounds = diagram.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - - var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("viewBox ".concat(vBox)); - diagram.attr('viewBox', vBox); -}; -var draw = function draw(text, id) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Drawing class'); - _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].clear(); // const parser = classDb.parser; - // parser.yy = classDb; - // Parse the graph definition - // try { - - _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); // } catch (err) { - // log.debug('Parsing failed'); - // } - // Fetch the default direction, use TD if none was found - - var dir = 'TD'; - var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('config:', conf); - var nodeSpacing = conf.nodeSpacing || 50; - var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function () { - return {}; - }); // let subG; - // const subGraphs = flowDb.getSubGraphs(); - // log.info('Subgraphs - ', subGraphs); - // for (let i = subGraphs.length - 1; i >= 0; i--) { - // subG = subGraphs[i]; - // log.info('Subgraph - ', subG); - // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes); - // } - // Fetch the verices/nodes and edges/links from the parsed graph definition - - var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); - var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info(relations); // let i = 0; - // for (i = subGraphs.length - 1; i >= 0; i--) { - // subG = subGraphs[i]; - // selectAll('cluster').append('text'); - // for (let j = 0; j < subG.nodes.length; j++) { - // g.setParent(subG.nodes[j], subG.id); - // } - // } - - addClasses(classes, g, id); - addRelations(relations, g); // Add custom shapes - // flowChartShapes.addToRenderV2(addShape); - // Set up an SVG group so that we can translate the final graph. - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); - svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph. - - var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id + ' g'); - Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__["render"])(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id); // element.selectAll('g.node').attr('title', function() { - // return flowDb.getTooltip(this.id); - // }); - - var padding = 8; - var svgBounds = svg.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")")); - Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); - svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height)); - svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")")); // Index nodes - // flowDb.indexNodes('subGraph' + i); - // Add label rects for non html labels - - if (!conf.htmlLabels) { - var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - - for (var k = 0; k < labels.length; k++) { - var label = labels[k]; // Get dimensions of label - - var dim = label.getBBox(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.setAttribute('rx', 0); - rect.setAttribute('ry', 0); - rect.setAttribute('width', dim.width); - rect.setAttribute('height', dim.height); - rect.setAttribute('style', 'fill:#e8e8e8;'); - label.insertBefore(rect, label.firstChild); - } - } // If node has a link, wrap it in an anchor SVG object. - // const keys = Object.keys(classes); - // keys.forEach(function(key) { - // const vertex = classes[key]; - // if (vertex.link) { - // const node = select('#' + id + ' [id="' + key + '"]'); - // if (node) { - // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); - // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); - // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); - // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); - // const linkNode = node.insert(function() { - // return link; - // }, ':first-child'); - // const shape = node.select('.label-container'); - // if (shape) { - // linkNode.append(function() { - // return shape.node(); - // }); - // } - // const label = node.select('.label'); - // if (label) { - // linkNode.append(function() { - // return label.node(); - // }); - // } - // } - // } - // }); - -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -function getArrowMarker(type) { - var marker; - - switch (type) { - case 0: - marker = 'aggregation'; - break; - - case 1: - marker = 'extension'; - break; - - case 2: - marker = 'composition'; - break; - - case 3: - marker = 'dependency'; - break; - - default: - marker = 'none'; - } - - return marker; -} - -/***/ }), - -/***/ "./src/diagrams/class/classRenderer.js": -/*!*********************************************!*\ - !*** ./src/diagrams/class/classRenderer.js ***! - \*********************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); -/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison"); -/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/class/svgDraw.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - - -_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"]; -var idCache = {}; -var padding = 20; -var conf = { - dividerMargin: 10, - padding: 5, - textHeight: 10 -}; // Todo optimize - -var getGraphId = function getGraphId(label) { - var keys = Object.keys(idCache); - - for (var i = 0; i < keys.length; i++) { - if (idCache[keys[i]].label === label) { - return keys[i]; - } - } - - return undefined; -}; -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - - -var insertMarkers = function insertMarkers(elem) { - elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z'); - elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead - - elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z'); - elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); -}; - -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var draw = function draw(text, id) { - idCache = {}; - _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear(); - _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found - - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); - diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - insertMarkers(diagram); // Layout graph, Create a new directed graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ - multigraph: true - }); // Set an object for the graph label - - g.setGraph({ - isMultiGraph: true - }); // Default to assigning a new object as a label for each new edge. - - g.setDefaultEdgeLabel(function () { - return {}; - }); - var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses(); - var keys = Object.keys(classes); - - for (var i = 0; i < keys.length; i++) { - var classDef = classes[keys[i]]; - var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawClass(diagram, classDef, conf); - idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is - // metadata about the node. In this case we're going to add labels to each of - // our nodes. - - g.setNode(node.id, node); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Org height: ' + node.height); - } - - var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); - relations.forEach(function (relation) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)); - g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { - relation: relation - }, relation.title || 'DEFAULT'); - }); - dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g); - g.nodes().forEach(function (v) { - if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v))); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__["lookUpDomId"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )'); - } - }); - g.edges().forEach(function (e) { - if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e))); - _svgDraw__WEBPACK_IMPORTED_MODULE_6__["default"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf); - } - }); - var svgBounds = diagram.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - - var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("viewBox ".concat(vBox)); - diagram.attr('viewBox', vBox); -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/class/parser/classDiagram.jison": -/*!******************************************************!*\ - !*** ./src/diagrams/class/parser/classDiagram.jison ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,6],$V2=[1,14],$V3=[1,25],$V4=[1,28],$V5=[1,26],$V6=[1,27],$V7=[1,29],$V8=[1,30],$V9=[1,31],$Va=[1,32],$Vb=[1,34],$Vc=[1,35],$Vd=[1,36],$Ve=[10,19],$Vf=[1,48],$Vg=[1,49],$Vh=[1,50],$Vi=[1,51],$Vj=[1,52],$Vk=[1,53],$Vl=[10,19,25,32,33,41,44,45,46,47,48,49,54,56],$Vm=[10,19,23,25,32,33,37,41,44,45,46,47,48,49,54,56,71,72,73],$Vn=[10,13,17,19],$Vo=[41,71,72,73],$Vp=[41,48,49,71,72,73],$Vq=[41,44,45,46,47,71,72,73],$Vr=[10,19,25],$Vs=[1,85]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"mermaidDoc":4,"directive":5,"graphConfig":6,"openDirective":7,"typeDirective":8,"closeDirective":9,"NEWLINE":10,":":11,"argDirective":12,"open_directive":13,"type_directive":14,"arg_directive":15,"close_directive":16,"CLASS_DIAGRAM":17,"statements":18,"EOF":19,"statement":20,"className":21,"alphaNumToken":22,"GENERICTYPE":23,"relationStatement":24,"LABEL":25,"classStatement":26,"methodStatement":27,"annotationStatement":28,"clickStatement":29,"cssClassStatement":30,"CLASS":31,"STYLE_SEPARATOR":32,"STRUCT_START":33,"members":34,"STRUCT_STOP":35,"ANNOTATION_START":36,"ANNOTATION_END":37,"MEMBER":38,"SEPARATOR":39,"relation":40,"STR":41,"relationType":42,"lineType":43,"AGGREGATION":44,"EXTENSION":45,"COMPOSITION":46,"DEPENDENCY":47,"LINE":48,"DOTTED_LINE":49,"CALLBACK":50,"LINK":51,"LINK_TARGET":52,"CLICK":53,"CALLBACK_NAME":54,"CALLBACK_ARGS":55,"HREF":56,"CSSCLASS":57,"commentToken":58,"textToken":59,"graphCodeTokens":60,"textNoTagsToken":61,"TAGSTART":62,"TAGEND":63,"==":64,"--":65,"PCT":66,"DEFAULT":67,"SPACE":68,"MINUS":69,"keywords":70,"UNICODE_TEXT":71,"NUM":72,"ALPHA":73,"$accept":0,"$end":1}, -terminals_: {2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",23:"GENERICTYPE",25:"LABEL",31:"CLASS",32:"STYLE_SEPARATOR",33:"STRUCT_START",35:"STRUCT_STOP",36:"ANNOTATION_START",37:"ANNOTATION_END",38:"MEMBER",39:"SEPARATOR",41:"STR",44:"AGGREGATION",45:"EXTENSION",46:"COMPOSITION",47:"DEPENDENCY",48:"LINE",49:"DOTTED_LINE",50:"CALLBACK",51:"LINK",52:"LINK_TARGET",53:"CLICK",54:"CALLBACK_NAME",55:"CALLBACK_ARGS",56:"HREF",57:"CSSCLASS",60:"graphCodeTokens",62:"TAGSTART",63:"TAGEND",64:"==",65:"--",66:"PCT",67:"DEFAULT",68:"SPACE",69:"MINUS",70:"keywords",71:"UNICODE_TEXT",72:"NUM",73:"ALPHA"}, -productions_: [0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,2],[21,3],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[26,2],[26,4],[26,5],[26,7],[28,4],[34,1],[34,2],[27,1],[27,2],[27,1],[27,1],[24,3],[24,4],[24,4],[24,5],[40,3],[40,2],[40,2],[40,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[29,3],[29,4],[29,3],[29,4],[29,4],[29,5],[29,3],[29,4],[29,4],[29,5],[29,3],[29,4],[29,4],[29,5],[30,3],[58,1],[58,1],[59,1],[59,1],[59,1],[59,1],[59,1],[59,1],[59,1],[61,1],[61,1],[61,1],[61,1],[22,1],[22,1],[22,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 6: - yy.parseDirective('%%{', 'open_directive'); -break; -case 7: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 8: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 9: - yy.parseDirective('}%%', 'close_directive', 'class'); -break; -case 14: - this.$=$$[$0]; -break; -case 15: - this.$=$$[$0-1]+$$[$0]; -break; -case 16: - this.$=$$[$0-2]+'~'+$$[$0-1]+$$[$0]; -break; -case 17: - this.$=$$[$0-1]+'~'+$$[$0]; -break; -case 18: - yy.addRelation($$[$0]); -break; -case 19: - $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]); -break; -case 26: -yy.addClass($$[$0]); -break; -case 27: -yy.addClass($$[$0-2]);yy.setCssClass($$[$0-2], $$[$0]); -break; -case 28: -/*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]); -break; -case 29: -yy.addClass($$[$0-5]);yy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]); -break; -case 30: - yy.addAnnotation($$[$0],$$[$0-2]); -break; -case 31: - this.$ = [$$[$0]]; -break; -case 32: - $$[$0].push($$[$0-1]);this.$=$$[$0]; -break; -case 33: -/*console.log('Rel found',$$[$0]);*/ -break; -case 34: -yy.addMember($$[$0-1],yy.cleanupLabel($$[$0])); -break; -case 35: -/*console.warn('Member',$$[$0]);*/ -break; -case 36: -/*console.log('sep found',$$[$0]);*/ -break; -case 37: - this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; -break; -case 38: - this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'} -break; -case 39: - this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; -break; -case 40: - this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} -break; -case 41: - this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; -break; -case 42: - this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; -break; -case 43: - this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; -break; -case 44: - this.$={type1:'none',type2:'none',lineType:$$[$0]}; -break; -case 45: - this.$=yy.relationType.AGGREGATION; -break; -case 46: - this.$=yy.relationType.EXTENSION; -break; -case 47: - this.$=yy.relationType.COMPOSITION; -break; -case 48: - this.$=yy.relationType.DEPENDENCY; -break; -case 49: -this.$=yy.lineType.LINE; -break; -case 50: -this.$=yy.lineType.DOTTED_LINE; -break; -case 51: case 57: -this.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]); -break; -case 52: case 58: -this.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]); -break; -case 53: case 61: -this.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]); -break; -case 54: -this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]); -break; -case 55: case 63: -this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]); -break; -case 56: case 64: -this.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]); -break; -case 59: -this.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]); -break; -case 60: -this.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]); -break; -case 62: -this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1], $$[$0]); -break; -case 65: -yy.setCssClass($$[$0-1], $$[$0]); -break; -} -}, -table: [{3:1,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:$V2},o([11,16],[2,7]),{5:23,7:5,13:$V0,18:15,20:16,21:24,22:33,24:17,26:18,27:19,28:20,29:21,30:22,31:$V3,36:$V4,38:$V5,39:$V6,50:$V7,51:$V8,53:$V9,57:$Va,71:$Vb,72:$Vc,73:$Vd},{10:[1,37]},{12:38,15:[1,39]},{10:[2,9]},{19:[1,40]},{10:[1,41],19:[2,11]},o($Ve,[2,18],{25:[1,42]}),o($Ve,[2,20]),o($Ve,[2,21]),o($Ve,[2,22]),o($Ve,[2,23]),o($Ve,[2,24]),o($Ve,[2,25]),o($Ve,[2,33],{40:43,42:46,43:47,25:[1,45],41:[1,44],44:$Vf,45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk}),{21:54,22:33,71:$Vb,72:$Vc,73:$Vd},o($Ve,[2,35]),o($Ve,[2,36]),{22:55,71:$Vb,72:$Vc,73:$Vd},{21:56,22:33,71:$Vb,72:$Vc,73:$Vd},{21:57,22:33,71:$Vb,72:$Vc,73:$Vd},{21:58,22:33,71:$Vb,72:$Vc,73:$Vd},{41:[1,59]},o($Vl,[2,14],{22:33,21:60,23:[1,61],71:$Vb,72:$Vc,73:$Vd}),o($Vm,[2,79]),o($Vm,[2,80]),o($Vm,[2,81]),o($Vn,[2,4]),{9:62,16:$V2},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:$V0,18:63,19:[2,12],20:16,21:24,22:33,24:17,26:18,27:19,28:20,29:21,30:22,31:$V3,36:$V4,38:$V5,39:$V6,50:$V7,51:$V8,53:$V9,57:$Va,71:$Vb,72:$Vc,73:$Vd},o($Ve,[2,19]),{21:64,22:33,41:[1,65],71:$Vb,72:$Vc,73:$Vd},{40:66,42:46,43:47,44:$Vf,45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk},o($Ve,[2,34]),{43:67,48:$Vj,49:$Vk},o($Vo,[2,44],{42:68,44:$Vf,45:$Vg,46:$Vh,47:$Vi}),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vq,[2,49]),o($Vq,[2,50]),o($Ve,[2,26],{32:[1,69],33:[1,70]}),{37:[1,71]},{41:[1,72]},{41:[1,73]},{54:[1,74],56:[1,75]},{22:76,71:$Vb,72:$Vc,73:$Vd},o($Vl,[2,15]),o($Vl,[2,17],{22:33,21:77,71:$Vb,72:$Vc,73:$Vd}),{10:[1,78]},{19:[2,13]},o($Vr,[2,37]),{21:79,22:33,71:$Vb,72:$Vc,73:$Vd},{21:80,22:33,41:[1,81],71:$Vb,72:$Vc,73:$Vd},o($Vo,[2,43],{42:82,44:$Vf,45:$Vg,46:$Vh,47:$Vi}),o($Vo,[2,42]),{22:83,71:$Vb,72:$Vc,73:$Vd},{34:84,38:$Vs},{21:86,22:33,71:$Vb,72:$Vc,73:$Vd},o($Ve,[2,51],{41:[1,87]}),o($Ve,[2,53],{41:[1,89],52:[1,88]}),o($Ve,[2,57],{41:[1,90],55:[1,91]}),o($Ve,[2,61],{41:[1,93],52:[1,92]}),o($Ve,[2,65]),o($Vl,[2,16]),o($Vn,[2,5]),o($Vr,[2,39]),o($Vr,[2,38]),{21:94,22:33,71:$Vb,72:$Vc,73:$Vd},o($Vo,[2,41]),o($Ve,[2,27],{33:[1,95]}),{35:[1,96]},{34:97,35:[2,31],38:$Vs},o($Ve,[2,30]),o($Ve,[2,52]),o($Ve,[2,54]),o($Ve,[2,55],{52:[1,98]}),o($Ve,[2,58]),o($Ve,[2,59],{41:[1,99]}),o($Ve,[2,62]),o($Ve,[2,63],{52:[1,100]}),o($Vr,[2,40]),{34:101,38:$Vs},o($Ve,[2,28]),{35:[2,32]},o($Ve,[2,56]),o($Ve,[2,60]),o($Ve,[2,64]),{35:[1,102]},o($Ve,[2,29])], -defaultActions: {2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],39:[2,8],40:[2,10],63:[2,13],97:[2,32]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 13; -break; -case 1: this.begin('type_directive'); return 14; -break; -case 2: this.popState(); this.begin('arg_directive'); return 11; -break; -case 3: this.popState(); this.popState(); return 16; -break; -case 4:return 15; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */ -break; -case 7:return 10; -break; -case 8:/* skip whitespace */ -break; -case 9:return 17; -break; -case 10:return 17; -break; -case 11: this.begin("struct"); /*console.log('Starting struct');*/ return 33; -break; -case 12:return "EOF_IN_STRUCT"; -break; -case 13:return "OPEN_IN_STRUCT"; -break; -case 14: /*console.log('Ending struct');*/this.popState(); return 35; -break; -case 15:/* nothing */ -break; -case 16: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER"; -break; -case 17:return 31; -break; -case 18:return 57; -break; -case 19:return 50; -break; -case 20:return 51; -break; -case 21:return 53; -break; -case 22:return 36; -break; -case 23:return 37; -break; -case 24:this.begin("generic"); -break; -case 25:this.popState(); -break; -case 26:return "GENERICTYPE"; -break; -case 27:this.begin("string"); -break; -case 28:this.popState(); -break; -case 29:return "STR"; -break; -case 30:this.begin("href"); -break; -case 31:this.popState(); -break; -case 32:return 56; -break; -case 33:this.begin("callback_name"); -break; -case 34:this.popState(); -break; -case 35:this.popState(); this.begin("callback_args"); -break; -case 36:return 54; -break; -case 37:this.popState(); -break; -case 38:return 55; -break; -case 39:return 52; -break; -case 40:return 52; -break; -case 41:return 52; -break; -case 42:return 52; -break; -case 43:return 45; -break; -case 44:return 45; -break; -case 45:return 47; -break; -case 46:return 47; -break; -case 47:return 46; -break; -case 48:return 44; -break; -case 49:return 48; -break; -case 50:return 49; -break; -case 51:return 25; -break; -case 52:return 32; -break; -case 53:return 69; -break; -case 54:return 'DOT'; -break; -case 55:return 'PLUS'; -break; -case 56:return 66; -break; -case 57:return 'EQUALS'; -break; -case 58:return 'EQUALS'; -break; -case 59:return 73; -break; -case 60:return 'PUNCTUATION'; -break; -case 61:return 72; -break; -case 62:return 71; -break; -case 63:return 68; -break; -case 64:return 19; -break; -} -}, -rules: [/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/], -conditions: {"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"callback_args":{"rules":[37,38],"inclusive":false},"callback_name":{"rules":[34,35,36],"inclusive":false},"href":{"rules":[31,32],"inclusive":false},"struct":{"rules":[12,13,14,15,16],"inclusive":false},"generic":{"rules":[25,26],"inclusive":false},"string":{"rules":[28,29],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/class/styles.js": -/*!**************************************!*\ - !*** ./src/diagrams/class/styles.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return "g.classGroup text {\n fill: ".concat(options.nodeBorder, ";\n fill: ").concat(options.classText, ";\n stroke: none;\n font-family: ").concat(options.fontFamily, ";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(options.nodeBorder, ";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.classGroup line {\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(options.nodeBorder, ";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/class/svgDraw.js": -/*!***************************************!*\ - !*** ./src/diagrams/class/svgDraw.js ***! - \***************************************/ -/*! exports provided: drawEdge, drawClass, parseMember, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawEdge", function() { return drawEdge; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawClass", function() { return drawClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMember", function() { return parseMember; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); - - - - -var edgeCount = 0; -var drawEdge = function drawEdge(elem, path, relation, conf) { - var getRelationType = function getRelationType(type) { - switch (type) { - case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].AGGREGATION: - return 'aggregation'; - - case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].EXTENSION: - return 'extension'; - - case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].COMPOSITION: - return 'composition'; - - case _classDb__WEBPACK_IMPORTED_MODULE_1__["relationType"].DEPENDENCY: - return 'dependency'; - } - }; - - path.points = path.points.filter(function (p) { - return !Number.isNaN(p.y); - }); // The data for our line - - var lineData = path.points; // This is the accessor function we talked about above - - var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { - return d.x; - }).y(function (d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); - var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation'); - var url = ''; - - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } - - if (relation.relation.lineType == 1) { - svgPath.attr('class', 'relation dashed-line'); - } - - if (relation.relation.type1 !== 'none') { - svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')'); - } - - if (relation.relation.type2 !== 'none') { - svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')'); - } - - var x, y; - var l = path.points.length; // Calculate Label position - - var labelPosition = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcLabelPosition(path.points); - x = labelPosition.x; - y = labelPosition.y; - var p1_card_x, p1_card_y; - var p2_card_x, p2_card_y; - - if (l % 2 !== 0 && l > 1) { - var cardinality_1_point = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcCardinalityPosition(relation.relation.type1 !== 'none', path.points, path.points[0]); - var cardinality_2_point = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].calcCardinalityPosition(relation.relation.type2 !== 'none', path.points, path.points[l - 1]); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point)); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point)); - p1_card_x = cardinality_1_point.x; - p1_card_y = cardinality_1_point.y; - p2_card_x = cardinality_2_point.x; - p2_card_y = cardinality_2_point.y; - } - - if (typeof relation.title !== 'undefined') { - var g = elem.append('g').attr('class', 'classLabel'); - var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title); - window.label = label; - var bounds = label.node().getBBox(); - g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding); - } - - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering relation ' + JSON.stringify(relation)); - - if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') { - var _g = elem.append('g').attr('class', 'cardinality'); - - _g.append('text').attr('class', 'type1').attr('x', p1_card_x).attr('y', p1_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle1); - } - - if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') { - var _g2 = elem.append('g').attr('class', 'cardinality'); - - _g2.append('text').attr('class', 'type2').attr('x', p2_card_x).attr('y', p2_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle2); - } - - edgeCount++; -}; -var drawClass = function drawClass(elem, classDef, conf) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('Rendering class ' + classDef); - var id = classDef.id; - var classInfo = { - id: id, - label: classDef.id, - width: 0, - height: 0 - }; // add class group - - var g = elem.append('g').attr('id', Object(_classDb__WEBPACK_IMPORTED_MODULE_1__["lookUpDomId"])(id)).attr('class', 'classGroup'); // add title - - var title; - - if (classDef.link) { - title = g.append('svg:a').attr('xlink:href', classDef.link).attr('target', classDef.linkTarget).append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0); - } else { - title = g.append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0); - } // add annotations - - - var isFirst = true; - classDef.annotations.forEach(function (member) { - var titleText2 = title.append('tspan').text('«' + member + '»'); - if (!isFirst) titleText2.attr('dy', conf.textHeight); - isFirst = false; - }); - var classTitleString = classDef.id; - - if (classDef.type !== undefined && classDef.type !== '') { - classTitleString += '<' + classDef.type + '>'; - } - - var classTitle = title.append('tspan').text(classTitleString).attr('class', 'title'); // If class has annotations the title needs to have an offset of the text height - - if (!isFirst) classTitle.attr('dy', conf.textHeight); - var titleHeight = title.node().getBBox().height; - var membersLine = g.append('line') // text label for the x axis - .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2); - var members = g.append('text') // text label for the x axis - .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText'); - isFirst = true; - classDef.members.forEach(function (member) { - addTspan(members, member, isFirst, conf); - isFirst = false; - }); - var membersBox = members.node().getBBox(); - var methodsLine = g.append('line') // text label for the x axis - .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height); - var methods = g.append('text') // text label for the x axis - .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText'); - isFirst = true; - classDef.methods.forEach(function (method) { - addTspan(methods, method, isFirst, conf); - isFirst = false; - }); - var classBox = g.node().getBBox(); - var cssClassStr = ' '; - - if (classDef.cssClasses.length > 0) { - cssClassStr = cssClassStr + classDef.cssClasses.join(' '); - } - - var rect = g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr('class', cssClassStr); - var rectWidth = rect.node().getBBox().width; // Center title - // We subtract the width of each text element from the class box width and divide it by 2 - - title.node().childNodes.forEach(function (x) { - x.setAttribute('x', (rectWidth - x.getBBox().width) / 2); - }); - - if (classDef.tooltip) { - title.insert('title').text(classDef.tooltip); - } - - membersLine.attr('x2', rectWidth); - methodsLine.attr('x2', rectWidth); - classInfo.width = rectWidth; - classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; - return classInfo; -}; -var parseMember = function parseMember(text) { - var fieldRegEx = /(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/; - var methodRegEx = /^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/; - var fieldMatch = text.match(fieldRegEx); - var methodMatch = text.match(methodRegEx); - - if (fieldMatch && !methodMatch) { - return buildFieldDisplay(fieldMatch); - } else if (methodMatch) { - return buildMethodDisplay(methodMatch); - } else { - return buildLegacyDisplay(text); - } -}; - -var buildFieldDisplay = function buildFieldDisplay(parsedText) { - var displayText = ''; - - try { - var visibility = parsedText[1] ? parsedText[1].trim() : ''; - var fieldType = parsedText[2] ? parsedText[2].trim() : ''; - var genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : ''; - var fieldName = parsedText[4] ? parsedText[4].trim() : ''; - displayText = visibility + fieldType + genericType + ' ' + fieldName; - } catch (err) { - displayText = parsedText; - } - - return { - displayText: displayText, - cssStyle: '' - }; -}; - -var buildMethodDisplay = function buildMethodDisplay(parsedText) { - var cssStyle = ''; - var displayText = ''; - - try { - var visibility = parsedText[1] ? parsedText[1].trim() : ''; - var methodName = parsedText[2] ? parsedText[2].trim() : ''; - var parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : ''; - var classifier = parsedText[4] ? parsedText[4].trim() : ''; - var returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : ''; - displayText = visibility + methodName + '(' + parameters + ')' + returnType; - cssStyle = parseClassifier(classifier); - } catch (err) { - displayText = parsedText; - } - - return { - displayText: displayText, - cssStyle: cssStyle - }; -}; - -var buildLegacyDisplay = function buildLegacyDisplay(text) { - // if for some reason we dont have any match, use old format to parse text - var displayText = ''; - var cssStyle = ''; - var memberText = ''; - var returnType = ''; - var methodStart = text.indexOf('('); - var methodEnd = text.indexOf(')'); - - if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) { - var visibility = ''; - var methodName = ''; - var firstChar = text.substring(0, 1); - - if (firstChar.match(/\w/)) { - methodName = text.substring(0, methodStart).trim(); - } else { - if (firstChar.match(/\+|-|~|#/)) { - visibility = firstChar; - } - - methodName = text.substring(1, methodStart).trim(); - } - - var parameters = text.substring(methodStart + 1, methodEnd); - var classifier = text.substring(methodEnd + 1, 1); - cssStyle = parseClassifier(classifier); - displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')'; - - if (methodEnd < memberText.length) { - returnType = text.substring(methodEnd + 2).trim(); - - if (returnType !== '') { - returnType = ' : ' + parseGenericTypes(returnType); - } - } - } else { - // finally - if all else fails, just send the text back as written (other than parsing for generic types) - displayText = parseGenericTypes(text); - } - - return { - displayText: displayText, - cssStyle: cssStyle - }; -}; - -var addTspan = function addTspan(textEl, txt, isFirst, conf) { - var member = parseMember(txt); - var tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText); - - if (member.cssStyle !== '') { - tSpan.attr('style', member.cssStyle); - } - - if (!isFirst) { - tSpan.attr('dy', conf.textHeight); - } -}; - -var parseGenericTypes = function parseGenericTypes(text) { - var cleanedText = text; - - if (text.indexOf('~') != -1) { - cleanedText = cleanedText.replace('~', '<'); - cleanedText = cleanedText.replace('~', '>'); - return parseGenericTypes(cleanedText); - } else { - return cleanedText; - } -}; - -var parseClassifier = function parseClassifier(classifier) { - switch (classifier) { - case '*': - return 'font-style:italic;'; - - case '$': - return 'text-decoration:underline;'; - - default: - return ''; - } -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - drawClass: drawClass, - drawEdge: drawEdge, - parseMember: parseMember -}); - -/***/ }), - -/***/ "./src/diagrams/common/common.js": -/*!***************************************!*\ - !*** ./src/diagrams/common/common.js ***! - \***************************************/ -/*! exports provided: getRows, removeScript, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRows", function() { return getRows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeScript", function() { return removeScript; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeText", function() { return sanitizeText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineBreakRegex", function() { return lineBreakRegex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBreaks", function() { return hasBreaks; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitBreaks", function() { return splitBreaks; }); -var getRows = function getRows(s) { - if (!s) return 1; - var str = breakToPlaceholder(s); - str = str.replace(/\\n/g, '#br#'); - return str.split('#br#'); -}; -var removeScript = function removeScript(txt) { - var rs = ''; - var idx = 0; - - while (idx >= 0) { - idx = txt.indexOf('= 0) { - rs += txt.substr(0, idx); - txt = txt.substr(idx + 1); - idx = txt.indexOf(''); - - if (idx >= 0) { - idx += 9; - txt = txt.substr(idx); - } - } else { - rs += txt; - idx = -1; - break; - } - } - - return rs; -}; -var sanitizeText = function sanitizeText(text, config) { - var txt = text; - var htmlLabels = true; - - if (config.flowchart && (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false')) { - htmlLabels = false; - } - - if (htmlLabels) { - var level = config.securityLevel; - - if (level === 'antiscript') { - txt = removeScript(txt); - } else if (level !== 'loose') { - // eslint-disable-line - txt = breakToPlaceholder(txt); - txt = txt.replace(//g, '>'); - txt = txt.replace(/=/g, '='); - txt = placeholderToBreak(txt); - } - } - - return txt; -}; -var lineBreakRegex = //gi; -var hasBreaks = function hasBreaks(text) { - return //gi.test(text); -}; -var splitBreaks = function splitBreaks(text) { - return text.split(//gi); -}; - -var breakToPlaceholder = function breakToPlaceholder(s) { - return s.replace(lineBreakRegex, '#br#'); -}; - -var placeholderToBreak = function placeholderToBreak(s) { - return s.replace(/#br#/g, '
'); -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - getRows: getRows, - sanitizeText: sanitizeText, - hasBreaks: hasBreaks, - splitBreaks: splitBreaks, - lineBreakRegex: lineBreakRegex, - removeScript: removeScript -}); - -/***/ }), - -/***/ "./src/diagrams/er/erDb.js": -/*!*********************************!*\ - !*** ./src/diagrams/er/erDb.js ***! - \*********************************/ -/*! exports provided: parseDirective, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/** - * - */ - - - -var entities = {}; -var relationships = []; -var title = ''; -var Cardinality = { - ZERO_OR_ONE: 'ZERO_OR_ONE', - ZERO_OR_MORE: 'ZERO_OR_MORE', - ONE_OR_MORE: 'ONE_OR_MORE', - ONLY_ONE: 'ONLY_ONE' -}; -var Identification = { - NON_IDENTIFYING: 'NON_IDENTIFYING', - IDENTIFYING: 'IDENTIFYING' -}; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parseDirective(this, statement, context, type); -}; - -var addEntity = function addEntity(name) { - if (typeof entities[name] === 'undefined') { - entities[name] = { - attributes: [] - }; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Added new entity :', name); - } - - return entities[name]; -}; - -var getEntities = function getEntities() { - return entities; -}; - -var addAttributes = function addAttributes(entityName, attribs) { - var entity = addEntity(entityName); // May do nothing (if entity has already been added) - // Process attribs in reverse order due to effect of recursive construction (last attribute is first) - - var i; - - for (i = attribs.length - 1; i >= 0; i--) { - entity.attributes.push(attribs[i]); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added attribute ', attribs[i].attributeName); - } -}; -/** - * Add a relationship - * @param entA The first entity in the relationship - * @param rolA The role played by the first entity in relation to the second - * @param entB The second entity in the relationship - * @param rSpec The details of the relationship between the two entities - */ - - -var addRelationship = function addRelationship(entA, rolA, entB, rSpec) { - var rel = { - entityA: entA, - roleA: rolA, - entityB: entB, - relSpec: rSpec - }; - relationships.push(rel); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added new relationship :', rel); -}; - -var getRelationships = function getRelationships() { - return relationships; -}; // Keep this - TODO: revisit...allow the diagram to have a title - - -var setTitle = function setTitle(txt) { - title = txt; -}; - -var getTitle = function getTitle() { - return title; -}; - -var clear = function clear() { - entities = {}; - relationships = []; - title = ''; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - Cardinality: Cardinality, - Identification: Identification, - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().er; - }, - addEntity: addEntity, - addAttributes: addAttributes, - getEntities: getEntities, - addRelationship: addRelationship, - getRelationships: getRelationships, - clear: clear, - setTitle: setTitle, - getTitle: getTitle -}); - -/***/ }), - -/***/ "./src/diagrams/er/erMarkers.js": -/*!**************************************!*\ - !*** ./src/diagrams/er/erMarkers.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var ERMarkers = { - ONLY_ONE_START: 'ONLY_ONE_START', - ONLY_ONE_END: 'ONLY_ONE_END', - ZERO_OR_ONE_START: 'ZERO_OR_ONE_START', - ZERO_OR_ONE_END: 'ZERO_OR_ONE_END', - ONE_OR_MORE_START: 'ONE_OR_MORE_START', - ONE_OR_MORE_END: 'ONE_OR_MORE_END', - ZERO_OR_MORE_START: 'ZERO_OR_MORE_START', - ZERO_OR_MORE_END: 'ZERO_OR_MORE_END' -}; -/** - * Put the markers into the svg DOM for later use with edge paths - */ - -var insertMarkers = function insertMarkers(elem, conf) { - var marker; - elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18 M15,0 L15,18'); - elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_END).attr('refX', 18).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,0 L3,18 M9,0 L9,18'); - marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto'); - marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 21).attr('cy', 9).attr('r', 6); - marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18'); - marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_END).attr('refX', 30).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto'); - marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 9).attr('r', 6); - marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18'); - elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27'); - elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_END).attr('refX', 27).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18'); - marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto'); - marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 48).attr('cy', 18).attr('r', 6); - marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18'); - marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_END).attr('refX', 39).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto'); - marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 18).attr('r', 6); - marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18'); - return; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - ERMarkers: ERMarkers, - insertMarkers: insertMarkers -}); - -/***/ }), - -/***/ "./src/diagrams/er/erRenderer.js": -/*!***************************************!*\ - !*** ./src/diagrams/er/erRenderer.js ***! - \***************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _erDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./erDb */ "./src/diagrams/er/erDb.js"); -/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/erDiagram */ "./src/diagrams/er/parser/erDiagram.jison"); -/* harmony import */ var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dagre */ "dagre"); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _erMarkers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./erMarkers */ "./src/diagrams/er/erMarkers.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - - - -var conf = {}; -/** - * Allows the top-level API module to inject config specific to this renderer, - * storing it in the local conf object. Note that generic config still needs to be - * retrieved using getConfig() imported from the config module - */ - -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - - for (var i = 0; i < keys.length; i++) { - conf[keys[i]] = cnf[keys[i]]; - } -}; -/** - * Draw attributes for an entity - * @param groupNode the svg group node for the entity - * @param entityTextNode the svg node for the entity label text - * @param attributes an array of attributes defined for the entity (each attribute has a type and a name) - * @return the bounding box of the entity, after attributes have been added - */ - -var drawAttributes = function drawAttributes(groupNode, entityTextNode, attributes) { - var heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes - - var widthPadding = conf.entityPadding / 3; // Ditto - - var attrFontSize = conf.fontSize * 0.85; - var labelBBox = entityTextNode.node().getBBox(); - var attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass - - var maxTypeWidth = 0; - var maxNameWidth = 0; - var cumulativeHeight = labelBBox.height + heightPadding * 2; - var attrNum = 1; - attributes.forEach(function (item) { - var attrPrefix = "".concat(entityTextNode.node().id, "-attr-").concat(attrNum); // Add a text node for the attribute type - - var typeNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', "".concat(attrPrefix, "-type")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeType); // Add a text node for the attribute name - - var nameNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', "".concat(attrPrefix, "-name")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeName); // Keep a reference to the nodes so that we can iterate through them later - - attributeNodes.push({ - tn: typeNode, - nn: nameNode - }); - var typeBBox = typeNode.node().getBBox(); - var nameBBox = nameNode.node().getBBox(); - maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); - maxNameWidth = Math.max(maxNameWidth, nameBBox.width); - cumulativeHeight += Math.max(typeBBox.height, nameBBox.height) + heightPadding * 2; - attrNum += 1; - }); // Calculate the new bounding box of the overall entity, now that attributes have been added - - var bBox = { - width: Math.max(conf.minEntityWidth, Math.max(labelBBox.width + conf.entityPadding * 2, maxTypeWidth + maxNameWidth + widthPadding * 4)), - height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) - }; // There might be some spare width for padding out attributes if the entity name is very long - - var spareWidth = Math.max(0, bBox.width - (maxTypeWidth + maxNameWidth) - widthPadding * 4); - - if (attributes.length > 0) { - // Position the entity label near the top of the entity bounding box - entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'); // Add rectangular boxes for the attribute types/names - - var heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label - - var attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect - - attributeNodes.forEach(function (nodePair) { - // Calculate the alignment y co-ordinate for the type/name of the attribute - var alignY = heightOffset + heightPadding + Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) / 2; // Position the type of the attribute - - nodePair.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')'); // Insert a rectangle for the type - - var typeRect = groupNode.insert('rect', '#' + nodePair.tn.node().id).attr('class', "er ".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', heightOffset).attr('width', maxTypeWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.tn.node().getBBox().height + heightPadding * 2); // Position the name of the attribute - - nodePair.nn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name - - groupNode.insert('rect', '#' + nodePair.nn.node().id).attr('class', "er ".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', "".concat(typeRect.attr('x') + typeRect.attr('width'))) //.attr('x', maxTypeWidth + (widthPadding * 2)) - .attr('y', heightOffset).attr('width', maxNameWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.nn.node().getBBox().height + heightPadding * 2); // Increment the height offset to move to the next row - - heightOffset += Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) + heightPadding * 2; // Flip the attribute style for row banding - - attribStyle = attribStyle == 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd'; - }); - } else { - // Ensure the entity box is a decent size without any attributes - bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); // Position the entity label in the middle of the box - - entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')'); - } - - return bBox; -}; -/** - * Use D3 to construct the svg elements for the entities - * @param svgNode the svg node that contains the diagram - * @param entities The entities to be drawn - * @param graph The graph that contains the vertex and edge definitions post-layout - * @return The first entity that was inserted - */ - - -var drawEntities = function drawEntities(svgNode, entities, graph) { - var keys = Object.keys(entities); - var firstOne; - keys.forEach(function (id) { - // Create a group for each entity - var groupNode = svgNode.append('g').attr('id', id); - firstOne = firstOne === undefined ? id : firstOne; // Label the entity - this is done first so that we can get the bounding box - // which then determines the size of the rectangle - - var textId = 'entity-' + id; - var textNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id); - - var _drawAttributes = drawAttributes(groupNode, textNode, entities[id].attributes), - entityWidth = _drawAttributes.width, - entityHeight = _drawAttributes.height; // Draw the rectangle - insert it before the text so that the text is not obscured - - - var rectNode = groupNode.insert('rect', '#' + textId).attr('class', 'er entityBox').attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight); - var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph - - graph.setNode(id, { - width: rectBBox.width, - height: rectBBox.height, - shape: 'rect', - id: id - }); - }); - return firstOne; -}; // drawEntities - - -var adjustEntities = function adjustEntities(svgNode, graph) { - graph.nodes().forEach(function (v) { - if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') { - svgNode.select('#' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y - graph.node(v).height / 2) + ' )'); - } - }); - return; -}; - -var getEdgeName = function getEdgeName(rel) { - return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ''); -}; -/** - * Add each relationship to the graph - * @param relationships the relationships to be added - * @param g the graph - * @return {Array} The array of relationships - */ - - -var addRelationships = function addRelationships(relationships, g) { - relationships.forEach(function (r) { - g.setEdge(r.entityA, r.entityB, { - relationship: r - }, getEdgeName(r)); - }); - return relationships; -}; // addRelationships - - -var relCnt = 0; -/** - * Draw a relationship using edge information from the graph - * @param svg the svg node - * @param rel the relationship to draw in the svg - * @param g the graph containing the edge information - * @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes) - */ - -var drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g, insert) { - relCnt++; // Find the edge relating to this relationship - - var edge = g.edge(rel.entityA, rel.entityB, getEdgeName(rel)); // Get a function that will generate the line path - - var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_1__["line"])().x(function (d) { - return d.x; - }).y(function (d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_1__["curveBasis"]); // Insert the line at the right place - - var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary - - if (rel.relSpec.relType === _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Identification.NON_IDENTIFYING) { - svgPath.attr('stroke-dasharray', '8,8'); - } // TODO: Understand this better - - - var url = ''; - - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } // Decide which start and end markers it needs. It may be possible to be more concise here - // by reversing a start marker to make an end marker...but this will do for now - // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start - - - switch (rel.relSpec.cardA) { - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_ONE: - svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_ONE_END + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_MORE: - svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_MORE_END + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONE_OR_MORE: - svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONE_OR_MORE_END + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONLY_ONE: - svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONLY_ONE_END + ')'); - break; - } - - switch (rel.relSpec.cardB) { - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_ONE: - svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_ONE_START + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ZERO_OR_MORE: - svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ZERO_OR_MORE_START + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONE_OR_MORE: - svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONE_OR_MORE_START + ')'); - break; - - case _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].Cardinality.ONLY_ONE: - svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].ERMarkers.ONLY_ONE_START + ')'); - break; - } // Now label the relationship - // Find the half-way point - - - var len = svgPath.node().getTotalLength(); - var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label - - var labelId = 'rel' + relCnt; - var labelNode = svg.append('text').attr('class', 'er relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be - - var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label - - svg.insert('rect', '#' + labelId).attr('class', 'er relationshipLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%'); - return; -}; -/** - * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram - * @param text the text of the diagram - * @param id the unique id of the DOM node that contains the diagram - */ - - -var draw = function draw(text, id) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Drawing ER diagram'); - _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - var parser = _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _erDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the text to populate erDb - - try { - parser.parse(text); - } catch (err) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].debug('Parsing failed'); - } // Get a reference to the svg node that contains the text - - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id='".concat(id, "']")); // Add cardinality marker definitions to the svg - - _erMarkers__WEBPACK_IMPORTED_MODULE_7__["default"].insertMarkers(svg, conf); // Now we have to construct the diagram in a specific way: - // --- - // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content) - // 2. Make sure they are all added to the graph - // 3. Add all the edges (relationships) to the graph aswell - // 4. Let dagre do its magic to layout the graph. This assigns: - // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships - // - the path co-ordinates for each edge - // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0 - // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by - // its centre point, which is obtained from the graph, and it's width and height - // 6. And finally, create all the edges in the svg node using information from the graph - // --- - // Create the graph - - var g; // TODO: Explore directed vs undirected graphs, and how the layout is affected - // An E-R diagram could be said to be undirected, but there is merit in setting - // the direction from parent to child in a one-to-many as this influences graphlib to - // put the parent above the child (does it?), which is intuitive. Most relationships - // in ER diagrams are one-to-many. - - g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ - multigraph: true, - directed: true, - compound: false - }).setGraph({ - rankdir: conf.layoutDirection, - marginx: 20, - marginy: 20, - nodesep: 100, - edgesep: 100, - ranksep: 100 - }).setDefaultEdgeLabel(function () { - return {}; - }); // Draw the entities (at 0,0), returning the first svg node that got - // inserted - this represents the insertion point for relationship paths - - var firstEntity = drawEntities(svg, _erDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEntities(), g); // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above - // Add all the relationships to the graph - - var relationships = addRelationships(_erDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRelationships(), g); - dagre__WEBPACK_IMPORTED_MODULE_4___default.a.layout(g); // Node and edge positions will be updated - // Adjust the positions of the entities so that they adhere to the layout - - adjustEntities(svg, g); // Draw the relationships - - relationships.forEach(function (rel) { - drawRelationshipFromLayout(svg, rel, g, firstEntity); - }); - var padding = conf.diagramPadding; - var svgBounds = svg.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - Object(_utils__WEBPACK_IMPORTED_MODULE_8__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); - svg.attr('viewBox', "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height)); -}; // draw - -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/er/parser/erDiagram.jison": -/*!************************************************!*\ - !*** ./src/diagrams/er/parser/erDiagram.jison ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,23,37],$V3=[1,17],$V4=[1,20],$V5=[1,25],$V6=[1,26],$V7=[1,27],$V8=[1,28],$V9=[1,37],$Va=[23,34,35],$Vb=[4,6,9,11,23,37],$Vc=[30,31,32,33],$Vd=[22,27]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"ER_DIAGRAM":4,"document":5,"EOF":6,"directive":7,"line":8,"SPACE":9,"statement":10,"NEWLINE":11,"openDirective":12,"typeDirective":13,"closeDirective":14,":":15,"argDirective":16,"entityName":17,"relSpec":18,"role":19,"BLOCK_START":20,"attributes":21,"BLOCK_STOP":22,"ALPHANUM":23,"attribute":24,"attributeType":25,"attributeName":26,"ATTRIBUTE_WORD":27,"cardinality":28,"relType":29,"ZERO_OR_ONE":30,"ZERO_OR_MORE":31,"ONE_OR_MORE":32,"ONLY_ONE":33,"NON_IDENTIFYING":34,"IDENTIFYING":35,"WORD":36,"open_directive":37,"type_directive":38,"arg_directive":39,"close_directive":40,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"}, -productions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: - /*console.log('finished parsing');*/ -break; -case 3: - this.$ = [] -break; -case 4: -$$[$0-1].push($$[$0]);this.$ = $$[$0-1] -break; -case 5: case 6: - this.$ = $$[$0] -break; -case 7: case 8: - this.$=[]; -break; -case 12: - - yy.addEntity($$[$0-4]); - yy.addEntity($$[$0-2]); - yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]); - /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/ - -break; -case 13: - - /* console.log('detected block'); */ - yy.addEntity($$[$0-3]); - yy.addAttributes($$[$0-3], $$[$0-1]); - /* console.log('handled block'); */ - -break; -case 14: - yy.addEntity($$[$0-2]); -break; -case 15: - yy.addEntity($$[$0]); -break; -case 16: - this.$ = $$[$0]; /*console.log('Entity: ' + $$[$0]);*/ -break; -case 17: - this.$ = [$$[$0]]; -break; -case 18: - $$[$0].push($$[$0-1]); this.$=$$[$0]; -break; -case 19: - this.$ = { attributeType: $$[$0-1], attributeName: $$[$0] }; -break; -case 20: case 21: - this.$=$$[$0]; -break; -case 22: - - this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] }; - /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/ - -break; -case 23: - this.$ = yy.Cardinality.ZERO_OR_ONE; -break; -case 24: - this.$ = yy.Cardinality.ZERO_OR_MORE; -break; -case 25: - this.$ = yy.Cardinality.ONE_OR_MORE; -break; -case 26: - this.$ = yy.Cardinality.ONLY_ONE; -break; -case 27: - this.$ = yy.Identification.NON_IDENTIFYING; -break; -case 28: - this.$ = yy.Identification.IDENTIFYING; -break; -case 29: - this.$ = $$[$0].replace(/"/g, ''); -break; -case 30: - this.$ = $$[$0]; -break; -case 31: - yy.parseDirective('%%{', 'open_directive'); -break; -case 32: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 33: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 34: - yy.parseDirective('}%%', 'close_directive', 'er'); -break; -} -}, -table: [{3:1,4:$V0,7:3,12:4,37:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,37:$V1},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:$V3,37:$V1},{1:[2,2]},{14:18,15:[1,19],40:$V4},o([15,40],[2,32]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:15,10:21,12:4,17:16,23:$V3,37:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,15],{18:22,28:24,20:[1,23],30:$V5,31:$V6,32:$V7,33:$V8}),o([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},o($V2,[2,5]),{17:32,23:$V3},{21:33,22:[1,34],24:35,25:36,27:$V9},{29:38,34:[1,39],35:[1,40]},o($Va,[2,23]),o($Va,[2,24]),o($Va,[2,25]),o($Va,[2,26]),o($Vb,[2,9]),{14:41,40:$V4},{40:[2,33]},{15:[1,42]},{22:[1,43]},o($V2,[2,14]),{21:44,22:[2,17],24:35,25:36,27:$V9},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:$V5,31:$V6,32:$V7,33:$V8},o($Vc,[2,27]),o($Vc,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},o($V2,[2,13]),{22:[2,18]},o($Vd,[2,19]),o($Vd,[2,21]),{23:[2,22]},o($Vb,[2,10]),o($V2,[2,12]),o($V2,[2,29]),o($V2,[2,30])], -defaultActions: {5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 37; -break; -case 1: this.begin('type_directive'); return 38; -break; -case 2: this.popState(); this.begin('arg_directive'); return 15; -break; -case 3: this.popState(); this.popState(); return 40; -break; -case 4:return 39; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */ -break; -case 7:return 11; -break; -case 8:/* skip whitespace */ -break; -case 9:return 9; -break; -case 10:return 36; -break; -case 11:return 4; -break; -case 12: this.begin("block"); return 20; -break; -case 13:/* skip whitespace in block */ -break; -case 14: return 27; -break; -case 15:/* nothing */ -break; -case 16: this.popState(); return 22; -break; -case 17:return yy_.yytext[0]; -break; -case 18:return 30; -break; -case 19:return 31; -break; -case 20:return 32; -break; -case 21:return 33; -break; -case 22:return 30; -break; -case 23:return 31; -break; -case 24:return 32; -break; -case 25:return 34; -break; -case 26:return 35; -break; -case 27:return 34; -break; -case 28:return 34; -break; -case 29:return 23; -break; -case 30:return yy_.yytext[0]; -break; -case 31:return 6; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i], -conditions: {"open_directive":{"rules":[1],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"block":{"rules":[13,14,15,16,17],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/er/styles.js": -/*!***********************************!*\ - !*** ./src/diagrams/er/styles.js ***! - \***********************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return "\n .entityBox {\n fill: ".concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(options.nodeBorder, ";\n }\n\n .relationshipLabelBox {\n fill: ").concat(options.tertiaryColor, ";\n opacity: 0.7;\n background-color: ").concat(options.tertiaryColor, ";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(options.lineColor, ";\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/flowchart/flowChartShapes.js": -/*!***************************************************!*\ - !*** ./src/diagrams/flowchart/flowChartShapes.js ***! - \***************************************************/ -/*! exports provided: addToRender, addToRenderV2, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToRender", function() { return addToRender; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToRenderV2", function() { return addToRenderV2; }); -/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre-d3 */ "dagre-d3"); -/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_0__); - - -function question(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var s = (w + h) * 0.9; - var points = [{ - x: s / 2, - y: 0 - }, { - x: s, - y: -s / 2 - }, { - x: s / 2, - y: -s - }, { - x: 0, - y: -s / 2 - }]; - var shapeSvg = insertPolygonShape(parent, s, s, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function hexagon(parent, bbox, node) { - var f = 4; - var h = bbox.height; - var m = h / f; - var w = bbox.width + 2 * m; - var points = [{ - x: m, - y: 0 - }, { - x: w - m, - y: 0 - }, { - x: w, - y: -h / 2 - }, { - x: w - m, - y: -h - }, { - x: m, - y: -h - }, { - x: 0, - y: -h / 2 - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function rect_left_inv_arrow(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: -h / 2, - y: 0 - }, { - x: w, - y: 0 - }, { - x: w, - y: -h - }, { - x: -h / 2, - y: -h - }, { - x: 0, - y: -h / 2 - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function lean_right(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: -2 * h / 6, - y: 0 - }, { - x: w - h / 6, - y: 0 - }, { - x: w + 2 * h / 6, - y: -h - }, { - x: h / 6, - y: -h - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function lean_left(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: 2 * h / 6, - y: 0 - }, { - x: w + h / 6, - y: 0 - }, { - x: w - 2 * h / 6, - y: -h - }, { - x: -h / 6, - y: -h - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function trapezoid(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: -2 * h / 6, - y: 0 - }, { - x: w + 2 * h / 6, - y: 0 - }, { - x: w - h / 6, - y: -h - }, { - x: h / 6, - y: -h - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function inv_trapezoid(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: h / 6, - y: 0 - }, { - x: w - h / 6, - y: 0 - }, { - x: w + 2 * h / 6, - y: -h - }, { - x: -2 * h / 6, - y: -h - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function rect_right_inv_arrow(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: 0, - y: 0 - }, { - x: w + h / 2, - y: 0 - }, { - x: w, - y: -h / 2 - }, { - x: w + h / 2, - y: -h - }, { - x: 0, - y: -h - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function stadium(parent, bbox, node) { - var h = bbox.height; - var w = bbox.width + h / 4; - var shapeSvg = parent.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point); - }; - - return shapeSvg; -} - -function subroutine(parent, bbox, node) { - var w = bbox.width; - var h = bbox.height; - var points = [{ - x: 0, - y: 0 - }, { - x: w, - y: 0 - }, { - x: w, - y: -h - }, { - x: 0, - y: -h - }, { - x: 0, - y: 0 - }, { - x: -8, - y: 0 - }, { - x: w + 8, - y: 0 - }, { - x: w + 8, - y: -h - }, { - x: -8, - y: -h - }, { - x: -8, - y: 0 - }]; - var shapeSvg = insertPolygonShape(parent, w, h, points); - - node.intersect = function (point) { - return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point); - }; - - return shapeSvg; -} - -function cylinder(parent, bbox, node) { - var w = bbox.width; - var rx = w / 2; - var ry = rx / (2.5 + w / 50); - var h = bbox.height + ry; - var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h; - var shapeSvg = parent.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')'); - - node.intersect = function (point) { - var pos = dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point); - var x = pos.x - node.x; - - if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { - // ellipsis equation: x*x / a*a + y*y / b*b = 1 - // solve for y to get adjustion value for pos.y - var y = ry * ry * (1 - x * x / (rx * rx)); - if (y != 0) y = Math.sqrt(y); - y = ry - y; - if (point.y - node.y > 0) y = -y; - pos.y += y; - } - - return pos; - }; - - return shapeSvg; -} - -function addToRender(render) { - render.shapes().question = question; - render.shapes().hexagon = hexagon; - render.shapes().stadium = stadium; - render.shapes().subroutine = subroutine; - render.shapes().cylinder = cylinder; // Add custom shape for box with inverted arrow on left side - - render.shapes().rect_left_inv_arrow = rect_left_inv_arrow; // Add custom shape for box with inverted arrow on left side - - render.shapes().lean_right = lean_right; // Add custom shape for box with inverted arrow on left side - - render.shapes().lean_left = lean_left; // Add custom shape for box with inverted arrow on left side - - render.shapes().trapezoid = trapezoid; // Add custom shape for box with inverted arrow on left side - - render.shapes().inv_trapezoid = inv_trapezoid; // Add custom shape for box with inverted arrow on right side - - render.shapes().rect_right_inv_arrow = rect_right_inv_arrow; -} -function addToRenderV2(addShape) { - addShape({ - question: question - }); - addShape({ - hexagon: hexagon - }); - addShape({ - stadium: stadium - }); - addShape({ - subroutine: subroutine - }); - addShape({ - cylinder: cylinder - }); // Add custom shape for box with inverted arrow on left side - - addShape({ - rect_left_inv_arrow: rect_left_inv_arrow - }); // Add custom shape for box with inverted arrow on left side - - addShape({ - lean_right: lean_right - }); // Add custom shape for box with inverted arrow on left side - - addShape({ - lean_left: lean_left - }); // Add custom shape for box with inverted arrow on left side - - addShape({ - trapezoid: trapezoid - }); // Add custom shape for box with inverted arrow on left side - - addShape({ - inv_trapezoid: inv_trapezoid - }); // Add custom shape for box with inverted arrow on right side - - addShape({ - rect_right_inv_arrow: rect_right_inv_arrow - }); -} - -function insertPolygonShape(parent, w, h, points) { - return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) { - return d.x + ',' + d.y; - }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')'); -} - -/* harmony default export */ __webpack_exports__["default"] = ({ - addToRender: addToRender, - addToRenderV2: addToRenderV2 -}); - -/***/ }), - -/***/ "./src/diagrams/flowchart/flowDb.js": -/*!******************************************!*\ - !*** ./src/diagrams/flowchart/flowDb.js ***! - \******************************************/ -/*! exports provided: parseDirective, lookUpDomId, addVertex, addSingleLink, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, setGen, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, firstGraph, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lookUpDomId", function() { return lookUpDomId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSingleLink", function() { return addSingleLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setGen", function() { return setGen; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstGraph", function() { return firstGraph; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - - - - - -var MERMAID_DOM_ID_PREFIX = 'flowchart-'; -var vertexCounter = 0; -var config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); -var vertices = {}; -var edges = []; -var classes = []; -var subGraphs = []; -var subGraphLookup = {}; -var tooltips = {}; -var subCount = 0; -var firstGraphFlag = true; -var direction; -var version; // As in graph -// Functions to be run after graph rendering - -var funs = []; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__["default"].parseDirective(this, statement, context, type); -}; -/** - * Function to lookup domId from id in the graph definition. - * @param id - * @public - */ - -var lookUpDomId = function lookUpDomId(id) { - var veritceKeys = Object.keys(vertices); - - for (var i = 0; i < veritceKeys.length; i++) { - if (vertices[veritceKeys[i]].id === id) { - return vertices[veritceKeys[i]].domId; - } - } - - return id; -}; -/** - * Function called by parser when a node definition has been found - * @param id - * @param text - * @param type - * @param style - * @param classes - */ - -var addVertex = function addVertex(_id, text, type, style, classes) { - var txt; - var id = _id; - - if (typeof id === 'undefined') { - return; - } - - if (id.trim().length === 0) { - return; - } // if (id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - - - if (typeof vertices[id] === 'undefined') { - vertices[id] = { - id: id, - domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter, - styles: [], - classes: [] - }; - } - - vertexCounter++; - - if (typeof text !== 'undefined') { - config = _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"](); - txt = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(text.trim(), config); // strip quotes if string starts and ends with a quote - - if (txt[0] === '"' && txt[txt.length - 1] === '"') { - txt = txt.substring(1, txt.length - 1); - } - - vertices[id].text = txt; - } else { - if (typeof vertices[id].text === 'undefined') { - vertices[id].text = _id; - } - } - - if (typeof type !== 'undefined') { - vertices[id].type = type; - } - - if (typeof style !== 'undefined') { - if (style !== null) { - style.forEach(function (s) { - vertices[id].styles.push(s); - }); - } - } - - if (typeof classes !== 'undefined') { - if (classes !== null) { - classes.forEach(function (s) { - vertices[id].classes.push(s); - }); - } - } -}; -/** - * Function called by parser when a link/edge definition has been found - * @param start - * @param end - * @param type - * @param linktext - */ - -var addSingleLink = function addSingleLink(_start, _end, type, linktext) { - var start = _start; - var end = _end; // if (start[0].match(/\d/)) start = MERMAID_DOM_ID_PREFIX + start; - // if (end[0].match(/\d/)) end = MERMAID_DOM_ID_PREFIX + end; - // log.info('Got edge...', start, end); - - var edge = { - start: start, - end: end, - type: undefined, - text: '' - }; - linktext = type.text; - - if (typeof linktext !== 'undefined') { - edge.text = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(linktext.trim(), config); // strip quotes if string starts and exnds with a quote - - if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { - edge.text = edge.text.substring(1, edge.text.length - 1); - } - } - - if (typeof type !== 'undefined') { - edge.type = type.type; - edge.stroke = type.stroke; - edge.length = type.length; - } - - edges.push(edge); -}; -var addLink = function addLink(_start, _end, type, linktext) { - var i, j; - - for (i = 0; i < _start.length; i++) { - for (j = 0; j < _end.length; j++) { - addSingleLink(_start[i], _end[j], type, linktext); - } - } -}; -/** - * Updates a link's line interpolation algorithm - * @param pos - * @param interpolate - */ - -var updateLinkInterpolate = function updateLinkInterpolate(positions, interp) { - positions.forEach(function (pos) { - if (pos === 'default') { - edges.defaultInterpolate = interp; - } else { - edges[pos].interpolate = interp; - } - }); -}; -/** - * Updates a link with a style - * @param pos - * @param style - */ - -var updateLink = function updateLink(positions, style) { - positions.forEach(function (pos) { - if (pos === 'default') { - edges.defaultStyle = style; - } else { - if (_utils__WEBPACK_IMPORTED_MODULE_1__["default"].isSubstringInArray('fill', style) === -1) { - style.push('fill:none'); - } - - edges[pos].style = style; - } - }); -}; -var addClass = function addClass(id, style) { - if (typeof classes[id] === 'undefined') { - classes[id] = { - id: id, - styles: [], - textStyles: [] - }; - } - - if (typeof style !== 'undefined') { - if (style !== null) { - style.forEach(function (s) { - if (s.match('color')) { - var newStyle1 = s.replace('fill', 'bgFill'); - var newStyle2 = newStyle1.replace('color', 'fill'); - classes[id].textStyles.push(newStyle2); - } - - classes[id].styles.push(s); - }); - } - } -}; -/** - * Called by parser when a graph definition is found, stores the direction of the chart. - * @param dir - */ - -var setDirection = function setDirection(dir) { - direction = dir; - - if (direction.match(/.*/)) { - direction = 'LR'; - } - - if (direction.match(/.*v/)) { - direction = 'TB'; - } -}; -/** - * Called by parser when a special node is found, e.g. a clickable element. - * @param ids Comma separated list of ids - * @param className Class to add - */ - -var setClass = function setClass(ids, className) { - ids.split(',').forEach(function (_id) { - // let id = version === 'gen-2' ? lookUpDomId(_id) : _id; - var id = _id; // if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - - if (typeof vertices[id] !== 'undefined') { - vertices[id].classes.push(className); - } - - if (typeof subGraphLookup[id] !== 'undefined') { - subGraphLookup[id].classes.push(className); - } - }); -}; - -var setTooltip = function setTooltip(ids, tooltip) { - ids.split(',').forEach(function (id) { - if (typeof tooltip !== 'undefined') { - tooltips[version === 'gen-1' ? lookUpDomId(id) : id] = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(tooltip, config); - } - }); -}; - -var setClickFun = function setClickFun(id, functionName, functionArgs) { - var domId = lookUpDomId(id); // if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id; - - if (_config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().securityLevel !== 'loose') { - return; - } - - if (typeof functionName === 'undefined') { - return; - } - - var argList = []; - - if (typeof functionArgs === 'string') { - /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */ - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - - for (var i = 0; i < argList.length; i++) { - var item = argList[i].trim(); - /* Removes all double quotes at the start and end of an argument */ - - /* This preserves all starting and ending whitespace inside */ - - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - - argList[i] = item; - } - } - /* if no arguments passed into callback, default to passing in id */ - - - if (argList.length === 0) { - argList.push(id); - } - - if (typeof vertices[id] !== 'undefined') { - vertices[id].haveCallback = true; - funs.push(function () { - var elem = document.querySelector("[id=\"".concat(domId, "\"]")); - - if (elem !== null) { - elem.addEventListener('click', function () { - _utils__WEBPACK_IMPORTED_MODULE_1__["default"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_1__["default"], [functionName].concat(_toConsumableArray(argList))); - }, false); - } - }); - } -}; -/** - * Called by parser when a link is found. Adds the URL to the vertex data. - * @param ids Comma separated list of ids - * @param linkStr URL to create a link for - */ - - -var setLink = function setLink(ids, linkStr, target) { - ids.split(',').forEach(function (id) { - if (typeof vertices[id] !== 'undefined') { - vertices[id].link = _utils__WEBPACK_IMPORTED_MODULE_1__["default"].formatUrl(linkStr, config); - vertices[id].linkTarget = target; - } - }); - setClass(ids, 'clickable'); -}; -var getTooltip = function getTooltip(id) { - return tooltips[id]; -}; -/** - * Called by parser when a click definition is found. Registers an event handler. - * @param ids Comma separated list of ids - * @param functionName Function to be called on click - * @param tooltip Tooltip for the clickable element - */ - -var setClickEvent = function setClickEvent(ids, functionName, functionArgs) { - ids.split(',').forEach(function (id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, 'clickable'); -}; -var bindFunctions = function bindFunctions(element) { - funs.forEach(function (fun) { - fun(element); - }); -}; -var getDirection = function getDirection() { - return direction.trim(); -}; -/** - * Retrieval function for fetching the found nodes after parsing has completed. - * @returns {{}|*|vertices} - */ - -var getVertices = function getVertices() { - return vertices; -}; -/** - * Retrieval function for fetching the found links after parsing has completed. - * @returns {{}|*|edges} - */ - -var getEdges = function getEdges() { - return edges; -}; -/** - * Retrieval function for fetching the found class definitions after parsing has completed. - * @returns {{}|*|classes} - */ - -var getClasses = function getClasses() { - return classes; -}; - -var setupToolTips = function setupToolTips(element) { - var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('.mermaidTooltip'); - - if ((tooltipElem._groups || tooltipElem)[0][0] === null) { - tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0); - } - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(element).select('svg'); - var nodes = svg.selectAll('g.node'); - nodes.on('mouseover', function () { - var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); - var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided - - if (title === null) { - return; - } - - var rect = this.getBoundingClientRect(); - tooltipElem.transition().duration(200).style('opacity', '.9'); - tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px'); - el.classed('hover', true); - }).on('mouseout', function () { - tooltipElem.transition().duration(500).style('opacity', 0); - var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])(this); - el.classed('hover', false); - }); -}; - -funs.push(setupToolTips); -/** - * Clears the internal graph db so that a new graph can be parsed. - */ - -var clear = function clear(ver) { - vertices = {}; - classes = {}; - edges = []; - funs = []; - funs.push(setupToolTips); - subGraphs = []; - subGraphLookup = {}; - subCount = 0; - tooltips = []; - firstGraphFlag = true; - version = ver || 'gen-1'; -}; -var setGen = function setGen(ver) { - version = ver || 'gen-1'; -}; -/** - * - * @returns {string} - */ - -var defaultStyle = function defaultStyle() { - return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;'; -}; -/** - * Clears the internal graph db so that a new graph can be parsed. - */ - -var addSubGraph = function addSubGraph(_id, list, _title) { - var id = _id.trim(); - - var title = _title; - - if (_id === _title && _title.match(/\s/)) { - id = undefined; - } - - function uniq(a) { - var prims = { - boolean: {}, - number: {}, - string: {} - }; - var objs = []; - return a.filter(function (item) { - var type = _typeof(item); - - if (item.trim() === '') { - return false; - } - - if (type in prims) { - return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; // eslint-disable-line - } else { - return objs.indexOf(item) >= 0 ? false : objs.push(item); - } - }); - } - - var nodeList = []; - nodeList = uniq(nodeList.concat.apply(nodeList, list)); - - if (version === 'gen-1') { - _logger__WEBPACK_IMPORTED_MODULE_5__["log"].warn('LOOKING UP'); - - for (var i = 0; i < nodeList.length; i++) { - nodeList[i] = lookUpDomId(nodeList[i]); - } - } - - id = id || 'subGraph' + subCount; // if (id[0].match(/\d/)) id = lookUpDomId(id); - - title = title || ''; - title = _common_common__WEBPACK_IMPORTED_MODULE_3__["default"].sanitizeText(title, config); - subCount = subCount + 1; - var subGraph = { - id: id, - nodes: nodeList, - title: title.trim(), - classes: [] - }; - _logger__WEBPACK_IMPORTED_MODULE_5__["log"].info('Adding', subGraph.id, subGraph.nodes); - /** - * Deletes an id from all subgraphs - */ - // const del = _id => { - // subGraphs.forEach(sg => { - // const pos = sg.nodes.indexOf(_id); - // if (pos >= 0) { - // sg.nodes.splice(pos, 1); - // } - // }); - // }; - // // Removes the members of this subgraph from any other subgraphs, a node only belong to one subgraph - // subGraph.nodes.forEach(_id => del(_id)); - // Remove the members in the new subgraph if they already belong to another subgraph - - subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; - subGraphs.push(subGraph); - subGraphLookup[id] = subGraph; - return id; -}; - -var getPosForId = function getPosForId(id) { - for (var i = 0; i < subGraphs.length; i++) { - if (subGraphs[i].id === id) { - return i; - } - } - - return -1; -}; - -var secCount = -1; -var posCrossRef = []; - -var indexNodes2 = function indexNodes2(id, pos) { - var nodes = subGraphs[pos].nodes; - secCount = secCount + 1; - - if (secCount > 2000) { - return; - } - - posCrossRef[secCount] = pos; // Check if match - - if (subGraphs[pos].id === id) { - return { - result: true, - count: 0 - }; - } - - var count = 0; - var posCount = 1; - - while (count < nodes.length) { - var childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1) - - if (childPos >= 0) { - var res = indexNodes2(id, childPos); - - if (res.result) { - return { - result: true, - count: posCount + res.count - }; - } else { - posCount = posCount + res.count; - } - } - - count = count + 1; - } - - return { - result: false, - count: posCount - }; -}; - -var getDepthFirstPos = function getDepthFirstPos(pos) { - return posCrossRef[pos]; -}; -var indexNodes = function indexNodes() { - secCount = -1; - - if (subGraphs.length > 0) { - indexNodes2('none', subGraphs.length - 1, 0); - } -}; -var getSubGraphs = function getSubGraphs() { - return subGraphs; -}; -var firstGraph = function firstGraph() { - if (firstGraphFlag) { - firstGraphFlag = false; - return true; - } - - return false; -}; - -var destructStartLink = function destructStartLink(_str) { - var str = _str.trim(); - - var type = 'arrow_open'; - - switch (str[0]) { - case '<': - type = 'arrow_point'; - str = str.slice(1); - break; - - case 'x': - type = 'arrow_cross'; - str = str.slice(1); - break; - - case 'o': - type = 'arrow_circle'; - str = str.slice(1); - break; - } - - var stroke = 'normal'; - - if (str.indexOf('=') !== -1) { - stroke = 'thick'; - } - - if (str.indexOf('.') !== -1) { - stroke = 'dotted'; - } - - return { - type: type, - stroke: stroke - }; -}; - -var countChar = function countChar(char, str) { - var length = str.length; - var count = 0; - - for (var i = 0; i < length; ++i) { - if (str[i] === char) { - ++count; - } - } - - return count; -}; - -var destructEndLink = function destructEndLink(_str) { - var str = _str.trim(); - - var line = str.slice(0, -1); - var type = 'arrow_open'; - - switch (str.slice(-1)) { - case 'x': - type = 'arrow_cross'; - - if (str[0] === 'x') { - type = 'double_' + type; - line = line.slice(1); - } - - break; - - case '>': - type = 'arrow_point'; - - if (str[0] === '<') { - type = 'double_' + type; - line = line.slice(1); - } - - break; - - case 'o': - type = 'arrow_circle'; - - if (str[0] === 'o') { - type = 'double_' + type; - line = line.slice(1); - } - - break; - } - - var stroke = 'normal'; - var length = line.length - 1; - - if (line[0] === '=') { - stroke = 'thick'; - } - - var dots = countChar('.', line); - - if (dots) { - stroke = 'dotted'; - length = dots; - } - - return { - type: type, - stroke: stroke, - length: length - }; -}; - -var destructLink = function destructLink(_str, _startStr) { - var info = destructEndLink(_str); - var startInfo; - - if (_startStr) { - startInfo = destructStartLink(_startStr); - - if (startInfo.stroke !== info.stroke) { - return { - type: 'INVALID', - stroke: 'INVALID' - }; - } - - if (startInfo.type === 'arrow_open') { - // -- xyz --> - take arrow type from ending - startInfo.type = info.type; - } else { - // x-- xyz --> - not supported - if (startInfo.type !== info.type) return { - type: 'INVALID', - stroke: 'INVALID' - }; - startInfo.type = 'double_' + startInfo.type; - } - - if (startInfo.type === 'double_arrow') { - startInfo.type = 'double_arrow_point'; - } - - startInfo.length = info.length; - return startInfo; - } - - return info; -}; // Todo optimizer this by caching existing nodes - - -var exists = function exists(allSgs, _id) { - var res = false; - allSgs.forEach(function (sg) { - var pos = sg.nodes.indexOf(_id); - - if (pos >= 0) { - res = true; - } - }); - return res; -}; -/** - * Deletes an id from all subgraphs - */ - - -var makeUniq = function makeUniq(sg, allSubgraphs) { - var res = []; - sg.nodes.forEach(function (_id, pos) { - if (!exists(allSubgraphs, _id)) { - res.push(sg.nodes[pos]); - } - }); - return { - nodes: res - }; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - defaultConfig: function defaultConfig() { - return _config__WEBPACK_IMPORTED_MODULE_2__["defaultConfig"].flowchart; - }, - addVertex: addVertex, - lookUpDomId: lookUpDomId, - addLink: addLink, - updateLinkInterpolate: updateLinkInterpolate, - updateLink: updateLink, - addClass: addClass, - setDirection: setDirection, - setClass: setClass, - setTooltip: setTooltip, - getTooltip: getTooltip, - setClickEvent: setClickEvent, - setLink: setLink, - bindFunctions: bindFunctions, - getDirection: getDirection, - getVertices: getVertices, - getEdges: getEdges, - getClasses: getClasses, - clear: clear, - setGen: setGen, - defaultStyle: defaultStyle, - addSubGraph: addSubGraph, - getDepthFirstPos: getDepthFirstPos, - indexNodes: indexNodes, - getSubGraphs: getSubGraphs, - destructLink: destructLink, - lex: { - firstGraph: firstGraph - }, - exists: exists, - makeUniq: makeUniq -}); - -/***/ }), - -/***/ "./src/diagrams/flowchart/flowRenderer-v2.js": -/*!***************************************************!*\ - !*** ./src/diagrams/flowchart/flowRenderer-v2.js ***! - \***************************************************/ -/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js"); -/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison"); -/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); -/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "dagre-d3/lib/label/add-html-label.js"); -/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - - - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - - for (var i = 0; i < keys.length; i++) { - conf[keys[i]] = cnf[keys[i]]; - } -}; -/** - * Function that adds the vertices found during parsing to the graph to be rendered. - * @param vert Object containing the vertices. - * @param g The graph that is to be drawn. - */ - -var addVertices = function addVertices(vert, g, svgId) { - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(svgId, "\"]")); - var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition - - keys.forEach(function (id) { - var vertex = vert[id]; - /** - * Variable for storing the classes for the vertex - * @type {string} - */ - - var classStr = 'default'; - - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(' '); - } - - var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition - - var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually - - var vertexNode; - - if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { - // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? - var node = { - label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { - return ""); - }) - }; - vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node(); - vertexNode.parentNode.removeChild(vertexNode); - } else { - var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); - var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex); - - for (var j = 0; j < rows.length; j++) { - var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); - tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); - tspan.setAttribute('dy', '1em'); - tspan.setAttribute('x', '1'); - tspan.textContent = rows[j]; - svgLabel.appendChild(tspan); - } - - vertexNode = svgLabel; - } - - var radious = 0; - var _shape = ''; // Set the shape based parameters - - switch (vertex.type) { - case 'round': - radious = 5; - _shape = 'rect'; - break; - - case 'square': - _shape = 'rect'; - break; - - case 'diamond': - _shape = 'question'; - break; - - case 'hexagon': - _shape = 'hexagon'; - break; - - case 'odd': - _shape = 'rect_left_inv_arrow'; - break; - - case 'lean_right': - _shape = 'lean_right'; - break; - - case 'lean_left': - _shape = 'lean_left'; - break; - - case 'trapezoid': - _shape = 'trapezoid'; - break; - - case 'inv_trapezoid': - _shape = 'inv_trapezoid'; - break; - - case 'odd_right': - _shape = 'rect_left_inv_arrow'; - break; - - case 'circle': - _shape = 'circle'; - break; - - case 'ellipse': - _shape = 'ellipse'; - break; - - case 'stadium': - _shape = 'stadium'; - break; - - case 'subroutine': - _shape = 'subroutine'; - break; - - case 'cylinder': - _shape = 'cylinder'; - break; - - case 'group': - _shape = 'rect'; - break; - - default: - _shape = 'rect'; - } // Add the node - - - g.setNode(vertex.id, { - labelStyle: styles.labelStyle, - shape: _shape, - labelText: vertexText, - rx: radious, - ry: radious, - class: classStr, - style: styles.style, - id: vertex.id, - link: vertex.link, - linkTarget: vertex.linkTarget, - tooltip: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(vertex.id) || '', - domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), - haveCallback: vertex.haveCallback, - width: vertex.type === 'group' ? 500 : undefined, - type: vertex.type, - padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.padding - }); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('setNode', { - labelStyle: styles.labelStyle, - shape: _shape, - labelText: vertexText, - rx: radious, - ry: radious, - class: classStr, - style: styles.style, - id: vertex.id, - domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), - width: vertex.type === 'group' ? 500 : undefined, - type: vertex.type, - padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.padding - }); - }); -}; -/** - * Add edges to graph based on parsed graph defninition - * @param {Object} edges The edges to add to the graph - * @param {Object} g The graph object - */ - -var addEdges = function addEdges(edges, g) { - var cnt = 0; - var defaultStyle; - var defaultLabelStyle; - - if (typeof edges.defaultStyle !== 'undefined') { - var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - - edges.forEach(function (edge) { - cnt++; // Identify Link - - var linkId = 'L-' + edge.start + '-' + edge.end; - var linkNameStart = 'LS-' + edge.start; - var linkNameEnd = 'LE-' + edge.end; - var edgeData = { - style: '', - labelStyle: '' - }; - edgeData.minlen = edge.length || 1; //edgeData.id = 'id' + cnt; - // Set link type for rendering - - if (edge.type === 'arrow_open') { - edgeData.arrowhead = 'none'; - } else { - edgeData.arrowhead = 'normal'; - } // Check of arrow types, placed here in order not to break old rendering - - - edgeData.arrowTypeStart = 'arrow_open'; - edgeData.arrowTypeEnd = 'arrow_open'; - /* eslint-disable no-fallthrough */ - - switch (edge.type) { - case 'double_arrow_cross': - edgeData.arrowTypeStart = 'arrow_cross'; - - case 'arrow_cross': - edgeData.arrowTypeEnd = 'arrow_cross'; - break; - - case 'double_arrow_point': - edgeData.arrowTypeStart = 'arrow_point'; - - case 'arrow_point': - edgeData.arrowTypeEnd = 'arrow_point'; - break; - - case 'double_arrow_circle': - edgeData.arrowTypeStart = 'arrow_circle'; - - case 'arrow_circle': - edgeData.arrowTypeEnd = 'arrow_circle'; - break; - } - - var style = ''; - var labelStyle = ''; - - switch (edge.stroke) { - case 'normal': - style = 'fill:none;'; - - if (typeof defaultStyle !== 'undefined') { - style = defaultStyle; - } - - if (typeof defaultLabelStyle !== 'undefined') { - labelStyle = defaultLabelStyle; - } - - edgeData.thickness = 'normal'; - edgeData.pattern = 'solid'; - break; - - case 'dotted': - edgeData.thickness = 'normal'; - edgeData.pattern = 'dotted'; - edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;'; - break; - - case 'thick': - edgeData.thickness = 'thick'; - edgeData.pattern = 'solid'; - edgeData.style = 'stroke-width: 3.5px;fill:none;'; - break; - } - - if (typeof edge.style !== 'undefined') { - var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } - - edgeData.style = edgeData.style += style; - edgeData.labelStyle = edgeData.labelStyle += labelStyle; - - if (typeof edge.interpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } else if (typeof edges.defaultInterpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } else { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } - - if (typeof edge.text === 'undefined') { - if (typeof edge.style !== 'undefined') { - edgeData.arrowheadStyle = 'fill: #333'; - } - } else { - edgeData.arrowheadStyle = 'fill: #333'; - edgeData.labelpos = 'c'; - } // if (getConfig().flowchart.htmlLabels && false) { - // // eslint-disable-line - // edgeData.labelType = 'html'; - // edgeData.label = `${edge.text}`; - // } else { - - - edgeData.labelType = 'text'; - edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex, '\n'); - - if (typeof edge.style === 'undefined') { - edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;'; - } - - edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); // } - - edgeData.id = linkId; - edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd; // Add the edge to the graph - - g.setEdge(edge.start, edge.end, edgeData, cnt); - }); -}; -/** - * Returns the all the styles from classDef statements in the graph definition. - * @returns {object} classDef styles - */ - -var getClasses = function getClasses(text) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Extracting classes'); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; - - try { - // Parse the graph definition - parser.parse(text); - } catch (e) { - return; - } - - return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var draw = function draw(text, id) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Drawing flowchart'); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].setGen('gen-2'); - var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition - // try { - - parser.parse(text); // } catch (err) { - // log.debug('Parsing failed'); - // } - // Fetch the default direction, use TD if none was found - - var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); - - if (typeof dir === 'undefined') { - dir = 'TD'; - } - - var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart; - var nodeSpacing = conf.nodeSpacing || 50; - var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function () { - return {}; - }); - var subG; - var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs(); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Subgraphs - ', subGraphs); - - for (var _i = subGraphs.length - 1; _i >= 0; _i--) { - subG = subGraphs[_i]; - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Subgraph - ', subG); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes); - } // Fetch the verices/nodes and edges/links from the parsed graph definition - - - var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices(); - var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges(); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info(edges); - var i = 0; - - for (i = subGraphs.length - 1; i >= 0; i--) { - // for (let i = 0; i < subGraphs.length; i++) { - subG = subGraphs[i]; - Object(d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"])('cluster').append('text'); - - for (var j = 0; j < subG.nodes.length; j++) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Setting up subgraphs', subG.nodes[j], subG.id); - g.setParent(subG.nodes[j], subG.id); - } - } - - addVertices(vert, g, id); - addEdges(edges, g); // Add custom shapes - // flowChartShapes.addToRenderV2(addShape); - // Set up an SVG group so that we can translate the final graph. - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); - svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph. - - var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); - Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__["render"])(element, g, ['point', 'circle', 'cross'], 'flowchart', id); - var padding = conf.diagramPadding; - var svgBounds = svg.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")")); - Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); - svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height)); - svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")")); // Index nodes - - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // Add label rects for non html labels - - if (!conf.htmlLabels) { - var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - - for (var k = 0; k < labels.length; k++) { - var label = labels[k]; // Get dimensions of label - - var dim = label.getBBox(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.setAttribute('rx', 0); - rect.setAttribute('ry', 0); - rect.setAttribute('width', dim.width); - rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;'); - - label.insertBefore(rect, label.firstChild); - } - } // If node has a link, wrap it in an anchor SVG object. - - - var keys = Object.keys(vert); - keys.forEach(function (key) { - var vertex = vert[key]; - - if (vertex.link) { - var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' [id="' + key + '"]'); - - if (node) { - var link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); - link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); - link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); - link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); - - if (vertex.linkTarget) { - link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget); - } - - var linkNode = node.insert(function () { - return link; - }, ':first-child'); - var shape = node.select('.label-container'); - - if (shape) { - linkNode.append(function () { - return shape.node(); - }); - } - - var _label = node.select('.label'); - - if (_label) { - linkNode.append(function () { - return _label.node(); - }); - } - } - } - }); -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - addVertices: addVertices, - addEdges: addEdges, - getClasses: getClasses, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/flowchart/flowRenderer.js": -/*!************************************************!*\ - !*** ./src/diagrams/flowchart/flowRenderer.js ***! - \************************************************/ -/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js"); -/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison"); -/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3 */ "dagre-d3"); -/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "dagre-d3/lib/label/add-html-label.js"); -/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./flowChartShapes */ "./src/diagrams/flowchart/flowChartShapes.js"); - - - - - - - - - - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - - for (var i = 0; i < keys.length; i++) { - conf[keys[i]] = cnf[keys[i]]; - } -}; -/** - * Function that adds the vertices found in the graph definition to the graph to be rendered. - * @param vert Object containing the vertices. - * @param g The graph that is to be drawn. - */ - -var addVertices = function addVertices(vert, g, svgId) { - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(svgId, "\"]")); - var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition - - keys.forEach(function (id) { - var vertex = vert[id]; - /** - * Variable for storing the classes for the vertex - * @type {string} - */ - - var classStr = 'default'; - - if (vertex.classes.length > 0) { - classStr = vertex.classes.join(' '); - } - - var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition - - var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually - - var vertexNode; - - if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { - // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that? - var node = { - label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { - return ""); - }) - }; - vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node(); - vertexNode.parentNode.removeChild(vertexNode); - } else { - var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:')); - var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex); - - for (var j = 0; j < rows.length; j++) { - var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); - tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); - tspan.setAttribute('dy', '1em'); - tspan.setAttribute('x', '1'); - tspan.textContent = rows[j]; - svgLabel.appendChild(tspan); - } - - vertexNode = svgLabel; - } - - var radious = 0; - var _shape = ''; // Set the shape based parameters - - switch (vertex.type) { - case 'round': - radious = 5; - _shape = 'rect'; - break; - - case 'square': - _shape = 'rect'; - break; - - case 'diamond': - _shape = 'question'; - break; - - case 'hexagon': - _shape = 'hexagon'; - break; - - case 'odd': - _shape = 'rect_left_inv_arrow'; - break; - - case 'lean_right': - _shape = 'lean_right'; - break; - - case 'lean_left': - _shape = 'lean_left'; - break; - - case 'trapezoid': - _shape = 'trapezoid'; - break; - - case 'inv_trapezoid': - _shape = 'inv_trapezoid'; - break; - - case 'odd_right': - _shape = 'rect_left_inv_arrow'; - break; - - case 'circle': - _shape = 'circle'; - break; - - case 'ellipse': - _shape = 'ellipse'; - break; - - case 'stadium': - _shape = 'stadium'; - break; - - case 'subroutine': - _shape = 'subroutine'; - break; - - case 'cylinder': - _shape = 'cylinder'; - break; - - case 'group': - _shape = 'rect'; - break; - - default: - _shape = 'rect'; - } // Add the node - - - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Adding node', vertex.id, vertex.domId); - g.setNode(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id), { - labelType: 'svg', - labelStyle: styles.labelStyle, - shape: _shape, - label: vertexNode, - rx: radious, - ry: radious, - class: classStr, - style: styles.style, - id: _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(vertex.id) - }); - }); -}; -/** - * Add edges to graph based on parsed graph defninition - * @param {Object} edges The edges to add to the graph - * @param {Object} g The graph object - */ - -var addEdges = function addEdges(edges, g) { - var cnt = 0; - var defaultStyle; - var defaultLabelStyle; - - if (typeof edges.defaultStyle !== 'undefined') { - var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edges.defaultStyle); - defaultStyle = defaultStyles.style; - defaultLabelStyle = defaultStyles.labelStyle; - } - - edges.forEach(function (edge) { - cnt++; // Identify Link - - var linkId = 'L-' + edge.start + '-' + edge.end; - var linkNameStart = 'LS-' + edge.start; - var linkNameEnd = 'LE-' + edge.end; - var edgeData = {}; // Set link type for rendering - - if (edge.type === 'arrow_open') { - edgeData.arrowhead = 'none'; - } else { - edgeData.arrowhead = 'normal'; - } - - var style = ''; - var labelStyle = ''; - - if (typeof edge.style !== 'undefined') { - var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["getStylesFromArray"])(edge.style); - style = styles.style; - labelStyle = styles.labelStyle; - } else { - switch (edge.stroke) { - case 'normal': - style = 'fill:none'; - - if (typeof defaultStyle !== 'undefined') { - style = defaultStyle; - } - - if (typeof defaultLabelStyle !== 'undefined') { - labelStyle = defaultLabelStyle; - } - - break; - - case 'dotted': - style = 'fill:none;stroke-width:2px;stroke-dasharray:3;'; - break; - - case 'thick': - style = ' stroke-width: 3.5px;fill:none'; - break; - } - } - - edgeData.style = style; - edgeData.labelStyle = labelStyle; - - if (typeof edge.interpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } else if (typeof edges.defaultInterpolate !== 'undefined') { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } else { - edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); - } - - if (typeof edge.text === 'undefined') { - if (typeof edge.style !== 'undefined') { - edgeData.arrowheadStyle = 'fill: #333'; - } - } else { - edgeData.arrowheadStyle = 'fill: #333'; - edgeData.labelpos = 'c'; - - if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { - edgeData.labelType = 'html'; - edgeData.label = "").concat(edge.text.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { - return ""); - }), ""); - } else { - edgeData.labelType = 'text'; - edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex, '\n'); - - if (typeof edge.style === 'undefined') { - edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none'; - } - - edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); - } - } - - edgeData.id = linkId; - edgeData.class = linkNameStart + ' ' + linkNameEnd; - edgeData.minlen = edge.length || 1; // Add the edge to the graph - - g.setEdge(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(edge.start), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(edge.end), edgeData, cnt); - }); -}; -/** - * Returns the all the styles from classDef statements in the graph definition. - * @returns {object} classDef styles - */ - -var getClasses = function getClasses(text) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Extracting classes'); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - - try { - var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition - - parser.parse(text); - return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); - } catch (e) { - return; - } -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var draw = function draw(text, id) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Drawing flowchart'); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].setGen('gen-1'); - var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition - // try { - - parser.parse(text); // } catch (err) { - // log.debug('Parsing failed'); - // } - // Fetch the default direction, use TD if none was found - - var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); - - if (typeof dir === 'undefined') { - dir = 'TD'; - } - - var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart; - var nodeSpacing = conf.nodeSpacing || 50; - var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: dir, - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function () { - return {}; - }); - var subG; - var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs(); - - for (var _i = subGraphs.length - 1; _i >= 0; _i--) { - subG = subGraphs[_i]; - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes); - } // Fetch the verices/nodes and edges/links from the parsed graph definition - - - var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices(); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Get vertices', vert); - var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges(); - var i = 0; - - for (i = subGraphs.length - 1; i >= 0; i--) { - subG = subGraphs[i]; - Object(d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"])('cluster').append('text'); - - for (var j = 0; j < subG.nodes.length; j++) { - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Setting subgraph', subG.nodes[j], _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id)); - g.setParent(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id)); - } - } - - addVertices(vert, g, id); - addEdges(edges, g); // Create the renderer - - var Render = dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.render; - var render = new Render(); // Add custom shapes - - _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__["default"].addToRender(render); // Add our custom arrow - an empty arrowhead - - render.arrows().none = function normal(parent, id, edge, type) { - var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto'); - var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z'); - dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']); - }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling. - - - render.arrows().normal = function normal(parent, id) { - var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto'); - marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); - }; // Set up an SVG group so that we can translate the final graph. - - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); - svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn(g); // Run the renderer. This is what draws the final graph. - - var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); - render(element, g); - element.selectAll('g.node').attr('title', function () { - return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id); - }); - var padding = conf.diagramPadding; - var svgBounds = svg.node().getBBox(); - var width = svgBounds.width + padding * 2; - var height = svgBounds.height + padding * 2; - Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - - var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); - _logger__WEBPACK_IMPORTED_MODULE_7__["log"].debug("viewBox ".concat(vBox)); - svg.attr('viewBox', vBox); // Index nodes - - _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels - - for (i = 0; i < subGraphs.length; i++) { - subG = subGraphs[i]; - - if (subG.title !== 'undefined') { - var clusterRects = document.querySelectorAll('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id) + '"] rect'); - var clusterEl = document.querySelectorAll('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id) + '"]'); - var xPos = clusterRects[0].x.baseVal.value; - var yPos = clusterRects[0].y.baseVal.value; - var _width = clusterRects[0].width.baseVal.value; - var cluster = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(clusterEl[0]); - var te = cluster.select('.label'); - te.attr('transform', "translate(".concat(xPos + _width / 2, ", ").concat(yPos + 14, ")")); - te.attr('id', id + 'Text'); - - for (var _j = 0; _j < subG.classes.length; _j++) { - clusterEl[0].classList.add(subG.classes[_j]); - } - } - } // Add label rects for non html labels - - - if (!conf.htmlLabels || true) { - // eslint-disable-line - var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - - for (var k = 0; k < labels.length; k++) { - var label = labels[k]; // Get dimensions of label - - var dim = label.getBBox(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.setAttribute('rx', 0); - rect.setAttribute('ry', 0); - rect.setAttribute('width', dim.width); - rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;'); - - label.insertBefore(rect, label.firstChild); - } - } // If node has a link, wrap it in an anchor SVG object. - - - var keys = Object.keys(vert); - keys.forEach(function (key) { - var vertex = vert[key]; - - if (vertex.link) { - var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(key) + '"]'); - - if (node) { - var link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); - link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); - link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); - link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); - - if (vertex.linkTarget) { - link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget); - } - - var linkNode = node.insert(function () { - return link; - }, ':first-child'); - var shape = node.select('.label-container'); - - if (shape) { - linkNode.append(function () { - return shape.node(); - }); - } - - var _label = node.select('.label'); - - if (_label) { - linkNode.append(function () { - return _label.node(); - }); - } - } - } - }); -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - addVertices: addVertices, - addEdges: addEdges, - getClasses: getClasses, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/flowchart/parser/flow.jison": -/*!**************************************************!*\ - !*** ./src/diagrams/flowchart/parser/flow.jison ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,9],$V1=[1,7],$V2=[1,6],$V3=[1,8],$V4=[1,20,21,22,23,38,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$V5=[2,10],$V6=[1,20],$V7=[1,21],$V8=[1,22],$V9=[1,23],$Va=[1,30],$Vb=[1,54],$Vc=[1,32],$Vd=[1,33],$Ve=[1,34],$Vf=[1,35],$Vg=[1,36],$Vh=[1,48],$Vi=[1,43],$Vj=[1,45],$Vk=[1,40],$Vl=[1,44],$Vm=[1,47],$Vn=[1,51],$Vo=[1,52],$Vp=[1,53],$Vq=[1,42],$Vr=[1,46],$Vs=[1,49],$Vt=[1,50],$Vu=[1,41],$Vv=[1,57],$Vw=[1,62],$Vx=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$Vy=[1,66],$Vz=[1,65],$VA=[1,67],$VB=[20,21,23,69,70],$VC=[1,88],$VD=[1,93],$VE=[1,90],$VF=[1,95],$VG=[1,98],$VH=[1,96],$VI=[1,97],$VJ=[1,91],$VK=[1,103],$VL=[1,102],$VM=[1,92],$VN=[1,94],$VO=[1,99],$VP=[1,100],$VQ=[1,101],$VR=[1,104],$VS=[20,21,22,23,69,70],$VT=[20,21,22,23,47,69,70],$VU=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$VV=[20,21,23],$VW=[20,21,23,46,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$VX=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$VY=[46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$VZ=[1,136],$V_=[1,144],$V$=[1,145],$V01=[1,146],$V11=[1,147],$V21=[1,131],$V31=[1,132],$V41=[1,128],$V51=[1,139],$V61=[1,140],$V71=[1,141],$V81=[1,142],$V91=[1,143],$Va1=[1,148],$Vb1=[1,149],$Vc1=[1,134],$Vd1=[1,137],$Ve1=[1,133],$Vf1=[1,130],$Vg1=[20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$Vh1=[1,152],$Vi1=[20,21,22,23,26,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],$Vj1=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,94,95,98,99,100,102,103,104,105,109,110,111,112,113,114],$Vk1=[12,21,22,24],$Vl1=[22,95],$Vm1=[1,233],$Vn1=[1,237],$Vo1=[1,234],$Vp1=[1,231],$Vq1=[1,228],$Vr1=[1,229],$Vs1=[1,230],$Vt1=[1,232],$Vu1=[1,235],$Vv1=[1,236],$Vw1=[1,238],$Vx1=[1,255],$Vy1=[20,21,23,95],$Vz1=[20,21,22,23,75,91,94,95,98,99,100,101,102,103,104]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"mermaidDoc":4,"directive":5,"openDirective":6,"typeDirective":7,"closeDirective":8,"separator":9,":":10,"argDirective":11,"open_directive":12,"type_directive":13,"arg_directive":14,"close_directive":15,"graphConfig":16,"document":17,"line":18,"statement":19,"SEMI":20,"NEWLINE":21,"SPACE":22,"EOF":23,"GRAPH":24,"NODIR":25,"DIR":26,"FirstStmtSeperator":27,"ending":28,"endToken":29,"spaceList":30,"spaceListNewline":31,"verticeStatement":32,"styleStatement":33,"linkStyleStatement":34,"classDefStatement":35,"classStatement":36,"clickStatement":37,"subgraph":38,"text":39,"SQS":40,"SQE":41,"end":42,"link":43,"node":44,"vertex":45,"AMP":46,"STYLE_SEPARATOR":47,"idString":48,"PS":49,"PE":50,"(-":51,"-)":52,"STADIUMSTART":53,"STADIUMEND":54,"SUBROUTINESTART":55,"SUBROUTINEEND":56,"CYLINDERSTART":57,"CYLINDEREND":58,"DIAMOND_START":59,"DIAMOND_STOP":60,"TAGEND":61,"TRAPSTART":62,"TRAPEND":63,"INVTRAPSTART":64,"INVTRAPEND":65,"linkStatement":66,"arrowText":67,"TESTSTR":68,"START_LINK":69,"LINK":70,"PIPE":71,"textToken":72,"STR":73,"keywords":74,"STYLE":75,"LINKSTYLE":76,"CLASSDEF":77,"CLASS":78,"CLICK":79,"DOWN":80,"UP":81,"textNoTags":82,"textNoTagsToken":83,"DEFAULT":84,"stylesOpt":85,"alphaNum":86,"CALLBACKNAME":87,"CALLBACKARGS":88,"HREF":89,"LINK_TARGET":90,"HEX":91,"numList":92,"INTERPOLATE":93,"NUM":94,"COMMA":95,"style":96,"styleComponent":97,"ALPHA":98,"COLON":99,"MINUS":100,"UNIT":101,"BRKT":102,"DOT":103,"PCT":104,"TAGSTART":105,"alphaNumToken":106,"idStringToken":107,"alphaNumStatement":108,"PUNCTUATION":109,"UNICODE_TEXT":110,"PLUS":111,"EQUALS":112,"MULT":113,"UNDERSCORE":114,"graphCodeTokens":115,"ARROW_CROSS":116,"ARROW_POINT":117,"ARROW_CIRCLE":118,"ARROW_OPEN":119,"QUOTE":120,"$accept":0,"$end":1}, -terminals_: {2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"CALLBACKNAME",88:"CALLBACKARGS",89:"HREF",90:"LINK_TARGET",91:"HEX",93:"INTERPOLATE",94:"NUM",95:"COMMA",98:"ALPHA",99:"COLON",100:"MINUS",101:"UNIT",102:"BRKT",103:"DOT",104:"PCT",105:"TAGSTART",109:"PUNCTUATION",110:"UNICODE_TEXT",111:"PLUS",112:"EQUALS",113:"MULT",114:"UNDERSCORE",116:"ARROW_CROSS",117:"ARROW_POINT",118:"ARROW_CIRCLE",119:"ARROW_OPEN",120:"QUOTE"}, -productions_: [0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[92,1],[92,3],[85,1],[85,3],[96,1],[96,2],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[108,1],[108,1],[108,1],[108,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 5: - yy.parseDirective('%%{', 'open_directive'); -break; -case 6: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 7: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 8: - yy.parseDirective('}%%', 'close_directive', 'flowchart'); -break; -case 10: - this.$ = []; -break; -case 11: - - if($$[$0] !== []){ - $$[$0-1].push($$[$0]); - } - this.$=$$[$0-1]; -break; -case 12: case 76: case 78: case 90: case 146: case 148: case 149: -this.$=$$[$0]; -break; -case 19: - yy.setDirection('TB');this.$ = 'TB'; -break; -case 20: - yy.setDirection($$[$0-1]);this.$ = $$[$0-1]; -break; -case 35: - /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes -break; -case 36: case 37: case 38: case 39: case 40: -this.$=[]; -break; -case 41: -this.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]); -break; -case 42: -this.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]); -break; -case 43: -this.$=yy.addSubGraph(undefined,$$[$0-1],undefined); -break; -case 47: - /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) } -break; -case 48: - /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } -break; -case 49: -/*console.warn('noda', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] } -break; -case 50: - /*console.warn('noda', $$[$0]);*/ this.$ = {stmt: $$[$0], nodes:$$[$0] } -break; -case 51: - /* console.warn('nod', $$[$0]); */ this.$ = [$$[$0]]; -break; -case 52: - this.$ = $$[$0-4].concat($$[$0]); /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */ -break; -case 53: -this.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0]) -break; -case 54: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square'); -break; -case 55: -this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle'); -break; -case 56: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse'); -break; -case 57: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium'); -break; -case 58: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'subroutine'); -break; -case 59: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder'); -break; -case 60: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round'); -break; -case 61: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond'); -break; -case 62: -this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon'); -break; -case 63: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd'); -break; -case 64: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid'); -break; -case 65: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid'); -break; -case 66: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right'); -break; -case 67: -this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left'); -break; -case 68: - /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]); -break; -case 69: -$$[$0-1].text = $$[$0];this.$ = $$[$0-1]; -break; -case 70: case 71: -$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2]; -break; -case 72: -this.$ = $$[$0]; -break; -case 73: -var inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {"type":inf.type,"stroke":inf.stroke,"length":inf.length,"text":$$[$0-1]}; -break; -case 74: -var inf = yy.destructLink($$[$0]);this.$ = {"type":inf.type,"stroke":inf.stroke,"length":inf.length}; -break; -case 75: -this.$ = $$[$0-1]; -break; -case 77: case 91: case 147: -this.$=$$[$0-1]+''+$$[$0]; -break; -case 92: case 93: -this.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]); -break; -case 94: -this.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]); -break; -case 95: case 103: -this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0]); -break; -case 96: case 104: -this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]); -break; -case 97: -this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]); -break; -case 98: -this.$ = $$[$0-4];yy.setClickEvent($$[$0-4], $$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]); -break; -case 99: case 105: -this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]); -break; -case 100: case 106: -this.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]); -break; -case 101: case 107: -this.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2], $$[$0]); -break; -case 102: case 108: -this.$ = $$[$0-5];yy.setLink($$[$0-5], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-5], $$[$0-2]); -break; -case 109: -this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]); -break; -case 110: case 112: -this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]); -break; -case 111: -this.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]); -break; -case 113: -this.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]); -break; -case 114: -this.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]); -break; -case 115: -this.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]); -break; -case 116: -this.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]); -break; -case 117: case 119: -this.$ = [$$[$0]] -break; -case 118: case 120: -$$[$0-2].push($$[$0]);this.$ = $$[$0-2]; -break; -case 122: -this.$ = $$[$0-1] + $$[$0]; -break; -case 144: -this.$=$$[$0] -break; -case 145: -this.$=$$[$0-1]+''+$$[$0] -break; -case 150: -this.$='v'; -break; -case 151: -this.$='-'; -break; -} -}, -table: [{3:1,4:2,5:3,6:5,12:$V0,16:4,21:$V1,22:$V2,24:$V3},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:$V0,16:4,21:$V1,22:$V2,24:$V3},o($V4,$V5,{17:11}),{7:12,13:[1,13]},{16:14,21:$V1,22:$V2,24:$V3},{16:15,21:$V1,22:$V2,24:$V3},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,44:31,45:37,46:$Vb,48:38,75:$Vc,76:$Vd,77:$Ve,78:$Vf,79:$Vg,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},{8:55,10:[1,56],15:$Vv},o([10,15],[2,6]),o($V4,[2,17]),o($V4,[2,18]),o($V4,[2,19]),{20:[1,59],21:[1,60],22:$Vw,27:58,30:61},o($Vx,[2,11]),o($Vx,[2,12]),o($Vx,[2,13]),o($Vx,[2,14]),o($Vx,[2,15]),o($Vx,[2,16]),{9:63,20:$Vy,21:$Vz,23:$VA,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:$Vy,21:$Vz,23:$VA},{9:72,20:$Vy,21:$Vz,23:$VA},{9:73,20:$Vy,21:$Vz,23:$VA},{9:74,20:$Vy,21:$Vz,23:$VA},{9:75,20:$Vy,21:$Vz,23:$VA},{9:77,20:$Vy,21:$Vz,22:[1,76],23:$VA},o($VB,[2,50],{30:78,22:$Vw}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{26:$VC,46:$VD,73:[1,86],80:$VE,86:85,87:[1,83],89:[1,84],94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VS,[2,51],{47:[1,105]}),o($VT,[2,68],{107:116,40:[1,106],46:$Vb,49:[1,107],51:[1,108],53:[1,109],55:[1,110],57:[1,111],59:[1,112],61:[1,113],62:[1,114],64:[1,115],80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu}),o($VU,[2,144]),o($VU,[2,165]),o($VU,[2,166]),o($VU,[2,167]),o($VU,[2,168]),o($VU,[2,169]),o($VU,[2,170]),o($VU,[2,171]),o($VU,[2,172]),o($VU,[2,173]),o($VU,[2,174]),o($VU,[2,175]),o($VU,[2,176]),o($VU,[2,177]),o($VU,[2,178]),o($VU,[2,179]),{9:117,20:$Vy,21:$Vz,23:$VA},{11:118,14:[1,119]},o($VV,[2,8]),o($V4,[2,20]),o($V4,[2,26]),o($V4,[2,27]),{21:[1,120]},o($VW,[2,34],{30:121,22:$Vw}),o($Vx,[2,35]),{44:122,45:37,46:$Vb,48:38,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},o($VX,[2,44]),o($VX,[2,45]),o($VX,[2,46]),o($VY,[2,72],{67:123,68:[1,124],71:[1,125]}),{22:$VZ,24:$V_,26:$V$,38:$V01,39:126,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o([46,68,71,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,74]),o($Vx,[2,36]),o($Vx,[2,37]),o($Vx,[2,38]),o($Vx,[2,39]),o($Vx,[2,40]),{22:$VZ,24:$V_,26:$V$,38:$V01,39:150,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($Vg1,$V5,{17:151}),o($VB,[2,49],{46:$Vh1}),{26:$VC,46:$VD,80:$VE,86:153,91:[1,154],94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{84:[1,155],92:156,94:[1,157]},{26:$VC,46:$VD,80:$VE,84:[1,158],86:159,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{26:$VC,46:$VD,80:$VE,86:160,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VV,[2,95],{22:[1,161],88:[1,162]}),o($VV,[2,99],{22:[1,163]}),o($VV,[2,103],{106:89,108:165,22:[1,164],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR}),o($VV,[2,105],{22:[1,166]}),o($Vi1,[2,146]),o($Vi1,[2,148]),o($Vi1,[2,149]),o($Vi1,[2,150]),o($Vi1,[2,151]),o($Vj1,[2,152]),o($Vj1,[2,153]),o($Vj1,[2,154]),o($Vj1,[2,155]),o($Vj1,[2,156]),o($Vj1,[2,157]),o($Vj1,[2,158]),o($Vj1,[2,159]),o($Vj1,[2,160]),o($Vj1,[2,161]),o($Vj1,[2,162]),o($Vj1,[2,163]),o($Vj1,[2,164]),{46:$Vb,48:167,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},{22:$VZ,24:$V_,26:$V$,38:$V01,39:168,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:170,42:$V11,46:$VD,49:[1,169],61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:171,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:172,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:173,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:174,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:175,42:$V11,46:$VD,59:[1,176],61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:177,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:178,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:179,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VU,[2,145]),o($Vk1,[2,3]),{8:180,15:$Vv},{15:[2,7]},o($V4,[2,28]),o($VW,[2,33]),o($VB,[2,47],{30:181,22:$Vw}),o($VY,[2,69],{22:[1,182]}),{22:[1,183]},{22:$VZ,24:$V_,26:$V$,38:$V01,39:184,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,61:$V21,69:$V31,70:[1,185],72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($Vj1,[2,76]),o($Vj1,[2,78]),o($Vj1,[2,134]),o($Vj1,[2,135]),o($Vj1,[2,136]),o($Vj1,[2,137]),o($Vj1,[2,138]),o($Vj1,[2,139]),o($Vj1,[2,140]),o($Vj1,[2,141]),o($Vj1,[2,142]),o($Vj1,[2,143]),o($Vj1,[2,79]),o($Vj1,[2,80]),o($Vj1,[2,81]),o($Vj1,[2,82]),o($Vj1,[2,83]),o($Vj1,[2,84]),o($Vj1,[2,85]),o($Vj1,[2,86]),o($Vj1,[2,87]),o($Vj1,[2,88]),o($Vj1,[2,89]),{9:188,20:$Vy,21:$Vz,22:$VZ,23:$VA,24:$V_,26:$V$,38:$V01,40:[1,187],42:$V11,46:$VD,61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,189],44:31,45:37,46:$Vb,48:38,75:$Vc,76:$Vd,77:$Ve,78:$Vf,79:$Vg,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},{22:$Vw,30:190},{22:[1,191],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:165,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:[1,192]},{22:[1,193]},{22:[1,194],95:[1,195]},o($Vl1,[2,117]),{22:[1,196]},{22:[1,197],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:165,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:[1,198],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:165,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{73:[1,199]},o($VV,[2,97],{22:[1,200]}),{73:[1,201],90:[1,202]},{73:[1,203]},o($Vi1,[2,147]),{73:[1,204],90:[1,205]},o($VS,[2,53],{107:116,46:$Vb,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu}),{22:$VZ,24:$V_,26:$V$,38:$V01,41:[1,206],42:$V11,46:$VD,61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:207,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,50:[1,208],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,52:[1,209],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,54:[1,210],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,56:[1,211],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,58:[1,212],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,60:[1,213],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,39:214,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,41:[1,215],42:$V11,46:$VD,61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,61:$V21,63:[1,216],65:[1,217],69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,61:$V21,63:[1,219],65:[1,218],69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{9:220,20:$Vy,21:$Vz,23:$VA},o($VB,[2,48],{46:$Vh1}),o($VY,[2,71]),o($VY,[2,70]),{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,61:$V21,69:$V31,71:[1,221],72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VY,[2,73]),o($Vj1,[2,77]),{22:$VZ,24:$V_,26:$V$,38:$V01,39:222,42:$V11,46:$VD,61:$V21,69:$V31,72:127,73:$V41,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($Vg1,$V5,{17:223}),o($Vx,[2,43]),{45:224,46:$Vb,48:38,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},{22:$Vm1,75:$Vn1,85:225,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{22:$Vm1,75:$Vn1,85:239,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{22:$Vm1,75:$Vn1,85:240,91:$Vo1,93:[1,241],94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{22:$Vm1,75:$Vn1,85:242,91:$Vo1,93:[1,243],94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{94:[1,244]},{22:$Vm1,75:$Vn1,85:245,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{22:$Vm1,75:$Vn1,85:246,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{26:$VC,46:$VD,80:$VE,86:247,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VV,[2,96]),{73:[1,248]},o($VV,[2,100],{22:[1,249]}),o($VV,[2,101]),o($VV,[2,104]),o($VV,[2,106],{22:[1,250]}),o($VV,[2,107]),o($VT,[2,54]),{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,50:[1,251],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VT,[2,60]),o($VT,[2,56]),o($VT,[2,57]),o($VT,[2,58]),o($VT,[2,59]),o($VT,[2,61]),{22:$VZ,24:$V_,26:$V$,38:$V01,42:$V11,46:$VD,60:[1,252],61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VT,[2,63]),o($VT,[2,64]),o($VT,[2,66]),o($VT,[2,65]),o($VT,[2,67]),o($Vk1,[2,4]),o([22,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,75]),{22:$VZ,24:$V_,26:$V$,38:$V01,41:[1,253],42:$V11,46:$VD,61:$V21,69:$V31,72:186,74:138,75:$V51,76:$V61,77:$V71,78:$V81,79:$V91,80:$Va1,81:$Vb1,83:129,84:$Vc1,94:$VF,95:$VG,98:$VH,99:$VI,100:$Vd1,102:$VK,103:$VL,104:$Ve1,105:$Vf1,106:135,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,254],44:31,45:37,46:$Vb,48:38,75:$Vc,76:$Vd,77:$Ve,78:$Vf,79:$Vg,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},o($VS,[2,52]),o($VV,[2,109],{95:$Vx1}),o($Vy1,[2,119],{97:256,22:$Vm1,75:$Vn1,91:$Vo1,94:$Vp1,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1}),o($Vz1,[2,121]),o($Vz1,[2,123]),o($Vz1,[2,124]),o($Vz1,[2,125]),o($Vz1,[2,126]),o($Vz1,[2,127]),o($Vz1,[2,128]),o($Vz1,[2,129]),o($Vz1,[2,130]),o($Vz1,[2,131]),o($Vz1,[2,132]),o($Vz1,[2,133]),o($VV,[2,110],{95:$Vx1}),o($VV,[2,111],{95:$Vx1}),{22:[1,257]},o($VV,[2,112],{95:$Vx1}),{22:[1,258]},o($Vl1,[2,118]),o($VV,[2,92],{95:$Vx1}),o($VV,[2,93],{95:$Vx1}),o($VV,[2,94],{106:89,108:165,26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR}),o($VV,[2,98]),{90:[1,259]},{90:[1,260]},{50:[1,261]},{60:[1,262]},{9:263,20:$Vy,21:$Vz,23:$VA},o($Vx,[2,42]),{22:$Vm1,75:$Vn1,91:$Vo1,94:$Vp1,96:264,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},o($Vz1,[2,122]),{26:$VC,46:$VD,80:$VE,86:265,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},{26:$VC,46:$VD,80:$VE,86:266,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,106:89,108:87,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR},o($VV,[2,102]),o($VV,[2,108]),o($VT,[2,55]),o($VT,[2,62]),o($Vg1,$V5,{17:267}),o($Vy1,[2,120],{97:256,22:$Vm1,75:$Vn1,91:$Vo1,94:$Vp1,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1}),o($VV,[2,115],{106:89,108:165,22:[1,268],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR}),o($VV,[2,116],{106:89,108:165,22:[1,269],26:$VC,46:$VD,80:$VE,94:$VF,95:$VG,98:$VH,99:$VI,100:$VJ,102:$VK,103:$VL,109:$VM,110:$VN,111:$VO,112:$VP,113:$VQ,114:$VR}),{18:18,19:19,20:$V6,21:$V7,22:$V8,23:$V9,32:24,33:25,34:26,35:27,36:28,37:29,38:$Va,42:[1,270],44:31,45:37,46:$Vb,48:38,75:$Vc,76:$Vd,77:$Ve,78:$Vf,79:$Vg,80:$Vh,94:$Vi,95:$Vj,98:$Vk,99:$Vl,100:$Vm,102:$Vn,103:$Vo,107:39,109:$Vp,110:$Vq,111:$Vr,112:$Vs,113:$Vt,114:$Vu},{22:$Vm1,75:$Vn1,85:271,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},{22:$Vm1,75:$Vn1,85:272,91:$Vo1,94:$Vp1,96:226,97:227,98:$Vq1,99:$Vr1,100:$Vs1,101:$Vt1,102:$Vu1,103:$Vv1,104:$Vw1},o($Vx,[2,41]),o($VV,[2,113],{95:$Vx1}),o($VV,[2,114],{95:$Vx1})], -defaultActions: {2:[2,1],9:[2,5],10:[2,2],119:[2,7]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 12; -break; -case 1: this.begin('type_directive'); return 13; -break; -case 2: this.popState(); this.begin('arg_directive'); return 10; -break; -case 3: this.popState(); this.popState(); return 15; -break; -case 4:return 14; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */ -break; -case 7:this.begin("string"); -break; -case 8:this.popState(); -break; -case 9:return "STR"; -break; -case 10:return 75; -break; -case 11:return 84; -break; -case 12:return 76; -break; -case 13:return 93; -break; -case 14:return 77; -break; -case 15:return 78; -break; -case 16:this.begin("href"); -break; -case 17:this.popState(); -break; -case 18:return 89; -break; -case 19:this.begin("callbackname"); -break; -case 20:this.popState(); -break; -case 21:this.popState(); this.begin("callbackargs"); -break; -case 22:return 87; -break; -case 23:this.popState(); -break; -case 24:return 88; -break; -case 25:this.begin("click"); -break; -case 26:this.popState(); -break; -case 27:return 79; -break; -case 28:if(yy.lex.firstGraph()){this.begin("dir");} return 24; -break; -case 29:if(yy.lex.firstGraph()){this.begin("dir");} return 24; -break; -case 30:return 38; -break; -case 31:return 42; -break; -case 32:return 90; -break; -case 33:return 90; -break; -case 34:return 90; -break; -case 35:return 90; -break; -case 36: this.popState(); return 25; -break; -case 37: this.popState(); return 26; -break; -case 38: this.popState(); return 26; -break; -case 39: this.popState(); return 26; -break; -case 40: this.popState(); return 26; -break; -case 41: this.popState(); return 26; -break; -case 42: this.popState(); return 26; -break; -case 43: this.popState(); return 26; -break; -case 44: this.popState(); return 26; -break; -case 45: this.popState(); return 26; -break; -case 46: this.popState(); return 26; -break; -case 47: return 94; -break; -case 48:return 102; -break; -case 49:return 47; -break; -case 50:return 99; -break; -case 51:return 46; -break; -case 52:return 20; -break; -case 53:return 95; -break; -case 54:return 113; -break; -case 55:return 70; -break; -case 56:return 70; -break; -case 57:return 70; -break; -case 58:return 69; -break; -case 59:return 69; -break; -case 60:return 69; -break; -case 61:return 51; -break; -case 62:return 52; -break; -case 63:return 53; -break; -case 64:return 54; -break; -case 65:return 55; -break; -case 66:return 56; -break; -case 67:return 57; -break; -case 68:return 58; -break; -case 69:return 100; -break; -case 70:return 103; -break; -case 71:return 114; -break; -case 72:return 111; -break; -case 73:return 104; -break; -case 74:return 112; -break; -case 75:return 112; -break; -case 76:return 105; -break; -case 77:return 61; -break; -case 78:return 81; -break; -case 79:return 'SEP'; -break; -case 80:return 80; -break; -case 81:return 98; -break; -case 82:return 63; -break; -case 83:return 62; -break; -case 84:return 65; -break; -case 85:return 64; -break; -case 86:return 109; -break; -case 87:return 110; -break; -case 88:return 71; -break; -case 89:return 49; -break; -case 90:return 50; -break; -case 91:return 40; -break; -case 92:return 41; -break; -case 93:return 59 -break; -case 94:return 60 -break; -case 95:return 120; -break; -case 96:return 21; -break; -case 97:return 22; -break; -case 98:return 23; -break; -} -}, -rules: [/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/], -conditions: {"close_directive":{"rules":[],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"callbackargs":{"rules":[23,24],"inclusive":false},"callbackname":{"rules":[20,21,22],"inclusive":false},"href":{"rules":[17,18],"inclusive":false},"click":{"rules":[26,27],"inclusive":false},"vertex":{"rules":[],"inclusive":false},"dir":{"rules":[36,37,38,39,40,41,42,43,44,45,46],"inclusive":false},"string":{"rules":[8,9],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/flowchart/styles.js": -/*!******************************************!*\ - !*** ./src/diagrams/flowchart/styles.js ***! - \******************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return ".label {\n font-family: ".concat(options.fontFamily, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n .cluster-label text {\n fill: ").concat(options.titleColor, ";\n }\n .cluster-label span {\n color: ").concat(options.titleColor, ";\n }\n\n .label text,span {\n fill: ").concat(options.nodeTextColor || options.textColor, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n background-color: ").concat(options.edgeLabelBackground, ";\n fill: ").concat(options.edgeLabelBackground, ";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.clusterBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n .cluster span {\n color: ").concat(options.titleColor, ";\n }\n // .cluster div {\n // color: ").concat(options.titleColor, ";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(options.fontFamily, ";\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/gantt/ganttDb.js": -/*!***************************************!*\ - !*** ./src/diagrams/gantt/ganttDb.js ***! - \***************************************/ -/*! exports provided: parseDirective, clear, setAxisFormat, getAxisFormat, setTodayMarker, getTodayMarker, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTodayMarker", function() { return setTodayMarker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTodayMarker", function() { return getTodayMarker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableInclusiveEndDates", function() { return enableInclusiveEndDates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endDatesAreInclusive", function() { return endDatesAreInclusive; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateFormat", function() { return getDateFormat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExcludes", function() { return getExcludes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; }); -/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini"); -/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url"); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - - - - - -var dateFormat = ''; -var axisFormat = ''; -var todayMarker = ''; -var excludes = []; -var title = ''; -var sections = []; -var tasks = []; -var currentSection = ''; -var tags = ['active', 'done', 'crit', 'milestone']; -var funs = []; -var inclusiveEndDates = false; // The serial order of the task in the script - -var lastOrder = 0; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__["default"].parseDirective(this, statement, context, type); -}; -var clear = function clear() { - sections = []; - tasks = []; - currentSection = ''; - funs = []; - title = ''; - taskCnt = 0; - lastTask = undefined; - lastTaskID = undefined; - rawTasks = []; - dateFormat = ''; - axisFormat = ''; - todayMarker = ''; - excludes = []; - inclusiveEndDates = false; - lastOrder = 0; -}; -var setAxisFormat = function setAxisFormat(txt) { - axisFormat = txt; -}; -var getAxisFormat = function getAxisFormat() { - return axisFormat; -}; -var setTodayMarker = function setTodayMarker(txt) { - todayMarker = txt; -}; -var getTodayMarker = function getTodayMarker() { - return todayMarker; -}; -var setDateFormat = function setDateFormat(txt) { - dateFormat = txt; -}; -var enableInclusiveEndDates = function enableInclusiveEndDates() { - inclusiveEndDates = true; -}; -var endDatesAreInclusive = function endDatesAreInclusive() { - return inclusiveEndDates; -}; -var getDateFormat = function getDateFormat() { - return dateFormat; -}; -var setExcludes = function setExcludes(txt) { - excludes = txt.toLowerCase().split(/[\s,]+/); -}; -var getExcludes = function getExcludes() { - return excludes; -}; -var setTitle = function setTitle(txt) { - title = txt; -}; -var getTitle = function getTitle() { - return title; -}; -var addSection = function addSection(txt) { - currentSection = txt; - sections.push(txt); -}; -var getSections = function getSections() { - return sections; -}; -var getTasks = function getTasks() { - var allItemsPricessed = compileTasks(); - var maxDepth = 10; - var iterationCount = 0; - - while (!allItemsPricessed && iterationCount < maxDepth) { - allItemsPricessed = compileTasks(); - iterationCount++; - } - - tasks = rawTasks; - return tasks; -}; - -var isInvalidDate = function isInvalidDate(date, dateFormat, excludes) { - if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) { - return true; - } - - if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) { - return true; - } - - return excludes.indexOf(date.format(dateFormat.trim())) >= 0; -}; - -var checkTaskDates = function checkTaskDates(task, dateFormat, excludes) { - if (!excludes.length || task.manualEndTime) return; - var startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true); - startTime.add(1, 'd'); - var endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true); - var renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes); - task.endTime = endTime.toDate(); - task.renderEndTime = renderEndTime; -}; - -var fixTaskDates = function fixTaskDates(startTime, endTime, dateFormat, excludes) { - var invalid = false; - var renderEndTime = null; - - while (startTime <= endTime) { - if (!invalid) { - renderEndTime = endTime.toDate(); - } - - invalid = isInvalidDate(startTime, dateFormat, excludes); - - if (invalid) { - endTime.add(1, 'd'); - } - - startTime.add(1, 'd'); - } - - return renderEndTime; -}; - -var getStartDate = function getStartDate(prevTime, dateFormat, str) { - str = str.trim(); // Test for after - - var re = /^after\s+([\d\w- ]+)/; - var afterStatement = re.exec(str.trim()); - - if (afterStatement !== null) { - // check all after ids and take the latest - var latestEndingTask = null; - afterStatement[1].split(' ').forEach(function (id) { - var task = findTaskById(id); - - if (typeof task !== 'undefined') { - if (!latestEndingTask) { - latestEndingTask = task; - } else { - if (task.endTime > latestEndingTask.endTime) { - latestEndingTask = task; - } - } - } - }); - - if (!latestEndingTask) { - var dt = new Date(); - dt.setHours(0, 0, 0, 0); - return dt; - } else { - return latestEndingTask.endTime; - } - } // Check for actual date set - - - var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true); - - if (mDate.isValid()) { - return mDate.toDate(); - } else { - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('Invalid date:' + str); - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('With date format:' + dateFormat.trim()); - } // Default date - now - - - return new Date(); -}; - -var durationToDate = function durationToDate(durationStatement, relativeTime) { - if (durationStatement !== null) { - switch (durationStatement[2]) { - case 's': - relativeTime.add(durationStatement[1], 'seconds'); - break; - - case 'm': - relativeTime.add(durationStatement[1], 'minutes'); - break; - - case 'h': - relativeTime.add(durationStatement[1], 'hours'); - break; - - case 'd': - relativeTime.add(durationStatement[1], 'days'); - break; - - case 'w': - relativeTime.add(durationStatement[1], 'weeks'); - break; - } - } // Default date - now - - - return relativeTime.toDate(); -}; - -var getEndDate = function getEndDate(prevTime, dateFormat, str, inclusive) { - inclusive = inclusive || false; - str = str.trim(); // Check for actual date - - var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true); - - if (mDate.isValid()) { - if (inclusive) { - mDate.add(1, 'd'); - } - - return mDate.toDate(); - } - - return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime)); -}; - -var taskCnt = 0; - -var parseId = function parseId(idStr) { - if (typeof idStr === 'undefined') { - taskCnt = taskCnt + 1; - return 'task' + taskCnt; - } - - return idStr; -}; // id, startDate, endDate -// id, startDate, length -// id, after x, endDate -// id, after x, length -// startDate, endDate -// startDate, length -// after x, endDate -// after x, length -// endDate -// length - - -var compileData = function compileData(prevTask, dataStr) { - var ds; - - if (dataStr.substr(0, 1) === ':') { - ds = dataStr.substr(1, dataStr.length); - } else { - ds = dataStr; - } - - var data = ds.split(','); - var task = {}; // Get tags like active, done, crit and milestone - - getTaskTags(data, task, tags); - - for (var i = 0; i < data.length; i++) { - data[i] = data[i].trim(); - } - - var endTimeData = ''; - - switch (data.length) { - case 1: - task.id = parseId(); - task.startTime = prevTask.endTime; - endTimeData = data[0]; - break; - - case 2: - task.id = parseId(); - task.startTime = getStartDate(undefined, dateFormat, data[0]); - endTimeData = data[1]; - break; - - case 3: - task.id = parseId(data[0]); - task.startTime = getStartDate(undefined, dateFormat, data[1]); - endTimeData = data[2]; - break; - - default: - } - - if (endTimeData) { - task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); - task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid(); - checkTaskDates(task, dateFormat, excludes); - } - - return task; -}; - -var parseData = function parseData(prevTaskId, dataStr) { - var ds; - - if (dataStr.substr(0, 1) === ':') { - ds = dataStr.substr(1, dataStr.length); - } else { - ds = dataStr; - } - - var data = ds.split(','); - var task = {}; // Get tags like active, done, crit and milestone - - getTaskTags(data, task, tags); - - for (var i = 0; i < data.length; i++) { - data[i] = data[i].trim(); - } - - switch (data.length) { - case 1: - task.id = parseId(); - task.startTime = { - type: 'prevTaskEnd', - id: prevTaskId - }; - task.endTime = { - data: data[0] - }; - break; - - case 2: - task.id = parseId(); - task.startTime = { - type: 'getStartDate', - startData: data[0] - }; - task.endTime = { - data: data[1] - }; - break; - - case 3: - task.id = parseId(data[0]); - task.startTime = { - type: 'getStartDate', - startData: data[1] - }; - task.endTime = { - data: data[2] - }; - break; - - default: - } - - return task; -}; - -var lastTask; -var lastTaskID; -var rawTasks = []; -var taskDb = {}; -var addTask = function addTask(descr, data) { - var rawTask = { - section: currentSection, - type: currentSection, - processed: false, - manualEndTime: false, - renderEndTime: null, - raw: { - data: data - }, - task: descr, - classes: [] - }; - var taskInfo = parseData(lastTaskID, data); - rawTask.raw.startTime = taskInfo.startTime; - rawTask.raw.endTime = taskInfo.endTime; - rawTask.id = taskInfo.id; - rawTask.prevTaskId = lastTaskID; - rawTask.active = taskInfo.active; - rawTask.done = taskInfo.done; - rawTask.crit = taskInfo.crit; - rawTask.milestone = taskInfo.milestone; - rawTask.order = lastOrder; - lastOrder++; - var pos = rawTasks.push(rawTask); - lastTaskID = rawTask.id; // Store cross ref - - taskDb[rawTask.id] = pos - 1; -}; -var findTaskById = function findTaskById(id) { - var pos = taskDb[id]; - return rawTasks[pos]; -}; -var addTaskOrg = function addTaskOrg(descr, data) { - var newTask = { - section: currentSection, - type: currentSection, - description: descr, - task: descr, - classes: [] - }; - var taskInfo = compileData(lastTask, data); - newTask.startTime = taskInfo.startTime; - newTask.endTime = taskInfo.endTime; - newTask.id = taskInfo.id; - newTask.active = taskInfo.active; - newTask.done = taskInfo.done; - newTask.crit = taskInfo.crit; - newTask.milestone = taskInfo.milestone; - lastTask = newTask; - tasks.push(newTask); -}; - -var compileTasks = function compileTasks() { - var compileTask = function compileTask(pos) { - var task = rawTasks[pos]; - var startTime = ''; - - switch (rawTasks[pos].raw.startTime.type) { - case 'prevTaskEnd': - { - var prevTask = findTaskById(task.prevTaskId); - task.startTime = prevTask.endTime; - break; - } - - case 'getStartDate': - startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData); - - if (startTime) { - rawTasks[pos].startTime = startTime; - } - - break; - } - - if (rawTasks[pos].startTime) { - rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates); - - if (rawTasks[pos].endTime) { - rawTasks[pos].processed = true; - rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid(); - checkTaskDates(rawTasks[pos], dateFormat, excludes); - } - } - - return rawTasks[pos].processed; - }; - - var allProcessed = true; - - for (var i = 0; i < rawTasks.length; i++) { - compileTask(i); - allProcessed = allProcessed && rawTasks[i].processed; - } - - return allProcessed; -}; -/** - * Called by parser when a link is found. Adds the URL to the vertex data. - * @param ids Comma separated list of ids - * @param linkStr URL to create a link for - */ - - -var setLink = function setLink(ids, _linkStr) { - var linkStr = _linkStr; - - if (_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]().securityLevel !== 'loose') { - linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(_linkStr); - } - - ids.split(',').forEach(function (id) { - var rawTask = findTaskById(id); - - if (typeof rawTask !== 'undefined') { - pushFun(id, function () { - window.open(linkStr, '_self'); - }); - } - }); - setClass(ids, 'clickable'); -}; -/** - * Called by parser when a special node is found, e.g. a clickable element. - * @param ids Comma separated list of ids - * @param className Class to add - */ - -var setClass = function setClass(ids, className) { - ids.split(',').forEach(function (id) { - var rawTask = findTaskById(id); - - if (typeof rawTask !== 'undefined') { - rawTask.classes.push(className); - } - }); -}; - -var setClickFun = function setClickFun(id, functionName, functionArgs) { - if (_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]().securityLevel !== 'loose') { - return; - } - - if (typeof functionName === 'undefined') { - return; - } - - var argList = []; - - if (typeof functionArgs === 'string') { - /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */ - argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); - - for (var i = 0; i < argList.length; i++) { - var item = argList[i].trim(); - /* Removes all double quotes at the start and end of an argument */ - - /* This preserves all starting and ending whitespace inside */ - - if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { - item = item.substr(1, item.length - 2); - } - - argList[i] = item; - } - } - /* if no arguments passed into callback, default to passing in id */ - - - if (argList.length === 0) { - argList.push(id); - } - - var rawTask = findTaskById(id); - - if (typeof rawTask !== 'undefined') { - pushFun(id, function () { - _utils__WEBPACK_IMPORTED_MODULE_4__["default"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__["default"], [functionName].concat(_toConsumableArray(argList))); - }); - } -}; -/** - * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text - * @param id The task's id - * @param callbackFunction A function to be executed when clicked on the task or the task's text - */ - - -var pushFun = function pushFun(id, callbackFunction) { - funs.push(function () { - // const elem = d3.select(element).select(`[id="${id}"]`) - var elem = document.querySelector("[id=\"".concat(id, "\"]")); - - if (elem !== null) { - elem.addEventListener('click', function () { - callbackFunction(); - }); - } - }); - funs.push(function () { - // const elem = d3.select(element).select(`[id="${id}-text"]`) - var elem = document.querySelector("[id=\"".concat(id, "-text\"]")); - - if (elem !== null) { - elem.addEventListener('click', function () { - callbackFunction(); - }); - } - }); -}; -/** - * Called by parser when a click definition is found. Registers an event handler. - * @param ids Comma separated list of ids - * @param functionName Function to be called on click - * @param functionArgs Function args the function should be called with - */ - - -var setClickEvent = function setClickEvent(ids, functionName, functionArgs) { - ids.split(',').forEach(function (id) { - setClickFun(id, functionName, functionArgs); - }); - setClass(ids, 'clickable'); -}; -/** - * Binds all functions previously added to fun (specified through click) to the element - * @param element - */ - -var bindFunctions = function bindFunctions(element) { - funs.forEach(function (fun) { - fun(element); - }); -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]().gantt; - }, - clear: clear, - setDateFormat: setDateFormat, - getDateFormat: getDateFormat, - enableInclusiveEndDates: enableInclusiveEndDates, - endDatesAreInclusive: endDatesAreInclusive, - setAxisFormat: setAxisFormat, - getAxisFormat: getAxisFormat, - setTodayMarker: setTodayMarker, - getTodayMarker: getTodayMarker, - setTitle: setTitle, - getTitle: getTitle, - addSection: addSection, - getSections: getSections, - getTasks: getTasks, - addTask: addTask, - findTaskById: findTaskById, - addTaskOrg: addTaskOrg, - setExcludes: setExcludes, - getExcludes: getExcludes, - setClickEvent: setClickEvent, - setLink: setLink, - bindFunctions: bindFunctions, - durationToDate: durationToDate -}); - -function getTaskTags(data, task, tags) { - var matchFound = true; - - while (matchFound) { - matchFound = false; - tags.forEach(function (t) { - var pattern = '^\\s*' + t + '\\s*$'; - var regex = new RegExp(pattern); - - if (data[0].match(regex)) { - task[t] = true; - data.shift(1); - matchFound = true; - } - }); - } -} - -/***/ }), - -/***/ "./src/diagrams/gantt/ganttRenderer.js": -/*!*********************************************!*\ - !*** ./src/diagrams/gantt/ganttRenderer.js ***! - \*********************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison"); -/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ganttDb */ "./src/diagrams/gantt/ganttDb.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - -_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_3__["default"]; -var conf = { - titleTopMargin: 25, - barHeight: 20, - barGap: 4, - topPadding: 50, - rightPadding: 75, - leftPadding: 75, - gridLineStartPadding: 35, - fontSize: 11, - fontFamily: '"Open-Sans", "sans-serif"' -}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -var w; -var draw = function draw(text, id) { - _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear(); - _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text); - var elem = document.getElementById(id); - w = elem.parentElement.offsetWidth; - - if (typeof w === 'undefined') { - w = 1200; - } - - if (typeof conf.useWidth !== 'undefined') { - w = conf.useWidth; - } - - var taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); // Set height based on number of tasks - - var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; // Set viewBox - - elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h); - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); // Set timescale - - var timeScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"])().domain([Object(d3__WEBPACK_IMPORTED_MODULE_0__["min"])(taskArray, function (d) { - return d.startTime; - }), Object(d3__WEBPACK_IMPORTED_MODULE_0__["max"])(taskArray, function (d) { - return d.endTime; - })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]); - var categories = []; - - for (var i = 0; i < taskArray.length; i++) { - categories.push(taskArray[i].type); - } - - var catsUnfiltered = categories; // for vert labels - - categories = checkUnique(categories); - - function taskCompare(a, b) { - var taskA = a.startTime; - var taskB = b.startTime; - var result = 0; - - if (taskA > taskB) { - result = 1; - } else if (taskA < taskB) { - result = -1; - } - - return result; - } // Sort the task array using the above taskCompare() so that - // tasks are created based on their order of startTime - - - taskArray.sort(taskCompare); - makeGant(taskArray, w, h); - Object(_utils__WEBPACK_IMPORTED_MODULE_4__["configureSvgSize"])(svg, h, w, conf.useMaxWidth); - svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText'); - - function makeGant(tasks, pageWidth, pageHeight) { - var barHeight = conf.barHeight; - var gap = barHeight + conf.barGap; - var topPadding = conf.topPadding; - var leftPadding = conf.leftPadding; - var colorScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"])().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]); - makeGrid(leftPadding, topPadding, pageWidth, pageHeight); - drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight); - vertLabels(gap, topPadding, leftPadding, barHeight, colorScale); - drawToday(leftPadding, topPadding, pageWidth, pageHeight); - } - - function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) { - // Draw background rects covering the entire width of the graph, these form the section rows. - svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) { - // Ignore the incoming i value and use our order instead - i = d.order; - return i * theGap + theTopPad - 2; - }).attr('width', function () { - return w - conf.rightPadding / 2; - }).attr('height', theGap).attr('class', function (d) { - for (var _i = 0; _i < categories.length; _i++) { - if (d.type === categories[_i]) { - return 'section section' + _i % conf.numberSectionStyles; - } - } - - return 'section section0'; - }); // Draw the rects representing the tasks - - var rectangles = svg.append('g').selectAll('rect').data(theArray).enter(); - rectangles.append('rect').attr('id', function (d) { - return d.id; - }).attr('rx', 3).attr('ry', 3).attr('x', function (d) { - if (d.milestone) { - return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; - } - - return timeScale(d.startTime) + theSidePad; - }).attr('y', function (d, i) { - // Ignore the incoming i value and use our order instead - i = d.order; - return i * theGap + theTopPad; - }).attr('width', function (d) { - if (d.milestone) { - return theBarHeight; - } - - return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); - }).attr('height', theBarHeight).attr('transform-origin', function (d, i) { - return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px'; - }).attr('class', function (d) { - var res = 'task'; - var classStr = ''; - - if (d.classes.length > 0) { - classStr = d.classes.join(' '); - } - - var secNum = 0; - - for (var _i2 = 0; _i2 < categories.length; _i2++) { - if (d.type === categories[_i2]) { - secNum = _i2 % conf.numberSectionStyles; - } - } - - var taskClass = ''; - - if (d.active) { - if (d.crit) { - taskClass += ' activeCrit'; - } else { - taskClass = ' active'; - } - } else if (d.done) { - if (d.crit) { - taskClass = ' doneCrit'; - } else { - taskClass = ' done'; - } - } else { - if (d.crit) { - taskClass += ' crit'; - } - } - - if (taskClass.length === 0) { - taskClass = ' task'; - } - - if (d.milestone) { - taskClass = ' milestone ' + taskClass; - } - - taskClass += secNum; - taskClass += ' ' + classStr; - return res + taskClass; - }); // Append task labels - - rectangles.append('text').attr('id', function (d) { - return d.id + '-text'; - }).text(function (d) { - return d.task; - }).attr('font-size', conf.fontSize).attr('x', function (d) { - var startX = timeScale(d.startTime); - var endX = timeScale(d.renderEndTime || d.endTime); - - if (d.milestone) { - startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; - } - - if (d.milestone) { - endX = startX + theBarHeight; - } - - var textWidth = this.getBBox().width; // Check id text width > width of rectangle - - if (textWidth > endX - startX) { - if (endX + textWidth + 1.5 * conf.leftPadding > w) { - return startX + theSidePad - 5; - } else { - return endX + theSidePad + 5; - } - } else { - return (endX - startX) / 2 + startX + theSidePad; - } - }).attr('y', function (d, i) { - // Ignore the incoming i value and use our order instead - i = d.order; - return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; - }).attr('text-height', theBarHeight).attr('class', function (d) { - var startX = timeScale(d.startTime); - var endX = timeScale(d.endTime); - - if (d.milestone) { - endX = startX + theBarHeight; - } - - var textWidth = this.getBBox().width; - var classStr = ''; - - if (d.classes.length > 0) { - classStr = d.classes.join(' '); - } - - var secNum = 0; - - for (var _i3 = 0; _i3 < categories.length; _i3++) { - if (d.type === categories[_i3]) { - secNum = _i3 % conf.numberSectionStyles; - } - } - - var taskType = ''; - - if (d.active) { - if (d.crit) { - taskType = 'activeCritText' + secNum; - } else { - taskType = 'activeText' + secNum; - } - } - - if (d.done) { - if (d.crit) { - taskType = taskType + ' doneCritText' + secNum; - } else { - taskType = taskType + ' doneText' + secNum; - } - } else { - if (d.crit) { - taskType = taskType + ' critText' + secNum; - } - } - - if (d.milestone) { - taskType += ' milestoneText'; - } // Check id text width > width of rectangle - - - if (textWidth > endX - startX) { - if (endX + textWidth + 1.5 * conf.leftPadding > w) { - return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType; - } else { - return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType + ' width-' + textWidth; - } - } else { - return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth; - } - }); - } - - function makeGrid(theSidePad, theTopPad, w, h) { - var xAxis = Object(d3__WEBPACK_IMPORTED_MODULE_0__["axisBottom"])(timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(Object(d3__WEBPACK_IMPORTED_MODULE_0__["timeFormat"])(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d')); - svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em'); - } - - function vertLabels(theGap, theTopPad) { - var numOccurances = []; - var prevGap = 0; - - for (var _i4 = 0; _i4 < categories.length; _i4++) { - numOccurances[_i4] = [categories[_i4], getCount(categories[_i4], catsUnfiltered)]; - } - - svg.append('g') // without doing this, impossible to put grid lines behind text - .selectAll('text').data(numOccurances).enter().append(function (d) { - var rows = d[0].split(_common_common__WEBPACK_IMPORTED_MODULE_2__["default"].lineBreakRegex); - var dy = -(rows.length - 1) / 2; - var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text'); - svgLabel.setAttribute('dy', dy + 'em'); - - for (var j = 0; j < rows.length; j++) { - var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan'); - tspan.setAttribute('alignment-baseline', 'central'); - tspan.setAttribute('x', '10'); - if (j > 0) tspan.setAttribute('dy', '1em'); - tspan.textContent = rows[j]; - svgLabel.appendChild(tspan); - } - - return svgLabel; - }).attr('x', 10).attr('y', function (d, i) { - if (i > 0) { - for (var j = 0; j < i; j++) { - prevGap += numOccurances[i - 1][1]; - return d[1] * theGap / 2 + prevGap * theGap + theTopPad; - } - } else { - return d[1] * theGap / 2 + theTopPad; - } - }).attr('class', function (d) { - for (var _i5 = 0; _i5 < categories.length; _i5++) { - if (d[0] === categories[_i5]) { - return 'sectionTitle sectionTitle' + _i5 % conf.numberSectionStyles; - } - } - - return 'sectionTitle'; - }); - } - - function drawToday(theSidePad, theTopPad, w, h) { - var todayMarker = _ganttDb__WEBPACK_IMPORTED_MODULE_3__["default"].getTodayMarker(); - - if (todayMarker === 'off') { - return; - } - - var todayG = svg.append('g').attr('class', 'today'); - var today = new Date(); - var todayLine = todayG.append('line'); - todayLine.attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today'); - - if (todayMarker !== '') { - todayLine.attr('style', todayMarker.replace(/,/g, ';')); - } - } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript - - - function checkUnique(arr) { - var hash = {}; - var result = []; - - for (var _i6 = 0, l = arr.length; _i6 < l; ++_i6) { - if (!hash.hasOwnProperty(arr[_i6])) { - // eslint-disable-line - // it works with objects! in FF, at least - hash[arr[_i6]] = true; - result.push(arr[_i6]); - } - } - - return result; - } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array - - - function getCounts(arr) { - var i = arr.length; // const to loop over - - var obj = {}; // obj to store results - - while (i) { - obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences - } - - return obj; - } // get specific from everything - - - function getCount(word, arr) { - return getCounts(arr)[word] || 0; - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/gantt/parser/gantt.jison": -/*!***********************************************!*\ - !*** ./src/diagrams/gantt/parser/gantt.jison ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,5],$V2=[7,9,11,12,13,14,15,16,17,18,20,27,32],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,18],$V7=[1,19],$V8=[1,20],$V9=[1,21],$Va=[1,23],$Vb=[1,25],$Vc=[1,28],$Vd=[5,7,9,11,12,13,14,15,16,17,18,20,27,32]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"directive":4,"gantt":5,"document":6,"EOF":7,"line":8,"SPACE":9,"statement":10,"NL":11,"dateFormat":12,"inclusiveEndDates":13,"axisFormat":14,"excludes":15,"todayMarker":16,"title":17,"section":18,"clickStatement":19,"taskTxt":20,"taskData":21,"openDirective":22,"typeDirective":23,"closeDirective":24,":":25,"argDirective":26,"click":27,"callbackname":28,"callbackargs":29,"href":30,"clickStatementDebug":31,"open_directive":32,"type_directive":33,"arg_directive":34,"close_directive":35,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"axisFormat",15:"excludes",16:"todayMarker",17:"title",18:"section",20:"taskTxt",21:"taskData",25:":",27:"click",28:"callbackname",29:"callbackargs",30:"href",32:"open_directive",33:"type_directive",34:"arg_directive",35:"close_directive"}, -productions_: [0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[19,2],[19,3],[19,3],[19,4],[19,3],[19,4],[19,2],[31,2],[31,3],[31,3],[31,4],[31,3],[31,4],[31,2],[22,1],[23,1],[26,1],[24,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 2: - return $$[$0-1]; -break; -case 3: - this.$ = [] -break; -case 4: -$$[$0-1].push($$[$0]);this.$ = $$[$0-1] -break; -case 5: case 6: - this.$ = $$[$0] -break; -case 7: case 8: - this.$=[]; -break; -case 9: -yy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11); -break; -case 10: -yy.enableInclusiveEndDates();this.$=$$[$0].substr(18); -break; -case 11: -yy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11); -break; -case 12: -yy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9); -break; -case 13: -yy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12); -break; -case 14: -yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6); -break; -case 15: -yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8); -break; -case 17: -yy.addTask($$[$0-1],$$[$0]);this.$='task'; -break; -case 21: -this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null); -break; -case 22: -this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]); -break; -case 23: -this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]); -break; -case 24: -this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]); -break; -case 25: -this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]); -break; -case 26: -this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]); -break; -case 27: -this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]); -break; -case 28: case 34: -this.$=$$[$0-1] + ' ' + $$[$0]; -break; -case 29: case 30: case 32: -this.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0]; -break; -case 31: case 33: -this.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0]; -break; -case 35: - yy.parseDirective('%%{', 'open_directive'); -break; -case 36: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 37: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 38: - yy.parseDirective('}%%', 'close_directive', 'gantt'); -break; -} -}, -table: [{3:1,4:2,5:$V0,22:4,32:$V1},{1:[3]},{3:6,4:2,5:$V0,22:4,32:$V1},o($V2,[2,3],{6:7}),{23:8,33:[1,9]},{33:[2,35]},{1:[2,1]},{4:24,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:$V3,13:$V4,14:$V5,15:$V6,16:$V7,17:$V8,18:$V9,19:22,20:$Va,22:4,27:$Vb,32:$V1},{24:26,25:[1,27],35:$Vc},o([25,35],[2,36]),o($V2,[2,8],{1:[2,2]}),o($V2,[2,4]),{4:24,10:29,12:$V3,13:$V4,14:$V5,15:$V6,16:$V7,17:$V8,18:$V9,19:22,20:$Va,22:4,27:$Vb,32:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,9]),o($V2,[2,10]),o($V2,[2,11]),o($V2,[2,12]),o($V2,[2,13]),o($V2,[2,14]),o($V2,[2,15]),o($V2,[2,16]),{21:[1,30]},o($V2,[2,18]),{28:[1,31],30:[1,32]},{11:[1,33]},{26:34,34:[1,35]},{11:[2,38]},o($V2,[2,5]),o($V2,[2,17]),o($V2,[2,21],{29:[1,36],30:[1,37]}),o($V2,[2,27],{28:[1,38]}),o($Vd,[2,19]),{24:39,35:$Vc},{35:[2,37]},o($V2,[2,22],{30:[1,40]}),o($V2,[2,23]),o($V2,[2,25],{29:[1,41]}),{11:[1,42]},o($V2,[2,24]),o($V2,[2,26]),o($Vd,[2,20])], -defaultActions: {5:[2,35],6:[2,1],28:[2,38],35:[2,37]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 32; -break; -case 1: this.begin('type_directive'); return 33; -break; -case 2: this.popState(); this.begin('arg_directive'); return 25; -break; -case 3: this.popState(); this.popState(); return 35; -break; -case 4:return 34; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */ -break; -case 7:/* do nothing */ -break; -case 8:return 11; -break; -case 9:/* skip whitespace */ -break; -case 10:/* skip comments */ -break; -case 11:/* skip comments */ -break; -case 12:this.begin("href"); -break; -case 13:this.popState(); -break; -case 14:return 30; -break; -case 15:this.begin("callbackname"); -break; -case 16:this.popState(); -break; -case 17:this.popState(); this.begin("callbackargs"); -break; -case 18:return 28; -break; -case 19:this.popState(); -break; -case 20:return 29; -break; -case 21:this.begin("click"); -break; -case 22:this.popState(); -break; -case 23:return 27; -break; -case 24:return 5; -break; -case 25:return 12; -break; -case 26:return 13; -break; -case 27:return 14; -break; -case 28:return 15; -break; -case 29:return 16; -break; -case 30:return 'date'; -break; -case 31:return 17; -break; -case 32:return 18; -break; -case 33:return 20; -break; -case 34:return 21; -break; -case 35:return 25; -break; -case 36:return 7; -break; -case 37:return 'INVALID'; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i], -conditions: {"close_directive":{"rules":[],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"callbackargs":{"rules":[19,20],"inclusive":false},"callbackname":{"rules":[16,17,18],"inclusive":false},"href":{"rules":[13,14],"inclusive":false},"click":{"rules":[22,23],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/gantt/styles.js": -/*!**************************************!*\ - !*** ./src/diagrams/gantt/styles.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return "\n .mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ".concat(options.sectionBkgColor, ";\n }\n\n .section2 {\n fill: ").concat(options.sectionBkgColor2, ";\n }\n\n .section1,\n .section3 {\n fill: ").concat(options.altSectionBkgColor, ";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle1 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle2 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle3 {\n fill: ").concat(options.titleColor, ";\n }\n\n .sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(options.gridColor, ";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(options.fontFamily, ";\n fill: ").concat(options.textColor, ";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(options.todayLineColor, ";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .taskText:not([font-size]) {\n font-size: 11px;\n }\n\n .taskTextOutsideRight {\n fill: ").concat(options.taskTextDarkColor, ";\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(options.taskTextDarkColor, ";\n text-anchor: end;\n font-size: 11px;\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(options.taskTextClickableColor, " !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(options.taskTextColor, ";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(options.taskBkgColor, ";\n stroke: ").concat(options.taskBorderColor, ";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(options.taskTextOutsideColor, ";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(options.taskTextOutsideColor, ";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(options.activeTaskBkgColor, ";\n stroke: ").concat(options.activeTaskBorderColor, ";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(options.doneTaskBorderColor, ";\n fill: ").concat(options.doneTaskBkgColor, ";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.critBkgColor, ";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.activeTaskBkgColor, ";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(options.critBorderColor, ";\n fill: ").concat(options.doneTaskBkgColor, ";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(options.taskTextDarkColor, " !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(options.textColor, " ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/git/gitGraphAst.js": -/*!*****************************************!*\ - !*** ./src/diagrams/git/gitGraphAst.js ***! - \*****************************************/ -/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - -var commits = {}; -var head = null; -var branches = { - master: head -}; -var curBranch = 'master'; -var direction = 'LR'; -var seq = 0; - -function getId() { - return Object(_utils__WEBPACK_IMPORTED_MODULE_1__["random"])({ - length: 7 - }); -} - -function isfastforwardable(currentCommit, otherCommit) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id); - - while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) { - // only if other branch has more commits - if (otherCommit.parent == null) break; - - if (Array.isArray(otherCommit.parent)) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('In merge commit:', otherCommit.parent); - return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]); - } else { - otherCommit = commits[otherCommit.parent]; - } - } - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(currentCommit.id, otherCommit.id); - return currentCommit.id === otherCommit.id; -} - -function isReachableFrom(currentCommit, otherCommit) { - var currentSeq = currentCommit.seq; - var otherSeq = otherCommit.seq; - if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit); - return false; -} - -function uniqBy(list, fn) { - var recordMap = Object.create(null); - return list.reduce(function (out, item) { - var key = fn(item); - - if (!recordMap[key]) { - recordMap[key] = true; - out.push(item); - } - - return out; - }, []); -} - -var setDirection = function setDirection(dir) { - direction = dir; -}; -var options = {}; -var setOptions = function setOptions(rawOptString) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('options str', rawOptString); - rawOptString = rawOptString && rawOptString.trim(); - rawOptString = rawOptString || '{}'; - - try { - options = JSON.parse(rawOptString); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error('error while parsing gitGraph options', e.message); - } -}; -var getOptions = function getOptions() { - return options; -}; -var commit = function commit(msg) { - var commit = { - id: getId(), - message: msg, - seq: seq++, - parent: head == null ? null : head.id - }; - head = commit; - commits[commit.id] = commit; - branches[curBranch] = commit.id; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in pushCommit ' + commit.id); -}; -var branch = function branch(name) { - branches[name] = head != null ? head.id : null; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in createBranch'); -}; -var merge = function merge(otherBranch) { - var currentCommit = commits[branches[curBranch]]; - var otherCommit = commits[branches[otherBranch]]; - - if (isReachableFrom(currentCommit, otherCommit)) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Already merged'); - return; - } - - if (isfastforwardable(currentCommit, otherCommit)) { - branches[curBranch] = branches[otherBranch]; - head = commits[branches[curBranch]]; - } else { - // create merge commit - var _commit = { - id: getId(), - message: 'merged branch ' + otherBranch + ' into ' + curBranch, - seq: seq++, - parent: [head == null ? null : head.id, branches[otherBranch]] - }; - head = _commit; - commits[_commit.id] = _commit; - branches[curBranch] = _commit.id; - } - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(branches); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in mergeBranch'); -}; -var checkout = function checkout(branch) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in checkout'); - curBranch = branch; - var id = branches[curBranch]; - head = commits[id]; -}; -var reset = function reset(commitRef) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in reset', commitRef); - var ref = commitRef.split(':')[0]; - var parentCount = parseInt(commitRef.split(':')[1]); - var commit = ref === 'HEAD' ? head : commits[branches[ref]]; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(commit, parentCount); - - while (parentCount > 0) { - commit = commits[commit.parent]; - parentCount--; - - if (!commit) { - var err = 'Critical error - unique parent commit not found during reset'; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error(err); - throw err; - } - } - - head = commit; - branches[curBranch] = commit.id; -}; - -function upsert(arr, key, newval) { - var index = arr.indexOf(key); - - if (index === -1) { - arr.push(newval); - } else { - arr.splice(index, 1, newval); - } -} - -function prettyPrintCommitHistory(commitArr) { - var commit = commitArr.reduce(function (out, commit) { - if (out.seq > commit.seq) return out; - return commit; - }, commitArr[0]); - var line = ''; - commitArr.forEach(function (c) { - if (c === commit) { - line += '\t*'; - } else { - line += '\t|'; - } - }); - var label = [line, commit.id, commit.seq]; - - for (var _branch in branches) { - if (branches[_branch] === commit.id) label.push(_branch); - } - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(label.join(' ')); - - if (Array.isArray(commit.parent)) { - var newCommit = commits[commit.parent[0]]; - upsert(commitArr, commit, newCommit); - commitArr.push(commits[commit.parent[1]]); - } else if (commit.parent == null) { - return; - } else { - var nextCommit = commits[commit.parent]; - upsert(commitArr, commit, nextCommit); - } - - commitArr = uniqBy(commitArr, function (c) { - return c.id; - }); - prettyPrintCommitHistory(commitArr); -} - -var prettyPrint = function prettyPrint() { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(commits); - var node = getCommitsArray()[0]; - prettyPrintCommitHistory([node]); -}; -var clear = function clear() { - commits = {}; - head = null; - branches = { - master: head - }; - curBranch = 'master'; - seq = 0; -}; -var getBranchesAsObjArray = function getBranchesAsObjArray() { - var branchArr = []; - - for (var _branch2 in branches) { - branchArr.push({ - name: _branch2, - commit: commits[branches[_branch2]] - }); - } - - return branchArr; -}; -var getBranches = function getBranches() { - return branches; -}; -var getCommits = function getCommits() { - return commits; -}; -var getCommitsArray = function getCommitsArray() { - var commitArr = Object.keys(commits).map(function (key) { - return commits[key]; - }); - commitArr.forEach(function (o) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(o.id); - }); - commitArr.sort(function (a, b) { - return b.seq - a.seq; - }); - return commitArr; -}; -var getCurrentBranch = function getCurrentBranch() { - return curBranch; -}; -var getDirection = function getDirection() { - return direction; -}; -var getHead = function getHead() { - return head; -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setDirection: setDirection, - setOptions: setOptions, - getOptions: getOptions, - commit: commit, - branch: branch, - merge: merge, - checkout: checkout, - reset: reset, - prettyPrint: prettyPrint, - clear: clear, - getBranchesAsObjArray: getBranchesAsObjArray, - getBranches: getBranches, - getCommits: getCommits, - getCommitsArray: getCommitsArray, - getCurrentBranch: getCurrentBranch, - getDirection: getDirection, - getHead: getHead -}); - -/***/ }), - -/***/ "./src/diagrams/git/gitGraphRenderer.js": -/*!**********************************************!*\ - !*** ./src/diagrams/git/gitGraphRenderer.js ***! - \**********************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js"); -/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison"); -/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - -var allCommitsDict = {}; -var branchNum; -var config = { - nodeSpacing: 150, - nodeFillColor: 'yellow', - nodeStrokeWidth: 2, - nodeStrokeColor: 'grey', - lineStrokeWidth: 4, - branchOffset: 50, - lineColor: 'grey', - leftMargin: 50, - branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'], - nodeRadius: 10, - nodeLabel: { - width: 75, - height: 100, - x: -25, - y: 0 - } -}; -var apiConfig = {}; -var setConf = function setConf(c) { - apiConfig = c; -}; - -function svgCreateDefs(svg) { - svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0); - svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html(''); -} - -function svgDrawLine(svg, points, colorIdx, interpolate) { - var curve = Object(_utils__WEBPACK_IMPORTED_MODULE_4__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); - var color = config.branchColors[colorIdx % config.branchColors.length]; - var lineGen = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { - return Math.round(d.x); - }).y(function (d) { - return Math.round(d.y); - }).curve(curve); - svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none'); -} // Pass in the element and its pre-transform coords - - -function getElementCoords(element, coords) { - coords = coords || element.node().getBBox(); - var ctm = element.node().getCTM(); - var xn = ctm.e + coords.x * ctm.a; - var yn = ctm.f + coords.y * ctm.d; - return { - left: xn, - top: yn, - width: coords.width, - height: coords.height - }; -} - -function svgDrawLineForCommits(svg, fromId, toId, direction, color) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('svgDrawLineForCommits: ', fromId, toId); - var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle')); - var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle')); - - switch (direction) { - case 'LR': - // (toBbox) - // +-------- - // + (fromBbox) - if (fromBbox.left - toBbox.left > config.nodeSpacing) { - var lineStart = { - x: fromBbox.left - config.nodeSpacing, - y: toBbox.top + toBbox.height / 2 - }; - var lineEnd = { - x: toBbox.left + toBbox.width, - y: toBbox.top + toBbox.height / 2 - }; - svgDrawLine(svg, [lineStart, lineEnd], color, 'linear'); - svgDrawLine(svg, [{ - x: fromBbox.left, - y: fromBbox.top + fromBbox.height / 2 - }, { - x: fromBbox.left - config.nodeSpacing / 2, - y: fromBbox.top + fromBbox.height / 2 - }, { - x: fromBbox.left - config.nodeSpacing / 2, - y: lineStart.y - }, lineStart], color); - } else { - svgDrawLine(svg, [{ - x: fromBbox.left, - y: fromBbox.top + fromBbox.height / 2 - }, { - x: fromBbox.left - config.nodeSpacing / 2, - y: fromBbox.top + fromBbox.height / 2 - }, { - x: fromBbox.left - config.nodeSpacing / 2, - y: toBbox.top + toBbox.height / 2 - }, { - x: toBbox.left + toBbox.width, - y: toBbox.top + toBbox.height / 2 - }], color); - } - - break; - - case 'BT': - // + (fromBbox) - // | - // | - // + (toBbox) - if (toBbox.top - fromBbox.top > config.nodeSpacing) { - var _lineStart = { - x: toBbox.left + toBbox.width / 2, - y: fromBbox.top + fromBbox.height + config.nodeSpacing - }; - var _lineEnd = { - x: toBbox.left + toBbox.width / 2, - y: toBbox.top - }; - svgDrawLine(svg, [_lineStart, _lineEnd], color, 'linear'); - svgDrawLine(svg, [{ - x: fromBbox.left + fromBbox.width / 2, - y: fromBbox.top + fromBbox.height - }, { - x: fromBbox.left + fromBbox.width / 2, - y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2 - }, { - x: toBbox.left + toBbox.width / 2, - y: _lineStart.y - config.nodeSpacing / 2 - }, _lineStart], color); - } else { - svgDrawLine(svg, [{ - x: fromBbox.left + fromBbox.width / 2, - y: fromBbox.top + fromBbox.height - }, { - x: fromBbox.left + fromBbox.width / 2, - y: fromBbox.top + config.nodeSpacing / 2 - }, { - x: toBbox.left + toBbox.width / 2, - y: toBbox.top - config.nodeSpacing / 2 - }, { - x: toBbox.left + toBbox.width / 2, - y: toBbox.top - }], color); - } - - break; - } -} - -function cloneNode(svg, selector) { - return svg.select(selector).node().cloneNode(true); -} - -function renderCommitHistory(svg, commitid, branches, direction) { - var commit; - var numCommits = Object.keys(allCommitsDict).length; - - if (typeof commitid === 'string') { - do { - commit = allCommitsDict[commitid]; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('in renderCommitHistory', commit.id, commit.seq); - - if (svg.select('#node-' + commitid).size() > 0) { - return; - } - - svg.append(function () { - return cloneNode(svg, '#def-commit'); - }).attr('class', 'commit').attr('id', function () { - return 'node-' + commit.id; - }).attr('transform', function () { - switch (direction) { - case 'LR': - return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')'; - - case 'BT': - return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')'; - } - }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth); - var branch = void 0; - - for (var branchName in branches) { - if (branches[branchName].commit === commit) { - branch = branches[branchName]; - break; - } - } - - if (branch) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('found branch ', branch.name); - svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', '); - } - - svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id); - - if (commit.message !== '' && direction === 'BT') { - svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message); - } - - commitid = commit.parent; - } while (commitid && allCommitsDict[commitid]); - } - - if (Array.isArray(commitid)) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('found merge commmit', commitid); - renderCommitHistory(svg, commitid[0], branches, direction); - branchNum++; - renderCommitHistory(svg, commitid[1], branches, direction); - branchNum--; - } -} - -function renderLines(svg, commit, direction, branchColor) { - branchColor = branchColor || 0; - - while (commit.seq > 0 && !commit.lineDrawn) { - if (typeof commit.parent === 'string') { - svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor); - commit.lineDrawn = true; - commit = allCommitsDict[commit.parent]; - } else if (Array.isArray(commit.parent)) { - svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor); - svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1); - renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1); - commit.lineDrawn = true; - commit = allCommitsDict[commit.parent[0]]; - } - } -} - -var draw = function draw(txt, id, ver) { - try { - var parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default.a.parser; - parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"]; - parser.yy.clear(); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('in gitgraph renderer', txt + '\n', 'id:', id, ver); // Parse the graph definition - - parser.parse(txt + '\n'); - config = Object.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getOptions()); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('effective options', config); - var direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getDirection(); - allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getCommits(); - var branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getBranchesAsObjArray(); - - if (direction === 'BT') { - config.nodeLabel.x = branches.length * config.branchOffset; - config.nodeLabel.width = '100%'; - config.nodeLabel.y = -1 * 2 * config.nodeRadius; - } - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); - svgCreateDefs(svg); - branchNum = 1; - - for (var branch in branches) { - var v = branches[branch]; - renderCommitHistory(svg, v.commit.id, branches, direction); - renderLines(svg, v.commit, direction); - branchNum++; - } - - svg.attr('height', function () { - if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing; - return (branches.length + 1) * config.branchOffset; - }); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering gitgraph'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e.message); - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/git/parser/gitGraph.jison": -/*!************************************************!*\ - !*** ./src/diagrams/git/parser/gitGraph.jison ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"GG":4,":":5,"document":6,"EOF":7,"DIR":8,"options":9,"body":10,"OPT":11,"NL":12,"line":13,"statement":14,"COMMIT":15,"commit_arg":16,"BRANCH":17,"ID":18,"CHECKOUT":19,"MERGE":20,"RESET":21,"reset_arg":22,"STR":23,"HEAD":24,"reset_parents":25,"CARET":26,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"}, -productions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: - return $$[$0-1]; -break; -case 2: -yy.setDirection($$[$0-3]); return $$[$0-1]; -break; -case 4: - yy.setOptions($$[$0-1]); this.$ = $$[$0] -break; -case 5: -$$[$0-1] +=$$[$0]; this.$=$$[$0-1] -break; -case 7: -this.$ = [] -break; -case 8: -$$[$0-1].push($$[$0]); this.$=$$[$0-1]; -break; -case 9: -this.$ =$$[$0-1] -break; -case 11: -yy.commit($$[$0]) -break; -case 12: -yy.branch($$[$0]) -break; -case 13: -yy.checkout($$[$0]) -break; -case 14: -yy.merge($$[$0]) -break; -case 15: -yy.reset($$[$0]) -break; -case 16: -this.$ = "" -break; -case 17: -this.$=$$[$0] -break; -case 18: -this.$ = $$[$0-1]+ ":" + $$[$0] -break; -case 19: -this.$ = $$[$0-1]+ ":" + yy.count; yy.count = 0 -break; -case 20: -yy.count = 0 -break; -case 21: - yy.count += 1 -break; -} -}, -table: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}], -defaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 12; -break; -case 1:/* skip all whitespace */ -break; -case 2:/* skip comments */ -break; -case 3:/* skip comments */ -break; -case 4:return 4; -break; -case 5:return 15; -break; -case 6:return 17; -break; -case 7:return 20; -break; -case 8:return 21; -break; -case 9:return 19; -break; -case 10:return 8; -break; -case 11:return 8; -break; -case 12:return 5; -break; -case 13:return 26 -break; -case 14:this.begin("options"); -break; -case 15:this.popState(); -break; -case 16:return 11; -break; -case 17:this.begin("string"); -break; -case 18:this.popState(); -break; -case 19:return 23; -break; -case 20:return 18; -break; -case 21:return 7; -break; -} -}, -rules: [/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i], -conditions: {"options":{"rules":[15,16],"inclusive":false},"string":{"rules":[18,19],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/git/styles.js": -/*!************************************!*\ - !*** ./src/diagrams/git/styles.js ***! - \************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles() { - return "\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"; -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/info/infoDb.js": -/*!*************************************!*\ - !*** ./src/diagrams/info/infoDb.js ***! - \*************************************/ -/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/** - * Created by knut on 15-01-14. - */ - -var message = ''; -var info = false; -var setMessage = function setMessage(txt) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Setting message to: ' + txt); - message = txt; -}; -var getMessage = function getMessage() { - return message; -}; -var setInfo = function setInfo(inf) { - info = inf; -}; -var getInfo = function getInfo() { - return info; -}; // export const parseError = (err, hash) => { -// global.mermaidAPI.parseError(err, hash) -// } - -/* harmony default export */ __webpack_exports__["default"] = ({ - setMessage: setMessage, - getMessage: getMessage, - setInfo: setInfo, - getInfo: getInfo // parseError - -}); - -/***/ }), - -/***/ "./src/diagrams/info/infoRenderer.js": -/*!*******************************************!*\ - !*** ./src/diagrams/info/infoRenderer.js ***! - \*******************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js"); -/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info */ "./src/diagrams/info/parser/info.jison"); -/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/** - * Created by knut on 14-12-11. - */ - - - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -/** - * Draws a an info picture in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var draw = function draw(txt, id, ver) { - try { - var parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser; - parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"]; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Renering info diagram\n' + txt); // Parse the graph definition - - parser.parse(txt); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); - var g = svg.append('g'); - g.append('text') // text label for the x axis - .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver); - svg.attr('height', 100); - svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150'); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering info diagram'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e.message); - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/info/parser/info.jison": -/*!*********************************************!*\ - !*** ./src/diagrams/info/parser/info.jison ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"info":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"showInfo":10,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"}, -productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: - return yy; -break; -case 4: - -break; -case 6: - yy.setInfo(true); -break; -} -}, -table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])], -defaultActions: {4:[2,1]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { - // Pre-lexer code can go here - -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0:return 4 ; -break; -case 1:return 9 ; -break; -case 2:return 'space'; -break; -case 3:return 10; -break; -case 4:return 6 ; -break; -case 5:return 'TXT' ; -break; -} -}, -rules: [/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/info/styles.js": -/*!*************************************!*\ - !*** ./src/diagrams/info/styles.js ***! - \*************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles() { - return ""; -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/pie/parser/pie.jison": -/*!*******************************************!*\ - !*** ./src/diagrams/pie/parser/pie.jison ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,5],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,10,12,19,20,21,22],$V6=[1,6,10,12,19,20,21,22],$V7=[19,20,21],$V8=[1,22],$V9=[6,19,20,21,22]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"eol":4,"directive":5,"PIE":6,"document":7,"line":8,"statement":9,"txt":10,"value":11,"title":12,"title_value":13,"openDirective":14,"typeDirective":15,"closeDirective":16,":":17,"argDirective":18,"NEWLINE":19,";":20,"EOF":21,"open_directive":22,"type_directive":23,"arg_directive":24,"close_directive":25,"$accept":0,"$end":1}, -terminals_: {2:"error",6:"PIE",10:"txt",11:"value",12:"title",13:"title_value",17:":",19:"NEWLINE",20:";",21:"EOF",22:"open_directive",23:"type_directive",24:"arg_directive",25:"close_directive"}, -productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,2],[9,1],[5,3],[5,5],[4,1],[4,1],[4,1],[14,1],[15,1],[18,1],[16,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 6: - this.$ = $$[$0-1] -break; -case 8: - yy.addSection($$[$0-1],yy.cleanupValue($$[$0])); -break; -case 9: - this.$=$$[$0].trim();yy.setTitle(this.$); -break; -case 16: - yy.parseDirective('%%{', 'open_directive'); -break; -case 17: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 18: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 19: - yy.parseDirective('}%%', 'close_directive', 'pie'); -break; -} -}, -table: [{3:1,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},{1:[3]},{3:10,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},{3:11,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},o($V5,[2,4],{7:12}),o($V6,[2,13]),o($V6,[2,14]),o($V6,[2,15]),{15:13,23:[1,14]},{23:[2,16]},{1:[2,1]},{1:[2,2]},o($V7,[2,7],{14:8,8:15,9:16,5:19,1:[2,3],10:[1,17],12:[1,18],22:$V4}),{16:20,17:[1,21],25:$V8},o([17,25],[2,17]),o($V5,[2,5]),{4:23,19:$V1,20:$V2,21:$V3},{11:[1,24]},{13:[1,25]},o($V7,[2,10]),o($V9,[2,11]),{18:26,24:[1,27]},o($V9,[2,19]),o($V5,[2,6]),o($V7,[2,8]),o($V7,[2,9]),{16:28,25:$V8},{25:[2,18]},o($V9,[2,12])], -defaultActions: {9:[2,16],10:[2,1],11:[2,2],27:[2,18]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 22; -break; -case 1: this.begin('type_directive'); return 23; -break; -case 2: this.popState(); this.begin('arg_directive'); return 17; -break; -case 3: this.popState(); this.popState(); return 25; -break; -case 4:return 24; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */{ /*console.log('');*/ } -break; -case 7:return 19; -break; -case 8:/* do nothing */ -break; -case 9:/* ignore */ -break; -case 10: this.begin("title");return 12; -break; -case 11: this.popState(); return "title_value"; -break; -case 12: this.begin("string"); -break; -case 13: this.popState(); -break; -case 14: return "txt"; -break; -case 15:return 6; -break; -case 16:return "value"; -break; -case 17:return 21; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i], -conditions: {"close_directive":{"rules":[],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"title":{"rules":[11],"inclusive":false},"string":{"rules":[13,14],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,12,15,16,17],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/pie/pieDb.js": -/*!***********************************!*\ - !*** ./src/diagrams/pie/pieDb.js ***! - \***********************************/ -/*! exports provided: parseDirective, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/** - * - */ - - - -var sections = {}; -var title = ''; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parseDirective(this, statement, context, type); -}; - -var addSection = function addSection(id, value) { - if (typeof sections[id] === 'undefined') { - sections[id] = value; - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added new section :', id); - } -}; - -var getSections = function getSections() { - return sections; -}; - -var setTitle = function setTitle(txt) { - title = txt; -}; - -var getTitle = function getTitle() { - return title; -}; - -var cleanupValue = function cleanupValue(value) { - if (value.substring(0, 1) === ':') { - value = value.substring(1).trim(); - return Number(value.trim()); - } else { - return Number(value.trim()); - } -}; - -var clear = function clear() { - sections = {}; - title = ''; -}; // export const parseError = (err, hash) => { -// global.mermaidAPI.parseError(err, hash) -// } - - -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().pie; - }, - addSection: addSection, - getSections: getSections, - cleanupValue: cleanupValue, - clear: clear, - setTitle: setTitle, - getTitle: getTitle // parseError - -}); - -/***/ }), - -/***/ "./src/diagrams/pie/pieRenderer.js": -/*!*****************************************!*\ - !*** ./src/diagrams/pie/pieRenderer.js ***! - \*****************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieDb */ "./src/diagrams/pie/pieDb.js"); -/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/pie */ "./src/diagrams/pie/parser/pie.jison"); -/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/** - * Created by AshishJ on 11-09-2019. - */ - - - - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -/** - * Draws a Pie Chart with the data given in text. - * @param text - * @param id - */ - -var width; -var height = 450; -var draw = function draw(txt, id) { - try { - var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser; - parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"]; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering info diagram\n' + txt); // Parse the Pie Chart definition - - parser.yy.clear(); - parser.parse(txt); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Parsed info diagram'); - var elem = document.getElementById(id); - width = elem.parentElement.offsetWidth; - - if (typeof width === 'undefined') { - width = 1200; - } - - if (typeof conf.useWidth !== 'undefined') { - width = conf.useWidth; - } - - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); - Object(_utils__WEBPACK_IMPORTED_MODULE_4__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Set viewBox - - elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height); // Fetch the default direction, use TD if none was found - - var margin = 40; - var legendRectSize = 18; - var legendSpacing = 4; - var radius = Math.min(width, height) / 2 - margin; - var svg = diagram.append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')'); - var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"].getSections(); - var sum = 0; - Object.keys(data).forEach(function (key) { - sum += data[key]; - }); // Set the color scale - - var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]); // Compute the position of each group on the pie: - - var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__["pie"])().value(function (d) { - return d.value; - }); - var dataReady = pie(Object(d3__WEBPACK_IMPORTED_MODULE_0__["entries"])(data)); // Shape helper to build arcs: - - var arcGenerator = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().innerRadius(0).outerRadius(radius); // Build the pie chart: each part of the pie is a path that we build using the arc function. - - svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) { - return color(d.data.key); - }).attr('stroke', 'black').style('stroke-width', '2px').style('opacity', 0.7); // Now add the percentage. - // Use the centroid method to get the best coordinates. - - svg.selectAll('mySlices').data(dataReady.filter(function (value) { - return value.data.value !== 0; - })).enter().append('text').text(function (d) { - return (d.data.value / sum * 100).toFixed(0) + '%'; - }).attr('transform', function (d) { - return 'translate(' + arcGenerator.centroid(d) + ')'; - }).style('text-anchor', 'middle').attr('class', 'slice').style('font-size', 17); - svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(height - 50) / 2).attr('class', 'pieTitleText'); // Add the legends/annotations for each section - - var legend = svg.selectAll('.legend').data(color.domain()).enter().append('g').attr('class', 'legend').attr('transform', function (d, i) { - var height = legendRectSize + legendSpacing; - var offset = height * color.domain().length / 2; - var horz = 12 * legendRectSize; - var vert = i * height - offset; - return 'translate(' + horz + ',' + vert + ')'; - }); - legend.append('rect').attr('width', legendRectSize).attr('height', legendRectSize).style('fill', color).style('stroke', color); - legend.append('text').attr('x', legendRectSize + legendSpacing).attr('y', legendRectSize - legendSpacing).text(function (d) { - return d; - }); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering info diagram'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e); - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/pie/styles.js": -/*!************************************!*\ - !*** ./src/diagrams/pie/styles.js ***! - \************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return ".pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ".concat(options.taskTextDarkColor, ";\n font-family: ").concat(options.fontFamily, ";\n }\n .slice {\n font-family: ").concat(options.fontFamily, ";\n fill: ").concat(options.textColor, ";\n // fill: white;\n }\n .legend text {\n fill: ").concat(options.taskTextDarkColor, ";\n font-family: ").concat(options.fontFamily, ";\n font-size: 17px;\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/sequence/parser/sequenceDiagram.jison": -/*!************************************************************!*\ - !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,18],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,32],$Vi=[1,33],$Vj=[1,36],$Vk=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],$Vl=[1,44],$Vm=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],$Vn=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],$Vo=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],$Vp=[46,47,48],$Vq=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"SPACE":4,"NEWLINE":5,"directive":6,"SD":7,"document":8,"line":9,"statement":10,"openDirective":11,"typeDirective":12,"closeDirective":13,":":14,"argDirective":15,"participant":16,"actor":17,"AS":18,"restOfLine":19,"signal":20,"autonumber":21,"activate":22,"deactivate":23,"note_statement":24,"title":25,"text2":26,"loop":27,"end":28,"rect":29,"opt":30,"alt":31,"else_sections":32,"par":33,"par_sections":34,"and":35,"else":36,"note":37,"placement":38,"over":39,"actor_pair":40,"spaceList":41,",":42,"left_of":43,"right_of":44,"signaltype":45,"+":46,"-":47,"ACTOR":48,"SOLID_OPEN_ARROW":49,"DOTTED_OPEN_ARROW":50,"SOLID_ARROW":51,"DOTTED_ARROW":52,"SOLID_CROSS":53,"DOTTED_CROSS":54,"SOLID_POINT":55,"DOTTED_POINT":56,"TXT":57,"open_directive":58,"type_directive":59,"arg_directive":60,"close_directive":61,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"}, -productions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 4: - yy.apply($$[$0]);return $$[$0]; -break; -case 5: - this.$ = [] -break; -case 6: -$$[$0-1].push($$[$0]);this.$ = $$[$0-1] -break; -case 7: case 8: - this.$ = $$[$0] -break; -case 9: - this.$=[]; -break; -case 12: -$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3]; -break; -case 13: -this.$=$$[$0-1]; -break; -case 15: -yy.enableSequenceNumbers() -break; -case 16: -this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}; -break; -case 17: -this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]}; -break; -case 19: -this.$=[{type:'setTitle', text:$$[$0-1]}] -break; -case 20: - - $$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START}); - $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END}); - this.$=$$[$0-1]; -break; -case 21: - - $$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START }); - $$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END }); - this.$=$$[$0-1]; -break; -case 22: - - $$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START}); - $$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END}); - this.$=$$[$0-1]; -break; -case 23: - - // Alt start - $$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START}); - // Content in alt is already in $$[$0-1] - // End - $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END}); - this.$=$$[$0-1]; -break; -case 24: - - // Parallel start - $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START}); - // Content in par is already in $$[$0-1] - // End - $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); - this.$=$$[$0-1]; -break; -case 27: - this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); -break; -case 29: - this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); -break; -case 30: - - this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}]; -break; -case 31: - - // Coerce actor_pair into a [to, from, ...] array - $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2); - $$[$0-2][0] = $$[$0-2][0].actor; - $$[$0-2][1] = $$[$0-2][1].actor; - this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}]; -break; -case 34: - this.$ = [$$[$0-2], $$[$0]]; -break; -case 35: - this.$ = $$[$0]; -break; -case 36: - this.$ = yy.PLACEMENT.LEFTOF; -break; -case 37: - this.$ = yy.PLACEMENT.RIGHTOF; -break; -case 38: - this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, - {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]} - ] -break; -case 39: - this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, - {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]} - ] -break; -case 40: - this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}] -break; -case 41: -this.$={type: 'addActor', actor:$$[$0]} -break; -case 42: - this.$ = yy.LINETYPE.SOLID_OPEN; -break; -case 43: - this.$ = yy.LINETYPE.DOTTED_OPEN; -break; -case 44: - this.$ = yy.LINETYPE.SOLID; -break; -case 45: - this.$ = yy.LINETYPE.DOTTED; -break; -case 46: - this.$ = yy.LINETYPE.SOLID_CROSS; -break; -case 47: - this.$ = yy.LINETYPE.DOTTED_CROSS; -break; -case 48: - this.$ = yy.LINETYPE.SOLID_POINT; -break; -case 49: - this.$ = yy.LINETYPE.DOTTED_POINT; -break; -case 50: -this.$ = yy.parseMessage($$[$0].trim().substring(1)) -break; -case 51: - yy.parseDirective('%%{', 'open_directive'); -break; -case 52: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 53: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 54: - yy.parseDirective('}%%', 'close_directive', 'sequence'); -break; -} -}, -table: [{3:1,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},o([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],$V4,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{13:34,14:[1,35],61:$Vj},o([14,61],[2,52]),o($Vk,[2,6]),{6:30,10:37,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},o($Vk,[2,8]),o($Vk,[2,9]),{17:38,48:$Vi},{5:[1,39]},o($Vk,[2,15]),{17:40,48:$Vi},{17:41,48:$Vi},{5:[1,42]},{26:43,57:$Vl},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},o($Vk,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},o([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},o($Vk,[2,7]),{5:[1,67],18:[1,66]},o($Vk,[2,14]),{5:[1,68]},{5:[1,69]},o($Vk,[2,18]),{5:[1,70]},{5:[2,50]},o($Vm,$V4,{8:71}),o($Vm,$V4,{8:72}),o($Vm,$V4,{8:73}),o($Vn,$V4,{32:74,8:75}),o($Vo,$V4,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:$Vi},o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vp,[2,49]),{17:81,48:$Vi},{17:83,40:82,48:$Vi},{48:[2,36]},{48:[2,37]},o($Vq,[2,10]),{13:84,61:$Vj},{61:[2,53]},{19:[1,85]},o($Vk,[2,13]),o($Vk,[2,16]),o($Vk,[2,17]),o($Vk,[2,19]),{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,86],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,87],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,88],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{28:[1,89]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,28],29:$Vd,30:$Ve,31:$Vf,33:$Vg,36:[1,90],37:$Vh,48:$Vi,58:$V3},{28:[1,91]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,26],29:$Vd,30:$Ve,31:$Vf,33:$Vg,35:[1,92],37:$Vh,48:$Vi,58:$V3},{17:93,48:$Vi},{17:94,48:$Vi},{26:95,57:$Vl},{26:96,57:$Vl},{26:97,57:$Vl},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},o($Vk,[2,20]),o($Vk,[2,21]),o($Vk,[2,22]),o($Vk,[2,23]),{19:[1,101]},o($Vk,[2,24]),{19:[1,102]},{26:103,57:$Vl},{26:104,57:$Vl},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:$Vi},o($Vq,[2,11]),o($Vk,[2,12]),o($Vn,$V4,{8:75,32:106}),o($Vo,$V4,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}], -defaultActions: {7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 58; -break; -case 1: this.begin('type_directive'); return 59; -break; -case 2: this.popState(); this.begin('arg_directive'); return 14; -break; -case 3: this.popState(); this.popState(); return 61; -break; -case 4:return 60; -break; -case 5:return 5; -break; -case 6:/* skip all whitespace */ -break; -case 7:/* skip same-line whitespace */ -break; -case 8:/* skip comments */ -break; -case 9:/* skip comments */ -break; -case 10:/* skip comments */ -break; -case 11: this.begin('ID'); return 16; -break; -case 12: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 48; -break; -case 13: this.popState(); this.popState(); this.begin('LINE'); return 18; -break; -case 14: this.popState(); this.popState(); return 5; -break; -case 15: this.begin('LINE'); return 27; -break; -case 16: this.begin('LINE'); return 29; -break; -case 17: this.begin('LINE'); return 30; -break; -case 18: this.begin('LINE'); return 31; -break; -case 19: this.begin('LINE'); return 36; -break; -case 20: this.begin('LINE'); return 33; -break; -case 21: this.begin('LINE'); return 35; -break; -case 22: this.popState(); return 19; -break; -case 23:return 28; -break; -case 24:return 43; -break; -case 25:return 44; -break; -case 26:return 39; -break; -case 27:return 37; -break; -case 28: this.begin('ID'); return 22; -break; -case 29: this.begin('ID'); return 23; -break; -case 30:return 25; -break; -case 31:return 7; -break; -case 32:return 21; -break; -case 33:return 42; -break; -case 34:return 5; -break; -case 35: yy_.yytext = yy_.yytext.trim(); return 48; -break; -case 36:return 51; -break; -case 37:return 52; -break; -case 38:return 49; -break; -case 39:return 50; -break; -case 40:return 53; -break; -case 41:return 54; -break; -case 42:return 55; -break; -case 43:return 56; -break; -case 44:return 57; -break; -case 45:return 46; -break; -case 46:return 47; -break; -case 47:return 5; -break; -case 48:return 'INVALID'; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i], -conditions: {"open_directive":{"rules":[1,8],"inclusive":false},"type_directive":{"rules":[2,3,8],"inclusive":false},"arg_directive":{"rules":[3,4,8],"inclusive":false},"ID":{"rules":[7,8,12],"inclusive":false},"ALIAS":{"rules":[7,8,13,14],"inclusive":false},"LINE":{"rules":[7,8,22],"inclusive":false},"INITIAL":{"rules":[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/sequence/sequenceDb.js": -/*!*********************************************!*\ - !*** ./src/diagrams/sequence/sequenceDb.js ***! - \*********************************************/ -/*! exports provided: parseDirective, addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, getTitleWrapped, enableSequenceNumbers, showSequenceNumbers, setWrap, autoWrap, clear, parseMessage, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitleWrapped", function() { return getTitleWrapped; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableSequenceNumbers", function() { return enableSequenceNumbers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSequenceNumbers", function() { return showSequenceNumbers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWrap", function() { return setWrap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autoWrap", function() { return autoWrap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMessage", function() { return parseMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; }); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); - - - -var prevActor = undefined; -var actors = {}; -var messages = []; -var notes = []; -var title = ''; -var titleWrapped = false; -var sequenceNumbersEnabled = false; -var wrapEnabled = false; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__["default"].parseDirective(this, statement, context, type); -}; -var addActor = function addActor(id, name, description) { - // Don't allow description nulling - var old = actors[id]; - if (old && name === old.name && description == null) return; // Don't allow null descriptions, either - - if (description == null || description.text == null) { - description = { - text: name, - wrap: null - }; - } - - actors[id] = { - name: name, - description: description.text, - wrap: description.wrap === undefined && autoWrap() || !!description.wrap, - prevActor: prevActor - }; - - if (prevActor && actors[prevActor]) { - actors[prevActor].nextActor = id; - } - - prevActor = id; -}; - -var activationCount = function activationCount(part) { - var i; - var count = 0; - - for (i = 0; i < messages.length; i++) { - if (messages[i].type === LINETYPE.ACTIVE_START) { - if (messages[i].from.actor === part) { - count++; - } - } - - if (messages[i].type === LINETYPE.ACTIVE_END) { - if (messages[i].from.actor === part) { - count--; - } - } - } - - return count; -}; - -var addMessage = function addMessage(idFrom, idTo, message, answer) { - messages.push({ - from: idFrom, - to: idTo, - message: message.text, - wrap: message.wrap === undefined && autoWrap() || !!message.wrap, - answer: answer - }); -}; -var addSignal = function addSignal(idFrom, idTo) { - var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { - text: undefined, - wrap: undefined - }; - var messageType = arguments.length > 3 ? arguments[3] : undefined; - - if (messageType === LINETYPE.ACTIVE_END) { - var cnt = activationCount(idFrom.actor); - - if (cnt < 1) { - // Bail out as there is an activation signal from an inactive participant - var error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')'); - error.hash = { - text: '->>-', - token: '->>-', - line: '1', - loc: { - first_line: 1, - last_line: 1, - first_column: 1, - last_column: 1 - }, - expected: ["'ACTIVE_PARTICIPANT'"] - }; - throw error; - } - } - - messages.push({ - from: idFrom, - to: idTo, - message: message.text, - wrap: message.wrap === undefined && autoWrap() || !!message.wrap, - type: messageType - }); - return true; -}; -var getMessages = function getMessages() { - return messages; -}; -var getActors = function getActors() { - return actors; -}; -var getActor = function getActor(id) { - return actors[id]; -}; -var getActorKeys = function getActorKeys() { - return Object.keys(actors); -}; -var getTitle = function getTitle() { - return title; -}; -var getTitleWrapped = function getTitleWrapped() { - return titleWrapped; -}; -var enableSequenceNumbers = function enableSequenceNumbers() { - sequenceNumbersEnabled = true; -}; -var showSequenceNumbers = function showSequenceNumbers() { - return sequenceNumbersEnabled; -}; -var setWrap = function setWrap(wrapSetting) { - wrapEnabled = wrapSetting; -}; -var autoWrap = function autoWrap() { - return wrapEnabled; -}; -var clear = function clear() { - actors = {}; - messages = []; -}; -var parseMessage = function parseMessage(str) { - var _str = str.trim(); - - var message = { - text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(), - wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined - }; - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('parseMessage:', message); - return message; -}; -var LINETYPE = { - SOLID: 0, - DOTTED: 1, - NOTE: 2, - SOLID_CROSS: 3, - DOTTED_CROSS: 4, - SOLID_OPEN: 5, - DOTTED_OPEN: 6, - LOOP_START: 10, - LOOP_END: 11, - ALT_START: 12, - ALT_ELSE: 13, - ALT_END: 14, - OPT_START: 15, - OPT_END: 16, - ACTIVE_START: 17, - ACTIVE_END: 18, - PAR_START: 19, - PAR_AND: 20, - PAR_END: 21, - RECT_START: 22, - RECT_END: 23, - SOLID_POINT: 24, - DOTTED_POINT: 25 -}; -var ARROWTYPE = { - FILLED: 0, - OPEN: 1 -}; -var PLACEMENT = { - LEFTOF: 0, - RIGHTOF: 1, - OVER: 2 -}; -var addNote = function addNote(actor, placement, message) { - var note = { - actor: actor, - placement: placement, - message: message.text, - wrap: message.wrap === undefined && autoWrap() || !!message.wrap - }; // Coerce actor into a [to, from, ...] array - - var actors = [].concat(actor, actor); - notes.push(note); - messages.push({ - from: actors[0], - to: actors[1], - message: message.text, - wrap: message.wrap === undefined && autoWrap() || !!message.wrap, - type: LINETYPE.NOTE, - placement: placement - }); -}; -var setTitle = function setTitle(titleWrap) { - title = titleWrap.text; - titleWrapped = titleWrap.wrap === undefined && autoWrap() || !!titleWrap.wrap; -}; -var apply = function apply(param) { - if (param instanceof Array) { - param.forEach(function (item) { - apply(item); - }); - } else { - switch (param.type) { - case 'addActor': - addActor(param.actor, param.actor, param.description); - break; - - case 'activeStart': - addSignal(param.actor, undefined, undefined, param.signalType); - break; - - case 'activeEnd': - addSignal(param.actor, undefined, undefined, param.signalType); - break; - - case 'addNote': - addNote(param.actor, param.placement, param.text); - break; - - case 'addMessage': - addSignal(param.from, param.to, param.msg, param.signalType); - break; - - case 'loopStart': - addSignal(undefined, undefined, param.loopText, param.signalType); - break; - - case 'loopEnd': - addSignal(undefined, undefined, undefined, param.signalType); - break; - - case 'rectStart': - addSignal(undefined, undefined, param.color, param.signalType); - break; - - case 'rectEnd': - addSignal(undefined, undefined, undefined, param.signalType); - break; - - case 'optStart': - addSignal(undefined, undefined, param.optText, param.signalType); - break; - - case 'optEnd': - addSignal(undefined, undefined, undefined, param.signalType); - break; - - case 'altStart': - addSignal(undefined, undefined, param.altText, param.signalType); - break; - - case 'else': - addSignal(undefined, undefined, param.altText, param.signalType); - break; - - case 'altEnd': - addSignal(undefined, undefined, undefined, param.signalType); - break; - - case 'setTitle': - setTitle(param.text); - break; - - case 'parStart': - addSignal(undefined, undefined, param.parText, param.signalType); - break; - - case 'and': - addSignal(undefined, undefined, param.parText, param.signalType); - break; - - case 'parEnd': - addSignal(undefined, undefined, undefined, param.signalType); - break; - } - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - addActor: addActor, - addMessage: addMessage, - addSignal: addSignal, - autoWrap: autoWrap, - setWrap: setWrap, - enableSequenceNumbers: enableSequenceNumbers, - showSequenceNumbers: showSequenceNumbers, - getMessages: getMessages, - getActors: getActors, - getActor: getActor, - getActorKeys: getActorKeys, - getTitle: getTitle, - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_1__["getConfig"]().sequence; - }, - getTitleWrapped: getTitleWrapped, - clear: clear, - parseMessage: parseMessage, - LINETYPE: LINETYPE, - ARROWTYPE: ARROWTYPE, - PLACEMENT: PLACEMENT, - addNote: addNote, - setTitle: setTitle, - apply: apply -}); - -/***/ }), - -/***/ "./src/diagrams/sequence/sequenceRenderer.js": -/*!***************************************************!*\ - !*** ./src/diagrams/sequence/sequenceRenderer.js ***! - \***************************************************/ -/*! exports provided: bounds, drawActors, setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison"); -/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - - -_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_5__["default"]; -var conf = {}; -var bounds = { - data: { - startx: undefined, - stopx: undefined, - starty: undefined, - stopy: undefined - }, - verticalPos: 0, - sequenceItems: [], - activations: [], - models: { - getHeight: function getHeight() { - return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map(function (actor) { - return actor.height || 0; - })) + (this.loops.length === 0 ? 0 : this.loops.map(function (it) { - return it.height || 0; - }).reduce(function (acc, h) { - return acc + h; - })) + (this.messages.length === 0 ? 0 : this.messages.map(function (it) { - return it.height || 0; - }).reduce(function (acc, h) { - return acc + h; - })) + (this.notes.length === 0 ? 0 : this.notes.map(function (it) { - return it.height || 0; - }).reduce(function (acc, h) { - return acc + h; - })); - }, - clear: function clear() { - this.actors = []; - this.loops = []; - this.messages = []; - this.notes = []; - }, - addActor: function addActor(actorModel) { - this.actors.push(actorModel); - }, - addLoop: function addLoop(loopModel) { - this.loops.push(loopModel); - }, - addMessage: function addMessage(msgModel) { - this.messages.push(msgModel); - }, - addNote: function addNote(noteModel) { - this.notes.push(noteModel); - }, - lastActor: function lastActor() { - return this.actors[this.actors.length - 1]; - }, - lastLoop: function lastLoop() { - return this.loops[this.loops.length - 1]; - }, - lastMessage: function lastMessage() { - return this.messages[this.messages.length - 1]; - }, - lastNote: function lastNote() { - return this.notes[this.notes.length - 1]; - }, - actors: [], - loops: [], - messages: [], - notes: [] - }, - init: function init() { - this.sequenceItems = []; - this.activations = []; - this.models.clear(); - this.data = { - startx: undefined, - stopx: undefined, - starty: undefined, - stopy: undefined - }; - this.verticalPos = 0; - setConf(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getConfig()); - }, - updateVal: function updateVal(obj, key, val, fun) { - if (typeof obj[key] === 'undefined') { - obj[key] = val; - } else { - obj[key] = fun(val, obj[key]); - } - }, - updateBounds: function updateBounds(startx, starty, stopx, stopy) { - var _self = this; - - var cnt = 0; - - function updateFn(type) { - return function updateItemBounds(item) { - cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems - - var n = _self.sequenceItems.length - cnt + 1; - - _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min); - - _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max); - - _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min); - - _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max); - - if (!(type === 'activation')) { - _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min); - - _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max); - - _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min); - - _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max); - } - }; - } - - this.sequenceItems.forEach(updateFn()); - this.activations.forEach(updateFn('activation')); - }, - insert: function insert(startx, starty, stopx, stopy) { - var _startx = Math.min(startx, stopx); - - var _stopx = Math.max(startx, stopx); - - var _starty = Math.min(starty, stopy); - - var _stopy = Math.max(starty, stopy); - - this.updateVal(bounds.data, 'startx', _startx, Math.min); - this.updateVal(bounds.data, 'starty', _starty, Math.min); - this.updateVal(bounds.data, 'stopx', _stopx, Math.max); - this.updateVal(bounds.data, 'stopy', _stopy, Math.max); - this.updateBounds(_startx, _starty, _stopx, _stopy); - }, - newActivation: function newActivation(message, diagram, actors) { - var actorRect = actors[message.from.actor]; - var stackedSize = actorActivations(message.from.actor).length || 0; - var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; - this.activations.push({ - startx: x, - starty: this.verticalPos + 2, - stopx: x + conf.activationWidth, - stopy: undefined, - actor: message.from.actor, - anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram) - }); - }, - endActivation: function endActivation(message) { - // find most recent activation for given actor - var lastActorActivationIdx = this.activations.map(function (activation) { - return activation.actor; - }).lastIndexOf(message.from.actor); - return this.activations.splice(lastActorActivationIdx, 1)[0]; - }, - createLoop: function createLoop() { - var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - message: undefined, - wrap: false, - width: undefined - }; - var fill = arguments.length > 1 ? arguments[1] : undefined; - return { - startx: undefined, - starty: this.verticalPos, - stopx: undefined, - stopy: undefined, - title: title.message, - wrap: title.wrap, - width: title.width, - height: 0, - fill: fill - }; - }, - newLoop: function newLoop() { - var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - message: undefined, - wrap: false, - width: undefined - }; - var fill = arguments.length > 1 ? arguments[1] : undefined; - this.sequenceItems.push(this.createLoop(title, fill)); - }, - endLoop: function endLoop() { - return this.sequenceItems.pop(); - }, - addSectionToLoop: function addSectionToLoop(message) { - var loop = this.sequenceItems.pop(); - loop.sections = loop.sections || []; - loop.sectionTitles = loop.sectionTitles || []; - loop.sections.push({ - y: bounds.getVerticalPos(), - height: 0 - }); - loop.sectionTitles.push(message); - this.sequenceItems.push(loop); - }, - bumpVerticalPos: function bumpVerticalPos(bump) { - this.verticalPos = this.verticalPos + bump; - this.data.stopy = this.verticalPos; - }, - getVerticalPos: function getVerticalPos() { - return this.verticalPos; - }, - getBounds: function getBounds() { - return { - bounds: this.data, - models: this.models - }; - } -}; -/** - * Draws an note in the diagram with the attached line - * @param elem - The diagram to draw to. - * @param noteModel:{x: number, y: number, message: string, width: number} - startx: x axis start position, verticalPos: y axis position, messsage: the message to be shown, width: Set this with a custom width to override the default configured width. - */ - -var drawNote = function drawNote(elem, noteModel) { - bounds.bumpVerticalPos(conf.boxMargin); - noteModel.height = conf.boxMargin; - noteModel.starty = bounds.getVerticalPos(); - var rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect(); - rect.x = noteModel.startx; - rect.y = noteModel.starty; - rect.width = noteModel.width || conf.width; - rect.class = 'note'; - var g = elem.append('g'); - var rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect); - var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj(); - textObj.x = noteModel.startx; - textObj.y = noteModel.starty; - textObj.width = rect.width; - textObj.dy = '1em'; - textObj.text = noteModel.message; - textObj.class = 'noteText'; - textObj.fontFamily = conf.noteFontFamily; - textObj.fontSize = conf.noteFontSize; - textObj.fontWeight = conf.noteFontWeight; - textObj.anchor = conf.noteAlign; - textObj.textMargin = conf.noteMargin; - textObj.valign = conf.noteAlign; - var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj); - var textHeight = Math.round(textElem.map(function (te) { - return (te._groups || te)[0][0].getBBox().height; - }).reduce(function (acc, curr) { - return acc + curr; - })); - rectElem.attr('height', textHeight + 2 * conf.noteMargin); - noteModel.height += textHeight + 2 * conf.noteMargin; - bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); - noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; - noteModel.stopx = noteModel.startx + rect.width; - bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); - bounds.models.addNote(noteModel); -}; - -var messageFont = function messageFont(cnf) { - return { - fontFamily: cnf.messageFontFamily, - fontSize: cnf.messageFontSize, - fontWeight: cnf.messageFontWeight - }; -}; - -var noteFont = function noteFont(cnf) { - return { - fontFamily: cnf.noteFontFamily, - fontSize: cnf.noteFontSize, - fontWeight: cnf.noteFontWeight - }; -}; - -var actorFont = function actorFont(cnf) { - return { - fontFamily: cnf.actorFontFamily, - fontSize: cnf.actorFontSize, - fontWeight: cnf.actorFontWeight - }; -}; -/** - * Draws a message - * @param g - the parent of the message element - * @param msgModel - the model containing fields describing a message - */ - - -var drawMessage = function drawMessage(g, msgModel) { - bounds.bumpVerticalPos(10); - var startx = msgModel.startx, - stopx = msgModel.stopx, - starty = msgModel.starty, - message = msgModel.message, - type = msgModel.type, - sequenceIndex = msgModel.sequenceIndex; - var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].splitBreaks(message).length; - var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(message, messageFont(conf)); - var lineHeight = textDims.height / lines; - msgModel.height += lineHeight; - bounds.bumpVerticalPos(lineHeight); - var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj(); - textObj.x = startx; - textObj.y = starty + 10; - textObj.width = stopx - startx; - textObj.class = 'messageText'; - textObj.dy = '1em'; - textObj.text = message; - textObj.fontFamily = conf.messageFontFamily; - textObj.fontSize = conf.messageFontSize; - textObj.fontWeight = conf.messageFontWeight; - textObj.anchor = conf.messageAlign; - textObj.valign = conf.messageAlign; - textObj.textMargin = conf.wrapPadding; - textObj.tspan = false; - Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj); - var totalOffset = textDims.height - 10; - var textWidth = textDims.width; - var line, lineStarty; - - if (startx === stopx) { - lineStarty = bounds.getVerticalPos() + totalOffset; - - if (conf.rightAngles) { - line = g.append('path').attr('d', "M ".concat(startx, ",").concat(lineStarty, " H ").concat(startx + Math.max(conf.width / 2, textWidth / 2), " V ").concat(lineStarty + 25, " H ").concat(startx)); - } else { - totalOffset += conf.boxMargin; - lineStarty = bounds.getVerticalPos() + totalOffset; - line = g.append('path').attr('d', 'M ' + startx + ',' + lineStarty + ' C ' + (startx + 60) + ',' + (lineStarty - 10) + ' ' + (startx + 60) + ',' + (lineStarty + 30) + ' ' + startx + ',' + (lineStarty + 20)); - } - - totalOffset += 30; - var dx = Math.max(textWidth / 2, conf.width / 2); - bounds.insert(startx - dx, bounds.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds.getVerticalPos() + 30 + totalOffset); - } else { - totalOffset += conf.boxMargin; - lineStarty = bounds.getVerticalPos() + totalOffset; - line = g.append('line'); - line.attr('x1', startx); - line.attr('y1', lineStarty); - line.attr('x2', stopx); - line.attr('y2', lineStarty); - bounds.insert(startx, lineStarty - 10, stopx, lineStarty); - } // Make an SVG Container - // Draw the line - - - if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) { - line.style('stroke-dasharray', '3, 3'); - line.attr('class', 'messageLine1'); - } else { - line.attr('class', 'messageLine0'); - } - - var url = ''; - - if (conf.arrowMarkerAbsolute) { - url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } - - line.attr('stroke-width', 2); - line.attr('stroke', 'none'); // handled by theme/css anyway - - line.style('fill', 'none'); // remove any fill colour - - if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) { - line.attr('marker-end', 'url(' + url + '#arrowhead)'); - } - - if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT) { - line.attr('marker-end', 'url(' + url + '#filled-head)'); - } - - if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) { - line.attr('marker-end', 'url(' + url + '#crosshead)'); - } // add node number - - - if (_sequenceDb__WEBPACK_IMPORTED_MODULE_5__["default"].showSequenceNumbers() || conf.showSequenceNumbers) { - line.attr('marker-start', 'url(' + url + '#sequencenumber)'); - g.append('text').attr('x', startx).attr('y', lineStarty + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex); - } - - bounds.bumpVerticalPos(totalOffset); - msgModel.height += totalOffset; - msgModel.stopy = msgModel.starty + msgModel.height; - bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); -}; - -var drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) { - // Draw the actors - var prevWidth = 0; - var prevMargin = 0; - - for (var i = 0; i < actorKeys.length; i++) { - var actor = actors[actorKeys[i]]; // Add some rendering data to the object - - actor.width = actor.width || conf.width; - actor.height = Math.max(actor.height || conf.height, conf.height); - actor.margin = actor.margin || conf.actorMargin; - actor.x = prevWidth + prevMargin; - actor.y = verticalPos; // Draw the box with the attached line - - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actor, conf); - bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); - prevWidth += actor.width; - prevMargin += actor.margin; - bounds.models.addActor(actor); - } // Add a margin between the actor boxes and the first arrow - - - bounds.bumpVerticalPos(conf.height); -}; -var setConf = function setConf(cnf) { - Object(_utils__WEBPACK_IMPORTED_MODULE_7__["assignWithDepth"])(conf, cnf); - - if (cnf.fontFamily) { - conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; - } - - if (cnf.fontSize) { - conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; - } - - if (cnf.fontWeight) { - conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; - } -}; - -var actorActivations = function actorActivations(actor) { - return bounds.activations.filter(function (activation) { - return activation.actor === actor; - }); -}; - -var activationBounds = function activationBounds(actor, actors) { - // handle multiple stacked activations for same actor - var actorObj = actors[actor]; - var activations = actorActivations(actor); - var left = activations.reduce(function (acc, activation) { - return Math.min(acc, activation.startx); - }, actorObj.x + actorObj.width / 2); - var right = activations.reduce(function (acc, activation) { - return Math.max(acc, activation.stopx); - }, actorObj.x + actorObj.width / 2); - return [left, right]; -}; - -function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { - bounds.bumpVerticalPos(preMargin); - var heightAdjust = postMargin; - - if (msg.id && msg.message && loopWidths[msg.id]) { - var loopWidth = loopWidths[msg.id].width; - var textConf = messageFont(conf); - msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel("[".concat(msg.message, "]"), loopWidth - 2 * conf.wrapPadding, textConf); - msg.width = loopWidth; - msg.wrap = true; // const lines = common.splitBreaks(msg.message).length; - - var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, textConf); - var totalOffset = Math.max(textDims.height, conf.labelBoxHeight); - heightAdjust = postMargin + totalOffset; - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("".concat(totalOffset, " - ").concat(msg.message)); - } - - addLoopFn(msg); - bounds.bumpVerticalPos(heightAdjust); -} -/** - * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - - -var draw = function draw(text, id) { - conf = _config__WEBPACK_IMPORTED_MODULE_6__["getConfig"]().sequence; - _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear(); - _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.setWrap(conf.wrap); - _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n'); - bounds.init(); - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("C:".concat(JSON.stringify(conf, null, 2))); - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); // Fetch data from the parsing - - var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors(); - var actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys(); - var messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages(); - var title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle(); - var maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages); - conf.height = calculateActorMargins(actors, maxMessageWidthPerActor); - drawActors(diagram, actors, actorKeys, 0); - var loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor); // The arrow head definition is attached to the svg once - - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowFilledHead(diagram); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram); - - function activeEnd(msg, verticalPos) { - var activationData = bounds.endActivation(msg); - - if (activationData.starty + 18 > verticalPos) { - activationData.starty = verticalPos - 6; - verticalPos += 12; - } - - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length); - bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); - } // Draw the messages/signals - - - var sequenceIndex = 1; - messages.forEach(function (msg) { - var loopModel, noteModel, msgModel; - - switch (msg.type) { - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE: - noteModel = msg.noteModel; - drawNote(diagram, noteModel); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START: - bounds.newActivation(msg, diagram, actors); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END: - activeEnd(msg, bounds.getVerticalPos()); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { - return bounds.newLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END: - loopModel = bounds.endLoop(); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'loop', conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_START: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, function (message) { - return bounds.newLoop(undefined, message.message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_END: - loopModel = bounds.endLoop(); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawBackgroundRect(diagram, loopModel); - bounds.models.addLoop(loopModel); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { - return bounds.newLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END: - loopModel = bounds.endLoop(); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'opt', conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { - return bounds.newLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) { - return bounds.addSectionToLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END: - loopModel = bounds.endLoop(); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'alt', conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { - return bounds.newLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND: - adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) { - return bounds.addSectionToLoop(message); - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END: - loopModel = bounds.endLoop(); - _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'par', conf); - bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); - bounds.models.addLoop(loopModel); - break; - - default: - try { - // lastMsg = msg - msgModel = msg.msgModel; - msgModel.starty = bounds.getVerticalPos(); - msgModel.sequenceIndex = sequenceIndex; - drawMessage(diagram, msgModel); - bounds.models.addMessage(msgModel); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].error('error while drawing message', e); - } - - } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc) - - - if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) { - sequenceIndex++; - } - }); - - if (conf.mirrorActors) { - // Draw actors below diagram - bounds.bumpVerticalPos(conf.boxMargin * 2); - drawActors(diagram, actors, actorKeys, bounds.getVerticalPos()); - } - - var _bounds$getBounds = bounds.getBounds(), - box = _bounds$getBounds.bounds; // Adjust line height of actor lines now that the height of the diagram is known - - - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('For line height fix Querying: #' + id + ' .actor-line'); - var actorLines = Object(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('#' + id + ' .actor-line'); - actorLines.attr('y2', box.stopy); - var height = box.stopy - box.starty + 2 * conf.diagramMarginY; - - if (conf.mirrorActors) { - height = height - conf.boxMargin + conf.bottomMarginAdj; - } - - var width = box.stopx - box.startx + 2 * conf.diagramMarginX; - - if (title) { - diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25); - } - - Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); - var extraVertForTitle = title ? 40 : 0; - diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle)); - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("models:", bounds.models); -}; -/** - * Retrieves the max message width of each actor, supports signals (messages, loops) - * and notes. - * - * It will enumerate each given message, and will determine its text width, in relation - * to the actor it originates from, and destined to. - * - * @param actors - The actors map - * @param messages - A list of message objects to iterate - */ - -var getMaxMessageWidthPerActor = function getMaxMessageWidthPerActor(actors, messages) { - var maxMessageWidthPerActor = {}; - messages.forEach(function (msg) { - if (actors[msg.to] && actors[msg.from]) { - var actor = actors[msg.to]; // If this is the first actor, and the message is left of it, no need to calculate the margin - - if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF && !actor.prevActor) { - return; - } // If this is the last actor, and the message is right of it, no need to calculate the margin - - - if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF && !actor.nextActor) { - return; - } - - var isNote = msg.placement !== undefined; - var isMessage = !isNote; - var textFont = isNote ? noteFont(conf) : messageFont(conf); - var wrappedMessage = msg.wrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; - var messageDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(wrappedMessage, textFont); - var messageWidth = messageDimensions.width + 2 * conf.wrapPadding; - /* - * The following scenarios should be supported: - * - * - There's a message (non-note) between fromActor and toActor - * - If fromActor is on the right and toActor is on the left, we should - * define the toActor's margin - * - If fromActor is on the left and toActor is on the right, we should - * define the fromActor's margin - * - There's a note, in which case fromActor == toActor - * - If the note is to the left of the actor, we should define the previous actor - * margin - * - If the note is on the actor, we should define both the previous and next actor - * margins, each being the half of the note size - * - If the note is on the right of the actor, we should define the current actor - * margin - */ - - if (isMessage && msg.from === actor.nextActor) { - maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth); - } else if (isMessage && msg.from === actor.prevActor) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); - } else if (isMessage && msg.from === msg.to) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); - maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth / 2); - } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); - } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) { - maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth); - } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.OVER) { - if (actor.prevActor) { - maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth / 2); - } - - if (actor.nextActor) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); - } - } - } - }); - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('maxMessageWidthPerActor:', maxMessageWidthPerActor); - return maxMessageWidthPerActor; -}; -/** - * This will calculate the optimal margin for each given actor, for a given - * actor->messageWidth map. - * - * An actor's margin is determined by the width of the actor, the width of the - * largest message that originates from it, and the configured conf.actorMargin. - * - * @param actors - The actors map to calculate margins for - * @param actorToMessageWidth - A map of actor key -> max message width it holds - */ - - -var calculateActorMargins = function calculateActorMargins(actors, actorToMessageWidth) { - var maxHeight = 0; - Object.keys(actors).forEach(function (prop) { - var actor = actors[prop]; - - if (actor.wrap) { - actor.description = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(actor.description, conf.width - 2 * conf.wrapPadding, actorFont(conf)); - } - - var actDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(actor.description, actorFont(conf)); - actor.width = actor.wrap ? conf.width : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding); - actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height; - maxHeight = Math.max(maxHeight, actor.height); - }); - - for (var actorKey in actorToMessageWidth) { - var actor = actors[actorKey]; - - if (!actor) { - continue; - } - - var nextActor = actors[actor.nextActor]; // No need to space out an actor that doesn't have a next link - - if (!nextActor) { - continue; - } - - var messageWidth = actorToMessageWidth[actorKey]; - var actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; - actor.margin = Math.max(actorWidth, conf.actorMargin); - } - - return Math.max(maxHeight, conf.height); -}; - -var buildNoteModel = function buildNoteModel(msg, actors) { - var startx = actors[msg.from].x; - var stopx = actors[msg.to].x; - var shouldWrap = msg.wrap && msg.message; - var textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, noteFont(conf)); - var noteModel = { - width: shouldWrap ? conf.width : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin), - height: 0, - startx: actors[msg.from].x, - stopx: 0, - starty: 0, - stopy: 0, - message: msg.message - }; - - if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) { - noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin); - noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2; - } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) { - noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin); - noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2; - } else if (msg.to === msg.from) { - textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(conf.width, actors[msg.from].width), noteFont(conf)) : msg.message, noteFont(conf)); - noteModel.width = shouldWrap ? Math.max(conf.width, actors[msg.from].width) : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin); - noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2; - } else { - noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin; - noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2; - } - - if (shouldWrap) { - noteModel.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, noteModel.width - 2 * conf.wrapPadding, noteFont(conf)); - } - - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("NM:[".concat(noteModel.startx, ",").concat(noteModel.stopx, ",").concat(noteModel.starty, ",").concat(noteModel.stopy, ":").concat(noteModel.width, ",").concat(noteModel.height, "=").concat(msg.message, "]")); - return noteModel; -}; - -var buildMessageModel = function buildMessageModel(msg, actors) { - var process = false; - - if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) { - process = true; - } - - if (!process) { - return {}; - } - - var fromBounds = activationBounds(msg.from, actors); - var toBounds = activationBounds(msg.to, actors); - var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0; - var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1; - var allBounds = fromBounds.concat(toBounds); - var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]); - - if (msg.wrap && msg.message) { - msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf)); - } - - var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf)); - return { - width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width), - height: 0, - startx: fromBounds[fromIdx], - stopx: toBounds[toIdx], - starty: 0, - stopy: 0, - message: msg.message, - type: msg.type, - wrap: msg.wrap, - fromBounds: Math.min.apply(null, allBounds), - toBounds: Math.max.apply(null, allBounds) - }; -}; - -var calculateLoopBounds = function calculateLoopBounds(messages, actors) { - var loops = {}; - var stack = []; - var current, noteModel, msgModel; - messages.forEach(function (msg) { - msg.id = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].random({ - length: 10 - }); - - switch (msg.type) { - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START: - stack.push({ - id: msg.id, - msg: msg.message, - from: Number.MAX_SAFE_INTEGER, - to: Number.MIN_SAFE_INTEGER, - width: 0 - }); - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND: - if (msg.message) { - current = stack.pop(); - loops[current.id] = current; - loops[msg.id] = current; - stack.push(current); - } - - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END: - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END: - current = stack.pop(); - loops[current.id] = current; - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START: - { - var actorRect = actors[msg.from ? msg.from.actor : msg.to.actor]; - var stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; - var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; - var toAdd = { - startx: x, - stopx: x + conf.activationWidth, - actor: msg.from.actor, - enabled: true - }; - bounds.activations.push(toAdd); - } - break; - - case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END: - { - var lastActorActivationIdx = bounds.activations.map(function (a) { - return a.actor; - }).lastIndexOf(msg.from.actor); - delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; - } - break; - } - - var isNote = msg.placement !== undefined; - - if (isNote) { - noteModel = buildNoteModel(msg, actors); - msg.noteModel = noteModel; - stack.forEach(function (stk) { - current = stk; - current.from = Math.min(current.from, noteModel.startx); - current.to = Math.max(current.to, noteModel.startx + noteModel.width); - current.width = Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; - }); - } else { - msgModel = buildMessageModel(msg, actors); - msg.msgModel = msgModel; - - if (msgModel.startx && msgModel.stopx && stack.length > 0) { - stack.forEach(function (stk) { - current = stk; - - if (msgModel.startx === msgModel.stopx) { - var from = actors[msg.from]; - var to = actors[msg.to]; - current.from = Math.min(from.x - msgModel.width / 2, from.x - from.width / 2, current.from); - current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to); - current.width = Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; - } else { - current.from = Math.min(msgModel.startx, current.from); - current.to = Math.max(msgModel.stopx, current.to); - current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth; - } - }); - } - } - }); - bounds.activations = []; - _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('Loop type widths:', loops); - return loops; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - bounds: bounds, - drawActors: drawActors, - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/sequence/styles.js": -/*!*****************************************!*\ - !*** ./src/diagrams/sequence/styles.js ***! - \*****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return ".actor {\n stroke: ".concat(options.actorBorder, ";\n fill: ").concat(options.actorBkg, ";\n }\n\n text.actor > tspan {\n fill: ").concat(options.actorTextColor, ";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(options.actorLineColor, ";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.signalColor, ";\n }\n\n #arrowhead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .sequenceNumber {\n fill: ").concat(options.sequenceNumberColor, ";\n }\n\n #sequencenumber {\n fill: ").concat(options.signalColor, ";\n }\n\n #crosshead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageText {\n fill: ").concat(options.signalTextColor, ";\n stroke: ").concat(options.signalTextColor, ";\n }\n\n .labelBox {\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBkgColor, ";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(options.labelTextColor, ";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(options.loopTextColor, ";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBorderColor, ";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(options.noteTextColor, ";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation1 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation2 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/sequence/svgDraw.js": -/*!******************************************!*\ - !*** ./src/diagrams/sequence/svgDraw.js ***! - \******************************************/ -/*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertArrowHead, insertArrowFilledHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowFilledHead", function() { return insertArrowFilledHead; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); - -var drawRect = function drawRect(elem, rectData) { - var rectElem = elem.append('rect'); - rectElem.attr('x', rectData.x); - rectElem.attr('y', rectData.y); - rectElem.attr('fill', rectData.fill); - rectElem.attr('stroke', rectData.stroke); - rectElem.attr('width', rectData.width); - rectElem.attr('height', rectData.height); - rectElem.attr('rx', rectData.rx); - rectElem.attr('ry', rectData.ry); - - if (typeof rectData.class !== 'undefined') { - rectElem.attr('class', rectData.class); - } - - return rectElem; -}; -var drawText = function drawText(elem, textData) { - var prevTextHeight = 0, - textHeight = 0; - var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex); - var textElems = []; - var dy = 0; - - var yfunc = function yfunc() { - return textData.y; - }; - - if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) { - switch (textData.valign) { - case 'top': - case 'start': - yfunc = function yfunc() { - return Math.round(textData.y + textData.textMargin); - }; - - break; - - case 'middle': - case 'center': - yfunc = function yfunc() { - return Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); - }; - - break; - - case 'bottom': - case 'end': - yfunc = function yfunc() { - return Math.round(textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin); - }; - - break; - } - } - - if (typeof textData.anchor !== 'undefined' && typeof textData.textMargin !== 'undefined' && typeof textData.width !== 'undefined') { - switch (textData.anchor) { - case 'left': - case 'start': - textData.x = Math.round(textData.x + textData.textMargin); - textData.anchor = 'start'; - textData.dominantBaseline = 'text-after-edge'; - textData.alignmentBaseline = 'middle'; - break; - - case 'middle': - case 'center': - textData.x = Math.round(textData.x + textData.width / 2); - textData.anchor = 'middle'; - textData.dominantBaseline = 'middle'; - textData.alignmentBaseline = 'middle'; - break; - - case 'right': - case 'end': - textData.x = Math.round(textData.x + textData.width - textData.textMargin); - textData.anchor = 'end'; - textData.dominantBaseline = 'text-before-edge'; - textData.alignmentBaseline = 'middle'; - break; - } - } - - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - - if (typeof textData.textMargin !== 'undefined' && textData.textMargin === 0 && typeof textData.fontSize !== 'undefined') { - dy = i * textData.fontSize; - } - - var textElem = elem.append('text'); - textElem.attr('x', textData.x); - textElem.attr('y', yfunc()); - - if (typeof textData.anchor !== 'undefined') { - textElem.attr('text-anchor', textData.anchor).attr('dominant-baseline', textData.dominantBaseline).attr('alignment-baseline', textData.alignmentBaseline); - } - - if (typeof textData.fontFamily !== 'undefined') { - textElem.style('font-family', textData.fontFamily); - } - - if (typeof textData.fontSize !== 'undefined') { - textElem.style('font-size', textData.fontSize); - } - - if (typeof textData.fontWeight !== 'undefined') { - textElem.style('font-weight', textData.fontWeight); - } - - if (typeof textData.fill !== 'undefined') { - textElem.attr('fill', textData.fill); - } - - if (typeof textData.class !== 'undefined') { - textElem.attr('class', textData.class); - } - - if (typeof textData.dy !== 'undefined') { - textElem.attr('dy', textData.dy); - } else if (dy !== 0) { - textElem.attr('dy', dy); - } - - if (textData.tspan) { - var span = textElem.append('tspan'); - span.attr('x', textData.x); - - if (typeof textData.fill !== 'undefined') { - span.attr('fill', textData.fill); - } - - span.text(line); - } else { - textElem.text(line); - } - - if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) { - textHeight += (textElem._groups || textElem)[0][0].getBBox().height; - prevTextHeight = textHeight; - } - - textElems.push(textElem); - } - - return textElems; -}; -var drawLabel = function drawLabel(elem, txtObject) { - function genPoints(x, y, width, height, cut) { - return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height); - } - - var polygon = elem.append('polygon'); - polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); - polygon.attr('class', 'labelBox'); - txtObject.y = txtObject.y + txtObject.height / 2; - drawText(elem, txtObject); - return polygon; -}; -var actorCnt = -1; -/** - * Draws an actor in the diagram with the attached line - * @param elem - The diagram we'll draw to. - * @param actor - The actor to draw. - * @param conf - drawText implementation discriminator object - */ - -var drawActor = function drawActor(elem, actor, conf) { - var center = actor.x + actor.width / 2; - var g = elem.append('g'); - - if (actor.y === 0) { - actorCnt++; - g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999'); - } - - var rect = getNoteRect(); - rect.x = actor.x; - rect.y = actor.y; - rect.fill = '#eaeaea'; - rect.width = actor.width; - rect.height = actor.height; - rect.class = 'actor'; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - - _drawTextCandidateFunc(conf)(actor.description, g, rect.x, rect.y, rect.width, rect.height, { - class: 'actor' - }, conf); -}; -var anchorElement = function anchorElement(elem) { - return elem.append('g'); -}; -/** - * Draws an activation in the diagram - * @param elem - element to append activation rect. - * @param bounds - activation box bounds. - * @param verticalPos - precise y cooridnate of bottom activation box edge. - * @param conf - sequence diagram config object. - * @param actorActivations - number of activations on the actor. - */ - -var drawActivation = function drawActivation(elem, bounds, verticalPos, conf, actorActivations) { - var rect = getNoteRect(); - var g = bounds.anchored; - rect.x = bounds.startx; - rect.y = bounds.starty; - rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2 - - rect.width = bounds.stopx - bounds.startx; - rect.height = verticalPos - bounds.starty; - drawRect(g, rect); -}; -/** - * Draws a loop in the diagram - * @param elem - elemenet to append the loop to. - * @param loopModel - loopModel of the given loop. - * @param labelText - Text within the loop. - * @param conf - diagrom configuration - */ - -var drawLoop = function drawLoop(elem, loopModel, labelText, conf) { - var boxMargin = conf.boxMargin, - boxTextMargin = conf.boxTextMargin, - labelBoxHeight = conf.labelBoxHeight, - labelBoxWidth = conf.labelBoxWidth, - fontFamily = conf.messageFontFamily, - fontSize = conf.messageFontSize, - fontWeight = conf.messageFontWeight; - var g = elem.append('g'); - - var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) { - return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine'); - }; - - drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); - drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); - drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); - drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); - - if (typeof loopModel.sections !== 'undefined') { - loopModel.sections.forEach(function (item) { - drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style('stroke-dasharray', '3, 3'); - }); - } - - var txt = getTextObj(); - txt.text = labelText; - txt.x = loopModel.startx; - txt.y = loopModel.starty; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.anchor = 'middle'; - txt.valign = 'middle'; - txt.tspan = false; - txt.width = labelBoxWidth || 50; - txt.height = labelBoxHeight || 20; - txt.textMargin = boxTextMargin; - txt.class = 'labelText'; - drawLabel(g, txt); - txt = getTextObj(); - txt.text = loopModel.title; - txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; - txt.y = loopModel.starty + boxMargin + boxTextMargin; - txt.anchor = 'middle'; - txt.valign = 'middle'; - txt.textMargin = boxTextMargin; - txt.class = 'loopText'; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.wrap = true; - var textElem = drawText(g, txt); - - if (typeof loopModel.sectionTitles !== 'undefined') { - loopModel.sectionTitles.forEach(function (item, idx) { - if (item.message) { - txt.text = item.message; - txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; - txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; - txt.class = 'loopText'; - txt.anchor = 'middle'; - txt.valign = 'middle'; - txt.tspan = false; - txt.fontFamily = fontFamily; - txt.fontSize = fontSize; - txt.fontWeight = fontWeight; - txt.wrap = loopModel.wrap; - textElem = drawText(g, txt); - var sectionHeight = Math.round(textElem.map(function (te) { - return (te._groups || te)[0][0].getBBox().height; - }).reduce(function (acc, curr) { - return acc + curr; - })); - loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); - } - }); - } - - loopModel.height = Math.round(loopModel.stopy - loopModel.starty); - return g; -}; -/** - * Draws a background rectangle - * @param elem diagram (reference for bounds) - * @param bounds shape of the rectangle - */ - -var drawBackgroundRect = function drawBackgroundRect(elem, bounds) { - var rectElem = drawRect(elem, { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - class: 'rect' - }); - rectElem.lower(); -}; -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - -var insertArrowHead = function insertArrowHead(elem) { - elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead -}; -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - -var insertArrowFilledHead = function insertArrowFilledHead(elem) { - elem.append('defs').append('marker').attr('id', 'filled-head').attr('refX', 18).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); -}; -/** - * Setup node number. The result is appended to the svg. - */ - -var insertSequenceNumber = function insertSequenceNumber(elem) { - elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style("fill", '#f00'); -}; -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - -var insertArrowCrossHead = function insertArrowCrossHead(elem) { - var defs = elem.append('defs'); - var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow - - marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross - - marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead -}; -var getTextObj = function getTextObj() { - return { - x: 0, - y: 0, - fill: undefined, - anchor: undefined, - style: '#666', - width: undefined, - height: undefined, - textMargin: 0, - rx: 0, - ry: 0, - tspan: true, - valign: undefined - }; -}; -var getNoteRect = function getNoteRect() { - return { - x: 0, - y: 0, - fill: '#EDF2AE', - stroke: '#666', - width: 100, - anchor: 'start', - height: 100, - rx: 0, - ry: 0 - }; -}; - -var _drawTextCandidateFunc = function () { - function byText(content, g, x, y, width, height, textAttrs) { - var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content); - - _setTextAttrs(text, textAttrs); - } - - function byTspan(content, g, x, y, width, height, textAttrs, conf) { - var actorFontSize = conf.actorFontSize, - actorFontFamily = conf.actorFontFamily, - actorFontWeight = conf.actorFontWeight; - var lines = content.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex); - - for (var i = 0; i < lines.length; i++) { - var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; - var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-weight', actorFontWeight).style('font-family', actorFontFamily); - text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]); - text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central'); - - _setTextAttrs(text, textAttrs); - } - } - - function byFo(content, g, x, y, width, height, textAttrs, conf) { - var s = g.append('switch'); - var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height); - var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%'); - text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content); - byTspan(content, s, x, y, width, height, textAttrs, conf); - - _setTextAttrs(text, textAttrs); - } - - function _setTextAttrs(toText, fromTextAttrsDict) { - for (var key in fromTextAttrsDict) { - if (fromTextAttrsDict.hasOwnProperty(key)) { - // eslint-disable-line - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - - return function (conf) { - return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan; - }; -}(); - -/* harmony default export */ __webpack_exports__["default"] = ({ - drawRect: drawRect, - drawText: drawText, - drawLabel: drawLabel, - drawActor: drawActor, - anchorElement: anchorElement, - drawActivation: drawActivation, - drawLoop: drawLoop, - drawBackgroundRect: drawBackgroundRect, - insertArrowHead: insertArrowHead, - insertArrowFilledHead: insertArrowFilledHead, - insertSequenceNumber: insertSequenceNumber, - insertArrowCrossHead: insertArrowCrossHead, - getTextObj: getTextObj, - getNoteRect: getNoteRect -}); - -/***/ }), - -/***/ "./src/diagrams/state/id-cache.js": -/*!****************************************!*\ - !*** ./src/diagrams/state/id-cache.js ***! - \****************************************/ -/*! exports provided: set, get, keys, size, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "size", function() { return size; }); -var idCache = {}; -var set = function set(key, val) { - idCache[key] = val; -}; -var get = function get(k) { - return idCache[k]; -}; -var keys = function keys() { - return Object.keys(idCache); -}; -var size = function size() { - return keys().length; -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - get: get, - set: set, - keys: keys, - size: size -}); - -/***/ }), - -/***/ "./src/diagrams/state/parser/stateDiagram.jison": -/*!******************************************************!*\ - !*** ./src/diagrams/state/parser/stateDiagram.jison ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,19],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,28],$Vc=[1,23],$Vd=[1,24],$Ve=[1,25],$Vf=[1,26],$Vg=[1,29],$Vh=[1,32],$Vi=[1,4,5,14,15,17,19,20,22,23,24,25,26,36,39],$Vj=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,36,39],$Vk=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,36,39],$Vl=[4,5,14,15,17,19,20,22,23,24,25,26,36,39]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"directive":6,"SD":7,"document":8,"line":9,"statement":10,"idStatement":11,"DESCR":12,"-->":13,"HIDE_EMPTY":14,"scale":15,"WIDTH":16,"COMPOSIT_STATE":17,"STRUCT_START":18,"STRUCT_STOP":19,"STATE_DESCR":20,"AS":21,"ID":22,"FORK":23,"JOIN":24,"CONCURRENT":25,"note":26,"notePosition":27,"NOTE_TEXT":28,"openDirective":29,"typeDirective":30,"closeDirective":31,":":32,"argDirective":33,"eol":34,";":35,"EDGE_STATE":36,"left_of":37,"right_of":38,"open_directive":39,"type_directive":40,"arg_directive":41,"close_directive":42,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"-->",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CONCURRENT",26:"note",28:"NOTE_TEXT",32:":",35:";",36:"EDGE_STATE",37:"left_of",38:"right_of",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"}, -productions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[6,3],[6,5],[34,1],[34,1],[11,1],[11,1],[27,1],[27,1],[29,1],[30,1],[33,1],[31,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 4: - /*console.warn('Root document', $$[$0]);*/ yy.setRootDoc($$[$0]);return $$[$0]; -break; -case 5: - this.$ = [] -break; -case 6: - - if($$[$0]!='nl'){ - $$[$0-1].push($$[$0]);this.$ = $$[$0-1] - } - // console.warn('Got document',$$[$0-1], $$[$0]); - -break; -case 7: case 8: - this.$ = $$[$0] -break; -case 9: - this.$='nl'; -break; -case 10: - /*console.warn('got id and descr', $$[$0]);*/this.$={ stmt: 'state', id: $$[$0], type: 'default', description: ''}; -break; -case 11: - /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: yy.trimColon($$[$0])}; -break; -case 12: - - /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/ - this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}}; - -break; -case 13: - - /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/ - this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()}; - -break; -case 17: - - - /* console.warn('Adding document for state without id ', $$[$0-3]);*/ - this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] } - -break; -case 18: - - var id=$$[$0]; - var description = $$[$0-2].trim(); - if($$[$0].match(':')){ - var parts = $$[$0].split(':'); - id=parts[0]; - description = [description, parts[1]]; - } - this.$={stmt: 'state', id: id, type: 'default', description: description}; - - -break; -case 19: - - //console.warn('Adding document for state with id ', $$[$0-3], $$[$0-2]); yy.addDocument($$[$0-3]); - this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] } - -break; -case 20: - - this.$={ stmt: 'state', id: $$[$0], type: 'fork' } - -break; -case 21: - - this.$={ stmt: 'state', id: $$[$0], type: 'join' } - -break; -case 22: - - this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' } - -break; -case 23: - - /*console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/ - this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}}; - -break; -case 30: case 31: -this.$=$$[$0]; -break; -case 34: - yy.parseDirective('%%{', 'open_directive'); -break; -case 35: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 36: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 37: - yy.parseDirective('}%%', 'close_directive', 'state'); -break; -} -}, -table: [{3:1,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},o([1,4,5,14,15,17,20,22,23,24,25,26,36,39],$V4,{8:11}),{30:12,40:[1,13]},{40:[2,34]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},{31:30,32:[1,31],42:$Vh},o([32,42],[2,35]),o($Vi,[2,6]),{6:27,10:33,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,8]),o($Vi,[2,9]),o($Vi,[2,10],{12:[1,34],13:[1,35]}),o($Vi,[2,14]),{16:[1,36]},o($Vi,[2,16],{18:[1,37]}),{21:[1,38]},o($Vi,[2,20]),o($Vi,[2,21]),o($Vi,[2,22]),{27:39,28:[1,40],37:[1,41],38:[1,42]},o($Vi,[2,25]),o($Vj,[2,30]),o($Vj,[2,31]),o($Vk,[2,26]),{33:43,41:[1,44]},o($Vk,[2,37]),o($Vi,[2,7]),o($Vi,[2,11]),{11:45,22:$Vb,36:$Vg},o($Vi,[2,15]),o($Vl,$V4,{8:46}),{22:[1,47]},{22:[1,48]},{21:[1,49]},{22:[2,32]},{22:[2,33]},{31:50,42:$Vh},{42:[2,36]},o($Vi,[2,12],{12:[1,51]}),{4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,52],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,18],{18:[1,53]}),{28:[1,54]},{22:[1,55]},o($Vk,[2,27]),o($Vi,[2,13]),o($Vi,[2,17]),o($Vl,$V4,{8:56}),o($Vi,[2,23]),o($Vi,[2,24]),{4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,57],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,19])], -defaultActions: {7:[2,34],8:[2,1],9:[2,2],10:[2,3],41:[2,32],42:[2,33],44:[2,36]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 39; -break; -case 1: this.begin('type_directive'); return 40; -break; -case 2: this.popState(); this.begin('arg_directive'); return 32; -break; -case 3: this.popState(); this.popState(); return 42; -break; -case 4:return 41; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */{ console.log('Crap after close'); } -break; -case 7:return 5; -break; -case 8:/* skip all whitespace */ -break; -case 9:/* skip same-line whitespace */ -break; -case 10:/* skip comments */ -break; -case 11:/* skip comments */ -break; -case 12: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 15; -break; -case 13:return 16; -break; -case 14:this.popState(); -break; -case 15: this.pushState('STATE'); -break; -case 16:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 23; -break; -case 17:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24; -break; -case 18:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 23; -break; -case 19:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24; -break; -case 20:this.begin("STATE_STRING"); -break; -case 21:this.popState();this.pushState('STATE_ID');return "AS"; -break; -case 22:this.popState();/* console.log('STATE_ID', yy_.yytext);*/return "ID"; -break; -case 23:this.popState(); -break; -case 24: /*console.log('Long description:', yy_.yytext);*/return "STATE_DESCR"; -break; -case 25:/*console.log('COMPOSIT_STATE', yy_.yytext);*/return 17; -break; -case 26:this.popState(); -break; -case 27:this.popState();this.pushState('struct'); /*console.log('begin struct', yy_.yytext);*/return 18; -break; -case 28: /*console.log('Ending struct');*/ this.popState(); return 19; -break; -case 29:/* nothing */ -break; -case 30: this.begin('NOTE'); return 26; -break; -case 31: this.popState();this.pushState('NOTE_ID');return 37; -break; -case 32: this.popState();this.pushState('NOTE_ID');return 38; -break; -case 33: this.popState();this.pushState('FLOATING_NOTE'); -break; -case 34:this.popState();this.pushState('FLOATING_NOTE_ID');return "AS"; -break; -case 35:/**/ -break; -case 36: /*console.log('Floating note text: ', yy_.yytext);*/return "NOTE_TEXT"; -break; -case 37:this.popState();/*console.log('Floating note ID', yy_.yytext);*/return "ID"; -break; -case 38: this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yy_.yytext);*/return 22; -break; -case 39: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim();return 28; -break; -case 40: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim();return 28; -break; -case 41: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; -break; -case 42: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; -break; -case 43: /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/return 14; -break; -case 44: /*console.log('EDGE_STATE=',yy_.yytext);*/ return 36; -break; -case 45: /*console.log('=>ID=',yy_.yytext);*/ return 22; -break; -case 46: yy_.yytext = yy_.yytext.trim(); /*console.log('Descr = ', yy_.yytext);*/ return 12; -break; -case 47:return 13; -break; -case 48:return 25; -break; -case 49:return 5; -break; -case 50:return 'INVALID'; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i], -conditions: {"LINE":{"rules":[9,10],"inclusive":false},"close_directive":{"rules":[9,10],"inclusive":false},"arg_directive":{"rules":[3,4,9,10],"inclusive":false},"type_directive":{"rules":[2,3,9,10],"inclusive":false},"open_directive":{"rules":[1,9,10],"inclusive":false},"struct":{"rules":[9,10,15,28,29,30,44,45,46,47,48],"inclusive":false},"FLOATING_NOTE_ID":{"rules":[37],"inclusive":false},"FLOATING_NOTE":{"rules":[34,35,36],"inclusive":false},"NOTE_TEXT":{"rules":[39,40],"inclusive":false},"NOTE_ID":{"rules":[38],"inclusive":false},"NOTE":{"rules":[31,32,33],"inclusive":false},"SCALE":{"rules":[13,14],"inclusive":false},"ALIAS":{"rules":[],"inclusive":false},"STATE_ID":{"rules":[22],"inclusive":false},"STATE_STRING":{"rules":[23,24],"inclusive":false},"FORK_STATE":{"rules":[],"inclusive":false},"STATE":{"rules":[9,10,16,17,18,19,20,21,25,26,27],"inclusive":false},"ID":{"rules":[9,10],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,10,11,12,15,27,30,41,42,43,44,45,46,47,49,50],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/state/shapes.js": -/*!**************************************!*\ - !*** ./src/diagrams/state/shapes.js ***! - \**************************************/ -/*! exports provided: drawStartState, drawDivider, drawSimpleState, drawDescrState, addTitleAndBox, drawText, drawNote, drawState, drawEdge */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawStartState", function() { return drawStartState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDivider", function() { return drawDivider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSimpleState", function() { return drawSimpleState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDescrState", function() { return drawDescrState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTitleAndBox", function() { return addTitleAndBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawNote", function() { return drawNote; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawState", function() { return drawState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawEdge", function() { return drawEdge; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _id_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./id-cache.js */ "./src/diagrams/state/id-cache.js"); -/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); - - - - - - - // let conf; - -/** - * Draws a start state as a black circle - */ - -var drawStartState = function drawStartState(g) { - return g.append('circle') // .style('stroke', 'black') - // .style('fill', 'black') - .attr('class', 'start-state').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit); -}; -/** - * Draws a start state as a black circle - */ - -var drawDivider = function drawDivider(g) { - return g.append('line').style('stroke', 'grey').style('stroke-dasharray', '3').attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('class', 'divider').attr('x2', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight * 2).attr('y1', 0).attr('y2', 0); -}; -/** - * Draws a an end state as a black circle - */ - -var drawSimpleState = function drawSimpleState(g, stateDef) { - var state = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id); - var classBox = state.node().getBBox(); - g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', classBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', classBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); - return state; -}; -/** - * Draws a state with descriptions - * @param {*} g - * @param {*} stateDef - */ - -var drawDescrState = function drawDescrState(g, stateDef) { - var addTspan = function addTspan(textEl, txt, isFirst) { - var tSpan = textEl.append('tspan').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).text(txt); - - if (!isFirst) { - tSpan.attr('dy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight); - } - }; - - var title = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + 1.3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.descriptions[0]); - var titleBox = title.node().getBBox(); - var titleHeight = titleBox.height; - var description = g.append('text') // text label for the x axis - .attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding * 0.4 + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('class', 'state-description'); - var isFirst = true; - var isSecond = true; - stateDef.descriptions.forEach(function (descr) { - if (!isFirst) { - addTspan(description, descr, isSecond); - isSecond = false; - } - - isFirst = false; - }); - var descrLine = g.append('line') // text label for the x axis - .attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin / 2).attr('y2', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin / 2).attr('class', 'descr-divider'); - var descrBox = description.node().getBBox(); - var width = Math.max(descrBox.width, titleBox.width); - descrLine.attr('x2', width + 3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); // const classBox = title.node().getBBox(); - - g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', descrBox.height + titleHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); - return g; -}; -/** - * Adds the creates a box around the existing content and adds a - * panel for the id on top of the content. - */ - -/** - * Function that creates an title row and a frame around a substate for a composit state diagram. - * The function returns a new d3 svg object with updated width and height properties; - * @param {*} g The d3 svg object for the substate to framed - * @param {*} stateDef The info about the - */ - -var addTitleAndBox = function addTitleAndBox(g, stateDef, altBkg) { - var pad = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; - var dblPad = 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; - var orgBox = g.node().getBBox(); - var orgWidth = orgBox.width; - var orgX = orgBox.x; - var title = g.append('text').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id); - var titleBox = title.node().getBBox(); - var titleWidth = titleBox.width + dblPad; - var width = Math.max(titleWidth, orgWidth); // + dblPad; - - if (width === orgWidth) { - width = width + dblPad; - } - - var startX; // const lineY = 1 - getConfig().state.textHeight; - // const descrLine = g - // .append('line') // text label for the x axis - // .attr('x1', 0) - // .attr('y1', lineY) - // .attr('y2', lineY) - // .attr('class', 'descr-divider'); - - var graphBox = g.node().getBBox(); // descrLine.attr('x2', graphBox.width + getConfig().state.padding); - - if (stateDef.doc) {// cnsole.warn( - // stateDef.id, - // 'orgX: ', - // orgX, - // 'width: ', - // width, - // 'titleWidth: ', - // titleWidth, - // 'orgWidth: ', - // orgWidth, - // 'width', - // width - // ); - } - - startX = orgX - pad; - - if (titleWidth > orgWidth) { - startX = (orgWidth - width) / 2 + pad; - } - - if (Math.abs(orgX - graphBox.x) < pad) { - if (titleWidth > orgWidth) { - startX = orgX - (titleWidth - orgWidth) / 2; - } - } - - var lineY = 1 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight; // White color - - g.insert('rect', ':first-child').attr('x', startX).attr('y', lineY).attr('class', altBkg ? 'alt-composit' : 'composit').attr('width', width).attr('height', graphBox.height + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift + 1).attr('rx', '0'); - title.attr('x', startX + pad); - if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); // Title background - - g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width) // Just needs to be higher then the descr line, will be clipped by the white color box - .attr('height', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight * 3).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); // Full background - - g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width).attr('height', graphBox.height + 3 + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); - return g; -}; - -var drawEndState = function drawEndState(g) { - g.append('circle') // .style('stroke', 'black') - // .style('fill', 'white') - .attr('class', 'end-state-outer').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding); - return g.append('circle') // .style('stroke', 'black') - // .style('fill', 'black') - .attr('class', 'end-state-inner').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + 2).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + 2); -}; - -var drawForkJoinState = function drawForkJoinState(g, stateDef) { - var width = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.forkWidth; - var height = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.forkHeight; - - if (stateDef.parentId) { - var tmp = width; - width = height; - height = tmp; - } - - return g.append('rect').style('stroke', 'black').style('fill', 'black').attr('width', width).attr('height', height).attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); -}; - -var drawText = function drawText(elem, textData) { - // Remove and ignore br:s - var nText = textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_4__["default"].lineBreakRegex, ' '); - var textElem = elem.append('text'); - textElem.attr('x', textData.x); - textElem.attr('y', textData.y); - textElem.style('text-anchor', textData.anchor); - textElem.attr('fill', textData.fill); - - if (typeof textData.class !== 'undefined') { - textElem.attr('class', textData.class); - } - - var span = textElem.append('tspan'); - span.attr('x', textData.x + textData.textMargin * 2); - span.attr('fill', textData.fill); - span.text(nText); - return textElem; -}; - -var _drawLongText = function _drawLongText(_text, x, y, g) { - var textHeight = 0; - var textElem = g.append('text'); - textElem.style('text-anchor', 'start'); - textElem.attr('class', 'noteText'); - - var text = _text.replace(/\r\n/g, '
'); - - text = text.replace(/\n/g, '
'); - var lines = text.split(_common_common__WEBPACK_IMPORTED_MODULE_4__["default"].lineBreakRegex); - var tHeight = 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _line = _step.value; - - var txt = _line.trim(); - - if (txt.length > 0) { - var span = textElem.append('tspan'); - span.text(txt); - - if (tHeight === 0) { - var textBounds = span.node().getBBox(); - tHeight += textBounds.height; - } - - textHeight += tHeight; - span.attr('x', x + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); - span.attr('y', y + textHeight + 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return { - textWidth: textElem.node().getBBox().width, - textHeight: textHeight - }; -}; -/** - * Draws a note to the diagram - * @param text - The text of the given note. - * @param g - The element the note is attached to. - */ - - -var drawNote = function drawNote(text, g) { - g.attr('class', 'state-note'); - var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); - var rectElem = g.append('g'); - - var _drawLongText2 = _drawLongText(text, 0, 0, rectElem), - textWidth = _drawLongText2.textWidth, - textHeight = _drawLongText2.textHeight; - - note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); - note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin * 2); - return note; -}; -/** - * Starting point for drawing a state. The function finds out the specifics - * about the state and renders with approprtiate function. - * @param {*} elem - * @param {*} stateDef - */ - -var drawState = function drawState(elem, stateDef) { - var id = stateDef.id; - var stateInfo = { - id: id, - label: stateDef.id, - width: 0, - height: 0 - }; - var g = elem.append('g').attr('id', id).attr('class', 'stateGroup'); - if (stateDef.type === 'start') drawStartState(g); - if (stateDef.type === 'end') drawEndState(g); - if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef); - if (stateDef.type === 'note') drawNote(stateDef.note.text, g); - if (stateDef.type === 'divider') drawDivider(g); - if (stateDef.type === 'default' && stateDef.descriptions.length === 0) drawSimpleState(g, stateDef); - if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef); - var stateBox = g.node().getBBox(); - stateInfo.width = stateBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; - stateInfo.height = stateBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; - _id_cache_js__WEBPACK_IMPORTED_MODULE_1__["default"].set(id, stateInfo); // stateCnt++; - - return stateInfo; -}; -var edgeCount = 0; -var drawEdge = function drawEdge(elem, path, relation) { - var getRelationType = function getRelationType(type) { - switch (type) { - case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.AGGREGATION: - return 'aggregation'; - - case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.EXTENSION: - return 'extension'; - - case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.COMPOSITION: - return 'composition'; - - case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY: - return 'dependency'; - } - }; - - path.points = path.points.filter(function (p) { - return !Number.isNaN(p.y); - }); // The data for our line - - var lineData = path.points; // This is the accessor function we talked about above - - var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { - return d.x; - }).y(function (d) { - return d.y; - }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); - var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'transition'); - var url = ''; - - if (Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.arrowMarkerAbsolute) { - url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } - - svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY) + 'End' + ')'); - - if (typeof relation.title !== 'undefined') { - var label = elem.append('g').attr('class', 'stateLabel'); - - var _utils$calcLabelPosit = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].calcLabelPosition(path.points), - x = _utils$calcLabelPosit.x, - y = _utils$calcLabelPosit.y; - - var rows = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].getRows(relation.title); - var titleHeight = 0; - var titleRows = []; - var maxWidth = 0; - var minX = 0; - - for (var i = 0; i <= rows.length; i++) { - var title = label.append('text').attr('text-anchor', 'middle').text(rows[i]).attr('x', x).attr('y', y + titleHeight); - var boundstmp = title.node().getBBox(); - maxWidth = Math.max(maxWidth, boundstmp.width); - minX = Math.min(minX, boundstmp.x); - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(boundstmp.x, x, y + titleHeight); - - if (titleHeight === 0) { - var titleBox = title.node().getBBox(); - titleHeight = titleBox.height; - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Title height', titleHeight, y); - } - - titleRows.push(title); - } - - var boxHeight = titleHeight * rows.length; - - if (rows.length > 1) { - var heightAdj = (rows.length - 1) * titleHeight * 0.5; - titleRows.forEach(function (title, i) { - return title.attr('y', y + i * titleHeight - heightAdj); - }); - boxHeight = titleHeight * rows.length; - } - - var bounds = label.node().getBBox(); - label.insert('rect', ':first-child').attr('class', 'box').attr('x', x - maxWidth / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding / 2).attr('y', y - boxHeight / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding / 2 - 3.5).attr('width', maxWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', boxHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(bounds); //label.attr('transform', '0 -' + (bounds.y / 2)); - // Debug points - // path.points.forEach(point => { - // g.append('circle') - // .style('stroke', 'red') - // .style('fill', 'red') - // .attr('r', 1) - // .attr('cx', point.x) - // .attr('cy', point.y); - // }); - // g.append('circle') - // .style('stroke', 'blue') - // .style('fill', 'blue') - // .attr('r', 1) - // .attr('cx', x) - // .attr('cy', y); - } - - edgeCount++; -}; - -/***/ }), - -/***/ "./src/diagrams/state/stateDb.js": -/*!***************************************!*\ - !*** ./src/diagrams/state/stateDb.js ***! - \***************************************/ -/*! exports provided: parseDirective, addState, clear, getState, getStates, logDocuments, getRelations, addRelation, cleanupLabel, lineType, relationType, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addState", function() { return addState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getState", function() { return getState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStates", function() { return getStates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logDocuments", function() { return logDocuments; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; }); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - - - - - - -var clone = function clone(o) { - return JSON.parse(JSON.stringify(o)); -}; - -var rootDoc = []; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].parseDirective(this, statement, context, type); -}; - -var setRootDoc = function setRootDoc(o) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Setting root doc', o); // rootDoc = { id: 'root', doc: o }; - - rootDoc = o; -}; - -var getRootDoc = function getRootDoc() { - return rootDoc; -}; - -var docTranslator = function docTranslator(parent, node, first) { - if (node.stmt === 'relation') { - docTranslator(parent, node.state1, true); - docTranslator(parent, node.state2, false); - } else { - if (node.stmt === 'state') { - if (node.id === '[*]') { - node.id = first ? parent.id + '_start' : parent.id + '_end'; - node.start = first; - } - } - - if (node.doc) { - var doc = []; // Check for concurrency - - var i = 0; - var currentDoc = []; - - for (i = 0; i < node.doc.length; i++) { - if (node.doc[i].type === 'divider') { - // debugger; - var newNode = clone(node.doc[i]); - newNode.doc = clone(currentDoc); - doc.push(newNode); - currentDoc = []; - } else { - currentDoc.push(node.doc[i]); - } - } // If any divider was encountered - - - if (doc.length > 0 && currentDoc.length > 0) { - var _newNode = { - stmt: 'state', - id: Object(_utils__WEBPACK_IMPORTED_MODULE_1__["generateId"])(), - type: 'divider', - doc: clone(currentDoc) - }; - doc.push(clone(_newNode)); - node.doc = doc; - } - - node.doc.forEach(function (docNode) { - return docTranslator(node, docNode, true); - }); - } - } -}; - -var getRootDocV2 = function getRootDocV2() { - docTranslator({ - id: 'root' - }, { - id: 'root', - doc: rootDoc - }, true); - return { - id: 'root', - doc: rootDoc - }; -}; - -var extract = function extract(_doc) { - // const res = { states: [], relations: [] }; - var doc; - - if (_doc.doc) { - doc = _doc.doc; - } else { - doc = _doc; - } // let doc = root.doc; - // if (!doc) { - // doc = root; - // } - - - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info(doc); - clear(); - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Extract', doc); - doc.forEach(function (item) { - if (item.stmt === 'state') { - addState(item.id, item.type, item.doc, item.description, item.note); - } - - if (item.stmt === 'relation') { - addRelation(item.state1.id, item.state2.id, item.description); - } - }); -}; - -var newDoc = function newDoc() { - return { - relations: [], - states: {}, - documents: {} - }; -}; - -var documents = { - root: newDoc() -}; -var currentDocument = documents.root; -var startCnt = 0; -var endCnt = 0; // eslint-disable-line -// let stateCnt = 0; - -/** - * Function called by parser when a node definition has been found. - * @param id - * @param text - * @param type - * @param style - */ - -var addState = function addState(id, type, doc, descr, note) { - if (typeof currentDocument.states[id] === 'undefined') { - currentDocument.states[id] = { - id: id, - descriptions: [], - type: type, - doc: doc, - note: note - }; - } else { - if (!currentDocument.states[id].doc) { - currentDocument.states[id].doc = doc; - } - - if (!currentDocument.states[id].type) { - currentDocument.states[id].type = type; - } - } - - if (descr) { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Adding state ', id, descr); - if (typeof descr === 'string') addDescription(id, descr.trim()); - - if (_typeof(descr) === 'object') { - descr.forEach(function (des) { - return addDescription(id, des.trim()); - }); - } - } - - if (note) currentDocument.states[id].note = note; -}; -var clear = function clear() { - documents = { - root: newDoc() - }; - currentDocument = documents.root; - currentDocument = documents.root; - startCnt = 0; - endCnt = 0; // eslint-disable-line - - classes = []; -}; -var getState = function getState(id) { - return currentDocument.states[id]; -}; -var getStates = function getStates() { - return currentDocument.states; -}; -var logDocuments = function logDocuments() { - _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Documents = ', documents); -}; -var getRelations = function getRelations() { - return currentDocument.relations; -}; -var addRelation = function addRelation(_id1, _id2, title) { - var id1 = _id1; - var id2 = _id2; - var type1 = 'default'; - var type2 = 'default'; - - if (_id1 === '[*]') { - startCnt++; - id1 = 'start' + startCnt; - type1 = 'start'; - } - - if (_id2 === '[*]') { - endCnt++; - id2 = 'end' + startCnt; - type2 = 'end'; - } - - addState(id1, type1); - addState(id2, type2); - currentDocument.relations.push({ - id1: id1, - id2: id2, - title: title - }); -}; - -var addDescription = function addDescription(id, _descr) { - var theState = currentDocument.states[id]; - var descr = _descr; - - if (descr[0] === ':') { - descr = descr.substr(1).trim(); - } - - theState.descriptions.push(descr); -}; - -var cleanupLabel = function cleanupLabel(label) { - if (label.substring(0, 1) === ':') { - return label.substr(2).trim(); - } else { - return label.trim(); - } -}; -var lineType = { - LINE: 0, - DOTTED_LINE: 1 -}; -var dividerCnt = 0; - -var getDividerId = function getDividerId() { - dividerCnt++; - return 'divider-id-' + dividerCnt; -}; - -var classes = []; - -var getClasses = function getClasses() { - return classes; -}; - -var getDirection = function getDirection() { - return 'TB'; -}; - -var relationType = { - AGGREGATION: 0, - EXTENSION: 1, - COMPOSITION: 2, - DEPENDENCY: 3 -}; - -var trimColon = function trimColon(str) { - return str && str[0] === ':' ? str.substr(1).trim() : str.trim(); -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]().state; - }, - addState: addState, - clear: clear, - getState: getState, - getStates: getStates, - getRelations: getRelations, - getClasses: getClasses, - getDirection: getDirection, - addRelation: addRelation, - getDividerId: getDividerId, - // addDescription, - cleanupLabel: cleanupLabel, - lineType: lineType, - relationType: relationType, - logDocuments: logDocuments, - getRootDoc: getRootDoc, - setRootDoc: setRootDoc, - getRootDocV2: getRootDocV2, - extract: extract, - trimColon: trimColon -}); - -/***/ }), - -/***/ "./src/diagrams/state/stateRenderer-v2.js": -/*!************************************************!*\ - !*** ./src/diagrams/state/stateRenderer-v2.js ***! - \************************************************/ -/*! exports provided: setConf, getClasses, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); -/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison"); -/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - - for (var i = 0; i < keys.length; i++) { - conf[keys[i]] = cnf[keys[i]]; - } -}; -var nodeDb = {}; -/** - * Returns the all the styles from classDef statements in the graph definition. - * @returns {object} classDef styles - */ - -var getClasses = function getClasses(text) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].trace('Extracting classes'); - _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition - - parser.parse(text); - return _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); -}; - -var setupNode = function setupNode(g, parent, node, altFlag) { - // Add the node - if (node.id !== 'root') { - var shape = 'rect'; - - if (node.start === true) { - shape = 'start'; - } - - if (node.start === false) { - shape = 'end'; - } - - if (node.type !== 'default') { - shape = node.type; - } - - if (!nodeDb[node.id]) { - nodeDb[node.id] = { - id: node.id, - shape: shape, - description: node.id, - classes: 'statediagram-state' - }; - } // Build of the array of description strings accordinging - - - if (node.description) { - if (Array.isArray(nodeDb[node.id].description)) { - // There already is an array of strings,add to it - nodeDb[node.id].shape = 'rectWithTitle'; - nodeDb[node.id].description.push(node.description); - } else { - if (nodeDb[node.id].description.length > 0) { - // if there is a description already transformit to an array - nodeDb[node.id].shape = 'rectWithTitle'; - - if (nodeDb[node.id].description === node.id) { - // If the previous description was the is, remove it - nodeDb[node.id].description = [node.description]; - } else { - nodeDb[node.id].description = [nodeDb[node.id].description, node.description]; - } - } else { - nodeDb[node.id].shape = 'rect'; - nodeDb[node.id].description = node.description; - } - } - } // Save data for description and group so that for instance a statement without description overwrites - // one with description - // group - - - if (!nodeDb[node.id].type && node.doc) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Setting cluser for ', node.id); - nodeDb[node.id].type = 'group'; - nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle'; - nodeDb[node.id].classes = nodeDb[node.id].classes + ' ' + (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster'); - } - - var nodeData = { - labelStyle: '', - shape: nodeDb[node.id].shape, - labelText: nodeDb[node.id].description, - classes: nodeDb[node.id].classes, - //classStr, - style: '', - //styles.style, - id: node.id, - domId: 'state-' + node.id + '-' + cnt, - type: nodeDb[node.id].type, - padding: 15 //getConfig().flowchart.padding - - }; - - if (node.note) { - // Todo: set random id - var noteData = { - labelStyle: '', - shape: 'note', - labelText: node.note.text, - classes: 'statediagram-note', - //classStr, - style: '', - //styles.style, - id: node.id + '----note', - domId: 'state-' + node.id + '----note-' + cnt, - type: nodeDb[node.id].type, - padding: 15 //getConfig().flowchart.padding - - }; - var groupData = { - labelStyle: '', - shape: 'noteGroup', - labelText: node.note.text, - classes: nodeDb[node.id].classes, - //classStr, - style: '', - //styles.style, - id: node.id + '----parent', - domId: 'state-' + node.id + '----parent-' + cnt, - type: 'group', - padding: 0 //getConfig().flowchart.padding - - }; - cnt++; - g.setNode(node.id + '----parent', groupData); - g.setNode(noteData.id, noteData); - g.setNode(node.id, nodeData); - g.setParent(node.id, node.id + '----parent'); - g.setParent(noteData.id, node.id + '----parent'); - var from = node.id; - var to = noteData.id; - - if (node.note.position === 'left of') { - from = noteData.id; - to = node.id; - } - - g.setEdge(from, to, { - arrowhead: 'none', - arrowType: '', - style: 'fill:none', - labelStyle: '', - classes: 'transition note-edge', - arrowheadStyle: 'fill: #333', - labelpos: 'c', - labelType: 'text', - thickness: 'normal' - }); - } else { - g.setNode(node.id, nodeData); - } - } - - if (parent) { - if (parent.id !== 'root') { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Setting node ', node.id, ' to be child of its parent ', parent.id); - g.setParent(node.id, parent.id); - } - } - - if (node.doc) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Adding nodes children '); - setupDoc(g, node, node.doc, !altFlag); - } -}; - -var cnt = 0; - -var setupDoc = function setupDoc(g, parent, doc, altFlag) { - cnt = 0; - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].trace('items', doc); - doc.forEach(function (item) { - if (item.stmt === 'state' || item.stmt === 'default') { - setupNode(g, parent, item, altFlag); - } else if (item.stmt === 'relation') { - setupNode(g, parent, item.state1, altFlag); - setupNode(g, parent, item.state2, altFlag); - var edgeData = { - id: 'edge' + cnt, - arrowhead: 'normal', - arrowTypeEnd: 'arrow_barb', - style: 'fill:none', - labelStyle: '', - label: item.description, - arrowheadStyle: 'fill: #333', - labelpos: 'c', - labelType: 'text', - thickness: 'normal', - classes: 'transition' - }; - var startId = item.state1.id; - var endId = item.state2.id; - g.setEdge(startId, endId, edgeData, cnt); - cnt++; - } - }); -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - - -var draw = function draw(text, id) { - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Drawing state diagram (v2)', id); - _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); - nodeDb = {}; - var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; - parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition - - parser.parse(text); // Fetch the default direction, use TD if none was found - - var dir = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); - - if (typeof dir === 'undefined') { - dir = 'LR'; - } - - var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state; - var nodeSpacing = conf.nodeSpacing || 50; - var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph - - var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ - multigraph: true, - compound: true - }).setGraph({ - rankdir: 'TB', - nodesep: nodeSpacing, - ranksep: rankSpacing, - marginx: 8, - marginy: 8 - }).setDefaultEdgeLabel(function () { - return {}; - }); - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); - _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].extract(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); - setupNode(g, undefined, _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2(), true); // Set up an SVG group so that we can translate the final graph. - - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); // Run the renderer. This is what draws the final graph. - - var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); - Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__["render"])(element, g, ['barb'], 'statediagram', id); - var padding = 8; - var bounds = svg.node().getBBox(); - var width = bounds.width + padding * 2; - var height = bounds.height + padding * 2; // Zoom in a bit - - svg.attr('class', 'statediagram'); - var svgBounds = svg.node().getBBox(); - Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(svg, height, width * 1.75, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding - - var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); - _logger__WEBPACK_IMPORTED_MODULE_6__["log"].debug("viewBox ".concat(vBox)); - svg.attr('viewBox', vBox); // Add label rects for non html labels - - if (!conf.htmlLabels) { - var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); - - for (var k = 0; k < labels.length; k++) { - var label = labels[k]; // Get dimensions of label - - var dim = label.getBBox(); - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.setAttribute('rx', 0); - rect.setAttribute('ry', 0); - rect.setAttribute('width', dim.width); - rect.setAttribute('height', dim.height); - label.insertBefore(rect, label.firstChild); - } - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - getClasses: getClasses, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/state/stateRenderer.js": -/*!*********************************************!*\ - !*** ./src/diagrams/state/stateRenderer.js ***! - \*********************************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); -/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); -/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison"); -/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shapes */ "./src/diagrams/state/shapes.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - - - // import idCache from './id-cache'; - - - - -_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"]; // TODO Move conf object to main conf in mermaidAPI - -var conf; -var transformationLog = {}; -var setConf = function setConf() {}; // Todo optimize - -/** - * Setup arrow head and define the marker. The result is appended to the svg. - */ - -var insertMarkers = function insertMarkers(elem) { - elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); -}; -/** - * Draws a flowchart in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - - -var draw = function draw(text, id) { - conf = Object(_config__WEBPACK_IMPORTED_MODULE_8__["getConfig"])().state; - _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy.clear(); - _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].parse(text); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found - - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); - insertMarkers(diagram); // Layout graph, Create a new directed graph - - var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ - multigraph: true, - compound: true, - // acyclicer: 'greedy', - rankdir: 'RL' // ranksep: '20' - - }); // Default to assigning a new object as a label for each new edge. - - graph.setDefaultEdgeLabel(function () { - return {}; - }); - var rootDoc = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRootDoc(); - renderDoc(rootDoc, diagram, undefined, false); - var padding = conf.padding; - var bounds = diagram.node().getBBox(); - var width = bounds.width + padding * 2; - var height = bounds.height + padding * 2; // zoom in a bit - - var svgWidth = width * 1.75; - Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(diagram, height, svgWidth, conf.useMaxWidth); - diagram.attr('viewBox', "".concat(bounds.x - conf.padding, " ").concat(bounds.y - conf.padding, " ") + width + ' ' + height); -}; - -var getLabelWidth = function getLabelWidth(text) { - return text ? text.length * conf.fontSizeFactor : 1; -}; - -var renderDoc = function renderDoc(doc, diagram, parentId, altBkg) { - // // Layout graph, Create a new directed graph - var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ - compound: true, - multigraph: true - }); - var i; - var edgeFreeDoc = true; - - for (i = 0; i < doc.length; i++) { - if (doc[i].stmt === 'relation') { - edgeFreeDoc = false; - break; - } - } // Set an object for the graph label - - - if (parentId) graph.setGraph({ - rankdir: 'LR', - multigraph: true, - compound: true, - // acyclicer: 'greedy', - ranker: 'tight-tree', - ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, - nodeSep: edgeFreeDoc ? 1 : 50, - isMultiGraph: true // ranksep: 5, - // nodesep: 1 - - });else { - graph.setGraph({ - rankdir: 'TB', - multigraph: true, - compound: true, - // isCompound: true, - // acyclicer: 'greedy', - // ranker: 'longest-path' - ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, - nodeSep: edgeFreeDoc ? 1 : 50, - ranker: 'tight-tree', - // ranker: 'network-simplex' - isMultiGraph: true - }); - } // Default to assigning a new object as a label for each new edge. - - graph.setDefaultEdgeLabel(function () { - return {}; - }); - _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].extract(doc); - var states = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getStates(); - var relations = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); - var keys = Object.keys(states); - var first = true; - - for (var _i = 0; _i < keys.length; _i++) { - var stateDef = states[keys[_i]]; - - if (parentId) { - stateDef.parentId = parentId; - } - - var node = void 0; - - if (stateDef.doc) { - var sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup'); - node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg); - - if (first) { - // first = false; - sub = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["addTitleAndBox"])(sub, stateDef, altBkg); - var boxBounds = sub.node().getBBox(); - node.width = boxBounds.width; - node.height = boxBounds.height + conf.padding / 2; - transformationLog[stateDef.id] = { - y: conf.compositTitleSize - }; - } else { - // sub = addIdAndBox(sub, stateDef); - var _boxBounds = sub.node().getBBox(); - - node.width = _boxBounds.width; - node.height = _boxBounds.height; // transformationLog[stateDef.id] = { y: conf.compositTitleSize }; - } - } else { - node = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawState"])(diagram, stateDef, graph); - } - - if (stateDef.note) { - // Draw note note - var noteDef = { - descriptions: [], - id: stateDef.id + '-note', - note: stateDef.note, - type: 'note' - }; - var note = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawState"])(diagram, noteDef, graph); // graph.setNode(node.id, node); - - if (stateDef.note.position === 'left of') { - graph.setNode(node.id + '-note', note); - graph.setNode(node.id, node); - } else { - graph.setNode(node.id, node); - graph.setNode(node.id + '-note', note); - } // graph.setNode(node.id); - - - graph.setParent(node.id, node.id + '-group'); - graph.setParent(node.id + '-note', node.id + '-group'); - } else { - // Add nodes to the graph. The first argument is the node id. The second is - // metadata about the node. In this case we're going to add labels to each of - // our nodes. - graph.setNode(node.id, node); - } - } - - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Count=', graph.nodeCount(), graph); - var cnt = 0; - relations.forEach(function (relation) { - cnt++; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Setting edge', relation); - graph.setEdge(relation.id1, relation.id2, { - relation: relation, - width: getLabelWidth(relation.title), - height: conf.labelHeight * _common_common__WEBPACK_IMPORTED_MODULE_5__["default"].getRows(relation.title).length, - labelpos: 'c' - }, 'id' + cnt); - }); - dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(graph); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Graph after layout', graph.nodes()); - var svgElem = diagram.node(); - graph.nodes().forEach(function (v) { - if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].warn('Node ' + v + ': ' + JSON.stringify(graph.node(v))); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + svgElem.id + ' #' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + ' )'); - Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + svgElem.id + ' #' + v).attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2); - var dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider'); - dividers.forEach(function (divider) { - var parent = divider.parentElement; - var pWidth = 0; - var pShift = 0; - - if (parent) { - if (parent.parentElement) pWidth = parent.parentElement.getBBox().width; - pShift = parseInt(parent.getAttribute('data-x-shift'), 10); - - if (Number.isNaN(pShift)) { - pShift = 0; - } - } - - divider.setAttribute('x1', 0 - pShift + 8); - divider.setAttribute('x2', pWidth - pShift - 8); - }); - } else { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v))); - } - }); - var stateBox = svgElem.getBBox(); - graph.edges().forEach(function (e) { - if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e))); - Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawEdge"])(diagram, graph.edge(e), graph.edge(e).relation); - } - }); - stateBox = svgElem.getBBox(); - var stateInfo = { - id: parentId ? parentId : 'root', - label: parentId ? parentId : 'root', - width: 0, - height: 0 - }; - stateInfo.width = stateBox.width + 2 * conf.padding; - stateInfo.height = stateBox.height + 2 * conf.padding; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Doc rendered', stateInfo, graph); - return stateInfo; -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/state/styles.js": -/*!**************************************!*\ - !*** ./src/diagrams/state/styles.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return "g.stateGroup text {\n fill: ".concat(options.nodeBorder, ";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(options.textColor, ";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(options.labelColor, ";\n}\n\ng.stateGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.stateGroup line {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(options.background, ";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(options.tertiaryColor, ";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(options.tertiaryTextColor, ";\n}\n.label div .edgeLabel {\n color: ").concat(options.tertiaryTextColor, ";\n}\n\n.stateLabel text {\n fill: ").concat(options.labelColor, ";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(options.lineColor, ";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(options.primaryBorderColor, ";\n stroke: ").concat(options.background, ";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(options.background, ";\n // stroke: ").concat(options.background, ";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(options.lineColor, ";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(options.textColor, ";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(options.nodeBorder, ";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(options.background, ";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(options.altBackground ? options.altBackground : '#efefef', ";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(options.noteTextColor, ";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(options.noteTextColor, ";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(options.lineColor, ";\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/user-journey/journeyDb.js": -/*!************************************************!*\ - !*** ./src/diagrams/user-journey/journeyDb.js ***! - \************************************************/ -/*! exports provided: parseDirective, clear, setTitle, getTitle, addSection, getSections, getTasks, addTask, addTaskOrg, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; }); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - -var title = ''; -var currentSection = ''; -var sections = []; -var tasks = []; -var rawTasks = []; -var parseDirective = function parseDirective(statement, context, type) { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__["default"].parseDirective(this, statement, context, type); -}; -var clear = function clear() { - sections.length = 0; - tasks.length = 0; - currentSection = ''; - title = ''; - rawTasks.length = 0; -}; -var setTitle = function setTitle(txt) { - title = txt; -}; -var getTitle = function getTitle() { - return title; -}; -var addSection = function addSection(txt) { - currentSection = txt; - sections.push(txt); -}; -var getSections = function getSections() { - return sections; -}; -var getTasks = function getTasks() { - var allItemsProcessed = compileTasks(); - var maxDepth = 100; - var iterationCount = 0; - - while (!allItemsProcessed && iterationCount < maxDepth) { - allItemsProcessed = compileTasks(); - iterationCount++; - } - - tasks.push.apply(tasks, rawTasks); - return tasks; -}; - -var updateActors = function updateActors() { - var tempActors = []; - tasks.forEach(function (task) { - if (task.people) { - tempActors.push.apply(tempActors, _toConsumableArray(task.people)); - } - }); - var unique = new Set(tempActors); - return _toConsumableArray(unique).sort(); -}; - -var addTask = function addTask(descr, taskData) { - var pieces = taskData.substr(1).split(':'); - var score = 0; - var peeps = []; - - if (pieces.length === 1) { - score = Number(pieces[0]); - peeps = []; - } else { - score = Number(pieces[0]); - peeps = pieces[1].split(','); - } - - var peopleList = peeps.map(function (s) { - return s.trim(); - }); - var rawTask = { - section: currentSection, - type: currentSection, - people: peopleList, - task: descr, - score: score - }; - rawTasks.push(rawTask); -}; -var addTaskOrg = function addTaskOrg(descr) { - var newTask = { - section: currentSection, - type: currentSection, - description: descr, - task: descr, - classes: [] - }; - tasks.push(newTask); -}; - -var compileTasks = function compileTasks() { - var compileTask = function compileTask(pos) { - return rawTasks[pos].processed; - }; - - var allProcessed = true; - - for (var i = 0; i < rawTasks.length; i++) { - compileTask(i); - allProcessed = allProcessed && rawTasks[i].processed; - } - - return allProcessed; -}; - -var getActors = function getActors() { - return updateActors(); -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - parseDirective: parseDirective, - getConfig: function getConfig() { - return _config__WEBPACK_IMPORTED_MODULE_1__["getConfig"]().journey; - }, - clear: clear, - setTitle: setTitle, - getTitle: getTitle, - addSection: addSection, - getSections: getSections, - getTasks: getTasks, - addTask: addTask, - addTaskOrg: addTaskOrg, - getActors: getActors -}); - -/***/ }), - -/***/ "./src/diagrams/user-journey/journeyRenderer.js": -/*!******************************************************!*\ - !*** ./src/diagrams/user-journey/journeyRenderer.js ***! - \******************************************************/ -/*! exports provided: setConf, draw, bounds, drawTasks, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawTasks", function() { return drawTasks; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _parser_journey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/journey */ "./src/diagrams/user-journey/parser/journey.jison"); -/* harmony import */ var _parser_journey__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_journey__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _journeyDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./journeyDb */ "./src/diagrams/user-journey/journeyDb.js"); -/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/user-journey/svgDraw.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - - - - - -_parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _journeyDb__WEBPACK_IMPORTED_MODULE_2__["default"]; -var conf = { - leftMargin: 150, - diagramMarginX: 50, - diagramMarginY: 20, - // Margin between tasks - taskMargin: 50, - // Width of task boxes - width: 150, - // Height of task boxes - height: 50, - taskFontSize: 14, - taskFontFamily: '"Open-Sans", "sans-serif"', - // Margin around loop boxes - boxMargin: 10, - boxTextMargin: 5, - noteMargin: 10, - // Space between messages - messageMargin: 35, - // Multiline message alignment - messageAlign: 'center', - // Depending on css styling this might need adjustment - // Projects the edge of the diagram downwards - bottomMarginAdj: 1, - // width of activation box - activationWidth: 10, - // text placement as: tspan | fo | old only text as before - textPlacement: 'fo', - actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'], - sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'], - sectionColours: ['#fff'] -}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -var actors = {}; - -function drawActorLegend(diagram) { - // Draw the actors - var yPos = 60; - Object.keys(actors).forEach(function (person) { - var colour = actors[person]; - var circleData = { - cx: 20, - cy: yPos, - r: 7, - fill: colour, - stroke: '#000' - }; - _svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawCircle(diagram, circleData); - var labelData = { - x: 40, - y: yPos + 7, - fill: '#666', - text: person, - textMargin: conf.boxTextMargin | 5 - }; - _svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawText(diagram, labelData); - yPos += 20; - }); -} - -var LEFT_MARGIN = conf.leftMargin; -var draw = function draw(text, id) { - _parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear(); - _parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text + '\n'); - bounds.init(); - var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); - diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - _svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].initGraphics(diagram); - var tasks = _parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); - var title = _parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle(); - var actorNames = _parser_journey__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getActors(); - - for (var member in actors) { - delete actors[member]; - } - - var actorPos = 0; - actorNames.forEach(function (actorName) { - actors[actorName] = conf.actorColours[actorPos % conf.actorColours.length]; - actorPos++; - }); - drawActorLegend(diagram); - bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); - drawTasks(diagram, tasks, 0); - var box = bounds.getBounds(); - - if (title) { - diagram.append('text').text(title).attr('x', LEFT_MARGIN).attr('font-size', '4ex').attr('font-weight', 'bold').attr('y', 25); - } - - var height = box.stopy - box.starty + 2 * conf.diagramMarginY; - var width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX; - Object(_utils__WEBPACK_IMPORTED_MODULE_4__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Draw activity line - - diagram.append('line').attr('x1', LEFT_MARGIN).attr('y1', conf.height * 4) // One section head + one task + margins - .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained - .attr('y2', conf.height * 4).attr('stroke-width', 4).attr('stroke', 'black').attr('marker-end', 'url(#arrowhead)'); - var extraVertForTitle = title ? 70 : 0; - diagram.attr('viewBox', "".concat(box.startx, " -25 ").concat(width, " ").concat(height + extraVertForTitle)); - diagram.attr('preserveAspectRatio', 'xMinYMin meet'); -}; -var bounds = { - data: { - startx: undefined, - stopx: undefined, - starty: undefined, - stopy: undefined - }, - verticalPos: 0, - sequenceItems: [], - init: function init() { - this.sequenceItems = []; - this.data = { - startx: undefined, - stopx: undefined, - starty: undefined, - stopy: undefined - }; - this.verticalPos = 0; - }, - updateVal: function updateVal(obj, key, val, fun) { - if (typeof obj[key] === 'undefined') { - obj[key] = val; - } else { - obj[key] = fun(val, obj[key]); - } - }, - updateBounds: function updateBounds(startx, starty, stopx, stopy) { - var _self = this; - - var cnt = 0; - - function updateFn(type) { - return function updateItemBounds(item) { - cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems - - var n = _self.sequenceItems.length - cnt + 1; - - _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min); - - _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max); - - _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min); - - _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max); - - if (!(type === 'activation')) { - _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min); - - _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max); - - _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min); - - _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max); - } - }; - } - - this.sequenceItems.forEach(updateFn()); - }, - insert: function insert(startx, starty, stopx, stopy) { - var _startx = Math.min(startx, stopx); - - var _stopx = Math.max(startx, stopx); - - var _starty = Math.min(starty, stopy); - - var _stopy = Math.max(starty, stopy); - - this.updateVal(bounds.data, 'startx', _startx, Math.min); - this.updateVal(bounds.data, 'starty', _starty, Math.min); - this.updateVal(bounds.data, 'stopx', _stopx, Math.max); - this.updateVal(bounds.data, 'stopy', _stopy, Math.max); - this.updateBounds(_startx, _starty, _stopx, _stopy); - }, - bumpVerticalPos: function bumpVerticalPos(bump) { - this.verticalPos = this.verticalPos + bump; - this.data.stopy = this.verticalPos; - }, - getVerticalPos: function getVerticalPos() { - return this.verticalPos; - }, - getBounds: function getBounds() { - return this.data; - } -}; -var fills = conf.sectionFills; -var textColours = conf.sectionColours; -var drawTasks = function drawTasks(diagram, tasks, verticalPos) { - var lastSection = ''; - var sectionVHeight = conf.height * 2 + conf.diagramMarginY; - var taskPos = verticalPos + sectionVHeight; - var sectionNumber = 0; - var fill = '#CCC'; - var colour = 'black'; - var num = 0; // Draw the tasks - - for (var i = 0; i < tasks.length; i++) { - var task = tasks[i]; - - if (lastSection !== task.section) { - fill = fills[sectionNumber % fills.length]; - num = sectionNumber % fills.length; - colour = textColours[sectionNumber % textColours.length]; - var section = { - x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN, - y: 50, - text: task.section, - fill: fill, - num: num, - colour: colour - }; - _svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawSection(diagram, section, conf); - lastSection = task.section; - sectionNumber++; - } // Collect the actors involved in the task - - - var taskActors = task.people.reduce(function (acc, actorName) { - if (actors[actorName]) { - acc[actorName] = actors[actorName]; - } - - return acc; - }, {}); // Add some rendering data to the object - - task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN; - task.y = taskPos; - task.width = conf.diagramMarginX; - task.height = conf.diagramMarginY; - task.colour = colour; - task.fill = fill; - task.num = num; - task.actors = taskActors; // Draw the box with the attached line - - _svgDraw__WEBPACK_IMPORTED_MODULE_3__["default"].drawTask(diagram, task, conf); - bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopy is the length of the descenders. - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/diagrams/user-journey/parser/journey.jison": -/*!********************************************************!*\ - !*** ./src/diagrams/user-journey/parser/journey.jison ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,17,18,19,21],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,21],$V7=[4,6,9,11,17,18,19,21]; -var parser = {trace: function trace () { }, -yy: {}, -symbols_: {"error":2,"start":3,"journey":4,"document":5,"EOF":6,"directive":7,"line":8,"SPACE":9,"statement":10,"NEWLINE":11,"openDirective":12,"typeDirective":13,"closeDirective":14,":":15,"argDirective":16,"title":17,"section":18,"taskName":19,"taskData":20,"open_directive":21,"type_directive":22,"arg_directive":23,"close_directive":24,"$accept":0,"$end":1}, -terminals_: {2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"}, -productions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: - return $$[$0-1]; -break; -case 3: - this.$ = [] -break; -case 4: -$$[$0-1].push($$[$0]);this.$ = $$[$0-1] -break; -case 5: case 6: - this.$ = $$[$0] -break; -case 7: case 8: - this.$=[]; -break; -case 11: -yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6); -break; -case 12: -yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8); -break; -case 13: -yy.addTask($$[$0-1], $$[$0]);this.$='task'; -break; -case 15: - yy.parseDirective('%%{', 'open_directive'); -break; -case 16: - yy.parseDirective($$[$0], 'type_directive'); -break; -case 17: - $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); -break; -case 18: - yy.parseDirective('}%%', 'close_directive', 'journey'); -break; -} -}, -table: [{3:1,4:$V0,7:3,12:4,21:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,21:$V1},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:$V3,18:$V4,19:$V5,21:$V1},{1:[2,2]},{14:19,15:[1,20],24:$V6},o([15,24],[2,16]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:18,10:22,12:4,17:$V3,18:$V4,19:$V5,21:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,12]),{20:[1,23]},o($V2,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},o($V2,[2,5]),o($V2,[2,13]),o($V7,[2,9]),{14:27,24:$V6},{24:[2,17]},{11:[1,28]},o($V7,[2,10])], -defaultActions: {5:[2,15],7:[2,2],21:[2,18],26:[2,17]}, -parseError: function parseError (str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - var error = new Error(str); - error.hash = hash; - throw error; - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = tstack.pop() || lexer.lex() || EOF; - if (typeof token !== 'number') { - if (token instanceof Array) { - tstack = token; - token = tstack.pop(); - } - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; - -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function(match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex () { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin (condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState () { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules () { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState (n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState (condition) { - this.begin(condition); - }, - -// return the number of states currently on the stack -stateStackSize:function stateStackSize() { - return this.conditionStack.length; - }, -options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { -var YYSTATE=YY_START; -switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 21; -break; -case 1: this.begin('type_directive'); return 22; -break; -case 2: this.popState(); this.begin('arg_directive'); return 15; -break; -case 3: this.popState(); this.popState(); return 24; -break; -case 4:return 23; -break; -case 5:/* skip comments */ -break; -case 6:/* skip comments */ -break; -case 7:return 11; -break; -case 8:/* skip whitespace */ -break; -case 9:/* skip comments */ -break; -case 10:return 4; -break; -case 11:return 17; -break; -case 12:return 18; -break; -case 13:return 19; -break; -case 14:return 20; -break; -case 15:return 15; -break; -case 16:return 6; -break; -case 17:return 'INVALID'; -break; -} -}, -rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i], -conditions: {"open_directive":{"rules":[1],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; -} -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); - - -if (true) { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain (args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if ( true && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); -} -} -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./src/diagrams/user-journey/styles.js": -/*!*********************************************!*\ - !*** ./src/diagrams/user-journey/styles.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var getStyles = function getStyles(options) { - return ".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(options.textColor, ";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(options.textColor, "\n }\n\n .legend {\n fill: ").concat(options.textColor, ";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(options.textColor, "\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType0) : '', ";\n }\n .task-type-1, .section-type-1 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType1) : '', ";\n }\n .task-type-2, .section-type-2 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType2) : '', ";\n }\n .task-type-3, .section-type-3 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType3) : '', ";\n }\n .task-type-4, .section-type-4 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType4) : '', ";\n }\n .task-type-5, .section-type-5 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType5) : '', ";\n }\n .task-type-6, .section-type-6 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType6) : '', ";\n }\n .task-type-7, .section-type-7 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType7) : '', ";\n }\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/diagrams/user-journey/svgDraw.js": -/*!**********************************************!*\ - !*** ./src/diagrams/user-journey/svgDraw.js ***! - \**********************************************/ -/*! exports provided: drawRect, drawFace, drawCircle, drawText, drawLabel, drawSection, drawTask, drawBackgroundRect, getTextObj, getNoteRect, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawFace", function() { return drawFace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawCircle", function() { return drawCircle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSection", function() { return drawSection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawTask", function() { return drawTask; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); - -var drawRect = function drawRect(elem, rectData) { - var rectElem = elem.append('rect'); - rectElem.attr('x', rectData.x); - rectElem.attr('y', rectData.y); - rectElem.attr('fill', rectData.fill); - rectElem.attr('stroke', rectData.stroke); - rectElem.attr('width', rectData.width); - rectElem.attr('height', rectData.height); - rectElem.attr('rx', rectData.rx); - rectElem.attr('ry', rectData.ry); - - if (typeof rectData.class !== 'undefined') { - rectElem.attr('class', rectData.class); - } - - return rectElem; -}; -var drawFace = function drawFace(element, faceData) { - var radius = 15; - var circleElement = element.append('circle').attr('cx', faceData.cx).attr('cy', faceData.cy).attr('class', 'face').attr('r', radius).attr('stroke-width', 2).attr('overflow', 'visible'); - var face = element.append('g'); //left eye - - face.append('circle').attr('cx', faceData.cx - radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); //right eye - - face.append('circle').attr('cx', faceData.cx + radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); - - function smile(face) { - var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth - - face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')'); - } - - function sad(face) { - var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth - - face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')'); - } - - function ambivalent(face) { - face.append('line').attr('class', 'mouth').attr('stroke', 2).attr('x1', faceData.cx - 5).attr('y1', faceData.cy + 7).attr('x2', faceData.cx + 5).attr('y2', faceData.cy + 7).attr('class', 'mouth').attr('stroke-width', '1px').attr('stroke', '#666'); - } - - if (faceData.score > 3) { - smile(face); - } else if (faceData.score < 3) { - sad(face); - } else { - ambivalent(face); - } - - return circleElement; -}; -var drawCircle = function drawCircle(element, circleData) { - var circleElement = element.append('circle'); - circleElement.attr('cx', circleData.cx); - circleElement.attr('cy', circleData.cy); - circleElement.attr('fill', circleData.fill); - circleElement.attr('stroke', circleData.stroke); - circleElement.attr('r', circleData.r); - - if (typeof circleElement.class !== 'undefined') { - circleElement.attr('class', circleElement.class); - } - - if (typeof circleData.title !== 'undefined') { - circleElement.append('title').text(circleData.title); - } - - return circleElement; -}; -var drawText = function drawText(elem, textData) { - // Remove and ignore br:s - var nText = textData.text.replace(//gi, ' '); - var textElem = elem.append('text'); - textElem.attr('x', textData.x); - textElem.attr('y', textData.y); - textElem.attr('class', 'legend'); - textElem.style('text-anchor', textData.anchor); - - if (typeof textData.class !== 'undefined') { - textElem.attr('class', textData.class); - } - - var span = textElem.append('tspan'); - span.attr('x', textData.x + textData.textMargin * 2); - span.text(nText); - return textElem; -}; -var drawLabel = function drawLabel(elem, txtObject) { - function genPoints(x, y, width, height, cut) { - return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height); - } - - var polygon = elem.append('polygon'); - polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7)); - polygon.attr('class', 'labelBox'); - txtObject.y = txtObject.y + txtObject.labelMargin; - txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; - drawText(elem, txtObject); -}; -var drawSection = function drawSection(elem, section, conf) { - var g = elem.append('g'); - var rect = getNoteRect(); - rect.x = section.x; - rect.y = section.y; - rect.fill = section.fill; - rect.width = conf.width; - rect.height = conf.height; - rect.class = 'journey-section section-type-' + section.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - - _drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, { - class: 'journey-section section-type-' + section.num - }, conf, section.colour); -}; -var taskCount = -1; -/** - * Draws an actor in the diagram with the attaced line - * @param elem The HTML element - * @param task The task to render - * @param conf The global configuration - */ - -var drawTask = function drawTask(elem, task, conf) { - var center = task.x + conf.width / 2; - var g = elem.append('g'); - taskCount++; - var maxHeight = 300 + 5 * 30; - g.append('line').attr('id', 'task' + taskCount).attr('x1', center).attr('y1', task.y).attr('x2', center).attr('y2', maxHeight).attr('class', 'task-line').attr('stroke-width', '1px').attr('stroke-dasharray', '4 2').attr('stroke', '#666'); - drawFace(g, { - cx: center, - cy: 300 + (5 - task.score) * 30, - score: task.score - }); - var rect = getNoteRect(); - rect.x = task.x; - rect.y = task.y; - rect.fill = task.fill; - rect.width = conf.width; - rect.height = conf.height; - rect.class = 'task task-type-' + task.num; - rect.rx = 3; - rect.ry = 3; - drawRect(g, rect); - var xPos = task.x + 14; - task.people.forEach(function (person) { - var colour = task.actors[person]; - var circle = { - cx: xPos, - cy: task.y, - r: 7, - fill: colour, - stroke: '#000', - title: person - }; - drawCircle(g, circle); - xPos += 10; - }); - - _drawTextCandidateFunc(conf)(task.task, g, rect.x, rect.y, rect.width, rect.height, { - class: 'task' - }, conf, task.colour); -}; -/** - * Draws a background rectangle - * @param elem The html element - * @param bounds The bounds of the drawing - */ - -var drawBackgroundRect = function drawBackgroundRect(elem, bounds) { - var rectElem = drawRect(elem, { - x: bounds.startx, - y: bounds.starty, - width: bounds.stopx - bounds.startx, - height: bounds.stopy - bounds.starty, - fill: bounds.fill, - class: 'rect' - }); - rectElem.lower(); -}; -var getTextObj = function getTextObj() { - return { - x: 0, - y: 0, - fill: undefined, - 'text-anchor': 'start', - width: 100, - height: 100, - textMargin: 0, - rx: 0, - ry: 0 - }; -}; -var getNoteRect = function getNoteRect() { - return { - x: 0, - y: 0, - width: 100, - anchor: 'start', - height: 100, - rx: 0, - ry: 0 - }; -}; - -var _drawTextCandidateFunc = function () { - function byText(content, g, x, y, width, height, textAttrs, colour) { - var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('font-color', colour).style('text-anchor', 'middle').text(content); - - _setTextAttrs(text, textAttrs); - } - - function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { - var taskFontSize = conf.taskFontSize, - taskFontFamily = conf.taskFontFamily; - var lines = content.split(//gi); - - for (var i = 0; i < lines.length; i++) { - var dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; - var text = g.append('text').attr('x', x + width / 2).attr('y', y).attr('fill', colour).style('text-anchor', 'middle').style('font-size', taskFontSize).style('font-family', taskFontFamily); - text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]); - text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central'); - - _setTextAttrs(text, textAttrs); - } - } - - function byFo(content, g, x, y, width, height, textAttrs, conf) { - var body = g.append('switch'); - var f = body.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height).attr('position', 'fixed'); - var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%'); - text.append('div').attr('class', 'label').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle') // .style('color', colour) - .text(content); - byTspan(content, body, x, y, width, height, textAttrs, conf); - - _setTextAttrs(text, textAttrs); - } - - function _setTextAttrs(toText, fromTextAttrsDict) { - for (var key in fromTextAttrsDict) { - if (key in fromTextAttrsDict) { - // eslint-disable-line - // noinspection JSUnfilteredForInLoop - toText.attr(key, fromTextAttrsDict[key]); - } - } - } - - return function (conf) { - return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan; - }; -}(); - -var initGraphics = function initGraphics(graphics) { - graphics.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead -}; - -/* harmony default export */ __webpack_exports__["default"] = ({ - drawRect: drawRect, - drawCircle: drawCircle, - drawSection: drawSection, - drawText: drawText, - drawLabel: drawLabel, - drawTask: drawTask, - drawBackgroundRect: drawBackgroundRect, - getTextObj: getTextObj, - getNoteRect: getNoteRect, - initGraphics: initGraphics -}); - -/***/ }), - -/***/ "./src/errorRenderer.js": -/*!******************************!*\ - !*** ./src/errorRenderer.js ***! - \******************************/ -/*! exports provided: setConf, draw, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); -/** - * Created by knut on 14-12-11. - */ - - -var conf = {}; -var setConf = function setConf(cnf) { - var keys = Object.keys(cnf); - keys.forEach(function (key) { - conf[key] = cnf[key]; - }); -}; -/** - * Draws a an info picture in the tag with id: id based on the graph definition in text. - * @param text - * @param id - */ - -var draw = function draw(id, ver) { - try { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Renering svg for syntax error\n'); - var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); - var g = svg.append('g'); - g.append('path').attr('class', 'error-icon').attr('d', 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'); - g.append('path').attr('class', 'error-icon').attr('d', 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'); - g.append('path').attr('class', 'error-icon').attr('d', 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'); - g.append('path').attr('class', 'error-icon').attr('d', 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'); - g.append('path').attr('class', 'error-icon').attr('d', 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'); - g.append('path').attr('class', 'error-icon').attr('d', 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'); - g.append('text') // text label for the x axis - .attr('class', 'error-text').attr('x', 1240).attr('y', 250).attr('font-size', '150px').style('text-anchor', 'middle').text('Syntax error in graph'); - g.append('text') // text label for the x axis - .attr('class', 'error-text').attr('x', 1050).attr('y', 400).attr('font-size', '100px').style('text-anchor', 'middle').text('mermaid version ' + ver); - svg.attr('height', 100); - svg.attr('width', 400); - svg.attr('viewBox', '768 0 512 512'); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].error('Error while rendering info diagram'); - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].error(e.message); - } -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - setConf: setConf, - draw: draw -}); - -/***/ }), - -/***/ "./src/logger.js": -/*!***********************!*\ - !*** ./src/logger.js ***! - \***********************/ -/*! exports provided: LEVELS, log, setLogLevel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; }); -/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini"); -/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__); - -var LEVELS = { - debug: 1, - info: 2, - warn: 3, - error: 4, - fatal: 5 -}; -var log = { - debug: function debug() {}, - info: function info() {}, - warn: function warn() {}, - error: function error() {}, - fatal: function fatal() {} -}; -var setLogLevel = function setLogLevel() { - var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fatal'; - - if (isNaN(level)) { - level = level.toLowerCase(); - - if (LEVELS[level] !== undefined) { - level = LEVELS[level]; - } - } - - log.trace = function () {}; - - log.debug = function () {}; - - log.info = function () {}; - - log.warn = function () {}; - - log.error = function () {}; - - log.fatal = function () {}; - - if (level <= LEVELS.fatal) { - log.fatal = console.error ? console.error.bind(console, format('FATAL'), 'color: orange') : console.log.bind(console, '\x1b[35m', format('FATAL')); - } - - if (level <= LEVELS.error) { - log.error = console.error ? console.error.bind(console, format('ERROR'), 'color: orange') : console.log.bind(console, '\x1b[31m', format('ERROR')); - } - - if (level <= LEVELS.warn) { - log.warn = console.warn ? console.warn.bind(console, format('WARN'), 'color: orange') : console.log.bind(console, "\x1B[33m", format('WARN')); - } - - if (level <= LEVELS.info) { - log.info = console.info // ? console.info.bind(console, '\x1b[34m', format('INFO'), 'color: blue') - ? console.info.bind(console, format('INFO'), 'color: lightblue') : console.log.bind(console, '\x1b[34m', format('INFO')); - } - - if (level <= LEVELS.debug) { - log.debug = console.debug ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') : console.log.bind(console, '\x1b[32m', format('DEBUG')); - } -}; - -var format = function format(level) { - var time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('ss.SSS'); - return "%c".concat(time, " : ").concat(level, " : "); -}; - -/***/ }), - -/***/ "./src/mermaid.js": -/*!************************!*\ - !*** ./src/mermaid.js ***! - \************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! entity-decode/browser */ "entity-decode/browser"); -/* harmony import */ var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); -/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mermaidAPI */ "./src/mermaidAPI.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils.js"); -/** - * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render - * the diagrams to svg code. - */ -// import { decode } from 'he'; - - - - -/** - * ## init - * Function that goes through the document to find the chart definitions in there and render them. - * - * The function tags the processed attributes with the attribute data-processed and ignores found elements with the - * attribute already set. This way the init function can be triggered several times. - * - * Optionally, `init` can accept in the second argument one of the following: - * - a DOM Node - * - an array of DOM nodes (as would come from a jQuery selector) - * - a W3C selector, a la `.mermaid` - * - * ```mermaid - * graph LR; - * a(Find elements)-->b{Processed} - * b-->|Yes|c(Leave element) - * b-->|No |d(Transform) - * ``` - * Renders the mermaid diagrams - * @param nodes a css selector or an array of nodes - */ - -var init = function init() { - var _this = this; - - var conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); // console.log('Starting rendering diagrams (init) - mermaid.init', conf); - - var nodes; - - if (arguments.length >= 2) { - /*! sequence config was passed as #1 */ - if (typeof arguments[0] !== 'undefined') { - mermaid.sequenceConfig = arguments[0]; - } - - nodes = arguments[1]; - } else { - nodes = arguments[0]; - } // if last argument is a function this is the callback function - - - var callback; - - if (typeof arguments[arguments.length - 1] === 'function') { - callback = arguments[arguments.length - 1]; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Callback function found'); - } else { - if (typeof conf.mermaid !== 'undefined') { - if (typeof conf.mermaid.callback === 'function') { - callback = conf.mermaid.callback; - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Callback function found'); - } else { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('No Callback function found'); - } - } - } - - nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next - - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Start On Load before: ' + mermaid.startOnLoad); - - if (typeof mermaid.startOnLoad !== 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Start On Load inner: ' + mermaid.startOnLoad); - _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].updateSiteConfig({ - startOnLoad: mermaid.startOnLoad - }); - } - - if (typeof mermaid.ganttConfig !== 'undefined') { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].updateSiteConfig({ - gantt: mermaid.ganttConfig - }); - } - - var nextId = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed).next; - var txt; - - var _loop = function _loop(i) { - var element = nodes[i]; - /*! Check if previously processed */ - - if (!element.getAttribute('data-processed')) { - element.setAttribute('data-processed', true); - } else { - return "continue"; - } - - var id = "mermaid-".concat(nextId()); // Fetch the graph definition including tags - - txt = element.innerHTML; // transforms the html to pure text - - txt = entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default()(txt).trim().replace(//gi, '
'); - var init = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].detectInit(txt); - - if (init) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Detected early reinit: ', init); - } - - try { - _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].render(id, txt, function (svgCode, bindFunctions) { - element.innerHTML = svgCode; - - if (typeof callback !== 'undefined') { - callback(id); - } - - if (bindFunctions) bindFunctions(element); - }, element); - } catch (e) { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn('Syntax Error rendering'); - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn(e); - - if (_this.parseError) { - _this.parseError(e); - } - } - }; - - for (var i = 0; i < nodes.length; i++) { - var _ret = _loop(i); - - if (_ret === "continue") continue; - } -}; - -var initialize = function initialize(config) { - // mermaidAPI.reset(); - if (typeof config.mermaid !== 'undefined') { - if (typeof config.mermaid.startOnLoad !== 'undefined') { - mermaid.startOnLoad = config.mermaid.startOnLoad; - } - - if (typeof config.mermaid.htmlLabels !== 'undefined') { - mermaid.htmlLabels = config.mermaid.htmlLabels; - } - } - - _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].initialize(config); // mermaidAPI.reset(); -}; -/** - * ##contentLoaded - * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and - * calls init for rendering the mermaid diagrams on the page. - */ - - -var contentLoaded = function contentLoaded() { - var config; - - if (mermaid.startOnLoad) { - // No config found, do check API config - config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); - - if (config.startOnLoad) { - mermaid.init(); - } - } else { - if (typeof mermaid.startOnLoad === 'undefined') { - _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('In start, no config'); - config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); - - if (config.startOnLoad) { - mermaid.init(); - } - } - } -}; - -if (typeof document !== 'undefined') { - /*! - * Wait for document loaded before starting the execution - */ - window.addEventListener('load', function () { - contentLoaded(); - }, false); -} - -var mermaid = { - startOnLoad: true, - htmlLabels: true, - mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"], - parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].parse, - render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].render, - init: init, - initialize: initialize, - contentLoaded: contentLoaded -}; -/* harmony default export */ __webpack_exports__["default"] = (mermaid); - -/***/ }), - -/***/ "./src/mermaidAPI.js": -/*!***************************!*\ - !*** ./src/mermaidAPI.js ***! - \***************************/ -/*! exports provided: encodeEntities, decodeEntities, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; }); -/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis */ "stylis"); -/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json"); -var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils.js"); -/* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ "./src/diagrams/flowchart/flowRenderer.js"); -/* harmony import */ var _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer-v2 */ "./src/diagrams/flowchart/flowRenderer-v2.js"); -/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ "./src/diagrams/flowchart/parser/flow.jison"); -/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ "./src/diagrams/flowchart/flowDb.js"); -/* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ "./src/diagrams/sequence/sequenceRenderer.js"); -/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison"); -/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ "./src/diagrams/sequence/sequenceDb.js"); -/* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ "./src/diagrams/gantt/ganttRenderer.js"); -/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison"); -/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js"); -/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js"); -/* harmony import */ var _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/classRenderer-v2 */ "./src/diagrams/class/classRenderer-v2.js"); -/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison"); -/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js"); -/* harmony import */ var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/state/stateRenderer */ "./src/diagrams/state/stateRenderer.js"); -/* harmony import */ var _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/state/stateRenderer-v2 */ "./src/diagrams/state/stateRenderer-v2.js"); -/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/state/parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison"); -/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__); -/* harmony import */ var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/state/stateDb */ "./src/diagrams/state/stateDb.js"); -/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js"); -/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison"); -/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__); -/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js"); -/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js"); -/* harmony import */ var _errorRenderer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./errorRenderer */ "./src/errorRenderer.js"); -/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.jison"); -/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__); -/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js"); -/* harmony import */ var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./diagrams/pie/pieRenderer */ "./src/diagrams/pie/pieRenderer.js"); -/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./diagrams/pie/parser/pie */ "./src/diagrams/pie/parser/pie.jison"); -/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__); -/* harmony import */ var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./diagrams/pie/pieDb */ "./src/diagrams/pie/pieDb.js"); -/* harmony import */ var _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./diagrams/er/erDb */ "./src/diagrams/er/erDb.js"); -/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./diagrams/er/parser/erDiagram */ "./src/diagrams/er/parser/erDiagram.jison"); -/* harmony import */ var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__); -/* harmony import */ var _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./diagrams/er/erRenderer */ "./src/diagrams/er/erRenderer.js"); -/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./diagrams/user-journey/parser/journey */ "./src/diagrams/user-journey/parser/journey.jison"); -/* harmony import */ var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__); -/* harmony import */ var _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./diagrams/user-journey/journeyDb */ "./src/diagrams/user-journey/journeyDb.js"); -/* harmony import */ var _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./diagrams/user-journey/journeyRenderer */ "./src/diagrams/user-journey/journeyRenderer.js"); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./config */ "./src/config.js"); -/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./styles */ "./src/styles.js"); -/* harmony import */ var _themes__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./themes */ "./src/themes/index.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -/** - *Edit this Page[![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js) - * - *This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js. - * - * - * The core of this api is the [**render**](Setup.md?id=render) function which, given a graph - * definition as text, renders the graph/diagram and returns an svg element for the graph. - * - * It is is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different. - * - * In addition to the render function, a number of behavioral configuration options are available. - * - * @name mermaidAPI - */ - - - // import * as configApi from './config'; -// // , { -// // setConfig, -// // configApi.getConfig, -// // configApi.updateSiteConfig, -// // configApi.setSiteConfig, -// // configApi.getSiteConfig, -// // configApi.defaultConfig -// // } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function parse(text) { - var graphInit = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectInit(text); - - if (graphInit) { - reinitialize(graphInit); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('reinit ', graphInit); - } - - var graphType = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectType(text); - var parser; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Type ' + graphType); - - switch (graphType) { - case 'git': - parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default.a; - parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__["default"]; - break; - - case 'flowchart': - _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].clear(); - parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a; - parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"]; - break; - - case 'flowchart-v2': - _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].clear(); - parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a; - parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"]; - break; - - case 'sequence': - parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a; - parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__["default"]; - break; - - case 'gantt': - parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a; - parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"]; - break; - - case 'class': - parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default.a; - parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__["default"]; - break; - - case 'classDiagram': - parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default.a; - parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__["default"]; - break; - - case 'state': - parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a; - parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__["default"]; - break; - - case 'stateDiagram': - parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a; - parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__["default"]; - break; - - case 'info': - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('info info info'); - parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default.a; - parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__["default"]; - break; - - case 'pie': - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('pie'); - parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default.a; - parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__["default"]; - break; - - case 'er': - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('er'); - parser = _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default.a; - parser.parser.yy = _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__["default"]; - break; - - case 'journey': - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Journey'); - parser = _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default.a; - parser.parser.yy = _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__["default"]; - break; - } - - parser.parser.yy.graphType = graphType; - - parser.parser.yy.parseError = function (str, hash) { - var error = { - str: str, - hash: hash - }; - throw error; - }; - - parser.parse(text); - return parser; -} - -var encodeEntities = function encodeEntities(text) { - var txt = text; - txt = txt.replace(/style.*:\S*#.*;/g, function (s) { - var innerTxt = s.substring(0, s.length - 1); - return innerTxt; - }); - txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) { - var innerTxt = s.substring(0, s.length - 1); - return innerTxt; - }); - txt = txt.replace(/#\w+;/g, function (s) { - var innerTxt = s.substring(1, s.length - 1); - var isInt = /^\+?\d+$/.test(innerTxt); - - if (isInt) { - return 'fl°°' + innerTxt + '¶ß'; - } else { - return 'fl°' + innerTxt + '¶ß'; - } - }); - return txt; -}; -var decodeEntities = function decodeEntities(text) { - var txt = text; - txt = txt.replace(/fl°°/g, function () { - return '&#'; - }); - txt = txt.replace(/fl°/g, function () { - return '&'; - }); - txt = txt.replace(/¶ß/g, function () { - return ';'; - }); - return txt; -}; -/** - * Function that renders an svg with a graph from a chart definition. Usage example below. - * - * ```js - * mermaidAPI.initialize({ - * startOnLoad:true - * }); - * $(function(){ - * const graphDefinition = 'graph TB\na-->b'; - * const cb = function(svgGraph){ - * console.log(svgGraph); - * }; - * mermaidAPI.render('id1',graphDefinition,cb); - * }); - *``` - * @param id the id of the element to be rendered - * @param _txt the graph definition - * @param cb callback which is called after rendering is finished with the svg code as inparam. - * @param container selector to element in which a div with the graph temporarily will be inserted. In one is - * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is - * completed. - */ - -var render = function render(id, _txt, cb, container) { - _config__WEBPACK_IMPORTED_MODULE_39__["reset"](); - var txt = _txt; - var graphInit = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectInit(txt); - - if (graphInit) { - _config__WEBPACK_IMPORTED_MODULE_39__["addDirective"](graphInit); - } // else { - // configApi.reset(); - // const siteConfig = configApi.getSiteConfig(); - // configApi.addDirective(siteConfig); - // } - // console.warn('Render fetching config'); - - - var cnf = _config__WEBPACK_IMPORTED_MODULE_39__["getConfig"](); // Check the maximum allowed text size - - if (_txt.length > cnf.maxTextSize) { - txt = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa'; - } - - if (typeof container !== 'undefined') { - container.innerHTML = ''; - Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + cnf.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g'); - } else { - var existingSvg = document.getElementById(id); - - if (existingSvg) { - existingSvg.remove(); - } - - var _element = document.querySelector('#' + 'd' + id); - - if (_element) { - _element.remove(); - } - - Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g'); - } - - window.txt = txt; - txt = encodeEntities(txt); - var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node(); - var graphType = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectType(txt); // insert inline style into svg - - var svg = element.firstChild; - var firstChild = svg.firstChild; - var userStyles = ''; // user provided theme CSS - - if (cnf.themeCSS !== undefined) { - userStyles += "\n".concat(cnf.themeCSS); - } // user provided theme CSS - - - if (cnf.fontFamily !== undefined) { - userStyles += "\n:root { --mermaid-font-family: ".concat(cnf.fontFamily, "}"); - } // user provided theme CSS - - - if (cnf.altFontFamily !== undefined) { - userStyles += "\n:root { --mermaid-alt-font-family: ".concat(cnf.altFontFamily, "}"); - } // classDef - - - if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') { - var classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].getClasses(txt); - - for (var className in classes) { - userStyles += "\n.".concat(className, " > * { ").concat(classes[className].styles.join(' !important; '), " !important; }"); - - if (classes[className].textStyles) { - userStyles += "\n.".concat(className, " tspan { ").concat(classes[className].textStyles.join(' !important; '), " !important; }"); - } - } - } // log.warn(cnf.themeVariables); - - - var stylis = new stylis__WEBPACK_IMPORTED_MODULE_0___default.a(); - var rules = stylis("#".concat(id), Object(_styles__WEBPACK_IMPORTED_MODULE_40__["default"])(graphType, userStyles, cnf.themeVariables)); - var style1 = document.createElement('style'); - style1.innerHTML = rules; - svg.insertBefore(style1, firstChild); // Verify that the generated svgs are ok before removing this - // const style2 = document.createElement('style'); - // const cs = window.getComputedStyle(svg); - // style2.innerHTML = `#d${id} * { - // color: ${cs.color}; - // // font: ${cs.font}; - // // font-family: Arial; - // // font-size: 24px; - // }`; - // svg.insertBefore(style2, firstChild); - - try { - switch (graphType) { - case 'git': - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].setConf(cnf.git); - _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].draw(txt, id, false); - break; - - case 'flowchart': - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].setConf(cnf.flowchart); - _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].draw(txt, id, false); - break; - - case 'flowchart-v2': - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(cnf.flowchart); - _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__["default"].draw(txt, id, false); - break; - - case 'sequence': - cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - - if (cnf.sequenceDiagram) { - // backwards compatibility - _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object.assign(cnf.sequence, cnf.sequenceDiagram)); - console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.'); - } else { - _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(cnf.sequence); - } - - _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].draw(txt, id); - break; - - case 'gantt': - cnf.gantt.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(cnf.gantt); - _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].draw(txt, id); - break; - - case 'class': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(cnf.class); - _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].draw(txt, id); - break; - - case 'classDiagram': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__["default"].setConf(cnf.class); - _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__["default"].draw(txt, id); - break; - - case 'state': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].setConf(cnf.state); - _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].draw(txt, id); - break; - - case 'stateDiagram': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(cnf.state); - _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].draw(txt, id); - break; - - case 'info': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(cnf.class); - _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version); - break; - - case 'pie': - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].setConf(cnf.pie); - _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version); - break; - - case 'er': - _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(cnf.er); - _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version); - break; - - case 'journey': - _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(cnf.journey); - _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version); - break; - } - } catch (e) { - // errorRenderer.setConf(cnf.class); - _errorRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].draw(id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version); - throw e; - } - - Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (cnf.arrowMarkerAbsolute) { - // url = - // window.location.protocol + - // '//' + - // window.location.host + - // window.location.pathname + - // window.location.search; - // url = url.replace(/\(/g, '\\('); - // url = url.replace(/\)/g, '\\)'); - // } - // Fix for when the base tag is used - - var svgCode = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node().innerHTML; - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute); - - if (!cnf.arrowMarkerAbsolute || cnf.arrowMarkerAbsolute === 'false') { - svgCode = svgCode.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#', 'g'); - } - - svgCode = decodeEntities(svgCode); // Fix for when the br tag is used - - svgCode = svgCode.replace(/
/g, '
'); - - if (typeof cb !== 'undefined') { - switch (graphType) { - case 'flowchart': - case 'flowchart-v2': - cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].bindFunctions); - break; - - case 'gantt': - cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"].bindFunctions); - break; - - case 'class': - case 'classDiagram': - cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__["default"].bindFunctions); - break; - - default: - cb(svgCode); - } - } else { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('CB = undefined!'); - } - - var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node(); - - if (node !== null && typeof node.remove === 'function') { - Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#d' + id).node().remove(); - } - - return svgCode; -}; - -var currentDirective = {}; - -var parseDirective = function parseDirective(p, statement, context, type) { - try { - if (statement !== undefined) { - statement = statement.trim(); - - switch (context) { - case 'open_directive': - currentDirective = {}; - break; - - case 'type_directive': - currentDirective.type = statement.toLowerCase(); - break; - - case 'arg_directive': - currentDirective.args = JSON.parse(statement); - break; - - case 'close_directive': - handleDirective(p, currentDirective, type); - currentDirective = null; - break; - } - } - } catch (error) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error("Error while rendering sequenceDiagram directive: ".concat(statement, " jison context: ").concat(context)); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(error.message); - } -}; - -var handleDirective = function handleDirective(p, directive, type) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("Directive type=".concat(directive.type, " with args:"), directive.args); - - switch (directive.type) { - case 'init': - case 'initialize': - { - ['config'].forEach(function (prop) { - if (typeof directive.args[prop] !== 'undefined') { - if (type === 'flowchart-v2') { - type = 'flowchart'; - } - - directive.args[type] = directive.args[prop]; - delete directive.args[prop]; - } - }); - reinitialize(directive.args); - _config__WEBPACK_IMPORTED_MODULE_39__["addDirective"](directive.args); - break; - } - - case 'wrap': - case 'nowrap': - if (p && p['setWrap']) { - p.setWrap(directive.type === 'wrap'); - } - - break; - - default: - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].warn("Unhandled directive: source: '%%{".concat(directive.type, ": ").concat(JSON.stringify(directive.args ? directive.args : {}), "}%%"), directive); - break; - } -}; - -function updateRendererConfigs(conf) { - _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__["default"].setConf(conf.git); - _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].setConf(conf.flowchart); - _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(conf.flowchart); - - if (typeof conf['sequenceDiagram'] !== 'undefined') { - _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object(_utils__WEBPACK_IMPORTED_MODULE_4__["assignWithDepth"])(conf.sequence, conf['sequenceDiagram'])); - } - - _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(conf.sequence); - _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(conf.gantt); - _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(conf.class); - _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__["default"].setConf(conf.state); - _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(conf.state); - _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__["default"].setConf(conf.class); - _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__["default"].setConf(conf.class); - _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__["default"].setConf(conf.er); - _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__["default"].setConf(conf.journey); - _errorRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].setConf(conf.class); -} - -function reinitialize() {// `mermaidAPI.reinitialize: v${pkg.version}`, - // JSON.stringify(options), - // options.themeVariables.primaryColor; - // // if (options.theme && theme[options.theme]) { - // // options.themeVariables = theme[options.theme].getThemeVariables(options.themeVariables); - // // } - // // Set default options - // const config = - // typeof options === 'object' ? configApi.setConfig(options) : configApi.getSiteConfig(); - // updateRendererConfigs(config); - // setLogLevel(config.logLevel); - // log.debug('mermaidAPI.reinitialize: ', config); -} - -function initialize(options) { - // console.warn(`mermaidAPI.initialize: v${pkg.version} `, options); - // Handle legacy location of font-family configuration - if (options && options.fontFamily) { - if (!options.themeVariables) { - options.themeVariables = { - fontFamily: options.fontFamily - }; - } else { - if (!options.themeVariables.fontFamily) { - options.themeVariables = { - fontFamily: options.fontFamily - }; - } - } - } // Set default options - - - _config__WEBPACK_IMPORTED_MODULE_39__["saveConfigFromInitilize"](options); - - if (options && options.theme && _themes__WEBPACK_IMPORTED_MODULE_41__["default"][options.theme]) { - // Todo merge with user options - options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__["default"][options.theme].getThemeVariables(options.themeVariables); - } else { - if (options) options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__["default"].default.getThemeVariables(options.themeVariables); - } - - var config = _typeof(options) === 'object' ? _config__WEBPACK_IMPORTED_MODULE_39__["setSiteConfig"](options) : _config__WEBPACK_IMPORTED_MODULE_39__["getSiteConfig"](); - updateRendererConfigs(config); - Object(_logger__WEBPACK_IMPORTED_MODULE_3__["setLogLevel"])(config.logLevel); // log.debug('mermaidAPI.initialize: ', config); -} - -var mermaidAPI = Object.freeze({ - render: render, - parse: parse, - parseDirective: parseDirective, - initialize: initialize, - reinitialize: reinitialize, - getConfig: _config__WEBPACK_IMPORTED_MODULE_39__["getConfig"], - setConfig: _config__WEBPACK_IMPORTED_MODULE_39__["setConfig"], - getSiteConfig: _config__WEBPACK_IMPORTED_MODULE_39__["getSiteConfig"], - updateSiteConfig: _config__WEBPACK_IMPORTED_MODULE_39__["updateSiteConfig"], - reset: function reset() { - // console.warn('reset'); - _config__WEBPACK_IMPORTED_MODULE_39__["reset"](); // const siteConfig = configApi.getSiteConfig(); - // updateRendererConfigs(siteConfig); - }, - globalReset: function globalReset() { - _config__WEBPACK_IMPORTED_MODULE_39__["reset"](_config__WEBPACK_IMPORTED_MODULE_39__["defaultConfig"]); - updateRendererConfigs(_config__WEBPACK_IMPORTED_MODULE_39__["getConfig"]()); - }, - defaultConfig: _config__WEBPACK_IMPORTED_MODULE_39__["defaultConfig"] -}); -Object(_logger__WEBPACK_IMPORTED_MODULE_3__["setLogLevel"])(_config__WEBPACK_IMPORTED_MODULE_39__["getConfig"]().logLevel); -_config__WEBPACK_IMPORTED_MODULE_39__["reset"](_config__WEBPACK_IMPORTED_MODULE_39__["getConfig"]()); -/* harmony default export */ __webpack_exports__["default"] = (mermaidAPI); -/** - * ## mermaidAPI configuration defaults - * - * ```html - * - * ``` - */ - -/***/ }), - -/***/ "./src/styles.js": -/*!***********************!*\ - !*** ./src/styles.js ***! - \***********************/ -/*! exports provided: calcThemeVariables, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calcThemeVariables", function() { return calcThemeVariables; }); -/* harmony import */ var _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diagrams/class/styles */ "./src/diagrams/class/styles.js"); -/* harmony import */ var _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diagrams/er/styles */ "./src/diagrams/er/styles.js"); -/* harmony import */ var _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagrams/flowchart/styles */ "./src/diagrams/flowchart/styles.js"); -/* harmony import */ var _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./diagrams/gantt/styles */ "./src/diagrams/gantt/styles.js"); -/* harmony import */ var _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./diagrams/git/styles */ "./src/diagrams/git/styles.js"); -/* harmony import */ var _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/info/styles */ "./src/diagrams/info/styles.js"); -/* harmony import */ var _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/pie/styles */ "./src/diagrams/pie/styles.js"); -/* harmony import */ var _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/sequence/styles */ "./src/diagrams/sequence/styles.js"); -/* harmony import */ var _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/state/styles */ "./src/diagrams/state/styles.js"); -/* harmony import */ var _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/user-journey/styles */ "./src/diagrams/user-journey/styles.js"); - - - - - - - - - - -var themes = { - flowchart: _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__["default"], - 'flowchart-v2': _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__["default"], - sequence: _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__["default"], - gantt: _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__["default"], - classDiagram: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__["default"], - 'classDiagram-v2': _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__["default"], - class: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__["default"], - stateDiagram: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__["default"], - state: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__["default"], - git: _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__["default"], - info: _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__["default"], - pie: _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__["default"], - er: _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__["default"], - journey: _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__["default"] -}; -var calcThemeVariables = function calcThemeVariables(theme, userOverRides) { - return theme.calcColors(userOverRides); -}; - -var getStyles = function getStyles(type, userStyles, options) { - //console.warn('options in styles: ', options); - return " {\n font-family: ".concat(options.fontFamily, ";\n font-size: ").concat(options.fontSize, ";\n fill: ").concat(options.textColor, "\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(options.errorBkgColor, ";\n }\n .error-text {\n fill: ").concat(options.errorTextColor, ";\n stroke: ").concat(options.errorTextColor, ";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(options.lineColor, ";\n stroke: ").concat(options.lineColor, ";\n }\n .marker.cross {\n stroke: ").concat(options.lineColor, ";\n }\n\n svg {\n font-family: ").concat(options.fontFamily, ";\n font-size: ").concat(options.fontSize, ";\n }\n\n ").concat(themes[type](options), "\n\n ").concat(userStyles, "\n\n ").concat(type, " { fill: apa;}\n"); -}; - -/* harmony default export */ __webpack_exports__["default"] = (getStyles); - -/***/ }), - -/***/ "./src/themes/index.js": -/*!*****************************!*\ - !*** ./src/themes/index.js ***! - \*****************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _theme_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./theme-base */ "./src/themes/theme-base.js"); -/* harmony import */ var _theme_dark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-dark */ "./src/themes/theme-dark.js"); -/* harmony import */ var _theme_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-default */ "./src/themes/theme-default.js"); -/* harmony import */ var _theme_forest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-forest */ "./src/themes/theme-forest.js"); -/* harmony import */ var _theme_neutral__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./theme-neutral */ "./src/themes/theme-neutral.js"); - - - - - -/* harmony default export */ __webpack_exports__["default"] = ({ - base: { - getThemeVariables: _theme_base__WEBPACK_IMPORTED_MODULE_0__["getThemeVariables"] - }, - dark: { - getThemeVariables: _theme_dark__WEBPACK_IMPORTED_MODULE_1__["getThemeVariables"] - }, - default: { - getThemeVariables: _theme_default__WEBPACK_IMPORTED_MODULE_2__["getThemeVariables"] - }, - forest: { - getThemeVariables: _theme_forest__WEBPACK_IMPORTED_MODULE_3__["getThemeVariables"] - }, - neutral: { - getThemeVariables: _theme_neutral__WEBPACK_IMPORTED_MODULE_4__["getThemeVariables"] - } -}); - -/***/ }), - -/***/ "./src/themes/theme-base.js": -/*!**********************************!*\ - !*** ./src/themes/theme-base.js ***! - \**********************************/ -/*! exports provided: getThemeVariables */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - - - -var Theme = -/*#__PURE__*/ -function () { - function Theme() { - _classCallCheck(this, Theme); - - /** # Base variables */ - - /** * background - used to know what the background color is of the diagram. This is used for deducing colors for istance line color. Defaulr value is #f4f4f4. */ - this.background = '#f4f4f4'; - this.darkMode = false; // this.background = '#0c0c0c'; - // this.darkMode = true; - - this.primaryColor = '#fff4dd'; // this.background = '#0c0c0c'; - // this.primaryColor = '#1f1f00'; - - this.noteBkgColor = '#fff5ad'; - this.noteTextColor = '#333'; // dark - // this.primaryColor = '#034694'; - // this.primaryColor = '#f2ee7e'; - // this.primaryColor = '#9f33be'; - // this.primaryColor = '#f0fff0'; - // this.primaryColor = '#fa255e'; - // this.primaryColor = '#ECECFF'; - // this.secondaryColor = '#c39ea0'; - // this.tertiaryColor = '#f8e5e5'; - // this.secondaryColor = '#dfdfde'; - // this.tertiaryColor = '#CCCCFF'; - - this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; - this.fontSize = '16px'; // this.updateColors(); - } - - _createClass(Theme, [{ - key: "updateColors", - value: function updateColors() { - // The || is to make sure that if the variable has been defiend by a user override that value is to be used - - /* Main */ - this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#ddd' : '#333'); // invert(this.primaryColor); - - this.secondaryColor = this.secondaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -120 - }); - this.tertiaryColor = this.tertiaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 180, - l: 5 - }); - this.primaryBorderColor = this.primaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); - this.secondaryBorderColor = this.secondaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); - this.tertiaryBorderColor = this.tertiaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); - this.noteBorderColor = this.noteBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.noteBkgColor, this.darkMode); - this.secondaryTextColor = this.secondaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); - this.tertiaryTextColor = this.tertiaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); - this.lineColor = this.lineColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.textColor = this.textColor || this.primaryTextColor; - /* Flowchart variables */ - - this.nodeBkg = this.nodeBkg || this.primaryColor; - this.mainBkg = this.mainBkg || this.primaryColor; - this.nodeBorder = this.nodeBorder || this.primaryBorderColor; - this.clusterBkg = this.clusterBkg || this.tertiaryColor; - this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor; - this.defaultLinkColor = this.defaultLinkColor || this.lineColor; - this.titleColor = this.titleColor || this.tertiaryTextColor; - this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.secondaryColor, 30) : this.secondaryColor); - this.nodeTextColor = this.nodeTextColor || this.primaryTextColor; - /* Sequence Diagram variables */ - // this.actorBorder = lighten(this.border1, 0.5); - - this.actorBorder = this.actorBorder || this.primaryBorderColor; - this.actorBkg = this.actorBkg || this.mainBkg; - this.actorTextColor = this.actorTextColor || this.primaryTextColor; - this.actorLineColor = this.actorLineColor || 'grey'; - this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg; - this.signalColor = this.signalColor || this.textColor; - this.signalTextColor = this.signalTextColor || this.textColor; - this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder; - this.labelTextColor = this.labelTextColor || this.actorTextColor; - this.loopTextColor = this.loopTextColor || this.actorTextColor; - this.activationBorderColor = this.activationBorderColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.secondaryColor, 10); - this.activationBkgColor = this.activationBkgColor || this.secondaryColor; - this.sequenceNumberColor = this.sequenceNumberColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.lineColor); - /* Gantt chart variables */ - - this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor; - this.altSectionBkgColor = this.altSectionBkgColor || 'white'; - this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor; - this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor; - this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor; - this.taskBkgColor = this.taskBkgColor || this.primaryColor; - this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor; - this.activeTaskBkgColor = this.activeTaskBkgColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 23); - this.gridColor = this.gridColor || 'lightgrey'; - this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey'; - this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey'; - this.critBorderColor = this.critBorderColor || '#ff8888'; - this.critBkgColor = this.critBkgColor || 'red'; - this.todayLineColor = this.todayLineColor || 'red'; - this.taskTextColor = this.taskTextColor || this.textColor; - this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor; - this.taskTextLightColor = this.taskTextLightColor || this.textColor; - this.taskTextColor = this.taskTextColor || this.primaryTextColor; - this.taskTextDarkColor = this.taskTextDarkColor || this.textColor; - this.taskTextClickableColor = this.taskTextClickableColor || '#003163'; - /* state colors */ - - this.labelColor = this.labelColor || this.primaryTextColor; - this.altBackground = this.altBackground || this.tertiaryColor; - this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; - this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; - /* class */ - - this.classText = this.classText || this.textColor; - /* user-journey */ - - this.fillType0 = this.fillType0 || this.primaryColor; - this.fillType1 = this.fillType1 || this.secondaryColor; - this.fillType2 = this.fillType2 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 64 - }); - this.fillType3 = this.fillType3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 64 - }); - this.fillType4 = this.fillType4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -64 - }); - this.fillType5 = this.fillType5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: -64 - }); - this.fillType6 = this.fillType6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 128 - }); - this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 128 - }); - } - }, { - key: "calculate", - value: function calculate(overrides) { - var _this = this; - - if (_typeof(overrides) !== 'object') { - // Calculate colors form base colors - this.updateColors(); - return; - } - - var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); // Calculate colors form base colors - - this.updateColors(); // Copy values from overrides again in case of an override of derived value - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); - } - }]); - - return Theme; -}(); - -var getThemeVariables = function getThemeVariables(userOverrides) { - var theme = new Theme(); - theme.calculate(userOverrides); - return theme; -}; - -/***/ }), - -/***/ "./src/themes/theme-dark.js": -/*!**********************************!*\ - !*** ./src/themes/theme-dark.js ***! - \**********************************/ -/*! exports provided: getThemeVariables */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - - - -var Theme = -/*#__PURE__*/ -function () { - function Theme() { - _classCallCheck(this, Theme); - - this.background = '#333'; - this.primaryColor = '#1f2020'; - this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 16); - this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -160 - }); - this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); - this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); - this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); - this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); - this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); - this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); - this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.mainBkg = '#1f2020'; - this.secondBkg = 'calculated'; - this.mainContrastColor = 'lightgrey'; - this.darkTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])('#323D47'), 10); - this.lineColor = 'calculated'; - this.border1 = '#81B1DB'; - this.border2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 0.25); - this.arrowheadColor = 'calculated'; - this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; - this.fontSize = '16px'; - this.labelBackground = '#181818'; - this.textColor = '#ccc'; - /* Flowchart variables */ - - this.nodeBkg = 'calculated'; - this.nodeBorder = 'calculated'; - this.clusterBkg = 'calculated'; - this.clusterBorder = 'calculated'; - this.defaultLinkColor = 'calculated'; - this.titleColor = '#F9FFFE'; - this.edgeLabelBackground = 'calculated'; - /* Sequence Diagram variables */ - - this.actorBorder = 'calculated'; - this.actorBkg = 'calculated'; - this.actorTextColor = 'calculated'; - this.actorLineColor = 'calculated'; - this.signalColor = 'calculated'; - this.signalTextColor = 'calculated'; - this.labelBoxBkgColor = 'calculated'; - this.labelBoxBorderColor = 'calculated'; - this.labelTextColor = 'calculated'; - this.loopTextColor = 'calculated'; - this.noteBorderColor = 'calculated'; - this.noteBkgColor = '#fff5ad'; - this.noteTextColor = 'calculated'; - this.activationBorderColor = 'calculated'; - this.activationBkgColor = 'calculated'; - this.sequenceNumberColor = 'black'; - /* Gantt chart variables */ - - this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])('#EAE8D9', 30); - this.altSectionBkgColor = 'calculated'; - this.sectionBkgColor2 = '#EAE8D9'; - this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 70); - this.taskBkgColor = 'calculated'; - this.taskTextColor = 'calculated'; - this.taskTextLightColor = 'calculated'; - this.taskTextOutsideColor = 'calculated'; - this.taskTextClickableColor = '#003163'; - this.activeTaskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(255, 255, 255, 50); - this.activeTaskBkgColor = '#81B1DB'; - this.gridColor = 'calculated'; - this.doneTaskBkgColor = 'calculated'; - this.doneTaskBorderColor = 'grey'; - this.critBorderColor = '#E83737'; - this.critBkgColor = '#E83737'; - this.taskTextDarkColor = 'calculated'; - this.todayLineColor = '#DB5757'; - /* state colors */ - - this.labelColor = 'calculated'; - this.errorBkgColor = '#a44141'; - this.errorTextColor = '#ddd'; - } - - _createClass(Theme, [{ - key: "updateColors", - value: function updateColors() { - this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.mainBkg, 16); - this.lineColor = this.mainContrastColor; - this.arrowheadColor = this.mainContrastColor; - /* Flowchart variables */ - - this.nodeBkg = this.mainBkg; - this.nodeBorder = this.border1; - this.clusterBkg = this.secondBkg; - this.clusterBorder = this.border2; - this.defaultLinkColor = this.lineColor; - this.edgeLabelBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.labelBackground, 25); - /* Sequence Diagram variables */ - - this.actorBorder = this.border1; - this.actorBkg = this.mainBkg; - this.actorTextColor = this.mainContrastColor; - this.actorLineColor = this.mainContrastColor; - this.signalColor = this.mainContrastColor; - this.signalTextColor = this.mainContrastColor; - this.labelBoxBkgColor = this.actorBkg; - this.labelBoxBorderColor = this.actorBorder; - this.labelTextColor = this.mainContrastColor; - this.loopTextColor = this.mainContrastColor; - this.noteBorderColor = this.border2; - this.noteTextColor = this.mainBkg; - this.activationBorderColor = this.border1; - this.activationBkgColor = this.secondBkg; - /* Gantt chart variables */ - - this.altSectionBkgColor = this.background; - this.taskBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.mainBkg, 23); - this.taskTextColor = this.darkTextColor; - this.taskTextLightColor = this.mainContrastColor; - this.taskTextOutsideColor = this.taskTextLightColor; - this.gridColor = this.mainContrastColor; - this.doneTaskBkgColor = this.mainContrastColor; - this.taskTextDarkColor = this.darkTextColor; - /* state colors */ - - this.labelColor = this.textColor; - this.altBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.background, 20); - this.fillType0 = this.primaryColor; - this.fillType1 = this.secondaryColor; - this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 64 - }); - this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 64 - }); - this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -64 - }); - this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: -64 - }); - this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 128 - }); - this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 128 - }); - /* class */ - - this.classText = this.primaryTextColor; - } - }, { - key: "calculate", - value: function calculate(overrides) { - var _this = this; - - if (_typeof(overrides) !== 'object') { - // Calculate colors form base colors - this.updateColors(); - return; - } - - var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); // Calculate colors form base colors - - this.updateColors(); // Copy values from overrides again in case of an override of derived value - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); - } - }]); - - return Theme; -}(); - -var getThemeVariables = function getThemeVariables(userOverrides) { - var theme = new Theme(); - theme.calculate(userOverrides); - return theme; -}; - -/***/ }), - -/***/ "./src/themes/theme-default.js": -/*!*************************************!*\ - !*** ./src/themes/theme-default.js ***! - \*************************************/ -/*! exports provided: getThemeVariables */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - - - -var Theme = -/*#__PURE__*/ -function () { - function Theme() { - _classCallCheck(this, Theme); - - /* Base variables */ - this.background = '#f4f4f4'; - this.primaryColor = '#ECECFF'; - this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 120 - }); - this.secondaryColor = '#ffffde'; - this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -160 - }); - this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); - this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); - this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode); - - this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); - this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); - this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); - this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.background = 'white'; - this.mainBkg = '#ECECFF'; - this.secondBkg = '#ffffde'; - this.lineColor = '#333333'; - this.border1 = '#9370DB'; - this.border2 = '#aaaa33'; - this.arrowheadColor = '#333333'; - this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; - this.fontSize = '16px'; - this.labelBackground = '#e8e8e8'; - this.textColor = '#333'; - /* Flowchart variables */ - - this.nodeBkg = 'calculated'; - this.nodeBorder = 'calculated'; - this.clusterBkg = 'calculated'; - this.clusterBorder = 'calculated'; - this.defaultLinkColor = 'calculated'; - this.titleColor = 'calculated'; - this.edgeLabelBackground = 'calculated'; - /* Sequence Diagram variables */ - - this.actorBorder = 'calculated'; - this.actorBkg = 'calculated'; - this.actorTextColor = 'black'; - this.actorLineColor = 'grey'; - this.signalColor = 'calculated'; - this.signalTextColor = 'calculated'; - this.labelBoxBkgColor = 'calculated'; - this.labelBoxBorderColor = 'calculated'; - this.labelTextColor = 'calculated'; - this.loopTextColor = 'calculated'; - this.noteBorderColor = 'calculated'; - this.noteBkgColor = '#fff5ad'; - this.noteTextColor = 'calculated'; - this.activationBorderColor = '#666'; - this.activationBkgColor = '#f4f4f4'; - this.sequenceNumberColor = 'white'; - /* Gantt chart variables */ - - this.sectionBkgColor = 'calculated'; - this.altSectionBkgColor = 'calculated'; - this.sectionBkgColor2 = 'calculated'; - this.taskBorderColor = 'calculated'; - this.taskBkgColor = 'calculated'; - this.taskTextLightColor = 'calculated'; - this.taskTextColor = this.taskTextLightColor; - this.taskTextDarkColor = 'calculated'; - this.taskTextOutsideColor = this.taskTextDarkColor; - this.taskTextClickableColor = 'calculated'; - this.activeTaskBorderColor = 'calculated'; - this.activeTaskBkgColor = 'calculated'; - this.gridColor = 'calculated'; - this.doneTaskBkgColor = 'calculated'; - this.doneTaskBorderColor = 'calculated'; - this.critBorderColor = 'calculated'; - this.critBkgColor = 'calculated'; - this.todayLineColor = 'calculated'; - this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(102, 102, 255, 0.49); - this.altSectionBkgColor = 'white'; - this.sectionBkgColor2 = '#fff400'; - this.taskBorderColor = '#534fbc'; - this.taskBkgColor = '#8a90dd'; - this.taskTextLightColor = 'white'; - this.taskTextColor = 'calculated'; - this.taskTextDarkColor = 'black'; - this.taskTextOutsideColor = 'calculated'; - this.taskTextClickableColor = '#003163'; - this.activeTaskBorderColor = '#534fbc'; - this.activeTaskBkgColor = '#bfc7ff'; - this.gridColor = 'lightgrey'; - this.doneTaskBkgColor = 'lightgrey'; - this.doneTaskBorderColor = 'grey'; - this.critBorderColor = '#ff8888'; - this.critBkgColor = 'red'; - this.todayLineColor = 'red'; - /* state colors */ - - this.labelColor = 'black'; - this.errorBkgColor = '#552222'; - this.errorTextColor = '#552222'; - this.updateColors(); - } - - _createClass(Theme, [{ - key: "updateColors", - value: function updateColors() { - /* Flowchart variables */ - this.nodeBkg = this.mainBkg; - this.nodeBorder = this.border1; // border 1 - - this.clusterBkg = this.secondBkg; - this.clusterBorder = this.border2; - this.defaultLinkColor = this.lineColor; - this.titleColor = this.textColor; - this.edgeLabelBackground = this.labelBackground; - /* Sequence Diagram variables */ - // this.actorBorder = lighten(this.border1, 0.5); - - this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23); - this.actorBkg = this.mainBkg; - this.labelBoxBkgColor = this.actorBkg; - this.signalColor = this.textColor; - this.signalTextColor = this.textColor; - this.labelBoxBorderColor = this.actorBorder; - this.labelTextColor = this.actorTextColor; - this.loopTextColor = this.actorTextColor; - this.noteBorderColor = this.border2; - this.noteTextColor = this.actorTextColor; - /* Gantt chart variables */ - - this.taskTextColor = this.taskTextLightColor; - this.taskTextOutsideColor = this.taskTextDarkColor; - /* state colors */ - - /* class */ - - this.classText = this.primaryTextColor; - /* journey */ - - this.fillType0 = this.primaryColor; - this.fillType1 = this.secondaryColor; - this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 64 - }); - this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 64 - }); - this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -64 - }); - this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: -64 - }); - this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 128 - }); - this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 128 - }); - } - }, { - key: "calculate", - value: function calculate(overrides) { - var _this = this; - - if (_typeof(overrides) !== 'object') { - // Calculate colors form base colors - this.updateColors(); - return; - } - - var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); // Calculate colors form base colors - - this.updateColors(); // Copy values from overrides again in case of an override of derived value - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); - } - }]); - - return Theme; -}(); - -var getThemeVariables = function getThemeVariables(userOverrides) { - var theme = new Theme(); - theme.calculate(userOverrides); - return theme; -}; - -/***/ }), - -/***/ "./src/themes/theme-forest.js": -/*!************************************!*\ - !*** ./src/themes/theme-forest.js ***! - \************************************/ -/*! exports provided: getThemeVariables */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - - - -var Theme = -/*#__PURE__*/ -function () { - function Theme() { - _classCallCheck(this, Theme); - - /* Base vales */ - this.background = '#f4f4f4'; - this.primaryColor = '#cde498'; - this.secondaryColor = '#cdffb2'; - this.background = 'white'; - this.mainBkg = '#cde498'; - this.secondBkg = '#cdffb2'; - this.lineColor = 'green'; - this.border1 = '#13540c'; - this.border2 = '#6eaa49'; - this.arrowheadColor = 'green'; - this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; - this.fontSize = '16px'; - this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])('#cde498', 10); - this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); - this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); - this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); - this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); - this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); - this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); - this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - /* Flowchart variables */ - - this.nodeBkg = 'calculated'; - this.nodeBorder = 'calculated'; - this.clusterBkg = 'calculated'; - this.clusterBorder = 'calculated'; - this.defaultLinkColor = 'calculated'; - this.titleColor = '#333'; - this.edgeLabelBackground = '#e8e8e8'; - /* Sequence Diagram variables */ - - this.actorBorder = 'calculated'; - this.actorBkg = 'calculated'; - this.actorTextColor = 'black'; - this.actorLineColor = 'grey'; - this.signalColor = '#333'; - this.signalTextColor = '#333'; - this.labelBoxBkgColor = 'calculated'; - this.labelBoxBorderColor = '#326932'; - this.labelTextColor = 'calculated'; - this.loopTextColor = 'calculated'; - this.noteBorderColor = 'calculated'; - this.noteBkgColor = '#fff5ad'; - this.noteTextColor = 'calculated'; - this.activationBorderColor = '#666'; - this.activationBkgColor = '#f4f4f4'; - this.sequenceNumberColor = 'white'; - /* Gantt chart variables */ - - this.sectionBkgColor = '#6eaa49'; - this.altSectionBkgColor = 'white'; - this.sectionBkgColor2 = '#6eaa49'; - this.taskBorderColor = 'calculated'; - this.taskBkgColor = '#487e3a'; - this.taskTextLightColor = 'white'; - this.taskTextColor = 'calculated'; - this.taskTextDarkColor = 'black'; - this.taskTextOutsideColor = 'calculated'; - this.taskTextClickableColor = '#003163'; - this.activeTaskBorderColor = 'calculated'; - this.activeTaskBkgColor = 'calculated'; - this.gridColor = 'lightgrey'; - this.doneTaskBkgColor = 'lightgrey'; - this.doneTaskBorderColor = 'grey'; - this.critBorderColor = '#ff8888'; - this.critBkgColor = 'red'; - this.todayLineColor = 'red'; - /* state colors */ - - this.labelColor = 'black'; - this.errorBkgColor = '#552222'; - this.errorTextColor = '#552222'; - } - - _createClass(Theme, [{ - key: "updateColors", - value: function updateColors() { - /* Flowchart variables */ - this.nodeBkg = this.mainBkg; - this.nodeBorder = this.border1; - this.clusterBkg = this.secondBkg; - this.clusterBorder = this.border2; - this.defaultLinkColor = this.lineColor; - /* Sequence Diagram variables */ - - this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.mainBkg, 20); - this.actorBkg = this.mainBkg; - this.labelBoxBkgColor = this.actorBkg; - this.labelTextColor = this.actorTextColor; - this.loopTextColor = this.actorTextColor; - this.noteBorderColor = this.border2; - this.noteTextColor = this.actorTextColor; - /* Gantt chart variables */ - - this.taskBorderColor = this.border1; - this.taskTextColor = this.taskTextLightColor; - this.taskTextOutsideColor = this.taskTextDarkColor; - this.activeTaskBorderColor = this.taskBorderColor; - this.activeTaskBkgColor = this.mainBkg; - /* state colors */ - - /* class */ - - this.classText = this.primaryTextColor; - /* journey */ - - this.fillType0 = this.primaryColor; - this.fillType1 = this.secondaryColor; - this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 64 - }); - this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 64 - }); - this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -64 - }); - this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: -64 - }); - this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 128 - }); - this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 128 - }); - } - }, { - key: "calculate", - value: function calculate(overrides) { - var _this = this; - - if (_typeof(overrides) !== 'object') { - // Calculate colors form base colors - this.updateColors(); - return; - } - - var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); // Calculate colors form base colors - - this.updateColors(); // Copy values from overrides again in case of an override of derived value - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); - } - }]); - - return Theme; -}(); - -var getThemeVariables = function getThemeVariables(userOverrides) { - var theme = new Theme(); - theme.calculate(userOverrides); - return theme; -}; - -/***/ }), - -/***/ "./src/themes/theme-helpers.js": -/*!*************************************!*\ - !*** ./src/themes/theme-helpers.js ***! - \*************************************/ -/*! exports provided: mkBorder */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mkBorder", function() { return mkBorder; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); - -var mkBorder = function mkBorder(col, darkMode) { - return darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(col, { - s: -40, - l: 10 - }) : Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(col, { - s: -40, - l: -10 - }); -}; - -/***/ }), - -/***/ "./src/themes/theme-neutral.js": -/*!*************************************!*\ - !*** ./src/themes/theme-neutral.js ***! - \*************************************/ -/*! exports provided: getThemeVariables */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); -/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - - - // const Color = require ( 'khroma/dist/color' ).default -// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => "#EAF2FB" - -var Theme = -/*#__PURE__*/ -function () { - function Theme() { - _classCallCheck(this, Theme); - - this.primaryColor = '#eee'; - this.contrast = '#26a'; - this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 55); - this.background = '#ffffff'; // this.secondaryColor = adjust(this.primaryColor, { h: 120 }); - - this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -160 - }); - this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); - this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); - this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode); - - this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); - this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); - this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); - this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); - this.altBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 55); - this.mainBkg = '#eee'; - this.secondBkg = 'calculated'; - this.lineColor = '#666'; - this.border1 = '#999'; - this.border2 = 'calculated'; - this.note = '#ffa'; - this.text = '#333'; - this.critical = '#d42'; - this.done = '#bbb'; - this.arrowheadColor = '#333333'; - this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; - this.fontSize = '16px'; - /* Flowchart variables */ - - this.nodeBkg = 'calculated'; - this.nodeBorder = 'calculated'; - this.clusterBkg = 'calculated'; - this.clusterBorder = 'calculated'; - this.defaultLinkColor = 'calculated'; - this.titleColor = 'calculated'; - this.edgeLabelBackground = 'white'; - /* Sequence Diagram variables */ - - this.actorBorder = 'calculated'; - this.actorBkg = 'calculated'; - this.actorTextColor = 'calculated'; - this.actorLineColor = 'calculated'; - this.signalColor = 'calculated'; - this.signalTextColor = 'calculated'; - this.labelBoxBkgColor = 'calculated'; - this.labelBoxBorderColor = 'calculated'; - this.labelTextColor = 'calculated'; - this.loopTextColor = 'calculated'; - this.noteBorderColor = 'calculated'; - this.noteBkgColor = 'calculated'; - this.noteTextColor = 'calculated'; - this.activationBorderColor = '#666'; - this.activationBkgColor = '#f4f4f4'; - this.sequenceNumberColor = 'white'; - /* Gantt chart variables */ - - this.sectionBkgColor = 'calculated'; - this.altSectionBkgColor = 'white'; - this.sectionBkgColor2 = 'calculated'; - this.taskBorderColor = 'calculated'; - this.taskBkgColor = 'calculated'; - this.taskTextLightColor = 'white'; - this.taskTextColor = 'calculated'; - this.taskTextDarkColor = 'calculated'; - this.taskTextOutsideColor = 'calculated'; - this.taskTextClickableColor = '#003163'; - this.activeTaskBorderColor = 'calculated'; - this.activeTaskBkgColor = 'calculated'; - this.gridColor = 'calculated'; - this.doneTaskBkgColor = 'calculated'; - this.doneTaskBorderColor = 'calculated'; - this.critBkgColor = 'calculated'; - this.critBorderColor = 'calculated'; - this.todayLineColor = 'calculated'; - /* state colors */ - - this.labelColor = 'black'; - this.errorBkgColor = '#552222'; - this.errorTextColor = '#552222'; - } - - _createClass(Theme, [{ - key: "updateColors", - value: function updateColors() { - this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 55); - this.border2 = this.contrast; - /* Flowchart variables */ - - this.nodeBkg = this.mainBkg; - this.nodeBorder = this.border1; - this.clusterBkg = this.secondBkg; - this.clusterBorder = this.border2; - this.defaultLinkColor = this.lineColor; - this.titleColor = this.text; - /* Sequence Diagram variables */ - - this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23); - this.actorBkg = this.mainBkg; - this.actorTextColor = this.text; - this.actorLineColor = this.lineColor; - this.signalColor = this.text; - this.signalTextColor = this.text; - this.labelBoxBkgColor = this.actorBkg; - this.labelBoxBorderColor = this.actorBorder; - this.labelTextColor = this.text; - this.loopTextColor = this.text; - this.noteBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.note, 60); - this.noteBkgColor = this.note; - this.noteTextColor = this.actorTextColor; - /* Gantt chart variables */ - - this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 30); - this.sectionBkgColor2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.contrast, 30); - this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.contrast, 10); - this.taskBkgColor = this.contrast; - this.taskTextColor = this.taskTextLightColor; - this.taskTextDarkColor = this.text; - this.taskTextOutsideColor = this.taskTextDarkColor; - this.activeTaskBorderColor = this.taskBorderColor; - this.activeTaskBkgColor = this.mainBkg; - this.gridColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 30); - this.doneTaskBkgColor = this.done; - this.doneTaskBorderColor = this.lineColor; - this.critBkgColor = this.critical; - this.critBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.critBkgColor, 10); - this.todayLineColor = this.critBkgColor; - /* state colors */ - - /* class */ - - this.classText = this.primaryTextColor; - /* journey */ - - this.fillType0 = this.primaryColor; - this.fillType1 = this.secondaryColor; - this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 64 - }); - this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 64 - }); - this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: -64 - }); - this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: -64 - }); - this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { - h: 128 - }); - this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { - h: 128 - }); - } - }, { - key: "calculate", - value: function calculate(overrides) { - var _this = this; - - if (_typeof(overrides) !== 'object') { - // Calculate colors form base colors - this.updateColors(); - return; - } - - var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); // Calculate colors form base colors - - this.updateColors(); // Copy values from overrides again in case of an override of derived value - - keys.forEach(function (k) { - _this[k] = overrides[k]; - }); - } - }]); - - return Theme; -}(); - -var getThemeVariables = function getThemeVariables(userOverrides) { - var theme = new Theme(); - theme.calculate(userOverrides); - return theme; -}; - -/***/ }), - -/***/ "./src/utils.js": -/*!**********************!*\ - !*** ./src/utils.js ***! - \**********************/ -/*! exports provided: detectInit, detectDirective, detectType, isSubstringInArray, interpolateToCurve, formatUrl, runFunc, getStylesFromArray, generateId, random, assignWithDepth, getTextObj, drawSimpleText, wrapLabel, calculateTextHeight, calculateTextWidth, calculateTextDimensions, calculateSvgSizeAttrs, configureSvgSize, initIdGeneratior, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectInit", function() { return detectInit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectDirective", function() { return detectDirective; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatUrl", function() { return formatUrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runFunc", function() { return runFunc; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStylesFromArray", function() { return getStylesFromArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateId", function() { return generateId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignWithDepth", function() { return assignWithDepth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSimpleText", function() { return drawSimpleText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapLabel", function() { return wrapLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateTextHeight", function() { return calculateTextHeight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateTextWidth", function() { return calculateTextWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateTextDimensions", function() { return calculateTextDimensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateSvgSizeAttrs", function() { return calculateSvgSizeAttrs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configureSvgSize", function() { return configureSvgSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initIdGeneratior", function() { return initIdGeneratior; }); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url"); -/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); -/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./diagrams/common/common */ "./src/diagrams/common/common.js"); -/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); -var _this = undefined; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - - - - - // import cryptoRandomString from 'crypto-random-string'; -// Effectively an enum of the supported curve types, accessible by name - -var d3CurveTypes = { - curveBasis: d3__WEBPACK_IMPORTED_MODULE_1__["curveBasis"], - curveBasisClosed: d3__WEBPACK_IMPORTED_MODULE_1__["curveBasisClosed"], - curveBasisOpen: d3__WEBPACK_IMPORTED_MODULE_1__["curveBasisOpen"], - curveLinear: d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"], - curveLinearClosed: d3__WEBPACK_IMPORTED_MODULE_1__["curveLinearClosed"], - curveMonotoneX: d3__WEBPACK_IMPORTED_MODULE_1__["curveMonotoneX"], - curveMonotoneY: d3__WEBPACK_IMPORTED_MODULE_1__["curveMonotoneY"], - curveNatural: d3__WEBPACK_IMPORTED_MODULE_1__["curveNatural"], - curveStep: d3__WEBPACK_IMPORTED_MODULE_1__["curveStep"], - curveStepAfter: d3__WEBPACK_IMPORTED_MODULE_1__["curveStepAfter"], - curveStepBefore: d3__WEBPACK_IMPORTED_MODULE_1__["curveStepBefore"] -}; -var directive = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; -var directiveWithoutOpen = /\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; -var anyComment = /\s*%%.*\n/gm; -/** - * @function detectInit - * Detects the init config object from the text - * ```mermaid - * %%{init: {"theme": "debug", "logLevel": 1 }}%% - * graph LR - * a-->b - * b-->c - * c-->d - * d-->e - * e-->f - * f-->g - * g-->h - * ``` - * or - * ```mermaid - * %%{initialize: {"theme": "dark", logLevel: "debug" }}%% - * graph LR - * a-->b - * b-->c - * c-->d - * d-->e - * e-->f - * f-->g - * g-->h - * ``` - * - * @param {string} text The text defining the graph - * @returns {object} the json object representing the init passed to mermaid.initialize() - */ - -var detectInit = function detectInit(text) { - var inits = detectDirective(text, /(?:init\b)|(?:initialize\b)/); - var results = {}; - - if (Array.isArray(inits)) { - var args = inits.map(function (init) { - return init.args; - }); - results = assignWithDepth(results, _toConsumableArray(args)); - } else { - results = inits.args; - } - - if (results) { - var type = detectType(text); - ['config'].forEach(function (prop) { - if (typeof results[prop] !== 'undefined') { - if (type === 'flowchart-v2') { - type = 'flowchart'; - } - - results[type] = results[prop]; - delete results[prop]; - } - }); - } - - return results; -}; -/** - * @function detectDirective - * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted - * the first directive encountered in text will be returned - * ```mermaid - * graph LR - * %%{somedirective}%% - * a-->b - * b-->c - * c-->d - * d-->e - * e-->f - * f-->g - * g-->h - * ``` - * - * @param {string} text The text defining the graph - * @param {string|RegExp} type The directive to return (default: null) - * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type - * if a single directive was found, that directive object will be returned. - */ - -var detectDirective = function detectDirective(text) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - try { - var commentWithoutDirectives = new RegExp("[%]{2}(?![{]".concat(directiveWithoutOpen.source, ")(?=[}][%]{2}).*\n"), 'ig'); - text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '"'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug("Detecting diagram directive".concat(type !== null ? ' type:' + type : '', " based on the text:").concat(text)); - var match, - result = []; - - while ((match = directive.exec(text)) !== null) { - // This is necessary to avoid infinite loops with zero-width matches - if (match.index === directive.lastIndex) { - directive.lastIndex++; - } - - if (match && !type || type && match[1] && match[1].match(type) || type && match[2] && match[2].match(type)) { - var _type = match[1] ? match[1] : match[2]; - - var args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null; - result.push({ - type: _type, - args: args - }); - } - } - - if (result.length === 0) { - result.push({ - type: text, - args: null - }); - } - - return result.length === 1 ? result[0] : result; - } catch (error) { - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error("ERROR: ".concat(error.message, " - Unable to parse directive").concat(type !== null ? ' type:' + type : '', " based on the text:").concat(text)); - return { - type: null, - args: null - }; - } -}; -/** - * @function detectType - * Detects the type of the graph text. Takes into consideration the possible existence of an %%init - * directive - * ```mermaid - * %%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%% - * graph LR - * a-->b - * b-->c - * c-->d - * d-->e - * e-->f - * f-->g - * g-->h - * ``` - * - * @param {string} text The text defining the graph - * @returns {string} A graph definition key - */ - -var detectType = function detectType(text) { - text = text.replace(directive, '').replace(anyComment, '\n'); - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Detecting diagram type based on the text ' + text); - - if (text.match(/^\s*sequenceDiagram/)) { - return 'sequence'; - } - - if (text.match(/^\s*gantt/)) { - return 'gantt'; - } - - if (text.match(/^\s*classDiagram-v2/)) { - return 'classDiagram'; - } - - if (text.match(/^\s*classDiagram/)) { - return 'class'; - } - - if (text.match(/^\s*stateDiagram-v2/)) { - return 'stateDiagram'; - } - - if (text.match(/^\s*stateDiagram/)) { - return 'state'; - } - - if (text.match(/^\s*gitGraph/)) { - return 'git'; - } - - if (text.match(/^\s*flowchart/)) { - return 'flowchart-v2'; - } - - if (text.match(/^\s*info/)) { - return 'info'; - } - - if (text.match(/^\s*pie/)) { - return 'pie'; - } - - if (text.match(/^\s*erDiagram/)) { - return 'er'; - } - - if (text.match(/^\s*journey/)) { - return 'journey'; - } - - return 'flowchart'; -}; - -var memoize = function memoize(fn, resolver) { - var cache = {}; - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var n = resolver ? resolver.apply(_this, args) : args[0]; - - if (n in cache) { - return cache[n]; - } else { - var result = fn.apply(void 0, args); - cache[n] = result; - return result; - } - }; -}; -/** - * @function isSubstringInArray - * Detects whether a substring in present in a given array - * @param {string} str The substring to detect - * @param {array} arr The array to search - * @returns {number} the array index containing the substring or -1 if not present - **/ - - -var isSubstringInArray = function isSubstringInArray(str, arr) { - for (var i = 0; i < arr.length; i++) { - if (arr[i].match(str)) return i; - } - - return -1; -}; -var interpolateToCurve = function interpolateToCurve(interpolate, defaultCurve) { - if (!interpolate) { - return defaultCurve; - } - - var curveName = "curve".concat(interpolate.charAt(0).toUpperCase() + interpolate.slice(1)); - return d3CurveTypes[curveName] || defaultCurve; -}; -var formatUrl = function formatUrl(linkStr, config) { - var url = linkStr.trim(); - - if (url) { - if (config.securityLevel !== 'loose') { - return Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__["sanitizeUrl"])(url); - } - - return url; - } -}; -var runFunc = function runFunc(functionName) { - var _obj; - - var arrPaths = functionName.split('.'); - var len = arrPaths.length - 1; - var fnName = arrPaths[len]; - var obj = window; - - for (var i = 0; i < len; i++) { - obj = obj[arrPaths[i]]; - if (!obj) return; - } - - for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - params[_key2 - 1] = arguments[_key2]; - } - - (_obj = obj)[fnName].apply(_obj, params); -}; - -var distance = function distance(p1, p2) { - return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0; -}; - -var traverseEdge = function traverseEdge(points) { - var prevPoint; - var totalDistance = 0; - points.forEach(function (point) { - totalDistance += distance(point, prevPoint); - prevPoint = point; - }); // Traverse half of total distance along points - - var remainingDistance = totalDistance / 2; - var center = undefined; - prevPoint = undefined; - points.forEach(function (point) { - if (prevPoint && !center) { - var vectorDistance = distance(point, prevPoint); - - if (vectorDistance < remainingDistance) { - remainingDistance -= vectorDistance; - } else { - // The point is remainingDistance from prevPoint in the vector between prevPoint and point - // Calculate the coordinates - var distanceRatio = remainingDistance / vectorDistance; - if (distanceRatio <= 0) center = prevPoint; - if (distanceRatio >= 1) center = { - x: point.x, - y: point.y - }; - - if (distanceRatio > 0 && distanceRatio < 1) { - center = { - x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, - y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y - }; - } - } - } - - prevPoint = point; - }); - return center; -}; - -var calcLabelPosition = function calcLabelPosition(points) { - return traverseEdge(points); -}; - -var calcCardinalityPosition = function calcCardinalityPosition(isRelationTypePresent, points, initialPosition) { - var prevPoint; - var totalDistance = 0; // eslint-disable-line - - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('our points', points); - - if (points[0] !== initialPosition) { - points = points.reverse(); - } - - points.forEach(function (point) { - totalDistance += distance(point, prevPoint); - prevPoint = point; - }); // Traverse only 25 total distance along points to find cardinality point - - var distanceToCardinalityPoint = 25; - var remainingDistance = distanceToCardinalityPoint; - var center; - prevPoint = undefined; - points.forEach(function (point) { - if (prevPoint && !center) { - var vectorDistance = distance(point, prevPoint); - - if (vectorDistance < remainingDistance) { - remainingDistance -= vectorDistance; - } else { - // The point is remainingDistance from prevPoint in the vector between prevPoint and point - // Calculate the coordinates - var distanceRatio = remainingDistance / vectorDistance; - if (distanceRatio <= 0) center = prevPoint; - if (distanceRatio >= 1) center = { - x: point.x, - y: point.y - }; - - if (distanceRatio > 0 && distanceRatio < 1) { - center = { - x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, - y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y - }; - } - } - } - - prevPoint = point; - }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d) - - var d = isRelationTypePresent ? 10 : 5; //Calculate Angle for x and y axis - - var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); - var cardinalityPosition = { - x: 0, - y: 0 - }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance - - cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; - cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; - return cardinalityPosition; -}; -/** - * position ['start_left', 'start_right', 'end_left', 'end_right'] - */ - - -var calcTerminalLabelPosition = function calcTerminalLabelPosition(terminalMarkerSize, position, _points) { - // Todo looking to faster cloning method - var points = JSON.parse(JSON.stringify(_points)); - var prevPoint; - var totalDistance = 0; // eslint-disable-line - - _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('our points', points); - - if (position !== 'start_left' && position !== 'start_right') { - points = points.reverse(); - } - - points.forEach(function (point) { - totalDistance += distance(point, prevPoint); - prevPoint = point; - }); // Traverse only 25 total distance along points to find cardinality point - - var distanceToCardinalityPoint = 25; - var remainingDistance = distanceToCardinalityPoint; - var center; - prevPoint = undefined; - points.forEach(function (point) { - if (prevPoint && !center) { - var vectorDistance = distance(point, prevPoint); - - if (vectorDistance < remainingDistance) { - remainingDistance -= vectorDistance; - } else { - // The point is remainingDistance from prevPoint in the vector between prevPoint and point - // Calculate the coordinates - var distanceRatio = remainingDistance / vectorDistance; - if (distanceRatio <= 0) center = prevPoint; - if (distanceRatio >= 1) center = { - x: point.x, - y: point.y - }; - - if (distanceRatio > 0 && distanceRatio < 1) { - center = { - x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, - y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y - }; - } - } - } - - prevPoint = point; - }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d) - - var d = 10; //Calculate Angle for x and y axis - - var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); - var cardinalityPosition = { - x: 0, - y: 0 - }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance - - cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; - cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; - - if (position === 'start_left') { - cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2; - cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2; - } - - if (position === 'end_right') { - cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5; - cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5; - } - - if (position === 'end_left') { - cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5; - cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5; - } - - return cardinalityPosition; -}; - -var getStylesFromArray = function getStylesFromArray(arr) { - var style = ''; - var labelStyle = ''; - - for (var i = 0; i < arr.length; i++) { - if (typeof arr[i] !== 'undefined') { - // add text properties to label style definition - if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) { - labelStyle = labelStyle + arr[i] + ';'; - } else { - style = style + arr[i] + ';'; - } - } - } - - return { - style: style, - labelStyle: labelStyle - }; -}; -var cnt = 0; -var generateId = function generateId() { - cnt++; - return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt; -}; - -function makeid(length) { - var result = ''; - var characters = '0123456789abcdef'; - var charactersLength = characters.length; - - for (var i = 0; i < length; i++) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - } - - return result; -} - -var random = function random(options) { - return makeid(options.length); -}; -/** - * @function assignWithDepth - * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects - * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with - * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error, - * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`] - *

- * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example: - * ``` - * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' }; - * let config_1 = { foo: 'foo', bar: 'bar' }; - * let result = assignWithDepth(config_0, config_1); - * console.log(result); - * //-> result: { foo: { bar: 'bar' }, bar: 'bar' } - * ``` - *

- * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. - *

- * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst - * in order. - * @param dst:any - the destination of the merge - * @param src:any - the source object(s) to merge into destination - * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging - - * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false }) - * @returns {*} - */ - -var assignWithDepth = function assignWithDepth(dst, src, config) { - var _Object$assign = Object.assign({ - depth: 2, - clobber: false - }, config), - depth = _Object$assign.depth, - clobber = _Object$assign.clobber; - - if (Array.isArray(src) && !Array.isArray(dst)) { - src.forEach(function (s) { - return assignWithDepth(dst, s, config); - }); - return dst; - } else if (Array.isArray(src) && Array.isArray(dst)) { - src.forEach(function (s) { - if (dst.indexOf(s) === -1) { - dst.push(s); - } - }); - return dst; - } - - if (typeof dst === 'undefined' || depth <= 0) { - if (dst !== undefined && dst !== null && _typeof(dst) === 'object' && _typeof(src) === 'object') { - return Object.assign(dst, src); - } else { - return src; - } - } - - if (typeof src !== 'undefined' && _typeof(dst) === 'object' && _typeof(src) === 'object') { - Object.keys(src).forEach(function (key) { - if (_typeof(src[key]) === 'object' && (dst[key] === undefined || _typeof(dst[key]) === 'object')) { - if (dst[key] === undefined) { - dst[key] = Array.isArray(src[key]) ? [] : {}; - } - - dst[key] = assignWithDepth(dst[key], src[key], { - depth: depth - 1, - clobber: clobber - }); - } else if (clobber || _typeof(dst[key]) !== 'object' && _typeof(src[key]) !== 'object') { - dst[key] = src[key]; - } - }); - } - - return dst; -}; -var getTextObj = function getTextObj() { - return { - x: 0, - y: 0, - fill: undefined, - anchor: 'start', - style: '#666', - width: 100, - height: 100, - textMargin: 0, - rx: 0, - ry: 0, - valign: undefined - }; -}; -var drawSimpleText = function drawSimpleText(elem, textData) { - // Remove and ignore br:s - var nText = textData.text.replace(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__["default"].lineBreakRegex, ' '); - var textElem = elem.append('text'); - textElem.attr('x', textData.x); - textElem.attr('y', textData.y); - textElem.style('text-anchor', textData.anchor); - textElem.style('font-family', textData.fontFamily); - textElem.style('font-size', textData.fontSize); - textElem.style('font-weight', textData.fontWeight); - textElem.attr('fill', textData.fill); - - if (typeof textData.class !== 'undefined') { - textElem.attr('class', textData.class); - } - - var span = textElem.append('tspan'); - span.attr('x', textData.x + textData.textMargin * 2); - span.attr('fill', textData.fill); - span.text(nText); - return textElem; -}; -var wrapLabel = memoize(function (label, maxWidth, config) { - if (!label) { - return label; - } - - config = Object.assign({ - fontSize: 12, - fontWeight: 400, - fontFamily: 'Arial', - joinWith: '
' - }, config); - - if (_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__["default"].lineBreakRegex.test(label)) { - return label; - } - - var words = label.split(' '); - var completedLines = []; - var nextLine = ''; - words.forEach(function (word, index) { - var wordLength = calculateTextWidth("".concat(word, " "), config); - var nextLineLength = calculateTextWidth(nextLine, config); - - if (wordLength > maxWidth) { - var _breakString = breakString(word, maxWidth, '-', config), - hyphenatedStrings = _breakString.hyphenatedStrings, - remainingWord = _breakString.remainingWord; - - completedLines.push.apply(completedLines, [nextLine].concat(_toConsumableArray(hyphenatedStrings))); - nextLine = remainingWord; - } else if (nextLineLength + wordLength >= maxWidth) { - completedLines.push(nextLine); - nextLine = word; - } else { - nextLine = [nextLine, word].filter(Boolean).join(' '); - } - - var currentWord = index + 1; - var isLastWord = currentWord === words.length; - - if (isLastWord) { - completedLines.push(nextLine); - } - }); - return completedLines.filter(function (line) { - return line !== ''; - }).join(config.joinWith); -}, function (label, maxWidth, config) { - return "".concat(label, "-").concat(maxWidth, "-").concat(config.fontSize, "-").concat(config.fontWeight, "-").concat(config.fontFamily, "-").concat(config.joinWith); -}); -var breakString = memoize(function (word, maxWidth) { - var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-'; - var config = arguments.length > 3 ? arguments[3] : undefined; - config = Object.assign({ - fontSize: 12, - fontWeight: 400, - fontFamily: 'Arial', - margin: 0 - }, config); - var characters = word.split(''); - var lines = []; - var currentLine = ''; - characters.forEach(function (character, index) { - var nextLine = "".concat(currentLine).concat(character); - var lineWidth = calculateTextWidth(nextLine, config); - - if (lineWidth >= maxWidth) { - var currentCharacter = index + 1; - var isLastLine = characters.length === currentCharacter; - var hyphenatedNextLine = "".concat(nextLine).concat(hyphenCharacter); - lines.push(isLastLine ? nextLine : hyphenatedNextLine); - currentLine = ''; - } else { - currentLine = nextLine; - } - }); - return { - hyphenatedStrings: lines, - remainingWord: currentLine - }; -}, function (word, maxWidth) { - var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-'; - var config = arguments.length > 3 ? arguments[3] : undefined; - return "".concat(word, "-").concat(maxWidth, "-").concat(hyphenCharacter, "-").concat(config.fontSize, "-").concat(config.fontWeight, "-").concat(config.fontFamily); -}); -/** - * This calculates the text's height, taking into account the wrap breaks and - * both the statically configured height, width, and the length of the text (in pixels). - * - * If the wrapped text text has greater height, we extend the height, so it's - * value won't overflow. - * - * @return - The height for the given text - * @param text the text to measure - * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size - */ - -var calculateTextHeight = function calculateTextHeight(text, config) { - config = Object.assign({ - fontSize: 12, - fontWeight: 400, - fontFamily: 'Arial', - margin: 15 - }, config); - return calculateTextDimensions(text, config).height; -}; -/** - * This calculates the width of the given text, font size and family. - * - * @return - The width for the given text - * @param text - The text to calculate the width of - * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size - */ - -var calculateTextWidth = function calculateTextWidth(text, config) { - config = Object.assign({ - fontSize: 12, - fontWeight: 400, - fontFamily: 'Arial' - }, config); - return calculateTextDimensions(text, config).width; -}; -/** - * This calculates the dimensions of the given text, font size, font family, font weight, and margins. - * - * @return - The width for the given text - * @param text - The text to calculate the width of - * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size - */ - -var calculateTextDimensions = memoize(function (text, config) { - config = Object.assign({ - fontSize: 12, - fontWeight: 400, - fontFamily: 'Arial' - }, config); - var _config = config, - fontSize = _config.fontSize, - fontFamily = _config.fontFamily, - fontWeight = _config.fontWeight; - - if (!text) { - return { - width: 0, - height: 0 - }; - } // We can't really know if the user supplied font family will render on the user agent; - // thus, we'll take the max width between the user supplied font family, and a default - // of sans-serif. - - - var fontFamilies = ['sans-serif', fontFamily]; - var lines = text.split(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__["default"].lineBreakRegex); - var dims = []; - var body = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('body'); // We don't want to leak DOM elements - if a removal operation isn't available - // for any reason, do not continue. - - if (!body.remove) { - return { - width: 0, - height: 0, - lineHeight: 0 - }; - } - - var g = body.append('svg'); - - for (var _i = 0, _fontFamilies = fontFamilies; _i < _fontFamilies.length; _i++) { - var _fontFamily = _fontFamilies[_i]; - var cheight = 0; - var dim = { - width: 0, - height: 0, - lineHeight: 0 - }; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var line = _step.value; - var textObj = getTextObj(); - textObj.text = line; - var textElem = drawSimpleText(g, textObj).style('font-size', fontSize).style('font-weight', fontWeight).style('font-family', _fontFamily); - var bBox = (textElem._groups || textElem)[0][0].getBBox(); - dim.width = Math.round(Math.max(dim.width, bBox.width)); - cheight = Math.round(bBox.height); - dim.height += cheight; - dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight)); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - dims.push(dim); - } - - g.remove(); - var index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; - return dims[index]; -}, function (text, config) { - return "".concat(text, "-").concat(config.fontSize, "-").concat(config.fontWeight, "-").concat(config.fontFamily); -}); - -var d3Attrs = function d3Attrs(d3Elem, attrs) { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = attrs[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var attr = _step2.value; - d3Elem.attr(attr[0], attr[1]); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } -}; - -var calculateSvgSizeAttrs = function calculateSvgSizeAttrs(height, width, useMaxWidth) { - var attrs = new Map(); - attrs.set('height', height); - - if (useMaxWidth) { - attrs.set('width', '100%'); - attrs.set('style', "max-width: ".concat(width, "px;")); - } else { - attrs.set('width', width); - } - - return attrs; -}; -var configureSvgSize = function configureSvgSize(svgElem, height, width, useMaxWidth) { - var attrs = calculateSvgSizeAttrs(height, width, useMaxWidth); - d3Attrs(svgElem, attrs); -}; -var initIdGeneratior = function initIdGeneratior(deterministic, seed) { - if (!deterministic) return { - next: function next() { - return Date.now(); - } - }; - - var iterator = - /*#__PURE__*/ - function () { - function iterator() { - _classCallCheck(this, iterator); - - return this.count = seed ? seed.length : 0; - } - - _createClass(iterator, [{ - key: "next", - value: function next() { - return this.count++; - } - }]); - - return iterator; - }(); - - return new iterator(); -}; -/* harmony default export */ __webpack_exports__["default"] = ({ - assignWithDepth: assignWithDepth, - wrapLabel: wrapLabel, - calculateTextHeight: calculateTextHeight, - calculateTextWidth: calculateTextWidth, - calculateTextDimensions: calculateTextDimensions, - calculateSvgSizeAttrs: calculateSvgSizeAttrs, - configureSvgSize: configureSvgSize, - detectInit: detectInit, - detectDirective: detectDirective, - detectType: detectType, - isSubstringInArray: isSubstringInArray, - interpolateToCurve: interpolateToCurve, - calcLabelPosition: calcLabelPosition, - calcCardinalityPosition: calcCardinalityPosition, - calcTerminalLabelPosition: calcTerminalLabelPosition, - formatUrl: formatUrl, - getStylesFromArray: getStylesFromArray, - generateId: generateId, - random: random, - memoize: memoize, - runFunc: runFunc, - initIdGeneratior: initIdGeneratior -}); - -/***/ }), - -/***/ "@braintree/sanitize-url": -/*!******************************************!*\ - !*** external "@braintree/sanitize-url" ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! @braintree/sanitize-url */ "./node_modules/@braintree/sanitize-url/index.js"); - -/***/ }), - -/***/ "d3": -/*!*********************!*\ - !*** external "d3" ***! - \*********************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); - -/***/ }), - -/***/ "dagre": -/*!************************!*\ - !*** external "dagre" ***! - \************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! dagre */ "./node_modules/dagre/index.js"); - -/***/ }), - -/***/ "dagre-d3": -/*!***************************!*\ - !*** external "dagre-d3" ***! - \***************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! dagre-d3 */ "./node_modules/dagre-d3/index.js"); - -/***/ }), - -/***/ "dagre-d3/lib/label/add-html-label.js": -/*!*******************************************************!*\ - !*** external "dagre-d3/lib/label/add-html-label.js" ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "./node_modules/dagre-d3/lib/label/add-html-label.js"); - -/***/ }), - -/***/ "entity-decode/browser": -/*!****************************************!*\ - !*** external "entity-decode/browser" ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! entity-decode/browser */ "./node_modules/entity-decode/browser.js"); - -/***/ }), - -/***/ "graphlib": -/*!***************************!*\ - !*** external "graphlib" ***! - \***************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js"); - -/***/ }), - -/***/ "khroma": -/*!*************************!*\ - !*** external "khroma" ***! - \*************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! khroma */ "./node_modules/khroma/dist/index.js"); - -/***/ }), - -/***/ "moment-mini": -/*!******************************!*\ - !*** external "moment-mini" ***! - \******************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! moment-mini */ "./node_modules/moment-mini/moment.min.js"); - -/***/ }), - -/***/ "stylis": -/*!*************************!*\ - !*** external "stylis" ***! - \*************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __webpack_require__(/*! stylis */ "./node_modules/stylis/stylis.js"); - -/***/ }) - -/******/ })["default"]; -}); -//# sourceMappingURL=mermaid.core.js.map - -/***/ }), - -/***/ "./node_modules/mermaid/package.json": -/*!*******************************************!*\ - !*** ./node_modules/mermaid/package.json ***! - \*******************************************/ -/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, husky, default */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.9.2\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --colors\",\"build:production\":\"yarn build:development -p --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"minify\":\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack-dev-server --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"d3\":\"^5.7.0\",\"dagre\":\"^0.8.4\",\"dagre-d3\":\"^0.6.4\",\"entity-decode\":\"^2.0.2\",\"graphlib\":\"^2.1.7\",\"he\":\"^1.2.0\",\"khroma\":\"^1.1.0\",\"minify\":\"^4.1.1\",\"moment-mini\":\"^2.22.1\",\"stylis\":\"^3.5.2\"},\"devDependencies\":{\"@babel/core\":\"^7.2.2\",\"@babel/preset-env\":\"^7.8.4\",\"@babel/register\":\"^7.0.0\",\"@percy/cypress\":\"*\",\"babel-core\":\"7.0.0-bridge.0\",\"babel-eslint\":\"^10.1.0\",\"babel-jest\":\"^24.9.0\",\"babel-loader\":\"^8.0.4\",\"coveralls\":\"^3.0.2\",\"css-loader\":\"^2.0.1\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"4.0.1\",\"documentation\":\"^12.0.1\",\"eslint\":\"^6.3.0\",\"eslint-config-prettier\":\"^6.3.0\",\"eslint-plugin-prettier\":\"^3.1.0\",\"husky\":\"^1.2.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^24.9.0\",\"jison\":\"^0.4.18\",\"moment\":\"^2.23.0\",\"node-sass\":\"^5.0.0\",\"prettier\":\"^1.18.2\",\"puppeteer\":\"^1.17.0\",\"sass-loader\":\"^7.1.0\",\"start-server-and-test\":\"^1.10.6\",\"terser-webpack-plugin\":\"^2.2.2\",\"webpack\":\"^4.41.2\",\"webpack-bundle-analyzer\":\"^3.7.0\",\"webpack-cli\":\"^3.1.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^1.7.2\",\"yarn-upgrade-all\":\"^0.5.0\"},\"files\":[\"dist\"],\"yarn-upgrade-all\":{\"ignore\":[\"babel-core\"]},\"sideEffects\":[\"**/*.css\",\"**/*.scss\"],\"husky\":{\"hooks\":{\"pre-push\":\"yarn test\"}}}"); - -/***/ }), - -/***/ "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$": -/*!*******************************************************!*\ - !*** ./node_modules/moment-mini/locale sync ^\.\/.*$ ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./locale": "./node_modules/moment-mini/locale/locale.js", - "./locale.js": "./node_modules/moment-mini/locale/locale.js" -}; - - -function webpackContext(req) { - var id = webpackContextResolve(req); - return __webpack_require__(id); -} -function webpackContextResolve(req) { - if(!__webpack_require__.o(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; -} -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$"; - -/***/ }), - -/***/ "./node_modules/moment-mini/locale/locale.js": -/*!***************************************************!*\ - !*** ./node_modules/moment-mini/locale/locale.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - - - -/***/ }), - -/***/ "./node_modules/moment-mini/moment.min.js": -/*!************************************************!*\ - !*** ./node_modules/moment-mini/moment.min.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {!function(e,t){ true?module.exports=t():undefined}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sDe(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,__webpack_require__("./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$")("./"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter - }, - week : { - dow : 1, // Maandag is die eerste dag van die week. - doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. - } - }); - - return af; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-dz.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-dz.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var arDz = moment.defineLocale('ar-dz', { - months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[اليوم على الساعة] LT', - nextDay: '[غدا على الساعة] LT', - nextWeek: 'dddd [على الساعة] LT', - lastDay: '[أمس على الساعة] LT', - lastWeek: 'dddd [على الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'في %s', - past : 'منذ %s', - s : 'ثوان', - ss : '%d ثانية', - m : 'دقيقة', - mm : '%d دقائق', - h : 'ساعة', - hh : '%d ساعات', - d : 'يوم', - dd : '%d أيام', - M : 'شهر', - MM : '%d أشهر', - y : 'سنة', - yy : '%d سنوات' - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return arDz; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-kw.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-kw.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var arKw = moment.defineLocale('ar-kw', { - months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), - monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), - weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[اليوم على الساعة] LT', - nextDay: '[غدا على الساعة] LT', - nextWeek: 'dddd [على الساعة] LT', - lastDay: '[أمس على الساعة] LT', - lastWeek: 'dddd [على الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'في %s', - past : 'منذ %s', - s : 'ثوان', - ss : '%d ثانية', - m : 'دقيقة', - mm : '%d دقائق', - h : 'ساعة', - hh : '%d ساعات', - d : 'يوم', - dd : '%d أيام', - M : 'شهر', - MM : '%d أشهر', - y : 'سنة', - yy : '%d سنوات' - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return arKw; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-ly.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-ly.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '1', - '2': '2', - '3': '3', - '4': '4', - '5': '5', - '6': '6', - '7': '7', - '8': '8', - '9': '9', - '0': '0' - }, pluralForm = function (n) { - return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; - }, plurals = { - s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], - m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], - h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], - d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], - M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], - y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] - }, pluralize = function (u) { - return function (number, withoutSuffix, string, isFuture) { - var f = pluralForm(number), - str = plurals[u][pluralForm(number)]; - if (f === 2) { - str = str[withoutSuffix ? 0 : 1]; - } - return str.replace(/%d/i, number); - }; - }, months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر' - ]; - - var arLy = moment.defineLocale('ar-ly', { - months : months, - monthsShort : months, - weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'D/\u200FM/\u200FYYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - meridiemParse: /ص|م/, - isPM : function (input) { - return 'م' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ص'; - } else { - return 'م'; - } - }, - calendar : { - sameDay: '[اليوم عند الساعة] LT', - nextDay: '[غدًا عند الساعة] LT', - nextWeek: 'dddd [عند الساعة] LT', - lastDay: '[أمس عند الساعة] LT', - lastWeek: 'dddd [عند الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'بعد %s', - past : 'منذ %s', - s : pluralize('s'), - ss : pluralize('s'), - m : pluralize('m'), - mm : pluralize('m'), - h : pluralize('h'), - hh : pluralize('h'), - d : pluralize('d'), - dd : pluralize('d'), - M : pluralize('M'), - MM : pluralize('M'), - y : pluralize('y'), - yy : pluralize('y') - }, - preparse: function (string) { - return string.replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }).replace(/,/g, '،'); - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return arLy; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-ma.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-ma.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var arMa = moment.defineLocale('ar-ma', { - months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), - monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), - weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[اليوم على الساعة] LT', - nextDay: '[غدا على الساعة] LT', - nextWeek: 'dddd [على الساعة] LT', - lastDay: '[أمس على الساعة] LT', - lastWeek: 'dddd [على الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'في %s', - past : 'منذ %s', - s : 'ثوان', - ss : '%d ثانية', - m : 'دقيقة', - mm : '%d دقائق', - h : 'ساعة', - hh : '%d ساعات', - d : 'يوم', - dd : '%d أيام', - M : 'شهر', - MM : '%d أشهر', - y : 'سنة', - yy : '%d سنوات' - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return arMa; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-sa.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-sa.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '١', - '2': '٢', - '3': '٣', - '4': '٤', - '5': '٥', - '6': '٦', - '7': '٧', - '8': '٨', - '9': '٩', - '0': '٠' - }, numberMap = { - '١': '1', - '٢': '2', - '٣': '3', - '٤': '4', - '٥': '5', - '٦': '6', - '٧': '7', - '٨': '8', - '٩': '9', - '٠': '0' - }; - - var arSa = moment.defineLocale('ar-sa', { - months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - meridiemParse: /ص|م/, - isPM : function (input) { - return 'م' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ص'; - } else { - return 'م'; - } - }, - calendar : { - sameDay: '[اليوم على الساعة] LT', - nextDay: '[غدا على الساعة] LT', - nextWeek: 'dddd [على الساعة] LT', - lastDay: '[أمس على الساعة] LT', - lastWeek: 'dddd [على الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'في %s', - past : 'منذ %s', - s : 'ثوان', - ss : '%d ثانية', - m : 'دقيقة', - mm : '%d دقائق', - h : 'ساعة', - hh : '%d ساعات', - d : 'يوم', - dd : '%d أيام', - M : 'شهر', - MM : '%d أشهر', - y : 'سنة', - yy : '%d سنوات' - }, - preparse: function (string) { - return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { - return numberMap[match]; - }).replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }).replace(/,/g, '،'); - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return arSa; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar-tn.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ar-tn.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var arTn = moment.defineLocale('ar-tn', { - months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), - weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY HH:mm', - LLLL: 'dddd D MMMM YYYY HH:mm' - }, - calendar: { - sameDay: '[اليوم على الساعة] LT', - nextDay: '[غدا على الساعة] LT', - nextWeek: 'dddd [على الساعة] LT', - lastDay: '[أمس على الساعة] LT', - lastWeek: 'dddd [على الساعة] LT', - sameElse: 'L' - }, - relativeTime: { - future: 'في %s', - past: 'منذ %s', - s: 'ثوان', - ss : '%d ثانية', - m: 'دقيقة', - mm: '%d دقائق', - h: 'ساعة', - hh: '%d ساعات', - d: 'يوم', - dd: '%d أيام', - M: 'شهر', - MM: '%d أشهر', - y: 'سنة', - yy: '%d سنوات' - }, - week: { - dow: 1, // Monday is the first day of the week. - doy: 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return arTn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ar.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ar.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '١', - '2': '٢', - '3': '٣', - '4': '٤', - '5': '٥', - '6': '٦', - '7': '٧', - '8': '٨', - '9': '٩', - '0': '٠' - }, numberMap = { - '١': '1', - '٢': '2', - '٣': '3', - '٤': '4', - '٥': '5', - '٦': '6', - '٧': '7', - '٨': '8', - '٩': '9', - '٠': '0' - }, pluralForm = function (n) { - return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; - }, plurals = { - s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], - m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], - h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], - d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], - M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], - y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] - }, pluralize = function (u) { - return function (number, withoutSuffix, string, isFuture) { - var f = pluralForm(number), - str = plurals[u][pluralForm(number)]; - if (f === 2) { - str = str[withoutSuffix ? 0 : 1]; - } - return str.replace(/%d/i, number); - }; - }, months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر' - ]; - - var ar = moment.defineLocale('ar', { - months : months, - monthsShort : months, - weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), - weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), - weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'D/\u200FM/\u200FYYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - meridiemParse: /ص|م/, - isPM : function (input) { - return 'م' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ص'; - } else { - return 'م'; - } - }, - calendar : { - sameDay: '[اليوم عند الساعة] LT', - nextDay: '[غدًا عند الساعة] LT', - nextWeek: 'dddd [عند الساعة] LT', - lastDay: '[أمس عند الساعة] LT', - lastWeek: 'dddd [عند الساعة] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'بعد %s', - past : 'منذ %s', - s : pluralize('s'), - ss : pluralize('s'), - m : pluralize('m'), - mm : pluralize('m'), - h : pluralize('h'), - hh : pluralize('h'), - d : pluralize('d'), - dd : pluralize('d'), - M : pluralize('M'), - MM : pluralize('M'), - y : pluralize('y'), - yy : pluralize('y') - }, - preparse: function (string) { - return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { - return numberMap[match]; - }).replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }).replace(/,/g, '،'); - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return ar; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/az.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/az.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var suffixes = { - 1: '-inci', - 5: '-inci', - 8: '-inci', - 70: '-inci', - 80: '-inci', - 2: '-nci', - 7: '-nci', - 20: '-nci', - 50: '-nci', - 3: '-üncü', - 4: '-üncü', - 100: '-üncü', - 6: '-ncı', - 9: '-uncu', - 10: '-uncu', - 30: '-uncu', - 60: '-ıncı', - 90: '-ıncı' - }; - - var az = moment.defineLocale('az', { - months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), - monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), - weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), - weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), - weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[bugün saat] LT', - nextDay : '[sabah saat] LT', - nextWeek : '[gələn həftə] dddd [saat] LT', - lastDay : '[dünən] LT', - lastWeek : '[keçən həftə] dddd [saat] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s sonra', - past : '%s əvvəl', - s : 'birneçə saniyə', - ss : '%d saniyə', - m : 'bir dəqiqə', - mm : '%d dəqiqə', - h : 'bir saat', - hh : '%d saat', - d : 'bir gün', - dd : '%d gün', - M : 'bir ay', - MM : '%d ay', - y : 'bir il', - yy : '%d il' - }, - meridiemParse: /gecə|səhər|gündüz|axşam/, - isPM : function (input) { - return /^(gündüz|axşam)$/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'gecə'; - } else if (hour < 12) { - return 'səhər'; - } else if (hour < 17) { - return 'gündüz'; - } else { - return 'axşam'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, - ordinal : function (number) { - if (number === 0) { // special case for zero - return number + '-ıncı'; - } - var a = number % 10, - b = number % 100 - a, - c = number >= 100 ? 100 : null; - return number + (suffixes[a] || suffixes[b] || suffixes[c]); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return az; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/be.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/be.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function plural(word, num) { - var forms = word.split('_'); - return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); - } - function relativeTimeWithPlural(number, withoutSuffix, key) { - var format = { - 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', - 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', - 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', - 'dd': 'дзень_дні_дзён', - 'MM': 'месяц_месяцы_месяцаў', - 'yy': 'год_гады_гадоў' - }; - if (key === 'm') { - return withoutSuffix ? 'хвіліна' : 'хвіліну'; - } - else if (key === 'h') { - return withoutSuffix ? 'гадзіна' : 'гадзіну'; - } - else { - return number + ' ' + plural(format[key], +number); - } - } - - var be = moment.defineLocale('be', { - months : { - format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), - standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') - }, - monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), - weekdays : { - format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), - standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), - isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ - }, - weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), - weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY г.', - LLL : 'D MMMM YYYY г., HH:mm', - LLLL : 'dddd, D MMMM YYYY г., HH:mm' - }, - calendar : { - sameDay: '[Сёння ў] LT', - nextDay: '[Заўтра ў] LT', - lastDay: '[Учора ў] LT', - nextWeek: function () { - return '[У] dddd [ў] LT'; - }, - lastWeek: function () { - switch (this.day()) { - case 0: - case 3: - case 5: - case 6: - return '[У мінулую] dddd [ў] LT'; - case 1: - case 2: - case 4: - return '[У мінулы] dddd [ў] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'праз %s', - past : '%s таму', - s : 'некалькі секунд', - m : relativeTimeWithPlural, - mm : relativeTimeWithPlural, - h : relativeTimeWithPlural, - hh : relativeTimeWithPlural, - d : 'дзень', - dd : relativeTimeWithPlural, - M : 'месяц', - MM : relativeTimeWithPlural, - y : 'год', - yy : relativeTimeWithPlural - }, - meridiemParse: /ночы|раніцы|дня|вечара/, - isPM : function (input) { - return /^(дня|вечара)$/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'ночы'; - } else if (hour < 12) { - return 'раніцы'; - } else if (hour < 17) { - return 'дня'; - } else { - return 'вечара'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, - ordinal: function (number, period) { - switch (period) { - case 'M': - case 'd': - case 'DDD': - case 'w': - case 'W': - return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; - case 'D': - return number + '-га'; - default: - return number; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return be; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/bg.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/bg.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var bg = moment.defineLocale('bg', { - months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), - monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), - weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), - weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), - weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'D.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY H:mm', - LLLL : 'dddd, D MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[Днес в] LT', - nextDay : '[Утре в] LT', - nextWeek : 'dddd [в] LT', - lastDay : '[Вчера в] LT', - lastWeek : function () { - switch (this.day()) { - case 0: - case 3: - case 6: - return '[В изминалата] dddd [в] LT'; - case 1: - case 2: - case 4: - case 5: - return '[В изминалия] dddd [в] LT'; - } - }, - sameElse : 'L' - }, - relativeTime : { - future : 'след %s', - past : 'преди %s', - s : 'няколко секунди', - ss : '%d секунди', - m : 'минута', - mm : '%d минути', - h : 'час', - hh : '%d часа', - d : 'ден', - dd : '%d дни', - M : 'месец', - MM : '%d месеца', - y : 'година', - yy : '%d години' - }, - dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, - ordinal : function (number) { - var lastDigit = number % 10, - last2Digits = number % 100; - if (number === 0) { - return number + '-ев'; - } else if (last2Digits === 0) { - return number + '-ен'; - } else if (last2Digits > 10 && last2Digits < 20) { - return number + '-ти'; - } else if (lastDigit === 1) { - return number + '-ви'; - } else if (lastDigit === 2) { - return number + '-ри'; - } else if (lastDigit === 7 || lastDigit === 8) { - return number + '-ми'; - } else { - return number + '-ти'; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return bg; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/bm.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/bm.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var bm = moment.defineLocale('bm', { - months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), - monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), - weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), - weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), - weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'MMMM [tile] D [san] YYYY', - LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', - LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' - }, - calendar : { - sameDay : '[Bi lɛrɛ] LT', - nextDay : '[Sini lɛrɛ] LT', - nextWeek : 'dddd [don lɛrɛ] LT', - lastDay : '[Kunu lɛrɛ] LT', - lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s kɔnɔ', - past : 'a bɛ %s bɔ', - s : 'sanga dama dama', - ss : 'sekondi %d', - m : 'miniti kelen', - mm : 'miniti %d', - h : 'lɛrɛ kelen', - hh : 'lɛrɛ %d', - d : 'tile kelen', - dd : 'tile %d', - M : 'kalo kelen', - MM : 'kalo %d', - y : 'san kelen', - yy : 'san %d' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return bm; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/bn.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/bn.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '১', - '2': '২', - '3': '৩', - '4': '৪', - '5': '৫', - '6': '৬', - '7': '৭', - '8': '৮', - '9': '৯', - '0': '০' - }, - numberMap = { - '১': '1', - '২': '2', - '৩': '3', - '৪': '4', - '৫': '5', - '৬': '6', - '৭': '7', - '৮': '8', - '৯': '9', - '০': '0' - }; - - var bn = moment.defineLocale('bn', { - months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), - monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), - weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), - weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), - weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), - longDateFormat : { - LT : 'A h:mm সময়', - LTS : 'A h:mm:ss সময়', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm সময়', - LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' - }, - calendar : { - sameDay : '[আজ] LT', - nextDay : '[আগামীকাল] LT', - nextWeek : 'dddd, LT', - lastDay : '[গতকাল] LT', - lastWeek : '[গত] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s পরে', - past : '%s আগে', - s : 'কয়েক সেকেন্ড', - ss : '%d সেকেন্ড', - m : 'এক মিনিট', - mm : '%d মিনিট', - h : 'এক ঘন্টা', - hh : '%d ঘন্টা', - d : 'এক দিন', - dd : '%d দিন', - M : 'এক মাস', - MM : '%d মাস', - y : 'এক বছর', - yy : '%d বছর' - }, - preparse: function (string) { - return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if ((meridiem === 'রাত' && hour >= 4) || - (meridiem === 'দুপুর' && hour < 5) || - meridiem === 'বিকাল') { - return hour + 12; - } else { - return hour; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'রাত'; - } else if (hour < 10) { - return 'সকাল'; - } else if (hour < 17) { - return 'দুপুর'; - } else if (hour < 20) { - return 'বিকাল'; - } else { - return 'রাত'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return bn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/bo.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/bo.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '༡', - '2': '༢', - '3': '༣', - '4': '༤', - '5': '༥', - '6': '༦', - '7': '༧', - '8': '༨', - '9': '༩', - '0': '༠' - }, - numberMap = { - '༡': '1', - '༢': '2', - '༣': '3', - '༤': '4', - '༥': '5', - '༦': '6', - '༧': '7', - '༨': '8', - '༩': '9', - '༠': '0' - }; - - var bo = moment.defineLocale('bo', { - months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), - monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), - weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), - weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), - weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), - longDateFormat : { - LT : 'A h:mm', - LTS : 'A h:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm', - LLLL : 'dddd, D MMMM YYYY, A h:mm' - }, - calendar : { - sameDay : '[དི་རིང] LT', - nextDay : '[སང་ཉིན] LT', - nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', - lastDay : '[ཁ་སང] LT', - lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s ལ་', - past : '%s སྔན་ལ', - s : 'ལམ་སང', - ss : '%d སྐར་ཆ།', - m : 'སྐར་མ་གཅིག', - mm : '%d སྐར་མ', - h : 'ཆུ་ཚོད་གཅིག', - hh : '%d ཆུ་ཚོད', - d : 'ཉིན་གཅིག', - dd : '%d ཉིན་', - M : 'ཟླ་བ་གཅིག', - MM : '%d ཟླ་བ', - y : 'ལོ་གཅིག', - yy : '%d ལོ' - }, - preparse: function (string) { - return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if ((meridiem === 'མཚན་མོ' && hour >= 4) || - (meridiem === 'ཉིན་གུང' && hour < 5) || - meridiem === 'དགོང་དག') { - return hour + 12; - } else { - return hour; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'མཚན་མོ'; - } else if (hour < 10) { - return 'ཞོགས་ཀས'; - } else if (hour < 17) { - return 'ཉིན་གུང'; - } else if (hour < 20) { - return 'དགོང་དག'; - } else { - return 'མཚན་མོ'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return bo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/br.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/br.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function relativeTimeWithMutation(number, withoutSuffix, key) { - var format = { - 'mm': 'munutenn', - 'MM': 'miz', - 'dd': 'devezh' - }; - return number + ' ' + mutation(format[key], number); - } - function specialMutationForYears(number) { - switch (lastNumber(number)) { - case 1: - case 3: - case 4: - case 5: - case 9: - return number + ' bloaz'; - default: - return number + ' vloaz'; - } - } - function lastNumber(number) { - if (number > 9) { - return lastNumber(number % 10); - } - return number; - } - function mutation(text, number) { - if (number === 2) { - return softMutation(text); - } - return text; - } - function softMutation(text) { - var mutationTable = { - 'm': 'v', - 'b': 'v', - 'd': 'z' - }; - if (mutationTable[text.charAt(0)] === undefined) { - return text; - } - return mutationTable[text.charAt(0)] + text.substring(1); - } - - var br = moment.defineLocale('br', { - months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), - monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), - weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), - weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), - weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'h[e]mm A', - LTS : 'h[e]mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D [a viz] MMMM YYYY', - LLL : 'D [a viz] MMMM YYYY h[e]mm A', - LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' - }, - calendar : { - sameDay : '[Hiziv da] LT', - nextDay : '[Warc\'hoazh da] LT', - nextWeek : 'dddd [da] LT', - lastDay : '[Dec\'h da] LT', - lastWeek : 'dddd [paset da] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'a-benn %s', - past : '%s \'zo', - s : 'un nebeud segondennoù', - ss : '%d eilenn', - m : 'ur vunutenn', - mm : relativeTimeWithMutation, - h : 'un eur', - hh : '%d eur', - d : 'un devezh', - dd : relativeTimeWithMutation, - M : 'ur miz', - MM : relativeTimeWithMutation, - y : 'ur bloaz', - yy : specialMutationForYears - }, - dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, - ordinal : function (number) { - var output = (number === 1) ? 'añ' : 'vet'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return br; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/bs.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/bs.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function translate(number, withoutSuffix, key) { - var result = number + ' '; - switch (key) { - case 'ss': - if (number === 1) { - result += 'sekunda'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'sekunde'; - } else { - result += 'sekundi'; - } - return result; - case 'm': - return withoutSuffix ? 'jedna minuta' : 'jedne minute'; - case 'mm': - if (number === 1) { - result += 'minuta'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'minute'; - } else { - result += 'minuta'; - } - return result; - case 'h': - return withoutSuffix ? 'jedan sat' : 'jednog sata'; - case 'hh': - if (number === 1) { - result += 'sat'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'sata'; - } else { - result += 'sati'; - } - return result; - case 'dd': - if (number === 1) { - result += 'dan'; - } else { - result += 'dana'; - } - return result; - case 'MM': - if (number === 1) { - result += 'mjesec'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'mjeseca'; - } else { - result += 'mjeseci'; - } - return result; - case 'yy': - if (number === 1) { - result += 'godina'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'godine'; - } else { - result += 'godina'; - } - return result; - } - } - - var bs = moment.defineLocale('bs', { - months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), - monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), - monthsParseExact: true, - weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), - weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), - weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd, D. MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[danas u] LT', - nextDay : '[sutra u] LT', - nextWeek : function () { - switch (this.day()) { - case 0: - return '[u] [nedjelju] [u] LT'; - case 3: - return '[u] [srijedu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[u] dddd [u] LT'; - } - }, - lastDay : '[jučer u] LT', - lastWeek : function () { - switch (this.day()) { - case 0: - case 3: - return '[prošlu] dddd [u] LT'; - case 6: - return '[prošle] [subote] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[prošli] dddd [u] LT'; - } - }, - sameElse : 'L' - }, - relativeTime : { - future : 'za %s', - past : 'prije %s', - s : 'par sekundi', - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : 'dan', - dd : translate, - M : 'mjesec', - MM : translate, - y : 'godinu', - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return bs; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ca.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ca.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ca = moment.defineLocale('ca', { - months : { - standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), - format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), - isFormat: /D[oD]?(\s)+MMMM/ - }, - monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), - monthsParseExact : true, - weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), - weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), - weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM [de] YYYY', - ll : 'D MMM YYYY', - LLL : 'D MMMM [de] YYYY [a les] H:mm', - lll : 'D MMM YYYY, H:mm', - LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', - llll : 'ddd D MMM YYYY, H:mm' - }, - calendar : { - sameDay : function () { - return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; - }, - nextDay : function () { - return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; - }, - nextWeek : function () { - return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; - }, - lastDay : function () { - return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; - }, - lastWeek : function () { - return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'd\'aquí %s', - past : 'fa %s', - s : 'uns segons', - ss : '%d segons', - m : 'un minut', - mm : '%d minuts', - h : 'una hora', - hh : '%d hores', - d : 'un dia', - dd : '%d dies', - M : 'un mes', - MM : '%d mesos', - y : 'un any', - yy : '%d anys' - }, - dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, - ordinal : function (number, period) { - var output = (number === 1) ? 'r' : - (number === 2) ? 'n' : - (number === 3) ? 'r' : - (number === 4) ? 't' : 'è'; - if (period === 'w' || period === 'W') { - output = 'a'; - } - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return ca; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/cs.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/cs.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), - monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); - - var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; - // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. - // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. - var monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; - - function plural(n) { - return (n > 1) && (n < 5) && (~~(n / 10) !== 1); - } - function translate(number, withoutSuffix, key, isFuture) { - var result = number + ' '; - switch (key) { - case 's': // a few seconds / in a few seconds / a few seconds ago - return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; - case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'sekundy' : 'sekund'); - } else { - return result + 'sekundami'; - } - break; - case 'm': // a minute / in a minute / a minute ago - return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); - case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'minuty' : 'minut'); - } else { - return result + 'minutami'; - } - break; - case 'h': // an hour / in an hour / an hour ago - return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); - case 'hh': // 9 hours / in 9 hours / 9 hours ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'hodiny' : 'hodin'); - } else { - return result + 'hodinami'; - } - break; - case 'd': // a day / in a day / a day ago - return (withoutSuffix || isFuture) ? 'den' : 'dnem'; - case 'dd': // 9 days / in 9 days / 9 days ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'dny' : 'dní'); - } else { - return result + 'dny'; - } - break; - case 'M': // a month / in a month / a month ago - return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; - case 'MM': // 9 months / in 9 months / 9 months ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'měsíce' : 'měsíců'); - } else { - return result + 'měsíci'; - } - break; - case 'y': // a year / in a year / a year ago - return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; - case 'yy': // 9 years / in 9 years / 9 years ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'roky' : 'let'); - } else { - return result + 'lety'; - } - break; - } - } - - var cs = moment.defineLocale('cs', { - months : months, - monthsShort : monthsShort, - monthsRegex : monthsRegex, - monthsShortRegex : monthsRegex, - // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. - // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. - monthsStrictRegex : /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, - monthsShortStrictRegex : /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, - monthsParse : monthsParse, - longMonthsParse : monthsParse, - shortMonthsParse : monthsParse, - weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), - weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), - weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), - longDateFormat : { - LT: 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd D. MMMM YYYY H:mm', - l : 'D. M. YYYY' - }, - calendar : { - sameDay: '[dnes v] LT', - nextDay: '[zítra v] LT', - nextWeek: function () { - switch (this.day()) { - case 0: - return '[v neděli v] LT'; - case 1: - case 2: - return '[v] dddd [v] LT'; - case 3: - return '[ve středu v] LT'; - case 4: - return '[ve čtvrtek v] LT'; - case 5: - return '[v pátek v] LT'; - case 6: - return '[v sobotu v] LT'; - } - }, - lastDay: '[včera v] LT', - lastWeek: function () { - switch (this.day()) { - case 0: - return '[minulou neděli v] LT'; - case 1: - case 2: - return '[minulé] dddd [v] LT'; - case 3: - return '[minulou středu v] LT'; - case 4: - case 5: - return '[minulý] dddd [v] LT'; - case 6: - return '[minulou sobotu v] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'za %s', - past : 'před %s', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse : /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return cs; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/cv.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/cv.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var cv = moment.defineLocale('cv', { - months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), - monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), - weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), - weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), - weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD-MM-YYYY', - LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', - LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', - LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' - }, - calendar : { - sameDay: '[Паян] LT [сехетре]', - nextDay: '[Ыран] LT [сехетре]', - lastDay: '[Ӗнер] LT [сехетре]', - nextWeek: '[Ҫитес] dddd LT [сехетре]', - lastWeek: '[Иртнӗ] dddd LT [сехетре]', - sameElse: 'L' - }, - relativeTime : { - future : function (output) { - var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; - return output + affix; - }, - past : '%s каялла', - s : 'пӗр-ик ҫеккунт', - ss : '%d ҫеккунт', - m : 'пӗр минут', - mm : '%d минут', - h : 'пӗр сехет', - hh : '%d сехет', - d : 'пӗр кун', - dd : '%d кун', - M : 'пӗр уйӑх', - MM : '%d уйӑх', - y : 'пӗр ҫул', - yy : '%d ҫул' - }, - dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, - ordinal : '%d-мӗш', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return cv; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/cy.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/cy.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var cy = moment.defineLocale('cy', { - months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), - monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), - weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), - weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), - weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), - weekdaysParseExact : true, - // time formats are the same as en-gb - longDateFormat: { - LT: 'HH:mm', - LTS : 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY HH:mm', - LLLL: 'dddd, D MMMM YYYY HH:mm' - }, - calendar: { - sameDay: '[Heddiw am] LT', - nextDay: '[Yfory am] LT', - nextWeek: 'dddd [am] LT', - lastDay: '[Ddoe am] LT', - lastWeek: 'dddd [diwethaf am] LT', - sameElse: 'L' - }, - relativeTime: { - future: 'mewn %s', - past: '%s yn ôl', - s: 'ychydig eiliadau', - ss: '%d eiliad', - m: 'munud', - mm: '%d munud', - h: 'awr', - hh: '%d awr', - d: 'diwrnod', - dd: '%d diwrnod', - M: 'mis', - MM: '%d mis', - y: 'blwyddyn', - yy: '%d flynedd' - }, - dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, - // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh - ordinal: function (number) { - var b = number, - output = '', - lookup = [ - '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed - 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed - ]; - if (b > 20) { - if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { - output = 'fed'; // not 30ain, 70ain or 90ain - } else { - output = 'ain'; - } - } else if (b > 0) { - output = lookup[b]; - } - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return cy; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/da.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/da.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var da = moment.defineLocale('da', { - months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), - monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), - weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), - weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), - weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY HH:mm', - LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' - }, - calendar : { - sameDay : '[i dag kl.] LT', - nextDay : '[i morgen kl.] LT', - nextWeek : 'på dddd [kl.] LT', - lastDay : '[i går kl.] LT', - lastWeek : '[i] dddd[s kl.] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'om %s', - past : '%s siden', - s : 'få sekunder', - ss : '%d sekunder', - m : 'et minut', - mm : '%d minutter', - h : 'en time', - hh : '%d timer', - d : 'en dag', - dd : '%d dage', - M : 'en måned', - MM : '%d måneder', - y : 'et år', - yy : '%d år' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return da; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/de-at.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/de-at.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 'm': ['eine Minute', 'einer Minute'], - 'h': ['eine Stunde', 'einer Stunde'], - 'd': ['ein Tag', 'einem Tag'], - 'dd': [number + ' Tage', number + ' Tagen'], - 'M': ['ein Monat', 'einem Monat'], - 'MM': [number + ' Monate', number + ' Monaten'], - 'y': ['ein Jahr', 'einem Jahr'], - 'yy': [number + ' Jahre', number + ' Jahren'] - }; - return withoutSuffix ? format[key][0] : format[key][1]; - } - - var deAt = moment.defineLocale('de-at', { - months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), - monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), - monthsParseExact : true, - weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), - weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), - weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY HH:mm', - LLLL : 'dddd, D. MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[heute um] LT [Uhr]', - sameElse: 'L', - nextDay: '[morgen um] LT [Uhr]', - nextWeek: 'dddd [um] LT [Uhr]', - lastDay: '[gestern um] LT [Uhr]', - lastWeek: '[letzten] dddd [um] LT [Uhr]' - }, - relativeTime : { - future : 'in %s', - past : 'vor %s', - s : 'ein paar Sekunden', - ss : '%d Sekunden', - m : processRelativeTime, - mm : '%d Minuten', - h : processRelativeTime, - hh : '%d Stunden', - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return deAt; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/de-ch.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/de-ch.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 'm': ['eine Minute', 'einer Minute'], - 'h': ['eine Stunde', 'einer Stunde'], - 'd': ['ein Tag', 'einem Tag'], - 'dd': [number + ' Tage', number + ' Tagen'], - 'M': ['ein Monat', 'einem Monat'], - 'MM': [number + ' Monate', number + ' Monaten'], - 'y': ['ein Jahr', 'einem Jahr'], - 'yy': [number + ' Jahre', number + ' Jahren'] - }; - return withoutSuffix ? format[key][0] : format[key][1]; - } - - var deCh = moment.defineLocale('de-ch', { - months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), - monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), - monthsParseExact : true, - weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), - weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), - weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY HH:mm', - LLLL : 'dddd, D. MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[heute um] LT [Uhr]', - sameElse: 'L', - nextDay: '[morgen um] LT [Uhr]', - nextWeek: 'dddd [um] LT [Uhr]', - lastDay: '[gestern um] LT [Uhr]', - lastWeek: '[letzten] dddd [um] LT [Uhr]' - }, - relativeTime : { - future : 'in %s', - past : 'vor %s', - s : 'ein paar Sekunden', - ss : '%d Sekunden', - m : processRelativeTime, - mm : '%d Minuten', - h : processRelativeTime, - hh : '%d Stunden', - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return deCh; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/de.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/de.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 'm': ['eine Minute', 'einer Minute'], - 'h': ['eine Stunde', 'einer Stunde'], - 'd': ['ein Tag', 'einem Tag'], - 'dd': [number + ' Tage', number + ' Tagen'], - 'M': ['ein Monat', 'einem Monat'], - 'MM': [number + ' Monate', number + ' Monaten'], - 'y': ['ein Jahr', 'einem Jahr'], - 'yy': [number + ' Jahre', number + ' Jahren'] - }; - return withoutSuffix ? format[key][0] : format[key][1]; - } - - var de = moment.defineLocale('de', { - months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), - monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), - monthsParseExact : true, - weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), - weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), - weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY HH:mm', - LLLL : 'dddd, D. MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[heute um] LT [Uhr]', - sameElse: 'L', - nextDay: '[morgen um] LT [Uhr]', - nextWeek: 'dddd [um] LT [Uhr]', - lastDay: '[gestern um] LT [Uhr]', - lastWeek: '[letzten] dddd [um] LT [Uhr]' - }, - relativeTime : { - future : 'in %s', - past : 'vor %s', - s : 'ein paar Sekunden', - ss : '%d Sekunden', - m : processRelativeTime, - mm : '%d Minuten', - h : processRelativeTime, - hh : '%d Stunden', - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return de; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/dv.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/dv.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = [ - 'ޖެނުއަރީ', - 'ފެބްރުއަރީ', - 'މާރިޗު', - 'އޭޕްރީލު', - 'މޭ', - 'ޖޫން', - 'ޖުލައި', - 'އޯގަސްޓު', - 'ސެޕްޓެމްބަރު', - 'އޮކްޓޯބަރު', - 'ނޮވެމްބަރު', - 'ޑިސެމްބަރު' - ], weekdays = [ - 'އާދިއްތަ', - 'ހޯމަ', - 'އަންގާރަ', - 'ބުދަ', - 'ބުރާސްފަތި', - 'ހުކުރު', - 'ހޮނިހިރު' - ]; - - var dv = moment.defineLocale('dv', { - months : months, - monthsShort : months, - weekdays : weekdays, - weekdaysShort : weekdays, - weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), - longDateFormat : { - - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'D/M/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - meridiemParse: /މކ|މފ/, - isPM : function (input) { - return 'މފ' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'މކ'; - } else { - return 'މފ'; - } - }, - calendar : { - sameDay : '[މިއަދު] LT', - nextDay : '[މާދަމާ] LT', - nextWeek : 'dddd LT', - lastDay : '[އިއްޔެ] LT', - lastWeek : '[ފާއިތުވި] dddd LT', - sameElse : 'L' - }, - relativeTime : { - future : 'ތެރޭގައި %s', - past : 'ކުރިން %s', - s : 'ސިކުންތުކޮޅެއް', - ss : 'd% ސިކުންތު', - m : 'މިނިޓެއް', - mm : 'މިނިޓު %d', - h : 'ގަޑިއިރެއް', - hh : 'ގަޑިއިރު %d', - d : 'ދުވަހެއް', - dd : 'ދުވަސް %d', - M : 'މަހެއް', - MM : 'މަސް %d', - y : 'އަހަރެއް', - yy : 'އަހަރު %d' - }, - preparse: function (string) { - return string.replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/,/g, '،'); - }, - week : { - dow : 7, // Sunday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return dv; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/el.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/el.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - function isFunction(input) { - return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; - } - - - var el = moment.defineLocale('el', { - monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), - monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), - months : function (momentToFormat, format) { - if (!momentToFormat) { - return this._monthsNominativeEl; - } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' - return this._monthsGenitiveEl[momentToFormat.month()]; - } else { - return this._monthsNominativeEl[momentToFormat.month()]; - } - }, - monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), - weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), - weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), - weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'μμ' : 'ΜΜ'; - } else { - return isLower ? 'πμ' : 'ΠΜ'; - } - }, - isPM : function (input) { - return ((input + '').toLowerCase()[0] === 'μ'); - }, - meridiemParse : /[ΠΜ]\.?Μ?\.?/i, - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendarEl : { - sameDay : '[Σήμερα {}] LT', - nextDay : '[Αύριο {}] LT', - nextWeek : 'dddd [{}] LT', - lastDay : '[Χθες {}] LT', - lastWeek : function () { - switch (this.day()) { - case 6: - return '[το προηγούμενο] dddd [{}] LT'; - default: - return '[την προηγούμενη] dddd [{}] LT'; - } - }, - sameElse : 'L' - }, - calendar : function (key, mom) { - var output = this._calendarEl[key], - hours = mom && mom.hours(); - if (isFunction(output)) { - output = output.apply(mom); - } - return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); - }, - relativeTime : { - future : 'σε %s', - past : '%s πριν', - s : 'λίγα δευτερόλεπτα', - ss : '%d δευτερόλεπτα', - m : 'ένα λεπτό', - mm : '%d λεπτά', - h : 'μία ώρα', - hh : '%d ώρες', - d : 'μία μέρα', - dd : '%d μέρες', - M : 'ένας μήνας', - MM : '%d μήνες', - y : 'ένας χρόνος', - yy : '%d χρόνια' - }, - dayOfMonthOrdinalParse: /\d{1,2}η/, - ordinal: '%dη', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4st is the first week of the year. - } - }); - - return el; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-SG.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-SG.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enSG = moment.defineLocale('en-SG', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return enSG; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-au.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-au.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enAu = moment.defineLocale('en-au', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return enAu; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-ca.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-ca.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enCa = moment.defineLocale('en-ca', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'YYYY-MM-DD', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY h:mm A', - LLLL : 'dddd, MMMM D, YYYY h:mm A' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - } - }); - - return enCa; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-gb.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-gb.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enGb = moment.defineLocale('en-gb', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return enGb; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-ie.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-ie.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enIe = moment.defineLocale('en-ie', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return enIe; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-il.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-il.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enIl = moment.defineLocale('en-il', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - } - }); - - return enIl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/en-nz.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/en-nz.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var enNz = moment.defineLocale('en-nz', { - months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return enNz; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/eo.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/eo.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var eo = moment.defineLocale('eo', { - months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), - monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), - weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), - weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), - weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'D[-a de] MMMM, YYYY', - LLL : 'D[-a de] MMMM, YYYY HH:mm', - LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' - }, - meridiemParse: /[ap]\.t\.m/i, - isPM: function (input) { - return input.charAt(0).toLowerCase() === 'p'; - }, - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'p.t.m.' : 'P.T.M.'; - } else { - return isLower ? 'a.t.m.' : 'A.T.M.'; - } - }, - calendar : { - sameDay : '[Hodiaŭ je] LT', - nextDay : '[Morgaŭ je] LT', - nextWeek : 'dddd [je] LT', - lastDay : '[Hieraŭ je] LT', - lastWeek : '[pasinta] dddd [je] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'post %s', - past : 'antaŭ %s', - s : 'sekundoj', - ss : '%d sekundoj', - m : 'minuto', - mm : '%d minutoj', - h : 'horo', - hh : '%d horoj', - d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo - dd : '%d tagoj', - M : 'monato', - MM : '%d monatoj', - y : 'jaro', - yy : '%d jaroj' - }, - dayOfMonthOrdinalParse: /\d{1,2}a/, - ordinal : '%da', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return eo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/es-do.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/es-do.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), - monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); - - var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; - var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; - - var esDo = moment.defineLocale('es-do', { - months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortDot; - } else if (/-MMM-/.test(format)) { - return monthsShort[m.month()]; - } else { - return monthsShortDot[m.month()]; - } - }, - monthsRegex: monthsRegex, - monthsShortRegex: monthsRegex, - monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, - monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, - monthsParse: monthsParse, - longMonthsParse: monthsParse, - shortMonthsParse: monthsParse, - weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), - weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), - weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY h:mm A', - LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' - }, - calendar : { - sameDay : function () { - return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextDay : function () { - return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextWeek : function () { - return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastDay : function () { - return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastWeek : function () { - return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'en %s', - past : 'hace %s', - s : 'unos segundos', - ss : '%d segundos', - m : 'un minuto', - mm : '%d minutos', - h : 'una hora', - hh : '%d horas', - d : 'un día', - dd : '%d días', - M : 'un mes', - MM : '%d meses', - y : 'un año', - yy : '%d años' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal : '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return esDo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/es-us.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/es-us.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), - monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); - - var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; - var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; - - var esUs = moment.defineLocale('es-us', { - months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortDot; - } else if (/-MMM-/.test(format)) { - return monthsShort[m.month()]; - } else { - return monthsShortDot[m.month()]; - } - }, - monthsRegex: monthsRegex, - monthsShortRegex: monthsRegex, - monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, - monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, - monthsParse: monthsParse, - longMonthsParse: monthsParse, - shortMonthsParse: monthsParse, - weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), - weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), - weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'MM/DD/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY h:mm A', - LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' - }, - calendar : { - sameDay : function () { - return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextDay : function () { - return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextWeek : function () { - return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastDay : function () { - return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastWeek : function () { - return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'en %s', - past : 'hace %s', - s : 'unos segundos', - ss : '%d segundos', - m : 'un minuto', - mm : '%d minutos', - h : 'una hora', - hh : '%d horas', - d : 'un día', - dd : '%d días', - M : 'un mes', - MM : '%d meses', - y : 'un año', - yy : '%d años' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal : '%dº', - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return esUs; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/es.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/es.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), - monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); - - var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; - var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; - - var es = moment.defineLocale('es', { - months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortDot; - } else if (/-MMM-/.test(format)) { - return monthsShort[m.month()]; - } else { - return monthsShortDot[m.month()]; - } - }, - monthsRegex : monthsRegex, - monthsShortRegex : monthsRegex, - monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, - monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, - monthsParse : monthsParse, - longMonthsParse : monthsParse, - shortMonthsParse : monthsParse, - weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), - weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), - weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY H:mm', - LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' - }, - calendar : { - sameDay : function () { - return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextDay : function () { - return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - nextWeek : function () { - return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastDay : function () { - return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - lastWeek : function () { - return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'en %s', - past : 'hace %s', - s : 'unos segundos', - ss : '%d segundos', - m : 'un minuto', - mm : '%d minutos', - h : 'una hora', - hh : '%d horas', - d : 'un día', - dd : '%d días', - M : 'un mes', - MM : '%d meses', - y : 'un año', - yy : '%d años' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal : '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return es; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/et.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/et.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], - 'ss': [number + 'sekundi', number + 'sekundit'], - 'm' : ['ühe minuti', 'üks minut'], - 'mm': [number + ' minuti', number + ' minutit'], - 'h' : ['ühe tunni', 'tund aega', 'üks tund'], - 'hh': [number + ' tunni', number + ' tundi'], - 'd' : ['ühe päeva', 'üks päev'], - 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], - 'MM': [number + ' kuu', number + ' kuud'], - 'y' : ['ühe aasta', 'aasta', 'üks aasta'], - 'yy': [number + ' aasta', number + ' aastat'] - }; - if (withoutSuffix) { - return format[key][2] ? format[key][2] : format[key][1]; - } - return isFuture ? format[key][0] : format[key][1]; - } - - var et = moment.defineLocale('et', { - months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), - monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), - weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), - weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), - weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd, D. MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[Täna,] LT', - nextDay : '[Homme,] LT', - nextWeek : '[Järgmine] dddd LT', - lastDay : '[Eile,] LT', - lastWeek : '[Eelmine] dddd LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s pärast', - past : '%s tagasi', - s : processRelativeTime, - ss : processRelativeTime, - m : processRelativeTime, - mm : processRelativeTime, - h : processRelativeTime, - hh : processRelativeTime, - d : processRelativeTime, - dd : '%d päeva', - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return et; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/eu.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/eu.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var eu = moment.defineLocale('eu', { - months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), - monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), - monthsParseExact : true, - weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), - weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), - weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'YYYY[ko] MMMM[ren] D[a]', - LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', - LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', - l : 'YYYY-M-D', - ll : 'YYYY[ko] MMM D[a]', - lll : 'YYYY[ko] MMM D[a] HH:mm', - llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' - }, - calendar : { - sameDay : '[gaur] LT[etan]', - nextDay : '[bihar] LT[etan]', - nextWeek : 'dddd LT[etan]', - lastDay : '[atzo] LT[etan]', - lastWeek : '[aurreko] dddd LT[etan]', - sameElse : 'L' - }, - relativeTime : { - future : '%s barru', - past : 'duela %s', - s : 'segundo batzuk', - ss : '%d segundo', - m : 'minutu bat', - mm : '%d minutu', - h : 'ordu bat', - hh : '%d ordu', - d : 'egun bat', - dd : '%d egun', - M : 'hilabete bat', - MM : '%d hilabete', - y : 'urte bat', - yy : '%d urte' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return eu; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fa.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/fa.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '۱', - '2': '۲', - '3': '۳', - '4': '۴', - '5': '۵', - '6': '۶', - '7': '۷', - '8': '۸', - '9': '۹', - '0': '۰' - }, numberMap = { - '۱': '1', - '۲': '2', - '۳': '3', - '۴': '4', - '۵': '5', - '۶': '6', - '۷': '7', - '۸': '8', - '۹': '9', - '۰': '0' - }; - - var fa = moment.defineLocale('fa', { - months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), - monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), - weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), - weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), - weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - meridiemParse: /قبل از ظهر|بعد از ظهر/, - isPM: function (input) { - return /بعد از ظهر/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'قبل از ظهر'; - } else { - return 'بعد از ظهر'; - } - }, - calendar : { - sameDay : '[امروز ساعت] LT', - nextDay : '[فردا ساعت] LT', - nextWeek : 'dddd [ساعت] LT', - lastDay : '[دیروز ساعت] LT', - lastWeek : 'dddd [پیش] [ساعت] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'در %s', - past : '%s پیش', - s : 'چند ثانیه', - ss : 'ثانیه d%', - m : 'یک دقیقه', - mm : '%d دقیقه', - h : 'یک ساعت', - hh : '%d ساعت', - d : 'یک روز', - dd : '%d روز', - M : 'یک ماه', - MM : '%d ماه', - y : 'یک سال', - yy : '%d سال' - }, - preparse: function (string) { - return string.replace(/[۰-۹]/g, function (match) { - return numberMap[match]; - }).replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }).replace(/,/g, '،'); - }, - dayOfMonthOrdinalParse: /\d{1,2}م/, - ordinal : '%dم', - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return fa; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fi.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/fi.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), - numbersFuture = [ - 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', - numbersPast[7], numbersPast[8], numbersPast[9] - ]; - function translate(number, withoutSuffix, key, isFuture) { - var result = ''; - switch (key) { - case 's': - return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; - case 'ss': - return isFuture ? 'sekunnin' : 'sekuntia'; - case 'm': - return isFuture ? 'minuutin' : 'minuutti'; - case 'mm': - result = isFuture ? 'minuutin' : 'minuuttia'; - break; - case 'h': - return isFuture ? 'tunnin' : 'tunti'; - case 'hh': - result = isFuture ? 'tunnin' : 'tuntia'; - break; - case 'd': - return isFuture ? 'päivän' : 'päivä'; - case 'dd': - result = isFuture ? 'päivän' : 'päivää'; - break; - case 'M': - return isFuture ? 'kuukauden' : 'kuukausi'; - case 'MM': - result = isFuture ? 'kuukauden' : 'kuukautta'; - break; - case 'y': - return isFuture ? 'vuoden' : 'vuosi'; - case 'yy': - result = isFuture ? 'vuoden' : 'vuotta'; - break; - } - result = verbalNumber(number, isFuture) + ' ' + result; - return result; - } - function verbalNumber(number, isFuture) { - return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; - } - - var fi = moment.defineLocale('fi', { - months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), - monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), - weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), - weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), - weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD.MM.YYYY', - LL : 'Do MMMM[ta] YYYY', - LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', - LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', - l : 'D.M.YYYY', - ll : 'Do MMM YYYY', - lll : 'Do MMM YYYY, [klo] HH.mm', - llll : 'ddd, Do MMM YYYY, [klo] HH.mm' - }, - calendar : { - sameDay : '[tänään] [klo] LT', - nextDay : '[huomenna] [klo] LT', - nextWeek : 'dddd [klo] LT', - lastDay : '[eilen] [klo] LT', - lastWeek : '[viime] dddd[na] [klo] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s päästä', - past : '%s sitten', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return fi; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fo.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/fo.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var fo = moment.defineLocale('fo', { - months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), - monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), - weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), - weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), - weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D. MMMM, YYYY HH:mm' - }, - calendar : { - sameDay : '[Í dag kl.] LT', - nextDay : '[Í morgin kl.] LT', - nextWeek : 'dddd [kl.] LT', - lastDay : '[Í gjár kl.] LT', - lastWeek : '[síðstu] dddd [kl] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'um %s', - past : '%s síðani', - s : 'fá sekund', - ss : '%d sekundir', - m : 'ein minuttur', - mm : '%d minuttir', - h : 'ein tími', - hh : '%d tímar', - d : 'ein dagur', - dd : '%d dagar', - M : 'ein mánaður', - MM : '%d mánaðir', - y : 'eitt ár', - yy : '%d ár' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return fo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fr-ca.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/fr-ca.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var frCa = moment.defineLocale('fr-ca', { - months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), - monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), - monthsParseExact : true, - weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), - weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), - weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Aujourd’hui à] LT', - nextDay : '[Demain à] LT', - nextWeek : 'dddd [à] LT', - lastDay : '[Hier à] LT', - lastWeek : 'dddd [dernier à] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dans %s', - past : 'il y a %s', - s : 'quelques secondes', - ss : '%d secondes', - m : 'une minute', - mm : '%d minutes', - h : 'une heure', - hh : '%d heures', - d : 'un jour', - dd : '%d jours', - M : 'un mois', - MM : '%d mois', - y : 'un an', - yy : '%d ans' - }, - dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, - ordinal : function (number, period) { - switch (period) { - // Words with masculine grammatical gender: mois, trimestre, jour - default: - case 'M': - case 'Q': - case 'D': - case 'DDD': - case 'd': - return number + (number === 1 ? 'er' : 'e'); - - // Words with feminine grammatical gender: semaine - case 'w': - case 'W': - return number + (number === 1 ? 're' : 'e'); - } - } - }); - - return frCa; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fr-ch.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/fr-ch.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var frCh = moment.defineLocale('fr-ch', { - months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), - monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), - monthsParseExact : true, - weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), - weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), - weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Aujourd’hui à] LT', - nextDay : '[Demain à] LT', - nextWeek : 'dddd [à] LT', - lastDay : '[Hier à] LT', - lastWeek : 'dddd [dernier à] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dans %s', - past : 'il y a %s', - s : 'quelques secondes', - ss : '%d secondes', - m : 'une minute', - mm : '%d minutes', - h : 'une heure', - hh : '%d heures', - d : 'un jour', - dd : '%d jours', - M : 'un mois', - MM : '%d mois', - y : 'un an', - yy : '%d ans' - }, - dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, - ordinal : function (number, period) { - switch (period) { - // Words with masculine grammatical gender: mois, trimestre, jour - default: - case 'M': - case 'Q': - case 'D': - case 'DDD': - case 'd': - return number + (number === 1 ? 'er' : 'e'); - - // Words with feminine grammatical gender: semaine - case 'w': - case 'W': - return number + (number === 1 ? 're' : 'e'); - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return frCh; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fr.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/fr.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var fr = moment.defineLocale('fr', { - months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), - monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), - monthsParseExact : true, - weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), - weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), - weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Aujourd’hui à] LT', - nextDay : '[Demain à] LT', - nextWeek : 'dddd [à] LT', - lastDay : '[Hier à] LT', - lastWeek : 'dddd [dernier à] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dans %s', - past : 'il y a %s', - s : 'quelques secondes', - ss : '%d secondes', - m : 'une minute', - mm : '%d minutes', - h : 'une heure', - hh : '%d heures', - d : 'un jour', - dd : '%d jours', - M : 'un mois', - MM : '%d mois', - y : 'un an', - yy : '%d ans' - }, - dayOfMonthOrdinalParse: /\d{1,2}(er|)/, - ordinal : function (number, period) { - switch (period) { - // TODO: Return 'e' when day of month > 1. Move this case inside - // block for masculine words below. - // See https://github.com/moment/moment/issues/3375 - case 'D': - return number + (number === 1 ? 'er' : ''); - - // Words with masculine grammatical gender: mois, trimestre, jour - default: - case 'M': - case 'Q': - case 'DDD': - case 'd': - return number + (number === 1 ? 'er' : 'e'); - - // Words with feminine grammatical gender: semaine - case 'w': - case 'W': - return number + (number === 1 ? 're' : 'e'); - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return fr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/fy.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/fy.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), - monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); - - var fy = moment.defineLocale('fy', { - months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortWithDots; - } else if (/-MMM-/.test(format)) { - return monthsShortWithoutDots[m.month()]; - } else { - return monthsShortWithDots[m.month()]; - } - }, - monthsParseExact : true, - weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), - weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), - weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD-MM-YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[hjoed om] LT', - nextDay: '[moarn om] LT', - nextWeek: 'dddd [om] LT', - lastDay: '[juster om] LT', - lastWeek: '[ôfrûne] dddd [om] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'oer %s', - past : '%s lyn', - s : 'in pear sekonden', - ss : '%d sekonden', - m : 'ien minút', - mm : '%d minuten', - h : 'ien oere', - hh : '%d oeren', - d : 'ien dei', - dd : '%d dagen', - M : 'ien moanne', - MM : '%d moannen', - y : 'ien jier', - yy : '%d jierren' - }, - dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, - ordinal : function (number) { - return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return fy; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ga.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ga.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - - var months = [ - 'Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig' - ]; - - var monthsShort = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll']; - - var weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn']; - - var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat']; - - var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa']; - - var ga = moment.defineLocale('ga', { - months: months, - monthsShort: monthsShort, - monthsParseExact: true, - weekdays: weekdays, - weekdaysShort: weekdaysShort, - weekdaysMin: weekdaysMin, - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY HH:mm', - LLLL: 'dddd, D MMMM YYYY HH:mm' - }, - calendar: { - sameDay: '[Inniu ag] LT', - nextDay: '[Amárach ag] LT', - nextWeek: 'dddd [ag] LT', - lastDay: '[Inné aig] LT', - lastWeek: 'dddd [seo caite] [ag] LT', - sameElse: 'L' - }, - relativeTime: { - future: 'i %s', - past: '%s ó shin', - s: 'cúpla soicind', - ss: '%d soicind', - m: 'nóiméad', - mm: '%d nóiméad', - h: 'uair an chloig', - hh: '%d uair an chloig', - d: 'lá', - dd: '%d lá', - M: 'mí', - MM: '%d mí', - y: 'bliain', - yy: '%d bliain' - }, - dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, - ordinal: function (number) { - var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; - return number + output; - }, - week: { - dow: 1, // Monday is the first day of the week. - doy: 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return ga; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/gd.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/gd.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = [ - 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' - ]; - - var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; - - var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; - - var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; - - var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; - - var gd = moment.defineLocale('gd', { - months : months, - monthsShort : monthsShort, - monthsParseExact : true, - weekdays : weekdays, - weekdaysShort : weekdaysShort, - weekdaysMin : weekdaysMin, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[An-diugh aig] LT', - nextDay : '[A-màireach aig] LT', - nextWeek : 'dddd [aig] LT', - lastDay : '[An-dè aig] LT', - lastWeek : 'dddd [seo chaidh] [aig] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'ann an %s', - past : 'bho chionn %s', - s : 'beagan diogan', - ss : '%d diogan', - m : 'mionaid', - mm : '%d mionaidean', - h : 'uair', - hh : '%d uairean', - d : 'latha', - dd : '%d latha', - M : 'mìos', - MM : '%d mìosan', - y : 'bliadhna', - yy : '%d bliadhna' - }, - dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, - ordinal : function (number) { - var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return gd; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/gl.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/gl.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var gl = moment.defineLocale('gl', { - months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), - monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), - monthsParseExact: true, - weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), - weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), - weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY H:mm', - LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' - }, - calendar : { - sameDay : function () { - return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; - }, - nextDay : function () { - return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; - }, - nextWeek : function () { - return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; - }, - lastDay : function () { - return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; - }, - lastWeek : function () { - return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; - }, - sameElse : 'L' - }, - relativeTime : { - future : function (str) { - if (str.indexOf('un') === 0) { - return 'n' + str; - } - return 'en ' + str; - }, - past : 'hai %s', - s : 'uns segundos', - ss : '%d segundos', - m : 'un minuto', - mm : '%d minutos', - h : 'unha hora', - hh : '%d horas', - d : 'un día', - dd : '%d días', - M : 'un mes', - MM : '%d meses', - y : 'un ano', - yy : '%d anos' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal : '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return gl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/gom-latn.js": -/*!************************************************!*\ - !*** ./node_modules/moment/locale/gom-latn.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 's': ['thodde secondanim', 'thodde second'], - 'ss': [number + ' secondanim', number + ' second'], - 'm': ['eka mintan', 'ek minute'], - 'mm': [number + ' mintanim', number + ' mintam'], - 'h': ['eka voran', 'ek vor'], - 'hh': [number + ' voranim', number + ' voram'], - 'd': ['eka disan', 'ek dis'], - 'dd': [number + ' disanim', number + ' dis'], - 'M': ['eka mhoinean', 'ek mhoino'], - 'MM': [number + ' mhoineanim', number + ' mhoine'], - 'y': ['eka vorsan', 'ek voros'], - 'yy': [number + ' vorsanim', number + ' vorsam'] - }; - return withoutSuffix ? format[key][0] : format[key][1]; - } - - var gomLatn = moment.defineLocale('gom-latn', { - months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), - monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), - monthsParseExact : true, - weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), - weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), - weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'A h:mm [vazta]', - LTS : 'A h:mm:ss [vazta]', - L : 'DD-MM-YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY A h:mm [vazta]', - LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', - llll: 'ddd, D MMM YYYY, A h:mm [vazta]' - }, - calendar : { - sameDay: '[Aiz] LT', - nextDay: '[Faleam] LT', - nextWeek: '[Ieta to] dddd[,] LT', - lastDay: '[Kal] LT', - lastWeek: '[Fatlo] dddd[,] LT', - sameElse: 'L' - }, - relativeTime : { - future : '%s', - past : '%s adim', - s : processRelativeTime, - ss : processRelativeTime, - m : processRelativeTime, - mm : processRelativeTime, - h : processRelativeTime, - hh : processRelativeTime, - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse : /\d{1,2}(er)/, - ordinal : function (number, period) { - switch (period) { - // the ordinal 'er' only applies to day of the month - case 'D': - return number + 'er'; - default: - case 'M': - case 'Q': - case 'DDD': - case 'd': - case 'w': - case 'W': - return number; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - }, - meridiemParse: /rati|sokalli|donparam|sanje/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'rati') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'sokalli') { - return hour; - } else if (meridiem === 'donparam') { - return hour > 12 ? hour : hour + 12; - } else if (meridiem === 'sanje') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'rati'; - } else if (hour < 12) { - return 'sokalli'; - } else if (hour < 16) { - return 'donparam'; - } else if (hour < 20) { - return 'sanje'; - } else { - return 'rati'; - } - } - }); - - return gomLatn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/gu.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/gu.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '૧', - '2': '૨', - '3': '૩', - '4': '૪', - '5': '૫', - '6': '૬', - '7': '૭', - '8': '૮', - '9': '૯', - '0': '૦' - }, - numberMap = { - '૧': '1', - '૨': '2', - '૩': '3', - '૪': '4', - '૫': '5', - '૬': '6', - '૭': '7', - '૮': '8', - '૯': '9', - '૦': '0' - }; - - var gu = moment.defineLocale('gu', { - months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), - monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), - monthsParseExact: true, - weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), - weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), - weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), - longDateFormat: { - LT: 'A h:mm વાગ્યે', - LTS: 'A h:mm:ss વાગ્યે', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY, A h:mm વાગ્યે', - LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' - }, - calendar: { - sameDay: '[આજ] LT', - nextDay: '[કાલે] LT', - nextWeek: 'dddd, LT', - lastDay: '[ગઇકાલે] LT', - lastWeek: '[પાછલા] dddd, LT', - sameElse: 'L' - }, - relativeTime: { - future: '%s મા', - past: '%s પેહલા', - s: 'અમુક પળો', - ss: '%d સેકંડ', - m: 'એક મિનિટ', - mm: '%d મિનિટ', - h: 'એક કલાક', - hh: '%d કલાક', - d: 'એક દિવસ', - dd: '%d દિવસ', - M: 'એક મહિનો', - MM: '%d મહિનો', - y: 'એક વર્ષ', - yy: '%d વર્ષ' - }, - preparse: function (string) { - return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - // Gujarati notation for meridiems are quite fuzzy in practice. While there exists - // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. - meridiemParse: /રાત|બપોર|સવાર|સાંજ/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'રાત') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'સવાર') { - return hour; - } else if (meridiem === 'બપોર') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'સાંજ') { - return hour + 12; - } - }, - meridiem: function (hour, minute, isLower) { - if (hour < 4) { - return 'રાત'; - } else if (hour < 10) { - return 'સવાર'; - } else if (hour < 17) { - return 'બપોર'; - } else if (hour < 20) { - return 'સાંજ'; - } else { - return 'રાત'; - } - }, - week: { - dow: 0, // Sunday is the first day of the week. - doy: 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return gu; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/he.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/he.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var he = moment.defineLocale('he', { - months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), - monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), - weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), - weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), - weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D [ב]MMMM YYYY', - LLL : 'D [ב]MMMM YYYY HH:mm', - LLLL : 'dddd, D [ב]MMMM YYYY HH:mm', - l : 'D/M/YYYY', - ll : 'D MMM YYYY', - lll : 'D MMM YYYY HH:mm', - llll : 'ddd, D MMM YYYY HH:mm' - }, - calendar : { - sameDay : '[היום ב־]LT', - nextDay : '[מחר ב־]LT', - nextWeek : 'dddd [בשעה] LT', - lastDay : '[אתמול ב־]LT', - lastWeek : '[ביום] dddd [האחרון בשעה] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'בעוד %s', - past : 'לפני %s', - s : 'מספר שניות', - ss : '%d שניות', - m : 'דקה', - mm : '%d דקות', - h : 'שעה', - hh : function (number) { - if (number === 2) { - return 'שעתיים'; - } - return number + ' שעות'; - }, - d : 'יום', - dd : function (number) { - if (number === 2) { - return 'יומיים'; - } - return number + ' ימים'; - }, - M : 'חודש', - MM : function (number) { - if (number === 2) { - return 'חודשיים'; - } - return number + ' חודשים'; - }, - y : 'שנה', - yy : function (number) { - if (number === 2) { - return 'שנתיים'; - } else if (number % 10 === 0 && number !== 10) { - return number + ' שנה'; - } - return number + ' שנים'; - } - }, - meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, - isPM : function (input) { - return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 5) { - return 'לפנות בוקר'; - } else if (hour < 10) { - return 'בבוקר'; - } else if (hour < 12) { - return isLower ? 'לפנה"צ' : 'לפני הצהריים'; - } else if (hour < 18) { - return isLower ? 'אחה"צ' : 'אחרי הצהריים'; - } else { - return 'בערב'; - } - } - }); - - return he; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/hi.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/hi.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '१', - '2': '२', - '3': '३', - '4': '४', - '5': '५', - '6': '६', - '7': '७', - '8': '८', - '9': '९', - '0': '०' - }, - numberMap = { - '१': '1', - '२': '2', - '३': '3', - '४': '4', - '५': '5', - '६': '6', - '७': '7', - '८': '8', - '९': '9', - '०': '0' - }; - - var hi = moment.defineLocale('hi', { - months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), - monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), - monthsParseExact: true, - weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), - weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), - weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), - longDateFormat : { - LT : 'A h:mm बजे', - LTS : 'A h:mm:ss बजे', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm बजे', - LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' - }, - calendar : { - sameDay : '[आज] LT', - nextDay : '[कल] LT', - nextWeek : 'dddd, LT', - lastDay : '[कल] LT', - lastWeek : '[पिछले] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s में', - past : '%s पहले', - s : 'कुछ ही क्षण', - ss : '%d सेकंड', - m : 'एक मिनट', - mm : '%d मिनट', - h : 'एक घंटा', - hh : '%d घंटे', - d : 'एक दिन', - dd : '%d दिन', - M : 'एक महीने', - MM : '%d महीने', - y : 'एक वर्ष', - yy : '%d वर्ष' - }, - preparse: function (string) { - return string.replace(/[१२३४५६७८९०]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - // Hindi notation for meridiems are quite fuzzy in practice. While there exists - // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. - meridiemParse: /रात|सुबह|दोपहर|शाम/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'रात') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'सुबह') { - return hour; - } else if (meridiem === 'दोपहर') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'शाम') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'रात'; - } else if (hour < 10) { - return 'सुबह'; - } else if (hour < 17) { - return 'दोपहर'; - } else if (hour < 20) { - return 'शाम'; - } else { - return 'रात'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return hi; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/hr.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/hr.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function translate(number, withoutSuffix, key) { - var result = number + ' '; - switch (key) { - case 'ss': - if (number === 1) { - result += 'sekunda'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'sekunde'; - } else { - result += 'sekundi'; - } - return result; - case 'm': - return withoutSuffix ? 'jedna minuta' : 'jedne minute'; - case 'mm': - if (number === 1) { - result += 'minuta'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'minute'; - } else { - result += 'minuta'; - } - return result; - case 'h': - return withoutSuffix ? 'jedan sat' : 'jednog sata'; - case 'hh': - if (number === 1) { - result += 'sat'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'sata'; - } else { - result += 'sati'; - } - return result; - case 'dd': - if (number === 1) { - result += 'dan'; - } else { - result += 'dana'; - } - return result; - case 'MM': - if (number === 1) { - result += 'mjesec'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'mjeseca'; - } else { - result += 'mjeseci'; - } - return result; - case 'yy': - if (number === 1) { - result += 'godina'; - } else if (number === 2 || number === 3 || number === 4) { - result += 'godine'; - } else { - result += 'godina'; - } - return result; - } - } - - var hr = moment.defineLocale('hr', { - months : { - format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), - standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') - }, - monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), - monthsParseExact: true, - weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), - weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), - weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd, D. MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[danas u] LT', - nextDay : '[sutra u] LT', - nextWeek : function () { - switch (this.day()) { - case 0: - return '[u] [nedjelju] [u] LT'; - case 3: - return '[u] [srijedu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[u] dddd [u] LT'; - } - }, - lastDay : '[jučer u] LT', - lastWeek : function () { - switch (this.day()) { - case 0: - case 3: - return '[prošlu] dddd [u] LT'; - case 6: - return '[prošle] [subote] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[prošli] dddd [u] LT'; - } - }, - sameElse : 'L' - }, - relativeTime : { - future : 'za %s', - past : 'prije %s', - s : 'par sekundi', - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : 'dan', - dd : translate, - M : 'mjesec', - MM : translate, - y : 'godinu', - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return hr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/hu.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/hu.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); - function translate(number, withoutSuffix, key, isFuture) { - var num = number; - switch (key) { - case 's': - return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; - case 'ss': - return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; - case 'm': - return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); - case 'mm': - return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); - case 'h': - return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); - case 'hh': - return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); - case 'd': - return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); - case 'dd': - return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); - case 'M': - return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); - case 'MM': - return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); - case 'y': - return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); - case 'yy': - return num + (isFuture || withoutSuffix ? ' év' : ' éve'); - } - return ''; - } - function week(isFuture) { - return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; - } - - var hu = moment.defineLocale('hu', { - months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), - monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), - weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), - weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), - weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'YYYY.MM.DD.', - LL : 'YYYY. MMMM D.', - LLL : 'YYYY. MMMM D. H:mm', - LLLL : 'YYYY. MMMM D., dddd H:mm' - }, - meridiemParse: /de|du/i, - isPM: function (input) { - return input.charAt(1).toLowerCase() === 'u'; - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 12) { - return isLower === true ? 'de' : 'DE'; - } else { - return isLower === true ? 'du' : 'DU'; - } - }, - calendar : { - sameDay : '[ma] LT[-kor]', - nextDay : '[holnap] LT[-kor]', - nextWeek : function () { - return week.call(this, true); - }, - lastDay : '[tegnap] LT[-kor]', - lastWeek : function () { - return week.call(this, false); - }, - sameElse : 'L' - }, - relativeTime : { - future : '%s múlva', - past : '%s', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return hu; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/hy-am.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/hy-am.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var hyAm = moment.defineLocale('hy-am', { - months : { - format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), - standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') - }, - monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), - weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), - weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), - weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY թ.', - LLL : 'D MMMM YYYY թ., HH:mm', - LLLL : 'dddd, D MMMM YYYY թ., HH:mm' - }, - calendar : { - sameDay: '[այսօր] LT', - nextDay: '[վաղը] LT', - lastDay: '[երեկ] LT', - nextWeek: function () { - return 'dddd [օրը ժամը] LT'; - }, - lastWeek: function () { - return '[անցած] dddd [օրը ժամը] LT'; - }, - sameElse: 'L' - }, - relativeTime : { - future : '%s հետո', - past : '%s առաջ', - s : 'մի քանի վայրկյան', - ss : '%d վայրկյան', - m : 'րոպե', - mm : '%d րոպե', - h : 'ժամ', - hh : '%d ժամ', - d : 'օր', - dd : '%d օր', - M : 'ամիս', - MM : '%d ամիս', - y : 'տարի', - yy : '%d տարի' - }, - meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, - isPM: function (input) { - return /^(ցերեկվա|երեկոյան)$/.test(input); - }, - meridiem : function (hour) { - if (hour < 4) { - return 'գիշերվա'; - } else if (hour < 12) { - return 'առավոտվա'; - } else if (hour < 17) { - return 'ցերեկվա'; - } else { - return 'երեկոյան'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, - ordinal: function (number, period) { - switch (period) { - case 'DDD': - case 'w': - case 'W': - case 'DDDo': - if (number === 1) { - return number + '-ին'; - } - return number + '-րդ'; - default: - return number; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return hyAm; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/id.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/id.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var id = moment.defineLocale('id', { - months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), - weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), - weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), - weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY [pukul] HH.mm', - LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' - }, - meridiemParse: /pagi|siang|sore|malam/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'pagi') { - return hour; - } else if (meridiem === 'siang') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'sore' || meridiem === 'malam') { - return hour + 12; - } - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 11) { - return 'pagi'; - } else if (hours < 15) { - return 'siang'; - } else if (hours < 19) { - return 'sore'; - } else { - return 'malam'; - } - }, - calendar : { - sameDay : '[Hari ini pukul] LT', - nextDay : '[Besok pukul] LT', - nextWeek : 'dddd [pukul] LT', - lastDay : '[Kemarin pukul] LT', - lastWeek : 'dddd [lalu pukul] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dalam %s', - past : '%s yang lalu', - s : 'beberapa detik', - ss : '%d detik', - m : 'semenit', - mm : '%d menit', - h : 'sejam', - hh : '%d jam', - d : 'sehari', - dd : '%d hari', - M : 'sebulan', - MM : '%d bulan', - y : 'setahun', - yy : '%d tahun' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return id; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/is.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/is.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function plural(n) { - if (n % 100 === 11) { - return true; - } else if (n % 10 === 1) { - return false; - } - return true; - } - function translate(number, withoutSuffix, key, isFuture) { - var result = number + ' '; - switch (key) { - case 's': - return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; - case 'ss': - if (plural(number)) { - return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); - } - return result + 'sekúnda'; - case 'm': - return withoutSuffix ? 'mínúta' : 'mínútu'; - case 'mm': - if (plural(number)) { - return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); - } else if (withoutSuffix) { - return result + 'mínúta'; - } - return result + 'mínútu'; - case 'hh': - if (plural(number)) { - return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); - } - return result + 'klukkustund'; - case 'd': - if (withoutSuffix) { - return 'dagur'; - } - return isFuture ? 'dag' : 'degi'; - case 'dd': - if (plural(number)) { - if (withoutSuffix) { - return result + 'dagar'; - } - return result + (isFuture ? 'daga' : 'dögum'); - } else if (withoutSuffix) { - return result + 'dagur'; - } - return result + (isFuture ? 'dag' : 'degi'); - case 'M': - if (withoutSuffix) { - return 'mánuður'; - } - return isFuture ? 'mánuð' : 'mánuði'; - case 'MM': - if (plural(number)) { - if (withoutSuffix) { - return result + 'mánuðir'; - } - return result + (isFuture ? 'mánuði' : 'mánuðum'); - } else if (withoutSuffix) { - return result + 'mánuður'; - } - return result + (isFuture ? 'mánuð' : 'mánuði'); - case 'y': - return withoutSuffix || isFuture ? 'ár' : 'ári'; - case 'yy': - if (plural(number)) { - return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); - } - return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); - } - } - - var is = moment.defineLocale('is', { - months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), - monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), - weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), - weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), - weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY [kl.] H:mm', - LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' - }, - calendar : { - sameDay : '[í dag kl.] LT', - nextDay : '[á morgun kl.] LT', - nextWeek : 'dddd [kl.] LT', - lastDay : '[í gær kl.] LT', - lastWeek : '[síðasta] dddd [kl.] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'eftir %s', - past : 'fyrir %s síðan', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : 'klukkustund', - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return is; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/it-ch.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/it-ch.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var itCh = moment.defineLocale('it-ch', { - months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), - monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), - weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), - weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), - weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Oggi alle] LT', - nextDay: '[Domani alle] LT', - nextWeek: 'dddd [alle] LT', - lastDay: '[Ieri alle] LT', - lastWeek: function () { - switch (this.day()) { - case 0: - return '[la scorsa] dddd [alle] LT'; - default: - return '[lo scorso] dddd [alle] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : function (s) { - return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; - }, - past : '%s fa', - s : 'alcuni secondi', - ss : '%d secondi', - m : 'un minuto', - mm : '%d minuti', - h : 'un\'ora', - hh : '%d ore', - d : 'un giorno', - dd : '%d giorni', - M : 'un mese', - MM : '%d mesi', - y : 'un anno', - yy : '%d anni' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal: '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return itCh; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/it.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/it.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var it = moment.defineLocale('it', { - months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), - monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), - weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), - weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), - weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Oggi alle] LT', - nextDay: '[Domani alle] LT', - nextWeek: 'dddd [alle] LT', - lastDay: '[Ieri alle] LT', - lastWeek: function () { - switch (this.day()) { - case 0: - return '[la scorsa] dddd [alle] LT'; - default: - return '[lo scorso] dddd [alle] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : function (s) { - return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; - }, - past : '%s fa', - s : 'alcuni secondi', - ss : '%d secondi', - m : 'un minuto', - mm : '%d minuti', - h : 'un\'ora', - hh : '%d ore', - d : 'un giorno', - dd : '%d giorni', - M : 'un mese', - MM : '%d mesi', - y : 'un anno', - yy : '%d anni' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal: '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return it; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ja.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ja.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ja = moment.defineLocale('ja', { - months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), - monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), - weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), - weekdaysShort : '日_月_火_水_木_金_土'.split('_'), - weekdaysMin : '日_月_火_水_木_金_土'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY/MM/DD', - LL : 'YYYY年M月D日', - LLL : 'YYYY年M月D日 HH:mm', - LLLL : 'YYYY年M月D日 dddd HH:mm', - l : 'YYYY/MM/DD', - ll : 'YYYY年M月D日', - lll : 'YYYY年M月D日 HH:mm', - llll : 'YYYY年M月D日(ddd) HH:mm' - }, - meridiemParse: /午前|午後/i, - isPM : function (input) { - return input === '午後'; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return '午前'; - } else { - return '午後'; - } - }, - calendar : { - sameDay : '[今日] LT', - nextDay : '[明日] LT', - nextWeek : function (now) { - if (now.week() < this.week()) { - return '[来週]dddd LT'; - } else { - return 'dddd LT'; - } - }, - lastDay : '[昨日] LT', - lastWeek : function (now) { - if (this.week() < now.week()) { - return '[先週]dddd LT'; - } else { - return 'dddd LT'; - } - }, - sameElse : 'L' - }, - dayOfMonthOrdinalParse : /\d{1,2}日/, - ordinal : function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'DDD': - return number + '日'; - default: - return number; - } - }, - relativeTime : { - future : '%s後', - past : '%s前', - s : '数秒', - ss : '%d秒', - m : '1分', - mm : '%d分', - h : '1時間', - hh : '%d時間', - d : '1日', - dd : '%d日', - M : '1ヶ月', - MM : '%dヶ月', - y : '1年', - yy : '%d年' - } - }); - - return ja; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/jv.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/jv.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var jv = moment.defineLocale('jv', { - months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), - monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), - weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), - weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), - weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY [pukul] HH.mm', - LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' - }, - meridiemParse: /enjing|siyang|sonten|ndalu/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'enjing') { - return hour; - } else if (meridiem === 'siyang') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'sonten' || meridiem === 'ndalu') { - return hour + 12; - } - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 11) { - return 'enjing'; - } else if (hours < 15) { - return 'siyang'; - } else if (hours < 19) { - return 'sonten'; - } else { - return 'ndalu'; - } - }, - calendar : { - sameDay : '[Dinten puniko pukul] LT', - nextDay : '[Mbenjang pukul] LT', - nextWeek : 'dddd [pukul] LT', - lastDay : '[Kala wingi pukul] LT', - lastWeek : 'dddd [kepengker pukul] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'wonten ing %s', - past : '%s ingkang kepengker', - s : 'sawetawis detik', - ss : '%d detik', - m : 'setunggal menit', - mm : '%d menit', - h : 'setunggal jam', - hh : '%d jam', - d : 'sedinten', - dd : '%d dinten', - M : 'sewulan', - MM : '%d wulan', - y : 'setaun', - yy : '%d taun' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return jv; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ka.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ka.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ka = moment.defineLocale('ka', { - months : { - standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), - format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') - }, - monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), - weekdays : { - standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), - format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), - isFormat: /(წინა|შემდეგ)/ - }, - weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), - weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendar : { - sameDay : '[დღეს] LT[-ზე]', - nextDay : '[ხვალ] LT[-ზე]', - lastDay : '[გუშინ] LT[-ზე]', - nextWeek : '[შემდეგ] dddd LT[-ზე]', - lastWeek : '[წინა] dddd LT-ზე', - sameElse : 'L' - }, - relativeTime : { - future : function (s) { - return (/(წამი|წუთი|საათი|წელი)/).test(s) ? - s.replace(/ი$/, 'ში') : - s + 'ში'; - }, - past : function (s) { - if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { - return s.replace(/(ი|ე)$/, 'ის წინ'); - } - if ((/წელი/).test(s)) { - return s.replace(/წელი$/, 'წლის წინ'); - } - }, - s : 'რამდენიმე წამი', - ss : '%d წამი', - m : 'წუთი', - mm : '%d წუთი', - h : 'საათი', - hh : '%d საათი', - d : 'დღე', - dd : '%d დღე', - M : 'თვე', - MM : '%d თვე', - y : 'წელი', - yy : '%d წელი' - }, - dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, - ordinal : function (number) { - if (number === 0) { - return number; - } - if (number === 1) { - return number + '-ლი'; - } - if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { - return 'მე-' + number; - } - return number + '-ე'; - }, - week : { - dow : 1, - doy : 7 - } - }); - - return ka; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/kk.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/kk.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var suffixes = { - 0: '-ші', - 1: '-ші', - 2: '-ші', - 3: '-ші', - 4: '-ші', - 5: '-ші', - 6: '-шы', - 7: '-ші', - 8: '-ші', - 9: '-шы', - 10: '-шы', - 20: '-шы', - 30: '-шы', - 40: '-шы', - 50: '-ші', - 60: '-шы', - 70: '-ші', - 80: '-ші', - 90: '-шы', - 100: '-ші' - }; - - var kk = moment.defineLocale('kk', { - months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), - monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), - weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), - weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), - weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Бүгін сағат] LT', - nextDay : '[Ертең сағат] LT', - nextWeek : 'dddd [сағат] LT', - lastDay : '[Кеше сағат] LT', - lastWeek : '[Өткен аптаның] dddd [сағат] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s ішінде', - past : '%s бұрын', - s : 'бірнеше секунд', - ss : '%d секунд', - m : 'бір минут', - mm : '%d минут', - h : 'бір сағат', - hh : '%d сағат', - d : 'бір күн', - dd : '%d күн', - M : 'бір ай', - MM : '%d ай', - y : 'бір жыл', - yy : '%d жыл' - }, - dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, - ordinal : function (number) { - var a = number % 10, - b = number >= 100 ? 100 : null; - return number + (suffixes[number] || suffixes[a] || suffixes[b]); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return kk; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/km.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/km.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '១', - '2': '២', - '3': '៣', - '4': '៤', - '5': '៥', - '6': '៦', - '7': '៧', - '8': '៨', - '9': '៩', - '0': '០' - }, numberMap = { - '១': '1', - '២': '2', - '៣': '3', - '៤': '4', - '៥': '5', - '៦': '6', - '៧': '7', - '៨': '8', - '៩': '9', - '០': '0' - }; - - var km = moment.defineLocale('km', { - months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( - '_' - ), - monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( - '_' - ), - weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), - weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), - weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), - weekdaysParseExact: true, - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY HH:mm', - LLLL: 'dddd, D MMMM YYYY HH:mm' - }, - meridiemParse: /ព្រឹក|ល្ងាច/, - isPM: function (input) { - return input === 'ល្ងាច'; - }, - meridiem: function (hour, minute, isLower) { - if (hour < 12) { - return 'ព្រឹក'; - } else { - return 'ល្ងាច'; - } - }, - calendar: { - sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', - nextDay: '[ស្អែក ម៉ោង] LT', - nextWeek: 'dddd [ម៉ោង] LT', - lastDay: '[ម្សិលមិញ ម៉ោង] LT', - lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', - sameElse: 'L' - }, - relativeTime: { - future: '%sទៀត', - past: '%sមុន', - s: 'ប៉ុន្មានវិនាទី', - ss: '%d វិនាទី', - m: 'មួយនាទី', - mm: '%d នាទី', - h: 'មួយម៉ោង', - hh: '%d ម៉ោង', - d: 'មួយថ្ងៃ', - dd: '%d ថ្ងៃ', - M: 'មួយខែ', - MM: '%d ខែ', - y: 'មួយឆ្នាំ', - yy: '%d ឆ្នាំ' - }, - dayOfMonthOrdinalParse : /ទី\d{1,2}/, - ordinal : 'ទី%d', - preparse: function (string) { - return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - week: { - dow: 1, // Monday is the first day of the week. - doy: 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return km; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/kn.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/kn.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '೧', - '2': '೨', - '3': '೩', - '4': '೪', - '5': '೫', - '6': '೬', - '7': '೭', - '8': '೮', - '9': '೯', - '0': '೦' - }, - numberMap = { - '೧': '1', - '೨': '2', - '೩': '3', - '೪': '4', - '೫': '5', - '೬': '6', - '೭': '7', - '೮': '8', - '೯': '9', - '೦': '0' - }; - - var kn = moment.defineLocale('kn', { - months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), - monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), - monthsParseExact: true, - weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), - weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), - weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), - longDateFormat : { - LT : 'A h:mm', - LTS : 'A h:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm', - LLLL : 'dddd, D MMMM YYYY, A h:mm' - }, - calendar : { - sameDay : '[ಇಂದು] LT', - nextDay : '[ನಾಳೆ] LT', - nextWeek : 'dddd, LT', - lastDay : '[ನಿನ್ನೆ] LT', - lastWeek : '[ಕೊನೆಯ] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s ನಂತರ', - past : '%s ಹಿಂದೆ', - s : 'ಕೆಲವು ಕ್ಷಣಗಳು', - ss : '%d ಸೆಕೆಂಡುಗಳು', - m : 'ಒಂದು ನಿಮಿಷ', - mm : '%d ನಿಮಿಷ', - h : 'ಒಂದು ಗಂಟೆ', - hh : '%d ಗಂಟೆ', - d : 'ಒಂದು ದಿನ', - dd : '%d ದಿನ', - M : 'ಒಂದು ತಿಂಗಳು', - MM : '%d ತಿಂಗಳು', - y : 'ಒಂದು ವರ್ಷ', - yy : '%d ವರ್ಷ' - }, - preparse: function (string) { - return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'ರಾತ್ರಿ') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { - return hour; - } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'ಸಂಜೆ') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'ರಾತ್ರಿ'; - } else if (hour < 10) { - return 'ಬೆಳಿಗ್ಗೆ'; - } else if (hour < 17) { - return 'ಮಧ್ಯಾಹ್ನ'; - } else if (hour < 20) { - return 'ಸಂಜೆ'; - } else { - return 'ರಾತ್ರಿ'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, - ordinal : function (number) { - return number + 'ನೇ'; - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return kn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ko.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ko.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ko = moment.defineLocale('ko', { - months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), - monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), - weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), - weekdaysShort : '일_월_화_수_목_금_토'.split('_'), - weekdaysMin : '일_월_화_수_목_금_토'.split('_'), - longDateFormat : { - LT : 'A h:mm', - LTS : 'A h:mm:ss', - L : 'YYYY.MM.DD.', - LL : 'YYYY년 MMMM D일', - LLL : 'YYYY년 MMMM D일 A h:mm', - LLLL : 'YYYY년 MMMM D일 dddd A h:mm', - l : 'YYYY.MM.DD.', - ll : 'YYYY년 MMMM D일', - lll : 'YYYY년 MMMM D일 A h:mm', - llll : 'YYYY년 MMMM D일 dddd A h:mm' - }, - calendar : { - sameDay : '오늘 LT', - nextDay : '내일 LT', - nextWeek : 'dddd LT', - lastDay : '어제 LT', - lastWeek : '지난주 dddd LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s 후', - past : '%s 전', - s : '몇 초', - ss : '%d초', - m : '1분', - mm : '%d분', - h : '한 시간', - hh : '%d시간', - d : '하루', - dd : '%d일', - M : '한 달', - MM : '%d달', - y : '일 년', - yy : '%d년' - }, - dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/, - ordinal : function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'DDD': - return number + '일'; - case 'M': - return number + '월'; - case 'w': - case 'W': - return number + '주'; - default: - return number; - } - }, - meridiemParse : /오전|오후/, - isPM : function (token) { - return token === '오후'; - }, - meridiem : function (hour, minute, isUpper) { - return hour < 12 ? '오전' : '오후'; - } - }); - - return ko; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ku.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ku.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '١', - '2': '٢', - '3': '٣', - '4': '٤', - '5': '٥', - '6': '٦', - '7': '٧', - '8': '٨', - '9': '٩', - '0': '٠' - }, numberMap = { - '١': '1', - '٢': '2', - '٣': '3', - '٤': '4', - '٥': '5', - '٦': '6', - '٧': '7', - '٨': '8', - '٩': '9', - '٠': '0' - }, - months = [ - 'کانونی دووەم', - 'شوبات', - 'ئازار', - 'نیسان', - 'ئایار', - 'حوزەیران', - 'تەمموز', - 'ئاب', - 'ئەیلوول', - 'تشرینی یەكەم', - 'تشرینی دووەم', - 'كانونی یەکەم' - ]; - - - var ku = moment.defineLocale('ku', { - months : months, - monthsShort : months, - weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), - weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), - weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - meridiemParse: /ئێواره‌|به‌یانی/, - isPM: function (input) { - return /ئێواره‌/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'به‌یانی'; - } else { - return 'ئێواره‌'; - } - }, - calendar : { - sameDay : '[ئه‌مرۆ كاتژمێر] LT', - nextDay : '[به‌یانی كاتژمێر] LT', - nextWeek : 'dddd [كاتژمێر] LT', - lastDay : '[دوێنێ كاتژمێر] LT', - lastWeek : 'dddd [كاتژمێر] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'له‌ %s', - past : '%s', - s : 'چه‌ند چركه‌یه‌ك', - ss : 'چركه‌ %d', - m : 'یه‌ك خوله‌ك', - mm : '%d خوله‌ك', - h : 'یه‌ك كاتژمێر', - hh : '%d كاتژمێر', - d : 'یه‌ك ڕۆژ', - dd : '%d ڕۆژ', - M : 'یه‌ك مانگ', - MM : '%d مانگ', - y : 'یه‌ك ساڵ', - yy : '%d ساڵ' - }, - preparse: function (string) { - return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { - return numberMap[match]; - }).replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }).replace(/,/g, '،'); - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return ku; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ky.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ky.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var suffixes = { - 0: '-чү', - 1: '-чи', - 2: '-чи', - 3: '-чү', - 4: '-чү', - 5: '-чи', - 6: '-чы', - 7: '-чи', - 8: '-чи', - 9: '-чу', - 10: '-чу', - 20: '-чы', - 30: '-чу', - 40: '-чы', - 50: '-чү', - 60: '-чы', - 70: '-чи', - 80: '-чи', - 90: '-чу', - 100: '-чү' - }; - - var ky = moment.defineLocale('ky', { - months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), - monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), - weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), - weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), - weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Бүгүн саат] LT', - nextDay : '[Эртең саат] LT', - nextWeek : 'dddd [саат] LT', - lastDay : '[Кечээ саат] LT', - lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s ичинде', - past : '%s мурун', - s : 'бирнече секунд', - ss : '%d секунд', - m : 'бир мүнөт', - mm : '%d мүнөт', - h : 'бир саат', - hh : '%d саат', - d : 'бир күн', - dd : '%d күн', - M : 'бир ай', - MM : '%d ай', - y : 'бир жыл', - yy : '%d жыл' - }, - dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, - ordinal : function (number) { - var a = number % 10, - b = number >= 100 ? 100 : null; - return number + (suffixes[number] || suffixes[a] || suffixes[b]); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return ky; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/lb.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/lb.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 'm': ['eng Minutt', 'enger Minutt'], - 'h': ['eng Stonn', 'enger Stonn'], - 'd': ['een Dag', 'engem Dag'], - 'M': ['ee Mount', 'engem Mount'], - 'y': ['ee Joer', 'engem Joer'] - }; - return withoutSuffix ? format[key][0] : format[key][1]; - } - function processFutureTime(string) { - var number = string.substr(0, string.indexOf(' ')); - if (eifelerRegelAppliesToNumber(number)) { - return 'a ' + string; - } - return 'an ' + string; - } - function processPastTime(string) { - var number = string.substr(0, string.indexOf(' ')); - if (eifelerRegelAppliesToNumber(number)) { - return 'viru ' + string; - } - return 'virun ' + string; - } - /** - * Returns true if the word before the given number loses the '-n' ending. - * e.g. 'an 10 Deeg' but 'a 5 Deeg' - * - * @param number {integer} - * @returns {boolean} - */ - function eifelerRegelAppliesToNumber(number) { - number = parseInt(number, 10); - if (isNaN(number)) { - return false; - } - if (number < 0) { - // Negative Number --> always true - return true; - } else if (number < 10) { - // Only 1 digit - if (4 <= number && number <= 7) { - return true; - } - return false; - } else if (number < 100) { - // 2 digits - var lastDigit = number % 10, firstDigit = number / 10; - if (lastDigit === 0) { - return eifelerRegelAppliesToNumber(firstDigit); - } - return eifelerRegelAppliesToNumber(lastDigit); - } else if (number < 10000) { - // 3 or 4 digits --> recursively check first digit - while (number >= 10) { - number = number / 10; - } - return eifelerRegelAppliesToNumber(number); - } else { - // Anything larger than 4 digits: recursively check first n-3 digits - number = number / 1000; - return eifelerRegelAppliesToNumber(number); - } - } - - var lb = moment.defineLocale('lb', { - months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), - monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), - monthsParseExact : true, - weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), - weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), - weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), - weekdaysParseExact : true, - longDateFormat: { - LT: 'H:mm [Auer]', - LTS: 'H:mm:ss [Auer]', - L: 'DD.MM.YYYY', - LL: 'D. MMMM YYYY', - LLL: 'D. MMMM YYYY H:mm [Auer]', - LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' - }, - calendar: { - sameDay: '[Haut um] LT', - sameElse: 'L', - nextDay: '[Muer um] LT', - nextWeek: 'dddd [um] LT', - lastDay: '[Gëschter um] LT', - lastWeek: function () { - // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule - switch (this.day()) { - case 2: - case 4: - return '[Leschten] dddd [um] LT'; - default: - return '[Leschte] dddd [um] LT'; - } - } - }, - relativeTime : { - future : processFutureTime, - past : processPastTime, - s : 'e puer Sekonnen', - ss : '%d Sekonnen', - m : processRelativeTime, - mm : '%d Minutten', - h : processRelativeTime, - hh : '%d Stonnen', - d : processRelativeTime, - dd : '%d Deeg', - M : processRelativeTime, - MM : '%d Méint', - y : processRelativeTime, - yy : '%d Joer' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal: '%d.', - week: { - dow: 1, // Monday is the first day of the week. - doy: 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return lb; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/lo.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/lo.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var lo = moment.defineLocale('lo', { - months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), - monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), - weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), - weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), - weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'ວັນdddd D MMMM YYYY HH:mm' - }, - meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, - isPM: function (input) { - return input === 'ຕອນແລງ'; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ຕອນເຊົ້າ'; - } else { - return 'ຕອນແລງ'; - } - }, - calendar : { - sameDay : '[ມື້ນີ້ເວລາ] LT', - nextDay : '[ມື້ອື່ນເວລາ] LT', - nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', - lastDay : '[ມື້ວານນີ້ເວລາ] LT', - lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'ອີກ %s', - past : '%sຜ່ານມາ', - s : 'ບໍ່ເທົ່າໃດວິນາທີ', - ss : '%d ວິນາທີ' , - m : '1 ນາທີ', - mm : '%d ນາທີ', - h : '1 ຊົ່ວໂມງ', - hh : '%d ຊົ່ວໂມງ', - d : '1 ມື້', - dd : '%d ມື້', - M : '1 ເດືອນ', - MM : '%d ເດືອນ', - y : '1 ປີ', - yy : '%d ປີ' - }, - dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, - ordinal : function (number) { - return 'ທີ່' + number; - } - }); - - return lo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/lt.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/lt.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var units = { - 'ss' : 'sekundė_sekundžių_sekundes', - 'm' : 'minutė_minutės_minutę', - 'mm': 'minutės_minučių_minutes', - 'h' : 'valanda_valandos_valandą', - 'hh': 'valandos_valandų_valandas', - 'd' : 'diena_dienos_dieną', - 'dd': 'dienos_dienų_dienas', - 'M' : 'mėnuo_mėnesio_mėnesį', - 'MM': 'mėnesiai_mėnesių_mėnesius', - 'y' : 'metai_metų_metus', - 'yy': 'metai_metų_metus' - }; - function translateSeconds(number, withoutSuffix, key, isFuture) { - if (withoutSuffix) { - return 'kelios sekundės'; - } else { - return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; - } - } - function translateSingular(number, withoutSuffix, key, isFuture) { - return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); - } - function special(number) { - return number % 10 === 0 || (number > 10 && number < 20); - } - function forms(key) { - return units[key].split('_'); - } - function translate(number, withoutSuffix, key, isFuture) { - var result = number + ' '; - if (number === 1) { - return result + translateSingular(number, withoutSuffix, key[0], isFuture); - } else if (withoutSuffix) { - return result + (special(number) ? forms(key)[1] : forms(key)[0]); - } else { - if (isFuture) { - return result + forms(key)[1]; - } else { - return result + (special(number) ? forms(key)[1] : forms(key)[2]); - } - } - } - var lt = moment.defineLocale('lt', { - months : { - format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), - standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), - isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ - }, - monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), - weekdays : { - format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), - standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), - isFormat: /dddd HH:mm/ - }, - weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), - weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'YYYY [m.] MMMM D [d.]', - LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', - LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', - l : 'YYYY-MM-DD', - ll : 'YYYY [m.] MMMM D [d.]', - lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', - llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' - }, - calendar : { - sameDay : '[Šiandien] LT', - nextDay : '[Rytoj] LT', - nextWeek : 'dddd LT', - lastDay : '[Vakar] LT', - lastWeek : '[Praėjusį] dddd LT', - sameElse : 'L' - }, - relativeTime : { - future : 'po %s', - past : 'prieš %s', - s : translateSeconds, - ss : translate, - m : translateSingular, - mm : translate, - h : translateSingular, - hh : translate, - d : translateSingular, - dd : translate, - M : translateSingular, - MM : translate, - y : translateSingular, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}-oji/, - ordinal : function (number) { - return number + '-oji'; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return lt; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/lv.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/lv.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var units = { - 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), - 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), - 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), - 'h': 'stundas_stundām_stunda_stundas'.split('_'), - 'hh': 'stundas_stundām_stunda_stundas'.split('_'), - 'd': 'dienas_dienām_diena_dienas'.split('_'), - 'dd': 'dienas_dienām_diena_dienas'.split('_'), - 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), - 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), - 'y': 'gada_gadiem_gads_gadi'.split('_'), - 'yy': 'gada_gadiem_gads_gadi'.split('_') - }; - /** - * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. - */ - function format(forms, number, withoutSuffix) { - if (withoutSuffix) { - // E.g. "21 minūte", "3 minūtes". - return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; - } else { - // E.g. "21 minūtes" as in "pēc 21 minūtes". - // E.g. "3 minūtēm" as in "pēc 3 minūtēm". - return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; - } - } - function relativeTimeWithPlural(number, withoutSuffix, key) { - return number + ' ' + format(units[key], number, withoutSuffix); - } - function relativeTimeWithSingular(number, withoutSuffix, key) { - return format(units[key], number, withoutSuffix); - } - function relativeSeconds(number, withoutSuffix) { - return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; - } - - var lv = moment.defineLocale('lv', { - months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), - monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), - weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), - weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), - weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY.', - LL : 'YYYY. [gada] D. MMMM', - LLL : 'YYYY. [gada] D. MMMM, HH:mm', - LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' - }, - calendar : { - sameDay : '[Šodien pulksten] LT', - nextDay : '[Rīt pulksten] LT', - nextWeek : 'dddd [pulksten] LT', - lastDay : '[Vakar pulksten] LT', - lastWeek : '[Pagājušā] dddd [pulksten] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'pēc %s', - past : 'pirms %s', - s : relativeSeconds, - ss : relativeTimeWithPlural, - m : relativeTimeWithSingular, - mm : relativeTimeWithPlural, - h : relativeTimeWithSingular, - hh : relativeTimeWithPlural, - d : relativeTimeWithSingular, - dd : relativeTimeWithPlural, - M : relativeTimeWithSingular, - MM : relativeTimeWithPlural, - y : relativeTimeWithSingular, - yy : relativeTimeWithPlural - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return lv; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/me.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/me.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var translator = { - words: { //Different grammatical cases - ss: ['sekund', 'sekunda', 'sekundi'], - m: ['jedan minut', 'jednog minuta'], - mm: ['minut', 'minuta', 'minuta'], - h: ['jedan sat', 'jednog sata'], - hh: ['sat', 'sata', 'sati'], - dd: ['dan', 'dana', 'dana'], - MM: ['mjesec', 'mjeseca', 'mjeseci'], - yy: ['godina', 'godine', 'godina'] - }, - correctGrammaticalCase: function (number, wordKey) { - return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); - }, - translate: function (number, withoutSuffix, key) { - var wordKey = translator.words[key]; - if (key.length === 1) { - return withoutSuffix ? wordKey[0] : wordKey[1]; - } else { - return number + ' ' + translator.correctGrammaticalCase(number, wordKey); - } - } - }; - - var me = moment.defineLocale('me', { - months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), - monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), - monthsParseExact : true, - weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), - weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), - weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), - weekdaysParseExact : true, - longDateFormat: { - LT: 'H:mm', - LTS : 'H:mm:ss', - L: 'DD.MM.YYYY', - LL: 'D. MMMM YYYY', - LLL: 'D. MMMM YYYY H:mm', - LLLL: 'dddd, D. MMMM YYYY H:mm' - }, - calendar: { - sameDay: '[danas u] LT', - nextDay: '[sjutra u] LT', - - nextWeek: function () { - switch (this.day()) { - case 0: - return '[u] [nedjelju] [u] LT'; - case 3: - return '[u] [srijedu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[u] dddd [u] LT'; - } - }, - lastDay : '[juče u] LT', - lastWeek : function () { - var lastWeekDays = [ - '[prošle] [nedjelje] [u] LT', - '[prošlog] [ponedjeljka] [u] LT', - '[prošlog] [utorka] [u] LT', - '[prošle] [srijede] [u] LT', - '[prošlog] [četvrtka] [u] LT', - '[prošlog] [petka] [u] LT', - '[prošle] [subote] [u] LT' - ]; - return lastWeekDays[this.day()]; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'za %s', - past : 'prije %s', - s : 'nekoliko sekundi', - ss : translator.translate, - m : translator.translate, - mm : translator.translate, - h : translator.translate, - hh : translator.translate, - d : 'dan', - dd : translator.translate, - M : 'mjesec', - MM : translator.translate, - y : 'godinu', - yy : translator.translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return me; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/mi.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/mi.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var mi = moment.defineLocale('mi', { - months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), - monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), - monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, - monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, - monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, - monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, - weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), - weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), - weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY [i] HH:mm', - LLLL: 'dddd, D MMMM YYYY [i] HH:mm' - }, - calendar: { - sameDay: '[i teie mahana, i] LT', - nextDay: '[apopo i] LT', - nextWeek: 'dddd [i] LT', - lastDay: '[inanahi i] LT', - lastWeek: 'dddd [whakamutunga i] LT', - sameElse: 'L' - }, - relativeTime: { - future: 'i roto i %s', - past: '%s i mua', - s: 'te hēkona ruarua', - ss: '%d hēkona', - m: 'he meneti', - mm: '%d meneti', - h: 'te haora', - hh: '%d haora', - d: 'he ra', - dd: '%d ra', - M: 'he marama', - MM: '%d marama', - y: 'he tau', - yy: '%d tau' - }, - dayOfMonthOrdinalParse: /\d{1,2}º/, - ordinal: '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return mi; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/mk.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/mk.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var mk = moment.defineLocale('mk', { - months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), - monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), - weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), - weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), - weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'D.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY H:mm', - LLLL : 'dddd, D MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[Денес во] LT', - nextDay : '[Утре во] LT', - nextWeek : '[Во] dddd [во] LT', - lastDay : '[Вчера во] LT', - lastWeek : function () { - switch (this.day()) { - case 0: - case 3: - case 6: - return '[Изминатата] dddd [во] LT'; - case 1: - case 2: - case 4: - case 5: - return '[Изминатиот] dddd [во] LT'; - } - }, - sameElse : 'L' - }, - relativeTime : { - future : 'после %s', - past : 'пред %s', - s : 'неколку секунди', - ss : '%d секунди', - m : 'минута', - mm : '%d минути', - h : 'час', - hh : '%d часа', - d : 'ден', - dd : '%d дена', - M : 'месец', - MM : '%d месеци', - y : 'година', - yy : '%d години' - }, - dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, - ordinal : function (number) { - var lastDigit = number % 10, - last2Digits = number % 100; - if (number === 0) { - return number + '-ев'; - } else if (last2Digits === 0) { - return number + '-ен'; - } else if (last2Digits > 10 && last2Digits < 20) { - return number + '-ти'; - } else if (lastDigit === 1) { - return number + '-ви'; - } else if (lastDigit === 2) { - return number + '-ри'; - } else if (lastDigit === 7 || lastDigit === 8) { - return number + '-ми'; - } else { - return number + '-ти'; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return mk; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ml.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ml.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ml = moment.defineLocale('ml', { - months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), - monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), - monthsParseExact : true, - weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), - weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), - weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), - longDateFormat : { - LT : 'A h:mm -നു', - LTS : 'A h:mm:ss -നു', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm -നു', - LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' - }, - calendar : { - sameDay : '[ഇന്ന്] LT', - nextDay : '[നാളെ] LT', - nextWeek : 'dddd, LT', - lastDay : '[ഇന്നലെ] LT', - lastWeek : '[കഴിഞ്ഞ] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s കഴിഞ്ഞ്', - past : '%s മുൻപ്', - s : 'അൽപ നിമിഷങ്ങൾ', - ss : '%d സെക്കൻഡ്', - m : 'ഒരു മിനിറ്റ്', - mm : '%d മിനിറ്റ്', - h : 'ഒരു മണിക്കൂർ', - hh : '%d മണിക്കൂർ', - d : 'ഒരു ദിവസം', - dd : '%d ദിവസം', - M : 'ഒരു മാസം', - MM : '%d മാസം', - y : 'ഒരു വർഷം', - yy : '%d വർഷം' - }, - meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if ((meridiem === 'രാത്രി' && hour >= 4) || - meridiem === 'ഉച്ച കഴിഞ്ഞ്' || - meridiem === 'വൈകുന്നേരം') { - return hour + 12; - } else { - return hour; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'രാത്രി'; - } else if (hour < 12) { - return 'രാവിലെ'; - } else if (hour < 17) { - return 'ഉച്ച കഴിഞ്ഞ്'; - } else if (hour < 20) { - return 'വൈകുന്നേരം'; - } else { - return 'രാത്രി'; - } - } - }); - - return ml; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/mn.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/mn.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function translate(number, withoutSuffix, key, isFuture) { - switch (key) { - case 's': - return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; - case 'ss': - return number + (withoutSuffix ? ' секунд' : ' секундын'); - case 'm': - case 'mm': - return number + (withoutSuffix ? ' минут' : ' минутын'); - case 'h': - case 'hh': - return number + (withoutSuffix ? ' цаг' : ' цагийн'); - case 'd': - case 'dd': - return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); - case 'M': - case 'MM': - return number + (withoutSuffix ? ' сар' : ' сарын'); - case 'y': - case 'yy': - return number + (withoutSuffix ? ' жил' : ' жилийн'); - default: - return number; - } - } - - var mn = moment.defineLocale('mn', { - months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), - monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), - monthsParseExact : true, - weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), - weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), - weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'YYYY оны MMMMын D', - LLL : 'YYYY оны MMMMын D HH:mm', - LLLL : 'dddd, YYYY оны MMMMын D HH:mm' - }, - meridiemParse: /ҮӨ|ҮХ/i, - isPM : function (input) { - return input === 'ҮХ'; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ҮӨ'; - } else { - return 'ҮХ'; - } - }, - calendar : { - sameDay : '[Өнөөдөр] LT', - nextDay : '[Маргааш] LT', - nextWeek : '[Ирэх] dddd LT', - lastDay : '[Өчигдөр] LT', - lastWeek : '[Өнгөрсөн] dddd LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s дараа', - past : '%s өмнө', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2} өдөр/, - ordinal : function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'DDD': - return number + ' өдөр'; - default: - return number; - } - } - }); - - return mn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/mr.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/mr.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '१', - '2': '२', - '3': '३', - '4': '४', - '5': '५', - '6': '६', - '7': '७', - '8': '८', - '9': '९', - '0': '०' - }, - numberMap = { - '१': '1', - '२': '2', - '३': '3', - '४': '4', - '५': '5', - '६': '6', - '७': '7', - '८': '8', - '९': '9', - '०': '0' - }; - - function relativeTimeMr(number, withoutSuffix, string, isFuture) - { - var output = ''; - if (withoutSuffix) { - switch (string) { - case 's': output = 'काही सेकंद'; break; - case 'ss': output = '%d सेकंद'; break; - case 'm': output = 'एक मिनिट'; break; - case 'mm': output = '%d मिनिटे'; break; - case 'h': output = 'एक तास'; break; - case 'hh': output = '%d तास'; break; - case 'd': output = 'एक दिवस'; break; - case 'dd': output = '%d दिवस'; break; - case 'M': output = 'एक महिना'; break; - case 'MM': output = '%d महिने'; break; - case 'y': output = 'एक वर्ष'; break; - case 'yy': output = '%d वर्षे'; break; - } - } - else { - switch (string) { - case 's': output = 'काही सेकंदां'; break; - case 'ss': output = '%d सेकंदां'; break; - case 'm': output = 'एका मिनिटा'; break; - case 'mm': output = '%d मिनिटां'; break; - case 'h': output = 'एका तासा'; break; - case 'hh': output = '%d तासां'; break; - case 'd': output = 'एका दिवसा'; break; - case 'dd': output = '%d दिवसां'; break; - case 'M': output = 'एका महिन्या'; break; - case 'MM': output = '%d महिन्यां'; break; - case 'y': output = 'एका वर्षा'; break; - case 'yy': output = '%d वर्षां'; break; - } - } - return output.replace(/%d/i, number); - } - - var mr = moment.defineLocale('mr', { - months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), - monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), - monthsParseExact : true, - weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), - weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), - weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), - longDateFormat : { - LT : 'A h:mm वाजता', - LTS : 'A h:mm:ss वाजता', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm वाजता', - LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' - }, - calendar : { - sameDay : '[आज] LT', - nextDay : '[उद्या] LT', - nextWeek : 'dddd, LT', - lastDay : '[काल] LT', - lastWeek: '[मागील] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future: '%sमध्ये', - past: '%sपूर्वी', - s: relativeTimeMr, - ss: relativeTimeMr, - m: relativeTimeMr, - mm: relativeTimeMr, - h: relativeTimeMr, - hh: relativeTimeMr, - d: relativeTimeMr, - dd: relativeTimeMr, - M: relativeTimeMr, - MM: relativeTimeMr, - y: relativeTimeMr, - yy: relativeTimeMr - }, - preparse: function (string) { - return string.replace(/[१२३४५६७८९०]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'रात्री') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'सकाळी') { - return hour; - } else if (meridiem === 'दुपारी') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'सायंकाळी') { - return hour + 12; - } - }, - meridiem: function (hour, minute, isLower) { - if (hour < 4) { - return 'रात्री'; - } else if (hour < 10) { - return 'सकाळी'; - } else if (hour < 17) { - return 'दुपारी'; - } else if (hour < 20) { - return 'सायंकाळी'; - } else { - return 'रात्री'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return mr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ms-my.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ms-my.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var msMy = moment.defineLocale('ms-my', { - months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), - monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), - weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), - weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), - weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY [pukul] HH.mm', - LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' - }, - meridiemParse: /pagi|tengahari|petang|malam/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'pagi') { - return hour; - } else if (meridiem === 'tengahari') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'petang' || meridiem === 'malam') { - return hour + 12; - } - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 11) { - return 'pagi'; - } else if (hours < 15) { - return 'tengahari'; - } else if (hours < 19) { - return 'petang'; - } else { - return 'malam'; - } - }, - calendar : { - sameDay : '[Hari ini pukul] LT', - nextDay : '[Esok pukul] LT', - nextWeek : 'dddd [pukul] LT', - lastDay : '[Kelmarin pukul] LT', - lastWeek : 'dddd [lepas pukul] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dalam %s', - past : '%s yang lepas', - s : 'beberapa saat', - ss : '%d saat', - m : 'seminit', - mm : '%d minit', - h : 'sejam', - hh : '%d jam', - d : 'sehari', - dd : '%d hari', - M : 'sebulan', - MM : '%d bulan', - y : 'setahun', - yy : '%d tahun' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return msMy; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ms.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ms.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ms = moment.defineLocale('ms', { - months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), - monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), - weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), - weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), - weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY [pukul] HH.mm', - LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' - }, - meridiemParse: /pagi|tengahari|petang|malam/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'pagi') { - return hour; - } else if (meridiem === 'tengahari') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'petang' || meridiem === 'malam') { - return hour + 12; - } - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 11) { - return 'pagi'; - } else if (hours < 15) { - return 'tengahari'; - } else if (hours < 19) { - return 'petang'; - } else { - return 'malam'; - } - }, - calendar : { - sameDay : '[Hari ini pukul] LT', - nextDay : '[Esok pukul] LT', - nextWeek : 'dddd [pukul] LT', - lastDay : '[Kelmarin pukul] LT', - lastWeek : 'dddd [lepas pukul] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'dalam %s', - past : '%s yang lepas', - s : 'beberapa saat', - ss : '%d saat', - m : 'seminit', - mm : '%d minit', - h : 'sejam', - hh : '%d jam', - d : 'sehari', - dd : '%d hari', - M : 'sebulan', - MM : '%d bulan', - y : 'setahun', - yy : '%d tahun' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return ms; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/mt.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/mt.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var mt = moment.defineLocale('mt', { - months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), - monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), - weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), - weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), - weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Illum fil-]LT', - nextDay : '[Għada fil-]LT', - nextWeek : 'dddd [fil-]LT', - lastDay : '[Il-bieraħ fil-]LT', - lastWeek : 'dddd [li għadda] [fil-]LT', - sameElse : 'L' - }, - relativeTime : { - future : 'f’ %s', - past : '%s ilu', - s : 'ftit sekondi', - ss : '%d sekondi', - m : 'minuta', - mm : '%d minuti', - h : 'siegħa', - hh : '%d siegħat', - d : 'ġurnata', - dd : '%d ġranet', - M : 'xahar', - MM : '%d xhur', - y : 'sena', - yy : '%d sni' - }, - dayOfMonthOrdinalParse : /\d{1,2}º/, - ordinal: '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return mt; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/my.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/my.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '၁', - '2': '၂', - '3': '၃', - '4': '၄', - '5': '၅', - '6': '၆', - '7': '၇', - '8': '၈', - '9': '၉', - '0': '၀' - }, numberMap = { - '၁': '1', - '၂': '2', - '၃': '3', - '၄': '4', - '၅': '5', - '၆': '6', - '၇': '7', - '၈': '8', - '၉': '9', - '၀': '0' - }; - - var my = moment.defineLocale('my', { - months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), - monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), - weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), - weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), - weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), - - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'DD/MM/YYYY', - LL: 'D MMMM YYYY', - LLL: 'D MMMM YYYY HH:mm', - LLLL: 'dddd D MMMM YYYY HH:mm' - }, - calendar: { - sameDay: '[ယနေ.] LT [မှာ]', - nextDay: '[မနက်ဖြန်] LT [မှာ]', - nextWeek: 'dddd LT [မှာ]', - lastDay: '[မနေ.က] LT [မှာ]', - lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', - sameElse: 'L' - }, - relativeTime: { - future: 'လာမည့် %s မှာ', - past: 'လွန်ခဲ့သော %s က', - s: 'စက္ကန်.အနည်းငယ်', - ss : '%d စက္ကန့်', - m: 'တစ်မိနစ်', - mm: '%d မိနစ်', - h: 'တစ်နာရီ', - hh: '%d နာရီ', - d: 'တစ်ရက်', - dd: '%d ရက်', - M: 'တစ်လ', - MM: '%d လ', - y: 'တစ်နှစ်', - yy: '%d နှစ်' - }, - preparse: function (string) { - return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - week: { - dow: 1, // Monday is the first day of the week. - doy: 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return my; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/nb.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/nb.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var nb = moment.defineLocale('nb', { - months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), - monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), - monthsParseExact : true, - weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), - weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), - weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY [kl.] HH:mm', - LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' - }, - calendar : { - sameDay: '[i dag kl.] LT', - nextDay: '[i morgen kl.] LT', - nextWeek: 'dddd [kl.] LT', - lastDay: '[i går kl.] LT', - lastWeek: '[forrige] dddd [kl.] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'om %s', - past : '%s siden', - s : 'noen sekunder', - ss : '%d sekunder', - m : 'ett minutt', - mm : '%d minutter', - h : 'en time', - hh : '%d timer', - d : 'en dag', - dd : '%d dager', - M : 'en måned', - MM : '%d måneder', - y : 'ett år', - yy : '%d år' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return nb; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ne.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ne.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '१', - '2': '२', - '3': '३', - '4': '४', - '5': '५', - '6': '६', - '7': '७', - '8': '८', - '9': '९', - '0': '०' - }, - numberMap = { - '१': '1', - '२': '2', - '३': '3', - '४': '4', - '५': '5', - '६': '6', - '७': '7', - '८': '8', - '९': '9', - '०': '0' - }; - - var ne = moment.defineLocale('ne', { - months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), - monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), - monthsParseExact : true, - weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), - weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), - weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'Aको h:mm बजे', - LTS : 'Aको h:mm:ss बजे', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, Aको h:mm बजे', - LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' - }, - preparse: function (string) { - return string.replace(/[१२३४५६७८९०]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - meridiemParse: /राति|बिहान|दिउँसो|साँझ/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'राति') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'बिहान') { - return hour; - } else if (meridiem === 'दिउँसो') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'साँझ') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 3) { - return 'राति'; - } else if (hour < 12) { - return 'बिहान'; - } else if (hour < 16) { - return 'दिउँसो'; - } else if (hour < 20) { - return 'साँझ'; - } else { - return 'राति'; - } - }, - calendar : { - sameDay : '[आज] LT', - nextDay : '[भोलि] LT', - nextWeek : '[आउँदो] dddd[,] LT', - lastDay : '[हिजो] LT', - lastWeek : '[गएको] dddd[,] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%sमा', - past : '%s अगाडि', - s : 'केही क्षण', - ss : '%d सेकेण्ड', - m : 'एक मिनेट', - mm : '%d मिनेट', - h : 'एक घण्टा', - hh : '%d घण्टा', - d : 'एक दिन', - dd : '%d दिन', - M : 'एक महिना', - MM : '%d महिना', - y : 'एक बर्ष', - yy : '%d बर्ष' - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return ne; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/nl-be.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/nl-be.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), - monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); - - var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; - var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; - - var nlBe = moment.defineLocale('nl-be', { - months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortWithDots; - } else if (/-MMM-/.test(format)) { - return monthsShortWithoutDots[m.month()]; - } else { - return monthsShortWithDots[m.month()]; - } - }, - - monthsRegex: monthsRegex, - monthsShortRegex: monthsRegex, - monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, - monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, - - monthsParse : monthsParse, - longMonthsParse : monthsParse, - shortMonthsParse : monthsParse, - - weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), - weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), - weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[vandaag om] LT', - nextDay: '[morgen om] LT', - nextWeek: 'dddd [om] LT', - lastDay: '[gisteren om] LT', - lastWeek: '[afgelopen] dddd [om] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'over %s', - past : '%s geleden', - s : 'een paar seconden', - ss : '%d seconden', - m : 'één minuut', - mm : '%d minuten', - h : 'één uur', - hh : '%d uur', - d : 'één dag', - dd : '%d dagen', - M : 'één maand', - MM : '%d maanden', - y : 'één jaar', - yy : '%d jaar' - }, - dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, - ordinal : function (number) { - return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return nlBe; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/nl.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/nl.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), - monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); - - var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; - var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; - - var nl = moment.defineLocale('nl', { - months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), - monthsShort : function (m, format) { - if (!m) { - return monthsShortWithDots; - } else if (/-MMM-/.test(format)) { - return monthsShortWithoutDots[m.month()]; - } else { - return monthsShortWithDots[m.month()]; - } - }, - - monthsRegex: monthsRegex, - monthsShortRegex: monthsRegex, - monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, - monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, - - monthsParse : monthsParse, - longMonthsParse : monthsParse, - shortMonthsParse : monthsParse, - - weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), - weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), - weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD-MM-YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[vandaag om] LT', - nextDay: '[morgen om] LT', - nextWeek: 'dddd [om] LT', - lastDay: '[gisteren om] LT', - lastWeek: '[afgelopen] dddd [om] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'over %s', - past : '%s geleden', - s : 'een paar seconden', - ss : '%d seconden', - m : 'één minuut', - mm : '%d minuten', - h : 'één uur', - hh : '%d uur', - d : 'één dag', - dd : '%d dagen', - M : 'één maand', - MM : '%d maanden', - y : 'één jaar', - yy : '%d jaar' - }, - dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, - ordinal : function (number) { - return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return nl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/nn.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/nn.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var nn = moment.defineLocale('nn', { - months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), - monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), - weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), - weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), - weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY [kl.] H:mm', - LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' - }, - calendar : { - sameDay: '[I dag klokka] LT', - nextDay: '[I morgon klokka] LT', - nextWeek: 'dddd [klokka] LT', - lastDay: '[I går klokka] LT', - lastWeek: '[Føregåande] dddd [klokka] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'om %s', - past : '%s sidan', - s : 'nokre sekund', - ss : '%d sekund', - m : 'eit minutt', - mm : '%d minutt', - h : 'ein time', - hh : '%d timar', - d : 'ein dag', - dd : '%d dagar', - M : 'ein månad', - MM : '%d månader', - y : 'eit år', - yy : '%d år' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return nn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/pa-in.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/pa-in.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '੧', - '2': '੨', - '3': '੩', - '4': '੪', - '5': '੫', - '6': '੬', - '7': '੭', - '8': '੮', - '9': '੯', - '0': '੦' - }, - numberMap = { - '੧': '1', - '੨': '2', - '੩': '3', - '੪': '4', - '੫': '5', - '੬': '6', - '੭': '7', - '੮': '8', - '੯': '9', - '੦': '0' - }; - - var paIn = moment.defineLocale('pa-in', { - // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. - months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), - monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), - weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), - weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), - weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), - longDateFormat : { - LT : 'A h:mm ਵਜੇ', - LTS : 'A h:mm:ss ਵਜੇ', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', - LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' - }, - calendar : { - sameDay : '[ਅਜ] LT', - nextDay : '[ਕਲ] LT', - nextWeek : '[ਅਗਲਾ] dddd, LT', - lastDay : '[ਕਲ] LT', - lastWeek : '[ਪਿਛਲੇ] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s ਵਿੱਚ', - past : '%s ਪਿਛਲੇ', - s : 'ਕੁਝ ਸਕਿੰਟ', - ss : '%d ਸਕਿੰਟ', - m : 'ਇਕ ਮਿੰਟ', - mm : '%d ਮਿੰਟ', - h : 'ਇੱਕ ਘੰਟਾ', - hh : '%d ਘੰਟੇ', - d : 'ਇੱਕ ਦਿਨ', - dd : '%d ਦਿਨ', - M : 'ਇੱਕ ਮਹੀਨਾ', - MM : '%d ਮਹੀਨੇ', - y : 'ਇੱਕ ਸਾਲ', - yy : '%d ਸਾਲ' - }, - preparse: function (string) { - return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - // Punjabi notation for meridiems are quite fuzzy in practice. While there exists - // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. - meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'ਰਾਤ') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'ਸਵੇਰ') { - return hour; - } else if (meridiem === 'ਦੁਪਹਿਰ') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'ਸ਼ਾਮ') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'ਰਾਤ'; - } else if (hour < 10) { - return 'ਸਵੇਰ'; - } else if (hour < 17) { - return 'ਦੁਪਹਿਰ'; - } else if (hour < 20) { - return 'ਸ਼ਾਮ'; - } else { - return 'ਰਾਤ'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return paIn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/pl.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/pl.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), - monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); - function plural(n) { - return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); - } - function translate(number, withoutSuffix, key) { - var result = number + ' '; - switch (key) { - case 'ss': - return result + (plural(number) ? 'sekundy' : 'sekund'); - case 'm': - return withoutSuffix ? 'minuta' : 'minutę'; - case 'mm': - return result + (plural(number) ? 'minuty' : 'minut'); - case 'h': - return withoutSuffix ? 'godzina' : 'godzinę'; - case 'hh': - return result + (plural(number) ? 'godziny' : 'godzin'); - case 'MM': - return result + (plural(number) ? 'miesiące' : 'miesięcy'); - case 'yy': - return result + (plural(number) ? 'lata' : 'lat'); - } - } - - var pl = moment.defineLocale('pl', { - months : function (momentToFormat, format) { - if (!momentToFormat) { - return monthsNominative; - } else if (format === '') { - // Hack: if format empty we know this is used to generate - // RegExp by moment. Give then back both valid forms of months - // in RegExp ready format. - return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; - } else if (/D MMMM/.test(format)) { - return monthsSubjective[momentToFormat.month()]; - } else { - return monthsNominative[momentToFormat.month()]; - } - }, - monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), - weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), - weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), - weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Dziś o] LT', - nextDay: '[Jutro o] LT', - nextWeek: function () { - switch (this.day()) { - case 0: - return '[W niedzielę o] LT'; - - case 2: - return '[We wtorek o] LT'; - - case 3: - return '[W środę o] LT'; - - case 6: - return '[W sobotę o] LT'; - - default: - return '[W] dddd [o] LT'; - } - }, - lastDay: '[Wczoraj o] LT', - lastWeek: function () { - switch (this.day()) { - case 0: - return '[W zeszłą niedzielę o] LT'; - case 3: - return '[W zeszłą środę o] LT'; - case 6: - return '[W zeszłą sobotę o] LT'; - default: - return '[W zeszły] dddd [o] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'za %s', - past : '%s temu', - s : 'kilka sekund', - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : '1 dzień', - dd : '%d dni', - M : 'miesiąc', - MM : translate, - y : 'rok', - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return pl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/pt-br.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/pt-br.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ptBr = moment.defineLocale('pt-br', { - months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), - monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), - weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), - weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), - weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', - LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' - }, - calendar : { - sameDay: '[Hoje às] LT', - nextDay: '[Amanhã às] LT', - nextWeek: 'dddd [às] LT', - lastDay: '[Ontem às] LT', - lastWeek: function () { - return (this.day() === 0 || this.day() === 6) ? - '[Último] dddd [às] LT' : // Saturday + Sunday - '[Última] dddd [às] LT'; // Monday - Friday - }, - sameElse: 'L' - }, - relativeTime : { - future : 'em %s', - past : 'há %s', - s : 'poucos segundos', - ss : '%d segundos', - m : 'um minuto', - mm : '%d minutos', - h : 'uma hora', - hh : '%d horas', - d : 'um dia', - dd : '%d dias', - M : 'um mês', - MM : '%d meses', - y : 'um ano', - yy : '%d anos' - }, - dayOfMonthOrdinalParse: /\d{1,2}º/, - ordinal : '%dº' - }); - - return ptBr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/pt.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/pt.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var pt = moment.defineLocale('pt', { - months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'), - monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), - weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), - weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), - weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D [de] MMMM [de] YYYY', - LLL : 'D [de] MMMM [de] YYYY HH:mm', - LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' - }, - calendar : { - sameDay: '[Hoje às] LT', - nextDay: '[Amanhã às] LT', - nextWeek: 'dddd [às] LT', - lastDay: '[Ontem às] LT', - lastWeek: function () { - return (this.day() === 0 || this.day() === 6) ? - '[Último] dddd [às] LT' : // Saturday + Sunday - '[Última] dddd [às] LT'; // Monday - Friday - }, - sameElse: 'L' - }, - relativeTime : { - future : 'em %s', - past : 'há %s', - s : 'segundos', - ss : '%d segundos', - m : 'um minuto', - mm : '%d minutos', - h : 'uma hora', - hh : '%d horas', - d : 'um dia', - dd : '%d dias', - M : 'um mês', - MM : '%d meses', - y : 'um ano', - yy : '%d anos' - }, - dayOfMonthOrdinalParse: /\d{1,2}º/, - ordinal : '%dº', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return pt; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ro.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ro.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function relativeTimeWithPlural(number, withoutSuffix, key) { - var format = { - 'ss': 'secunde', - 'mm': 'minute', - 'hh': 'ore', - 'dd': 'zile', - 'MM': 'luni', - 'yy': 'ani' - }, - separator = ' '; - if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { - separator = ' de '; - } - return number + separator + format[key]; - } - - var ro = moment.defineLocale('ro', { - months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), - monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), - monthsParseExact: true, - weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), - weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), - weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY H:mm', - LLLL : 'dddd, D MMMM YYYY H:mm' - }, - calendar : { - sameDay: '[azi la] LT', - nextDay: '[mâine la] LT', - nextWeek: 'dddd [la] LT', - lastDay: '[ieri la] LT', - lastWeek: '[fosta] dddd [la] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'peste %s', - past : '%s în urmă', - s : 'câteva secunde', - ss : relativeTimeWithPlural, - m : 'un minut', - mm : relativeTimeWithPlural, - h : 'o oră', - hh : relativeTimeWithPlural, - d : 'o zi', - dd : relativeTimeWithPlural, - M : 'o lună', - MM : relativeTimeWithPlural, - y : 'un an', - yy : relativeTimeWithPlural - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return ro; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ru.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ru.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function plural(word, num) { - var forms = word.split('_'); - return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); - } - function relativeTimeWithPlural(number, withoutSuffix, key) { - var format = { - 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', - 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', - 'hh': 'час_часа_часов', - 'dd': 'день_дня_дней', - 'MM': 'месяц_месяца_месяцев', - 'yy': 'год_года_лет' - }; - if (key === 'm') { - return withoutSuffix ? 'минута' : 'минуту'; - } - else { - return number + ' ' + plural(format[key], +number); - } - } - var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; - - // http://new.gramota.ru/spravka/rules/139-prop : § 103 - // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 - // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 - var ru = moment.defineLocale('ru', { - months : { - format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), - standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') - }, - monthsShort : { - // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? - format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), - standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') - }, - weekdays : { - standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), - format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), - isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ - }, - weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), - weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), - monthsParse : monthsParse, - longMonthsParse : monthsParse, - shortMonthsParse : monthsParse, - - // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки - monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, - - // копия предыдущего - monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, - - // полные названия с падежами - monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, - - // Выражение, которое соотвествует только сокращённым формам - monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY г.', - LLL : 'D MMMM YYYY г., H:mm', - LLLL : 'dddd, D MMMM YYYY г., H:mm' - }, - calendar : { - sameDay: '[Сегодня, в] LT', - nextDay: '[Завтра, в] LT', - lastDay: '[Вчера, в] LT', - nextWeek: function (now) { - if (now.week() !== this.week()) { - switch (this.day()) { - case 0: - return '[В следующее] dddd, [в] LT'; - case 1: - case 2: - case 4: - return '[В следующий] dddd, [в] LT'; - case 3: - case 5: - case 6: - return '[В следующую] dddd, [в] LT'; - } - } else { - if (this.day() === 2) { - return '[Во] dddd, [в] LT'; - } else { - return '[В] dddd, [в] LT'; - } - } - }, - lastWeek: function (now) { - if (now.week() !== this.week()) { - switch (this.day()) { - case 0: - return '[В прошлое] dddd, [в] LT'; - case 1: - case 2: - case 4: - return '[В прошлый] dddd, [в] LT'; - case 3: - case 5: - case 6: - return '[В прошлую] dddd, [в] LT'; - } - } else { - if (this.day() === 2) { - return '[Во] dddd, [в] LT'; - } else { - return '[В] dddd, [в] LT'; - } - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'через %s', - past : '%s назад', - s : 'несколько секунд', - ss : relativeTimeWithPlural, - m : relativeTimeWithPlural, - mm : relativeTimeWithPlural, - h : 'час', - hh : relativeTimeWithPlural, - d : 'день', - dd : relativeTimeWithPlural, - M : 'месяц', - MM : relativeTimeWithPlural, - y : 'год', - yy : relativeTimeWithPlural - }, - meridiemParse: /ночи|утра|дня|вечера/i, - isPM : function (input) { - return /^(дня|вечера)$/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'ночи'; - } else if (hour < 12) { - return 'утра'; - } else if (hour < 17) { - return 'дня'; - } else { - return 'вечера'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, - ordinal: function (number, period) { - switch (period) { - case 'M': - case 'd': - case 'DDD': - return number + '-й'; - case 'D': - return number + '-го'; - case 'w': - case 'W': - return number + '-я'; - default: - return number; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return ru; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sd.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sd.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = [ - 'جنوري', - 'فيبروري', - 'مارچ', - 'اپريل', - 'مئي', - 'جون', - 'جولاءِ', - 'آگسٽ', - 'سيپٽمبر', - 'آڪٽوبر', - 'نومبر', - 'ڊسمبر' - ]; - var days = [ - 'آچر', - 'سومر', - 'اڱارو', - 'اربع', - 'خميس', - 'جمع', - 'ڇنڇر' - ]; - - var sd = moment.defineLocale('sd', { - months : months, - monthsShort : months, - weekdays : days, - weekdaysShort : days, - weekdaysMin : days, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd، D MMMM YYYY HH:mm' - }, - meridiemParse: /صبح|شام/, - isPM : function (input) { - return 'شام' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'صبح'; - } - return 'شام'; - }, - calendar : { - sameDay : '[اڄ] LT', - nextDay : '[سڀاڻي] LT', - nextWeek : 'dddd [اڳين هفتي تي] LT', - lastDay : '[ڪالهه] LT', - lastWeek : '[گزريل هفتي] dddd [تي] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s پوء', - past : '%s اڳ', - s : 'چند سيڪنڊ', - ss : '%d سيڪنڊ', - m : 'هڪ منٽ', - mm : '%d منٽ', - h : 'هڪ ڪلاڪ', - hh : '%d ڪلاڪ', - d : 'هڪ ڏينهن', - dd : '%d ڏينهن', - M : 'هڪ مهينو', - MM : '%d مهينا', - y : 'هڪ سال', - yy : '%d سال' - }, - preparse: function (string) { - return string.replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/,/g, '،'); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return sd; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/se.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/se.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var se = moment.defineLocale('se', { - months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), - monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), - weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), - weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), - weekdaysMin : 's_v_m_g_d_b_L'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'MMMM D. [b.] YYYY', - LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', - LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' - }, - calendar : { - sameDay: '[otne ti] LT', - nextDay: '[ihttin ti] LT', - nextWeek: 'dddd [ti] LT', - lastDay: '[ikte ti] LT', - lastWeek: '[ovddit] dddd [ti] LT', - sameElse: 'L' - }, - relativeTime : { - future : '%s geažes', - past : 'maŋit %s', - s : 'moadde sekunddat', - ss: '%d sekunddat', - m : 'okta minuhta', - mm : '%d minuhtat', - h : 'okta diimmu', - hh : '%d diimmut', - d : 'okta beaivi', - dd : '%d beaivvit', - M : 'okta mánnu', - MM : '%d mánut', - y : 'okta jahki', - yy : '%d jagit' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return se; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/si.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/si.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - /*jshint -W100*/ - var si = moment.defineLocale('si', { - months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), - monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), - weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), - weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), - weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'a h:mm', - LTS : 'a h:mm:ss', - L : 'YYYY/MM/DD', - LL : 'YYYY MMMM D', - LLL : 'YYYY MMMM D, a h:mm', - LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' - }, - calendar : { - sameDay : '[අද] LT[ට]', - nextDay : '[හෙට] LT[ට]', - nextWeek : 'dddd LT[ට]', - lastDay : '[ඊයේ] LT[ට]', - lastWeek : '[පසුගිය] dddd LT[ට]', - sameElse : 'L' - }, - relativeTime : { - future : '%sකින්', - past : '%sකට පෙර', - s : 'තත්පර කිහිපය', - ss : 'තත්පර %d', - m : 'මිනිත්තුව', - mm : 'මිනිත්තු %d', - h : 'පැය', - hh : 'පැය %d', - d : 'දිනය', - dd : 'දින %d', - M : 'මාසය', - MM : 'මාස %d', - y : 'වසර', - yy : 'වසර %d' - }, - dayOfMonthOrdinalParse: /\d{1,2} වැනි/, - ordinal : function (number) { - return number + ' වැනි'; - }, - meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, - isPM : function (input) { - return input === 'ප.ව.' || input === 'පස් වරු'; - }, - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'ප.ව.' : 'පස් වරු'; - } else { - return isLower ? 'පෙ.ව.' : 'පෙර වරු'; - } - } - }); - - return si; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sk.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sk.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), - monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); - function plural(n) { - return (n > 1) && (n < 5); - } - function translate(number, withoutSuffix, key, isFuture) { - var result = number + ' '; - switch (key) { - case 's': // a few seconds / in a few seconds / a few seconds ago - return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; - case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'sekundy' : 'sekúnd'); - } else { - return result + 'sekundami'; - } - break; - case 'm': // a minute / in a minute / a minute ago - return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); - case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'minúty' : 'minút'); - } else { - return result + 'minútami'; - } - break; - case 'h': // an hour / in an hour / an hour ago - return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); - case 'hh': // 9 hours / in 9 hours / 9 hours ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'hodiny' : 'hodín'); - } else { - return result + 'hodinami'; - } - break; - case 'd': // a day / in a day / a day ago - return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; - case 'dd': // 9 days / in 9 days / 9 days ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'dni' : 'dní'); - } else { - return result + 'dňami'; - } - break; - case 'M': // a month / in a month / a month ago - return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; - case 'MM': // 9 months / in 9 months / 9 months ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'mesiace' : 'mesiacov'); - } else { - return result + 'mesiacmi'; - } - break; - case 'y': // a year / in a year / a year ago - return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; - case 'yy': // 9 years / in 9 years / 9 years ago - if (withoutSuffix || isFuture) { - return result + (plural(number) ? 'roky' : 'rokov'); - } else { - return result + 'rokmi'; - } - break; - } - } - - var sk = moment.defineLocale('sk', { - months : months, - monthsShort : monthsShort, - weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), - weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), - weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), - longDateFormat : { - LT: 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd D. MMMM YYYY H:mm' - }, - calendar : { - sameDay: '[dnes o] LT', - nextDay: '[zajtra o] LT', - nextWeek: function () { - switch (this.day()) { - case 0: - return '[v nedeľu o] LT'; - case 1: - case 2: - return '[v] dddd [o] LT'; - case 3: - return '[v stredu o] LT'; - case 4: - return '[vo štvrtok o] LT'; - case 5: - return '[v piatok o] LT'; - case 6: - return '[v sobotu o] LT'; - } - }, - lastDay: '[včera o] LT', - lastWeek: function () { - switch (this.day()) { - case 0: - return '[minulú nedeľu o] LT'; - case 1: - case 2: - return '[minulý] dddd [o] LT'; - case 3: - return '[minulú stredu o] LT'; - case 4: - case 5: - return '[minulý] dddd [o] LT'; - case 6: - return '[minulú sobotu o] LT'; - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'za %s', - past : 'pred %s', - s : translate, - ss : translate, - m : translate, - mm : translate, - h : translate, - hh : translate, - d : translate, - dd : translate, - M : translate, - MM : translate, - y : translate, - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return sk; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sl.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sl.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var result = number + ' '; - switch (key) { - case 's': - return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; - case 'ss': - if (number === 1) { - result += withoutSuffix ? 'sekundo' : 'sekundi'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; - } else if (number < 5) { - result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; - } else { - result += 'sekund'; - } - return result; - case 'm': - return withoutSuffix ? 'ena minuta' : 'eno minuto'; - case 'mm': - if (number === 1) { - result += withoutSuffix ? 'minuta' : 'minuto'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; - } else if (number < 5) { - result += withoutSuffix || isFuture ? 'minute' : 'minutami'; - } else { - result += withoutSuffix || isFuture ? 'minut' : 'minutami'; - } - return result; - case 'h': - return withoutSuffix ? 'ena ura' : 'eno uro'; - case 'hh': - if (number === 1) { - result += withoutSuffix ? 'ura' : 'uro'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'uri' : 'urama'; - } else if (number < 5) { - result += withoutSuffix || isFuture ? 'ure' : 'urami'; - } else { - result += withoutSuffix || isFuture ? 'ur' : 'urami'; - } - return result; - case 'd': - return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; - case 'dd': - if (number === 1) { - result += withoutSuffix || isFuture ? 'dan' : 'dnem'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; - } else { - result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; - } - return result; - case 'M': - return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; - case 'MM': - if (number === 1) { - result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; - } else if (number < 5) { - result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; - } else { - result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; - } - return result; - case 'y': - return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; - case 'yy': - if (number === 1) { - result += withoutSuffix || isFuture ? 'leto' : 'letom'; - } else if (number === 2) { - result += withoutSuffix || isFuture ? 'leti' : 'letoma'; - } else if (number < 5) { - result += withoutSuffix || isFuture ? 'leta' : 'leti'; - } else { - result += withoutSuffix || isFuture ? 'let' : 'leti'; - } - return result; - } - } - - var sl = moment.defineLocale('sl', { - months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), - monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), - monthsParseExact: true, - weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), - weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), - weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM YYYY', - LLL : 'D. MMMM YYYY H:mm', - LLLL : 'dddd, D. MMMM YYYY H:mm' - }, - calendar : { - sameDay : '[danes ob] LT', - nextDay : '[jutri ob] LT', - - nextWeek : function () { - switch (this.day()) { - case 0: - return '[v] [nedeljo] [ob] LT'; - case 3: - return '[v] [sredo] [ob] LT'; - case 6: - return '[v] [soboto] [ob] LT'; - case 1: - case 2: - case 4: - case 5: - return '[v] dddd [ob] LT'; - } - }, - lastDay : '[včeraj ob] LT', - lastWeek : function () { - switch (this.day()) { - case 0: - return '[prejšnjo] [nedeljo] [ob] LT'; - case 3: - return '[prejšnjo] [sredo] [ob] LT'; - case 6: - return '[prejšnjo] [soboto] [ob] LT'; - case 1: - case 2: - case 4: - case 5: - return '[prejšnji] dddd [ob] LT'; - } - }, - sameElse : 'L' - }, - relativeTime : { - future : 'čez %s', - past : 'pred %s', - s : processRelativeTime, - ss : processRelativeTime, - m : processRelativeTime, - mm : processRelativeTime, - h : processRelativeTime, - hh : processRelativeTime, - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return sl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sq.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sq.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var sq = moment.defineLocale('sq', { - months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), - monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), - weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), - weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), - weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), - weekdaysParseExact : true, - meridiemParse: /PD|MD/, - isPM: function (input) { - return input.charAt(0) === 'M'; - }, - meridiem : function (hours, minutes, isLower) { - return hours < 12 ? 'PD' : 'MD'; - }, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Sot në] LT', - nextDay : '[Nesër në] LT', - nextWeek : 'dddd [në] LT', - lastDay : '[Dje në] LT', - lastWeek : 'dddd [e kaluar në] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'në %s', - past : '%s më parë', - s : 'disa sekonda', - ss : '%d sekonda', - m : 'një minutë', - mm : '%d minuta', - h : 'një orë', - hh : '%d orë', - d : 'një ditë', - dd : '%d ditë', - M : 'një muaj', - MM : '%d muaj', - y : 'një vit', - yy : '%d vite' - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return sq; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sr-cyrl.js": -/*!***********************************************!*\ - !*** ./node_modules/moment/locale/sr-cyrl.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var translator = { - words: { //Different grammatical cases - ss: ['секунда', 'секунде', 'секунди'], - m: ['један минут', 'једне минуте'], - mm: ['минут', 'минуте', 'минута'], - h: ['један сат', 'једног сата'], - hh: ['сат', 'сата', 'сати'], - dd: ['дан', 'дана', 'дана'], - MM: ['месец', 'месеца', 'месеци'], - yy: ['година', 'године', 'година'] - }, - correctGrammaticalCase: function (number, wordKey) { - return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); - }, - translate: function (number, withoutSuffix, key) { - var wordKey = translator.words[key]; - if (key.length === 1) { - return withoutSuffix ? wordKey[0] : wordKey[1]; - } else { - return number + ' ' + translator.correctGrammaticalCase(number, wordKey); - } - } - }; - - var srCyrl = moment.defineLocale('sr-cyrl', { - months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), - monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), - monthsParseExact: true, - weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), - weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), - weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), - weekdaysParseExact : true, - longDateFormat: { - LT: 'H:mm', - LTS : 'H:mm:ss', - L: 'DD.MM.YYYY', - LL: 'D. MMMM YYYY', - LLL: 'D. MMMM YYYY H:mm', - LLLL: 'dddd, D. MMMM YYYY H:mm' - }, - calendar: { - sameDay: '[данас у] LT', - nextDay: '[сутра у] LT', - nextWeek: function () { - switch (this.day()) { - case 0: - return '[у] [недељу] [у] LT'; - case 3: - return '[у] [среду] [у] LT'; - case 6: - return '[у] [суботу] [у] LT'; - case 1: - case 2: - case 4: - case 5: - return '[у] dddd [у] LT'; - } - }, - lastDay : '[јуче у] LT', - lastWeek : function () { - var lastWeekDays = [ - '[прошле] [недеље] [у] LT', - '[прошлог] [понедељка] [у] LT', - '[прошлог] [уторка] [у] LT', - '[прошле] [среде] [у] LT', - '[прошлог] [четвртка] [у] LT', - '[прошлог] [петка] [у] LT', - '[прошле] [суботе] [у] LT' - ]; - return lastWeekDays[this.day()]; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'за %s', - past : 'пре %s', - s : 'неколико секунди', - ss : translator.translate, - m : translator.translate, - mm : translator.translate, - h : translator.translate, - hh : translator.translate, - d : 'дан', - dd : translator.translate, - M : 'месец', - MM : translator.translate, - y : 'годину', - yy : translator.translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return srCyrl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sr.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sr.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var translator = { - words: { //Different grammatical cases - ss: ['sekunda', 'sekunde', 'sekundi'], - m: ['jedan minut', 'jedne minute'], - mm: ['minut', 'minute', 'minuta'], - h: ['jedan sat', 'jednog sata'], - hh: ['sat', 'sata', 'sati'], - dd: ['dan', 'dana', 'dana'], - MM: ['mesec', 'meseca', 'meseci'], - yy: ['godina', 'godine', 'godina'] - }, - correctGrammaticalCase: function (number, wordKey) { - return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); - }, - translate: function (number, withoutSuffix, key) { - var wordKey = translator.words[key]; - if (key.length === 1) { - return withoutSuffix ? wordKey[0] : wordKey[1]; - } else { - return number + ' ' + translator.correctGrammaticalCase(number, wordKey); - } - } - }; - - var sr = moment.defineLocale('sr', { - months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), - monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), - monthsParseExact: true, - weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), - weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), - weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), - weekdaysParseExact : true, - longDateFormat: { - LT: 'H:mm', - LTS : 'H:mm:ss', - L: 'DD.MM.YYYY', - LL: 'D. MMMM YYYY', - LLL: 'D. MMMM YYYY H:mm', - LLLL: 'dddd, D. MMMM YYYY H:mm' - }, - calendar: { - sameDay: '[danas u] LT', - nextDay: '[sutra u] LT', - nextWeek: function () { - switch (this.day()) { - case 0: - return '[u] [nedelju] [u] LT'; - case 3: - return '[u] [sredu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - case 1: - case 2: - case 4: - case 5: - return '[u] dddd [u] LT'; - } - }, - lastDay : '[juče u] LT', - lastWeek : function () { - var lastWeekDays = [ - '[prošle] [nedelje] [u] LT', - '[prošlog] [ponedeljka] [u] LT', - '[prošlog] [utorka] [u] LT', - '[prošle] [srede] [u] LT', - '[prošlog] [četvrtka] [u] LT', - '[prošlog] [petka] [u] LT', - '[prošle] [subote] [u] LT' - ]; - return lastWeekDays[this.day()]; - }, - sameElse : 'L' - }, - relativeTime : { - future : 'za %s', - past : 'pre %s', - s : 'nekoliko sekundi', - ss : translator.translate, - m : translator.translate, - mm : translator.translate, - h : translator.translate, - hh : translator.translate, - d : 'dan', - dd : translator.translate, - M : 'mesec', - MM : translator.translate, - y : 'godinu', - yy : translator.translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return sr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ss.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ss.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ss = moment.defineLocale('ss', { - months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), - monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), - weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), - weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), - weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendar : { - sameDay : '[Namuhla nga] LT', - nextDay : '[Kusasa nga] LT', - nextWeek : 'dddd [nga] LT', - lastDay : '[Itolo nga] LT', - lastWeek : 'dddd [leliphelile] [nga] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'nga %s', - past : 'wenteka nga %s', - s : 'emizuzwana lomcane', - ss : '%d mzuzwana', - m : 'umzuzu', - mm : '%d emizuzu', - h : 'lihora', - hh : '%d emahora', - d : 'lilanga', - dd : '%d emalanga', - M : 'inyanga', - MM : '%d tinyanga', - y : 'umnyaka', - yy : '%d iminyaka' - }, - meridiemParse: /ekuseni|emini|entsambama|ebusuku/, - meridiem : function (hours, minutes, isLower) { - if (hours < 11) { - return 'ekuseni'; - } else if (hours < 15) { - return 'emini'; - } else if (hours < 19) { - return 'entsambama'; - } else { - return 'ebusuku'; - } - }, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'ekuseni') { - return hour; - } else if (meridiem === 'emini') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { - if (hour === 0) { - return 0; - } - return hour + 12; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}/, - ordinal : '%d', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return ss; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sv.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sv.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var sv = moment.defineLocale('sv', { - months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), - monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), - weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), - weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), - weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY-MM-DD', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY [kl.] HH:mm', - LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', - lll : 'D MMM YYYY HH:mm', - llll : 'ddd D MMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Idag] LT', - nextDay: '[Imorgon] LT', - lastDay: '[Igår] LT', - nextWeek: '[På] dddd LT', - lastWeek: '[I] dddd[s] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'om %s', - past : 'för %s sedan', - s : 'några sekunder', - ss : '%d sekunder', - m : 'en minut', - mm : '%d minuter', - h : 'en timme', - hh : '%d timmar', - d : 'en dag', - dd : '%d dagar', - M : 'en månad', - MM : '%d månader', - y : 'ett år', - yy : '%d år' - }, - dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'e' : - (b === 1) ? 'a' : - (b === 2) ? 'a' : - (b === 3) ? 'e' : 'e'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return sv; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/sw.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/sw.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var sw = moment.defineLocale('sw', { - months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), - monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), - weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), - weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), - weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[leo saa] LT', - nextDay : '[kesho saa] LT', - nextWeek : '[wiki ijayo] dddd [saat] LT', - lastDay : '[jana] LT', - lastWeek : '[wiki iliyopita] dddd [saat] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s baadaye', - past : 'tokea %s', - s : 'hivi punde', - ss : 'sekunde %d', - m : 'dakika moja', - mm : 'dakika %d', - h : 'saa limoja', - hh : 'masaa %d', - d : 'siku moja', - dd : 'masiku %d', - M : 'mwezi mmoja', - MM : 'miezi %d', - y : 'mwaka mmoja', - yy : 'miaka %d' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return sw; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ta.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ta.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var symbolMap = { - '1': '௧', - '2': '௨', - '3': '௩', - '4': '௪', - '5': '௫', - '6': '௬', - '7': '௭', - '8': '௮', - '9': '௯', - '0': '௦' - }, numberMap = { - '௧': '1', - '௨': '2', - '௩': '3', - '௪': '4', - '௫': '5', - '௬': '6', - '௭': '7', - '௮': '8', - '௯': '9', - '௦': '0' - }; - - var ta = moment.defineLocale('ta', { - months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), - monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), - weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), - weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), - weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, HH:mm', - LLLL : 'dddd, D MMMM YYYY, HH:mm' - }, - calendar : { - sameDay : '[இன்று] LT', - nextDay : '[நாளை] LT', - nextWeek : 'dddd, LT', - lastDay : '[நேற்று] LT', - lastWeek : '[கடந்த வாரம்] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s இல்', - past : '%s முன்', - s : 'ஒரு சில விநாடிகள்', - ss : '%d விநாடிகள்', - m : 'ஒரு நிமிடம்', - mm : '%d நிமிடங்கள்', - h : 'ஒரு மணி நேரம்', - hh : '%d மணி நேரம்', - d : 'ஒரு நாள்', - dd : '%d நாட்கள்', - M : 'ஒரு மாதம்', - MM : '%d மாதங்கள்', - y : 'ஒரு வருடம்', - yy : '%d ஆண்டுகள்' - }, - dayOfMonthOrdinalParse: /\d{1,2}வது/, - ordinal : function (number) { - return number + 'வது'; - }, - preparse: function (string) { - return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { - return numberMap[match]; - }); - }, - postformat: function (string) { - return string.replace(/\d/g, function (match) { - return symbolMap[match]; - }); - }, - // refer http://ta.wikipedia.org/s/1er1 - meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, - meridiem : function (hour, minute, isLower) { - if (hour < 2) { - return ' யாமம்'; - } else if (hour < 6) { - return ' வைகறை'; // வைகறை - } else if (hour < 10) { - return ' காலை'; // காலை - } else if (hour < 14) { - return ' நண்பகல்'; // நண்பகல் - } else if (hour < 18) { - return ' எற்பாடு'; // எற்பாடு - } else if (hour < 22) { - return ' மாலை'; // மாலை - } else { - return ' யாமம்'; - } - }, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'யாமம்') { - return hour < 2 ? hour : hour + 12; - } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { - return hour; - } else if (meridiem === 'நண்பகல்') { - return hour >= 10 ? hour : hour + 12; - } else { - return hour + 12; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return ta; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/te.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/te.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var te = moment.defineLocale('te', { - months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), - monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), - monthsParseExact : true, - weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), - weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), - weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), - longDateFormat : { - LT : 'A h:mm', - LTS : 'A h:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, A h:mm', - LLLL : 'dddd, D MMMM YYYY, A h:mm' - }, - calendar : { - sameDay : '[నేడు] LT', - nextDay : '[రేపు] LT', - nextWeek : 'dddd, LT', - lastDay : '[నిన్న] LT', - lastWeek : '[గత] dddd, LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s లో', - past : '%s క్రితం', - s : 'కొన్ని క్షణాలు', - ss : '%d సెకన్లు', - m : 'ఒక నిమిషం', - mm : '%d నిమిషాలు', - h : 'ఒక గంట', - hh : '%d గంటలు', - d : 'ఒక రోజు', - dd : '%d రోజులు', - M : 'ఒక నెల', - MM : '%d నెలలు', - y : 'ఒక సంవత్సరం', - yy : '%d సంవత్సరాలు' - }, - dayOfMonthOrdinalParse : /\d{1,2}వ/, - ordinal : '%dవ', - meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'రాత్రి') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'ఉదయం') { - return hour; - } else if (meridiem === 'మధ్యాహ్నం') { - return hour >= 10 ? hour : hour + 12; - } else if (meridiem === 'సాయంత్రం') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'రాత్రి'; - } else if (hour < 10) { - return 'ఉదయం'; - } else if (hour < 17) { - return 'మధ్యాహ్నం'; - } else if (hour < 20) { - return 'సాయంత్రం'; - } else { - return 'రాత్రి'; - } - }, - week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - } - }); - - return te; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tet.js": -/*!*******************************************!*\ - !*** ./node_modules/moment/locale/tet.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var tet = moment.defineLocale('tet', { - months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), - monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), - weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), - weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), - weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Ohin iha] LT', - nextDay: '[Aban iha] LT', - nextWeek: 'dddd [iha] LT', - lastDay: '[Horiseik iha] LT', - lastWeek: 'dddd [semana kotuk] [iha] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'iha %s', - past : '%s liuba', - s : 'minutu balun', - ss : 'minutu %d', - m : 'minutu ida', - mm : 'minutu %d', - h : 'oras ida', - hh : 'oras %d', - d : 'loron ida', - dd : 'loron %d', - M : 'fulan ida', - MM : 'fulan %d', - y : 'tinan ida', - yy : 'tinan %d' - }, - dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return tet; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tg.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/tg.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var suffixes = { - 0: '-ум', - 1: '-ум', - 2: '-юм', - 3: '-юм', - 4: '-ум', - 5: '-ум', - 6: '-ум', - 7: '-ум', - 8: '-ум', - 9: '-ум', - 10: '-ум', - 12: '-ум', - 13: '-ум', - 20: '-ум', - 30: '-юм', - 40: '-ум', - 50: '-ум', - 60: '-ум', - 70: '-ум', - 80: '-ум', - 90: '-ум', - 100: '-ум' - }; - - var tg = moment.defineLocale('tg', { - months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), - monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), - weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), - weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), - weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[Имрӯз соати] LT', - nextDay : '[Пагоҳ соати] LT', - lastDay : '[Дирӯз соати] LT', - nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', - lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'баъди %s', - past : '%s пеш', - s : 'якчанд сония', - m : 'як дақиқа', - mm : '%d дақиқа', - h : 'як соат', - hh : '%d соат', - d : 'як рӯз', - dd : '%d рӯз', - M : 'як моҳ', - MM : '%d моҳ', - y : 'як сол', - yy : '%d сол' - }, - meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === 'шаб') { - return hour < 4 ? hour : hour + 12; - } else if (meridiem === 'субҳ') { - return hour; - } else if (meridiem === 'рӯз') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === 'бегоҳ') { - return hour + 12; - } - }, - meridiem: function (hour, minute, isLower) { - if (hour < 4) { - return 'шаб'; - } else if (hour < 11) { - return 'субҳ'; - } else if (hour < 16) { - return 'рӯз'; - } else if (hour < 19) { - return 'бегоҳ'; - } else { - return 'шаб'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, - ordinal: function (number) { - var a = number % 10, - b = number >= 100 ? 100 : null; - return number + (suffixes[number] || suffixes[a] || suffixes[b]); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 1th is the first week of the year. - } - }); - - return tg; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/th.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/th.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var th = moment.defineLocale('th', { - months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), - monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), - monthsParseExact: true, - weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), - weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference - weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'H:mm', - LTS : 'H:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY เวลา H:mm', - LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' - }, - meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, - isPM: function (input) { - return input === 'หลังเที่ยง'; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'ก่อนเที่ยง'; - } else { - return 'หลังเที่ยง'; - } - }, - calendar : { - sameDay : '[วันนี้ เวลา] LT', - nextDay : '[พรุ่งนี้ เวลา] LT', - nextWeek : 'dddd[หน้า เวลา] LT', - lastDay : '[เมื่อวานนี้ เวลา] LT', - lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'อีก %s', - past : '%sที่แล้ว', - s : 'ไม่กี่วินาที', - ss : '%d วินาที', - m : '1 นาที', - mm : '%d นาที', - h : '1 ชั่วโมง', - hh : '%d ชั่วโมง', - d : '1 วัน', - dd : '%d วัน', - M : '1 เดือน', - MM : '%d เดือน', - y : '1 ปี', - yy : '%d ปี' - } - }); - - return th; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tl-ph.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/tl-ph.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var tlPh = moment.defineLocale('tl-ph', { - months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), - monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), - weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), - weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), - weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'MM/D/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY HH:mm', - LLLL : 'dddd, MMMM DD, YYYY HH:mm' - }, - calendar : { - sameDay: 'LT [ngayong araw]', - nextDay: '[Bukas ng] LT', - nextWeek: 'LT [sa susunod na] dddd', - lastDay: 'LT [kahapon]', - lastWeek: 'LT [noong nakaraang] dddd', - sameElse: 'L' - }, - relativeTime : { - future : 'sa loob ng %s', - past : '%s ang nakalipas', - s : 'ilang segundo', - ss : '%d segundo', - m : 'isang minuto', - mm : '%d minuto', - h : 'isang oras', - hh : '%d oras', - d : 'isang araw', - dd : '%d araw', - M : 'isang buwan', - MM : '%d buwan', - y : 'isang taon', - yy : '%d taon' - }, - dayOfMonthOrdinalParse: /\d{1,2}/, - ordinal : function (number) { - return number; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return tlPh; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tlh.js": -/*!*******************************************!*\ - !*** ./node_modules/moment/locale/tlh.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); - - function translateFuture(output) { - var time = output; - time = (output.indexOf('jaj') !== -1) ? - time.slice(0, -3) + 'leS' : - (output.indexOf('jar') !== -1) ? - time.slice(0, -3) + 'waQ' : - (output.indexOf('DIS') !== -1) ? - time.slice(0, -3) + 'nem' : - time + ' pIq'; - return time; - } - - function translatePast(output) { - var time = output; - time = (output.indexOf('jaj') !== -1) ? - time.slice(0, -3) + 'Hu’' : - (output.indexOf('jar') !== -1) ? - time.slice(0, -3) + 'wen' : - (output.indexOf('DIS') !== -1) ? - time.slice(0, -3) + 'ben' : - time + ' ret'; - return time; - } - - function translate(number, withoutSuffix, string, isFuture) { - var numberNoun = numberAsNoun(number); - switch (string) { - case 'ss': - return numberNoun + ' lup'; - case 'mm': - return numberNoun + ' tup'; - case 'hh': - return numberNoun + ' rep'; - case 'dd': - return numberNoun + ' jaj'; - case 'MM': - return numberNoun + ' jar'; - case 'yy': - return numberNoun + ' DIS'; - } - } - - function numberAsNoun(number) { - var hundred = Math.floor((number % 1000) / 100), - ten = Math.floor((number % 100) / 10), - one = number % 10, - word = ''; - if (hundred > 0) { - word += numbersNouns[hundred] + 'vatlh'; - } - if (ten > 0) { - word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; - } - if (one > 0) { - word += ((word !== '') ? ' ' : '') + numbersNouns[one]; - } - return (word === '') ? 'pagh' : word; - } - - var tlh = moment.defineLocale('tlh', { - months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), - monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), - monthsParseExact : true, - weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), - weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), - weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[DaHjaj] LT', - nextDay: '[wa’leS] LT', - nextWeek: 'LLL', - lastDay: '[wa’Hu’] LT', - lastWeek: 'LLL', - sameElse: 'L' - }, - relativeTime : { - future : translateFuture, - past : translatePast, - s : 'puS lup', - ss : translate, - m : 'wa’ tup', - mm : translate, - h : 'wa’ rep', - hh : translate, - d : 'wa’ jaj', - dd : translate, - M : 'wa’ jar', - MM : translate, - y : 'wa’ DIS', - yy : translate - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return tlh; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tr.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/tr.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - var suffixes = { - 1: '\'inci', - 5: '\'inci', - 8: '\'inci', - 70: '\'inci', - 80: '\'inci', - 2: '\'nci', - 7: '\'nci', - 20: '\'nci', - 50: '\'nci', - 3: '\'üncü', - 4: '\'üncü', - 100: '\'üncü', - 6: '\'ncı', - 9: '\'uncu', - 10: '\'uncu', - 30: '\'uncu', - 60: '\'ıncı', - 90: '\'ıncı' - }; - - var tr = moment.defineLocale('tr', { - months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), - monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), - weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), - weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), - weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[bugün saat] LT', - nextDay : '[yarın saat] LT', - nextWeek : '[gelecek] dddd [saat] LT', - lastDay : '[dün] LT', - lastWeek : '[geçen] dddd [saat] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s sonra', - past : '%s önce', - s : 'birkaç saniye', - ss : '%d saniye', - m : 'bir dakika', - mm : '%d dakika', - h : 'bir saat', - hh : '%d saat', - d : 'bir gün', - dd : '%d gün', - M : 'bir ay', - MM : '%d ay', - y : 'bir yıl', - yy : '%d yıl' - }, - ordinal: function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'Do': - case 'DD': - return number; - default: - if (number === 0) { // special case for zero - return number + '\'ıncı'; - } - var a = number % 10, - b = number % 100 - a, - c = number >= 100 ? 100 : null; - return number + (suffixes[a] || suffixes[b] || suffixes[c]); - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return tr; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tzl.js": -/*!*******************************************!*\ - !*** ./node_modules/moment/locale/tzl.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. - // This is currently too difficult (maybe even impossible) to add. - var tzl = moment.defineLocale('tzl', { - months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), - monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), - weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), - weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), - weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), - longDateFormat : { - LT : 'HH.mm', - LTS : 'HH.mm.ss', - L : 'DD.MM.YYYY', - LL : 'D. MMMM [dallas] YYYY', - LLL : 'D. MMMM [dallas] YYYY HH.mm', - LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' - }, - meridiemParse: /d\'o|d\'a/i, - isPM : function (input) { - return 'd\'o' === input.toLowerCase(); - }, - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'd\'o' : 'D\'O'; - } else { - return isLower ? 'd\'a' : 'D\'A'; - } - }, - calendar : { - sameDay : '[oxhi à] LT', - nextDay : '[demà à] LT', - nextWeek : 'dddd [à] LT', - lastDay : '[ieiri à] LT', - lastWeek : '[sür el] dddd [lasteu à] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'osprei %s', - past : 'ja%s', - s : processRelativeTime, - ss : processRelativeTime, - m : processRelativeTime, - mm : processRelativeTime, - h : processRelativeTime, - hh : processRelativeTime, - d : processRelativeTime, - dd : processRelativeTime, - M : processRelativeTime, - MM : processRelativeTime, - y : processRelativeTime, - yy : processRelativeTime - }, - dayOfMonthOrdinalParse: /\d{1,2}\./, - ordinal : '%d.', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - function processRelativeTime(number, withoutSuffix, key, isFuture) { - var format = { - 's': ['viensas secunds', '\'iensas secunds'], - 'ss': [number + ' secunds', '' + number + ' secunds'], - 'm': ['\'n míut', '\'iens míut'], - 'mm': [number + ' míuts', '' + number + ' míuts'], - 'h': ['\'n þora', '\'iensa þora'], - 'hh': [number + ' þoras', '' + number + ' þoras'], - 'd': ['\'n ziua', '\'iensa ziua'], - 'dd': [number + ' ziuas', '' + number + ' ziuas'], - 'M': ['\'n mes', '\'iens mes'], - 'MM': [number + ' mesen', '' + number + ' mesen'], - 'y': ['\'n ar', '\'iens ar'], - 'yy': [number + ' ars', '' + number + ' ars'] - }; - return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); - } - - return tzl; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tzm-latn.js": -/*!************************************************!*\ - !*** ./node_modules/moment/locale/tzm-latn.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var tzmLatn = moment.defineLocale('tzm-latn', { - months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), - monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), - weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), - weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), - weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[asdkh g] LT', - nextDay: '[aska g] LT', - nextWeek: 'dddd [g] LT', - lastDay: '[assant g] LT', - lastWeek: 'dddd [g] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'dadkh s yan %s', - past : 'yan %s', - s : 'imik', - ss : '%d imik', - m : 'minuḍ', - mm : '%d minuḍ', - h : 'saɛa', - hh : '%d tassaɛin', - d : 'ass', - dd : '%d ossan', - M : 'ayowr', - MM : '%d iyyirn', - y : 'asgas', - yy : '%d isgasn' - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return tzmLatn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/tzm.js": -/*!*******************************************!*\ - !*** ./node_modules/moment/locale/tzm.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var tzm = moment.defineLocale('tzm', { - months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), - monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), - weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), - weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), - weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS: 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd D MMMM YYYY HH:mm' - }, - calendar : { - sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', - nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', - nextWeek: 'dddd [ⴴ] LT', - lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', - lastWeek: 'dddd [ⴴ] LT', - sameElse: 'L' - }, - relativeTime : { - future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', - past : 'ⵢⴰⵏ %s', - s : 'ⵉⵎⵉⴽ', - ss : '%d ⵉⵎⵉⴽ', - m : 'ⵎⵉⵏⵓⴺ', - mm : '%d ⵎⵉⵏⵓⴺ', - h : 'ⵙⴰⵄⴰ', - hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', - d : 'ⴰⵙⵙ', - dd : '%d oⵙⵙⴰⵏ', - M : 'ⴰⵢoⵓⵔ', - MM : '%d ⵉⵢⵢⵉⵔⵏ', - y : 'ⴰⵙⴳⴰⵙ', - yy : '%d ⵉⵙⴳⴰⵙⵏ' - }, - week : { - dow : 6, // Saturday is the first day of the week. - doy : 12 // The week that contains Jan 12th is the first week of the year. - } - }); - - return tzm; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ug-cn.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/ug-cn.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js language configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var ugCn = moment.defineLocale('ug-cn', { - months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( - '_' - ), - monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( - '_' - ), - weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( - '_' - ), - weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), - weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), - longDateFormat: { - LT: 'HH:mm', - LTS: 'HH:mm:ss', - L: 'YYYY-MM-DD', - LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', - LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', - LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' - }, - meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if ( - meridiem === 'يېرىم كېچە' || - meridiem === 'سەھەر' || - meridiem === 'چۈشتىن بۇرۇن' - ) { - return hour; - } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { - return hour + 12; - } else { - return hour >= 11 ? hour : hour + 12; - } - }, - meridiem: function (hour, minute, isLower) { - var hm = hour * 100 + minute; - if (hm < 600) { - return 'يېرىم كېچە'; - } else if (hm < 900) { - return 'سەھەر'; - } else if (hm < 1130) { - return 'چۈشتىن بۇرۇن'; - } else if (hm < 1230) { - return 'چۈش'; - } else if (hm < 1800) { - return 'چۈشتىن كېيىن'; - } else { - return 'كەچ'; - } - }, - calendar: { - sameDay: '[بۈگۈن سائەت] LT', - nextDay: '[ئەتە سائەت] LT', - nextWeek: '[كېلەركى] dddd [سائەت] LT', - lastDay: '[تۆنۈگۈن] LT', - lastWeek: '[ئالدىنقى] dddd [سائەت] LT', - sameElse: 'L' - }, - relativeTime: { - future: '%s كېيىن', - past: '%s بۇرۇن', - s: 'نەچچە سېكونت', - ss: '%d سېكونت', - m: 'بىر مىنۇت', - mm: '%d مىنۇت', - h: 'بىر سائەت', - hh: '%d سائەت', - d: 'بىر كۈن', - dd: '%d كۈن', - M: 'بىر ئاي', - MM: '%d ئاي', - y: 'بىر يىل', - yy: '%d يىل' - }, - - dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, - ordinal: function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'DDD': - return number + '-كۈنى'; - case 'w': - case 'W': - return number + '-ھەپتە'; - default: - return number; - } - }, - preparse: function (string) { - return string.replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/,/g, '،'); - }, - week: { - // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 - dow: 1, // Monday is the first day of the week. - doy: 7 // The week that contains Jan 1st is the first week of the year. - } - }); - - return ugCn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/uk.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/uk.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - function plural(word, num) { - var forms = word.split('_'); - return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); - } - function relativeTimeWithPlural(number, withoutSuffix, key) { - var format = { - 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', - 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', - 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', - 'dd': 'день_дні_днів', - 'MM': 'місяць_місяці_місяців', - 'yy': 'рік_роки_років' - }; - if (key === 'm') { - return withoutSuffix ? 'хвилина' : 'хвилину'; - } - else if (key === 'h') { - return withoutSuffix ? 'година' : 'годину'; - } - else { - return number + ' ' + plural(format[key], +number); - } - } - function weekdaysCaseReplace(m, format) { - var weekdays = { - 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), - 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), - 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') - }; - - if (m === true) { - return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1)); - } - if (!m) { - return weekdays['nominative']; - } - - var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? - 'accusative' : - ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? - 'genitive' : - 'nominative'); - return weekdays[nounCase][m.day()]; - } - function processHoursFunction(str) { - return function () { - return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; - }; - } - - var uk = moment.defineLocale('uk', { - months : { - 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), - 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') - }, - monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), - weekdays : weekdaysCaseReplace, - weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), - weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD.MM.YYYY', - LL : 'D MMMM YYYY р.', - LLL : 'D MMMM YYYY р., HH:mm', - LLLL : 'dddd, D MMMM YYYY р., HH:mm' - }, - calendar : { - sameDay: processHoursFunction('[Сьогодні '), - nextDay: processHoursFunction('[Завтра '), - lastDay: processHoursFunction('[Вчора '), - nextWeek: processHoursFunction('[У] dddd ['), - lastWeek: function () { - switch (this.day()) { - case 0: - case 3: - case 5: - case 6: - return processHoursFunction('[Минулої] dddd [').call(this); - case 1: - case 2: - case 4: - return processHoursFunction('[Минулого] dddd [').call(this); - } - }, - sameElse: 'L' - }, - relativeTime : { - future : 'за %s', - past : '%s тому', - s : 'декілька секунд', - ss : relativeTimeWithPlural, - m : relativeTimeWithPlural, - mm : relativeTimeWithPlural, - h : 'годину', - hh : relativeTimeWithPlural, - d : 'день', - dd : relativeTimeWithPlural, - M : 'місяць', - MM : relativeTimeWithPlural, - y : 'рік', - yy : relativeTimeWithPlural - }, - // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason - meridiemParse: /ночі|ранку|дня|вечора/, - isPM: function (input) { - return /^(дня|вечора)$/.test(input); - }, - meridiem : function (hour, minute, isLower) { - if (hour < 4) { - return 'ночі'; - } else if (hour < 12) { - return 'ранку'; - } else if (hour < 17) { - return 'дня'; - } else { - return 'вечора'; - } - }, - dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, - ordinal: function (number, period) { - switch (period) { - case 'M': - case 'd': - case 'DDD': - case 'w': - case 'W': - return number + '-й'; - case 'D': - return number + '-го'; - default: - return number; - } - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return uk; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/ur.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/ur.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var months = [ - 'جنوری', - 'فروری', - 'مارچ', - 'اپریل', - 'مئی', - 'جون', - 'جولائی', - 'اگست', - 'ستمبر', - 'اکتوبر', - 'نومبر', - 'دسمبر' - ]; - var days = [ - 'اتوار', - 'پیر', - 'منگل', - 'بدھ', - 'جمعرات', - 'جمعہ', - 'ہفتہ' - ]; - - var ur = moment.defineLocale('ur', { - months : months, - monthsShort : months, - weekdays : days, - weekdaysShort : days, - weekdaysMin : days, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd، D MMMM YYYY HH:mm' - }, - meridiemParse: /صبح|شام/, - isPM : function (input) { - return 'شام' === input; - }, - meridiem : function (hour, minute, isLower) { - if (hour < 12) { - return 'صبح'; - } - return 'شام'; - }, - calendar : { - sameDay : '[آج بوقت] LT', - nextDay : '[کل بوقت] LT', - nextWeek : 'dddd [بوقت] LT', - lastDay : '[گذشتہ روز بوقت] LT', - lastWeek : '[گذشتہ] dddd [بوقت] LT', - sameElse : 'L' - }, - relativeTime : { - future : '%s بعد', - past : '%s قبل', - s : 'چند سیکنڈ', - ss : '%d سیکنڈ', - m : 'ایک منٹ', - mm : '%d منٹ', - h : 'ایک گھنٹہ', - hh : '%d گھنٹے', - d : 'ایک دن', - dd : '%d دن', - M : 'ایک ماہ', - MM : '%d ماہ', - y : 'ایک سال', - yy : '%d سال' - }, - preparse: function (string) { - return string.replace(/،/g, ','); - }, - postformat: function (string) { - return string.replace(/,/g, '،'); - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return ur; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/uz-latn.js": -/*!***********************************************!*\ - !*** ./node_modules/moment/locale/uz-latn.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var uzLatn = moment.defineLocale('uz-latn', { - months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), - monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), - weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), - weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), - weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'D MMMM YYYY, dddd HH:mm' - }, - calendar : { - sameDay : '[Bugun soat] LT [da]', - nextDay : '[Ertaga] LT [da]', - nextWeek : 'dddd [kuni soat] LT [da]', - lastDay : '[Kecha soat] LT [da]', - lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', - sameElse : 'L' - }, - relativeTime : { - future : 'Yaqin %s ichida', - past : 'Bir necha %s oldin', - s : 'soniya', - ss : '%d soniya', - m : 'bir daqiqa', - mm : '%d daqiqa', - h : 'bir soat', - hh : '%d soat', - d : 'bir kun', - dd : '%d kun', - M : 'bir oy', - MM : '%d oy', - y : 'bir yil', - yy : '%d yil' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 7th is the first week of the year. - } - }); - - return uzLatn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/uz.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/uz.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var uz = moment.defineLocale('uz', { - months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), - monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), - weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), - weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), - weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'D MMMM YYYY, dddd HH:mm' - }, - calendar : { - sameDay : '[Бугун соат] LT [да]', - nextDay : '[Эртага] LT [да]', - nextWeek : 'dddd [куни соат] LT [да]', - lastDay : '[Кеча соат] LT [да]', - lastWeek : '[Утган] dddd [куни соат] LT [да]', - sameElse : 'L' - }, - relativeTime : { - future : 'Якин %s ичида', - past : 'Бир неча %s олдин', - s : 'фурсат', - ss : '%d фурсат', - m : 'бир дакика', - mm : '%d дакика', - h : 'бир соат', - hh : '%d соат', - d : 'бир кун', - dd : '%d кун', - M : 'бир ой', - MM : '%d ой', - y : 'бир йил', - yy : '%d йил' - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 7 // The week that contains Jan 4th is the first week of the year. - } - }); - - return uz; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/vi.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/vi.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var vi = moment.defineLocale('vi', { - months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), - monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), - monthsParseExact : true, - weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), - weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), - weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), - weekdaysParseExact : true, - meridiemParse: /sa|ch/i, - isPM : function (input) { - return /^ch$/i.test(input); - }, - meridiem : function (hours, minutes, isLower) { - if (hours < 12) { - return isLower ? 'sa' : 'SA'; - } else { - return isLower ? 'ch' : 'CH'; - } - }, - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'DD/MM/YYYY', - LL : 'D MMMM [năm] YYYY', - LLL : 'D MMMM [năm] YYYY HH:mm', - LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', - l : 'DD/M/YYYY', - ll : 'D MMM YYYY', - lll : 'D MMM YYYY HH:mm', - llll : 'ddd, D MMM YYYY HH:mm' - }, - calendar : { - sameDay: '[Hôm nay lúc] LT', - nextDay: '[Ngày mai lúc] LT', - nextWeek: 'dddd [tuần tới lúc] LT', - lastDay: '[Hôm qua lúc] LT', - lastWeek: 'dddd [tuần rồi lúc] LT', - sameElse: 'L' - }, - relativeTime : { - future : '%s tới', - past : '%s trước', - s : 'vài giây', - ss : '%d giây' , - m : 'một phút', - mm : '%d phút', - h : 'một giờ', - hh : '%d giờ', - d : 'một ngày', - dd : '%d ngày', - M : 'một tháng', - MM : '%d tháng', - y : 'một năm', - yy : '%d năm' - }, - dayOfMonthOrdinalParse: /\d{1,2}/, - ordinal : function (number) { - return number; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return vi; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/x-pseudo.js": -/*!************************************************!*\ - !*** ./node_modules/moment/locale/x-pseudo.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var xPseudo = moment.defineLocale('x-pseudo', { - months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), - monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), - monthsParseExact : true, - weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), - weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), - weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), - weekdaysParseExact : true, - longDateFormat : { - LT : 'HH:mm', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY HH:mm', - LLLL : 'dddd, D MMMM YYYY HH:mm' - }, - calendar : { - sameDay : '[T~ódá~ý át] LT', - nextDay : '[T~ómó~rró~w át] LT', - nextWeek : 'dddd [át] LT', - lastDay : '[Ý~ést~érdá~ý át] LT', - lastWeek : '[L~ást] dddd [át] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'í~ñ %s', - past : '%s á~gó', - s : 'á ~féw ~sécó~ñds', - ss : '%d s~écóñ~ds', - m : 'á ~míñ~úté', - mm : '%d m~íñú~tés', - h : 'á~ñ hó~úr', - hh : '%d h~óúrs', - d : 'á ~dáý', - dd : '%d d~áýs', - M : 'á ~móñ~th', - MM : '%d m~óñt~hs', - y : 'á ~ýéár', - yy : '%d ý~éárs' - }, - dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal : function (number) { - var b = number % 10, - output = (~~(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - }, - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return xPseudo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/yo.js": -/*!******************************************!*\ - !*** ./node_modules/moment/locale/yo.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var yo = moment.defineLocale('yo', { - months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), - monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), - weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), - weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), - weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), - longDateFormat : { - LT : 'h:mm A', - LTS : 'h:mm:ss A', - L : 'DD/MM/YYYY', - LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY h:mm A', - LLLL : 'dddd, D MMMM YYYY h:mm A' - }, - calendar : { - sameDay : '[Ònì ni] LT', - nextDay : '[Ọ̀la ni] LT', - nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', - lastDay : '[Àna ni] LT', - lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', - sameElse : 'L' - }, - relativeTime : { - future : 'ní %s', - past : '%s kọjá', - s : 'ìsẹjú aayá die', - ss :'aayá %d', - m : 'ìsẹjú kan', - mm : 'ìsẹjú %d', - h : 'wákati kan', - hh : 'wákati %d', - d : 'ọjọ́ kan', - dd : 'ọjọ́ %d', - M : 'osù kan', - MM : 'osù %d', - y : 'ọdún kan', - yy : 'ọdún %d' - }, - dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, - ordinal : 'ọjọ́ %d', - week : { - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return yo; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/zh-cn.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/zh-cn.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var zhCn = moment.defineLocale('zh-cn', { - months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), - monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), - weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), - weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), - weekdaysMin : '日_一_二_三_四_五_六'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY/MM/DD', - LL : 'YYYY年M月D日', - LLL : 'YYYY年M月D日Ah点mm分', - LLLL : 'YYYY年M月D日ddddAh点mm分', - l : 'YYYY/M/D', - ll : 'YYYY年M月D日', - lll : 'YYYY年M月D日 HH:mm', - llll : 'YYYY年M月D日dddd HH:mm' - }, - meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, - meridiemHour: function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === '凌晨' || meridiem === '早上' || - meridiem === '上午') { - return hour; - } else if (meridiem === '下午' || meridiem === '晚上') { - return hour + 12; - } else { - // '中午' - return hour >= 11 ? hour : hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - var hm = hour * 100 + minute; - if (hm < 600) { - return '凌晨'; - } else if (hm < 900) { - return '早上'; - } else if (hm < 1130) { - return '上午'; - } else if (hm < 1230) { - return '中午'; - } else if (hm < 1800) { - return '下午'; - } else { - return '晚上'; - } - }, - calendar : { - sameDay : '[今天]LT', - nextDay : '[明天]LT', - nextWeek : '[下]ddddLT', - lastDay : '[昨天]LT', - lastWeek : '[上]ddddLT', - sameElse : 'L' - }, - dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, - ordinal : function (number, period) { - switch (period) { - case 'd': - case 'D': - case 'DDD': - return number + '日'; - case 'M': - return number + '月'; - case 'w': - case 'W': - return number + '周'; - default: - return number; - } - }, - relativeTime : { - future : '%s内', - past : '%s前', - s : '几秒', - ss : '%d 秒', - m : '1 分钟', - mm : '%d 分钟', - h : '1 小时', - hh : '%d 小时', - d : '1 天', - dd : '%d 天', - M : '1 个月', - MM : '%d 个月', - y : '1 年', - yy : '%d 年' - }, - week : { - // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 - dow : 1, // Monday is the first day of the week. - doy : 4 // The week that contains Jan 4th is the first week of the year. - } - }); - - return zhCn; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/zh-hk.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/zh-hk.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var zhHk = moment.defineLocale('zh-hk', { - months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), - monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), - weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), - weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), - weekdaysMin : '日_一_二_三_四_五_六'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY/MM/DD', - LL : 'YYYY年M月D日', - LLL : 'YYYY年M月D日 HH:mm', - LLLL : 'YYYY年M月D日dddd HH:mm', - l : 'YYYY/M/D', - ll : 'YYYY年M月D日', - lll : 'YYYY年M月D日 HH:mm', - llll : 'YYYY年M月D日dddd HH:mm' - }, - meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { - return hour; - } else if (meridiem === '中午') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === '下午' || meridiem === '晚上') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - var hm = hour * 100 + minute; - if (hm < 600) { - return '凌晨'; - } else if (hm < 900) { - return '早上'; - } else if (hm < 1130) { - return '上午'; - } else if (hm < 1230) { - return '中午'; - } else if (hm < 1800) { - return '下午'; - } else { - return '晚上'; - } - }, - calendar : { - sameDay : '[今天]LT', - nextDay : '[明天]LT', - nextWeek : '[下]ddddLT', - lastDay : '[昨天]LT', - lastWeek : '[上]ddddLT', - sameElse : 'L' - }, - dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, - ordinal : function (number, period) { - switch (period) { - case 'd' : - case 'D' : - case 'DDD' : - return number + '日'; - case 'M' : - return number + '月'; - case 'w' : - case 'W' : - return number + '週'; - default : - return number; - } - }, - relativeTime : { - future : '%s內', - past : '%s前', - s : '幾秒', - ss : '%d 秒', - m : '1 分鐘', - mm : '%d 分鐘', - h : '1 小時', - hh : '%d 小時', - d : '1 天', - dd : '%d 天', - M : '1 個月', - MM : '%d 個月', - y : '1 年', - yy : '%d 年' - } - }); - - return zhHk; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/locale/zh-tw.js": -/*!*********************************************!*\ - !*** ./node_modules/moment/locale/zh-tw.js ***! - \*********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -//! moment.js locale configuration - -;(function (global, factory) { - true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) : - undefined -}(this, (function (moment) { 'use strict'; - - - var zhTw = moment.defineLocale('zh-tw', { - months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), - monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), - weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), - weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'), - weekdaysMin : '日_一_二_三_四_五_六'.split('_'), - longDateFormat : { - LT : 'HH:mm', - LTS : 'HH:mm:ss', - L : 'YYYY/MM/DD', - LL : 'YYYY年M月D日', - LLL : 'YYYY年M月D日 HH:mm', - LLLL : 'YYYY年M月D日dddd HH:mm', - l : 'YYYY/M/D', - ll : 'YYYY年M月D日', - lll : 'YYYY年M月D日 HH:mm', - llll : 'YYYY年M月D日dddd HH:mm' - }, - meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, - meridiemHour : function (hour, meridiem) { - if (hour === 12) { - hour = 0; - } - if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { - return hour; - } else if (meridiem === '中午') { - return hour >= 11 ? hour : hour + 12; - } else if (meridiem === '下午' || meridiem === '晚上') { - return hour + 12; - } - }, - meridiem : function (hour, minute, isLower) { - var hm = hour * 100 + minute; - if (hm < 600) { - return '凌晨'; - } else if (hm < 900) { - return '早上'; - } else if (hm < 1130) { - return '上午'; - } else if (hm < 1230) { - return '中午'; - } else if (hm < 1800) { - return '下午'; - } else { - return '晚上'; - } - }, - calendar : { - sameDay : '[今天] LT', - nextDay : '[明天] LT', - nextWeek : '[下]dddd LT', - lastDay : '[昨天] LT', - lastWeek : '[上]dddd LT', - sameElse : 'L' - }, - dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, - ordinal : function (number, period) { - switch (period) { - case 'd' : - case 'D' : - case 'DDD' : - return number + '日'; - case 'M' : - return number + '月'; - case 'w' : - case 'W' : - return number + '週'; - default : - return number; - } - }, - relativeTime : { - future : '%s內', - past : '%s前', - s : '幾秒', - ss : '%d 秒', - m : '1 分鐘', - mm : '%d 分鐘', - h : '1 小時', - hh : '%d 小時', - d : '1 天', - dd : '%d 天', - M : '1 個月', - MM : '%d 個月', - y : '1 年', - yy : '%d 年' - } - }); - - return zhTw; - -}))); - - -/***/ }), - -/***/ "./node_modules/moment/moment.js": -/*!***************************************!*\ - !*** ./node_modules/moment/moment.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js - -;(function (global, factory) { - true ? module.exports = factory() : - undefined -}(this, (function () { 'use strict'; - - var hookCallback; - - function hooks () { - return hookCallback.apply(null, arguments); - } - - // This is done to register the method called with moment() - // without creating circular dependencies. - function setHookCallback (callback) { - hookCallback = callback; - } - - function isArray(input) { - return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; - } - - function isObject(input) { - // IE8 will treat undefined and null as object if it wasn't for - // input != null - return input != null && Object.prototype.toString.call(input) === '[object Object]'; - } - - function isObjectEmpty(obj) { - if (Object.getOwnPropertyNames) { - return (Object.getOwnPropertyNames(obj).length === 0); - } else { - var k; - for (k in obj) { - if (obj.hasOwnProperty(k)) { - return false; - } - } - return true; - } - } - - function isUndefined(input) { - return input === void 0; - } - - function isNumber(input) { - return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; - } - - function isDate(input) { - return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; - } - - function map(arr, fn) { - var res = [], i; - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); - } - return res; - } - - function hasOwnProp(a, b) { - return Object.prototype.hasOwnProperty.call(a, b); - } - - function extend(a, b) { - for (var i in b) { - if (hasOwnProp(b, i)) { - a[i] = b[i]; - } - } - - if (hasOwnProp(b, 'toString')) { - a.toString = b.toString; - } - - if (hasOwnProp(b, 'valueOf')) { - a.valueOf = b.valueOf; - } - - return a; - } - - function createUTC (input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, true).utc(); - } - - function defaultParsingFlags() { - // We need to deep clone this object. - return { - empty : false, - unusedTokens : [], - unusedInput : [], - overflow : -2, - charsLeftOver : 0, - nullInput : false, - invalidMonth : null, - invalidFormat : false, - userInvalidated : false, - iso : false, - parsedDateParts : [], - meridiem : null, - rfc2822 : false, - weekdayMismatch : false - }; - } - - function getParsingFlags(m) { - if (m._pf == null) { - m._pf = defaultParsingFlags(); - } - return m._pf; - } - - var some; - if (Array.prototype.some) { - some = Array.prototype.some; - } else { - some = function (fun) { - var t = Object(this); - var len = t.length >>> 0; - - for (var i = 0; i < len; i++) { - if (i in t && fun.call(this, t[i], i, t)) { - return true; - } - } - - return false; - }; - } - - function isValid(m) { - if (m._isValid == null) { - var flags = getParsingFlags(m); - var parsedParts = some.call(flags.parsedDateParts, function (i) { - return i != null; - }); - var isNowValid = !isNaN(m._d.getTime()) && - flags.overflow < 0 && - !flags.empty && - !flags.invalidMonth && - !flags.invalidWeekday && - !flags.weekdayMismatch && - !flags.nullInput && - !flags.invalidFormat && - !flags.userInvalidated && - (!flags.meridiem || (flags.meridiem && parsedParts)); - - if (m._strict) { - isNowValid = isNowValid && - flags.charsLeftOver === 0 && - flags.unusedTokens.length === 0 && - flags.bigHour === undefined; - } - - if (Object.isFrozen == null || !Object.isFrozen(m)) { - m._isValid = isNowValid; - } - else { - return isNowValid; - } - } - return m._isValid; - } - - function createInvalid (flags) { - var m = createUTC(NaN); - if (flags != null) { - extend(getParsingFlags(m), flags); - } - else { - getParsingFlags(m).userInvalidated = true; - } - - return m; - } - - // Plugins that add properties should also add the key here (null value), - // so we can properly clone ourselves. - var momentProperties = hooks.momentProperties = []; - - function copyConfig(to, from) { - var i, prop, val; - - if (!isUndefined(from._isAMomentObject)) { - to._isAMomentObject = from._isAMomentObject; - } - if (!isUndefined(from._i)) { - to._i = from._i; - } - if (!isUndefined(from._f)) { - to._f = from._f; - } - if (!isUndefined(from._l)) { - to._l = from._l; - } - if (!isUndefined(from._strict)) { - to._strict = from._strict; - } - if (!isUndefined(from._tzm)) { - to._tzm = from._tzm; - } - if (!isUndefined(from._isUTC)) { - to._isUTC = from._isUTC; - } - if (!isUndefined(from._offset)) { - to._offset = from._offset; - } - if (!isUndefined(from._pf)) { - to._pf = getParsingFlags(from); - } - if (!isUndefined(from._locale)) { - to._locale = from._locale; - } - - if (momentProperties.length > 0) { - for (i = 0; i < momentProperties.length; i++) { - prop = momentProperties[i]; - val = from[prop]; - if (!isUndefined(val)) { - to[prop] = val; - } - } - } - - return to; - } - - var updateInProgress = false; - - // Moment prototype object - function Moment(config) { - copyConfig(this, config); - this._d = new Date(config._d != null ? config._d.getTime() : NaN); - if (!this.isValid()) { - this._d = new Date(NaN); - } - // Prevent infinite loop in case updateOffset creates new moment - // objects. - if (updateInProgress === false) { - updateInProgress = true; - hooks.updateOffset(this); - updateInProgress = false; - } - } - - function isMoment (obj) { - return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); - } - - function absFloor (number) { - if (number < 0) { - // -0 -> 0 - return Math.ceil(number) || 0; - } else { - return Math.floor(number); - } - } - - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; - - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } - - return value; - } - - // compare two arrays, return the number of differences - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ((dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { - diffs++; - } - } - return diffs + lengthDiff; - } - - function warn(msg) { - if (hooks.suppressDeprecationWarnings === false && - (typeof console !== 'undefined') && console.warn) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - - return extend(function () { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(null, msg); - } - if (firstTime) { - var args = []; - var arg; - for (var i = 0; i < arguments.length; i++) { - arg = ''; - if (typeof arguments[i] === 'object') { - arg += '\n[' + i + '] '; - for (var key in arguments[0]) { - arg += key + ': ' + arguments[0][key] + ', '; - } - arg = arg.slice(0, -2); // Remove trailing comma and space - } else { - arg = arguments[i]; - } - args.push(arg); - } - warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - - var deprecations = {}; - - function deprecateSimple(name, msg) { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(name, msg); - } - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } - } - - hooks.suppressDeprecationWarnings = false; - hooks.deprecationHandler = null; - - function isFunction(input) { - return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; - } - - function set (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (isFunction(prop)) { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - this._config = config; - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. - // TODO: Remove "ordinalParse" fallback in next major release. - this._dayOfMonthOrdinalParseLenient = new RegExp( - (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + - '|' + (/\d{1,2}/).source); - } - - function mergeConfigs(parentConfig, childConfig) { - var res = extend({}, parentConfig), prop; - for (prop in childConfig) { - if (hasOwnProp(childConfig, prop)) { - if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { - res[prop] = {}; - extend(res[prop], parentConfig[prop]); - extend(res[prop], childConfig[prop]); - } else if (childConfig[prop] != null) { - res[prop] = childConfig[prop]; - } else { - delete res[prop]; - } - } - } - for (prop in parentConfig) { - if (hasOwnProp(parentConfig, prop) && - !hasOwnProp(childConfig, prop) && - isObject(parentConfig[prop])) { - // make sure changes to properties don't modify parent config - res[prop] = extend({}, res[prop]); - } - } - return res; - } - - function Locale(config) { - if (config != null) { - this.set(config); - } - } - - var keys; - - if (Object.keys) { - keys = Object.keys; - } else { - keys = function (obj) { - var i, res = []; - for (i in obj) { - if (hasOwnProp(obj, i)) { - res.push(i); - } - } - return res; - }; - } - - var defaultCalendar = { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }; - - function calendar (key, mom, now) { - var output = this._calendar[key] || this._calendar['sameElse']; - return isFunction(output) ? output.call(mom, now) : output; - } - - var defaultLongDateFormat = { - LTS : 'h:mm:ss A', - LT : 'h:mm A', - L : 'MM/DD/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY h:mm A', - LLLL : 'dddd, MMMM D, YYYY h:mm A' - }; - - function longDateFormat (key) { - var format = this._longDateFormat[key], - formatUpper = this._longDateFormat[key.toUpperCase()]; - - if (format || !formatUpper) { - return format; - } - - this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - - return this._longDateFormat[key]; - } - - var defaultInvalidDate = 'Invalid date'; - - function invalidDate () { - return this._invalidDate; - } - - var defaultOrdinal = '%d'; - var defaultDayOfMonthOrdinalParse = /\d{1,2}/; - - function ordinal (number) { - return this._ordinal.replace('%d', number); - } - - var defaultRelativeTime = { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - ss : '%d seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }; - - function relativeTime (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (isFunction(output)) ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); - } - - function pastFuture (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return isFunction(format) ? format(output) : format.replace(/%s/i, output); - } - - var aliases = {}; - - function addUnitAlias (unit, shorthand) { - var lowerCase = unit.toLowerCase(); - aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; - } - - function normalizeUnits(units) { - return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; - } - - function normalizeObjectUnits(inputObject) { - var normalizedInput = {}, - normalizedProp, - prop; - - for (prop in inputObject) { - if (hasOwnProp(inputObject, prop)) { - normalizedProp = normalizeUnits(prop); - if (normalizedProp) { - normalizedInput[normalizedProp] = inputObject[prop]; - } - } - } - - return normalizedInput; - } - - var priorities = {}; - - function addUnitPriority(unit, priority) { - priorities[unit] = priority; - } - - function getPrioritizedUnits(unitsObj) { - var units = []; - for (var u in unitsObj) { - units.push({unit: u, priority: priorities[u]}); - } - units.sort(function (a, b) { - return a.priority - b.priority; - }); - return units; - } - - function zeroFill(number, targetLength, forceSign) { - var absNumber = '' + Math.abs(number), - zerosToFill = targetLength - absNumber.length, - sign = number >= 0; - return (sign ? (forceSign ? '+' : '') : '-') + - Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; - } - - var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; - - var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; - - var formatFunctions = {}; - - var formatTokenFunctions = {}; - - // token: 'M' - // padded: ['MM', 2] - // ordinal: 'Mo' - // callback: function () { this.month() + 1 } - function addFormatToken (token, padded, ordinal, callback) { - var func = callback; - if (typeof callback === 'string') { - func = function () { - return this[callback](); - }; - } - if (token) { - formatTokenFunctions[token] = func; - } - if (padded) { - formatTokenFunctions[padded[0]] = function () { - return zeroFill(func.apply(this, arguments), padded[1], padded[2]); - }; - } - if (ordinal) { - formatTokenFunctions[ordinal] = function () { - return this.localeData().ordinal(func.apply(this, arguments), token); - }; - } - } - - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); - } - return input.replace(/\\/g, ''); - } - - function makeFormatFunction(format) { - var array = format.match(formattingTokens), i, length; - - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } - - return function (mom) { - var output = '', i; - for (i = 0; i < length; i++) { - output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; - } - return output; - }; - } - - // format date using native date object - function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } - - format = expandFormat(format, m.localeData()); - formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); - - return formatFunctions[format](m); - } - - function expandFormat(format, locale) { - var i = 5; - - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } - - localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i -= 1; - } - - return format; - } - - var match1 = /\d/; // 0 - 9 - var match2 = /\d\d/; // 00 - 99 - var match3 = /\d{3}/; // 000 - 999 - var match4 = /\d{4}/; // 0000 - 9999 - var match6 = /[+-]?\d{6}/; // -999999 - 999999 - var match1to2 = /\d\d?/; // 0 - 99 - var match3to4 = /\d\d\d\d?/; // 999 - 9999 - var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 - var match1to3 = /\d{1,3}/; // 0 - 999 - var match1to4 = /\d{1,4}/; // 0 - 9999 - var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 - - var matchUnsigned = /\d+/; // 0 - inf - var matchSigned = /[+-]?\d+/; // -inf - inf - - var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z - var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z - - var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 - - // any word (or two) characters or numbers including two/three word month in arabic. - // includes scottish gaelic two word and hyphenated months - var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; - - var regexes = {}; - - function addRegexToken (token, regex, strictRegex) { - regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { - return (isStrict && strictRegex) ? strictRegex : regex; - }; - } - - function getParseRegexForToken (token, config) { - if (!hasOwnProp(regexes, token)) { - return new RegExp(unescapeFormat(token)); - } - - return regexes[token](config._strict, config._locale); - } - - // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - function unescapeFormat(s) { - return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - })); - } - - function regexEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); - } - - var tokens = {}; - - function addParseToken (token, callback) { - var i, func = callback; - if (typeof token === 'string') { - token = [token]; - } - if (isNumber(callback)) { - func = function (input, array) { - array[callback] = toInt(input); - }; - } - for (i = 0; i < token.length; i++) { - tokens[token[i]] = func; - } - } - - function addWeekParseToken (token, callback) { - addParseToken(token, function (input, array, config, token) { - config._w = config._w || {}; - callback(input, config._w, config, token); - }); - } - - function addTimeToArrayFromToken(token, input, config) { - if (input != null && hasOwnProp(tokens, token)) { - tokens[token](input, config._a, config, token); - } - } - - var YEAR = 0; - var MONTH = 1; - var DATE = 2; - var HOUR = 3; - var MINUTE = 4; - var SECOND = 5; - var MILLISECOND = 6; - var WEEK = 7; - var WEEKDAY = 8; - - // FORMATTING - - addFormatToken('Y', 0, 0, function () { - var y = this.year(); - return y <= 9999 ? '' + y : '+' + y; - }); - - addFormatToken(0, ['YY', 2], 0, function () { - return this.year() % 100; - }); - - addFormatToken(0, ['YYYY', 4], 0, 'year'); - addFormatToken(0, ['YYYYY', 5], 0, 'year'); - addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); - - // ALIASES - - addUnitAlias('year', 'y'); - - // PRIORITIES - - addUnitPriority('year', 1); - - // PARSING - - addRegexToken('Y', matchSigned); - addRegexToken('YY', match1to2, match2); - addRegexToken('YYYY', match1to4, match4); - addRegexToken('YYYYY', match1to6, match6); - addRegexToken('YYYYYY', match1to6, match6); - - addParseToken(['YYYYY', 'YYYYYY'], YEAR); - addParseToken('YYYY', function (input, array) { - array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); - }); - addParseToken('YY', function (input, array) { - array[YEAR] = hooks.parseTwoDigitYear(input); - }); - addParseToken('Y', function (input, array) { - array[YEAR] = parseInt(input, 10); - }); - - // HELPERS - - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; - } - - function isLeapYear(year) { - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; - } - - // HOOKS - - hooks.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); - }; - - // MOMENTS - - var getSetYear = makeGetSet('FullYear', true); - - function getIsLeapYear () { - return isLeapYear(this.year()); - } - - function makeGetSet (unit, keepTime) { - return function (value) { - if (value != null) { - set$1(this, unit, value); - hooks.updateOffset(this, keepTime); - return this; - } else { - return get(this, unit); - } - }; - } - - function get (mom, unit) { - return mom.isValid() ? - mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; - } - - function set$1 (mom, unit, value) { - if (mom.isValid() && !isNaN(value)) { - if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { - mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); - } - else { - mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); - } - } - } - - // MOMENTS - - function stringGet (units) { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](); - } - return this; - } - - - function stringSet (units, value) { - if (typeof units === 'object') { - units = normalizeObjectUnits(units); - var prioritized = getPrioritizedUnits(units); - for (var i = 0; i < prioritized.length; i++) { - this[prioritized[i].unit](units[prioritized[i].unit]); - } - } else { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](value); - } - } - return this; - } - - function mod(n, x) { - return ((n % x) + x) % x; - } - - var indexOf; - - if (Array.prototype.indexOf) { - indexOf = Array.prototype.indexOf; - } else { - indexOf = function (o) { - // I know - var i; - for (i = 0; i < this.length; ++i) { - if (this[i] === o) { - return i; - } - } - return -1; - }; - } - - function daysInMonth(year, month) { - if (isNaN(year) || isNaN(month)) { - return NaN; - } - var modMonth = mod(month, 12); - year += (month - modMonth) / 12; - return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); - } - - // FORMATTING - - addFormatToken('M', ['MM', 2], 'Mo', function () { - return this.month() + 1; - }); - - addFormatToken('MMM', 0, 0, function (format) { - return this.localeData().monthsShort(this, format); - }); - - addFormatToken('MMMM', 0, 0, function (format) { - return this.localeData().months(this, format); - }); - - // ALIASES - - addUnitAlias('month', 'M'); - - // PRIORITY - - addUnitPriority('month', 8); - - // PARSING - - addRegexToken('M', match1to2); - addRegexToken('MM', match1to2, match2); - addRegexToken('MMM', function (isStrict, locale) { - return locale.monthsShortRegex(isStrict); - }); - addRegexToken('MMMM', function (isStrict, locale) { - return locale.monthsRegex(isStrict); - }); - - addParseToken(['M', 'MM'], function (input, array) { - array[MONTH] = toInt(input) - 1; - }); - - addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { - var month = config._locale.monthsParse(input, token, config._strict); - // if we didn't find a month name, mark the date as invalid. - if (month != null) { - array[MONTH] = month; - } else { - getParsingFlags(config).invalidMonth = input; - } - }); - - // LOCALES - - var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; - var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); - function localeMonths (m, format) { - if (!m) { - return isArray(this._months) ? this._months : - this._months['standalone']; - } - return isArray(this._months) ? this._months[m.month()] : - this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; - } - - var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); - function localeMonthsShort (m, format) { - if (!m) { - return isArray(this._monthsShort) ? this._monthsShort : - this._monthsShort['standalone']; - } - return isArray(this._monthsShort) ? this._monthsShort[m.month()] : - this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; - } - - function handleStrictParse(monthName, format, strict) { - var i, ii, mom, llc = monthName.toLocaleLowerCase(); - if (!this._monthsParse) { - // this is not used - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - for (i = 0; i < 12; ++i) { - mom = createUTC([2000, i]); - this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); - this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeMonthsParse (monthName, format, strict) { - var i, mom, regex; - - if (this._monthsParseExact) { - return handleStrictParse.call(this, monthName, format, strict); - } - - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - } - - // TODO: add sorting - // Sorting makes sure if one month (or abbr) is a prefix of another - // see sorting in computeMonthsParse - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); - this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); - } - if (!strict && !this._monthsParse[i]) { - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { - return i; - } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } - } - - // MOMENTS - - function setMonth (mom, value) { - var dayOfMonth; - - if (!mom.isValid()) { - // No op - return mom; - } - - if (typeof value === 'string') { - if (/^\d+$/.test(value)) { - value = toInt(value); - } else { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (!isNumber(value)) { - return mom; - } - } - } - - dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); - mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); - return mom; - } - - function getSetMonth (value) { - if (value != null) { - setMonth(this, value); - hooks.updateOffset(this, true); - return this; - } else { - return get(this, 'Month'); - } - } - - function getDaysInMonth () { - return daysInMonth(this.year(), this.month()); - } - - var defaultMonthsShortRegex = matchWord; - function monthsShortRegex (isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsShortStrictRegex; - } else { - return this._monthsShortRegex; - } - } else { - if (!hasOwnProp(this, '_monthsShortRegex')) { - this._monthsShortRegex = defaultMonthsShortRegex; - } - return this._monthsShortStrictRegex && isStrict ? - this._monthsShortStrictRegex : this._monthsShortRegex; - } - } - - var defaultMonthsRegex = matchWord; - function monthsRegex (isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsStrictRegex; - } else { - return this._monthsRegex; - } - } else { - if (!hasOwnProp(this, '_monthsRegex')) { - this._monthsRegex = defaultMonthsRegex; - } - return this._monthsStrictRegex && isStrict ? - this._monthsStrictRegex : this._monthsRegex; - } - } - - function computeMonthsParse () { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var shortPieces = [], longPieces = [], mixedPieces = [], - i, mom; - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - shortPieces.push(this.monthsShort(mom, '')); - longPieces.push(this.months(mom, '')); - mixedPieces.push(this.months(mom, '')); - mixedPieces.push(this.monthsShort(mom, '')); - } - // Sorting makes sure if one month (or abbr) is a prefix of another it - // will match the longer piece. - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i = 0; i < 12; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - } - for (i = 0; i < 24; i++) { - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._monthsShortRegex = this._monthsRegex; - this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - } - - function createDate (y, m, d, h, M, s, ms) { - // can't just apply() to create a date: - // https://stackoverflow.com/q/181348 - var date; - // the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - date = new Date(y + 400, m, d, h, M, s, ms); - if (isFinite(date.getFullYear())) { - date.setFullYear(y); - } - } else { - date = new Date(y, m, d, h, M, s, ms); - } - - return date; - } - - function createUTCDate (y) { - var date; - // the Date.UTC function remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - var args = Array.prototype.slice.call(arguments); - // preserve leap years using a full 400 year cycle, then reset - args[0] = y + 400; - date = new Date(Date.UTC.apply(null, args)); - if (isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y); - } - } else { - date = new Date(Date.UTC.apply(null, arguments)); - } - - return date; - } - - // start-of-first-week - start-of-year - function firstWeekOffset(year, dow, doy) { - var // first-week day -- which january is always in the first week (4 for iso, 1 for other) - fwd = 7 + dow - doy, - // first-week day local weekday -- which local weekday is fwd - fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - - return -fwdlw + fwd - 1; - } - - // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - function dayOfYearFromWeeks(year, week, weekday, dow, doy) { - var localWeekday = (7 + weekday - dow) % 7, - weekOffset = firstWeekOffset(year, dow, doy), - dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, - resYear, resDayOfYear; - - if (dayOfYear <= 0) { - resYear = year - 1; - resDayOfYear = daysInYear(resYear) + dayOfYear; - } else if (dayOfYear > daysInYear(year)) { - resYear = year + 1; - resDayOfYear = dayOfYear - daysInYear(year); - } else { - resYear = year; - resDayOfYear = dayOfYear; - } - - return { - year: resYear, - dayOfYear: resDayOfYear - }; - } - - function weekOfYear(mom, dow, doy) { - var weekOffset = firstWeekOffset(mom.year(), dow, doy), - week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, - resWeek, resYear; - - if (week < 1) { - resYear = mom.year() - 1; - resWeek = week + weeksInYear(resYear, dow, doy); - } else if (week > weeksInYear(mom.year(), dow, doy)) { - resWeek = week - weeksInYear(mom.year(), dow, doy); - resYear = mom.year() + 1; - } else { - resYear = mom.year(); - resWeek = week; - } - - return { - week: resWeek, - year: resYear - }; - } - - function weeksInYear(year, dow, doy) { - var weekOffset = firstWeekOffset(year, dow, doy), - weekOffsetNext = firstWeekOffset(year + 1, dow, doy); - return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; - } - - // FORMATTING - - addFormatToken('w', ['ww', 2], 'wo', 'week'); - addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - - // ALIASES - - addUnitAlias('week', 'w'); - addUnitAlias('isoWeek', 'W'); - - // PRIORITIES - - addUnitPriority('week', 5); - addUnitPriority('isoWeek', 5); - - // PARSING - - addRegexToken('w', match1to2); - addRegexToken('ww', match1to2, match2); - addRegexToken('W', match1to2); - addRegexToken('WW', match1to2, match2); - - addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); - }); - - // HELPERS - - // LOCALES - - function localeWeek (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - } - - var defaultLocaleWeek = { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 6th is the first week of the year. - }; - - function localeFirstDayOfWeek () { - return this._week.dow; - } - - function localeFirstDayOfYear () { - return this._week.doy; - } - - // MOMENTS - - function getSetWeek (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - function getSetISOWeek (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - // FORMATTING - - addFormatToken('d', 0, 'do', 'day'); - - addFormatToken('dd', 0, 0, function (format) { - return this.localeData().weekdaysMin(this, format); - }); - - addFormatToken('ddd', 0, 0, function (format) { - return this.localeData().weekdaysShort(this, format); - }); - - addFormatToken('dddd', 0, 0, function (format) { - return this.localeData().weekdays(this, format); - }); - - addFormatToken('e', 0, 0, 'weekday'); - addFormatToken('E', 0, 0, 'isoWeekday'); - - // ALIASES - - addUnitAlias('day', 'd'); - addUnitAlias('weekday', 'e'); - addUnitAlias('isoWeekday', 'E'); - - // PRIORITY - addUnitPriority('day', 11); - addUnitPriority('weekday', 11); - addUnitPriority('isoWeekday', 11); - - // PARSING - - addRegexToken('d', match1to2); - addRegexToken('e', match1to2); - addRegexToken('E', match1to2); - addRegexToken('dd', function (isStrict, locale) { - return locale.weekdaysMinRegex(isStrict); - }); - addRegexToken('ddd', function (isStrict, locale) { - return locale.weekdaysShortRegex(isStrict); - }); - addRegexToken('dddd', function (isStrict, locale) { - return locale.weekdaysRegex(isStrict); - }); - - addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { - var weekday = config._locale.weekdaysParse(input, token, config._strict); - // if we didn't get a weekday name, mark the date as invalid - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config).invalidWeekday = input; - } - }); - - addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { - week[token] = toInt(input); - }); - - // HELPERS - - function parseWeekday(input, locale) { - if (typeof input !== 'string') { - return input; - } - - if (!isNaN(input)) { - return parseInt(input, 10); - } - - input = locale.weekdaysParse(input); - if (typeof input === 'number') { - return input; - } - - return null; - } - - function parseIsoWeekday(input, locale) { - if (typeof input === 'string') { - return locale.weekdaysParse(input) % 7 || 7; - } - return isNaN(input) ? null : input; - } - - // LOCALES - function shiftWeekdays (ws, n) { - return ws.slice(n, 7).concat(ws.slice(0, n)); - } - - var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); - function localeWeekdays (m, format) { - var weekdays = isArray(this._weekdays) ? this._weekdays : - this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone']; - return (m === true) ? shiftWeekdays(weekdays, this._week.dow) - : (m) ? weekdays[m.day()] : weekdays; - } - - var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); - function localeWeekdaysShort (m) { - return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow) - : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; - } - - var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); - function localeWeekdaysMin (m) { - return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow) - : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; - } - - function handleStrictParse$1(weekdayName, format, strict) { - var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - - for (i = 0; i < 7; ++i) { - mom = createUTC([2000, 1]).day(i); - this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); - this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); - this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeWeekdaysParse (weekdayName, format, strict) { - var i, mom, regex; - - if (this._weekdaysParseExact) { - return handleStrictParse$1.call(this, weekdayName, format, strict); - } - - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } - - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - - mom = createUTC([2000, 1]).day(i); - if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); - } - if (!this._weekdaysParse[i]) { - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - } - - // MOMENTS - - function getSetDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; - } - } - - function getSetLocaleDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); - } - - function getSetISODayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - - if (input != null) { - var weekday = parseIsoWeekday(input, this.localeData()); - return this.day(this.day() % 7 ? weekday : weekday - 7); - } else { - return this.day() || 7; - } - } - - var defaultWeekdaysRegex = matchWord; - function weekdaysRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysRegex')) { - this._weekdaysRegex = defaultWeekdaysRegex; - } - return this._weekdaysStrictRegex && isStrict ? - this._weekdaysStrictRegex : this._weekdaysRegex; - } - } - - var defaultWeekdaysShortRegex = matchWord; - function weekdaysShortRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysShortRegex')) { - this._weekdaysShortRegex = defaultWeekdaysShortRegex; - } - return this._weekdaysShortStrictRegex && isStrict ? - this._weekdaysShortStrictRegex : this._weekdaysShortRegex; - } - } - - var defaultWeekdaysMinRegex = matchWord; - function weekdaysMinRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysMinRegex')) { - this._weekdaysMinRegex = defaultWeekdaysMinRegex; - } - return this._weekdaysMinStrictRegex && isStrict ? - this._weekdaysMinStrictRegex : this._weekdaysMinRegex; - } - } - - - function computeWeekdaysParse () { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], - i, mom, minp, shortp, longp; - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, 1]).day(i); - minp = this.weekdaysMin(mom, ''); - shortp = this.weekdaysShort(mom, ''); - longp = this.weekdays(mom, ''); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); - } - // Sorting makes sure if one weekday (or abbr) is a prefix of another it - // will match the longer piece. - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i = 0; i < 7; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - - this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); - } - - // FORMATTING - - function hFormat() { - return this.hours() % 12 || 12; - } - - function kFormat() { - return this.hours() || 24; - } - - addFormatToken('H', ['HH', 2], 0, 'hour'); - addFormatToken('h', ['hh', 2], 0, hFormat); - addFormatToken('k', ['kk', 2], 0, kFormat); - - addFormatToken('hmm', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); - }); - - addFormatToken('hmmss', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); - }); - - addFormatToken('Hmm', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2); - }); - - addFormatToken('Hmmss', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); - }); - - function meridiem (token, lowercase) { - addFormatToken(token, 0, 0, function () { - return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); - }); - } - - meridiem('a', true); - meridiem('A', false); - - // ALIASES - - addUnitAlias('hour', 'h'); - - // PRIORITY - addUnitPriority('hour', 13); - - // PARSING - - function matchMeridiem (isStrict, locale) { - return locale._meridiemParse; - } - - addRegexToken('a', matchMeridiem); - addRegexToken('A', matchMeridiem); - addRegexToken('H', match1to2); - addRegexToken('h', match1to2); - addRegexToken('k', match1to2); - addRegexToken('HH', match1to2, match2); - addRegexToken('hh', match1to2, match2); - addRegexToken('kk', match1to2, match2); - - addRegexToken('hmm', match3to4); - addRegexToken('hmmss', match5to6); - addRegexToken('Hmm', match3to4); - addRegexToken('Hmmss', match5to6); - - addParseToken(['H', 'HH'], HOUR); - addParseToken(['k', 'kk'], function (input, array, config) { - var kInput = toInt(input); - array[HOUR] = kInput === 24 ? 0 : kInput; - }); - addParseToken(['a', 'A'], function (input, array, config) { - config._isPm = config._locale.isPM(input); - config._meridiem = input; - }); - addParseToken(['h', 'hh'], function (input, array, config) { - array[HOUR] = toInt(input); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('Hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - }); - addParseToken('Hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - }); - - // LOCALES - - function localeIsPM (input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return ((input + '').toLowerCase().charAt(0) === 'p'); - } - - var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; - function localeMeridiem (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } - } - - - // MOMENTS - - // Setting the hour should keep the time, because the user explicitly - // specified which hour they want. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - var getSetHour = makeGetSet('Hours', true); - - var baseConfig = { - calendar: defaultCalendar, - longDateFormat: defaultLongDateFormat, - invalidDate: defaultInvalidDate, - ordinal: defaultOrdinal, - dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, - relativeTime: defaultRelativeTime, - - months: defaultLocaleMonths, - monthsShort: defaultLocaleMonthsShort, - - week: defaultLocaleWeek, - - weekdays: defaultLocaleWeekdays, - weekdaysMin: defaultLocaleWeekdaysMin, - weekdaysShort: defaultLocaleWeekdaysShort, - - meridiemParse: defaultLocaleMeridiemParse - }; - - // internal storage for locale config files - var locales = {}; - var localeFamilies = {}; - var globalLocale; - - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; - } - - // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - function chooseLocale(names) { - var i = 0, j, next, locale, split; - - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return globalLocale; - } - - function loadLocale(name) { - var oldLocale = null; - // TODO: Find a better way to register and load all the locales in Node - if (!locales[name] && (typeof module !== 'undefined') && - module && module.exports) { - try { - oldLocale = globalLocale._abbr; - var aliasedRequire = require; - __webpack_require__("./node_modules/moment/locale sync recursive ^\\.\\/.*$")("./" + name); - getSetGlobalLocale(oldLocale); - } catch (e) {} - } - return locales[name]; - } - - // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - function getSetGlobalLocale (key, values) { - var data; - if (key) { - if (isUndefined(values)) { - data = getLocale(key); - } - else { - data = defineLocale(key, values); - } - - if (data) { - // moment.duration._locale = moment._locale = data; - globalLocale = data; - } - else { - if ((typeof console !== 'undefined') && console.warn) { - //warn user if arguments are passed but the locale could not be set - console.warn('Locale ' + key + ' not found. Did you forget to load it?'); - } - } - } - - return globalLocale._abbr; - } - - function defineLocale (name, config) { - if (config !== null) { - var locale, parentConfig = baseConfig; - config.abbr = name; - if (locales[name] != null) { - deprecateSimple('defineLocaleOverride', - 'use moment.updateLocale(localeName, config) to change ' + - 'an existing locale. moment.defineLocale(localeName, ' + - 'config) should only be used for creating a new locale ' + - 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); - parentConfig = locales[name]._config; - } else if (config.parentLocale != null) { - if (locales[config.parentLocale] != null) { - parentConfig = locales[config.parentLocale]._config; - } else { - locale = loadLocale(config.parentLocale); - if (locale != null) { - parentConfig = locale._config; - } else { - if (!localeFamilies[config.parentLocale]) { - localeFamilies[config.parentLocale] = []; - } - localeFamilies[config.parentLocale].push({ - name: name, - config: config - }); - return null; - } - } - } - locales[name] = new Locale(mergeConfigs(parentConfig, config)); - - if (localeFamilies[name]) { - localeFamilies[name].forEach(function (x) { - defineLocale(x.name, x.config); - }); - } - - // backwards compat for now: also set the locale - // make sure we set the locale AFTER all child locales have been - // created, so we won't end up with the child locale set. - getSetGlobalLocale(name); - - - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } - } - - function updateLocale(name, config) { - if (config != null) { - var locale, tmpLocale, parentConfig = baseConfig; - // MERGE - tmpLocale = loadLocale(name); - if (tmpLocale != null) { - parentConfig = tmpLocale._config; - } - config = mergeConfigs(parentConfig, config); - locale = new Locale(config); - locale.parentLocale = locales[name]; - locales[name] = locale; - - // backwards compat for now: also set the locale - getSetGlobalLocale(name); - } else { - // pass null for config to unupdate, useful for tests - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - } else if (locales[name] != null) { - delete locales[name]; - } - } - } - return locales[name]; - } - - // returns locale data - function getLocale (key) { - var locale; - - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } - - if (!key) { - return globalLocale; - } - - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } - - return chooseLocale(key); - } - - function listLocales() { - return keys(locales); - } - - function checkOverflow (m) { - var overflow; - var a = m._a; - - if (a && getParsingFlags(m).overflow === -2) { - overflow = - a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : - a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : - a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : - a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : - a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : - a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : - -1; - - if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } - if (getParsingFlags(m)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } - if (getParsingFlags(m)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } - - getParsingFlags(m).overflow = overflow; - } - - return m; - } - - // Pick the first defined of two or three arguments. - function defaults(a, b, c) { - if (a != null) { - return a; - } - if (b != null) { - return b; - } - return c; - } - - function currentDateArray(config) { - // hooks is actually the exported moment object - var nowValue = new Date(hooks.now()); - if (config._useUTC) { - return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; - } - return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; - } - - // convert an array to a date. - // the array should mirror the parameters below - // note: all values past the year are optional and will default to the lowest possible value. - // [year, month, day , hour, minute, second, millisecond] - function configFromArray (config) { - var i, date, input = [], currentDate, expectedWeekday, yearToUse; - - if (config._d) { - return; - } - - currentDate = currentDateArray(config); - - //compute day of the year from weeks and weekdays - if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { - dayOfYearFromWeekInfo(config); - } - - //if the day of the year is set, figure out what it is - if (config._dayOfYear != null) { - yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); - - if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { - getParsingFlags(config)._overflowDayOfYear = true; - } - - date = createUTCDate(yearToUse, 0, config._dayOfYear); - config._a[MONTH] = date.getUTCMonth(); - config._a[DATE] = date.getUTCDate(); - } - - // Default to current date. - // * if no year, month, day of month are given, default to today - // * if day of month is given, default month and year - // * if month is given, default only year - // * if year is given, don't default anything - for (i = 0; i < 3 && config._a[i] == null; ++i) { - config._a[i] = input[i] = currentDate[i]; - } - - // Zero out whatever was not defaulted, including time - for (; i < 7; i++) { - config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; - } - - // Check for 24:00:00.000 - if (config._a[HOUR] === 24 && - config._a[MINUTE] === 0 && - config._a[SECOND] === 0 && - config._a[MILLISECOND] === 0) { - config._nextDay = true; - config._a[HOUR] = 0; - } - - config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); - expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); - - // Apply timezone offset from input. The actual utcOffset can be changed - // with parseZone. - if (config._tzm != null) { - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - } - - if (config._nextDay) { - config._a[HOUR] = 24; - } - - // check for mismatching day of week - if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { - getParsingFlags(config).weekdayMismatch = true; - } - } - - function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; - - w = config._w; - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; - - // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); - week = defaults(w.W, 1); - weekday = defaults(w.E, 1); - if (weekday < 1 || weekday > 7) { - weekdayOverflow = true; - } - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; - - var curWeek = weekOfYear(createLocal(), dow, doy); - - weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); - - // Default to current week. - week = defaults(w.w, curWeek.week); - - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - if (weekday < 0 || weekday > 6) { - weekdayOverflow = true; - } - } else if (w.e != null) { - // local weekday -- counting starts from beginning of week - weekday = w.e + dow; - if (w.e < 0 || w.e > 6) { - weekdayOverflow = true; - } - } else { - // default to beginning of week - weekday = dow; - } - } - if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { - getParsingFlags(config)._overflowWeeks = true; - } else if (weekdayOverflow != null) { - getParsingFlags(config)._overflowWeekday = true; - } else { - temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; - } - } - - // iso 8601 regex - // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) - var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - - var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; - - var isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], - ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], - ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], - ['GGGG-[W]WW', /\d{4}-W\d\d/, false], - ['YYYY-DDD', /\d{4}-\d{3}/], - ['YYYY-MM', /\d{4}-\d\d/, false], - ['YYYYYYMMDD', /[+-]\d{10}/], - ['YYYYMMDD', /\d{8}/], - // YYYYMM is NOT allowed by the standard - ['GGGG[W]WWE', /\d{4}W\d{3}/], - ['GGGG[W]WW', /\d{4}W\d{2}/, false], - ['YYYYDDD', /\d{7}/] - ]; - - // iso time formats and regexes - var isoTimes = [ - ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], - ['HH:mm:ss', /\d\d:\d\d:\d\d/], - ['HH:mm', /\d\d:\d\d/], - ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], - ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], - ['HHmmss', /\d\d\d\d\d\d/], - ['HHmm', /\d\d\d\d/], - ['HH', /\d\d/] - ]; - - var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; - - // date from iso format - function configFromISO(config) { - var i, l, - string = config._i, - match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), - allowTime, dateFormat, timeFormat, tzFormat; - - if (match) { - getParsingFlags(config).iso = true; - - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(match[1])) { - dateFormat = isoDates[i][0]; - allowTime = isoDates[i][2] !== false; - break; - } - } - if (dateFormat == null) { - config._isValid = false; - return; - } - if (match[3]) { - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(match[3])) { - // match[2] should be 'T' or space - timeFormat = (match[2] || ' ') + isoTimes[i][0]; - break; - } - } - if (timeFormat == null) { - config._isValid = false; - return; - } - } - if (!allowTime && timeFormat != null) { - config._isValid = false; - return; - } - if (match[4]) { - if (tzRegex.exec(match[4])) { - tzFormat = 'Z'; - } else { - config._isValid = false; - return; - } - } - config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); - configFromStringAndFormat(config); - } else { - config._isValid = false; - } - } - - // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 - var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; - - function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = [ - untruncateYear(yearStr), - defaultLocaleMonthsShort.indexOf(monthStr), - parseInt(dayStr, 10), - parseInt(hourStr, 10), - parseInt(minuteStr, 10) - ]; - - if (secondStr) { - result.push(parseInt(secondStr, 10)); - } - - return result; - } - - function untruncateYear(yearStr) { - var year = parseInt(yearStr, 10); - if (year <= 49) { - return 2000 + year; - } else if (year <= 999) { - return 1900 + year; - } - return year; - } - - function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); - } - - function checkWeekday(weekdayStr, parsedInput, config) { - if (weekdayStr) { - // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. - var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), - weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); - if (weekdayProvided !== weekdayActual) { - getParsingFlags(config).weekdayMismatch = true; - config._isValid = false; - return false; - } - } - return true; - } - - var obsOffsets = { - UT: 0, - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 - }; - - function calculateOffset(obsOffset, militaryOffset, numOffset) { - if (obsOffset) { - return obsOffsets[obsOffset]; - } else if (militaryOffset) { - // the only allowed military tz is Z - return 0; - } else { - var hm = parseInt(numOffset, 10); - var m = hm % 100, h = (hm - m) / 100; - return h * 60 + m; - } - } - - // date and time from ref 2822 format - function configFromRFC2822(config) { - var match = rfc2822.exec(preprocessRFC2822(config._i)); - if (match) { - var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); - if (!checkWeekday(match[1], parsedArray, config)) { - return; - } - - config._a = parsedArray; - config._tzm = calculateOffset(match[8], match[9], match[10]); - - config._d = createUTCDate.apply(null, config._a); - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - - getParsingFlags(config).rfc2822 = true; - } else { - config._isValid = false; - } - } - - // date from iso format or fallback - function configFromString(config) { - var matched = aspNetJsonRegex.exec(config._i); - - if (matched !== null) { - config._d = new Date(+matched[1]); - return; - } - - configFromISO(config); - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } - - configFromRFC2822(config); - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } - - // Final attempt, use Input Fallback - hooks.createFromInputFallback(config); - } - - hooks.createFromInputFallback = deprecate( - 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + - 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + - 'discouraged and will be removed in an upcoming major release. Please refer to ' + - 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); - } - ); - - // constant that refers to the ISO standard - hooks.ISO_8601 = function () {}; - - // constant that refers to the RFC 2822 form - hooks.RFC_2822 = function () {}; - - // date from string and format string - function configFromStringAndFormat(config) { - // TODO: Move this to another part of the creation flow to prevent circular deps - if (config._f === hooks.ISO_8601) { - configFromISO(config); - return; - } - if (config._f === hooks.RFC_2822) { - configFromRFC2822(config); - return; - } - config._a = []; - getParsingFlags(config).empty = true; - - // This array is used to make a Date, either with `new Date` or `Date.UTC` - var string = '' + config._i, - i, parsedInput, tokens, token, skipped, - stringLength = string.length, - totalParsedInputLength = 0; - - tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; - // console.log('token', token, 'parsedInput', parsedInput, - // 'regex', getParseRegexForToken(token, config)); - if (parsedInput) { - skipped = string.substr(0, string.indexOf(parsedInput)); - if (skipped.length > 0) { - getParsingFlags(config).unusedInput.push(skipped); - } - string = string.slice(string.indexOf(parsedInput) + parsedInput.length); - totalParsedInputLength += parsedInput.length; - } - // don't parse if it's not a known token - if (formatTokenFunctions[token]) { - if (parsedInput) { - getParsingFlags(config).empty = false; - } - else { - getParsingFlags(config).unusedTokens.push(token); - } - addTimeToArrayFromToken(token, parsedInput, config); - } - else if (config._strict && !parsedInput) { - getParsingFlags(config).unusedTokens.push(token); - } - } - - // add remaining unparsed input length to the string - getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; - if (string.length > 0) { - getParsingFlags(config).unusedInput.push(string); - } - - // clear _12h flag if hour is <= 12 - if (config._a[HOUR] <= 12 && - getParsingFlags(config).bigHour === true && - config._a[HOUR] > 0) { - getParsingFlags(config).bigHour = undefined; - } - - getParsingFlags(config).parsedDateParts = config._a.slice(0); - getParsingFlags(config).meridiem = config._meridiem; - // handle meridiem - config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); - - configFromArray(config); - checkOverflow(config); - } - - - function meridiemFixWrap (locale, hour, meridiem) { - var isPm; - - if (meridiem == null) { - // nothing to do - return hour; - } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - // this is not supposed to happen - return hour; - } - } - - // date from string and array of format strings - function configFromStringAndArray(config) { - var tempConfig, - bestMoment, - - scoreToBeat, - i, - currentScore; - - if (config._f.length === 0) { - getParsingFlags(config).invalidFormat = true; - config._d = new Date(NaN); - return; - } - - for (i = 0; i < config._f.length; i++) { - currentScore = 0; - tempConfig = copyConfig({}, config); - if (config._useUTC != null) { - tempConfig._useUTC = config._useUTC; - } - tempConfig._f = config._f[i]; - configFromStringAndFormat(tempConfig); - - if (!isValid(tempConfig)) { - continue; - } - - // if there is any input that was not parsed add a penalty for that format - currentScore += getParsingFlags(tempConfig).charsLeftOver; - - //or tokens - currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - - getParsingFlags(tempConfig).score = currentScore; - - if (scoreToBeat == null || currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - } - } - - extend(config, bestMoment || tempConfig); - } - - function configFromObject(config) { - if (config._d) { - return; - } - - var i = normalizeObjectUnits(config._i); - config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { - return obj && parseInt(obj, 10); - }); - - configFromArray(config); - } - - function createFromConfig (config) { - var res = new Moment(checkOverflow(prepareConfig(config))); - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; - } - - return res; - } - - function prepareConfig (config) { - var input = config._i, - format = config._f; - - config._locale = config._locale || getLocale(config._l); - - if (input === null || (format === undefined && input === '')) { - return createInvalid({nullInput: true}); - } - - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); - } - - if (isMoment(input)) { - return new Moment(checkOverflow(input)); - } else if (isDate(input)) { - config._d = input; - } else if (isArray(format)) { - configFromStringAndArray(config); - } else if (format) { - configFromStringAndFormat(config); - } else { - configFromInput(config); - } - - if (!isValid(config)) { - config._d = null; - } - - return config; - } - - function configFromInput(config) { - var input = config._i; - if (isUndefined(input)) { - config._d = new Date(hooks.now()); - } else if (isDate(input)) { - config._d = new Date(input.valueOf()); - } else if (typeof input === 'string') { - configFromString(config); - } else if (isArray(input)) { - config._a = map(input.slice(0), function (obj) { - return parseInt(obj, 10); - }); - configFromArray(config); - } else if (isObject(input)) { - configFromObject(config); - } else if (isNumber(input)) { - // from milliseconds - config._d = new Date(input); - } else { - hooks.createFromInputFallback(config); - } - } - - function createLocalOrUTC (input, format, locale, strict, isUTC) { - var c = {}; - - if (locale === true || locale === false) { - strict = locale; - locale = undefined; - } - - if ((isObject(input) && isObjectEmpty(input)) || - (isArray(input) && input.length === 0)) { - input = undefined; - } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c._isAMomentObject = true; - c._useUTC = c._isUTC = isUTC; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - - return createFromConfig(c); - } - - function createLocal (input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, false); - } - - var prototypeMin = deprecate( - 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return createInvalid(); - } - } - ); - - var prototypeMax = deprecate( - 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other > this ? this : other; - } else { - return createInvalid(); - } - } - ); - - // Pick a moment m from moments so that m[fn](other) is true for all - // other. This relies on the function fn to be transitive. - // - // moments should either be an array of moment objects or an array, whose - // first element is an array of moment objects. - function pickBy(fn, moments) { - var res, i; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; - } - if (!moments.length) { - return createLocal(); - } - res = moments[0]; - for (i = 1; i < moments.length; ++i) { - if (!moments[i].isValid() || moments[i][fn](res)) { - res = moments[i]; - } - } - return res; - } - - // TODO: Use [].sort instead? - function min () { - var args = [].slice.call(arguments, 0); - - return pickBy('isBefore', args); - } - - function max () { - var args = [].slice.call(arguments, 0); - - return pickBy('isAfter', args); - } - - var now = function () { - return Date.now ? Date.now() : +(new Date()); - }; - - var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; - - function isDurationValid(m) { - for (var key in m) { - if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { - return false; - } - } - - var unitHasDecimal = false; - for (var i = 0; i < ordering.length; ++i) { - if (m[ordering[i]]) { - if (unitHasDecimal) { - return false; // only allow non-integers for smallest unit - } - if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { - unitHasDecimal = true; - } - } - } - - return true; - } - - function isValid$1() { - return this._isValid; - } - - function createInvalid$1() { - return createDuration(NaN); - } - - function Duration (duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || normalizedInput.isoWeek || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - - this._isValid = isDurationValid(normalizedInput); - - // representation for dateAddRemove - this._milliseconds = +milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = +days + - weeks * 7; - // It is impossible to translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = +months + - quarters * 3 + - years * 12; - - this._data = {}; - - this._locale = getLocale(); - - this._bubble(); - } - - function isDuration (obj) { - return obj instanceof Duration; - } - - function absRound (number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); - } - } - - // FORMATTING - - function offset (token, separator) { - addFormatToken(token, 0, 0, function () { - var offset = this.utcOffset(); - var sign = '+'; - if (offset < 0) { - offset = -offset; - sign = '-'; - } - return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); - }); - } - - offset('Z', ':'); - offset('ZZ', ''); - - // PARSING - - addRegexToken('Z', matchShortOffset); - addRegexToken('ZZ', matchShortOffset); - addParseToken(['Z', 'ZZ'], function (input, array, config) { - config._useUTC = true; - config._tzm = offsetFromString(matchShortOffset, input); - }); - - // HELPERS - - // timezone chunker - // '+10:00' > ['10', '00'] - // '-1530' > ['-15', '30'] - var chunkOffset = /([\+\-]|\d\d)/gi; - - function offsetFromString(matcher, string) { - var matches = (string || '').match(matcher); - - if (matches === null) { - return null; - } - - var chunk = matches[matches.length - 1] || []; - var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; - var minutes = +(parts[1] * 60) + toInt(parts[2]); - - return minutes === 0 ? - 0 : - parts[0] === '+' ? minutes : -minutes; - } - - // Return a moment from input, that is local/utc/zone equivalent to model. - function cloneWithOffset(input, model) { - var res, diff; - if (model._isUTC) { - res = model.clone(); - diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); - // Use low-level api, because this fn is low-level api. - res._d.setTime(res._d.valueOf() + diff); - hooks.updateOffset(res, false); - return res; - } else { - return createLocal(input).local(); - } - } - - function getDateOffset (m) { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(m._d.getTimezoneOffset() / 15) * 15; - } - - // HOOKS - - // This function will be called whenever a moment is mutated. - // It is intended to keep the offset in sync with the timezone. - hooks.updateOffset = function () {}; - - // MOMENTS - - // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset - // +0200, so we adjust the time as needed, to be valid. - // - // Keeping the time actually adds/subtracts (one hour) - // from the actual represented time. That is why we call updateOffset - // a second time. In case it wants us to change the offset again - // _changeInProgress == true case, then we have to adjust, because - // there is no such time in the given timezone. - function getSetOffset (input, keepLocalTime, keepMinutes) { - var offset = this._offset || 0, - localAdjust; - if (!this.isValid()) { - return input != null ? this : NaN; - } - if (input != null) { - if (typeof input === 'string') { - input = offsetFromString(matchShortOffset, input); - if (input === null) { - return this; - } - } else if (Math.abs(input) < 16 && !keepMinutes) { - input = input * 60; - } - if (!this._isUTC && keepLocalTime) { - localAdjust = getDateOffset(this); - } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addSubtract(this, createDuration(input - offset, 'm'), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - hooks.updateOffset(this, true); - this._changeInProgress = null; - } - } - return this; - } else { - return this._isUTC ? offset : getDateOffset(this); - } - } - - function getSetZone (input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } - - this.utcOffset(input, keepLocalTime); - - return this; - } else { - return -this.utcOffset(); - } - } - - function setOffsetToUTC (keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - } - - function setOffsetToLocal (keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; - - if (keepLocalTime) { - this.subtract(getDateOffset(this), 'm'); - } - } - return this; - } - - function setOffsetToParsedOffset () { - if (this._tzm != null) { - this.utcOffset(this._tzm, false, true); - } else if (typeof this._i === 'string') { - var tZone = offsetFromString(matchOffset, this._i); - if (tZone != null) { - this.utcOffset(tZone); - } - else { - this.utcOffset(0, true); - } - } - return this; - } - - function hasAlignedHourOffset (input) { - if (!this.isValid()) { - return false; - } - input = input ? createLocal(input).utcOffset() : 0; - - return (this.utcOffset() - input) % 60 === 0; - } - - function isDaylightSavingTime () { - return ( - this.utcOffset() > this.clone().month(0).utcOffset() || - this.utcOffset() > this.clone().month(5).utcOffset() - ); - } - - function isDaylightSavingTimeShifted () { - if (!isUndefined(this._isDSTShifted)) { - return this._isDSTShifted; - } - - var c = {}; - - copyConfig(c, this); - c = prepareConfig(c); - - if (c._a) { - var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); - this._isDSTShifted = this.isValid() && - compareArrays(c._a, other.toArray()) > 0; - } else { - this._isDSTShifted = false; - } - - return this._isDSTShifted; - } - - function isLocal () { - return this.isValid() ? !this._isUTC : false; - } - - function isUtcOffset () { - return this.isValid() ? this._isUTC : false; - } - - function isUtc () { - return this.isValid() ? this._isUTC && this._offset === 0 : false; - } - - // ASP.NET json date format regex - var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; - - // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html - // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - // and further modified to allow for strings containing both week and day - var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; - - function createDuration (input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - diffRes; - - if (isDuration(input)) { - duration = { - ms : input._milliseconds, - d : input._days, - M : input._months - }; - } else if (isNumber(input)) { - duration = {}; - if (key) { - duration[key] = input; - } else { - duration.milliseconds = input; - } - } else if (!!(match = aspNetRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y : 0, - d : toInt(match[DATE]) * sign, - h : toInt(match[HOUR]) * sign, - m : toInt(match[MINUTE]) * sign, - s : toInt(match[SECOND]) * sign, - ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match - }; - } else if (!!(match = isoRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y : parseIso(match[2], sign), - M : parseIso(match[3], sign), - w : parseIso(match[4], sign), - d : parseIso(match[5], sign), - h : parseIso(match[6], sign), - m : parseIso(match[7], sign), - s : parseIso(match[8], sign) - }; - } else if (duration == null) {// checks for null or undefined - duration = {}; - } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { - diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); - - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; - } - - ret = new Duration(duration); - - if (isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } - - return ret; - } - - createDuration.fn = Duration.prototype; - createDuration.invalid = createInvalid$1; - - function parseIso (inp, sign) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); - // apply sign while we're at it - return (isNaN(res) ? 0 : res) * sign; - } - - function positiveMomentsDifference(base, other) { - var res = {}; - - res.months = other.month() - base.month() + - (other.year() - base.year()) * 12; - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; - } - - res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - - return res; - } - - function momentsDifference(base, other) { - var res; - if (!(base.isValid() && other.isValid())) { - return {milliseconds: 0, months: 0}; - } - - other = cloneWithOffset(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; - } - - return res; - } - - // TODO: remove 'name' arg after deprecation is removed - function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; - //invert the arguments, but complain about it - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + - 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); - tmp = val; val = period; period = tmp; - } - - val = typeof val === 'string' ? +val : val; - dur = createDuration(val, period); - addSubtract(this, dur, direction); - return this; - }; - } - - function addSubtract (mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = absRound(duration._days), - months = absRound(duration._months); - - if (!mom.isValid()) { - // No op - return; - } - - updateOffset = updateOffset == null ? true : updateOffset; - - if (months) { - setMonth(mom, get(mom, 'Month') + months * isAdding); - } - if (days) { - set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); - } - if (milliseconds) { - mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); - } - if (updateOffset) { - hooks.updateOffset(mom, days || months); - } - } - - var add = createAdder(1, 'add'); - var subtract = createAdder(-1, 'subtract'); - - function getCalendarFormat(myMoment, now) { - var diff = myMoment.diff(now, 'days', true); - return diff < -6 ? 'sameElse' : - diff < -1 ? 'lastWeek' : - diff < 0 ? 'lastDay' : - diff < 1 ? 'sameDay' : - diff < 2 ? 'nextDay' : - diff < 7 ? 'nextWeek' : 'sameElse'; - } - - function calendar$1 (time, formats) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're local/utc/offset or not. - var now = time || createLocal(), - sod = cloneWithOffset(now, this).startOf('day'), - format = hooks.calendarFormat(this, sod) || 'sameElse'; - - var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); - - return this.format(output || this.localeData().calendar(format, this, createLocal(now))); - } - - function clone () { - return new Moment(this); - } - - function isAfter (input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() > localInput.valueOf(); - } else { - return localInput.valueOf() < this.clone().startOf(units).valueOf(); - } - } - - function isBefore (input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() < localInput.valueOf(); - } else { - return this.clone().endOf(units).valueOf() < localInput.valueOf(); - } - } - - function isBetween (from, to, units, inclusivity) { - var localFrom = isMoment(from) ? from : createLocal(from), - localTo = isMoment(to) ? to : createLocal(to); - if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { - return false; - } - inclusivity = inclusivity || '()'; - return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && - (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); - } - - function isSame (input, units) { - var localInput = isMoment(input) ? input : createLocal(input), - inputMs; - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() === localInput.valueOf(); - } else { - inputMs = localInput.valueOf(); - return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); - } - } - - function isSameOrAfter (input, units) { - return this.isSame(input, units) || this.isAfter(input, units); - } - - function isSameOrBefore (input, units) { - return this.isSame(input, units) || this.isBefore(input, units); - } - - function diff (input, units, asFloat) { - var that, - zoneDelta, - output; - - if (!this.isValid()) { - return NaN; - } - - that = cloneWithOffset(input, this); - - if (!that.isValid()) { - return NaN; - } - - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; - - units = normalizeUnits(units); - - switch (units) { - case 'year': output = monthDiff(this, that) / 12; break; - case 'month': output = monthDiff(this, that); break; - case 'quarter': output = monthDiff(this, that) / 3; break; - case 'second': output = (this - that) / 1e3; break; // 1000 - case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 - case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 - case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst - case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst - default: output = this - that; - } - - return asFloat ? output : absFloor(output); - } - - function monthDiff (a, b) { - // difference in months - var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor2 - anchor); - } - - //check for negative zero, return zero if negative zero - return -(wholeMonthDiff + adjust) || 0; - } - - hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; - hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; - - function toString () { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - } - - function toISOString(keepOffset) { - if (!this.isValid()) { - return null; - } - var utc = keepOffset !== true; - var m = utc ? this.clone().utc() : this; - if (m.year() < 0 || m.year() > 9999) { - return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); - } - if (isFunction(Date.prototype.toISOString)) { - // native implementation is ~50x faster, use it when we can - if (utc) { - return this.toDate().toISOString(); - } else { - return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); - } - } - return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); - } - - /** - * Return a human readable representation of a moment that can - * also be evaluated to get a new moment which is the same - * - * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects - */ - function inspect () { - if (!this.isValid()) { - return 'moment.invalid(/* ' + this._i + ' */)'; - } - var func = 'moment'; - var zone = ''; - if (!this.isLocal()) { - func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; - zone = 'Z'; - } - var prefix = '[' + func + '("]'; - var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; - var datetime = '-MM-DD[T]HH:mm:ss.SSS'; - var suffix = zone + '[")]'; - - return this.format(prefix + year + datetime + suffix); - } - - function format (inputString) { - if (!inputString) { - inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; - } - var output = formatMoment(this, inputString); - return this.localeData().postformat(output); - } - - function from (time, withoutSuffix) { - if (this.isValid() && - ((isMoment(time) && time.isValid()) || - createLocal(time).isValid())) { - return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function fromNow (withoutSuffix) { - return this.from(createLocal(), withoutSuffix); - } - - function to (time, withoutSuffix) { - if (this.isValid() && - ((isMoment(time) && time.isValid()) || - createLocal(time).isValid())) { - return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function toNow (withoutSuffix) { - return this.to(createLocal(), withoutSuffix); - } - - // If passed a locale key, it will set the locale for this - // instance. Otherwise, it will return the locale configuration - // variables for this instance. - function locale (key) { - var newLocaleData; - - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = getLocale(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } - } - - var lang = deprecate( - 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', - function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - } - ); - - function localeData () { - return this._locale; - } - - var MS_PER_SECOND = 1000; - var MS_PER_MINUTE = 60 * MS_PER_SECOND; - var MS_PER_HOUR = 60 * MS_PER_MINUTE; - var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; - - // actual modulo - handles negative numbers (for dates before 1970): - function mod$1(dividend, divisor) { - return (dividend % divisor + divisor) % divisor; - } - - function localStartOfDate(y, m, d) { - // the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return new Date(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return new Date(y, m, d).valueOf(); - } - } - - function utcStartOfDate(y, m, d) { - // Date.UTC remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return Date.UTC(y, m, d); - } - } - - function startOf (units) { - var time; - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year(), 0, 1); - break; - case 'quarter': - time = startOfDate(this.year(), this.month() - this.month() % 3, 1); - break; - case 'month': - time = startOfDate(this.year(), this.month(), 1); - break; - case 'week': - time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); - break; - case 'isoWeek': - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); - break; - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date()); - break; - case 'hour': - time = this._d.valueOf(); - time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); - break; - case 'minute': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_MINUTE); - break; - case 'second': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_SECOND); - break; - } - - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - - function endOf (units) { - var time; - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year() + 1, 0, 1) - 1; - break; - case 'quarter': - time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; - break; - case 'month': - time = startOfDate(this.year(), this.month() + 1, 1) - 1; - break; - case 'week': - time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; - break; - case 'isoWeek': - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; - break; - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; - break; - case 'hour': - time = this._d.valueOf(); - time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; - break; - case 'minute': - time = this._d.valueOf(); - time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; - break; - case 'second': - time = this._d.valueOf(); - time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; - break; - } - - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - - function valueOf () { - return this._d.valueOf() - ((this._offset || 0) * 60000); - } - - function unix () { - return Math.floor(this.valueOf() / 1000); - } - - function toDate () { - return new Date(this.valueOf()); - } - - function toArray () { - var m = this; - return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; - } - - function toObject () { - var m = this; - return { - years: m.year(), - months: m.month(), - date: m.date(), - hours: m.hours(), - minutes: m.minutes(), - seconds: m.seconds(), - milliseconds: m.milliseconds() - }; - } - - function toJSON () { - // new Date(NaN).toJSON() === null - return this.isValid() ? this.toISOString() : null; - } - - function isValid$2 () { - return isValid(this); - } - - function parsingFlags () { - return extend({}, getParsingFlags(this)); - } - - function invalidAt () { - return getParsingFlags(this).overflow; - } - - function creationData() { - return { - input: this._i, - format: this._f, - locale: this._locale, - isUTC: this._isUTC, - strict: this._strict - }; - } - - // FORMATTING - - addFormatToken(0, ['gg', 2], 0, function () { - return this.weekYear() % 100; - }); - - addFormatToken(0, ['GG', 2], 0, function () { - return this.isoWeekYear() % 100; - }); - - function addWeekYearFormatToken (token, getter) { - addFormatToken(0, [token, token.length], 0, getter); - } - - addWeekYearFormatToken('gggg', 'weekYear'); - addWeekYearFormatToken('ggggg', 'weekYear'); - addWeekYearFormatToken('GGGG', 'isoWeekYear'); - addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - - // ALIASES - - addUnitAlias('weekYear', 'gg'); - addUnitAlias('isoWeekYear', 'GG'); - - // PRIORITY - - addUnitPriority('weekYear', 1); - addUnitPriority('isoWeekYear', 1); - - - // PARSING - - addRegexToken('G', matchSigned); - addRegexToken('g', matchSigned); - addRegexToken('GG', match1to2, match2); - addRegexToken('gg', match1to2, match2); - addRegexToken('GGGG', match1to4, match4); - addRegexToken('gggg', match1to4, match4); - addRegexToken('GGGGG', match1to6, match6); - addRegexToken('ggggg', match1to6, match6); - - addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { - week[token.substr(0, 2)] = toInt(input); - }); - - addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { - week[token] = hooks.parseTwoDigitYear(input); - }); - - // MOMENTS - - function getSetWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, - this.week(), - this.weekday(), - this.localeData()._week.dow, - this.localeData()._week.doy); - } - - function getSetISOWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, this.isoWeek(), this.isoWeekday(), 1, 4); - } - - function getISOWeeksInYear () { - return weeksInYear(this.year(), 1, 4); - } - - function getWeeksInYear () { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - } - - function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; - if (input == null) { - return weekOfYear(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; - } - return setWeekAll.call(this, input, week, weekday, dow, doy); - } - } - - function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), - date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; - } - - // FORMATTING - - addFormatToken('Q', 0, 'Qo', 'quarter'); - - // ALIASES - - addUnitAlias('quarter', 'Q'); - - // PRIORITY - - addUnitPriority('quarter', 7); - - // PARSING - - addRegexToken('Q', match1); - addParseToken('Q', function (input, array) { - array[MONTH] = (toInt(input) - 1) * 3; - }); - - // MOMENTS - - function getSetQuarter (input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - } - - // FORMATTING - - addFormatToken('D', ['DD', 2], 'Do', 'date'); - - // ALIASES - - addUnitAlias('date', 'D'); - - // PRIORITY - addUnitPriority('date', 9); - - // PARSING - - addRegexToken('D', match1to2); - addRegexToken('DD', match1to2, match2); - addRegexToken('Do', function (isStrict, locale) { - // TODO: Remove "ordinalParse" fallback in next major release. - return isStrict ? - (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : - locale._dayOfMonthOrdinalParseLenient; - }); - - addParseToken(['D', 'DD'], DATE); - addParseToken('Do', function (input, array) { - array[DATE] = toInt(input.match(match1to2)[0]); - }); - - // MOMENTS - - var getSetDayOfMonth = makeGetSet('Date', true); - - // FORMATTING - - addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); - - // ALIASES - - addUnitAlias('dayOfYear', 'DDD'); - - // PRIORITY - addUnitPriority('dayOfYear', 4); - - // PARSING - - addRegexToken('DDD', match1to3); - addRegexToken('DDDD', match3); - addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); - }); - - // HELPERS - - // MOMENTS - - function getSetDayOfYear (input) { - var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); - } - - // FORMATTING - - addFormatToken('m', ['mm', 2], 0, 'minute'); - - // ALIASES - - addUnitAlias('minute', 'm'); - - // PRIORITY - - addUnitPriority('minute', 14); - - // PARSING - - addRegexToken('m', match1to2); - addRegexToken('mm', match1to2, match2); - addParseToken(['m', 'mm'], MINUTE); - - // MOMENTS - - var getSetMinute = makeGetSet('Minutes', false); - - // FORMATTING - - addFormatToken('s', ['ss', 2], 0, 'second'); - - // ALIASES - - addUnitAlias('second', 's'); - - // PRIORITY - - addUnitPriority('second', 15); - - // PARSING - - addRegexToken('s', match1to2); - addRegexToken('ss', match1to2, match2); - addParseToken(['s', 'ss'], SECOND); - - // MOMENTS - - var getSetSecond = makeGetSet('Seconds', false); - - // FORMATTING - - addFormatToken('S', 0, 0, function () { - return ~~(this.millisecond() / 100); - }); - - addFormatToken(0, ['SS', 2], 0, function () { - return ~~(this.millisecond() / 10); - }); - - addFormatToken(0, ['SSS', 3], 0, 'millisecond'); - addFormatToken(0, ['SSSS', 4], 0, function () { - return this.millisecond() * 10; - }); - addFormatToken(0, ['SSSSS', 5], 0, function () { - return this.millisecond() * 100; - }); - addFormatToken(0, ['SSSSSS', 6], 0, function () { - return this.millisecond() * 1000; - }); - addFormatToken(0, ['SSSSSSS', 7], 0, function () { - return this.millisecond() * 10000; - }); - addFormatToken(0, ['SSSSSSSS', 8], 0, function () { - return this.millisecond() * 100000; - }); - addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { - return this.millisecond() * 1000000; - }); - - - // ALIASES - - addUnitAlias('millisecond', 'ms'); - - // PRIORITY - - addUnitPriority('millisecond', 16); - - // PARSING - - addRegexToken('S', match1to3, match1); - addRegexToken('SS', match1to3, match2); - addRegexToken('SSS', match1to3, match3); - - var token; - for (token = 'SSSS'; token.length <= 9; token += 'S') { - addRegexToken(token, matchUnsigned); - } - - function parseMs(input, array) { - array[MILLISECOND] = toInt(('0.' + input) * 1000); - } - - for (token = 'S'; token.length <= 9; token += 'S') { - addParseToken(token, parseMs); - } - // MOMENTS - - var getSetMillisecond = makeGetSet('Milliseconds', false); - - // FORMATTING - - addFormatToken('z', 0, 0, 'zoneAbbr'); - addFormatToken('zz', 0, 0, 'zoneName'); - - // MOMENTS - - function getZoneAbbr () { - return this._isUTC ? 'UTC' : ''; - } - - function getZoneName () { - return this._isUTC ? 'Coordinated Universal Time' : ''; - } - - var proto = Moment.prototype; - - proto.add = add; - proto.calendar = calendar$1; - proto.clone = clone; - proto.diff = diff; - proto.endOf = endOf; - proto.format = format; - proto.from = from; - proto.fromNow = fromNow; - proto.to = to; - proto.toNow = toNow; - proto.get = stringGet; - proto.invalidAt = invalidAt; - proto.isAfter = isAfter; - proto.isBefore = isBefore; - proto.isBetween = isBetween; - proto.isSame = isSame; - proto.isSameOrAfter = isSameOrAfter; - proto.isSameOrBefore = isSameOrBefore; - proto.isValid = isValid$2; - proto.lang = lang; - proto.locale = locale; - proto.localeData = localeData; - proto.max = prototypeMax; - proto.min = prototypeMin; - proto.parsingFlags = parsingFlags; - proto.set = stringSet; - proto.startOf = startOf; - proto.subtract = subtract; - proto.toArray = toArray; - proto.toObject = toObject; - proto.toDate = toDate; - proto.toISOString = toISOString; - proto.inspect = inspect; - proto.toJSON = toJSON; - proto.toString = toString; - proto.unix = unix; - proto.valueOf = valueOf; - proto.creationData = creationData; - proto.year = getSetYear; - proto.isLeapYear = getIsLeapYear; - proto.weekYear = getSetWeekYear; - proto.isoWeekYear = getSetISOWeekYear; - proto.quarter = proto.quarters = getSetQuarter; - proto.month = getSetMonth; - proto.daysInMonth = getDaysInMonth; - proto.week = proto.weeks = getSetWeek; - proto.isoWeek = proto.isoWeeks = getSetISOWeek; - proto.weeksInYear = getWeeksInYear; - proto.isoWeeksInYear = getISOWeeksInYear; - proto.date = getSetDayOfMonth; - proto.day = proto.days = getSetDayOfWeek; - proto.weekday = getSetLocaleDayOfWeek; - proto.isoWeekday = getSetISODayOfWeek; - proto.dayOfYear = getSetDayOfYear; - proto.hour = proto.hours = getSetHour; - proto.minute = proto.minutes = getSetMinute; - proto.second = proto.seconds = getSetSecond; - proto.millisecond = proto.milliseconds = getSetMillisecond; - proto.utcOffset = getSetOffset; - proto.utc = setOffsetToUTC; - proto.local = setOffsetToLocal; - proto.parseZone = setOffsetToParsedOffset; - proto.hasAlignedHourOffset = hasAlignedHourOffset; - proto.isDST = isDaylightSavingTime; - proto.isLocal = isLocal; - proto.isUtcOffset = isUtcOffset; - proto.isUtc = isUtc; - proto.isUTC = isUtc; - proto.zoneAbbr = getZoneAbbr; - proto.zoneName = getZoneName; - proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); - proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); - proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); - proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); - proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); - - function createUnix (input) { - return createLocal(input * 1000); - } - - function createInZone () { - return createLocal.apply(null, arguments).parseZone(); - } - - function preParsePostFormat (string) { - return string; - } - - var proto$1 = Locale.prototype; - - proto$1.calendar = calendar; - proto$1.longDateFormat = longDateFormat; - proto$1.invalidDate = invalidDate; - proto$1.ordinal = ordinal; - proto$1.preparse = preParsePostFormat; - proto$1.postformat = preParsePostFormat; - proto$1.relativeTime = relativeTime; - proto$1.pastFuture = pastFuture; - proto$1.set = set; - - proto$1.months = localeMonths; - proto$1.monthsShort = localeMonthsShort; - proto$1.monthsParse = localeMonthsParse; - proto$1.monthsRegex = monthsRegex; - proto$1.monthsShortRegex = monthsShortRegex; - proto$1.week = localeWeek; - proto$1.firstDayOfYear = localeFirstDayOfYear; - proto$1.firstDayOfWeek = localeFirstDayOfWeek; - - proto$1.weekdays = localeWeekdays; - proto$1.weekdaysMin = localeWeekdaysMin; - proto$1.weekdaysShort = localeWeekdaysShort; - proto$1.weekdaysParse = localeWeekdaysParse; - - proto$1.weekdaysRegex = weekdaysRegex; - proto$1.weekdaysShortRegex = weekdaysShortRegex; - proto$1.weekdaysMinRegex = weekdaysMinRegex; - - proto$1.isPM = localeIsPM; - proto$1.meridiem = localeMeridiem; - - function get$1 (format, index, field, setter) { - var locale = getLocale(); - var utc = createUTC().set(setter, index); - return locale[field](utc, format); - } - - function listMonthsImpl (format, index, field) { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - - if (index != null) { - return get$1(format, index, field, 'month'); - } - - var i; - var out = []; - for (i = 0; i < 12; i++) { - out[i] = get$1(format, i, field, 'month'); - } - return out; - } - - // () - // (5) - // (fmt, 5) - // (fmt) - // (true) - // (true, 5) - // (true, fmt, 5) - // (true, fmt) - function listWeekdaysImpl (localeSorted, format, index, field) { - if (typeof localeSorted === 'boolean') { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } else { - format = localeSorted; - index = format; - localeSorted = false; - - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } - - var locale = getLocale(), - shift = localeSorted ? locale._week.dow : 0; - - if (index != null) { - return get$1(format, (index + shift) % 7, field, 'day'); - } - - var i; - var out = []; - for (i = 0; i < 7; i++) { - out[i] = get$1(format, (i + shift) % 7, field, 'day'); - } - return out; - } - - function listMonths (format, index) { - return listMonthsImpl(format, index, 'months'); - } - - function listMonthsShort (format, index) { - return listMonthsImpl(format, index, 'monthsShort'); - } - - function listWeekdays (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); - } - - function listWeekdaysShort (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); - } - - function listWeekdaysMin (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); - } - - getSetGlobalLocale('en', { - dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal : function (number) { - var b = number % 10, - output = (toInt(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - } - }); - - // Side effect imports - - hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); - hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); - - var mathAbs = Math.abs; - - function abs () { - var data = this._data; - - this._milliseconds = mathAbs(this._milliseconds); - this._days = mathAbs(this._days); - this._months = mathAbs(this._months); - - data.milliseconds = mathAbs(data.milliseconds); - data.seconds = mathAbs(data.seconds); - data.minutes = mathAbs(data.minutes); - data.hours = mathAbs(data.hours); - data.months = mathAbs(data.months); - data.years = mathAbs(data.years); - - return this; - } - - function addSubtract$1 (duration, input, value, direction) { - var other = createDuration(input, value); - - duration._milliseconds += direction * other._milliseconds; - duration._days += direction * other._days; - duration._months += direction * other._months; - - return duration._bubble(); - } - - // supports only 2.0-style add(1, 's') or add(duration) - function add$1 (input, value) { - return addSubtract$1(this, input, value, 1); - } - - // supports only 2.0-style subtract(1, 's') or subtract(duration) - function subtract$1 (input, value) { - return addSubtract$1(this, input, value, -1); - } - - function absCeil (number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } - } - - function bubble () { - var milliseconds = this._milliseconds; - var days = this._days; - var months = this._months; - var data = this._data; - var seconds, minutes, hours, years, monthsFromDays; - - // if we have a mix of positive and negative values, bubble down first - // check: https://github.com/moment/moment/issues/2166 - if (!((milliseconds >= 0 && days >= 0 && months >= 0) || - (milliseconds <= 0 && days <= 0 && months <= 0))) { - milliseconds += absCeil(monthsToDays(months) + days) * 864e5; - days = 0; - months = 0; - } - - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; - - seconds = absFloor(milliseconds / 1000); - data.seconds = seconds % 60; - - minutes = absFloor(seconds / 60); - data.minutes = minutes % 60; - - hours = absFloor(minutes / 60); - data.hours = hours % 24; - - days += absFloor(hours / 24); - - // convert days to months - monthsFromDays = absFloor(daysToMonths(days)); - months += monthsFromDays; - days -= absCeil(monthsToDays(monthsFromDays)); - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - data.days = days; - data.months = months; - data.years = years; - - return this; - } - - function daysToMonths (days) { - // 400 years have 146097 days (taking into account leap year rules) - // 400 years have 12 months === 4800 - return days * 4800 / 146097; - } - - function monthsToDays (months) { - // the reverse of daysToMonths - return months * 146097 / 4800; - } - - function as (units) { - if (!this.isValid()) { - return NaN; - } - var days; - var months; - var milliseconds = this._milliseconds; - - units = normalizeUnits(units); - - if (units === 'month' || units === 'quarter' || units === 'year') { - days = this._days + milliseconds / 864e5; - months = this._months + daysToMonths(days); - switch (units) { - case 'month': return months; - case 'quarter': return months / 3; - case 'year': return months / 12; - } - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(monthsToDays(this._months)); - switch (units) { - case 'week' : return days / 7 + milliseconds / 6048e5; - case 'day' : return days + milliseconds / 864e5; - case 'hour' : return days * 24 + milliseconds / 36e5; - case 'minute' : return days * 1440 + milliseconds / 6e4; - case 'second' : return days * 86400 + milliseconds / 1000; - // Math.floor prevents floating point math errors here - case 'millisecond': return Math.floor(days * 864e5) + milliseconds; - default: throw new Error('Unknown unit ' + units); - } - } - } - - // TODO: Use this.as('ms')? - function valueOf$1 () { - if (!this.isValid()) { - return NaN; - } - return ( - this._milliseconds + - this._days * 864e5 + - (this._months % 12) * 2592e6 + - toInt(this._months / 12) * 31536e6 - ); - } - - function makeAs (alias) { - return function () { - return this.as(alias); - }; - } - - var asMilliseconds = makeAs('ms'); - var asSeconds = makeAs('s'); - var asMinutes = makeAs('m'); - var asHours = makeAs('h'); - var asDays = makeAs('d'); - var asWeeks = makeAs('w'); - var asMonths = makeAs('M'); - var asQuarters = makeAs('Q'); - var asYears = makeAs('y'); - - function clone$1 () { - return createDuration(this); - } - - function get$2 (units) { - units = normalizeUnits(units); - return this.isValid() ? this[units + 's']() : NaN; - } - - function makeGetter(name) { - return function () { - return this.isValid() ? this._data[name] : NaN; - }; - } - - var milliseconds = makeGetter('milliseconds'); - var seconds = makeGetter('seconds'); - var minutes = makeGetter('minutes'); - var hours = makeGetter('hours'); - var days = makeGetter('days'); - var months = makeGetter('months'); - var years = makeGetter('years'); - - function weeks () { - return absFloor(this.days() / 7); - } - - var round = Math.round; - var thresholds = { - ss: 44, // a few seconds to seconds - s : 45, // seconds to minute - m : 45, // minutes to hour - h : 22, // hours to day - d : 26, // days to month - M : 11 // months to year - }; - - // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); - } - - function relativeTime$1 (posNegDuration, withoutSuffix, locale) { - var duration = createDuration(posNegDuration).abs(); - var seconds = round(duration.as('s')); - var minutes = round(duration.as('m')); - var hours = round(duration.as('h')); - var days = round(duration.as('d')); - var months = round(duration.as('M')); - var years = round(duration.as('y')); - - var a = seconds <= thresholds.ss && ['s', seconds] || - seconds < thresholds.s && ['ss', seconds] || - minutes <= 1 && ['m'] || - minutes < thresholds.m && ['mm', minutes] || - hours <= 1 && ['h'] || - hours < thresholds.h && ['hh', hours] || - days <= 1 && ['d'] || - days < thresholds.d && ['dd', days] || - months <= 1 && ['M'] || - months < thresholds.M && ['MM', months] || - years <= 1 && ['y'] || ['yy', years]; - - a[2] = withoutSuffix; - a[3] = +posNegDuration > 0; - a[4] = locale; - return substituteTimeAgo.apply(null, a); - } - - // This function allows you to set the rounding function for relative time strings - function getSetRelativeTimeRounding (roundingFunction) { - if (roundingFunction === undefined) { - return round; - } - if (typeof(roundingFunction) === 'function') { - round = roundingFunction; - return true; - } - return false; - } - - // This function allows you to set a threshold for relative time strings - function getSetRelativeTimeThreshold (threshold, limit) { - if (thresholds[threshold] === undefined) { - return false; - } - if (limit === undefined) { - return thresholds[threshold]; - } - thresholds[threshold] = limit; - if (threshold === 's') { - thresholds.ss = limit - 1; - } - return true; - } - - function humanize (withSuffix) { - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var locale = this.localeData(); - var output = relativeTime$1(this, !withSuffix, locale); - - if (withSuffix) { - output = locale.pastFuture(+this, output); - } - - return locale.postformat(output); - } - - var abs$1 = Math.abs; - - function sign(x) { - return ((x > 0) - (x < 0)) || +x; - } - - function toISOString$1() { - // for ISO strings we do not use the normal bubbling rules: - // * milliseconds bubble up until they become hours - // * days do not bubble at all - // * months bubble up until they become years - // This is because there is no context-free conversion between hours and days - // (think of clock changes) - // and also not between days and months (28-31 days per month) - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var seconds = abs$1(this._milliseconds) / 1000; - var days = abs$1(this._days); - var months = abs$1(this._months); - var minutes, hours, years; - - // 3600 seconds -> 60 minutes -> 1 hour - minutes = absFloor(seconds / 60); - hours = absFloor(minutes / 60); - seconds %= 60; - minutes %= 60; - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - - // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - var Y = years; - var M = months; - var D = days; - var h = hours; - var m = minutes; - var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; - var total = this.asSeconds(); - - if (!total) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; - } - - var totalSign = total < 0 ? '-' : ''; - var ymSign = sign(this._months) !== sign(total) ? '-' : ''; - var daysSign = sign(this._days) !== sign(total) ? '-' : ''; - var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; - - return totalSign + 'P' + - (Y ? ymSign + Y + 'Y' : '') + - (M ? ymSign + M + 'M' : '') + - (D ? daysSign + D + 'D' : '') + - ((h || m || s) ? 'T' : '') + - (h ? hmsSign + h + 'H' : '') + - (m ? hmsSign + m + 'M' : '') + - (s ? hmsSign + s + 'S' : ''); - } - - var proto$2 = Duration.prototype; - - proto$2.isValid = isValid$1; - proto$2.abs = abs; - proto$2.add = add$1; - proto$2.subtract = subtract$1; - proto$2.as = as; - proto$2.asMilliseconds = asMilliseconds; - proto$2.asSeconds = asSeconds; - proto$2.asMinutes = asMinutes; - proto$2.asHours = asHours; - proto$2.asDays = asDays; - proto$2.asWeeks = asWeeks; - proto$2.asMonths = asMonths; - proto$2.asQuarters = asQuarters; - proto$2.asYears = asYears; - proto$2.valueOf = valueOf$1; - proto$2._bubble = bubble; - proto$2.clone = clone$1; - proto$2.get = get$2; - proto$2.milliseconds = milliseconds; - proto$2.seconds = seconds; - proto$2.minutes = minutes; - proto$2.hours = hours; - proto$2.days = days; - proto$2.weeks = weeks; - proto$2.months = months; - proto$2.years = years; - proto$2.humanize = humanize; - proto$2.toISOString = toISOString$1; - proto$2.toString = toISOString$1; - proto$2.toJSON = toISOString$1; - proto$2.locale = locale; - proto$2.localeData = localeData; - - proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); - proto$2.lang = lang; - - // Side effect imports - - // FORMATTING - - addFormatToken('X', 0, 0, 'unix'); - addFormatToken('x', 0, 0, 'valueOf'); - - // PARSING - - addRegexToken('x', matchSigned); - addRegexToken('X', matchTimestamp); - addParseToken('X', function (input, array, config) { - config._d = new Date(parseFloat(input, 10) * 1000); - }); - addParseToken('x', function (input, array, config) { - config._d = new Date(toInt(input)); - }); - - // Side effect imports - - - hooks.version = '2.24.0'; - - setHookCallback(createLocal); - - hooks.fn = proto; - hooks.min = min; - hooks.max = max; - hooks.now = now; - hooks.utc = createUTC; - hooks.unix = createUnix; - hooks.months = listMonths; - hooks.isDate = isDate; - hooks.locale = getSetGlobalLocale; - hooks.invalid = createInvalid; - hooks.duration = createDuration; - hooks.isMoment = isMoment; - hooks.weekdays = listWeekdays; - hooks.parseZone = createInZone; - hooks.localeData = getLocale; - hooks.isDuration = isDuration; - hooks.monthsShort = listMonthsShort; - hooks.weekdaysMin = listWeekdaysMin; - hooks.defineLocale = defineLocale; - hooks.updateLocale = updateLocale; - hooks.locales = listLocales; - hooks.weekdaysShort = listWeekdaysShort; - hooks.normalizeUnits = normalizeUnits; - hooks.relativeTimeRounding = getSetRelativeTimeRounding; - hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; - hooks.calendarFormat = getCalendarFormat; - hooks.prototype = proto; - - // currently HTML5 input type only supports 24-hour formats - hooks.HTML5_FMT = { - DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // - DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // - DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // - DATE: 'YYYY-MM-DD', // - TIME: 'HH:mm', // - TIME_SECONDS: 'HH:mm:ss', // - TIME_MS: 'HH:mm:ss.SSS', // - WEEK: 'GGGG-[W]WW', // - MONTH: 'YYYY-MM' // - }; - - return hooks; - -}))); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/browser.js ***! - \*******************************************************************/ -/*! exports provided: getZoomLevel, getTimeSinceLastZoomLevelChanged, onDidChangeZoomLevel, getZoomFactor, getPixelRatio, isEdge, isFirefox, isWebKit, isChrome, isSafari, isWebkitWebView, isIPad, isEdgeWebView, isStandalone */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getZoomLevel", function() { return getZoomLevel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTimeSinceLastZoomLevelChanged", function() { return getTimeSinceLastZoomLevelChanged; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onDidChangeZoomLevel", function() { return onDidChangeZoomLevel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getZoomFactor", function() { return getZoomFactor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPixelRatio", function() { return getPixelRatio; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEdge", function() { return isEdge; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFirefox", function() { return isFirefox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWebKit", function() { return isWebKit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isChrome", function() { return isChrome; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSafari", function() { return isSafari; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWebkitWebView", function() { return isWebkitWebView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIPad", function() { return isIPad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEdgeWebView", function() { return isEdgeWebView; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isStandalone", function() { return isStandalone; }); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class WindowManager { - constructor() { - // --- Zoom Level - this._zoomLevel = 0; - this._lastZoomLevelChangeTime = 0; - this._onDidChangeZoomLevel = new _common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event; - // --- Zoom Factor - this._zoomFactor = 1; - } - getZoomLevel() { - return this._zoomLevel; - } - getTimeSinceLastZoomLevelChanged() { - return Date.now() - this._lastZoomLevelChangeTime; - } - getZoomFactor() { - return this._zoomFactor; - } - // --- Pixel Ratio - getPixelRatio() { - let ctx = document.createElement('canvas').getContext('2d'); - let dpr = window.devicePixelRatio || 1; - let bsr = ctx.webkitBackingStorePixelRatio || - ctx.mozBackingStorePixelRatio || - ctx.msBackingStorePixelRatio || - ctx.oBackingStorePixelRatio || - ctx.backingStorePixelRatio || 1; - return dpr / bsr; - } -} -WindowManager.INSTANCE = new WindowManager(); -function getZoomLevel() { - return WindowManager.INSTANCE.getZoomLevel(); -} -/** Returns the time (in ms) since the zoom level was changed */ -function getTimeSinceLastZoomLevelChanged() { - return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged(); -} -function onDidChangeZoomLevel(callback) { - return WindowManager.INSTANCE.onDidChangeZoomLevel(callback); -} -/** The zoom scale for an index, e.g. 1, 1.2, 1.4 */ -function getZoomFactor() { - return WindowManager.INSTANCE.getZoomFactor(); -} -function getPixelRatio() { - return WindowManager.INSTANCE.getPixelRatio(); -} -const userAgent = navigator.userAgent; -const isEdge = (userAgent.indexOf('Edge/') >= 0); -const isFirefox = (userAgent.indexOf('Firefox') >= 0); -const isWebKit = (userAgent.indexOf('AppleWebKit') >= 0); -const isChrome = (userAgent.indexOf('Chrome') >= 0); -const isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0)); -const isWebkitWebView = (!isChrome && !isSafari && isWebKit); -const isIPad = (userAgent.indexOf('iPad') >= 0 || (isSafari && navigator.maxTouchPoints > 0)); -const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0); -const isStandalone = (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js ***! - \*******************************************************************/ -/*! exports provided: BrowserFeatures */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserFeatures", function() { return BrowserFeatures; }); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/** - * Browser feature we can support in current platform, browser and environment. - */ -const BrowserFeatures = { - clipboard: { - writeText: (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isNative"] - || (document.queryCommandSupported && document.queryCommandSupported('copy')) - || !!(navigator && navigator.clipboard && navigator.clipboard.writeText)), - readText: (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isNative"] - || !!(navigator && navigator.clipboard && navigator.clipboard.readText)), - richText: (() => { - if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"]) { - let index = navigator.userAgent.indexOf('Edge/'); - let version = parseInt(navigator.userAgent.substring(index + 5, navigator.userAgent.indexOf('.', index)), 10); - if (!version || (version >= 12 && version <= 16)) { - return false; - } - } - return true; - })() - }, - keyboard: (() => { - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isNative"] || _browser_js__WEBPACK_IMPORTED_MODULE_0__["isStandalone"]) { - return 0 /* Always */; - } - if (navigator.keyboard || _browser_js__WEBPACK_IMPORTED_MODULE_0__["isSafari"]) { - return 1 /* FullScreen */; - } - return 2 /* None */; - })(), - // 'ontouchstart' in window always evaluates to true with typescript's modern typings. This causes `window` to be - // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast - touch: 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0, - pointerEvents: window.PointerEvent && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0 || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0) -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/codicons.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/codicons.js ***! - \********************************************************************/ -/*! exports provided: renderCodiconsAsElement */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderCodiconsAsElement", function() { return renderCodiconsAsElement; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -function renderCodiconsAsElement(text) { - const elements = new Array(); - let match; - let textStart = 0, textStop = 0; - while ((match = _common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodiconsRegex"].exec(text)) !== null) { - textStop = match.index || 0; - elements.push(text.substring(textStart, textStop)); - textStart = (match.index || 0) + match[0].length; - const [, escaped, codicon, name, animation] = match; - elements.push(escaped ? `$(${codicon})` : _dom_js__WEBPACK_IMPORTED_MODULE_0__["$"](`span.codicon.codicon-${name}${animation ? `.codicon-animation-${animation}` : ''}`)); - } - if (textStart < text.length) { - elements.push(text.substring(textStart)); - } - return elements; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js ***! - \***************************************************************/ -/*! exports provided: DataTransfers, DragAndDropData, StaticDND */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataTransfers", function() { return DataTransfers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragAndDropData", function() { return DragAndDropData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticDND", function() { return StaticDND; }); -// Common data transfers -const DataTransfers = { - /** - * Application specific resource transfer type - */ - RESOURCES: 'ResourceURLs', - /** - * Browser specific transfer type to download - */ - DOWNLOAD_URL: 'DownloadURL', - /** - * Browser specific transfer type for files - */ - FILES: 'Files', - /** - * Typically transfer type for copy/paste transfers. - */ - TEXT: 'text/plain' -}; -class DragAndDropData { - constructor(data) { - this.data = data; - } - update() { - // noop - } - getData() { - return this.data; - } -} -const StaticDND = { - CurrentDragAndDropData: undefined -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/dom.js ***! - \***************************************************************/ -/*! exports provided: clearNode, removeNode, isInDOM, hasClass, addClass, addClasses, removeClass, removeClasses, toggleClass, addDisposableListener, addStandardDisposableListener, addStandardDisposableGenericMouseDownListner, addDisposableGenericMouseDownListner, addDisposableGenericMouseUpListner, addDisposableNonBubblingMouseOutListener, addDisposableNonBubblingPointerOutListener, runAtThisOrScheduleAtNextAnimationFrame, scheduleAtNextAnimationFrame, addDisposableThrottledListener, getComputedStyle, getClientArea, Dimension, getTopLeftOffset, getDomNodePagePosition, StandardWindow, getTotalWidth, getContentWidth, getContentHeight, getTotalHeight, isAncestor, findParentWithClass, hasParentWithClass, isShadowRoot, isInShadowDOM, getShadowRoot, getActiveElement, createStyleSheet, createCSSRule, removeCSSRulesContainingSelector, isHTMLElement, EventType, EventHelper, saveParentsScrollTop, restoreParentsScrollTop, trackFocus, append, reset, Namespace, $, show, hide, removeTabIndexAndUpdateFocus, getElementsByTagName, computeScreenAwareSize, windowOpenNoOpener, animate, asDomUri, asCSSUrl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearNode", function() { return clearNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNode", function() { return removeNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInDOM", function() { return isInDOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClasses", function() { return addClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClasses", function() { return removeClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleClass", function() { return toggleClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableListener", function() { return addDisposableListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStandardDisposableListener", function() { return addStandardDisposableListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStandardDisposableGenericMouseDownListner", function() { return addStandardDisposableGenericMouseDownListner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableGenericMouseDownListner", function() { return addDisposableGenericMouseDownListner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableGenericMouseUpListner", function() { return addDisposableGenericMouseUpListner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableNonBubblingMouseOutListener", function() { return addDisposableNonBubblingMouseOutListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableNonBubblingPointerOutListener", function() { return addDisposableNonBubblingPointerOutListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runAtThisOrScheduleAtNextAnimationFrame", function() { return runAtThisOrScheduleAtNextAnimationFrame; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleAtNextAnimationFrame", function() { return scheduleAtNextAnimationFrame; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addDisposableThrottledListener", function() { return addDisposableThrottledListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComputedStyle", function() { return getComputedStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClientArea", function() { return getClientArea; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dimension", function() { return Dimension; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTopLeftOffset", function() { return getTopLeftOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDomNodePagePosition", function() { return getDomNodePagePosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardWindow", function() { return StandardWindow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTotalWidth", function() { return getTotalWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContentWidth", function() { return getContentWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContentHeight", function() { return getContentHeight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTotalHeight", function() { return getTotalHeight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAncestor", function() { return isAncestor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findParentWithClass", function() { return findParentWithClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasParentWithClass", function() { return hasParentWithClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isShadowRoot", function() { return isShadowRoot; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInShadowDOM", function() { return isInShadowDOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShadowRoot", function() { return getShadowRoot; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActiveElement", function() { return getActiveElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStyleSheet", function() { return createStyleSheet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCSSRule", function() { return createCSSRule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCSSRulesContainingSelector", function() { return removeCSSRulesContainingSelector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHTMLElement", function() { return isHTMLElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventType", function() { return EventType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventHelper", function() { return EventHelper; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveParentsScrollTop", function() { return saveParentsScrollTop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "restoreParentsScrollTop", function() { return restoreParentsScrollTop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trackFocus", function() { return trackFocus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "append", function() { return append; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Namespace", function() { return Namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$", function() { return $; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "show", function() { return show; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hide", function() { return hide; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeTabIndexAndUpdateFocus", function() { return removeTabIndexAndUpdateFocus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementsByTagName", function() { return getElementsByTagName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeScreenAwareSize", function() { return computeScreenAwareSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowOpenNoOpener", function() { return windowOpenNoOpener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animate", function() { return animate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asDomUri", function() { return asDomUri; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asCSSUrl", function() { return asCSSUrl; }); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_network_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - -function clearNode(node) { - while (node.firstChild) { - node.removeChild(node.firstChild); - } -} -/** - * @deprecated use `node.remove()` instead - */ -function removeNode(node) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } -} -function isInDOM(node) { - while (node) { - if (node === document.body) { - return true; - } - node = node.parentNode || node.host; - } - return false; -} -const _classList = new class { - hasClass(node, className) { - return Boolean(className) && node.classList && node.classList.contains(className); - } - addClasses(node, ...classNames) { - classNames.forEach(nameValue => nameValue.split(' ').forEach(name => this.addClass(node, name))); - } - addClass(node, className) { - if (className && node.classList) { - node.classList.add(className); - } - } - removeClass(node, className) { - if (className && node.classList) { - node.classList.remove(className); - } - } - removeClasses(node, ...classNames) { - classNames.forEach(nameValue => nameValue.split(' ').forEach(name => this.removeClass(node, name))); - } - toggleClass(node, className, shouldHaveIt) { - if (node.classList) { - node.classList.toggle(className, shouldHaveIt); - } - } -}; -/** @deprecated ES6 - use classList*/ -const hasClass = _classList.hasClass.bind(_classList); -/** @deprecated ES6 - use classList*/ -const addClass = _classList.addClass.bind(_classList); -/** @deprecated ES6 - use classList*/ -const addClasses = _classList.addClasses.bind(_classList); -/** @deprecated ES6 - use classList*/ -const removeClass = _classList.removeClass.bind(_classList); -/** @deprecated ES6 - use classList*/ -const removeClasses = _classList.removeClasses.bind(_classList); -/** @deprecated ES6 - use classList*/ -const toggleClass = _classList.toggleClass.bind(_classList); -class DomListener { - constructor(node, type, handler, options) { - this._node = node; - this._type = type; - this._handler = handler; - this._options = (options || false); - this._node.addEventListener(this._type, this._handler, this._options); - } - dispose() { - if (!this._handler) { - // Already disposed - return; - } - this._node.removeEventListener(this._type, this._handler, this._options); - // Prevent leakers from holding on to the dom or handler func - this._node = null; - this._handler = null; - } -} -function addDisposableListener(node, type, handler, useCaptureOrOptions) { - return new DomListener(node, type, handler, useCaptureOrOptions); -} -function _wrapAsStandardMouseEvent(handler) { - return function (e) { - return handler(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](e)); - }; -} -function _wrapAsStandardKeyboardEvent(handler) { - return function (e) { - return handler(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardKeyboardEvent"](e)); - }; -} -let addStandardDisposableListener = function addStandardDisposableListener(node, type, handler, useCapture) { - let wrapHandler = handler; - if (type === 'click' || type === 'mousedown') { - wrapHandler = _wrapAsStandardMouseEvent(handler); - } - else if (type === 'keydown' || type === 'keypress' || type === 'keyup') { - wrapHandler = _wrapAsStandardKeyboardEvent(handler); - } - return addDisposableListener(node, type, wrapHandler, useCapture); -}; -let addStandardDisposableGenericMouseDownListner = function addStandardDisposableListener(node, handler, useCapture) { - let wrapHandler = _wrapAsStandardMouseEvent(handler); - return addDisposableGenericMouseDownListner(node, wrapHandler, useCapture); -}; -function addDisposableGenericMouseDownListner(node, handler, useCapture) { - return addDisposableListener(node, _common_platform_js__WEBPACK_IMPORTED_MODULE_8__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_11__["BrowserFeatures"].pointerEvents ? EventType.POINTER_DOWN : EventType.MOUSE_DOWN, handler, useCapture); -} -function addDisposableGenericMouseUpListner(node, handler, useCapture) { - return addDisposableListener(node, _common_platform_js__WEBPACK_IMPORTED_MODULE_8__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_11__["BrowserFeatures"].pointerEvents ? EventType.POINTER_UP : EventType.MOUSE_UP, handler, useCapture); -} -function addDisposableNonBubblingMouseOutListener(node, handler) { - return addDisposableListener(node, 'mouseout', (e) => { - // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements - let toElement = (e.relatedTarget); - while (toElement && toElement !== node) { - toElement = toElement.parentNode; - } - if (toElement === node) { - return; - } - handler(e); - }); -} -function addDisposableNonBubblingPointerOutListener(node, handler) { - return addDisposableListener(node, 'pointerout', (e) => { - // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements - let toElement = (e.relatedTarget); - while (toElement && toElement !== node) { - toElement = toElement.parentNode; - } - if (toElement === node) { - return; - } - handler(e); - }); -} -let _animationFrame = null; -function doRequestAnimationFrame(callback) { - if (!_animationFrame) { - const emulatedRequestAnimationFrame = (callback) => { - return setTimeout(() => callback(new Date().getTime()), 0); - }; - _animationFrame = (self.requestAnimationFrame - || self.msRequestAnimationFrame - || self.webkitRequestAnimationFrame - || self.mozRequestAnimationFrame - || self.oRequestAnimationFrame - || emulatedRequestAnimationFrame); - } - return _animationFrame.call(self, callback); -} -/** - * Schedule a callback to be run at the next animation frame. - * This allows multiple parties to register callbacks that should run at the next animation frame. - * If currently in an animation frame, `runner` will be executed immediately. - * @return token that can be used to cancel the scheduled runner (only if `runner` was not executed immediately). - */ -let runAtThisOrScheduleAtNextAnimationFrame; -/** - * Schedule a callback to be run at the next animation frame. - * This allows multiple parties to register callbacks that should run at the next animation frame. - * If currently in an animation frame, `runner` will be executed at the next animation frame. - * @return token that can be used to cancel the scheduled runner. - */ -let scheduleAtNextAnimationFrame; -class AnimationFrameQueueItem { - constructor(runner, priority = 0) { - this._runner = runner; - this.priority = priority; - this._canceled = false; - } - dispose() { - this._canceled = true; - } - execute() { - if (this._canceled) { - return; - } - try { - this._runner(); - } - catch (e) { - Object(_common_errors_js__WEBPACK_IMPORTED_MODULE_5__["onUnexpectedError"])(e); - } - } - // Sort by priority (largest to lowest) - static sort(a, b) { - return b.priority - a.priority; - } -} -(function () { - /** - * The runners scheduled at the next animation frame - */ - let NEXT_QUEUE = []; - /** - * The runners scheduled at the current animation frame - */ - let CURRENT_QUEUE = null; - /** - * A flag to keep track if the native requestAnimationFrame was already called - */ - let animFrameRequested = false; - /** - * A flag to indicate if currently handling a native requestAnimationFrame callback - */ - let inAnimationFrameRunner = false; - let animationFrameRunner = () => { - animFrameRequested = false; - CURRENT_QUEUE = NEXT_QUEUE; - NEXT_QUEUE = []; - inAnimationFrameRunner = true; - while (CURRENT_QUEUE.length > 0) { - CURRENT_QUEUE.sort(AnimationFrameQueueItem.sort); - let top = CURRENT_QUEUE.shift(); - top.execute(); - } - inAnimationFrameRunner = false; - }; - scheduleAtNextAnimationFrame = (runner, priority = 0) => { - let item = new AnimationFrameQueueItem(runner, priority); - NEXT_QUEUE.push(item); - if (!animFrameRequested) { - animFrameRequested = true; - doRequestAnimationFrame(animationFrameRunner); - } - return item; - }; - runAtThisOrScheduleAtNextAnimationFrame = (runner, priority) => { - if (inAnimationFrameRunner) { - let item = new AnimationFrameQueueItem(runner, priority); - CURRENT_QUEUE.push(item); - return item; - } - else { - return scheduleAtNextAnimationFrame(runner, priority); - } - }; -})(); -const MINIMUM_TIME_MS = 16; -const DEFAULT_EVENT_MERGER = function (lastEvent, currentEvent) { - return currentEvent; -}; -class TimeoutThrottledDomListener extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(node, type, handler, eventMerger = DEFAULT_EVENT_MERGER, minimumTimeMs = MINIMUM_TIME_MS) { - super(); - let lastEvent = null; - let lastHandlerTime = 0; - let timeout = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_4__["TimeoutTimer"]()); - let invokeHandler = () => { - lastHandlerTime = (new Date()).getTime(); - handler(lastEvent); - lastEvent = null; - }; - this._register(addDisposableListener(node, type, (e) => { - lastEvent = eventMerger(lastEvent, e); - let elapsedTime = (new Date()).getTime() - lastHandlerTime; - if (elapsedTime >= minimumTimeMs) { - timeout.cancel(); - invokeHandler(); - } - else { - timeout.setIfNotSet(invokeHandler, minimumTimeMs - elapsedTime); - } - })); - } -} -function addDisposableThrottledListener(node, type, handler, eventMerger, minimumTimeMs) { - return new TimeoutThrottledDomListener(node, type, handler, eventMerger, minimumTimeMs); -} -function getComputedStyle(el) { - return document.defaultView.getComputedStyle(el, null); -} -function getClientArea(element) { - // Try with DOM clientWidth / clientHeight - if (element !== document.body) { - return new Dimension(element.clientWidth, element.clientHeight); - } - // If visual view port exits and it's on mobile, it should be used instead of window innerWidth / innerHeight, or document.body.clientWidth / document.body.clientHeight - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_8__["isIOS"] && window.visualViewport) { - const width = window.visualViewport.width; - const height = window.visualViewport.height - (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isStandalone"] - // in PWA mode, the visual viewport always includes the safe-area-inset-bottom (which is for the home indicator) - // even when you are using the onscreen monitor, the visual viewport will include the area between system statusbar and the onscreen keyboard - // plus the area between onscreen keyboard and the bottom bezel, which is 20px on iOS. - ? (20 + 4) // + 4px for body margin - : 0); - return new Dimension(width, height); - } - // Try innerWidth / innerHeight - if (window.innerWidth && window.innerHeight) { - return new Dimension(window.innerWidth, window.innerHeight); - } - // Try with document.body.clientWidth / document.body.clientHeight - if (document.body && document.body.clientWidth && document.body.clientHeight) { - return new Dimension(document.body.clientWidth, document.body.clientHeight); - } - // Try with document.documentElement.clientWidth / document.documentElement.clientHeight - if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientHeight) { - return new Dimension(document.documentElement.clientWidth, document.documentElement.clientHeight); - } - throw new Error('Unable to figure out browser width and height'); -} -class SizeUtils { - // Adapted from WinJS - // Converts a CSS positioning string for the specified element to pixels. - static convertToPixels(element, value) { - return parseFloat(value) || 0; - } - static getDimension(element, cssPropertyName, jsPropertyName) { - let computedStyle = getComputedStyle(element); - let value = '0'; - if (computedStyle) { - if (computedStyle.getPropertyValue) { - value = computedStyle.getPropertyValue(cssPropertyName); - } - else { - // IE8 - value = computedStyle.getAttribute(jsPropertyName); - } - } - return SizeUtils.convertToPixels(element, value); - } - static getBorderLeftWidth(element) { - return SizeUtils.getDimension(element, 'border-left-width', 'borderLeftWidth'); - } - static getBorderRightWidth(element) { - return SizeUtils.getDimension(element, 'border-right-width', 'borderRightWidth'); - } - static getBorderTopWidth(element) { - return SizeUtils.getDimension(element, 'border-top-width', 'borderTopWidth'); - } - static getBorderBottomWidth(element) { - return SizeUtils.getDimension(element, 'border-bottom-width', 'borderBottomWidth'); - } - static getPaddingLeft(element) { - return SizeUtils.getDimension(element, 'padding-left', 'paddingLeft'); - } - static getPaddingRight(element) { - return SizeUtils.getDimension(element, 'padding-right', 'paddingRight'); - } - static getPaddingTop(element) { - return SizeUtils.getDimension(element, 'padding-top', 'paddingTop'); - } - static getPaddingBottom(element) { - return SizeUtils.getDimension(element, 'padding-bottom', 'paddingBottom'); - } - static getMarginLeft(element) { - return SizeUtils.getDimension(element, 'margin-left', 'marginLeft'); - } - static getMarginTop(element) { - return SizeUtils.getDimension(element, 'margin-top', 'marginTop'); - } - static getMarginRight(element) { - return SizeUtils.getDimension(element, 'margin-right', 'marginRight'); - } - static getMarginBottom(element) { - return SizeUtils.getDimension(element, 'margin-bottom', 'marginBottom'); - } -} -class Dimension { - constructor(width, height) { - this.width = width; - this.height = height; - } -} -function getTopLeftOffset(element) { - // Adapted from WinJS.Utilities.getPosition - // and added borders to the mix - let offsetParent = element.offsetParent; - let top = element.offsetTop; - let left = element.offsetLeft; - while ((element = element.parentNode) !== null - && element !== document.body - && element !== document.documentElement) { - top -= element.scrollTop; - const c = isShadowRoot(element) ? null : getComputedStyle(element); - if (c) { - left -= c.direction !== 'rtl' ? element.scrollLeft : -element.scrollLeft; - } - if (element === offsetParent) { - left += SizeUtils.getBorderLeftWidth(element); - top += SizeUtils.getBorderTopWidth(element); - top += element.offsetTop; - left += element.offsetLeft; - offsetParent = element.offsetParent; - } - } - return { - left: left, - top: top - }; -} -/** - * Returns the position of a dom node relative to the entire page. - */ -function getDomNodePagePosition(domNode) { - let bb = domNode.getBoundingClientRect(); - return { - left: bb.left + StandardWindow.scrollX, - top: bb.top + StandardWindow.scrollY, - width: bb.width, - height: bb.height - }; -} -const StandardWindow = new class { - get scrollX() { - if (typeof window.scrollX === 'number') { - // modern browsers - return window.scrollX; - } - else { - return document.body.scrollLeft + document.documentElement.scrollLeft; - } - } - get scrollY() { - if (typeof window.scrollY === 'number') { - // modern browsers - return window.scrollY; - } - else { - return document.body.scrollTop + document.documentElement.scrollTop; - } - } -}; -// Adapted from WinJS -// Gets the width of the element, including margins. -function getTotalWidth(element) { - let margin = SizeUtils.getMarginLeft(element) + SizeUtils.getMarginRight(element); - return element.offsetWidth + margin; -} -function getContentWidth(element) { - let border = SizeUtils.getBorderLeftWidth(element) + SizeUtils.getBorderRightWidth(element); - let padding = SizeUtils.getPaddingLeft(element) + SizeUtils.getPaddingRight(element); - return element.offsetWidth - border - padding; -} -// Adapted from WinJS -// Gets the height of the content of the specified element. The content height does not include borders or padding. -function getContentHeight(element) { - let border = SizeUtils.getBorderTopWidth(element) + SizeUtils.getBorderBottomWidth(element); - let padding = SizeUtils.getPaddingTop(element) + SizeUtils.getPaddingBottom(element); - return element.offsetHeight - border - padding; -} -// Adapted from WinJS -// Gets the height of the element, including its margins. -function getTotalHeight(element) { - let margin = SizeUtils.getMarginTop(element) + SizeUtils.getMarginBottom(element); - return element.offsetHeight + margin; -} -// ---------------------------------------------------------------------------------------- -function isAncestor(testChild, testAncestor) { - while (testChild) { - if (testChild === testAncestor) { - return true; - } - testChild = testChild.parentNode; - } - return false; -} -function findParentWithClass(node, clazz, stopAtClazzOrNode) { - while (node && node.nodeType === node.ELEMENT_NODE) { - if (hasClass(node, clazz)) { - return node; - } - if (stopAtClazzOrNode) { - if (typeof stopAtClazzOrNode === 'string') { - if (hasClass(node, stopAtClazzOrNode)) { - return null; - } - } - else { - if (node === stopAtClazzOrNode) { - return null; - } - } - } - node = node.parentNode; - } - return null; -} -function hasParentWithClass(node, clazz, stopAtClazzOrNode) { - return !!findParentWithClass(node, clazz, stopAtClazzOrNode); -} -function isShadowRoot(node) { - return (node && !!node.host && !!node.mode); -} -function isInShadowDOM(domNode) { - return !!getShadowRoot(domNode); -} -function getShadowRoot(domNode) { - while (domNode.parentNode) { - if (domNode === document.body) { - // reached the body - return null; - } - domNode = domNode.parentNode; - } - return isShadowRoot(domNode) ? domNode : null; -} -function getActiveElement() { - let result = document.activeElement; - while (result === null || result === void 0 ? void 0 : result.shadowRoot) { - result = result.shadowRoot.activeElement; - } - return result; -} -function createStyleSheet(container = document.getElementsByTagName('head')[0]) { - let style = document.createElement('style'); - style.type = 'text/css'; - style.media = 'screen'; - container.appendChild(style); - return style; -} -let _sharedStyleSheet = null; -function getSharedStyleSheet() { - if (!_sharedStyleSheet) { - _sharedStyleSheet = createStyleSheet(); - } - return _sharedStyleSheet; -} -function getDynamicStyleSheetRules(style) { - if (style && style.sheet && style.sheet.rules) { - // Chrome, IE - return style.sheet.rules; - } - if (style && style.sheet && style.sheet.cssRules) { - // FF - return style.sheet.cssRules; - } - return []; -} -function createCSSRule(selector, cssText, style = getSharedStyleSheet()) { - if (!style || !cssText) { - return; - } - style.sheet.insertRule(selector + '{' + cssText + '}', 0); -} -function removeCSSRulesContainingSelector(ruleName, style = getSharedStyleSheet()) { - if (!style) { - return; - } - let rules = getDynamicStyleSheetRules(style); - let toDelete = []; - for (let i = 0; i < rules.length; i++) { - let rule = rules[i]; - if (rule.selectorText.indexOf(ruleName) !== -1) { - toDelete.push(i); - } - } - for (let i = toDelete.length - 1; i >= 0; i--) { - style.sheet.deleteRule(toDelete[i]); - } -} -function isHTMLElement(o) { - if (typeof HTMLElement === 'object') { - return o instanceof HTMLElement; - } - return o && typeof o === 'object' && o.nodeType === 1 && typeof o.nodeName === 'string'; -} -const EventType = { - // Mouse - CLICK: 'click', - AUXCLICK: 'auxclick', - DBLCLICK: 'dblclick', - MOUSE_UP: 'mouseup', - MOUSE_DOWN: 'mousedown', - MOUSE_OVER: 'mouseover', - MOUSE_MOVE: 'mousemove', - MOUSE_OUT: 'mouseout', - MOUSE_ENTER: 'mouseenter', - MOUSE_LEAVE: 'mouseleave', - MOUSE_WHEEL: _browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"] ? 'mousewheel' : 'wheel', - POINTER_UP: 'pointerup', - POINTER_DOWN: 'pointerdown', - POINTER_MOVE: 'pointermove', - CONTEXT_MENU: 'contextmenu', - WHEEL: 'wheel', - // Keyboard - KEY_DOWN: 'keydown', - KEY_PRESS: 'keypress', - KEY_UP: 'keyup', - // HTML Document - LOAD: 'load', - BEFORE_UNLOAD: 'beforeunload', - UNLOAD: 'unload', - ABORT: 'abort', - ERROR: 'error', - RESIZE: 'resize', - SCROLL: 'scroll', - FULLSCREEN_CHANGE: 'fullscreenchange', - WK_FULLSCREEN_CHANGE: 'webkitfullscreenchange', - // Form - SELECT: 'select', - CHANGE: 'change', - SUBMIT: 'submit', - RESET: 'reset', - FOCUS: 'focus', - FOCUS_IN: 'focusin', - FOCUS_OUT: 'focusout', - BLUR: 'blur', - INPUT: 'input', - // Local Storage - STORAGE: 'storage', - // Drag - DRAG_START: 'dragstart', - DRAG: 'drag', - DRAG_ENTER: 'dragenter', - DRAG_LEAVE: 'dragleave', - DRAG_OVER: 'dragover', - DROP: 'drop', - DRAG_END: 'dragend', - // Animation - ANIMATION_START: _browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"] ? 'webkitAnimationStart' : 'animationstart', - ANIMATION_END: _browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"] ? 'webkitAnimationEnd' : 'animationend', - ANIMATION_ITERATION: _browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"] ? 'webkitAnimationIteration' : 'animationiteration' -}; -const EventHelper = { - stop: function (e, cancelBubble) { - if (e.preventDefault) { - e.preventDefault(); - } - else { - // IE8 - e.returnValue = false; - } - if (cancelBubble) { - if (e.stopPropagation) { - e.stopPropagation(); - } - else { - // IE8 - e.cancelBubble = true; - } - } - } -}; -function saveParentsScrollTop(node) { - let r = []; - for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) { - r[i] = node.scrollTop; - node = node.parentNode; - } - return r; -} -function restoreParentsScrollTop(node, state) { - for (let i = 0; node && node.nodeType === node.ELEMENT_NODE; i++) { - if (node.scrollTop !== state[i]) { - node.scrollTop = state[i]; - } - node = node.parentNode; - } -} -class FocusTracker extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(element) { - super(); - this._onDidFocus = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidFocus = this._onDidFocus.event; - this._onDidBlur = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidBlur = this._onDidBlur.event; - let hasFocus = isAncestor(document.activeElement, element); - let loosingFocus = false; - const onFocus = () => { - loosingFocus = false; - if (!hasFocus) { - hasFocus = true; - this._onDidFocus.fire(); - } - }; - const onBlur = () => { - if (hasFocus) { - loosingFocus = true; - window.setTimeout(() => { - if (loosingFocus) { - loosingFocus = false; - hasFocus = false; - this._onDidBlur.fire(); - } - }, 0); - } - }; - this._refreshStateHandler = () => { - let currentNodeHasFocus = isAncestor(document.activeElement, element); - if (currentNodeHasFocus !== hasFocus) { - if (hasFocus) { - onBlur(); - } - else { - onFocus(); - } - } - }; - this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(element, EventType.FOCUS, true)(onFocus)); - this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(element, EventType.BLUR, true)(onBlur)); - } -} -function trackFocus(element) { - return new FocusTracker(element); -} -function append(parent, ...children) { - children.forEach(child => parent.appendChild(child)); - return children[children.length - 1]; -} -const SELECTOR_REGEX = /([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/; -function reset(parent, ...children) { - parent.innerText = ''; - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_9__["coalesce"])(children) - .forEach(child => { - if (child instanceof Node) { - parent.appendChild(child); - } - else { - parent.appendChild(document.createTextNode(child)); - } - }); -} -var Namespace; -(function (Namespace) { - Namespace["HTML"] = "http://www.w3.org/1999/xhtml"; - Namespace["SVG"] = "http://www.w3.org/2000/svg"; -})(Namespace || (Namespace = {})); -function _$(namespace, description, attrs, ...children) { - let match = SELECTOR_REGEX.exec(description); - if (!match) { - throw new Error('Bad use of emmet'); - } - attrs = Object.assign({}, (attrs || {})); - let tagName = match[1] || 'div'; - let result; - if (namespace !== Namespace.HTML) { - result = document.createElementNS(namespace, tagName); - } - else { - result = document.createElement(tagName); - } - if (match[3]) { - result.id = match[3]; - } - if (match[4]) { - result.className = match[4].replace(/\./g, ' ').trim(); - } - Object.keys(attrs).forEach(name => { - const value = attrs[name]; - if (typeof value === 'undefined') { - return; - } - if (/^on\w+$/.test(name)) { - result[name] = value; - } - else if (name === 'selected') { - if (value) { - result.setAttribute(name, 'true'); - } - } - else { - result.setAttribute(name, value); - } - }); - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_9__["coalesce"])(children) - .forEach(child => { - if (child instanceof Node) { - result.appendChild(child); - } - else { - result.appendChild(document.createTextNode(child)); - } - }); - return result; -} -function $(description, attrs, ...children) { - return _$(Namespace.HTML, description, attrs, ...children); -} -$.SVG = function (description, attrs, ...children) { - return _$(Namespace.SVG, description, attrs, ...children); -}; -function show(...elements) { - for (let element of elements) { - element.style.display = ''; - element.removeAttribute('aria-hidden'); - } -} -function hide(...elements) { - for (let element of elements) { - element.style.display = 'none'; - element.setAttribute('aria-hidden', 'true'); - } -} -function findParentWithAttribute(node, attribute) { - while (node && node.nodeType === node.ELEMENT_NODE) { - if (node instanceof HTMLElement && node.hasAttribute(attribute)) { - return node; - } - node = node.parentNode; - } - return null; -} -function removeTabIndexAndUpdateFocus(node) { - if (!node || !node.hasAttribute('tabIndex')) { - return; - } - // If we are the currently focused element and tabIndex is removed, - // standard DOM behavior is to move focus to the element. We - // typically never want that, rather put focus to the closest element - // in the hierarchy of the parent DOM nodes. - if (document.activeElement === node) { - let parentFocusable = findParentWithAttribute(node.parentElement, 'tabIndex'); - if (parentFocusable) { - parentFocusable.focus(); - } - } - node.removeAttribute('tabindex'); -} -function getElementsByTagName(tag) { - return Array.prototype.slice.call(document.getElementsByTagName(tag), 0); -} -/** - * Find a value usable for a dom node size such that the likelihood that it would be - * displayed with constant screen pixels size is as high as possible. - * - * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio - * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps" - * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels. - */ -function computeScreenAwareSize(cssPx) { - const screenPx = window.devicePixelRatio * cssPx; - return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio; -} -/** - * See https://github.com/Microsoft/monaco-editor/issues/601 - * To protect against malicious code in the linked site, particularly phishing attempts, - * the window.opener should be set to null to prevent the linked site from having access - * to change the location of the current page. - * See https://mathiasbynens.github.io/rel-noopener/ - */ -function windowOpenNoOpener(url) { - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_8__["isNative"] || _browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdgeWebView"]) { - // In VSCode, window.open() always returns null... - // The same is true for a WebView (see https://github.com/Microsoft/monaco-editor/issues/628) - window.open(url); - } - else { - let newTab = window.open(); - if (newTab) { - newTab.opener = null; - newTab.location.href = url; - } - } -} -function animate(fn) { - const step = () => { - fn(); - stepDisposable = scheduleAtNextAnimationFrame(step); - }; - let stepDisposable = scheduleAtNextAnimationFrame(step); - return Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["toDisposable"])(() => stepDisposable.dispose()); -} -_common_network_js__WEBPACK_IMPORTED_MODULE_10__["RemoteAuthorities"].setPreferredWebSchema(/^https:/.test(window.location.href) ? 'https' : 'http'); -function asDomUri(uri) { - if (!uri) { - return uri; - } - if (_common_network_js__WEBPACK_IMPORTED_MODULE_10__["Schemas"].vscodeRemote === uri.scheme) { - return _common_network_js__WEBPACK_IMPORTED_MODULE_10__["RemoteAuthorities"].rewrite(uri); - } - return uri; -} -/** - * returns url('...') - */ -function asCSSUrl(uri) { - if (!uri) { - return `url('')`; - } - return `url('${asDomUri(uri).toString(true).replace(/'/g, '%27')}')`; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/event.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/event.js ***! - \*****************************************************************/ -/*! exports provided: domEvent, stop */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "domEvent", function() { return domEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stop", function() { return stop; }); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const domEvent = (element, type, useCapture) => { - const fn = (e) => emitter.fire(e); - const emitter = new _common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]({ - onFirstListenerAdd: () => { - element.addEventListener(type, fn, useCapture); - }, - onLastListenerRemove: () => { - element.removeEventListener(type, fn, useCapture); - } - }); - return emitter.event; -}; -function stop(event) { - return _common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].map(event, e => { - e.preventDefault(); - e.stopPropagation(); - return e; - }); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js ***! - \***********************************************************************/ -/*! exports provided: FastDomNode, createFastDomNode */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FastDomNode", function() { return FastDomNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFastDomNode", function() { return createFastDomNode; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class FastDomNode { - constructor(domNode) { - this.domNode = domNode; - this._maxWidth = -1; - this._width = -1; - this._height = -1; - this._top = -1; - this._left = -1; - this._bottom = -1; - this._right = -1; - this._fontFamily = ''; - this._fontWeight = ''; - this._fontSize = -1; - this._fontFeatureSettings = ''; - this._lineHeight = -1; - this._letterSpacing = -100; - this._className = ''; - this._display = ''; - this._position = ''; - this._visibility = ''; - this._backgroundColor = ''; - this._layerHint = false; - this._contain = 'none'; - this._boxShadow = ''; - } - setMaxWidth(maxWidth) { - if (this._maxWidth === maxWidth) { - return; - } - this._maxWidth = maxWidth; - this.domNode.style.maxWidth = this._maxWidth + 'px'; - } - setWidth(width) { - if (this._width === width) { - return; - } - this._width = width; - this.domNode.style.width = this._width + 'px'; - } - setHeight(height) { - if (this._height === height) { - return; - } - this._height = height; - this.domNode.style.height = this._height + 'px'; - } - setTop(top) { - if (this._top === top) { - return; - } - this._top = top; - this.domNode.style.top = this._top + 'px'; - } - unsetTop() { - if (this._top === -1) { - return; - } - this._top = -1; - this.domNode.style.top = ''; - } - setLeft(left) { - if (this._left === left) { - return; - } - this._left = left; - this.domNode.style.left = this._left + 'px'; - } - setBottom(bottom) { - if (this._bottom === bottom) { - return; - } - this._bottom = bottom; - this.domNode.style.bottom = this._bottom + 'px'; - } - setRight(right) { - if (this._right === right) { - return; - } - this._right = right; - this.domNode.style.right = this._right + 'px'; - } - setFontFamily(fontFamily) { - if (this._fontFamily === fontFamily) { - return; - } - this._fontFamily = fontFamily; - this.domNode.style.fontFamily = this._fontFamily; - } - setFontWeight(fontWeight) { - if (this._fontWeight === fontWeight) { - return; - } - this._fontWeight = fontWeight; - this.domNode.style.fontWeight = this._fontWeight; - } - setFontSize(fontSize) { - if (this._fontSize === fontSize) { - return; - } - this._fontSize = fontSize; - this.domNode.style.fontSize = this._fontSize + 'px'; - } - setFontFeatureSettings(fontFeatureSettings) { - if (this._fontFeatureSettings === fontFeatureSettings) { - return; - } - this._fontFeatureSettings = fontFeatureSettings; - this.domNode.style.fontFeatureSettings = this._fontFeatureSettings; - } - setLineHeight(lineHeight) { - if (this._lineHeight === lineHeight) { - return; - } - this._lineHeight = lineHeight; - this.domNode.style.lineHeight = this._lineHeight + 'px'; - } - setLetterSpacing(letterSpacing) { - if (this._letterSpacing === letterSpacing) { - return; - } - this._letterSpacing = letterSpacing; - this.domNode.style.letterSpacing = this._letterSpacing + 'px'; - } - setClassName(className) { - if (this._className === className) { - return; - } - this._className = className; - this.domNode.className = this._className; - } - toggleClassName(className, shouldHaveIt) { - _dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this.domNode, className, shouldHaveIt); - this._className = this.domNode.className; - } - setDisplay(display) { - if (this._display === display) { - return; - } - this._display = display; - this.domNode.style.display = this._display; - } - setPosition(position) { - if (this._position === position) { - return; - } - this._position = position; - this.domNode.style.position = this._position; - } - setVisibility(visibility) { - if (this._visibility === visibility) { - return; - } - this._visibility = visibility; - this.domNode.style.visibility = this._visibility; - } - setBackgroundColor(backgroundColor) { - if (this._backgroundColor === backgroundColor) { - return; - } - this._backgroundColor = backgroundColor; - this.domNode.style.backgroundColor = this._backgroundColor; - } - setLayerHinting(layerHint) { - if (this._layerHint === layerHint) { - return; - } - this._layerHint = layerHint; - this.domNode.style.transform = this._layerHint ? 'translate3d(0px, 0px, 0px)' : ''; - } - setBoxShadow(boxShadow) { - if (this._boxShadow === boxShadow) { - return; - } - this._boxShadow = boxShadow; - this.domNode.style.boxShadow = boxShadow; - } - setContain(contain) { - if (this._contain === contain) { - return; - } - this._contain = contain; - this.domNode.style.contain = this._contain; - } - setAttribute(name, value) { - this.domNode.setAttribute(name, value); - } - removeAttribute(name) { - this.domNode.removeAttribute(name); - } - appendChild(child) { - this.domNode.appendChild(child.domNode); - } - removeChild(child) { - this.domNode.removeChild(child.domNode); - } -} -function createFastDomNode(domNode) { - return new FastDomNode(domNode); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js ***! - \*********************************************************************************/ -/*! exports provided: renderText, renderFormattedText, createElement */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderText", function() { return renderText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderFormattedText", function() { return renderFormattedText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return createElement; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -function renderText(text, options = {}) { - const element = createElement(options); - element.textContent = text; - return element; -} -function renderFormattedText(formattedText, options = {}) { - const element = createElement(options); - _renderFormattedText(element, parseFormattedText(formattedText), options.actionHandler); - return element; -} -function createElement(options) { - const tagName = options.inline ? 'span' : 'div'; - const element = document.createElement(tagName); - if (options.className) { - element.className = options.className; - } - return element; -} -class StringStream { - constructor(source) { - this.source = source; - this.index = 0; - } - eos() { - return this.index >= this.source.length; - } - next() { - const next = this.peek(); - this.advance(); - return next; - } - peek() { - return this.source[this.index]; - } - advance() { - this.index++; - } -} -function _renderFormattedText(element, treeNode, actionHandler) { - let child; - if (treeNode.type === 2 /* Text */) { - child = document.createTextNode(treeNode.content || ''); - } - else if (treeNode.type === 3 /* Bold */) { - child = document.createElement('b'); - } - else if (treeNode.type === 4 /* Italics */) { - child = document.createElement('i'); - } - else if (treeNode.type === 5 /* Action */ && actionHandler) { - const a = document.createElement('a'); - a.href = '#'; - actionHandler.disposeables.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addStandardDisposableListener"](a, 'click', (event) => { - actionHandler.callback(String(treeNode.index), event); - })); - child = a; - } - else if (treeNode.type === 7 /* NewLine */) { - child = document.createElement('br'); - } - else if (treeNode.type === 1 /* Root */) { - child = element; - } - if (child && element !== child) { - element.appendChild(child); - } - if (child && Array.isArray(treeNode.children)) { - treeNode.children.forEach((nodeChild) => { - _renderFormattedText(child, nodeChild, actionHandler); - }); - } -} -function parseFormattedText(content) { - const root = { - type: 1 /* Root */, - children: [] - }; - let actionViewItemIndex = 0; - let current = root; - const stack = []; - const stream = new StringStream(content); - while (!stream.eos()) { - let next = stream.next(); - const isEscapedFormatType = (next === '\\' && formatTagType(stream.peek()) !== 0 /* Invalid */); - if (isEscapedFormatType) { - next = stream.next(); // unread the backslash if it escapes a format tag type - } - if (!isEscapedFormatType && isFormatTag(next) && next === stream.peek()) { - stream.advance(); - if (current.type === 2 /* Text */) { - current = stack.pop(); - } - const type = formatTagType(next); - if (current.type === type || (current.type === 5 /* Action */ && type === 6 /* ActionClose */)) { - current = stack.pop(); - } - else { - const newCurrent = { - type: type, - children: [] - }; - if (type === 5 /* Action */) { - newCurrent.index = actionViewItemIndex; - actionViewItemIndex++; - } - current.children.push(newCurrent); - stack.push(current); - current = newCurrent; - } - } - else if (next === '\n') { - if (current.type === 2 /* Text */) { - current = stack.pop(); - } - current.children.push({ - type: 7 /* NewLine */ - }); - } - else { - if (current.type !== 2 /* Text */) { - const textCurrent = { - type: 2 /* Text */, - content: next - }; - current.children.push(textCurrent); - stack.push(current); - current = textCurrent; - } - else { - current.content += next; - } - } - } - if (current.type === 2 /* Text */) { - current = stack.pop(); - } - if (stack.length) { - // incorrectly formatted string literal - } - return root; -} -function isFormatTag(char) { - return formatTagType(char) !== 0 /* Invalid */; -} -function formatTagType(char) { - switch (char) { - case '*': - return 3 /* Bold */; - case '_': - return 4 /* Italics */; - case '[': - return 5 /* Action */; - case ']': - return 6 /* ActionClose */; - default: - return 0 /* Invalid */; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js ***! - \**********************************************************************************/ -/*! exports provided: standardMouseMoveMerger, GlobalMouseMoveMonitor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "standardMouseMoveMerger", function() { return standardMouseMoveMerger; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalMouseMoveMonitor", function() { return GlobalMouseMoveMonitor; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./iframe.js */ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -function standardMouseMoveMerger(lastEvent, currentEvent) { - let ev = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](currentEvent); - ev.preventDefault(); - return { - leftButton: ev.leftButton, - buttons: ev.buttons, - posx: ev.posx, - posy: ev.posy - }; -} -class GlobalMouseMoveMonitor { - constructor() { - this._hooks = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this._mouseMoveEventMerger = null; - this._mouseMoveCallback = null; - this._onStopCallback = null; - } - dispose() { - this.stopMonitoring(false); - this._hooks.dispose(); - } - stopMonitoring(invokeStopCallback) { - if (!this.isMonitoring()) { - // Not monitoring - return; - } - // Unhook - this._hooks.clear(); - this._mouseMoveEventMerger = null; - this._mouseMoveCallback = null; - const onStopCallback = this._onStopCallback; - this._onStopCallback = null; - if (invokeStopCallback && onStopCallback) { - onStopCallback(); - } - } - isMonitoring() { - return !!this._mouseMoveEventMerger; - } - startMonitoring(initialElement, initialButtons, mouseMoveEventMerger, mouseMoveCallback, onStopCallback) { - if (this.isMonitoring()) { - // I am already hooked - return; - } - this._mouseMoveEventMerger = mouseMoveEventMerger; - this._mouseMoveCallback = mouseMoveCallback; - this._onStopCallback = onStopCallback; - const windowChain = _iframe_js__WEBPACK_IMPORTED_MODULE_2__["IframeUtils"].getSameOriginWindowChain(); - const mouseMove = _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents ? 'pointermove' : 'mousemove'; - const mouseUp = _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents ? 'pointerup' : 'mouseup'; - const listenTo = windowChain.map(element => element.window.document); - const shadowRoot = _dom_js__WEBPACK_IMPORTED_MODULE_0__["getShadowRoot"](initialElement); - if (shadowRoot) { - listenTo.unshift(shadowRoot); - } - for (const element of listenTo) { - this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableThrottledListener"](element, mouseMove, (data) => { - if (data.buttons !== initialButtons) { - // Buttons state has changed in the meantime - this.stopMonitoring(true); - return; - } - this._mouseMoveCallback(data); - }, (lastEvent, currentEvent) => this._mouseMoveEventMerger(lastEvent, currentEvent))); - this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](element, mouseUp, (e) => this.stopMonitoring(true))); - } - if (_iframe_js__WEBPACK_IMPORTED_MODULE_2__["IframeUtils"].hasDifferentOriginAncestor()) { - let lastSameOriginAncestor = windowChain[windowChain.length - 1]; - // We might miss a mouse up if it happens outside the iframe - // This one is for Chrome - this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document, 'mouseout', (browserEvent) => { - let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](browserEvent); - if (e.target.tagName.toLowerCase() === 'html') { - this.stopMonitoring(true); - } - })); - // This one is for FF - this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document, 'mouseover', (browserEvent) => { - let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](browserEvent); - if (e.target.tagName.toLowerCase() === 'html') { - this.stopMonitoring(true); - } - })); - // This one is for IE - this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent) => { - this.stopMonitoring(true); - })); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/iframe.js ***! - \******************************************************************/ -/*! exports provided: IframeUtils */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IframeUtils", function() { return IframeUtils; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -let hasDifferentOriginAncestorFlag = false; -let sameOriginWindowChainCache = null; -function getParentWindowIfSameOrigin(w) { - if (!w.parent || w.parent === w) { - return null; - } - // Cannot really tell if we have access to the parent window unless we try to access something in it - try { - let location = w.location; - let parentLocation = w.parent.location; - if (location.origin !== 'null' && parentLocation.origin !== 'null') { - if (location.protocol !== parentLocation.protocol || location.hostname !== parentLocation.hostname || location.port !== parentLocation.port) { - hasDifferentOriginAncestorFlag = true; - return null; - } - } - } - catch (e) { - hasDifferentOriginAncestorFlag = true; - return null; - } - return w.parent; -} -class IframeUtils { - /** - * Returns a chain of embedded windows with the same origin (which can be accessed programmatically). - * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin. - * To distinguish if at one point the current execution environment is running inside a window with a different origin, see hasDifferentOriginAncestor() - */ - static getSameOriginWindowChain() { - if (!sameOriginWindowChainCache) { - sameOriginWindowChainCache = []; - let w = window; - let parent; - do { - parent = getParentWindowIfSameOrigin(w); - if (parent) { - sameOriginWindowChainCache.push({ - window: w, - iframeElement: w.frameElement || null - }); - } - else { - sameOriginWindowChainCache.push({ - window: w, - iframeElement: null - }); - } - w = parent; - } while (w); - } - return sameOriginWindowChainCache.slice(0); - } - /** - * Returns true if the current execution environment is chained in a list of iframes which at one point ends in a window with a different origin. - * Returns false if the current execution environment is not running inside an iframe or if the entire chain of iframes have the same origin. - */ - static hasDifferentOriginAncestor() { - if (!sameOriginWindowChainCache) { - this.getSameOriginWindowChain(); - } - return hasDifferentOriginAncestorFlag; - } - /** - * Returns the position of `childWindow` relative to `ancestorWindow` - */ - static getPositionOfChildWindowRelativeToAncestorWindow(childWindow, ancestorWindow) { - if (!ancestorWindow || childWindow === ancestorWindow) { - return { - top: 0, - left: 0 - }; - } - let top = 0, left = 0; - let windowChain = this.getSameOriginWindowChain(); - for (const windowChainEl of windowChain) { - top += windowChainEl.window.scrollY; - left += windowChainEl.window.scrollX; - if (windowChainEl.window === ancestorWindow) { - break; - } - if (!windowChainEl.iframeElement) { - break; - } - let boundingRect = windowChainEl.iframeElement.getBoundingClientRect(); - top += boundingRect.top; - left += boundingRect.left; - } - return { - top: top, - left: left - }; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js ***! - \*************************************************************************/ -/*! exports provided: StandardKeyboardEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardKeyboardEvent", function() { return StandardKeyboardEvent; }); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -let KEY_CODE_MAP = new Array(230); -let INVERSE_KEY_CODE_MAP = new Array(112 /* MAX_VALUE */); -(function () { - for (let i = 0; i < INVERSE_KEY_CODE_MAP.length; i++) { - INVERSE_KEY_CODE_MAP[i] = -1; - } - function define(code, keyCode) { - KEY_CODE_MAP[code] = keyCode; - INVERSE_KEY_CODE_MAP[keyCode] = code; - } - define(3, 7 /* PauseBreak */); // VK_CANCEL 0x03 Control-break processing - define(8, 1 /* Backspace */); - define(9, 2 /* Tab */); - define(13, 3 /* Enter */); - define(16, 4 /* Shift */); - define(17, 5 /* Ctrl */); - define(18, 6 /* Alt */); - define(19, 7 /* PauseBreak */); - define(20, 8 /* CapsLock */); - define(27, 9 /* Escape */); - define(32, 10 /* Space */); - define(33, 11 /* PageUp */); - define(34, 12 /* PageDown */); - define(35, 13 /* End */); - define(36, 14 /* Home */); - define(37, 15 /* LeftArrow */); - define(38, 16 /* UpArrow */); - define(39, 17 /* RightArrow */); - define(40, 18 /* DownArrow */); - define(45, 19 /* Insert */); - define(46, 20 /* Delete */); - define(48, 21 /* KEY_0 */); - define(49, 22 /* KEY_1 */); - define(50, 23 /* KEY_2 */); - define(51, 24 /* KEY_3 */); - define(52, 25 /* KEY_4 */); - define(53, 26 /* KEY_5 */); - define(54, 27 /* KEY_6 */); - define(55, 28 /* KEY_7 */); - define(56, 29 /* KEY_8 */); - define(57, 30 /* KEY_9 */); - define(65, 31 /* KEY_A */); - define(66, 32 /* KEY_B */); - define(67, 33 /* KEY_C */); - define(68, 34 /* KEY_D */); - define(69, 35 /* KEY_E */); - define(70, 36 /* KEY_F */); - define(71, 37 /* KEY_G */); - define(72, 38 /* KEY_H */); - define(73, 39 /* KEY_I */); - define(74, 40 /* KEY_J */); - define(75, 41 /* KEY_K */); - define(76, 42 /* KEY_L */); - define(77, 43 /* KEY_M */); - define(78, 44 /* KEY_N */); - define(79, 45 /* KEY_O */); - define(80, 46 /* KEY_P */); - define(81, 47 /* KEY_Q */); - define(82, 48 /* KEY_R */); - define(83, 49 /* KEY_S */); - define(84, 50 /* KEY_T */); - define(85, 51 /* KEY_U */); - define(86, 52 /* KEY_V */); - define(87, 53 /* KEY_W */); - define(88, 54 /* KEY_X */); - define(89, 55 /* KEY_Y */); - define(90, 56 /* KEY_Z */); - define(93, 58 /* ContextMenu */); - define(96, 93 /* NUMPAD_0 */); - define(97, 94 /* NUMPAD_1 */); - define(98, 95 /* NUMPAD_2 */); - define(99, 96 /* NUMPAD_3 */); - define(100, 97 /* NUMPAD_4 */); - define(101, 98 /* NUMPAD_5 */); - define(102, 99 /* NUMPAD_6 */); - define(103, 100 /* NUMPAD_7 */); - define(104, 101 /* NUMPAD_8 */); - define(105, 102 /* NUMPAD_9 */); - define(106, 103 /* NUMPAD_MULTIPLY */); - define(107, 104 /* NUMPAD_ADD */); - define(108, 105 /* NUMPAD_SEPARATOR */); - define(109, 106 /* NUMPAD_SUBTRACT */); - define(110, 107 /* NUMPAD_DECIMAL */); - define(111, 108 /* NUMPAD_DIVIDE */); - define(112, 59 /* F1 */); - define(113, 60 /* F2 */); - define(114, 61 /* F3 */); - define(115, 62 /* F4 */); - define(116, 63 /* F5 */); - define(117, 64 /* F6 */); - define(118, 65 /* F7 */); - define(119, 66 /* F8 */); - define(120, 67 /* F9 */); - define(121, 68 /* F10 */); - define(122, 69 /* F11 */); - define(123, 70 /* F12 */); - define(124, 71 /* F13 */); - define(125, 72 /* F14 */); - define(126, 73 /* F15 */); - define(127, 74 /* F16 */); - define(128, 75 /* F17 */); - define(129, 76 /* F18 */); - define(130, 77 /* F19 */); - define(144, 78 /* NumLock */); - define(145, 79 /* ScrollLock */); - define(186, 80 /* US_SEMICOLON */); - define(187, 81 /* US_EQUAL */); - define(188, 82 /* US_COMMA */); - define(189, 83 /* US_MINUS */); - define(190, 84 /* US_DOT */); - define(191, 85 /* US_SLASH */); - define(192, 86 /* US_BACKTICK */); - define(193, 110 /* ABNT_C1 */); - define(194, 111 /* ABNT_C2 */); - define(219, 87 /* US_OPEN_SQUARE_BRACKET */); - define(220, 88 /* US_BACKSLASH */); - define(221, 89 /* US_CLOSE_SQUARE_BRACKET */); - define(222, 90 /* US_QUOTE */); - define(223, 91 /* OEM_8 */); - define(226, 92 /* OEM_102 */); - /** - * https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html - * If an Input Method Editor is processing key input and the event is keydown, return 229. - */ - define(229, 109 /* KEY_IN_COMPOSITION */); - if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"]) { - define(59, 80 /* US_SEMICOLON */); - define(107, 81 /* US_EQUAL */); - define(109, 83 /* US_MINUS */); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - define(224, 57 /* Meta */); - } - } - else if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"]) { - define(91, 57 /* Meta */); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - // the two meta keys in the Mac have different key codes (91 and 93) - define(93, 57 /* Meta */); - } - else { - define(92, 57 /* Meta */); - } - } -})(); -function extractKeyCode(e) { - if (e.charCode) { - // "keypress" events mostly - let char = String.fromCharCode(e.charCode).toUpperCase(); - return _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyCodeUtils"].fromString(char); - } - return KEY_CODE_MAP[e.keyCode] || 0 /* Unknown */; -} -const ctrlKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */); -const altKeyMod = 512 /* Alt */; -const shiftKeyMod = 1024 /* Shift */; -const metaKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 2048 /* CtrlCmd */ : 256 /* WinCtrl */); -class StandardKeyboardEvent { - constructor(source) { - this._standardKeyboardEventBrand = true; - let e = source; - this.browserEvent = e; - this.target = e.target; - this.ctrlKey = e.ctrlKey; - this.shiftKey = e.shiftKey; - this.altKey = e.altKey; - this.metaKey = e.metaKey; - this.keyCode = extractKeyCode(e); - this.code = e.code; - // console.info(e.type + ": keyCode: " + e.keyCode + ", which: " + e.which + ", charCode: " + e.charCode + ", detail: " + e.detail + " ====> " + this.keyCode + ' -- ' + KeyCode[this.keyCode]); - this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* Ctrl */; - this.altKey = this.altKey || this.keyCode === 6 /* Alt */; - this.shiftKey = this.shiftKey || this.keyCode === 4 /* Shift */; - this.metaKey = this.metaKey || this.keyCode === 57 /* Meta */; - this._asKeybinding = this._computeKeybinding(); - this._asRuntimeKeybinding = this._computeRuntimeKeybinding(); - // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`); - } - preventDefault() { - if (this.browserEvent && this.browserEvent.preventDefault) { - this.browserEvent.preventDefault(); - } - } - stopPropagation() { - if (this.browserEvent && this.browserEvent.stopPropagation) { - this.browserEvent.stopPropagation(); - } - } - toKeybinding() { - return this._asRuntimeKeybinding; - } - equals(other) { - return this._asKeybinding === other; - } - _computeKeybinding() { - let key = 0 /* Unknown */; - if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { - key = this.keyCode; - } - let result = 0; - if (this.ctrlKey) { - result |= ctrlKeyMod; - } - if (this.altKey) { - result |= altKeyMod; - } - if (this.shiftKey) { - result |= shiftKeyMod; - } - if (this.metaKey) { - result |= metaKeyMod; - } - result |= key; - return result; - } - _computeRuntimeKeybinding() { - let key = 0 /* Unknown */; - if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { - key = this.keyCode; - } - return new _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["SimpleKeybinding"](this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js ***! - \****************************************************************************/ -/*! exports provided: renderMarkdown */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderMarkdown", function() { return renderMarkdown; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formattedTextRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"); -/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); -/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/marked/marked.js */ "./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js"); -/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/insane/insane.js */ "./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js"); -/* harmony import */ var _common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/marshalling.js */ "./node_modules/monaco-editor/esm/vs/base/common/marshalling.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_uri_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _common_network_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _common_resources_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - -/** - * Create html nodes for the given content element. - */ -function renderMarkdown(markdown, options = {}, markedOptions = {}) { - var _a; - const element = Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__["createElement"])(options); - const _uriMassage = function (part) { - let data; - try { - data = Object(_common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__["parse"])(decodeURIComponent(part)); - } - catch (e) { - // ignore - } - if (!data) { - return part; - } - data = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_8__["cloneAndChange"])(data, value => { - if (markdown.uris && markdown.uris[value]) { - return _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].revive(markdown.uris[value]); - } - else { - return undefined; - } - }); - return encodeURIComponent(JSON.stringify(data)); - }; - const _href = function (href, isDomUri) { - const data = markdown.uris && markdown.uris[href]; - if (!data) { - return href; // no uri exists - } - let uri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].revive(data); - if (_common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].parse(href).toString() === uri.toString()) { - return href; // no tranformation performed - } - if (isDomUri) { - // this URI will end up as "src"-attribute of a dom node - // and because of that special rewriting needs to be done - // so that the URI uses a protocol that's understood by - // browsers (like http or https) - return _dom_js__WEBPACK_IMPORTED_MODULE_0__["asDomUri"](uri).toString(true); - } - if (uri.query) { - uri = uri.with({ query: _uriMassage(uri.query) }); - } - return uri.toString(); - }; - // signal to code-block render that the - // element has been created - let signalInnerHTML; - const withInnerHTML = new Promise(c => signalInnerHTML = c); - const renderer = new _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__["Renderer"](); - renderer.image = (href, title, text) => { - let dimensions = []; - let attributes = []; - if (href) { - ({ href, dimensions } = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["parseHrefAndDimensions"])(href)); - href = _href(href, true); - try { - const hrefAsUri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].parse(href); - if (options.baseUrl && hrefAsUri.scheme === _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].file) { // absolute or relative local path, or file: uri - href = Object(_common_resources_js__WEBPACK_IMPORTED_MODULE_13__["resolvePath"])(options.baseUrl, href).toString(); - } - } - catch (err) { } - attributes.push(`src="${href}"`); - } - if (text) { - attributes.push(`alt="${text}"`); - } - if (title) { - attributes.push(`title="${title}"`); - } - if (dimensions.length) { - attributes = attributes.concat(dimensions); - } - return ''; - }; - renderer.link = (href, title, text) => { - // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829 - if (href === text) { // raw link case - text = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(text); - } - href = _href(href, false); - if (options.baseUrl) { - const hasScheme = /^\w[\w\d+.-]*:/.test(href); - if (!hasScheme) { - href = Object(_common_resources_js__WEBPACK_IMPORTED_MODULE_13__["resolvePath"])(options.baseUrl, href).toString(); - } - } - title = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(title); - href = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(href); - if (!href - || href.match(/^data:|javascript:/i) - || (href.match(/^command:/i) && !markdown.isTrusted) - || href.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)) { - // drop the link - return text; - } - else { - // HTML Encode href - href = href.replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); - return `${text}`; - } - }; - renderer.paragraph = (text) => { - return `

${markdown.supportThemeIcons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_12__["renderCodicons"])(text) : text}

`; - }; - if (options.codeBlockRenderer) { - renderer.code = (code, lang) => { - const value = options.codeBlockRenderer(lang, code); - // when code-block rendering is async we return sync - // but update the node with the real result later. - const id = _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__["defaultGenerator"].nextId(); - const promise = Promise.all([value, withInnerHTML]).then(values => { - const strValue = values[0]; - const span = element.querySelector(`div[data-code="${id}"]`); - if (span) { - span.innerHTML = strValue; - } - }).catch(err => { - // ignore - }); - if (options.codeBlockRenderCallback) { - promise.then(options.codeBlockRenderCallback); - } - return `
${Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_9__["escape"])(code)}
`; - }; - } - const actionHandler = options.actionHandler; - if (actionHandler) { - [_dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].CLICK, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].AUXCLICK].forEach(event => { - actionHandler.disposeables.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](element, event, (e) => { - const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__["StandardMouseEvent"](e); - if (!mouseEvent.leftButton && !mouseEvent.middleButton) { - return; - } - let target = mouseEvent.target; - if (target.tagName !== 'A') { - target = target.parentElement; - if (!target || target.tagName !== 'A') { - return; - } - } - try { - const href = target.dataset['href']; - if (href) { - actionHandler.callback(href, mouseEvent); - } - } - catch (err) { - Object(_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedError"])(err); - } - finally { - mouseEvent.preventDefault(); - } - })); - }); - } - // Use our own sanitizer so that we can let through only spans. - // Otherwise, we'd be letting all html be rendered. - // If we want to allow markdown permitted tags, then we can delete sanitizer and sanitize. - markedOptions.sanitizer = (html) => { - const match = markdown.isTrusted ? html.match(/^()|(<\/\s*span>)$/) : undefined; - return match ? html : ''; - }; - markedOptions.sanitize = true; - markedOptions.renderer = renderer; - const allowedSchemes = [_common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].http, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].https, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].mailto, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].data, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].file, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].vscodeRemote, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].vscodeRemoteResource]; - if (markdown.isTrusted) { - allowedSchemes.push(_common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].command); - } - // values that are too long will freeze the UI - let value = (_a = markdown.value) !== null && _a !== void 0 ? _a : ''; - if (value.length > 100000) { - value = `${value.substr(0, 100000)}…`; - } - const renderedMarkdown = _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__["parse"](markdown.supportThemeIcons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_12__["markdownEscapeEscapedCodicons"])(value) : value, markedOptions); - function filter(token) { - if (token.tag === 'span' && markdown.isTrusted && (Object.keys(token.attrs).length === 1)) { - if (token.attrs['style']) { - return !!token.attrs['style'].match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/); - } - else if (token.attrs['class']) { - // The class should match codicon rendering in src\vs\base\common\codicons.ts - return !!token.attrs['class'].match(/^codicon codicon-[a-z\-]+( codicon-animation-[a-z\-]+)?$/); - } - return false; - } - return true; - } - element.innerHTML = Object(_common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__["insane"])(renderedMarkdown, { - allowedSchemes, - // allowedTags should included everything that markdown renders to. - // Since we have our own sanitize function for marked, it's possible we missed some tag so let insane make sure. - // HTML tags that can result from markdown are from reading https://spec.commonmark.org/0.29/ - // HTML table tags that can result from markdown are from https://github.github.com/gfm/#tables-extension- - allowedTags: ['ul', 'li', 'p', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span'], - allowedAttributes: { - 'a': ['href', 'name', 'target', 'data-href'], - 'img': ['src', 'title', 'alt', 'width', 'height'], - 'div': ['class', 'data-code'], - 'span': ['class', 'style'], - // https://github.com/microsoft/vscode/issues/95937 - 'th': ['align'], - 'td': ['align'] - }, - filter - }); - signalInnerHTML(); - return element; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js ***! - \**********************************************************************/ -/*! exports provided: StandardMouseEvent, StandardWheelEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardMouseEvent", function() { return StandardMouseEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardWheelEvent", function() { return StandardWheelEvent; }); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iframe.js */ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class StandardMouseEvent { - constructor(e) { - this.timestamp = Date.now(); - this.browserEvent = e; - this.leftButton = e.button === 0; - this.middleButton = e.button === 1; - this.rightButton = e.button === 2; - this.buttons = e.buttons; - this.target = e.target; - this.detail = e.detail || 1; - if (e.type === 'dblclick') { - this.detail = 2; - } - this.ctrlKey = e.ctrlKey; - this.shiftKey = e.shiftKey; - this.altKey = e.altKey; - this.metaKey = e.metaKey; - if (typeof e.pageX === 'number') { - this.posx = e.pageX; - this.posy = e.pageY; - } - else { - // Probably hit by MSGestureEvent - this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; - } - // Find the position of the iframe this code is executing in relative to the iframe where the event was captured. - let iframeOffsets = _iframe_js__WEBPACK_IMPORTED_MODULE_1__["IframeUtils"].getPositionOfChildWindowRelativeToAncestorWindow(self, e.view); - this.posx -= iframeOffsets.left; - this.posy -= iframeOffsets.top; - } - preventDefault() { - this.browserEvent.preventDefault(); - } - stopPropagation() { - this.browserEvent.stopPropagation(); - } -} -class StandardWheelEvent { - constructor(e, deltaX = 0, deltaY = 0) { - this.browserEvent = e || null; - this.target = e ? (e.target || e.targetNode || e.srcElement) : null; - this.deltaY = deltaY; - this.deltaX = deltaX; - if (e) { - // Old (deprecated) wheel events - let e1 = e; - let e2 = e; - // vertical delta scroll - if (typeof e1.wheelDeltaY !== 'undefined') { - this.deltaY = e1.wheelDeltaY / 120; - } - else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) { - this.deltaY = -e2.detail / 3; - } - else if (e.type === 'wheel') { - // Modern wheel event - // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent - const ev = e; - if (ev.deltaMode === ev.DOM_DELTA_LINE) { - // the deltas are expressed in lines - if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - this.deltaY = -e.deltaY / 3; - } - else { - this.deltaY = -e.deltaY; - } - } - else { - this.deltaY = -e.deltaY / 40; - } - } - // horizontal delta scroll - if (typeof e1.wheelDeltaX !== 'undefined') { - if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isSafari"] && _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWindows"]) { - this.deltaX = -(e1.wheelDeltaX / 120); - } - else { - this.deltaX = e1.wheelDeltaX / 120; - } - } - else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) { - this.deltaX = -e.detail / 3; - } - else if (e.type === 'wheel') { - // Modern wheel event - // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent - const ev = e; - if (ev.deltaMode === ev.DOM_DELTA_LINE) { - // the deltas are expressed in lines - if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - this.deltaX = -e.deltaX / 3; - } - else { - this.deltaX = -e.deltaX; - } - } - else { - this.deltaX = -e.deltaX / 40; - } - } - // Assume a vertical scroll if nothing else worked - if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) { - this.deltaY = e.wheelDelta / 120; - } - } - } - preventDefault() { - if (this.browserEvent) { - this.browserEvent.preventDefault(); - } - } - stopPropagation() { - if (this.browserEvent) { - this.browserEvent.stopPropagation(); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/touch.js ***! - \*****************************************************************/ -/*! exports provided: EventType, Gesture */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventType", function() { return EventType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gesture", function() { return Gesture; }); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - -var EventType; -(function (EventType) { - EventType.Tap = '-monaco-gesturetap'; - EventType.Change = '-monaco-gesturechange'; - EventType.Start = '-monaco-gesturestart'; - EventType.End = '-monaco-gesturesend'; - EventType.Contextmenu = '-monaco-gesturecontextmenu'; -})(EventType || (EventType = {})); -class Gesture extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(); - this.dispatched = false; - this.activeTouches = {}; - this.handle = null; - this.targets = []; - this.ignoreTargets = []; - this._lastSetTapCountTime = 0; - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchstart', (e) => this.onTouchStart(e), { passive: false })); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchend', (e) => this.onTouchEnd(e))); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchmove', (e) => this.onTouchMove(e), { passive: false })); - } - static addTarget(element) { - if (!Gesture.isTouchDevice()) { - return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - if (!Gesture.INSTANCE) { - Gesture.INSTANCE = new Gesture(); - } - Gesture.INSTANCE.targets.push(element); - return { - dispose: () => { - Gesture.INSTANCE.targets = Gesture.INSTANCE.targets.filter(t => t !== element); - } - }; - } - static ignoreTarget(element) { - if (!Gesture.isTouchDevice()) { - return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - if (!Gesture.INSTANCE) { - Gesture.INSTANCE = new Gesture(); - } - Gesture.INSTANCE.ignoreTargets.push(element); - return { - dispose: () => { - Gesture.INSTANCE.ignoreTargets = Gesture.INSTANCE.ignoreTargets.filter(t => t !== element); - } - }; - } - static isTouchDevice() { - // `'ontouchstart' in window` always evaluates to true with typescript's modern typings. This causes `window` to be - // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast - return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; - } - dispose() { - if (this.handle) { - this.handle.dispose(); - this.handle = null; - } - super.dispose(); - } - onTouchStart(e) { - let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - if (this.handle) { - this.handle.dispose(); - this.handle = null; - } - for (let i = 0, len = e.targetTouches.length; i < len; i++) { - let touch = e.targetTouches.item(i); - this.activeTouches[touch.identifier] = { - id: touch.identifier, - initialTarget: touch.target, - initialTimeStamp: timestamp, - initialPageX: touch.pageX, - initialPageY: touch.pageY, - rollingTimestamps: [timestamp], - rollingPageX: [touch.pageX], - rollingPageY: [touch.pageY] - }; - let evt = this.newGestureEvent(EventType.Start, touch.target); - evt.pageX = touch.pageX; - evt.pageY = touch.pageY; - this.dispatchEvent(evt); - } - if (this.dispatched) { - e.preventDefault(); - e.stopPropagation(); - this.dispatched = false; - } - } - onTouchEnd(e) { - let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - let activeTouchCount = Object.keys(this.activeTouches).length; - for (let i = 0, len = e.changedTouches.length; i < len; i++) { - let touch = e.changedTouches.item(i); - if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) { - console.warn('move of an UNKNOWN touch', touch); - continue; - } - let data = this.activeTouches[touch.identifier], holdTime = Date.now() - data.initialTimeStamp; - if (holdTime < Gesture.HOLD_DELAY - && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX)) < 30 - && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY)) < 30) { - let evt = this.newGestureEvent(EventType.Tap, data.initialTarget); - evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); - evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); - this.dispatchEvent(evt); - } - else if (holdTime >= Gesture.HOLD_DELAY - && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX)) < 30 - && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY)) < 30) { - let evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget); - evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); - evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); - this.dispatchEvent(evt); - } - else if (activeTouchCount === 1) { - let finalX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); - let finalY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); - let deltaT = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingTimestamps) - data.rollingTimestamps[0]; - let deltaX = finalX - data.rollingPageX[0]; - let deltaY = finalY - data.rollingPageY[0]; - // We need to get all the dispatch targets on the start of the inertia event - const dispatchTo = this.targets.filter(t => data.initialTarget instanceof Node && t.contains(data.initialTarget)); - this.inertia(dispatchTo, timestamp, // time now - Math.abs(deltaX) / deltaT, // speed - deltaX > 0 ? 1 : -1, // x direction - finalX, // x now - Math.abs(deltaY) / deltaT, // y speed - deltaY > 0 ? 1 : -1, // y direction - finalY // y now - ); - } - this.dispatchEvent(this.newGestureEvent(EventType.End, data.initialTarget)); - // forget about this touch - delete this.activeTouches[touch.identifier]; - } - if (this.dispatched) { - e.preventDefault(); - e.stopPropagation(); - this.dispatched = false; - } - } - newGestureEvent(type, initialTarget) { - let event = document.createEvent('CustomEvent'); - event.initEvent(type, false, true); - event.initialTarget = initialTarget; - event.tapCount = 0; - return event; - } - dispatchEvent(event) { - if (event.type === EventType.Tap) { - const currentTime = (new Date()).getTime(); - let setTapCount = 0; - if (currentTime - this._lastSetTapCountTime > Gesture.CLEAR_TAP_COUNT_TIME) { - setTapCount = 1; - } - else { - setTapCount = 2; - } - this._lastSetTapCountTime = currentTime; - event.tapCount = setTapCount; - } - else if (event.type === EventType.Change || event.type === EventType.Contextmenu) { - // tap is canceled by scrolling or context menu - this._lastSetTapCountTime = 0; - } - for (let i = 0; i < this.ignoreTargets.length; i++) { - if (event.initialTarget instanceof Node && this.ignoreTargets[i].contains(event.initialTarget)) { - return; - } - } - this.targets.forEach(target => { - if (event.initialTarget instanceof Node && target.contains(event.initialTarget)) { - target.dispatchEvent(event); - this.dispatched = true; - } - }); - } - inertia(dispatchTo, t1, vX, dirX, x, vY, dirY, y) { - this.handle = _dom_js__WEBPACK_IMPORTED_MODULE_2__["scheduleAtNextAnimationFrame"](() => { - let now = Date.now(); - // velocity: old speed + accel_over_time - let deltaT = now - t1, delta_pos_x = 0, delta_pos_y = 0, stopped = true; - vX += Gesture.SCROLL_FRICTION * deltaT; - vY += Gesture.SCROLL_FRICTION * deltaT; - if (vX > 0) { - stopped = false; - delta_pos_x = dirX * vX * deltaT; - } - if (vY > 0) { - stopped = false; - delta_pos_y = dirY * vY * deltaT; - } - // dispatch translation event - let evt = this.newGestureEvent(EventType.Change); - evt.translationX = delta_pos_x; - evt.translationY = delta_pos_y; - dispatchTo.forEach(d => d.dispatchEvent(evt)); - if (!stopped) { - this.inertia(dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y); - } - }); - } - onTouchMove(e) { - let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. - for (let i = 0, len = e.changedTouches.length; i < len; i++) { - let touch = e.changedTouches.item(i); - if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) { - console.warn('end of an UNKNOWN touch', touch); - continue; - } - let data = this.activeTouches[touch.identifier]; - let evt = this.newGestureEvent(EventType.Change, data.initialTarget); - evt.translationX = touch.pageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); - evt.translationY = touch.pageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); - evt.pageX = touch.pageX; - evt.pageY = touch.pageY; - this.dispatchEvent(evt); - // only keep a few data points, to average the final speed - if (data.rollingPageX.length > 3) { - data.rollingPageX.shift(); - data.rollingPageY.shift(); - data.rollingTimestamps.shift(); - } - data.rollingPageX.push(touch.pageX); - data.rollingPageY.push(touch.pageY); - data.rollingTimestamps.push(timestamp); - } - if (this.dispatched) { - e.preventDefault(); - e.stopPropagation(); - this.dispatched = false; - } - } -} -Gesture.SCROLL_FRICTION = -0.005; -Gesture.HOLD_DELAY = 700; -Gesture.CLEAR_TAP_COUNT_TIME = 400; // ms -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__["memoize"] -], Gesture, "isTouchDevice", null); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js ***! - \****************************************************************************************/ -/*! exports provided: BaseActionViewItem, ActionViewItem */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseActionViewItem", function() { return BaseActionViewItem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionViewItem", function() { return ActionViewItem; }); -/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - -class BaseActionViewItem extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(context, action, options = {}) { - super(); - this.options = options; - this._context = context || this; - this._action = action; - if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["Action"]) { - this._register(action.onDidChange(event => { - if (!this.element) { - // we have not been rendered yet, so there - // is no point in updating the UI - return; - } - this.handleActionChangeEvent(event); - })); - } - } - handleActionChangeEvent(event) { - if (event.enabled !== undefined) { - this.updateEnabled(); - } - if (event.checked !== undefined) { - this.updateChecked(); - } - if (event.class !== undefined) { - this.updateClass(); - } - if (event.label !== undefined) { - this.updateLabel(); - this.updateTooltip(); - } - if (event.tooltip !== undefined) { - this.updateTooltip(); - } - } - get actionRunner() { - if (!this._actionRunner) { - this._actionRunner = this._register(new _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["ActionRunner"]()); - } - return this._actionRunner; - } - set actionRunner(actionRunner) { - this._actionRunner = actionRunner; - } - getAction() { - return this._action; - } - isEnabled() { - return this._action.enabled; - } - setActionContext(newContext) { - this._context = newContext; - } - render(container) { - const element = this.element = container; - this._register(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(container)); - const enableDragging = this.options && this.options.draggable; - if (enableDragging) { - container.draggable = true; - if (_browser_js__WEBPACK_IMPORTED_MODULE_9__["isFirefox"]) { - // Firefox: requires to set a text data transfer to get going - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](container, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].DRAG_START, e => { var _a; return (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_8__["DataTransfers"].TEXT, this._action.label); })); - } - } - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _touch_js__WEBPACK_IMPORTED_MODULE_7__["EventType"].Tap, e => this.onClick(e))); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_DOWN, e => { - if (!enableDragging) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); // do not run when dragging is on because that would disable it - } - if (this._action.enabled && e.button === 0) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](element, 'active'); - } - })); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"]) { - // macOS: allow to trigger the button when holding Ctrl+key and pressing the - // main mouse button. This is for scenarios where e.g. some interaction forces - // the Ctrl+key to be pressed and hold but the user still wants to interact - // with the actions (for example quick access in quick navigation mode). - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].CONTEXT_MENU, e => { - if (e.button === 0 && e.ctrlKey === true) { - this.onClick(e); - } - })); - } - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].CLICK, e => { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); - // menus do not use the click event - if (!(this.options && this.options.isMenu)) { - _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["setImmediate"](() => this.onClick(e)); - } - })); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].DBLCLICK, e => { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); - })); - [_dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_UP, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_OUT].forEach(event => { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, event, e => { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](element, 'active'); - })); - }); - } - onClick(event) { - var _a; - _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(event, true); - const context = _common_types_js__WEBPACK_IMPORTED_MODULE_6__["isUndefinedOrNull"](this._context) ? ((_a = this.options) === null || _a === void 0 ? void 0 : _a.useEventAsContext) ? event : undefined : this._context; - this.actionRunner.run(this._action, context); - } - focus() { - if (this.element) { - this.element.focus(); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.element, 'focused'); - } - } - blur() { - if (this.element) { - this.element.blur(); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.element, 'focused'); - } - } - updateEnabled() { - // implement in subclass - } - updateLabel() { - // implement in subclass - } - updateTooltip() { - // implement in subclass - } - updateClass() { - // implement in subclass - } - updateChecked() { - // implement in subclass - } - dispose() { - if (this.element) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeNode"](this.element); - this.element = undefined; - } - super.dispose(); - } -} -class ActionViewItem extends BaseActionViewItem { - constructor(context, action, options = {}) { - super(context, action, options); - this.options = options; - this.options.icon = options.icon !== undefined ? options.icon : false; - this.options.label = options.label !== undefined ? options.label : true; - this.cssClass = ''; - } - render(container) { - super.render(container); - if (this.element) { - this.label = _dom_js__WEBPACK_IMPORTED_MODULE_5__["append"](this.element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["$"]('a.action-label')); - } - if (this.label) { - if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["Separator"].ID) { - this.label.setAttribute('role', 'presentation'); // A separator is a presentation item - } - else { - if (this.options.isMenu) { - this.label.setAttribute('role', 'menuitem'); - } - else { - this.label.setAttribute('role', 'button'); - } - } - } - if (this.options.label && this.options.keybinding && this.element) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["append"](this.element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["$"]('span.keybinding')).textContent = this.options.keybinding; - } - this.updateClass(); - this.updateLabel(); - this.updateTooltip(); - this.updateEnabled(); - this.updateChecked(); - } - focus() { - super.focus(); - if (this.label) { - this.label.focus(); - } - } - updateLabel() { - if (this.options.label && this.label) { - this.label.textContent = this.getAction().label; - } - } - updateTooltip() { - let title = null; - if (this.getAction().tooltip) { - title = this.getAction().tooltip; - } - else if (!this.options.label && this.getAction().label && this.options.icon) { - title = this.getAction().label; - if (this.options.keybinding) { - title = _nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"]({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, "{0} ({1})", title, this.options.keybinding); - } - } - if (title && this.label) { - this.label.title = title; - } - } - updateClass() { - if (this.cssClass && this.label) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClasses"](this.label, this.cssClass); - } - if (this.options.icon) { - this.cssClass = this.getAction().class; - if (this.label) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'codicon'); - if (this.cssClass) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClasses"](this.label, this.cssClass); - } - } - this.updateEnabled(); - } - else { - if (this.label) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'codicon'); - } - } - } - updateEnabled() { - if (this.getAction().enabled) { - if (this.label) { - this.label.removeAttribute('aria-disabled'); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'disabled'); - this.label.tabIndex = 0; - } - if (this.element) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.element, 'disabled'); - } - } - else { - if (this.label) { - this.label.setAttribute('aria-disabled', 'true'); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'disabled'); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeTabIndexAndUpdateFocus"](this.label); - } - if (this.element) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.element, 'disabled'); - } - } - } - updateChecked() { - if (this.label) { - if (this.getAction().checked) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'checked'); - } - else { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'checked'); - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./actionbar.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js ***! - \**********************************************************************************/ -/*! exports provided: ActionBar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBar", function() { return ActionBar; }); -/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -class ActionBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(container, options = {}) { - var _a, _b, _c; - super(); - this._onDidBlur = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidBlur = this._onDidBlur.event; - this._onDidCancel = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidCancel = this._onDidCancel.event; - this._onDidRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidRun = this._onDidRun.event; - this._onDidBeforeRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidBeforeRun = this._onDidBeforeRun.event; - this.options = options; - this._context = (_a = options.context) !== null && _a !== void 0 ? _a : null; - this._orientation = (_b = this.options.orientation) !== null && _b !== void 0 ? _b : 0 /* HORIZONTAL */; - this._triggerKeys = (_c = this.options.triggerKeys) !== null && _c !== void 0 ? _c : { - keys: [3 /* Enter */, 10 /* Space */], - keyDown: false - }; - if (this.options.actionRunner) { - this._actionRunner = this.options.actionRunner; - } - else { - this._actionRunner = new _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["ActionRunner"](); - this._register(this._actionRunner); - } - this._register(this._actionRunner.onDidRun(e => this._onDidRun.fire(e))); - this._register(this._actionRunner.onDidBeforeRun(e => this._onDidBeforeRun.fire(e))); - this.viewItems = []; - this.focusedItem = undefined; - this.domNode = document.createElement('div'); - this.domNode.className = 'monaco-action-bar'; - if (options.animated !== false) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, 'animated'); - } - let previousKey; - let nextKey; - switch (this._orientation) { - case 0 /* HORIZONTAL */: - previousKey = 15 /* LeftArrow */; - nextKey = 17 /* RightArrow */; - break; - case 1 /* HORIZONTAL_REVERSE */: - previousKey = 17 /* RightArrow */; - nextKey = 15 /* LeftArrow */; - this.domNode.className += ' reverse'; - break; - case 2 /* VERTICAL */: - previousKey = 16 /* UpArrow */; - nextKey = 18 /* DownArrow */; - this.domNode.className += ' vertical'; - break; - case 3 /* VERTICAL_REVERSE */: - previousKey = 18 /* DownArrow */; - nextKey = 16 /* UpArrow */; - this.domNode.className += ' vertical reverse'; - break; - } - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_DOWN, e => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - let eventHandled = true; - if (event.equals(previousKey)) { - eventHandled = this.focusPrevious(); - } - else if (event.equals(nextKey)) { - eventHandled = this.focusNext(); - } - else if (event.equals(9 /* Escape */)) { - this._onDidCancel.fire(); - } - else if (this.isTriggerKeyEvent(event)) { - // Staying out of the else branch even if not triggered - if (this._triggerKeys.keyDown) { - this.doTrigger(event); - } - } - else { - eventHandled = false; - } - if (eventHandled) { - event.preventDefault(); - event.stopPropagation(); - } - })); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_UP, e => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - // Run action on Enter/Space - if (this.isTriggerKeyEvent(event)) { - if (!this._triggerKeys.keyDown) { - this.doTrigger(event); - } - event.preventDefault(); - event.stopPropagation(); - } - // Recompute focused item - else if (event.equals(2 /* Tab */) || event.equals(1024 /* Shift */ | 2 /* Tab */)) { - this.updateFocusedItem(); - } - })); - this.focusTracker = this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["trackFocus"](this.domNode)); - this._register(this.focusTracker.onDidBlur(() => { - if (_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"]() === this.domNode || !_dom_js__WEBPACK_IMPORTED_MODULE_3__["isAncestor"](_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"](), this.domNode)) { - this._onDidBlur.fire(); - this.focusedItem = undefined; - } - })); - this._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem())); - this.actionsList = document.createElement('ul'); - this.actionsList.className = 'actions-container'; - this.actionsList.setAttribute('role', 'toolbar'); - if (this.options.ariaLabel) { - this.actionsList.setAttribute('aria-label', this.options.ariaLabel); - } - this.domNode.appendChild(this.actionsList); - container.appendChild(this.domNode); - } - isTriggerKeyEvent(event) { - let ret = false; - this._triggerKeys.keys.forEach(keyCode => { - ret = ret || event.equals(keyCode); - }); - return ret; - } - updateFocusedItem() { - for (let i = 0; i < this.actionsList.children.length; i++) { - const elem = this.actionsList.children[i]; - if (_dom_js__WEBPACK_IMPORTED_MODULE_3__["isAncestor"](_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"](), elem)) { - this.focusedItem = i; - break; - } - } - } - get context() { - return this._context; - } - set context(context) { - this._context = context; - this.viewItems.forEach(i => i.setActionContext(context)); - } - get actionRunner() { - return this._actionRunner; - } - set actionRunner(actionRunner) { - if (actionRunner) { - this._actionRunner = actionRunner; - this.viewItems.forEach(item => item.actionRunner = actionRunner); - } - } - getContainer() { - return this.domNode; - } - push(arg, options = {}) { - const actions = Array.isArray(arg) ? arg : [arg]; - let index = _common_types_js__WEBPACK_IMPORTED_MODULE_4__["isNumber"](options.index) ? options.index : null; - actions.forEach((action) => { - const actionViewItemElement = document.createElement('li'); - actionViewItemElement.className = 'action-item'; - actionViewItemElement.setAttribute('role', 'presentation'); - // Prevent native context menu on actions - if (!this.options.allowContextMenu) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](actionViewItemElement, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].CONTEXT_MENU, (e) => { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true); - })); - } - let item; - if (this.options.actionViewItemProvider) { - item = this.options.actionViewItemProvider(action); - } - if (!item) { - item = new _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__["ActionViewItem"](this.context, action, options); - } - item.actionRunner = this._actionRunner; - item.setActionContext(this.context); - item.render(actionViewItemElement); - if (index === null || index < 0 || index >= this.actionsList.children.length) { - this.actionsList.appendChild(actionViewItemElement); - this.viewItems.push(item); - } - else { - this.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]); - this.viewItems.splice(index, 0, item); - index++; - } - }); - if (this.focusedItem) { - // After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128 - this.focus(this.focusedItem); - } - } - clear() { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.viewItems); - this.viewItems = []; - _dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"](this.actionsList); - } - focus(arg) { - let selectFirst = false; - let index = undefined; - if (arg === undefined) { - selectFirst = true; - } - else if (typeof arg === 'number') { - index = arg; - } - else if (typeof arg === 'boolean') { - selectFirst = arg; - } - if (selectFirst && typeof this.focusedItem === 'undefined') { - // Focus the first enabled item - this.focusedItem = -1; - this.focusNext(); - } - else { - if (index !== undefined) { - this.focusedItem = index; - } - this.updateFocus(); - } - } - focusNext() { - if (typeof this.focusedItem === 'undefined') { - this.focusedItem = this.viewItems.length - 1; - } - const startIndex = this.focusedItem; - let item; - do { - if (this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) { - this.focusedItem = startIndex; - return false; - } - this.focusedItem = (this.focusedItem + 1) % this.viewItems.length; - item = this.viewItems[this.focusedItem]; - } while (this.focusedItem !== startIndex && !item.isEnabled()); - if (this.focusedItem === startIndex && !item.isEnabled()) { - this.focusedItem = undefined; - } - this.updateFocus(); - return true; - } - focusPrevious() { - if (typeof this.focusedItem === 'undefined') { - this.focusedItem = 0; - } - const startIndex = this.focusedItem; - let item; - do { - this.focusedItem = this.focusedItem - 1; - if (this.focusedItem < 0) { - if (this.options.preventLoopNavigation) { - this.focusedItem = startIndex; - return false; - } - this.focusedItem = this.viewItems.length - 1; - } - item = this.viewItems[this.focusedItem]; - } while (this.focusedItem !== startIndex && !item.isEnabled()); - if (this.focusedItem === startIndex && !item.isEnabled()) { - this.focusedItem = undefined; - } - this.updateFocus(true); - return true; - } - updateFocus(fromRight, preventScroll) { - if (typeof this.focusedItem === 'undefined') { - this.actionsList.focus({ preventScroll }); - } - for (let i = 0; i < this.viewItems.length; i++) { - const item = this.viewItems[i]; - const actionViewItem = item; - if (i === this.focusedItem) { - if (_common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.isEnabled)) { - if (actionViewItem.isEnabled() && _common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.focus)) { - actionViewItem.focus(fromRight); - } - else { - this.actionsList.focus({ preventScroll }); - } - } - } - else { - if (_common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.blur)) { - actionViewItem.blur(); - } - } - } - } - doTrigger(event) { - if (typeof this.focusedItem === 'undefined') { - return; //nothing to focus - } - // trigger action - const actionViewItem = this.viewItems[this.focusedItem]; - if (actionViewItem instanceof _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__["BaseActionViewItem"]) { - const context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context; - this.run(actionViewItem._action, context); - } - } - run(action, context) { - return this._actionRunner.run(action, context); - } - dispose() { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.viewItems); - this.viewItems = []; - _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeNode"](this.getContainer()); - super.dispose(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./aria.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js ***! - \************************************************************************/ -/*! exports provided: setARIAContainer, alert, status */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setARIAContainer", function() { return setARIAContainer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alert", function() { return alert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "status", function() { return status; }); -/* harmony import */ var _aria_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aria.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -// Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233 -const MAX_MESSAGE_LENGTH = 20000; -let ariaContainer; -let alertContainer; -let alertContainer2; -let statusContainer; -let statusContainer2; -function setARIAContainer(parent) { - ariaContainer = document.createElement('div'); - ariaContainer.className = 'monaco-aria-container'; - const createAlertContainer = () => { - const element = document.createElement('div'); - element.className = 'monaco-alert'; - element.setAttribute('role', 'alert'); - element.setAttribute('aria-atomic', 'true'); - ariaContainer.appendChild(element); - return element; - }; - alertContainer = createAlertContainer(); - alertContainer2 = createAlertContainer(); - const createStatusContainer = () => { - const element = document.createElement('div'); - element.className = 'monaco-status'; - element.setAttribute('role', 'complementary'); - element.setAttribute('aria-live', 'polite'); - element.setAttribute('aria-atomic', 'true'); - ariaContainer.appendChild(element); - return element; - }; - statusContainer = createStatusContainer(); - statusContainer2 = createStatusContainer(); - parent.appendChild(ariaContainer); -} -/** - * Given the provided message, will make sure that it is read as alert to screen readers. - */ -function alert(msg) { - if (!ariaContainer) { - return; - } - // Use alternate containers such that duplicated messages get read out by screen readers #99466 - if (alertContainer.textContent !== msg) { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](alertContainer2); - insertMessage(alertContainer, msg); - } - else { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](alertContainer); - insertMessage(alertContainer2, msg); - } -} -/** - * Given the provided message, will make sure that it is read as status to screen readers. - */ -function status(msg) { - if (!ariaContainer) { - return; - } - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"]) { - alert(msg); // VoiceOver does not seem to support status role - } - else { - if (statusContainer.textContent !== msg) { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](statusContainer2); - insertMessage(statusContainer, msg); - } - else { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](statusContainer); - insertMessage(statusContainer2, msg); - } - } -} -function insertMessage(target, msg) { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](target); - if (msg.length > MAX_MESSAGE_LENGTH) { - msg = msg.substr(0, MAX_MESSAGE_LENGTH); - } - target.textContent = msg; - // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/ - target.style.visibility = 'hidden'; - target.style.visibility = 'visible'; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css ***! - \*****************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./button.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js ***! - \****************************************************************************/ -/*! exports provided: Button */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); -/* harmony import */ var _button_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _codicons_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../codicons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - -const defaultOptions = { - buttonBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#0E639C'), - buttonHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#006BB3'), - buttonForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].white -}; -class Button extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["Disposable"] { - constructor(container, options) { - super(); - this._onDidClick = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.options = options || Object.create(null); - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_4__["mixin"])(this.options, defaultOptions, false); - this.buttonForeground = this.options.buttonForeground; - this.buttonBackground = this.options.buttonBackground; - this.buttonHoverBackground = this.options.buttonHoverBackground; - this.buttonSecondaryForeground = this.options.buttonSecondaryForeground; - this.buttonSecondaryBackground = this.options.buttonSecondaryBackground; - this.buttonSecondaryHoverBackground = this.options.buttonSecondaryHoverBackground; - this.buttonBorder = this.options.buttonBorder; - this._element = document.createElement('a'); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'monaco-button'); - this._element.tabIndex = 0; - this._element.setAttribute('role', 'button'); - container.appendChild(this._element); - this._register(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(this._element)); - [_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, _touch_js__WEBPACK_IMPORTED_MODULE_7__["EventType"].Tap].forEach(eventType => { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, eventType, e => { - if (!this.enabled) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventHelper"].stop(e); - return; - } - this._onDidClick.fire(e); - })); - }); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].KEY_DOWN, e => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardKeyboardEvent"](e); - let eventHandled = false; - if (this.enabled && (event.equals(3 /* Enter */) || event.equals(10 /* Space */))) { - this._onDidClick.fire(e); - eventHandled = true; - } - else if (event.equals(9 /* Escape */)) { - this._element.blur(); - eventHandled = true; - } - if (eventHandled) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventHelper"].stop(event, true); - } - })); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_OVER, e => { - if (!_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'disabled')) { - this.setHoverBackground(); - } - })); - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_OUT, e => { - this.applyStyles(); // restore standard styles - })); - // Also set hover background when button is focused for feedback - this.focusTracker = this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["trackFocus"](this._element)); - this._register(this.focusTracker.onDidFocus(() => this.setHoverBackground())); - this._register(this.focusTracker.onDidBlur(() => this.applyStyles())); // restore standard styles - this.applyStyles(); - } - get onDidClick() { return this._onDidClick.event; } - setHoverBackground() { - let hoverBackground; - if (this.options.secondary) { - hoverBackground = this.buttonSecondaryHoverBackground ? this.buttonSecondaryHoverBackground.toString() : null; - } - else { - hoverBackground = this.buttonHoverBackground ? this.buttonHoverBackground.toString() : null; - } - if (hoverBackground) { - this._element.style.backgroundColor = hoverBackground; - } - } - style(styles) { - this.buttonForeground = styles.buttonForeground; - this.buttonBackground = styles.buttonBackground; - this.buttonHoverBackground = styles.buttonHoverBackground; - this.buttonSecondaryForeground = styles.buttonSecondaryForeground; - this.buttonSecondaryBackground = styles.buttonSecondaryBackground; - this.buttonSecondaryHoverBackground = styles.buttonSecondaryHoverBackground; - this.buttonBorder = styles.buttonBorder; - this.applyStyles(); - } - applyStyles() { - if (this._element) { - let background, foreground; - if (this.options.secondary) { - foreground = this.buttonSecondaryForeground ? this.buttonSecondaryForeground.toString() : ''; - background = this.buttonSecondaryBackground ? this.buttonSecondaryBackground.toString() : ''; - } - else { - foreground = this.buttonForeground ? this.buttonForeground.toString() : ''; - background = this.buttonBackground ? this.buttonBackground.toString() : ''; - } - const border = this.buttonBorder ? this.buttonBorder.toString() : ''; - this._element.style.color = foreground; - this._element.style.backgroundColor = background; - this._element.style.borderWidth = border ? '1px' : ''; - this._element.style.borderStyle = border ? 'solid' : ''; - this._element.style.borderColor = border; - } - } - get element() { - return this._element; - } - set label(value) { - if (!_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'monaco-text-button')) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'monaco-text-button'); - } - if (this.options.supportCodicons) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["reset"](this._element, ...Object(_codicons_js__WEBPACK_IMPORTED_MODULE_8__["renderCodiconsAsElement"])(value)); - } - else { - this._element.textContent = value; - } - if (typeof this.options.title === 'string') { - this._element.title = this.options.title; - } - else if (this.options.title) { - this._element.title = value; - } - } - set enabled(value) { - if (value) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this._element, 'disabled'); - this._element.setAttribute('aria-disabled', String(false)); - this._element.tabIndex = 0; - } - else { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'disabled'); - this._element.setAttribute('aria-disabled', String(true)); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeTabIndexAndUpdateFocus"](this._element); - } - } - get enabled() { - return !_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'disabled'); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css ***! - \*********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./checkbox.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js ***! - \********************************************************************************/ -/*! exports provided: Checkbox */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return Checkbox; }); -/* harmony import */ var _checkbox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkbox.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const defaultOpts = { - inputActiveOptionBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#007ACC00'), - inputActiveOptionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#FFFFFF'), - inputActiveOptionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#0E639C50') -}; -class Checkbox extends _widget_js__WEBPACK_IMPORTED_MODULE_2__["Widget"] { - constructor(opts) { - super(); - this._onChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onChange = this._onChange.event; - this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onKeyDown = this._onKeyDown.event; - this._opts = Object.assign(Object.assign({}, defaultOpts), opts); - this._checked = this._opts.isChecked; - const classes = ['monaco-custom-checkbox']; - if (this._opts.icon) { - classes.push(this._opts.icon.classNames); - } - else { - classes.push('codicon'); // todo@aeschli: remove once codicon fully adopted - } - if (this._opts.actionClassName) { - classes.push(this._opts.actionClassName); - } - classes.push(this._checked ? 'checked' : 'unchecked'); - this.domNode = document.createElement('div'); - this.domNode.title = this._opts.title; - this.domNode.className = classes.join(' '); - this.domNode.tabIndex = 0; - this.domNode.setAttribute('role', 'checkbox'); - this.domNode.setAttribute('aria-checked', String(this._checked)); - this.domNode.setAttribute('aria-label', this._opts.title); - this.applyStyles(); - this.onclick(this.domNode, (ev) => { - this.checked = !this._checked; - this._onChange.fire(false); - ev.preventDefault(); - }); - this.ignoreGesture(this.domNode); - this.onkeydown(this.domNode, (keyboardEvent) => { - if (keyboardEvent.keyCode === 10 /* Space */ || keyboardEvent.keyCode === 3 /* Enter */) { - this.checked = !this._checked; - this._onChange.fire(true); - keyboardEvent.preventDefault(); - return; - } - this._onKeyDown.fire(keyboardEvent); - }); - } - get enabled() { - return this.domNode.getAttribute('aria-disabled') !== 'true'; - } - focus() { - this.domNode.focus(); - } - get checked() { - return this._checked; - } - set checked(newIsChecked) { - this._checked = newIsChecked; - this.domNode.setAttribute('aria-checked', String(this._checked)); - if (this._checked) { - this.domNode.classList.add('checked'); - } - else { - this.domNode.classList.remove('checked'); - } - this.applyStyles(); - } - width() { - return 2 /*marginleft*/ + 2 /*border*/ + 2 /*padding*/ + 16 /* icon width */; - } - style(styles) { - if (styles.inputActiveOptionBorder) { - this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder; - } - if (styles.inputActiveOptionForeground) { - this._opts.inputActiveOptionForeground = styles.inputActiveOptionForeground; - } - if (styles.inputActiveOptionBackground) { - this._opts.inputActiveOptionBackground = styles.inputActiveOptionBackground; - } - this.applyStyles(); - } - applyStyles() { - if (this.domNode) { - this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent'; - this.domNode.style.color = this._checked && this._opts.inputActiveOptionForeground ? this._opts.inputActiveOptionForeground.toString() : 'inherit'; - this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : 'transparent'; - } - } - enable() { - this.domNode.tabIndex = 0; - this.domNode.setAttribute('aria-disabled', String(false)); - } - disable() { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeTabIndexAndUpdateFocus"](this.domNode); - this.domNode.setAttribute('aria-disabled', String(true)); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css ***! - \***************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon-animations.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css": -/*!******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css ***! - \******************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon-modifications.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.p + "codicon.ttf"); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js ***! - \*************************************************************************************/ -/*! exports provided: CodiconStyles, formatRule */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodiconStyles", function() { return CodiconStyles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatRule", function() { return formatRule; }); -/* harmony import */ var _codicon_codicon_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codicon/codicon.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"); -/* harmony import */ var _codicon_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codicon/codicon-modifications.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css"); -/* harmony import */ var _codicon_codicon_animations_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codicon/codicon-animations.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const CodiconStyles = new class { - constructor() { - this.onDidChange = _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["iconRegistry"].onDidRegister; - } - getCSS() { - const rules = []; - for (let c of _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["iconRegistry"].all) { - rules.push(formatRule(c)); - } - return rules.join('\n'); - } -}; -function formatRule(c) { - let def = c.definition; - while (def instanceof _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"]) { - def = def.definition; - } - return `.codicon-${c.id}:before { content: '${def.character}'; }`; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css ***! - \***************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./contextview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js ***! - \**************************************************************************************/ -/*! exports provided: layout, ContextView */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "layout", function() { return layout; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextView", function() { return ContextView; }); -/* harmony import */ var _contextview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextview.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); -/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -/** - * Lays out a one dimensional view next to an anchor in a viewport. - * - * @returns The view offset within the viewport. - */ -function layout(viewportSize, viewSize, anchor) { - const anchorEnd = anchor.offset + anchor.size; - if (anchor.position === 0 /* Before */) { - if (viewSize <= viewportSize - anchorEnd) { - return anchorEnd; // happy case, lay it out after the anchor - } - if (viewSize <= anchor.offset) { - return anchor.offset - viewSize; // ok case, lay it out before the anchor - } - return Math.max(viewportSize - viewSize, 0); // sad case, lay it over the anchor - } - else { - if (viewSize <= anchor.offset) { - return anchor.offset - viewSize; // happy case, lay it out before the anchor - } - if (viewSize <= viewportSize - anchorEnd) { - return anchorEnd; // ok case, lay it out after the anchor - } - return 0; // sad case, lay it over the anchor - } -} -class ContextView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(container, domPosition) { - super(); - this.container = null; - this.delegate = null; - this.toDisposeOnClean = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; - this.toDisposeOnSetContainer = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; - this.shadowRoot = null; - this.shadowRootHostElement = null; - this.view = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.context-view'); - this.useFixedPosition = false; - this.useShadowDOM = false; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this.view); - this.setContainer(container, domPosition); - this._register(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["toDisposable"])(() => this.setContainer(null, 1 /* ABSOLUTE */))); - } - setContainer(container, domPosition) { - if (this.container) { - this.toDisposeOnSetContainer.dispose(); - if (this.shadowRoot) { - this.shadowRoot.removeChild(this.view); - this.shadowRoot = null; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeNode"](this.shadowRootHostElement); - this.shadowRootHostElement = null; - } - else { - this.container.removeChild(this.view); - } - this.container = null; - } - if (container) { - this.container = container; - this.useFixedPosition = domPosition !== 1 /* ABSOLUTE */; - this.useShadowDOM = domPosition === 3 /* FIXED_SHADOW */; - if (this.useShadowDOM) { - this.shadowRootHostElement = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.shadow-root-host'); - this.container.appendChild(this.shadowRootHostElement); - this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' }); - this.shadowRoot.innerHTML = ` - - `; - this.shadowRoot.appendChild(this.view); - this.shadowRoot.appendChild(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('slot')); - } - else { - this.container.appendChild(this.view); - } - const toDisposeOnSetContainer = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - ContextView.BUBBLE_UP_EVENTS.forEach(event => { - toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.container, event, (e) => { - this.onDOMEvent(e, false); - })); - }); - ContextView.BUBBLE_DOWN_EVENTS.forEach(event => { - toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.container, event, (e) => { - this.onDOMEvent(e, true); - }, true)); - }); - this.toDisposeOnSetContainer = toDisposeOnSetContainer; - } - } - show(delegate) { - if (this.isVisible()) { - this.hide(); - } - // Show static box - _dom_js__WEBPACK_IMPORTED_MODULE_1__["clearNode"](this.view); - this.view.className = 'context-view'; - this.view.style.top = '0px'; - this.view.style.left = '0px'; - this.view.style.zIndex = '2500'; - this.view.style.position = this.useFixedPosition ? 'fixed' : 'absolute'; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this.view); - // Render content - this.toDisposeOnClean = delegate.render(this.view) || _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; - // Set active delegate - this.delegate = delegate; - // Layout - this.doLayout(); - // Focus - if (this.delegate.focus) { - this.delegate.focus(); - } - } - getViewElement() { - return this.view; - } - layout() { - if (!this.isVisible()) { - return; - } - if (this.delegate.canRelayout === false && !(_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents)) { - this.hide(); - return; - } - if (this.delegate.layout) { - this.delegate.layout(); - } - this.doLayout(); - } - doLayout() { - // Check that we still have a delegate - this.delegate.layout may have hidden - if (!this.isVisible()) { - return; - } - // Get anchor - let anchor = this.delegate.getAnchor(); - // Compute around - let around; - // Get the element's position and size (to anchor the view) - if (_dom_js__WEBPACK_IMPORTED_MODULE_1__["isHTMLElement"](anchor)) { - let elementPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](anchor); - around = { - top: elementPosition.top, - left: elementPosition.left, - width: elementPosition.width, - height: elementPosition.height - }; - } - else { - around = { - top: anchor.y, - left: anchor.x, - width: anchor.width || 1, - height: anchor.height || 2 - }; - } - const viewSizeWidth = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getTotalWidth"](this.view); - const viewSizeHeight = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getTotalHeight"](this.view); - const anchorPosition = this.delegate.anchorPosition || 0 /* BELOW */; - const anchorAlignment = this.delegate.anchorAlignment || 0 /* LEFT */; - const verticalAnchor = { offset: around.top - window.pageYOffset, size: around.height, position: anchorPosition === 0 /* BELOW */ ? 0 /* Before */ : 1 /* After */ }; - let horizontalAnchor; - if (anchorAlignment === 0 /* LEFT */) { - horizontalAnchor = { offset: around.left, size: 0, position: 0 /* Before */ }; - } - else { - horizontalAnchor = { offset: around.left + around.width, size: 0, position: 1 /* After */ }; - } - const top = layout(window.innerHeight, viewSizeHeight, verticalAnchor) + window.pageYOffset; - // if view intersects vertically with anchor, shift it horizontally - if (_common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].intersects({ start: top, end: top + viewSizeHeight }, { start: verticalAnchor.offset, end: verticalAnchor.offset + verticalAnchor.size })) { - horizontalAnchor.size = around.width; - if (anchorAlignment === 1 /* RIGHT */) { - horizontalAnchor.offset = around.left; - } - } - const left = layout(window.innerWidth, viewSizeWidth, horizontalAnchor); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClasses"](this.view, 'top', 'bottom', 'left', 'right'); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.view, anchorPosition === 0 /* BELOW */ ? 'bottom' : 'top'); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.view, anchorAlignment === 0 /* LEFT */ ? 'left' : 'right'); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["toggleClass"](this.view, 'fixed', this.useFixedPosition); - const containerPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.container); - this.view.style.top = `${top - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.view).top : containerPosition.top)}px`; - this.view.style.left = `${left - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.view).left : containerPosition.left)}px`; - this.view.style.width = 'initial'; - } - hide(data) { - const delegate = this.delegate; - this.delegate = null; - if (delegate === null || delegate === void 0 ? void 0 : delegate.onHide) { - delegate.onHide(data); - } - this.toDisposeOnClean.dispose(); - _dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this.view); - } - isVisible() { - return !!this.delegate; - } - onDOMEvent(e, onCapture) { - if (this.delegate) { - if (this.delegate.onDOMEvent) { - this.delegate.onDOMEvent(e, document.activeElement); - } - else if (onCapture && !_dom_js__WEBPACK_IMPORTED_MODULE_1__["isAncestor"](e.target, this.container)) { - this.hide(); - } - } - } - dispose() { - this.hide(); - super.dispose(); - } -} -ContextView.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur']; -ContextView.BUBBLE_DOWN_EVENTS = ['click']; -let SHADOW_ROOT_CSS = /* css */ ` - :host { - all: initial; /* 1st rule so subsequent properties are reset. */ - } - - @font-face { - font-family: "codicon"; - src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); - } - - .codicon[class*='codicon-'] { - font: normal normal normal 16px/1 codicon; - display: inline-block; - text-decoration: none; - text-rendering: auto; - text-align: center; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - } - - :host { - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; - } - - :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } - :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } - :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } - :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } - :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } - - :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } - :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } - :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } - :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } - :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } - - :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } - :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } - :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } - :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } - :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css ***! - \*************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./countBadge.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js ***! - \************************************************************************************/ -/*! exports provided: CountBadge */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CountBadge", function() { return CountBadge; }); -/* harmony import */ var _countBadge_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./countBadge.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const defaultOpts = { - badgeBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#4D4D4D'), - badgeForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#FFFFFF') -}; -class CountBadge { - constructor(container, options) { - this.count = 0; - this.options = options || Object.create(null); - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_4__["mixin"])(this.options, defaultOpts, false); - this.badgeBackground = this.options.badgeBackground; - this.badgeForeground = this.options.badgeForeground; - this.badgeBorder = this.options.badgeBorder; - this.element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('.monaco-count-badge')); - this.countFormat = this.options.countFormat || '{0}'; - this.titleFormat = this.options.titleFormat || ''; - this.setCount(this.options.count || 0); - } - setCount(count) { - this.count = count; - this.render(); - } - setTitleFormat(titleFormat) { - this.titleFormat = titleFormat; - this.render(); - } - render() { - this.element.textContent = Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"])(this.countFormat, this.count); - this.element.title = Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"])(this.titleFormat, this.count); - this.applyStyles(); - } - style(styles) { - this.badgeBackground = styles.badgeBackground; - this.badgeForeground = styles.badgeForeground; - this.badgeBorder = styles.badgeBorder; - this.applyStyles(); - } - applyStyles() { - if (this.element) { - const background = this.badgeBackground ? this.badgeBackground.toString() : ''; - const foreground = this.badgeForeground ? this.badgeForeground.toString() : ''; - const border = this.badgeBorder ? this.badgeBorder.toString() : ''; - this.element.style.backgroundColor = background; - this.element.style.color = foreground; - this.element.style.borderWidth = border ? '1px' : ''; - this.element.style.borderStyle = border ? 'solid' : ''; - this.element.style.borderColor = border; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css ***! - \*********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./dropdown.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js ***! - \********************************************************************************/ -/*! exports provided: BaseDropdown, DropdownMenu */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseDropdown", function() { return BaseDropdown; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMenu", function() { return DropdownMenu; }); -/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class BaseDropdown extends _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["ActionRunner"] { - constructor(container, options) { - super(); - this._onDidChangeVisibility = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onDidChangeVisibility = this._onDidChangeVisibility.event; - this._element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-dropdown')); - this._label = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this._element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.dropdown-label')); - let labelRenderer = options.labelRenderer; - if (!labelRenderer) { - labelRenderer = (container) => { - container.textContent = options.label || ''; - return null; - }; - } - for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].CLICK, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].Tap]) { - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this.element, event, e => _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true))); // prevent default click behaviour to trigger - } - for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].Tap]) { - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this._label, event, e => { - if (e instanceof MouseEvent && e.detail > 1) { - return; // prevent multiple clicks to open multiple context menus (https://github.com/Microsoft/vscode/issues/41363) - } - if (this.visible) { - this.hide(); - } - else { - this.show(); - } - })); - } - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this._label, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_UP, e => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__["StandardKeyboardEvent"](e); - if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true); // https://github.com/Microsoft/vscode/issues/57997 - if (this.visible) { - this.hide(); - } - else { - this.show(); - } - } - })); - const cleanupFn = labelRenderer(this._label); - if (cleanupFn) { - this._register(cleanupFn); - } - this._register(_touch_js__WEBPACK_IMPORTED_MODULE_1__["Gesture"].addTarget(this._label)); - } - get element() { - return this._element; - } - show() { - if (!this.visible) { - this.visible = true; - this._onDidChangeVisibility.fire(true); - } - } - hide() { - if (this.visible) { - this.visible = false; - this._onDidChangeVisibility.fire(false); - } - } - dispose() { - super.dispose(); - this.hide(); - if (this.boxContainer) { - this.boxContainer.remove(); - this.boxContainer = undefined; - } - if (this.contents) { - this.contents.remove(); - this.contents = undefined; - } - if (this._label) { - this._label.remove(); - this._label = undefined; - } - } -} -class DropdownMenu extends BaseDropdown { - constructor(container, options) { - super(container, options); - this._actions = []; - this._contextMenuProvider = options.contextMenuProvider; - this.actions = options.actions || []; - this.actionProvider = options.actionProvider; - this.menuClassName = options.menuClassName || ''; - this.menuAsChild = !!options.menuAsChild; - } - set menuOptions(options) { - this._menuOptions = options; - } - get menuOptions() { - return this._menuOptions; - } - get actions() { - if (this.actionProvider) { - return this.actionProvider.getActions(); - } - return this._actions; - } - set actions(actions) { - this._actions = actions; - } - show() { - super.show(); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(this.element, 'active'); - this._contextMenuProvider.showContextMenu({ - getAnchor: () => this.element, - getActions: () => this.actions, - getActionsContext: () => this.menuOptions ? this.menuOptions.context : null, - getActionViewItem: action => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(action) : undefined, - getKeyBinding: action => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(action) : undefined, - getMenuClassName: () => this.menuClassName, - onHide: () => this.onHide(), - actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined, - anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0 /* LEFT */, - domForShadowRoot: this.menuAsChild ? this.element : undefined - }); - } - hide() { - super.hide(); - } - onHide() { - this.hide(); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.element, 'active'); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js ***! - \**********************************************************************************************/ -/*! exports provided: DropdownMenuActionViewItem */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMenuActionViewItem", function() { return DropdownMenuActionViewItem; }); -/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/* harmony import */ var _dropdown_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class DropdownMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__["BaseActionViewItem"] { - constructor(action, menuActionsOrProvider, contextMenuProvider, options = {}) { - super(null, action, options); - this.options = options; - this._onDidChangeVisibility = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this.menuActionsOrProvider = menuActionsOrProvider; - this.contextMenuProvider = contextMenuProvider; - if (this.options.actionRunner) { - this.actionRunner = this.options.actionRunner; - } - } - render(container) { - const labelRenderer = (el) => { - this.element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('a.action-label')); - const classNames = this.options.classNames ? Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__["asArray"])(this.options.classNames) : []; - // todo@aeschli: remove codicon, should come through `this.options.classNames` - if (!classNames.find(c => c === 'icon')) { - classNames.push('codicon'); - } - Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClasses"])(this.element, ...classNames); - this.element.tabIndex = 0; - this.element.setAttribute('role', 'button'); - this.element.setAttribute('aria-haspopup', 'true'); - this.element.setAttribute('aria-expanded', 'false'); - this.element.title = this._action.label || ''; - return null; - }; - const options = { - contextMenuProvider: this.contextMenuProvider, - labelRenderer: labelRenderer, - menuAsChild: this.options.menuAsChild - }; - // Render the DropdownMenu around a simple action to toggle it - if (Array.isArray(this.menuActionsOrProvider)) { - options.actions = this.menuActionsOrProvider; - } - else { - options.actionProvider = this.menuActionsOrProvider; - } - this.dropdownMenu = this._register(new _dropdown_js__WEBPACK_IMPORTED_MODULE_4__["DropdownMenu"](container, options)); - this._register(this.dropdownMenu.onDidChangeVisibility(visible => { - var _a; - (_a = this.element) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', `${visible}`); - this._onDidChangeVisibility.fire(visible); - })); - this.dropdownMenu.menuOptions = { - actionViewItemProvider: this.options.actionViewItemProvider, - actionRunner: this.actionRunner, - getKeyBinding: this.options.keybindingProvider, - context: this._context - }; - if (this.options.anchorAlignmentProvider) { - const that = this; - this.dropdownMenu.menuOptions = Object.assign(Object.assign({}, this.dropdownMenu.menuOptions), { get anchorAlignment() { - return that.options.anchorAlignmentProvider(); - } }); - } - } - setActionContext(newContext) { - super.setActionContext(newContext); - if (this.dropdownMenu) { - if (this.dropdownMenu.menuOptions) { - this.dropdownMenu.menuOptions.context = newContext; - } - else { - this.dropdownMenu.menuOptions = { context: newContext }; - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./findInput.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js ***! - \**********************************************************************************/ -/*! exports provided: FindInput */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindInput", function() { return FindInput; }); -/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./findInputCheckboxes.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -const NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('defaultLabel', "input"); -class FindInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__["Widget"] { - constructor(parent, contextViewProvider, _showOptionButtons, options) { - super(); - this._showOptionButtons = _showOptionButtons; - this.fixFocusOnOptionClickEnabled = true; - this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onDidOptionChange = this._onDidOptionChange.event; - this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onKeyDown = this._onKeyDown.event; - this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onMouseDown = this._onMouseDown.event; - this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this._onCaseSensitiveKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onCaseSensitiveKeyDown = this._onCaseSensitiveKeyDown.event; - this._onRegexKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onRegexKeyDown = this._onRegexKeyDown.event; - this._lastHighlightFindOptions = 0; - this.contextViewProvider = contextViewProvider; - this.placeholder = options.placeholder || ''; - this.validation = options.validation; - this.label = options.label || NLS_DEFAULT_LABEL; - this.inputActiveOptionBorder = options.inputActiveOptionBorder; - this.inputActiveOptionForeground = options.inputActiveOptionForeground; - this.inputActiveOptionBackground = options.inputActiveOptionBackground; - this.inputBackground = options.inputBackground; - this.inputForeground = options.inputForeground; - this.inputBorder = options.inputBorder; - this.inputValidationInfoBorder = options.inputValidationInfoBorder; - this.inputValidationInfoBackground = options.inputValidationInfoBackground; - this.inputValidationInfoForeground = options.inputValidationInfoForeground; - this.inputValidationWarningBorder = options.inputValidationWarningBorder; - this.inputValidationWarningBackground = options.inputValidationWarningBackground; - this.inputValidationWarningForeground = options.inputValidationWarningForeground; - this.inputValidationErrorBorder = options.inputValidationErrorBorder; - this.inputValidationErrorBackground = options.inputValidationErrorBackground; - this.inputValidationErrorForeground = options.inputValidationErrorForeground; - const appendCaseSensitiveLabel = options.appendCaseSensitiveLabel || ''; - const appendWholeWordsLabel = options.appendWholeWordsLabel || ''; - const appendRegexLabel = options.appendRegexLabel || ''; - const history = options.history || []; - const flexibleHeight = !!options.flexibleHeight; - const flexibleWidth = !!options.flexibleWidth; - const flexibleMaxHeight = options.flexibleMaxHeight; - this.domNode = document.createElement('div'); - _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'monaco-findInput'); - this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__["HistoryInputBox"](this.domNode, this.contextViewProvider, { - placeholder: this.placeholder || '', - ariaLabel: this.label || '', - validationOptions: { - validation: this.validation - }, - inputBackground: this.inputBackground, - inputForeground: this.inputForeground, - inputBorder: this.inputBorder, - inputValidationInfoBackground: this.inputValidationInfoBackground, - inputValidationInfoForeground: this.inputValidationInfoForeground, - inputValidationInfoBorder: this.inputValidationInfoBorder, - inputValidationWarningBackground: this.inputValidationWarningBackground, - inputValidationWarningForeground: this.inputValidationWarningForeground, - inputValidationWarningBorder: this.inputValidationWarningBorder, - inputValidationErrorBackground: this.inputValidationErrorBackground, - inputValidationErrorForeground: this.inputValidationErrorForeground, - inputValidationErrorBorder: this.inputValidationErrorBorder, - history, - flexibleHeight, - flexibleWidth, - flexibleMaxHeight - })); - this.regex = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["RegexCheckbox"]({ - appendTitle: appendRegexLabel, - isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground - })); - this._register(this.regex.onChange(viaKeyboard => { - this._onDidOptionChange.fire(viaKeyboard); - if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { - this.inputBox.focus(); - } - this.validate(); - })); - this._register(this.regex.onKeyDown(e => { - this._onRegexKeyDown.fire(e); - })); - this.wholeWords = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["WholeWordsCheckbox"]({ - appendTitle: appendWholeWordsLabel, - isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground - })); - this._register(this.wholeWords.onChange(viaKeyboard => { - this._onDidOptionChange.fire(viaKeyboard); - if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { - this.inputBox.focus(); - } - this.validate(); - })); - this.caseSensitive = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["CaseSensitiveCheckbox"]({ - appendTitle: appendCaseSensitiveLabel, - isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground - })); - this._register(this.caseSensitive.onChange(viaKeyboard => { - this._onDidOptionChange.fire(viaKeyboard); - if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { - this.inputBox.focus(); - } - this.validate(); - })); - this._register(this.caseSensitive.onKeyDown(e => { - this._onCaseSensitiveKeyDown.fire(e); - })); - if (this._showOptionButtons) { - this.inputBox.paddingRight = this.caseSensitive.width() + this.wholeWords.width() + this.regex.width(); - } - // Arrow-Key support to navigate between options - let indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode]; - this.onkeydown(this.domNode, (event) => { - if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) { - let index = indexes.indexOf(document.activeElement); - if (index >= 0) { - let newIndex = -1; - if (event.equals(17 /* RightArrow */)) { - newIndex = (index + 1) % indexes.length; - } - else if (event.equals(15 /* LeftArrow */)) { - if (index === 0) { - newIndex = indexes.length - 1; - } - else { - newIndex = index - 1; - } - } - if (event.equals(9 /* Escape */)) { - indexes[index].blur(); - } - else if (newIndex >= 0) { - indexes[newIndex].focus(); - } - _dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - } - } - }); - let controls = document.createElement('div'); - controls.className = 'controls'; - controls.style.display = this._showOptionButtons ? 'block' : 'none'; - controls.appendChild(this.caseSensitive.domNode); - controls.appendChild(this.wholeWords.domNode); - controls.appendChild(this.regex.domNode); - this.domNode.appendChild(controls); - if (parent) { - parent.appendChild(this.domNode); - } - this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); - this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); - this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); - this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); - } - enable() { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'disabled'); - this.inputBox.enable(); - this.regex.enable(); - this.wholeWords.enable(); - this.caseSensitive.enable(); - } - disable() { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'disabled'); - this.inputBox.disable(); - this.regex.disable(); - this.wholeWords.disable(); - this.caseSensitive.disable(); - } - setFocusInputOnOptionClick(value) { - this.fixFocusOnOptionClickEnabled = value; - } - setEnabled(enabled) { - if (enabled) { - this.enable(); - } - else { - this.disable(); - } - } - getValue() { - return this.inputBox.value; - } - setValue(value) { - if (this.inputBox.value !== value) { - this.inputBox.value = value; - } - } - style(styles) { - this.inputActiveOptionBorder = styles.inputActiveOptionBorder; - this.inputActiveOptionForeground = styles.inputActiveOptionForeground; - this.inputActiveOptionBackground = styles.inputActiveOptionBackground; - this.inputBackground = styles.inputBackground; - this.inputForeground = styles.inputForeground; - this.inputBorder = styles.inputBorder; - this.inputValidationInfoBackground = styles.inputValidationInfoBackground; - this.inputValidationInfoForeground = styles.inputValidationInfoForeground; - this.inputValidationInfoBorder = styles.inputValidationInfoBorder; - this.inputValidationWarningBackground = styles.inputValidationWarningBackground; - this.inputValidationWarningForeground = styles.inputValidationWarningForeground; - this.inputValidationWarningBorder = styles.inputValidationWarningBorder; - this.inputValidationErrorBackground = styles.inputValidationErrorBackground; - this.inputValidationErrorForeground = styles.inputValidationErrorForeground; - this.inputValidationErrorBorder = styles.inputValidationErrorBorder; - this.applyStyles(); - } - applyStyles() { - if (this.domNode) { - const checkBoxStyles = { - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground, - }; - this.regex.style(checkBoxStyles); - this.wholeWords.style(checkBoxStyles); - this.caseSensitive.style(checkBoxStyles); - const inputBoxStyles = { - inputBackground: this.inputBackground, - inputForeground: this.inputForeground, - inputBorder: this.inputBorder, - inputValidationInfoBackground: this.inputValidationInfoBackground, - inputValidationInfoForeground: this.inputValidationInfoForeground, - inputValidationInfoBorder: this.inputValidationInfoBorder, - inputValidationWarningBackground: this.inputValidationWarningBackground, - inputValidationWarningForeground: this.inputValidationWarningForeground, - inputValidationWarningBorder: this.inputValidationWarningBorder, - inputValidationErrorBackground: this.inputValidationErrorBackground, - inputValidationErrorForeground: this.inputValidationErrorForeground, - inputValidationErrorBorder: this.inputValidationErrorBorder - }; - this.inputBox.style(inputBoxStyles); - } - } - select() { - this.inputBox.select(); - } - focus() { - this.inputBox.focus(); - } - getCaseSensitive() { - return this.caseSensitive.checked; - } - setCaseSensitive(value) { - this.caseSensitive.checked = value; - } - getWholeWords() { - return this.wholeWords.checked; - } - setWholeWords(value) { - this.wholeWords.checked = value; - } - getRegex() { - return this.regex.checked; - } - setRegex(value) { - this.regex.checked = value; - this.validate(); - } - focusOnCaseSensitive() { - this.caseSensitive.focus(); - } - highlightFindOptions() { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'highlight-' + (this._lastHighlightFindOptions)); - this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions; - _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'highlight-' + (this._lastHighlightFindOptions)); - } - validate() { - this.inputBox.validate(); - } - clearMessage() { - this.inputBox.hideMessage(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js ***! - \********************************************************************************************/ -/*! exports provided: CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CaseSensitiveCheckbox", function() { return CaseSensitiveCheckbox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WholeWordsCheckbox", function() { return WholeWordsCheckbox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegexCheckbox", function() { return RegexCheckbox; }); -/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../checkbox/checkbox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const NLS_CASE_SENSITIVE_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('caseDescription', "Match Case"); -const NLS_WHOLE_WORD_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('wordsDescription', "Match Whole Word"); -const NLS_REGEX_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('regexDescription', "Use Regular Expression"); -class CaseSensitiveCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { - constructor(opts) { - super({ - icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].caseSensitive, - title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle, - isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder, - inputActiveOptionForeground: opts.inputActiveOptionForeground, - inputActiveOptionBackground: opts.inputActiveOptionBackground - }); - } -} -class WholeWordsCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { - constructor(opts) { - super({ - icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].wholeWord, - title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle, - isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder, - inputActiveOptionForeground: opts.inputActiveOptionForeground, - inputActiveOptionBackground: opts.inputActiveOptionBackground - }); - } -} -class RegexCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { - constructor(opts) { - super({ - icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].regex, - title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle, - isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder, - inputActiveOptionForeground: opts.inputActiveOptionForeground, - inputActiveOptionBackground: opts.inputActiveOptionBackground - }); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js ***! - \*************************************************************************************/ -/*! exports provided: PreserveCaseCheckbox, ReplaceInput */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreserveCaseCheckbox", function() { return PreserveCaseCheckbox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceInput", function() { return ReplaceInput; }); -/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../checkbox/checkbox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -const NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('defaultLabel', "input"); -const NLS_PRESERVE_CASE_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.preserveCaseCheckbox', "Preserve Case"); -class PreserveCaseCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__["Checkbox"] { - constructor(opts) { - super({ - // TODO: does this need its own icon? - icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__["Codicon"].preserveCase, - title: NLS_PRESERVE_CASE_LABEL + opts.appendTitle, - isChecked: opts.isChecked, - inputActiveOptionBorder: opts.inputActiveOptionBorder, - inputActiveOptionForeground: opts.inputActiveOptionForeground, - inputActiveOptionBackground: opts.inputActiveOptionBackground - }); - } -} -class ReplaceInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__["Widget"] { - constructor(parent, contextViewProvider, _showOptionButtons, options) { - super(); - this._showOptionButtons = _showOptionButtons; - this.fixFocusOnOptionClickEnabled = true; - this.cachedOptionsWidth = 0; - this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onDidOptionChange = this._onDidOptionChange.event; - this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onKeyDown = this._onKeyDown.event; - this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this._onPreserveCaseKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); - this.onPreserveCaseKeyDown = this._onPreserveCaseKeyDown.event; - this.contextViewProvider = contextViewProvider; - this.placeholder = options.placeholder || ''; - this.validation = options.validation; - this.label = options.label || NLS_DEFAULT_LABEL; - this.inputActiveOptionBorder = options.inputActiveOptionBorder; - this.inputActiveOptionForeground = options.inputActiveOptionForeground; - this.inputActiveOptionBackground = options.inputActiveOptionBackground; - this.inputBackground = options.inputBackground; - this.inputForeground = options.inputForeground; - this.inputBorder = options.inputBorder; - this.inputValidationInfoBorder = options.inputValidationInfoBorder; - this.inputValidationInfoBackground = options.inputValidationInfoBackground; - this.inputValidationInfoForeground = options.inputValidationInfoForeground; - this.inputValidationWarningBorder = options.inputValidationWarningBorder; - this.inputValidationWarningBackground = options.inputValidationWarningBackground; - this.inputValidationWarningForeground = options.inputValidationWarningForeground; - this.inputValidationErrorBorder = options.inputValidationErrorBorder; - this.inputValidationErrorBackground = options.inputValidationErrorBackground; - this.inputValidationErrorForeground = options.inputValidationErrorForeground; - const history = options.history || []; - const flexibleHeight = !!options.flexibleHeight; - const flexibleWidth = !!options.flexibleWidth; - const flexibleMaxHeight = options.flexibleMaxHeight; - this.domNode = document.createElement('div'); - _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'monaco-findInput'); - this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__["HistoryInputBox"](this.domNode, this.contextViewProvider, { - ariaLabel: this.label || '', - placeholder: this.placeholder || '', - validationOptions: { - validation: this.validation - }, - inputBackground: this.inputBackground, - inputForeground: this.inputForeground, - inputBorder: this.inputBorder, - inputValidationInfoBackground: this.inputValidationInfoBackground, - inputValidationInfoForeground: this.inputValidationInfoForeground, - inputValidationInfoBorder: this.inputValidationInfoBorder, - inputValidationWarningBackground: this.inputValidationWarningBackground, - inputValidationWarningForeground: this.inputValidationWarningForeground, - inputValidationWarningBorder: this.inputValidationWarningBorder, - inputValidationErrorBackground: this.inputValidationErrorBackground, - inputValidationErrorForeground: this.inputValidationErrorForeground, - inputValidationErrorBorder: this.inputValidationErrorBorder, - history, - flexibleHeight, - flexibleWidth, - flexibleMaxHeight - })); - this.preserveCase = this._register(new PreserveCaseCheckbox({ - appendTitle: '', - isChecked: false, - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground, - })); - this._register(this.preserveCase.onChange(viaKeyboard => { - this._onDidOptionChange.fire(viaKeyboard); - if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { - this.inputBox.focus(); - } - this.validate(); - })); - this._register(this.preserveCase.onKeyDown(e => { - this._onPreserveCaseKeyDown.fire(e); - })); - if (this._showOptionButtons) { - this.cachedOptionsWidth = this.preserveCase.width(); - } - else { - this.cachedOptionsWidth = 0; - } - // Arrow-Key support to navigate between options - let indexes = [this.preserveCase.domNode]; - this.onkeydown(this.domNode, (event) => { - if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) { - let index = indexes.indexOf(document.activeElement); - if (index >= 0) { - let newIndex = -1; - if (event.equals(17 /* RightArrow */)) { - newIndex = (index + 1) % indexes.length; - } - else if (event.equals(15 /* LeftArrow */)) { - if (index === 0) { - newIndex = indexes.length - 1; - } - else { - newIndex = index - 1; - } - } - if (event.equals(9 /* Escape */)) { - indexes[index].blur(); - } - else if (newIndex >= 0) { - indexes[newIndex].focus(); - } - _dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - } - } - }); - let controls = document.createElement('div'); - controls.className = 'controls'; - controls.style.display = this._showOptionButtons ? 'block' : 'none'; - controls.appendChild(this.preserveCase.domNode); - this.domNode.appendChild(controls); - if (parent) { - parent.appendChild(this.domNode); - } - this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); - this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); - this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); - this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); - } - enable() { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'disabled'); - this.inputBox.enable(); - this.preserveCase.enable(); - } - disable() { - _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'disabled'); - this.inputBox.disable(); - this.preserveCase.disable(); - } - setEnabled(enabled) { - if (enabled) { - this.enable(); - } - else { - this.disable(); - } - } - style(styles) { - this.inputActiveOptionBorder = styles.inputActiveOptionBorder; - this.inputActiveOptionForeground = styles.inputActiveOptionForeground; - this.inputActiveOptionBackground = styles.inputActiveOptionBackground; - this.inputBackground = styles.inputBackground; - this.inputForeground = styles.inputForeground; - this.inputBorder = styles.inputBorder; - this.inputValidationInfoBackground = styles.inputValidationInfoBackground; - this.inputValidationInfoForeground = styles.inputValidationInfoForeground; - this.inputValidationInfoBorder = styles.inputValidationInfoBorder; - this.inputValidationWarningBackground = styles.inputValidationWarningBackground; - this.inputValidationWarningForeground = styles.inputValidationWarningForeground; - this.inputValidationWarningBorder = styles.inputValidationWarningBorder; - this.inputValidationErrorBackground = styles.inputValidationErrorBackground; - this.inputValidationErrorForeground = styles.inputValidationErrorForeground; - this.inputValidationErrorBorder = styles.inputValidationErrorBorder; - this.applyStyles(); - } - applyStyles() { - if (this.domNode) { - const checkBoxStyles = { - inputActiveOptionBorder: this.inputActiveOptionBorder, - inputActiveOptionForeground: this.inputActiveOptionForeground, - inputActiveOptionBackground: this.inputActiveOptionBackground, - }; - this.preserveCase.style(checkBoxStyles); - const inputBoxStyles = { - inputBackground: this.inputBackground, - inputForeground: this.inputForeground, - inputBorder: this.inputBorder, - inputValidationInfoBackground: this.inputValidationInfoBackground, - inputValidationInfoForeground: this.inputValidationInfoForeground, - inputValidationInfoBorder: this.inputValidationInfoBorder, - inputValidationWarningBackground: this.inputValidationWarningBackground, - inputValidationWarningForeground: this.inputValidationWarningForeground, - inputValidationWarningBorder: this.inputValidationWarningBorder, - inputValidationErrorBackground: this.inputValidationErrorBackground, - inputValidationErrorForeground: this.inputValidationErrorForeground, - inputValidationErrorBorder: this.inputValidationErrorBorder - }; - this.inputBox.style(inputBoxStyles); - } - } - select() { - this.inputBox.select(); - } - focus() { - this.inputBox.focus(); - } - getPreserveCase() { - return this.preserveCase.checked; - } - setPreserveCase(value) { - this.preserveCase.checked = value; - } - focusOnPreserve() { - this.preserveCase.focus(); - } - validate() { - if (this.inputBox) { - this.inputBox.validate(); - } - } - set width(newWidth) { - this.inputBox.paddingRight = this.cachedOptionsWidth; - this.inputBox.width = newWidth; - this.domNode.style.width = newWidth + 'px'; - } - dispose() { - super.dispose(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js ***! - \************************************************************************************************/ -/*! exports provided: HighlightedLabel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HighlightedLabel", function() { return HighlightedLabel; }); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class HighlightedLabel { - constructor(container, supportCodicons) { - this.supportCodicons = supportCodicons; - this.text = ''; - this.title = ''; - this.highlights = []; - this.didEverRender = false; - this.domNode = document.createElement('span'); - this.domNode.className = 'monaco-highlighted-label'; - container.appendChild(this.domNode); - } - get element() { - return this.domNode; - } - set(text, highlights = [], title = '', escapeNewLines) { - if (!text) { - text = ''; - } - if (escapeNewLines) { - // adjusts highlights inplace - text = HighlightedLabel.escapeNewLines(text, highlights); - } - if (this.didEverRender && this.text === text && this.title === title && _common_objects_js__WEBPACK_IMPORTED_MODULE_0__["equals"](this.highlights, highlights)) { - return; - } - if (!Array.isArray(highlights)) { - highlights = []; - } - this.text = text; - this.title = title; - this.highlights = highlights; - this.render(); - } - render() { - let htmlContent = ''; - let pos = 0; - for (const highlight of this.highlights) { - if (highlight.end === highlight.start) { - continue; - } - if (pos < highlight.start) { - htmlContent += ''; - const substring = this.text.substring(pos, highlight.start); - htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); - htmlContent += ''; - pos = highlight.end; - } - if (highlight.extraClasses) { - htmlContent += ``; - } - else { - htmlContent += ``; - } - const substring = this.text.substring(highlight.start, highlight.end); - htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); - htmlContent += ''; - pos = highlight.end; - } - if (pos < this.text.length) { - htmlContent += ''; - const substring = this.text.substring(pos); - htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); - htmlContent += ''; - } - this.domNode.innerHTML = htmlContent; - if (this.title) { - this.domNode.title = this.title; - } - else { - this.domNode.removeAttribute('title'); - } - this.didEverRender = true; - } - static escapeNewLines(text, highlights) { - let total = 0; - let extra = 0; - return text.replace(/\r\n|\r|\n/g, (match, offset) => { - extra = match === '\r\n' ? -1 : 0; - offset += total; - for (const highlight of highlights) { - if (highlight.end <= offset) { - continue; - } - if (highlight.start >= offset) { - highlight.start += extra; - } - if (highlight.end >= offset) { - highlight.end += extra; - } - } - total += extra; - return '\u23CE'; - }); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css ***! - \***************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./hover.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js ***! - \********************************************************************************/ -/*! exports provided: HoverWidget, renderHoverAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverWidget", function() { return HoverWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderHoverAction", function() { return renderHoverAction; }); -/* harmony import */ var _hover_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hover.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const $ = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]; -class HoverWidget extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor() { - super(); - this.containerDomNode = document.createElement('div'); - this.containerDomNode.className = 'monaco-hover'; - this.containerDomNode.tabIndex = 0; - this.containerDomNode.setAttribute('role', 'tooltip'); - this.contentsDomNode = document.createElement('div'); - this.contentsDomNode.className = 'monaco-hover-content'; - this._scrollbar = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__["DomScrollableElement"](this.contentsDomNode, {})); - this.containerDomNode.appendChild(this._scrollbar.getDomNode()); - } - onContentsChanged() { - this._scrollbar.scanDomNode(); - } -} -function renderHoverAction(parent, actionOptions, keybindingLabel) { - const actionContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](parent, $('div.action-container')); - const action = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](actionContainer, $('a.action')); - action.setAttribute('href', '#'); - action.setAttribute('role', 'button'); - if (actionOptions.iconClass) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](action, $(`span.icon.${actionOptions.iconClass}`)); - } - const label = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](action, $('span')); - label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label; - return _dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](actionContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, e => { - e.stopPropagation(); - e.preventDefault(); - actionOptions.run(actionContainer); - }); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js ***! - \**********************************************************************************/ -/*! exports provided: IconLabel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconLabel", function() { return IconLabel; }); -/* harmony import */ var _iconlabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iconlabel.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../highlightedlabel/highlightedLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class FastLabelNode { - constructor(_element) { - this._element = _element; - } - get element() { - return this._element; - } - set textContent(content) { - if (this.disposed || content === this._textContent) { - return; - } - this._textContent = content; - this._element.textContent = content; - } - set className(className) { - if (this.disposed || className === this._className) { - return; - } - this._className = className; - this._element.className = className; - } - set title(title) { - if (this.disposed || title === this._title) { - return; - } - this._title = title; - if (this._title) { - this._element.title = title; - } - else { - this._element.removeAttribute('title'); - } - } - set empty(empty) { - if (this.disposed || empty === this._empty) { - return; - } - this._empty = empty; - this._element.style.marginLeft = empty ? '0' : ''; - } - dispose() { - this.disposed = true; - } -} -class IconLabel extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(container, options) { - super(); - this.domNode = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.monaco-icon-label')))); - const labelContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.domNode.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.monaco-icon-label-container')); - const nameContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.monaco-icon-name-container')); - this.descriptionContainer = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.monaco-icon-description-container')))); - if (options === null || options === void 0 ? void 0 : options.supportHighlights) { - this.nameNode = new LabelWithHighlights(nameContainer, !!options.supportCodicons); - } - else { - this.nameNode = new Label(nameContainer); - } - if (options === null || options === void 0 ? void 0 : options.supportDescriptionHighlights) { - this.descriptionNodeFactory = () => new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-description')), !!options.supportCodicons); - } - else { - this.descriptionNodeFactory = () => this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-description')))); - } - } - setLabel(label, description, options) { - const classes = ['monaco-icon-label']; - if (options) { - if (options.extraClasses) { - classes.push(...options.extraClasses); - } - if (options.italic) { - classes.push('italic'); - } - if (options.strikethrough) { - classes.push('strikethrough'); - } - } - this.domNode.className = classes.join(' '); - this.domNode.title = (options === null || options === void 0 ? void 0 : options.title) || ''; - this.nameNode.setLabel(label, options); - if (description || this.descriptionNode) { - if (!this.descriptionNode) { - this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand - } - if (this.descriptionNode instanceof _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"]) { - this.descriptionNode.set(description || '', options ? options.descriptionMatches : undefined); - if (options === null || options === void 0 ? void 0 : options.descriptionTitle) { - this.descriptionNode.element.title = options.descriptionTitle; - } - else { - this.descriptionNode.element.removeAttribute('title'); - } - } - else { - this.descriptionNode.textContent = description || ''; - this.descriptionNode.title = (options === null || options === void 0 ? void 0 : options.descriptionTitle) || ''; - this.descriptionNode.empty = !description; - } - } - } -} -class Label { - constructor(container) { - this.container = container; - this.label = undefined; - this.singleLabel = undefined; - } - setLabel(label, options) { - if (this.label === label && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_5__["equals"])(this.options, options)) { - return; - } - this.label = label; - this.options = options; - if (typeof label === 'string') { - if (!this.singleLabel) { - this.container.innerText = ''; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this.container, 'multiple'); - this.singleLabel = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })); - } - this.singleLabel.textContent = label; - } - else { - this.container.innerText = ''; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.container, 'multiple'); - this.singleLabel = undefined; - for (let i = 0; i < label.length; i++) { - const l = label[i]; - const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }, l)); - if (i < label.length - 1) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-separator', undefined, (options === null || options === void 0 ? void 0 : options.separator) || '/')); - } - } - } - } -} -function splitMatches(labels, separator, matches) { - if (!matches) { - return undefined; - } - let labelStart = 0; - return labels.map(label => { - const labelRange = { start: labelStart, end: labelStart + label.length }; - const result = matches - .map(match => _common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].intersect(labelRange, match)) - .filter(range => !_common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].isEmpty(range)) - .map(({ start, end }) => ({ start: start - labelStart, end: end - labelStart })); - labelStart = labelRange.end + separator.length; - return result; - }); -} -class LabelWithHighlights { - constructor(container, supportCodicons) { - this.container = container; - this.supportCodicons = supportCodicons; - this.label = undefined; - this.singleLabel = undefined; - } - setLabel(label, options) { - if (this.label === label && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_5__["equals"])(this.options, options)) { - return; - } - this.label = label; - this.options = options; - if (typeof label === 'string') { - if (!this.singleLabel) { - this.container.innerText = ''; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this.container, 'multiple'); - this.singleLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })), this.supportCodicons); - } - this.singleLabel.set(label, options === null || options === void 0 ? void 0 : options.matches, options === null || options === void 0 ? void 0 : options.title, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines); - } - else { - this.container.innerText = ''; - _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.container, 'multiple'); - this.singleLabel = undefined; - const separator = (options === null || options === void 0 ? void 0 : options.separator) || '/'; - const matches = splitMatches(label, separator, options === null || options === void 0 ? void 0 : options.matches); - for (let i = 0; i < label.length; i++) { - const l = label[i]; - const m = matches ? matches[i] : undefined; - const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`; - const name = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }); - const highlightedLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, name), this.supportCodicons); - highlightedLabel.set(l, m, options === null || options === void 0 ? void 0 : options.title, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines); - if (i < label.length - 1) { - _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](name, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-separator', undefined, separator)); - } - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./iconlabel.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css ***! - \*********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./inputBox.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js ***! - \********************************************************************************/ -/*! exports provided: InputBox, HistoryInputBox */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputBox", function() { return InputBox; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistoryInputBox", function() { return HistoryInputBox; }); -/* harmony import */ var _inputBox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inputBox.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../formattedTextRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"); -/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_history_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/history.js */ "./node_modules/monaco-editor/esm/vs/base/common/history.js"); -/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - -const $ = _dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]; -const defaultOpts = { - inputBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#3C3C3C'), - inputForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#CCCCCC'), - inputValidationInfoBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#55AAFF'), - inputValidationInfoBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#063B49'), - inputValidationWarningBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#B89500'), - inputValidationWarningBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#352A05'), - inputValidationErrorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#BE1100'), - inputValidationErrorBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#5A1D1D') -}; -class InputBox extends _widget_js__WEBPACK_IMPORTED_MODULE_7__["Widget"] { - constructor(container, contextViewProvider, options) { - super(); - this.state = 'idle'; - this.maxHeight = Number.POSITIVE_INFINITY; - this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._onDidHeightChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidHeightChange = this._onDidHeightChange.event; - this.contextViewProvider = contextViewProvider; - this.options = options || Object.create(null); - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_9__["mixin"])(this.options, defaultOpts, false); - this.message = null; - this.placeholder = this.options.placeholder || ''; - this.ariaLabel = this.options.ariaLabel || ''; - this.inputBackground = this.options.inputBackground; - this.inputForeground = this.options.inputForeground; - this.inputBorder = this.options.inputBorder; - this.inputValidationInfoBorder = this.options.inputValidationInfoBorder; - this.inputValidationInfoBackground = this.options.inputValidationInfoBackground; - this.inputValidationInfoForeground = this.options.inputValidationInfoForeground; - this.inputValidationWarningBorder = this.options.inputValidationWarningBorder; - this.inputValidationWarningBackground = this.options.inputValidationWarningBackground; - this.inputValidationWarningForeground = this.options.inputValidationWarningForeground; - this.inputValidationErrorBorder = this.options.inputValidationErrorBorder; - this.inputValidationErrorBackground = this.options.inputValidationErrorBackground; - this.inputValidationErrorForeground = this.options.inputValidationErrorForeground; - if (this.options.validationOptions) { - this.validation = this.options.validationOptions.validation; - } - this.element = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.monaco-inputbox.idle')); - let tagName = this.options.flexibleHeight ? 'textarea' : 'input'; - let wrapper = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.element, $('.wrapper')); - this.input = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](wrapper, $(tagName + '.input.empty')); - this.input.setAttribute('autocorrect', 'off'); - this.input.setAttribute('autocapitalize', 'off'); - this.input.setAttribute('spellcheck', 'false'); - this.onfocus(this.input, () => this.element.classList.add('synthetic-focus')); - this.onblur(this.input, () => this.element.classList.remove('synthetic-focus')); - if (this.options.flexibleHeight) { - this.maxHeight = typeof this.options.flexibleMaxHeight === 'number' ? this.options.flexibleMaxHeight : Number.POSITIVE_INFINITY; - this.mirror = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](wrapper, $('div.mirror')); - this.mirror.innerText = '\u00a0'; - this.scrollableElement = new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__["ScrollableElement"](this.element, { vertical: 1 /* Auto */ }); - if (this.options.flexibleWidth) { - this.input.setAttribute('wrap', 'off'); - this.mirror.style.whiteSpace = 'pre'; - this.mirror.style.wordWrap = 'initial'; - } - _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, this.scrollableElement.getDomNode()); - this._register(this.scrollableElement); - // from ScrollableElement to DOM - this._register(this.scrollableElement.onScroll(e => this.input.scrollTop = e.scrollTop)); - const onSelectionChange = _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Event"].filter(Object(_event_js__WEBPACK_IMPORTED_MODULE_12__["domEvent"])(document, 'selectionchange'), () => { - const selection = document.getSelection(); - return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === wrapper; - }); - // from DOM to ScrollableElement - this._register(onSelectionChange(this.updateScrollDimensions, this)); - this._register(this.onDidHeightChange(this.updateScrollDimensions, this)); - } - else { - this.input.type = this.options.type || 'text'; - this.input.setAttribute('wrap', 'off'); - } - if (this.ariaLabel) { - this.input.setAttribute('aria-label', this.ariaLabel); - } - if (this.placeholder) { - this.setPlaceHolder(this.placeholder); - } - this.oninput(this.input, () => this.onValueChange()); - this.onblur(this.input, () => this.onBlur()); - this.onfocus(this.input, () => this.onFocus()); - this.ignoreGesture(this.input); - setTimeout(() => this.updateMirror(), 0); - // Support actions - if (this.options.actions) { - this.actionbar = this._register(new _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__["ActionBar"](this.element)); - this.actionbar.push(this.options.actions, { icon: true, label: false }); - } - this.applyStyles(); - } - onBlur() { - this._hideMessage(); - } - onFocus() { - this._showMessage(); - } - setPlaceHolder(placeHolder) { - this.placeholder = placeHolder; - this.input.setAttribute('placeholder', placeHolder); - this.input.title = placeHolder; - } - setAriaLabel(label) { - this.ariaLabel = label; - if (label) { - this.input.setAttribute('aria-label', this.ariaLabel); - } - else { - this.input.removeAttribute('aria-label'); - } - } - getAriaLabel() { - return this.ariaLabel; - } - get inputElement() { - return this.input; - } - get value() { - return this.input.value; - } - set value(newValue) { - if (this.input.value !== newValue) { - this.input.value = newValue; - this.onValueChange(); - } - } - get height() { - return typeof this.cachedHeight === 'number' ? this.cachedHeight : _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalHeight"](this.element); - } - focus() { - this.input.focus(); - } - blur() { - this.input.blur(); - } - hasFocus() { - return document.activeElement === this.input; - } - select(range = null) { - this.input.select(); - if (range) { - this.input.setSelectionRange(range.start, range.end); - } - } - isSelectionAtEnd() { - return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd; - } - enable() { - this.input.removeAttribute('disabled'); - } - disable() { - this.blur(); - this.input.disabled = true; - this._hideMessage(); - } - get width() { - return _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this.input); - } - set width(width) { - if (this.options.flexibleHeight && this.options.flexibleWidth) { - // textarea with horizontal scrolling - let horizontalPadding = 0; - if (this.mirror) { - const paddingLeft = parseFloat(this.mirror.style.paddingLeft || '') || 0; - const paddingRight = parseFloat(this.mirror.style.paddingRight || '') || 0; - horizontalPadding = paddingLeft + paddingRight; - } - this.input.style.width = (width - horizontalPadding) + 'px'; - } - else { - this.input.style.width = width + 'px'; - } - if (this.mirror) { - this.mirror.style.width = width + 'px'; - } - } - set paddingRight(paddingRight) { - if (this.options.flexibleHeight && this.options.flexibleWidth) { - this.input.style.width = `calc(100% - ${paddingRight}px)`; - } - else { - this.input.style.paddingRight = paddingRight + 'px'; - } - if (this.mirror) { - this.mirror.style.paddingRight = paddingRight + 'px'; - } - } - updateScrollDimensions() { - if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number' || !this.scrollableElement) { - return; - } - const scrollHeight = this.cachedContentHeight; - const height = this.cachedHeight; - const scrollTop = this.input.scrollTop; - this.scrollableElement.setScrollDimensions({ scrollHeight, height }); - this.scrollableElement.setScrollPosition({ scrollTop }); - } - showMessage(message, force) { - this.message = message; - this.element.classList.remove('idle'); - this.element.classList.remove('info'); - this.element.classList.remove('warning'); - this.element.classList.remove('error'); - this.element.classList.add(this.classForType(message.type)); - const styles = this.stylesForType(this.message.type); - this.element.style.border = styles.border ? `1px solid ${styles.border}` : ''; - if (this.hasFocus() || force) { - this._showMessage(); - } - } - hideMessage() { - this.message = null; - this.element.classList.remove('info'); - this.element.classList.remove('warning'); - this.element.classList.remove('error'); - this.element.classList.add('idle'); - this._hideMessage(); - this.applyStyles(); - } - validate() { - let errorMsg = null; - if (this.validation) { - errorMsg = this.validation(this.value); - if (errorMsg) { - this.inputElement.setAttribute('aria-invalid', 'true'); - this.showMessage(errorMsg); - } - else if (this.inputElement.hasAttribute('aria-invalid')) { - this.inputElement.removeAttribute('aria-invalid'); - this.hideMessage(); - } - } - return !errorMsg; - } - stylesForType(type) { - switch (type) { - case 1 /* INFO */: return { border: this.inputValidationInfoBorder, background: this.inputValidationInfoBackground, foreground: this.inputValidationInfoForeground }; - case 2 /* WARNING */: return { border: this.inputValidationWarningBorder, background: this.inputValidationWarningBackground, foreground: this.inputValidationWarningForeground }; - default: return { border: this.inputValidationErrorBorder, background: this.inputValidationErrorBackground, foreground: this.inputValidationErrorForeground }; - } - } - classForType(type) { - switch (type) { - case 1 /* INFO */: return 'info'; - case 2 /* WARNING */: return 'warning'; - default: return 'error'; - } - } - _showMessage() { - if (!this.contextViewProvider || !this.message) { - return; - } - let div; - let layout = () => div.style.width = _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this.element) + 'px'; - this.contextViewProvider.showContextView({ - getAnchor: () => this.element, - anchorAlignment: 1 /* RIGHT */, - render: (container) => { - if (!this.message) { - return null; - } - div = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.monaco-inputbox-container')); - layout(); - const renderOptions = { - inline: true, - className: 'monaco-inputbox-message' - }; - const spanElement = (this.message.formatContent - ? Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__["renderFormattedText"])(this.message.content, renderOptions) - : Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__["renderText"])(this.message.content, renderOptions)); - spanElement.classList.add(this.classForType(this.message.type)); - const styles = this.stylesForType(this.message.type); - spanElement.style.backgroundColor = styles.background ? styles.background.toString() : ''; - spanElement.style.color = styles.foreground ? styles.foreground.toString() : ''; - spanElement.style.border = styles.border ? `1px solid ${styles.border}` : ''; - _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](div, spanElement); - return null; - }, - onHide: () => { - this.state = 'closed'; - }, - layout: layout - }); - // ARIA Support - let alertText; - if (this.message.type === 3 /* ERROR */) { - alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertErrorMessage', "Error: {0}", this.message.content); - } - else if (this.message.type === 2 /* WARNING */) { - alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertWarningMessage', "Warning: {0}", this.message.content); - } - else { - alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertInfoMessage', "Info: {0}", this.message.content); - } - _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["alert"](alertText); - this.state = 'open'; - } - _hideMessage() { - if (!this.contextViewProvider) { - return; - } - if (this.state === 'open') { - this.contextViewProvider.hideContextView(); - } - this.state = 'idle'; - } - onValueChange() { - this._onDidChange.fire(this.value); - this.validate(); - this.updateMirror(); - this.input.classList.toggle('empty', !this.value); - if (this.state === 'open' && this.contextViewProvider) { - this.contextViewProvider.layout(); - } - } - updateMirror() { - if (!this.mirror) { - return; - } - const value = this.value; - const lastCharCode = value.charCodeAt(value.length - 1); - const suffix = lastCharCode === 10 ? ' ' : ''; - const mirrorTextContent = value + suffix; - if (mirrorTextContent) { - this.mirror.textContent = value + suffix; - } - else { - this.mirror.innerText = '\u00a0'; - } - this.layout(); - } - style(styles) { - this.inputBackground = styles.inputBackground; - this.inputForeground = styles.inputForeground; - this.inputBorder = styles.inputBorder; - this.inputValidationInfoBackground = styles.inputValidationInfoBackground; - this.inputValidationInfoForeground = styles.inputValidationInfoForeground; - this.inputValidationInfoBorder = styles.inputValidationInfoBorder; - this.inputValidationWarningBackground = styles.inputValidationWarningBackground; - this.inputValidationWarningForeground = styles.inputValidationWarningForeground; - this.inputValidationWarningBorder = styles.inputValidationWarningBorder; - this.inputValidationErrorBackground = styles.inputValidationErrorBackground; - this.inputValidationErrorForeground = styles.inputValidationErrorForeground; - this.inputValidationErrorBorder = styles.inputValidationErrorBorder; - this.applyStyles(); - } - applyStyles() { - const background = this.inputBackground ? this.inputBackground.toString() : ''; - const foreground = this.inputForeground ? this.inputForeground.toString() : ''; - const border = this.inputBorder ? this.inputBorder.toString() : ''; - this.element.style.backgroundColor = background; - this.element.style.color = foreground; - this.input.style.backgroundColor = 'inherit'; - this.input.style.color = foreground; - this.element.style.borderWidth = border ? '1px' : ''; - this.element.style.borderStyle = border ? 'solid' : ''; - this.element.style.borderColor = border; - } - layout() { - if (!this.mirror) { - return; - } - const previousHeight = this.cachedContentHeight; - this.cachedContentHeight = _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalHeight"](this.mirror); - if (previousHeight !== this.cachedContentHeight) { - this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight); - this.input.style.height = this.cachedHeight + 'px'; - this._onDidHeightChange.fire(this.cachedContentHeight); - } - } - insertAtCursor(text) { - const inputElement = this.inputElement; - const start = inputElement.selectionStart; - const end = inputElement.selectionEnd; - const content = inputElement.value; - if (start !== null && end !== null) { - this.value = content.substr(0, start) + text + content.substr(end); - inputElement.setSelectionRange(start + 1, start + 1); - this.layout(); - } - } - dispose() { - this._hideMessage(); - this.message = null; - if (this.actionbar) { - this.actionbar.dispose(); - } - super.dispose(); - } -} -class HistoryInputBox extends InputBox { - constructor(container, contextViewProvider, options) { - super(container, contextViewProvider, options); - this.history = new _common_history_js__WEBPACK_IMPORTED_MODULE_10__["HistoryNavigator"](options.history, 100); - } - addToHistory() { - if (this.value && this.value !== this.getCurrentValue()) { - this.history.add(this.value); - } - } - showNextValue() { - if (!this.history.has(this.value)) { - this.addToHistory(); - } - let next = this.getNextValue(); - if (next) { - next = next === this.value ? this.getNextValue() : next; - } - if (next) { - this.value = next; - _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["status"](this.value); - } - } - showPreviousValue() { - if (!this.history.has(this.value)) { - this.addToHistory(); - } - let previous = this.getPreviousValue(); - if (previous) { - previous = previous === this.value ? this.getPreviousValue() : previous; - } - if (previous) { - this.value = previous; - _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["status"](this.value); - } - } - getCurrentValue() { - let currentValue = this.history.current(); - if (!currentValue) { - currentValue = this.history.last(); - this.history.next(); - } - return currentValue; - } - getPreviousValue() { - return this.history.previous() || this.history.first(); - } - getNextValue() { - return this.history.next() || this.history.last(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css ***! - \***********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./keybindingLabel.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js ***! - \**********************************************************************************************/ -/*! exports provided: KeybindingLabel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeybindingLabel", function() { return KeybindingLabel; }); -/* harmony import */ var _keybindingLabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./keybindingLabel.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/keybindingLabels.js */ "./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const $ = _dom_js__WEBPACK_IMPORTED_MODULE_3__["$"]; -class KeybindingLabel { - constructor(container, os, options) { - this.os = os; - this.options = options; - this.domNode = _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](container, $('.monaco-keybinding')); - this.didEverRender = false; - container.appendChild(this.domNode); - } - set(keybinding, matches) { - if (this.didEverRender && this.keybinding === keybinding && KeybindingLabel.areSame(this.matches, matches)) { - return; - } - this.keybinding = keybinding; - this.matches = matches; - this.render(); - } - render() { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"](this.domNode); - if (this.keybinding) { - let [firstPart, chordPart] = this.keybinding.getParts(); - if (firstPart) { - this.renderPart(this.domNode, firstPart, this.matches ? this.matches.firstPart : null); - } - if (chordPart) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](this.domNode, $('span.monaco-keybinding-key-chord-separator', undefined, ' ')); - this.renderPart(this.domNode, chordPart, this.matches ? this.matches.chordPart : null); - } - this.domNode.title = this.keybinding.getAriaLabel() || ''; - } - else if (this.options && this.options.renderUnboundKeybindings) { - this.renderUnbound(this.domNode); - } - this.didEverRender = true; - } - renderPart(parent, part, match) { - const modifierLabels = _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__["UILabelProvider"].modifierLabels[this.os]; - if (part.ctrlKey) { - this.renderKey(parent, modifierLabels.ctrlKey, Boolean(match === null || match === void 0 ? void 0 : match.ctrlKey), modifierLabels.separator); - } - if (part.shiftKey) { - this.renderKey(parent, modifierLabels.shiftKey, Boolean(match === null || match === void 0 ? void 0 : match.shiftKey), modifierLabels.separator); - } - if (part.altKey) { - this.renderKey(parent, modifierLabels.altKey, Boolean(match === null || match === void 0 ? void 0 : match.altKey), modifierLabels.separator); - } - if (part.metaKey) { - this.renderKey(parent, modifierLabels.metaKey, Boolean(match === null || match === void 0 ? void 0 : match.metaKey), modifierLabels.separator); - } - const keyLabel = part.keyLabel; - if (keyLabel) { - this.renderKey(parent, keyLabel, Boolean(match === null || match === void 0 ? void 0 : match.keyCode), ''); - } - } - renderKey(parent, label, highlight, separator) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key' + (highlight ? '.highlight' : ''), undefined, label)); - if (separator) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key-separator', undefined, separator)); - } - } - renderUnbound(parent) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key', undefined, Object(_nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"])('unbound', "Unbound"))); - } - static areSame(a, b) { - if (a === b || (!a && !b)) { - return true; - } - return !!a && !!b && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_1__["equals"])(a.firstPart, b.firstPart) && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_1__["equals"])(a.chordPart, b.chordPart); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./list.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js ***! - \************************************************************************/ -/*! exports provided: ListError */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListError", function() { return ListError; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class ListError extends Error { - constructor(user, message) { - super(`ListError [${user}] ${message}`); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js ***! - \******************************************************************************/ -/*! exports provided: PagedList */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagedList", function() { return PagedList; }); -/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _listWidget_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class PagedRenderer { - constructor(renderer, modelProvider) { - this.renderer = renderer; - this.modelProvider = modelProvider; - } - get templateId() { return this.renderer.templateId; } - renderTemplate(container) { - const data = this.renderer.renderTemplate(container); - return { data, disposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None }; - } - renderElement(index, _, data, height) { - if (data.disposable) { - data.disposable.dispose(); - } - if (!data.data) { - return; - } - const model = this.modelProvider(); - if (model.isResolved(index)) { - return this.renderer.renderElement(model.get(index), index, data.data, height); - } - const cts = new _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__["CancellationTokenSource"](); - const promise = model.resolve(index, cts.token); - data.disposable = { dispose: () => cts.cancel() }; - this.renderer.renderPlaceholder(index, data.data); - promise.then(entry => this.renderer.renderElement(entry, index, data.data, height)); - } - disposeTemplate(data) { - if (data.disposable) { - data.disposable.dispose(); - data.disposable = undefined; - } - if (data.data) { - this.renderer.disposeTemplate(data.data); - data.data = undefined; - } - } -} -class PagedAccessibilityProvider { - constructor(modelProvider, accessibilityProvider) { - this.modelProvider = modelProvider; - this.accessibilityProvider = accessibilityProvider; - } - getWidgetAriaLabel() { - return this.accessibilityProvider.getWidgetAriaLabel(); - } - getAriaLabel(index) { - const model = this.modelProvider(); - if (!model.isResolved(index)) { - return null; - } - return this.accessibilityProvider.getAriaLabel(model.get(index)); - } -} -function fromPagedListOptions(modelProvider, options) { - return Object.assign(Object.assign({}, options), { accessibilityProvider: options.accessibilityProvider && new PagedAccessibilityProvider(modelProvider, options.accessibilityProvider) }); -} -class PagedList { - constructor(user, container, virtualDelegate, renderers, options = {}) { - const modelProvider = () => this.model; - const pagedRenderers = renderers.map(r => new PagedRenderer(r, modelProvider)); - this.list = new _listWidget_js__WEBPACK_IMPORTED_MODULE_3__["List"](user, container, virtualDelegate, pagedRenderers, fromPagedListOptions(modelProvider, options)); - } - updateOptions(options) { - this.list.updateOptions(options); - } - getHTMLElement() { - return this.list.getHTMLElement(); - } - get onDidFocus() { - return this.list.onDidFocus; - } - get onDidDispose() { - return this.list.onDidDispose; - } - get onMouseDblClick() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onMouseDblClick, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent })); - } - get onPointer() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onPointer, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent })); - } - get onDidChangeFocus() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onDidChangeFocus, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent })); - } - get onDidChangeSelection() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onDidChangeSelection, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent })); - } - get model() { - return this._model; - } - set model(model) { - this._model = model; - this.list.splice(0, this.list.length, Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__["range"])(model.length)); - } - getFocus() { - return this.list.getFocus(); - } - setSelection(indexes, browserEvent) { - this.list.setSelection(indexes, browserEvent); - } - getSelection() { - return this.list.getSelection(); - } - style(styles) { - this.list.style(styles); - } - dispose() { - this.list.dispose(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js ***! - \****************************************************************************/ -/*! exports provided: ElementsDragAndDropData, ExternalElementsDragAndDropData, NativeDragAndDropData, ListView */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementsDragAndDropData", function() { return ElementsDragAndDropData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExternalElementsDragAndDropData", function() { return ExternalElementsDragAndDropData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NativeDragAndDropData", function() { return NativeDragAndDropData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListView", function() { return ListView; }); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/scrollable.js */ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js"); -/* harmony import */ var _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rangeMap.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js"); -/* harmony import */ var _rowCache_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./rowCache.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js"); -/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); -/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - - - - - - - - - - - - -const DefaultOptions = { - useShadows: true, - verticalScrollMode: 1 /* Auto */, - setRowLineHeight: true, - setRowHeight: true, - supportDynamicHeights: false, - dnd: { - getDragElements(e) { return [e]; }, - getDragURI() { return null; }, - onDragStart() { }, - onDragOver() { return false; }, - drop() { } - }, - horizontalScrolling: false, - transformOptimization: true -}; -class ElementsDragAndDropData { - constructor(elements) { - this.elements = elements; - } - update() { } - getData() { - return this.elements; - } -} -class ExternalElementsDragAndDropData { - constructor(elements) { - this.elements = elements; - } - update() { } - getData() { - return this.elements; - } -} -class NativeDragAndDropData { - constructor() { - this.types = []; - this.files = []; - } - update(dataTransfer) { - if (dataTransfer.types) { - this.types.splice(0, this.types.length, ...dataTransfer.types); - } - if (dataTransfer.files) { - this.files.splice(0, this.files.length); - for (let i = 0; i < dataTransfer.files.length; i++) { - const file = dataTransfer.files.item(i); - if (file && (file.size || file.type)) { - this.files.push(file); - } - } - } - } - getData() { - return { - types: this.types, - files: this.files - }; - } -} -function equalsDragFeedback(f1, f2) { - if (Array.isArray(f1) && Array.isArray(f2)) { - return Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__["equals"])(f1, f2); - } - return f1 === f2; -} -class ListViewAccessibilityProvider { - constructor(accessibilityProvider) { - if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getSetSize) { - this.getSetSize = accessibilityProvider.getSetSize.bind(accessibilityProvider); - } - else { - this.getSetSize = (e, i, l) => l; - } - if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getPosInSet) { - this.getPosInSet = accessibilityProvider.getPosInSet.bind(accessibilityProvider); - } - else { - this.getPosInSet = (e, i) => i + 1; - } - if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getRole) { - this.getRole = accessibilityProvider.getRole.bind(accessibilityProvider); - } - else { - this.getRole = _ => 'listitem'; - } - if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.isChecked) { - this.isChecked = accessibilityProvider.isChecked.bind(accessibilityProvider); - } - else { - this.isChecked = _ => undefined; - } - } -} -class ListView { - constructor(container, virtualDelegate, renderers, options = DefaultOptions) { - this.virtualDelegate = virtualDelegate; - this.domId = `list_id_${++ListView.InstanceCount}`; - this.renderers = new Map(); - this.renderWidth = 0; - this._scrollHeight = 0; - this.scrollableElementUpdateDisposable = null; - this.scrollableElementWidthDelayer = new _common_async_js__WEBPACK_IMPORTED_MODULE_14__["Delayer"](50); - this.splicing = false; - this.dragOverAnimationStopDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.dragOverMouseY = 0; - this.canDrop = false; - this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.onDragLeaveTimeout = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._onDidChangeContentHeight = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this._horizontalScrolling = false; - if (options.horizontalScrolling && options.supportDynamicHeights) { - throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously'); - } - this.items = []; - this.itemId = 0; - this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["RangeMap"](); - for (const renderer of renderers) { - this.renderers.set(renderer.templateId, renderer); - } - this.cache = this.disposables.add(new _rowCache_js__WEBPACK_IMPORTED_MODULE_9__["RowCache"](this.renderers)); - this.lastRenderTop = 0; - this.lastRenderHeight = 0; - this.domNode = document.createElement('div'); - this.domNode.className = 'monaco-list'; - _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, this.domId); - this.domNode.tabIndex = 0; - _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'mouse-support', typeof options.mouseSupport === 'boolean' ? options.mouseSupport : true); - this._horizontalScrolling = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.horizontalScrolling, DefaultOptions.horizontalScrolling); - _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'horizontal-scrolling', this._horizontalScrolling); - this.additionalScrollHeight = typeof options.additionalScrollHeight === 'undefined' ? 0 : options.additionalScrollHeight; - this.accessibilityProvider = new ListViewAccessibilityProvider(options.accessibilityProvider); - this.rowsContainer = document.createElement('div'); - this.rowsContainer.className = 'monaco-list-rows'; - const transformOptimization = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.transformOptimization, DefaultOptions.transformOptimization); - if (transformOptimization) { - this.rowsContainer.style.transform = 'translate3d(0px, 0px, 0px)'; - } - this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_2__["Gesture"].addTarget(this.rowsContainer)); - this.scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_7__["Scrollable"](Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.smoothScrolling, false) ? 125 : 0, cb => _dom_js__WEBPACK_IMPORTED_MODULE_3__["scheduleAtNextAnimationFrame"](cb)); - this.scrollableElement = this.disposables.add(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_6__["SmoothScrollableElement"](this.rowsContainer, { - alwaysConsumeMouseWheel: true, - horizontal: 1 /* Auto */, - vertical: Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.verticalScrollMode, DefaultOptions.verticalScrollMode), - useShadows: Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.useShadows, DefaultOptions.useShadows), - }, this.scrollable)); - this.domNode.appendChild(this.scrollableElement.getDomNode()); - container.appendChild(this.domNode); - this.scrollableElement.onScroll(this.onScroll, this, this.disposables); - Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Change)(this.onTouchChange, this, this.disposables); - // Prevent the monaco-scrollable-element from scrolling - // https://github.com/Microsoft/vscode/issues/44181 - Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.scrollableElement.getDomNode(), 'scroll')(e => e.target.scrollTop = 0, null, this.disposables); - _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dragover'), e => this.toDragEvent(e))(this.onDragOver, this, this.disposables); - _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'drop'), e => this.toDragEvent(e))(this.onDrop, this, this.disposables); - Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dragleave')(this.onDragLeave, this, this.disposables); - Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(window, 'dragend')(this.onDragEnd, this, this.disposables); - this.setRowLineHeight = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight); - this.setRowHeight = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.setRowHeight, DefaultOptions.setRowHeight); - this.supportDynamicHeights = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.supportDynamicHeights, DefaultOptions.supportDynamicHeights); - this.dnd = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.dnd, DefaultOptions.dnd); - this.layout(); - } - get contentHeight() { return this.rangeMap.size; } - get horizontalScrolling() { return this._horizontalScrolling; } - set horizontalScrolling(value) { - if (value === this._horizontalScrolling) { - return; - } - if (value && this.supportDynamicHeights) { - throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously'); - } - this._horizontalScrolling = value; - _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'horizontal-scrolling', this._horizontalScrolling); - if (this._horizontalScrolling) { - for (const item of this.items) { - this.measureItemWidth(item); - } - this.updateScrollWidth(); - this.scrollableElement.setScrollDimensions({ width: _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](this.domNode) }); - this.rowsContainer.style.width = `${Math.max(this.scrollWidth || 0, this.renderWidth)}px`; - } - else { - this.scrollableElementWidthDelayer.cancel(); - this.scrollableElement.setScrollDimensions({ width: this.renderWidth, scrollWidth: this.renderWidth }); - this.rowsContainer.style.width = ''; - } - } - updateOptions(options) { - if (options.additionalScrollHeight !== undefined) { - this.additionalScrollHeight = options.additionalScrollHeight; - } - if (options.smoothScrolling !== undefined) { - this.scrollable.setSmoothScrollDuration(options.smoothScrolling ? 125 : 0); - } - if (options.horizontalScrolling !== undefined) { - this.horizontalScrolling = options.horizontalScrolling; - } - } - splice(start, deleteCount, elements = []) { - if (this.splicing) { - throw new Error('Can\'t run recursive splices.'); - } - this.splicing = true; - try { - return this._splice(start, deleteCount, elements); - } - finally { - this.splicing = false; - this._onDidChangeContentHeight.fire(this.contentHeight); - } - } - _splice(start, deleteCount, elements = []) { - const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); - const deleteRange = { start, end: start + deleteCount }; - const removeRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRenderRange, deleteRange); - for (let i = removeRange.start; i < removeRange.end; i++) { - this.removeItemFromDOM(i); - } - const previousRestRange = { start: start + deleteCount, end: this.items.length }; - const previousRenderedRestRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRestRange, previousRenderRange); - const previousUnrenderedRestRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRestRange, previousRenderRange); - const inserted = elements.map(element => ({ - id: String(this.itemId++), - element, - templateId: this.virtualDelegate.getTemplateId(element), - size: this.virtualDelegate.getHeight(element), - width: undefined, - hasDynamicHeight: !!this.virtualDelegate.hasDynamicHeight && this.virtualDelegate.hasDynamicHeight(element), - lastDynamicHeightWidth: undefined, - row: null, - uri: undefined, - dropTarget: false, - dragStartDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None - })); - let deleted; - // TODO@joao: improve this optimization to catch even more cases - if (start === 0 && deleteCount >= this.items.length) { - this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["RangeMap"](); - this.rangeMap.splice(0, 0, inserted); - this.items = inserted; - deleted = []; - } - else { - this.rangeMap.splice(start, deleteCount, inserted); - deleted = this.items.splice(start, deleteCount, ...inserted); - } - const delta = elements.length - deleteCount; - const renderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); - const renderedRestRange = Object(_rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["shift"])(previousRenderedRestRange, delta); - const updateRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(renderRange, renderedRestRange); - for (let i = updateRange.start; i < updateRange.end; i++) { - this.updateItemInDOM(this.items[i], i); - } - const removeRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderedRestRange, renderRange); - for (const range of removeRanges) { - for (let i = range.start; i < range.end; i++) { - this.removeItemFromDOM(i); - } - } - const unrenderedRestRanges = previousUnrenderedRestRanges.map(r => Object(_rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["shift"])(r, delta)); - const elementsRange = { start, end: start + elements.length }; - const insertRanges = [elementsRange, ...unrenderedRestRanges].map(r => _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(renderRange, r)); - const beforeElement = this.getNextToLastElement(insertRanges); - for (const range of insertRanges) { - for (let i = range.start; i < range.end; i++) { - this.insertItemInDOM(i, beforeElement); - } - } - this.eventuallyUpdateScrollDimensions(); - if (this.supportDynamicHeights) { - this._rerender(this.scrollTop, this.renderHeight); - } - return deleted.map(i => i.element); - } - eventuallyUpdateScrollDimensions() { - this._scrollHeight = this.contentHeight; - this.rowsContainer.style.height = `${this._scrollHeight}px`; - if (!this.scrollableElementUpdateDisposable) { - this.scrollableElementUpdateDisposable = _dom_js__WEBPACK_IMPORTED_MODULE_3__["scheduleAtNextAnimationFrame"](() => { - this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight }); - this.updateScrollWidth(); - this.scrollableElementUpdateDisposable = null; - }); - } - } - eventuallyUpdateScrollWidth() { - if (!this.horizontalScrolling) { - this.scrollableElementWidthDelayer.cancel(); - return; - } - this.scrollableElementWidthDelayer.trigger(() => this.updateScrollWidth()); - } - updateScrollWidth() { - if (!this.horizontalScrolling) { - return; - } - let scrollWidth = 0; - for (const item of this.items) { - if (typeof item.width !== 'undefined') { - scrollWidth = Math.max(scrollWidth, item.width); - } - } - this.scrollWidth = scrollWidth; - this.scrollableElement.setScrollDimensions({ scrollWidth: scrollWidth === 0 ? 0 : (scrollWidth + 10) }); - } - rerender() { - if (!this.supportDynamicHeights) { - return; - } - for (const item of this.items) { - item.lastDynamicHeightWidth = undefined; - } - this._rerender(this.lastRenderTop, this.lastRenderHeight); - } - get length() { - return this.items.length; - } - get renderHeight() { - const scrollDimensions = this.scrollableElement.getScrollDimensions(); - return scrollDimensions.height; - } - element(index) { - return this.items[index].element; - } - domElement(index) { - const row = this.items[index].row; - return row && row.domNode; - } - elementHeight(index) { - return this.items[index].size; - } - elementTop(index) { - return this.rangeMap.positionAt(index); - } - indexAt(position) { - return this.rangeMap.indexAt(position); - } - indexAfter(position) { - return this.rangeMap.indexAfter(position); - } - layout(height, width) { - let scrollDimensions = { - height: typeof height === 'number' ? height : _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentHeight"](this.domNode) - }; - if (this.scrollableElementUpdateDisposable) { - this.scrollableElementUpdateDisposable.dispose(); - this.scrollableElementUpdateDisposable = null; - scrollDimensions.scrollHeight = this.scrollHeight; - } - this.scrollableElement.setScrollDimensions(scrollDimensions); - if (typeof width !== 'undefined') { - this.renderWidth = width; - if (this.supportDynamicHeights) { - this._rerender(this.scrollTop, this.renderHeight); - } - if (this.horizontalScrolling) { - this.scrollableElement.setScrollDimensions({ - width: typeof width === 'number' ? width : _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](this.domNode) - }); - } - } - } - // Render - render(previousRenderRange, renderTop, renderHeight, renderLeft, scrollWidth, updateItemsInDOM = false) { - const renderRange = this.getRenderRange(renderTop, renderHeight); - const rangesToInsert = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderRange, previousRenderRange); - const rangesToRemove = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRenderRange, renderRange); - const beforeElement = this.getNextToLastElement(rangesToInsert); - if (updateItemsInDOM) { - const rangesToUpdate = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRenderRange, renderRange); - for (let i = rangesToUpdate.start; i < rangesToUpdate.end; i++) { - this.updateItemInDOM(this.items[i], i); - } - } - for (const range of rangesToInsert) { - for (let i = range.start; i < range.end; i++) { - this.insertItemInDOM(i, beforeElement); - } - } - for (const range of rangesToRemove) { - for (let i = range.start; i < range.end; i++) { - this.removeItemFromDOM(i); - } - } - if (renderLeft !== undefined) { - this.rowsContainer.style.left = `-${renderLeft}px`; - } - this.rowsContainer.style.top = `-${renderTop}px`; - if (this.horizontalScrolling && scrollWidth !== undefined) { - this.rowsContainer.style.width = `${Math.max(scrollWidth, this.renderWidth)}px`; - } - this.lastRenderTop = renderTop; - this.lastRenderHeight = renderHeight; - } - // DOM operations - insertItemInDOM(index, beforeElement) { - const item = this.items[index]; - if (!item.row) { - item.row = this.cache.alloc(item.templateId); - const role = this.accessibilityProvider.getRole(item.element) || 'listitem'; - item.row.domNode.setAttribute('role', role); - const checked = this.accessibilityProvider.isChecked(item.element); - if (typeof checked !== 'undefined') { - item.row.domNode.setAttribute('aria-checked', String(!!checked)); - } - } - if (!item.row.domNode.parentElement) { - if (beforeElement) { - this.rowsContainer.insertBefore(item.row.domNode, beforeElement); - } - else { - this.rowsContainer.appendChild(item.row.domNode); - } - } - this.updateItemInDOM(item, index); - const renderer = this.renderers.get(item.templateId); - if (!renderer) { - throw new Error(`No renderer found for template id ${item.templateId}`); - } - if (renderer) { - renderer.renderElement(item.element, index, item.row.templateData, item.size); - } - const uri = this.dnd.getDragURI(item.element); - item.dragStartDisposable.dispose(); - item.row.domNode.draggable = !!uri; - if (uri) { - const onDragStart = Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(item.row.domNode, 'dragstart'); - item.dragStartDisposable = onDragStart(event => this.onDragStart(item.element, uri, event)); - } - if (this.horizontalScrolling) { - this.measureItemWidth(item); - this.eventuallyUpdateScrollWidth(); - } - } - measureItemWidth(item) { - if (!item.row || !item.row.domNode) { - return; - } - item.row.domNode.style.width = _browser_js__WEBPACK_IMPORTED_MODULE_15__["isFirefox"] ? '-moz-fit-content' : 'fit-content'; - item.width = _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](item.row.domNode); - const style = window.getComputedStyle(item.row.domNode); - if (style.paddingLeft) { - item.width += parseFloat(style.paddingLeft); - } - if (style.paddingRight) { - item.width += parseFloat(style.paddingRight); - } - item.row.domNode.style.width = ''; - } - updateItemInDOM(item, index) { - item.row.domNode.style.top = `${this.elementTop(index)}px`; - if (this.setRowHeight) { - item.row.domNode.style.height = `${item.size}px`; - } - if (this.setRowLineHeight) { - item.row.domNode.style.lineHeight = `${item.size}px`; - } - item.row.domNode.setAttribute('data-index', `${index}`); - item.row.domNode.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false'); - item.row.domNode.setAttribute('aria-setsize', String(this.accessibilityProvider.getSetSize(item.element, index, this.length))); - item.row.domNode.setAttribute('aria-posinset', String(this.accessibilityProvider.getPosInSet(item.element, index))); - item.row.domNode.setAttribute('id', this.getElementDomId(index)); - _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](item.row.domNode, 'drop-target', item.dropTarget); - } - removeItemFromDOM(index) { - const item = this.items[index]; - item.dragStartDisposable.dispose(); - const renderer = this.renderers.get(item.templateId); - if (item.row && renderer && renderer.disposeElement) { - renderer.disposeElement(item.element, index, item.row.templateData, item.size); - } - this.cache.release(item.row); - item.row = null; - if (this.horizontalScrolling) { - this.eventuallyUpdateScrollWidth(); - } - } - getScrollTop() { - const scrollPosition = this.scrollableElement.getScrollPosition(); - return scrollPosition.scrollTop; - } - setScrollTop(scrollTop) { - if (this.scrollableElementUpdateDisposable) { - this.scrollableElementUpdateDisposable.dispose(); - this.scrollableElementUpdateDisposable = null; - this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight }); - } - this.scrollableElement.setScrollPosition({ scrollTop }); - } - get scrollTop() { - return this.getScrollTop(); - } - set scrollTop(scrollTop) { - this.setScrollTop(scrollTop); - } - get scrollHeight() { - return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this.additionalScrollHeight; - } - // Events - get onMouseClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'click'), e => this.toMouseEvent(e)); } - get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dblclick'), e => this.toMouseEvent(e)); } - get onMouseMiddleClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].filter(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'auxclick'), e => this.toMouseEvent(e)), e => e.browserEvent.button === 1); } - get onMouseDown() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'mousedown'), e => this.toMouseEvent(e)); } - get onContextMenu() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'contextmenu'), e => this.toMouseEvent(e)); } - get onTouchStart() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'touchstart'), e => this.toTouchEvent(e)); } - get onTap() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Tap), e => this.toGestureEvent(e)); } - toMouseEvent(browserEvent) { - const index = this.getItemIndexFromEventTarget(browserEvent.target || null); - const item = typeof index === 'undefined' ? undefined : this.items[index]; - const element = item && item.element; - return { browserEvent, index, element }; - } - toTouchEvent(browserEvent) { - const index = this.getItemIndexFromEventTarget(browserEvent.target || null); - const item = typeof index === 'undefined' ? undefined : this.items[index]; - const element = item && item.element; - return { browserEvent, index, element }; - } - toGestureEvent(browserEvent) { - const index = this.getItemIndexFromEventTarget(browserEvent.initialTarget || null); - const item = typeof index === 'undefined' ? undefined : this.items[index]; - const element = item && item.element; - return { browserEvent, index, element }; - } - toDragEvent(browserEvent) { - const index = this.getItemIndexFromEventTarget(browserEvent.target || null); - const item = typeof index === 'undefined' ? undefined : this.items[index]; - const element = item && item.element; - return { browserEvent, index, element }; - } - onScroll(e) { - try { - const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); - this.render(previousRenderRange, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth); - if (this.supportDynamicHeights) { - this._rerender(e.scrollTop, e.height); - } - } - catch (err) { - console.error('Got bad scroll event:', e); - throw err; - } - } - onTouchChange(event) { - event.preventDefault(); - event.stopPropagation(); - this.scrollTop -= event.translationY; - } - // DND - onDragStart(element, uri, event) { - if (!event.dataTransfer) { - return; - } - const elements = this.dnd.getDragElements(element); - event.dataTransfer.effectAllowed = 'copyMove'; - event.dataTransfer.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_13__["DataTransfers"].RESOURCES, JSON.stringify([uri])); - if (event.dataTransfer.setDragImage) { - let label; - if (this.dnd.getDragLabel) { - label = this.dnd.getDragLabel(elements, event); - } - if (typeof label === 'undefined') { - label = String(elements.length); - } - const dragImage = _dom_js__WEBPACK_IMPORTED_MODULE_3__["$"]('.monaco-drag-image'); - dragImage.textContent = label; - document.body.appendChild(dragImage); - event.dataTransfer.setDragImage(dragImage, -10, -10); - setTimeout(() => document.body.removeChild(dragImage), 0); - } - this.currentDragData = new ElementsDragAndDropData(elements); - _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = new ExternalElementsDragAndDropData(elements); - if (this.dnd.onDragStart) { - this.dnd.onDragStart(this.currentDragData, event); - } - } - onDragOver(event) { - event.browserEvent.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome) - this.onDragLeaveTimeout.dispose(); - if (_dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData && _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData.getData() === 'vscode-ui') { - return false; - } - this.setupDragAndDropScrollTopAnimation(event.browserEvent); - if (!event.browserEvent.dataTransfer) { - return false; - } - // Drag over from outside - if (!this.currentDragData) { - if (_dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData) { - // Drag over from another list - this.currentDragData = _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData; - } - else { - // Drag over from the desktop - if (!event.browserEvent.dataTransfer.types) { - return false; - } - this.currentDragData = new NativeDragAndDropData(); - } - } - const result = this.dnd.onDragOver(this.currentDragData, event.element, event.index, event.browserEvent); - this.canDrop = typeof result === 'boolean' ? result : result.accept; - if (!this.canDrop) { - this.currentDragFeedback = undefined; - this.currentDragFeedbackDisposable.dispose(); - return false; - } - event.browserEvent.dataTransfer.dropEffect = (typeof result !== 'boolean' && result.effect === 0 /* Copy */) ? 'copy' : 'move'; - let feedback; - if (typeof result !== 'boolean' && result.feedback) { - feedback = result.feedback; - } - else { - if (typeof event.index === 'undefined') { - feedback = [-1]; - } - else { - feedback = [event.index]; - } - } - // sanitize feedback list - feedback = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__["distinct"])(feedback).filter(i => i >= -1 && i < this.length).sort((a, b) => a - b); - feedback = feedback[0] === -1 ? [-1] : feedback; - if (equalsDragFeedback(this.currentDragFeedback, feedback)) { - return true; - } - this.currentDragFeedback = feedback; - this.currentDragFeedbackDisposable.dispose(); - if (feedback[0] === -1) { // entire list feedback - _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, 'drop-target'); - _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.rowsContainer, 'drop-target'); - this.currentDragFeedbackDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](this.domNode, 'drop-target'); - _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](this.rowsContainer, 'drop-target'); - }); - } - else { - for (const index of feedback) { - const item = this.items[index]; - item.dropTarget = true; - if (item.row && item.row.domNode) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](item.row.domNode, 'drop-target'); - } - } - this.currentDragFeedbackDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - for (const index of feedback) { - const item = this.items[index]; - item.dropTarget = false; - if (item.row && item.row.domNode) { - _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](item.row.domNode, 'drop-target'); - } - } - }); - } - return true; - } - onDragLeave() { - this.onDragLeaveTimeout.dispose(); - this.onDragLeaveTimeout = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => this.clearDragOverFeedback(), 100); - } - onDrop(event) { - if (!this.canDrop) { - return; - } - const dragData = this.currentDragData; - this.teardownDragAndDropScrollTopAnimation(); - this.clearDragOverFeedback(); - this.currentDragData = undefined; - _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = undefined; - if (!dragData || !event.browserEvent.dataTransfer) { - return; - } - event.browserEvent.preventDefault(); - dragData.update(event.browserEvent.dataTransfer); - this.dnd.drop(dragData, event.element, event.index, event.browserEvent); - } - onDragEnd(event) { - this.canDrop = false; - this.teardownDragAndDropScrollTopAnimation(); - this.clearDragOverFeedback(); - this.currentDragData = undefined; - _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = undefined; - if (this.dnd.onDragEnd) { - this.dnd.onDragEnd(event); - } - } - clearDragOverFeedback() { - this.currentDragFeedback = undefined; - this.currentDragFeedbackDisposable.dispose(); - this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - // DND scroll top animation - setupDragAndDropScrollTopAnimation(event) { - if (!this.dragOverAnimationDisposable) { - const viewTop = _dom_js__WEBPACK_IMPORTED_MODULE_3__["getTopLeftOffset"](this.domNode).top; - this.dragOverAnimationDisposable = _dom_js__WEBPACK_IMPORTED_MODULE_3__["animate"](this.animateDragAndDropScrollTop.bind(this, viewTop)); - } - this.dragOverAnimationStopDisposable.dispose(); - this.dragOverAnimationStopDisposable = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => { - if (this.dragOverAnimationDisposable) { - this.dragOverAnimationDisposable.dispose(); - this.dragOverAnimationDisposable = undefined; - } - }, 1000); - this.dragOverMouseY = event.pageY; - } - animateDragAndDropScrollTop(viewTop) { - if (this.dragOverMouseY === undefined) { - return; - } - const diff = this.dragOverMouseY - viewTop; - const upperLimit = this.renderHeight - 35; - if (diff < 35) { - this.scrollTop += Math.max(-14, Math.floor(0.3 * (diff - 35))); - } - else if (diff > upperLimit) { - this.scrollTop += Math.min(14, Math.floor(0.3 * (diff - upperLimit))); - } - } - teardownDragAndDropScrollTopAnimation() { - this.dragOverAnimationStopDisposable.dispose(); - if (this.dragOverAnimationDisposable) { - this.dragOverAnimationDisposable.dispose(); - this.dragOverAnimationDisposable = undefined; - } - } - // Util - getItemIndexFromEventTarget(target) { - const scrollableElement = this.scrollableElement.getDomNode(); - let element = target; - while (element instanceof HTMLElement && element !== this.rowsContainer && scrollableElement.contains(element)) { - const rawIndex = element.getAttribute('data-index'); - if (rawIndex) { - const index = Number(rawIndex); - if (!isNaN(index)) { - return index; - } - } - element = element.parentElement; - } - return undefined; - } - getRenderRange(renderTop, renderHeight) { - return { - start: this.rangeMap.indexAt(renderTop), - end: this.rangeMap.indexAfter(renderTop + renderHeight - 1) - }; - } - /** - * Given a stable rendered state, checks every rendered element whether it needs - * to be probed for dynamic height. Adjusts scroll height and top if necessary. - */ - _rerender(renderTop, renderHeight) { - const previousRenderRange = this.getRenderRange(renderTop, renderHeight); - // Let's remember the second element's position, this helps in scrolling up - // and preserving a linear upwards scroll movement - let anchorElementIndex; - let anchorElementTopDelta; - if (renderTop === this.elementTop(previousRenderRange.start)) { - anchorElementIndex = previousRenderRange.start; - anchorElementTopDelta = 0; - } - else if (previousRenderRange.end - previousRenderRange.start > 1) { - anchorElementIndex = previousRenderRange.start + 1; - anchorElementTopDelta = this.elementTop(anchorElementIndex) - renderTop; - } - let heightDiff = 0; - while (true) { - const renderRange = this.getRenderRange(renderTop, renderHeight); - let didChange = false; - for (let i = renderRange.start; i < renderRange.end; i++) { - const diff = this.probeDynamicHeight(i); - if (diff !== 0) { - this.rangeMap.splice(i, 1, [this.items[i]]); - } - heightDiff += diff; - didChange = didChange || diff !== 0; - } - if (!didChange) { - if (heightDiff !== 0) { - this.eventuallyUpdateScrollDimensions(); - } - const unrenderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRenderRange, renderRange); - for (const range of unrenderRanges) { - for (let i = range.start; i < range.end; i++) { - if (this.items[i].row) { - this.removeItemFromDOM(i); - } - } - } - const renderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderRange, previousRenderRange); - for (const range of renderRanges) { - for (let i = range.start; i < range.end; i++) { - const afterIndex = i + 1; - const beforeRow = afterIndex < this.items.length ? this.items[afterIndex].row : null; - const beforeElement = beforeRow ? beforeRow.domNode : null; - this.insertItemInDOM(i, beforeElement); - } - } - for (let i = renderRange.start; i < renderRange.end; i++) { - if (this.items[i].row) { - this.updateItemInDOM(this.items[i], i); - } - } - if (typeof anchorElementIndex === 'number') { - this.scrollTop = this.elementTop(anchorElementIndex) - anchorElementTopDelta; - } - this._onDidChangeContentHeight.fire(this.contentHeight); - return; - } - } - } - probeDynamicHeight(index) { - const item = this.items[index]; - if (!item.hasDynamicHeight || item.lastDynamicHeightWidth === this.renderWidth) { - return 0; - } - if (!!this.virtualDelegate.hasDynamicHeight && !this.virtualDelegate.hasDynamicHeight(item.element)) { - return 0; - } - const size = item.size; - if (!this.setRowHeight && item.row && item.row.domNode) { - let newSize = item.row.domNode.offsetHeight; - item.size = newSize; - item.lastDynamicHeightWidth = this.renderWidth; - return newSize - size; - } - const row = this.cache.alloc(item.templateId); - row.domNode.style.height = ''; - this.rowsContainer.appendChild(row.domNode); - const renderer = this.renderers.get(item.templateId); - if (renderer) { - renderer.renderElement(item.element, index, row.templateData, undefined); - if (renderer.disposeElement) { - renderer.disposeElement(item.element, index, row.templateData, undefined); - } - } - item.size = row.domNode.offsetHeight; - if (this.virtualDelegate.setDynamicHeight) { - this.virtualDelegate.setDynamicHeight(item.element, item.size); - } - item.lastDynamicHeightWidth = this.renderWidth; - this.rowsContainer.removeChild(row.domNode); - this.cache.release(row); - return item.size - size; - } - getNextToLastElement(ranges) { - const lastRange = ranges[ranges.length - 1]; - if (!lastRange) { - return null; - } - const nextToLastItem = this.items[lastRange.end]; - if (!nextToLastItem) { - return null; - } - if (!nextToLastItem.row) { - return null; - } - return nextToLastItem.row.domNode; - } - getElementDomId(index) { - return `${this.domId}_${index}`; - } - // Dispose - dispose() { - if (this.items) { - for (const item of this.items) { - if (item.row) { - const renderer = this.renderers.get(item.row.templateId); - if (renderer) { - renderer.disposeTemplate(item.row.templateData); - } - } - } - this.items = []; - } - if (this.domNode && this.domNode.parentNode) { - this.domNode.parentNode.removeChild(this.domNode); - } - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); - } -} -ListView.InstanceCount = 0; -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onMouseClick", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onMouseDblClick", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onMouseMiddleClick", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onMouseDown", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onContextMenu", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onTouchStart", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], ListView.prototype, "onTap", null); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js ***! - \******************************************************************************/ -/*! exports provided: isInputElement, isMonacoEditor, DefaultKeyboardNavigationDelegate, isSelectionSingleChangeEvent, isSelectionRangeChangeEvent, MouseController, DefaultStyleController, List */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInputElement", function() { return isInputElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMonacoEditor", function() { return isMonacoEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultKeyboardNavigationDelegate", function() { return DefaultKeyboardNavigationDelegate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectionSingleChangeEvent", function() { return isSelectionSingleChangeEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectionRangeChangeEvent", function() { return isSelectionRangeChangeEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseController", function() { return MouseController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultStyleController", function() { return DefaultStyleController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return List; }); -/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _list_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./list.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js"); -/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _splice_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./splice.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js"); -/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); -/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - - - - - - - - - - - - - - - -class TraitRenderer { - constructor(trait) { - this.trait = trait; - this.renderedElements = []; - } - get templateId() { - return `template:${this.trait.trait}`; - } - renderTemplate(container) { - return container; - } - renderElement(element, index, templateData) { - const renderedElementIndex = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["firstIndex"])(this.renderedElements, el => el.templateData === templateData); - if (renderedElementIndex >= 0) { - const rendered = this.renderedElements[renderedElementIndex]; - this.trait.unrender(templateData); - rendered.index = index; - } - else { - const rendered = { index, templateData }; - this.renderedElements.push(rendered); - } - this.trait.renderIndex(index, templateData); - } - splice(start, deleteCount, insertCount) { - const rendered = []; - for (const renderedElement of this.renderedElements) { - if (renderedElement.index < start) { - rendered.push(renderedElement); - } - else if (renderedElement.index >= start + deleteCount) { - rendered.push({ - index: renderedElement.index + insertCount - deleteCount, - templateData: renderedElement.templateData - }); - } - } - this.renderedElements = rendered; - } - renderIndexes(indexes) { - for (const { index, templateData } of this.renderedElements) { - if (indexes.indexOf(index) > -1) { - this.trait.renderIndex(index, templateData); - } - } - } - disposeTemplate(templateData) { - const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["firstIndex"])(this.renderedElements, el => el.templateData === templateData); - if (index < 0) { - return; - } - this.renderedElements.splice(index, 1); - } -} -class Trait { - constructor(_trait) { - this._trait = _trait; - this.indexes = []; - this.sortedIndexes = []; - this._onChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); - this.onChange = this._onChange.event; - } - get trait() { return this._trait; } - get renderer() { - return new TraitRenderer(this); - } - splice(start, deleteCount, elements) { - const diff = elements.length - deleteCount; - const end = start + deleteCount; - const indexes = [ - ...this.sortedIndexes.filter(i => i < start), - ...elements.map((hasTrait, i) => hasTrait ? i + start : -1).filter(i => i !== -1), - ...this.sortedIndexes.filter(i => i >= end).map(i => i + diff) - ]; - this.renderer.splice(start, deleteCount, elements.length); - this._set(indexes, indexes); - } - renderIndex(index, container) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](container, this._trait, this.contains(index)); - } - unrender(container) { - _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](container, this._trait); - } - /** - * Sets the indexes which should have this trait. - * - * @param indexes Indexes which should have this trait. - * @return The old indexes which had this trait. - */ - set(indexes, browserEvent) { - return this._set(indexes, [...indexes].sort(numericSort), browserEvent); - } - _set(indexes, sortedIndexes, browserEvent) { - const result = this.indexes; - const sortedResult = this.sortedIndexes; - this.indexes = indexes; - this.sortedIndexes = sortedIndexes; - const toRender = disjunction(sortedResult, indexes); - this.renderer.renderIndexes(toRender); - this._onChange.fire({ indexes, browserEvent }); - return result; - } - get() { - return this.indexes; - } - contains(index) { - return Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["binarySearch"])(this.sortedIndexes, index, numericSort) >= 0; - } - dispose() { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._onChange); - } -} -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] -], Trait.prototype, "renderer", null); -class SelectionTrait extends Trait { - constructor(setAriaSelected) { - super('selected'); - this.setAriaSelected = setAriaSelected; - } - renderIndex(index, container) { - super.renderIndex(index, container); - if (this.setAriaSelected) { - if (this.contains(index)) { - container.setAttribute('aria-selected', 'true'); - } - else { - container.setAttribute('aria-selected', 'false'); - } - } - } -} -/** - * The TraitSpliceable is used as a util class to be able - * to preserve traits across splice calls, given an identity - * provider. - */ -class TraitSpliceable { - constructor(trait, view, identityProvider) { - this.trait = trait; - this.view = view; - this.identityProvider = identityProvider; - } - splice(start, deleteCount, elements) { - if (!this.identityProvider) { - return this.trait.splice(start, deleteCount, elements.map(() => false)); - } - const pastElementsWithTrait = this.trait.get().map(i => this.identityProvider.getId(this.view.element(i)).toString()); - const elementsWithTrait = elements.map(e => pastElementsWithTrait.indexOf(this.identityProvider.getId(e).toString()) > -1); - this.trait.splice(start, deleteCount, elementsWithTrait); - } -} -function isInputElement(e) { - return e.tagName === 'INPUT' || e.tagName === 'TEXTAREA'; -} -function isMonacoEditor(e) { - if (_dom_js__WEBPACK_IMPORTED_MODULE_5__["hasClass"](e, 'monaco-editor')) { - return true; - } - if (_dom_js__WEBPACK_IMPORTED_MODULE_5__["hasClass"](e, 'monaco-list')) { - return false; - } - if (!e.parentElement) { - return false; - } - return isMonacoEditor(e.parentElement); -} -class KeyboardController { - constructor(list, view, options) { - this.list = list; - this.view = view; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - const multipleSelectionSupport = options.multipleSelectionSupport !== false; - const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(view.domNode, 'keydown')) - .filter(e => !isInputElement(e.target)) - .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)); - onKeyDown.filter(e => e.keyCode === 3 /* Enter */).on(this.onEnter, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 16 /* UpArrow */).on(this.onUpArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 18 /* DownArrow */).on(this.onDownArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 11 /* PageUp */).on(this.onPageUpArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 12 /* PageDown */).on(this.onPageDownArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 9 /* Escape */).on(this.onEscape, this, this.disposables); - if (multipleSelectionSupport) { - onKeyDown.filter(e => (_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? e.metaKey : e.ctrlKey) && e.keyCode === 31 /* KEY_A */).on(this.onCtrlA, this, this.disposables); - } - } - onEnter(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.setSelection(this.list.getFocus(), e.browserEvent); - } - onUpArrow(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.focusPrevious(1, false, e.browserEvent); - this.list.reveal(this.list.getFocus()[0]); - this.view.domNode.focus(); - } - onDownArrow(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.focusNext(1, false, e.browserEvent); - this.list.reveal(this.list.getFocus()[0]); - this.view.domNode.focus(); - } - onPageUpArrow(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.focusPreviousPage(e.browserEvent); - this.list.reveal(this.list.getFocus()[0]); - this.view.domNode.focus(); - } - onPageDownArrow(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.focusNextPage(e.browserEvent); - this.list.reveal(this.list.getFocus()[0]); - this.view.domNode.focus(); - } - onCtrlA(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.setSelection(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["range"])(this.list.length), e.browserEvent); - this.view.domNode.focus(); - } - onEscape(e) { - e.preventDefault(); - e.stopPropagation(); - this.list.setSelection([], e.browserEvent); - this.view.domNode.focus(); - } - dispose() { - this.disposables.dispose(); - } -} -var TypeLabelControllerState; -(function (TypeLabelControllerState) { - TypeLabelControllerState[TypeLabelControllerState["Idle"] = 0] = "Idle"; - TypeLabelControllerState[TypeLabelControllerState["Typing"] = 1] = "Typing"; -})(TypeLabelControllerState || (TypeLabelControllerState = {})); -const DefaultKeyboardNavigationDelegate = new class { - mightProducePrintableCharacter(event) { - if (event.ctrlKey || event.metaKey || event.altKey) { - return false; - } - return (event.keyCode >= 31 /* KEY_A */ && event.keyCode <= 56 /* KEY_Z */) - || (event.keyCode >= 21 /* KEY_0 */ && event.keyCode <= 30 /* KEY_9 */) - || (event.keyCode >= 93 /* NUMPAD_0 */ && event.keyCode <= 102 /* NUMPAD_9 */) - || (event.keyCode >= 80 /* US_SEMICOLON */ && event.keyCode <= 90 /* US_QUOTE */); - } -}; -class TypeLabelController { - constructor(list, view, keyboardNavigationLabelProvider, delegate) { - this.list = list; - this.view = view; - this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider; - this.delegate = delegate; - this.enabled = false; - this.state = TypeLabelControllerState.Idle; - this.automaticKeyboardNavigation = true; - this.triggered = false; - this.previouslyFocused = -1; - this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.updateOptions(list.options); - } - updateOptions(options) { - const enableKeyboardNavigation = typeof options.enableKeyboardNavigation === 'undefined' ? true : !!options.enableKeyboardNavigation; - if (enableKeyboardNavigation) { - this.enable(); - } - else { - this.disable(); - } - if (typeof options.automaticKeyboardNavigation !== 'undefined') { - this.automaticKeyboardNavigation = options.automaticKeyboardNavigation; - } - } - enable() { - if (this.enabled) { - return; - } - const onChar = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown')) - .filter(e => !isInputElement(e.target)) - .filter(() => this.automaticKeyboardNavigation || this.triggered) - .map(event => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](event)) - .filter(e => this.delegate.mightProducePrintableCharacter(e)) - .forEach(e => { e.stopPropagation(); e.preventDefault(); }) - .map(event => event.browserEvent.key) - .event; - const onClear = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].debounce(onChar, () => null, 800); - const onInput = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].reduce(_common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(onChar, onClear), (r, i) => i === null ? null : ((r || '') + i)); - onInput(this.onInput, this, this.enabledDisposables); - onClear(this.onClear, this, this.enabledDisposables); - this.enabled = true; - this.triggered = false; - } - disable() { - if (!this.enabled) { - return; - } - this.enabledDisposables.clear(); - this.enabled = false; - this.triggered = false; - } - onClear() { - var _a; - const focus = this.list.getFocus(); - if (focus.length > 0 && focus[0] === this.previouslyFocused) { - // List: re-anounce element on typing end since typed keys will interupt aria label of focused element - // Do not announce if there was a focus change at the end to prevent duplication https://github.com/microsoft/vscode/issues/95961 - const ariaLabel = (_a = this.list.options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getAriaLabel(this.list.element(focus[0])); - if (ariaLabel) { - Object(_aria_aria_js__WEBPACK_IMPORTED_MODULE_18__["alert"])(ariaLabel); - } - } - this.previouslyFocused = -1; - } - onInput(word) { - if (!word) { - this.state = TypeLabelControllerState.Idle; - this.triggered = false; - return; - } - const focus = this.list.getFocus(); - const start = focus.length > 0 ? focus[0] : 0; - const delta = this.state === TypeLabelControllerState.Idle ? 1 : 0; - this.state = TypeLabelControllerState.Typing; - for (let i = 0; i < this.list.length; i++) { - const index = (start + i + delta) % this.list.length; - const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(index)); - const labelStr = label && label.toString(); - if (typeof labelStr === 'undefined' || Object(_common_filters_js__WEBPACK_IMPORTED_MODULE_17__["matchesPrefix"])(word, labelStr)) { - this.previouslyFocused = start; - this.list.setFocus([index]); - this.list.reveal(index); - return; - } - } - } - dispose() { - this.disable(); - this.enabledDisposables.dispose(); - this.disposables.dispose(); - } -} -class DOMFocusController { - constructor(list, view) { - this.list = list; - this.view = view; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(view.domNode, 'keydown')) - .filter(e => !isInputElement(e.target)) - .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)); - onKeyDown.filter(e => e.keyCode === 2 /* Tab */ && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey) - .on(this.onTab, this, this.disposables); - } - onTab(e) { - if (e.target !== this.view.domNode) { - return; - } - const focus = this.list.getFocus(); - if (focus.length === 0) { - return; - } - const focusedDomElement = this.view.domElement(focus[0]); - if (!focusedDomElement) { - return; - } - const tabIndexElement = focusedDomElement.querySelector('[tabIndex]'); - if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement) || tabIndexElement.tabIndex === -1) { - return; - } - const style = window.getComputedStyle(tabIndexElement); - if (style.visibility === 'hidden' || style.display === 'none') { - return; - } - e.preventDefault(); - e.stopPropagation(); - tabIndexElement.focus(); - } - dispose() { - this.disposables.dispose(); - } -} -function isSelectionSingleChangeEvent(event) { - return _common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; -} -function isSelectionRangeChangeEvent(event) { - return event.browserEvent.shiftKey; -} -function isMouseRightClick(event) { - return event instanceof MouseEvent && event.button === 2; -} -const DefaultMultipleSelectionController = { - isSelectionSingleChangeEvent, - isSelectionRangeChangeEvent -}; -class MouseController { - constructor(list) { - this.list = list; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._onPointer = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); - this.onPointer = this._onPointer.event; - this.multipleSelectionSupport = !(list.options.multipleSelectionSupport === false); - if (this.multipleSelectionSupport) { - this.multipleSelectionController = list.options.multipleSelectionController || DefaultMultipleSelectionController; - } - this.mouseSupport = typeof list.options.mouseSupport === 'undefined' || !!list.options.mouseSupport; - if (this.mouseSupport) { - list.onMouseDown(this.onMouseDown, this, this.disposables); - list.onContextMenu(this.onContextMenu, this, this.disposables); - list.onMouseDblClick(this.onDoubleClick, this, this.disposables); - list.onTouchStart(this.onMouseDown, this, this.disposables); - this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(list.getHTMLElement())); - } - _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(list.onMouseClick, list.onMouseMiddleClick, list.onTap)(this.onViewPointer, this, this.disposables); - } - isSelectionSingleChangeEvent(event) { - if (this.multipleSelectionController) { - return this.multipleSelectionController.isSelectionSingleChangeEvent(event); - } - return _common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; - } - isSelectionRangeChangeEvent(event) { - if (this.multipleSelectionController) { - return this.multipleSelectionController.isSelectionRangeChangeEvent(event); - } - return event.browserEvent.shiftKey; - } - isSelectionChangeEvent(event) { - return this.isSelectionSingleChangeEvent(event) || this.isSelectionRangeChangeEvent(event); - } - onMouseDown(e) { - if (isMonacoEditor(e.browserEvent.target)) { - return; - } - if (document.activeElement !== e.browserEvent.target) { - this.list.domFocus(); - } - } - onContextMenu(e) { - if (isMonacoEditor(e.browserEvent.target)) { - return; - } - const focus = typeof e.index === 'undefined' ? [] : [e.index]; - this.list.setFocus(focus, e.browserEvent); - } - onViewPointer(e) { - if (!this.mouseSupport) { - return; - } - if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) { - return; - } - let reference = this.list.getFocus()[0]; - const selection = this.list.getSelection(); - reference = reference === undefined ? selection[0] : reference; - const focus = e.index; - if (typeof focus === 'undefined') { - this.list.setFocus([], e.browserEvent); - this.list.setSelection([], e.browserEvent); - return; - } - if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) { - return this.changeSelection(e, reference); - } - if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) { - return this.changeSelection(e, reference); - } - this.list.setFocus([focus], e.browserEvent); - if (!isMouseRightClick(e.browserEvent)) { - this.list.setSelection([focus], e.browserEvent); - } - this._onPointer.fire(e); - } - onDoubleClick(e) { - if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) { - return; - } - if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) { - return; - } - const focus = this.list.getFocus(); - this.list.setSelection(focus, e.browserEvent); - } - changeSelection(e, reference) { - const focus = e.index; - if (this.isSelectionRangeChangeEvent(e) && reference !== undefined) { - const min = Math.min(reference, focus); - const max = Math.max(reference, focus); - const rangeSelection = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["range"])(min, max + 1); - const selection = this.list.getSelection(); - const contiguousRange = getContiguousRangeContaining(disjunction(selection, [reference]), reference); - if (contiguousRange.length === 0) { - return; - } - const newSelection = disjunction(rangeSelection, relativeComplement(selection, contiguousRange)); - this.list.setSelection(newSelection, e.browserEvent); - } - else if (this.isSelectionSingleChangeEvent(e)) { - const selection = this.list.getSelection(); - const newSelection = selection.filter(i => i !== focus); - this.list.setFocus([focus]); - if (selection.length === newSelection.length) { - this.list.setSelection([...newSelection, focus], e.browserEvent); - } - else { - this.list.setSelection(newSelection, e.browserEvent); - } - } - } - dispose() { - this.disposables.dispose(); - } -} -class DefaultStyleController { - constructor(styleElement, selectorSuffix) { - this.styleElement = styleElement; - this.selectorSuffix = selectorSuffix; - } - style(styles) { - const suffix = this.selectorSuffix && `.${this.selectorSuffix}`; - const content = []; - if (styles.listBackground) { - if (styles.listBackground.isOpaque()) { - content.push(`.monaco-list${suffix} .monaco-list-rows { background: ${styles.listBackground}; }`); - } - else if (!_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"]) { // subpixel AA doesn't exist in macOS - console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`); - } - } - if (styles.listFocusBackground) { - content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`); - content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:hover { background-color: ${styles.listFocusBackground}; }`); // overwrite :hover style in this case! - } - if (styles.listFocusForeground) { - content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); - } - if (styles.listActiveSelectionBackground) { - content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`); - content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case! - } - if (styles.listActiveSelectionForeground) { - content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { color: ${styles.listActiveSelectionForeground}; }`); - } - if (styles.listFocusAndSelectionBackground) { - content.push(` - .monaco-drag-image, - .monaco-list${suffix}:focus .monaco-list-row.selected.focused { background-color: ${styles.listFocusAndSelectionBackground}; } - `); - } - if (styles.listFocusAndSelectionForeground) { - content.push(` - .monaco-drag-image, - .monaco-list${suffix}:focus .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; } - `); - } - if (styles.listInactiveFocusBackground) { - content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`); - content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`); // overwrite :hover style in this case! - } - if (styles.listInactiveSelectionBackground) { - content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`); - content.push(`.monaco-list${suffix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case! - } - if (styles.listInactiveSelectionForeground) { - content.push(`.monaco-list${suffix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`); - } - if (styles.listHoverBackground) { - content.push(`.monaco-list${suffix}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`); - } - if (styles.listHoverForeground) { - content.push(`.monaco-list${suffix} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`); - } - if (styles.listSelectionOutline) { - content.push(`.monaco-list${suffix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`); - } - if (styles.listFocusOutline) { - content.push(` - .monaco-drag-image, - .monaco-list${suffix}:focus .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; } - `); - } - if (styles.listInactiveFocusOutline) { - content.push(`.monaco-list${suffix} .monaco-list-row.focused { outline: 1px dotted ${styles.listInactiveFocusOutline}; outline-offset: -1px; }`); - } - if (styles.listHoverOutline) { - content.push(`.monaco-list${suffix} .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`); - } - if (styles.listDropBackground) { - content.push(` - .monaco-list${suffix}.drop-target, - .monaco-list${suffix} .monaco-list-rows.drop-target, - .monaco-list${suffix} .monaco-list-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; } - `); - } - if (styles.listFilterWidgetBackground) { - content.push(`.monaco-list-type-filter { background-color: ${styles.listFilterWidgetBackground} }`); - } - if (styles.listFilterWidgetOutline) { - content.push(`.monaco-list-type-filter { border: 1px solid ${styles.listFilterWidgetOutline}; }`); - } - if (styles.listFilterWidgetNoMatchesOutline) { - content.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${styles.listFilterWidgetNoMatchesOutline}; }`); - } - if (styles.listMatchesShadow) { - content.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${styles.listMatchesShadow}; }`); - } - const newStyles = content.join('\n'); - if (newStyles !== this.styleElement.innerHTML) { - this.styleElement.innerHTML = newStyles; - } - } -} -const defaultStyles = { - listFocusBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#7FB0D0'), - listActiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#0E639C'), - listActiveSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#FFFFFF'), - listFocusAndSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#094771'), - listFocusAndSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#FFFFFF'), - listInactiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#3F3F46'), - listHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#2A2D2E'), - listDropBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#383B3D'), - treeIndentGuidesStroke: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#a9a9a9') -}; -const DefaultOptions = { - keyboardSupport: true, - mouseSupport: true, - multipleSelectionSupport: true, - dnd: { - getDragURI() { return null; }, - onDragStart() { }, - onDragOver() { return false; }, - drop() { } - } -}; -// TODO@Joao: move these utils into a SortedArray class -function getContiguousRangeContaining(range, value) { - const index = range.indexOf(value); - if (index === -1) { - return []; - } - const result = []; - let i = index - 1; - while (i >= 0 && range[i] === value - (index - i)) { - result.push(range[i--]); - } - result.reverse(); - i = index; - while (i < range.length && range[i] === value + (i - index)) { - result.push(range[i++]); - } - return result; -} -/** - * Given two sorted collections of numbers, returns the intersection - * between them (OR). - */ -function disjunction(one, other) { - const result = []; - let i = 0, j = 0; - while (i < one.length || j < other.length) { - if (i >= one.length) { - result.push(other[j++]); - } - else if (j >= other.length) { - result.push(one[i++]); - } - else if (one[i] === other[j]) { - result.push(one[i]); - i++; - j++; - continue; - } - else if (one[i] < other[j]) { - result.push(one[i++]); - } - else { - result.push(other[j++]); - } - } - return result; -} -/** - * Given two sorted collections of numbers, returns the relative - * complement between them (XOR). - */ -function relativeComplement(one, other) { - const result = []; - let i = 0, j = 0; - while (i < one.length || j < other.length) { - if (i >= one.length) { - result.push(other[j++]); - } - else if (j >= other.length) { - result.push(one[i++]); - } - else if (one[i] === other[j]) { - i++; - j++; - continue; - } - else if (one[i] < other[j]) { - result.push(one[i++]); - } - else { - j++; - } - } - return result; -} -const numericSort = (a, b) => a - b; -class PipelineRenderer { - constructor(_templateId, renderers) { - this._templateId = _templateId; - this.renderers = renderers; - } - get templateId() { - return this._templateId; - } - renderTemplate(container) { - return this.renderers.map(r => r.renderTemplate(container)); - } - renderElement(element, index, templateData, height) { - let i = 0; - for (const renderer of this.renderers) { - renderer.renderElement(element, index, templateData[i++], height); - } - } - disposeElement(element, index, templateData, height) { - let i = 0; - for (const renderer of this.renderers) { - if (renderer.disposeElement) { - renderer.disposeElement(element, index, templateData[i], height); - } - i += 1; - } - } - disposeTemplate(templateData) { - let i = 0; - for (const renderer of this.renderers) { - renderer.disposeTemplate(templateData[i++]); - } - } -} -class AccessibiltyRenderer { - constructor(accessibilityProvider) { - this.accessibilityProvider = accessibilityProvider; - this.templateId = 'a18n'; - } - renderTemplate(container) { - return container; - } - renderElement(element, index, container) { - const ariaLabel = this.accessibilityProvider.getAriaLabel(element); - if (ariaLabel) { - container.setAttribute('aria-label', ariaLabel); - } - else { - container.removeAttribute('aria-label'); - } - const ariaLevel = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider.getAriaLevel(element); - if (typeof ariaLevel === 'number') { - container.setAttribute('aria-level', `${ariaLevel}`); - } - else { - container.removeAttribute('aria-level'); - } - } - disposeTemplate(templateData) { - // noop - } -} -class ListViewDragAndDrop { - constructor(list, dnd) { - this.list = list; - this.dnd = dnd; - } - getDragElements(element) { - const selection = this.list.getSelectedElements(); - const elements = selection.indexOf(element) > -1 ? selection : [element]; - return elements; - } - getDragURI(element) { - return this.dnd.getDragURI(element); - } - getDragLabel(elements, originalEvent) { - if (this.dnd.getDragLabel) { - return this.dnd.getDragLabel(elements, originalEvent); - } - return undefined; - } - onDragStart(data, originalEvent) { - if (this.dnd.onDragStart) { - this.dnd.onDragStart(data, originalEvent); - } - } - onDragOver(data, targetElement, targetIndex, originalEvent) { - return this.dnd.onDragOver(data, targetElement, targetIndex, originalEvent); - } - onDragEnd(originalEvent) { - if (this.dnd.onDragEnd) { - this.dnd.onDragEnd(originalEvent); - } - } - drop(data, targetElement, targetIndex, originalEvent) { - this.dnd.drop(data, targetElement, targetIndex, originalEvent); - } -} -class List { - constructor(user, container, virtualDelegate, renderers, _options = DefaultOptions) { - var _a; - this.user = user; - this._options = _options; - this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["EventBufferer"](); - this._ariaLabel = ''; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.didJustPressContextMenuKey = false; - this._onDidDispose = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); - this.onDidDispose = this._onDidDispose.event; - const role = this._options.accessibilityProvider && this._options.accessibilityProvider.getWidgetRole ? (_a = this._options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getWidgetRole() : 'list'; - this.selection = new SelectionTrait(role !== 'listbox'); - this.focus = new Trait('focused'); - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_14__["mixin"])(_options, defaultStyles, false); - const baseRenderers = [this.focus.renderer, this.selection.renderer]; - this.accessibilityProvider = _options.accessibilityProvider; - if (this.accessibilityProvider) { - baseRenderers.push(new AccessibiltyRenderer(this.accessibilityProvider)); - if (this.accessibilityProvider.onDidChangeActiveDescendant) { - this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant, this, this.disposables); - } - } - renderers = renderers.map(r => new PipelineRenderer(r.templateId, [...baseRenderers, r])); - const viewOptions = Object.assign(Object.assign({}, _options), { dnd: _options.dnd && new ListViewDragAndDrop(this, _options.dnd) }); - this.view = new _listView_js__WEBPACK_IMPORTED_MODULE_12__["ListView"](container, virtualDelegate, renderers, viewOptions); - this.view.domNode.setAttribute('role', role); - if (_options.styleController) { - this.styleController = _options.styleController(this.view.domId); - } - else { - const styleElement = _dom_js__WEBPACK_IMPORTED_MODULE_5__["createStyleSheet"](this.view.domNode); - this.styleController = new DefaultStyleController(styleElement, this.view.domId); - } - this.spliceable = new _splice_js__WEBPACK_IMPORTED_MODULE_15__["CombinedSpliceable"]([ - new TraitSpliceable(this.focus, this.view, _options.identityProvider), - new TraitSpliceable(this.selection, this.view, _options.identityProvider), - this.view - ]); - this.disposables.add(this.focus); - this.disposables.add(this.selection); - this.disposables.add(this.view); - this.disposables.add(this._onDidDispose); - this.onDidFocus = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'focus', true), () => null); - this.onDidBlur = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'blur', true), () => null); - this.disposables.add(new DOMFocusController(this, this.view)); - if (typeof _options.keyboardSupport !== 'boolean' || _options.keyboardSupport) { - const controller = new KeyboardController(this, this.view, _options); - this.disposables.add(controller); - } - if (_options.keyboardNavigationLabelProvider) { - const delegate = _options.keyboardNavigationDelegate || DefaultKeyboardNavigationDelegate; - this.typeLabelController = new TypeLabelController(this, this.view, _options.keyboardNavigationLabelProvider, delegate); - this.disposables.add(this.typeLabelController); - } - this.mouseController = this.createMouseController(_options); - this.disposables.add(this.mouseController); - this.onDidChangeFocus(this._onFocusChange, this, this.disposables); - this.onDidChangeSelection(this._onSelectionChange, this, this.disposables); - if (this.accessibilityProvider) { - this.ariaLabel = this.accessibilityProvider.getWidgetAriaLabel(); - } - if (_options.multipleSelectionSupport) { - this.view.domNode.setAttribute('aria-multiselectable', 'true'); - } - } - get onDidChangeFocus() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(this.eventBufferer.wrapEvent(this.focus.onChange), e => this.toListEvent(e)); - } - get onDidChangeSelection() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(this.eventBufferer.wrapEvent(this.selection.onChange), e => this.toListEvent(e)); - } - get domId() { return this.view.domId; } - get onMouseClick() { return this.view.onMouseClick; } - get onMouseDblClick() { return this.view.onMouseDblClick; } - get onMouseMiddleClick() { return this.view.onMouseMiddleClick; } - get onPointer() { return this.mouseController.onPointer; } - get onMouseDown() { return this.view.onMouseDown; } - get onTouchStart() { return this.view.onTouchStart; } - get onTap() { return this.view.onTap; } - get onContextMenu() { - const fromKeydown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown')) - .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)) - .filter(e => this.didJustPressContextMenuKey = e.keyCode === 58 /* ContextMenu */ || (e.shiftKey && e.keyCode === 68 /* F10 */)) - .filter(e => { e.preventDefault(); e.stopPropagation(); return false; }) - .event; - const fromKeyup = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keyup')) - .filter(() => { - const didJustPressContextMenuKey = this.didJustPressContextMenuKey; - this.didJustPressContextMenuKey = false; - return didJustPressContextMenuKey; - }) - .filter(() => this.getFocus().length > 0 && !!this.view.domElement(this.getFocus()[0])) - .map(browserEvent => { - const index = this.getFocus()[0]; - const element = this.view.element(index); - const anchor = this.view.domElement(index); - return { index, element, anchor, browserEvent }; - }) - .event; - const fromMouse = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(this.view.onContextMenu) - .filter(() => !this.didJustPressContextMenuKey) - .map(({ element, index, browserEvent }) => ({ element, index, anchor: { x: browserEvent.clientX + 1, y: browserEvent.clientY }, browserEvent })) - .event; - return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(fromKeydown, fromKeyup, fromMouse); - } - get onKeyDown() { return Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown'); } - createMouseController(options) { - return new MouseController(this); - } - updateOptions(optionsUpdate = {}) { - this._options = Object.assign(Object.assign({}, this._options), optionsUpdate); - if (this.typeLabelController) { - this.typeLabelController.updateOptions(this._options); - } - this.view.updateOptions(optionsUpdate); - } - get options() { - return this._options; - } - splice(start, deleteCount, elements = []) { - if (start < 0 || start > this.view.length) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid start index: ${start}`); - } - if (deleteCount < 0) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid delete count: ${deleteCount}`); - } - if (deleteCount === 0 && elements.length === 0) { - return; - } - this.eventBufferer.bufferEvents(() => this.spliceable.splice(start, deleteCount, elements)); - } - rerender() { - this.view.rerender(); - } - element(index) { - return this.view.element(index); - } - get length() { - return this.view.length; - } - get contentHeight() { - return this.view.contentHeight; - } - get scrollTop() { - return this.view.getScrollTop(); - } - set scrollTop(scrollTop) { - this.view.setScrollTop(scrollTop); - } - get ariaLabel() { - return this._ariaLabel; - } - set ariaLabel(value) { - this._ariaLabel = value; - this.view.domNode.setAttribute('aria-label', value); - } - domFocus() { - this.view.domNode.focus(); - } - layout(height, width) { - this.view.layout(height, width); - } - setSelection(indexes, browserEvent) { - for (const index of indexes) { - if (index < 0 || index >= this.length) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); - } - } - this.selection.set(indexes, browserEvent); - } - getSelection() { - return this.selection.get(); - } - getSelectedElements() { - return this.getSelection().map(i => this.view.element(i)); - } - setFocus(indexes, browserEvent) { - for (const index of indexes) { - if (index < 0 || index >= this.length) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); - } - } - this.focus.set(indexes, browserEvent); - } - focusNext(n = 1, loop = false, browserEvent, filter) { - if (this.length === 0) { - return; - } - const focus = this.focus.get(); - const index = this.findNextIndex(focus.length > 0 ? focus[0] + n : 0, loop, filter); - if (index > -1) { - this.setFocus([index], browserEvent); - } - } - focusPrevious(n = 1, loop = false, browserEvent, filter) { - if (this.length === 0) { - return; - } - const focus = this.focus.get(); - const index = this.findPreviousIndex(focus.length > 0 ? focus[0] - n : 0, loop, filter); - if (index > -1) { - this.setFocus([index], browserEvent); - } - } - focusNextPage(browserEvent, filter) { - let lastPageIndex = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight); - lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1; - const lastPageElement = this.view.element(lastPageIndex); - const currentlyFocusedElement = this.getFocusedElements()[0]; - if (currentlyFocusedElement !== lastPageElement) { - const lastGoodPageIndex = this.findPreviousIndex(lastPageIndex, false, filter); - if (lastGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(lastGoodPageIndex)) { - this.setFocus([lastGoodPageIndex], browserEvent); - } - else { - this.setFocus([lastPageIndex], browserEvent); - } - } - else { - const previousScrollTop = this.view.getScrollTop(); - this.view.setScrollTop(previousScrollTop + this.view.renderHeight - this.view.elementHeight(lastPageIndex)); - if (this.view.getScrollTop() !== previousScrollTop) { - // Let the scroll event listener run - setTimeout(() => this.focusNextPage(browserEvent, filter), 0); - } - } - } - focusPreviousPage(browserEvent, filter) { - let firstPageIndex; - const scrollTop = this.view.getScrollTop(); - if (scrollTop === 0) { - firstPageIndex = this.view.indexAt(scrollTop); - } - else { - firstPageIndex = this.view.indexAfter(scrollTop - 1); - } - const firstPageElement = this.view.element(firstPageIndex); - const currentlyFocusedElement = this.getFocusedElements()[0]; - if (currentlyFocusedElement !== firstPageElement) { - const firstGoodPageIndex = this.findNextIndex(firstPageIndex, false, filter); - if (firstGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(firstGoodPageIndex)) { - this.setFocus([firstGoodPageIndex], browserEvent); - } - else { - this.setFocus([firstPageIndex], browserEvent); - } - } - else { - const previousScrollTop = scrollTop; - this.view.setScrollTop(scrollTop - this.view.renderHeight); - if (this.view.getScrollTop() !== previousScrollTop) { - // Let the scroll event listener run - setTimeout(() => this.focusPreviousPage(browserEvent, filter), 0); - } - } - } - focusLast(browserEvent, filter) { - if (this.length === 0) { - return; - } - const index = this.findPreviousIndex(this.length - 1, false, filter); - if (index > -1) { - this.setFocus([index], browserEvent); - } - } - focusFirst(browserEvent, filter) { - this.focusNth(0, browserEvent, filter); - } - focusNth(n, browserEvent, filter) { - if (this.length === 0) { - return; - } - const index = this.findNextIndex(n, false, filter); - if (index > -1) { - this.setFocus([index], browserEvent); - } - } - findNextIndex(index, loop = false, filter) { - for (let i = 0; i < this.length; i++) { - if (index >= this.length && !loop) { - return -1; - } - index = index % this.length; - if (!filter || filter(this.element(index))) { - return index; - } - index++; - } - return -1; - } - findPreviousIndex(index, loop = false, filter) { - for (let i = 0; i < this.length; i++) { - if (index < 0 && !loop) { - return -1; - } - index = (this.length + (index % this.length)) % this.length; - if (!filter || filter(this.element(index))) { - return index; - } - index--; - } - return -1; - } - getFocus() { - return this.focus.get(); - } - getFocusedElements() { - return this.getFocus().map(i => this.view.element(i)); - } - reveal(index, relativeTop) { - if (index < 0 || index >= this.length) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); - } - const scrollTop = this.view.getScrollTop(); - const elementTop = this.view.elementTop(index); - const elementHeight = this.view.elementHeight(index); - if (Object(_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isNumber"])(relativeTop)) { - // y = mx + b - const m = elementHeight - this.view.renderHeight; - this.view.setScrollTop(m * Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_16__["clamp"])(relativeTop, 0, 1) + elementTop); - } - else { - const viewItemBottom = elementTop + elementHeight; - const wrapperBottom = scrollTop + this.view.renderHeight; - if (elementTop < scrollTop && viewItemBottom >= wrapperBottom) { - // The element is already overflowing the viewport, no-op - } - else if (elementTop < scrollTop) { - this.view.setScrollTop(elementTop); - } - else if (viewItemBottom >= wrapperBottom) { - this.view.setScrollTop(viewItemBottom - this.view.renderHeight); - } - } - } - /** - * Returns the relative position of an element rendered in the list. - * Returns `null` if the element isn't *entirely* in the visible viewport. - */ - getRelativeTop(index) { - if (index < 0 || index >= this.length) { - throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); - } - const scrollTop = this.view.getScrollTop(); - const elementTop = this.view.elementTop(index); - const elementHeight = this.view.elementHeight(index); - if (elementTop < scrollTop || elementTop + elementHeight > scrollTop + this.view.renderHeight) { - return null; - } - // y = mx + b - const m = elementHeight - this.view.renderHeight; - return Math.abs((scrollTop - elementTop) / m); - } - getHTMLElement() { - return this.view.domNode; - } - style(styles) { - this.styleController.style(styles); - } - toListEvent({ indexes, browserEvent }) { - return { indexes, elements: indexes.map(i => this.view.element(i)), browserEvent }; - } - _onFocusChange() { - const focus = this.focus.get(); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'element-focused', focus.length > 0); - this.onDidChangeActiveDescendant(); - } - onDidChangeActiveDescendant() { - var _a; - const focus = this.focus.get(); - if (focus.length > 0) { - let id; - if ((_a = this.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getActiveDescendantId) { - id = this.accessibilityProvider.getActiveDescendantId(this.view.element(focus[0])); - } - this.view.domNode.setAttribute('aria-activedescendant', id || this.view.getElementDomId(focus[0])); - } - else { - this.view.domNode.removeAttribute('aria-activedescendant'); - } - } - _onSelectionChange() { - const selection = this.selection.get(); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-none', selection.length === 0); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-single', selection.length === 1); - _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-multiple', selection.length > 1); - } - dispose() { - this._onDidDispose.fire(); - this.disposables.dispose(); - this._onDidDispose.dispose(); - } -} -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] -], List.prototype, "onDidChangeFocus", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] -], List.prototype, "onDidChangeSelection", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] -], List.prototype, "onContextMenu", null); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js ***! - \****************************************************************************/ -/*! exports provided: groupIntersect, shift, consolidate, RangeMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupIntersect", function() { return groupIntersect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shift", function() { return shift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consolidate", function() { return consolidate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeMap", function() { return RangeMap; }); -/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * Returns the intersection between a ranged group and a range. - * Returns `[]` if the intersection is empty. - */ -function groupIntersect(range, groups) { - const result = []; - for (let r of groups) { - if (range.start >= r.range.end) { - continue; - } - if (range.end < r.range.start) { - break; - } - const intersection = _common_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].intersect(range, r.range); - if (_common_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].isEmpty(intersection)) { - continue; - } - result.push({ - range: intersection, - size: r.size - }); - } - return result; -} -/** - * Shifts a range by that `much`. - */ -function shift({ start, end }, much) { - return { start: start + much, end: end + much }; -} -/** - * Consolidates a collection of ranged groups. - * - * Consolidation is the process of merging consecutive ranged groups - * that share the same `size`. - */ -function consolidate(groups) { - const result = []; - let previousGroup = null; - for (let group of groups) { - const start = group.range.start; - const end = group.range.end; - const size = group.size; - if (previousGroup && size === previousGroup.size) { - previousGroup.range.end = end; - continue; - } - previousGroup = { range: { start, end }, size }; - result.push(previousGroup); - } - return result; -} -/** - * Concatenates several collections of ranged groups into a single - * collection. - */ -function concat(...groups) { - return consolidate(groups.reduce((r, g) => r.concat(g), [])); -} -class RangeMap { - constructor() { - this.groups = []; - this._size = 0; - } - splice(index, deleteCount, items = []) { - const diff = items.length - deleteCount; - const before = groupIntersect({ start: 0, end: index }, this.groups); - const after = groupIntersect({ start: index + deleteCount, end: Number.POSITIVE_INFINITY }, this.groups) - .map(g => ({ range: shift(g.range, diff), size: g.size })); - const middle = items.map((item, i) => ({ - range: { start: index + i, end: index + i + 1 }, - size: item.size - })); - this.groups = concat(before, middle, after); - this._size = this.groups.reduce((t, g) => t + (g.size * (g.range.end - g.range.start)), 0); - } - /** - * Returns the number of items in the range map. - */ - get count() { - const len = this.groups.length; - if (!len) { - return 0; - } - return this.groups[len - 1].range.end; - } - /** - * Returns the sum of the sizes of all items in the range map. - */ - get size() { - return this._size; - } - /** - * Returns the index of the item at the given position. - */ - indexAt(position) { - if (position < 0) { - return -1; - } - let index = 0; - let size = 0; - for (let group of this.groups) { - const count = group.range.end - group.range.start; - const newSize = size + (count * group.size); - if (position < newSize) { - return index + Math.floor((position - size) / group.size); - } - index += count; - size = newSize; - } - return index; - } - /** - * Returns the index of the item right after the item at the - * index of the given position. - */ - indexAfter(position) { - return Math.min(this.indexAt(position) + 1, this.count); - } - /** - * Returns the start position of the item at the given index. - */ - positionAt(index) { - if (index < 0) { - return -1; - } - let position = 0; - let count = 0; - for (let group of this.groups) { - const groupCount = group.range.end - group.range.start; - const newCount = count + groupCount; - if (index < newCount) { - return position + ((index - count) * group.size); - } - position += groupCount * group.size; - count = newCount; - } - return -1; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js ***! - \****************************************************************************/ -/*! exports provided: RowCache */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCache", function() { return RowCache; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -function removeFromParent(element) { - try { - if (element.parentElement) { - element.parentElement.removeChild(element); - } - } - catch (e) { - // this will throw if this happens due to a blur event, nasty business - } -} -class RowCache { - constructor(renderers) { - this.renderers = renderers; - this.cache = new Map(); - } - /** - * Returns a row either by creating a new one or reusing - * a previously released row which shares the same templateId. - */ - alloc(templateId) { - let result = this.getTemplateCache(templateId).pop(); - if (!result) { - const domNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["$"])('.monaco-list-row'); - const renderer = this.getRenderer(templateId); - const templateData = renderer.renderTemplate(domNode); - result = { domNode, templateId, templateData }; - } - return result; - } - /** - * Releases the row for eventual reuse. - */ - release(row) { - if (!row) { - return; - } - this.releaseRow(row); - } - releaseRow(row) { - const { domNode, templateId } = row; - if (domNode) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(domNode, 'scrolling'); - removeFromParent(domNode); - } - const cache = this.getTemplateCache(templateId); - cache.push(row); - } - getTemplateCache(templateId) { - let result = this.cache.get(templateId); - if (!result) { - result = []; - this.cache.set(templateId, result); - } - return result; - } - dispose() { - this.cache.forEach((cachedRows, templateId) => { - for (const cachedRow of cachedRows) { - const renderer = this.getRenderer(templateId); - renderer.disposeTemplate(cachedRow.templateData); - cachedRow.domNode = null; - cachedRow.templateData = null; - } - }); - this.cache.clear(); - } - getRenderer(templateId) { - const renderer = this.renderers.get(templateId); - if (!renderer) { - throw new Error(`No renderer found for ${templateId}`); - } - return renderer; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js ***! - \**************************************************************************/ -/*! exports provided: CombinedSpliceable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombinedSpliceable", function() { return CombinedSpliceable; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class CombinedSpliceable { - constructor(spliceables) { - this.spliceables = spliceables; - } - splice(start, deleteCount, elements) { - this.spliceables.forEach(s => s.splice(start, deleteCount, elements)); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js ***! - \************************************************************************/ -/*! exports provided: MENU_MNEMONIC_REGEX, MENU_ESCAPED_MNEMONIC_REGEX, Direction, Menu, cleanMnemonic */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MENU_MNEMONIC_REGEX", function() { return MENU_MNEMONIC_REGEX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MENU_ESCAPED_MNEMONIC_REGEX", function() { return MENU_ESCAPED_MNEMONIC_REGEX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return Direction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return Menu; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanMnemonic", function() { return cleanMnemonic; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../contextview/contextview.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/* harmony import */ var _codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../codicons/codiconStyles.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js"); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - -const MENU_MNEMONIC_REGEX = /\(&([^\s&])\)|(^|[^&])&([^\s&])/; -const MENU_ESCAPED_MNEMONIC_REGEX = /(&)?(&)([^\s&])/g; -const menuSelectionIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["registerIcon"])('menu-selection', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].check); -const menuSubmenuIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["registerIcon"])('menu-submenu', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].chevronRight); -var Direction; -(function (Direction) { - Direction[Direction["Right"] = 0] = "Right"; - Direction[Direction["Left"] = 1] = "Left"; -})(Direction || (Direction = {})); -class Menu extends _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__["ActionBar"] { - constructor(container, actions, options = {}) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(container, 'monaco-menu-container'); - container.setAttribute('role', 'presentation'); - const menuElement = document.createElement('div'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(menuElement, 'monaco-menu'); - menuElement.setAttribute('role', 'presentation'); - super(menuElement, { - orientation: 2 /* VERTICAL */, - actionViewItemProvider: action => this.doGetActionViewItem(action, options, parentData), - context: options.context, - actionRunner: options.actionRunner, - ariaLabel: options.ariaLabel, - triggerKeys: { keys: [3 /* Enter */, ...(_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"] || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"] ? [10 /* Space */] : [])], keyDown: true } - }); - this.menuElement = menuElement; - this.actionsList.setAttribute('role', 'menu'); - this.actionsList.tabIndex = 0; - this.menuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"]()); - this.initializeStyleSheet(container); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, (e) => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - // Stop tab navigation of menus - if (event.equals(2 /* Tab */)) { - e.preventDefault(); - } - }); - if (options.enableMnemonics) { - this.menuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, (e) => { - const key = e.key.toLocaleLowerCase(); - if (this.mnemonics.has(key)) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - const actions = this.mnemonics.get(key); - if (actions.length === 1) { - if (actions[0] instanceof SubmenuMenuActionViewItem && actions[0].container) { - this.focusItemByElement(actions[0].container); - } - actions[0].onClick(e); - } - if (actions.length > 1) { - const action = actions.shift(); - if (action && action.container) { - this.focusItemByElement(action.container); - actions.push(action); - } - this.mnemonics.set(key, actions); - } - } - })); - } - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"]) { - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { - const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - if (event.equals(14 /* Home */) || event.equals(11 /* PageUp */)) { - this.focusedItem = this.viewItems.length - 1; - this.focusNext(); - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - } - else if (event.equals(13 /* End */) || event.equals(12 /* PageDown */)) { - this.focusedItem = 0; - this.focusPrevious(); - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - } - })); - } - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OUT, e => { - let relatedTarget = e.relatedTarget; - if (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(relatedTarget, this.domNode)) { - this.focusedItem = undefined; - this.updateFocus(); - e.stopPropagation(); - } - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.actionsList, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OVER, e => { - let target = e.target; - if (!target || !Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(target, this.actionsList) || target === this.actionsList) { - return; - } - while (target.parentElement !== this.actionsList && target.parentElement !== null) { - target = target.parentElement; - } - if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(target, 'action-item')) { - const lastFocusedItem = this.focusedItem; - this.setFocusedItem(target); - if (lastFocusedItem !== this.focusedItem) { - this.updateFocus(); - } - } - })); - let parentData = { - parent: this - }; - this.mnemonics = new Map(); - // Scroll Logic - this.scrollableElement = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__["DomScrollableElement"](menuElement, { - alwaysConsumeMouseWheel: true, - horizontal: 2 /* Hidden */, - vertical: 3 /* Visible */, - verticalScrollbarSize: 7, - handleMouseWheel: true, - useShadows: true - })); - const scrollElement = this.scrollableElement.getDomNode(); - scrollElement.style.position = ''; - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(scrollElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_UP, e => { - // Absorb clicks in menu dead space https://github.com/Microsoft/vscode/issues/63575 - // We do this on the scroll element so the scroll bar doesn't dismiss the menu either - e.preventDefault(); - })); - menuElement.style.maxHeight = `${Math.max(10, window.innerHeight - container.getBoundingClientRect().top - 35)}px`; - actions = actions.filter(a => { - var _a; - if ((_a = options.submenuIds) === null || _a === void 0 ? void 0 : _a.has(a.id)) { - console.warn(`Found submenu cycle: ${a.id}`); - return false; - } - return true; - }); - this.push(actions, { icon: true, label: true, isMenu: true }); - container.appendChild(this.scrollableElement.getDomNode()); - this.scrollableElement.scanDomNode(); - this.viewItems.filter(item => !(item instanceof MenuSeparatorActionViewItem)).forEach((item, index, array) => { - item.updatePositionInSet(index + 1, array.length); - }); - } - initializeStyleSheet(container) { - if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isInShadowDOM"])(container)) { - this.styleSheet = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["createStyleSheet"])(container); - this.styleSheet.innerHTML = MENU_WIDGET_CSS; - } - else { - if (!Menu.globalStyleSheet) { - Menu.globalStyleSheet = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["createStyleSheet"])(); - Menu.globalStyleSheet.innerHTML = MENU_WIDGET_CSS; - } - this.styleSheet = Menu.globalStyleSheet; - } - } - style(style) { - const container = this.getContainer(); - const fgColor = style.foregroundColor ? `${style.foregroundColor}` : ''; - const bgColor = style.backgroundColor ? `${style.backgroundColor}` : ''; - const border = style.borderColor ? `1px solid ${style.borderColor}` : ''; - const shadow = style.shadowColor ? `0 2px 4px ${style.shadowColor}` : ''; - container.style.border = border; - this.domNode.style.color = fgColor; - this.domNode.style.backgroundColor = bgColor; - container.style.boxShadow = shadow; - if (this.viewItems) { - this.viewItems.forEach(item => { - if (item instanceof BaseMenuActionViewItem || item instanceof MenuSeparatorActionViewItem) { - item.style(style); - } - }); - } - } - getContainer() { - return this.scrollableElement.getDomNode(); - } - get onScroll() { - return this.scrollableElement.onScroll; - } - focusItemByElement(element) { - const lastFocusedItem = this.focusedItem; - this.setFocusedItem(element); - if (lastFocusedItem !== this.focusedItem) { - this.updateFocus(); - } - } - setFocusedItem(element) { - for (let i = 0; i < this.actionsList.children.length; i++) { - let elem = this.actionsList.children[i]; - if (element === elem) { - this.focusedItem = i; - break; - } - } - } - updateFocus(fromRight) { - super.updateFocus(fromRight, true); - if (typeof this.focusedItem !== 'undefined') { - // Workaround for #80047 caused by an issue in chromium - // https://bugs.chromium.org/p/chromium/issues/detail?id=414283 - // When that's fixed, just call this.scrollableElement.scanDomNode() - this.scrollableElement.setScrollPosition({ - scrollTop: Math.round(this.menuElement.scrollTop) - }); - } - } - doGetActionViewItem(action, options, parentData) { - if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"]) { - return new MenuSeparatorActionViewItem(options.context, action, { icon: true }); - } - else if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["SubmenuAction"]) { - const menuActionViewItem = new SubmenuMenuActionViewItem(action, action.actions, parentData, Object.assign(Object.assign({}, options), { submenuIds: new Set([...(options.submenuIds || []), action.id]) })); - if (options.enableMnemonics) { - const mnemonic = menuActionViewItem.getMnemonic(); - if (mnemonic && menuActionViewItem.isEnabled()) { - let actionViewItems = []; - if (this.mnemonics.has(mnemonic)) { - actionViewItems = this.mnemonics.get(mnemonic); - } - actionViewItems.push(menuActionViewItem); - this.mnemonics.set(mnemonic, actionViewItems); - } - } - return menuActionViewItem; - } - else { - const menuItemOptions = { enableMnemonics: options.enableMnemonics, useEventAsContext: options.useEventAsContext }; - if (options.getKeyBinding) { - const keybinding = options.getKeyBinding(action); - if (keybinding) { - const keybindingLabel = keybinding.getLabel(); - if (keybindingLabel) { - menuItemOptions.keybinding = keybindingLabel; - } - } - } - const menuActionViewItem = new BaseMenuActionViewItem(options.context, action, menuItemOptions); - if (options.enableMnemonics) { - const mnemonic = menuActionViewItem.getMnemonic(); - if (mnemonic && menuActionViewItem.isEnabled()) { - let actionViewItems = []; - if (this.mnemonics.has(mnemonic)) { - actionViewItems = this.mnemonics.get(mnemonic); - } - actionViewItems.push(menuActionViewItem); - this.mnemonics.set(mnemonic, actionViewItems); - } - } - return menuActionViewItem; - } - } -} -class BaseMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__["BaseActionViewItem"] { - constructor(ctx, action, options = {}) { - options.isMenu = true; - super(action, action, options); - this.options = options; - this.options.icon = options.icon !== undefined ? options.icon : false; - this.options.label = options.label !== undefined ? options.label : true; - this.cssClass = ''; - // Set mnemonic - if (this.options.label && options.enableMnemonics) { - let label = this.getAction().label; - if (label) { - let matches = MENU_MNEMONIC_REGEX.exec(label); - if (matches) { - this.mnemonic = (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase(); - } - } - } - // Add mouse up listener later to avoid accidental clicks - this.runOnceToEnableMouseUp = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { - if (!this.element) { - return; - } - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_UP, e => { - // removed default prevention as it conflicts - // with BaseActionViewItem #101537 - // add back if issues arise and link new issue - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - // See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Interact_with_the_clipboard - // > Writing to the clipboard - // > You can use the "cut" and "copy" commands without any special - // permission if you are using them in a short-lived event handler - // for a user action (for example, a click handler). - // => to get the Copy and Paste context menu actions working on Firefox, - // there should be no timeout here - if (_browser_js__WEBPACK_IMPORTED_MODULE_14__["isFirefox"]) { - const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__["StandardMouseEvent"](e); - // Allowing right click to trigger the event causes the issue described below, - // but since the solution below does not work in FF, we must disable right click - if (mouseEvent.rightButton) { - return; - } - this.onClick(e); - } - // In all other cases, set timout to allow context menu cancellation to trigger - // otherwise the action will destroy the menu and a second context menu - // will still trigger for right click. - setTimeout(() => { - this.onClick(e); - }, 0); - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].CONTEXT_MENU, e => { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - })); - }, 100); - this._register(this.runOnceToEnableMouseUp); - } - render(container) { - super.render(container); - if (!this.element) { - return; - } - this.container = container; - this.item = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('a.action-menu-item')); - if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"].ID) { - // A separator is a presentation item - this.item.setAttribute('role', 'presentation'); - } - else { - this.item.setAttribute('role', 'menuitem'); - if (this.mnemonic) { - this.item.setAttribute('aria-keyshortcuts', `${this.mnemonic}`); - } - } - this.check = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.menu-item-check' + menuSelectionIcon.cssSelector)); - this.check.setAttribute('role', 'none'); - this.label = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.action-label')); - if (this.options.label && this.options.keybinding) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.keybinding')).textContent = this.options.keybinding; - } - // Adds mouse up listener to actually run the action - this.runOnceToEnableMouseUp.schedule(); - this.updateClass(); - this.updateLabel(); - this.updateTooltip(); - this.updateEnabled(); - this.updateChecked(); - } - blur() { - super.blur(); - this.applyStyle(); - } - focus() { - super.focus(); - if (this.item) { - this.item.focus(); - } - this.applyStyle(); - } - updatePositionInSet(pos, setSize) { - if (this.item) { - this.item.setAttribute('aria-posinset', `${pos}`); - this.item.setAttribute('aria-setsize', `${setSize}`); - } - } - updateLabel() { - if (!this.label) { - return; - } - if (this.options.label) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["clearNode"])(this.label); - let label = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["stripCodicons"])(this.getAction().label); - if (label) { - const cleanLabel = cleanMnemonic(label); - if (!this.options.enableMnemonics) { - label = cleanLabel; - } - this.label.setAttribute('aria-label', cleanLabel.replace(/&&/g, '&')); - const matches = MENU_MNEMONIC_REGEX.exec(label); - if (matches) { - label = _common_strings_js__WEBPACK_IMPORTED_MODULE_1__["escape"](label); - // This is global, reset it - MENU_ESCAPED_MNEMONIC_REGEX.lastIndex = 0; - let escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label); - // We can't use negative lookbehind so if we match our negative and skip - while (escMatch && escMatch[1]) { - escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label); - } - const replaceDoubleEscapes = (str) => str.replace(/&&/g, '&'); - if (escMatch) { - this.label.append(_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["ltrim"](replaceDoubleEscapes(label.substr(0, escMatch.index)), ' '), Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('u', { 'aria-hidden': 'true' }, escMatch[3]), _common_strings_js__WEBPACK_IMPORTED_MODULE_1__["rtrim"](replaceDoubleEscapes(label.substr(escMatch.index + escMatch[0].length)), ' ')); - } - else { - this.label.innerText = replaceDoubleEscapes(label).trim(); - } - if (this.item) { - this.item.setAttribute('aria-keyshortcuts', (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase()); - } - } - else { - this.label.innerText = label.replace(/&&/g, '&').trim(); - } - } - } - } - updateTooltip() { - let title = null; - if (this.getAction().tooltip) { - title = this.getAction().tooltip; - } - else if (!this.options.label && this.getAction().label && this.options.icon) { - title = this.getAction().label; - if (this.options.keybinding) { - title = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, "{0} ({1})", title, this.options.keybinding); - } - } - if (title && this.item) { - this.item.title = title; - } - } - updateClass() { - if (this.cssClass && this.item) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.item, this.cssClass); - } - if (this.options.icon && this.label) { - this.cssClass = this.getAction().class || ''; - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.label, 'icon'); - if (this.cssClass) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.label, this.cssClass); - } - this.updateEnabled(); - } - else if (this.label) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.label, 'icon'); - } - } - updateEnabled() { - if (this.getAction().enabled) { - if (this.element) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.element, 'disabled'); - } - if (this.item) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.item, 'disabled'); - this.item.tabIndex = 0; - } - } - else { - if (this.element) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, 'disabled'); - } - if (this.item) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'disabled'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeTabIndexAndUpdateFocus"])(this.item); - } - } - } - updateChecked() { - if (!this.item) { - return; - } - if (this.getAction().checked) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'checked'); - this.item.setAttribute('role', 'menuitemcheckbox'); - this.item.setAttribute('aria-checked', 'true'); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.item, 'checked'); - this.item.setAttribute('role', 'menuitem'); - this.item.setAttribute('aria-checked', 'false'); - } - } - getMnemonic() { - return this.mnemonic; - } - applyStyle() { - if (!this.menuStyle) { - return; - } - const isSelected = this.element && Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, 'focused'); - const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor; - const bgColor = isSelected && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : undefined; - const border = isSelected && this.menuStyle.selectionBorderColor ? `thin solid ${this.menuStyle.selectionBorderColor}` : ''; - if (this.item) { - this.item.style.color = fgColor ? fgColor.toString() : ''; - this.item.style.backgroundColor = bgColor ? bgColor.toString() : ''; - } - if (this.check) { - this.check.style.color = fgColor ? fgColor.toString() : ''; - } - if (this.container) { - this.container.style.border = border; - } - } - style(style) { - this.menuStyle = style; - this.applyStyle(); - } -} -class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { - constructor(action, submenuActions, parentData, submenuOptions) { - super(action, action, submenuOptions); - this.submenuActions = submenuActions; - this.parentData = parentData; - this.submenuOptions = submenuOptions; - this.mysubmenu = null; - this.submenuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"]()); - this.mouseOver = false; - this.expandDirection = submenuOptions && submenuOptions.expandDirection !== undefined ? submenuOptions.expandDirection : Direction.Right; - this.showScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { - if (this.mouseOver) { - this.cleanupExistingSubmenu(false); - this.createSubmenu(false); - } - }, 250); - this.hideScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { - if (this.element && (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])(), this.element) && this.parentData.submenu === this.mysubmenu)) { - this.parentData.parent.focus(false); - this.cleanupExistingSubmenu(true); - } - }, 750); - } - render(container) { - super.render(container); - if (!this.element) { - return; - } - if (this.item) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'monaco-submenu-item'); - this.item.setAttribute('aria-haspopup', 'true'); - this.updateAriaExpanded('false'); - this.submenuIndicator = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.submenu-indicator' + menuSubmenuIcon.cssSelector)); - this.submenuIndicator.setAttribute('aria-hidden', 'true'); - } - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_UP, e => { - let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - this.createSubmenu(true); - } - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { - let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])() === this.item) { - if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - } - } - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OVER, e => { - if (!this.mouseOver) { - this.mouseOver = true; - this.showScheduler.schedule(); - } - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_LEAVE, e => { - this.mouseOver = false; - })); - this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].FOCUS_OUT, e => { - if (this.element && !Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])(), this.element)) { - this.hideScheduler.schedule(); - } - })); - this._register(this.parentData.parent.onScroll(() => { - this.parentData.parent.focus(false); - this.cleanupExistingSubmenu(false); - })); - } - onClick(e) { - // stop clicking from trying to run an action - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - this.cleanupExistingSubmenu(false); - this.createSubmenu(true); - } - cleanupExistingSubmenu(force) { - if (this.parentData.submenu && (force || (this.parentData.submenu !== this.mysubmenu))) { - // disposal may throw if the submenu has already been removed - try { - this.parentData.submenu.dispose(); - } - catch (_a) { } - this.parentData.submenu = undefined; - this.updateAriaExpanded('false'); - if (this.submenuContainer) { - this.submenuDisposables.clear(); - this.submenuContainer = undefined; - } - } - } - calculateSubmenuMenuLayout(windowDimensions, submenu, entry, expandDirection) { - const ret = { top: 0, left: 0 }; - // Start with horizontal - ret.left = Object(_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__["layout"])(windowDimensions.width, submenu.width, { position: expandDirection === Direction.Right ? 0 /* Before */ : 1 /* After */, offset: entry.left, size: entry.width }); - // We don't have enough room to layout the menu fully, so we are overlapping the menu - if (ret.left >= entry.left && ret.left < entry.left + entry.width) { - if (entry.left + 10 + submenu.width <= windowDimensions.width) { - ret.left = entry.left + 10; - } - entry.top += 10; - entry.height = 0; - } - // Now that we have a horizontal position, try layout vertically - ret.top = Object(_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__["layout"])(windowDimensions.height, submenu.height, { position: 0 /* Before */, offset: entry.top, size: 0 }); - // We didn't have enough room below, but we did above, so we shift down to align the menu - if (ret.top + submenu.height === entry.top && ret.top + entry.height + submenu.height <= windowDimensions.height) { - ret.top += entry.height; - } - return ret; - } - createSubmenu(selectFirstItem = true) { - if (!this.element) { - return; - } - if (!this.parentData.submenu) { - this.updateAriaExpanded('true'); - this.submenuContainer = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('div.monaco-submenu')); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.submenuContainer, 'menubar-menu-items-holder', 'context-view'); - // Set the top value of the menu container before construction - // This allows the menu constructor to calculate the proper max height - const computedStyles = getComputedStyle(this.parentData.parent.domNode); - const paddingTop = parseFloat(computedStyles.paddingTop || '0') || 0; - // this.submenuContainer.style.top = `${this.element.offsetTop - this.parentData.parent.scrollOffset - paddingTop}px`; - this.submenuContainer.style.zIndex = '1'; - this.submenuContainer.style.position = 'fixed'; - this.submenuContainer.style.top = '0'; - this.submenuContainer.style.left = '0'; - this.parentData.submenu = new Menu(this.submenuContainer, this.submenuActions, this.submenuOptions); - if (this.menuStyle) { - this.parentData.submenu.style(this.menuStyle); - } - // layout submenu - const entryBox = this.element.getBoundingClientRect(); - const entryBoxUpdated = { - top: entryBox.top - paddingTop, - left: entryBox.left, - height: entryBox.height + 2 * paddingTop, - width: entryBox.width - }; - const viewBox = this.submenuContainer.getBoundingClientRect(); - const { top, left } = this.calculateSubmenuMenuLayout({ height: window.innerHeight, width: window.innerWidth }, viewBox, entryBoxUpdated, this.expandDirection); - this.submenuContainer.style.left = `${left}px`; - this.submenuContainer.style.top = `${top}px`; - this.submenuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_UP, e => { - let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - if (event.equals(15 /* LeftArrow */)) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - this.parentData.parent.focus(); - this.cleanupExistingSubmenu(true); - } - })); - this.submenuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { - let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); - if (event.equals(15 /* LeftArrow */)) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); - } - })); - this.submenuDisposables.add(this.parentData.submenu.onDidCancel(() => { - this.parentData.parent.focus(); - this.cleanupExistingSubmenu(true); - })); - this.parentData.submenu.focus(selectFirstItem); - this.mysubmenu = this.parentData.submenu; - } - else { - this.parentData.submenu.focus(false); - } - } - updateAriaExpanded(value) { - var _a; - if (this.item) { - (_a = this.item) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', value); - } - } - applyStyle() { - super.applyStyle(); - if (!this.menuStyle) { - return; - } - const isSelected = this.element && Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, 'focused'); - const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor; - if (this.submenuIndicator) { - this.submenuIndicator.style.color = fgColor ? `${fgColor}` : ''; - } - if (this.parentData.submenu) { - this.parentData.submenu.style(this.menuStyle); - } - } - dispose() { - super.dispose(); - this.hideScheduler.dispose(); - if (this.mysubmenu) { - this.mysubmenu.dispose(); - this.mysubmenu = null; - } - if (this.submenuContainer) { - this.submenuContainer = undefined; - } - } -} -class MenuSeparatorActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__["ActionViewItem"] { - style(style) { - if (this.label) { - this.label.style.borderBottomColor = style.separatorColor ? `${style.separatorColor}` : ''; - } - } -} -function cleanMnemonic(label) { - const regex = MENU_MNEMONIC_REGEX; - const matches = regex.exec(label); - if (!matches) { - return label; - } - const mnemonicInText = !matches[1]; - return label.replace(regex, mnemonicInText ? '$2$3' : '').trim(); -} -let MENU_WIDGET_CSS = ` -.monaco-menu { - font-size: 13px; - -} - -${Object(_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__["formatRule"])(menuSelectionIcon)} -${Object(_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__["formatRule"])(menuSubmenuIcon)} - -.monaco-menu .monaco-action-bar { - text-align: right; - overflow: hidden; - white-space: nowrap; -} - -.monaco-menu .monaco-action-bar .actions-container { - display: flex; - margin: 0 auto; - padding: 0; - width: 100%; - justify-content: flex-end; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: inline-block; -} - -.monaco-menu .monaco-action-bar.reverse .actions-container { - flex-direction: row-reverse; -} - -.monaco-menu .monaco-action-bar .action-item { - cursor: pointer; - display: inline-block; - transition: transform 50ms ease; - position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ -} - -.monaco-menu .monaco-action-bar .action-item.disabled { - cursor: default; -} - -.monaco-menu .monaco-action-bar.animated .action-item.active { - transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */ -} - -.monaco-menu .monaco-action-bar .action-item .icon, -.monaco-menu .monaco-action-bar .action-item .codicon { - display: inline-block; -} - -.monaco-menu .monaco-action-bar .action-item .codicon { - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar .action-label { - font-size: 11px; - margin-right: 4px; -} - -.monaco-menu .monaco-action-bar .action-item.disabled .action-label, -.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { - opacity: 0.4; -} - -/* Vertical actions */ - -.monaco-menu .monaco-action-bar.vertical { - text-align: left; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - display: block; - border-bottom: 1px solid #bbb; - padding-top: 1px; - margin-left: .8em; - margin-right: .8em; -} - -.monaco-menu .secondary-actions .monaco-action-bar .action-label { - margin-left: 6px; -} - -/* Action Items */ -.monaco-menu .monaco-action-bar .action-item.select-container { - overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ - flex: 1; - max-width: 170px; - min-width: 60px; - display: flex; - align-items: center; - justify-content: center; - margin-right: 10px; -} - -.monaco-menu .monaco-action-bar.vertical { - margin-left: 0; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - padding: 0; - transform: none; - display: flex; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.active { - transform: none; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - flex: 1 1 auto; - display: flex; - height: 2em; - align-items: center; - position: relative; -} - -.monaco-menu .monaco-action-bar.vertical .action-label { - flex: 1 1 auto; - text-decoration: none; - padding: 0 1em; - background: none; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .keybinding, -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - display: inline-block; - flex: 2 1 auto; - padding: 0 1em; - text-align: right; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { - font-size: 16px !important; - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { - margin-left: auto; - margin-right: -20px; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { - opacity: 0.4; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { - display: inline-block; - box-sizing: border-box; - margin: 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - position: static; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { - position: absolute; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - padding: 0.5em 0 0 0; - margin-bottom: 0.5em; - width: 100%; - height: 0px !important; - margin-left: .8em !important; - margin-right: .8em !important; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { - padding: 0.7em 1em 0.1em 1em; - font-weight: bold; - opacity: 1; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:hover { - color: inherit; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - position: absolute; - visibility: hidden; - width: 1em; - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { - visibility: visible; - display: flex; - align-items: center; - justify-content: center; -} - -/* Context Menu */ - -.context-view.monaco-menu-container { - outline: 0; - border: none; - animation: fadeIn 0.083s linear; -} - -.context-view.monaco-menu-container :focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { - outline: 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ -} - - -/* High Contrast Theming */ -:host-context(.hc-black) .context-view.monaco-menu-container { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused { - background: none; -} - -/* Vertical Action Bar Styles */ - -.monaco-menu .monaco-action-bar.vertical { - padding: .5em 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - height: 1.8em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), -.monaco-menu .monaco-action-bar.vertical .keybinding { - font-size: inherit; - padding: 0 2em; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - font-size: inherit; - width: 2em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - font-size: inherit; - padding: 0.2em 0 0 0; - margin-bottom: 0.2em; -} - -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { - margin-left: 0; - margin-right: 0; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - font-size: 60%; - padding: 0 1.8em; -} - -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; - mask-size: 10px 10px; - -webkit-mask-size: 10px 10px; -} - -.monaco-menu .action-item { - cursor: default; -} - -/* Arrows */ -.monaco-scrollable-element > .scrollbar > .scra { - cursor: pointer; - font-size: 11px !important; -} - -.monaco-scrollable-element > .visible { - opacity: 1; - - /* Background rule added for IE9 - to allow clicks on dom node */ - background:rgba(0,0,0,0); - - transition: opacity 100ms linear; -} -.monaco-scrollable-element > .invisible { - opacity: 0; - pointer-events: none; -} -.monaco-scrollable-element > .invisible.fade { - transition: opacity 800ms linear; -} - -/* Scrollable Content Inset Shadow */ -.monaco-scrollable-element > .shadow { - position: absolute; - display: none; -} -.monaco-scrollable-element > .shadow.top { - display: block; - top: 0; - left: 3px; - height: 3px; - width: 100%; - box-shadow: #DDD 0 6px 6px -6px inset; -} -.monaco-scrollable-element > .shadow.left { - display: block; - top: 3px; - left: 0; - height: 100%; - width: 3px; - box-shadow: #DDD 6px 0 6px -6px inset; -} -.monaco-scrollable-element > .shadow.top-left-corner { - display: block; - top: 0; - left: 0; - height: 3px; - width: 3px; -} -.monaco-scrollable-element > .shadow.top.left { - box-shadow: #DDD 6px 6px 6px -6px inset; -} - -/* ---------- Default Style ---------- */ - -:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(100, 100, 100, .4); -} -:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(121, 121, 121, .4); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(111, 195, 223, .6); -} - -.monaco-scrollable-element > .scrollbar > .slider:hover { - background: rgba(100, 100, 100, .7); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover { - background: rgba(111, 195, 223, .8); -} - -.monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(0, 0, 0, .6); -} -:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(191, 191, 191, .4); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(111, 195, 223, 1); -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.top { - box-shadow: none; -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.left { - box-shadow: #000 6px 0 6px -6px inset; -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left { - box-shadow: #000 6px 6px 6px -6px inset; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.top { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.left { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left { - box-shadow: none; -} -`; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css ***! - \***************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./mouseCursor.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js ***! - \**************************************************************************************/ -/*! exports provided: MOUSE_CURSOR_TEXT_CSS_CLASS_NAME */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MOUSE_CURSOR_TEXT_CSS_CLASS_NAME", function() { return MOUSE_CURSOR_TEXT_CSS_CLASS_NAME; }); -/* harmony import */ var _mouseCursor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mouseCursor.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css ***! - \***************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./progressbar.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js ***! - \**************************************************************************************/ -/*! exports provided: ProgressBar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressBar", function() { return ProgressBar; }); -/* harmony import */ var _progressbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progressbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -const css_done = 'done'; -const css_active = 'active'; -const css_infinite = 'infinite'; -const css_discrete = 'discrete'; -const css_progress_container = 'monaco-progress-container'; -const css_progress_bit = 'progress-bit'; -const defaultOpts = { - progressBarBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].fromHex('#0E70C0') -}; -/** - * A progress bar with support for infinite or discrete progress. - */ -class ProgressBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(container, options) { - super(); - this.options = options || Object.create(null); - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["mixin"])(this.options, defaultOpts, false); - this.workedVal = 0; - this.progressBarBackground = this.options.progressBarBackground; - this._register(this.showDelayedScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_5__["RunOnceScheduler"](() => Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["show"])(this.element), 0)); - this.create(container); - } - create(container) { - this.element = document.createElement('div'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, css_progress_container); - container.appendChild(this.element); - this.bit = document.createElement('div'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.bit, css_progress_bit); - this.element.appendChild(this.bit); - this.applyStyles(); - } - off() { - this.bit.style.width = 'inherit'; - this.bit.style.opacity = '1'; - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.element, css_active, css_infinite, css_discrete); - this.workedVal = 0; - this.totalWork = undefined; - } - /** - * Stops the progressbar from showing any progress instantly without fading out. - */ - stop() { - return this.doDone(false); - } - doDone(delayed) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, css_done); - // let it grow to 100% width and hide afterwards - if (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, css_infinite)) { - this.bit.style.width = 'inherit'; - if (delayed) { - setTimeout(() => this.off(), 200); - } - else { - this.off(); - } - } - // let it fade out and hide afterwards - else { - this.bit.style.opacity = '0'; - if (delayed) { - setTimeout(() => this.off(), 200); - } - else { - this.off(); - } - } - return this; - } - /** - * Use this mode to indicate progress that has no total number of work units. - */ - infinite() { - this.bit.style.width = '2%'; - this.bit.style.opacity = '1'; - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.element, css_discrete, css_done); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.element, css_active, css_infinite); - return this; - } - getContainer() { - return this.element; - } - style(styles) { - this.progressBarBackground = styles.progressBarBackground; - this.applyStyles(); - } - applyStyles() { - if (this.bit) { - const background = this.progressBarBackground ? this.progressBarBackground.toString() : ''; - this.bit.style.backgroundColor = background; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css ***! - \*************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./sash.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js ***! - \************************************************************************/ -/*! exports provided: Sash */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sash", function() { return Sash; }); -/* harmony import */ var _sash_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sash.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - -const DEBUG = false; -let globalSize = 4; -const onDidChangeGlobalSize = new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); -class Sash extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(container, layoutProvider, options) { - super(); - this._state = 3 /* Enabled */; - this._onDidEnablementChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidEnablementChange = this._onDidEnablementChange.event; - this._onDidStart = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidStart = this._onDidStart.event; - this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._onDidReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidReset = this._onDidReset.event; - this._onDidEnd = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidEnd = this._onDidEnd.event; - this.linkedSash = undefined; - this.orthogonalStartSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"]()); - this.orthogonalEndSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"]()); - this.el = Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["$"])('.monaco-sash')); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'mac'); - } - this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, 'mousedown')(this.onMouseDown, this)); - this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, 'dblclick')(this.onMouseDoubleClick, this)); - this._register(_touch_js__WEBPACK_IMPORTED_MODULE_4__["Gesture"].addTarget(this.el)); - this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].Start)(this.onTouchStart, this)); - if (typeof options.size === 'number') { - this.size = options.size; - if (options.orientation === 0 /* VERTICAL */) { - this.el.style.width = `${this.size}px`; - } - else { - this.el.style.height = `${this.size}px`; - } - } - else { - this.size = globalSize; - this._register(onDidChangeGlobalSize.event(size => { - this.size = size; - this.layout(); - })); - } - this.hidden = false; - this.layoutProvider = layoutProvider; - this.orthogonalStartSash = options.orthogonalStartSash; - this.orthogonalEndSash = options.orthogonalEndSash; - this.orientation = options.orientation || 0 /* VERTICAL */; - if (this.orientation === 1 /* HORIZONTAL */) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'horizontal'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'vertical'); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'horizontal'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'vertical'); - } - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'debug', DEBUG); - this.layout(); - } - get state() { return this._state; } - set state(state) { - if (this._state === state) { - return; - } - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'disabled', state === 0 /* Disabled */); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'minimum', state === 1 /* Minimum */); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'maximum', state === 2 /* Maximum */); - this._state = state; - this._onDidEnablementChange.fire(state); - } - get orthogonalStartSash() { return this._orthogonalStartSash; } - set orthogonalStartSash(sash) { - this.orthogonalStartSashDisposables.clear(); - if (sash) { - this.orthogonalStartSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this)); - this.onOrthogonalStartSashEnablementChange(sash.state); - } - else { - this.onOrthogonalStartSashEnablementChange(0 /* Disabled */); - } - this._orthogonalStartSash = sash; - } - get orthogonalEndSash() { return this._orthogonalEndSash; } - set orthogonalEndSash(sash) { - this.orthogonalEndSashDisposables.clear(); - if (sash) { - this.orthogonalEndSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this)); - this.onOrthogonalEndSashEnablementChange(sash.state); - } - else { - this.onOrthogonalEndSashEnablementChange(0 /* Disabled */); - } - this._orthogonalEndSash = sash; - } - onMouseDown(e) { - _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); - let isMultisashResize = false; - if (!e.__orthogonalSashEvent) { - const orthogonalSash = this.getOrthogonalSash(e); - if (orthogonalSash) { - isMultisashResize = true; - e.__orthogonalSashEvent = true; - orthogonalSash.onMouseDown(e); - } - } - if (this.linkedSash && !e.__linkedSashEvent) { - e.__linkedSashEvent = true; - this.linkedSash.onMouseDown(e); - } - if (!this.state) { - return; - } - // Select both iframes and webviews; internally Electron nests an iframe - // in its component, but this isn't queryable. - const iframes = [ - ...Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["getElementsByTagName"])('iframe'), - ...Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["getElementsByTagName"])('webview'), - ]; - for (const iframe of iframes) { - iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash - } - const mouseDownEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardMouseEvent"](e); - const startX = mouseDownEvent.posx; - const startY = mouseDownEvent.posy; - const altKey = mouseDownEvent.altKey; - const startEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'active'); - this._onDidStart.fire(startEvent); - // fix https://github.com/Microsoft/vscode/issues/21675 - const style = Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["createStyleSheet"])(this.el); - const updateStyle = () => { - let cursor = ''; - if (isMultisashResize) { - cursor = 'all-scroll'; - } - else if (this.orientation === 1 /* HORIZONTAL */) { - if (this.state === 1 /* Minimum */) { - cursor = 's-resize'; - } - else if (this.state === 2 /* Maximum */) { - cursor = 'n-resize'; - } - else { - cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 'row-resize' : 'ns-resize'; - } - } - else { - if (this.state === 1 /* Minimum */) { - cursor = 'e-resize'; - } - else if (this.state === 2 /* Maximum */) { - cursor = 'w-resize'; - } - else { - cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 'col-resize' : 'ew-resize'; - } - } - style.innerHTML = `* { cursor: ${cursor} !important; }`; - }; - const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - updateStyle(); - if (!isMultisashResize) { - this.onDidEnablementChange(updateStyle, null, disposables); - } - const onMouseMove = (e) => { - _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); - const mouseMoveEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardMouseEvent"](e); - const event = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; - this._onDidChange.fire(event); - }; - const onMouseUp = (e) => { - _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); - this.el.removeChild(style); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'active'); - this._onDidEnd.fire(); - disposables.dispose(); - for (const iframe of iframes) { - iframe.style.pointerEvents = 'auto'; - } - }; - Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(window, 'mousemove')(onMouseMove, null, disposables); - Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(window, 'mouseup')(onMouseUp, null, disposables); - } - onMouseDoubleClick(e) { - const orthogonalSash = this.getOrthogonalSash(e); - if (orthogonalSash) { - orthogonalSash._onDidReset.fire(); - } - if (this.linkedSash) { - this.linkedSash._onDidReset.fire(); - } - this._onDidReset.fire(); - } - onTouchStart(event) { - _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(event); - const listeners = []; - const startX = event.pageX; - const startY = event.pageY; - const altKey = event.altKey; - this._onDidStart.fire({ - startX: startX, - currentX: startX, - startY: startY, - currentY: startY, - altKey - }); - listeners.push(Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addDisposableListener"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].Change, (event) => { - if (_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isNumber"](event.pageX) && _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isNumber"](event.pageY)) { - this._onDidChange.fire({ - startX: startX, - currentX: event.pageX, - startY: startY, - currentY: event.pageY, - altKey - }); - } - })); - listeners.push(Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addDisposableListener"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].End, (event) => { - this._onDidEnd.fire(); - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(listeners); - })); - } - layout() { - if (this.orientation === 0 /* VERTICAL */) { - const verticalProvider = this.layoutProvider; - this.el.style.left = verticalProvider.getVerticalSashLeft(this) - (this.size / 2) + 'px'; - if (verticalProvider.getVerticalSashTop) { - this.el.style.top = verticalProvider.getVerticalSashTop(this) + 'px'; - } - if (verticalProvider.getVerticalSashHeight) { - this.el.style.height = verticalProvider.getVerticalSashHeight(this) + 'px'; - } - } - else { - const horizontalProvider = this.layoutProvider; - this.el.style.top = horizontalProvider.getHorizontalSashTop(this) - (this.size / 2) + 'px'; - if (horizontalProvider.getHorizontalSashLeft) { - this.el.style.left = horizontalProvider.getHorizontalSashLeft(this) + 'px'; - } - if (horizontalProvider.getHorizontalSashWidth) { - this.el.style.width = horizontalProvider.getHorizontalSashWidth(this) + 'px'; - } - } - } - hide() { - this.hidden = true; - this.el.style.display = 'none'; - this.el.setAttribute('aria-hidden', 'true'); - } - onOrthogonalStartSashEnablementChange(state) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'orthogonal-start', state !== 0 /* Disabled */); - } - onOrthogonalEndSashEnablementChange(state) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'orthogonal-end', state !== 0 /* Disabled */); - } - getOrthogonalSash(e) { - if (this.orientation === 0 /* VERTICAL */) { - if (e.offsetY <= this.size) { - return this.orthogonalStartSash; - } - else if (e.offsetY >= this.el.clientHeight - this.size) { - return this.orthogonalEndSash; - } - } - else { - if (e.offsetX <= this.size) { - return this.orthogonalStartSash; - } - else if (e.offsetX >= this.el.clientWidth - this.size) { - return this.orthogonalEndSash; - } - } - return undefined; - } - dispose() { - super.dispose(); - this.el.remove(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js ***! - \******************************************************************************************/ -/*! exports provided: AbstractScrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractScrollbar", function() { return AbstractScrollbar; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); -/* harmony import */ var _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scrollbarVisibilityController.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -/** - * The orthogonal distance to the slider at which dragging "resets". This implements "snapping" - */ -const MOUSE_DRAG_RESET_DISTANCE = 140; -class AbstractScrollbar extends _widget_js__WEBPACK_IMPORTED_MODULE_5__["Widget"] { - constructor(opts) { - super(); - this._lazyRender = opts.lazyRender; - this._host = opts.host; - this._scrollable = opts.scrollable; - this._scrollbarState = opts.scrollbarState; - this._visibilityController = this._register(new _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__["ScrollbarVisibilityController"](opts.visibility, 'visible scrollbar ' + opts.extraScrollbarClassName, 'invisible scrollbar ' + opts.extraScrollbarClassName)); - this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); - this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__["GlobalMouseMoveMonitor"]()); - this._shouldRender = true; - this.domNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this.domNode.setAttribute('role', 'presentation'); - this.domNode.setAttribute('aria-hidden', 'true'); - this._visibilityController.setDomNode(this.domNode); - this.domNode.setPosition('absolute'); - this.onmousedown(this.domNode.domNode, (e) => this._domNodeMouseDown(e)); - } - // ----------------- creation - /** - * Creates the dom node for an arrow & adds it to the container - */ - _createArrow(opts) { - let arrow = this._register(new _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarArrow"](opts)); - this.domNode.domNode.appendChild(arrow.bgDomNode); - this.domNode.domNode.appendChild(arrow.domNode); - } - /** - * Creates the slider dom node, adds it to the container & hooks up the events - */ - _createSlider(top, left, width, height) { - this.slider = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this.slider.setClassName('slider'); - this.slider.setPosition('absolute'); - this.slider.setTop(top); - this.slider.setLeft(left); - if (typeof width === 'number') { - this.slider.setWidth(width); - } - if (typeof height === 'number') { - this.slider.setHeight(height); - } - this.slider.setLayerHinting(true); - this.slider.setContain('strict'); - this.domNode.domNode.appendChild(this.slider.domNode); - this.onmousedown(this.slider.domNode, (e) => { - if (e.leftButton) { - e.preventDefault(); - this._sliderMouseDown(e, () => { }); - } - }); - this.onclick(this.slider.domNode, e => { - if (e.leftButton) { - e.stopPropagation(); - } - }); - } - // ----------------- Update state - _onElementSize(visibleSize) { - if (this._scrollbarState.setVisibleSize(visibleSize)) { - this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); - this._shouldRender = true; - if (!this._lazyRender) { - this.render(); - } - } - return this._shouldRender; - } - _onElementScrollSize(elementScrollSize) { - if (this._scrollbarState.setScrollSize(elementScrollSize)) { - this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); - this._shouldRender = true; - if (!this._lazyRender) { - this.render(); - } - } - return this._shouldRender; - } - _onElementScrollPosition(elementScrollPosition) { - if (this._scrollbarState.setScrollPosition(elementScrollPosition)) { - this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); - this._shouldRender = true; - if (!this._lazyRender) { - this.render(); - } - } - return this._shouldRender; - } - // ----------------- rendering - beginReveal() { - this._visibilityController.setShouldBeVisible(true); - } - beginHide() { - this._visibilityController.setShouldBeVisible(false); - } - render() { - if (!this._shouldRender) { - return; - } - this._shouldRender = false; - this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); - this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()); - } - // ----------------- DOM events - _domNodeMouseDown(e) { - if (e.target !== this.domNode.domNode) { - return; - } - this._onMouseDown(e); - } - delegateMouseDown(e) { - let domTop = this.domNode.domNode.getClientRects()[0].top; - let sliderStart = domTop + this._scrollbarState.getSliderPosition(); - let sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(); - let mousePos = this._sliderMousePosition(e); - if (sliderStart <= mousePos && mousePos <= sliderStop) { - // Act as if it was a mouse down on the slider - if (e.leftButton) { - e.preventDefault(); - this._sliderMouseDown(e, () => { }); - } - } - else { - // Act as if it was a mouse down on the scrollbar - this._onMouseDown(e); - } - } - _onMouseDown(e) { - let offsetX; - let offsetY; - if (e.target === this.domNode.domNode && typeof e.browserEvent.offsetX === 'number' && typeof e.browserEvent.offsetY === 'number') { - offsetX = e.browserEvent.offsetX; - offsetY = e.browserEvent.offsetY; - } - else { - const domNodePosition = _dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"](this.domNode.domNode); - offsetX = e.posx - domNodePosition.left; - offsetY = e.posy - domNodePosition.top; - } - this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(offsetX, offsetY))); - if (e.leftButton) { - e.preventDefault(); - this._sliderMouseDown(e, () => { }); - } - } - _sliderMouseDown(e, onDragFinished) { - const initialMousePosition = this._sliderMousePosition(e); - const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); - const initialScrollbarState = this._scrollbarState.clone(); - this.slider.toggleClassName('active', true); - this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__["standardMouseMoveMerger"], (mouseMoveData) => { - const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); - const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isWindows"] && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the scrollbar => reset dragging - this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition()); - return; - } - const mousePosition = this._sliderMousePosition(mouseMoveData); - const mouseDelta = mousePosition - initialMousePosition; - this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); - }, () => { - this.slider.toggleClassName('active', false); - this._host.onDragEnd(); - onDragFinished(); - }); - this._host.onDragStart(); - } - _setDesiredScrollPositionNow(_desiredScrollPosition) { - let desiredScrollPosition = {}; - this.writeScrollPosition(desiredScrollPosition, _desiredScrollPosition); - this._scrollable.setScrollPositionNow(desiredScrollPosition); - } - updateScrollbarSize(scrollbarSize) { - this._updateScrollbarSize(scrollbarSize); - this._scrollbarState.setScrollbarSize(scrollbarSize); - this._shouldRender = true; - if (!this._lazyRender) { - this.render(); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js ***! - \********************************************************************************************/ -/*! exports provided: HorizontalScrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalScrollbar", function() { return HorizontalScrollbar; }); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js"); -/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); -/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const scrollbarButtonLeftIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-left', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleLeft); -const scrollbarButtonRightIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-right', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleRight); -class HorizontalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__["AbstractScrollbar"] { - constructor(scrollable, options, host) { - const scrollDimensions = scrollable.getScrollDimensions(); - const scrollPosition = scrollable.getCurrentScrollPosition(); - super({ - lazyRender: options.lazyRender, - host: host, - scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarState"]((options.horizontalHasArrows ? options.arrowSize : 0), (options.horizontal === 2 /* Hidden */ ? 0 : options.horizontalScrollbarSize), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), scrollDimensions.width, scrollDimensions.scrollWidth, scrollPosition.scrollLeft), - visibility: options.horizontal, - extraScrollbarClassName: 'horizontal', - scrollable: scrollable - }); - if (options.horizontalHasArrows) { - let arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; - let scrollbarDelta = (options.horizontalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; - this._createArrow({ - className: 'scra', - icon: scrollbarButtonLeftIcon, - top: scrollbarDelta, - left: arrowDelta, - bottom: undefined, - right: undefined, - bgWidth: options.arrowSize, - bgHeight: options.horizontalScrollbarSize, - onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 1, 0)), - }); - this._createArrow({ - className: 'scra', - icon: scrollbarButtonRightIcon, - top: scrollbarDelta, - left: undefined, - bottom: undefined, - right: arrowDelta, - bgWidth: options.arrowSize, - bgHeight: options.horizontalScrollbarSize, - onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, -1, 0)), - }); - } - this._createSlider(Math.floor((options.horizontalScrollbarSize - options.horizontalSliderSize) / 2), 0, undefined, options.horizontalSliderSize); - } - _updateSlider(sliderSize, sliderPosition) { - this.slider.setWidth(sliderSize); - this.slider.setLeft(sliderPosition); - } - _renderDomNode(largeSize, smallSize) { - this.domNode.setWidth(largeSize); - this.domNode.setHeight(smallSize); - this.domNode.setLeft(0); - this.domNode.setBottom(0); - } - onDidScroll(e) { - this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender; - this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender; - this._shouldRender = this._onElementSize(e.width) || this._shouldRender; - return this._shouldRender; - } - _mouseDownRelativePosition(offsetX, offsetY) { - return offsetX; - } - _sliderMousePosition(e) { - return e.posx; - } - _sliderOrthogonalMousePosition(e) { - return e.posy; - } - _updateScrollbarSize(size) { - this.slider.setHeight(size); - } - writeScrollPosition(target, scrollPosition) { - target.scrollLeft = scrollPosition; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css ***! - \******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./scrollbars.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js ***! - \******************************************************************************************/ -/*! exports provided: MouseWheelClassifier, AbstractScrollableElement, ScrollableElement, SmoothScrollableElement, DomScrollableElement */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseWheelClassifier", function() { return MouseWheelClassifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractScrollableElement", function() { return AbstractScrollableElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollableElement", function() { return ScrollableElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmoothScrollableElement", function() { return SmoothScrollableElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomScrollableElement", function() { return DomScrollableElement; }); -/* harmony import */ var _media_scrollbars_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/scrollbars.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./horizontalScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js"); -/* harmony import */ var _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./verticalScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/scrollable.js */ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js"); -/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - -const HIDE_TIMEOUT = 500; -const SCROLL_WHEEL_SENSITIVITY = 50; -const SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED = true; -class MouseWheelClassifierItem { - constructor(timestamp, deltaX, deltaY) { - this.timestamp = timestamp; - this.deltaX = deltaX; - this.deltaY = deltaY; - this.score = 0; - } -} -class MouseWheelClassifier { - constructor() { - this._capacity = 5; - this._memory = []; - this._front = -1; - this._rear = -1; - } - isPhysicalMouseWheel() { - if (this._front === -1 && this._rear === -1) { - // no elements - return false; - } - // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ... - let remainingInfluence = 1; - let score = 0; - let iteration = 1; - let index = this._rear; - do { - const influence = (index === this._front ? remainingInfluence : Math.pow(2, -iteration)); - remainingInfluence -= influence; - score += this._memory[index].score * influence; - if (index === this._front) { - break; - } - index = (this._capacity + index - 1) % this._capacity; - iteration++; - } while (true); - return (score <= 0.5); - } - accept(timestamp, deltaX, deltaY) { - const item = new MouseWheelClassifierItem(timestamp, deltaX, deltaY); - item.score = this._computeScore(item); - if (this._front === -1 && this._rear === -1) { - this._memory[0] = item; - this._front = 0; - this._rear = 0; - } - else { - this._rear = (this._rear + 1) % this._capacity; - if (this._rear === this._front) { - // Drop oldest - this._front = (this._front + 1) % this._capacity; - } - this._memory[this._rear] = item; - } - } - /** - * A score between 0 and 1 for `item`. - * - a score towards 0 indicates that the source appears to be a physical mouse wheel - * - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc. - */ - _computeScore(item) { - if (Math.abs(item.deltaX) > 0 && Math.abs(item.deltaY) > 0) { - // both axes exercised => definitely not a physical mouse wheel - return 1; - } - let score = 0.5; - const prev = (this._front === -1 && this._rear === -1 ? null : this._memory[this._rear]); - if (prev) { - // const deltaT = item.timestamp - prev.timestamp; - // if (deltaT < 1000 / 30) { - // // sooner than X times per second => indicator that this is not a physical mouse wheel - // score += 0.25; - // } - // if (item.deltaX === prev.deltaX && item.deltaY === prev.deltaY) { - // // equal amplitude => indicator that this is a physical mouse wheel - // score -= 0.25; - // } - } - if (!this._isAlmostInt(item.deltaX) || !this._isAlmostInt(item.deltaY)) { - // non-integer deltas => indicator that this is not a physical mouse wheel - score += 0.25; - } - return Math.min(Math.max(score, 0), 1); - } - _isAlmostInt(value) { - const delta = Math.abs(Math.round(value) - value); - return (delta < 0.01); - } -} -MouseWheelClassifier.INSTANCE = new MouseWheelClassifier(); -class AbstractScrollableElement extends _widget_js__WEBPACK_IMPORTED_MODULE_6__["Widget"] { - constructor(element, options, scrollable) { - super(); - this._onScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"]()); - this.onScroll = this._onScroll.event; - this._onWillScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"]()); - element.style.overflow = 'hidden'; - this._options = resolveOptions(options); - this._scrollable = scrollable; - this._register(this._scrollable.onScroll((e) => { - this._onWillScroll.fire(e); - this._onDidScroll(e); - this._onScroll.fire(e); - })); - let scrollbarHost = { - onMouseWheel: (mouseWheelEvent) => this._onMouseWheel(mouseWheelEvent), - onDragStart: () => this._onDragStart(), - onDragEnd: () => this._onDragEnd(), - }; - this._verticalScrollbar = this._register(new _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__["VerticalScrollbar"](this._scrollable, this._options, scrollbarHost)); - this._horizontalScrollbar = this._register(new _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalScrollbar"](this._scrollable, this._options, scrollbarHost)); - this._domNode = document.createElement('div'); - this._domNode.className = 'monaco-scrollable-element ' + this._options.className; - this._domNode.setAttribute('role', 'presentation'); - this._domNode.style.position = 'relative'; - this._domNode.style.overflow = 'hidden'; - this._domNode.appendChild(element); - this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode); - this._domNode.appendChild(this._verticalScrollbar.domNode.domNode); - if (this._options.useShadows) { - this._leftShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._leftShadowDomNode.setClassName('shadow'); - this._domNode.appendChild(this._leftShadowDomNode.domNode); - this._topShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._topShadowDomNode.setClassName('shadow'); - this._domNode.appendChild(this._topShadowDomNode.domNode); - this._topLeftShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._topLeftShadowDomNode.setClassName('shadow top-left-corner'); - this._domNode.appendChild(this._topLeftShadowDomNode.domNode); - } - else { - this._leftShadowDomNode = null; - this._topShadowDomNode = null; - this._topLeftShadowDomNode = null; - } - this._listenOnDomNode = this._options.listenOnDomNode || this._domNode; - this._mouseWheelToDispose = []; - this._setListeningToMouseWheel(this._options.handleMouseWheel); - this.onmouseover(this._listenOnDomNode, (e) => this._onMouseOver(e)); - this.onnonbubblingmouseout(this._listenOnDomNode, (e) => this._onMouseOut(e)); - this._hideTimeout = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_7__["TimeoutTimer"]()); - this._isDragging = false; - this._mouseIsOver = false; - this._shouldRender = true; - this._revealOnScroll = true; - } - dispose() { - this._mouseWheelToDispose = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this._mouseWheelToDispose); - super.dispose(); - } - /** - * Get the generated 'scrollable' dom node - */ - getDomNode() { - return this._domNode; - } - getOverviewRulerLayoutInfo() { - return { - parent: this._domNode, - insertBefore: this._verticalScrollbar.domNode.domNode, - }; - } - /** - * Delegate a mouse down event to the vertical scrollbar. - * This is to help with clicking somewhere else and having the scrollbar react. - */ - delegateVerticalScrollbarMouseDown(browserEvent) { - this._verticalScrollbar.delegateMouseDown(browserEvent); - } - getScrollDimensions() { - return this._scrollable.getScrollDimensions(); - } - setScrollDimensions(dimensions) { - this._scrollable.setScrollDimensions(dimensions, false); - } - /** - * Update the class name of the scrollable element. - */ - updateClassName(newClassName) { - this._options.className = newClassName; - // Defaults are different on Macs - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"]) { - this._options.className += ' mac'; - } - this._domNode.className = 'monaco-scrollable-element ' + this._options.className; - } - /** - * Update configuration options for the scrollbar. - * Really this is Editor.IEditorScrollbarOptions, but base shouldn't - * depend on Editor. - */ - updateOptions(newOptions) { - if (typeof newOptions.handleMouseWheel !== 'undefined') { - this._options.handleMouseWheel = newOptions.handleMouseWheel; - this._setListeningToMouseWheel(this._options.handleMouseWheel); - } - if (typeof newOptions.mouseWheelScrollSensitivity !== 'undefined') { - this._options.mouseWheelScrollSensitivity = newOptions.mouseWheelScrollSensitivity; - } - if (typeof newOptions.fastScrollSensitivity !== 'undefined') { - this._options.fastScrollSensitivity = newOptions.fastScrollSensitivity; - } - if (typeof newOptions.scrollPredominantAxis !== 'undefined') { - this._options.scrollPredominantAxis = newOptions.scrollPredominantAxis; - } - if (typeof newOptions.horizontalScrollbarSize !== 'undefined') { - this._horizontalScrollbar.updateScrollbarSize(newOptions.horizontalScrollbarSize); - } - if (!this._options.lazyRender) { - this._render(); - } - } - // -------------------- mouse wheel scrolling -------------------- - _setListeningToMouseWheel(shouldListen) { - let isListening = (this._mouseWheelToDispose.length > 0); - if (isListening === shouldListen) { - // No change - return; - } - // Stop listening (if necessary) - this._mouseWheelToDispose = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this._mouseWheelToDispose); - // Start listening (if necessary) - if (shouldListen) { - let onMouseWheel = (browserEvent) => { - this._onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardWheelEvent"](browserEvent)); - }; - this._mouseWheelToDispose.push(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._listenOnDomNode, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_WHEEL, onMouseWheel, { passive: false })); - } - } - _onMouseWheel(e) { - const classifier = MouseWheelClassifier.INSTANCE; - if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) { - const osZoomFactor = window.devicePixelRatio / Object(_browser_js__WEBPACK_IMPORTED_MODULE_12__["getZoomFactor"])(); - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isWindows"] || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"]) { - // On Windows and Linux, the incoming delta events are multiplied with the OS zoom factor. - // The OS zoom factor can be reverse engineered by using the device pixel ratio and the configured zoom factor into account. - classifier.accept(Date.now(), e.deltaX / osZoomFactor, e.deltaY / osZoomFactor); - } - else { - classifier.accept(Date.now(), e.deltaX, e.deltaY); - } - } - // console.log(`${Date.now()}, ${e.deltaY}, ${e.deltaX}`); - if (e.deltaY || e.deltaX) { - let deltaY = e.deltaY * this._options.mouseWheelScrollSensitivity; - let deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity; - if (this._options.scrollPredominantAxis) { - if (Math.abs(deltaY) >= Math.abs(deltaX)) { - deltaX = 0; - } - else { - deltaY = 0; - } - } - if (this._options.flipAxes) { - [deltaY, deltaX] = [deltaX, deltaY]; - } - // Convert vertical scrolling to horizontal if shift is held, this - // is handled at a higher level on Mac - const shiftConvert = !_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"] && e.browserEvent && e.browserEvent.shiftKey; - if ((this._options.scrollYToX || shiftConvert) && !deltaX) { - deltaX = deltaY; - deltaY = 0; - } - if (e.browserEvent && e.browserEvent.altKey) { - // fastScrolling - deltaX = deltaX * this._options.fastScrollSensitivity; - deltaY = deltaY * this._options.fastScrollSensitivity; - } - const futureScrollPosition = this._scrollable.getFutureScrollPosition(); - let desiredScrollPosition = {}; - if (deltaY) { - const desiredScrollTop = futureScrollPosition.scrollTop - SCROLL_WHEEL_SENSITIVITY * deltaY; - this._verticalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollTop); - } - if (deltaX) { - const desiredScrollLeft = futureScrollPosition.scrollLeft - SCROLL_WHEEL_SENSITIVITY * deltaX; - this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollLeft); - } - // Check that we are scrolling towards a location which is valid - desiredScrollPosition = this._scrollable.validateScrollPosition(desiredScrollPosition); - if (futureScrollPosition.scrollLeft !== desiredScrollPosition.scrollLeft || futureScrollPosition.scrollTop !== desiredScrollPosition.scrollTop) { - const canPerformSmoothScroll = (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED - && this._options.mouseWheelSmoothScroll - && classifier.isPhysicalMouseWheel()); - if (canPerformSmoothScroll) { - this._scrollable.setScrollPositionSmooth(desiredScrollPosition); - } - else { - this._scrollable.setScrollPositionNow(desiredScrollPosition); - } - this._shouldRender = true; - } - } - if (this._options.alwaysConsumeMouseWheel || this._shouldRender) { - e.preventDefault(); - e.stopPropagation(); - } - } - _onDidScroll(e) { - this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender; - this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender; - if (this._options.useShadows) { - this._shouldRender = true; - } - if (this._revealOnScroll) { - this._reveal(); - } - if (!this._options.lazyRender) { - this._render(); - } - } - /** - * Render / mutate the DOM now. - * Should be used together with the ctor option `lazyRender`. - */ - renderNow() { - if (!this._options.lazyRender) { - throw new Error('Please use `lazyRender` together with `renderNow`!'); - } - this._render(); - } - _render() { - if (!this._shouldRender) { - return; - } - this._shouldRender = false; - this._horizontalScrollbar.render(); - this._verticalScrollbar.render(); - if (this._options.useShadows) { - const scrollState = this._scrollable.getCurrentScrollPosition(); - let enableTop = scrollState.scrollTop > 0; - let enableLeft = scrollState.scrollLeft > 0; - this._leftShadowDomNode.setClassName('shadow' + (enableLeft ? ' left' : '')); - this._topShadowDomNode.setClassName('shadow' + (enableTop ? ' top' : '')); - this._topLeftShadowDomNode.setClassName('shadow top-left-corner' + (enableTop ? ' top' : '') + (enableLeft ? ' left' : '')); - } - } - // -------------------- fade in / fade out -------------------- - _onDragStart() { - this._isDragging = true; - this._reveal(); - } - _onDragEnd() { - this._isDragging = false; - this._hide(); - } - _onMouseOut(e) { - this._mouseIsOver = false; - this._hide(); - } - _onMouseOver(e) { - this._mouseIsOver = true; - this._reveal(); - } - _reveal() { - this._verticalScrollbar.beginReveal(); - this._horizontalScrollbar.beginReveal(); - this._scheduleHide(); - } - _hide() { - if (!this._mouseIsOver && !this._isDragging) { - this._verticalScrollbar.beginHide(); - this._horizontalScrollbar.beginHide(); - } - } - _scheduleHide() { - if (!this._mouseIsOver && !this._isDragging) { - this._hideTimeout.cancelAndSet(() => this._hide(), HIDE_TIMEOUT); - } - } -} -class ScrollableElement extends AbstractScrollableElement { - constructor(element, options) { - options = options || {}; - options.mouseWheelSmoothScroll = false; - const scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__["Scrollable"](0, (callback) => _dom_js__WEBPACK_IMPORTED_MODULE_1__["scheduleAtNextAnimationFrame"](callback)); - super(element, options, scrollable); - this._register(scrollable); - } - setScrollPosition(update) { - this._scrollable.setScrollPositionNow(update); - } -} -class SmoothScrollableElement extends AbstractScrollableElement { - constructor(element, options, scrollable) { - super(element, options, scrollable); - } - setScrollPosition(update) { - this._scrollable.setScrollPositionNow(update); - } - getScrollPosition() { - return this._scrollable.getCurrentScrollPosition(); - } -} -class DomScrollableElement extends ScrollableElement { - constructor(element, options) { - super(element, options); - this._element = element; - this.onScroll((e) => { - if (e.scrollTopChanged) { - this._element.scrollTop = e.scrollTop; - } - if (e.scrollLeftChanged) { - this._element.scrollLeft = e.scrollLeft; - } - }); - this.scanDomNode(); - } - scanDomNode() { - // width, scrollLeft, scrollWidth, height, scrollTop, scrollHeight - this.setScrollDimensions({ - width: this._element.clientWidth, - scrollWidth: this._element.scrollWidth, - height: this._element.clientHeight, - scrollHeight: this._element.scrollHeight - }); - this.setScrollPosition({ - scrollLeft: this._element.scrollLeft, - scrollTop: this._element.scrollTop, - }); - } -} -function resolveOptions(opts) { - let result = { - lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false), - className: (typeof opts.className !== 'undefined' ? opts.className : ''), - useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true), - handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true), - flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false), - alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false), - scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false), - mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1), - fastScrollSensitivity: (typeof opts.fastScrollSensitivity !== 'undefined' ? opts.fastScrollSensitivity : 5), - scrollPredominantAxis: (typeof opts.scrollPredominantAxis !== 'undefined' ? opts.scrollPredominantAxis : true), - mouseWheelSmoothScroll: (typeof opts.mouseWheelSmoothScroll !== 'undefined' ? opts.mouseWheelSmoothScroll : true), - arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11), - listenOnDomNode: (typeof opts.listenOnDomNode !== 'undefined' ? opts.listenOnDomNode : null), - horizontal: (typeof opts.horizontal !== 'undefined' ? opts.horizontal : 1 /* Auto */), - horizontalScrollbarSize: (typeof opts.horizontalScrollbarSize !== 'undefined' ? opts.horizontalScrollbarSize : 10), - horizontalSliderSize: (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : 0), - horizontalHasArrows: (typeof opts.horizontalHasArrows !== 'undefined' ? opts.horizontalHasArrows : false), - vertical: (typeof opts.vertical !== 'undefined' ? opts.vertical : 1 /* Auto */), - verticalScrollbarSize: (typeof opts.verticalScrollbarSize !== 'undefined' ? opts.verticalScrollbarSize : 10), - verticalHasArrows: (typeof opts.verticalHasArrows !== 'undefined' ? opts.verticalHasArrows : false), - verticalSliderSize: (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : 0) - }; - result.horizontalSliderSize = (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : result.horizontalScrollbarSize); - result.verticalSliderSize = (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : result.verticalScrollbarSize); - // Defaults are different on Macs - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"]) { - result.className += ' mac'; - } - return result; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js ***! - \***************************************************************************************/ -/*! exports provided: ARROW_IMG_SIZE, ScrollbarArrow */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROW_IMG_SIZE", function() { return ARROW_IMG_SIZE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarArrow", function() { return ScrollbarArrow; }); -/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -/** - * The arrow image size. - */ -const ARROW_IMG_SIZE = 11; -class ScrollbarArrow extends _widget_js__WEBPACK_IMPORTED_MODULE_1__["Widget"] { - constructor(opts) { - super(); - this._onActivate = opts.onActivate; - this.bgDomNode = document.createElement('div'); - this.bgDomNode.className = 'arrow-background'; - this.bgDomNode.style.position = 'absolute'; - this.bgDomNode.style.width = opts.bgWidth + 'px'; - this.bgDomNode.style.height = opts.bgHeight + 'px'; - if (typeof opts.top !== 'undefined') { - this.bgDomNode.style.top = '0px'; - } - if (typeof opts.left !== 'undefined') { - this.bgDomNode.style.left = '0px'; - } - if (typeof opts.bottom !== 'undefined') { - this.bgDomNode.style.bottom = '0px'; - } - if (typeof opts.right !== 'undefined') { - this.bgDomNode.style.right = '0px'; - } - this.domNode = document.createElement('div'); - this.domNode.className = opts.className; - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.domNode, opts.icon.classNames); - this.domNode.style.position = 'absolute'; - this.domNode.style.width = ARROW_IMG_SIZE + 'px'; - this.domNode.style.height = ARROW_IMG_SIZE + 'px'; - if (typeof opts.top !== 'undefined') { - this.domNode.style.top = opts.top + 'px'; - } - if (typeof opts.left !== 'undefined') { - this.domNode.style.left = opts.left + 'px'; - } - if (typeof opts.bottom !== 'undefined') { - this.domNode.style.bottom = opts.bottom + 'px'; - } - if (typeof opts.right !== 'undefined') { - this.domNode.style.right = opts.right + 'px'; - } - this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__["GlobalMouseMoveMonitor"]()); - this.onmousedown(this.bgDomNode, (e) => this._arrowMouseDown(e)); - this.onmousedown(this.domNode, (e) => this._arrowMouseDown(e)); - this._mousedownRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__["IntervalTimer"]()); - this._mousedownScheduleRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"]()); - } - _arrowMouseDown(e) { - let scheduleRepeater = () => { - this._mousedownRepeatTimer.cancelAndSet(() => this._onActivate(), 1000 / 24); - }; - this._onActivate(); - this._mousedownRepeatTimer.cancel(); - this._mousedownScheduleRepeatTimer.cancelAndSet(scheduleRepeater, 200); - this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__["standardMouseMoveMerger"], (mouseMoveData) => { - /* Intentional empty */ - }, () => { - this._mousedownRepeatTimer.cancel(); - this._mousedownScheduleRepeatTimer.cancel(); - }); - e.preventDefault(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js ***! - \***************************************************************************************/ -/*! exports provided: ScrollbarState */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarState", function() { return ScrollbarState; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * The minimal size of the slider (such that it can still be clickable) -- it is artificially enlarged. - */ -const MINIMUM_SLIDER_SIZE = 20; -class ScrollbarState { - constructor(arrowSize, scrollbarSize, oppositeScrollbarSize, visibleSize, scrollSize, scrollPosition) { - this._scrollbarSize = Math.round(scrollbarSize); - this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize); - this._arrowSize = Math.round(arrowSize); - this._visibleSize = visibleSize; - this._scrollSize = scrollSize; - this._scrollPosition = scrollPosition; - this._computedAvailableSize = 0; - this._computedIsNeeded = false; - this._computedSliderSize = 0; - this._computedSliderRatio = 0; - this._computedSliderPosition = 0; - this._refreshComputedValues(); - } - clone() { - return new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition); - } - setVisibleSize(visibleSize) { - let iVisibleSize = Math.round(visibleSize); - if (this._visibleSize !== iVisibleSize) { - this._visibleSize = iVisibleSize; - this._refreshComputedValues(); - return true; - } - return false; - } - setScrollSize(scrollSize) { - let iScrollSize = Math.round(scrollSize); - if (this._scrollSize !== iScrollSize) { - this._scrollSize = iScrollSize; - this._refreshComputedValues(); - return true; - } - return false; - } - setScrollPosition(scrollPosition) { - let iScrollPosition = Math.round(scrollPosition); - if (this._scrollPosition !== iScrollPosition) { - this._scrollPosition = iScrollPosition; - this._refreshComputedValues(); - return true; - } - return false; - } - setScrollbarSize(scrollbarSize) { - this._scrollbarSize = scrollbarSize; - } - static _computeValues(oppositeScrollbarSize, arrowSize, visibleSize, scrollSize, scrollPosition) { - const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); - const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); - const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize); - if (!computedIsNeeded) { - // There is no need for a slider - return { - computedAvailableSize: Math.round(computedAvailableSize), - computedIsNeeded: computedIsNeeded, - computedSliderSize: Math.round(computedRepresentableSize), - computedSliderRatio: 0, - computedSliderPosition: 0, - }; - } - // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise - const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize))); - // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize` - // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`. - const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize); - const computedSliderPosition = (scrollPosition * computedSliderRatio); - return { - computedAvailableSize: Math.round(computedAvailableSize), - computedIsNeeded: computedIsNeeded, - computedSliderSize: Math.round(computedSliderSize), - computedSliderRatio: computedSliderRatio, - computedSliderPosition: Math.round(computedSliderPosition), - }; - } - _refreshComputedValues() { - const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition); - this._computedAvailableSize = r.computedAvailableSize; - this._computedIsNeeded = r.computedIsNeeded; - this._computedSliderSize = r.computedSliderSize; - this._computedSliderRatio = r.computedSliderRatio; - this._computedSliderPosition = r.computedSliderPosition; - } - getArrowSize() { - return this._arrowSize; - } - getScrollPosition() { - return this._scrollPosition; - } - getRectangleLargeSize() { - return this._computedAvailableSize; - } - getRectangleSmallSize() { - return this._scrollbarSize; - } - isNeeded() { - return this._computedIsNeeded; - } - getSliderSize() { - return this._computedSliderSize; - } - getSliderPosition() { - return this._computedSliderPosition; - } - /** - * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider. - * `offset` is based on the same coordinate system as the `sliderPosition`. - */ - getDesiredScrollPositionFromOffset(offset) { - if (!this._computedIsNeeded) { - // no need for a slider - return 0; - } - let desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2; - return Math.round(desiredSliderPosition / this._computedSliderRatio); - } - /** - * Compute a desired `scrollPosition` such that the slider moves by `delta`. - */ - getDesiredScrollPositionFromDelta(delta) { - if (!this._computedIsNeeded) { - // no need for a slider - return 0; - } - let desiredSliderPosition = this._computedSliderPosition + delta; - return Math.round(desiredSliderPosition / this._computedSliderRatio); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js": -/*!******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js ***! - \******************************************************************************************************/ -/*! exports provided: ScrollbarVisibilityController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarVisibilityController", function() { return ScrollbarVisibilityController; }); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class ScrollbarVisibilityController extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(visibility, visibleClassName, invisibleClassName) { - super(); - this._visibility = visibility; - this._visibleClassName = visibleClassName; - this._invisibleClassName = invisibleClassName; - this._domNode = null; - this._isVisible = false; - this._isNeeded = false; - this._shouldBeVisible = false; - this._revealTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"]()); - } - // ----------------- Hide / Reveal - applyVisibilitySetting(shouldBeVisible) { - if (this._visibility === 2 /* Hidden */) { - return false; - } - if (this._visibility === 3 /* Visible */) { - return true; - } - return shouldBeVisible; - } - setShouldBeVisible(rawShouldBeVisible) { - let shouldBeVisible = this.applyVisibilitySetting(rawShouldBeVisible); - if (this._shouldBeVisible !== shouldBeVisible) { - this._shouldBeVisible = shouldBeVisible; - this.ensureVisibility(); - } - } - setIsNeeded(isNeeded) { - if (this._isNeeded !== isNeeded) { - this._isNeeded = isNeeded; - this.ensureVisibility(); - } - } - setDomNode(domNode) { - this._domNode = domNode; - this._domNode.setClassName(this._invisibleClassName); - // Now that the flags & the dom node are in a consistent state, ensure the Hidden/Visible configuration - this.setShouldBeVisible(false); - } - ensureVisibility() { - if (!this._isNeeded) { - // Nothing to be rendered - this._hide(false); - return; - } - if (this._shouldBeVisible) { - this._reveal(); - } - else { - this._hide(true); - } - } - _reveal() { - if (this._isVisible) { - return; - } - this._isVisible = true; - // The CSS animation doesn't play otherwise - this._revealTimer.setIfNotSet(() => { - if (this._domNode) { - this._domNode.setClassName(this._visibleClassName); - } - }, 0); - } - _hide(withFadeAway) { - this._revealTimer.cancel(); - if (!this._isVisible) { - return; - } - this._isVisible = false; - if (this._domNode) { - this._domNode.setClassName(this._invisibleClassName + (withFadeAway ? ' fade' : '')); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js ***! - \******************************************************************************************/ -/*! exports provided: VerticalScrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalScrollbar", function() { return VerticalScrollbar; }); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js"); -/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); -/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const scrollbarButtonUpIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-up', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleUp); -const scrollbarButtonDownIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-down', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleDown); -class VerticalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__["AbstractScrollbar"] { - constructor(scrollable, options, host) { - const scrollDimensions = scrollable.getScrollDimensions(); - const scrollPosition = scrollable.getCurrentScrollPosition(); - super({ - lazyRender: options.lazyRender, - host: host, - scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarState"]((options.verticalHasArrows ? options.arrowSize : 0), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), - // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom - 0, scrollDimensions.height, scrollDimensions.scrollHeight, scrollPosition.scrollTop), - visibility: options.vertical, - extraScrollbarClassName: 'vertical', - scrollable: scrollable - }); - if (options.verticalHasArrows) { - let arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; - let scrollbarDelta = (options.verticalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; - this._createArrow({ - className: 'scra', - icon: scrollbarButtonUpIcon, - top: arrowDelta, - left: scrollbarDelta, - bottom: undefined, - right: undefined, - bgWidth: options.verticalScrollbarSize, - bgHeight: options.arrowSize, - onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 0, 1)), - }); - this._createArrow({ - className: 'scra', - icon: scrollbarButtonDownIcon, - top: undefined, - left: scrollbarDelta, - bottom: arrowDelta, - right: undefined, - bgWidth: options.verticalScrollbarSize, - bgHeight: options.arrowSize, - onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 0, -1)), - }); - } - this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, undefined); - } - _updateSlider(sliderSize, sliderPosition) { - this.slider.setHeight(sliderSize); - this.slider.setTop(sliderPosition); - } - _renderDomNode(largeSize, smallSize) { - this.domNode.setWidth(smallSize); - this.domNode.setHeight(largeSize); - this.domNode.setRight(0); - this.domNode.setTop(0); - } - onDidScroll(e) { - this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender; - this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender; - this._shouldRender = this._onElementSize(e.height) || this._shouldRender; - return this._shouldRender; - } - _mouseDownRelativePosition(offsetX, offsetY) { - return offsetY; - } - _sliderMousePosition(e) { - return e.posy; - } - _sliderOrthogonalMousePosition(e) { - return e.posx; - } - _updateScrollbarSize(size) { - this.slider.setWidth(size); - } - writeScrollPosition(target, scrollPosition) { - target.scrollTop = scrollPosition; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css ***! - \***********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./splitview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js ***! - \**********************************************************************************/ -/*! exports provided: Sizing, SplitView */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sizing", function() { return Sizing; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitView", function() { return SplitView; }); -/* harmony import */ var _splitview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./splitview.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sash/sash.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"); -/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - -const defaultStyles = { - separatorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].transparent -}; -class ViewItem { - constructor(container, view, size, disposable) { - this.container = container; - this.view = view; - this.disposable = disposable; - this._cachedVisibleSize = undefined; - if (typeof size === 'number') { - this._size = size; - this._cachedVisibleSize = undefined; - _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](container, 'visible'); - } - else { - this._size = 0; - this._cachedVisibleSize = size.cachedVisibleSize; - } - } - set size(size) { - this._size = size; - } - get size() { - return this._size; - } - get visible() { - return typeof this._cachedVisibleSize === 'undefined'; - } - setVisible(visible, size) { - if (visible === this.visible) { - return; - } - if (visible) { - this.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize); - this._cachedVisibleSize = undefined; - } - else { - this._cachedVisibleSize = typeof size === 'number' ? size : this.size; - this.size = 0; - } - _dom_js__WEBPACK_IMPORTED_MODULE_4__["toggleClass"](this.container, 'visible', visible); - if (this.view.setVisible) { - this.view.setVisible(visible); - } - } - get minimumSize() { return this.visible ? this.view.minimumSize : 0; } - get viewMinimumSize() { return this.view.minimumSize; } - get maximumSize() { return this.visible ? this.view.maximumSize : 0; } - get viewMaximumSize() { return this.view.maximumSize; } - get priority() { return this.view.priority; } - get snap() { return !!this.view.snap; } - set enabled(enabled) { - this.container.style.pointerEvents = enabled ? '' : 'none'; - } - layout(offset, layoutContext) { - this.layoutContainer(offset); - this.view.layout(this.size, offset, layoutContext); - } - dispose() { - this.disposable.dispose(); - return this.view; - } -} -class VerticalViewItem extends ViewItem { - layoutContainer(offset) { - this.container.style.top = `${offset}px`; - this.container.style.height = `${this.size}px`; - } -} -class HorizontalViewItem extends ViewItem { - layoutContainer(offset) { - this.container.style.left = `${offset}px`; - this.container.style.width = `${this.size}px`; - } -} -var State; -(function (State) { - State[State["Idle"] = 0] = "Idle"; - State[State["Busy"] = 1] = "Busy"; -})(State || (State = {})); -var Sizing; -(function (Sizing) { - Sizing.Distribute = { type: 'distribute' }; - function Split(index) { return { type: 'split', index }; } - Sizing.Split = Split; - function Invisible(cachedVisibleSize) { return { type: 'invisible', cachedVisibleSize }; } - Sizing.Invisible = Invisible; -})(Sizing || (Sizing = {})); -class SplitView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(container, options = {}) { - super(); - this.size = 0; - this.contentSize = 0; - this.proportions = undefined; - this.viewItems = []; - this.sashItems = []; - this.state = State.Idle; - this._onDidSashChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this.onDidSashChange = this._onDidSashChange.event; - this._onDidSashReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this._startSnappingEnabled = true; - this._endSnappingEnabled = true; - this.orientation = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](options.orientation) ? 0 /* VERTICAL */ : options.orientation; - this.inverseAltBehavior = !!options.inverseAltBehavior; - this.proportionalLayout = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](options.proportionalLayout) ? true : !!options.proportionalLayout; - this.el = document.createElement('div'); - _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, 'monaco-split-view2'); - _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, this.orientation === 0 /* VERTICAL */ ? 'vertical' : 'horizontal'); - container.appendChild(this.el); - this.sashContainer = _dom_js__WEBPACK_IMPORTED_MODULE_4__["append"](this.el, _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.sash-container')); - this.viewContainer = _dom_js__WEBPACK_IMPORTED_MODULE_4__["append"](this.el, _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.split-view-container')); - this.style(options.styles || defaultStyles); - // We have an existing set of view, add them now - if (options.descriptor) { - this.size = options.descriptor.size; - options.descriptor.views.forEach((viewDescriptor, index) => { - const sizing = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](viewDescriptor.visible) || viewDescriptor.visible ? viewDescriptor.size : { type: 'invisible', cachedVisibleSize: viewDescriptor.size }; - const view = viewDescriptor.view; - this.doAddView(view, sizing, index, true); - }); - // Initialize content size and proportions for first layout - this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - this.saveProportions(); - } - } - get orthogonalStartSash() { return this._orthogonalStartSash; } - set orthogonalStartSash(sash) { - for (const sashItem of this.sashItems) { - sashItem.sash.orthogonalStartSash = sash; - } - this._orthogonalStartSash = sash; - } - get orthogonalEndSash() { return this._orthogonalEndSash; } - set orthogonalEndSash(sash) { - for (const sashItem of this.sashItems) { - sashItem.sash.orthogonalEndSash = sash; - } - this._orthogonalEndSash = sash; - } - get startSnappingEnabled() { return this._startSnappingEnabled; } - set startSnappingEnabled(startSnappingEnabled) { - if (this._startSnappingEnabled === startSnappingEnabled) { - return; - } - this._startSnappingEnabled = startSnappingEnabled; - this.updateSashEnablement(); - } - get endSnappingEnabled() { return this._endSnappingEnabled; } - set endSnappingEnabled(endSnappingEnabled) { - if (this._endSnappingEnabled === endSnappingEnabled) { - return; - } - this._endSnappingEnabled = endSnappingEnabled; - this.updateSashEnablement(); - } - style(styles) { - if (styles.separatorBorder.isTransparent()) { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"](this.el, 'separator-border'); - this.el.style.removeProperty('--separator-border'); - } - else { - _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, 'separator-border'); - this.el.style.setProperty('--separator-border', styles.separatorBorder.toString()); - } - } - addView(view, size, index = this.viewItems.length, skipLayout) { - this.doAddView(view, size, index, skipLayout); - } - layout(size, layoutContext) { - const previousSize = Math.max(this.size, this.contentSize); - this.size = size; - this.layoutContext = layoutContext; - if (!this.proportions) { - const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length); - const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); - const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); - this.resize(this.viewItems.length - 1, size - previousSize, undefined, lowPriorityIndexes, highPriorityIndexes); - } - else { - for (let i = 0; i < this.viewItems.length; i++) { - const item = this.viewItems[i]; - item.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(Math.round(this.proportions[i] * size), item.minimumSize, item.maximumSize); - } - } - this.distributeEmptySpace(); - this.layoutViews(); - } - saveProportions() { - if (this.proportionalLayout && this.contentSize > 0) { - this.proportions = this.viewItems.map(i => i.size / this.contentSize); - } - } - onSashStart({ sash, start, alt }) { - for (const item of this.viewItems) { - item.enabled = false; - } - const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash); - // This way, we can press Alt while we resize a sash, macOS style! - const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(Object(_event_js__WEBPACK_IMPORTED_MODULE_9__["domEvent"])(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)), Object(_event_js__WEBPACK_IMPORTED_MODULE_9__["domEvent"])(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false))); - const resetSashDragState = (start, alt) => { - const sizes = this.viewItems.map(i => i.size); - let minDelta = Number.NEGATIVE_INFINITY; - let maxDelta = Number.POSITIVE_INFINITY; - if (this.inverseAltBehavior) { - alt = !alt; - } - if (alt) { - // When we're using the last sash with Alt, we're resizing - // the view to the left/up, instead of right/down as usual - // Thus, we must do the inverse of the usual - const isLastSash = index === this.sashItems.length - 1; - if (isLastSash) { - const viewItem = this.viewItems[index]; - minDelta = (viewItem.minimumSize - viewItem.size) / 2; - maxDelta = (viewItem.maximumSize - viewItem.size) / 2; - } - else { - const viewItem = this.viewItems[index + 1]; - minDelta = (viewItem.size - viewItem.maximumSize) / 2; - maxDelta = (viewItem.size - viewItem.minimumSize) / 2; - } - } - let snapBefore; - let snapAfter; - if (!alt) { - const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); - const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); - const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); - const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].viewMaximumSize - sizes[i]), 0); - const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); - const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0); - const minDelta = Math.max(minDeltaUp, minDeltaDown); - const maxDelta = Math.min(maxDeltaDown, maxDeltaUp); - const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); - const snapAfterIndex = this.findFirstSnapIndex(downIndexes); - if (typeof snapBeforeIndex === 'number') { - const viewItem = this.viewItems[snapBeforeIndex]; - const halfSize = Math.floor(viewItem.viewMinimumSize / 2); - snapBefore = { - index: snapBeforeIndex, - limitDelta: viewItem.visible ? minDelta - halfSize : minDelta + halfSize, - size: viewItem.size - }; - } - if (typeof snapAfterIndex === 'number') { - const viewItem = this.viewItems[snapAfterIndex]; - const halfSize = Math.floor(viewItem.viewMinimumSize / 2); - snapAfter = { - index: snapAfterIndex, - limitDelta: viewItem.visible ? maxDelta + halfSize : maxDelta - halfSize, - size: viewItem.size - }; - } - } - this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapBefore, snapAfter, disposable }; - }; - resetSashDragState(start, alt); - } - onSashChange({ current }) { - const { index, start, sizes, alt, minDelta, maxDelta, snapBefore, snapAfter } = this.sashDragState; - this.sashDragState.current = current; - const delta = current - start; - const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter); - if (alt) { - const isLastSash = index === this.sashItems.length - 1; - const newSizes = this.viewItems.map(i => i.size); - const viewItemIndex = isLastSash ? index : index + 1; - const viewItem = this.viewItems[viewItemIndex]; - const newMinDelta = viewItem.size - viewItem.maximumSize; - const newMaxDelta = viewItem.size - viewItem.minimumSize; - const resizeIndex = isLastSash ? index - 1 : index + 1; - this.resize(resizeIndex, -newDelta, newSizes, undefined, undefined, newMinDelta, newMaxDelta); - } - this.distributeEmptySpace(); - this.layoutViews(); - } - onSashEnd(index) { - this._onDidSashChange.fire(index); - this.sashDragState.disposable.dispose(); - this.saveProportions(); - for (const item of this.viewItems) { - item.enabled = true; - } - } - onViewChange(item, size) { - const index = this.viewItems.indexOf(item); - if (index < 0 || index >= this.viewItems.length) { - return; - } - size = typeof size === 'number' ? size : item.size; - size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, item.maximumSize); - if (this.inverseAltBehavior && index > 0) { - // In this case, we want the view to grow or shrink both sides equally - // so we just resize the "left" side by half and let `resize` do the clamping magic - this.resize(index - 1, Math.floor((item.size - size) / 2)); - this.distributeEmptySpace(); - this.layoutViews(); - } - else { - item.size = size; - this.relayout([index], undefined); - } - } - resizeView(index, size) { - if (this.state !== State.Idle) { - throw new Error('Cant modify splitview'); - } - this.state = State.Busy; - if (index < 0 || index >= this.viewItems.length) { - return; - } - const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length).filter(i => i !== index); - const lowPriorityIndexes = [...indexes.filter(i => this.viewItems[i].priority === 1 /* Low */), index]; - const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); - const item = this.viewItems[index]; - size = Math.round(size); - size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, Math.min(item.maximumSize, this.size)); - item.size = size; - this.relayout(lowPriorityIndexes, highPriorityIndexes); - this.state = State.Idle; - } - distributeViewSizes() { - const flexibleViewItems = []; - let flexibleSize = 0; - for (const item of this.viewItems) { - if (item.maximumSize - item.minimumSize > 0) { - flexibleViewItems.push(item); - flexibleSize += item.size; - } - } - const size = Math.floor(flexibleSize / flexibleViewItems.length); - for (const item of flexibleViewItems) { - item.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, item.maximumSize); - } - const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length); - const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); - const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); - this.relayout(lowPriorityIndexes, highPriorityIndexes); - } - getViewSize(index) { - if (index < 0 || index >= this.viewItems.length) { - return -1; - } - return this.viewItems[index].size; - } - doAddView(view, size, index = this.viewItems.length, skipLayout) { - if (this.state !== State.Idle) { - throw new Error('Cant modify splitview'); - } - this.state = State.Busy; - // Add view - const container = _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.split-view-view'); - if (index === this.viewItems.length) { - this.viewContainer.appendChild(container); - } - else { - this.viewContainer.insertBefore(container, this.viewContainer.children.item(index)); - } - const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size)); - const containerDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => this.viewContainer.removeChild(container)); - const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(onChangeDisposable, containerDisposable); - let viewSize; - if (typeof size === 'number') { - viewSize = size; - } - else if (size.type === 'split') { - viewSize = this.getViewSize(size.index) / 2; - } - else if (size.type === 'invisible') { - viewSize = { cachedVisibleSize: size.cachedVisibleSize }; - } - else { - viewSize = view.minimumSize; - } - const item = this.orientation === 0 /* VERTICAL */ - ? new VerticalViewItem(container, view, viewSize, disposable) - : new HorizontalViewItem(container, view, viewSize, disposable); - this.viewItems.splice(index, 0, item); - // Add sash - if (this.viewItems.length > 1) { - const sash = this.orientation === 0 /* VERTICAL */ - ? new _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__["Sash"](this.sashContainer, { getHorizontalSashTop: (sash) => this.getSashPosition(sash) }, { - orientation: 1 /* HORIZONTAL */, - orthogonalStartSash: this.orthogonalStartSash, - orthogonalEndSash: this.orthogonalEndSash - }) - : new _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__["Sash"](this.sashContainer, { getVerticalSashLeft: (sash) => this.getSashPosition(sash) }, { - orientation: 0 /* VERTICAL */, - orthogonalStartSash: this.orthogonalStartSash, - orthogonalEndSash: this.orthogonalEndSash - }); - const sashEventMapper = this.orientation === 0 /* VERTICAL */ - ? (e) => ({ sash, start: e.startY, current: e.currentY, alt: e.altKey }) - : (e) => ({ sash, start: e.startX, current: e.currentX, alt: e.altKey }); - const onStart = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidStart, sashEventMapper); - const onStartDisposable = onStart(this.onSashStart, this); - const onChange = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidChange, sashEventMapper); - const onChangeDisposable = onChange(this.onSashChange, this); - const onEnd = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidEnd, () => Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash)); - const onEndDisposable = onEnd(this.onSashEnd, this); - const onDidResetDisposable = sash.onDidReset(() => { - const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash); - const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); - const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); - const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); - const snapAfterIndex = this.findFirstSnapIndex(downIndexes); - if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) { - return; - } - if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) { - return; - } - this._onDidSashReset.fire(index); - }); - const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash); - const sashItem = { sash, disposable }; - this.sashItems.splice(index - 1, 0, sashItem); - } - container.appendChild(view.element); - let highPriorityIndexes; - if (typeof size !== 'number' && size.type === 'split') { - highPriorityIndexes = [size.index]; - } - if (!skipLayout) { - this.relayout([index], highPriorityIndexes); - } - this.state = State.Idle; - if (!skipLayout && typeof size !== 'number' && size.type === 'distribute') { - this.distributeViewSizes(); - } - } - relayout(lowPriorityIndexes, highPriorityIndexes) { - const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes); - this.distributeEmptySpace(); - this.layoutViews(); - this.saveProportions(); - } - resize(index, delta, sizes = this.viewItems.map(i => i.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) { - if (index < 0 || index >= this.viewItems.length) { - return 0; - } - const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); - const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); - if (highPriorityIndexes) { - for (const index of highPriorityIndexes) { - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(upIndexes, index); - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(downIndexes, index); - } - } - if (lowPriorityIndexes) { - for (const index of lowPriorityIndexes) { - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(upIndexes, index); - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(downIndexes, index); - } - } - const upItems = upIndexes.map(i => this.viewItems[i]); - const upSizes = upIndexes.map(i => sizes[i]); - const downItems = downIndexes.map(i => this.viewItems[i]); - const downSizes = downIndexes.map(i => sizes[i]); - const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); - const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0); - const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); - const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0); - const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta); - const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta); - let snapped = false; - if (snapBefore) { - const snapView = this.viewItems[snapBefore.index]; - const visible = delta >= snapBefore.limitDelta; - snapped = visible !== snapView.visible; - snapView.setVisible(visible, snapBefore.size); - } - if (!snapped && snapAfter) { - const snapView = this.viewItems[snapAfter.index]; - const visible = delta < snapAfter.limitDelta; - snapped = visible !== snapView.visible; - snapView.setVisible(visible, snapAfter.size); - } - if (snapped) { - return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta); - } - delta = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(delta, minDelta, maxDelta); - for (let i = 0, deltaUp = delta; i < upItems.length; i++) { - const item = upItems[i]; - const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(upSizes[i] + deltaUp, item.minimumSize, item.maximumSize); - const viewDelta = size - upSizes[i]; - deltaUp -= viewDelta; - item.size = size; - } - for (let i = 0, deltaDown = delta; i < downItems.length; i++) { - const item = downItems[i]; - const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(downSizes[i] - deltaDown, item.minimumSize, item.maximumSize); - const viewDelta = size - downSizes[i]; - deltaDown += viewDelta; - item.size = size; - } - return delta; - } - distributeEmptySpace(lowPriorityIndex) { - const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - let emptyDelta = this.size - contentSize; - const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length - 1, -1); - const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); - const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); - for (const index of highPriorityIndexes) { - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(indexes, index); - } - for (const index of lowPriorityIndexes) { - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(indexes, index); - } - if (typeof lowPriorityIndex === 'number') { - Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(indexes, lowPriorityIndex); - } - for (let i = 0; emptyDelta !== 0 && i < indexes.length; i++) { - const item = this.viewItems[indexes[i]]; - const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(item.size + emptyDelta, item.minimumSize, item.maximumSize); - const viewDelta = size - item.size; - emptyDelta -= viewDelta; - item.size = size; - } - } - layoutViews() { - // Save new content size - this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); - // Layout views - let offset = 0; - for (const viewItem of this.viewItems) { - viewItem.layout(offset, this.layoutContext); - offset += viewItem.size; - } - // Layout sashes - this.sashItems.forEach(item => item.sash.layout()); - this.updateSashEnablement(); - } - updateSashEnablement() { - let previous = false; - const collapsesDown = this.viewItems.map(i => previous = (i.size - i.minimumSize > 0) || previous); - previous = false; - const expandsDown = this.viewItems.map(i => previous = (i.maximumSize - i.size > 0) || previous); - const reverseViews = [...this.viewItems].reverse(); - previous = false; - const collapsesUp = reverseViews.map(i => previous = (i.size - i.minimumSize > 0) || previous).reverse(); - previous = false; - const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse(); - let position = 0; - for (let index = 0; index < this.sashItems.length; index++) { - const { sash } = this.sashItems[index]; - const viewItem = this.viewItems[index]; - position += viewItem.size; - const min = !(collapsesDown[index] && expandsUp[index + 1]); - const max = !(expandsDown[index] && collapsesUp[index + 1]); - if (min && max) { - const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); - const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); - const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); - const snapAfterIndex = this.findFirstSnapIndex(downIndexes); - const snappedBefore = typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible; - const snappedAfter = typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible; - if (snappedBefore && collapsesUp[index] && (position > 0 || this.startSnappingEnabled)) { - sash.state = 1 /* Minimum */; - } - else if (snappedAfter && collapsesDown[index] && (position < this.contentSize || this.endSnappingEnabled)) { - sash.state = 2 /* Maximum */; - } - else { - sash.state = 0 /* Disabled */; - } - } - else if (min && !max) { - sash.state = 1 /* Minimum */; - } - else if (!min && max) { - sash.state = 2 /* Maximum */; - } - else { - sash.state = 3 /* Enabled */; - } - } - } - getSashPosition(sash) { - let position = 0; - for (let i = 0; i < this.sashItems.length; i++) { - position += this.viewItems[i].size; - if (this.sashItems[i].sash === sash) { - return position; - } - } - return 0; - } - findFirstSnapIndex(indexes) { - // visible views first - for (const index of indexes) { - const viewItem = this.viewItems[index]; - if (!viewItem.visible) { - continue; - } - if (viewItem.snap) { - return index; - } - } - // then, hidden views - for (const index of indexes) { - const viewItem = this.viewItems[index]; - if (viewItem.visible && viewItem.maximumSize - viewItem.minimumSize > 0) { - return undefined; - } - if (!viewItem.visible && viewItem.snap) { - return index; - } - } - return undefined; - } - dispose() { - super.dispose(); - this.viewItems.forEach(i => i.dispose()); - this.viewItems = []; - this.sashItems.forEach(i => i.disposable.dispose()); - this.sashItems = []; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js ***! - \********************************************************************************/ -/*! exports provided: ComposedTreeDelegate, RenderIndentGuides, AbstractTree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComposedTreeDelegate", function() { return ComposedTreeDelegate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderIndentGuides", function() { return RenderIndentGuides; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractTree", function() { return AbstractTree; }); -/* harmony import */ var _media_tree_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/tree.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../list/listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); -/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../list/listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./indexTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); -/* harmony import */ var _common_collections_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/collections.js */ "./node_modules/monaco-editor/esm/vs/base/common/collections.js"); -/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./treeIcons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - -class TreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_9__["ElementsDragAndDropData"] { - constructor(data) { - super(data.elements.map(node => node.element)); - this.data = data; - } -} -function asTreeDragAndDropData(data) { - if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_9__["ElementsDragAndDropData"]) { - return new TreeElementsDragAndDropData(data); - } - return data; -} -class TreeNodeListDragAndDrop { - constructor(modelProvider, dnd) { - this.modelProvider = modelProvider; - this.dnd = dnd; - this.autoExpandDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - getDragURI(node) { - return this.dnd.getDragURI(node.element); - } - getDragLabel(nodes, originalEvent) { - if (this.dnd.getDragLabel) { - return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent); - } - return undefined; - } - onDragStart(data, originalEvent) { - if (this.dnd.onDragStart) { - this.dnd.onDragStart(asTreeDragAndDropData(data), originalEvent); - } - } - onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) { - const result = this.dnd.onDragOver(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); - const didChangeAutoExpandNode = this.autoExpandNode !== targetNode; - if (didChangeAutoExpandNode) { - this.autoExpandDisposable.dispose(); - this.autoExpandNode = targetNode; - } - if (typeof targetNode === 'undefined') { - return result; - } - if (didChangeAutoExpandNode && typeof result !== 'boolean' && result.autoExpand) { - this.autoExpandDisposable = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => { - const model = this.modelProvider(); - const ref = model.getNodeLocation(targetNode); - if (model.isCollapsed(ref)) { - model.setCollapsed(ref, false); - } - this.autoExpandNode = undefined; - }, 500); - } - if (typeof result === 'boolean' || !result.accept || typeof result.bubble === 'undefined' || result.feedback) { - if (!raw) { - const accept = typeof result === 'boolean' ? result : result.accept; - const effect = typeof result === 'boolean' ? undefined : result.effect; - return { accept, effect, feedback: [targetIndex] }; - } - return result; - } - if (result.bubble === 1 /* Up */) { - const model = this.modelProvider(); - const ref = model.getNodeLocation(targetNode); - const parentRef = model.getParentNodeLocation(ref); - const parentNode = model.getNode(parentRef); - const parentIndex = parentRef && model.getListIndex(parentRef); - return this.onDragOver(data, parentNode, parentIndex, originalEvent, false); - } - const model = this.modelProvider(); - const ref = model.getNodeLocation(targetNode); - const start = model.getListIndex(ref); - const length = model.getListRenderCount(ref); - return Object.assign(Object.assign({}, result), { feedback: Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["range"])(start, start + length) }); - } - drop(data, targetNode, targetIndex, originalEvent) { - this.autoExpandDisposable.dispose(); - this.autoExpandNode = undefined; - this.dnd.drop(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); - } - onDragEnd(originalEvent) { - if (this.dnd.onDragEnd) { - this.dnd.onDragEnd(originalEvent); - } - } -} -function asListOptions(modelProvider, options) { - return options && Object.assign(Object.assign({}, options), { identityProvider: options.identityProvider && { - getId(el) { - return options.identityProvider.getId(el.element); - } - }, dnd: options.dnd && new TreeNodeListDragAndDrop(modelProvider, options.dnd), multipleSelectionController: options.multipleSelectionController && { - isSelectionSingleChangeEvent(e) { - return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); - }, - isSelectionRangeChangeEvent(e) { - return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); - } - }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getSetSize(node) { - const model = modelProvider(); - const ref = model.getNodeLocation(node); - const parentRef = model.getParentNodeLocation(ref); - const parentNode = model.getNode(parentRef); - return parentNode.visibleChildrenCount; - }, - getPosInSet(node) { - return node.visibleChildIndex + 1; - }, isChecked: options.accessibilityProvider && options.accessibilityProvider.isChecked ? (node) => { - return options.accessibilityProvider.isChecked(node.element); - } : undefined, getRole: options.accessibilityProvider && options.accessibilityProvider.getRole ? (node) => { - return options.accessibilityProvider.getRole(node.element); - } : () => 'treeitem', getAriaLabel(e) { - return options.accessibilityProvider.getAriaLabel(e.element); - }, - getWidgetAriaLabel() { - return options.accessibilityProvider.getWidgetAriaLabel(); - }, getWidgetRole: options.accessibilityProvider && options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel(node) { - return node.depth; - }, getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => { - return options.accessibilityProvider.getActiveDescendantId(node.element); - }) }), keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(node) { - return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(node.element); - } }), enableKeyboardNavigation: options.simpleKeyboardNavigation }); -} -class ComposedTreeDelegate { - constructor(delegate) { - this.delegate = delegate; - } - getHeight(element) { - return this.delegate.getHeight(element.element); - } - getTemplateId(element) { - return this.delegate.getTemplateId(element.element); - } - hasDynamicHeight(element) { - return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element); - } - setDynamicHeight(element, height) { - if (this.delegate.setDynamicHeight) { - this.delegate.setDynamicHeight(element.element, height); - } - } -} -var RenderIndentGuides; -(function (RenderIndentGuides) { - RenderIndentGuides["None"] = "none"; - RenderIndentGuides["OnHover"] = "onHover"; - RenderIndentGuides["Always"] = "always"; -})(RenderIndentGuides || (RenderIndentGuides = {})); -class EventCollection { - constructor(onDidChange, _elements = []) { - this._elements = _elements; - this.onDidChange = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].forEach(onDidChange, elements => this._elements = elements); - } - get elements() { - return this._elements; - } -} -class TreeRenderer { - constructor(renderer, modelProvider, onDidChangeCollapseState, activeNodes, options = {}) { - this.renderer = renderer; - this.modelProvider = modelProvider; - this.activeNodes = activeNodes; - this.renderedElements = new Map(); - this.renderedNodes = new Map(); - this.indent = TreeRenderer.DefaultIndent; - this.hideTwistiesOfChildlessElements = false; - this.shouldRenderIndentGuides = false; - this.renderedIndentGuides = new _common_collections_js__WEBPACK_IMPORTED_MODULE_17__["SetMap"](); - this.activeIndentNodes = new Set(); - this.indentGuidesDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.templateId = renderer.templateId; - this.updateOptions(options); - _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(onDidChangeCollapseState, e => e.node)(this.onDidChangeNodeTwistieState, this, this.disposables); - if (renderer.onDidChangeTwistieState) { - renderer.onDidChangeTwistieState(this.onDidChangeTwistieState, this, this.disposables); - } - } - updateOptions(options = {}) { - if (typeof options.indent !== 'undefined') { - this.indent = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_16__["clamp"])(options.indent, 0, 40); - } - if (typeof options.renderIndentGuides !== 'undefined') { - const shouldRenderIndentGuides = options.renderIndentGuides !== RenderIndentGuides.None; - if (shouldRenderIndentGuides !== this.shouldRenderIndentGuides) { - this.shouldRenderIndentGuides = shouldRenderIndentGuides; - this.indentGuidesDisposable.dispose(); - if (shouldRenderIndentGuides) { - const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, disposables); - this.indentGuidesDisposable = disposables; - this._onDidChangeActiveNodes(this.activeNodes.elements); - } - } - } - if (typeof options.hideTwistiesOfChildlessElements !== 'undefined') { - this.hideTwistiesOfChildlessElements = options.hideTwistiesOfChildlessElements; - } - } - renderTemplate(container) { - const el = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-row')); - const indent = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-indent')); - const twistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-twistie')); - const contents = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-contents')); - const templateData = this.renderer.renderTemplate(contents); - return { container, indent, twistie, indentGuidesDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None, templateData }; - } - renderElement(node, index, templateData, height) { - if (typeof height === 'number') { - this.renderedNodes.set(node, { templateData, height }); - this.renderedElements.set(node.element, node); - } - const indent = TreeRenderer.DefaultIndent + (node.depth - 1) * this.indent; - templateData.twistie.style.paddingLeft = `${indent}px`; - templateData.indent.style.width = `${indent + this.indent - 16}px`; - this.renderTwistie(node, templateData); - if (typeof height === 'number') { - this.renderIndentGuides(node, templateData); - } - this.renderer.renderElement(node, index, templateData.templateData, height); - } - disposeElement(node, index, templateData, height) { - templateData.indentGuidesDisposable.dispose(); - if (this.renderer.disposeElement) { - this.renderer.disposeElement(node, index, templateData.templateData, height); - } - if (typeof height === 'number') { - this.renderedNodes.delete(node); - this.renderedElements.delete(node.element); - } - } - disposeTemplate(templateData) { - this.renderer.disposeTemplate(templateData.templateData); - } - onDidChangeTwistieState(element) { - const node = this.renderedElements.get(element); - if (!node) { - return; - } - this.onDidChangeNodeTwistieState(node); - } - onDidChangeNodeTwistieState(node) { - const data = this.renderedNodes.get(node); - if (!data) { - return; - } - this.renderTwistie(node, data.templateData); - this._onDidChangeActiveNodes(this.activeNodes.elements); - this.renderIndentGuides(node, data.templateData); - } - renderTwistie(node, templateData) { - if (this.renderer.renderTwistie) { - this.renderer.renderTwistie(node.element, templateData.twistie); - } - if (node.collapsible && (!this.hideTwistiesOfChildlessElements || node.visibleChildrenCount > 0)) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(templateData.twistie, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeItemExpandedIcon"].classNames, 'collapsible'); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(templateData.twistie, 'collapsed', node.collapsed); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(templateData.twistie, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeItemExpandedIcon"].classNames, 'collapsible', 'collapsed'); - } - if (node.collapsible) { - templateData.container.setAttribute('aria-expanded', String(!node.collapsed)); - } - else { - templateData.container.removeAttribute('aria-expanded'); - } - } - renderIndentGuides(target, templateData) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"])(templateData.indent); - templateData.indentGuidesDisposable.dispose(); - if (!this.shouldRenderIndentGuides) { - return; - } - const disposableStore = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - const model = this.modelProvider(); - let node = target; - while (true) { - const ref = model.getNodeLocation(node); - const parentRef = model.getParentNodeLocation(ref); - if (!parentRef) { - break; - } - const parent = model.getNode(parentRef); - const guide = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.indent-guide', { style: `width: ${this.indent}px` }); - if (this.activeIndentNodes.has(parent)) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(guide, 'active'); - } - if (templateData.indent.childElementCount === 0) { - templateData.indent.appendChild(guide); - } - else { - templateData.indent.insertBefore(guide, templateData.indent.firstElementChild); - } - this.renderedIndentGuides.add(parent, guide); - disposableStore.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => this.renderedIndentGuides.delete(parent, guide))); - node = parent; - } - templateData.indentGuidesDisposable = disposableStore; - } - _onDidChangeActiveNodes(nodes) { - if (!this.shouldRenderIndentGuides) { - return; - } - const set = new Set(); - const model = this.modelProvider(); - nodes.forEach(node => { - const ref = model.getNodeLocation(node); - try { - const parentRef = model.getParentNodeLocation(ref); - if (node.collapsible && node.children.length > 0 && !node.collapsed) { - set.add(node); - } - else if (parentRef) { - set.add(model.getNode(parentRef)); - } - } - catch (_a) { - // noop - } - }); - this.activeIndentNodes.forEach(node => { - if (!set.has(node)) { - this.renderedIndentGuides.forEach(node, line => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(line, 'active')); - } - }); - set.forEach(node => { - if (!this.activeIndentNodes.has(node)) { - this.renderedIndentGuides.forEach(node, line => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(line, 'active')); - } - }); - this.activeIndentNodes = set; - } - dispose() { - this.renderedNodes.clear(); - this.renderedElements.clear(); - this.indentGuidesDisposable.dispose(); - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); - } -} -TreeRenderer.DefaultIndent = 8; -class TypeFilter { - constructor(tree, keyboardNavigationLabelProvider, _filter) { - this.tree = tree; - this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider; - this._filter = _filter; - this._totalCount = 0; - this._matchCount = 0; - this._pattern = ''; - this._lowercasePattern = ''; - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - tree.onWillRefilter(this.reset, this, this.disposables); - } - get totalCount() { return this._totalCount; } - get matchCount() { return this._matchCount; } - set pattern(pattern) { - this._pattern = pattern; - this._lowercasePattern = pattern.toLowerCase(); - } - filter(element, parentVisibility) { - if (this._filter) { - const result = this._filter.filter(element, parentVisibility); - if (this.tree.options.simpleKeyboardNavigation) { - return result; - } - let visibility; - if (typeof result === 'boolean') { - visibility = result ? 1 /* Visible */ : 0 /* Hidden */; - } - else if (Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__["isFilterResult"])(result)) { - visibility = Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__["getVisibleState"])(result.visibility); - } - else { - visibility = result; - } - if (visibility === 0 /* Hidden */) { - return false; - } - } - this._totalCount++; - if (this.tree.options.simpleKeyboardNavigation || !this._pattern) { - this._matchCount++; - return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; - } - const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(element); - const labelStr = label && label.toString(); - if (typeof labelStr === 'undefined') { - return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; - } - const score = Object(_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["fuzzyScore"])(this._pattern, this._lowercasePattern, 0, labelStr, labelStr.toLowerCase(), 0, true); - if (!score) { - if (this.tree.options.filterOnType) { - return 2 /* Recurse */; - } - else { - return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; - } - // DEMO: smarter filter ? - // return parentVisibility === TreeVisibility.Visible ? true : TreeVisibility.Recurse; - } - this._matchCount++; - return { data: score, visibility: true }; - } - reset() { - this._totalCount = 0; - this._matchCount = 0; - } - dispose() { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); - } -} -class TypeFilterController { - constructor(tree, model, view, filter, keyboardNavigationDelegate) { - this.tree = tree; - this.view = view; - this.filter = filter; - this.keyboardNavigationDelegate = keyboardNavigationDelegate; - this._enabled = false; - this._pattern = ''; - this._empty = false; - this._onDidChangeEmptyState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this.positionClassName = 'ne'; - this.automaticKeyboardNavigation = true; - this.triggered = false; - this._onDidChangePattern = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.domNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])(`.monaco-list-type-filter.${this.positionClassName}`); - this.domNode.draggable = true; - Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.domNode, 'dragstart')(this.onDragStart, this, this.disposables); - this.messageDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(view.getHTMLElement(), Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])(`.monaco-list-type-filter-message`)); - this.labelDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this.domNode, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('span.label')); - const controls = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this.domNode, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.controls')); - this._filterOnType = !!tree.options.filterOnType; - this.filterOnTypeDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(controls, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('input.filter')); - this.filterOnTypeDomNode.type = 'checkbox'; - this.filterOnTypeDomNode.checked = this._filterOnType; - this.filterOnTypeDomNode.tabIndex = -1; - this.updateFilterOnTypeTitleAndIcon(); - Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.filterOnTypeDomNode, 'input')(this.onDidChangeFilterOnType, this, this.disposables); - this.clearDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(controls, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('button.clear' + _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterClearIcon"].cssSelector)); - this.clearDomNode.tabIndex = -1; - this.clearDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('clear', "Clear"); - this.keyboardNavigationEventFilter = tree.options.keyboardNavigationEventFilter; - model.onDidSplice(this.onDidSpliceModel, this, this.disposables); - this.updateOptions(tree.options); - } - get enabled() { return this._enabled; } - get pattern() { return this._pattern; } - get filterOnType() { return this._filterOnType; } - updateOptions(options) { - if (options.simpleKeyboardNavigation) { - this.disable(); - } - else { - this.enable(); - } - if (typeof options.filterOnType !== 'undefined') { - this._filterOnType = !!options.filterOnType; - this.filterOnTypeDomNode.checked = this._filterOnType; - } - if (typeof options.automaticKeyboardNavigation !== 'undefined') { - this.automaticKeyboardNavigation = options.automaticKeyboardNavigation; - } - this.tree.refilter(); - this.render(); - if (!this.automaticKeyboardNavigation) { - this.onEventOrInput(''); - } - } - enable() { - if (this._enabled) { - return; - } - const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.getHTMLElement(), 'keydown')) - .filter(e => !Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.target) || e.target === this.filterOnTypeDomNode) - .filter(e => e.key !== 'Dead' && !/^Media/.test(e.key)) - .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e)) - .filter(this.keyboardNavigationEventFilter || (() => true)) - .filter(() => this.automaticKeyboardNavigation || this.triggered) - .filter(e => (this.keyboardNavigationDelegate.mightProducePrintableCharacter(e) && !(e.keyCode === 18 /* DownArrow */ || e.keyCode === 16 /* UpArrow */ || e.keyCode === 15 /* LeftArrow */ || e.keyCode === 17 /* RightArrow */)) || ((this.pattern.length > 0 || this.triggered) && ((e.keyCode === 9 /* Escape */ || e.keyCode === 1 /* Backspace */) && !e.altKey && !e.ctrlKey && !e.metaKey) || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__["isMacintosh"] ? (e.altKey && !e.metaKey) : e.ctrlKey) && !e.shiftKey))) - .forEach(e => { e.stopPropagation(); e.preventDefault(); }) - .event; - const onClear = Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.clearDomNode, 'click'); - _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].any(onKeyDown, onClear)) - .event(this.onEventOrInput, this, this.enabledDisposables); - this.filter.pattern = ''; - this.tree.refilter(); - this.render(); - this._enabled = true; - this.triggered = false; - } - disable() { - if (!this._enabled) { - return; - } - this.domNode.remove(); - this.enabledDisposables.clear(); - this.tree.refilter(); - this.render(); - this._enabled = false; - this.triggered = false; - } - onEventOrInput(e) { - if (typeof e === 'string') { - this.onInput(e); - } - else if (e instanceof MouseEvent || e.keyCode === 9 /* Escape */ || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__["isMacintosh"] ? e.altKey : e.ctrlKey))) { - this.onInput(''); - } - else if (e.keyCode === 1 /* Backspace */) { - this.onInput(this.pattern.length === 0 ? '' : this.pattern.substr(0, this.pattern.length - 1)); - } - else { - this.onInput(this.pattern + e.browserEvent.key); - } - } - onInput(pattern) { - const container = this.view.getHTMLElement(); - if (pattern && !this.domNode.parentElement) { - container.append(this.domNode); - } - else if (!pattern && this.domNode.parentElement) { - this.domNode.remove(); - this.tree.domFocus(); - } - this._pattern = pattern; - this._onDidChangePattern.fire(pattern); - this.filter.pattern = pattern; - this.tree.refilter(); - if (pattern) { - this.tree.focusNext(0, true, undefined, node => !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].isDefault(node.filterData)); - } - const focus = this.tree.getFocus(); - if (focus.length > 0) { - const element = focus[0]; - if (this.tree.getRelativeTop(element) === null) { - this.tree.reveal(element, 0.5); - } - } - this.render(); - if (!pattern) { - this.triggered = false; - } - } - onDragStart() { - const container = this.view.getHTMLElement(); - const { left } = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["getDomNodePagePosition"])(container); - const containerWidth = container.clientWidth; - const midContainerWidth = containerWidth / 2; - const width = this.domNode.clientWidth; - const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - let positionClassName = this.positionClassName; - const updatePosition = () => { - switch (positionClassName) { - case 'nw': - this.domNode.style.top = `4px`; - this.domNode.style.left = `4px`; - break; - case 'ne': - this.domNode.style.top = `4px`; - this.domNode.style.left = `${containerWidth - width - 6}px`; - break; - } - }; - const onDragOver = (event) => { - event.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome) - const x = event.screenX - left; - if (event.dataTransfer) { - event.dataTransfer.dropEffect = 'none'; - } - if (x < midContainerWidth) { - positionClassName = 'nw'; - } - else { - positionClassName = 'ne'; - } - updatePosition(); - }; - const onDragEnd = () => { - this.positionClassName = positionClassName; - this.domNode.className = `monaco-list-type-filter ${this.positionClassName}`; - this.domNode.style.top = ''; - this.domNode.style.left = ''; - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(disposables); - }; - updatePosition(); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.domNode, positionClassName); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(this.domNode, 'dragging'); - disposables.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.domNode, 'dragging'))); - Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(document, 'dragover')(onDragOver, null, disposables); - Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.domNode, 'dragend')(onDragEnd, null, disposables); - _dnd_js__WEBPACK_IMPORTED_MODULE_7__["StaticDND"].CurrentDragAndDropData = new _dnd_js__WEBPACK_IMPORTED_MODULE_7__["DragAndDropData"]('vscode-ui'); - disposables.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => _dnd_js__WEBPACK_IMPORTED_MODULE_7__["StaticDND"].CurrentDragAndDropData = undefined)); - } - onDidSpliceModel() { - if (!this._enabled || this.pattern.length === 0) { - return; - } - this.tree.refilter(); - this.render(); - } - onDidChangeFilterOnType() { - this.tree.updateOptions({ filterOnType: this.filterOnTypeDomNode.checked }); - this.tree.refilter(); - this.tree.domFocus(); - this.render(); - this.updateFilterOnTypeTitleAndIcon(); - } - updateFilterOnTypeTitleAndIcon() { - if (this.filterOnType) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOffIcon"].classNames); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOnIcon"].classNames); - this.filterOnTypeDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('disable filter on type', "Disable Filter on Type"); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOnIcon"].classNames); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOffIcon"].classNames); - this.filterOnTypeDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('enable filter on type', "Enable Filter on Type"); - } - } - render() { - const noMatches = this.filter.totalCount > 0 && this.filter.matchCount === 0; - if (this.pattern && this.tree.options.filterOnType && noMatches) { - this.messageDomNode.textContent = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('empty', "No elements found"); - this._empty = true; - } - else { - this.messageDomNode.innerText = ''; - this._empty = false; - } - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.domNode, 'no-matches', noMatches); - this.domNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('found', "Matched {0} out of {1} elements", this.filter.matchCount, this.filter.totalCount); - this.labelDomNode.textContent = this.pattern.length > 16 ? '…' + this.pattern.substr(this.pattern.length - 16) : this.pattern; - this._onDidChangeEmptyState.fire(this._empty); - } - shouldAllowFocus(node) { - if (!this.enabled || !this.pattern || this.filterOnType) { - return true; - } - if (this.filter.totalCount > 0 && this.filter.matchCount <= 1) { - return true; - } - return !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].isDefault(node.filterData); - } - dispose() { - if (this._enabled) { - this.domNode.remove(); - this.enabledDisposables.dispose(); - this._enabled = false; - this.triggered = false; - } - this._onDidChangePattern.dispose(); - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); - } -} -function asTreeMouseEvent(event) { - let target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Unknown; - if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasParentWithClass"])(event.browserEvent.target, 'monaco-tl-twistie', 'monaco-tl-row')) { - target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Twistie; - } - else if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasParentWithClass"])(event.browserEvent.target, 'monaco-tl-contents', 'monaco-tl-row')) { - target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Element; - } - return { - browserEvent: event.browserEvent, - element: event.element ? event.element.element : null, - target - }; -} -function dfs(node, fn) { - fn(node); - node.children.forEach(child => dfs(child, fn)); -} -/** - * The trait concept needs to exist at the tree level, because collapsed - * tree nodes will not be known by the list. - */ -class Trait { - constructor(identityProvider) { - this.identityProvider = identityProvider; - this.nodes = []; - this._onDidChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this.onDidChange = this._onDidChange.event; - } - get nodeSet() { - if (!this._nodeSet) { - this._nodeSet = this.createNodeSet(); - } - return this._nodeSet; - } - set(nodes, browserEvent) { - if (Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["equals"])(this.nodes, nodes)) { - return; - } - this._set(nodes, false, browserEvent); - } - _set(nodes, silent, browserEvent) { - this.nodes = [...nodes]; - this.elements = undefined; - this._nodeSet = undefined; - if (!silent) { - const that = this; - this._onDidChange.fire({ get elements() { return that.get(); }, browserEvent }); - } - } - get() { - if (!this.elements) { - this.elements = this.nodes.map(node => node.element); - } - return [...this.elements]; - } - getNodes() { - return this.nodes; - } - has(node) { - return this.nodeSet.has(node); - } - onDidModelSplice({ insertedNodes, deletedNodes }) { - if (!this.identityProvider) { - const set = this.createNodeSet(); - const visit = (node) => set.delete(node); - deletedNodes.forEach(node => dfs(node, visit)); - this.set([...set.values()]); - return; - } - const deletedNodesIdSet = new Set(); - const deletedNodesVisitor = (node) => deletedNodesIdSet.add(this.identityProvider.getId(node.element).toString()); - deletedNodes.forEach(node => dfs(node, deletedNodesVisitor)); - const insertedNodesMap = new Map(); - const insertedNodesVisitor = (node) => insertedNodesMap.set(this.identityProvider.getId(node.element).toString(), node); - insertedNodes.forEach(node => dfs(node, insertedNodesVisitor)); - const nodes = []; - for (const node of this.nodes) { - const id = this.identityProvider.getId(node.element).toString(); - const wasDeleted = deletedNodesIdSet.has(id); - if (!wasDeleted) { - nodes.push(node); - } - else { - const insertedNode = insertedNodesMap.get(id); - if (insertedNode) { - nodes.push(insertedNode); - } - } - } - this._set(nodes, true); - } - createNodeSet() { - const set = new Set(); - for (const node of this.nodes) { - set.add(node); - } - return set; - } -} -class TreeNodeListMouseController extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["MouseController"] { - constructor(list, tree) { - super(list); - this.tree = tree; - } - onViewPointer(e) { - if (Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.browserEvent.target) || Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isMonacoEditor"])(e.browserEvent.target)) { - return; - } - const node = e.element; - if (!node) { - return super.onViewPointer(e); - } - if (this.isSelectionRangeChangeEvent(e) || this.isSelectionSingleChangeEvent(e)) { - return super.onViewPointer(e); - } - const target = e.browserEvent.target; - const onTwistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'monaco-tl-twistie') - || (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'monaco-icon-label') && Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'folder-icon') && e.browserEvent.offsetX < 16); - let expandOnlyOnTwistieClick = false; - if (typeof this.tree.expandOnlyOnTwistieClick === 'function') { - expandOnlyOnTwistieClick = this.tree.expandOnlyOnTwistieClick(node.element); - } - else { - expandOnlyOnTwistieClick = !!this.tree.expandOnlyOnTwistieClick; - } - if (expandOnlyOnTwistieClick && !onTwistie) { - return super.onViewPointer(e); - } - if (this.tree.expandOnlyOnDoubleClick && e.browserEvent.detail !== 2 && !onTwistie) { - return super.onViewPointer(e); - } - if (node.collapsible) { - const model = this.tree.model; // internal - const location = model.getNodeLocation(node); - const recursive = e.browserEvent.altKey; - model.setCollapsed(location, undefined, recursive); - if (expandOnlyOnTwistieClick && onTwistie) { - return; - } - } - super.onViewPointer(e); - } - onDoubleClick(e) { - const onTwistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(e.browserEvent.target, 'monaco-tl-twistie'); - if (onTwistie) { - return; - } - super.onDoubleClick(e); - } -} -/** - * We use this List subclass to restore selection and focus as nodes - * get rendered in the list, possibly due to a node expand() call. - */ -class TreeNodeList extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["List"] { - constructor(user, container, virtualDelegate, renderers, focusTrait, selectionTrait, options) { - super(user, container, virtualDelegate, renderers, options); - this.focusTrait = focusTrait; - this.selectionTrait = selectionTrait; - } - createMouseController(options) { - return new TreeNodeListMouseController(this, options.tree); - } - splice(start, deleteCount, elements = []) { - super.splice(start, deleteCount, elements); - if (elements.length === 0) { - return; - } - const additionalFocus = []; - const additionalSelection = []; - elements.forEach((node, index) => { - if (this.focusTrait.has(node)) { - additionalFocus.push(start + index); - } - if (this.selectionTrait.has(node)) { - additionalSelection.push(start + index); - } - }); - if (additionalFocus.length > 0) { - super.setFocus(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["distinctES6"])([...super.getFocus(), ...additionalFocus])); - } - if (additionalSelection.length > 0) { - super.setSelection(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["distinctES6"])([...super.getSelection(), ...additionalSelection])); - } - } - setFocus(indexes, browserEvent, fromAPI = false) { - super.setFocus(indexes, browserEvent); - if (!fromAPI) { - this.focusTrait.set(indexes.map(i => this.element(i)), browserEvent); - } - } - setSelection(indexes, browserEvent, fromAPI = false) { - super.setSelection(indexes, browserEvent); - if (!fromAPI) { - this.selectionTrait.set(indexes.map(i => this.element(i)), browserEvent); - } - } -} -class AbstractTree { - constructor(user, container, delegate, renderers, _options = {}) { - this._options = _options; - this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["EventBufferer"](); - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._onWillRefilter = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this.onWillRefilter = this._onWillRefilter.event; - this._onDidUpdateOptions = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - const treeDelegate = new ComposedTreeDelegate(delegate); - const onDidChangeCollapseStateRelay = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Relay"](); - const onDidChangeActiveNodes = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Relay"](); - const activeNodes = new EventCollection(onDidChangeActiveNodes.event); - this.renderers = renderers.map(r => new TreeRenderer(r, () => this.model, onDidChangeCollapseStateRelay.event, activeNodes, _options)); - for (let r of this.renderers) { - this.disposables.add(r); - } - let filter; - if (_options.keyboardNavigationLabelProvider) { - filter = new TypeFilter(this, _options.keyboardNavigationLabelProvider, _options.filter); - _options = Object.assign(Object.assign({}, _options), { filter: filter }); // TODO need typescript help here - this.disposables.add(filter); - } - this.focus = new Trait(_options.identityProvider); - this.selection = new Trait(_options.identityProvider); - this.view = new TreeNodeList(user, container, treeDelegate, this.renderers, this.focus, this.selection, Object.assign(Object.assign({}, asListOptions(() => this.model, _options)), { tree: this })); - this.model = this.createModel(user, this.view, _options); - onDidChangeCollapseStateRelay.input = this.model.onDidChangeCollapseState; - const onDidModelSplice = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].forEach(this.model.onDidSplice, e => { - this.eventBufferer.bufferEvents(() => { - this.focus.onDidModelSplice(e); - this.selection.onDidModelSplice(e); - }); - }); - // Make sure the `forEach` always runs - onDidModelSplice(() => null, null, this.disposables); - // Active nodes can change when the model changes or when focus or selection change. - // We debounce it with 0 delay since these events may fire in the same stack and we only - // want to run this once. It also doesn't matter if it runs on the next tick since it's only - // a nice to have UI feature. - onDidChangeActiveNodes.input = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].any(onDidModelSplice, this.focus.onDidChange, this.selection.onDidChange)) - .debounce(() => null, 0) - .map(() => { - const set = new Set(); - for (const node of this.focus.getNodes()) { - set.add(node); - } - for (const node of this.selection.getNodes()) { - set.add(node); - } - return [...set.values()]; - }).event; - if (_options.keyboardSupport !== false) { - const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(this.view.onKeyDown) - .filter(e => !Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.target)) - .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e)); - onKeyDown.filter(e => e.keyCode === 15 /* LeftArrow */).on(this.onLeftArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 17 /* RightArrow */).on(this.onRightArrow, this, this.disposables); - onKeyDown.filter(e => e.keyCode === 10 /* Space */).on(this.onSpace, this, this.disposables); - } - if (_options.keyboardNavigationLabelProvider) { - const delegate = _options.keyboardNavigationDelegate || _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["DefaultKeyboardNavigationDelegate"]; - this.typeFilterController = new TypeFilterController(this, this.model, this.view, filter, delegate); - this.focusNavigationFilter = node => this.typeFilterController.shouldAllowFocus(node); - this.disposables.add(this.typeFilterController); - } - this.styleElement = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["createStyleSheet"])(this.view.getHTMLElement()); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.getHTMLElement(), 'always', this._options.renderIndentGuides === RenderIndentGuides.Always); - } - get onDidChangeFocus() { return this.eventBufferer.wrapEvent(this.focus.onDidChange); } - get onDidChangeSelection() { return this.eventBufferer.wrapEvent(this.selection.onDidChange); } - get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.view.onMouseDblClick, asTreeMouseEvent); } - get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.view.onPointer, asTreeMouseEvent); } - get onDidFocus() { return this.view.onDidFocus; } - get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; } - get expandOnlyOnDoubleClick() { var _a; return (_a = this._options.expandOnlyOnDoubleClick) !== null && _a !== void 0 ? _a : false; } - get expandOnlyOnTwistieClick() { return typeof this._options.expandOnlyOnTwistieClick === 'undefined' ? false : this._options.expandOnlyOnTwistieClick; } - get onDidDispose() { return this.view.onDidDispose; } - updateOptions(optionsUpdate = {}) { - this._options = Object.assign(Object.assign({}, this._options), optionsUpdate); - for (const renderer of this.renderers) { - renderer.updateOptions(optionsUpdate); - } - this.view.updateOptions({ - enableKeyboardNavigation: this._options.simpleKeyboardNavigation, - automaticKeyboardNavigation: this._options.automaticKeyboardNavigation, - smoothScrolling: this._options.smoothScrolling, - horizontalScrolling: this._options.horizontalScrolling - }); - if (this.typeFilterController) { - this.typeFilterController.updateOptions(this._options); - } - this._onDidUpdateOptions.fire(this._options); - Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.getHTMLElement(), 'always', this._options.renderIndentGuides === RenderIndentGuides.Always); - } - get options() { - return this._options; - } - // Widget - getHTMLElement() { - return this.view.getHTMLElement(); - } - get scrollTop() { - return this.view.scrollTop; - } - set scrollTop(scrollTop) { - this.view.scrollTop = scrollTop; - } - domFocus() { - this.view.domFocus(); - } - layout(height, width) { - this.view.layout(height, width); - } - style(styles) { - const suffix = `.${this.view.domId}`; - const content = []; - if (styles.treeIndentGuidesStroke) { - content.push(`.monaco-list${suffix}:hover .monaco-tl-indent > .indent-guide, .monaco-list${suffix}.always .monaco-tl-indent > .indent-guide { border-color: ${styles.treeIndentGuidesStroke.transparent(0.4)}; }`); - content.push(`.monaco-list${suffix} .monaco-tl-indent > .indent-guide.active { border-color: ${styles.treeIndentGuidesStroke}; }`); - } - const newStyles = content.join('\n'); - if (newStyles !== this.styleElement.innerHTML) { - this.styleElement.innerHTML = newStyles; - } - this.view.style(styles); - } - collapse(location, recursive = false) { - return this.model.setCollapsed(location, true, recursive); - } - expand(location, recursive = false) { - return this.model.setCollapsed(location, false, recursive); - } - isCollapsible(location) { - return this.model.isCollapsible(location); - } - setCollapsible(location, collapsible) { - return this.model.setCollapsible(location, collapsible); - } - isCollapsed(location) { - return this.model.isCollapsed(location); - } - refilter() { - this._onWillRefilter.fire(undefined); - this.model.refilter(); - } - setSelection(elements, browserEvent) { - const nodes = elements.map(e => this.model.getNode(e)); - this.selection.set(nodes, browserEvent); - const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1); - this.view.setSelection(indexes, browserEvent, true); - } - getSelection() { - return this.selection.get(); - } - setFocus(elements, browserEvent) { - const nodes = elements.map(e => this.model.getNode(e)); - this.focus.set(nodes, browserEvent); - const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1); - this.view.setFocus(indexes, browserEvent, true); - } - focusNext(n = 1, loop = false, browserEvent, filter = this.focusNavigationFilter) { - this.view.focusNext(n, loop, browserEvent, filter); - } - getFocus() { - return this.focus.get(); - } - reveal(location, relativeTop) { - this.model.expandTo(location); - const index = this.model.getListIndex(location); - if (index === -1) { - return; - } - this.view.reveal(index, relativeTop); - } - /** - * Returns the relative position of an element rendered in the list. - * Returns `null` if the element isn't *entirely* in the visible viewport. - */ - getRelativeTop(location) { - const index = this.model.getListIndex(location); - if (index === -1) { - return null; - } - return this.view.getRelativeTop(index); - } - // List - onLeftArrow(e) { - e.preventDefault(); - e.stopPropagation(); - const nodes = this.view.getFocusedElements(); - if (nodes.length === 0) { - return; - } - const node = nodes[0]; - const location = this.model.getNodeLocation(node); - const didChange = this.model.setCollapsed(location, true); - if (!didChange) { - const parentLocation = this.model.getParentNodeLocation(location); - if (!parentLocation) { - return; - } - const parentListIndex = this.model.getListIndex(parentLocation); - this.view.reveal(parentListIndex); - this.view.setFocus([parentListIndex]); - } - } - onRightArrow(e) { - e.preventDefault(); - e.stopPropagation(); - const nodes = this.view.getFocusedElements(); - if (nodes.length === 0) { - return; - } - const node = nodes[0]; - const location = this.model.getNodeLocation(node); - const didChange = this.model.setCollapsed(location, false); - if (!didChange) { - if (!node.children.some(child => child.visible)) { - return; - } - const [focusedIndex] = this.view.getFocus(); - const firstChildIndex = focusedIndex + 1; - this.view.reveal(firstChildIndex); - this.view.setFocus([firstChildIndex]); - } - } - onSpace(e) { - e.preventDefault(); - e.stopPropagation(); - const nodes = this.view.getFocusedElements(); - if (nodes.length === 0) { - return; - } - const node = nodes[0]; - const location = this.model.getNodeLocation(node); - const recursive = e.browserEvent.altKey; - this.model.setCollapsed(location, undefined, recursive); - } - dispose() { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); - this.view.dispose(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js ***! - \*********************************************************************************/ -/*! exports provided: AsyncDataTree, CompressibleAsyncDataTree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncDataTree", function() { return AsyncDataTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressibleAsyncDataTree", function() { return CompressibleAsyncDataTree; }); -/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstractTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js"); -/* harmony import */ var _objectTree_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js"); -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../list/listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); -/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./indexTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"); -/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treeIcons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - -function createAsyncDataTreeNode(props) { - return Object.assign(Object.assign({}, props), { children: [], refreshPromise: undefined, stale: true, slow: false, collapsedByDefault: undefined }); -} -function isAncestor(ancestor, descendant) { - if (!descendant.parent) { - return false; - } - else if (descendant.parent === ancestor) { - return true; - } - else { - return isAncestor(ancestor, descendant.parent); - } -} -function intersects(node, other) { - return node === other || isAncestor(node, other) || isAncestor(other, node); -} -class AsyncDataTreeNodeWrapper { - constructor(node) { - this.node = node; - } - get element() { return this.node.element.element; } - get children() { return this.node.children.map(node => new AsyncDataTreeNodeWrapper(node)); } - get depth() { return this.node.depth; } - get visibleChildrenCount() { return this.node.visibleChildrenCount; } - get visibleChildIndex() { return this.node.visibleChildIndex; } - get collapsible() { return this.node.collapsible; } - get collapsed() { return this.node.collapsed; } - get visible() { return this.node.visible; } - get filterData() { return this.node.filterData; } -} -class AsyncDataTreeRenderer { - constructor(renderer, nodeMapper, onDidChangeTwistieState) { - this.renderer = renderer; - this.nodeMapper = nodeMapper; - this.onDidChangeTwistieState = onDidChangeTwistieState; - this.renderedNodes = new Map(); - this.templateId = renderer.templateId; - } - renderTemplate(container) { - const templateData = this.renderer.renderTemplate(container); - return { templateData }; - } - renderElement(node, index, templateData, height) { - this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height); - } - renderTwistie(element, twistieElement) { - if (element.slow) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["addClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["removeClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); - } - return false; - } - disposeElement(node, index, templateData, height) { - if (this.renderer.disposeElement) { - this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height); - } - } - disposeTemplate(templateData) { - this.renderer.disposeTemplate(templateData.templateData); - } - dispose() { - this.renderedNodes.clear(); - } -} -function asTreeEvent(e) { - return { - browserEvent: e.browserEvent, - elements: e.elements.map(e => e.element) - }; -} -function asTreeMouseEvent(e) { - return { - browserEvent: e.browserEvent, - element: e.element && e.element.element, - target: e.target - }; -} -class AsyncDataTreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_7__["ElementsDragAndDropData"] { - constructor(data) { - super(data.elements.map(node => node.element)); - this.data = data; - } -} -function asAsyncDataTreeDragAndDropData(data) { - if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_7__["ElementsDragAndDropData"]) { - return new AsyncDataTreeElementsDragAndDropData(data); - } - return data; -} -class AsyncDataTreeNodeListDragAndDrop { - constructor(dnd) { - this.dnd = dnd; - } - getDragURI(node) { - return this.dnd.getDragURI(node.element); - } - getDragLabel(nodes, originalEvent) { - if (this.dnd.getDragLabel) { - return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent); - } - return undefined; - } - onDragStart(data, originalEvent) { - if (this.dnd.onDragStart) { - this.dnd.onDragStart(asAsyncDataTreeDragAndDropData(data), originalEvent); - } - } - onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) { - return this.dnd.onDragOver(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); - } - drop(data, targetNode, targetIndex, originalEvent) { - this.dnd.drop(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); - } - onDragEnd(originalEvent) { - if (this.dnd.onDragEnd) { - this.dnd.onDragEnd(originalEvent); - } - } -} -function asObjectTreeOptions(options) { - return options && Object.assign(Object.assign({}, options), { collapseByDefault: true, identityProvider: options.identityProvider && { - getId(el) { - return options.identityProvider.getId(el.element); - } - }, dnd: options.dnd && new AsyncDataTreeNodeListDragAndDrop(options.dnd), multipleSelectionController: options.multipleSelectionController && { - isSelectionSingleChangeEvent(e) { - return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); - }, - isSelectionRangeChangeEvent(e) { - return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); - } - }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getPosInSet: undefined, getSetSize: undefined, getRole: options.accessibilityProvider.getRole ? (el) => { - return options.accessibilityProvider.getRole(el.element); - } : () => 'treeitem', isChecked: options.accessibilityProvider.isChecked ? (e) => { - var _a; - return !!((_a = options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.isChecked(e.element)); - } : undefined, getAriaLabel(e) { - return options.accessibilityProvider.getAriaLabel(e.element); - }, - getWidgetAriaLabel() { - return options.accessibilityProvider.getWidgetAriaLabel(); - }, getWidgetRole: options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel: options.accessibilityProvider.getAriaLevel && (node => { - return options.accessibilityProvider.getAriaLevel(node.element); - }), getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => { - return options.accessibilityProvider.getActiveDescendantId(node.element); - }) }), filter: options.filter && { - filter(e, parentVisibility) { - return options.filter.filter(e.element, parentVisibility); - } - }, keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(e) { - return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element); - } }), sorter: undefined, expandOnlyOnTwistieClick: typeof options.expandOnlyOnTwistieClick === 'undefined' ? undefined : (typeof options.expandOnlyOnTwistieClick !== 'function' ? options.expandOnlyOnTwistieClick : (e => options.expandOnlyOnTwistieClick(e.element))), additionalScrollHeight: options.additionalScrollHeight }); -} -function dfs(node, fn) { - fn(node); - node.children.forEach(child => dfs(child, fn)); -} -class AsyncDataTree { - constructor(user, container, delegate, renderers, dataSource, options = {}) { - this.user = user; - this.dataSource = dataSource; - this.nodes = new Map(); - this.subTreeRefreshPromises = new Map(); - this.refreshPromises = new Map(); - this._onDidRender = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this._onDidChangeNodeSlowState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); - this.nodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__["WeakMapper"](node => new AsyncDataTreeNodeWrapper(node)); - this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this.identityProvider = options.identityProvider; - this.autoExpandSingleChildren = typeof options.autoExpandSingleChildren === 'undefined' ? false : options.autoExpandSingleChildren; - this.sorter = options.sorter; - this.collapseByDefault = options.collapseByDefault; - this.tree = this.createTree(user, container, delegate, renderers, options); - this.root = createAsyncDataTreeNode({ - element: undefined, - parent: null, - hasChildren: true - }); - if (this.identityProvider) { - this.root = Object.assign(Object.assign({}, this.root), { id: null }); - } - this.nodes.set(null, this.root); - this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState, this, this.disposables); - } - get onDidChangeFocus() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onDidChangeFocus, asTreeEvent); } - get onDidChangeSelection() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onDidChangeSelection, asTreeEvent); } - get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onMouseDblClick, asTreeMouseEvent); } - get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onPointer, asTreeMouseEvent); } - get onDidFocus() { return this.tree.onDidFocus; } - get onDidDispose() { return this.tree.onDidDispose; } - createTree(user, container, delegate, renderers, options) { - const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__["ComposedTreeDelegate"](delegate); - const objectTreeRenderers = renderers.map(r => new AsyncDataTreeRenderer(r, this.nodeMapper, this._onDidChangeNodeSlowState.event)); - const objectTreeOptions = asObjectTreeOptions(options) || {}; - return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__["ObjectTree"](user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions); - } - updateOptions(options = {}) { - this.tree.updateOptions(options); - } - // Widget - getHTMLElement() { - return this.tree.getHTMLElement(); - } - get scrollTop() { - return this.tree.scrollTop; - } - set scrollTop(scrollTop) { - this.tree.scrollTop = scrollTop; - } - domFocus() { - this.tree.domFocus(); - } - layout(height, width) { - this.tree.layout(height, width); - } - style(styles) { - this.tree.style(styles); - } - // Model - getInput() { - return this.root.element; - } - setInput(input, viewState) { - return __awaiter(this, void 0, void 0, function* () { - this.refreshPromises.forEach(promise => promise.cancel()); - this.refreshPromises.clear(); - this.root.element = input; - const viewStateContext = viewState && { viewState, focus: [], selection: [] }; - yield this._updateChildren(input, true, false, viewStateContext); - if (viewStateContext) { - this.tree.setFocus(viewStateContext.focus); - this.tree.setSelection(viewStateContext.selection); - } - if (viewState && typeof viewState.scrollTop === 'number') { - this.scrollTop = viewState.scrollTop; - } - }); - } - _updateChildren(element = this.root.element, recursive = true, rerender = false, viewStateContext) { - return __awaiter(this, void 0, void 0, function* () { - if (typeof this.root.element === 'undefined') { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, 'Tree input not set'); - } - if (this.root.refreshPromise) { - yield this.root.refreshPromise; - yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); - } - const node = this.getDataNode(element); - yield this.refreshAndRenderNode(node, recursive, viewStateContext); - if (rerender) { - try { - this.tree.rerender(node); - } - catch (_a) { - // missing nodes are fine, this could've resulted from - // parallel refresh calls, removing `node` altogether - } - } - }); - } - // View - rerender(element) { - if (element === undefined || element === this.root.element) { - this.tree.rerender(); - return; - } - const node = this.getDataNode(element); - this.tree.rerender(node); - } - collapse(element, recursive = false) { - const node = this.getDataNode(element); - return this.tree.collapse(node === this.root ? null : node, recursive); - } - expand(element, recursive = false) { - return __awaiter(this, void 0, void 0, function* () { - if (typeof this.root.element === 'undefined') { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, 'Tree input not set'); - } - if (this.root.refreshPromise) { - yield this.root.refreshPromise; - yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); - } - const node = this.getDataNode(element); - if (this.tree.hasElement(node) && !this.tree.isCollapsible(node)) { - return false; - } - if (node.refreshPromise) { - yield this.root.refreshPromise; - yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); - } - if (node !== this.root && !node.refreshPromise && !this.tree.isCollapsed(node)) { - return false; - } - const result = this.tree.expand(node === this.root ? null : node, recursive); - if (node.refreshPromise) { - yield this.root.refreshPromise; - yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); - } - return result; - }); - } - setSelection(elements, browserEvent) { - const nodes = elements.map(e => this.getDataNode(e)); - this.tree.setSelection(nodes, browserEvent); - } - getSelection() { - const nodes = this.tree.getSelection(); - return nodes.map(n => n.element); - } - setFocus(elements, browserEvent) { - const nodes = elements.map(e => this.getDataNode(e)); - this.tree.setFocus(nodes, browserEvent); - } - getFocus() { - const nodes = this.tree.getFocus(); - return nodes.map(n => n.element); - } - reveal(element, relativeTop) { - this.tree.reveal(this.getDataNode(element), relativeTop); - } - // Implementation - getDataNode(element) { - const node = this.nodes.get((element === this.root.element ? null : element)); - if (!node) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Data tree node not found: ${element}`); - } - return node; - } - refreshAndRenderNode(node, recursive, viewStateContext) { - return __awaiter(this, void 0, void 0, function* () { - yield this.refreshNode(node, recursive, viewStateContext); - this.render(node, viewStateContext); - }); - } - refreshNode(node, recursive, viewStateContext) { - return __awaiter(this, void 0, void 0, function* () { - let result; - this.subTreeRefreshPromises.forEach((refreshPromise, refreshNode) => { - if (!result && intersects(refreshNode, node)) { - result = refreshPromise.then(() => this.refreshNode(node, recursive, viewStateContext)); - } - }); - if (result) { - return result; - } - return this.doRefreshSubTree(node, recursive, viewStateContext); - }); - } - doRefreshSubTree(node, recursive, viewStateContext) { - return __awaiter(this, void 0, void 0, function* () { - let done; - node.refreshPromise = new Promise(c => done = c); - this.subTreeRefreshPromises.set(node, node.refreshPromise); - node.refreshPromise.finally(() => { - node.refreshPromise = undefined; - this.subTreeRefreshPromises.delete(node); - }); - try { - const childrenToRefresh = yield this.doRefreshNode(node, recursive, viewStateContext); - node.stale = false; - yield Promise.all(childrenToRefresh.map(child => this.doRefreshSubTree(child, recursive, viewStateContext))); - } - finally { - done(); - } - }); - } - doRefreshNode(node, recursive, viewStateContext) { - return __awaiter(this, void 0, void 0, function* () { - node.hasChildren = !!this.dataSource.hasChildren(node.element); - let childrenPromise; - if (!node.hasChildren) { - childrenPromise = Promise.resolve(_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].empty()); - } - else { - const slowTimeout = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_5__["timeout"])(800); - slowTimeout.then(() => { - node.slow = true; - this._onDidChangeNodeSlowState.fire(node); - }, _ => null); - childrenPromise = this.doGetChildren(node) - .finally(() => slowTimeout.cancel()); - } - try { - const children = yield childrenPromise; - return this.setChildren(node, children, recursive, viewStateContext); - } - catch (err) { - if (node !== this.root) { - this.tree.collapse(node === this.root ? null : node); - } - if (Object(_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["isPromiseCanceledError"])(err)) { - return []; - } - throw err; - } - finally { - if (node.slow) { - node.slow = false; - this._onDidChangeNodeSlowState.fire(node); - } - } - }); - } - doGetChildren(node) { - let result = this.refreshPromises.get(node); - if (result) { - return result; - } - result = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_5__["createCancelablePromise"])(() => __awaiter(this, void 0, void 0, function* () { - const children = yield this.dataSource.getChildren(node.element); - return this.processChildren(children); - })); - this.refreshPromises.set(node, result); - return result.finally(() => { this.refreshPromises.delete(node); }); - } - _onDidChangeCollapseState({ node, deep }) { - if (node.element === null) { - return; - } - if (!node.collapsed && node.element.stale) { - if (deep) { - this.collapse(node.element.element); - } - else { - this.refreshAndRenderNode(node.element, false) - .catch(_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"]); - } - } - } - setChildren(node, childrenElementsIterable, recursive, viewStateContext) { - const childrenElements = [...childrenElementsIterable]; - // perf: if the node was and still is a leaf, avoid all this hassle - if (node.children.length === 0 && childrenElements.length === 0) { - return []; - } - const nodesToForget = new Map(); - const childrenTreeNodesById = new Map(); - for (const child of node.children) { - nodesToForget.set(child.element, child); - if (this.identityProvider) { - const collapsed = this.tree.isCollapsed(child); - childrenTreeNodesById.set(child.id, { node: child, collapsed }); - } - } - const childrenToRefresh = []; - const children = childrenElements.map(element => { - const hasChildren = !!this.dataSource.hasChildren(element); - if (!this.identityProvider) { - const asyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, hasChildren }); - if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { - asyncDataTreeNode.collapsedByDefault = false; - childrenToRefresh.push(asyncDataTreeNode); - } - return asyncDataTreeNode; - } - const id = this.identityProvider.getId(element).toString(); - const result = childrenTreeNodesById.get(id); - if (result) { - const asyncDataTreeNode = result.node; - nodesToForget.delete(asyncDataTreeNode.element); - this.nodes.delete(asyncDataTreeNode.element); - this.nodes.set(element, asyncDataTreeNode); - asyncDataTreeNode.element = element; - asyncDataTreeNode.hasChildren = hasChildren; - if (recursive) { - if (result.collapsed) { - asyncDataTreeNode.children.forEach(node => dfs(node, node => this.nodes.delete(node.element))); - asyncDataTreeNode.children.splice(0, asyncDataTreeNode.children.length); - asyncDataTreeNode.stale = true; - } - else { - childrenToRefresh.push(asyncDataTreeNode); - } - } - else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { - asyncDataTreeNode.collapsedByDefault = false; - childrenToRefresh.push(asyncDataTreeNode); - } - return asyncDataTreeNode; - } - const childAsyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, id, hasChildren }); - if (viewStateContext && viewStateContext.viewState.focus && viewStateContext.viewState.focus.indexOf(id) > -1) { - viewStateContext.focus.push(childAsyncDataTreeNode); - } - if (viewStateContext && viewStateContext.viewState.selection && viewStateContext.viewState.selection.indexOf(id) > -1) { - viewStateContext.selection.push(childAsyncDataTreeNode); - } - if (viewStateContext && viewStateContext.viewState.expanded && viewStateContext.viewState.expanded.indexOf(id) > -1) { - childrenToRefresh.push(childAsyncDataTreeNode); - } - else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { - childAsyncDataTreeNode.collapsedByDefault = false; - childrenToRefresh.push(childAsyncDataTreeNode); - } - return childAsyncDataTreeNode; - }); - for (const node of nodesToForget.values()) { - dfs(node, node => this.nodes.delete(node.element)); - } - for (const child of children) { - this.nodes.set(child.element, child); - } - node.children.splice(0, node.children.length, ...children); - // TODO@joao this doesn't take filter into account - if (node !== this.root && this.autoExpandSingleChildren && children.length === 1 && childrenToRefresh.length === 0) { - children[0].collapsedByDefault = false; - childrenToRefresh.push(children[0]); - } - return childrenToRefresh; - } - render(node, viewStateContext) { - const children = node.children.map(node => this.asTreeElement(node, viewStateContext)); - this.tree.setChildren(node === this.root ? null : node, children); - if (node !== this.root) { - this.tree.setCollapsible(node, node.hasChildren); - } - this._onDidRender.fire(); - } - asTreeElement(node, viewStateContext) { - if (node.stale) { - return { - element: node, - collapsible: node.hasChildren, - collapsed: true - }; - } - let collapsed; - if (viewStateContext && viewStateContext.viewState.expanded && node.id && viewStateContext.viewState.expanded.indexOf(node.id) > -1) { - collapsed = false; - } - else { - collapsed = node.collapsedByDefault; - } - node.collapsedByDefault = undefined; - return { - element: node, - children: node.hasChildren ? _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].map(node.children, child => this.asTreeElement(child, viewStateContext)) : [], - collapsible: node.hasChildren, - collapsed - }; - } - processChildren(children) { - if (this.sorter) { - children = [...children].sort(this.sorter.compare.bind(this.sorter)); - } - return children; - } - dispose() { - this.disposables.dispose(); - } -} -class CompressibleAsyncDataTreeNodeWrapper { - constructor(node) { - this.node = node; - } - get element() { - return { - elements: this.node.element.elements.map(e => e.element), - incompressible: this.node.element.incompressible - }; - } - get children() { return this.node.children.map(node => new CompressibleAsyncDataTreeNodeWrapper(node)); } - get depth() { return this.node.depth; } - get visibleChildrenCount() { return this.node.visibleChildrenCount; } - get visibleChildIndex() { return this.node.visibleChildIndex; } - get collapsible() { return this.node.collapsible; } - get collapsed() { return this.node.collapsed; } - get visible() { return this.node.visible; } - get filterData() { return this.node.filterData; } -} -class CompressibleAsyncDataTreeRenderer { - constructor(renderer, nodeMapper, compressibleNodeMapperProvider, onDidChangeTwistieState) { - this.renderer = renderer; - this.nodeMapper = nodeMapper; - this.compressibleNodeMapperProvider = compressibleNodeMapperProvider; - this.onDidChangeTwistieState = onDidChangeTwistieState; - this.renderedNodes = new Map(); - this.disposables = []; - this.templateId = renderer.templateId; - } - renderTemplate(container) { - const templateData = this.renderer.renderTemplate(container); - return { templateData }; - } - renderElement(node, index, templateData, height) { - this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height); - } - renderCompressedElements(node, index, templateData, height) { - this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height); - } - renderTwistie(element, twistieElement) { - if (element.slow) { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["addClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); - } - else { - Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["removeClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); - } - return false; - } - disposeElement(node, index, templateData, height) { - if (this.renderer.disposeElement) { - this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height); - } - } - disposeCompressedElements(node, index, templateData, height) { - if (this.renderer.disposeCompressedElements) { - this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height); - } - } - disposeTemplate(templateData) { - this.renderer.disposeTemplate(templateData.templateData); - } - dispose() { - this.renderedNodes.clear(); - this.disposables = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this.disposables); - } -} -function asCompressibleObjectTreeOptions(options) { - const objectTreeOptions = options && asObjectTreeOptions(options); - return objectTreeOptions && Object.assign(Object.assign({}, objectTreeOptions), { keyboardNavigationLabelProvider: objectTreeOptions.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, objectTreeOptions.keyboardNavigationLabelProvider), { getCompressedNodeKeyboardNavigationLabel(els) { - return options.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(els.map(e => e.element)); - } }) }); -} -class CompressibleAsyncDataTree extends AsyncDataTree { - constructor(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, options = {}) { - super(user, container, virtualDelegate, renderers, dataSource, options); - this.compressionDelegate = compressionDelegate; - this.compressibleNodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__["WeakMapper"](node => new CompressibleAsyncDataTreeNodeWrapper(node)); - this.filter = options.filter; - } - createTree(user, container, delegate, renderers, options) { - const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__["ComposedTreeDelegate"](delegate); - const objectTreeRenderers = renderers.map(r => new CompressibleAsyncDataTreeRenderer(r, this.nodeMapper, () => this.compressibleNodeMapper, this._onDidChangeNodeSlowState.event)); - const objectTreeOptions = asCompressibleObjectTreeOptions(options) || {}; - return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__["CompressibleObjectTree"](user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions); - } - asTreeElement(node, viewStateContext) { - return Object.assign({ incompressible: this.compressionDelegate.isIncompressible(node.element) }, super.asTreeElement(node, viewStateContext)); - } - updateOptions(options = {}) { - this.tree.updateOptions(options); - } - render(node, viewStateContext) { - if (!this.identityProvider) { - return super.render(node, viewStateContext); - } - // Preserve traits across compressions. Hacky but does the trick. - // This is hard to fix properly since it requires rewriting the traits - // across trees and lists. Let's just keep it this way for now. - const getId = (element) => this.identityProvider.getId(element).toString(); - const getUncompressedIds = (nodes) => { - const result = new Set(); - for (const node of nodes) { - const compressedNode = this.tree.getCompressedTreeNode(node === this.root ? null : node); - if (!compressedNode.element) { - continue; - } - for (const node of compressedNode.element.elements) { - result.add(getId(node.element)); - } - } - return result; - }; - const oldSelection = getUncompressedIds(this.tree.getSelection()); - const oldFocus = getUncompressedIds(this.tree.getFocus()); - super.render(node, viewStateContext); - const selection = this.getSelection(); - let didChangeSelection = false; - const focus = this.getFocus(); - let didChangeFocus = false; - const visit = (node) => { - const compressedNode = node.element; - if (compressedNode) { - for (let i = 0; i < compressedNode.elements.length; i++) { - const id = getId(compressedNode.elements[i].element); - const element = compressedNode.elements[compressedNode.elements.length - 1].element; - // github.com/microsoft/vscode/issues/85938 - if (oldSelection.has(id) && selection.indexOf(element) === -1) { - selection.push(element); - didChangeSelection = true; - } - if (oldFocus.has(id) && focus.indexOf(element) === -1) { - focus.push(element); - didChangeFocus = true; - } - } - } - node.children.forEach(visit); - }; - visit(this.tree.getCompressedTreeNode(node === this.root ? null : node)); - if (didChangeSelection) { - this.setSelection(selection); - } - if (didChangeFocus) { - this.setFocus(focus); - } - } - // For compressed async data trees, `TreeVisibility.Recurse` doesn't currently work - // and we have to filter everything beforehand - // Related to #85193 and #85835 - processChildren(children) { - if (this.filter) { - children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].filter(children, e => { - const result = this.filter.filter(e, 1 /* Visible */); - const visibility = getVisibility(result); - if (visibility === 2 /* Recurse */) { - throw new Error('Recursive tree visibility not supported in async data compressed trees'); - } - return visibility === 1 /* Visible */; - }); - } - return super.processChildren(children); - } -} -function getVisibility(filterResult) { - if (typeof filterResult === 'boolean') { - return filterResult ? 1 /* Visible */ : 0 /* Hidden */; - } - else if (Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_10__["isFilterResult"])(filterResult)) { - return Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_10__["getVisibleState"])(filterResult.visibility); - } - else { - return Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_10__["getVisibleState"])(filterResult); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js ***! - \*********************************************************************************************/ -/*! exports provided: compress, decompress, CompressedObjectTreeModel, DefaultElementMapper, CompressibleObjectTreeModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compress", function() { return compress; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decompress", function() { return decompress; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressedObjectTreeModel", function() { return CompressedObjectTreeModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultElementMapper", function() { return DefaultElementMapper; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressibleObjectTreeModel", function() { return CompressibleObjectTreeModel; }); -/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); -/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./objectTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -function noCompress(element) { - const elements = [element.element]; - const incompressible = element.incompressible || false; - return { - element: { elements, incompressible }, - children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].from(element.children), noCompress), - collapsible: element.collapsible, - collapsed: element.collapsed - }; -} -// Exported only for test reasons, do not use directly -function compress(element) { - const elements = [element.element]; - const incompressible = element.incompressible || false; - let childrenIterator; - let children; - while (true) { - [children, childrenIterator] = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].consume(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].from(element.children), 2); - if (children.length !== 1) { - break; - } - element = children[0]; - if (element.incompressible) { - break; - } - elements.push(element.element); - } - return { - element: { elements, incompressible }, - children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].concat(children, childrenIterator), compress), - collapsible: element.collapsible, - collapsed: element.collapsed - }; -} -function _decompress(element, index = 0) { - let children; - if (index < element.element.elements.length - 1) { - children = [_decompress(element, index + 1)]; - } - else { - children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].from(element.children), el => _decompress(el, 0)); - } - if (index === 0 && element.element.incompressible) { - return { - element: element.element.elements[index], - children, - incompressible: true, - collapsible: element.collapsible, - collapsed: element.collapsed - }; - } - return { - element: element.element.elements[index], - children, - collapsible: element.collapsible, - collapsed: element.collapsed - }; -} -// Exported only for test reasons, do not use directly -function decompress(element) { - return _decompress(element, 0); -} -function splice(treeElement, element, children) { - if (treeElement.element === element) { - return Object.assign(Object.assign({}, treeElement), { children }); - } - return Object.assign(Object.assign({}, treeElement), { children: _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(_common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].from(treeElement.children), e => splice(e, element, children)) }); -} -// Exported only for test reasons, do not use directly -class CompressedObjectTreeModel { - constructor(user, list, options = {}) { - this.user = user; - this.rootRef = null; - this.nodes = new Map(); - this.model = new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__["ObjectTreeModel"](user, list, options); - this.enabled = typeof options.compressionEnabled === 'undefined' ? true : options.compressionEnabled; - } - get onDidSplice() { return this.model.onDidSplice; } - get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; } - get onDidChangeRenderNodeCount() { return this.model.onDidChangeRenderNodeCount; } - setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty()) { - if (element === null) { - const compressedChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(children, this.enabled ? compress : noCompress); - this._setChildren(null, compressedChildren); - return; - } - const compressedNode = this.nodes.get(element); - if (!compressedNode) { - throw new Error('Unknown compressed tree node'); - } - const node = this.model.getNode(compressedNode); - const compressedParentNode = this.model.getParentNodeLocation(compressedNode); - const parent = this.model.getNode(compressedParentNode); - const decompressedElement = decompress(node); - const splicedElement = splice(decompressedElement, element, children); - const recompressedElement = (this.enabled ? compress : noCompress)(splicedElement); - const parentChildren = parent.children - .map(child => child === node ? recompressedElement : child); - this._setChildren(parent.element, parentChildren); - } - setCompressionEnabled(enabled) { - if (enabled === this.enabled) { - return; - } - this.enabled = enabled; - const root = this.model.getNode(); - const rootChildren = root.children; - const decompressedRootChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(rootChildren, decompress); - const recompressedRootChildren = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(decompressedRootChildren, enabled ? compress : noCompress); - this._setChildren(null, recompressedRootChildren); - } - _setChildren(node, children) { - const insertedElements = new Set(); - const _onDidCreateNode = (node) => { - for (const element of node.element.elements) { - insertedElements.add(element); - this.nodes.set(element, node.element); - } - }; - const _onDidDeleteNode = (node) => { - for (const element of node.element.elements) { - if (!insertedElements.has(element)) { - this.nodes.delete(element); - } - } - }; - this.model.setChildren(node, children, _onDidCreateNode, _onDidDeleteNode); - } - has(element) { - return this.nodes.has(element); - } - getListIndex(location) { - const node = this.getCompressedNode(location); - return this.model.getListIndex(node); - } - getListRenderCount(location) { - const node = this.getCompressedNode(location); - return this.model.getListRenderCount(node); - } - getNode(location) { - if (typeof location === 'undefined') { - return this.model.getNode(); - } - const node = this.getCompressedNode(location); - return this.model.getNode(node); - } - // TODO: review this - getNodeLocation(node) { - const compressedNode = this.model.getNodeLocation(node); - if (compressedNode === null) { - return null; - } - return compressedNode.elements[compressedNode.elements.length - 1]; - } - // TODO: review this - getParentNodeLocation(location) { - const compressedNode = this.getCompressedNode(location); - const parentNode = this.model.getParentNodeLocation(compressedNode); - if (parentNode === null) { - return null; - } - return parentNode.elements[parentNode.elements.length - 1]; - } - isCollapsible(location) { - const compressedNode = this.getCompressedNode(location); - return this.model.isCollapsible(compressedNode); - } - setCollapsible(location, collapsible) { - const compressedNode = this.getCompressedNode(location); - return this.model.setCollapsible(compressedNode, collapsible); - } - isCollapsed(location) { - const compressedNode = this.getCompressedNode(location); - return this.model.isCollapsed(compressedNode); - } - setCollapsed(location, collapsed, recursive) { - const compressedNode = this.getCompressedNode(location); - return this.model.setCollapsed(compressedNode, collapsed, recursive); - } - expandTo(location) { - const compressedNode = this.getCompressedNode(location); - this.model.expandTo(compressedNode); - } - rerender(location) { - const compressedNode = this.getCompressedNode(location); - this.model.rerender(compressedNode); - } - refilter() { - this.model.refilter(); - } - getCompressedNode(element) { - if (element === null) { - return null; - } - const node = this.nodes.get(element); - if (!node) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Tree element not found: ${element}`); - } - return node; - } -} -const DefaultElementMapper = elements => elements[elements.length - 1]; -class CompressedTreeNodeWrapper { - constructor(unwrapper, node) { - this.unwrapper = unwrapper; - this.node = node; - } - get element() { return this.node.element === null ? null : this.unwrapper(this.node.element); } - get children() { return this.node.children.map(node => new CompressedTreeNodeWrapper(this.unwrapper, node)); } - get depth() { return this.node.depth; } - get visibleChildrenCount() { return this.node.visibleChildrenCount; } - get visibleChildIndex() { return this.node.visibleChildIndex; } - get collapsible() { return this.node.collapsible; } - get collapsed() { return this.node.collapsed; } - get visible() { return this.node.visible; } - get filterData() { return this.node.filterData; } -} -function mapList(nodeMapper, list) { - return { - splice(start, deleteCount, toInsert) { - list.splice(start, deleteCount, toInsert.map(node => nodeMapper.map(node))); - }, - updateElementHeight(index, height) { - list.updateElementHeight(index, height); - } - }; -} -function mapOptions(compressedNodeUnwrapper, options) { - return Object.assign(Object.assign({}, options), { sorter: options.sorter && { - compare(node, otherNode) { - return options.sorter.compare(node.elements[0], otherNode.elements[0]); - } - }, identityProvider: options.identityProvider && { - getId(node) { - return options.identityProvider.getId(compressedNodeUnwrapper(node)); - } - }, filter: options.filter && { - filter(node, parentVisibility) { - return options.filter.filter(compressedNodeUnwrapper(node), parentVisibility); - } - } }); -} -class CompressibleObjectTreeModel { - constructor(user, list, options = {}) { - this.rootRef = null; - this.elementMapper = options.elementMapper || DefaultElementMapper; - const compressedNodeUnwrapper = node => this.elementMapper(node.elements); - this.nodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__["WeakMapper"](node => new CompressedTreeNodeWrapper(compressedNodeUnwrapper, node)); - this.model = new CompressedObjectTreeModel(user, mapList(this.nodeMapper, list), mapOptions(compressedNodeUnwrapper, options)); - } - get onDidSplice() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_1__["Event"].map(this.model.onDidSplice, ({ insertedNodes, deletedNodes }) => ({ - insertedNodes: insertedNodes.map(node => this.nodeMapper.map(node)), - deletedNodes: deletedNodes.map(node => this.nodeMapper.map(node)), - })); - } - get onDidChangeCollapseState() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_1__["Event"].map(this.model.onDidChangeCollapseState, ({ node, deep }) => ({ - node: this.nodeMapper.map(node), - deep - })); - } - get onDidChangeRenderNodeCount() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_1__["Event"].map(this.model.onDidChangeRenderNodeCount, node => this.nodeMapper.map(node)); - } - setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty()) { - this.model.setChildren(element, children); - } - setCompressionEnabled(enabled) { - this.model.setCompressionEnabled(enabled); - } - has(location) { - return this.model.has(location); - } - getListIndex(location) { - return this.model.getListIndex(location); - } - getListRenderCount(location) { - return this.model.getListRenderCount(location); - } - getNode(location) { - return this.nodeMapper.map(this.model.getNode(location)); - } - getNodeLocation(node) { - return node.element; - } - getParentNodeLocation(location) { - return this.model.getParentNodeLocation(location); - } - isCollapsible(location) { - return this.model.isCollapsible(location); - } - setCollapsible(location, collapsed) { - return this.model.setCollapsible(location, collapsed); - } - isCollapsed(location) { - return this.model.isCollapsed(location); - } - setCollapsed(location, collapsed, recursive) { - return this.model.setCollapsed(location, collapsed, recursive); - } - expandTo(location) { - return this.model.expandTo(location); - } - rerender(location) { - return this.model.rerender(location); - } - refilter() { - return this.model.refilter(); - } - getCompressedTreeNode(location = null) { - return this.model.getNode(location); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js ***! - \****************************************************************************/ -/*! exports provided: DataTree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataTree", function() { return DataTree; }); -/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstractTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js"); -/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class DataTree extends _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__["AbstractTree"] { - constructor(user, container, delegate, renderers, dataSource, options = {}) { - super(user, container, delegate, renderers, options); - this.user = user; - this.dataSource = dataSource; - this.identityProvider = options.identityProvider; - } - createModel(user, view, options) { - return new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_1__["ObjectTreeModel"](user, view, options); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js ***! - \**********************************************************************************/ -/*! exports provided: isFilterResult, getVisibleState, IndexTreeModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFilterResult", function() { return isFilterResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVisibleState", function() { return getVisibleState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndexTreeModel", function() { return IndexTreeModel; }); -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -function isFilterResult(obj) { - return typeof obj === 'object' && 'visibility' in obj && 'data' in obj; -} -function getVisibleState(visibility) { - switch (visibility) { - case true: return 1 /* Visible */; - case false: return 0 /* Hidden */; - default: return visibility; - } -} -function isCollapsibleStateUpdate(update) { - return typeof update.collapsible === 'boolean'; -} -class IndexTreeModel { - constructor(user, list, rootElement, options = {}) { - this.user = user; - this.list = list; - this.rootRef = []; - this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["EventBufferer"](); - this._onDidChangeCollapseState = new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidChangeCollapseState = this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event); - this._onDidChangeRenderNodeCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidChangeRenderNodeCount = this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event); - this._onDidSplice = new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidSplice = this._onDidSplice.event; - this.collapseByDefault = typeof options.collapseByDefault === 'undefined' ? false : options.collapseByDefault; - this.filter = options.filter; - this.autoExpandSingleChildren = typeof options.autoExpandSingleChildren === 'undefined' ? false : options.autoExpandSingleChildren; - this.root = { - parent: undefined, - element: rootElement, - children: [], - depth: 0, - visibleChildrenCount: 0, - visibleChildIndex: -1, - collapsible: false, - collapsed: false, - renderNodeCount: 0, - visibility: 1 /* Visible */, - visible: true, - filterData: undefined - }; - } - splice(location, deleteCount, toInsert = _common_iterator_js__WEBPACK_IMPORTED_MODULE_3__["Iterable"].empty(), onDidCreateNode, onDidDeleteNode) { - if (location.length === 0) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__["TreeError"](this.user, 'Invalid tree location'); - } - const { parentNode, listIndex, revealed, visible } = this.getParentNodeWithListIndex(location); - const treeListElementsToInsert = []; - const nodesToInsertIterator = _common_iterator_js__WEBPACK_IMPORTED_MODULE_3__["Iterable"].map(toInsert, el => this.createTreeNode(el, parentNode, parentNode.visible ? 1 /* Visible */ : 0 /* Hidden */, revealed, treeListElementsToInsert, onDidCreateNode)); - const lastIndex = location[location.length - 1]; - // figure out what's the visible child start index right before the - // splice point - let visibleChildStartIndex = 0; - for (let i = lastIndex; i >= 0 && i < parentNode.children.length; i--) { - const child = parentNode.children[i]; - if (child.visible) { - visibleChildStartIndex = child.visibleChildIndex; - break; - } - } - const nodesToInsert = []; - let insertedVisibleChildrenCount = 0; - let renderNodeCount = 0; - for (const child of nodesToInsertIterator) { - nodesToInsert.push(child); - renderNodeCount += child.renderNodeCount; - if (child.visible) { - child.visibleChildIndex = visibleChildStartIndex + insertedVisibleChildrenCount++; - } - } - const deletedNodes = parentNode.children.splice(lastIndex, deleteCount, ...nodesToInsert); - // figure out what is the count of deleted visible children - let deletedVisibleChildrenCount = 0; - for (const child of deletedNodes) { - if (child.visible) { - deletedVisibleChildrenCount++; - } - } - // and adjust for all visible children after the splice point - if (deletedVisibleChildrenCount !== 0) { - for (let i = lastIndex + nodesToInsert.length; i < parentNode.children.length; i++) { - const child = parentNode.children[i]; - if (child.visible) { - child.visibleChildIndex -= deletedVisibleChildrenCount; - } - } - } - // update parent's visible children count - parentNode.visibleChildrenCount += insertedVisibleChildrenCount - deletedVisibleChildrenCount; - if (revealed && visible) { - const visibleDeleteCount = deletedNodes.reduce((r, node) => r + (node.visible ? node.renderNodeCount : 0), 0); - this._updateAncestorsRenderNodeCount(parentNode, renderNodeCount - visibleDeleteCount); - this.list.splice(listIndex, visibleDeleteCount, treeListElementsToInsert); - } - if (deletedNodes.length > 0 && onDidDeleteNode) { - const visit = (node) => { - onDidDeleteNode(node); - node.children.forEach(visit); - }; - deletedNodes.forEach(visit); - } - this._onDidSplice.fire({ insertedNodes: nodesToInsert, deletedNodes }); - let node = parentNode; - while (node) { - if (node.visibility === 2 /* Recurse */) { - this.refilter(); - break; - } - node = node.parent; - } - } - rerender(location) { - if (location.length === 0) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__["TreeError"](this.user, 'Invalid tree location'); - } - const { node, listIndex, revealed } = this.getTreeNodeWithListIndex(location); - if (node.visible && revealed) { - this.list.splice(listIndex, 1, [node]); - } - } - has(location) { - return this.hasTreeNode(location); - } - getListIndex(location) { - const { listIndex, visible, revealed } = this.getTreeNodeWithListIndex(location); - return visible && revealed ? listIndex : -1; - } - getListRenderCount(location) { - return this.getTreeNode(location).renderNodeCount; - } - isCollapsible(location) { - return this.getTreeNode(location).collapsible; - } - setCollapsible(location, collapsible) { - const node = this.getTreeNode(location); - if (typeof collapsible === 'undefined') { - collapsible = !node.collapsible; - } - const update = { collapsible }; - return this.eventBufferer.bufferEvents(() => this._setCollapseState(location, update)); - } - isCollapsed(location) { - return this.getTreeNode(location).collapsed; - } - setCollapsed(location, collapsed, recursive) { - const node = this.getTreeNode(location); - if (typeof collapsed === 'undefined') { - collapsed = !node.collapsed; - } - const update = { collapsed, recursive: recursive || false }; - return this.eventBufferer.bufferEvents(() => this._setCollapseState(location, update)); - } - _setCollapseState(location, update) { - const { node, listIndex, revealed } = this.getTreeNodeWithListIndex(location); - const result = this._setListNodeCollapseState(node, listIndex, revealed, update); - if (node !== this.root && this.autoExpandSingleChildren && result && !isCollapsibleStateUpdate(update) && node.collapsible && !node.collapsed && !update.recursive) { - let onlyVisibleChildIndex = -1; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (child.visible) { - if (onlyVisibleChildIndex > -1) { - onlyVisibleChildIndex = -1; - break; - } - else { - onlyVisibleChildIndex = i; - } - } - } - if (onlyVisibleChildIndex > -1) { - this._setCollapseState([...location, onlyVisibleChildIndex], update); - } - } - return result; - } - _setListNodeCollapseState(node, listIndex, revealed, update) { - const result = this._setNodeCollapseState(node, update, false); - if (!revealed || !node.visible || !result) { - return result; - } - const previousRenderNodeCount = node.renderNodeCount; - const toInsert = this.updateNodeAfterCollapseChange(node); - const deleteCount = previousRenderNodeCount - (listIndex === -1 ? 0 : 1); - this.list.splice(listIndex + 1, deleteCount, toInsert.slice(1)); - return result; - } - _setNodeCollapseState(node, update, deep) { - let result; - if (node === this.root) { - result = false; - } - else { - if (isCollapsibleStateUpdate(update)) { - result = node.collapsible !== update.collapsible; - node.collapsible = update.collapsible; - } - else if (!node.collapsible) { - result = false; - } - else { - result = node.collapsed !== update.collapsed; - node.collapsed = update.collapsed; - } - if (result) { - this._onDidChangeCollapseState.fire({ node, deep }); - } - } - if (!isCollapsibleStateUpdate(update) && update.recursive) { - for (const child of node.children) { - result = this._setNodeCollapseState(child, update, true) || result; - } - } - return result; - } - expandTo(location) { - this.eventBufferer.bufferEvents(() => { - let node = this.getTreeNode(location); - while (node.parent) { - node = node.parent; - location = location.slice(0, location.length - 1); - if (node.collapsed) { - this._setCollapseState(location, { collapsed: false, recursive: false }); - } - } - }); - } - refilter() { - const previousRenderNodeCount = this.root.renderNodeCount; - const toInsert = this.updateNodeAfterFilterChange(this.root); - this.list.splice(0, previousRenderNodeCount, toInsert); - } - createTreeNode(treeElement, parent, parentVisibility, revealed, treeListElements, onDidCreateNode) { - const node = { - parent, - element: treeElement.element, - children: [], - depth: parent.depth + 1, - visibleChildrenCount: 0, - visibleChildIndex: -1, - collapsible: typeof treeElement.collapsible === 'boolean' ? treeElement.collapsible : (typeof treeElement.collapsed !== 'undefined'), - collapsed: typeof treeElement.collapsed === 'undefined' ? this.collapseByDefault : treeElement.collapsed, - renderNodeCount: 1, - visibility: 1 /* Visible */, - visible: true, - filterData: undefined - }; - const visibility = this._filterNode(node, parentVisibility); - node.visibility = visibility; - if (revealed) { - treeListElements.push(node); - } - const childElements = treeElement.children || _common_iterator_js__WEBPACK_IMPORTED_MODULE_3__["Iterable"].empty(); - const childRevealed = revealed && visibility !== 0 /* Hidden */ && !node.collapsed; - const childNodes = _common_iterator_js__WEBPACK_IMPORTED_MODULE_3__["Iterable"].map(childElements, el => this.createTreeNode(el, node, visibility, childRevealed, treeListElements, onDidCreateNode)); - let visibleChildrenCount = 0; - let renderNodeCount = 1; - for (const child of childNodes) { - node.children.push(child); - renderNodeCount += child.renderNodeCount; - if (child.visible) { - child.visibleChildIndex = visibleChildrenCount++; - } - } - node.collapsible = node.collapsible || node.children.length > 0; - node.visibleChildrenCount = visibleChildrenCount; - node.visible = visibility === 2 /* Recurse */ ? visibleChildrenCount > 0 : (visibility === 1 /* Visible */); - if (!node.visible) { - node.renderNodeCount = 0; - if (revealed) { - treeListElements.pop(); - } - } - else if (!node.collapsed) { - node.renderNodeCount = renderNodeCount; - } - if (onDidCreateNode) { - onDidCreateNode(node); - } - return node; - } - updateNodeAfterCollapseChange(node) { - const previousRenderNodeCount = node.renderNodeCount; - const result = []; - this._updateNodeAfterCollapseChange(node, result); - this._updateAncestorsRenderNodeCount(node.parent, result.length - previousRenderNodeCount); - return result; - } - _updateNodeAfterCollapseChange(node, result) { - if (node.visible === false) { - return 0; - } - result.push(node); - node.renderNodeCount = 1; - if (!node.collapsed) { - for (const child of node.children) { - node.renderNodeCount += this._updateNodeAfterCollapseChange(child, result); - } - } - this._onDidChangeRenderNodeCount.fire(node); - return node.renderNodeCount; - } - updateNodeAfterFilterChange(node) { - const previousRenderNodeCount = node.renderNodeCount; - const result = []; - this._updateNodeAfterFilterChange(node, node.visible ? 1 /* Visible */ : 0 /* Hidden */, result); - this._updateAncestorsRenderNodeCount(node.parent, result.length - previousRenderNodeCount); - return result; - } - _updateNodeAfterFilterChange(node, parentVisibility, result, revealed = true) { - let visibility; - if (node !== this.root) { - visibility = this._filterNode(node, parentVisibility); - if (visibility === 0 /* Hidden */) { - node.visible = false; - node.renderNodeCount = 0; - return false; - } - if (revealed) { - result.push(node); - } - } - const resultStartLength = result.length; - node.renderNodeCount = node === this.root ? 0 : 1; - let hasVisibleDescendants = false; - if (!node.collapsed || visibility !== 0 /* Hidden */) { - let visibleChildIndex = 0; - for (const child of node.children) { - hasVisibleDescendants = this._updateNodeAfterFilterChange(child, visibility, result, revealed && !node.collapsed) || hasVisibleDescendants; - if (child.visible) { - child.visibleChildIndex = visibleChildIndex++; - } - } - node.visibleChildrenCount = visibleChildIndex; - } - else { - node.visibleChildrenCount = 0; - } - if (node !== this.root) { - node.visible = visibility === 2 /* Recurse */ ? hasVisibleDescendants : (visibility === 1 /* Visible */); - } - if (!node.visible) { - node.renderNodeCount = 0; - if (revealed) { - result.pop(); - } - } - else if (!node.collapsed) { - node.renderNodeCount += result.length - resultStartLength; - } - this._onDidChangeRenderNodeCount.fire(node); - return node.visible; - } - _updateAncestorsRenderNodeCount(node, diff) { - if (diff === 0) { - return; - } - while (node) { - node.renderNodeCount += diff; - this._onDidChangeRenderNodeCount.fire(node); - node = node.parent; - } - } - _filterNode(node, parentVisibility) { - const result = this.filter ? this.filter.filter(node.element, parentVisibility) : 1 /* Visible */; - if (typeof result === 'boolean') { - node.filterData = undefined; - return result ? 1 /* Visible */ : 0 /* Hidden */; - } - else if (isFilterResult(result)) { - node.filterData = result.data; - return getVisibleState(result.visibility); - } - else { - node.filterData = undefined; - return getVisibleState(result); - } - } - // cheap - hasTreeNode(location, node = this.root) { - if (!location || location.length === 0) { - return true; - } - const [index, ...rest] = location; - if (index < 0 || index > node.children.length) { - return false; - } - return this.hasTreeNode(rest, node.children[index]); - } - // cheap - getTreeNode(location, node = this.root) { - if (!location || location.length === 0) { - return node; - } - const [index, ...rest] = location; - if (index < 0 || index > node.children.length) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__["TreeError"](this.user, 'Invalid tree location'); - } - return this.getTreeNode(rest, node.children[index]); - } - // expensive - getTreeNodeWithListIndex(location) { - if (location.length === 0) { - return { node: this.root, listIndex: -1, revealed: true, visible: false }; - } - const { parentNode, listIndex, revealed, visible } = this.getParentNodeWithListIndex(location); - const index = location[location.length - 1]; - if (index < 0 || index > parentNode.children.length) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__["TreeError"](this.user, 'Invalid tree location'); - } - const node = parentNode.children[index]; - return { node, listIndex, revealed, visible: visible && node.visible }; - } - getParentNodeWithListIndex(location, node = this.root, listIndex = 0, revealed = true, visible = true) { - const [index, ...rest] = location; - if (index < 0 || index > node.children.length) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_0__["TreeError"](this.user, 'Invalid tree location'); - } - // TODO@joao perf! - for (let i = 0; i < index; i++) { - listIndex += node.children[i].renderNodeCount; - } - revealed = revealed && !node.collapsed; - visible = visible && node.visible; - if (rest.length === 0) { - return { parentNode: node, listIndex, revealed, visible }; - } - return this.getParentNodeWithListIndex(rest, node.children[index], listIndex + 1, revealed, visible); - } - getNode(location = []) { - return this.getTreeNode(location); - } - // TODO@joao perf! - getNodeLocation(node) { - const location = []; - let indexTreeNode = node; // typing woes - while (indexTreeNode.parent) { - location.push(indexTreeNode.parent.children.indexOf(indexTreeNode)); - indexTreeNode = indexTreeNode.parent; - } - return location.reverse(); - } - getParentNodeLocation(location) { - if (location.length === 0) { - return undefined; - } - else if (location.length === 1) { - return []; - } - else { - return Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["tail2"])(location)[0]; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css ***! - \*******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./tree.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_tree_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js ***! - \******************************************************************************/ -/*! exports provided: ObjectTree, CompressibleObjectTree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectTree", function() { return ObjectTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressibleObjectTree", function() { return CompressibleObjectTree; }); -/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js"); -/* harmony import */ var _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./objectTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js"); -/* harmony import */ var _compressedObjectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./compressedObjectTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js"); -/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - -class ObjectTree extends _abstractTree_js__WEBPACK_IMPORTED_MODULE_1__["AbstractTree"] { - constructor(user, container, delegate, renderers, options = {}) { - super(user, container, delegate, renderers, options); - } - get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; } - setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty()) { - this.model.setChildren(element, children); - } - rerender(element) { - if (element === undefined) { - this.view.rerender(); - return; - } - this.model.rerender(element); - } - hasElement(element) { - return this.model.has(element); - } - createModel(user, view, options) { - return new _objectTreeModel_js__WEBPACK_IMPORTED_MODULE_2__["ObjectTreeModel"](user, view, options); - } -} -class CompressibleRenderer { - constructor(_compressedTreeNodeProvider, renderer) { - this._compressedTreeNodeProvider = _compressedTreeNodeProvider; - this.renderer = renderer; - this.templateId = renderer.templateId; - if (renderer.onDidChangeTwistieState) { - this.onDidChangeTwistieState = renderer.onDidChangeTwistieState; - } - } - get compressedTreeNodeProvider() { - return this._compressedTreeNodeProvider(); - } - renderTemplate(container) { - const data = this.renderer.renderTemplate(container); - return { compressedTreeNode: undefined, data }; - } - renderElement(node, index, templateData, height) { - const compressedTreeNode = this.compressedTreeNodeProvider.getCompressedTreeNode(node.element); - if (compressedTreeNode.element.elements.length === 1) { - templateData.compressedTreeNode = undefined; - this.renderer.renderElement(node, index, templateData.data, height); - } - else { - templateData.compressedTreeNode = compressedTreeNode; - this.renderer.renderCompressedElements(compressedTreeNode, index, templateData.data, height); - } - } - disposeElement(node, index, templateData, height) { - if (templateData.compressedTreeNode) { - if (this.renderer.disposeCompressedElements) { - this.renderer.disposeCompressedElements(templateData.compressedTreeNode, index, templateData.data, height); - } - } - else { - if (this.renderer.disposeElement) { - this.renderer.disposeElement(node, index, templateData.data, height); - } - } - } - disposeTemplate(templateData) { - this.renderer.disposeTemplate(templateData.data); - } - renderTwistie(element, twistieElement) { - if (this.renderer.renderTwistie) { - this.renderer.renderTwistie(element, twistieElement); - } - } -} -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] -], CompressibleRenderer.prototype, "compressedTreeNodeProvider", null); -function asObjectTreeOptions(compressedTreeNodeProvider, options) { - return options && Object.assign(Object.assign({}, options), { keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && { - getKeyboardNavigationLabel(e) { - let compressedTreeNode; - try { - compressedTreeNode = compressedTreeNodeProvider().getCompressedTreeNode(e); - } - catch (_a) { - return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e); - } - if (compressedTreeNode.element.elements.length === 1) { - return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e); - } - else { - return options.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(compressedTreeNode.element.elements); - } - } - } }); -} -class CompressibleObjectTree extends ObjectTree { - constructor(user, container, delegate, renderers, options = {}) { - const compressedTreeNodeProvider = () => this; - const compressibleRenderers = renderers.map(r => new CompressibleRenderer(compressedTreeNodeProvider, r)); - super(user, container, delegate, compressibleRenderers, asObjectTreeOptions(compressedTreeNodeProvider, options)); - } - setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty()) { - this.model.setChildren(element, children); - } - createModel(user, view, options) { - return new _compressedObjectTreeModel_js__WEBPACK_IMPORTED_MODULE_3__["CompressibleObjectTreeModel"](user, view, options); - } - updateOptions(optionsUpdate = {}) { - super.updateOptions(optionsUpdate); - if (typeof optionsUpdate.compressionEnabled !== 'undefined') { - this.model.setCompressionEnabled(optionsUpdate.compressionEnabled); - } - } - getCompressedTreeNode(element = null) { - return this.model.getCompressedTreeNode(element); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js ***! - \***********************************************************************************/ -/*! exports provided: ObjectTreeModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectTreeModel", function() { return ObjectTreeModel; }); -/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./indexTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"); -/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class ObjectTreeModel { - constructor(user, list, options = {}) { - this.user = user; - this.rootRef = null; - this.nodes = new Map(); - this.nodesByIdentity = new Map(); - this.model = new _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_1__["IndexTreeModel"](user, list, null, options); - this.onDidSplice = this.model.onDidSplice; - this.onDidChangeCollapseState = this.model.onDidChangeCollapseState; - this.onDidChangeRenderNodeCount = this.model.onDidChangeRenderNodeCount; - if (options.sorter) { - this.sorter = { - compare(a, b) { - return options.sorter.compare(a.element, b.element); - } - }; - } - this.identityProvider = options.identityProvider; - } - setChildren(element, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty(), onDidCreateNode, onDidDeleteNode) { - const location = this.getElementLocation(element); - this._setChildren(location, this.preserveCollapseState(children), onDidCreateNode, onDidDeleteNode); - } - _setChildren(location, children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty(), onDidCreateNode, onDidDeleteNode) { - const insertedElements = new Set(); - const insertedElementIds = new Set(); - const _onDidCreateNode = (node) => { - if (node.element === null) { - return; - } - const tnode = node; - insertedElements.add(tnode.element); - this.nodes.set(tnode.element, tnode); - if (this.identityProvider) { - const id = this.identityProvider.getId(tnode.element).toString(); - insertedElementIds.add(id); - this.nodesByIdentity.set(id, tnode); - } - if (onDidCreateNode) { - onDidCreateNode(tnode); - } - }; - const _onDidDeleteNode = (node) => { - if (node.element === null) { - return; - } - const tnode = node; - if (!insertedElements.has(tnode.element)) { - this.nodes.delete(tnode.element); - } - if (this.identityProvider) { - const id = this.identityProvider.getId(tnode.element).toString(); - if (!insertedElementIds.has(id)) { - this.nodesByIdentity.delete(id); - } - } - if (onDidDeleteNode) { - onDidDeleteNode(tnode); - } - }; - this.model.splice([...location, 0], Number.MAX_VALUE, children, _onDidCreateNode, _onDidDeleteNode); - } - preserveCollapseState(elements = _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].empty()) { - if (this.sorter) { - elements = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["mergeSort"])([...elements], this.sorter.compare.bind(this.sorter)); - } - return _common_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].map(elements, treeElement => { - let node = this.nodes.get(treeElement.element); - if (!node && this.identityProvider) { - const id = this.identityProvider.getId(treeElement.element).toString(); - node = this.nodesByIdentity.get(id); - } - if (!node) { - return Object.assign(Object.assign({}, treeElement), { children: this.preserveCollapseState(treeElement.children) }); - } - const collapsible = typeof treeElement.collapsible === 'boolean' ? treeElement.collapsible : node.collapsible; - const collapsed = typeof treeElement.collapsed !== 'undefined' ? treeElement.collapsed : node.collapsed; - return Object.assign(Object.assign({}, treeElement), { collapsible, - collapsed, children: this.preserveCollapseState(treeElement.children) }); - }); - } - rerender(element) { - const location = this.getElementLocation(element); - this.model.rerender(location); - } - has(element) { - return this.nodes.has(element); - } - getListIndex(element) { - const location = this.getElementLocation(element); - return this.model.getListIndex(location); - } - getListRenderCount(element) { - const location = this.getElementLocation(element); - return this.model.getListRenderCount(location); - } - isCollapsible(element) { - const location = this.getElementLocation(element); - return this.model.isCollapsible(location); - } - setCollapsible(element, collapsible) { - const location = this.getElementLocation(element); - return this.model.setCollapsible(location, collapsible); - } - isCollapsed(element) { - const location = this.getElementLocation(element); - return this.model.isCollapsed(location); - } - setCollapsed(element, collapsed, recursive) { - const location = this.getElementLocation(element); - return this.model.setCollapsed(location, collapsed, recursive); - } - expandTo(element) { - const location = this.getElementLocation(element); - this.model.expandTo(location); - } - refilter() { - this.model.refilter(); - } - getNode(element = null) { - if (element === null) { - return this.model.getNode(this.model.rootRef); - } - const node = this.nodes.get(element); - if (!node) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Tree element not found: ${element}`); - } - return node; - } - getNodeLocation(node) { - return node.element; - } - getParentNodeLocation(element) { - if (element === null) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Invalid getParentNodeLocation call`); - } - const node = this.nodes.get(element); - if (!node) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Tree element not found: ${element}`); - } - const location = this.model.getNodeLocation(node); - const parentLocation = this.model.getParentNodeLocation(location); - const parent = this.model.getNode(parentLocation); - return parent.element; - } - getElementLocation(element) { - if (element === null) { - return []; - } - const node = this.nodes.get(element); - if (!node) { - throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Tree element not found: ${element}`); - } - return this.model.getNodeLocation(node); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js ***! - \************************************************************************/ -/*! exports provided: TreeMouseEventTarget, TreeError, WeakMapper */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeMouseEventTarget", function() { return TreeMouseEventTarget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeError", function() { return TreeError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WeakMapper", function() { return WeakMapper; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var TreeMouseEventTarget; -(function (TreeMouseEventTarget) { - TreeMouseEventTarget[TreeMouseEventTarget["Unknown"] = 0] = "Unknown"; - TreeMouseEventTarget[TreeMouseEventTarget["Twistie"] = 1] = "Twistie"; - TreeMouseEventTarget[TreeMouseEventTarget["Element"] = 2] = "Element"; -})(TreeMouseEventTarget || (TreeMouseEventTarget = {})); -class TreeError extends Error { - constructor(user, message) { - super(`TreeError [${user}] ${message}`); - } -} -class WeakMapper { - constructor(fn) { - this.fn = fn; - this._map = new WeakMap(); - } - map(key) { - let result = this._map.get(key); - if (!result) { - result = this.fn(key); - this._map.set(key, result); - } - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js ***! - \*****************************************************************************/ -/*! exports provided: treeItemExpandedIcon, treeFilterOnTypeOnIcon, treeFilterOnTypeOffIcon, treeFilterClearIcon, treeItemLoadingIcon */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeItemExpandedIcon", function() { return treeItemExpandedIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeFilterOnTypeOnIcon", function() { return treeFilterOnTypeOnIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeFilterOnTypeOffIcon", function() { return treeFilterOnTypeOffIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeFilterClearIcon", function() { return treeFilterClearIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeItemLoadingIcon", function() { return treeItemLoadingIcon; }); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const treeItemExpandedIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["registerIcon"])('tree-item-expanded', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["Codicon"].chevronDown); // collapsed is done with rotation -const treeFilterOnTypeOnIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["registerIcon"])('tree-filter-on-type-on', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["Codicon"].listFilter); -const treeFilterOnTypeOffIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["registerIcon"])('tree-filter-on-type-off', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["Codicon"].listSelection); -const treeFilterClearIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["registerIcon"])('tree-filter-clear', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["Codicon"].close); -const treeItemLoadingIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["registerIcon"])('tree-item-loading', _common_codicons_js__WEBPACK_IMPORTED_MODULE_0__["Codicon"].loading); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js ***! - \*********************************************************************/ -/*! exports provided: Widget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Widget", function() { return Widget; }); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class Widget extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - onclick(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].CLICK, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardMouseEvent"](e)))); - } - onmousedown(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].MOUSE_DOWN, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardMouseEvent"](e)))); - } - onmouseover(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].MOUSE_OVER, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardMouseEvent"](e)))); - } - onnonbubblingmouseout(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableNonBubblingMouseOutListener"](domNode, (e) => listener(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardMouseEvent"](e)))); - } - onkeydown(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].KEY_DOWN, (e) => listener(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__["StandardKeyboardEvent"](e)))); - } - onkeyup(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].KEY_UP, (e) => listener(new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_1__["StandardKeyboardEvent"](e)))); - } - oninput(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].INPUT, listener)); - } - onblur(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].BLUR, listener)); - } - onfocus(domNode, listener) { - this._register(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](domNode, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].FOCUS, listener)); - } - ignoreGesture(domNode) { - _touch_js__WEBPACK_IMPORTED_MODULE_4__["Gesture"].ignoreTarget(domNode); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/actions.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/actions.js ***! - \******************************************************************/ -/*! exports provided: Action, ActionRunner, Separator, SubmenuAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionRunner", function() { return ActionRunner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Separator", function() { return Separator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmenuAction", function() { return SubmenuAction; }); -/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -class Action extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor(id, label = '', cssClass = '', enabled = true, actionCallback) { - super(); - this._onDidChange = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._enabled = true; - this._checked = false; - this._id = id; - this._label = label; - this._cssClass = cssClass; - this._enabled = enabled; - this._actionCallback = actionCallback; - } - get id() { - return this._id; - } - get label() { - return this._label; - } - set label(value) { - this._setLabel(value); - } - _setLabel(value) { - if (this._label !== value) { - this._label = value; - this._onDidChange.fire({ label: value }); - } - } - get tooltip() { - return this._tooltip || ''; - } - set tooltip(value) { - this._setTooltip(value); - } - _setTooltip(value) { - if (this._tooltip !== value) { - this._tooltip = value; - this._onDidChange.fire({ tooltip: value }); - } - } - get class() { - return this._cssClass; - } - set class(value) { - this._setClass(value); - } - _setClass(value) { - if (this._cssClass !== value) { - this._cssClass = value; - this._onDidChange.fire({ class: value }); - } - } - get enabled() { - return this._enabled; - } - set enabled(value) { - this._setEnabled(value); - } - _setEnabled(value) { - if (this._enabled !== value) { - this._enabled = value; - this._onDidChange.fire({ enabled: value }); - } - } - get checked() { - return this._checked; - } - set checked(value) { - this._setChecked(value); - } - _setChecked(value) { - if (this._checked !== value) { - this._checked = value; - this._onDidChange.fire({ checked: value }); - } - } - run(event, _data) { - if (this._actionCallback) { - return this._actionCallback(event); - } - return Promise.resolve(true); - } -} -class ActionRunner extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor() { - super(...arguments); - this._onDidBeforeRun = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidBeforeRun = this._onDidBeforeRun.event; - this._onDidRun = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidRun = this._onDidRun.event; - } - run(action, context) { - return __awaiter(this, void 0, void 0, function* () { - if (!action.enabled) { - return Promise.resolve(null); - } - this._onDidBeforeRun.fire({ action: action }); - try { - const result = yield this.runAction(action, context); - this._onDidRun.fire({ action: action, result: result }); - } - catch (error) { - this._onDidRun.fire({ action: action, error: error }); - } - }); - } - runAction(action, context) { - const res = context ? action.run(context) : action.run(); - return Promise.resolve(res); - } -} -class Separator extends Action { - constructor(label) { - super(Separator.ID, label, label ? 'separator text' : 'separator'); - this.checked = false; - this.enabled = false; - } -} -Separator.ID = 'vs.actions.separator'; -class SubmenuAction extends Action { - constructor(id, label, _actions, cssClass) { - super(id, label, cssClass, true); - this._actions = _actions; - } - get actions() { - return Array.isArray(this._actions) ? this._actions : this._actions(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/arrays.js ***! - \*****************************************************************/ -/*! exports provided: tail, tail2, equals, binarySearch, findFirstInSorted, mergeSort, groupBy, coalesce, isFalsyOrEmpty, isNonEmptyArray, distinct, distinctES6, firstIndex, first, firstOrDefault, flatten, range, arrayInsert, pushToStart, pushToEnd, asArray */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tail", function() { return tail; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tail2", function() { return tail2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binarySearch", function() { return binarySearch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findFirstInSorted", function() { return findFirstInSorted; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeSort", function() { return mergeSort; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coalesce", function() { return coalesce; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFalsyOrEmpty", function() { return isFalsyOrEmpty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNonEmptyArray", function() { return isNonEmptyArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctES6", function() { return distinctES6; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstIndex", function() { return firstIndex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstOrDefault", function() { return firstOrDefault; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pushToStart", function() { return pushToStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pushToEnd", function() { return pushToEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asArray", function() { return asArray; }); -/** - * Returns the last element of an array. - * @param array The array. - * @param n Which element from the end (default is zero). - */ -function tail(array, n = 0) { - return array[array.length - (1 + n)]; -} -function tail2(arr) { - if (arr.length === 0) { - throw new Error('Invalid tail call'); - } - return [arr.slice(0, arr.length - 1), arr[arr.length - 1]]; -} -function equals(one, other, itemEquals = (a, b) => a === b) { - if (one === other) { - return true; - } - if (!one || !other) { - return false; - } - if (one.length !== other.length) { - return false; - } - for (let i = 0, len = one.length; i < len; i++) { - if (!itemEquals(one[i], other[i])) { - return false; - } - } - return true; -} -function binarySearch(array, key, comparator) { - let low = 0, high = array.length - 1; - while (low <= high) { - const mid = ((low + high) / 2) | 0; - const comp = comparator(array[mid], key); - if (comp < 0) { - low = mid + 1; - } - else if (comp > 0) { - high = mid - 1; - } - else { - return mid; - } - } - return -(low + 1); -} -/** - * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false - * are located before all elements where p(x) is true. - * @returns the least x for which p(x) is true or array.length if no element fullfills the given function. - */ -function findFirstInSorted(array, p) { - let low = 0, high = array.length; - if (high === 0) { - return 0; // no children - } - while (low < high) { - const mid = Math.floor((low + high) / 2); - if (p(array[mid])) { - high = mid; - } - else { - low = mid + 1; - } - } - return low; -} -/** - * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort` - * so only use this when actually needing stable sort. - */ -function mergeSort(data, compare) { - _sort(data, compare, 0, data.length - 1, []); - return data; -} -function _merge(a, compare, lo, mid, hi, aux) { - let leftIdx = lo, rightIdx = mid + 1; - for (let i = lo; i <= hi; i++) { - aux[i] = a[i]; - } - for (let i = lo; i <= hi; i++) { - if (leftIdx > mid) { - // left side consumed - a[i] = aux[rightIdx++]; - } - else if (rightIdx > hi) { - // right side consumed - a[i] = aux[leftIdx++]; - } - else if (compare(aux[rightIdx], aux[leftIdx]) < 0) { - // right element is less -> comes first - a[i] = aux[rightIdx++]; - } - else { - // left element comes first (less or equal) - a[i] = aux[leftIdx++]; - } - } -} -function _sort(a, compare, lo, hi, aux) { - if (hi <= lo) { - return; - } - const mid = lo + ((hi - lo) / 2) | 0; - _sort(a, compare, lo, mid, aux); - _sort(a, compare, mid + 1, hi, aux); - if (compare(a[mid], a[mid + 1]) <= 0) { - // left and right are sorted and if the last-left element is less - // or equals than the first-right element there is nothing else - // to do - return; - } - _merge(a, compare, lo, mid, hi, aux); -} -function groupBy(data, compare) { - const result = []; - let currentGroup = undefined; - for (const element of mergeSort(data.slice(0), compare)) { - if (!currentGroup || compare(currentGroup[0], element) !== 0) { - currentGroup = [element]; - result.push(currentGroup); - } - else { - currentGroup.push(element); - } - } - return result; -} -/** - * @returns New array with all falsy values removed. The original array IS NOT modified. - */ -function coalesce(array) { - return array.filter(e => !!e); -} -/** - * @returns false if the provided object is an array and not empty. - */ -function isFalsyOrEmpty(obj) { - return !Array.isArray(obj) || obj.length === 0; -} -function isNonEmptyArray(obj) { - return Array.isArray(obj) && obj.length > 0; -} -/** - * Removes duplicates from the given array. The optional keyFn allows to specify - * how elements are checked for equalness by returning a unique string for each. - */ -function distinct(array, keyFn) { - if (!keyFn) { - return array.filter((element, position) => { - return array.indexOf(element) === position; - }); - } - const seen = Object.create(null); - return array.filter((elem) => { - const key = keyFn(elem); - if (seen[key]) { - return false; - } - seen[key] = true; - return true; - }); -} -function distinctES6(array) { - const seen = new Set(); - return array.filter(element => { - if (seen.has(element)) { - return false; - } - seen.add(element); - return true; - }); -} -/** - * @deprecated ES6: use `Array.findIndex` - */ -function firstIndex(array, fn) { - for (let i = 0; i < array.length; i++) { - const element = array[i]; - if (fn(element)) { - return i; - } - } - return -1; -} -function first(array, fn, notFoundValue = undefined) { - const index = firstIndex(array, fn); - return index < 0 ? notFoundValue : array[index]; -} -function firstOrDefault(array, notFoundValue) { - return array.length > 0 ? array[0] : notFoundValue; -} -function flatten(arr) { - return [].concat(...arr); -} -function range(arg, to) { - let from = typeof to === 'number' ? arg : 0; - if (typeof to === 'number') { - from = arg; - } - else { - from = 0; - to = arg; - } - const result = []; - if (from <= to) { - for (let i = from; i < to; i++) { - result.push(i); - } - } - else { - for (let i = from; i > to; i--) { - result.push(i); - } - } - return result; -} -/** - * Insert `insertArr` inside `target` at `insertIndex`. - * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array - */ -function arrayInsert(target, insertIndex, insertArr) { - const before = target.slice(0, insertIndex); - const after = target.slice(insertIndex); - return before.concat(insertArr, after); -} -/** - * Pushes an element to the start of the array, if found. - */ -function pushToStart(arr, value) { - const index = arr.indexOf(value); - if (index > -1) { - arr.splice(index, 1); - arr.unshift(value); - } -} -/** - * Pushes an element to the end of the array, if found. - */ -function pushToEnd(arr, value) { - const index = arr.indexOf(value); - if (index > -1) { - arr.splice(index, 1); - arr.push(value); - } -} -function asArray(x) { - return Array.isArray(x) ? x : [x]; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/assert.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/assert.js ***! - \*****************************************************************/ -/*! exports provided: ok */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ok", function() { return ok; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value. - */ -function ok(value, message) { - if (!value) { - throw new Error(message ? `Assertion failed (${message})` : 'Assertion Failed'); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/async.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/async.js ***! - \****************************************************************/ -/*! exports provided: isThenable, createCancelablePromise, raceCancellation, Delayer, timeout, disposableTimeout, first, TimeoutTimer, IntervalTimer, RunOnceScheduler, runWhenIdle, IdleValue */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isThenable", function() { return isThenable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCancelablePromise", function() { return createCancelablePromise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "raceCancellation", function() { return raceCancellation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Delayer", function() { return Delayer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disposableTimeout", function() { return disposableTimeout; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutTimer", function() { return TimeoutTimer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntervalTimer", function() { return IntervalTimer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RunOnceScheduler", function() { return RunOnceScheduler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runWhenIdle", function() { return runWhenIdle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdleValue", function() { return IdleValue; }); -/* harmony import */ var _cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -function isThenable(obj) { - return obj && typeof obj.then === 'function'; -} -function createCancelablePromise(callback) { - const source = new _cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationTokenSource"](); - const thenable = callback(source.token); - const promise = new Promise((resolve, reject) => { - source.token.onCancellationRequested(() => { - reject(_errors_js__WEBPACK_IMPORTED_MODULE_1__["canceled"]()); - }); - Promise.resolve(thenable).then(value => { - source.dispose(); - resolve(value); - }, err => { - source.dispose(); - reject(err); - }); - }); - return new class { - cancel() { - source.cancel(); - } - then(resolve, reject) { - return promise.then(resolve, reject); - } - catch(reject) { - return this.then(undefined, reject); - } - finally(onfinally) { - return promise.finally(onfinally); - } - }; -} -function raceCancellation(promise, token, defaultValue) { - return Promise.race([promise, new Promise(resolve => token.onCancellationRequested(() => resolve(defaultValue)))]); -} -/** - * A helper to delay execution of a task that is being requested often. - * - * Following the throttler, now imagine the mail man wants to optimize the number of - * trips proactively. The trip itself can be long, so he decides not to make the trip - * as soon as a letter is submitted. Instead he waits a while, in case more - * letters are submitted. After said waiting period, if no letters were submitted, he - * decides to make the trip. Imagine that N more letters were submitted after the first - * one, all within a short period of time between each other. Even though N+1 - * submissions occurred, only 1 delivery was made. - * - * The delayer offers this behavior via the trigger() method, into which both the task - * to be executed and the waiting period (delay) must be passed in as arguments. Following - * the example: - * - * const delayer = new Delayer(WAITING_PERIOD); - * const letters = []; - * - * function letterReceived(l) { - * letters.push(l); - * delayer.trigger(() => { return makeTheTrip(); }); - * } - */ -class Delayer { - constructor(defaultDelay) { - this.defaultDelay = defaultDelay; - this.timeout = null; - this.completionPromise = null; - this.doResolve = null; - this.doReject = null; - this.task = null; - } - trigger(task, delay = this.defaultDelay) { - this.task = task; - this.cancelTimeout(); - if (!this.completionPromise) { - this.completionPromise = new Promise((c, e) => { - this.doResolve = c; - this.doReject = e; - }).then(() => { - this.completionPromise = null; - this.doResolve = null; - if (this.task) { - const task = this.task; - this.task = null; - return task(); - } - return undefined; - }); - } - this.timeout = setTimeout(() => { - this.timeout = null; - if (this.doResolve) { - this.doResolve(null); - } - }, delay); - return this.completionPromise; - } - isTriggered() { - return this.timeout !== null; - } - cancel() { - this.cancelTimeout(); - if (this.completionPromise) { - if (this.doReject) { - this.doReject(_errors_js__WEBPACK_IMPORTED_MODULE_1__["canceled"]()); - } - this.completionPromise = null; - } - } - cancelTimeout() { - if (this.timeout !== null) { - clearTimeout(this.timeout); - this.timeout = null; - } - } - dispose() { - this.cancelTimeout(); - } -} -function timeout(millis, token) { - if (!token) { - return createCancelablePromise(token => timeout(millis, token)); - } - return new Promise((resolve, reject) => { - const handle = setTimeout(resolve, millis); - token.onCancellationRequested(() => { - clearTimeout(handle); - reject(_errors_js__WEBPACK_IMPORTED_MODULE_1__["canceled"]()); - }); - }); -} -function disposableTimeout(handler, timeout = 0) { - const timer = setTimeout(handler, timeout); - return Object(_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["toDisposable"])(() => clearTimeout(timer)); -} -function first(promiseFactories, shouldStop = t => !!t, defaultValue = null) { - let index = 0; - const len = promiseFactories.length; - const loop = () => { - if (index >= len) { - return Promise.resolve(defaultValue); - } - const factory = promiseFactories[index++]; - const promise = Promise.resolve(factory()); - return promise.then(result => { - if (shouldStop(result)) { - return Promise.resolve(result); - } - return loop(); - }); - }; - return loop(); -} -class TimeoutTimer { - constructor(runner, timeout) { - this._token = -1; - if (typeof runner === 'function' && typeof timeout === 'number') { - this.setIfNotSet(runner, timeout); - } - } - dispose() { - this.cancel(); - } - cancel() { - if (this._token !== -1) { - clearTimeout(this._token); - this._token = -1; - } - } - cancelAndSet(runner, timeout) { - this.cancel(); - this._token = setTimeout(() => { - this._token = -1; - runner(); - }, timeout); - } - setIfNotSet(runner, timeout) { - if (this._token !== -1) { - // timer is already set - return; - } - this._token = setTimeout(() => { - this._token = -1; - runner(); - }, timeout); - } -} -class IntervalTimer { - constructor() { - this._token = -1; - } - dispose() { - this.cancel(); - } - cancel() { - if (this._token !== -1) { - clearInterval(this._token); - this._token = -1; - } - } - cancelAndSet(runner, interval) { - this.cancel(); - this._token = setInterval(() => { - runner(); - }, interval); - } -} -class RunOnceScheduler { - constructor(runner, timeout) { - this.timeoutToken = -1; - this.runner = runner; - this.timeout = timeout; - this.timeoutHandler = this.onTimeout.bind(this); - } - /** - * Dispose RunOnceScheduler - */ - dispose() { - this.cancel(); - this.runner = null; - } - /** - * Cancel current scheduled runner (if any). - */ - cancel() { - if (this.isScheduled()) { - clearTimeout(this.timeoutToken); - this.timeoutToken = -1; - } - } - /** - * Cancel previous runner (if any) & schedule a new runner. - */ - schedule(delay = this.timeout) { - this.cancel(); - this.timeoutToken = setTimeout(this.timeoutHandler, delay); - } - /** - * Returns true if scheduled. - */ - isScheduled() { - return this.timeoutToken !== -1; - } - onTimeout() { - this.timeoutToken = -1; - if (this.runner) { - this.doRun(); - } - } - doRun() { - if (this.runner) { - this.runner(); - } - } -} -/** - * Execute the callback the next time the browser is idle - */ -let runWhenIdle; -(function () { - if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') { - const dummyIdle = Object.freeze({ - didTimeout: true, - timeRemaining() { return 15; } - }); - runWhenIdle = (runner) => { - const handle = setTimeout(() => runner(dummyIdle)); - let disposed = false; - return { - dispose() { - if (disposed) { - return; - } - disposed = true; - clearTimeout(handle); - } - }; - }; - } - else { - runWhenIdle = (runner, timeout) => { - const handle = requestIdleCallback(runner, typeof timeout === 'number' ? { timeout } : undefined); - let disposed = false; - return { - dispose() { - if (disposed) { - return; - } - disposed = true; - cancelIdleCallback(handle); - } - }; - }; - } -})(); -/** - * An implementation of the "idle-until-urgent"-strategy as introduced - * here: https://philipwalton.com/articles/idle-until-urgent/ - */ -class IdleValue { - constructor(executor) { - this._didRun = false; - this._executor = () => { - try { - this._value = executor(); - } - catch (err) { - this._error = err; - } - finally { - this._didRun = true; - } - }; - this._handle = runWhenIdle(() => this._executor()); - } - dispose() { - this._handle.dispose(); - } - get value() { - if (!this._didRun) { - this._handle.dispose(); - this._executor(); - } - if (this._error) { - throw this._error; - } - return this._value; - } -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/buffer.js ***! - \*****************************************************************/ -/*! exports provided: VSBuffer, readUInt16LE, writeUInt16LE, readUInt32BE, writeUInt32BE, readUInt8, writeUInt8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSBuffer", function() { return VSBuffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readUInt16LE", function() { return readUInt16LE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "writeUInt16LE", function() { return writeUInt16LE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readUInt32BE", function() { return readUInt32BE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "writeUInt32BE", function() { return writeUInt32BE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readUInt8", function() { return readUInt8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "writeUInt8", function() { return writeUInt8; }); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const hasBuffer = (typeof Buffer !== 'undefined'); -const hasTextDecoder = (typeof TextDecoder !== 'undefined'); -let textDecoder; -class VSBuffer { - constructor(buffer) { - this.buffer = buffer; - this.byteLength = this.buffer.byteLength; - } - toString() { - if (hasBuffer) { - return this.buffer.toString(); - } - else if (hasTextDecoder) { - if (!textDecoder) { - textDecoder = new TextDecoder(); - } - return textDecoder.decode(this.buffer); - } - else { - return _strings_js__WEBPACK_IMPORTED_MODULE_0__["decodeUTF8"](this.buffer); - } - } -} -function readUInt16LE(source, offset) { - return (((source[offset + 0] << 0) >>> 0) | - ((source[offset + 1] << 8) >>> 0)); -} -function writeUInt16LE(destination, value, offset) { - destination[offset + 0] = (value & 0b11111111); - value = value >>> 8; - destination[offset + 1] = (value & 0b11111111); -} -function readUInt32BE(source, offset) { - return (source[offset] * Math.pow(2, 24) - + source[offset + 1] * Math.pow(2, 16) - + source[offset + 2] * Math.pow(2, 8) - + source[offset + 3]); -} -function writeUInt32BE(destination, value, offset) { - destination[offset + 3] = value; - value = value >>> 8; - destination[offset + 2] = value; - value = value >>> 8; - destination[offset + 1] = value; - value = value >>> 8; - destination[offset] = value; -} -function readUInt8(source, offset) { - return source[offset]; -} -function writeUInt8(destination, value, offset) { - destination[offset] = value; -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer)) - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/cancellation.js ***! - \***********************************************************************/ -/*! exports provided: CancellationToken, CancellationTokenSource */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CancellationToken", function() { return CancellationToken; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CancellationTokenSource", function() { return CancellationTokenSource; }); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const shortcutEvent = Object.freeze(function (callback, context) { - const handle = setTimeout(callback.bind(context), 0); - return { dispose() { clearTimeout(handle); } }; -}); -var CancellationToken; -(function (CancellationToken) { - function isCancellationToken(thing) { - if (thing === CancellationToken.None || thing === CancellationToken.Cancelled) { - return true; - } - if (thing instanceof MutableToken) { - return true; - } - if (!thing || typeof thing !== 'object') { - return false; - } - return typeof thing.isCancellationRequested === 'boolean' - && typeof thing.onCancellationRequested === 'function'; - } - CancellationToken.isCancellationToken = isCancellationToken; - CancellationToken.None = Object.freeze({ - isCancellationRequested: false, - onCancellationRequested: _event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].None - }); - CancellationToken.Cancelled = Object.freeze({ - isCancellationRequested: true, - onCancellationRequested: shortcutEvent - }); -})(CancellationToken || (CancellationToken = {})); -class MutableToken { - constructor() { - this._isCancelled = false; - this._emitter = null; - } - cancel() { - if (!this._isCancelled) { - this._isCancelled = true; - if (this._emitter) { - this._emitter.fire(undefined); - this.dispose(); - } - } - } - get isCancellationRequested() { - return this._isCancelled; - } - get onCancellationRequested() { - if (this._isCancelled) { - return shortcutEvent; - } - if (!this._emitter) { - this._emitter = new _event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - } - return this._emitter.event; - } - dispose() { - if (this._emitter) { - this._emitter.dispose(); - this._emitter = null; - } - } -} -class CancellationTokenSource { - constructor(parent) { - this._token = undefined; - this._parentListener = undefined; - this._parentListener = parent && parent.onCancellationRequested(this.cancel, this); - } - get token() { - if (!this._token) { - // be lazy and create the token only when - // actually needed - this._token = new MutableToken(); - } - return this._token; - } - cancel() { - if (!this._token) { - // save an object by returning the default - // cancelled token when cancellation happens - // before someone asks for the token - this._token = CancellationToken.Cancelled; - } - else if (this._token instanceof MutableToken) { - // actually cancel - this._token.cancel(); - } - } - dispose(cancel = false) { - if (cancel) { - this.cancel(); - } - if (this._parentListener) { - this._parentListener.dispose(); - } - if (!this._token) { - // ensure to initialize with an empty token if we had none - this._token = CancellationToken.None; - } - else if (this._token instanceof MutableToken) { - // actually dispose - this._token.dispose(); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/codicon.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/codicon.js ***! - \******************************************************************/ -/*! exports provided: codiconStartMarker, parseCodicons, matchesFuzzyCodiconAware */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "codiconStartMarker", function() { return codiconStartMarker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCodicons", function() { return parseCodicons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesFuzzyCodiconAware", function() { return matchesFuzzyCodiconAware; }); -/* harmony import */ var _filters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -const codiconStartMarker = '$('; -function parseCodicons(text) { - const firstCodiconIndex = text.indexOf(codiconStartMarker); - if (firstCodiconIndex === -1) { - return { text }; // return early if the word does not include an codicon - } - return doParseCodicons(text, firstCodiconIndex); -} -function doParseCodicons(text, firstCodiconIndex) { - const codiconOffsets = []; - let textWithoutCodicons = ''; - function appendChars(chars) { - if (chars) { - textWithoutCodicons += chars; - for (const _ of chars) { - codiconOffsets.push(codiconsOffset); // make sure to fill in codicon offsets - } - } - } - let currentCodiconStart = -1; - let currentCodiconValue = ''; - let codiconsOffset = 0; - let char; - let nextChar; - let offset = firstCodiconIndex; - const length = text.length; - // Append all characters until the first codicon - appendChars(text.substr(0, firstCodiconIndex)); - // example: $(file-symlink-file) my cool $(other-codicon) entry - while (offset < length) { - char = text[offset]; - nextChar = text[offset + 1]; - // beginning of codicon: some value $( <-- - if (char === codiconStartMarker[0] && nextChar === codiconStartMarker[1]) { - currentCodiconStart = offset; - // if we had a previous potential codicon value without - // the closing ')', it was actually not an codicon and - // so we have to add it to the actual value - appendChars(currentCodiconValue); - currentCodiconValue = codiconStartMarker; - offset++; // jump over '(' - } - // end of codicon: some value $(some-codicon) <-- - else if (char === ')' && currentCodiconStart !== -1) { - const currentCodiconLength = offset - currentCodiconStart + 1; // +1 to include the closing ')' - codiconsOffset += currentCodiconLength; - currentCodiconStart = -1; - currentCodiconValue = ''; - } - // within codicon - else if (currentCodiconStart !== -1) { - // Make sure this is a real codicon name - if (/^[a-z0-9\-]$/i.test(char)) { - currentCodiconValue += char; - } - else { - // This is not a real codicon, treat it as text - appendChars(currentCodiconValue); - currentCodiconStart = -1; - currentCodiconValue = ''; - } - } - // any value outside of codicons - else { - appendChars(char); - } - offset++; - } - // if we had a previous potential codicon value without - // the closing ')', it was actually not an codicon and - // so we have to add it to the actual value - appendChars(currentCodiconValue); - return { text: textWithoutCodicons, codiconOffsets }; -} -function matchesFuzzyCodiconAware(query, target, enableSeparateSubstringMatching = false) { - const { text, codiconOffsets } = target; - // Return early if there are no codicon markers in the word to match against - if (!codiconOffsets || codiconOffsets.length === 0) { - return Object(_filters_js__WEBPACK_IMPORTED_MODULE_0__["matchesFuzzy"])(query, text, enableSeparateSubstringMatching); - } - // Trim the word to match against because it could have leading - // whitespace now if the word started with an codicon - const wordToMatchAgainstWithoutCodiconsTrimmed = Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["ltrim"])(text, ' '); - const leadingWhitespaceOffset = text.length - wordToMatchAgainstWithoutCodiconsTrimmed.length; - // match on value without codicons - const matches = Object(_filters_js__WEBPACK_IMPORTED_MODULE_0__["matchesFuzzy"])(query, wordToMatchAgainstWithoutCodiconsTrimmed, enableSeparateSubstringMatching); - // Map matches back to offsets with codicons and trimming - if (matches) { - for (const match of matches) { - const codiconOffset = codiconOffsets[match.start + leadingWhitespaceOffset] /* codicon offsets at index */ + leadingWhitespaceOffset /* overall leading whitespace offset */; - match.start += codiconOffset; - match.end += codiconOffset; - } - } - return matches; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/codicons.js ***! - \*******************************************************************/ -/*! exports provided: iconRegistry, registerIcon, Codicon, escapeCodicons, markdownEscapeEscapedCodicons, renderCodiconsRegex, renderCodicons, stripCodicons */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconRegistry", function() { return iconRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerIcon", function() { return registerIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Codicon", function() { return Codicon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeCodicons", function() { return escapeCodicons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markdownEscapeEscapedCodicons", function() { return markdownEscapeEscapedCodicons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderCodiconsRegex", function() { return renderCodiconsRegex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderCodicons", function() { return renderCodicons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripCodicons", function() { return stripCodicons; }); -/* harmony import */ var _codicon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codicon.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicon.js"); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class Registry { - constructor() { - this._icons = new Map(); - this._onDidRegister = new _event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - } - add(icon) { - if (!this._icons.has(icon.id)) { - this._icons.set(icon.id, icon); - this._onDidRegister.fire(icon); - } - else { - console.error(`Duplicate registration of codicon ${icon.id}`); - } - } - get(id) { - return this._icons.get(id); - } - get all() { - return this._icons.values(); - } - get onDidRegister() { - return this._onDidRegister.event; - } -} -const _registry = new Registry(); -const iconRegistry = _registry; -function registerIcon(id, def, description) { - return new Codicon(id, def); -} -class Codicon { - constructor(id, definition, description) { - this.id = id; - this.definition = definition; - this.description = description; - _registry.add(this); - } - get classNames() { return 'codicon codicon-' + this.id; } - get cssSelector() { return '.codicon.codicon-' + this.id; } -} -(function (Codicon) { - // built-in icons, with image name - Codicon.add = new Codicon('add', { character: '\\ea60' }); - Codicon.plus = new Codicon('plus', { character: '\\ea60' }); - Codicon.gistNew = new Codicon('gist-new', { character: '\\ea60' }); - Codicon.repoCreate = new Codicon('repo-create', { character: '\\ea60' }); - Codicon.lightbulb = new Codicon('lightbulb', { character: '\\ea61' }); - Codicon.lightBulb = new Codicon('light-bulb', { character: '\\ea61' }); - Codicon.repo = new Codicon('repo', { character: '\\ea62' }); - Codicon.repoDelete = new Codicon('repo-delete', { character: '\\ea62' }); - Codicon.gistFork = new Codicon('gist-fork', { character: '\\ea63' }); - Codicon.repoForked = new Codicon('repo-forked', { character: '\\ea63' }); - Codicon.gitPullRequest = new Codicon('git-pull-request', { character: '\\ea64' }); - Codicon.gitPullRequestAbandoned = new Codicon('git-pull-request-abandoned', { character: '\\ea64' }); - Codicon.recordKeys = new Codicon('record-keys', { character: '\\ea65' }); - Codicon.keyboard = new Codicon('keyboard', { character: '\\ea65' }); - Codicon.tag = new Codicon('tag', { character: '\\ea66' }); - Codicon.tagAdd = new Codicon('tag-add', { character: '\\ea66' }); - Codicon.tagRemove = new Codicon('tag-remove', { character: '\\ea66' }); - Codicon.person = new Codicon('person', { character: '\\ea67' }); - Codicon.personAdd = new Codicon('person-add', { character: '\\ea67' }); - Codicon.personFollow = new Codicon('person-follow', { character: '\\ea67' }); - Codicon.personOutline = new Codicon('person-outline', { character: '\\ea67' }); - Codicon.personFilled = new Codicon('person-filled', { character: '\\ea67' }); - Codicon.gitBranch = new Codicon('git-branch', { character: '\\ea68' }); - Codicon.gitBranchCreate = new Codicon('git-branch-create', { character: '\\ea68' }); - Codicon.gitBranchDelete = new Codicon('git-branch-delete', { character: '\\ea68' }); - Codicon.sourceControl = new Codicon('source-control', { character: '\\ea68' }); - Codicon.mirror = new Codicon('mirror', { character: '\\ea69' }); - Codicon.mirrorPublic = new Codicon('mirror-public', { character: '\\ea69' }); - Codicon.star = new Codicon('star', { character: '\\ea6a' }); - Codicon.starAdd = new Codicon('star-add', { character: '\\ea6a' }); - Codicon.starDelete = new Codicon('star-delete', { character: '\\ea6a' }); - Codicon.starEmpty = new Codicon('star-empty', { character: '\\ea6a' }); - Codicon.comment = new Codicon('comment', { character: '\\ea6b' }); - Codicon.commentAdd = new Codicon('comment-add', { character: '\\ea6b' }); - Codicon.alert = new Codicon('alert', { character: '\\ea6c' }); - Codicon.warning = new Codicon('warning', { character: '\\ea6c' }); - Codicon.search = new Codicon('search', { character: '\\ea6d' }); - Codicon.searchSave = new Codicon('search-save', { character: '\\ea6d' }); - Codicon.logOut = new Codicon('log-out', { character: '\\ea6e' }); - Codicon.signOut = new Codicon('sign-out', { character: '\\ea6e' }); - Codicon.logIn = new Codicon('log-in', { character: '\\ea6f' }); - Codicon.signIn = new Codicon('sign-in', { character: '\\ea6f' }); - Codicon.eye = new Codicon('eye', { character: '\\ea70' }); - Codicon.eyeUnwatch = new Codicon('eye-unwatch', { character: '\\ea70' }); - Codicon.eyeWatch = new Codicon('eye-watch', { character: '\\ea70' }); - Codicon.circleFilled = new Codicon('circle-filled', { character: '\\ea71' }); - Codicon.primitiveDot = new Codicon('primitive-dot', { character: '\\ea71' }); - Codicon.closeDirty = new Codicon('close-dirty', { character: '\\ea71' }); - Codicon.debugBreakpoint = new Codicon('debug-breakpoint', { character: '\\ea71' }); - Codicon.debugBreakpointDisabled = new Codicon('debug-breakpoint-disabled', { character: '\\ea71' }); - Codicon.debugHint = new Codicon('debug-hint', { character: '\\ea71' }); - Codicon.primitiveSquare = new Codicon('primitive-square', { character: '\\ea72' }); - Codicon.edit = new Codicon('edit', { character: '\\ea73' }); - Codicon.pencil = new Codicon('pencil', { character: '\\ea73' }); - Codicon.info = new Codicon('info', { character: '\\ea74' }); - Codicon.issueOpened = new Codicon('issue-opened', { character: '\\ea74' }); - Codicon.gistPrivate = new Codicon('gist-private', { character: '\\ea75' }); - Codicon.gitForkPrivate = new Codicon('git-fork-private', { character: '\\ea75' }); - Codicon.lock = new Codicon('lock', { character: '\\ea75' }); - Codicon.mirrorPrivate = new Codicon('mirror-private', { character: '\\ea75' }); - Codicon.close = new Codicon('close', { character: '\\ea76' }); - Codicon.removeClose = new Codicon('remove-close', { character: '\\ea76' }); - Codicon.x = new Codicon('x', { character: '\\ea76' }); - Codicon.repoSync = new Codicon('repo-sync', { character: '\\ea77' }); - Codicon.sync = new Codicon('sync', { character: '\\ea77' }); - Codicon.clone = new Codicon('clone', { character: '\\ea78' }); - Codicon.desktopDownload = new Codicon('desktop-download', { character: '\\ea78' }); - Codicon.beaker = new Codicon('beaker', { character: '\\ea79' }); - Codicon.microscope = new Codicon('microscope', { character: '\\ea79' }); - Codicon.vm = new Codicon('vm', { character: '\\ea7a' }); - Codicon.deviceDesktop = new Codicon('device-desktop', { character: '\\ea7a' }); - Codicon.file = new Codicon('file', { character: '\\ea7b' }); - Codicon.fileText = new Codicon('file-text', { character: '\\ea7b' }); - Codicon.more = new Codicon('more', { character: '\\ea7c' }); - Codicon.ellipsis = new Codicon('ellipsis', { character: '\\ea7c' }); - Codicon.kebabHorizontal = new Codicon('kebab-horizontal', { character: '\\ea7c' }); - Codicon.mailReply = new Codicon('mail-reply', { character: '\\ea7d' }); - Codicon.reply = new Codicon('reply', { character: '\\ea7d' }); - Codicon.organization = new Codicon('organization', { character: '\\ea7e' }); - Codicon.organizationFilled = new Codicon('organization-filled', { character: '\\ea7e' }); - Codicon.organizationOutline = new Codicon('organization-outline', { character: '\\ea7e' }); - Codicon.newFile = new Codicon('new-file', { character: '\\ea7f' }); - Codicon.fileAdd = new Codicon('file-add', { character: '\\ea7f' }); - Codicon.newFolder = new Codicon('new-folder', { character: '\\ea80' }); - Codicon.fileDirectoryCreate = new Codicon('file-directory-create', { character: '\\ea80' }); - Codicon.trash = new Codicon('trash', { character: '\\ea81' }); - Codicon.trashcan = new Codicon('trashcan', { character: '\\ea81' }); - Codicon.history = new Codicon('history', { character: '\\ea82' }); - Codicon.clock = new Codicon('clock', { character: '\\ea82' }); - Codicon.folder = new Codicon('folder', { character: '\\ea83' }); - Codicon.fileDirectory = new Codicon('file-directory', { character: '\\ea83' }); - Codicon.symbolFolder = new Codicon('symbol-folder', { character: '\\ea83' }); - Codicon.logoGithub = new Codicon('logo-github', { character: '\\ea84' }); - Codicon.markGithub = new Codicon('mark-github', { character: '\\ea84' }); - Codicon.github = new Codicon('github', { character: '\\ea84' }); - Codicon.terminal = new Codicon('terminal', { character: '\\ea85' }); - Codicon.console = new Codicon('console', { character: '\\ea85' }); - Codicon.repl = new Codicon('repl', { character: '\\ea85' }); - Codicon.zap = new Codicon('zap', { character: '\\ea86' }); - Codicon.symbolEvent = new Codicon('symbol-event', { character: '\\ea86' }); - Codicon.error = new Codicon('error', { character: '\\ea87' }); - Codicon.stop = new Codicon('stop', { character: '\\ea87' }); - Codicon.variable = new Codicon('variable', { character: '\\ea88' }); - Codicon.symbolVariable = new Codicon('symbol-variable', { character: '\\ea88' }); - Codicon.array = new Codicon('array', { character: '\\ea8a' }); - Codicon.symbolArray = new Codicon('symbol-array', { character: '\\ea8a' }); - Codicon.symbolModule = new Codicon('symbol-module', { character: '\\ea8b' }); - Codicon.symbolPackage = new Codicon('symbol-package', { character: '\\ea8b' }); - Codicon.symbolNamespace = new Codicon('symbol-namespace', { character: '\\ea8b' }); - Codicon.symbolObject = new Codicon('symbol-object', { character: '\\ea8b' }); - Codicon.symbolMethod = new Codicon('symbol-method', { character: '\\ea8c' }); - Codicon.symbolFunction = new Codicon('symbol-function', { character: '\\ea8c' }); - Codicon.symbolConstructor = new Codicon('symbol-constructor', { character: '\\ea8c' }); - Codicon.symbolBoolean = new Codicon('symbol-boolean', { character: '\\ea8f' }); - Codicon.symbolNull = new Codicon('symbol-null', { character: '\\ea8f' }); - Codicon.symbolNumeric = new Codicon('symbol-numeric', { character: '\\ea90' }); - Codicon.symbolNumber = new Codicon('symbol-number', { character: '\\ea90' }); - Codicon.symbolStructure = new Codicon('symbol-structure', { character: '\\ea91' }); - Codicon.symbolStruct = new Codicon('symbol-struct', { character: '\\ea91' }); - Codicon.symbolParameter = new Codicon('symbol-parameter', { character: '\\ea92' }); - Codicon.symbolTypeParameter = new Codicon('symbol-type-parameter', { character: '\\ea92' }); - Codicon.symbolKey = new Codicon('symbol-key', { character: '\\ea93' }); - Codicon.symbolText = new Codicon('symbol-text', { character: '\\ea93' }); - Codicon.symbolReference = new Codicon('symbol-reference', { character: '\\ea94' }); - Codicon.goToFile = new Codicon('go-to-file', { character: '\\ea94' }); - Codicon.symbolEnum = new Codicon('symbol-enum', { character: '\\ea95' }); - Codicon.symbolValue = new Codicon('symbol-value', { character: '\\ea95' }); - Codicon.symbolRuler = new Codicon('symbol-ruler', { character: '\\ea96' }); - Codicon.symbolUnit = new Codicon('symbol-unit', { character: '\\ea96' }); - Codicon.activateBreakpoints = new Codicon('activate-breakpoints', { character: '\\ea97' }); - Codicon.archive = new Codicon('archive', { character: '\\ea98' }); - Codicon.arrowBoth = new Codicon('arrow-both', { character: '\\ea99' }); - Codicon.arrowDown = new Codicon('arrow-down', { character: '\\ea9a' }); - Codicon.arrowLeft = new Codicon('arrow-left', { character: '\\ea9b' }); - Codicon.arrowRight = new Codicon('arrow-right', { character: '\\ea9c' }); - Codicon.arrowSmallDown = new Codicon('arrow-small-down', { character: '\\ea9d' }); - Codicon.arrowSmallLeft = new Codicon('arrow-small-left', { character: '\\ea9e' }); - Codicon.arrowSmallRight = new Codicon('arrow-small-right', { character: '\\ea9f' }); - Codicon.arrowSmallUp = new Codicon('arrow-small-up', { character: '\\eaa0' }); - Codicon.arrowUp = new Codicon('arrow-up', { character: '\\eaa1' }); - Codicon.bell = new Codicon('bell', { character: '\\eaa2' }); - Codicon.bold = new Codicon('bold', { character: '\\eaa3' }); - Codicon.book = new Codicon('book', { character: '\\eaa4' }); - Codicon.bookmark = new Codicon('bookmark', { character: '\\eaa5' }); - Codicon.debugBreakpointConditionalUnverified = new Codicon('debug-breakpoint-conditional-unverified', { character: '\\eaa6' }); - Codicon.debugBreakpointConditional = new Codicon('debug-breakpoint-conditional', { character: '\\eaa7' }); - Codicon.debugBreakpointConditionalDisabled = new Codicon('debug-breakpoint-conditional-disabled', { character: '\\eaa7' }); - Codicon.debugBreakpointDataUnverified = new Codicon('debug-breakpoint-data-unverified', { character: '\\eaa8' }); - Codicon.debugBreakpointData = new Codicon('debug-breakpoint-data', { character: '\\eaa9' }); - Codicon.debugBreakpointDataDisabled = new Codicon('debug-breakpoint-data-disabled', { character: '\\eaa9' }); - Codicon.debugBreakpointLogUnverified = new Codicon('debug-breakpoint-log-unverified', { character: '\\eaaa' }); - Codicon.debugBreakpointLog = new Codicon('debug-breakpoint-log', { character: '\\eaab' }); - Codicon.debugBreakpointLogDisabled = new Codicon('debug-breakpoint-log-disabled', { character: '\\eaab' }); - Codicon.briefcase = new Codicon('briefcase', { character: '\\eaac' }); - Codicon.broadcast = new Codicon('broadcast', { character: '\\eaad' }); - Codicon.browser = new Codicon('browser', { character: '\\eaae' }); - Codicon.bug = new Codicon('bug', { character: '\\eaaf' }); - Codicon.calendar = new Codicon('calendar', { character: '\\eab0' }); - Codicon.caseSensitive = new Codicon('case-sensitive', { character: '\\eab1' }); - Codicon.check = new Codicon('check', { character: '\\eab2' }); - Codicon.checklist = new Codicon('checklist', { character: '\\eab3' }); - Codicon.chevronDown = new Codicon('chevron-down', { character: '\\eab4' }); - Codicon.chevronLeft = new Codicon('chevron-left', { character: '\\eab5' }); - Codicon.chevronRight = new Codicon('chevron-right', { character: '\\eab6' }); - Codicon.chevronUp = new Codicon('chevron-up', { character: '\\eab7' }); - Codicon.chromeClose = new Codicon('chrome-close', { character: '\\eab8' }); - Codicon.chromeMaximize = new Codicon('chrome-maximize', { character: '\\eab9' }); - Codicon.chromeMinimize = new Codicon('chrome-minimize', { character: '\\eaba' }); - Codicon.chromeRestore = new Codicon('chrome-restore', { character: '\\eabb' }); - Codicon.circleOutline = new Codicon('circle-outline', { character: '\\eabc' }); - Codicon.debugBreakpointUnverified = new Codicon('debug-breakpoint-unverified', { character: '\\eabc' }); - Codicon.circleSlash = new Codicon('circle-slash', { character: '\\eabd' }); - Codicon.circuitBoard = new Codicon('circuit-board', { character: '\\eabe' }); - Codicon.clearAll = new Codicon('clear-all', { character: '\\eabf' }); - Codicon.clippy = new Codicon('clippy', { character: '\\eac0' }); - Codicon.closeAll = new Codicon('close-all', { character: '\\eac1' }); - Codicon.cloudDownload = new Codicon('cloud-download', { character: '\\eac2' }); - Codicon.cloudUpload = new Codicon('cloud-upload', { character: '\\eac3' }); - Codicon.code = new Codicon('code', { character: '\\eac4' }); - Codicon.collapseAll = new Codicon('collapse-all', { character: '\\eac5' }); - Codicon.colorMode = new Codicon('color-mode', { character: '\\eac6' }); - Codicon.commentDiscussion = new Codicon('comment-discussion', { character: '\\eac7' }); - Codicon.compareChanges = new Codicon('compare-changes', { character: '\\eafd' }); - Codicon.creditCard = new Codicon('credit-card', { character: '\\eac9' }); - Codicon.dash = new Codicon('dash', { character: '\\eacc' }); - Codicon.dashboard = new Codicon('dashboard', { character: '\\eacd' }); - Codicon.database = new Codicon('database', { character: '\\eace' }); - Codicon.debugContinue = new Codicon('debug-continue', { character: '\\eacf' }); - Codicon.debugDisconnect = new Codicon('debug-disconnect', { character: '\\ead0' }); - Codicon.debugPause = new Codicon('debug-pause', { character: '\\ead1' }); - Codicon.debugRestart = new Codicon('debug-restart', { character: '\\ead2' }); - Codicon.debugStart = new Codicon('debug-start', { character: '\\ead3' }); - Codicon.debugStepInto = new Codicon('debug-step-into', { character: '\\ead4' }); - Codicon.debugStepOut = new Codicon('debug-step-out', { character: '\\ead5' }); - Codicon.debugStepOver = new Codicon('debug-step-over', { character: '\\ead6' }); - Codicon.debugStop = new Codicon('debug-stop', { character: '\\ead7' }); - Codicon.debug = new Codicon('debug', { character: '\\ead8' }); - Codicon.deviceCameraVideo = new Codicon('device-camera-video', { character: '\\ead9' }); - Codicon.deviceCamera = new Codicon('device-camera', { character: '\\eada' }); - Codicon.deviceMobile = new Codicon('device-mobile', { character: '\\eadb' }); - Codicon.diffAdded = new Codicon('diff-added', { character: '\\eadc' }); - Codicon.diffIgnored = new Codicon('diff-ignored', { character: '\\eadd' }); - Codicon.diffModified = new Codicon('diff-modified', { character: '\\eade' }); - Codicon.diffRemoved = new Codicon('diff-removed', { character: '\\eadf' }); - Codicon.diffRenamed = new Codicon('diff-renamed', { character: '\\eae0' }); - Codicon.diff = new Codicon('diff', { character: '\\eae1' }); - Codicon.discard = new Codicon('discard', { character: '\\eae2' }); - Codicon.editorLayout = new Codicon('editor-layout', { character: '\\eae3' }); - Codicon.emptyWindow = new Codicon('empty-window', { character: '\\eae4' }); - Codicon.exclude = new Codicon('exclude', { character: '\\eae5' }); - Codicon.extensions = new Codicon('extensions', { character: '\\eae6' }); - Codicon.eyeClosed = new Codicon('eye-closed', { character: '\\eae7' }); - Codicon.fileBinary = new Codicon('file-binary', { character: '\\eae8' }); - Codicon.fileCode = new Codicon('file-code', { character: '\\eae9' }); - Codicon.fileMedia = new Codicon('file-media', { character: '\\eaea' }); - Codicon.filePdf = new Codicon('file-pdf', { character: '\\eaeb' }); - Codicon.fileSubmodule = new Codicon('file-submodule', { character: '\\eaec' }); - Codicon.fileSymlinkDirectory = new Codicon('file-symlink-directory', { character: '\\eaed' }); - Codicon.fileSymlinkFile = new Codicon('file-symlink-file', { character: '\\eaee' }); - Codicon.fileZip = new Codicon('file-zip', { character: '\\eaef' }); - Codicon.files = new Codicon('files', { character: '\\eaf0' }); - Codicon.filter = new Codicon('filter', { character: '\\eaf1' }); - Codicon.flame = new Codicon('flame', { character: '\\eaf2' }); - Codicon.foldDown = new Codicon('fold-down', { character: '\\eaf3' }); - Codicon.foldUp = new Codicon('fold-up', { character: '\\eaf4' }); - Codicon.fold = new Codicon('fold', { character: '\\eaf5' }); - Codicon.folderActive = new Codicon('folder-active', { character: '\\eaf6' }); - Codicon.folderOpened = new Codicon('folder-opened', { character: '\\eaf7' }); - Codicon.gear = new Codicon('gear', { character: '\\eaf8' }); - Codicon.gift = new Codicon('gift', { character: '\\eaf9' }); - Codicon.gistSecret = new Codicon('gist-secret', { character: '\\eafa' }); - Codicon.gist = new Codicon('gist', { character: '\\eafb' }); - Codicon.gitCommit = new Codicon('git-commit', { character: '\\eafc' }); - Codicon.gitCompare = new Codicon('git-compare', { character: '\\eafd' }); - Codicon.gitMerge = new Codicon('git-merge', { character: '\\eafe' }); - Codicon.githubAction = new Codicon('github-action', { character: '\\eaff' }); - Codicon.githubAlt = new Codicon('github-alt', { character: '\\eb00' }); - Codicon.globe = new Codicon('globe', { character: '\\eb01' }); - Codicon.grabber = new Codicon('grabber', { character: '\\eb02' }); - Codicon.graph = new Codicon('graph', { character: '\\eb03' }); - Codicon.gripper = new Codicon('gripper', { character: '\\eb04' }); - Codicon.heart = new Codicon('heart', { character: '\\eb05' }); - Codicon.home = new Codicon('home', { character: '\\eb06' }); - Codicon.horizontalRule = new Codicon('horizontal-rule', { character: '\\eb07' }); - Codicon.hubot = new Codicon('hubot', { character: '\\eb08' }); - Codicon.inbox = new Codicon('inbox', { character: '\\eb09' }); - Codicon.issueClosed = new Codicon('issue-closed', { character: '\\eb0a' }); - Codicon.issueReopened = new Codicon('issue-reopened', { character: '\\eb0b' }); - Codicon.issues = new Codicon('issues', { character: '\\eb0c' }); - Codicon.italic = new Codicon('italic', { character: '\\eb0d' }); - Codicon.jersey = new Codicon('jersey', { character: '\\eb0e' }); - Codicon.json = new Codicon('json', { character: '\\eb0f' }); - Codicon.kebabVertical = new Codicon('kebab-vertical', { character: '\\eb10' }); - Codicon.key = new Codicon('key', { character: '\\eb11' }); - Codicon.law = new Codicon('law', { character: '\\eb12' }); - Codicon.lightbulbAutofix = new Codicon('lightbulb-autofix', { character: '\\eb13' }); - Codicon.linkExternal = new Codicon('link-external', { character: '\\eb14' }); - Codicon.link = new Codicon('link', { character: '\\eb15' }); - Codicon.listOrdered = new Codicon('list-ordered', { character: '\\eb16' }); - Codicon.listUnordered = new Codicon('list-unordered', { character: '\\eb17' }); - Codicon.liveShare = new Codicon('live-share', { character: '\\eb18' }); - Codicon.loading = new Codicon('loading', { character: '\\eb19' }); - Codicon.location = new Codicon('location', { character: '\\eb1a' }); - Codicon.mailRead = new Codicon('mail-read', { character: '\\eb1b' }); - Codicon.mail = new Codicon('mail', { character: '\\eb1c' }); - Codicon.markdown = new Codicon('markdown', { character: '\\eb1d' }); - Codicon.megaphone = new Codicon('megaphone', { character: '\\eb1e' }); - Codicon.mention = new Codicon('mention', { character: '\\eb1f' }); - Codicon.milestone = new Codicon('milestone', { character: '\\eb20' }); - Codicon.mortarBoard = new Codicon('mortar-board', { character: '\\eb21' }); - Codicon.move = new Codicon('move', { character: '\\eb22' }); - Codicon.multipleWindows = new Codicon('multiple-windows', { character: '\\eb23' }); - Codicon.mute = new Codicon('mute', { character: '\\eb24' }); - Codicon.noNewline = new Codicon('no-newline', { character: '\\eb25' }); - Codicon.note = new Codicon('note', { character: '\\eb26' }); - Codicon.octoface = new Codicon('octoface', { character: '\\eb27' }); - Codicon.openPreview = new Codicon('open-preview', { character: '\\eb28' }); - Codicon.package_ = new Codicon('package', { character: '\\eb29' }); - Codicon.paintcan = new Codicon('paintcan', { character: '\\eb2a' }); - Codicon.pin = new Codicon('pin', { character: '\\eb2b' }); - Codicon.play = new Codicon('play', { character: '\\eb2c' }); - Codicon.run = new Codicon('run', { character: '\\eb2c' }); - Codicon.plug = new Codicon('plug', { character: '\\eb2d' }); - Codicon.preserveCase = new Codicon('preserve-case', { character: '\\eb2e' }); - Codicon.preview = new Codicon('preview', { character: '\\eb2f' }); - Codicon.project = new Codicon('project', { character: '\\eb30' }); - Codicon.pulse = new Codicon('pulse', { character: '\\eb31' }); - Codicon.question = new Codicon('question', { character: '\\eb32' }); - Codicon.quote = new Codicon('quote', { character: '\\eb33' }); - Codicon.radioTower = new Codicon('radio-tower', { character: '\\eb34' }); - Codicon.reactions = new Codicon('reactions', { character: '\\eb35' }); - Codicon.references = new Codicon('references', { character: '\\eb36' }); - Codicon.refresh = new Codicon('refresh', { character: '\\eb37' }); - Codicon.regex = new Codicon('regex', { character: '\\eb38' }); - Codicon.remoteExplorer = new Codicon('remote-explorer', { character: '\\eb39' }); - Codicon.remote = new Codicon('remote', { character: '\\eb3a' }); - Codicon.remove = new Codicon('remove', { character: '\\eb3b' }); - Codicon.replaceAll = new Codicon('replace-all', { character: '\\eb3c' }); - Codicon.replace = new Codicon('replace', { character: '\\eb3d' }); - Codicon.repoClone = new Codicon('repo-clone', { character: '\\eb3e' }); - Codicon.repoForcePush = new Codicon('repo-force-push', { character: '\\eb3f' }); - Codicon.repoPull = new Codicon('repo-pull', { character: '\\eb40' }); - Codicon.repoPush = new Codicon('repo-push', { character: '\\eb41' }); - Codicon.report = new Codicon('report', { character: '\\eb42' }); - Codicon.requestChanges = new Codicon('request-changes', { character: '\\eb43' }); - Codicon.rocket = new Codicon('rocket', { character: '\\eb44' }); - Codicon.rootFolderOpened = new Codicon('root-folder-opened', { character: '\\eb45' }); - Codicon.rootFolder = new Codicon('root-folder', { character: '\\eb46' }); - Codicon.rss = new Codicon('rss', { character: '\\eb47' }); - Codicon.ruby = new Codicon('ruby', { character: '\\eb48' }); - Codicon.saveAll = new Codicon('save-all', { character: '\\eb49' }); - Codicon.saveAs = new Codicon('save-as', { character: '\\eb4a' }); - Codicon.save = new Codicon('save', { character: '\\eb4b' }); - Codicon.screenFull = new Codicon('screen-full', { character: '\\eb4c' }); - Codicon.screenNormal = new Codicon('screen-normal', { character: '\\eb4d' }); - Codicon.searchStop = new Codicon('search-stop', { character: '\\eb4e' }); - Codicon.server = new Codicon('server', { character: '\\eb50' }); - Codicon.settingsGear = new Codicon('settings-gear', { character: '\\eb51' }); - Codicon.settings = new Codicon('settings', { character: '\\eb52' }); - Codicon.shield = new Codicon('shield', { character: '\\eb53' }); - Codicon.smiley = new Codicon('smiley', { character: '\\eb54' }); - Codicon.sortPrecedence = new Codicon('sort-precedence', { character: '\\eb55' }); - Codicon.splitHorizontal = new Codicon('split-horizontal', { character: '\\eb56' }); - Codicon.splitVertical = new Codicon('split-vertical', { character: '\\eb57' }); - Codicon.squirrel = new Codicon('squirrel', { character: '\\eb58' }); - Codicon.starFull = new Codicon('star-full', { character: '\\eb59' }); - Codicon.starHalf = new Codicon('star-half', { character: '\\eb5a' }); - Codicon.symbolClass = new Codicon('symbol-class', { character: '\\eb5b' }); - Codicon.symbolColor = new Codicon('symbol-color', { character: '\\eb5c' }); - Codicon.symbolConstant = new Codicon('symbol-constant', { character: '\\eb5d' }); - Codicon.symbolEnumMember = new Codicon('symbol-enum-member', { character: '\\eb5e' }); - Codicon.symbolField = new Codicon('symbol-field', { character: '\\eb5f' }); - Codicon.symbolFile = new Codicon('symbol-file', { character: '\\eb60' }); - Codicon.symbolInterface = new Codicon('symbol-interface', { character: '\\eb61' }); - Codicon.symbolKeyword = new Codicon('symbol-keyword', { character: '\\eb62' }); - Codicon.symbolMisc = new Codicon('symbol-misc', { character: '\\eb63' }); - Codicon.symbolOperator = new Codicon('symbol-operator', { character: '\\eb64' }); - Codicon.symbolProperty = new Codicon('symbol-property', { character: '\\eb65' }); - Codicon.wrench = new Codicon('wrench', { character: '\\eb65' }); - Codicon.wrenchSubaction = new Codicon('wrench-subaction', { character: '\\eb65' }); - Codicon.symbolSnippet = new Codicon('symbol-snippet', { character: '\\eb66' }); - Codicon.tasklist = new Codicon('tasklist', { character: '\\eb67' }); - Codicon.telescope = new Codicon('telescope', { character: '\\eb68' }); - Codicon.textSize = new Codicon('text-size', { character: '\\eb69' }); - Codicon.threeBars = new Codicon('three-bars', { character: '\\eb6a' }); - Codicon.thumbsdown = new Codicon('thumbsdown', { character: '\\eb6b' }); - Codicon.thumbsup = new Codicon('thumbsup', { character: '\\eb6c' }); - Codicon.tools = new Codicon('tools', { character: '\\eb6d' }); - Codicon.triangleDown = new Codicon('triangle-down', { character: '\\eb6e' }); - Codicon.triangleLeft = new Codicon('triangle-left', { character: '\\eb6f' }); - Codicon.triangleRight = new Codicon('triangle-right', { character: '\\eb70' }); - Codicon.triangleUp = new Codicon('triangle-up', { character: '\\eb71' }); - Codicon.twitter = new Codicon('twitter', { character: '\\eb72' }); - Codicon.unfold = new Codicon('unfold', { character: '\\eb73' }); - Codicon.unlock = new Codicon('unlock', { character: '\\eb74' }); - Codicon.unmute = new Codicon('unmute', { character: '\\eb75' }); - Codicon.unverified = new Codicon('unverified', { character: '\\eb76' }); - Codicon.verified = new Codicon('verified', { character: '\\eb77' }); - Codicon.versions = new Codicon('versions', { character: '\\eb78' }); - Codicon.vmActive = new Codicon('vm-active', { character: '\\eb79' }); - Codicon.vmOutline = new Codicon('vm-outline', { character: '\\eb7a' }); - Codicon.vmRunning = new Codicon('vm-running', { character: '\\eb7b' }); - Codicon.watch = new Codicon('watch', { character: '\\eb7c' }); - Codicon.whitespace = new Codicon('whitespace', { character: '\\eb7d' }); - Codicon.wholeWord = new Codicon('whole-word', { character: '\\eb7e' }); - Codicon.window = new Codicon('window', { character: '\\eb7f' }); - Codicon.wordWrap = new Codicon('word-wrap', { character: '\\eb80' }); - Codicon.zoomIn = new Codicon('zoom-in', { character: '\\eb81' }); - Codicon.zoomOut = new Codicon('zoom-out', { character: '\\eb82' }); - Codicon.listFilter = new Codicon('list-filter', { character: '\\eb83' }); - Codicon.listFlat = new Codicon('list-flat', { character: '\\eb84' }); - Codicon.listSelection = new Codicon('list-selection', { character: '\\eb85' }); - Codicon.selection = new Codicon('selection', { character: '\\eb85' }); - Codicon.listTree = new Codicon('list-tree', { character: '\\eb86' }); - Codicon.debugBreakpointFunctionUnverified = new Codicon('debug-breakpoint-function-unverified', { character: '\\eb87' }); - Codicon.debugBreakpointFunction = new Codicon('debug-breakpoint-function', { character: '\\eb88' }); - Codicon.debugBreakpointFunctionDisabled = new Codicon('debug-breakpoint-function-disabled', { character: '\\eb88' }); - Codicon.debugStackframeActive = new Codicon('debug-stackframe-active', { character: '\\eb89' }); - Codicon.debugStackframeDot = new Codicon('debug-stackframe-dot', { character: '\\eb8a' }); - Codicon.debugStackframe = new Codicon('debug-stackframe', { character: '\\eb8b' }); - Codicon.debugStackframeFocused = new Codicon('debug-stackframe-focused', { character: '\\eb8b' }); - Codicon.debugBreakpointUnsupported = new Codicon('debug-breakpoint-unsupported', { character: '\\eb8c' }); - Codicon.symbolString = new Codicon('symbol-string', { character: '\\eb8d' }); - Codicon.debugReverseContinue = new Codicon('debug-reverse-continue', { character: '\\eb8e' }); - Codicon.debugStepBack = new Codicon('debug-step-back', { character: '\\eb8f' }); - Codicon.debugRestartFrame = new Codicon('debug-restart-frame', { character: '\\eb90' }); - Codicon.callIncoming = new Codicon('call-incoming', { character: '\\eb92' }); - Codicon.callOutgoing = new Codicon('call-outgoing', { character: '\\eb93' }); - Codicon.menu = new Codicon('menu', { character: '\\eb94' }); - Codicon.expandAll = new Codicon('expand-all', { character: '\\eb95' }); - Codicon.feedback = new Codicon('feedback', { character: '\\eb96' }); - Codicon.groupByRefType = new Codicon('group-by-ref-type', { character: '\\eb97' }); - Codicon.ungroupByRefType = new Codicon('ungroup-by-ref-type', { character: '\\eb98' }); - Codicon.account = new Codicon('account', { character: '\\eb99' }); - Codicon.bellDot = new Codicon('bell-dot', { character: '\\eb9a' }); - Codicon.debugConsole = new Codicon('debug-console', { character: '\\eb9b' }); - Codicon.library = new Codicon('library', { character: '\\eb9c' }); - Codicon.output = new Codicon('output', { character: '\\eb9d' }); - Codicon.runAll = new Codicon('run-all', { character: '\\eb9e' }); - Codicon.syncIgnored = new Codicon('sync-ignored', { character: '\\eb9f' }); - Codicon.pinned = new Codicon('pinned', { character: '\\eba0' }); - Codicon.githubInverted = new Codicon('github-inverted', { character: '\\eba1' }); - Codicon.debugAlt = new Codicon('debug-alt', { character: '\\eb91' }); - Codicon.serverProcess = new Codicon('server-process', { character: '\\eba2' }); - Codicon.serverEnvironment = new Codicon('server-environment', { character: '\\eba3' }); - Codicon.pass = new Codicon('pass', { character: '\\eba4' }); - Codicon.stopCircle = new Codicon('stop-circle', { character: '\\eba5' }); - Codicon.playCircle = new Codicon('play-circle', { character: '\\eba6' }); - Codicon.record = new Codicon('record', { character: '\\eba7' }); - Codicon.debugAltSmall = new Codicon('debug-alt-small', { character: '\\eba8' }); - Codicon.vmConnect = new Codicon('vm-connect', { character: '\\eba9' }); - Codicon.cloud = new Codicon('cloud', { character: '\\ebaa' }); - Codicon.merge = new Codicon('merge', { character: '\\ebab' }); -})(Codicon || (Codicon = {})); -const escapeCodiconsRegex = /(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi; -function escapeCodicons(text) { - return text.replace(escapeCodiconsRegex, (match, escaped) => escaped ? match : `\\${match}`); -} -const markdownEscapedCodiconsRegex = /\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi; -function markdownEscapeEscapedCodicons(text) { - // Need to add an extra \ for escaping in markdown - return text.replace(markdownEscapedCodiconsRegex, match => `\\${match}`); -} -const renderCodiconsRegex = /(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi; -/** - * @deprecated Use `renderCodiconsAsElement` instead - */ -function renderCodicons(text) { - return text.replace(renderCodiconsRegex, (_, escaped, codicon, name, animation) => { - // If the class for codicons is changed, it should also be updated in src\vs\base\browser\markdownRenderer.ts - return escaped - ? `$(${codicon})` - : ``; - }); -} -const stripCodiconsRegex = /(\s)?(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)(\s)?/gi; -function stripCodicons(text) { - if (text.indexOf(_codicon_js__WEBPACK_IMPORTED_MODULE_0__["codiconStartMarker"]) === -1) { - return text; - } - return text.replace(stripCodiconsRegex, (match, preWhitespace, escaped, postWhitespace) => escaped ? match : preWhitespace || postWhitespace || ''); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/collections.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/collections.js ***! - \**********************************************************************/ -/*! exports provided: forEach, SetMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetMap", function() { return SetMap; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const hasOwnProperty = Object.prototype.hasOwnProperty; -/** - * Iterates over each entry in the provided dictionary. The iterator allows - * to remove elements and will stop when the callback returns {{false}}. - */ -function forEach(from, callback) { - for (let key in from) { - if (hasOwnProperty.call(from, key)) { - const result = callback({ key: key, value: from[key] }, function () { - delete from[key]; - }); - if (result === false) { - return; - } - } - } -} -class SetMap { - constructor() { - this.map = new Map(); - } - add(key, value) { - let values = this.map.get(key); - if (!values) { - values = new Set(); - this.map.set(key, values); - } - values.add(value); - } - delete(key, value) { - const values = this.map.get(key); - if (!values) { - return; - } - values.delete(value); - if (values.size === 0) { - this.map.delete(key); - } - } - forEach(key, fn) { - const values = this.map.get(key); - if (!values) { - return; - } - values.forEach(fn); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/color.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/color.js ***! - \****************************************************************/ -/*! exports provided: RGBA, HSLA, HSVA, Color */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RGBA", function() { return RGBA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HSLA", function() { return HSLA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HSVA", function() { return HSVA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function roundFloat(number, decimalPoints) { - const decimal = Math.pow(10, decimalPoints); - return Math.round(number * decimal) / decimal; -} -class RGBA { - constructor(r, g, b, a = 1) { - this.r = Math.min(255, Math.max(0, r)) | 0; - this.g = Math.min(255, Math.max(0, g)) | 0; - this.b = Math.min(255, Math.max(0, b)) | 0; - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a; - } -} -class HSLA { - constructor(h, s, l, a) { - this.h = Math.max(Math.min(360, h), 0) | 0; - this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); - this.l = roundFloat(Math.max(Math.min(1, l), 0), 3); - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a; - } - /** - * Converts an RGB color value to HSL. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes r, g, and b are contained in the set [0, 255] and - * returns h in the set [0, 360], s, and l in the set [0, 1]. - */ - static fromRGBA(rgba) { - const r = rgba.r / 255; - const g = rgba.g / 255; - const b = rgba.b / 255; - const a = rgba.a; - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - let h = 0; - let s = 0; - const l = (min + max) / 2; - const chroma = max - min; - if (chroma > 0) { - s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1); - switch (max) { - case r: - h = (g - b) / chroma + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / chroma + 2; - break; - case b: - h = (r - g) / chroma + 4; - break; - } - h *= 60; - h = Math.round(h); - } - return new HSLA(h, s, l, a); - } - static _hue2rgb(p, q, t) { - if (t < 0) { - t += 1; - } - if (t > 1) { - t -= 1; - } - if (t < 1 / 6) { - return p + (q - p) * 6 * t; - } - if (t < 1 / 2) { - return q; - } - if (t < 2 / 3) { - return p + (q - p) * (2 / 3 - t) * 6; - } - return p; - } - /** - * Converts an HSL color value to RGB. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and - * returns r, g, and b in the set [0, 255]. - */ - static toRGBA(hsla) { - const h = hsla.h / 360; - const { s, l, a } = hsla; - let r, g, b; - if (s === 0) { - r = g = b = l; // achromatic - } - else { - const q = l < 0.5 ? l * (1 + s) : l + s - l * s; - const p = 2 * l - q; - r = HSLA._hue2rgb(p, q, h + 1 / 3); - g = HSLA._hue2rgb(p, q, h); - b = HSLA._hue2rgb(p, q, h - 1 / 3); - } - return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a); - } -} -class HSVA { - constructor(h, s, v, a) { - this.h = Math.max(Math.min(360, h), 0) | 0; - this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); - this.v = roundFloat(Math.max(Math.min(1, v), 0), 3); - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a; - } - // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm - static fromRGBA(rgba) { - const r = rgba.r / 255; - const g = rgba.g / 255; - const b = rgba.b / 255; - const cmax = Math.max(r, g, b); - const cmin = Math.min(r, g, b); - const delta = cmax - cmin; - const s = cmax === 0 ? 0 : (delta / cmax); - let m; - if (delta === 0) { - m = 0; - } - else if (cmax === r) { - m = ((((g - b) / delta) % 6) + 6) % 6; - } - else if (cmax === g) { - m = ((b - r) / delta) + 2; - } - else { - m = ((r - g) / delta) + 4; - } - return new HSVA(Math.round(m * 60), s, cmax, rgba.a); - } - // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm - static toRGBA(hsva) { - const { h, s, v, a } = hsva; - const c = v * s; - const x = c * (1 - Math.abs((h / 60) % 2 - 1)); - const m = v - c; - let [r, g, b] = [0, 0, 0]; - if (h < 60) { - r = c; - g = x; - } - else if (h < 120) { - r = x; - g = c; - } - else if (h < 180) { - g = c; - b = x; - } - else if (h < 240) { - g = x; - b = c; - } - else if (h < 300) { - r = x; - b = c; - } - else if (h < 360) { - r = c; - b = x; - } - r = Math.round((r + m) * 255); - g = Math.round((g + m) * 255); - b = Math.round((b + m) * 255); - return new RGBA(r, g, b, a); - } -} -class Color { - constructor(arg) { - if (!arg) { - throw new Error('Color needs a value'); - } - else if (arg instanceof RGBA) { - this.rgba = arg; - } - else if (arg instanceof HSLA) { - this._hsla = arg; - this.rgba = HSLA.toRGBA(arg); - } - else if (arg instanceof HSVA) { - this._hsva = arg; - this.rgba = HSVA.toRGBA(arg); - } - else { - throw new Error('Invalid color ctor argument'); - } - } - static fromHex(hex) { - return Color.Format.CSS.parseHex(hex) || Color.red; - } - get hsla() { - if (this._hsla) { - return this._hsla; - } - else { - return HSLA.fromRGBA(this.rgba); - } - } - get hsva() { - if (this._hsva) { - return this._hsva; - } - return HSVA.fromRGBA(this.rgba); - } - equals(other) { - return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva); - } - /** - * http://www.w3.org/TR/WCAG20/#relativeluminancedef - * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. - */ - getRelativeLuminance() { - const R = Color._relativeLuminanceForComponent(this.rgba.r); - const G = Color._relativeLuminanceForComponent(this.rgba.g); - const B = Color._relativeLuminanceForComponent(this.rgba.b); - const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B; - return roundFloat(luminance, 4); - } - static _relativeLuminanceForComponent(color) { - const c = color / 255; - return (c <= 0.03928) ? c / 12.92 : Math.pow(((c + 0.055) / 1.055), 2.4); - } - /** - * http://24ways.org/2010/calculating-color-contrast - * Return 'true' if lighter color otherwise 'false' - */ - isLighter() { - const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1000; - return yiq >= 128; - } - isLighterThan(another) { - const lum1 = this.getRelativeLuminance(); - const lum2 = another.getRelativeLuminance(); - return lum1 > lum2; - } - isDarkerThan(another) { - const lum1 = this.getRelativeLuminance(); - const lum2 = another.getRelativeLuminance(); - return lum1 < lum2; - } - lighten(factor) { - return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a)); - } - darken(factor) { - return new Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a)); - } - transparent(factor) { - const { r, g, b, a } = this.rgba; - return new Color(new RGBA(r, g, b, a * factor)); - } - isTransparent() { - return this.rgba.a === 0; - } - isOpaque() { - return this.rgba.a === 1; - } - opposite() { - return new Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); - } - toString() { - return '' + Color.Format.CSS.format(this); - } - static getLighterColor(of, relative, factor) { - if (of.isLighterThan(relative)) { - return of; - } - factor = factor ? factor : 0.5; - const lum1 = of.getRelativeLuminance(); - const lum2 = relative.getRelativeLuminance(); - factor = factor * (lum2 - lum1) / lum2; - return of.lighten(factor); - } - static getDarkerColor(of, relative, factor) { - if (of.isDarkerThan(relative)) { - return of; - } - factor = factor ? factor : 0.5; - const lum1 = of.getRelativeLuminance(); - const lum2 = relative.getRelativeLuminance(); - factor = factor * (lum1 - lum2) / lum1; - return of.darken(factor); - } -} -Color.white = new Color(new RGBA(255, 255, 255, 1)); -Color.black = new Color(new RGBA(0, 0, 0, 1)); -Color.red = new Color(new RGBA(255, 0, 0, 1)); -Color.blue = new Color(new RGBA(0, 0, 255, 1)); -Color.cyan = new Color(new RGBA(0, 255, 255, 1)); -Color.lightgrey = new Color(new RGBA(211, 211, 211, 1)); -Color.transparent = new Color(new RGBA(0, 0, 0, 0)); -(function (Color) { - let Format; - (function (Format) { - let CSS; - (function (CSS) { - function formatRGB(color) { - if (color.rgba.a === 1) { - return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`; - } - return Color.Format.CSS.formatRGBA(color); - } - CSS.formatRGB = formatRGB; - function formatRGBA(color) { - return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+(color.rgba.a).toFixed(2)})`; - } - CSS.formatRGBA = formatRGBA; - function formatHSL(color) { - if (color.hsla.a === 1) { - return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`; - } - return Color.Format.CSS.formatHSLA(color); - } - CSS.formatHSL = formatHSL; - function formatHSLA(color) { - return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`; - } - CSS.formatHSLA = formatHSLA; - function _toTwoDigitHex(n) { - const r = n.toString(16); - return r.length !== 2 ? '0' + r : r; - } - /** - * Formats the color as #RRGGBB - */ - function formatHex(color) { - return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`; - } - CSS.formatHex = formatHex; - /** - * Formats the color as #RRGGBBAA - * If 'compact' is set, colors without transparancy will be printed as #RRGGBB - */ - function formatHexA(color, compact = false) { - if (compact && color.rgba.a === 1) { - return Color.Format.CSS.formatHex(color); - } - return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`; - } - CSS.formatHexA = formatHexA; - /** - * The default format will use HEX if opaque and RGBA otherwise. - */ - function format(color) { - if (color.isOpaque()) { - return Color.Format.CSS.formatHex(color); - } - return Color.Format.CSS.formatRGBA(color); - } - CSS.format = format; - /** - * Converts an Hex color value to a Color. - * returns r, g, and b are contained in the set [0, 255] - * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA). - */ - function parseHex(hex) { - const length = hex.length; - if (length === 0) { - // Invalid color - return null; - } - if (hex.charCodeAt(0) !== 35 /* Hash */) { - // Does not begin with a # - return null; - } - if (length === 7) { - // #RRGGBB format - const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); - const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); - const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); - return new Color(new RGBA(r, g, b, 1)); - } - if (length === 9) { - // #RRGGBBAA format - const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); - const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); - const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); - const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8)); - return new Color(new RGBA(r, g, b, a / 255)); - } - if (length === 4) { - // #RGB format - const r = _parseHexDigit(hex.charCodeAt(1)); - const g = _parseHexDigit(hex.charCodeAt(2)); - const b = _parseHexDigit(hex.charCodeAt(3)); - return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b)); - } - if (length === 5) { - // #RGBA format - const r = _parseHexDigit(hex.charCodeAt(1)); - const g = _parseHexDigit(hex.charCodeAt(2)); - const b = _parseHexDigit(hex.charCodeAt(3)); - const a = _parseHexDigit(hex.charCodeAt(4)); - return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255)); - } - // Invalid color - return null; - } - CSS.parseHex = parseHex; - function _parseHexDigit(charCode) { - switch (charCode) { - case 48 /* Digit0 */: return 0; - case 49 /* Digit1 */: return 1; - case 50 /* Digit2 */: return 2; - case 51 /* Digit3 */: return 3; - case 52 /* Digit4 */: return 4; - case 53 /* Digit5 */: return 5; - case 54 /* Digit6 */: return 6; - case 55 /* Digit7 */: return 7; - case 56 /* Digit8 */: return 8; - case 57 /* Digit9 */: return 9; - case 97 /* a */: return 10; - case 65 /* A */: return 10; - case 98 /* b */: return 11; - case 66 /* B */: return 11; - case 99 /* c */: return 12; - case 67 /* C */: return 12; - case 100 /* d */: return 13; - case 68 /* D */: return 13; - case 101 /* e */: return 14; - case 69 /* E */: return 14; - case 102 /* f */: return 15; - case 70 /* F */: return 15; - } - return 0; - } - })(CSS = Format.CSS || (Format.CSS = {})); - })(Format = Color.Format || (Color.Format = {})); -})(Color || (Color = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/comparers.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/comparers.js ***! - \********************************************************************/ -/*! exports provided: compareFileNames, compareAnything, compareByPrefix */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareFileNames", function() { return compareFileNames; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareAnything", function() { return compareAnything; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareByPrefix", function() { return compareByPrefix; }); -/* harmony import */ var _async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); - -// When comparing large numbers of strings, such as in sorting large arrays, is better for -// performance to create an Intl.Collator object and use the function provided by its compare -// property than it is to use String.prototype.localeCompare() -// A collator with numeric sorting enabled, and no sensitivity to case or to accents -const intlFileNameCollatorBaseNumeric = new _async_js__WEBPACK_IMPORTED_MODULE_0__["IdleValue"](() => { - const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }); - return { - collator: collator, - collatorIsNumeric: collator.resolvedOptions().numeric - }; -}); /** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */ -function compareFileNames(one, other, caseSensitive = false) { - const a = one || ''; - const b = other || ''; - const result = intlFileNameCollatorBaseNumeric.value.collator.compare(a, b); - // Using the numeric option in the collator will - // make compare(`foo1`, `foo01`) === 0. We must disambiguate. - if (intlFileNameCollatorBaseNumeric.value.collatorIsNumeric && result === 0 && a !== b) { - return a < b ? -1 : 1; - } - return result; -} -function compareAnything(one, other, lookFor) { - const elementAName = one.toLowerCase(); - const elementBName = other.toLowerCase(); - // Sort prefix matches over non prefix matches - const prefixCompare = compareByPrefix(one, other, lookFor); - if (prefixCompare) { - return prefixCompare; - } - // Sort suffix matches over non suffix matches - const elementASuffixMatch = elementAName.endsWith(lookFor); - const elementBSuffixMatch = elementBName.endsWith(lookFor); - if (elementASuffixMatch !== elementBSuffixMatch) { - return elementASuffixMatch ? -1 : 1; - } - // Understand file names - const r = compareFileNames(elementAName, elementBName); - if (r !== 0) { - return r; - } - // Compare by name - return elementAName.localeCompare(elementBName); -} -function compareByPrefix(one, other, lookFor) { - const elementAName = one.toLowerCase(); - const elementBName = other.toLowerCase(); - // Sort prefix matches over non prefix matches - const elementAPrefixMatch = elementAName.startsWith(lookFor); - const elementBPrefixMatch = elementBName.startsWith(lookFor); - if (elementAPrefixMatch !== elementBPrefixMatch) { - return elementAPrefixMatch ? -1 : 1; - } - // Same prefix: Sort shorter matches to the top to have those on top that match more precisely - else if (elementAPrefixMatch && elementBPrefixMatch) { - if (elementAName.length < elementBName.length) { - return -1; - } - if (elementAName.length > elementBName.length) { - return 1; - } - } - return 0; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/decorators.js ***! - \*********************************************************************/ -/*! exports provided: createMemoizer, memoize */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoizer", function() { return createMemoizer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return memoize; }); -let memoizeId = 0; -function createMemoizer() { - const memoizeKeyPrefix = `$memoize${memoizeId++}`; - let self = undefined; - const result = function memoize(target, key, descriptor) { - let fnKey = null; - let fn = null; - if (typeof descriptor.value === 'function') { - fnKey = 'value'; - fn = descriptor.value; - if (fn.length !== 0) { - console.warn('Memoize should only be used in functions with zero parameters'); - } - } - else if (typeof descriptor.get === 'function') { - fnKey = 'get'; - fn = descriptor.get; - } - if (!fn) { - throw new Error('not supported'); - } - const memoizeKey = `${memoizeKeyPrefix}:${key}`; - descriptor[fnKey] = function (...args) { - self = this; - if (!this.hasOwnProperty(memoizeKey)) { - Object.defineProperty(this, memoizeKey, { - configurable: true, - enumerable: false, - writable: true, - value: fn.apply(this, args) - }); - } - return this[memoizeKey]; - }; - }; - result.clear = () => { - if (typeof self === 'undefined') { - return; - } - Object.getOwnPropertyNames(self).forEach(property => { - if (property.indexOf(memoizeKeyPrefix) === 0) { - delete self[property]; - } - }); - }; - return result; -} -function memoize(target, key, descriptor) { - return createMemoizer()(target, key, descriptor); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js ***! - \********************************************************************/ -/*! exports provided: StringDiffSequence, stringDiff, Debug, MyArray, LcsDiff */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringDiffSequence", function() { return StringDiffSequence; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringDiff", function() { return stringDiff; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Debug", function() { return Debug; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MyArray", function() { return MyArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LcsDiff", function() { return LcsDiff; }); -/* harmony import */ var _diffChange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./diffChange.js */ "./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js"); -/* harmony import */ var _hash_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hash.js */ "./node_modules/monaco-editor/esm/vs/base/common/hash.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class StringDiffSequence { - constructor(source) { - this.source = source; - } - getElements() { - const source = this.source; - const characters = new Int32Array(source.length); - for (let i = 0, len = source.length; i < len; i++) { - characters[i] = source.charCodeAt(i); - } - return characters; - } -} -function stringDiff(original, modified, pretty) { - return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes; -} -// -// The code below has been ported from a C# implementation in VS -// -class Debug { - static Assert(condition, message) { - if (!condition) { - throw new Error(message); - } - } -} -class MyArray { - /** - * Copies a range of elements from an Array starting at the specified source index and pastes - * them to another Array starting at the specified destination index. The length and the indexes - * are specified as 64-bit integers. - * sourceArray: - * The Array that contains the data to copy. - * sourceIndex: - * A 64-bit integer that represents the index in the sourceArray at which copying begins. - * destinationArray: - * The Array that receives the data. - * destinationIndex: - * A 64-bit integer that represents the index in the destinationArray at which storing begins. - * length: - * A 64-bit integer that represents the number of elements to copy. - */ - static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } - } - static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } - } -} -/** - * A utility class which helps to create the set of DiffChanges from - * a difference operation. This class accepts original DiffElements and - * modified DiffElements that are involved in a particular change. The - * MarktNextChange() method can be called to mark the separation between - * distinct changes. At the end, the Changes property can be called to retrieve - * the constructed changes. - */ -class DiffChangeHelper { - /** - * Constructs a new DiffChangeHelper for the given DiffSequences. - */ - constructor() { - this.m_changes = []; - this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - this.m_originalCount = 0; - this.m_modifiedCount = 0; - } - /** - * Marks the beginning of the next change in the set of differences. - */ - MarkNextChange() { - // Only add to the list if there is something to add - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - // Add the new change to our list - this.m_changes.push(new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount)); - } - // Reset for the next change - this.m_originalCount = 0; - this.m_modifiedCount = 0; - this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - } - /** - * Adds the original element at the given position to the elements - * affected by the current change. The modified index gives context - * to the change position with respect to the original sequence. - * @param originalIndex The index of the original element to add. - * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence. - */ - AddOriginalElement(originalIndex, modifiedIndex) { - // The 'true' start index is the smallest of the ones we've seen - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_originalCount++; - } - /** - * Adds the modified element at the given position to the elements - * affected by the current change. The original index gives context - * to the change position with respect to the modified sequence. - * @param originalIndex The index of the original element that provides corresponding position in the original sequence. - * @param modifiedIndex The index of the modified element to add. - */ - AddModifiedElement(originalIndex, modifiedIndex) { - // The 'true' start index is the smallest of the ones we've seen - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_modifiedCount++; - } - /** - * Retrieves all of the changes marked by the class. - */ - getChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - // Finish up on whatever is left - this.MarkNextChange(); - } - return this.m_changes; - } - /** - * Retrieves all of the changes marked by the class in the reverse order - */ - getReverseChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - // Finish up on whatever is left - this.MarkNextChange(); - } - this.m_changes.reverse(); - return this.m_changes; - } -} -/** - * An implementation of the difference algorithm described in - * "An O(ND) Difference Algorithm and its variations" by Eugene W. Myers - */ -class LcsDiff { - /** - * Constructs the DiffFinder - */ - constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) { - this.ContinueProcessingPredicate = continueProcessingPredicate; - const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence); - const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence); - this._hasStrings = (originalHasStrings && modifiedHasStrings); - this._originalStringElements = originalStringElements; - this._originalElementsOrHash = originalElementsOrHash; - this._modifiedStringElements = modifiedStringElements; - this._modifiedElementsOrHash = modifiedElementsOrHash; - this.m_forwardHistory = []; - this.m_reverseHistory = []; - } - static _isStringArray(arr) { - return (arr.length > 0 && typeof arr[0] === 'string'); - } - static _getElements(sequence) { - const elements = sequence.getElements(); - if (LcsDiff._isStringArray(elements)) { - const hashes = new Int32Array(elements.length); - for (let i = 0, len = elements.length; i < len; i++) { - hashes[i] = Object(_hash_js__WEBPACK_IMPORTED_MODULE_1__["stringHash"])(elements[i], 0); - } - return [elements, hashes, true]; - } - if (elements instanceof Int32Array) { - return [[], elements, false]; - } - return [[], new Int32Array(elements), false]; - } - ElementsAreEqual(originalIndex, newIndex) { - if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) { - return false; - } - return (this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true); - } - OriginalElementsAreEqual(index1, index2) { - if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) { - return false; - } - return (this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true); - } - ModifiedElementsAreEqual(index1, index2) { - if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) { - return false; - } - return (this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true); - } - ComputeDiff(pretty) { - return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty); - } - /** - * Computes the differences between the original and modified input - * sequences on the bounded range. - * @returns An array of the differences between the two input sequences. - */ - _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) { - const quitEarlyArr = [false]; - let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr); - if (pretty) { - // We have to clean up the computed diff to be more intuitive - // but it turns out this cannot be done correctly until the entire set - // of diffs have been computed - changes = this.PrettifyChanges(changes); - } - return { - quitEarly: quitEarlyArr[0], - changes: changes - }; - } - /** - * Private helper method which computes the differences on the bounded range - * recursively. - * @returns An array of the differences between the two input sequences. - */ - ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) { - quitEarlyArr[0] = false; - // Find the start of the differences - while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) { - originalStart++; - modifiedStart++; - } - // Find the end of the differences - while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) { - originalEnd--; - modifiedEnd--; - } - // In the special case where we either have all insertions or all deletions or the sequences are identical - if (originalStart > originalEnd || modifiedStart > modifiedEnd) { - let changes; - if (modifiedStart <= modifiedEnd) { - Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd'); - // All insertions - changes = [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } - else if (originalStart <= originalEnd) { - Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd'); - // All deletions - changes = [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStart, originalEnd - originalStart + 1, modifiedStart, 0) - ]; - } - else { - Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd'); - Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd'); - // Identical sequences - No differences - changes = []; - } - return changes; - } - // This problem can be solved using the Divide-And-Conquer technique. - const midOriginalArr = [0]; - const midModifiedArr = [0]; - const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr); - const midOriginal = midOriginalArr[0]; - const midModified = midModifiedArr[0]; - if (result !== null) { - // Result is not-null when there was enough memory to compute the changes while - // searching for the recursion point - return result; - } - else if (!quitEarlyArr[0]) { - // We can break the problem down recursively by finding the changes in the - // First Half: (originalStart, modifiedStart) to (midOriginal, midModified) - // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd) - // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point - const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr); - let rightChanges = []; - if (!quitEarlyArr[0]) { - rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr); - } - else { - // We did't have time to finish the first half, so we don't have time to compute this half. - // Consider the entire rest of the sequence different. - rightChanges = [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1) - ]; - } - return this.ConcatenateChanges(leftChanges, rightChanges); - } - // If we hit here, we quit early, and so can't return anything meaningful - return [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } - WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) { - let forwardChanges = null; - let reverseChanges = null; - // First, walk backward through the forward diagonals history - let changeHelper = new DiffChangeHelper(); - let diagonalMin = diagonalForwardStart; - let diagonalMax = diagonalForwardEnd; - let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset; - let lastOriginalIndex = -1073741824 /* MIN_SAFE_SMALL_INTEGER */; - let historyIndex = this.m_forwardHistory.length - 1; - do { - // Get the diagonal index from the relative diagonal number - const diagonal = diagonalRelative + diagonalForwardBase; - // Figure out where we came from - if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) { - // Vertical line (the element is an insert) - originalIndex = forwardPoints[diagonal + 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex); - diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration - } - else { - // Horizontal line (the element is a deletion) - originalIndex = forwardPoints[diagonal - 1] + 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex - 1; - changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1); - diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration - } - if (historyIndex >= 0) { - forwardPoints = this.m_forwardHistory[historyIndex]; - diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot - diagonalMin = 1; - diagonalMax = forwardPoints.length - 1; - } - } while (--historyIndex >= -1); - // Ironically, we get the forward changes as the reverse of the - // order we added them since we technically added them backwards - forwardChanges = changeHelper.getReverseChanges(); - if (quitEarlyArr[0]) { - // TODO: Calculate a partial from the reverse diagonals. - // For now, just assume everything after the midOriginal/midModified point is a diff - let originalStartPoint = midOriginalArr[0] + 1; - let modifiedStartPoint = midModifiedArr[0] + 1; - if (forwardChanges !== null && forwardChanges.length > 0) { - const lastForwardChange = forwardChanges[forwardChanges.length - 1]; - originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd()); - modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd()); - } - reverseChanges = [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1) - ]; - } - else { - // Now walk backward through the reverse diagonals history - changeHelper = new DiffChangeHelper(); - diagonalMin = diagonalReverseStart; - diagonalMax = diagonalReverseEnd; - diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset; - lastOriginalIndex = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; - do { - // Get the diagonal index from the relative diagonal number - const diagonal = diagonalRelative + diagonalReverseBase; - // Figure out where we came from - if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) { - // Horizontal line (the element is a deletion)) - originalIndex = reversePoints[diagonal + 1] - 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex + 1; - changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration - } - else { - // Vertical line (the element is an insertion) - originalIndex = reversePoints[diagonal - 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration - } - if (historyIndex >= 0) { - reversePoints = this.m_reverseHistory[historyIndex]; - diagonalReverseBase = reversePoints[0]; //We stored this in the first spot - diagonalMin = 1; - diagonalMax = reversePoints.length - 1; - } - } while (--historyIndex >= -1); - // There are cases where the reverse history will find diffs that - // are correct, but not intuitive, so we need shift them. - reverseChanges = changeHelper.getChanges(); - } - return this.ConcatenateChanges(forwardChanges, reverseChanges); - } - /** - * Given the range to compute the diff on, this method finds the point: - * (midOriginal, midModified) - * that exists in the middle of the LCS of the two sequences and - * is the point at which the LCS problem may be broken down recursively. - * This method will try to keep the LCS trace in memory. If the LCS recursion - * point is calculated and the full trace is available in memory, then this method - * will return the change list. - * @param originalStart The start bound of the original sequence range - * @param originalEnd The end bound of the original sequence range - * @param modifiedStart The start bound of the modified sequence range - * @param modifiedEnd The end bound of the modified sequence range - * @param midOriginal The middle point of the original sequence range - * @param midModified The middle point of the modified sequence range - * @returns The diff changes, if available, otherwise null - */ - ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) { - let originalIndex = 0, modifiedIndex = 0; - let diagonalForwardStart = 0, diagonalForwardEnd = 0; - let diagonalReverseStart = 0, diagonalReverseEnd = 0; - // To traverse the edit graph and produce the proper LCS, our actual - // start position is just outside the given boundary - originalStart--; - modifiedStart--; - // We set these up to make the compiler happy, but they will - // be replaced before we return with the actual recursion point - midOriginalArr[0] = 0; - midModifiedArr[0] = 0; - // Clear out the history - this.m_forwardHistory = []; - this.m_reverseHistory = []; - // Each cell in the two arrays corresponds to a diagonal in the edit graph. - // The integer value in the cell represents the originalIndex of the furthest - // reaching point found so far that ends in that diagonal. - // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number. - const maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart); - const numDiagonals = maxDifferences + 1; - const forwardPoints = new Int32Array(numDiagonals); - const reversePoints = new Int32Array(numDiagonals); - // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart) - // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd) - const diagonalForwardBase = (modifiedEnd - modifiedStart); - const diagonalReverseBase = (originalEnd - originalStart); - // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the - // diagonal number (relative to diagonalForwardBase) - // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the - // diagonal number (relative to diagonalReverseBase) - const diagonalForwardOffset = (originalStart - modifiedStart); - const diagonalReverseOffset = (originalEnd - modifiedEnd); - // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers - // relative to the start diagonal with diagonal numbers relative to the end diagonal. - // The Even/Oddn-ness of this delta is important for determining when we should check for overlap - const delta = diagonalReverseBase - diagonalForwardBase; - const deltaIsEven = (delta % 2 === 0); - // Here we set up the start and end points as the furthest points found so far - // in both the forward and reverse directions, respectively - forwardPoints[diagonalForwardBase] = originalStart; - reversePoints[diagonalReverseBase] = originalEnd; - // Remember if we quit early, and thus need to do a best-effort result instead of a real result. - quitEarlyArr[0] = false; - // A couple of points: - // --With this method, we iterate on the number of differences between the two sequences. - // The more differences there actually are, the longer this will take. - // --Also, as the number of differences increases, we have to search on diagonals further - // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse). - // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences - // is even and odd diagonals only when numDifferences is odd. - for (let numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) { - let furthestOriginalIndex = 0; - let furthestModifiedIndex = 0; - // Run the algorithm in the forward direction - diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) { - // STEP 1: We extend the furthest reaching point in the present diagonal - // by looking at the diagonals above and below and picking the one whose point - // is further away from the start point (originalStart, modifiedStart) - if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) { - originalIndex = forwardPoints[diagonal + 1]; - } - else { - originalIndex = forwardPoints[diagonal - 1] + 1; - } - modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset; - // Save the current originalIndex so we can test for false overlap in step 3 - const tempOriginalIndex = originalIndex; - // STEP 2: We can continue to extend the furthest reaching point in the present diagonal - // so long as the elements are equal. - while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) { - originalIndex++; - modifiedIndex++; - } - forwardPoints[diagonal] = originalIndex; - if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) { - furthestOriginalIndex = originalIndex; - furthestModifiedIndex = modifiedIndex; - } - // STEP 3: If delta is odd (overlap first happens on forward when delta is odd) - // and diagonal is in the range of reverse diagonals computed for numDifferences-1 - // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet) - // then check for overlap. - if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) { - if (originalIndex >= reversePoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex <= reversePoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) { - // BINGO! We overlapped, and we have the full trace in memory! - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } - else { - // Either false overlap, or we didn't have enough memory for the full trace - // Just return the recursion point - return null; - } - } - } - } - // Check to see if we should be quitting early, before moving on to the next iteration. - const matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2; - if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) { - // We can't finish, so skip ahead to generating a result from what we have. - quitEarlyArr[0] = true; - // Use the furthest distance we got in the forward direction. - midOriginalArr[0] = furthestOriginalIndex; - midModifiedArr[0] = furthestModifiedIndex; - if (matchLengthOfLongest > 0 && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) { - // Enough of the history is in memory to walk it backwards - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } - else { - // We didn't actually remember enough of the history. - //Since we are quiting the diff early, we need to shift back the originalStart and modified start - //back into the boundary limits since we decremented their value above beyond the boundary limit. - originalStart++; - modifiedStart++; - return [ - new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } - } - // Run the algorithm in the reverse direction - diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) { - // STEP 1: We extend the furthest reaching point in the present diagonal - // by looking at the diagonals above and below and picking the one whose point - // is further away from the start point (originalEnd, modifiedEnd) - if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) { - originalIndex = reversePoints[diagonal + 1] - 1; - } - else { - originalIndex = reversePoints[diagonal - 1]; - } - modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset; - // Save the current originalIndex so we can test for false overlap - const tempOriginalIndex = originalIndex; - // STEP 2: We can continue to extend the furthest reaching point in the present diagonal - // as long as the elements are equal. - while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) { - originalIndex--; - modifiedIndex--; - } - reversePoints[diagonal] = originalIndex; - // STEP 4: If delta is even (overlap first happens on reverse when delta is even) - // and diagonal is in the range of forward diagonals computed for numDifferences - // then check for overlap. - if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) { - if (originalIndex <= forwardPoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) { - // BINGO! We overlapped, and we have the full trace in memory! - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } - else { - // Either false overlap, or we didn't have enough memory for the full trace - // Just return the recursion point - return null; - } - } - } - } - // Save current vectors to history before the next iteration - if (numDifferences <= 1447 /* MaxDifferencesHistory */) { - // We are allocating space for one extra int, which we fill with - // the index of the diagonal base index - let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2); - temp[0] = diagonalForwardBase - diagonalForwardStart + 1; - MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1); - this.m_forwardHistory.push(temp); - temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2); - temp[0] = diagonalReverseBase - diagonalReverseStart + 1; - MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1); - this.m_reverseHistory.push(temp); - } - } - // If we got here, then we have the full trace in history. We just have to convert it to a change list - // NOTE: This part is a bit messy - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } - /** - * Shifts the given changes to provide a more intuitive diff. - * While the first element in a diff matches the first element after the diff, - * we shift the diff down. - * - * @param changes The list of changes to shift - * @returns The shifted changes - */ - PrettifyChanges(changes) { - // Shift all the changes down first - for (let i = 0; i < changes.length; i++) { - const change = changes[i]; - const originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this._originalElementsOrHash.length; - const modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length; - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - while (change.originalStart + change.originalLength < originalStop && - change.modifiedStart + change.modifiedLength < modifiedStop && - (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && - (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) { - change.originalStart++; - change.modifiedStart++; - } - let mergedChangeArr = [null]; - if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) { - changes[i] = mergedChangeArr[0]; - changes.splice(i + 1, 1); - i--; - continue; - } - } - // Shift changes back up until we hit empty or whitespace-only lines - for (let i = changes.length - 1; i >= 0; i--) { - const change = changes[i]; - let originalStop = 0; - let modifiedStop = 0; - if (i > 0) { - const prevChange = changes[i - 1]; - if (prevChange.originalLength > 0) { - originalStop = prevChange.originalStart + prevChange.originalLength; - } - if (prevChange.modifiedLength > 0) { - modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength; - } - } - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - let bestDelta = 0; - let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength); - for (let delta = 1;; delta++) { - const originalStart = change.originalStart - delta; - const modifiedStart = change.modifiedStart - delta; - if (originalStart < originalStop || modifiedStart < modifiedStop) { - break; - } - if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) { - break; - } - if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) { - break; - } - const score = this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength); - if (score > bestScore) { - bestScore = score; - bestDelta = delta; - } - } - change.originalStart -= bestDelta; - change.modifiedStart -= bestDelta; - } - return changes; - } - _OriginalIsBoundary(index) { - if (index <= 0 || index >= this._originalElementsOrHash.length - 1) { - return true; - } - return (this._hasStrings && /^\s*$/.test(this._originalStringElements[index])); - } - _OriginalRegionIsBoundary(originalStart, originalLength) { - if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) { - return true; - } - if (originalLength > 0) { - const originalEnd = originalStart + originalLength; - if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) { - return true; - } - } - return false; - } - _ModifiedIsBoundary(index) { - if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) { - return true; - } - return (this._hasStrings && /^\s*$/.test(this._modifiedStringElements[index])); - } - _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) { - if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) { - return true; - } - if (modifiedLength > 0) { - const modifiedEnd = modifiedStart + modifiedLength; - if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) { - return true; - } - } - return false; - } - _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) { - const originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0); - const modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0); - return (originalScore + modifiedScore); - } - /** - * Concatenates the two input DiffChange lists and returns the resulting - * list. - * @param The left changes - * @param The right changes - * @returns The concatenated list - */ - ConcatenateChanges(left, right) { - let mergedChangeArr = []; - if (left.length === 0 || right.length === 0) { - return (right.length > 0) ? right : left; - } - else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) { - // Since we break the problem down recursively, it is possible that we - // might recurse in the middle of a change thereby splitting it into - // two changes. Here in the combining stage, we detect and fuse those - // changes back together - const result = new Array(left.length + right.length - 1); - MyArray.Copy(left, 0, result, 0, left.length - 1); - result[left.length - 1] = mergedChangeArr[0]; - MyArray.Copy(right, 1, result, left.length, right.length - 1); - return result; - } - else { - const result = new Array(left.length + right.length); - MyArray.Copy(left, 0, result, 0, left.length); - MyArray.Copy(right, 0, result, left.length, right.length); - return result; - } - } - /** - * Returns true if the two changes overlap and can be merged into a single - * change - * @param left The left change - * @param right The right change - * @param mergedChange The merged change if the two overlap, null otherwise - * @returns True if the two changes overlap - */ - ChangesOverlap(left, right, mergedChangeArr) { - Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change'); - Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change'); - if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - const originalStart = left.originalStart; - let originalLength = left.originalLength; - const modifiedStart = left.modifiedStart; - let modifiedLength = left.modifiedLength; - if (left.originalStart + left.originalLength >= right.originalStart) { - originalLength = right.originalStart + right.originalLength - left.originalStart; - } - if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart; - } - mergedChangeArr[0] = new _diffChange_js__WEBPACK_IMPORTED_MODULE_0__["DiffChange"](originalStart, originalLength, modifiedStart, modifiedLength); - return true; - } - else { - mergedChangeArr[0] = null; - return false; - } - } - /** - * Helper method used to clip a diagonal index to the range of valid - * diagonals. This also decides whether or not the diagonal index, - * if it exceeds the boundary, should be clipped to the boundary or clipped - * one inside the boundary depending on the Even/Odd status of the boundary - * and numDifferences. - * @param diagonal The index of the diagonal to clip. - * @param numDifferences The current number of differences being iterated upon. - * @param diagonalBaseIndex The base reference diagonal. - * @param numDiagonals The total number of diagonals. - * @returns The clipped diagonal index. - */ - ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) { - if (diagonal >= 0 && diagonal < numDiagonals) { - // Nothing to clip, its in range - return diagonal; - } - // diagonalsBelow: The number of diagonals below the reference diagonal - // diagonalsAbove: The number of diagonals above the reference diagonal - const diagonalsBelow = diagonalBaseIndex; - const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1; - const diffEven = (numDifferences % 2 === 0); - if (diagonal < 0) { - const lowerBoundEven = (diagonalsBelow % 2 === 0); - return (diffEven === lowerBoundEven) ? 0 : 1; - } - else { - const upperBoundEven = (diagonalsAbove % 2 === 0); - return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js ***! - \**************************************************************************/ -/*! exports provided: DiffChange */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffChange", function() { return DiffChange; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * Represents information about a specific difference between two sequences. - */ -class DiffChange { - /** - * Constructs a new DiffChange with the given sequence information - * and content. - */ - constructor(originalStart, originalLength, modifiedStart, modifiedLength) { - //Debug.Assert(originalLength > 0 || modifiedLength > 0, "originalLength and modifiedLength cannot both be <= 0"); - this.originalStart = originalStart; - this.originalLength = originalLength; - this.modifiedStart = modifiedStart; - this.modifiedLength = modifiedLength; - } - /** - * The end point (exclusive) of the change in the original sequence. - */ - getOriginalEnd() { - return this.originalStart + this.originalLength; - } - /** - * The end point (exclusive) of the change in the modified sequence. - */ - getModifiedEnd() { - return this.modifiedStart + this.modifiedLength; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js ***! - \***********************************************************************/ -/*! exports provided: toErrorMessage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toErrorMessage", function() { return toErrorMessage; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -function exceptionToErrorMessage(exception, verbose) { - if (verbose && (exception.stack || exception.stacktrace)) { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('stackTrace.format', "{0}: {1}", detectSystemErrorMessage(exception), stackToString(exception.stack) || stackToString(exception.stacktrace)); - } - return detectSystemErrorMessage(exception); -} -function stackToString(stack) { - if (Array.isArray(stack)) { - return stack.join('\n'); - } - return stack; -} -function detectSystemErrorMessage(exception) { - // See https://nodejs.org/api/errors.html#errors_class_system_error - if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('nodeExceptionMessage', "A system error occurred ({0})", exception.message); - } - return exception.message || _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('error.defaultMessage', "An unknown error occurred. Please consult the log for more details."); -} -/** - * Tries to generate a human readable error message out of the error. If the verbose parameter - * is set to true, the error message will include stacktrace details if provided. - * - * @returns A string containing the error message. - */ -function toErrorMessage(error = null, verbose = false) { - if (!error) { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('error.defaultMessage', "An unknown error occurred. Please consult the log for more details."); - } - if (Array.isArray(error)) { - const errors = _arrays_js__WEBPACK_IMPORTED_MODULE_2__["coalesce"](error); - const msg = toErrorMessage(errors[0], verbose); - if (errors.length > 1) { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('error.moreErrors', "{0} ({1} errors in total)", msg, errors.length); - } - return msg; - } - if (_types_js__WEBPACK_IMPORTED_MODULE_1__["isString"](error)) { - return error; - } - if (error.detail) { - const detail = error.detail; - if (detail.error) { - return exceptionToErrorMessage(detail.error, verbose); - } - if (detail.exception) { - return exceptionToErrorMessage(detail.exception, verbose); - } - } - if (error.stack) { - return exceptionToErrorMessage(error, verbose); - } - if (error.message) { - return error.message; - } - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('error.defaultMessage', "An unknown error occurred. Please consult the log for more details."); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/errors.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/errors.js ***! - \*****************************************************************/ -/*! exports provided: ErrorHandler, errorHandler, onUnexpectedError, onUnexpectedExternalError, transformErrorForSerialization, isPromiseCanceledError, canceled, illegalArgument, illegalState */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "errorHandler", function() { return errorHandler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnexpectedError", function() { return onUnexpectedError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnexpectedExternalError", function() { return onUnexpectedExternalError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformErrorForSerialization", function() { return transformErrorForSerialization; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromiseCanceledError", function() { return isPromiseCanceledError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canceled", function() { return canceled; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "illegalArgument", function() { return illegalArgument; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "illegalState", function() { return illegalState; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -// Avoid circular dependency on EventEmitter by implementing a subset of the interface. -class ErrorHandler { - constructor() { - this.listeners = []; - this.unexpectedErrorHandler = function (e) { - setTimeout(() => { - if (e.stack) { - throw new Error(e.message + '\n\n' + e.stack); - } - throw e; - }, 0); - }; - } - emit(e) { - this.listeners.forEach((listener) => { - listener(e); - }); - } - onUnexpectedError(e) { - this.unexpectedErrorHandler(e); - this.emit(e); - } - // For external errors, we don't want the listeners to be called - onUnexpectedExternalError(e) { - this.unexpectedErrorHandler(e); - } -} -const errorHandler = new ErrorHandler(); -function onUnexpectedError(e) { - // ignore errors from cancelled promises - if (!isPromiseCanceledError(e)) { - errorHandler.onUnexpectedError(e); - } - return undefined; -} -function onUnexpectedExternalError(e) { - // ignore errors from cancelled promises - if (!isPromiseCanceledError(e)) { - errorHandler.onUnexpectedExternalError(e); - } - return undefined; -} -function transformErrorForSerialization(error) { - if (error instanceof Error) { - let { name, message } = error; - const stack = error.stacktrace || error.stack; - return { - $isError: true, - name, - message, - stack - }; - } - // return as is - return error; -} -const canceledName = 'Canceled'; -/** - * Checks if the given error is a promise in canceled state - */ -function isPromiseCanceledError(error) { - return error instanceof Error && error.name === canceledName && error.message === canceledName; -} -/** - * Returns an error that signals cancellation. - */ -function canceled() { - const error = new Error(canceledName); - error.name = error.message; - return error; -} -function illegalArgument(name) { - if (name) { - return new Error(`Illegal argument: ${name}`); - } - else { - return new Error('Illegal argument'); - } -} -function illegalState(name) { - if (name) { - return new Error(`Illegal state: ${name}`); - } - else { - return new Error('Illegal state'); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/event.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/event.js ***! - \****************************************************************/ -/*! exports provided: Event, Emitter, PauseableEmitter, EventBufferer, Relay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Event", function() { return Event; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Emitter", function() { return Emitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PauseableEmitter", function() { return PauseableEmitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventBufferer", function() { return EventBufferer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Relay", function() { return Relay; }); -/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _linkedList_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -var Event; -(function (Event) { - Event.None = () => _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - /** - * Given an event, returns another event which only fires once. - */ - function once(event) { - return (listener, thisArgs = null, disposables) => { - // we need this, in case the event fires during the listener call - let didFire = false; - let result; - result = event(e => { - if (didFire) { - return; - } - else if (result) { - result.dispose(); - } - else { - didFire = true; - } - return listener.call(thisArgs, e); - }, null, disposables); - if (didFire) { - result.dispose(); - } - return result; - }; - } - Event.once = once; - /** - * Given an event and a `map` function, returns another event which maps each element - * through the mapping function. - */ - function map(event, map) { - return snapshot((listener, thisArgs = null, disposables) => event(i => listener.call(thisArgs, map(i)), null, disposables)); - } - Event.map = map; - /** - * Given an event and an `each` function, returns another identical event and calls - * the `each` function per each element. - */ - function forEach(event, each) { - return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables)); - } - Event.forEach = forEach; - function filter(event, filter) { - return snapshot((listener, thisArgs = null, disposables) => event(e => filter(e) && listener.call(thisArgs, e), null, disposables)); - } - Event.filter = filter; - /** - * Given an event, returns the same event but typed as `Event`. - */ - function signal(event) { - return event; - } - Event.signal = signal; - function any(...events) { - return (listener, thisArgs = null, disposables) => Object(_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(...events.map(event => event(e => listener.call(thisArgs, e), null, disposables))); - } - Event.any = any; - /** - * Given an event and a `merge` function, returns another event which maps each element - * and the cumulative result through the `merge` function. Similar to `map`, but with memory. - */ - function reduce(event, merge, initial) { - let output = initial; - return map(event, e => { - output = merge(output, e); - return output; - }); - } - Event.reduce = reduce; - /** - * Given a chain of event processing functions (filter, map, etc), each - * function will be invoked per event & per listener. Snapshotting an event - * chain allows each function to be invoked just once per event. - */ - function snapshot(event) { - let listener; - const emitter = new Emitter({ - onFirstListenerAdd() { - listener = event(emitter.fire, emitter); - }, - onLastListenerRemove() { - listener.dispose(); - } - }); - return emitter.event; - } - Event.snapshot = snapshot; - function debounce(event, merge, delay = 100, leading = false, leakWarningThreshold) { - let subscription; - let output = undefined; - let handle = undefined; - let numDebouncedCalls = 0; - const emitter = new Emitter({ - leakWarningThreshold, - onFirstListenerAdd() { - subscription = event(cur => { - numDebouncedCalls++; - output = merge(output, cur); - if (leading && !handle) { - emitter.fire(output); - output = undefined; - } - clearTimeout(handle); - handle = setTimeout(() => { - const _output = output; - output = undefined; - handle = undefined; - if (!leading || numDebouncedCalls > 1) { - emitter.fire(_output); - } - numDebouncedCalls = 0; - }, delay); - }); - }, - onLastListenerRemove() { - subscription.dispose(); - } - }); - return emitter.event; - } - Event.debounce = debounce; - /** - * Given an event, it returns another event which fires only once and as soon as - * the input event emits. The event data is the number of millis it took for the - * event to fire. - */ - function stopwatch(event) { - const start = new Date().getTime(); - return map(once(event), _ => new Date().getTime() - start); - } - Event.stopwatch = stopwatch; - /** - * Given an event, it returns another event which fires only when the event - * element changes. - */ - function latch(event) { - let firstCall = true; - let cache; - return filter(event, value => { - const shouldEmit = firstCall || value !== cache; - firstCall = false; - cache = value; - return shouldEmit; - }); - } - Event.latch = latch; - /** - * Buffers the provided event until a first listener comes - * along, at which point fire all the events at once and - * pipe the event from then on. - * - * ```typescript - * const emitter = new Emitter(); - * const event = emitter.event; - * const bufferedEvent = buffer(event); - * - * emitter.fire(1); - * emitter.fire(2); - * emitter.fire(3); - * // nothing... - * - * const listener = bufferedEvent(num => console.log(num)); - * // 1, 2, 3 - * - * emitter.fire(4); - * // 4 - * ``` - */ - function buffer(event, nextTick = false, _buffer = []) { - let buffer = _buffer.slice(); - let listener = event(e => { - if (buffer) { - buffer.push(e); - } - else { - emitter.fire(e); - } - }); - const flush = () => { - if (buffer) { - buffer.forEach(e => emitter.fire(e)); - } - buffer = null; - }; - const emitter = new Emitter({ - onFirstListenerAdd() { - if (!listener) { - listener = event(e => emitter.fire(e)); - } - }, - onFirstListenerDidAdd() { - if (buffer) { - if (nextTick) { - setTimeout(flush); - } - else { - flush(); - } - } - }, - onLastListenerRemove() { - if (listener) { - listener.dispose(); - } - listener = null; - } - }); - return emitter.event; - } - Event.buffer = buffer; - class ChainableEvent { - constructor(event) { - this.event = event; - } - map(fn) { - return new ChainableEvent(map(this.event, fn)); - } - forEach(fn) { - return new ChainableEvent(forEach(this.event, fn)); - } - filter(fn) { - return new ChainableEvent(filter(this.event, fn)); - } - reduce(merge, initial) { - return new ChainableEvent(reduce(this.event, merge, initial)); - } - latch() { - return new ChainableEvent(latch(this.event)); - } - debounce(merge, delay = 100, leading = false, leakWarningThreshold) { - return new ChainableEvent(debounce(this.event, merge, delay, leading, leakWarningThreshold)); - } - on(listener, thisArgs, disposables) { - return this.event(listener, thisArgs, disposables); - } - once(listener, thisArgs, disposables) { - return once(this.event)(listener, thisArgs, disposables); - } - } - function chain(event) { - return new ChainableEvent(event); - } - Event.chain = chain; - function fromNodeEventEmitter(emitter, eventName, map = id => id) { - const fn = (...args) => result.fire(map(...args)); - const onFirstListenerAdd = () => emitter.on(eventName, fn); - const onLastListenerRemove = () => emitter.removeListener(eventName, fn); - const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove }); - return result.event; - } - Event.fromNodeEventEmitter = fromNodeEventEmitter; - function fromDOMEventEmitter(emitter, eventName, map = id => id) { - const fn = (...args) => result.fire(map(...args)); - const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn); - const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn); - const result = new Emitter({ onFirstListenerAdd, onLastListenerRemove }); - return result.event; - } - Event.fromDOMEventEmitter = fromDOMEventEmitter; - function fromPromise(promise) { - const emitter = new Emitter(); - let shouldEmit = false; - promise - .then(undefined, () => null) - .then(() => { - if (!shouldEmit) { - setTimeout(() => emitter.fire(undefined), 0); - } - else { - emitter.fire(undefined); - } - }); - shouldEmit = true; - return emitter.event; - } - Event.fromPromise = fromPromise; - function toPromise(event) { - return new Promise(c => once(event)(c)); - } - Event.toPromise = toPromise; -})(Event || (Event = {})); -let _globalLeakWarningThreshold = -1; -class LeakageMonitor { - constructor(customThreshold, name = Math.random().toString(18).slice(2, 5)) { - this.customThreshold = customThreshold; - this.name = name; - this._warnCountdown = 0; - } - dispose() { - if (this._stacks) { - this._stacks.clear(); - } - } - check(listenerCount) { - let threshold = _globalLeakWarningThreshold; - if (typeof this.customThreshold === 'number') { - threshold = this.customThreshold; - } - if (threshold <= 0 || listenerCount < threshold) { - return undefined; - } - if (!this._stacks) { - this._stacks = new Map(); - } - const stack = new Error().stack.split('\n').slice(3).join('\n'); - const count = (this._stacks.get(stack) || 0); - this._stacks.set(stack, count + 1); - this._warnCountdown -= 1; - if (this._warnCountdown <= 0) { - // only warn on first exceed and then every time the limit - // is exceeded by 50% again - this._warnCountdown = threshold * 0.5; - // find most frequent listener and print warning - let topStack; - let topCount = 0; - for (const [stack, count] of this._stacks) { - if (!topStack || topCount < count) { - topStack = stack; - topCount = count; - } - } - console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`); - console.warn(topStack); - } - return () => { - const count = (this._stacks.get(stack) || 0); - this._stacks.set(stack, count - 1); - }; - } -} -/** - * The Emitter can be used to expose an Event to the public - * to fire it from the insides. - * Sample: - class Document { - - private readonly _onDidChange = new Emitter<(value:string)=>any>(); - - public onDidChange = this._onDidChange.event; - - // getter-style - // get onDidChange(): Event<(value:string)=>any> { - // return this._onDidChange.event; - // } - - private _doIt() { - //... - this._onDidChange.fire(value); - } - } - */ -class Emitter { - constructor(options) { - this._disposed = false; - this._options = options; - this._leakageMon = _globalLeakWarningThreshold > 0 - ? new LeakageMonitor(this._options && this._options.leakWarningThreshold) - : undefined; - } - /** - * For the public to allow to subscribe - * to events from this Emitter - */ - get event() { - if (!this._event) { - this._event = (listener, thisArgs, disposables) => { - if (!this._listeners) { - this._listeners = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__["LinkedList"](); - } - const firstListener = this._listeners.isEmpty(); - if (firstListener && this._options && this._options.onFirstListenerAdd) { - this._options.onFirstListenerAdd(this); - } - const remove = this._listeners.push(!thisArgs ? listener : [listener, thisArgs]); - if (firstListener && this._options && this._options.onFirstListenerDidAdd) { - this._options.onFirstListenerDidAdd(this); - } - if (this._options && this._options.onListenerDidAdd) { - this._options.onListenerDidAdd(this, listener, thisArgs); - } - // check and record this emitter for potential leakage - let removeMonitor; - if (this._leakageMon) { - removeMonitor = this._leakageMon.check(this._listeners.size); - } - let result; - result = { - dispose: () => { - if (removeMonitor) { - removeMonitor(); - } - result.dispose = Emitter._noop; - if (!this._disposed) { - remove(); - if (this._options && this._options.onLastListenerRemove) { - const hasListeners = (this._listeners && !this._listeners.isEmpty()); - if (!hasListeners) { - this._options.onLastListenerRemove(this); - } - } - } - } - }; - if (disposables instanceof _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"]) { - disposables.add(result); - } - else if (Array.isArray(disposables)) { - disposables.push(result); - } - return result; - }; - } - return this._event; - } - /** - * To be kept private to fire an event to - * subscribers - */ - fire(event) { - if (this._listeners) { - // put all [listener,event]-pairs into delivery queue - // then emit all event. an inner/nested event might be - // the driver of this - if (!this._deliveryQueue) { - this._deliveryQueue = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__["LinkedList"](); - } - for (let listener of this._listeners) { - this._deliveryQueue.push([listener, event]); - } - while (this._deliveryQueue.size > 0) { - const [listener, event] = this._deliveryQueue.shift(); - try { - if (typeof listener === 'function') { - listener.call(undefined, event); - } - else { - listener[0].call(listener[1], event); - } - } - catch (e) { - Object(_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - } - } - } - } - dispose() { - if (this._listeners) { - this._listeners.clear(); - } - if (this._deliveryQueue) { - this._deliveryQueue.clear(); - } - if (this._leakageMon) { - this._leakageMon.dispose(); - } - this._disposed = true; - } -} -Emitter._noop = function () { }; -class PauseableEmitter extends Emitter { - constructor(options) { - super(options); - this._isPaused = 0; - this._eventQueue = new _linkedList_js__WEBPACK_IMPORTED_MODULE_2__["LinkedList"](); - this._mergeFn = options && options.merge; - } - pause() { - this._isPaused++; - } - resume() { - if (this._isPaused !== 0 && --this._isPaused === 0) { - if (this._mergeFn) { - // use the merge function to create a single composite - // event. make a copy in case firing pauses this emitter - const events = this._eventQueue.toArray(); - this._eventQueue.clear(); - super.fire(this._mergeFn(events)); - } - else { - // no merging, fire each event individually and test - // that this emitter isn't paused halfway through - while (!this._isPaused && this._eventQueue.size !== 0) { - super.fire(this._eventQueue.shift()); - } - } - } - } - fire(event) { - if (this._listeners) { - if (this._isPaused !== 0) { - this._eventQueue.push(event); - } - else { - super.fire(event); - } - } - } -} -/** - * The EventBufferer is useful in situations in which you want - * to delay firing your events during some code. - * You can wrap that code and be sure that the event will not - * be fired during that wrap. - * - * ``` - * const emitter: Emitter; - * const delayer = new EventDelayer(); - * const delayedEvent = delayer.wrapEvent(emitter.event); - * - * delayedEvent(console.log); - * - * delayer.bufferEvents(() => { - * emitter.fire(); // event will not be fired yet - * }); - * - * // event will only be fired at this point - * ``` - */ -class EventBufferer { - constructor() { - this.buffers = []; - } - wrapEvent(event) { - return (listener, thisArgs, disposables) => { - return event(i => { - const buffer = this.buffers[this.buffers.length - 1]; - if (buffer) { - buffer.push(() => listener.call(thisArgs, i)); - } - else { - listener.call(thisArgs, i); - } - }, undefined, disposables); - }; - } - bufferEvents(fn) { - const buffer = []; - this.buffers.push(buffer); - const r = fn(); - this.buffers.pop(); - buffer.forEach(flush => flush()); - return r; - } -} -/** - * A Relay is an event forwarder which functions as a replugabble event pipe. - * Once created, you can connect an input event to it and it will simply forward - * events from that input event through its own `event` property. The `input` - * can be changed at any point in time. - */ -class Relay { - constructor() { - this.listening = false; - this.inputEvent = Event.None; - this.inputEventListener = _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.emitter = new Emitter({ - onFirstListenerDidAdd: () => { - this.listening = true; - this.inputEventListener = this.inputEvent(this.emitter.fire, this.emitter); - }, - onLastListenerRemove: () => { - this.listening = false; - this.inputEventListener.dispose(); - } - }); - this.event = this.emitter.event; - } - set input(event) { - this.inputEvent = event; - if (this.listening) { - this.inputEventListener.dispose(); - this.inputEventListener = event(this.emitter.fire, this.emitter); - } - } - dispose() { - this.inputEventListener.dispose(); - this.emitter.dispose(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/extpath.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/extpath.js ***! - \******************************************************************/ -/*! exports provided: toSlashes, isEqualOrParent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSlashes", function() { return toSlashes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEqualOrParent", function() { return isEqualOrParent; }); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); - - -/** - * Takes a Windows OS path and changes backward slashes to forward slashes. - * This should only be done for OS paths from Windows (or user provided paths potentially from Windows). - * Using it on a Linux or MaxOS path might change it. - */ -function toSlashes(osPath) { - return osPath.replace(/[\\/]/g, _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].sep); -} -function isEqualOrParent(path, candidate, ignoreCase, separator = _path_js__WEBPACK_IMPORTED_MODULE_1__["sep"]) { - if (path === candidate) { - return true; - } - if (!path || !candidate) { - return false; - } - if (candidate.length > path.length) { - return false; - } - if (ignoreCase) { - const beginsWith = Object(_strings_js__WEBPACK_IMPORTED_MODULE_0__["startsWithIgnoreCase"])(path, candidate); - if (!beginsWith) { - return false; - } - if (candidate.length === path.length) { - return true; // same path, different casing - } - let sepOffset = candidate.length; - if (candidate.charAt(candidate.length - 1) === separator) { - sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character - } - return path.charAt(sepOffset) === separator; - } - if (candidate.charAt(candidate.length - 1) !== separator) { - candidate += separator; - } - return path.indexOf(candidate) === 0; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/filters.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/filters.js ***! - \******************************************************************/ -/*! exports provided: or, matchesPrefix, matchesContiguousSubString, matchesSubString, isUpper, matchesCamelCase, matchesWords, matchesFuzzy, anyScore, createMatches, isPatternInWord, FuzzyScore, fuzzyScore, fuzzyScoreGracefulAggressive */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "or", function() { return or; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesPrefix", function() { return matchesPrefix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesContiguousSubString", function() { return matchesContiguousSubString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesSubString", function() { return matchesSubString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUpper", function() { return isUpper; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesCamelCase", function() { return matchesCamelCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesWords", function() { return matchesWords; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesFuzzy", function() { return matchesFuzzy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anyScore", function() { return anyScore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMatches", function() { return createMatches; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPatternInWord", function() { return isPatternInWord; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FuzzyScore", function() { return FuzzyScore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzyScore", function() { return fuzzyScore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fuzzyScoreGracefulAggressive", function() { return fuzzyScoreGracefulAggressive; }); -/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -// Combined filters -/** - * @returns A filter which combines the provided set - * of filters with an or. The *first* filters that - * matches defined the return value of the returned - * filter. - */ -function or(...filter) { - return function (word, wordToMatchAgainst) { - for (let i = 0, len = filter.length; i < len; i++) { - const match = filter[i](word, wordToMatchAgainst); - if (match) { - return match; - } - } - return null; - }; -} -const matchesPrefix = _matchesPrefix.bind(undefined, true); -function _matchesPrefix(ignoreCase, word, wordToMatchAgainst) { - if (!wordToMatchAgainst || wordToMatchAgainst.length < word.length) { - return null; - } - let matches; - if (ignoreCase) { - matches = _strings_js__WEBPACK_IMPORTED_MODULE_1__["startsWithIgnoreCase"](wordToMatchAgainst, word); - } - else { - matches = wordToMatchAgainst.indexOf(word) === 0; - } - if (!matches) { - return null; - } - return word.length > 0 ? [{ start: 0, end: word.length }] : []; -} -// Contiguous Substring -function matchesContiguousSubString(word, wordToMatchAgainst) { - const index = wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase()); - if (index === -1) { - return null; - } - return [{ start: index, end: index + word.length }]; -} -// Substring -function matchesSubString(word, wordToMatchAgainst) { - return _matchesSubString(word.toLowerCase(), wordToMatchAgainst.toLowerCase(), 0, 0); -} -function _matchesSubString(word, wordToMatchAgainst, i, j) { - if (i === word.length) { - return []; - } - else if (j === wordToMatchAgainst.length) { - return null; - } - else { - if (word[i] === wordToMatchAgainst[j]) { - let result = null; - if (result = _matchesSubString(word, wordToMatchAgainst, i + 1, j + 1)) { - return join({ start: j, end: j + 1 }, result); - } - return null; - } - return _matchesSubString(word, wordToMatchAgainst, i, j + 1); - } -} -// CamelCase -function isLower(code) { - return 97 /* a */ <= code && code <= 122 /* z */; -} -function isUpper(code) { - return 65 /* A */ <= code && code <= 90 /* Z */; -} -function isNumber(code) { - return 48 /* Digit0 */ <= code && code <= 57 /* Digit9 */; -} -function isWhitespace(code) { - return (code === 32 /* Space */ - || code === 9 /* Tab */ - || code === 10 /* LineFeed */ - || code === 13 /* CarriageReturn */); -} -const wordSeparators = new Set(); -'`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?' - .split('') - .forEach(s => wordSeparators.add(s.charCodeAt(0))); -function isWordSeparator(code) { - return isWhitespace(code) || wordSeparators.has(code); -} -function charactersMatch(codeA, codeB) { - return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB)); -} -function isAlphanumeric(code) { - return isLower(code) || isUpper(code) || isNumber(code); -} -function join(head, tail) { - if (tail.length === 0) { - tail = [head]; - } - else if (head.end === tail[0].start) { - tail[0].start = head.start; - } - else { - tail.unshift(head); - } - return tail; -} -function nextAnchor(camelCaseWord, start) { - for (let i = start; i < camelCaseWord.length; i++) { - const c = camelCaseWord.charCodeAt(i); - if (isUpper(c) || isNumber(c) || (i > 0 && !isAlphanumeric(camelCaseWord.charCodeAt(i - 1)))) { - return i; - } - } - return camelCaseWord.length; -} -function _matchesCamelCase(word, camelCaseWord, i, j) { - if (i === word.length) { - return []; - } - else if (j === camelCaseWord.length) { - return null; - } - else if (word[i] !== camelCaseWord[j].toLowerCase()) { - return null; - } - else { - let result = null; - let nextUpperIndex = j + 1; - result = _matchesCamelCase(word, camelCaseWord, i + 1, j + 1); - while (!result && (nextUpperIndex = nextAnchor(camelCaseWord, nextUpperIndex)) < camelCaseWord.length) { - result = _matchesCamelCase(word, camelCaseWord, i + 1, nextUpperIndex); - nextUpperIndex++; - } - return result === null ? null : join({ start: j, end: j + 1 }, result); - } -} -// Heuristic to avoid computing camel case matcher for words that don't -// look like camelCaseWords. -function analyzeCamelCaseWord(word) { - let upper = 0, lower = 0, alpha = 0, numeric = 0, code = 0; - for (let i = 0; i < word.length; i++) { - code = word.charCodeAt(i); - if (isUpper(code)) { - upper++; - } - if (isLower(code)) { - lower++; - } - if (isAlphanumeric(code)) { - alpha++; - } - if (isNumber(code)) { - numeric++; - } - } - const upperPercent = upper / word.length; - const lowerPercent = lower / word.length; - const alphaPercent = alpha / word.length; - const numericPercent = numeric / word.length; - return { upperPercent, lowerPercent, alphaPercent, numericPercent }; -} -function isUpperCaseWord(analysis) { - const { upperPercent, lowerPercent } = analysis; - return lowerPercent === 0 && upperPercent > 0.6; -} -function isCamelCaseWord(analysis) { - const { upperPercent, lowerPercent, alphaPercent, numericPercent } = analysis; - return lowerPercent > 0.2 && upperPercent < 0.8 && alphaPercent > 0.6 && numericPercent < 0.2; -} -// Heuristic to avoid computing camel case matcher for words that don't -// look like camel case patterns. -function isCamelCasePattern(word) { - let upper = 0, lower = 0, code = 0, whitespace = 0; - for (let i = 0; i < word.length; i++) { - code = word.charCodeAt(i); - if (isUpper(code)) { - upper++; - } - if (isLower(code)) { - lower++; - } - if (isWhitespace(code)) { - whitespace++; - } - } - if ((upper === 0 || lower === 0) && whitespace === 0) { - return word.length <= 30; - } - else { - return upper <= 5; - } -} -function matchesCamelCase(word, camelCaseWord) { - if (!camelCaseWord) { - return null; - } - camelCaseWord = camelCaseWord.trim(); - if (camelCaseWord.length === 0) { - return null; - } - if (!isCamelCasePattern(word)) { - return null; - } - if (camelCaseWord.length > 60) { - return null; - } - const analysis = analyzeCamelCaseWord(camelCaseWord); - if (!isCamelCaseWord(analysis)) { - if (!isUpperCaseWord(analysis)) { - return null; - } - camelCaseWord = camelCaseWord.toLowerCase(); - } - let result = null; - let i = 0; - word = word.toLowerCase(); - while (i < camelCaseWord.length && (result = _matchesCamelCase(word, camelCaseWord, 0, i)) === null) { - i = nextAnchor(camelCaseWord, i + 1); - } - return result; -} -// Matches beginning of words supporting non-ASCII languages -// If `contiguous` is true then matches word with beginnings of the words in the target. E.g. "pul" will match "Git: Pull" -// Otherwise also matches sub string of the word with beginnings of the words in the target. E.g. "gp" or "g p" will match "Git: Pull" -// Useful in cases where the target is words (e.g. command labels) -function matchesWords(word, target, contiguous = false) { - if (!target || target.length === 0) { - return null; - } - let result = null; - let i = 0; - word = word.toLowerCase(); - target = target.toLowerCase(); - while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) { - i = nextWord(target, i + 1); - } - return result; -} -function _matchesWords(word, target, i, j, contiguous) { - if (i === word.length) { - return []; - } - else if (j === target.length) { - return null; - } - else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) { - return null; - } - else { - let result = null; - let nextWordIndex = j + 1; - result = _matchesWords(word, target, i + 1, j + 1, contiguous); - if (!contiguous) { - while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) { - result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous); - nextWordIndex++; - } - } - return result === null ? null : join({ start: j, end: j + 1 }, result); - } -} -function nextWord(word, start) { - for (let i = start; i < word.length; i++) { - if (isWordSeparator(word.charCodeAt(i)) || - (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) { - return i; - } - } - return word.length; -} -// Fuzzy -const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString); -const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString); -const fuzzyRegExpCache = new _map_js__WEBPACK_IMPORTED_MODULE_0__["LRUCache"](10000); // bounded to 10000 elements -function matchesFuzzy(word, wordToMatchAgainst, enableSeparateSubstringMatching = false) { - if (typeof word !== 'string' || typeof wordToMatchAgainst !== 'string') { - return null; // return early for invalid input - } - // Form RegExp for wildcard matches - let regexp = fuzzyRegExpCache.get(word); - if (!regexp) { - regexp = new RegExp(_strings_js__WEBPACK_IMPORTED_MODULE_1__["convertSimple2RegExpPattern"](word), 'i'); - fuzzyRegExpCache.set(word, regexp); - } - // RegExp Filter - const match = regexp.exec(wordToMatchAgainst); - if (match) { - return [{ start: match.index, end: match.index + match[0].length }]; - } - // Default Filter - return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst); -} -function anyScore(pattern, lowPattern, _patternPos, word, lowWord, _wordPos) { - const result = fuzzyScore(pattern, lowPattern, 0, word, lowWord, 0, true); - if (result) { - return result; - } - let matches = 0; - let score = 0; - let idx = _wordPos; - for (let patternPos = 0; patternPos < lowPattern.length && patternPos < _maxLen; ++patternPos) { - const wordPos = lowWord.indexOf(lowPattern.charAt(patternPos), idx); - if (wordPos >= 0) { - score += 1; - matches += Math.pow(2, wordPos); - idx = wordPos + 1; - } - else if (matches !== 0) { - // once we have started matching things - // we need to match the remaining pattern - // characters - break; - } - } - return [score, matches, _wordPos]; -} -//#region --- fuzzyScore --- -function createMatches(score) { - if (typeof score === 'undefined') { - return []; - } - const matches = score[1].toString(2); - const wordStart = score[2]; - const res = []; - for (let pos = wordStart; pos < _maxLen; pos++) { - if (matches[matches.length - (pos + 1)] === '1') { - const last = res[res.length - 1]; - if (last && last.end === pos) { - last.end = pos + 1; - } - else { - res.push({ start: pos, end: pos + 1 }); - } - } - } - return res; -} -const _maxLen = 128; -function initTable() { - const table = []; - const row = [0]; - for (let i = 1; i <= _maxLen; i++) { - row.push(-i); - } - for (let i = 0; i <= _maxLen; i++) { - const thisRow = row.slice(0); - thisRow[0] = -i; - table.push(thisRow); - } - return table; -} -const _table = initTable(); -const _scores = initTable(); -const _arrows = initTable(); -const _debug = false; -function printTable(table, pattern, patternLen, word, wordLen) { - function pad(s, n, pad = ' ') { - while (s.length < n) { - s = pad + s; - } - return s; - } - let ret = ` | |${word.split('').map(c => pad(c, 3)).join('|')}\n`; - for (let i = 0; i <= patternLen; i++) { - if (i === 0) { - ret += ' |'; - } - else { - ret += `${pattern[i - 1]}|`; - } - ret += table[i].slice(0, wordLen + 1).map(n => pad(n.toString(), 3)).join('|') + '\n'; - } - return ret; -} -function printTables(pattern, patternStart, word, wordStart) { - pattern = pattern.substr(patternStart); - word = word.substr(wordStart); - console.log(printTable(_table, pattern, pattern.length, word, word.length)); - console.log(printTable(_arrows, pattern, pattern.length, word, word.length)); - console.log(printTable(_scores, pattern, pattern.length, word, word.length)); -} -function isSeparatorAtPos(value, index) { - if (index < 0 || index >= value.length) { - return false; - } - const code = value.charCodeAt(index); - switch (code) { - case 95 /* Underline */: - case 45 /* Dash */: - case 46 /* Period */: - case 32 /* Space */: - case 47 /* Slash */: - case 92 /* Backslash */: - case 39 /* SingleQuote */: - case 34 /* DoubleQuote */: - case 58 /* Colon */: - case 36 /* DollarSign */: - return true; - default: - return false; - } -} -function isWhitespaceAtPos(value, index) { - if (index < 0 || index >= value.length) { - return false; - } - const code = value.charCodeAt(index); - switch (code) { - case 32 /* Space */: - case 9 /* Tab */: - return true; - default: - return false; - } -} -function isUpperCaseAtPos(pos, word, wordLow) { - return word[pos] !== wordLow[pos]; -} -function isPatternInWord(patternLow, patternPos, patternLen, wordLow, wordPos, wordLen) { - while (patternPos < patternLen && wordPos < wordLen) { - if (patternLow[patternPos] === wordLow[wordPos]) { - patternPos += 1; - } - wordPos += 1; - } - return patternPos === patternLen; // pattern must be exhausted -} -var FuzzyScore; -(function (FuzzyScore) { - /** - * No matches and value `-100` - */ - FuzzyScore.Default = Object.freeze([-100, 0, 0]); - function isDefault(score) { - return !score || (score[0] === -100 && score[1] === 0 && score[2] === 0); - } - FuzzyScore.isDefault = isDefault; -})(FuzzyScore || (FuzzyScore = {})); -function fuzzyScore(pattern, patternLow, patternStart, word, wordLow, wordStart, firstMatchCanBeWeak) { - const patternLen = pattern.length > _maxLen ? _maxLen : pattern.length; - const wordLen = word.length > _maxLen ? _maxLen : word.length; - if (patternStart >= patternLen || wordStart >= wordLen || (patternLen - patternStart) > (wordLen - wordStart)) { - return undefined; - } - // Run a simple check if the characters of pattern occur - // (in order) at all in word. If that isn't the case we - // stop because no match will be possible - if (!isPatternInWord(patternLow, patternStart, patternLen, wordLow, wordStart, wordLen)) { - return undefined; - } - let row = 1; - let column = 1; - let patternPos = patternStart; - let wordPos = wordStart; - let hasStrongFirstMatch = false; - // There will be a match, fill in tables - for (row = 1, patternPos = patternStart; patternPos < patternLen; row++, patternPos++) { - for (column = 1, wordPos = wordStart; wordPos < wordLen; column++, wordPos++) { - const score = _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos); - if (patternPos === patternStart && score > 1) { - hasStrongFirstMatch = true; - } - _scores[row][column] = score; - const diag = _table[row - 1][column - 1] + (score > 1 ? 1 : score); - const top = _table[row - 1][column] + -1; - const left = _table[row][column - 1] + -1; - if (left >= top) { - // left or diag - if (left > diag) { - _table[row][column] = left; - _arrows[row][column] = 4 /* Left */; - } - else if (left === diag) { - _table[row][column] = left; - _arrows[row][column] = 4 /* Left */ | 2 /* Diag */; - } - else { - _table[row][column] = diag; - _arrows[row][column] = 2 /* Diag */; - } - } - else { - // top or diag - if (top > diag) { - _table[row][column] = top; - _arrows[row][column] = 1 /* Top */; - } - else if (top === diag) { - _table[row][column] = top; - _arrows[row][column] = 1 /* Top */ | 2 /* Diag */; - } - else { - _table[row][column] = diag; - _arrows[row][column] = 2 /* Diag */; - } - } - } - } - if (_debug) { - printTables(pattern, patternStart, word, wordStart); - } - if (!hasStrongFirstMatch && !firstMatchCanBeWeak) { - return undefined; - } - _matchesCount = 0; - _topScore = -100; - _wordStart = wordStart; - _firstMatchCanBeWeak = firstMatchCanBeWeak; - _findAllMatches2(row - 1, column - 1, patternLen === wordLen ? 1 : 0, 0, false); - if (_matchesCount === 0) { - return undefined; - } - return [_topScore, _topMatch2, wordStart]; -} -function _doScore(pattern, patternLow, patternPos, patternStart, word, wordLow, wordPos) { - if (patternLow[patternPos] !== wordLow[wordPos]) { - return -1; - } - if (wordPos === (patternPos - patternStart)) { - // common prefix: `foobar <-> foobaz` - // ^^^^^ - if (pattern[patternPos] === word[wordPos]) { - return 7; - } - else { - return 5; - } - } - else if (isUpperCaseAtPos(wordPos, word, wordLow) && (wordPos === 0 || !isUpperCaseAtPos(wordPos - 1, word, wordLow))) { - // hitting upper-case: `foo <-> forOthers` - // ^^ ^ - if (pattern[patternPos] === word[wordPos]) { - return 7; - } - else { - return 5; - } - } - else if (isSeparatorAtPos(wordLow, wordPos) && (wordPos === 0 || !isSeparatorAtPos(wordLow, wordPos - 1))) { - // hitting a separator: `. <-> foo.bar` - // ^ - return 5; - } - else if (isSeparatorAtPos(wordLow, wordPos - 1) || isWhitespaceAtPos(wordLow, wordPos - 1)) { - // post separator: `foo <-> bar_foo` - // ^^^ - return 5; - } - else { - return 1; - } -} -let _matchesCount = 0; -let _topMatch2 = 0; -let _topScore = 0; -let _wordStart = 0; -let _firstMatchCanBeWeak = false; -function _findAllMatches2(row, column, total, matches, lastMatched) { - if (_matchesCount >= 10 || total < -25) { - // stop when having already 10 results, or - // when a potential alignment as already 5 gaps - return; - } - let simpleMatchCount = 0; - while (row > 0 && column > 0) { - const score = _scores[row][column]; - const arrow = _arrows[row][column]; - if (arrow === 4 /* Left */) { - // left -> no match, skip a word character - column -= 1; - if (lastMatched) { - total -= 5; // new gap penalty - } - else if (matches !== 0) { - total -= 1; // gap penalty after first match - } - lastMatched = false; - simpleMatchCount = 0; - } - else if (arrow & 2 /* Diag */) { - if (arrow & 4 /* Left */) { - // left - _findAllMatches2(row, column - 1, matches !== 0 ? total - 1 : total, // gap penalty after first match - matches, lastMatched); - } - // diag - total += score; - row -= 1; - column -= 1; - lastMatched = true; - // match -> set a 1 at the word pos - matches += Math.pow(2, (column + _wordStart)); - // count simple matches and boost a row of - // simple matches when they yield in a - // strong match. - if (score === 1) { - simpleMatchCount += 1; - if (row === 0 && !_firstMatchCanBeWeak) { - // when the first match is a weak - // match we discard it - return undefined; - } - } - else { - // boost - total += 1 + (simpleMatchCount * (score - 1)); - simpleMatchCount = 0; - } - } - else { - return undefined; - } - } - total -= column >= 3 ? 9 : column * 3; // late start penalty - // dynamically keep track of the current top score - // and insert the current best score at head, the rest at tail - _matchesCount += 1; - if (total > _topScore) { - _topScore = total; - _topMatch2 = matches; - } -} -//#endregion -//#region --- graceful --- -function fuzzyScoreGracefulAggressive(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak) { - return fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, true, firstMatchCanBeWeak); -} -function fuzzyScoreWithPermutations(pattern, lowPattern, patternPos, word, lowWord, wordPos, aggressive, firstMatchCanBeWeak) { - let top = fuzzyScore(pattern, lowPattern, patternPos, word, lowWord, wordPos, firstMatchCanBeWeak); - if (top && !aggressive) { - // when using the original pattern yield a result we` - // return it unless we are aggressive and try to find - // a better alignment, e.g. `cno` -> `^co^ns^ole` or `^c^o^nsole`. - return top; - } - if (pattern.length >= 3) { - // When the pattern is long enough then try a few (max 7) - // permutations of the pattern to find a better match. The - // permutations only swap neighbouring characters, e.g - // `cnoso` becomes `conso`, `cnsoo`, `cnoos`. - const tries = Math.min(7, pattern.length - 1); - for (let movingPatternPos = patternPos + 1; movingPatternPos < tries; movingPatternPos++) { - const newPattern = nextTypoPermutation(pattern, movingPatternPos); - if (newPattern) { - const candidate = fuzzyScore(newPattern, newPattern.toLowerCase(), patternPos, word, lowWord, wordPos, firstMatchCanBeWeak); - if (candidate) { - candidate[0] -= 3; // permutation penalty - if (!top || candidate[0] > top[0]) { - top = candidate; - } - } - } - } - } - return top; -} -function nextTypoPermutation(pattern, patternPos) { - if (patternPos + 1 >= pattern.length) { - return undefined; - } - const swap1 = pattern[patternPos]; - const swap2 = pattern[patternPos + 1]; - if (swap1 === swap2) { - return undefined; - } - return pattern.slice(0, patternPos) - + swap2 - + swap1 - + pattern.slice(patternPos + 2); -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/functional.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/functional.js ***! - \*********************************************************************/ -/*! exports provided: once */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return once; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function once(fn) { - const _this = this; - let didCall = false; - let result; - return function () { - if (didCall) { - return result; - } - didCall = true; - result = fn.apply(_this, arguments); - return result; - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js ***! - \**********************************************************************/ -/*! exports provided: scoreFuzzy2, prepareQuery, pieceToQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scoreFuzzy2", function() { return scoreFuzzy2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepareQuery", function() { return prepareQuery; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pieceToQuery", function() { return pieceToQuery; }); -/* harmony import */ var _filters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); - - - - -const NO_SCORE2 = [undefined, []]; -function scoreFuzzy2(target, query, patternStart = 0, wordStart = 0) { - // Score: multiple inputs - const preparedQuery = query; - if (preparedQuery.values && preparedQuery.values.length > 1) { - return doScoreFuzzy2Multiple(target, preparedQuery.values, patternStart, wordStart); - } - // Score: single input - return doScoreFuzzy2Single(target, query, patternStart, wordStart); -} -function doScoreFuzzy2Multiple(target, query, patternStart, wordStart) { - let totalScore = 0; - const totalMatches = []; - for (const queryPiece of query) { - const [score, matches] = doScoreFuzzy2Single(target, queryPiece, patternStart, wordStart); - if (typeof score !== 'number') { - // if a single query value does not match, return with - // no score entirely, we require all queries to match - return NO_SCORE2; - } - totalScore += score; - totalMatches.push(...matches); - } - // if we have a score, ensure that the positions are - // sorted in ascending order and distinct - return [totalScore, normalizeMatches(totalMatches)]; -} -function doScoreFuzzy2Single(target, query, patternStart, wordStart) { - const score = Object(_filters_js__WEBPACK_IMPORTED_MODULE_0__["fuzzyScore"])(query.original, query.originalLowercase, patternStart, target, target.toLowerCase(), wordStart, true); - if (!score) { - return NO_SCORE2; - } - return [score[0], Object(_filters_js__WEBPACK_IMPORTED_MODULE_0__["createMatches"])(score)]; -} -function normalizeMatches(matches) { - // sort matches by start to be able to normalize - const sortedMatches = matches.sort((matchA, matchB) => { - return matchA.start - matchB.start; - }); - // merge matches that overlap - const normalizedMatches = []; - let currentMatch = undefined; - for (const match of sortedMatches) { - // if we have no current match or the matches - // do not overlap, we take it as is and remember - // it for future merging - if (!currentMatch || !matchOverlaps(currentMatch, match)) { - currentMatch = match; - normalizedMatches.push(match); - } - // otherwise we merge the matches - else { - currentMatch.start = Math.min(currentMatch.start, match.start); - currentMatch.end = Math.max(currentMatch.end, match.end); - } - } - return normalizedMatches; -} -function matchOverlaps(matchA, matchB) { - if (matchA.end < matchB.start) { - return false; // A ends before B starts - } - if (matchB.end < matchA.start) { - return false; // B ends before A starts - } - return true; -} -/** - * Helper function to prepare a search value for scoring by removing unwanted characters - * and allowing to score on multiple pieces separated by whitespace character. - */ -const MULTIPLE_QUERY_VALUES_SEPARATOR = ' '; -function prepareQuery(original) { - if (typeof original !== 'string') { - original = ''; - } - const originalLowercase = original.toLowerCase(); - const { pathNormalized, normalized, normalizedLowercase } = normalizeQuery(original); - const containsPathSeparator = pathNormalized.indexOf(_path_js__WEBPACK_IMPORTED_MODULE_1__["sep"]) >= 0; - let values = undefined; - const originalSplit = original.split(MULTIPLE_QUERY_VALUES_SEPARATOR); - if (originalSplit.length > 1) { - for (const originalPiece of originalSplit) { - const { pathNormalized: pathNormalizedPiece, normalized: normalizedPiece, normalizedLowercase: normalizedLowercasePiece } = normalizeQuery(originalPiece); - if (normalizedPiece) { - if (!values) { - values = []; - } - values.push({ - original: originalPiece, - originalLowercase: originalPiece.toLowerCase(), - pathNormalized: pathNormalizedPiece, - normalized: normalizedPiece, - normalizedLowercase: normalizedLowercasePiece - }); - } - } - } - return { original, originalLowercase, pathNormalized, normalized, normalizedLowercase, values, containsPathSeparator }; -} -function normalizeQuery(original) { - let pathNormalized; - if (_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWindows"]) { - pathNormalized = original.replace(/\//g, _path_js__WEBPACK_IMPORTED_MODULE_1__["sep"]); // Help Windows users to search for paths when using slash - } - else { - pathNormalized = original.replace(/\\/g, _path_js__WEBPACK_IMPORTED_MODULE_1__["sep"]); // Help macOS/Linux users to search for paths when using backslash - } - const normalized = Object(_strings_js__WEBPACK_IMPORTED_MODULE_3__["stripWildcards"])(pathNormalized).replace(/\s/g, ''); - return { - pathNormalized, - normalized, - normalizedLowercase: normalized.toLowerCase() - }; -} -function pieceToQuery(arg1) { - if (Array.isArray(arg1)) { - return prepareQuery(arg1.map(piece => piece.original).join(MULTIPLE_QUERY_VALUES_SEPARATOR)); - } - return prepareQuery(arg1.original); -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/glob.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/glob.js ***! - \***************************************************************/ -/*! exports provided: splitGlobAware, match, parse, isRelativePattern */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitGlobAware", function() { return splitGlobAware; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return match; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRelativePattern", function() { return isRelativePattern; }); -/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _extpath_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extpath.js */ "./node_modules/monaco-editor/esm/vs/base/common/extpath.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -const GLOBSTAR = '**'; -const GLOB_SPLIT = '/'; -const PATH_REGEX = '[/\\\\]'; // any slash or backslash -const NO_PATH_REGEX = '[^/\\\\]'; // any non-slash and non-backslash -const ALL_FORWARD_SLASHES = /\//g; -function starsToRegExp(starCount) { - switch (starCount) { - case 0: - return ''; - case 1: - return `${NO_PATH_REGEX}*?`; // 1 star matches any number of characters except path separator (/ and \) - non greedy (?) - default: - // Matches: (Path Sep OR Path Val followed by Path Sep OR Path Sep followed by Path Val) 0-many times - // Group is non capturing because we don't need to capture at all (?:...) - // Overall we use non-greedy matching because it could be that we match too much - return `(?:${PATH_REGEX}|${NO_PATH_REGEX}+${PATH_REGEX}|${PATH_REGEX}${NO_PATH_REGEX}+)*?`; - } -} -function splitGlobAware(pattern, splitChar) { - if (!pattern) { - return []; - } - const segments = []; - let inBraces = false; - let inBrackets = false; - let curVal = ''; - for (const char of pattern) { - switch (char) { - case splitChar: - if (!inBraces && !inBrackets) { - segments.push(curVal); - curVal = ''; - continue; - } - break; - case '{': - inBraces = true; - break; - case '}': - inBraces = false; - break; - case '[': - inBrackets = true; - break; - case ']': - inBrackets = false; - break; - } - curVal += char; - } - // Tail - if (curVal) { - segments.push(curVal); - } - return segments; -} -function parseRegExp(pattern) { - if (!pattern) { - return ''; - } - let regEx = ''; - // Split up into segments for each slash found - const segments = splitGlobAware(pattern, GLOB_SPLIT); - // Special case where we only have globstars - if (segments.every(s => s === GLOBSTAR)) { - regEx = '.*'; - } - // Build regex over segments - else { - let previousSegmentWasGlobStar = false; - segments.forEach((segment, index) => { - // Globstar is special - if (segment === GLOBSTAR) { - // if we have more than one globstar after another, just ignore it - if (!previousSegmentWasGlobStar) { - regEx += starsToRegExp(2); - previousSegmentWasGlobStar = true; - } - return; - } - // States - let inBraces = false; - let braceVal = ''; - let inBrackets = false; - let bracketVal = ''; - for (const char of segment) { - // Support brace expansion - if (char !== '}' && inBraces) { - braceVal += char; - continue; - } - // Support brackets - if (inBrackets && (char !== ']' || !bracketVal) /* ] is literally only allowed as first character in brackets to match it */) { - let res; - // range operator - if (char === '-') { - res = char; - } - // negation operator (only valid on first index in bracket) - else if ((char === '^' || char === '!') && !bracketVal) { - res = '^'; - } - // glob split matching is not allowed within character ranges - // see http://man7.org/linux/man-pages/man7/glob.7.html - else if (char === GLOB_SPLIT) { - res = ''; - } - // anything else gets escaped - else { - res = _strings_js__WEBPACK_IMPORTED_MODULE_1__["escapeRegExpCharacters"](char); - } - bracketVal += res; - continue; - } - switch (char) { - case '{': - inBraces = true; - continue; - case '[': - inBrackets = true; - continue; - case '}': - const choices = splitGlobAware(braceVal, ','); - // Converts {foo,bar} => [foo|bar] - const braceRegExp = `(?:${choices.map(c => parseRegExp(c)).join('|')})`; - regEx += braceRegExp; - inBraces = false; - braceVal = ''; - break; - case ']': - regEx += ('[' + bracketVal + ']'); - inBrackets = false; - bracketVal = ''; - break; - case '?': - regEx += NO_PATH_REGEX; // 1 ? matches any single character except path separator (/ and \) - continue; - case '*': - regEx += starsToRegExp(1); - continue; - default: - regEx += _strings_js__WEBPACK_IMPORTED_MODULE_1__["escapeRegExpCharacters"](char); - } - } - // Tail: Add the slash we had split on if there is more to come and the remaining pattern is not a globstar - // For example if pattern: some/**/*.js we want the "/" after some to be included in the RegEx to prevent - // a folder called "something" to match as well. - // However, if pattern: some/**, we tolerate that we also match on "something" because our globstar behaviour - // is to match 0-N segments. - if (index < segments.length - 1 && (segments[index + 1] !== GLOBSTAR || index + 2 < segments.length)) { - regEx += PATH_REGEX; - } - // reset state - previousSegmentWasGlobStar = false; - }); - } - return regEx; -} -// regexes to check for trival glob patterns that just check for String#endsWith -const T1 = /^\*\*\/\*\.[\w\.-]+$/; // **/*.something -const T2 = /^\*\*\/([\w\.-]+)\/?$/; // **/something -const T3 = /^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/; // {**/*.something,**/*.else} or {**/package.json,**/project.json} -const T3_2 = /^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/; // Like T3, with optional trailing /** -const T4 = /^\*\*((\/[\w\.-]+)+)\/?$/; // **/something/else -const T5 = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/; // something/else -const CACHE = new _map_js__WEBPACK_IMPORTED_MODULE_4__["LRUCache"](10000); // bounded to 10000 elements -const FALSE = function () { - return false; -}; -const NULL = function () { - return null; -}; -function parsePattern(arg1, options) { - if (!arg1) { - return NULL; - } - // Handle IRelativePattern - let pattern; - if (typeof arg1 !== 'string') { - pattern = arg1.pattern; - } - else { - pattern = arg1; - } - // Whitespace trimming - pattern = pattern.trim(); - // Check cache - const patternKey = `${pattern}_${!!options.trimForExclusions}`; - let parsedPattern = CACHE.get(patternKey); - if (parsedPattern) { - return wrapRelativePattern(parsedPattern, arg1); - } - // Check for Trivias - let match; - if (T1.test(pattern)) { // common pattern: **/*.txt just need endsWith check - const base = pattern.substr(4); // '**/*'.length === 4 - parsedPattern = function (path, basename) { - return typeof path === 'string' && path.endsWith(base) ? pattern : null; - }; - } - else if (match = T2.exec(trimForExclusions(pattern, options))) { // common pattern: **/some.txt just need basename check - parsedPattern = trivia2(match[1], pattern); - } - else if ((options.trimForExclusions ? T3_2 : T3).test(pattern)) { // repetition of common patterns (see above) {**/*.txt,**/*.png} - parsedPattern = trivia3(pattern, options); - } - else if (match = T4.exec(trimForExclusions(pattern, options))) { // common pattern: **/something/else just need endsWith check - parsedPattern = trivia4and5(match[1].substr(1), pattern, true); - } - else if (match = T5.exec(trimForExclusions(pattern, options))) { // common pattern: something/else just need equals check - parsedPattern = trivia4and5(match[1], pattern, false); - } - // Otherwise convert to pattern - else { - parsedPattern = toRegExp(pattern); - } - // Cache - CACHE.set(patternKey, parsedPattern); - return wrapRelativePattern(parsedPattern, arg1); -} -function wrapRelativePattern(parsedPattern, arg2) { - if (typeof arg2 === 'string') { - return parsedPattern; - } - return function (path, basename) { - if (!_extpath_js__WEBPACK_IMPORTED_MODULE_2__["isEqualOrParent"](path, arg2.base)) { - return null; - } - return parsedPattern(_path_js__WEBPACK_IMPORTED_MODULE_3__["relative"](arg2.base, path), basename); - }; -} -function trimForExclusions(pattern, options) { - return options.trimForExclusions && pattern.endsWith('/**') ? pattern.substr(0, pattern.length - 2) : pattern; // dropping **, tailing / is dropped later -} -// common pattern: **/some.txt just need basename check -function trivia2(base, originalPattern) { - const slashBase = `/${base}`; - const backslashBase = `\\${base}`; - const parsedPattern = function (path, basename) { - if (typeof path !== 'string') { - return null; - } - if (basename) { - return basename === base ? originalPattern : null; - } - return path === base || path.endsWith(slashBase) || path.endsWith(backslashBase) ? originalPattern : null; - }; - const basenames = [base]; - parsedPattern.basenames = basenames; - parsedPattern.patterns = [originalPattern]; - parsedPattern.allBasenames = basenames; - return parsedPattern; -} -// repetition of common patterns (see above) {**/*.txt,**/*.png} -function trivia3(pattern, options) { - const parsedPatterns = aggregateBasenameMatches(pattern.slice(1, -1).split(',') - .map(pattern => parsePattern(pattern, options)) - .filter(pattern => pattern !== NULL), pattern); - const n = parsedPatterns.length; - if (!n) { - return NULL; - } - if (n === 1) { - return parsedPatterns[0]; - } - const parsedPattern = function (path, basename) { - for (let i = 0, n = parsedPatterns.length; i < n; i++) { - if (parsedPatterns[i](path, basename)) { - return pattern; - } - } - return null; - }; - const withBasenames = _arrays_js__WEBPACK_IMPORTED_MODULE_0__["first"](parsedPatterns, pattern => !!pattern.allBasenames); - if (withBasenames) { - parsedPattern.allBasenames = withBasenames.allBasenames; - } - const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []); - if (allPaths.length) { - parsedPattern.allPaths = allPaths; - } - return parsedPattern; -} -// common patterns: **/something/else just need endsWith check, something/else just needs and equals check -function trivia4and5(path, pattern, matchPathEnds) { - const nativePath = _path_js__WEBPACK_IMPORTED_MODULE_3__["sep"] !== _path_js__WEBPACK_IMPORTED_MODULE_3__["posix"].sep ? path.replace(ALL_FORWARD_SLASHES, _path_js__WEBPACK_IMPORTED_MODULE_3__["sep"]) : path; - const nativePathEnd = _path_js__WEBPACK_IMPORTED_MODULE_3__["sep"] + nativePath; - const parsedPattern = matchPathEnds ? function (path, basename) { - return typeof path === 'string' && (path === nativePath || path.endsWith(nativePathEnd)) ? pattern : null; - } : function (path, basename) { - return typeof path === 'string' && path === nativePath ? pattern : null; - }; - parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + path]; - return parsedPattern; -} -function toRegExp(pattern) { - try { - const regExp = new RegExp(`^${parseRegExp(pattern)}$`); - return function (path) { - regExp.lastIndex = 0; // reset RegExp to its initial state to reuse it! - return typeof path === 'string' && regExp.test(path) ? pattern : null; - }; - } - catch (error) { - return NULL; - } -} -function match(arg1, path, hasSibling) { - if (!arg1 || typeof path !== 'string') { - return false; - } - return parse(arg1)(path, undefined, hasSibling); -} -function parse(arg1, options = {}) { - if (!arg1) { - return FALSE; - } - // Glob with String - if (typeof arg1 === 'string' || isRelativePattern(arg1)) { - const parsedPattern = parsePattern(arg1, options); - if (parsedPattern === NULL) { - return FALSE; - } - const resultPattern = function (path, basename) { - return !!parsedPattern(path, basename); - }; - if (parsedPattern.allBasenames) { - resultPattern.allBasenames = parsedPattern.allBasenames; - } - if (parsedPattern.allPaths) { - resultPattern.allPaths = parsedPattern.allPaths; - } - return resultPattern; - } - // Glob with Expression - return parsedExpression(arg1, options); -} -function isRelativePattern(obj) { - const rp = obj; - return rp && typeof rp.base === 'string' && typeof rp.pattern === 'string'; -} -function parsedExpression(expression, options) { - const parsedPatterns = aggregateBasenameMatches(Object.getOwnPropertyNames(expression) - .map(pattern => parseExpressionPattern(pattern, expression[pattern], options)) - .filter(pattern => pattern !== NULL)); - const n = parsedPatterns.length; - if (!n) { - return NULL; - } - if (!parsedPatterns.some(parsedPattern => !!parsedPattern.requiresSiblings)) { - if (n === 1) { - return parsedPatterns[0]; - } - const resultExpression = function (path, basename) { - for (let i = 0, n = parsedPatterns.length; i < n; i++) { - // Pattern matches path - const result = parsedPatterns[i](path, basename); - if (result) { - return result; - } - } - return null; - }; - const withBasenames = _arrays_js__WEBPACK_IMPORTED_MODULE_0__["first"](parsedPatterns, pattern => !!pattern.allBasenames); - if (withBasenames) { - resultExpression.allBasenames = withBasenames.allBasenames; - } - const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []); - if (allPaths.length) { - resultExpression.allPaths = allPaths; - } - return resultExpression; - } - const resultExpression = function (path, basename, hasSibling) { - let name = undefined; - for (let i = 0, n = parsedPatterns.length; i < n; i++) { - // Pattern matches path - const parsedPattern = parsedPatterns[i]; - if (parsedPattern.requiresSiblings && hasSibling) { - if (!basename) { - basename = _path_js__WEBPACK_IMPORTED_MODULE_3__["basename"](path); - } - if (!name) { - name = basename.substr(0, basename.length - _path_js__WEBPACK_IMPORTED_MODULE_3__["extname"](path).length); - } - } - const result = parsedPattern(path, basename, name, hasSibling); - if (result) { - return result; - } - } - return null; - }; - const withBasenames = _arrays_js__WEBPACK_IMPORTED_MODULE_0__["first"](parsedPatterns, pattern => !!pattern.allBasenames); - if (withBasenames) { - resultExpression.allBasenames = withBasenames.allBasenames; - } - const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []); - if (allPaths.length) { - resultExpression.allPaths = allPaths; - } - return resultExpression; -} -function parseExpressionPattern(pattern, value, options) { - if (value === false) { - return NULL; // pattern is disabled - } - const parsedPattern = parsePattern(pattern, options); - if (parsedPattern === NULL) { - return NULL; - } - // Expression Pattern is - if (typeof value === 'boolean') { - return parsedPattern; - } - // Expression Pattern is - if (value) { - const when = value.when; - if (typeof when === 'string') { - const result = (path, basename, name, hasSibling) => { - if (!hasSibling || !parsedPattern(path, basename)) { - return null; - } - const clausePattern = when.replace('$(basename)', name); - const matched = hasSibling(clausePattern); - return Object(_async_js__WEBPACK_IMPORTED_MODULE_5__["isThenable"])(matched) ? - matched.then(m => m ? pattern : null) : - matched ? pattern : null; - }; - result.requiresSiblings = true; - return result; - } - } - // Expression is Anything - return parsedPattern; -} -function aggregateBasenameMatches(parsedPatterns, result) { - const basenamePatterns = parsedPatterns.filter(parsedPattern => !!parsedPattern.basenames); - if (basenamePatterns.length < 2) { - return parsedPatterns; - } - const basenames = basenamePatterns.reduce((all, current) => { - const basenames = current.basenames; - return basenames ? all.concat(basenames) : all; - }, []); - let patterns; - if (result) { - patterns = []; - for (let i = 0, n = basenames.length; i < n; i++) { - patterns.push(result); - } - } - else { - patterns = basenamePatterns.reduce((all, current) => { - const patterns = current.patterns; - return patterns ? all.concat(patterns) : all; - }, []); - } - const aggregate = function (path, basename) { - if (typeof path !== 'string') { - return null; - } - if (!basename) { - let i; - for (i = path.length; i > 0; i--) { - const ch = path.charCodeAt(i - 1); - if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) { - break; - } - } - basename = path.substr(i); - } - const index = basenames.indexOf(basename); - return index !== -1 ? patterns[index] : null; - }; - aggregate.basenames = basenames; - aggregate.patterns = patterns; - aggregate.allBasenames = basenames; - const aggregatedPatterns = parsedPatterns.filter(parsedPattern => !parsedPattern.basenames); - aggregatedPatterns.push(aggregate); - return aggregatedPatterns; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/hash.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/hash.js ***! - \***************************************************************/ -/*! exports provided: hash, doHash, stringHash, StringSHA1 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hash", function() { return hash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doHash", function() { return doHash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringHash", function() { return stringHash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringSHA1", function() { return StringSHA1; }); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * Return a hash value for an object. - */ -function hash(obj) { - return doHash(obj, 0); -} -function doHash(obj, hashVal) { - switch (typeof obj) { - case 'object': - if (obj === null) { - return numberHash(349, hashVal); - } - else if (Array.isArray(obj)) { - return arrayHash(obj, hashVal); - } - return objectHash(obj, hashVal); - case 'string': - return stringHash(obj, hashVal); - case 'boolean': - return booleanHash(obj, hashVal); - case 'number': - return numberHash(obj, hashVal); - case 'undefined': - return numberHash(937, hashVal); - default: - return numberHash(617, hashVal); - } -} -function numberHash(val, initialHashVal) { - return (((initialHashVal << 5) - initialHashVal) + val) | 0; // hashVal * 31 + ch, keep as int32 -} -function booleanHash(b, initialHashVal) { - return numberHash(b ? 433 : 863, initialHashVal); -} -function stringHash(s, hashVal) { - hashVal = numberHash(149417, hashVal); - for (let i = 0, length = s.length; i < length; i++) { - hashVal = numberHash(s.charCodeAt(i), hashVal); - } - return hashVal; -} -function arrayHash(arr, initialHashVal) { - initialHashVal = numberHash(104579, initialHashVal); - return arr.reduce((hashVal, item) => doHash(item, hashVal), initialHashVal); -} -function objectHash(obj, initialHashVal) { - initialHashVal = numberHash(181387, initialHashVal); - return Object.keys(obj).sort().reduce((hashVal, key) => { - hashVal = stringHash(key, hashVal); - return doHash(obj[key], hashVal); - }, initialHashVal); -} -function leftRotate(value, bits, totalBits = 32) { - // delta + bits = totalBits - const delta = totalBits - bits; - // All ones, expect `delta` zeros aligned to the right - const mask = ~((1 << delta) - 1); - // Join (value left-shifted `bits` bits) with (masked value right-shifted `delta` bits) - return ((value << bits) | ((mask & value) >>> delta)) >>> 0; -} -function fill(dest, index = 0, count = dest.byteLength, value = 0) { - for (let i = 0; i < count; i++) { - dest[index + i] = value; - } -} -function leftPad(value, length, char = '0') { - while (value.length < length) { - value = char + value; - } - return value; -} -function toHexString(value, bitsize = 32) { - return leftPad((value >>> 0).toString(16), bitsize / 4); -} -/** - * A SHA1 implementation that works with strings and does not allocate. - */ -class StringSHA1 { - constructor() { - this._h0 = 0x67452301; - this._h1 = 0xEFCDAB89; - this._h2 = 0x98BADCFE; - this._h3 = 0x10325476; - this._h4 = 0xC3D2E1F0; - this._buff = new Uint8Array(64 /* BLOCK_SIZE */ + 3 /* to fit any utf-8 */); - this._buffDV = new DataView(this._buff.buffer); - this._buffLen = 0; - this._totalLen = 0; - this._leftoverHighSurrogate = 0; - this._finished = false; - } - update(str) { - const strLen = str.length; - if (strLen === 0) { - return; - } - const buff = this._buff; - let buffLen = this._buffLen; - let leftoverHighSurrogate = this._leftoverHighSurrogate; - let charCode; - let offset; - if (leftoverHighSurrogate !== 0) { - charCode = leftoverHighSurrogate; - offset = -1; - leftoverHighSurrogate = 0; - } - else { - charCode = str.charCodeAt(0); - offset = 0; - } - while (true) { - let codePoint = charCode; - if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCode)) { - if (offset + 1 < strLen) { - const nextCharCode = str.charCodeAt(offset + 1); - if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowSurrogate"](nextCharCode)) { - offset++; - codePoint = _strings_js__WEBPACK_IMPORTED_MODULE_0__["computeCodePoint"](charCode, nextCharCode); - } - else { - // illegal => unicode replacement character - codePoint = 65533 /* UNICODE_REPLACEMENT */; - } - } - else { - // last character is a surrogate pair - leftoverHighSurrogate = charCode; - break; - } - } - else if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowSurrogate"](charCode)) { - // illegal => unicode replacement character - codePoint = 65533 /* UNICODE_REPLACEMENT */; - } - buffLen = this._push(buff, buffLen, codePoint); - offset++; - if (offset < strLen) { - charCode = str.charCodeAt(offset); - } - else { - break; - } - } - this._buffLen = buffLen; - this._leftoverHighSurrogate = leftoverHighSurrogate; - } - _push(buff, buffLen, codePoint) { - if (codePoint < 0x0080) { - buff[buffLen++] = codePoint; - } - else if (codePoint < 0x0800) { - buff[buffLen++] = 0b11000000 | ((codePoint & 0b00000000000000000000011111000000) >>> 6); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0); - } - else if (codePoint < 0x10000) { - buff[buffLen++] = 0b11100000 | ((codePoint & 0b00000000000000001111000000000000) >>> 12); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0); - } - else { - buff[buffLen++] = 0b11110000 | ((codePoint & 0b00000000000111000000000000000000) >>> 18); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000111111000000000000) >>> 12); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000111111000000) >>> 6); - buff[buffLen++] = 0b10000000 | ((codePoint & 0b00000000000000000000000000111111) >>> 0); - } - if (buffLen >= 64 /* BLOCK_SIZE */) { - this._step(); - buffLen -= 64 /* BLOCK_SIZE */; - this._totalLen += 64 /* BLOCK_SIZE */; - // take last 3 in case of UTF8 overflow - buff[0] = buff[64 /* BLOCK_SIZE */ + 0]; - buff[1] = buff[64 /* BLOCK_SIZE */ + 1]; - buff[2] = buff[64 /* BLOCK_SIZE */ + 2]; - } - return buffLen; - } - digest() { - if (!this._finished) { - this._finished = true; - if (this._leftoverHighSurrogate) { - // illegal => unicode replacement character - this._leftoverHighSurrogate = 0; - this._buffLen = this._push(this._buff, this._buffLen, 65533 /* UNICODE_REPLACEMENT */); - } - this._totalLen += this._buffLen; - this._wrapUp(); - } - return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4); - } - _wrapUp() { - this._buff[this._buffLen++] = 0x80; - fill(this._buff, this._buffLen); - if (this._buffLen > 56) { - this._step(); - fill(this._buff); - } - // this will fit because the mantissa can cover up to 52 bits - const ml = 8 * this._totalLen; - this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false); - this._buffDV.setUint32(60, ml % 4294967296, false); - this._step(); - } - _step() { - const bigBlock32 = StringSHA1._bigBlock32; - const data = this._buffDV; - for (let j = 0; j < 64 /* 16*4 */; j += 4) { - bigBlock32.setUint32(j, data.getUint32(j, false), false); - } - for (let j = 64; j < 320 /* 80*4 */; j += 4) { - bigBlock32.setUint32(j, leftRotate((bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false)), 1), false); - } - let a = this._h0; - let b = this._h1; - let c = this._h2; - let d = this._h3; - let e = this._h4; - let f, k; - let temp; - for (let j = 0; j < 80; j++) { - if (j < 20) { - f = (b & c) | ((~b) & d); - k = 0x5A827999; - } - else if (j < 40) { - f = b ^ c ^ d; - k = 0x6ED9EBA1; - } - else if (j < 60) { - f = (b & c) | (b & d) | (c & d); - k = 0x8F1BBCDC; - } - else { - f = b ^ c ^ d; - k = 0xCA62C1D6; - } - temp = (leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false)) & 0xffffffff; - e = d; - d = c; - c = leftRotate(b, 30); - b = a; - a = temp; - } - this._h0 = (this._h0 + a) & 0xffffffff; - this._h1 = (this._h1 + b) & 0xffffffff; - this._h2 = (this._h2 + c) & 0xffffffff; - this._h3 = (this._h3 + d) & 0xffffffff; - this._h4 = (this._h4 + e) & 0xffffffff; - } -} -StringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320)); // 80 * 4 = 320 - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/history.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/history.js ***! - \******************************************************************/ -/*! exports provided: HistoryNavigator */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistoryNavigator", function() { return HistoryNavigator; }); -/* harmony import */ var _navigator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navigator.js */ "./node_modules/monaco-editor/esm/vs/base/common/navigator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class HistoryNavigator { - constructor(history = [], limit = 10) { - this._initialize(history); - this._limit = limit; - this._onChange(); - } - add(t) { - this._history.delete(t); - this._history.add(t); - this._onChange(); - } - next() { - if (this._currentPosition() !== this._elements.length - 1) { - return this._navigator.next(); - } - return null; - } - previous() { - if (this._currentPosition() !== 0) { - return this._navigator.previous(); - } - return null; - } - current() { - return this._navigator.current(); - } - first() { - return this._navigator.first(); - } - last() { - return this._navigator.last(); - } - has(t) { - return this._history.has(t); - } - _onChange() { - this._reduceToLimit(); - const elements = this._elements; - this._navigator = new _navigator_js__WEBPACK_IMPORTED_MODULE_0__["ArrayNavigator"](elements, 0, elements.length, elements.length); - } - _reduceToLimit() { - const data = this._elements; - if (data.length > this._limit) { - this._initialize(data.slice(data.length - this._limit)); - } - } - _currentPosition() { - const currentElement = this._navigator.current(); - if (!currentElement) { - return -1; - } - return this._elements.indexOf(currentElement); - } - _initialize(history) { - this._history = new Set(); - for (const entry of history) { - this._history.add(entry); - } - } - get _elements() { - const elements = []; - this._history.forEach(e => elements.push(e)); - return elements; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js ***! - \**********************************************************************/ -/*! exports provided: MarkdownString, isEmptyMarkdownString, isMarkdownString, markedStringsEquals, removeMarkdownEscapes, parseHrefAndDimensions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkdownString", function() { return MarkdownString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyMarkdownString", function() { return isEmptyMarkdownString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMarkdownString", function() { return isMarkdownString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markedStringsEquals", function() { return markedStringsEquals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeMarkdownEscapes", function() { return removeMarkdownEscapes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseHrefAndDimensions", function() { return parseHrefAndDimensions; }); -/* harmony import */ var _arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class MarkdownString { - constructor(_value = '', isTrustedOrOptions = false) { - var _a, _b; - this._value = _value; - if (typeof this._value !== 'string') { - throw Object(_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])('value'); - } - if (typeof isTrustedOrOptions === 'boolean') { - this._isTrusted = isTrustedOrOptions; - this._supportThemeIcons = false; - } - else { - this._isTrusted = (_a = isTrustedOrOptions.isTrusted) !== null && _a !== void 0 ? _a : false; - this._supportThemeIcons = (_b = isTrustedOrOptions.supportThemeIcons) !== null && _b !== void 0 ? _b : false; - } - } - get value() { return this._value; } - get isTrusted() { return this._isTrusted; } - get supportThemeIcons() { return this._supportThemeIcons; } - appendText(value) { - // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash - this._value += (this._supportThemeIcons ? Object(_codicons_js__WEBPACK_IMPORTED_MODULE_1__["escapeCodicons"])(value) : value) - .replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&') - .replace(/\n/g, '\n\n'); - return this; - } - appendMarkdown(value) { - this._value += value; - return this; - } - appendCodeblock(langId, code) { - this._value += '\n```'; - this._value += langId; - this._value += '\n'; - this._value += code; - this._value += '\n```\n'; - return this; - } -} -function isEmptyMarkdownString(oneOrMany) { - if (isMarkdownString(oneOrMany)) { - return !oneOrMany.value; - } - else if (Array.isArray(oneOrMany)) { - return oneOrMany.every(isEmptyMarkdownString); - } - else { - return true; - } -} -function isMarkdownString(thing) { - if (thing instanceof MarkdownString) { - return true; - } - else if (thing && typeof thing === 'object') { - return typeof thing.value === 'string' - && (typeof thing.isTrusted === 'boolean' || thing.isTrusted === undefined) - && (typeof thing.supportThemeIcons === 'boolean' || thing.supportThemeIcons === undefined); - } - return false; -} -function markedStringsEquals(a, b) { - if (!a && !b) { - return true; - } - else if (!a || !b) { - return false; - } - else if (Array.isArray(a) && Array.isArray(b)) { - return Object(_arrays_js__WEBPACK_IMPORTED_MODULE_0__["equals"])(a, b, markdownStringEqual); - } - else if (isMarkdownString(a) && isMarkdownString(b)) { - return markdownStringEqual(a, b); - } - else { - return false; - } -} -function markdownStringEqual(a, b) { - if (a === b) { - return true; - } - else if (!a || !b) { - return false; - } - else { - return a.value === b.value && a.isTrusted === b.isTrusted && a.supportThemeIcons === b.supportThemeIcons; - } -} -function removeMarkdownEscapes(text) { - if (!text) { - return text; - } - return text.replace(/\\([\\`*_{}[\]()#+\-.!])/g, '$1'); -} -function parseHrefAndDimensions(href) { - const dimensions = []; - const splitted = href.split('|').map(s => s.trim()); - href = splitted[0]; - const parameters = splitted[1]; - if (parameters) { - const heightFromParams = /height=(\d+)/.exec(parameters); - const widthFromParams = /width=(\d+)/.exec(parameters); - const height = heightFromParams ? heightFromParams[1] : ''; - const width = widthFromParams ? widthFromParams[1] : ''; - const widthIsFinite = isFinite(parseInt(width)); - const heightIsFinite = isFinite(parseInt(height)); - if (widthIsFinite) { - dimensions.push(`width="${width}"`); - } - if (heightIsFinite) { - dimensions.push(`height="${height}"`); - } - } - return { href, dimensions }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js ***! - \**********************************************************************/ -/*! exports provided: IdGenerator, defaultGenerator */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdGenerator", function() { return IdGenerator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultGenerator", function() { return defaultGenerator; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class IdGenerator { - constructor(prefix) { - this._prefix = prefix; - this._lastId = 0; - } - nextId() { - return this._prefix + (++this._lastId); - } -} -const defaultGenerator = new IdGenerator('id#'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js ***! - \************************************************************************/ -/*! exports provided: insane */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insane", function() { return insane; }); -var require;var require;/* -The MIT License (MIT) - -Copyright © 2015 Nicolas Bevacqua - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -let __insane_func; - -(function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return require(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = "function" == typeof require && require, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({ - 1: [function (require, module, exports) { - 'use strict'; - - var toMap = require('./toMap'); - var uris = ['background', 'base', 'cite', 'href', 'longdesc', 'src', 'usemap']; - - module.exports = { - uris: toMap(uris) // attributes that have an href and hence need to be sanitized - }; - - }, { "./toMap": 10 }], 2: [function (require, module, exports) { - 'use strict'; - - var defaults = { - allowedAttributes: { - '*': ['title', 'accesskey'], - a: ['href', 'name', 'target', 'aria-label'], - iframe: ['allowfullscreen', 'frameborder', 'src'], - img: ['src', 'alt', 'title', 'aria-label'] - }, - allowedClasses: {}, - allowedSchemes: ['http', 'https', 'mailto'], - allowedTags: [ - 'a', 'abbr', 'article', 'b', 'blockquote', 'br', 'caption', 'code', 'del', 'details', 'div', 'em', - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'main', 'mark', - 'ol', 'p', 'pre', 'section', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table', - 'tbody', 'td', 'th', 'thead', 'tr', 'u', 'ul' - ], - filter: null - }; - - module.exports = defaults; - - }, {}], 3: [function (require, module, exports) { - 'use strict'; - - var toMap = require('./toMap'); - var voids = ['area', 'br', 'col', 'hr', 'img', 'wbr', 'input', 'base', 'basefont', 'link', 'meta']; - - module.exports = { - voids: toMap(voids) - }; - - }, { "./toMap": 10 }], 4: [function (require, module, exports) { - 'use strict'; - - var he = require('he'); - var assign = require('assignment'); - var parser = require('./parser'); - var sanitizer = require('./sanitizer'); - var defaults = require('./defaults'); - - function insane(html, options, strict) { - var buffer = []; - var configuration = strict === true ? options : assign({}, defaults, options); - var handler = sanitizer(buffer, configuration); - - parser(html, handler); - - return buffer.join(''); - } - - insane.defaults = defaults; - module.exports = insane; - __insane_func = insane; - - }, { "./defaults": 2, "./parser": 7, "./sanitizer": 8, "assignment": 6, "he": 9 }], 5: [function (require, module, exports) { - 'use strict'; - - module.exports = function lowercase(string) { - return typeof string === 'string' ? string.toLowerCase() : string; - }; - - }, {}], 6: [function (require, module, exports) { - 'use strict'; - - function assignment(result) { - var stack = Array.prototype.slice.call(arguments, 1); - var item; - var key; - while (stack.length) { - item = stack.shift(); - for (key in item) { - if (item.hasOwnProperty(key)) { - if (Object.prototype.toString.call(result[key]) === '[object Object]') { - result[key] = assignment(result[key], item[key]); - } else { - result[key] = item[key]; - } - } - } - } - return result; - } - - module.exports = assignment; - - }, {}], 7: [function (require, module, exports) { - 'use strict'; - - var he = require('he'); - var lowercase = require('./lowercase'); - var attributes = require('./attributes'); - var elements = require('./elements'); - var rstart = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/; - var rend = /^<\s*\/\s*([\w:-]+)[^>]*>/; - var rattrs = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g; - var rtag = /^'); - if (index >= 0) { - if (handler.comment) { - handler.comment(html.substring(4, index)); - } - html = html.substring(index + 3); - chars = false; - } - } - - function parseTagDecode() { - if (!chars) { - return; - } - var text; - var index = html.indexOf('<'); - if (index >= 0) { - text = html.substring(0, index); - html = html.substring(index); - } else { - text = html; - html = ''; - } - if (handler.chars) { - handler.chars(text); - } - } - - function parseStartTag(tag, tagName, rest, unary) { - var attrs = {}; - var low = lowercase(tagName); - var u = elements.voids[low] || !!unary; - - rest.replace(rattrs, attrReplacer); - - if (!u) { - stack.push(low); - } - if (handler.start) { - handler.start(low, attrs, u); - } - - function attrReplacer(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) { - if (doubleQuotedValue === void 0 && singleQuotedValue === void 0 && unquotedValue === void 0) { - attrs[name] = void 0; // attribute is like - } else { - attrs[name] = he.decode(doubleQuotedValue || singleQuotedValue || unquotedValue || ''); - } - } - } - - function parseEndTag(tag, tagName) { - var i; - var pos = 0; - var low = lowercase(tagName); - if (low) { - for (pos = stack.length - 1; pos >= 0; pos--) { - if (stack[pos] === low) { - break; // find the closest opened tag of the same type - } - } - } - if (pos >= 0) { - for (i = stack.length - 1; i >= pos; i--) { - if (handler.end) { // close all the open elements, up the stack - handler.end(stack[i]); - } - } - stack.length = pos; - } - } - } - - module.exports = parser; - - }, { "./attributes": 1, "./elements": 3, "./lowercase": 5, "he": 9 }], 8: [function (require, module, exports) { - 'use strict'; - - var he = require('he'); - var lowercase = require('./lowercase'); - var attributes = require('./attributes'); - var elements = require('./elements'); - - function sanitizer(buffer, options) { - var last; - var context; - var o = options || {}; - - reset(); - - return { - start: start, - end: end, - chars: chars - }; - - function out(value) { - buffer.push(value); - } - - function start(tag, attrs, unary) { - var low = lowercase(tag); - - if (context.ignoring) { - ignore(low); return; - } - if ((o.allowedTags || []).indexOf(low) === -1) { - ignore(low); return; - } - if (o.filter && !o.filter({ tag: low, attrs: attrs })) { - ignore(low); return; - } - - out('<'); - out(low); - Object.keys(attrs).forEach(parse); - out(unary ? '/>' : '>'); - - function parse(key) { - var value = attrs[key]; - var classesOk = (o.allowedClasses || {})[low] || []; - var attrsOk = (o.allowedAttributes || {})[low] || []; - attrsOk = attrsOk.concat((o.allowedAttributes || {})['*'] || []); - var valid; - var lkey = lowercase(key); - if (lkey === 'class' && attrsOk.indexOf(lkey) === -1) { - value = value.split(' ').filter(isValidClass).join(' ').trim(); - valid = value.length; - } else { - valid = attrsOk.indexOf(lkey) !== -1 && (attributes.uris[lkey] !== true || testUrl(value)); - } - if (valid) { - out(' '); - out(key); - if (typeof value === 'string') { - out('="'); - out(he.encode(value)); - out('"'); - } - } - function isValidClass(className) { - return classesOk && classesOk.indexOf(className) !== -1; - } - } - } - - function end(tag) { - var low = lowercase(tag); - var allowed = (o.allowedTags || []).indexOf(low) !== -1; - if (allowed) { - if (context.ignoring === false) { - out(''); - } else { - unignore(low); - } - } else { - unignore(low); - } - } - - function testUrl(text) { - var start = text[0]; - if (start === '#' || start === '/') { - return true; - } - var colon = text.indexOf(':'); - if (colon === -1) { - return true; - } - var questionmark = text.indexOf('?'); - if (questionmark !== -1 && colon > questionmark) { - return true; - } - var hash = text.indexOf('#'); - if (hash !== -1 && colon > hash) { - return true; - } - return o.allowedSchemes.some(matches); - - function matches(scheme) { - return text.indexOf(scheme + ':') === 0; - } - } - - function chars(text) { - if (context.ignoring === false) { - out(o.transformText ? o.transformText(text) : text); - } - } - - function ignore(tag) { - if (elements.voids[tag]) { - return; - } - if (context.ignoring === false) { - context = { ignoring: tag, depth: 1 }; - } else if (context.ignoring === tag) { - context.depth++; - } - } - - function unignore(tag) { - if (context.ignoring === tag) { - if (--context.depth <= 0) { - reset(); - } - } - } - - function reset() { - context = { ignoring: false, depth: 0 }; - } - } - - module.exports = sanitizer; - - }, { "./attributes": 1, "./elements": 3, "./lowercase": 5, "he": 9 }], 9: [function (require, module, exports) { - 'use strict'; - - var escapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - var unescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; - var rescaped = /(&|<|>|"|')/g; - var runescaped = /[&<>"']/g; - - function escapeHtmlChar(match) { - return escapes[match]; - } - function unescapeHtmlChar(match) { - return unescapes[match]; - } - - function escapeHtml(text) { - return text == null ? '' : String(text).replace(runescaped, escapeHtmlChar); - } - - function unescapeHtml(html) { - return html == null ? '' : String(html).replace(rescaped, unescapeHtmlChar); - } - - escapeHtml.options = unescapeHtml.options = {}; - - module.exports = { - encode: escapeHtml, - escape: escapeHtml, - decode: unescapeHtml, - unescape: unescapeHtml, - version: '1.0.0-browser' - }; - - }, {}], 10: [function (require, module, exports) { - 'use strict'; - - function toMap(list) { - return list.reduce(asKey, {}); - } - - function asKey(accumulator, item) { - accumulator[item] = true; - return accumulator; - } - - module.exports = toMap; - - }, {}] -}, {}, [4]); - -// ESM-comment-begin -// define(function() { return { insane: __insane_func }; }); -// ESM-comment-end - -// ESM-uncomment-begin -var insane = __insane_func; -// ESM-uncomment-end - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/iterator.js ***! - \*******************************************************************/ -/*! exports provided: Iterable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Iterable", function() { return Iterable; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var Iterable; -(function (Iterable) { - function is(thing) { - return thing && typeof thing === 'object' && typeof thing[Symbol.iterator] === 'function'; - } - Iterable.is = is; - const _empty = Object.freeze([]); - function empty() { - return _empty; - } - Iterable.empty = empty; - function* single(element) { - yield element; - } - Iterable.single = single; - function from(iterable) { - return iterable || _empty; - } - Iterable.from = from; - function first(iterable) { - return iterable[Symbol.iterator]().next().value; - } - Iterable.first = first; - function some(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return true; - } - } - return false; - } - Iterable.some = some; - function* filter(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - yield element; - } - } - } - Iterable.filter = filter; - function* map(iterable, fn) { - for (const element of iterable) { - yield fn(element); - } - } - Iterable.map = map; - function* concat(...iterables) { - for (const iterable of iterables) { - for (const element of iterable) { - yield element; - } - } - } - Iterable.concat = concat; - /** - * Consumes `atMost` elements from iterable and returns the consumed elements, - * and an iterable for the rest of the elements. - */ - function consume(iterable, atMost = Number.POSITIVE_INFINITY) { - const consumed = []; - if (atMost === 0) { - return [consumed, iterable]; - } - const iterator = iterable[Symbol.iterator](); - for (let i = 0; i < atMost; i++) { - const next = iterator.next(); - if (next.done) { - return [consumed, Iterable.empty()]; - } - consumed.push(next.value); - } - return [consumed, { [Symbol.iterator]() { return iterator; } }]; - } - Iterable.consume = consume; -})(Iterable || (Iterable = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js ***! - \*******************************************************************/ -/*! exports provided: KeyCodeUtils, KeyChord, createKeybinding, createSimpleKeybinding, SimpleKeybinding, ChordKeybinding, ResolvedKeybindingPart, ResolvedKeybinding */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyCodeUtils", function() { return KeyCodeUtils; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyChord", function() { return KeyChord; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createKeybinding", function() { return createKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSimpleKeybinding", function() { return createSimpleKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleKeybinding", function() { return SimpleKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChordKeybinding", function() { return ChordKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedKeybindingPart", function() { return ResolvedKeybindingPart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedKeybinding", function() { return ResolvedKeybinding; }); -/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class KeyCodeStrMap { - constructor() { - this._keyCodeToStr = []; - this._strToKeyCode = Object.create(null); - } - define(keyCode, str) { - this._keyCodeToStr[keyCode] = str; - this._strToKeyCode[str.toLowerCase()] = keyCode; - } - keyCodeToStr(keyCode) { - return this._keyCodeToStr[keyCode]; - } - strToKeyCode(str) { - return this._strToKeyCode[str.toLowerCase()] || 0 /* Unknown */; - } -} -const uiMap = new KeyCodeStrMap(); -const userSettingsUSMap = new KeyCodeStrMap(); -const userSettingsGeneralMap = new KeyCodeStrMap(); -(function () { - function define(keyCode, uiLabel, usUserSettingsLabel = uiLabel, generalUserSettingsLabel = usUserSettingsLabel) { - uiMap.define(keyCode, uiLabel); - userSettingsUSMap.define(keyCode, usUserSettingsLabel); - userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel); - } - define(0 /* Unknown */, 'unknown'); - define(1 /* Backspace */, 'Backspace'); - define(2 /* Tab */, 'Tab'); - define(3 /* Enter */, 'Enter'); - define(4 /* Shift */, 'Shift'); - define(5 /* Ctrl */, 'Ctrl'); - define(6 /* Alt */, 'Alt'); - define(7 /* PauseBreak */, 'PauseBreak'); - define(8 /* CapsLock */, 'CapsLock'); - define(9 /* Escape */, 'Escape'); - define(10 /* Space */, 'Space'); - define(11 /* PageUp */, 'PageUp'); - define(12 /* PageDown */, 'PageDown'); - define(13 /* End */, 'End'); - define(14 /* Home */, 'Home'); - define(15 /* LeftArrow */, 'LeftArrow', 'Left'); - define(16 /* UpArrow */, 'UpArrow', 'Up'); - define(17 /* RightArrow */, 'RightArrow', 'Right'); - define(18 /* DownArrow */, 'DownArrow', 'Down'); - define(19 /* Insert */, 'Insert'); - define(20 /* Delete */, 'Delete'); - define(21 /* KEY_0 */, '0'); - define(22 /* KEY_1 */, '1'); - define(23 /* KEY_2 */, '2'); - define(24 /* KEY_3 */, '3'); - define(25 /* KEY_4 */, '4'); - define(26 /* KEY_5 */, '5'); - define(27 /* KEY_6 */, '6'); - define(28 /* KEY_7 */, '7'); - define(29 /* KEY_8 */, '8'); - define(30 /* KEY_9 */, '9'); - define(31 /* KEY_A */, 'A'); - define(32 /* KEY_B */, 'B'); - define(33 /* KEY_C */, 'C'); - define(34 /* KEY_D */, 'D'); - define(35 /* KEY_E */, 'E'); - define(36 /* KEY_F */, 'F'); - define(37 /* KEY_G */, 'G'); - define(38 /* KEY_H */, 'H'); - define(39 /* KEY_I */, 'I'); - define(40 /* KEY_J */, 'J'); - define(41 /* KEY_K */, 'K'); - define(42 /* KEY_L */, 'L'); - define(43 /* KEY_M */, 'M'); - define(44 /* KEY_N */, 'N'); - define(45 /* KEY_O */, 'O'); - define(46 /* KEY_P */, 'P'); - define(47 /* KEY_Q */, 'Q'); - define(48 /* KEY_R */, 'R'); - define(49 /* KEY_S */, 'S'); - define(50 /* KEY_T */, 'T'); - define(51 /* KEY_U */, 'U'); - define(52 /* KEY_V */, 'V'); - define(53 /* KEY_W */, 'W'); - define(54 /* KEY_X */, 'X'); - define(55 /* KEY_Y */, 'Y'); - define(56 /* KEY_Z */, 'Z'); - define(57 /* Meta */, 'Meta'); - define(58 /* ContextMenu */, 'ContextMenu'); - define(59 /* F1 */, 'F1'); - define(60 /* F2 */, 'F2'); - define(61 /* F3 */, 'F3'); - define(62 /* F4 */, 'F4'); - define(63 /* F5 */, 'F5'); - define(64 /* F6 */, 'F6'); - define(65 /* F7 */, 'F7'); - define(66 /* F8 */, 'F8'); - define(67 /* F9 */, 'F9'); - define(68 /* F10 */, 'F10'); - define(69 /* F11 */, 'F11'); - define(70 /* F12 */, 'F12'); - define(71 /* F13 */, 'F13'); - define(72 /* F14 */, 'F14'); - define(73 /* F15 */, 'F15'); - define(74 /* F16 */, 'F16'); - define(75 /* F17 */, 'F17'); - define(76 /* F18 */, 'F18'); - define(77 /* F19 */, 'F19'); - define(78 /* NumLock */, 'NumLock'); - define(79 /* ScrollLock */, 'ScrollLock'); - define(80 /* US_SEMICOLON */, ';', ';', 'OEM_1'); - define(81 /* US_EQUAL */, '=', '=', 'OEM_PLUS'); - define(82 /* US_COMMA */, ',', ',', 'OEM_COMMA'); - define(83 /* US_MINUS */, '-', '-', 'OEM_MINUS'); - define(84 /* US_DOT */, '.', '.', 'OEM_PERIOD'); - define(85 /* US_SLASH */, '/', '/', 'OEM_2'); - define(86 /* US_BACKTICK */, '`', '`', 'OEM_3'); - define(110 /* ABNT_C1 */, 'ABNT_C1'); - define(111 /* ABNT_C2 */, 'ABNT_C2'); - define(87 /* US_OPEN_SQUARE_BRACKET */, '[', '[', 'OEM_4'); - define(88 /* US_BACKSLASH */, '\\', '\\', 'OEM_5'); - define(89 /* US_CLOSE_SQUARE_BRACKET */, ']', ']', 'OEM_6'); - define(90 /* US_QUOTE */, '\'', '\'', 'OEM_7'); - define(91 /* OEM_8 */, 'OEM_8'); - define(92 /* OEM_102 */, 'OEM_102'); - define(93 /* NUMPAD_0 */, 'NumPad0'); - define(94 /* NUMPAD_1 */, 'NumPad1'); - define(95 /* NUMPAD_2 */, 'NumPad2'); - define(96 /* NUMPAD_3 */, 'NumPad3'); - define(97 /* NUMPAD_4 */, 'NumPad4'); - define(98 /* NUMPAD_5 */, 'NumPad5'); - define(99 /* NUMPAD_6 */, 'NumPad6'); - define(100 /* NUMPAD_7 */, 'NumPad7'); - define(101 /* NUMPAD_8 */, 'NumPad8'); - define(102 /* NUMPAD_9 */, 'NumPad9'); - define(103 /* NUMPAD_MULTIPLY */, 'NumPad_Multiply'); - define(104 /* NUMPAD_ADD */, 'NumPad_Add'); - define(105 /* NUMPAD_SEPARATOR */, 'NumPad_Separator'); - define(106 /* NUMPAD_SUBTRACT */, 'NumPad_Subtract'); - define(107 /* NUMPAD_DECIMAL */, 'NumPad_Decimal'); - define(108 /* NUMPAD_DIVIDE */, 'NumPad_Divide'); -})(); -var KeyCodeUtils; -(function (KeyCodeUtils) { - function toString(keyCode) { - return uiMap.keyCodeToStr(keyCode); - } - KeyCodeUtils.toString = toString; - function fromString(key) { - return uiMap.strToKeyCode(key); - } - KeyCodeUtils.fromString = fromString; - function toUserSettingsUS(keyCode) { - return userSettingsUSMap.keyCodeToStr(keyCode); - } - KeyCodeUtils.toUserSettingsUS = toUserSettingsUS; - function toUserSettingsGeneral(keyCode) { - return userSettingsGeneralMap.keyCodeToStr(keyCode); - } - KeyCodeUtils.toUserSettingsGeneral = toUserSettingsGeneral; - function fromUserSettings(key) { - return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); - } - KeyCodeUtils.fromUserSettings = fromUserSettings; -})(KeyCodeUtils || (KeyCodeUtils = {})); -function KeyChord(firstPart, secondPart) { - const chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0; - return (firstPart | chordPart) >>> 0; -} -function createKeybinding(keybinding, OS) { - if (keybinding === 0) { - return null; - } - const firstPart = (keybinding & 0x0000FFFF) >>> 0; - const chordPart = (keybinding & 0xFFFF0000) >>> 16; - if (chordPart !== 0) { - return new ChordKeybinding([ - createSimpleKeybinding(firstPart, OS), - createSimpleKeybinding(chordPart, OS) - ]); - } - return new ChordKeybinding([createSimpleKeybinding(firstPart, OS)]); -} -function createSimpleKeybinding(keybinding, OS) { - const ctrlCmd = (keybinding & 2048 /* CtrlCmd */ ? true : false); - const winCtrl = (keybinding & 256 /* WinCtrl */ ? true : false); - const ctrlKey = (OS === 2 /* Macintosh */ ? winCtrl : ctrlCmd); - const shiftKey = (keybinding & 1024 /* Shift */ ? true : false); - const altKey = (keybinding & 512 /* Alt */ ? true : false); - const metaKey = (OS === 2 /* Macintosh */ ? ctrlCmd : winCtrl); - const keyCode = (keybinding & 255 /* KeyCode */); - return new SimpleKeybinding(ctrlKey, shiftKey, altKey, metaKey, keyCode); -} -class SimpleKeybinding { - constructor(ctrlKey, shiftKey, altKey, metaKey, keyCode) { - this.ctrlKey = ctrlKey; - this.shiftKey = shiftKey; - this.altKey = altKey; - this.metaKey = metaKey; - this.keyCode = keyCode; - } - equals(other) { - return (this.ctrlKey === other.ctrlKey - && this.shiftKey === other.shiftKey - && this.altKey === other.altKey - && this.metaKey === other.metaKey - && this.keyCode === other.keyCode); - } - isModifierKey() { - return (this.keyCode === 0 /* Unknown */ - || this.keyCode === 5 /* Ctrl */ - || this.keyCode === 57 /* Meta */ - || this.keyCode === 6 /* Alt */ - || this.keyCode === 4 /* Shift */); - } - toChord() { - return new ChordKeybinding([this]); - } - /** - * Does this keybinding refer to the key code of a modifier and it also has the modifier flag? - */ - isDuplicateModifierCase() { - return ((this.ctrlKey && this.keyCode === 5 /* Ctrl */) - || (this.shiftKey && this.keyCode === 4 /* Shift */) - || (this.altKey && this.keyCode === 6 /* Alt */) - || (this.metaKey && this.keyCode === 57 /* Meta */)); - } -} -class ChordKeybinding { - constructor(parts) { - if (parts.length === 0) { - throw Object(_errors_js__WEBPACK_IMPORTED_MODULE_0__["illegalArgument"])(`parts`); - } - this.parts = parts; - } -} -class ResolvedKeybindingPart { - constructor(ctrlKey, shiftKey, altKey, metaKey, kbLabel, kbAriaLabel) { - this.ctrlKey = ctrlKey; - this.shiftKey = shiftKey; - this.altKey = altKey; - this.metaKey = metaKey; - this.keyLabel = kbLabel; - this.keyAriaLabel = kbAriaLabel; - } -} -/** - * A resolved keybinding. Can be a simple keybinding or a chord keybinding. - */ -class ResolvedKeybinding { -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js ***! - \***************************************************************************/ -/*! exports provided: ModifierLabelProvider, UILabelProvider, AriaLabelProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModifierLabelProvider", function() { return ModifierLabelProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UILabelProvider", function() { return UILabelProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AriaLabelProvider", function() { return AriaLabelProvider; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class ModifierLabelProvider { - constructor(mac, windows, linux = windows) { - this.modifierLabels = [null]; // index 0 will never me accessed. - this.modifierLabels[2 /* Macintosh */] = mac; - this.modifierLabels[1 /* Windows */] = windows; - this.modifierLabels[3 /* Linux */] = linux; - } - toLabel(OS, parts, keyLabelProvider) { - if (parts.length === 0) { - return null; - } - const result = []; - for (let i = 0, len = parts.length; i < len; i++) { - const part = parts[i]; - const keyLabel = keyLabelProvider(part); - if (keyLabel === null) { - // this keybinding cannot be expressed... - return null; - } - result[i] = _simpleAsString(part, keyLabel, this.modifierLabels[OS]); - } - return result.join(' '); - } -} -/** - * A label provider that prints modifiers in a suitable format for displaying in the UI. - */ -const UILabelProvider = new ModifierLabelProvider({ - ctrlKey: '⌃', - shiftKey: '⇧', - altKey: '⌥', - metaKey: '⌘', - separator: '', -}, { - ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, "Ctrl"), - shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, "Shift"), - altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, "Alt"), - metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'windowsKey', comment: ['This is the short form for the Windows key on the keyboard'] }, "Windows"), - separator: '+', -}, { - ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ctrlKey', comment: ['This is the short form for the Control key on the keyboard'] }, "Ctrl"), - shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'shiftKey', comment: ['This is the short form for the Shift key on the keyboard'] }, "Shift"), - altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'altKey', comment: ['This is the short form for the Alt key on the keyboard'] }, "Alt"), - metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'superKey', comment: ['This is the short form for the Super key on the keyboard'] }, "Super"), - separator: '+', -}); -/** - * A label provider that prints modifiers in a suitable format for ARIA. - */ -const AriaLabelProvider = new ModifierLabelProvider({ - ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, "Control"), - shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, "Shift"), - altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, "Alt"), - metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cmdKey.long', comment: ['This is the long form for the Command key on the keyboard'] }, "Command"), - separator: '+', -}, { - ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, "Control"), - shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, "Shift"), - altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, "Alt"), - metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'windowsKey.long', comment: ['This is the long form for the Windows key on the keyboard'] }, "Windows"), - separator: '+', -}, { - ctrlKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ctrlKey.long', comment: ['This is the long form for the Control key on the keyboard'] }, "Control"), - shiftKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'shiftKey.long', comment: ['This is the long form for the Shift key on the keyboard'] }, "Shift"), - altKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'altKey.long', comment: ['This is the long form for the Alt key on the keyboard'] }, "Alt"), - metaKey: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'superKey.long', comment: ['This is the long form for the Super key on the keyboard'] }, "Super"), - separator: '+', -}); -function _simpleAsString(modifiers, key, labels) { - if (key === null) { - return ''; - } - const result = []; - // translate modifier keys: Ctrl-Shift-Alt-Meta - if (modifiers.ctrlKey) { - result.push(labels.ctrlKey); - } - if (modifiers.shiftKey) { - result.push(labels.shiftKey); - } - if (modifiers.altKey) { - result.push(labels.altKey); - } - if (modifiers.metaKey) { - result.push(labels.metaKey); - } - // the actual key - if (key !== '') { - result.push(key); - } - return result.join(labels.separator); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/labels.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/labels.js ***! - \*****************************************************************/ -/*! exports provided: getPathLabel, getBaseLabel, normalizeDriveLetter, tildify */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPathLabel", function() { return getPathLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBaseLabel", function() { return getBaseLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeDriveLetter", function() { return normalizeDriveLetter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tildify", function() { return tildify; }); -/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _resources_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -/** - * @deprecated use LabelService instead - */ -function getPathLabel(resource, userHomeProvider, rootProvider) { - if (typeof resource === 'string') { - resource = _uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].file(resource); - } - // return early if we can resolve a relative path label from the root - if (rootProvider) { - const baseResource = rootProvider.getWorkspaceFolder(resource); - if (baseResource) { - const hasMultipleRoots = rootProvider.getWorkspace().folders.length > 1; - let pathLabel; - if (Object(_resources_js__WEBPACK_IMPORTED_MODULE_5__["isEqual"])(baseResource.uri, resource)) { - pathLabel = ''; // no label if paths are identical - } - else { - pathLabel = Object(_resources_js__WEBPACK_IMPORTED_MODULE_5__["relativePath"])(baseResource.uri, resource); - } - if (hasMultipleRoots) { - const rootName = baseResource.name ? baseResource.name : Object(_resources_js__WEBPACK_IMPORTED_MODULE_5__["basename"])(baseResource.uri); - pathLabel = pathLabel ? (rootName + ' • ' + pathLabel) : rootName; // always show root basename if there are multiple - } - return pathLabel; - } - } - // return if the resource is neither file:// nor untitled:// and no baseResource was provided - if (resource.scheme !== _network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].file && resource.scheme !== _network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].untitled) { - return resource.with({ query: null, fragment: null }).toString(true); - } - // convert c:\something => C:\something - if (hasDriveLetter(resource.fsPath)) { - return Object(_path_js__WEBPACK_IMPORTED_MODULE_1__["normalize"])(normalizeDriveLetter(resource.fsPath)); - } - // normalize and tildify (macOS, Linux only) - let res = Object(_path_js__WEBPACK_IMPORTED_MODULE_1__["normalize"])(resource.fsPath); - if (!_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWindows"] && (userHomeProvider === null || userHomeProvider === void 0 ? void 0 : userHomeProvider.userHome)) { - res = tildify(res, userHomeProvider.userHome.fsPath); - } - return res; -} -function getBaseLabel(resource) { - if (!resource) { - return undefined; - } - if (typeof resource === 'string') { - resource = _uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].file(resource); - } - const base = Object(_resources_js__WEBPACK_IMPORTED_MODULE_5__["basename"])(resource) || (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].file ? resource.fsPath : resource.path) /* can be empty string if '/' is passed in */; - // convert c: => C: - if (hasDriveLetter(base)) { - return normalizeDriveLetter(base); - } - return base; -} -function hasDriveLetter(path) { - return !!(_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWindows"] && path && path[1] === ':'); -} -function normalizeDriveLetter(path) { - if (hasDriveLetter(path)) { - return path.charAt(0).toUpperCase() + path.slice(1); - } - return path; -} -let normalizedUserHomeCached = Object.create(null); -function tildify(path, userHome) { - if (_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWindows"] || !path || !userHome) { - return path; // unsupported - } - // Keep a normalized user home path as cache to prevent accumulated string creation - let normalizedUserHome = normalizedUserHomeCached.original === userHome ? normalizedUserHomeCached.normalized : undefined; - if (!normalizedUserHome) { - normalizedUserHome = `${Object(_strings_js__WEBPACK_IMPORTED_MODULE_2__["rtrim"])(userHome, _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].sep)}${_path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].sep}`; - normalizedUserHomeCached = { original: userHome, normalized: normalizedUserHome }; - } - // Linux: case sensitive, macOS: case insensitive - if (_platform_js__WEBPACK_IMPORTED_MODULE_4__["isLinux"] ? path.startsWith(normalizedUserHome) : Object(_strings_js__WEBPACK_IMPORTED_MODULE_2__["startsWithIgnoreCase"])(path, normalizedUserHome)) { - path = `~/${path.substr(normalizedUserHome.length)}`; - } - return path; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/lazy.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/lazy.js ***! - \***************************************************************/ -/*! exports provided: Lazy */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lazy", function() { return Lazy; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class Lazy { - constructor(executor) { - this.executor = executor; - this._didRun = false; - } - /** - * Get the wrapped value. - * - * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only - * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value - */ - getValue() { - if (!this._didRun) { - try { - this._value = this.executor(); - } - catch (err) { - this._error = err; - } - finally { - this._didRun = true; - } - } - if (this._error) { - throw this._error; - } - return this._value; - } - /** - * Get the wrapped value without forcing evaluation. - */ - get rawValue() { return this._value; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js ***! - \********************************************************************/ -/*! exports provided: MultiDisposeError, isDisposable, dispose, combinedDisposable, toDisposable, DisposableStore, Disposable, MutableDisposable, ImmortalReference */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiDisposeError", function() { return MultiDisposeError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDisposable", function() { return isDisposable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispose", function() { return dispose; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combinedDisposable", function() { return combinedDisposable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDisposable", function() { return toDisposable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisposableStore", function() { return DisposableStore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Disposable", function() { return Disposable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MutableDisposable", function() { return MutableDisposable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImmortalReference", function() { return ImmortalReference; }); -/* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); - -/** - * Enables logging of potentially leaked disposables. - * - * A disposable is considered leaked if it is not disposed or not registered as the child of - * another disposable. This tracking is very simple an only works for classes that either - * extend Disposable or use a DisposableStore. This means there are a lot of false positives. - */ -const TRACK_DISPOSABLES = false; -const __is_disposable_tracked__ = '__is_disposable_tracked__'; -function markTracked(x) { - if (!TRACK_DISPOSABLES) { - return; - } - if (x && x !== Disposable.None) { - try { - x[__is_disposable_tracked__] = true; - } - catch (_a) { - // noop - } - } -} -function trackDisposable(x) { - if (!TRACK_DISPOSABLES) { - return x; - } - const stack = new Error('Potentially leaked disposable').stack; - setTimeout(() => { - if (!x[__is_disposable_tracked__]) { - console.log(stack); - } - }, 3000); - return x; -} -class MultiDisposeError extends Error { - constructor(errors) { - super(`Encounter errors while disposing of store. Errors: [${errors.join(', ')}]`); - this.errors = errors; - } -} -function isDisposable(thing) { - return typeof thing.dispose === 'function' && thing.dispose.length === 0; -} -function dispose(arg) { - if (_iterator_js__WEBPACK_IMPORTED_MODULE_0__["Iterable"].is(arg)) { - let errors = []; - for (const d of arg) { - if (d) { - markTracked(d); - try { - d.dispose(); - } - catch (e) { - errors.push(e); - } - } - } - if (errors.length === 1) { - throw errors[0]; - } - else if (errors.length > 1) { - throw new MultiDisposeError(errors); - } - return Array.isArray(arg) ? [] : arg; - } - else if (arg) { - markTracked(arg); - arg.dispose(); - return arg; - } -} -function combinedDisposable(...disposables) { - disposables.forEach(markTracked); - return trackDisposable({ dispose: () => dispose(disposables) }); -} -function toDisposable(fn) { - const self = trackDisposable({ - dispose: () => { - markTracked(self); - fn(); - } - }); - return self; -} -class DisposableStore { - constructor() { - this._toDispose = new Set(); - this._isDisposed = false; - } - /** - * Dispose of all registered disposables and mark this object as disposed. - * - * Any future disposables added to this object will be disposed of on `add`. - */ - dispose() { - if (this._isDisposed) { - return; - } - markTracked(this); - this._isDisposed = true; - this.clear(); - } - /** - * Dispose of all registered disposables but do not mark this object as disposed. - */ - clear() { - try { - dispose(this._toDispose.values()); - } - finally { - this._toDispose.clear(); - } - } - add(t) { - if (!t) { - return t; - } - if (t === this) { - throw new Error('Cannot register a disposable on itself!'); - } - markTracked(t); - if (this._isDisposed) { - if (!DisposableStore.DISABLE_DISPOSED_WARNING) { - console.warn(new Error('Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!').stack); - } - } - else { - this._toDispose.add(t); - } - return t; - } -} -DisposableStore.DISABLE_DISPOSED_WARNING = false; -class Disposable { - constructor() { - this._store = new DisposableStore(); - trackDisposable(this); - } - dispose() { - markTracked(this); - this._store.dispose(); - } - _register(t) { - if (t === this) { - throw new Error('Cannot register a disposable on itself!'); - } - return this._store.add(t); - } -} -Disposable.None = Object.freeze({ dispose() { } }); -/** - * Manages the lifecycle of a disposable value that may be changed. - * - * This ensures that when the disposable value is changed, the previously held disposable is disposed of. You can - * also register a `MutableDisposable` on a `Disposable` to ensure it is automatically cleaned up. - */ -class MutableDisposable { - constructor() { - this._isDisposed = false; - trackDisposable(this); - } - get value() { - return this._isDisposed ? undefined : this._value; - } - set value(value) { - if (this._isDisposed || value === this._value) { - return; - } - if (this._value) { - this._value.dispose(); - } - if (value) { - markTracked(value); - } - this._value = value; - } - clear() { - this.value = undefined; - } - dispose() { - this._isDisposed = true; - markTracked(this); - if (this._value) { - this._value.dispose(); - } - this._value = undefined; - } -} -class ImmortalReference { - constructor(object) { - this.object = object; - } - dispose() { } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js ***! - \*********************************************************************/ -/*! exports provided: LinkedList */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedList", function() { return LinkedList; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class Node { - constructor(element) { - this.element = element; - this.next = Node.Undefined; - this.prev = Node.Undefined; - } -} -Node.Undefined = new Node(undefined); -class LinkedList { - constructor() { - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - get size() { - return this._size; - } - isEmpty() { - return this._first === Node.Undefined; - } - clear() { - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - unshift(element) { - return this._insert(element, false); - } - push(element) { - return this._insert(element, true); - } - _insert(element, atTheEnd) { - const newNode = new Node(element); - if (this._first === Node.Undefined) { - this._first = newNode; - this._last = newNode; - } - else if (atTheEnd) { - // push - const oldLast = this._last; - this._last = newNode; - newNode.prev = oldLast; - oldLast.next = newNode; - } - else { - // unshift - const oldFirst = this._first; - this._first = newNode; - newNode.next = oldFirst; - oldFirst.prev = newNode; - } - this._size += 1; - let didRemove = false; - return () => { - if (!didRemove) { - didRemove = true; - this._remove(newNode); - } - }; - } - shift() { - if (this._first === Node.Undefined) { - return undefined; - } - else { - const res = this._first.element; - this._remove(this._first); - return res; - } - } - pop() { - if (this._last === Node.Undefined) { - return undefined; - } - else { - const res = this._last.element; - this._remove(this._last); - return res; - } - } - _remove(node) { - if (node.prev !== Node.Undefined && node.next !== Node.Undefined) { - // middle - const anchor = node.prev; - anchor.next = node.next; - node.next.prev = anchor; - } - else if (node.prev === Node.Undefined && node.next === Node.Undefined) { - // only node - this._first = Node.Undefined; - this._last = Node.Undefined; - } - else if (node.next === Node.Undefined) { - // last - this._last = this._last.prev; - this._last.next = Node.Undefined; - } - else if (node.prev === Node.Undefined) { - // first - this._first = this._first.next; - this._first.prev = Node.Undefined; - } - // done - this._size -= 1; - } - *[Symbol.iterator]() { - let node = this._first; - while (node !== Node.Undefined) { - yield node.element; - node = node.next; - } - } - toArray() { - const result = []; - for (let node = this._first; node !== Node.Undefined; node = node.next) { - result.push(node.element); - } - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/map.js": -/*!**************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/map.js ***! - \**************************************************************/ -/*! exports provided: StringIterator, PathIterator, UriIterator, TernarySearchTree, ResourceMap, LinkedMap, LRUCache */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringIterator", function() { return StringIterator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathIterator", function() { return PathIterator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UriIterator", function() { return UriIterator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TernarySearchTree", function() { return TernarySearchTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceMap", function() { return ResourceMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedMap", function() { return LinkedMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LRUCache", function() { return LRUCache; }); -/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class StringIterator { - constructor() { - this._value = ''; - this._pos = 0; - } - reset(key) { - this._value = key; - this._pos = 0; - return this; - } - next() { - this._pos += 1; - return this; - } - hasNext() { - return this._pos < this._value.length - 1; - } - cmp(a) { - const aCode = a.charCodeAt(0); - const thisCode = this._value.charCodeAt(this._pos); - return aCode - thisCode; - } - value() { - return this._value[this._pos]; - } -} -class PathIterator { - constructor(_splitOnBackslash = true, _caseSensitive = true) { - this._splitOnBackslash = _splitOnBackslash; - this._caseSensitive = _caseSensitive; - } - reset(key) { - this._value = key.replace(/\\$|\/$/, ''); - this._from = 0; - this._to = 0; - return this.next(); - } - hasNext() { - return this._to < this._value.length; - } - next() { - // this._data = key.split(/[\\/]/).filter(s => !!s); - this._from = this._to; - let justSeps = true; - for (; this._to < this._value.length; this._to++) { - const ch = this._value.charCodeAt(this._to); - if (ch === 47 /* Slash */ || this._splitOnBackslash && ch === 92 /* Backslash */) { - if (justSeps) { - this._from++; - } - else { - break; - } - } - else { - justSeps = false; - } - } - return this; - } - cmp(a) { - return this._caseSensitive - ? Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compareSubstring"])(a, this._value, 0, a.length, this._from, this._to) - : Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compareSubstringIgnoreCase"])(a, this._value, 0, a.length, this._from, this._to); - } - value() { - return this._value.substring(this._from, this._to); - } -} -class UriIterator { - constructor() { - this._states = []; - this._stateIdx = 0; - } - reset(key) { - this._value = key; - this._states = []; - if (this._value.scheme) { - this._states.push(1 /* Scheme */); - } - if (this._value.authority) { - this._states.push(2 /* Authority */); - } - if (this._value.path) { - //todo@jrieken the case-sensitive logic is copied form `resources.ts#hasToIgnoreCase` - // which cannot be used because it depends on this - const caseSensitive = key.scheme === _network_js__WEBPACK_IMPORTED_MODULE_2__["Schemas"].file && _platform_js__WEBPACK_IMPORTED_MODULE_3__["isLinux"]; - this._pathIterator = new PathIterator(false, caseSensitive); - this._pathIterator.reset(key.path); - if (this._pathIterator.value()) { - this._states.push(3 /* Path */); - } - } - if (this._value.query) { - this._states.push(4 /* Query */); - } - if (this._value.fragment) { - this._states.push(5 /* Fragment */); - } - this._stateIdx = 0; - return this; - } - next() { - if (this._states[this._stateIdx] === 3 /* Path */ && this._pathIterator.hasNext()) { - this._pathIterator.next(); - } - else { - this._stateIdx += 1; - } - return this; - } - hasNext() { - return (this._states[this._stateIdx] === 3 /* Path */ && this._pathIterator.hasNext()) - || this._stateIdx < this._states.length - 1; - } - cmp(a) { - if (this._states[this._stateIdx] === 1 /* Scheme */) { - return Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compare"])(a, this._value.scheme); - } - else if (this._states[this._stateIdx] === 2 /* Authority */) { - return Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compareSubstringIgnoreCase"])(a, this._value.authority); - } - else if (this._states[this._stateIdx] === 3 /* Path */) { - return this._pathIterator.cmp(a); - } - else if (this._states[this._stateIdx] === 4 /* Query */) { - return Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compare"])(a, this._value.query); - } - else if (this._states[this._stateIdx] === 5 /* Fragment */) { - return Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["compare"])(a, this._value.fragment); - } - throw new Error(); - } - value() { - if (this._states[this._stateIdx] === 1 /* Scheme */) { - return this._value.scheme; - } - else if (this._states[this._stateIdx] === 2 /* Authority */) { - return this._value.authority; - } - else if (this._states[this._stateIdx] === 3 /* Path */) { - return this._pathIterator.value(); - } - else if (this._states[this._stateIdx] === 4 /* Query */) { - return this._value.query; - } - else if (this._states[this._stateIdx] === 5 /* Fragment */) { - return this._value.fragment; - } - throw new Error(); - } -} -class TernarySearchTreeNode { -} -class TernarySearchTree { - constructor(segments) { - this._iter = segments; - } - static forUris() { - return new TernarySearchTree(new UriIterator()); - } - static forStrings() { - return new TernarySearchTree(new StringIterator()); - } - clear() { - this._root = undefined; - } - set(key, element) { - const iter = this._iter.reset(key); - let node; - if (!this._root) { - this._root = new TernarySearchTreeNode(); - this._root.segment = iter.value(); - } - node = this._root; - while (true) { - const val = iter.cmp(node.segment); - if (val > 0) { - // left - if (!node.left) { - node.left = new TernarySearchTreeNode(); - node.left.segment = iter.value(); - } - node = node.left; - } - else if (val < 0) { - // right - if (!node.right) { - node.right = new TernarySearchTreeNode(); - node.right.segment = iter.value(); - } - node = node.right; - } - else if (iter.hasNext()) { - // mid - iter.next(); - if (!node.mid) { - node.mid = new TernarySearchTreeNode(); - node.mid.segment = iter.value(); - } - node = node.mid; - } - else { - break; - } - } - const oldElement = node.value; - node.value = element; - node.key = key; - return oldElement; - } - get(key) { - const iter = this._iter.reset(key); - let node = this._root; - while (node) { - const val = iter.cmp(node.segment); - if (val > 0) { - // left - node = node.left; - } - else if (val < 0) { - // right - node = node.right; - } - else if (iter.hasNext()) { - // mid - iter.next(); - node = node.mid; - } - else { - break; - } - } - return node ? node.value : undefined; - } - findSubstr(key) { - const iter = this._iter.reset(key); - let node = this._root; - let candidate = undefined; - while (node) { - const val = iter.cmp(node.segment); - if (val > 0) { - // left - node = node.left; - } - else if (val < 0) { - // right - node = node.right; - } - else if (iter.hasNext()) { - // mid - iter.next(); - candidate = node.value || candidate; - node = node.mid; - } - else { - break; - } - } - return node && node.value || candidate; - } - forEach(callback) { - this._forEach(this._root, callback); - } - _forEach(node, callback) { - if (node) { - // left - this._forEach(node.left, callback); - // node - if (node.value) { - // callback(node.value, this._iter.join(parts)); - callback(node.value, node.key); - } - // mid - this._forEach(node.mid, callback); - // right - this._forEach(node.right, callback); - } - } -} -class ResourceMap { - constructor(mapOrKeyFn, toKey) { - this[Symbol.toStringTag] = 'ResourceMap'; - if (mapOrKeyFn instanceof ResourceMap) { - this.map = new Map(mapOrKeyFn.map); - this.toKey = toKey !== null && toKey !== void 0 ? toKey : ResourceMap.defaultToKey; - } - else { - this.map = new Map(); - this.toKey = mapOrKeyFn !== null && mapOrKeyFn !== void 0 ? mapOrKeyFn : ResourceMap.defaultToKey; - } - } - set(resource, value) { - this.map.set(this.toKey(resource), value); - return this; - } - get(resource) { - return this.map.get(this.toKey(resource)); - } - has(resource) { - return this.map.has(this.toKey(resource)); - } - get size() { - return this.map.size; - } - clear() { - this.map.clear(); - } - delete(resource) { - return this.map.delete(this.toKey(resource)); - } - forEach(clb, thisArg) { - if (typeof thisArg !== 'undefined') { - clb = clb.bind(thisArg); - } - for (let [index, value] of this.map) { - clb(value, _uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(index), this); - } - } - values() { - return this.map.values(); - } - *keys() { - for (let key of this.map.keys()) { - yield _uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(key); - } - } - *entries() { - for (let tuple of this.map.entries()) { - yield [_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(tuple[0]), tuple[1]]; - } - } - *[Symbol.iterator]() { - for (let item of this.map) { - yield [_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].parse(item[0]), item[1]]; - } - } -} -ResourceMap.defaultToKey = (resource) => resource.toString(); -class LinkedMap { - constructor() { - this[Symbol.toStringTag] = 'LinkedMap'; - this._map = new Map(); - this._head = undefined; - this._tail = undefined; - this._size = 0; - this._state = 0; - } - clear() { - this._map.clear(); - this._head = undefined; - this._tail = undefined; - this._size = 0; - this._state++; - } - isEmpty() { - return !this._head && !this._tail; - } - get size() { - return this._size; - } - get first() { - var _a; - return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value; - } - get last() { - var _a; - return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value; - } - has(key) { - return this._map.has(key); - } - get(key, touch = 0 /* None */) { - const item = this._map.get(key); - if (!item) { - return undefined; - } - if (touch !== 0 /* None */) { - this.touch(item, touch); - } - return item.value; - } - set(key, value, touch = 0 /* None */) { - let item = this._map.get(key); - if (item) { - item.value = value; - if (touch !== 0 /* None */) { - this.touch(item, touch); - } - } - else { - item = { key, value, next: undefined, previous: undefined }; - switch (touch) { - case 0 /* None */: - this.addItemLast(item); - break; - case 1 /* AsOld */: - this.addItemFirst(item); - break; - case 2 /* AsNew */: - this.addItemLast(item); - break; - default: - this.addItemLast(item); - break; - } - this._map.set(key, item); - this._size++; - } - return this; - } - delete(key) { - return !!this.remove(key); - } - remove(key) { - const item = this._map.get(key); - if (!item) { - return undefined; - } - this._map.delete(key); - this.removeItem(item); - this._size--; - return item.value; - } - shift() { - if (!this._head && !this._tail) { - return undefined; - } - if (!this._head || !this._tail) { - throw new Error('Invalid list'); - } - const item = this._head; - this._map.delete(item.key); - this.removeItem(item); - this._size--; - return item.value; - } - forEach(callbackfn, thisArg) { - const state = this._state; - let current = this._head; - while (current) { - if (thisArg) { - callbackfn.bind(thisArg)(current.value, current.key, this); - } - else { - callbackfn(current.value, current.key, this); - } - if (this._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - current = current.next; - } - } - keys() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: current.key, done: false }; - current = current.next; - return result; - } - else { - return { value: undefined, done: true }; - } - } - }; - return iterator; - } - values() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: current.value, done: false }; - current = current.next; - return result; - } - else { - return { value: undefined, done: true }; - } - } - }; - return iterator; - } - entries() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: [current.key, current.value], done: false }; - current = current.next; - return result; - } - else { - return { value: undefined, done: true }; - } - } - }; - return iterator; - } - [Symbol.iterator]() { - return this.entries(); - } - trimOld(newSize) { - if (newSize >= this.size) { - return; - } - if (newSize === 0) { - this.clear(); - return; - } - let current = this._head; - let currentSize = this.size; - while (current && currentSize > newSize) { - this._map.delete(current.key); - current = current.next; - currentSize--; - } - this._head = current; - this._size = currentSize; - if (current) { - current.previous = undefined; - } - this._state++; - } - addItemFirst(item) { - // First time Insert - if (!this._head && !this._tail) { - this._tail = item; - } - else if (!this._head) { - throw new Error('Invalid list'); - } - else { - item.next = this._head; - this._head.previous = item; - } - this._head = item; - this._state++; - } - addItemLast(item) { - // First time Insert - if (!this._head && !this._tail) { - this._head = item; - } - else if (!this._tail) { - throw new Error('Invalid list'); - } - else { - item.previous = this._tail; - this._tail.next = item; - } - this._tail = item; - this._state++; - } - removeItem(item) { - if (item === this._head && item === this._tail) { - this._head = undefined; - this._tail = undefined; - } - else if (item === this._head) { - // This can only happend if size === 1 which is handle - // by the case above. - if (!item.next) { - throw new Error('Invalid list'); - } - item.next.previous = undefined; - this._head = item.next; - } - else if (item === this._tail) { - // This can only happend if size === 1 which is handle - // by the case above. - if (!item.previous) { - throw new Error('Invalid list'); - } - item.previous.next = undefined; - this._tail = item.previous; - } - else { - const next = item.next; - const previous = item.previous; - if (!next || !previous) { - throw new Error('Invalid list'); - } - next.previous = previous; - previous.next = next; - } - item.next = undefined; - item.previous = undefined; - this._state++; - } - touch(item, touch) { - if (!this._head || !this._tail) { - throw new Error('Invalid list'); - } - if ((touch !== 1 /* AsOld */ && touch !== 2 /* AsNew */)) { - return; - } - if (touch === 1 /* AsOld */) { - if (item === this._head) { - return; - } - const next = item.next; - const previous = item.previous; - // Unlink the item - if (item === this._tail) { - // previous must be defined since item was not head but is tail - // So there are more than on item in the map - previous.next = undefined; - this._tail = previous; - } - else { - // Both next and previous are not undefined since item was neither head nor tail. - next.previous = previous; - previous.next = next; - } - // Insert the node at head - item.previous = undefined; - item.next = this._head; - this._head.previous = item; - this._head = item; - this._state++; - } - else if (touch === 2 /* AsNew */) { - if (item === this._tail) { - return; - } - const next = item.next; - const previous = item.previous; - // Unlink the item. - if (item === this._head) { - // next must be defined since item was not tail but is head - // So there are more than on item in the map - next.previous = undefined; - this._head = next; - } - else { - // Both next and previous are not undefined since item was neither head nor tail. - next.previous = previous; - previous.next = next; - } - item.next = undefined; - item.previous = this._tail; - this._tail.next = item; - this._tail = item; - this._state++; - } - } - toJSON() { - const data = []; - this.forEach((value, key) => { - data.push([key, value]); - }); - return data; - } - fromJSON(data) { - this.clear(); - for (const [key, value] of data) { - this.set(key, value); - } - } -} -class LRUCache extends LinkedMap { - constructor(limit, ratio = 1) { - super(); - this._limit = limit; - this._ratio = Math.min(Math.max(0, ratio), 1); - } - get limit() { - return this._limit; - } - set limit(limit) { - this._limit = limit; - this.checkTrim(); - } - get(key, touch = 2 /* AsNew */) { - return super.get(key, touch); - } - peek(key) { - return super.get(key, 0 /* None */); - } - set(key, value) { - super.set(key, value, 2 /* AsNew */); - this.checkTrim(); - return this; - } - checkTrim() { - if (this.size > this._limit) { - this.trimOld(Math.round(this._limit * this._ratio)); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js": -/*!************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * marked - a markdown parser - * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed) - * https://github.com/markedjs/marked - */ - -/** - * DO NOT EDIT THIS FILE - * The code in this file is generated from files in ./src/ - */ - -(function (global, factory) { - true ? module.exports = factory() : - undefined; -}(this, (function () { 'use strict'; - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _createForOfIteratorHelperLoose(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - return function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - it = o[Symbol.iterator](); - return it.next.bind(it); - } - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var defaults = createCommonjsModule(function (module) { - function getDefaults() { - return { - baseUrl: null, - breaks: false, - gfm: true, - headerIds: true, - headerPrefix: '', - highlight: null, - langPrefix: 'language-', - mangle: true, - pedantic: false, - renderer: null, - sanitize: false, - sanitizer: null, - silent: false, - smartLists: false, - smartypants: false, - tokenizer: null, - walkTokens: null, - xhtml: false - }; - } - - function changeDefaults(newDefaults) { - module.exports.defaults = newDefaults; - } - - module.exports = { - defaults: getDefaults(), - getDefaults: getDefaults, - changeDefaults: changeDefaults - }; - }); - var defaults_1 = defaults.defaults; - var defaults_2 = defaults.getDefaults; - var defaults_3 = defaults.changeDefaults; - - /** - * Helpers - */ - var escapeTest = /[&<>"']/; - var escapeReplace = /[&<>"']/g; - var escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; - var escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; - var escapeReplacements = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - var getEscapeReplacement = function getEscapeReplacement(ch) { - return escapeReplacements[ch]; - }; - - function escape(html, encode) { - if (encode) { - if (escapeTest.test(html)) { - return html.replace(escapeReplace, getEscapeReplacement); - } - } else { - if (escapeTestNoEncode.test(html)) { - return html.replace(escapeReplaceNoEncode, getEscapeReplacement); - } - } - - return html; - } - - var unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; - - function unescape(html) { - // explicitly match decimal, hex, and named HTML entities - return html.replace(unescapeTest, function (_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); - } - - return ''; - }); - } - - var caret = /(^|[^\[])\^/g; - - function edit(regex, opt) { - regex = regex.source || regex; - opt = opt || ''; - var obj = { - replace: function replace(name, val) { - val = val.source || val; - val = val.replace(caret, '$1'); - regex = regex.replace(name, val); - return obj; - }, - getRegex: function getRegex() { - return new RegExp(regex, opt); - } - }; - return obj; - } - - var nonWordAndColonTest = /[^\w:]/g; - var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; - - function cleanUrl(sanitize, base, href) { - if (sanitize) { - var prot; - - try { - prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase(); - } catch (e) { - return null; - } - - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { - return null; - } - } - - if (base && !originIndependentUrl.test(href)) { - href = resolveUrl(base, href); - } - - try { - href = encodeURI(href).replace(/%25/g, '%'); - } catch (e) { - return null; - } - - return href; - } - - var baseUrls = {}; - var justDomain = /^[^:]+:\/*[^/]*$/; - var protocol = /^([^:]+:)[\s\S]*$/; - var domain = /^([^:]+:\/*[^/]*)[\s\S]*$/; - - function resolveUrl(base, href) { - if (!baseUrls[' ' + base]) { - // we can ignore everything in base after the last slash of its path component, - // but we might need to add _that_ - // https://tools.ietf.org/html/rfc3986#section-3 - if (justDomain.test(base)) { - baseUrls[' ' + base] = base + '/'; - } else { - baseUrls[' ' + base] = rtrim(base, '/', true); - } - } - - base = baseUrls[' ' + base]; - var relativeBase = base.indexOf(':') === -1; - - if (href.substring(0, 2) === '//') { - if (relativeBase) { - return href; - } - - return base.replace(protocol, '$1') + href; - } else if (href.charAt(0) === '/') { - if (relativeBase) { - return href; - } - - return base.replace(domain, '$1') + href; - } else { - return base + href; - } - } - - var noopTest = { - exec: function noopTest() {} - }; - - function merge(obj) { - var i = 1, - target, - key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; - } - - function splitCells(tableRow, count) { - // ensure that every cell-delimiting pipe has a space - // before it to distinguish it from an escaped pipe - var row = tableRow.replace(/\|/g, function (match, offset, str) { - var escaped = false, - curr = offset; - - while (--curr >= 0 && str[curr] === '\\') { - escaped = !escaped; - } - - if (escaped) { - // odd number of slashes means | is escaped - // so we leave it alone - return '|'; - } else { - // add space before unescaped | - return ' |'; - } - }), - cells = row.split(/ \|/); - var i = 0; - - if (cells.length > count) { - cells.splice(count); - } else { - while (cells.length < count) { - cells.push(''); - } - } - - for (; i < cells.length; i++) { - // leading or trailing whitespace is ignored per the gfm spec - cells[i] = cells[i].trim().replace(/\\\|/g, '|'); - } - - return cells; - } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). - // /c*$/ is vulnerable to REDOS. - // invert: Remove suffix of non-c chars instead. Default falsey. - - - function rtrim(str, c, invert) { - var l = str.length; - - if (l === 0) { - return ''; - } // Length of suffix matching the invert condition. - - - var suffLen = 0; // Step left until we fail to match the invert condition. - - while (suffLen < l) { - var currChar = str.charAt(l - suffLen - 1); - - if (currChar === c && !invert) { - suffLen++; - } else if (currChar !== c && invert) { - suffLen++; - } else { - break; - } - } - - return str.substr(0, l - suffLen); - } - - function findClosingBracket(str, b) { - if (str.indexOf(b[1]) === -1) { - return -1; - } - - var l = str.length; - var level = 0, - i = 0; - - for (; i < l; i++) { - if (str[i] === '\\') { - i++; - } else if (str[i] === b[0]) { - level++; - } else if (str[i] === b[1]) { - level--; - - if (level < 0) { - return i; - } - } - } - - return -1; - } - - function checkSanitizeDeprecation(opt) { - if (opt && opt.sanitize && !opt.silent) { - // VS CODE CHANGE - // Disable logging about sanitize options. We already use insane after running the sanitizer - - // console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options'); - } - } - - var helpers = { - escape: escape, - unescape: unescape, - edit: edit, - cleanUrl: cleanUrl, - resolveUrl: resolveUrl, - noopTest: noopTest, - merge: merge, - splitCells: splitCells, - rtrim: rtrim, - findClosingBracket: findClosingBracket, - checkSanitizeDeprecation: checkSanitizeDeprecation - }; - - var defaults$1 = defaults.defaults; - var rtrim$1 = helpers.rtrim, - splitCells$1 = helpers.splitCells, - _escape = helpers.escape, - findClosingBracket$1 = helpers.findClosingBracket; - - function outputLink(cap, link, raw) { - var href = link.href; - var title = link.title ? _escape(link.title) : null; - var text = cap[1].replace(/\\([\[\]])/g, '$1'); - - if (cap[0].charAt(0) !== '!') { - return { - type: 'link', - raw: raw, - href: href, - title: title, - text: text - }; - } else { - return { - type: 'image', - raw: raw, - href: href, - title: title, - text: _escape(text) - }; - } - } - - function indentCodeCompensation(raw, text) { - var matchIndentToCode = raw.match(/^(\s+)(?:```)/); - - if (matchIndentToCode === null) { - return text; - } - - var indentToCode = matchIndentToCode[1]; - return text.split('\n').map(function (node) { - var matchIndentInNode = node.match(/^\s+/); - - if (matchIndentInNode === null) { - return node; - } - - var indentInNode = matchIndentInNode[0]; - - if (indentInNode.length >= indentToCode.length) { - return node.slice(indentToCode.length); - } - - return node; - }).join('\n'); - } - /** - * Tokenizer - */ - - - var Tokenizer_1 = /*#__PURE__*/function () { - function Tokenizer(options) { - this.options = options || defaults$1; - } - - var _proto = Tokenizer.prototype; - - _proto.space = function space(src) { - var cap = this.rules.block.newline.exec(src); - - if (cap) { - if (cap[0].length > 1) { - return { - type: 'space', - raw: cap[0] - }; - } - - return { - raw: '\n' - }; - } - }; - - _proto.code = function code(src, tokens) { - var cap = this.rules.block.code.exec(src); - - if (cap) { - var lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph. - - if (lastToken && lastToken.type === 'paragraph') { - return { - raw: cap[0], - text: cap[0].trimRight() - }; - } - - var text = cap[0].replace(/^ {4}/gm, ''); - return { - type: 'code', - raw: cap[0], - codeBlockStyle: 'indented', - text: !this.options.pedantic ? rtrim$1(text, '\n') : text - }; - } - }; - - _proto.fences = function fences(src) { - var cap = this.rules.block.fences.exec(src); - - if (cap) { - var raw = cap[0]; - var text = indentCodeCompensation(raw, cap[3] || ''); - return { - type: 'code', - raw: raw, - lang: cap[2] ? cap[2].trim() : cap[2], - text: text - }; - } - }; - - _proto.heading = function heading(src) { - var cap = this.rules.block.heading.exec(src); - - if (cap) { - return { - type: 'heading', - raw: cap[0], - depth: cap[1].length, - text: cap[2] - }; - } - }; - - _proto.nptable = function nptable(src) { - var cap = this.rules.block.nptable.exec(src); - - if (cap) { - var item = { - type: 'table', - header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [], - raw: cap[0] - }; - - if (item.header.length === item.align.length) { - var l = item.align.length; - var i; - - for (i = 0; i < l; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - l = item.cells.length; - - for (i = 0; i < l; i++) { - item.cells[i] = splitCells$1(item.cells[i], item.header.length); - } - - return item; - } - } - }; - - _proto.hr = function hr(src) { - var cap = this.rules.block.hr.exec(src); - - if (cap) { - return { - type: 'hr', - raw: cap[0] - }; - } - }; - - _proto.blockquote = function blockquote(src) { - var cap = this.rules.block.blockquote.exec(src); - - if (cap) { - var text = cap[0].replace(/^ *> ?/gm, ''); - return { - type: 'blockquote', - raw: cap[0], - text: text - }; - } - }; - - _proto.list = function list(src) { - var cap = this.rules.block.list.exec(src); - - if (cap) { - var raw = cap[0]; - var bull = cap[2]; - var isordered = bull.length > 1; - var isparen = bull[bull.length - 1] === ')'; - var list = { - type: 'list', - raw: raw, - ordered: isordered, - start: isordered ? +bull.slice(0, -1) : '', - loose: false, - items: [] - }; // Get each top-level item. - - var itemMatch = cap[0].match(this.rules.block.item); - var next = false, - item, - space, - b, - addBack, - loose, - istask, - ischecked; - var l = itemMatch.length; - - for (var i = 0; i < l; i++) { - item = itemMatch[i]; - raw = item; // Remove the list item's bullet - // so it is seen as the next token. - - space = item.length; - item = item.replace(/^ *([*+-]|\d+[.)]) */, ''); // Outdent whatever the - // list item contains. Hacky. - - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, ''); - } // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - - - if (i !== l - 1) { - b = this.rules.block.bullet.exec(itemMatch[i + 1])[0]; - - if (isordered ? b.length === 1 || !isparen && b[b.length - 1] === ')' : b.length > 1 || this.options.smartLists && b !== bull) { - addBack = itemMatch.slice(i + 1).join('\n'); - list.raw = list.raw.substring(0, list.raw.length - addBack.length); - i = l - 1; - } - } // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - - - loose = next || /\n\n(?!\s*$)/.test(item); - - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - if (loose) { - list.loose = true; - } // Check for task list items - - - istask = /^\[[ xX]\] /.test(item); - ischecked = undefined; - - if (istask) { - ischecked = item[1] !== ' '; - item = item.replace(/^\[[ xX]\] +/, ''); - } - - list.items.push({ - type: 'list_item', - raw: raw, - task: istask, - checked: ischecked, - loose: loose, - text: item - }); - } - - return list; - } - }; - - _proto.html = function html(src) { - var cap = this.rules.block.html.exec(src); - - if (cap) { - return { - type: this.options.sanitize ? 'paragraph' : 'html', - raw: cap[0], - pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), - text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0] - }; - } - }; - - _proto.def = function def(src) { - var cap = this.rules.block.def.exec(src); - - if (cap) { - if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); - var tag = cap[1].toLowerCase().replace(/\s+/g, ' '); - return { - tag: tag, - raw: cap[0], - href: cap[2], - title: cap[3] - }; - } - }; - - _proto.table = function table(src) { - var cap = this.rules.block.table.exec(src); - - if (cap) { - var item = { - type: 'table', - header: splitCells$1(cap[1].replace(/^ *| *\| *$/g, '')), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] - }; - - if (item.header.length === item.align.length) { - item.raw = cap[0]; - var l = item.align.length; - var i; - - for (i = 0; i < l; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - l = item.cells.length; - - for (i = 0; i < l; i++) { - item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\| *| *\| *$/g, ''), item.header.length); - } - - return item; - } - } - }; - - _proto.lheading = function lheading(src) { - var cap = this.rules.block.lheading.exec(src); - - if (cap) { - return { - type: 'heading', - raw: cap[0], - depth: cap[2].charAt(0) === '=' ? 1 : 2, - text: cap[1] - }; - } - }; - - _proto.paragraph = function paragraph(src) { - var cap = this.rules.block.paragraph.exec(src); - - if (cap) { - return { - type: 'paragraph', - raw: cap[0], - text: cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1] - }; - } - }; - - _proto.text = function text(src, tokens) { - var cap = this.rules.block.text.exec(src); - - if (cap) { - var lastToken = tokens[tokens.length - 1]; - - if (lastToken && lastToken.type === 'text') { - return { - raw: cap[0], - text: cap[0] - }; - } - - return { - type: 'text', - raw: cap[0], - text: cap[0] - }; - } - }; - - _proto.escape = function escape(src) { - var cap = this.rules.inline.escape.exec(src); - - if (cap) { - return { - type: 'escape', - raw: cap[0], - text: _escape(cap[1]) - }; - } - }; - - _proto.tag = function tag(src, inLink, inRawBlock) { - var cap = this.rules.inline.tag.exec(src); - - if (cap) { - if (!inLink && /^/i.test(cap[0])) { - inLink = false; - } - - if (!inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { - inRawBlock = true; - } else if (inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { - inRawBlock = false; - } - - return { - type: this.options.sanitize ? 'text' : 'html', - raw: cap[0], - inLink: inLink, - inRawBlock: inRawBlock, - text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0] - }; - } - }; - - _proto.link = function link(src) { - var cap = this.rules.inline.link.exec(src); - - if (cap) { - var lastParenIndex = findClosingBracket$1(cap[2], '()'); - - if (lastParenIndex > -1) { - var start = cap[0].indexOf('!') === 0 ? 5 : 4; - var linkLen = start + cap[1].length + lastParenIndex; - cap[2] = cap[2].substring(0, lastParenIndex); - cap[0] = cap[0].substring(0, linkLen).trim(); - cap[3] = ''; - } - - var href = cap[2]; - var title = ''; - - if (this.options.pedantic) { - var link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); - - if (link) { - href = link[1]; - title = link[3]; - } else { - title = ''; - } - } else { - title = cap[3] ? cap[3].slice(1, -1) : ''; - } - - href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); - var token = outputLink(cap, { - href: href ? href.replace(this.rules.inline._escapes, '$1') : href, - title: title ? title.replace(this.rules.inline._escapes, '$1') : title - }, cap[0]); - return token; - } - }; - - _proto.reflink = function reflink(src, links) { - var cap; - - if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) { - var link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = links[link.toLowerCase()]; - - if (!link || !link.href) { - var text = cap[0].charAt(0); - return { - type: 'text', - raw: text, - text: text - }; - } - - var token = outputLink(cap, link, cap[0]); - return token; - } - }; - - _proto.strong = function strong(src, maskedSrc, prevChar) { - if (prevChar === void 0) { - prevChar = ''; - } - - var match = this.rules.inline.strong.start.exec(src); - - if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) { - maskedSrc = maskedSrc.slice(-1 * src.length); - var endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd; - endReg.lastIndex = 0; - var cap; - - while ((match = endReg.exec(maskedSrc)) != null) { - cap = this.rules.inline.strong.middle.exec(maskedSrc.slice(0, match.index + 3)); - - if (cap) { - return { - type: 'strong', - raw: src.slice(0, cap[0].length), - text: src.slice(2, cap[0].length - 2) - }; - } - } - } - }; - - _proto.em = function em(src, maskedSrc, prevChar) { - if (prevChar === void 0) { - prevChar = ''; - } - - var match = this.rules.inline.em.start.exec(src); - - if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) { - maskedSrc = maskedSrc.slice(-1 * src.length); - var endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd; - endReg.lastIndex = 0; - var cap; - - while ((match = endReg.exec(maskedSrc)) != null) { - cap = this.rules.inline.em.middle.exec(maskedSrc.slice(0, match.index + 2)); - - if (cap) { - return { - type: 'em', - raw: src.slice(0, cap[0].length), - text: src.slice(1, cap[0].length - 1) - }; - } - } - } - }; - - _proto.codespan = function codespan(src) { - var cap = this.rules.inline.code.exec(src); - - if (cap) { - var text = cap[2].replace(/\n/g, ' '); - var hasNonSpaceChars = /[^ ]/.test(text); - var hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' '); - - if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) { - text = text.substring(1, text.length - 1); - } - - text = _escape(text, true); - return { - type: 'codespan', - raw: cap[0], - text: text - }; - } - }; - - _proto.br = function br(src) { - var cap = this.rules.inline.br.exec(src); - - if (cap) { - return { - type: 'br', - raw: cap[0] - }; - } - }; - - _proto.del = function del(src) { - var cap = this.rules.inline.del.exec(src); - - if (cap) { - return { - type: 'del', - raw: cap[0], - text: cap[1] - }; - } - }; - - _proto.autolink = function autolink(src, mangle) { - var cap = this.rules.inline.autolink.exec(src); - - if (cap) { - var text, href; - - if (cap[2] === '@') { - text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]); - href = 'mailto:' + text; - } else { - text = _escape(cap[1]); - href = text; - } - - return { - type: 'link', - raw: cap[0], - text: text, - href: href, - tokens: [{ - type: 'text', - raw: text, - text: text - }] - }; - } - }; - - _proto.url = function url(src, mangle) { - var cap; - - if (cap = this.rules.inline.url.exec(src)) { - var text, href; - - if (cap[2] === '@') { - text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]); - href = 'mailto:' + text; - } else { - // do extended autolink path validation - var prevCapZero; - - do { - prevCapZero = cap[0]; - cap[0] = this.rules.inline._backpedal.exec(cap[0])[0]; - } while (prevCapZero !== cap[0]); - - text = _escape(cap[0]); - - if (cap[1] === 'www.') { - href = 'http://' + text; - } else { - href = text; - } - } - - return { - type: 'link', - raw: cap[0], - text: text, - href: href, - tokens: [{ - type: 'text', - raw: text, - text: text - }] - }; - } - }; - - _proto.inlineText = function inlineText(src, inRawBlock, smartypants) { - var cap = this.rules.inline.text.exec(src); - - if (cap) { - var text; - - if (inRawBlock) { - text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]; - } else { - text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]); - } - - return { - type: 'text', - raw: cap[0], - text: text - }; - } - }; - - return Tokenizer; - }(); - - var noopTest$1 = helpers.noopTest, - edit$1 = helpers.edit, - merge$1 = helpers.merge; - /** - * Block-Level Grammar - */ - - var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, - hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, - heading: /^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/, - blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, - list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: '^ {0,3}(?:' // optional indentation - + '<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)' // (1) - + '|comment[^\\n]*(\\n+|$)' // (2) - + '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3) - + '|\\n*|$)' // (4) - + '|\\n*|$)' // (5) - + '|)[\\s\\S]*?(?:\\n{2,}|$)' // (6) - + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag - + '|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag - + ')', - def: /^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, - nptable: noopTest$1, - table: noopTest$1, - lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/, - // regex template, placeholders will be replaced according to different paragraph - // interruption rules of commonmark and the original markdown spec: - _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/, - text: /^[^\n]+/ - }; - block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; - block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; - block.def = edit$1(block.def).replace('label', block._label).replace('title', block._title).getRegex(); - block.bullet = /(?:[*+-]|\d{1,9}[.)])/; - block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; - block.item = edit$1(block.item, 'gm').replace(/bull/g, block.bullet).getRegex(); - block.list = edit$1(block.list).replace(/bull/g, block.bullet).replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))').replace('def', '\\n+(?=' + block.def.source + ')').getRegex(); - block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul'; - block._comment = /|$)/; - block.html = edit$1(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(); - block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs - .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt - .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks - .getRegex(); - block.blockquote = edit$1(block.blockquote).replace('paragraph', block.paragraph).getRegex(); - /** - * Normal Block Grammar - */ - - block.normal = merge$1({}, block); - /** - * GFM Block Grammar - */ - - block.gfm = merge$1({}, block.normal, { - nptable: '^ *([^|\\n ].*\\|.*)\\n' // Header - + ' *([-:]+ *\\|[-| :]*)' // Align - + '(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)', - // Cells - table: '^ *\\|(.+)\\n' // Header - + ' *\\|?( *[-:]+[-| :]*)' // Align - + '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells - - }); - block.gfm.nptable = edit$1(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt - .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks - .getRegex(); - block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt - .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks - .getRegex(); - /** - * Pedantic grammar (original John Gruber's loose markdown specification) - */ - - block.pedantic = merge$1({}, block.normal, { - html: edit$1('^ *(?:comment *(?:\\n|\\s*$)' + '|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)' // closed tag - + '|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b').getRegex(), - def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, - fences: noopTest$1, - // fences not supported - paragraph: edit$1(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex() - }); - /** - * Inline-Level Grammar - */ - - var inline = { - escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, - autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, - url: noopTest$1, - tag: '^comment' + '|^' // self-closing tag - + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag - + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. - + '|^' // declaration, e.g. - + '|^', - // CDATA section - link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, - reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, - nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, - reflinkSearch: 'reflink|nolink(?!\\()', - strong: { - start: /^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/, - // (1) returns if starts w/ punctuation - middle: /^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/, - endAst: /[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/, - // last char can't be punct, or final * must also be followed by punct (or endline) - endUnd: /[^\s]__(?!_)(?:(?=[punctuation\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) - - }, - em: { - start: /^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/, - // (1) returns if starts w/ punctuation - middle: /^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/, - endAst: /[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/, - // last char can't be punct, or final * must also be followed by punct (or endline) - endUnd: /[^\s]_(?!_)(?:(?=[punctuation\s])|$)/ // last char can't be a space, and final _ must preceed punct or \s (or endline) - - }, - code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, - br: /^( {2,}|\\)\n(?!\s*$)/, - del: noopTest$1, - text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~'; - inline.punctuation = edit$1(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, - - inline._blockSkip = '\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>'; - inline._overlapSkip = '__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*'; - inline._comment = edit$1(block._comment).replace('(?:-->|$)', '-->').getRegex(); - inline.em.start = edit$1(inline.em.start).replace(/punctuation/g, inline._punctuation).getRegex(); - inline.em.middle = edit$1(inline.em.middle).replace(/punctuation/g, inline._punctuation).replace(/overlapSkip/g, inline._overlapSkip).getRegex(); - inline.em.endAst = edit$1(inline.em.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); - inline.em.endUnd = edit$1(inline.em.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); - inline.strong.start = edit$1(inline.strong.start).replace(/punctuation/g, inline._punctuation).getRegex(); - inline.strong.middle = edit$1(inline.strong.middle).replace(/punctuation/g, inline._punctuation).replace(/blockSkip/g, inline._blockSkip).getRegex(); - inline.strong.endAst = edit$1(inline.strong.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); - inline.strong.endUnd = edit$1(inline.strong.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex(); - inline.blockSkip = edit$1(inline._blockSkip, 'g').getRegex(); - inline.overlapSkip = edit$1(inline._overlapSkip, 'g').getRegex(); - inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; - inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; - inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; - inline.autolink = edit$1(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex(); - inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; - inline.tag = edit$1(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex(); - inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; - inline._href = /<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/; - inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; - inline.link = edit$1(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex(); - inline.reflink = edit$1(inline.reflink).replace('label', inline._label).getRegex(); - inline.reflinkSearch = edit$1(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex(); - /** - * Normal Inline Grammar - */ - - inline.normal = merge$1({}, inline); - /** - * Pedantic Inline Grammar - */ - - inline.pedantic = merge$1({}, inline.normal, { - strong: { - start: /^__|\*\*/, - middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - endAst: /\*\*(?!\*)/g, - endUnd: /__(?!_)/g - }, - em: { - start: /^_|\*/, - middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, - endAst: /\*(?!\*)/g, - endUnd: /_(?!_)/g - }, - link: edit$1(/^!?\[(label)\]\((.*?)\)/).replace('label', inline._label).getRegex(), - reflink: edit$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace('label', inline._label).getRegex() - }); - /** - * GFM Inline Grammar - */ - - inline.gfm = merge$1({}, inline.normal, { - escape: edit$1(inline.escape).replace('])', '~|])').getRegex(), - _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, - url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, - _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, - del: /^~+(?=\S)([\s\S]*?\S)~+/, - text: /^(`+|[^`])(?:[\s\S]*?(?:(?=[\\ 0.5) { - ch = 'x' + ch.toString(16); - } - - out += '&#' + ch + ';'; - } - - return out; - } - /** - * Block Lexer - */ - - - var Lexer_1 = /*#__PURE__*/function () { - function Lexer(options) { - this.tokens = []; - this.tokens.links = Object.create(null); - this.options = options || defaults$2; - this.options.tokenizer = this.options.tokenizer || new Tokenizer_1(); - this.tokenizer = this.options.tokenizer; - this.tokenizer.options = this.options; - var rules = { - block: block$1.normal, - inline: inline$1.normal - }; - - if (this.options.pedantic) { - rules.block = block$1.pedantic; - rules.inline = inline$1.pedantic; - } else if (this.options.gfm) { - rules.block = block$1.gfm; - - if (this.options.breaks) { - rules.inline = inline$1.breaks; - } else { - rules.inline = inline$1.gfm; - } - } - - this.tokenizer.rules = rules; - } - /** - * Expose Rules - */ - - - /** - * Static Lex Method - */ - Lexer.lex = function lex(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); - } - /** - * Preprocessing - */ - ; - - var _proto = Lexer.prototype; - - _proto.lex = function lex(src) { - src = src.replace(/\r\n|\r/g, '\n').replace(/\t/g, ' '); - this.blockTokens(src, this.tokens, true); - this.inline(this.tokens); - return this.tokens; - } - /** - * Lexing - */ - ; - - _proto.blockTokens = function blockTokens(src, tokens, top) { - if (tokens === void 0) { - tokens = []; - } - - if (top === void 0) { - top = true; - } - - src = src.replace(/^ +$/gm, ''); - var token, i, l, lastToken; - - while (src) { - // newline - if (token = this.tokenizer.space(src)) { - src = src.substring(token.raw.length); - - if (token.type) { - tokens.push(token); - } - - continue; - } // code - - - if (token = this.tokenizer.code(src, tokens)) { - src = src.substring(token.raw.length); - - if (token.type) { - tokens.push(token); - } else { - lastToken = tokens[tokens.length - 1]; - lastToken.raw += '\n' + token.raw; - lastToken.text += '\n' + token.text; - } - - continue; - } // fences - - - if (token = this.tokenizer.fences(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // heading - - - if (token = this.tokenizer.heading(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // table no leading pipe (gfm) - - - if (token = this.tokenizer.nptable(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // hr - - - if (token = this.tokenizer.hr(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // blockquote - - - if (token = this.tokenizer.blockquote(src)) { - src = src.substring(token.raw.length); - token.tokens = this.blockTokens(token.text, [], top); - tokens.push(token); - continue; - } // list - - - if (token = this.tokenizer.list(src)) { - src = src.substring(token.raw.length); - l = token.items.length; - - for (i = 0; i < l; i++) { - token.items[i].tokens = this.blockTokens(token.items[i].text, [], false); - } - - tokens.push(token); - continue; - } // html - - - if (token = this.tokenizer.html(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // def - - - if (top && (token = this.tokenizer.def(src))) { - src = src.substring(token.raw.length); - - if (!this.tokens.links[token.tag]) { - this.tokens.links[token.tag] = { - href: token.href, - title: token.title - }; - } - - continue; - } // table (gfm) - - - if (token = this.tokenizer.table(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // lheading - - - if (token = this.tokenizer.lheading(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // top-level paragraph - - - if (top && (token = this.tokenizer.paragraph(src))) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // text - - - if (token = this.tokenizer.text(src, tokens)) { - src = src.substring(token.raw.length); - - if (token.type) { - tokens.push(token); - } else { - lastToken = tokens[tokens.length - 1]; - lastToken.raw += '\n' + token.raw; - lastToken.text += '\n' + token.text; - } - - continue; - } - - if (src) { - var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); - - if (this.options.silent) { - console.error(errMsg); - break; - } else { - throw new Error(errMsg); - } - } - } - - return tokens; - }; - - _proto.inline = function inline(tokens) { - var i, j, k, l2, row, token; - var l = tokens.length; - - for (i = 0; i < l; i++) { - token = tokens[i]; - - switch (token.type) { - case 'paragraph': - case 'text': - case 'heading': - { - token.tokens = []; - this.inlineTokens(token.text, token.tokens); - break; - } - - case 'table': - { - token.tokens = { - header: [], - cells: [] - }; // header - - l2 = token.header.length; - - for (j = 0; j < l2; j++) { - token.tokens.header[j] = []; - this.inlineTokens(token.header[j], token.tokens.header[j]); - } // cells - - - l2 = token.cells.length; - - for (j = 0; j < l2; j++) { - row = token.cells[j]; - token.tokens.cells[j] = []; - - for (k = 0; k < row.length; k++) { - token.tokens.cells[j][k] = []; - this.inlineTokens(row[k], token.tokens.cells[j][k]); - } - } - - break; - } - - case 'blockquote': - { - this.inline(token.tokens); - break; - } - - case 'list': - { - l2 = token.items.length; - - for (j = 0; j < l2; j++) { - this.inline(token.items[j].tokens); - } - - break; - } - } - } - - return tokens; - } - /** - * Lexing/Compiling - */ - ; - - _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock, prevChar) { - if (tokens === void 0) { - tokens = []; - } - - if (inLink === void 0) { - inLink = false; - } - - if (inRawBlock === void 0) { - inRawBlock = false; - } - - if (prevChar === void 0) { - prevChar = ''; - } - - var token; // String with links masked to avoid interference with em and strong - - var maskedSrc = src; - var match; // Mask out reflinks - - if (this.tokens.links) { - var links = Object.keys(this.tokens.links); - - if (links.length > 0) { - while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) { - if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) { - maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex); - } - } - } - } // Mask out other blocks - - - while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) { - maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); - } - - while (src) { - // escape - if (token = this.tokenizer.escape(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // tag - - - if (token = this.tokenizer.tag(src, inLink, inRawBlock)) { - src = src.substring(token.raw.length); - inLink = token.inLink; - inRawBlock = token.inRawBlock; - tokens.push(token); - continue; - } // link - - - if (token = this.tokenizer.link(src)) { - src = src.substring(token.raw.length); - - if (token.type === 'link') { - token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); - } - - tokens.push(token); - continue; - } // reflink, nolink - - - if (token = this.tokenizer.reflink(src, this.tokens.links)) { - src = src.substring(token.raw.length); - - if (token.type === 'link') { - token.tokens = this.inlineTokens(token.text, [], true, inRawBlock); - } - - tokens.push(token); - continue; - } // strong - - - if (token = this.tokenizer.strong(src, maskedSrc, prevChar)) { - src = src.substring(token.raw.length); - token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); - tokens.push(token); - continue; - } // em - - - if (token = this.tokenizer.em(src, maskedSrc, prevChar)) { - src = src.substring(token.raw.length); - token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); - tokens.push(token); - continue; - } // code - - - if (token = this.tokenizer.codespan(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // br - - - if (token = this.tokenizer.br(src)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // del (gfm) - - - if (token = this.tokenizer.del(src)) { - src = src.substring(token.raw.length); - token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock); - tokens.push(token); - continue; - } // autolink - - - if (token = this.tokenizer.autolink(src, mangle)) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // url (gfm) - - - if (!inLink && (token = this.tokenizer.url(src, mangle))) { - src = src.substring(token.raw.length); - tokens.push(token); - continue; - } // text - - - if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) { - src = src.substring(token.raw.length); - prevChar = token.raw.slice(-1); - tokens.push(token); - continue; - } - - if (src) { - var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0); - - if (this.options.silent) { - console.error(errMsg); - break; - } else { - throw new Error(errMsg); - } - } - } - - return tokens; - }; - - _createClass(Lexer, null, [{ - key: "rules", - get: function get() { - return { - block: block$1, - inline: inline$1 - }; - } - }]); - - return Lexer; - }(); - - var defaults$3 = defaults.defaults; - var cleanUrl$1 = helpers.cleanUrl, - escape$1 = helpers.escape; - /** - * Renderer - */ - - var Renderer_1 = /*#__PURE__*/function () { - function Renderer(options) { - this.options = options || defaults$3; - } - - var _proto = Renderer.prototype; - - _proto.code = function code(_code, infostring, escaped) { - var lang = (infostring || '').match(/\S*/)[0]; - - if (this.options.highlight) { - var out = this.options.highlight(_code, lang); - - if (out != null && out !== _code) { - escaped = true; - _code = out; - } - } - - if (!lang) { - return '
' + (escaped ? _code : escape$1(_code, true)) + '
\n'; - } - - return '
' + (escaped ? _code : escape$1(_code, true)) + '
\n'; - }; - - _proto.blockquote = function blockquote(quote) { - return '
\n' + quote + '
\n'; - }; - - _proto.html = function html(_html) { - return _html; - }; - - _proto.heading = function heading(text, level, raw, slugger) { - if (this.options.headerIds) { - return '' + text + '\n'; - } // ignore IDs - - - return '' + text + '\n'; - }; - - _proto.hr = function hr() { - return this.options.xhtml ? '
\n' : '
\n'; - }; - - _proto.list = function list(body, ordered, start) { - var type = ordered ? 'ol' : 'ul', - startatt = ordered && start !== 1 ? ' start="' + start + '"' : ''; - return '<' + type + startatt + '>\n' + body + '\n'; - }; - - _proto.listitem = function listitem(text) { - return '
  • ' + text + '
  • \n'; - }; - - _proto.checkbox = function checkbox(checked) { - return ' '; - }; - - _proto.paragraph = function paragraph(text) { - return '

    ' + text + '

    \n'; - }; - - _proto.table = function table(header, body) { - if (body) body = '' + body + ''; - return '\n' + '\n' + header + '\n' + body + '
    \n'; - }; - - _proto.tablerow = function tablerow(content) { - return '\n' + content + '\n'; - }; - - _proto.tablecell = function tablecell(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align ? '<' + type + ' align="' + flags.align + '">' : '<' + type + '>'; - return tag + content + '\n'; - } // span level renderer - ; - - _proto.strong = function strong(text) { - return '' + text + ''; - }; - - _proto.em = function em(text) { - return '' + text + ''; - }; - - _proto.codespan = function codespan(text) { - return '' + text + ''; - }; - - _proto.br = function br() { - return this.options.xhtml ? '
    ' : '
    '; - }; - - _proto.del = function del(text) { - return '' + text + ''; - }; - - _proto.link = function link(href, title, text) { - href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); - - if (href === null) { - return text; - } - - var out = '
    '; - return out; - }; - - _proto.image = function image(href, title, text) { - href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href); - - if (href === null) { - return text; - } - - var out = '' + text + '' : '>'; - return out; - }; - - _proto.text = function text(_text) { - return _text; - }; - - return Renderer; - }(); - - /** - * TextRenderer - * returns only the textual part of the token - */ - var TextRenderer_1 = /*#__PURE__*/function () { - function TextRenderer() {} - - var _proto = TextRenderer.prototype; - - // no need for block level renderers - _proto.strong = function strong(text) { - return text; - }; - - _proto.em = function em(text) { - return text; - }; - - _proto.codespan = function codespan(text) { - return text; - }; - - _proto.del = function del(text) { - return text; - }; - - _proto.html = function html(text) { - return text; - }; - - _proto.text = function text(_text) { - return _text; - }; - - _proto.link = function link(href, title, text) { - return '' + text; - }; - - _proto.image = function image(href, title, text) { - return '' + text; - }; - - _proto.br = function br() { - return ''; - }; - - return TextRenderer; - }(); - - /** - * Slugger generates header id - */ - var Slugger_1 = /*#__PURE__*/function () { - function Slugger() { - this.seen = {}; - } - - var _proto = Slugger.prototype; - - _proto.serialize = function serialize(value) { - return value.toLowerCase().trim() // remove html tags - .replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars - .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-'); - } - /** - * Finds the next safe (unique) slug to use - */ - ; - - _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) { - var slug = originalSlug; - var occurenceAccumulator = 0; - - if (this.seen.hasOwnProperty(slug)) { - occurenceAccumulator = this.seen[originalSlug]; - - do { - occurenceAccumulator++; - slug = originalSlug + '-' + occurenceAccumulator; - } while (this.seen.hasOwnProperty(slug)); - } - - if (!isDryRun) { - this.seen[originalSlug] = occurenceAccumulator; - this.seen[slug] = 0; - } - - return slug; - } - /** - * Convert string to unique id - * @param {object} options - * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator. - */ - ; - - _proto.slug = function slug(value, options) { - if (options === void 0) { - options = {}; - } - - var slug = this.serialize(value); - return this.getNextSafeSlug(slug, options.dryrun); - }; - - return Slugger; - }(); - - var defaults$4 = defaults.defaults; - var unescape$1 = helpers.unescape; - /** - * Parsing & Compiling - */ - - var Parser_1 = /*#__PURE__*/function () { - function Parser(options) { - this.options = options || defaults$4; - this.options.renderer = this.options.renderer || new Renderer_1(); - this.renderer = this.options.renderer; - this.renderer.options = this.options; - this.textRenderer = new TextRenderer_1(); - this.slugger = new Slugger_1(); - } - /** - * Static Parse Method - */ - - - Parser.parse = function parse(tokens, options) { - var parser = new Parser(options); - return parser.parse(tokens); - } - /** - * Parse Loop - */ - ; - - var _proto = Parser.prototype; - - _proto.parse = function parse(tokens, top) { - if (top === void 0) { - top = true; - } - - var out = '', - i, - j, - k, - l2, - l3, - row, - cell, - header, - body, - token, - ordered, - start, - loose, - itemBody, - item, - checked, - task, - checkbox; - var l = tokens.length; - - for (i = 0; i < l; i++) { - token = tokens[i]; - - switch (token.type) { - case 'space': - { - continue; - } - - case 'hr': - { - out += this.renderer.hr(); - continue; - } - - case 'heading': - { - out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape$1(this.parseInline(token.tokens, this.textRenderer)), this.slugger); - continue; - } - - case 'code': - { - out += this.renderer.code(token.text, token.lang, token.escaped); - continue; - } - - case 'table': - { - header = ''; // header - - cell = ''; - l2 = token.header.length; - - for (j = 0; j < l2; j++) { - cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), { - header: true, - align: token.align[j] - }); - } - - header += this.renderer.tablerow(cell); - body = ''; - l2 = token.cells.length; - - for (j = 0; j < l2; j++) { - row = token.tokens.cells[j]; - cell = ''; - l3 = row.length; - - for (k = 0; k < l3; k++) { - cell += this.renderer.tablecell(this.parseInline(row[k]), { - header: false, - align: token.align[k] - }); - } - - body += this.renderer.tablerow(cell); - } - - out += this.renderer.table(header, body); - continue; - } - - case 'blockquote': - { - body = this.parse(token.tokens); - out += this.renderer.blockquote(body); - continue; - } - - case 'list': - { - ordered = token.ordered; - start = token.start; - loose = token.loose; - l2 = token.items.length; - body = ''; - - for (j = 0; j < l2; j++) { - item = token.items[j]; - checked = item.checked; - task = item.task; - itemBody = ''; - - if (item.task) { - checkbox = this.renderer.checkbox(checked); - - if (loose) { - if (item.tokens.length > 0 && item.tokens[0].type === 'text') { - item.tokens[0].text = checkbox + ' ' + item.tokens[0].text; - - if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') { - item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text; - } - } else { - item.tokens.unshift({ - type: 'text', - text: checkbox - }); - } - } else { - itemBody += checkbox; - } - } - - itemBody += this.parse(item.tokens, loose); - body += this.renderer.listitem(itemBody, task, checked); - } - - out += this.renderer.list(body, ordered, start); - continue; - } - - case 'html': - { - // TODO parse inline content if parameter markdown=1 - out += this.renderer.html(token.text); - continue; - } - - case 'paragraph': - { - out += this.renderer.paragraph(this.parseInline(token.tokens)); - continue; - } - - case 'text': - { - body = token.tokens ? this.parseInline(token.tokens) : token.text; - - while (i + 1 < l && tokens[i + 1].type === 'text') { - token = tokens[++i]; - body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text); - } - - out += top ? this.renderer.paragraph(body) : body; - continue; - } - - default: - { - var errMsg = 'Token with "' + token.type + '" type was not found.'; - - if (this.options.silent) { - console.error(errMsg); - return; - } else { - throw new Error(errMsg); - } - } - } - } - - return out; - } - /** - * Parse Inline Tokens - */ - ; - - _proto.parseInline = function parseInline(tokens, renderer) { - renderer = renderer || this.renderer; - var out = '', - i, - token; - var l = tokens.length; - - for (i = 0; i < l; i++) { - token = tokens[i]; - - switch (token.type) { - case 'escape': - { - out += renderer.text(token.text); - break; - } - - case 'html': - { - out += renderer.html(token.text); - break; - } - - case 'link': - { - out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer)); - break; - } - - case 'image': - { - out += renderer.image(token.href, token.title, token.text); - break; - } - - case 'strong': - { - out += renderer.strong(this.parseInline(token.tokens, renderer)); - break; - } - - case 'em': - { - out += renderer.em(this.parseInline(token.tokens, renderer)); - break; - } - - case 'codespan': - { - out += renderer.codespan(token.text); - break; - } - - case 'br': - { - out += renderer.br(); - break; - } - - case 'del': - { - out += renderer.del(this.parseInline(token.tokens, renderer)); - break; - } - - case 'text': - { - out += renderer.text(token.text); - break; - } - - default: - { - var errMsg = 'Token with "' + token.type + '" type was not found.'; - - if (this.options.silent) { - console.error(errMsg); - return; - } else { - throw new Error(errMsg); - } - } - } - } - - return out; - }; - - return Parser; - }(); - - var merge$2 = helpers.merge, - checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation, - escape$2 = helpers.escape; - var getDefaults = defaults.getDefaults, - changeDefaults = defaults.changeDefaults, - defaults$5 = defaults.defaults; - /** - * Marked - */ - - function marked(src, opt, callback) { - // throw error in case of non string input - if (typeof src === 'undefined' || src === null) { - throw new Error('marked(): input parameter is undefined or null'); - } - - if (typeof src !== 'string') { - throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'); - } - - if (typeof opt === 'function') { - callback = opt; - opt = null; - } - - opt = merge$2({}, marked.defaults, opt || {}); - checkSanitizeDeprecation$1(opt); - - if (callback) { - var highlight = opt.highlight; - var tokens; - - try { - tokens = Lexer_1.lex(src, opt); - } catch (e) { - return callback(e); - } - - var done = function done(err) { - var out; - - if (!err) { - try { - out = Parser_1.parse(tokens, opt); - } catch (e) { - err = e; - } - } - - opt.highlight = highlight; - return err ? callback(err) : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - if (!tokens.length) return done(); - var pending = 0; - marked.walkTokens(tokens, function (token) { - if (token.type === 'code') { - pending++; - setTimeout(function () { - highlight(token.text, token.lang, function (err, code) { - if (err) { - return done(err); - } - - if (code != null && code !== token.text) { - token.text = code; - token.escaped = true; - } - - pending--; - - if (pending === 0) { - done(); - } - }); - }, 0); - } - }); - - if (pending === 0) { - done(); - } - - return; - } - - try { - var _tokens = Lexer_1.lex(src, opt); - - if (opt.walkTokens) { - marked.walkTokens(_tokens, opt.walkTokens); - } - - return Parser_1.parse(_tokens, opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/markedjs/marked.'; - - if (opt.silent) { - return '

    An error occurred:

    ' + escape$2(e.message + '', true) + '
    '; - } - - throw e; - } - } - /** - * Options - */ - - - marked.options = marked.setOptions = function (opt) { - merge$2(marked.defaults, opt); - changeDefaults(marked.defaults); - return marked; - }; - - marked.getDefaults = getDefaults; - marked.defaults = defaults$5; - /** - * Use Extension - */ - - marked.use = function (extension) { - var opts = merge$2({}, extension); - - if (extension.renderer) { - (function () { - var renderer = marked.defaults.renderer || new Renderer_1(); - - var _loop = function _loop(prop) { - var prevRenderer = renderer[prop]; - - renderer[prop] = function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var ret = extension.renderer[prop].apply(renderer, args); - - if (ret === false) { - ret = prevRenderer.apply(renderer, args); - } - - return ret; - }; - }; - - for (var prop in extension.renderer) { - _loop(prop); - } - - opts.renderer = renderer; - })(); - } - - if (extension.tokenizer) { - (function () { - var tokenizer = marked.defaults.tokenizer || new Tokenizer_1(); - - var _loop2 = function _loop2(prop) { - var prevTokenizer = tokenizer[prop]; - - tokenizer[prop] = function () { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - var ret = extension.tokenizer[prop].apply(tokenizer, args); - - if (ret === false) { - ret = prevTokenizer.apply(tokenizer, args); - } - - return ret; - }; - }; - - for (var prop in extension.tokenizer) { - _loop2(prop); - } - - opts.tokenizer = tokenizer; - })(); - } - - if (extension.walkTokens) { - var walkTokens = marked.defaults.walkTokens; - - opts.walkTokens = function (token) { - extension.walkTokens(token); - - if (walkTokens) { - walkTokens(token); - } - }; - } - - marked.setOptions(opts); - }; - /** - * Run callback for every token - */ - - - marked.walkTokens = function (tokens, callback) { - for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) { - var token = _step.value; - callback(token); - - switch (token.type) { - case 'table': - { - for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) { - var cell = _step2.value; - marked.walkTokens(cell, callback); - } - - for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) { - var row = _step3.value; - - for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) { - var _cell = _step4.value; - marked.walkTokens(_cell, callback); - } - } - - break; - } - - case 'list': - { - marked.walkTokens(token.items, callback); - break; - } - - default: - { - if (token.tokens) { - marked.walkTokens(token.tokens, callback); - } - } - } - } - }; - /** - * Expose - */ - - - marked.Parser = Parser_1; - marked.parser = Parser_1.parse; - marked.Renderer = Renderer_1; - marked.TextRenderer = TextRenderer_1; - marked.Lexer = Lexer_1; - marked.lexer = Lexer_1.lex; - marked.Tokenizer = Tokenizer_1; - marked.Slugger = Slugger_1; - marked.parse = marked; - var marked_1 = marked; - - return marked_1; - -}))); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/marshalling.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/marshalling.js ***! - \**********************************************************************/ -/*! exports provided: parse, revive */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "revive", function() { return revive; }); -/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js"); -/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -function parse(text) { - let data = JSON.parse(text); - data = revive(data); - return data; -} -function revive(obj, depth = 0) { - if (!obj || depth > 200) { - return obj; - } - if (typeof obj === 'object') { - switch (obj.$mid) { - case 1: return _uri_js__WEBPACK_IMPORTED_MODULE_1__["URI"].revive(obj); - case 2: return new RegExp(obj.source, obj.flags); - } - if (obj instanceof _buffer_js__WEBPACK_IMPORTED_MODULE_0__["VSBuffer"] - || obj instanceof Uint8Array) { - return obj; - } - if (Array.isArray(obj)) { - for (let i = 0; i < obj.length; ++i) { - obj[i] = revive(obj[i], depth + 1); - } - } - else { - // walk object - for (const key in obj) { - if (Object.hasOwnProperty.call(obj, key)) { - obj[key] = revive(obj[key], depth + 1); - } - } - } - } - return obj; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/mime.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/mime.js ***! - \***************************************************************/ -/*! exports provided: MIME_TEXT, MIME_UNKNOWN, registerTextMime, guessMimeTypes */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MIME_TEXT", function() { return MIME_TEXT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MIME_UNKNOWN", function() { return MIME_UNKNOWN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTextMime", function() { return registerTextMime; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "guessMimeTypes", function() { return guessMimeTypes; }); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _glob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./glob.js */ "./node_modules/monaco-editor/esm/vs/base/common/glob.js"); -/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _resources_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const MIME_TEXT = 'text/plain'; -const MIME_UNKNOWN = 'application/unknown'; -let registeredAssociations = []; -let nonUserRegisteredAssociations = []; -let userRegisteredAssociations = []; -/** - * Associate a text mime to the registry. - */ -function registerTextMime(association, warnOnOverwrite = false) { - // Register - const associationItem = toTextMimeAssociationItem(association); - registeredAssociations.push(associationItem); - if (!associationItem.userConfigured) { - nonUserRegisteredAssociations.push(associationItem); - } - else { - userRegisteredAssociations.push(associationItem); - } - // Check for conflicts unless this is a user configured association - if (warnOnOverwrite && !associationItem.userConfigured) { - registeredAssociations.forEach(a => { - if (a.mime === associationItem.mime || a.userConfigured) { - return; // same mime or userConfigured is ok - } - if (associationItem.extension && a.extension === associationItem.extension) { - console.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`); - } - if (associationItem.filename && a.filename === associationItem.filename) { - console.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`); - } - if (associationItem.filepattern && a.filepattern === associationItem.filepattern) { - console.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`); - } - if (associationItem.firstline && a.firstline === associationItem.firstline) { - console.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`); - } - }); - } -} -function toTextMimeAssociationItem(association) { - return { - id: association.id, - mime: association.mime, - filename: association.filename, - extension: association.extension, - filepattern: association.filepattern, - firstline: association.firstline, - userConfigured: association.userConfigured, - filenameLowercase: association.filename ? association.filename.toLowerCase() : undefined, - extensionLowercase: association.extension ? association.extension.toLowerCase() : undefined, - filepatternLowercase: association.filepattern ? association.filepattern.toLowerCase() : undefined, - filepatternOnPath: association.filepattern ? association.filepattern.indexOf(_path_js__WEBPACK_IMPORTED_MODULE_0__["posix"].sep) >= 0 : false - }; -} -/** - * Given a file, return the best matching mime type for it - */ -function guessMimeTypes(resource, firstLine) { - let path; - if (resource) { - switch (resource.scheme) { - case _network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].file: - path = resource.fsPath; - break; - case _network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].data: - const metadata = _resources_js__WEBPACK_IMPORTED_MODULE_4__["DataUri"].parseMetaData(resource); - path = metadata.get(_resources_js__WEBPACK_IMPORTED_MODULE_4__["DataUri"].META_DATA_LABEL); - break; - default: - path = resource.path; - } - } - if (!path) { - return [MIME_UNKNOWN]; - } - path = path.toLowerCase(); - const filename = Object(_path_js__WEBPACK_IMPORTED_MODULE_0__["basename"])(path); - // 1.) User configured mappings have highest priority - const configuredMime = guessMimeTypeByPath(path, filename, userRegisteredAssociations); - if (configuredMime) { - return [configuredMime, MIME_TEXT]; - } - // 2.) Registered mappings have middle priority - const registeredMime = guessMimeTypeByPath(path, filename, nonUserRegisteredAssociations); - if (registeredMime) { - return [registeredMime, MIME_TEXT]; - } - // 3.) Firstline has lowest priority - if (firstLine) { - const firstlineMime = guessMimeTypeByFirstline(firstLine); - if (firstlineMime) { - return [firstlineMime, MIME_TEXT]; - } - } - return [MIME_UNKNOWN]; -} -function guessMimeTypeByPath(path, filename, associations) { - let filenameMatch = null; - let patternMatch = null; - let extensionMatch = null; - // We want to prioritize associations based on the order they are registered so that the last registered - // association wins over all other. This is for https://github.com/Microsoft/vscode/issues/20074 - for (let i = associations.length - 1; i >= 0; i--) { - const association = associations[i]; - // First exact name match - if (filename === association.filenameLowercase) { - filenameMatch = association; - break; // take it! - } - // Longest pattern match - if (association.filepattern) { - if (!patternMatch || association.filepattern.length > patternMatch.filepattern.length) { - const target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator - if (Object(_glob_js__WEBPACK_IMPORTED_MODULE_2__["match"])(association.filepatternLowercase, target)) { - patternMatch = association; - } - } - } - // Longest extension match - if (association.extension) { - if (!extensionMatch || association.extension.length > extensionMatch.extension.length) { - if (filename.endsWith(association.extensionLowercase)) { - extensionMatch = association; - } - } - } - } - // 1.) Exact name match has second highest prio - if (filenameMatch) { - return filenameMatch.mime; - } - // 2.) Match on pattern - if (patternMatch) { - return patternMatch.mime; - } - // 3.) Match on extension comes next - if (extensionMatch) { - return extensionMatch.mime; - } - return null; -} -function guessMimeTypeByFirstline(firstLine) { - if (Object(_strings_js__WEBPACK_IMPORTED_MODULE_1__["startsWithUTF8BOM"])(firstLine)) { - firstLine = firstLine.substr(1); - } - if (firstLine.length > 0) { - // We want to prioritize associations based on the order they are registered so that the last registered - // association wins over all other. This is for https://github.com/Microsoft/vscode/issues/20074 - for (let i = registeredAssociations.length - 1; i >= 0; i--) { - const association = registeredAssociations[i]; - if (!association.firstline) { - continue; - } - const matches = firstLine.match(association.firstline); - if (matches && matches.length > 0) { - return association.mime; - } - } - } - return null; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/navigator.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/navigator.js ***! - \********************************************************************/ -/*! exports provided: ArrayNavigator */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayNavigator", function() { return ArrayNavigator; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class ArrayNavigator { - constructor(items, start = 0, end = items.length, index = start - 1) { - this.items = items; - this.start = start; - this.end = end; - this.index = index; - } - current() { - if (this.index === this.start - 1 || this.index === this.end) { - return null; - } - return this.items[this.index]; - } - next() { - this.index = Math.min(this.index + 1, this.end); - return this.current(); - } - previous() { - this.index = Math.max(this.index - 1, this.start - 1); - return this.current(); - } - first() { - this.index = this.start; - return this.current(); - } - last() { - this.index = this.end - 1; - return this.current(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/network.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/network.js ***! - \******************************************************************/ -/*! exports provided: Schemas, RemoteAuthorities */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Schemas", function() { return Schemas; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RemoteAuthorities", function() { return RemoteAuthorities; }); -/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -var Schemas; -(function (Schemas) { - /** - * A schema that is used for models that exist in memory - * only and that have no correspondence on a server or such. - */ - Schemas.inMemory = 'inmemory'; - /** - * A schema that is used for setting files - */ - Schemas.vscode = 'vscode'; - /** - * A schema that is used for internal private files - */ - Schemas.internal = 'private'; - /** - * A walk-through document. - */ - Schemas.walkThrough = 'walkThrough'; - /** - * An embedded code snippet. - */ - Schemas.walkThroughSnippet = 'walkThroughSnippet'; - Schemas.http = 'http'; - Schemas.https = 'https'; - Schemas.file = 'file'; - Schemas.mailto = 'mailto'; - Schemas.untitled = 'untitled'; - Schemas.data = 'data'; - Schemas.command = 'command'; - Schemas.vscodeRemote = 'vscode-remote'; - Schemas.vscodeRemoteResource = 'vscode-remote-resource'; - Schemas.userData = 'vscode-userdata'; - Schemas.vscodeCustomEditor = 'vscode-custom-editor'; - Schemas.vscodeNotebook = 'vscode-notebook'; - Schemas.vscodeNotebookCell = 'vscode-notebook-cell'; - Schemas.vscodeSettings = 'vscode-settings'; - Schemas.webviewPanel = 'webview-panel'; - /** - * Scheme used for loading the wrapper html and script in webviews. - */ - Schemas.vscodeWebview = 'vscode-webview'; - /** - * Scheme used for loading resources inside of webviews. - */ - Schemas.vscodeWebviewResource = 'vscode-webview-resource'; - /** - * Scheme used for extension pages - */ - Schemas.extension = 'extension'; -})(Schemas || (Schemas = {})); -class RemoteAuthoritiesImpl { - constructor() { - this._hosts = Object.create(null); - this._ports = Object.create(null); - this._connectionTokens = Object.create(null); - this._preferredWebSchema = 'http'; - this._delegate = null; - } - setPreferredWebSchema(schema) { - this._preferredWebSchema = schema; - } - rewrite(uri) { - if (this._delegate) { - return this._delegate(uri); - } - const authority = uri.authority; - let host = this._hosts[authority]; - if (host && host.indexOf(':') !== -1) { - host = `[${host}]`; - } - const port = this._ports[authority]; - const connectionToken = this._connectionTokens[authority]; - let query = `path=${encodeURIComponent(uri.path)}`; - if (typeof connectionToken === 'string') { - query += `&tkn=${encodeURIComponent(connectionToken)}`; - } - return _uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].from({ - scheme: _platform_js__WEBPACK_IMPORTED_MODULE_1__["isWeb"] ? this._preferredWebSchema : Schemas.vscodeRemoteResource, - authority: `${host}:${port}`, - path: `/vscode-remote-resource`, - query - }); - } -} -const RemoteAuthorities = new RemoteAuthoritiesImpl(); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/numbers.js ***! - \******************************************************************/ -/*! exports provided: clamp, MovingAverage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MovingAverage", function() { return MovingAverage; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function clamp(value, min, max) { - return Math.min(Math.max(value, min), max); -} -class MovingAverage { - constructor() { - this._n = 1; - this._val = 0; - } - update(value) { - this._val = this._val + (value - this._val) / this._n; - this._n += 1; - return this; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/objects.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/objects.js ***! - \******************************************************************/ -/*! exports provided: deepClone, deepFreeze, cloneAndChange, mixin, assign, equals, getOrDefault */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepClone", function() { return deepClone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepFreeze", function() { return deepFreeze; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneAndChange", function() { return cloneAndChange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mixin", function() { return mixin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return assign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return equals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOrDefault", function() { return getOrDefault; }); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -function deepClone(obj) { - if (!obj || typeof obj !== 'object') { - return obj; - } - if (obj instanceof RegExp) { - // See https://github.com/Microsoft/TypeScript/issues/10990 - return obj; - } - const result = Array.isArray(obj) ? [] : {}; - Object.keys(obj).forEach((key) => { - if (obj[key] && typeof obj[key] === 'object') { - result[key] = deepClone(obj[key]); - } - else { - result[key] = obj[key]; - } - }); - return result; -} -function deepFreeze(obj) { - if (!obj || typeof obj !== 'object') { - return obj; - } - const stack = [obj]; - while (stack.length > 0) { - const obj = stack.shift(); - Object.freeze(obj); - for (const key in obj) { - if (_hasOwnProperty.call(obj, key)) { - const prop = obj[key]; - if (typeof prop === 'object' && !Object.isFrozen(prop)) { - stack.push(prop); - } - } - } - } - return obj; -} -const _hasOwnProperty = Object.prototype.hasOwnProperty; -function cloneAndChange(obj, changer) { - return _cloneAndChange(obj, changer, new Set()); -} -function _cloneAndChange(obj, changer, seen) { - if (Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isUndefinedOrNull"])(obj)) { - return obj; - } - const changed = changer(obj); - if (typeof changed !== 'undefined') { - return changed; - } - if (Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isArray"])(obj)) { - const r1 = []; - for (const e of obj) { - r1.push(_cloneAndChange(e, changer, seen)); - } - return r1; - } - if (Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"])(obj)) { - if (seen.has(obj)) { - throw new Error('Cannot clone recursive data-structure'); - } - seen.add(obj); - const r2 = {}; - for (let i2 in obj) { - if (_hasOwnProperty.call(obj, i2)) { - r2[i2] = _cloneAndChange(obj[i2], changer, seen); - } - } - seen.delete(obj); - return r2; - } - return obj; -} -/** - * Copies all properties of source into destination. The optional parameter "overwrite" allows to control - * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite). - */ -function mixin(destination, source, overwrite = true) { - if (!Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"])(destination)) { - return source; - } - if (Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"])(source)) { - Object.keys(source).forEach(key => { - if (key in destination) { - if (overwrite) { - if (Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"])(destination[key]) && Object(_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"])(source[key])) { - mixin(destination[key], source[key], overwrite); - } - else { - destination[key] = source[key]; - } - } - } - else { - destination[key] = source[key]; - } - }); - } - return destination; -} -function assign(destination, ...sources) { - sources.forEach(source => Object.keys(source).forEach(key => destination[key] = source[key])); - return destination; -} -function equals(one, other) { - if (one === other) { - return true; - } - if (one === null || one === undefined || other === null || other === undefined) { - return false; - } - if (typeof one !== typeof other) { - return false; - } - if (typeof one !== 'object') { - return false; - } - if ((Array.isArray(one)) !== (Array.isArray(other))) { - return false; - } - let i; - let key; - if (Array.isArray(one)) { - if (one.length !== other.length) { - return false; - } - for (i = 0; i < one.length; i++) { - if (!equals(one[i], other[i])) { - return false; - } - } - } - else { - const oneKeys = []; - for (key in one) { - oneKeys.push(key); - } - oneKeys.sort(); - const otherKeys = []; - for (key in other) { - otherKeys.push(key); - } - otherKeys.sort(); - if (!equals(oneKeys, otherKeys)) { - return false; - } - for (i = 0; i < oneKeys.length; i++) { - if (!equals(one[oneKeys[i]], other[oneKeys[i]])) { - return false; - } - } - } - return true; -} -function getOrDefault(obj, fn, defaultValue) { - const result = fn(obj); - return typeof result === 'undefined' ? defaultValue : result; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/path.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/path.js ***! - \***************************************************************/ -/*! exports provided: win32, posix, normalize, resolve, relative, dirname, basename, extname, sep */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "win32", function() { return win32; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "posix", function() { return posix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolve", function() { return resolve; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relative", function() { return relative; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dirname", function() { return dirname; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basename", function() { return basename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extname", function() { return extname; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sep", function() { return sep; }); -/* harmony import */ var _process_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./process.js */ "./node_modules/monaco-editor/esm/vs/base/common/process.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -// NOTE: VSCode's copy of nodejs path library to be usable in common (non-node) namespace -// Copied from: https://github.com/nodejs/node/blob/v12.8.1/lib/path.js -/** - * Copyright Joyent, Inc. and other Node contributors. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to permit - * persons to whom the Software is furnished to do so, subject to the - * following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -const CHAR_UPPERCASE_A = 65; /* A */ -const CHAR_LOWERCASE_A = 97; /* a */ -const CHAR_UPPERCASE_Z = 90; /* Z */ -const CHAR_LOWERCASE_Z = 122; /* z */ -const CHAR_DOT = 46; /* . */ -const CHAR_FORWARD_SLASH = 47; /* / */ -const CHAR_BACKWARD_SLASH = 92; /* \ */ -const CHAR_COLON = 58; /* : */ -const CHAR_QUESTION_MARK = 63; /* ? */ -class ErrorInvalidArgType extends Error { - constructor(name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && expected.indexOf('not ') === 0) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } - else { - determiner = 'must be'; - } - const type = name.indexOf('.') !== -1 ? 'property' : 'argument'; - let msg = `The "${name}" ${type} ${determiner} of type ${expected}`; - msg += `. Received type ${typeof actual}`; - super(msg); - this.code = 'ERR_INVALID_ARG_TYPE'; - } -} -function validateString(value, name) { - if (typeof value !== 'string') { - throw new ErrorInvalidArgType(name, 'string', value); - } -} -function isPathSeparator(code) { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -} -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} -function isWindowsDeviceRoot(code) { - return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z || - code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z; -} -// Resolves . and .. elements in a path with directory names -function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { - let res = ''; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code = 0; - for (let i = 0; i <= path.length; ++i) { - if (i < path.length) { - code = path.charCodeAt(i); - } - else if (isPathSeparator(code)) { - break; - } - else { - code = CHAR_FORWARD_SLASH; - } - if (isPathSeparator(code)) { - if (lastSlash === i - 1 || dots === 1) { - // NOOP - } - else if (dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || - res.charCodeAt(res.length - 1) !== CHAR_DOT || - res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ''; - lastSegmentLength = 0; - } - else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } - else if (res.length !== 0) { - res = ''; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - res += res.length > 0 ? `${separator}..` : '..'; - lastSegmentLength = 2; - } - } - else { - if (res.length > 0) { - res += `${separator}${path.slice(lastSlash + 1, i)}`; - } - else { - res = path.slice(lastSlash + 1, i); - } - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } - else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } - else { - dots = -1; - } - } - return res; -} -function _format(sep, pathObject) { - if (pathObject === null || typeof pathObject !== 'object') { - throw new ErrorInvalidArgType('pathObject', 'Object', pathObject); - } - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || - `${pathObject.name || ''}${pathObject.ext || ''}`; - if (!dir) { - return base; - } - return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`; -} -const win32 = { - // path.resolve([from ...], to) - resolve(...pathSegments) { - let resolvedDevice = ''; - let resolvedTail = ''; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1; i--) { - let path; - if (i >= 0) { - path = pathSegments[i]; - validateString(path, 'path'); - // Skip empty entries - if (path.length === 0) { - continue; - } - } - else if (resolvedDevice.length === 0) { - path = _process_js__WEBPACK_IMPORTED_MODULE_0__["cwd"](); - } - else { - // Windows has the concept of drive-specific current working - // directories. If we've resolved a drive letter but not yet an - // absolute path, get cwd for that drive, or the process cwd if - // the drive cwd is not available. We're sure the device is not - // a UNC path at this points, because UNC paths are always absolute. - path = _process_js__WEBPACK_IMPORTED_MODULE_0__["env"][`=${resolvedDevice}`] || _process_js__WEBPACK_IMPORTED_MODULE_0__["cwd"](); - // Verify that a cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (path === undefined || - path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() && - path.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - path = `${resolvedDevice}\\`; - } - } - const len = path.length; - let rootEnd = 0; - let device = ''; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len === 1) { - if (isPathSeparator(code)) { - // `path` contains just a path separator - rootEnd = 1; - isAbsolute = true; - } - } - else if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an - // absolute path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len || j !== last) { - // We matched a UNC root - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } - else { - rootEnd = 1; - } - } - else if (isWindowsDeviceRoot(code) && - path.charCodeAt(1) === CHAR_COLON) { - // Possible device root - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - if (device.length > 0) { - if (resolvedDevice.length > 0) { - if (device.toLowerCase() !== resolvedDevice.toLowerCase()) { - // This path points to another device so it is not applicable - continue; - } - } - else { - resolvedDevice = device; - } - } - if (resolvedAbsolute) { - if (resolvedDevice.length > 0) { - break; - } - } - else { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - if (isAbsolute && resolvedDevice.length > 0) { - break; - } - } - } - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when process.cwd() - // fails) - // Normalize the tail path - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\', isPathSeparator); - return resolvedAbsolute ? - `${resolvedDevice}\\${resolvedTail}` : - `${resolvedDevice}${resolvedTail}` || '.'; - }, - normalize(path) { - validateString(path, 'path'); - const len = path.length; - if (len === 0) { - return '.'; - } - let rootEnd = 0; - let device; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len === 1) { - // `path` contains just a single char, exit early to avoid - // unnecessary work - return isPosixPathSeparator(code) ? '\\' : path; - } - if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an absolute - // path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - // We matched a UNC root only - // Return the normalized version of the UNC root since there - // is nothing left to process - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } - if (j !== last) { - // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } - else { - rootEnd = 1; - } - } - else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - // Possible device root - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - let tail = rootEnd < len ? - normalizeString(path.slice(rootEnd), !isAbsolute, '\\', isPathSeparator) : - ''; - if (tail.length === 0 && !isAbsolute) { - tail = '.'; - } - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += '\\'; - } - if (device === undefined) { - return isAbsolute ? `\\${tail}` : tail; - } - return isAbsolute ? `${device}\\${tail}` : `${device}${tail}`; - }, - isAbsolute(path) { - validateString(path, 'path'); - const len = path.length; - if (len === 0) { - return false; - } - const code = path.charCodeAt(0); - return isPathSeparator(code) || - // Possible device root - len > 2 && - isWindowsDeviceRoot(code) && - path.charCodeAt(1) === CHAR_COLON && - isPathSeparator(path.charCodeAt(2)); - }, - join(...paths) { - if (paths.length === 0) { - return '.'; - } - let joined; - let firstPart; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, 'path'); - if (arg.length > 0) { - if (joined === undefined) { - joined = firstPart = arg; - } - else { - joined += `\\${arg}`; - } - } - } - if (joined === undefined) { - return '.'; - } - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\\') - let needsReplace = true; - let slashCount = 0; - if (typeof firstPart === 'string' && isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) { - ++slashCount; - } - else { - // We matched a UNC path in the first part - needsReplace = false; - } - } - } - } - if (needsReplace) { - // Find any more consecutive slashes we need to replace - while (slashCount < joined.length && - isPathSeparator(joined.charCodeAt(slashCount))) { - slashCount++; - } - // Replace the slashes if needed - if (slashCount >= 2) { - joined = `\\${joined.slice(slashCount)}`; - } - } - return win32.normalize(joined); - }, - // It will solve the relative path from `from` to `to`, for instance: - // from = 'C:\\orandea\\test\\aaa' - // to = 'C:\\orandea\\impl\\bbb' - // The output of the function should be: '..\\..\\impl\\bbb' - relative(from, to) { - validateString(from, 'from'); - validateString(to, 'to'); - if (from === to) { - return ''; - } - const fromOrig = win32.resolve(from); - const toOrig = win32.resolve(to); - if (fromOrig === toOrig) { - return ''; - } - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) { - return ''; - } - // Trim any leading backslashes - let fromStart = 0; - while (fromStart < from.length && - from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { - fromStart++; - } - // Trim trailing backslashes (applicable to UNC paths only) - let fromEnd = from.length; - while (fromEnd - 1 > fromStart && - from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { - fromEnd--; - } - const fromLen = fromEnd - fromStart; - // Trim any leading backslashes - let toStart = 0; - while (toStart < to.length && - to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - toStart++; - } - // Trim trailing backslashes (applicable to UNC paths only) - let toEnd = to.length; - while (toEnd - 1 > toStart && - to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { - toEnd--; - } - const toLen = toEnd - toStart; - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { - break; - } - else if (fromCode === CHAR_BACKWARD_SLASH) { - lastCommonSep = i; - } - } - // We found a mismatch before the first common path separator was seen, so - // return the original `to`. - if (i !== length) { - if (lastCommonSep === -1) { - return toOrig; - } - } - else { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); - } - if (i === 2) { - // We get here if `from` is the device root. - // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='C:\\foo\\bar'; to='C:\\foo' - lastCommonSep = i; - } - else if (i === 2) { - // We get here if `to` is the device root. - // For example: from='C:\\foo\\bar'; to='C:\\' - lastCommonSep = 3; - } - } - if (lastCommonSep === -1) { - lastCommonSep = 0; - } - } - let out = ''; - // Generate the relative path based on the path difference between `to` and - // `from` - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - out += out.length === 0 ? '..' : '\\..'; - } - } - toStart += lastCommonSep; - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) { - return `${out}${toOrig.slice(toStart, toEnd)}`; - } - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - ++toStart; - } - return toOrig.slice(toStart, toEnd); - }, - toNamespacedPath(path) { - // Note: this will *probably* throw somewhere. - if (typeof path !== 'string') { - return path; - } - if (path.length === 0) { - return ''; - } - const resolvedPath = win32.resolve(path); - if (resolvedPath.length <= 2) { - return path; - } - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - // Possible UNC root - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } - else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) && - resolvedPath.charCodeAt(1) === CHAR_COLON && - resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - // Matched device root, convert the path to a long UNC path - return `\\\\?\\${resolvedPath}`; - } - return path; - }, - dirname(path) { - validateString(path, 'path'); - const len = path.length; - if (len === 0) { - return '.'; - } - let rootEnd = -1; - let offset = 0; - const code = path.charCodeAt(0); - if (len === 1) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work or a dot. - return isPathSeparator(code) ? path : '.'; - } - // Try to match a root - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - // Possible device root - } - else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2; - offset = rootEnd; - } - let end = -1; - let matchedSlash = true; - for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } - else { - // We saw the first non-path separator - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) { - return '.'; - } - end = rootEnd; - } - return path.slice(0, end); - }, - basename(path, ext) { - if (ext !== undefined) { - validateString(ext, 'ext'); - } - validateString(path, 'path'); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2 && - isWindowsDeviceRoot(path.charCodeAt(0)) && - path.charCodeAt(1) === CHAR_COLON) { - start = 2; - } - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { - return ''; - } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } - else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } - else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) { - end = firstNonSlashEnd; - } - else if (end === -1) { - end = path.length; - } - return path.slice(start, end); - } - for (i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } - else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ''; - } - return path.slice(start, end); - }, - extname(path) { - validateString(path, 'path'); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2 && - path.charCodeAt(1) === CHAR_COLON && - isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) { - startDot = i; - } - else if (preDotState !== 1) { - preDotState = 1; - } - } - else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && - startDot === end - 1 && - startDot === startPart + 1)) { - return ''; - } - return path.slice(startDot, end); - }, - format: _format.bind(null, '\\'), - parse(path) { - validateString(path, 'path'); - const ret = { root: '', dir: '', base: '', ext: '', name: '' }; - if (path.length === 0) { - return ret; - } - const len = path.length; - let rootEnd = 0; - let code = path.charCodeAt(0); - if (len === 1) { - if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - ret.base = ret.name = path; - return ret; - } - // Try to match a root - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - // We matched a UNC root only - rootEnd = j; - } - else if (j !== last) { - // We matched a UNC root with leftovers - rootEnd = j + 1; - } - } - } - } - } - else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - // Possible device root - if (len <= 2) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - rootEnd = 2; - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - rootEnd = 3; - } - } - if (rootEnd > 0) { - ret.root = path.slice(0, rootEnd); - } - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) { - startDot = i; - } - else if (preDotState !== 1) { - preDotState = 1; - } - } - else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (end !== -1) { - if (startDot === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && - startDot === end - 1 && - startDot === startPart + 1)) { - ret.base = ret.name = path.slice(startPart, end); - } - else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - } - // If the directory is the root, use the entire root as the `dir` including - // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the - // trailing slash (`C:\abc\def` -> `C:\abc`). - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } - else { - ret.dir = ret.root; - } - return ret; - }, - sep: '\\', - delimiter: ';', - win32: null, - posix: null -}; -const posix = { - // path.resolve([from ...], to) - resolve(...pathSegments) { - let resolvedPath = ''; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - const path = i >= 0 ? pathSegments[i] : _process_js__WEBPACK_IMPORTED_MODULE_0__["cwd"](); - validateString(path, 'path'); - // Skip empty entries - if (path.length === 0) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - // Normalize the path - resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator); - if (resolvedAbsolute) { - return `/${resolvedPath}`; - } - return resolvedPath.length > 0 ? resolvedPath : '.'; - }, - normalize(path) { - validateString(path, 'path'); - if (path.length === 0) { - return '.'; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; - // Normalize the path - path = normalizeString(path, !isAbsolute, '/', isPosixPathSeparator); - if (path.length === 0) { - if (isAbsolute) { - return '/'; - } - return trailingSeparator ? './' : '.'; - } - if (trailingSeparator) { - path += '/'; - } - return isAbsolute ? `/${path}` : path; - }, - isAbsolute(path) { - validateString(path, 'path'); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; - }, - join(...paths) { - if (paths.length === 0) { - return '.'; - } - let joined; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, 'path'); - if (arg.length > 0) { - if (joined === undefined) { - joined = arg; - } - else { - joined += `/${arg}`; - } - } - } - if (joined === undefined) { - return '.'; - } - return posix.normalize(joined); - }, - relative(from, to) { - validateString(from, 'from'); - validateString(to, 'to'); - if (from === to) { - return ''; - } - // Trim leading forward slashes. - from = posix.resolve(from); - to = posix.resolve(to); - if (from === to) { - return ''; - } - const fromStart = 1; - const fromEnd = from.length; - const fromLen = fromEnd - fromStart; - const toStart = 1; - const toLen = to.length - toStart; - // Compare paths to find the longest common path from root - const length = (fromLen < toLen ? fromLen : toLen); - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { - break; - } - else if (fromCode === CHAR_FORWARD_SLASH) { - lastCommonSep = i; - } - } - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } - if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } - else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } - else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo/bar'; to='/' - lastCommonSep = 0; - } - } - } - let out = ''; - // Generate the relative path based on the path difference between `to` - // and `from`. - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { - out += out.length === 0 ? '..' : '/..'; - } - } - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts. - return `${out}${to.slice(toStart + lastCommonSep)}`; - }, - toNamespacedPath(path) { - // Non-op on posix systems - return path; - }, - dirname(path) { - validateString(path, 'path'); - if (path.length === 0) { - return '.'; - } - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let end = -1; - let matchedSlash = true; - for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - end = i; - break; - } - } - else { - // We saw the first non-path separator - matchedSlash = false; - } - } - if (end === -1) { - return hasRoot ? '/' : '.'; - } - if (hasRoot && end === 1) { - return '//'; - } - return path.slice(0, end); - }, - basename(path, ext) { - if (ext !== undefined) { - validateString(ext, 'ext'); - } - validateString(path, 'path'); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (ext !== undefined && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { - return ''; - } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } - else { - if (firstNonSlashEnd === -1) { - // We saw the first non-path separator, remember this index in case - // we need it if the extension ends up not matching - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - // Try to match the explicit extension - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - // We matched the extension, so mark this as the end of our path - // component - end = i; - } - } - else { - // Extension does not match, so our result is the entire path - // component - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) { - end = firstNonSlashEnd; - } - else if (end === -1) { - end = path.length; - } - return path.slice(start, end); - } - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - start = i + 1; - break; - } - } - else if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // path component - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ''; - } - return path.slice(start, end); - }, - extname(path) { - validateString(path, 'path'); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) { - startDot = i; - } - else if (preDotState !== 1) { - preDotState = 1; - } - } - else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || - end === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && - startDot === end - 1 && - startDot === startPart + 1)) { - return ''; - } - return path.slice(startDot, end); - }, - format: _format.bind(null, '/'), - parse(path) { - validateString(path, 'path'); - const ret = { root: '', dir: '', base: '', ext: '', name: '' }; - if (path.length === 0) { - return ret; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let start; - if (isAbsolute) { - ret.root = '/'; - start = 1; - } - else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for (; i >= start; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) { - startDot = i; - } - else if (preDotState !== 1) { - preDotState = 1; - } - } - else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (end !== -1) { - const start = startPart === 0 && isAbsolute ? 1 : startPart; - if (startDot === -1 || - // We saw a non-dot character immediately before the dot - preDotState === 0 || - // The (right-most) trimmed path component is exactly '..' - (preDotState === 1 && - startDot === end - 1 && - startDot === startPart + 1)) { - ret.base = ret.name = path.slice(start, end); - } - else { - ret.name = path.slice(start, startDot); - ret.base = path.slice(start, end); - ret.ext = path.slice(startDot, end); - } - } - if (startPart > 0) { - ret.dir = path.slice(0, startPart - 1); - } - else if (isAbsolute) { - ret.dir = '/'; - } - return ret; - }, - sep: '/', - delimiter: ':', - win32: null, - posix: null -}; -posix.win32 = win32.win32 = win32; -posix.posix = win32.posix = posix; -const normalize = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.normalize : posix.normalize); -const resolve = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.resolve : posix.resolve); -const relative = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.relative : posix.relative); -const dirname = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.dirname : posix.dirname); -const basename = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.basename : posix.basename); -const extname = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.extname : posix.extname); -const sep = (_process_js__WEBPACK_IMPORTED_MODULE_0__["platform"] === 'win32' ? win32.sep : posix.sep); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/platform.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/platform.js ***! - \*******************************************************************/ -/*! exports provided: isWindows, isMacintosh, isLinux, isNative, isWeb, isIOS, globals, setImmediate, OS, isLittleEndian */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* WEBPACK VAR INJECTION */(function(process, global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWindows", function() { return isWindows; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMacintosh", function() { return isMacintosh; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLinux", function() { return isLinux; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNative", function() { return isNative; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWeb", function() { return isWeb; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIOS", function() { return isIOS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "globals", function() { return globals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setImmediate", function() { return setImmediate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OS", function() { return OS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLittleEndian", function() { return isLittleEndian; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const LANGUAGE_DEFAULT = 'en'; -let _isWindows = false; -let _isMacintosh = false; -let _isLinux = false; -let _isNative = false; -let _isWeb = false; -let _isIOS = false; -let _locale = undefined; -let _language = LANGUAGE_DEFAULT; -let _translationsConfigFile = undefined; -let _userAgent = undefined; -const isElectronRenderer = (typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'renderer'); -// OS detection -if (typeof navigator === 'object' && !isElectronRenderer) { - _userAgent = navigator.userAgent; - _isWindows = _userAgent.indexOf('Windows') >= 0; - _isMacintosh = _userAgent.indexOf('Macintosh') >= 0; - _isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; - _isLinux = _userAgent.indexOf('Linux') >= 0; - _isWeb = true; - _locale = navigator.language; - _language = _locale; -} -else if (typeof process === 'object') { - _isWindows = (process.platform === 'win32'); - _isMacintosh = (process.platform === 'darwin'); - _isLinux = (process.platform === 'linux'); - _locale = LANGUAGE_DEFAULT; - _language = LANGUAGE_DEFAULT; - const rawNlsConfig = process.env['VSCODE_NLS_CONFIG']; - if (rawNlsConfig) { - try { - const nlsConfig = JSON.parse(rawNlsConfig); - const resolved = nlsConfig.availableLanguages['*']; - _locale = nlsConfig.locale; - // VSCode's default language is 'en' - _language = resolved ? resolved : LANGUAGE_DEFAULT; - _translationsConfigFile = nlsConfig._translationsConfigFile; - } - catch (e) { - } - } - _isNative = true; -} -let _platform = 0 /* Web */; -if (_isMacintosh) { - _platform = 1 /* Mac */; -} -else if (_isWindows) { - _platform = 3 /* Windows */; -} -else if (_isLinux) { - _platform = 2 /* Linux */; -} -const isWindows = _isWindows; -const isMacintosh = _isMacintosh; -const isLinux = _isLinux; -const isNative = _isNative; -const isWeb = _isWeb; -const isIOS = _isIOS; -const _globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {}); -const globals = _globals; -const setImmediate = (function defineSetImmediate() { - if (globals.setImmediate) { - return globals.setImmediate.bind(globals); - } - if (typeof globals.postMessage === 'function' && !globals.importScripts) { - let pending = []; - globals.addEventListener('message', (e) => { - if (e.data && e.data.vscodeSetImmediateId) { - for (let i = 0, len = pending.length; i < len; i++) { - const candidate = pending[i]; - if (candidate.id === e.data.vscodeSetImmediateId) { - pending.splice(i, 1); - candidate.callback(); - return; - } - } - } - }); - let lastId = 0; - return (callback) => { - const myId = ++lastId; - pending.push({ - id: myId, - callback: callback - }); - globals.postMessage({ vscodeSetImmediateId: myId }, '*'); - }; - } - if (typeof process !== 'undefined' && typeof process.nextTick === 'function') { - return process.nextTick.bind(process); - } - const _promise = Promise.resolve(); - return (callback) => _promise.then(callback); -})(); -const OS = (_isMacintosh || _isIOS ? 2 /* Macintosh */ : (_isWindows ? 1 /* Windows */ : 3 /* Linux */)); -let _isLittleEndian = true; -let _isLittleEndianComputed = false; -function isLittleEndian() { - if (!_isLittleEndianComputed) { - _isLittleEndianComputed = true; - const test = new Uint8Array(2); - test[0] = 1; - test[1] = 2; - const view = new Uint16Array(test.buffer); - _isLittleEndian = (view[0] === (2 << 8) + 1); - } - return _isLittleEndian; -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/process.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/process.js ***! - \******************************************************************/ -/*! exports provided: cwd, env, platform */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cwd", function() { return cwd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "env", function() { return env; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platform", function() { return platform; }); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const safeProcess = (typeof process === 'undefined') ? { - cwd() { return '/'; }, - env: Object.create(null), - get platform() { return _platform_js__WEBPACK_IMPORTED_MODULE_0__["isWindows"] ? 'win32' : _platform_js__WEBPACK_IMPORTED_MODULE_0__["isMacintosh"] ? 'darwin' : 'linux'; }, - nextTick(callback) { return Object(_platform_js__WEBPACK_IMPORTED_MODULE_0__["setImmediate"])(callback); } -} : process; -const cwd = safeProcess.cwd; -const env = safeProcess.env; -const platform = safeProcess.platform; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../process/browser.js */ "./node_modules/process/browser.js"))) - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/range.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/range.js ***! - \****************************************************************/ -/*! exports provided: Range */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var Range; -(function (Range) { - /** - * Returns the intersection between two ranges as a range itself. - * Returns `{ start: 0, end: 0 }` if the intersection is empty. - */ - function intersect(one, other) { - if (one.start >= other.end || other.start >= one.end) { - return { start: 0, end: 0 }; - } - const start = Math.max(one.start, other.start); - const end = Math.min(one.end, other.end); - if (end - start <= 0) { - return { start: 0, end: 0 }; - } - return { start, end }; - } - Range.intersect = intersect; - function isEmpty(range) { - return range.end - range.start <= 0; - } - Range.isEmpty = isEmpty; - function intersects(one, other) { - return !isEmpty(intersect(one, other)); - } - Range.intersects = intersects; - function relativeComplement(one, other) { - const result = []; - const first = { start: one.start, end: Math.min(other.start, one.end) }; - const second = { start: Math.max(other.end, one.start), end: one.end }; - if (!isEmpty(first)) { - result.push(first); - } - if (!isEmpty(second)) { - result.push(second); - } - return result; - } - Range.relativeComplement = relativeComplement; -})(Range || (Range = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/resources.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/resources.js ***! - \********************************************************************/ -/*! exports provided: originalFSPath, ExtUri, extUri, isEqual, basenameOrAuthority, basename, dirname, joinPath, normalizePath, relativePath, resolvePath, isEqualAuthority, DataUri */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "originalFSPath", function() { return originalFSPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExtUri", function() { return ExtUri; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extUri", function() { return extUri; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return isEqual; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basenameOrAuthority", function() { return basenameOrAuthority; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basename", function() { return basename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dirname", function() { return dirname; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "joinPath", function() { return joinPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizePath", function() { return normalizePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relativePath", function() { return relativePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolvePath", function() { return resolvePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEqualAuthority", function() { return isEqualAuthority; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataUri", function() { return DataUri; }); -/* harmony import */ var _extpath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./extpath.js */ "./node_modules/monaco-editor/esm/vs/base/common/extpath.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _network_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -function originalFSPath(uri) { - return Object(_uri_js__WEBPACK_IMPORTED_MODULE_2__["uriToFsPath"])(uri, true); -} -class ExtUri { - constructor(_ignorePathCasing) { - this._ignorePathCasing = _ignorePathCasing; - } - compare(uri1, uri2, ignoreFragment = false) { - if (uri1 === uri2) { - return 0; - } - return Object(_strings_js__WEBPACK_IMPORTED_MODULE_3__["compare"])(this.getComparisonKey(uri1, ignoreFragment), this.getComparisonKey(uri2, ignoreFragment)); - } - isEqual(uri1, uri2, ignoreFragment = false) { - if (uri1 === uri2) { - return true; - } - if (!uri1 || !uri2) { - return false; - } - return this.getComparisonKey(uri1, ignoreFragment) === this.getComparisonKey(uri2, ignoreFragment); - } - getComparisonKey(uri, ignoreFragment = false) { - return uri.with({ - path: this._ignorePathCasing(uri) ? uri.path.toLowerCase() : undefined, - fragment: ignoreFragment ? null : undefined - }).toString(); - } - // --- path math - joinPath(resource, ...pathFragment) { - return _uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].joinPath(resource, ...pathFragment); - } - basenameOrAuthority(resource) { - return basename(resource) || resource.authority; - } - basename(resource) { - return _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].basename(resource.path); - } - dirname(resource) { - if (resource.path.length === 0) { - return resource; - } - let dirname; - if (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__["Schemas"].file) { - dirname = _uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].file(_path_js__WEBPACK_IMPORTED_MODULE_1__["dirname"](originalFSPath(resource))).path; - } - else { - dirname = _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].dirname(resource.path); - if (resource.authority && dirname.length && dirname.charCodeAt(0) !== 47 /* Slash */) { - console.error(`dirname("${resource.toString})) resulted in a relative path`); - dirname = '/'; // If a URI contains an authority component, then the path component must either be empty or begin with a CharCode.Slash ("/") character - } - } - return resource.with({ - path: dirname - }); - } - normalizePath(resource) { - if (!resource.path.length) { - return resource; - } - let normalizedPath; - if (resource.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__["Schemas"].file) { - normalizedPath = _uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].file(_path_js__WEBPACK_IMPORTED_MODULE_1__["normalize"](originalFSPath(resource))).path; - } - else { - normalizedPath = _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].normalize(resource.path); - } - return resource.with({ - path: normalizedPath - }); - } - relativePath(from, to) { - if (from.scheme !== to.scheme || !isEqualAuthority(from.authority, to.authority)) { - return undefined; - } - if (from.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__["Schemas"].file) { - const relativePath = _path_js__WEBPACK_IMPORTED_MODULE_1__["relative"](originalFSPath(from), originalFSPath(to)); - return _platform_js__WEBPACK_IMPORTED_MODULE_5__["isWindows"] ? _extpath_js__WEBPACK_IMPORTED_MODULE_0__["toSlashes"](relativePath) : relativePath; - } - let fromPath = from.path || '/', toPath = to.path || '/'; - if (this._ignorePathCasing(from)) { - // make casing of fromPath match toPath - let i = 0; - for (const len = Math.min(fromPath.length, toPath.length); i < len; i++) { - if (fromPath.charCodeAt(i) !== toPath.charCodeAt(i)) { - if (fromPath.charAt(i).toLowerCase() !== toPath.charAt(i).toLowerCase()) { - break; - } - } - } - fromPath = toPath.substr(0, i) + fromPath.substr(i); - } - return _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].relative(fromPath, toPath); - } - resolvePath(base, path) { - if (base.scheme === _network_js__WEBPACK_IMPORTED_MODULE_4__["Schemas"].file) { - const newURI = _uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].file(_path_js__WEBPACK_IMPORTED_MODULE_1__["resolve"](originalFSPath(base), path)); - return base.with({ - authority: newURI.authority, - path: newURI.path - }); - } - if (path.indexOf('/') === -1) { // no slashes? it's likely a Windows path - path = _extpath_js__WEBPACK_IMPORTED_MODULE_0__["toSlashes"](path); - if (/^[a-zA-Z]:(\/|$)/.test(path)) { // starts with a drive letter - path = '/' + path; - } - } - return base.with({ - path: _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].resolve(base.path, path) - }); - } - isEqualAuthority(a1, a2) { - return a1 === a2 || Object(_strings_js__WEBPACK_IMPORTED_MODULE_3__["equalsIgnoreCase"])(a1, a2); - } -} -/** - * Unbiased utility that takes uris "as they are". This means it can be interchanged with - * uri#toString() usages. The following is true - * ``` - * assertEqual(aUri.toString() === bUri.toString(), exturi.isEqual(aUri, bUri)) - * ``` - */ -const extUri = new ExtUri(() => false); -const isEqual = extUri.isEqual.bind(extUri); -const basenameOrAuthority = extUri.basenameOrAuthority.bind(extUri); -const basename = extUri.basename.bind(extUri); -const dirname = extUri.dirname.bind(extUri); -const joinPath = extUri.joinPath.bind(extUri); -const normalizePath = extUri.normalizePath.bind(extUri); -const relativePath = extUri.relativePath.bind(extUri); -const resolvePath = extUri.resolvePath.bind(extUri); -const isEqualAuthority = extUri.isEqualAuthority.bind(extUri); -/** - * Data URI related helpers. - */ -var DataUri; -(function (DataUri) { - DataUri.META_DATA_LABEL = 'label'; - DataUri.META_DATA_DESCRIPTION = 'description'; - DataUri.META_DATA_SIZE = 'size'; - DataUri.META_DATA_MIME = 'mime'; - function parseMetaData(dataUri) { - const metadata = new Map(); - // Given a URI of: data:image/png;size:2313;label:SomeLabel;description:SomeDescription;base64,77+9UE5... - // the metadata is: size:2313;label:SomeLabel;description:SomeDescription - const meta = dataUri.path.substring(dataUri.path.indexOf(';') + 1, dataUri.path.lastIndexOf(';')); - meta.split(';').forEach(property => { - const [key, value] = property.split(':'); - if (key && value) { - metadata.set(key, value); - } - }); - // Given a URI of: data:image/png;size:2313;label:SomeLabel;description:SomeDescription;base64,77+9UE5... - // the mime is: image/png - const mime = dataUri.path.substring(0, dataUri.path.indexOf(';')); - if (mime) { - metadata.set(DataUri.META_DATA_MIME, mime); - } - return metadata; - } - DataUri.parseMetaData = parseMetaData; -})(DataUri || (DataUri = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/scrollable.js ***! - \*********************************************************************/ -/*! exports provided: ScrollState, Scrollable, SmoothScrollingUpdate, SmoothScrollingOperation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollState", function() { return ScrollState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scrollable", function() { return Scrollable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmoothScrollingUpdate", function() { return SmoothScrollingUpdate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmoothScrollingOperation", function() { return SmoothScrollingOperation; }); -/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class ScrollState { - constructor(width, scrollWidth, scrollLeft, height, scrollHeight, scrollTop) { - width = width | 0; - scrollWidth = scrollWidth | 0; - scrollLeft = scrollLeft | 0; - height = height | 0; - scrollHeight = scrollHeight | 0; - scrollTop = scrollTop | 0; - this.rawScrollLeft = scrollLeft; // before validation - this.rawScrollTop = scrollTop; // before validation - if (width < 0) { - width = 0; - } - if (scrollLeft + width > scrollWidth) { - scrollLeft = scrollWidth - width; - } - if (scrollLeft < 0) { - scrollLeft = 0; - } - if (height < 0) { - height = 0; - } - if (scrollTop + height > scrollHeight) { - scrollTop = scrollHeight - height; - } - if (scrollTop < 0) { - scrollTop = 0; - } - this.width = width; - this.scrollWidth = scrollWidth; - this.scrollLeft = scrollLeft; - this.height = height; - this.scrollHeight = scrollHeight; - this.scrollTop = scrollTop; - } - equals(other) { - return (this.rawScrollLeft === other.rawScrollLeft - && this.rawScrollTop === other.rawScrollTop - && this.width === other.width - && this.scrollWidth === other.scrollWidth - && this.scrollLeft === other.scrollLeft - && this.height === other.height - && this.scrollHeight === other.scrollHeight - && this.scrollTop === other.scrollTop); - } - withScrollDimensions(update, useRawScrollPositions) { - return new ScrollState((typeof update.width !== 'undefined' ? update.width : this.width), (typeof update.scrollWidth !== 'undefined' ? update.scrollWidth : this.scrollWidth), useRawScrollPositions ? this.rawScrollLeft : this.scrollLeft, (typeof update.height !== 'undefined' ? update.height : this.height), (typeof update.scrollHeight !== 'undefined' ? update.scrollHeight : this.scrollHeight), useRawScrollPositions ? this.rawScrollTop : this.scrollTop); - } - withScrollPosition(update) { - return new ScrollState(this.width, this.scrollWidth, (typeof update.scrollLeft !== 'undefined' ? update.scrollLeft : this.rawScrollLeft), this.height, this.scrollHeight, (typeof update.scrollTop !== 'undefined' ? update.scrollTop : this.rawScrollTop)); - } - createScrollEvent(previous) { - const widthChanged = (this.width !== previous.width); - const scrollWidthChanged = (this.scrollWidth !== previous.scrollWidth); - const scrollLeftChanged = (this.scrollLeft !== previous.scrollLeft); - const heightChanged = (this.height !== previous.height); - const scrollHeightChanged = (this.scrollHeight !== previous.scrollHeight); - const scrollTopChanged = (this.scrollTop !== previous.scrollTop); - return { - oldWidth: previous.width, - oldScrollWidth: previous.scrollWidth, - oldScrollLeft: previous.scrollLeft, - width: this.width, - scrollWidth: this.scrollWidth, - scrollLeft: this.scrollLeft, - oldHeight: previous.height, - oldScrollHeight: previous.scrollHeight, - oldScrollTop: previous.scrollTop, - height: this.height, - scrollHeight: this.scrollHeight, - scrollTop: this.scrollTop, - widthChanged: widthChanged, - scrollWidthChanged: scrollWidthChanged, - scrollLeftChanged: scrollLeftChanged, - heightChanged: heightChanged, - scrollHeightChanged: scrollHeightChanged, - scrollTopChanged: scrollTopChanged, - }; - } -} -class Scrollable extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(smoothScrollDuration, scheduleAtNextAnimationFrame) { - super(); - this._onScroll = this._register(new _event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onScroll = this._onScroll.event; - this._smoothScrollDuration = smoothScrollDuration; - this._scheduleAtNextAnimationFrame = scheduleAtNextAnimationFrame; - this._state = new ScrollState(0, 0, 0, 0, 0, 0); - this._smoothScrolling = null; - } - dispose() { - if (this._smoothScrolling) { - this._smoothScrolling.dispose(); - this._smoothScrolling = null; - } - super.dispose(); - } - setSmoothScrollDuration(smoothScrollDuration) { - this._smoothScrollDuration = smoothScrollDuration; - } - validateScrollPosition(scrollPosition) { - return this._state.withScrollPosition(scrollPosition); - } - getScrollDimensions() { - return this._state; - } - setScrollDimensions(dimensions, useRawScrollPositions) { - const newState = this._state.withScrollDimensions(dimensions, useRawScrollPositions); - this._setState(newState); - // Validate outstanding animated scroll position target - if (this._smoothScrolling) { - this._smoothScrolling.acceptScrollDimensions(this._state); - } - } - /** - * Returns the final scroll position that the instance will have once the smooth scroll animation concludes. - * If no scroll animation is occurring, it will return the current scroll position instead. - */ - getFutureScrollPosition() { - if (this._smoothScrolling) { - return this._smoothScrolling.to; - } - return this._state; - } - /** - * Returns the current scroll position. - * Note: This result might be an intermediate scroll position, as there might be an ongoing smooth scroll animation. - */ - getCurrentScrollPosition() { - return this._state; - } - setScrollPositionNow(update) { - // no smooth scrolling requested - const newState = this._state.withScrollPosition(update); - // Terminate any outstanding smooth scrolling - if (this._smoothScrolling) { - this._smoothScrolling.dispose(); - this._smoothScrolling = null; - } - this._setState(newState); - } - setScrollPositionSmooth(update) { - if (this._smoothScrollDuration === 0) { - // Smooth scrolling not supported. - return this.setScrollPositionNow(update); - } - if (this._smoothScrolling) { - // Combine our pending scrollLeft/scrollTop with incoming scrollLeft/scrollTop - update = { - scrollLeft: (typeof update.scrollLeft === 'undefined' ? this._smoothScrolling.to.scrollLeft : update.scrollLeft), - scrollTop: (typeof update.scrollTop === 'undefined' ? this._smoothScrolling.to.scrollTop : update.scrollTop) - }; - // Validate `update` - const validTarget = this._state.withScrollPosition(update); - if (this._smoothScrolling.to.scrollLeft === validTarget.scrollLeft && this._smoothScrolling.to.scrollTop === validTarget.scrollTop) { - // No need to interrupt or extend the current animation since we're going to the same place - return; - } - const newSmoothScrolling = this._smoothScrolling.combine(this._state, validTarget, this._smoothScrollDuration); - this._smoothScrolling.dispose(); - this._smoothScrolling = newSmoothScrolling; - } - else { - // Validate `update` - const validTarget = this._state.withScrollPosition(update); - this._smoothScrolling = SmoothScrollingOperation.start(this._state, validTarget, this._smoothScrollDuration); - } - // Begin smooth scrolling animation - this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => { - if (!this._smoothScrolling) { - return; - } - this._smoothScrolling.animationFrameDisposable = null; - this._performSmoothScrolling(); - }); - } - _performSmoothScrolling() { - if (!this._smoothScrolling) { - return; - } - const update = this._smoothScrolling.tick(); - const newState = this._state.withScrollPosition(update); - this._setState(newState); - if (!this._smoothScrolling) { - // Looks like someone canceled the smooth scrolling - // from the scroll event handler - return; - } - if (update.isDone) { - this._smoothScrolling.dispose(); - this._smoothScrolling = null; - return; - } - // Continue smooth scrolling animation - this._smoothScrolling.animationFrameDisposable = this._scheduleAtNextAnimationFrame(() => { - if (!this._smoothScrolling) { - return; - } - this._smoothScrolling.animationFrameDisposable = null; - this._performSmoothScrolling(); - }); - } - _setState(newState) { - const oldState = this._state; - if (oldState.equals(newState)) { - // no change - return; - } - this._state = newState; - this._onScroll.fire(this._state.createScrollEvent(oldState)); - } -} -class SmoothScrollingUpdate { - constructor(scrollLeft, scrollTop, isDone) { - this.scrollLeft = scrollLeft; - this.scrollTop = scrollTop; - this.isDone = isDone; - } -} -function createEaseOutCubic(from, to) { - const delta = to - from; - return function (completion) { - return from + delta * easeOutCubic(completion); - }; -} -function createComposed(a, b, cut) { - return function (completion) { - if (completion < cut) { - return a(completion / cut); - } - return b((completion - cut) / (1 - cut)); - }; -} -class SmoothScrollingOperation { - constructor(from, to, startTime, duration) { - this.from = from; - this.to = to; - this.duration = duration; - this._startTime = startTime; - this.animationFrameDisposable = null; - this._initAnimations(); - } - _initAnimations() { - this.scrollLeft = this._initAnimation(this.from.scrollLeft, this.to.scrollLeft, this.to.width); - this.scrollTop = this._initAnimation(this.from.scrollTop, this.to.scrollTop, this.to.height); - } - _initAnimation(from, to, viewportSize) { - const delta = Math.abs(from - to); - if (delta > 2.5 * viewportSize) { - let stop1, stop2; - if (from < to) { - // scroll to 75% of the viewportSize - stop1 = from + 0.75 * viewportSize; - stop2 = to - 0.75 * viewportSize; - } - else { - stop1 = from - 0.75 * viewportSize; - stop2 = to + 0.75 * viewportSize; - } - return createComposed(createEaseOutCubic(from, stop1), createEaseOutCubic(stop2, to), 0.33); - } - return createEaseOutCubic(from, to); - } - dispose() { - if (this.animationFrameDisposable !== null) { - this.animationFrameDisposable.dispose(); - this.animationFrameDisposable = null; - } - } - acceptScrollDimensions(state) { - this.to = state.withScrollPosition(this.to); - this._initAnimations(); - } - tick() { - return this._tick(Date.now()); - } - _tick(now) { - const completion = (now - this._startTime) / this.duration; - if (completion < 1) { - const newScrollLeft = this.scrollLeft(completion); - const newScrollTop = this.scrollTop(completion); - return new SmoothScrollingUpdate(newScrollLeft, newScrollTop, false); - } - return new SmoothScrollingUpdate(this.to.scrollLeft, this.to.scrollTop, true); - } - combine(from, to, duration) { - return SmoothScrollingOperation.start(from, to, duration); - } - static start(from, to, duration) { - // +10 / -10 : pretend the animation already started for a quicker response to a scroll request - duration = duration + 10; - const startTime = Date.now() - 10; - return new SmoothScrollingOperation(from, to, startTime, duration); - } -} -function easeInCubic(t) { - return Math.pow(t, 3); -} -function easeOutCubic(t) { - return 1 - easeInCubic(1 - t); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/search.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/search.js ***! - \*****************************************************************/ -/*! exports provided: buildReplaceStringWithCasePreserved */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildReplaceStringWithCasePreserved", function() { return buildReplaceStringWithCasePreserved; }); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -function buildReplaceStringWithCasePreserved(matches, pattern) { - if (matches && (matches[0] !== '')) { - const containsHyphens = validateSpecificSpecialCharacter(matches, pattern, '-'); - const containsUnderscores = validateSpecificSpecialCharacter(matches, pattern, '_'); - if (containsHyphens && !containsUnderscores) { - return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '-'); - } - else if (!containsHyphens && containsUnderscores) { - return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '_'); - } - if (matches[0].toUpperCase() === matches[0]) { - return pattern.toUpperCase(); - } - else if (matches[0].toLowerCase() === matches[0]) { - return pattern.toLowerCase(); - } - else if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsUppercaseCharacter"](matches[0][0]) && pattern.length > 0) { - return pattern[0].toUpperCase() + pattern.substr(1); - } - else { - // we don't understand its pattern yet. - return pattern; - } - } - else { - return pattern; - } -} -function validateSpecificSpecialCharacter(matches, pattern, specialCharacter) { - const doesContainSpecialCharacter = matches[0].indexOf(specialCharacter) !== -1 && pattern.indexOf(specialCharacter) !== -1; - return doesContainSpecialCharacter && matches[0].split(specialCharacter).length === pattern.split(specialCharacter).length; -} -function buildReplaceStringForSpecificSpecialCharacter(matches, pattern, specialCharacter) { - const splitPatternAtSpecialCharacter = pattern.split(specialCharacter); - const splitMatchAtSpecialCharacter = matches[0].split(specialCharacter); - let replaceString = ''; - splitPatternAtSpecialCharacter.forEach((splitValue, index) => { - replaceString += buildReplaceStringWithCasePreserved([splitMatchAtSpecialCharacter[index]], splitValue) + specialCharacter; - }); - return replaceString.slice(0, -1); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/severity.js": -/*!*******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/severity.js ***! - \*******************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var Severity; -(function (Severity) { - Severity[Severity["Ignore"] = 0] = "Ignore"; - Severity[Severity["Info"] = 1] = "Info"; - Severity[Severity["Warning"] = 2] = "Warning"; - Severity[Severity["Error"] = 3] = "Error"; -})(Severity || (Severity = {})); -(function (Severity) { - const _error = 'error'; - const _warning = 'warning'; - const _warn = 'warn'; - const _info = 'info'; - /** - * Parses 'error', 'warning', 'warn', 'info' in call casings - * and falls back to ignore. - */ - function fromValue(value) { - if (!value) { - return Severity.Ignore; - } - if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["equalsIgnoreCase"](_error, value)) { - return Severity.Error; - } - if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["equalsIgnoreCase"](_warning, value) || _strings_js__WEBPACK_IMPORTED_MODULE_0__["equalsIgnoreCase"](_warn, value)) { - return Severity.Warning; - } - if (_strings_js__WEBPACK_IMPORTED_MODULE_0__["equalsIgnoreCase"](_info, value)) { - return Severity.Info; - } - return Severity.Ignore; - } - Severity.fromValue = fromValue; -})(Severity || (Severity = {})); -/* harmony default export */ __webpack_exports__["default"] = (Severity); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js": -/*!********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js ***! - \********************************************************************/ -/*! exports provided: StopWatch */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StopWatch", function() { return StopWatch; }); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const hasPerformanceNow = (_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].performance && typeof _platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].performance.now === 'function'); -class StopWatch { - constructor(highResolution) { - this._highResolution = hasPerformanceNow && highResolution; - this._startTime = this._now(); - this._stopTime = -1; - } - static create(highResolution = true) { - return new StopWatch(highResolution); - } - stop() { - this._stopTime = this._now(); - } - elapsed() { - if (this._stopTime !== -1) { - return this._stopTime - this._startTime; - } - return this._now() - this._startTime; - } - _now() { - return this._highResolution ? _platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].performance.now() : new Date().getTime(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/strings.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/strings.js ***! - \******************************************************************/ -/*! exports provided: isFalsyOrWhitespace, pad, format, escape, escapeRegExpCharacters, trim, ltrim, rtrim, convertSimple2RegExpPattern, stripWildcards, startsWith, endsWith, createRegExp, regExpLeadsToEndlessLoop, regExpFlags, firstNonWhitespaceIndex, getLeadingWhitespace, lastNonWhitespaceIndex, compare, compareSubstring, compareIgnoreCase, compareSubstringIgnoreCase, isLowerAsciiLetter, isUpperAsciiLetter, equalsIgnoreCase, startsWithIgnoreCase, commonPrefixLength, commonSuffixLength, isHighSurrogate, isLowSurrogate, computeCodePoint, getNextCodePoint, nextCharLength, prevCharLength, decodeUTF8, containsRTL, containsEmoji, isBasicASCII, UNUSUAL_LINE_TERMINATORS, containsUnusualLineTerminators, containsFullWidthCharacter, isFullWidthCharacter, isEmojiImprecise, UTF8_BOM_CHARACTER, startsWithUTF8BOM, containsUppercaseCharacter, singleLetterHash, getGraphemeBreakType, breakBetweenGraphemeBreakType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFalsyOrWhitespace", function() { return isFalsyOrWhitespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pad", function() { return pad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escape", function() { return escape; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeRegExpCharacters", function() { return escapeRegExpCharacters; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trim", function() { return trim; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ltrim", function() { return ltrim; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rtrim", function() { return rtrim; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertSimple2RegExpPattern", function() { return convertSimple2RegExpPattern; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripWildcards", function() { return stripWildcards; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRegExp", function() { return createRegExp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regExpLeadsToEndlessLoop", function() { return regExpLeadsToEndlessLoop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regExpFlags", function() { return regExpFlags; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstNonWhitespaceIndex", function() { return firstNonWhitespaceIndex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLeadingWhitespace", function() { return getLeadingWhitespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lastNonWhitespaceIndex", function() { return lastNonWhitespaceIndex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compare", function() { return compare; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareSubstring", function() { return compareSubstring; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareIgnoreCase", function() { return compareIgnoreCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareSubstringIgnoreCase", function() { return compareSubstringIgnoreCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLowerAsciiLetter", function() { return isLowerAsciiLetter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUpperAsciiLetter", function() { return isUpperAsciiLetter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalsIgnoreCase", function() { return equalsIgnoreCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWithIgnoreCase", function() { return startsWithIgnoreCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commonPrefixLength", function() { return commonPrefixLength; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commonSuffixLength", function() { return commonSuffixLength; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHighSurrogate", function() { return isHighSurrogate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLowSurrogate", function() { return isLowSurrogate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeCodePoint", function() { return computeCodePoint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNextCodePoint", function() { return getNextCodePoint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nextCharLength", function() { return nextCharLength; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prevCharLength", function() { return prevCharLength; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeUTF8", function() { return decodeUTF8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsRTL", function() { return containsRTL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsEmoji", function() { return containsEmoji; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBasicASCII", function() { return isBasicASCII; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNUSUAL_LINE_TERMINATORS", function() { return UNUSUAL_LINE_TERMINATORS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsUnusualLineTerminators", function() { return containsUnusualLineTerminators; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsFullWidthCharacter", function() { return containsFullWidthCharacter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFullWidthCharacter", function() { return isFullWidthCharacter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmojiImprecise", function() { return isEmojiImprecise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UTF8_BOM_CHARACTER", function() { return UTF8_BOM_CHARACTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWithUTF8BOM", function() { return startsWithUTF8BOM; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsUppercaseCharacter", function() { return containsUppercaseCharacter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "singleLetterHash", function() { return singleLetterHash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGraphemeBreakType", function() { return getGraphemeBreakType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "breakBetweenGraphemeBreakType", function() { return breakBetweenGraphemeBreakType; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function isFalsyOrWhitespace(str) { - if (!str || typeof str !== 'string') { - return true; - } - return str.trim().length === 0; -} -/** - * @deprecated ES6: use `String.padStart` - */ -function pad(n, l, char = '0') { - const str = '' + n; - const r = [str]; - for (let i = str.length; i < l; i++) { - r.push(char); - } - return r.reverse().join(''); -} -const _formatRegexp = /{(\d+)}/g; -/** - * Helper to produce a string with a variable number of arguments. Insert variable segments - * into the string using the {n} notation where N is the index of the argument following the string. - * @param value string to which formatting is applied - * @param args replacements for {n}-entries - */ -function format(value, ...args) { - if (args.length === 0) { - return value; - } - return value.replace(_formatRegexp, function (match, group) { - const idx = parseInt(group, 10); - return isNaN(idx) || idx < 0 || idx >= args.length ? - match : - args[idx]; - }); -} -/** - * Converts HTML characters inside the string to use entities instead. Makes the string safe from - * being used e.g. in HTMLElement.innerHTML. - */ -function escape(html) { - return html.replace(/[<>&]/g, function (match) { - switch (match) { - case '<': return '<'; - case '>': return '>'; - case '&': return '&'; - default: return match; - } - }); -} -/** - * Escapes regular expression characters in a given string - */ -function escapeRegExpCharacters(value) { - return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, '\\$&'); -} -/** - * Removes all occurrences of needle from the beginning and end of haystack. - * @param haystack string to trim - * @param needle the thing to trim (default is a blank) - */ -function trim(haystack, needle = ' ') { - const trimmed = ltrim(haystack, needle); - return rtrim(trimmed, needle); -} -/** - * Removes all occurrences of needle from the beginning of haystack. - * @param haystack string to trim - * @param needle the thing to trim - */ -function ltrim(haystack, needle) { - if (!haystack || !needle) { - return haystack; - } - const needleLen = needle.length; - if (needleLen === 0 || haystack.length === 0) { - return haystack; - } - let offset = 0; - while (haystack.indexOf(needle, offset) === offset) { - offset = offset + needleLen; - } - return haystack.substring(offset); -} -/** - * Removes all occurrences of needle from the end of haystack. - * @param haystack string to trim - * @param needle the thing to trim - */ -function rtrim(haystack, needle) { - if (!haystack || !needle) { - return haystack; - } - const needleLen = needle.length, haystackLen = haystack.length; - if (needleLen === 0 || haystackLen === 0) { - return haystack; - } - let offset = haystackLen, idx = -1; - while (true) { - idx = haystack.lastIndexOf(needle, offset - 1); - if (idx === -1 || idx + needleLen !== offset) { - break; - } - if (idx === 0) { - return ''; - } - offset = idx; - } - return haystack.substring(0, offset); -} -function convertSimple2RegExpPattern(pattern) { - return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*'); -} -function stripWildcards(pattern) { - return pattern.replace(/\*/g, ''); -} -/** - * @deprecated ES6: use `String.startsWith` - */ -function startsWith(haystack, needle) { - if (haystack.length < needle.length) { - return false; - } - if (haystack === needle) { - return true; - } - for (let i = 0; i < needle.length; i++) { - if (haystack[i] !== needle[i]) { - return false; - } - } - return true; -} -/** - * @deprecated ES6: use `String.endsWith` - */ -function endsWith(haystack, needle) { - const diff = haystack.length - needle.length; - if (diff > 0) { - return haystack.indexOf(needle, diff) === diff; - } - else if (diff === 0) { - return haystack === needle; - } - else { - return false; - } -} -function createRegExp(searchString, isRegex, options = {}) { - if (!searchString) { - throw new Error('Cannot create regex from empty string'); - } - if (!isRegex) { - searchString = escapeRegExpCharacters(searchString); - } - if (options.wholeWord) { - if (!/\B/.test(searchString.charAt(0))) { - searchString = '\\b' + searchString; - } - if (!/\B/.test(searchString.charAt(searchString.length - 1))) { - searchString = searchString + '\\b'; - } - } - let modifiers = ''; - if (options.global) { - modifiers += 'g'; - } - if (!options.matchCase) { - modifiers += 'i'; - } - if (options.multiline) { - modifiers += 'm'; - } - if (options.unicode) { - modifiers += 'u'; - } - return new RegExp(searchString, modifiers); -} -function regExpLeadsToEndlessLoop(regexp) { - // Exit early if it's one of these special cases which are meant to match - // against an empty string - if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\s*$') { - return false; - } - // We check against an empty string. If the regular expression doesn't advance - // (e.g. ends in an endless loop) it will match an empty string. - const match = regexp.exec(''); - return !!(match && regexp.lastIndex === 0); -} -function regExpFlags(regexp) { - return (regexp.global ? 'g' : '') - + (regexp.ignoreCase ? 'i' : '') - + (regexp.multiline ? 'm' : '') - + (regexp /* standalone editor compilation */.unicode ? 'u' : ''); -} -/** - * Returns first index of the string that is not whitespace. - * If string is empty or contains only whitespaces, returns -1 - */ -function firstNonWhitespaceIndex(str) { - for (let i = 0, len = str.length; i < len; i++) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) { - return i; - } - } - return -1; -} -/** - * Returns the leading whitespace of the string. - * If the string contains only whitespaces, returns entire string - */ -function getLeadingWhitespace(str, start = 0, end = str.length) { - for (let i = start; i < end; i++) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) { - return str.substring(start, i); - } - } - return str.substring(start, end); -} -/** - * Returns last index of the string that is not whitespace. - * If string is empty or contains only whitespaces, returns -1 - */ -function lastNonWhitespaceIndex(str, startIndex = str.length - 1) { - for (let i = startIndex; i >= 0; i--) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 /* Space */ && chCode !== 9 /* Tab */) { - return i; - } - } - return -1; -} -function compare(a, b) { - if (a < b) { - return -1; - } - else if (a > b) { - return 1; - } - else { - return 0; - } -} -function compareSubstring(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) { - for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) { - let codeA = a.charCodeAt(aStart); - let codeB = b.charCodeAt(bStart); - if (codeA < codeB) { - return -1; - } - else if (codeA > codeB) { - return 1; - } - } - const aLen = aEnd - aStart; - const bLen = bEnd - bStart; - if (aLen < bLen) { - return -1; - } - else if (aLen > bLen) { - return 1; - } - return 0; -} -function compareIgnoreCase(a, b) { - return compareSubstringIgnoreCase(a, b, 0, a.length, 0, b.length); -} -function compareSubstringIgnoreCase(a, b, aStart = 0, aEnd = a.length, bStart = 0, bEnd = b.length) { - for (; aStart < aEnd && bStart < bEnd; aStart++, bStart++) { - let codeA = a.charCodeAt(aStart); - let codeB = b.charCodeAt(bStart); - if (codeA === codeB) { - // equal - continue; - } - const diff = codeA - codeB; - if (diff === 32 && isUpperAsciiLetter(codeB)) { //codeB =[65-90] && codeA =[97-122] - continue; - } - else if (diff === -32 && isUpperAsciiLetter(codeA)) { //codeB =[97-122] && codeA =[65-90] - continue; - } - if (isLowerAsciiLetter(codeA) && isLowerAsciiLetter(codeB)) { - // - return diff; - } - else { - return compareSubstring(a.toLowerCase(), b.toLowerCase(), aStart, aEnd, bStart, bEnd); - } - } - const aLen = aEnd - aStart; - const bLen = bEnd - bStart; - if (aLen < bLen) { - return -1; - } - else if (aLen > bLen) { - return 1; - } - return 0; -} -function isLowerAsciiLetter(code) { - return code >= 97 /* a */ && code <= 122 /* z */; -} -function isUpperAsciiLetter(code) { - return code >= 65 /* A */ && code <= 90 /* Z */; -} -function isAsciiLetter(code) { - return isLowerAsciiLetter(code) || isUpperAsciiLetter(code); -} -function equalsIgnoreCase(a, b) { - return a.length === b.length && doEqualsIgnoreCase(a, b); -} -function doEqualsIgnoreCase(a, b, stopAt = a.length) { - for (let i = 0; i < stopAt; i++) { - const codeA = a.charCodeAt(i); - const codeB = b.charCodeAt(i); - if (codeA === codeB) { - continue; - } - // a-z A-Z - if (isAsciiLetter(codeA) && isAsciiLetter(codeB)) { - const diff = Math.abs(codeA - codeB); - if (diff !== 0 && diff !== 32) { - return false; - } - } - // Any other charcode - else { - if (String.fromCharCode(codeA).toLowerCase() !== String.fromCharCode(codeB).toLowerCase()) { - return false; - } - } - } - return true; -} -function startsWithIgnoreCase(str, candidate) { - const candidateLength = candidate.length; - if (candidate.length > str.length) { - return false; - } - return doEqualsIgnoreCase(str, candidate, candidateLength); -} -/** - * @returns the length of the common prefix of the two strings. - */ -function commonPrefixLength(a, b) { - let i, len = Math.min(a.length, b.length); - for (i = 0; i < len; i++) { - if (a.charCodeAt(i) !== b.charCodeAt(i)) { - return i; - } - } - return len; -} -/** - * @returns the length of the common suffix of the two strings. - */ -function commonSuffixLength(a, b) { - let i, len = Math.min(a.length, b.length); - const aLastIndex = a.length - 1; - const bLastIndex = b.length - 1; - for (i = 0; i < len; i++) { - if (a.charCodeAt(aLastIndex - i) !== b.charCodeAt(bLastIndex - i)) { - return i; - } - } - return len; -} -/** - * See http://en.wikipedia.org/wiki/Surrogate_pair - */ -function isHighSurrogate(charCode) { - return (0xD800 <= charCode && charCode <= 0xDBFF); -} -/** - * See http://en.wikipedia.org/wiki/Surrogate_pair - */ -function isLowSurrogate(charCode) { - return (0xDC00 <= charCode && charCode <= 0xDFFF); -} -/** - * See http://en.wikipedia.org/wiki/Surrogate_pair - */ -function computeCodePoint(highSurrogate, lowSurrogate) { - return ((highSurrogate - 0xD800) << 10) + (lowSurrogate - 0xDC00) + 0x10000; -} -/** - * get the code point that begins at offset `offset` - */ -function getNextCodePoint(str, len, offset) { - const charCode = str.charCodeAt(offset); - if (isHighSurrogate(charCode) && offset + 1 < len) { - const nextCharCode = str.charCodeAt(offset + 1); - if (isLowSurrogate(nextCharCode)) { - return computeCodePoint(charCode, nextCharCode); - } - } - return charCode; -} -/** - * get the code point that ends right before offset `offset` - */ -function getPrevCodePoint(str, offset) { - const charCode = str.charCodeAt(offset - 1); - if (isLowSurrogate(charCode) && offset > 1) { - const prevCharCode = str.charCodeAt(offset - 2); - if (isHighSurrogate(prevCharCode)) { - return computeCodePoint(prevCharCode, charCode); - } - } - return charCode; -} -function nextCharLength(str, offset) { - const graphemeBreakTree = GraphemeBreakTree.getInstance(); - const initialOffset = offset; - const len = str.length; - const initialCodePoint = getNextCodePoint(str, len, offset); - offset += (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint); - while (offset < len) { - const nextCodePoint = getNextCodePoint(str, len, offset); - const nextGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(nextCodePoint); - if (breakBetweenGraphemeBreakType(graphemeBreakType, nextGraphemeBreakType)) { - break; - } - offset += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - graphemeBreakType = nextGraphemeBreakType; - } - return (offset - initialOffset); -} -function prevCharLength(str, offset) { - const graphemeBreakTree = GraphemeBreakTree.getInstance(); - const initialOffset = offset; - const initialCodePoint = getPrevCodePoint(str, offset); - offset -= (initialCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - let graphemeBreakType = graphemeBreakTree.getGraphemeBreakType(initialCodePoint); - while (offset > 0) { - const prevCodePoint = getPrevCodePoint(str, offset); - const prevGraphemeBreakType = graphemeBreakTree.getGraphemeBreakType(prevCodePoint); - if (breakBetweenGraphemeBreakType(prevGraphemeBreakType, graphemeBreakType)) { - break; - } - offset -= (prevCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - graphemeBreakType = prevGraphemeBreakType; - } - return (initialOffset - offset); -} -/** - * A manual decoding of a UTF8 string. - * Use only in environments which do not offer native conversion methods! - */ -function decodeUTF8(buffer) { - // https://en.wikipedia.org/wiki/UTF-8 - const len = buffer.byteLength; - const result = []; - let offset = 0; - while (offset < len) { - const v0 = buffer[offset]; - let codePoint; - if (v0 >= 0b11110000 && offset + 3 < len) { - // 4 bytes - codePoint = ((((buffer[offset++] & 0b00000111) << 18) >>> 0) - | (((buffer[offset++] & 0b00111111) << 12) >>> 0) - | (((buffer[offset++] & 0b00111111) << 6) >>> 0) - | (((buffer[offset++] & 0b00111111) << 0) >>> 0)); - } - else if (v0 >= 0b11100000 && offset + 2 < len) { - // 3 bytes - codePoint = ((((buffer[offset++] & 0b00001111) << 12) >>> 0) - | (((buffer[offset++] & 0b00111111) << 6) >>> 0) - | (((buffer[offset++] & 0b00111111) << 0) >>> 0)); - } - else if (v0 >= 0b11000000 && offset + 1 < len) { - // 2 bytes - codePoint = ((((buffer[offset++] & 0b00011111) << 6) >>> 0) - | (((buffer[offset++] & 0b00111111) << 0) >>> 0)); - } - else { - // 1 byte - codePoint = buffer[offset++]; - } - if ((codePoint >= 0 && codePoint <= 0xD7FF) || (codePoint >= 0xE000 && codePoint <= 0xFFFF)) { - // Basic Multilingual Plane - result.push(String.fromCharCode(codePoint)); - } - else if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { - // Supplementary Planes - const uPrime = codePoint - 0x10000; - const w1 = 0xD800 + ((uPrime & 0b11111111110000000000) >>> 10); - const w2 = 0xDC00 + ((uPrime & 0b00000000001111111111) >>> 0); - result.push(String.fromCharCode(w1)); - result.push(String.fromCharCode(w2)); - } - else { - // illegal code point - result.push(String.fromCharCode(0xFFFD)); - } - } - return result.join(''); -} -/** - * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-rtl-test.js - */ -const CONTAINS_RTL = /(?:[\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])/; -/** - * Returns true if `str` contains any Unicode character that is classified as "R" or "AL". - */ -function containsRTL(str) { - return CONTAINS_RTL.test(str); -} -/** - * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-emoji-test.js - */ -const CONTAINS_EMOJI = /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/; -function containsEmoji(str) { - return CONTAINS_EMOJI.test(str); -} -const IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; -/** - * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \n, \r, \t - */ -function isBasicASCII(str) { - return IS_BASIC_ASCII.test(str); -} -const UNUSUAL_LINE_TERMINATORS = /[\u2028\u2029]/; // LINE SEPARATOR (LS) or PARAGRAPH SEPARATOR (PS) -/** - * Returns true if `str` contains unusual line terminators, like LS or PS - */ -function containsUnusualLineTerminators(str) { - return UNUSUAL_LINE_TERMINATORS.test(str); -} -function containsFullWidthCharacter(str) { - for (let i = 0, len = str.length; i < len; i++) { - if (isFullWidthCharacter(str.charCodeAt(i))) { - return true; - } - } - return false; -} -function isFullWidthCharacter(charCode) { - // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns - // http://jrgraphix.net/research/unicode_blocks.php - // 2E80 — 2EFF CJK Radicals Supplement - // 2F00 — 2FDF Kangxi Radicals - // 2FF0 — 2FFF Ideographic Description Characters - // 3000 — 303F CJK Symbols and Punctuation - // 3040 — 309F Hiragana - // 30A0 — 30FF Katakana - // 3100 — 312F Bopomofo - // 3130 — 318F Hangul Compatibility Jamo - // 3190 — 319F Kanbun - // 31A0 — 31BF Bopomofo Extended - // 31F0 — 31FF Katakana Phonetic Extensions - // 3200 — 32FF Enclosed CJK Letters and Months - // 3300 — 33FF CJK Compatibility - // 3400 — 4DBF CJK Unified Ideographs Extension A - // 4DC0 — 4DFF Yijing Hexagram Symbols - // 4E00 — 9FFF CJK Unified Ideographs - // A000 — A48F Yi Syllables - // A490 — A4CF Yi Radicals - // AC00 — D7AF Hangul Syllables - // [IGNORE] D800 — DB7F High Surrogates - // [IGNORE] DB80 — DBFF High Private Use Surrogates - // [IGNORE] DC00 — DFFF Low Surrogates - // [IGNORE] E000 — F8FF Private Use Area - // F900 — FAFF CJK Compatibility Ideographs - // [IGNORE] FB00 — FB4F Alphabetic Presentation Forms - // [IGNORE] FB50 — FDFF Arabic Presentation Forms-A - // [IGNORE] FE00 — FE0F Variation Selectors - // [IGNORE] FE20 — FE2F Combining Half Marks - // [IGNORE] FE30 — FE4F CJK Compatibility Forms - // [IGNORE] FE50 — FE6F Small Form Variants - // [IGNORE] FE70 — FEFF Arabic Presentation Forms-B - // FF00 — FFEF Halfwidth and Fullwidth Forms - // [https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms] - // of which FF01 - FF5E fullwidth ASCII of 21 to 7E - // [IGNORE] and FF65 - FFDC halfwidth of Katakana and Hangul - // [IGNORE] FFF0 — FFFF Specials - charCode = +charCode; // @perf - return ((charCode >= 0x2E80 && charCode <= 0xD7AF) - || (charCode >= 0xF900 && charCode <= 0xFAFF) - || (charCode >= 0xFF01 && charCode <= 0xFF5E)); -} -/** - * A fast function (therefore imprecise) to check if code points are emojis. - * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-emoji-test.js - */ -function isEmojiImprecise(x) { - return ((x >= 0x1F1E6 && x <= 0x1F1FF) || (x >= 9728 && x <= 10175) || (x >= 127744 && x <= 128591) - || (x >= 128640 && x <= 128764) || (x >= 128992 && x <= 129003) || (x >= 129280 && x <= 129535) - || (x >= 129648 && x <= 129651) || (x >= 129656 && x <= 129666) || (x >= 129680 && x <= 129685)); -} -// -- UTF-8 BOM -const UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* UTF8_BOM */); -function startsWithUTF8BOM(str) { - return !!(str && str.length > 0 && str.charCodeAt(0) === 65279 /* UTF8_BOM */); -} -function containsUppercaseCharacter(target, ignoreEscapedChars = false) { - if (!target) { - return false; - } - if (ignoreEscapedChars) { - target = target.replace(/\\./g, ''); - } - return target.toLowerCase() !== target; -} -/** - * Produces 'a'-'z', followed by 'A'-'Z'... followed by 'a'-'z', etc. - */ -function singleLetterHash(n) { - const LETTERS_CNT = (90 /* Z */ - 65 /* A */ + 1); - n = n % (2 * LETTERS_CNT); - if (n < LETTERS_CNT) { - return String.fromCharCode(97 /* a */ + n); - } - return String.fromCharCode(65 /* A */ + n - LETTERS_CNT); -} -//#region Unicode Grapheme Break -function getGraphemeBreakType(codePoint) { - const graphemeBreakTree = GraphemeBreakTree.getInstance(); - return graphemeBreakTree.getGraphemeBreakType(codePoint); -} -function breakBetweenGraphemeBreakType(breakTypeA, breakTypeB) { - // http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundary_Rules - // !!! Let's make the common case a bit faster - if (breakTypeA === 0 /* Other */) { - // see https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest-13.0.0d10.html#table - return (breakTypeB !== 5 /* Extend */ && breakTypeB !== 7 /* SpacingMark */); - } - // Do not break between a CR and LF. Otherwise, break before and after controls. - // GB3 CR × LF - // GB4 (Control | CR | LF) ÷ - // GB5 ÷ (Control | CR | LF) - if (breakTypeA === 2 /* CR */) { - if (breakTypeB === 3 /* LF */) { - return false; // GB3 - } - } - if (breakTypeA === 4 /* Control */ || breakTypeA === 2 /* CR */ || breakTypeA === 3 /* LF */) { - return true; // GB4 - } - if (breakTypeB === 4 /* Control */ || breakTypeB === 2 /* CR */ || breakTypeB === 3 /* LF */) { - return true; // GB5 - } - // Do not break Hangul syllable sequences. - // GB6 L × (L | V | LV | LVT) - // GB7 (LV | V) × (V | T) - // GB8 (LVT | T) × T - if (breakTypeA === 8 /* L */) { - if (breakTypeB === 8 /* L */ || breakTypeB === 9 /* V */ || breakTypeB === 11 /* LV */ || breakTypeB === 12 /* LVT */) { - return false; // GB6 - } - } - if (breakTypeA === 11 /* LV */ || breakTypeA === 9 /* V */) { - if (breakTypeB === 9 /* V */ || breakTypeB === 10 /* T */) { - return false; // GB7 - } - } - if (breakTypeA === 12 /* LVT */ || breakTypeA === 10 /* T */) { - if (breakTypeB === 10 /* T */) { - return false; // GB8 - } - } - // Do not break before extending characters or ZWJ. - // GB9 × (Extend | ZWJ) - if (breakTypeB === 5 /* Extend */ || breakTypeB === 13 /* ZWJ */) { - return false; // GB9 - } - // The GB9a and GB9b rules only apply to extended grapheme clusters: - // Do not break before SpacingMarks, or after Prepend characters. - // GB9a × SpacingMark - // GB9b Prepend × - if (breakTypeB === 7 /* SpacingMark */) { - return false; // GB9a - } - if (breakTypeA === 1 /* Prepend */) { - return false; // GB9b - } - // Do not break within emoji modifier sequences or emoji zwj sequences. - // GB11 \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic} - if (breakTypeA === 13 /* ZWJ */ && breakTypeB === 14 /* Extended_Pictographic */) { - // Note: we are not implementing the rule entirely here to avoid introducing states - return false; // GB11 - } - // GB12 sot (RI RI)* RI × RI - // GB13 [^RI] (RI RI)* RI × RI - if (breakTypeA === 6 /* Regional_Indicator */ && breakTypeB === 6 /* Regional_Indicator */) { - // Note: we are not implementing the rule entirely here to avoid introducing states - return false; // GB12 & GB13 - } - // GB999 Any ÷ Any - return true; -} -class GraphemeBreakTree { - constructor() { - this._data = getGraphemeBreakRawData(); - } - static getInstance() { - if (!GraphemeBreakTree._INSTANCE) { - GraphemeBreakTree._INSTANCE = new GraphemeBreakTree(); - } - return GraphemeBreakTree._INSTANCE; - } - getGraphemeBreakType(codePoint) { - // !!! Let's make 7bit ASCII a bit faster: 0..31 - if (codePoint < 32) { - if (codePoint === 10 /* LineFeed */) { - return 3 /* LF */; - } - if (codePoint === 13 /* CarriageReturn */) { - return 2 /* CR */; - } - return 4 /* Control */; - } - // !!! Let's make 7bit ASCII a bit faster: 32..126 - if (codePoint < 127) { - return 0 /* Other */; - } - const data = this._data; - const nodeCount = data.length / 3; - let nodeIndex = 1; - while (nodeIndex <= nodeCount) { - if (codePoint < data[3 * nodeIndex]) { - // go left - nodeIndex = 2 * nodeIndex; - } - else if (codePoint > data[3 * nodeIndex + 1]) { - // go right - nodeIndex = 2 * nodeIndex + 1; - } - else { - // hit - return data[3 * nodeIndex + 2]; - } - } - return 0 /* Other */; - } -} -GraphemeBreakTree._INSTANCE = null; -function getGraphemeBreakRawData() { - // generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-grapheme-break.js - return JSON.parse('[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]'); -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/types.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/types.js ***! - \****************************************************************/ -/*! exports provided: isArray, isString, isObject, isNumber, isBoolean, isUndefined, isUndefinedOrNull, assertType, assertIsDefined, isFunction, validateConstraints, validateConstraint, getAllPropertyNames, getAllMethodNames, createProxyObject, withNullAsUndefined */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return isBoolean; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return isUndefined; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefinedOrNull", function() { return isUndefinedOrNull; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertType", function() { return assertType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertIsDefined", function() { return assertIsDefined; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateConstraints", function() { return validateConstraints; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateConstraint", function() { return validateConstraint; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllPropertyNames", function() { return getAllPropertyNames; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllMethodNames", function() { return getAllMethodNames; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createProxyObject", function() { return createProxyObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withNullAsUndefined", function() { return withNullAsUndefined; }); -/** - * @returns whether the provided parameter is a JavaScript Array or not. - */ -function isArray(array) { - return Array.isArray(array); -} -/** - * @returns whether the provided parameter is a JavaScript String or not. - */ -function isString(str) { - return (typeof str === 'string'); -} -/** - * - * @returns whether the provided parameter is of type `object` but **not** - * `null`, an `array`, a `regexp`, nor a `date`. - */ -function isObject(obj) { - // The method can't do a type cast since there are type (like strings) which - // are subclasses of any put not positvely matched by the function. Hence type - // narrowing results in wrong results. - return typeof obj === 'object' - && obj !== null - && !Array.isArray(obj) - && !(obj instanceof RegExp) - && !(obj instanceof Date); -} -/** - * In **contrast** to just checking `typeof` this will return `false` for `NaN`. - * @returns whether the provided parameter is a JavaScript Number or not. - */ -function isNumber(obj) { - return (typeof obj === 'number' && !isNaN(obj)); -} -/** - * @returns whether the provided parameter is a JavaScript Boolean or not. - */ -function isBoolean(obj) { - return (obj === true || obj === false); -} -/** - * @returns whether the provided parameter is undefined. - */ -function isUndefined(obj) { - return (typeof obj === 'undefined'); -} -/** - * @returns whether the provided parameter is undefined or null. - */ -function isUndefinedOrNull(obj) { - return (isUndefined(obj) || obj === null); -} -function assertType(condition, type) { - if (!condition) { - throw new Error(type ? `Unexpected type, expected '${type}'` : 'Unexpected type'); - } -} -/** - * Asserts that the argument passed in is neither undefined nor null. - */ -function assertIsDefined(arg) { - if (isUndefinedOrNull(arg)) { - throw new Error('Assertion Failed: argument is undefined or null'); - } - return arg; -} -/** - * @returns whether the provided parameter is a JavaScript Function or not. - */ -function isFunction(obj) { - return (typeof obj === 'function'); -} -function validateConstraints(args, constraints) { - const len = Math.min(args.length, constraints.length); - for (let i = 0; i < len; i++) { - validateConstraint(args[i], constraints[i]); - } -} -function validateConstraint(arg, constraint) { - if (isString(constraint)) { - if (typeof arg !== constraint) { - throw new Error(`argument does not match constraint: typeof ${constraint}`); - } - } - else if (isFunction(constraint)) { - try { - if (arg instanceof constraint) { - return; - } - } - catch (_a) { - // ignore - } - if (!isUndefinedOrNull(arg) && arg.constructor === constraint) { - return; - } - if (constraint.length === 1 && constraint.call(undefined, arg) === true) { - return; - } - throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`); - } -} -function getAllPropertyNames(obj) { - let res = []; - let proto = Object.getPrototypeOf(obj); - while (Object.prototype !== proto) { - res = res.concat(Object.getOwnPropertyNames(proto)); - proto = Object.getPrototypeOf(proto); - } - return res; -} -function getAllMethodNames(obj) { - const methods = []; - for (const prop of getAllPropertyNames(obj)) { - if (typeof obj[prop] === 'function') { - methods.push(prop); - } - } - return methods; -} -function createProxyObject(methodNames, invoke) { - const createProxyMethod = (method) => { - return function () { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; - }; - let result = {}; - for (const methodName of methodNames) { - result[methodName] = createProxyMethod(methodName); - } - return result; -} -/** - * Converts null to undefined, passes all other values through. - */ -function withNullAsUndefined(x) { - return x === null ? undefined : x; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/uint.js": -/*!***************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/uint.js ***! - \***************************************************************/ -/*! exports provided: toUint8, toUint32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUint8", function() { return toUint8; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUint32", function() { return toUint32; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function toUint8(v) { - if (v < 0) { - return 0; - } - if (v > 255 /* MAX_UINT_8 */) { - return 255 /* MAX_UINT_8 */; - } - return v | 0; -} -function toUint32(v) { - if (v < 0) { - return 0; - } - if (v > 4294967295 /* MAX_UINT_32 */) { - return 4294967295 /* MAX_UINT_32 */; - } - return v | 0; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/uri.js": -/*!**************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/uri.js ***! - \**************************************************************/ -/*! exports provided: URI, uriToFsPath */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uriToFsPath", function() { return uriToFsPath; }); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -const _schemePattern = /^\w[\w\d+.-]*$/; -const _singleSlashStart = /^\//; -const _doubleSlashStart = /^\/\//; -function _validateUri(ret, _strict) { - // scheme, must be set - if (!ret.scheme && _strict) { - throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`); - } - // scheme, https://tools.ietf.org/html/rfc3986#section-3.1 - // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) - if (ret.scheme && !_schemePattern.test(ret.scheme)) { - throw new Error('[UriError]: Scheme contains illegal characters.'); - } - // path, http://tools.ietf.org/html/rfc3986#section-3.3 - // If a URI contains an authority component, then the path component - // must either be empty or begin with a slash ("/") character. If a URI - // does not contain an authority component, then the path cannot begin - // with two slash characters ("//"). - if (ret.path) { - if (ret.authority) { - if (!_singleSlashStart.test(ret.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 (_doubleSlashStart.test(ret.path)) { - throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); - } - } - } -} -// for a while we allowed uris *without* schemes and this is the migration -// for them, e.g. an uri without scheme and without strict-mode warns and falls -// back to the file-scheme. that should cause the least carnage and still be a -// clear warning -function _schemeFix(scheme, _strict) { - if (!scheme && !_strict) { - return 'file'; - } - return scheme; -} -// implements a bit of https://tools.ietf.org/html/rfc3986#section-5 -function _referenceResolution(scheme, path) { - // the slash-character is our 'default base' as we don't - // support constructing URIs relative to other URIs. This - // also means that we alter and potentially break paths. - // see https://tools.ietf.org/html/rfc3986#section-5.1.4 - switch (scheme) { - case 'https': - case 'http': - case 'file': - if (!path) { - path = _slash; - } - else if (path[0] !== _slash) { - path = _slash + path; - } - break; - } - return path; -} -const _empty = ''; -const _slash = '/'; -const _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; -/** - * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986. - * This class is a simple parser which creates the basic component parts - * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation - * and encoding. - * - * ```txt - * foo://example.com:8042/over/there?name=ferret#nose - * \_/ \______________/\_________/ \_________/ \__/ - * | | | | | - * scheme authority path query fragment - * | _____________________|__ - * / \ / \ - * urn:example:animal:ferret:nose - * ``` - */ -class URI { - /** - * @internal - */ - constructor(schemeOrData, authority, path, query, fragment, _strict = false) { - if (typeof schemeOrData === 'object') { - this.scheme = schemeOrData.scheme || _empty; - this.authority = schemeOrData.authority || _empty; - this.path = schemeOrData.path || _empty; - this.query = schemeOrData.query || _empty; - this.fragment = schemeOrData.fragment || _empty; - // no validation because it's this URI - // that creates uri components. - // _validateUri(this); - } - else { - this.scheme = _schemeFix(schemeOrData, _strict); - this.authority = authority || _empty; - this.path = _referenceResolution(this.scheme, path || _empty); - this.query = query || _empty; - this.fragment = fragment || _empty; - _validateUri(this, _strict); - } - } - static isUri(thing) { - if (thing instanceof URI) { - return true; - } - if (!thing) { - return false; - } - return typeof thing.authority === 'string' - && typeof thing.fragment === 'string' - && typeof thing.path === 'string' - && typeof thing.query === 'string' - && typeof thing.scheme === 'string' - && typeof thing.fsPath === 'function' - && typeof thing.with === 'function' - && typeof thing.toString === 'function'; - } - // ---- filesystem path ----------------------- - /** - * Returns a string representing the corresponding file system path of this URI. - * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the - * platform specific path separator. - * - * * Will *not* validate the path for invalid characters and semantics. - * * Will *not* look at the scheme of this URI. - * * The result shall *not* be used for display purposes but for accessing a file on disk. - * - * - * The *difference* to `URI#path` is the use of the platform specific separator and the handling - * of UNC paths. See the below sample of a file-uri with an authority (UNC path). - * - * ```ts - const u = URI.parse('file://server/c$/folder/file.txt') - u.authority === 'server' - u.path === '/shares/c$/file.txt' - u.fsPath === '\\server\c$\folder\file.txt' - ``` - * - * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, - * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working - * with URIs that represent files on disk (`file` scheme). - */ - get fsPath() { - // if (this.scheme !== 'file') { - // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`); - // } - return uriToFsPath(this, false); - } - // ---- modify to new ------------------------- - with(change) { - if (!change) { - return this; - } - let { scheme, authority, path, query, fragment } = change; - if (scheme === undefined) { - scheme = this.scheme; - } - else if (scheme === null) { - scheme = _empty; - } - if (authority === undefined) { - authority = this.authority; - } - else if (authority === null) { - authority = _empty; - } - if (path === undefined) { - path = this.path; - } - else if (path === null) { - path = _empty; - } - if (query === undefined) { - query = this.query; - } - else if (query === null) { - query = _empty; - } - if (fragment === undefined) { - fragment = this.fragment; - } - else if (fragment === null) { - fragment = _empty; - } - if (scheme === this.scheme - && authority === this.authority - && path === this.path - && query === this.query - && fragment === this.fragment) { - return this; - } - return new Uri(scheme, authority, path, query, fragment); - } - // ---- parse & validate ------------------------ - /** - * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param value A string which represents an URI (see `URI#toString`). - */ - static parse(value, _strict = false) { - const match = _regexp.exec(value); - if (!match) { - return new Uri(_empty, _empty, _empty, _empty, _empty); - } - return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); - } - /** - * Creates a new URI from a file system path, e.g. `c:\my\files`, - * `/usr/home`, or `\\server\share\some\path`. - * - * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument - * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** - * `URI.parse('file://' + path)` because the path might contain characters that are - * interpreted (# and ?). See the following sample: - * ```ts - const good = URI.file('/coding/c#/project1'); - good.scheme === 'file'; - good.path === '/coding/c#/project1'; - good.fragment === ''; - const bad = URI.parse('file://' + '/coding/c#/project1'); - bad.scheme === 'file'; - bad.path === '/coding/c'; // path is now broken - bad.fragment === '/project1'; - ``` - * - * @param path A file system path (see `URI#fsPath`) - */ - static file(path) { - let authority = _empty; - // normalize to fwd-slashes on windows, - // on other systems bwd-slashes are valid - // filename character, eg /f\oo/ba\r.txt - if (_platform_js__WEBPACK_IMPORTED_MODULE_0__["isWindows"]) { - path = path.replace(/\\/g, _slash); - } - // check for authority as used in UNC shares - // or use the path as given - if (path[0] === _slash && path[1] === _slash) { - const idx = path.indexOf(_slash, 2); - if (idx === -1) { - authority = path.substring(2); - path = _slash; - } - else { - authority = path.substring(2, idx); - path = path.substring(idx) || _slash; - } - } - return new Uri('file', authority, path, _empty, _empty); - } - static from(components) { - return new Uri(components.scheme, components.authority, components.path, components.query, components.fragment); - } - /** - * Join a URI path with path fragments and normalizes the resulting path. - * - * @param uri The input URI. - * @param pathFragment The path fragment to add to the URI path. - * @returns The resulting URI. - */ - static joinPath(uri, ...pathFragment) { - if (!uri.path) { - throw new Error(`[UriError]: cannot call joinPaths on URI without path`); - } - let newPath; - if (_platform_js__WEBPACK_IMPORTED_MODULE_0__["isWindows"] && uri.scheme === 'file') { - newPath = URI.file(_path_js__WEBPACK_IMPORTED_MODULE_1__["win32"].join(uriToFsPath(uri, true), ...pathFragment)).path; - } - else { - newPath = _path_js__WEBPACK_IMPORTED_MODULE_1__["posix"].join(uri.path, ...pathFragment); - } - return uri.with({ path: newPath }); - } - // ---- printing/externalize --------------------------- - /** - * Creates a string representation for this URI. It's guaranteed that calling - * `URI.parse` with the result of this function creates an URI which is equal - * to this URI. - * - * * The result shall *not* be used for display purposes but for externalization or transport. - * * The result will be encoded using the percentage encoding and encoding happens mostly - * ignore the scheme-specific encoding rules. - * - * @param skipEncoding Do not encode the result, default is `false` - */ - toString(skipEncoding = false) { - return _asFormatted(this, skipEncoding); - } - toJSON() { - return this; - } - static revive(data) { - if (!data) { - return data; - } - else if (data instanceof URI) { - return data; - } - else { - const result = new Uri(data); - result._formatted = data.external; - result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null; - return result; - } - } -} -const _pathSepMarker = _platform_js__WEBPACK_IMPORTED_MODULE_0__["isWindows"] ? 1 : undefined; -// This class exists so that URI is compatibile with vscode.Uri (API). -class Uri extends URI { - constructor() { - super(...arguments); - this._formatted = null; - this._fsPath = null; - } - get fsPath() { - if (!this._fsPath) { - this._fsPath = uriToFsPath(this, false); - } - return this._fsPath; - } - toString(skipEncoding = false) { - if (!skipEncoding) { - if (!this._formatted) { - this._formatted = _asFormatted(this, false); - } - return this._formatted; - } - else { - // we don't cache that - return _asFormatted(this, true); - } - } - toJSON() { - const res = { - $mid: 1 - }; - // cached state - if (this._fsPath) { - res.fsPath = this._fsPath; - res._sep = _pathSepMarker; - } - if (this._formatted) { - res.external = this._formatted; - } - // uri components - if (this.path) { - res.path = this.path; - } - if (this.scheme) { - res.scheme = this.scheme; - } - if (this.authority) { - res.authority = this.authority; - } - if (this.query) { - res.query = this.query; - } - if (this.fragment) { - res.fragment = this.fragment; - } - return res; - } -} -// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2 -const encodeTable = { - [58 /* Colon */]: '%3A', - [47 /* Slash */]: '%2F', - [63 /* QuestionMark */]: '%3F', - [35 /* Hash */]: '%23', - [91 /* OpenSquareBracket */]: '%5B', - [93 /* CloseSquareBracket */]: '%5D', - [64 /* AtSign */]: '%40', - [33 /* ExclamationMark */]: '%21', - [36 /* DollarSign */]: '%24', - [38 /* Ampersand */]: '%26', - [39 /* SingleQuote */]: '%27', - [40 /* OpenParen */]: '%28', - [41 /* CloseParen */]: '%29', - [42 /* Asterisk */]: '%2A', - [43 /* Plus */]: '%2B', - [44 /* Comma */]: '%2C', - [59 /* Semicolon */]: '%3B', - [61 /* Equals */]: '%3D', - [32 /* Space */]: '%20', -}; -function encodeURIComponentFast(uriComponent, allowSlash) { - let res = undefined; - let nativeEncodePos = -1; - for (let pos = 0; pos < uriComponent.length; pos++) { - const code = uriComponent.charCodeAt(pos); - // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3 - if ((code >= 97 /* a */ && code <= 122 /* z */) - || (code >= 65 /* A */ && code <= 90 /* Z */) - || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */) - || code === 45 /* Dash */ - || code === 46 /* Period */ - || code === 95 /* Underline */ - || code === 126 /* Tilde */ - || (allowSlash && code === 47 /* Slash */)) { - // check if we are delaying native encode - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - // check if we write into a new string (by default we try to return the param) - if (res !== undefined) { - res += uriComponent.charAt(pos); - } - } - else { - // encoding needed, we need to allocate a new string - if (res === undefined) { - res = uriComponent.substr(0, pos); - } - // check with default table first - const escaped = encodeTable[code]; - if (escaped !== undefined) { - // check if we are delaying native encode - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - // append escaped variant to result - res += escaped; - } - else if (nativeEncodePos === -1) { - // use native encode only when needed - nativeEncodePos = pos; - } - } - } - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); - } - return res !== undefined ? res : uriComponent; -} -function encodeURIComponentMinimal(path) { - let res = undefined; - for (let pos = 0; pos < path.length; pos++) { - const code = path.charCodeAt(pos); - if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) { - if (res === undefined) { - res = path.substr(0, pos); - } - res += encodeTable[code]; - } - else { - if (res !== undefined) { - res += path[pos]; - } - } - } - return res !== undefined ? res : path; -} -/** - * Compute `fsPath` for the given uri - */ -function uriToFsPath(uri, keepDriveLetterCasing) { - let value; - if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') { - // unc path: file://shares/c$/far/boo - value = `//${uri.authority}${uri.path}`; - } - else if (uri.path.charCodeAt(0) === 47 /* Slash */ - && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */) - && uri.path.charCodeAt(2) === 58 /* Colon */) { - if (!keepDriveLetterCasing) { - // windows drive letter: file:///c:/far/boo - value = uri.path[1].toLowerCase() + uri.path.substr(2); - } - else { - value = uri.path.substr(1); - } - } - else { - // other path - value = uri.path; - } - if (_platform_js__WEBPACK_IMPORTED_MODULE_0__["isWindows"]) { - value = value.replace(/\//g, '\\'); - } - return value; -} -/** - * Create the external version of a uri - */ -function _asFormatted(uri, skipEncoding) { - const encoder = !skipEncoding - ? encodeURIComponentFast - : encodeURIComponentMinimal; - let res = ''; - let { scheme, authority, path, query, fragment } = uri; - if (scheme) { - res += scheme; - res += ':'; - } - if (authority || scheme === 'file') { - res += _slash; - res += _slash; - } - if (authority) { - let idx = authority.indexOf('@'); - if (idx !== -1) { - // @ - const userinfo = authority.substr(0, idx); - authority = authority.substr(idx + 1); - idx = userinfo.indexOf(':'); - if (idx === -1) { - res += encoder(userinfo, false); - } - else { - // :@ - res += encoder(userinfo.substr(0, idx), false); - res += ':'; - res += encoder(userinfo.substr(idx + 1), false); - } - res += '@'; - } - authority = authority.toLowerCase(); - idx = authority.indexOf(':'); - if (idx === -1) { - res += encoder(authority, false); - } - else { - // : - res += encoder(authority.substr(0, idx), false); - res += authority.substr(idx); - } - } - if (path) { - // lower-case windows drive letters in /C:/fff or C:/fff - if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) { - const code = path.charCodeAt(1); - if (code >= 65 /* A */ && code <= 90 /* Z */) { - path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // "/c:".length === 3 - } - } - else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) { - const code = path.charCodeAt(0); - if (code >= 65 /* A */ && code <= 90 /* Z */) { - path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // "/c:".length === 3 - } - } - // encode the rest of the path - res += encoder(path, true); - } - if (query) { - res += '?'; - res += encoder(query, false); - } - if (fragment) { - res += '#'; - res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment; - } - return res; -} -// --- decode -function decodeURIComponentGraceful(str) { - try { - return decodeURIComponent(str); - } - catch (_a) { - if (str.length > 3) { - return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); - } - else { - return str; - } - } -} -const _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; -function percentDecode(str) { - if (!str.match(_rEncodedAsHex)) { - return str; - } - return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js ***! - \******************************************************************************/ -/*! exports provided: logOnceWebWorkerWarning, SimpleWorkerClient, SimpleWorkerServer, create */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logOnceWebWorkerWarning", function() { return logOnceWebWorkerWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleWorkerClient", function() { return SimpleWorkerClient; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleWorkerServer", function() { return SimpleWorkerServer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); -/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const INITIALIZE = '$initialize'; -let webWorkerWarningLogged = false; -function logOnceWebWorkerWarning(err) { - if (!_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWeb"]) { - // running tests - return; - } - if (!webWorkerWarningLogged) { - webWorkerWarningLogged = true; - console.warn('Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq'); - } - console.warn(err.message); -} -class SimpleWorkerProtocol { - constructor(handler) { - this._workerId = -1; - this._handler = handler; - this._lastSentReq = 0; - this._pendingReplies = Object.create(null); - } - setWorkerId(workerId) { - this._workerId = workerId; - } - sendMessage(method, args) { - let req = String(++this._lastSentReq); - return new Promise((resolve, reject) => { - this._pendingReplies[req] = { - resolve: resolve, - reject: reject - }; - this._send({ - vsWorker: this._workerId, - req: req, - method: method, - args: args - }); - }); - } - handleMessage(message) { - if (!message || !message.vsWorker) { - return; - } - if (this._workerId !== -1 && message.vsWorker !== this._workerId) { - return; - } - this._handleMessage(message); - } - _handleMessage(msg) { - if (msg.seq) { - let replyMessage = msg; - if (!this._pendingReplies[replyMessage.seq]) { - console.warn('Got reply to unknown seq'); - return; - } - let reply = this._pendingReplies[replyMessage.seq]; - delete this._pendingReplies[replyMessage.seq]; - if (replyMessage.err) { - let err = replyMessage.err; - if (replyMessage.err.$isError) { - err = new Error(); - err.name = replyMessage.err.name; - err.message = replyMessage.err.message; - err.stack = replyMessage.err.stack; - } - reply.reject(err); - return; - } - reply.resolve(replyMessage.res); - return; - } - let requestMessage = msg; - let req = requestMessage.req; - let result = this._handler.handleMessage(requestMessage.method, requestMessage.args); - result.then((r) => { - this._send({ - vsWorker: this._workerId, - seq: req, - res: r, - err: undefined - }); - }, (e) => { - if (e.detail instanceof Error) { - // Loading errors have a detail property that points to the actual error - e.detail = Object(_errors_js__WEBPACK_IMPORTED_MODULE_0__["transformErrorForSerialization"])(e.detail); - } - this._send({ - vsWorker: this._workerId, - seq: req, - res: undefined, - err: Object(_errors_js__WEBPACK_IMPORTED_MODULE_0__["transformErrorForSerialization"])(e) - }); - }); - } - _send(msg) { - let transfer = []; - if (msg.req) { - const m = msg; - for (let i = 0; i < m.args.length; i++) { - if (m.args[i] instanceof ArrayBuffer) { - transfer.push(m.args[i]); - } - } - } - else { - const m = msg; - if (m.res instanceof ArrayBuffer) { - transfer.push(m.res); - } - } - this._handler.sendMessage(msg, transfer); - } -} -/** - * Main thread side - */ -class SimpleWorkerClient extends _lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(workerFactory, moduleId, host) { - super(); - let lazyProxyReject = null; - this._worker = this._register(workerFactory.create('vs/base/common/worker/simpleWorker', (msg) => { - this._protocol.handleMessage(msg); - }, (err) => { - // in Firefox, web workers fail lazily :( - // we will reject the proxy - if (lazyProxyReject) { - lazyProxyReject(err); - } - })); - this._protocol = new SimpleWorkerProtocol({ - sendMessage: (msg, transfer) => { - this._worker.postMessage(msg, transfer); - }, - handleMessage: (method, args) => { - if (typeof host[method] !== 'function') { - return Promise.reject(new Error('Missing method ' + method + ' on main thread host.')); - } - try { - return Promise.resolve(host[method].apply(host, args)); - } - catch (e) { - return Promise.reject(e); - } - } - }); - this._protocol.setWorkerId(this._worker.getId()); - // Gather loader configuration - let loaderConfiguration = null; - if (typeof self.require !== 'undefined' && typeof self.require.getConfig === 'function') { - // Get the configuration from the Monaco AMD Loader - loaderConfiguration = self.require.getConfig(); - } - else if (typeof self.requirejs !== 'undefined') { - // Get the configuration from requirejs - loaderConfiguration = self.requirejs.s.contexts._.config; - } - const hostMethods = _types_js__WEBPACK_IMPORTED_MODULE_3__["getAllMethodNames"](host); - // Send initialize message - this._onModuleLoaded = this._protocol.sendMessage(INITIALIZE, [ - this._worker.getId(), - JSON.parse(JSON.stringify(loaderConfiguration)), - moduleId, - hostMethods, - ]); - // Create proxy to loaded code - const proxyMethodRequest = (method, args) => { - return this._request(method, args); - }; - this._lazyProxy = new Promise((resolve, reject) => { - lazyProxyReject = reject; - this._onModuleLoaded.then((availableMethods) => { - resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__["createProxyObject"](availableMethods, proxyMethodRequest)); - }, (e) => { - reject(e); - this._onError('Worker failed to load ' + moduleId, e); - }); - }); - } - getProxyObject() { - return this._lazyProxy; - } - _request(method, args) { - return new Promise((resolve, reject) => { - this._onModuleLoaded.then(() => { - this._protocol.sendMessage(method, args).then(resolve, reject); - }, reject); - }); - } - _onError(message, error) { - console.error(message); - console.info(error); - } -} -/** - * Worker side - */ -class SimpleWorkerServer { - constructor(postMessage, requestHandlerFactory) { - this._requestHandlerFactory = requestHandlerFactory; - this._requestHandler = null; - this._protocol = new SimpleWorkerProtocol({ - sendMessage: (msg, transfer) => { - postMessage(msg, transfer); - }, - handleMessage: (method, args) => this._handleMessage(method, args) - }); - } - onmessage(msg) { - this._protocol.handleMessage(msg); - } - _handleMessage(method, args) { - if (method === INITIALIZE) { - return this.initialize(args[0], args[1], args[2], args[3]); - } - if (!this._requestHandler || typeof this._requestHandler[method] !== 'function') { - return Promise.reject(new Error('Missing requestHandler or method: ' + method)); - } - try { - return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args)); - } - catch (e) { - return Promise.reject(e); - } - } - initialize(workerId, loaderConfig, moduleId, hostMethods) { - this._protocol.setWorkerId(workerId); - const proxyMethodRequest = (method, args) => { - return this._protocol.sendMessage(method, args); - }; - const hostProxy = _types_js__WEBPACK_IMPORTED_MODULE_3__["createProxyObject"](hostMethods, proxyMethodRequest); - if (this._requestHandlerFactory) { - // static request handler - this._requestHandler = this._requestHandlerFactory(hostProxy); - return Promise.resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__["getAllMethodNames"](this._requestHandler)); - } - if (loaderConfig) { - // Remove 'baseUrl', handling it is beyond scope for now - if (typeof loaderConfig.baseUrl !== 'undefined') { - delete loaderConfig['baseUrl']; - } - if (typeof loaderConfig.paths !== 'undefined') { - if (typeof loaderConfig.paths.vs !== 'undefined') { - delete loaderConfig.paths['vs']; - } - } - // Since this is in a web worker, enable catching errors - loaderConfig.catchError = true; - self.require.config(loaderConfig); - } - return new Promise((resolve, reject) => { - // Use the global require to be sure to get the global config - self.require([moduleId], (module) => { - this._requestHandler = module.create(hostProxy); - if (!this._requestHandler) { - reject(new Error(`No RequestHandler!`)); - return; - } - resolve(_types_js__WEBPACK_IMPORTED_MODULE_3__["getAllMethodNames"](this._requestHandler)); - }, reject); - }); - } -} -/** - * Called on the worker side - */ -function create(postMessage) { - return new SimpleWorkerServer(postMessage, null); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./quickInput.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_quickInput_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js ***! - \***************************************************************************************/ -/*! exports provided: QuickInputController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputController", function() { return QuickInputController; }); -/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"); -/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js"); -/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _quickInputList_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./quickInputList.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js"); -/* harmony import */ var _quickInputBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./quickInputBox.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js"); -/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/ui/countBadge/countBadge.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js"); -/* harmony import */ var _browser_ui_progressbar_progressbar_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../browser/ui/progressbar/progressbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../browser/ui/button/button.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_severity_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../browser/ui/actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./quickInputUtils.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js"); -/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - - - - - - - - -const $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]; -const backButtonIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_19__["registerIcon"])('quick-input-back', _common_codicons_js__WEBPACK_IMPORTED_MODULE_19__["Codicon"].arrowLeft); -const backButton = { - iconClass: backButtonIcon.classNames, - tooltip: Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('quickInput.back', "Back"), - handle: -1 // TODO -}; -class QuickInput extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__["Disposable"] { - constructor(ui) { - super(); - this.ui = ui; - this.visible = false; - this._enabled = true; - this._busy = false; - this._ignoreFocusOut = false; - this._buttons = []; - this.buttonsUpdated = false; - this.onDidTriggerButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidHideEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDisposeEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.visibleDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__["DisposableStore"]()); - this.onDidHide = this.onDidHideEmitter.event; - } - get title() { - return this._title; - } - set title(title) { - this._title = title; - this.update(); - } - get description() { - return this._description; - } - set description(description) { - this._description = description; - this.update(); - } - get step() { - return this._steps; - } - set step(step) { - this._steps = step; - this.update(); - } - get totalSteps() { - return this._totalSteps; - } - set totalSteps(totalSteps) { - this._totalSteps = totalSteps; - this.update(); - } - get enabled() { - return this._enabled; - } - set enabled(enabled) { - this._enabled = enabled; - this.update(); - } - get contextKey() { - return this._contextKey; - } - set contextKey(contextKey) { - this._contextKey = contextKey; - this.update(); - } - get busy() { - return this._busy; - } - set busy(busy) { - this._busy = busy; - this.update(); - } - get ignoreFocusOut() { - return this._ignoreFocusOut; - } - set ignoreFocusOut(ignoreFocusOut) { - this._ignoreFocusOut = ignoreFocusOut; - this.update(); - } - get buttons() { - return this._buttons; - } - set buttons(buttons) { - this._buttons = buttons; - this.buttonsUpdated = true; - this.update(); - } - show() { - if (this.visible) { - return; - } - this.visibleDisposables.add(this.ui.onDidTriggerButton(button => { - if (this.buttons.indexOf(button) !== -1) { - this.onDidTriggerButtonEmitter.fire(button); - } - })); - this.ui.show(this); - this.visible = true; - this.update(); - } - hide() { - if (!this.visible) { - return; - } - this.ui.hide(); - } - didHide() { - this.visible = false; - this.visibleDisposables.clear(); - this.onDidHideEmitter.fire(); - } - update() { - if (!this.visible) { - return; - } - const title = this.getTitle(); - if (title && this.ui.title.textContent !== title) { - this.ui.title.textContent = title; - } - else if (!title && this.ui.title.innerHTML !== ' ') { - this.ui.title.innerText = '\u00a0;'; - } - const description = this.getDescription(); - if (this.ui.description.textContent !== description) { - this.ui.description.textContent = description; - } - if (this.busy && !this.busyDelay) { - this.busyDelay = new _common_async_js__WEBPACK_IMPORTED_MODULE_17__["TimeoutTimer"](); - this.busyDelay.setIfNotSet(() => { - if (this.visible) { - this.ui.progressBar.infinite(); - } - }, 800); - } - if (!this.busy && this.busyDelay) { - this.ui.progressBar.stop(); - this.busyDelay.cancel(); - this.busyDelay = undefined; - } - if (this.buttonsUpdated) { - this.buttonsUpdated = false; - this.ui.leftActionBar.clear(); - const leftButtons = this.buttons.filter(button => button === backButton); - this.ui.leftActionBar.push(leftButtons.map((button, index) => { - const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_15__["Action"](`id-${index}`, '', button.iconClass || Object(_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__["getIconClass"])(button.iconPath), true, () => __awaiter(this, void 0, void 0, function* () { - this.onDidTriggerButtonEmitter.fire(button); - })); - action.tooltip = button.tooltip || ''; - return action; - }), { icon: true, label: false }); - this.ui.rightActionBar.clear(); - const rightButtons = this.buttons.filter(button => button !== backButton); - this.ui.rightActionBar.push(rightButtons.map((button, index) => { - const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_15__["Action"](`id-${index}`, '', button.iconClass || Object(_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_18__["getIconClass"])(button.iconPath), true, () => __awaiter(this, void 0, void 0, function* () { - this.onDidTriggerButtonEmitter.fire(button); - })); - action.tooltip = button.tooltip || ''; - return action; - }), { icon: true, label: false }); - } - this.ui.ignoreFocusOut = this.ignoreFocusOut; - this.ui.setEnabled(this.enabled); - this.ui.setContextKey(this.contextKey); - } - getTitle() { - if (this.title && this.step) { - return `${this.title} (${this.getSteps()})`; - } - if (this.title) { - return this.title; - } - if (this.step) { - return this.getSteps(); - } - return ''; - } - getDescription() { - return this.description || ''; - } - getSteps() { - if (this.step && this.totalSteps) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('quickInput.steps', "{0}/{1}", this.step, this.totalSteps); - } - if (this.step) { - return String(this.step); - } - return ''; - } - showMessageDecoration(severity) { - this.ui.inputBox.showDecoration(severity); - if (severity === _common_severity_js__WEBPACK_IMPORTED_MODULE_13__["default"].Error) { - const styles = this.ui.inputBox.stylesForType(severity); - this.ui.message.style.color = styles.foreground ? `${styles.foreground}` : ''; - this.ui.message.style.backgroundColor = styles.background ? `${styles.background}` : ''; - this.ui.message.style.border = styles.border ? `1px solid ${styles.border}` : ''; - this.ui.message.style.paddingBottom = '4px'; - } - else { - this.ui.message.style.color = ''; - this.ui.message.style.backgroundColor = ''; - this.ui.message.style.border = ''; - this.ui.message.style.paddingBottom = ''; - } - } - dispose() { - this.hide(); - this.onDisposeEmitter.fire(); - super.dispose(); - } -} -class QuickPick extends QuickInput { - constructor() { - super(...arguments); - this._value = ''; - this.onDidChangeValueEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidAcceptEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidCustomEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this._items = []; - this.itemsUpdated = false; - this._canSelectMany = false; - this._canAcceptInBackground = false; - this._matchOnDescription = false; - this._matchOnDetail = false; - this._matchOnLabel = true; - this._sortByLabel = true; - this._autoFocusOnList = true; - this._itemActivation = this.ui.isScreenReaderOptimized() ? _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].NONE /* https://github.com/microsoft/vscode/issues/57501 */ : _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].FIRST; - this._activeItems = []; - this.activeItemsUpdated = false; - this.activeItemsToConfirm = []; - this.onDidChangeActiveEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this._selectedItems = []; - this.selectedItemsUpdated = false; - this.selectedItemsToConfirm = []; - this.onDidChangeSelectionEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidTriggerItemButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.valueSelectionUpdated = true; - this._ok = 'default'; - this._customButton = false; - this.filterValue = (value) => value; - this.onDidChangeValue = this.onDidChangeValueEmitter.event; - this.onDidAccept = this.onDidAcceptEmitter.event; - this.onDidChangeActive = this.onDidChangeActiveEmitter.event; - this.onDidChangeSelection = this.onDidChangeSelectionEmitter.event; - this.onDidTriggerItemButton = this.onDidTriggerItemButtonEmitter.event; - } - get quickNavigate() { - return this._quickNavigate; - } - set quickNavigate(quickNavigate) { - this._quickNavigate = quickNavigate; - this.update(); - } - get value() { - return this._value; - } - set value(value) { - this._value = value || ''; - this.update(); - } - set ariaLabel(ariaLabel) { - this._ariaLabel = ariaLabel; - this.update(); - } - get ariaLabel() { - return this._ariaLabel; - } - get placeholder() { - return this._placeholder; - } - set placeholder(placeholder) { - this._placeholder = placeholder; - this.update(); - } - get items() { - return this._items; - } - set items(items) { - this._items = items; - this.itemsUpdated = true; - this.update(); - } - get canSelectMany() { - return this._canSelectMany; - } - set canSelectMany(canSelectMany) { - this._canSelectMany = canSelectMany; - this.update(); - } - get canAcceptInBackground() { - return this._canAcceptInBackground; - } - set canAcceptInBackground(canAcceptInBackground) { - this._canAcceptInBackground = canAcceptInBackground; - } - get matchOnDescription() { - return this._matchOnDescription; - } - set matchOnDescription(matchOnDescription) { - this._matchOnDescription = matchOnDescription; - this.update(); - } - get matchOnDetail() { - return this._matchOnDetail; - } - set matchOnDetail(matchOnDetail) { - this._matchOnDetail = matchOnDetail; - this.update(); - } - get matchOnLabel() { - return this._matchOnLabel; - } - set matchOnLabel(matchOnLabel) { - this._matchOnLabel = matchOnLabel; - this.update(); - } - get sortByLabel() { - return this._sortByLabel; - } - set sortByLabel(sortByLabel) { - this._sortByLabel = sortByLabel; - this.update(); - } - get autoFocusOnList() { - return this._autoFocusOnList; - } - set autoFocusOnList(autoFocusOnList) { - this._autoFocusOnList = autoFocusOnList; - this.update(); - } - get itemActivation() { - return this._itemActivation; - } - set itemActivation(itemActivation) { - this._itemActivation = itemActivation; - } - get activeItems() { - return this._activeItems; - } - set activeItems(activeItems) { - this._activeItems = activeItems; - this.activeItemsUpdated = true; - this.update(); - } - get selectedItems() { - return this._selectedItems; - } - set selectedItems(selectedItems) { - this._selectedItems = selectedItems; - this.selectedItemsUpdated = true; - this.update(); - } - get keyMods() { - if (this._quickNavigate) { - // Disable keyMods when quick navigate is enabled - // because in this model the interaction is purely - // keyboard driven and Ctrl/Alt are typically - // pressed and hold during this interaction. - return _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["NO_KEY_MODS"]; - } - return this.ui.keyMods; - } - set valueSelection(valueSelection) { - this._valueSelection = valueSelection; - this.valueSelectionUpdated = true; - this.update(); - } - get validationMessage() { - return this._validationMessage; - } - set validationMessage(validationMessage) { - this._validationMessage = validationMessage; - this.update(); - } - get customButton() { - return this._customButton; - } - set customButton(showCustomButton) { - this._customButton = showCustomButton; - this.update(); - } - get customLabel() { - return this._customButtonLabel; - } - set customLabel(label) { - this._customButtonLabel = label; - this.update(); - } - get customHover() { - return this._customButtonHover; - } - set customHover(hover) { - this._customButtonHover = hover; - this.update(); - } - get ok() { - return this._ok; - } - set ok(showOkButton) { - this._ok = showOkButton; - this.update(); - } - get hideInput() { - return !!this._hideInput; - } - set hideInput(hideInput) { - this._hideInput = hideInput; - this.update(); - } - trySelectFirst() { - if (this.autoFocusOnList) { - if (!this.canSelectMany) { - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].First); - } - } - } - show() { - if (!this.visible) { - this.visibleDisposables.add(this.ui.inputBox.onDidChange(value => { - if (value === this.value) { - return; - } - this._value = value; - const didFilter = this.ui.list.filter(this.filterValue(this.ui.inputBox.value)); - if (didFilter) { - this.trySelectFirst(); - } - this.onDidChangeValueEmitter.fire(value); - })); - this.visibleDisposables.add(this.ui.inputBox.onMouseDown(event => { - if (!this.autoFocusOnList) { - this.ui.list.clearFocus(); - } - })); - this.visibleDisposables.add((this._hideInput ? this.ui.list : this.ui.inputBox).onKeyDown((event) => { - switch (event.keyCode) { - case 18 /* DownArrow */: - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Next); - if (this.canSelectMany) { - this.ui.list.domFocus(); - } - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - break; - case 16 /* UpArrow */: - if (this.ui.list.getFocusedElements().length) { - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Previous); - } - else { - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Last); - } - if (this.canSelectMany) { - this.ui.list.domFocus(); - } - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - break; - case 12 /* PageDown */: - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].NextPage); - if (this.canSelectMany) { - this.ui.list.domFocus(); - } - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - break; - case 11 /* PageUp */: - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].PreviousPage); - if (this.canSelectMany) { - this.ui.list.domFocus(); - } - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - break; - case 17 /* RightArrow */: - if (!this._canAcceptInBackground) { - return; // needs to be enabled - } - if (!this.ui.inputBox.isSelectionAtEnd()) { - return; // ensure input box selection at end - } - if (this.activeItems[0]) { - this._selectedItems = [this.activeItems[0]]; - this.onDidChangeSelectionEmitter.fire(this.selectedItems); - this.onDidAcceptEmitter.fire({ inBackground: true }); - } - break; - case 14 /* Home */: - if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) { - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].First); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - } - break; - case 13 /* End */: - if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) { - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Last); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); - } - break; - } - })); - this.visibleDisposables.add(this.ui.onDidAccept(() => { - if (!this.canSelectMany && this.activeItems[0]) { - this._selectedItems = [this.activeItems[0]]; - this.onDidChangeSelectionEmitter.fire(this.selectedItems); - } - this.onDidAcceptEmitter.fire({ inBackground: false }); - })); - this.visibleDisposables.add(this.ui.onDidCustom(() => { - this.onDidCustomEmitter.fire(); - })); - this.visibleDisposables.add(this.ui.list.onDidChangeFocus(focusedItems => { - if (this.activeItemsUpdated) { - return; // Expect another event. - } - if (this.activeItemsToConfirm !== this._activeItems && Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__["equals"])(focusedItems, this._activeItems, (a, b) => a === b)) { - return; - } - this._activeItems = focusedItems; - this.onDidChangeActiveEmitter.fire(focusedItems); - })); - this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({ items: selectedItems, event }) => { - if (this.canSelectMany) { - if (selectedItems.length) { - this.ui.list.setSelectedElements([]); - } - return; - } - if (this.selectedItemsToConfirm !== this._selectedItems && Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__["equals"])(selectedItems, this._selectedItems, (a, b) => a === b)) { - return; - } - this._selectedItems = selectedItems; - this.onDidChangeSelectionEmitter.fire(selectedItems); - if (selectedItems.length) { - this.onDidAcceptEmitter.fire({ inBackground: event instanceof MouseEvent && event.button === 1 /* mouse middle click */ }); - } - })); - this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(checkedItems => { - if (!this.canSelectMany) { - return; - } - if (this.selectedItemsToConfirm !== this._selectedItems && Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_16__["equals"])(checkedItems, this._selectedItems, (a, b) => a === b)) { - return; - } - this._selectedItems = checkedItems; - this.onDidChangeSelectionEmitter.fire(checkedItems); - })); - this.visibleDisposables.add(this.ui.list.onButtonTriggered(event => this.onDidTriggerItemButtonEmitter.fire(event))); - this.visibleDisposables.add(this.registerQuickNavigation()); - this.valueSelectionUpdated = true; - } - super.show(); // TODO: Why have show() bubble up while update() trickles down? (Could move setComboboxAccessibility() here.) - } - registerQuickNavigation() { - return _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](this.ui.container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].KEY_UP, e => { - if (this.canSelectMany || !this._quickNavigate) { - return; - } - const keyboardEvent = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__["StandardKeyboardEvent"](e); - const keyCode = keyboardEvent.keyCode; - // Select element when keys are pressed that signal it - const quickNavKeys = this._quickNavigate.keybindings; - const wasTriggerKeyPressed = quickNavKeys.some(k => { - const [firstPart, chordPart] = k.getParts(); - if (chordPart) { - return false; - } - if (firstPart.shiftKey && keyCode === 4 /* Shift */) { - if (keyboardEvent.ctrlKey || keyboardEvent.altKey || keyboardEvent.metaKey) { - return false; // this is an optimistic check for the shift key being used to navigate back in quick input - } - return true; - } - if (firstPart.altKey && keyCode === 6 /* Alt */) { - return true; - } - if (firstPart.ctrlKey && keyCode === 5 /* Ctrl */) { - return true; - } - if (firstPart.metaKey && keyCode === 57 /* Meta */) { - return true; - } - return false; - }); - if (wasTriggerKeyPressed) { - if (this.activeItems[0]) { - this._selectedItems = [this.activeItems[0]]; - this.onDidChangeSelectionEmitter.fire(this.selectedItems); - this.onDidAcceptEmitter.fire({ inBackground: false }); - } - // Unset quick navigate after press. It is only valid once - // and should not result in any behaviour change afterwards - // if the picker remains open because there was no active item - this._quickNavigate = undefined; - } - }); - } - update() { - if (!this.visible) { - return; - } - let hideInput = false; - let inputShownJustForScreenReader = false; - if (!!this._hideInput && this._items.length > 0) { - if (this.ui.isScreenReaderOptimized()) { - // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360 - inputShownJustForScreenReader = true; - } - else { - hideInput = true; - } - } - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this.ui.container, 'hidden-input', hideInput); - const visibilities = { - title: !!this.title || !!this.step || !!this.buttons.length, - description: !!this.description, - checkAll: this.canSelectMany, - inputBox: !hideInput, - progressBar: !hideInput, - visibleCount: true, - count: this.canSelectMany, - ok: this.ok === 'default' ? this.canSelectMany : this.ok, - list: true, - message: !!this.validationMessage, - customButton: this.customButton - }; - this.ui.setVisibilities(visibilities); - super.update(); - if (this.ui.inputBox.value !== this.value) { - this.ui.inputBox.value = this.value; - } - if (this.valueSelectionUpdated) { - this.valueSelectionUpdated = false; - this.ui.inputBox.select(this._valueSelection && { start: this._valueSelection[0], end: this._valueSelection[1] }); - } - if (this.ui.inputBox.placeholder !== (this.placeholder || '')) { - this.ui.inputBox.placeholder = (this.placeholder || ''); - } - if (inputShownJustForScreenReader) { - this.ui.inputBox.ariaLabel = ''; - } - else { - const ariaLabel = this.ariaLabel || this.placeholder || QuickPick.DEFAULT_ARIA_LABEL; - if (this.ui.inputBox.ariaLabel !== ariaLabel) { - this.ui.inputBox.ariaLabel = ariaLabel; - } - } - this.ui.list.matchOnDescription = this.matchOnDescription; - this.ui.list.matchOnDetail = this.matchOnDetail; - this.ui.list.matchOnLabel = this.matchOnLabel; - this.ui.list.sortByLabel = this.sortByLabel; - if (this.itemsUpdated) { - this.itemsUpdated = false; - this.ui.list.setElements(this.items); - this.ui.list.filter(this.filterValue(this.ui.inputBox.value)); - this.ui.checkAll.checked = this.ui.list.getAllVisibleChecked(); - this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()); - this.ui.count.setCount(this.ui.list.getCheckedCount()); - switch (this._itemActivation) { - case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].NONE: - this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].FIRST; // only valid once, then unset - break; - case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].SECOND: - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Second); - this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].FIRST; // only valid once, then unset - break; - case _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].LAST: - this.ui.list.focus(_quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputListFocus"].Last); - this._itemActivation = _common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"].FIRST; // only valid once, then unset - break; - default: - this.trySelectFirst(); - break; - } - } - if (this.ui.container.classList.contains('show-checkboxes') !== !!this.canSelectMany) { - if (this.canSelectMany) { - this.ui.list.clearFocus(); - } - else { - this.trySelectFirst(); - } - } - if (this.activeItemsUpdated) { - this.activeItemsUpdated = false; - this.activeItemsToConfirm = this._activeItems; - this.ui.list.setFocusedElements(this.activeItems); - if (this.activeItemsToConfirm === this._activeItems) { - this.activeItemsToConfirm = null; - } - } - if (this.selectedItemsUpdated) { - this.selectedItemsUpdated = false; - this.selectedItemsToConfirm = this._selectedItems; - if (this.canSelectMany) { - this.ui.list.setCheckedElements(this.selectedItems); - } - else { - this.ui.list.setSelectedElements(this.selectedItems); - } - if (this.selectedItemsToConfirm === this._selectedItems) { - this.selectedItemsToConfirm = null; - } - } - if (this.validationMessage) { - this.ui.message.textContent = this.validationMessage; - this.showMessageDecoration(_common_severity_js__WEBPACK_IMPORTED_MODULE_13__["default"].Error); - } - else { - this.ui.message.textContent = null; - this.showMessageDecoration(_common_severity_js__WEBPACK_IMPORTED_MODULE_13__["default"].Ignore); - } - this.ui.customButton.label = this.customLabel || ''; - this.ui.customButton.element.title = this.customHover || ''; - this.ui.setComboboxAccessibility(true); - if (!visibilities.inputBox) { - // we need to move focus into the tree to detect keybindings - // properly when the input box is not visible (quick nav) - this.ui.list.domFocus(); - } - } -} -QuickPick.DEFAULT_ARIA_LABEL = Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('quickInputBox.ariaLabel', "Type to narrow down results."); -class QuickInputController extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__["Disposable"] { - constructor(options) { - super(); - this.options = options; - this.comboboxAccessibility = false; - this.enabled = true; - this.onDidAcceptEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidCustomEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onDidTriggerButtonEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.keyMods = { ctrlCmd: false, alt: false }; - this.controller = null; - this.onShowEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onShow = this.onShowEmitter.event; - this.onHideEmitter = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_10__["Emitter"]()); - this.onHide = this.onHideEmitter.event; - this.idPrefix = options.idPrefix; - this.parentElement = options.container; - this.styles = options.styles; - this.registerKeyModsListeners(); - } - registerKeyModsListeners() { - const listener = (e) => { - this.keyMods.ctrlCmd = e.ctrlKey || e.metaKey; - this.keyMods.alt = e.altKey; - }; - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].KEY_DOWN, listener, true)); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].KEY_UP, listener, true)); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](window, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].MOUSE_DOWN, listener, true)); - } - getUI() { - if (this.ui) { - return this.ui; - } - const container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.parentElement, $('.quick-input-widget.show-file-icons')); - container.tabIndex = -1; - container.style.display = 'none'; - const styleSheet = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["createStyleSheet"](container); - const titleBar = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.quick-input-titlebar')); - const leftActionBar = this._register(new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__["ActionBar"](titleBar)); - leftActionBar.domNode.classList.add('quick-input-left-action-bar'); - const title = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](titleBar, $('.quick-input-title')); - const rightActionBar = this._register(new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_14__["ActionBar"](titleBar)); - rightActionBar.domNode.classList.add('quick-input-right-action-bar'); - const description = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.quick-input-description')); - const headerContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.quick-input-header')); - const checkAll = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](headerContainer, $('input.quick-input-check-all')); - checkAll.type = 'checkbox'; - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addStandardDisposableListener"](checkAll, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].CHANGE, e => { - const checked = checkAll.checked; - list.setAllVisibleChecked(checked); - })); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](checkAll, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].CLICK, e => { - if (e.x || e.y) { // Avoid 'click' triggered by 'space'... - inputBox.setFocus(); - } - })); - const extraContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](headerContainer, $('.quick-input-and-message')); - const filterContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](extraContainer, $('.quick-input-filter')); - const inputBox = this._register(new _quickInputBox_js__WEBPACK_IMPORTED_MODULE_5__["QuickInputBox"](filterContainer)); - inputBox.setAttribute('aria-describedby', `${this.idPrefix}message`); - const visibleCountContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](filterContainer, $('.quick-input-visible-count')); - visibleCountContainer.setAttribute('aria-live', 'polite'); - visibleCountContainer.setAttribute('aria-atomic', 'true'); - const visibleCount = new _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__["CountBadge"](visibleCountContainer, { countFormat: Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])({ key: 'quickInput.visibleCount', comment: ['This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers.'] }, "{0} Results") }); - const countContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](filterContainer, $('.quick-input-count')); - countContainer.setAttribute('aria-live', 'polite'); - const count = new _browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_8__["CountBadge"](countContainer, { countFormat: Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])({ key: 'quickInput.countSelected', comment: ['This tells the user how many items are selected in a list of items to select from. The items can be anything.'] }, "{0} Selected") }); - const okContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](headerContainer, $('.quick-input-action')); - const ok = new _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__["Button"](okContainer); - ok.label = Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('ok', "OK"); - this._register(ok.onDidClick(e => { - this.onDidAcceptEmitter.fire(); - })); - const customButtonContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](headerContainer, $('.quick-input-action')); - const customButton = new _browser_ui_button_button_js__WEBPACK_IMPORTED_MODULE_11__["Button"](customButtonContainer); - customButton.label = Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('custom', "Custom"); - this._register(customButton.onDidClick(e => { - this.onDidCustomEmitter.fire(); - })); - const message = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](extraContainer, $(`#${this.idPrefix}message.quick-input-message`)); - const progressBar = new _browser_ui_progressbar_progressbar_js__WEBPACK_IMPORTED_MODULE_9__["ProgressBar"](container); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](progressBar.getContainer(), 'quick-input-progress'); - const list = this._register(new _quickInputList_js__WEBPACK_IMPORTED_MODULE_4__["QuickInputList"](container, this.idPrefix + 'list', this.options)); - this._register(list.onChangedAllVisibleChecked(checked => { - checkAll.checked = checked; - })); - this._register(list.onChangedVisibleCount(c => { - visibleCount.setCount(c); - })); - this._register(list.onChangedCheckedCount(c => { - count.setCount(c); - })); - this._register(list.onLeave(() => { - // Defer to avoid the input field reacting to the triggering key. - setTimeout(() => { - inputBox.setFocus(); - if (this.controller instanceof QuickPick && this.controller.canSelectMany) { - list.clearFocus(); - } - }, 0); - })); - this._register(list.onDidChangeFocus(() => { - if (this.comboboxAccessibility) { - this.getUI().inputBox.setAttribute('aria-activedescendant', this.getUI().list.getActiveDescendant() || ''); - } - })); - const focusTracker = _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["trackFocus"](container); - this._register(focusTracker); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].FOCUS, e => { - this.previousFocusElement = e.relatedTarget instanceof HTMLElement ? e.relatedTarget : undefined; - }, true)); - this._register(focusTracker.onDidBlur(() => { - if (!this.getUI().ignoreFocusOut && !this.options.ignoreFocusOut()) { - this.hide(); - } - this.previousFocusElement = undefined; - })); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].FOCUS, (e) => { - inputBox.setFocus(); - })); - this._register(_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].KEY_DOWN, (e) => { - const event = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_6__["StandardKeyboardEvent"](e); - switch (event.keyCode) { - case 3 /* Enter */: - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(e, true); - this.onDidAcceptEmitter.fire(); - break; - case 9 /* Escape */: - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(e, true); - this.hide(); - break; - case 2 /* Tab */: - if (!event.altKey && !event.ctrlKey && !event.metaKey) { - const selectors = ['.action-label.codicon']; - if (container.classList.contains('show-checkboxes')) { - selectors.push('input'); - } - else { - selectors.push('input[type=text]'); - } - if (this.getUI().list.isDisplayed()) { - selectors.push('.monaco-list'); - } - const stops = container.querySelectorAll(selectors.join(', ')); - if (event.shiftKey && event.target === stops[0]) { - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(e, true); - stops[stops.length - 1].focus(); - } - else if (!event.shiftKey && event.target === stops[stops.length - 1]) { - _browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(e, true); - stops[0].focus(); - } - } - break; - } - })); - this.ui = { - container, - styleSheet, - leftActionBar, - titleBar, - title, - description, - rightActionBar, - checkAll, - filterContainer, - inputBox, - visibleCountContainer, - visibleCount, - countContainer, - count, - okContainer, - ok, - message, - customButtonContainer, - customButton, - progressBar, - list, - onDidAccept: this.onDidAcceptEmitter.event, - onDidCustom: this.onDidCustomEmitter.event, - onDidTriggerButton: this.onDidTriggerButtonEmitter.event, - ignoreFocusOut: false, - keyMods: this.keyMods, - isScreenReaderOptimized: () => this.options.isScreenReaderOptimized(), - show: controller => this.show(controller), - hide: () => this.hide(), - setVisibilities: visibilities => this.setVisibilities(visibilities), - setComboboxAccessibility: enabled => this.setComboboxAccessibility(enabled), - setEnabled: enabled => this.setEnabled(enabled), - setContextKey: contextKey => this.options.setContextKey(contextKey), - }; - this.updateStyles(); - return this.ui; - } - pick(picks, options = {}, token = _common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None) { - return new Promise((doResolve, reject) => { - let resolve = (result) => { - resolve = doResolve; - if (options.onKeyMods) { - options.onKeyMods(input.keyMods); - } - doResolve(result); - }; - if (token.isCancellationRequested) { - resolve(undefined); - return; - } - const input = this.createQuickPick(); - let activeItem; - const disposables = [ - input, - input.onDidAccept(() => { - if (input.canSelectMany) { - resolve(input.selectedItems.slice()); - input.hide(); - } - else { - const result = input.activeItems[0]; - if (result) { - resolve(result); - input.hide(); - } - } - }), - input.onDidChangeActive(items => { - const focused = items[0]; - if (focused && options.onDidFocus) { - options.onDidFocus(focused); - } - }), - input.onDidChangeSelection(items => { - if (!input.canSelectMany) { - const result = items[0]; - if (result) { - resolve(result); - input.hide(); - } - } - }), - input.onDidTriggerItemButton(event => options.onDidTriggerItemButton && options.onDidTriggerItemButton(Object.assign(Object.assign({}, event), { removeItem: () => { - const index = input.items.indexOf(event.item); - if (index !== -1) { - const items = input.items.slice(); - items.splice(index, 1); - input.items = items; - } - } }))), - input.onDidChangeValue(value => { - if (activeItem && !value && (input.activeItems.length !== 1 || input.activeItems[0] !== activeItem)) { - input.activeItems = [activeItem]; - } - }), - token.onCancellationRequested(() => { - input.hide(); - }), - input.onDidHide(() => { - Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_12__["dispose"])(disposables); - resolve(undefined); - }), - ]; - input.canSelectMany = !!options.canPickMany; - input.placeholder = options.placeHolder; - input.ignoreFocusOut = !!options.ignoreFocusLost; - input.matchOnDescription = !!options.matchOnDescription; - input.matchOnDetail = !!options.matchOnDetail; - input.matchOnLabel = (options.matchOnLabel === undefined) || options.matchOnLabel; // default to true - input.autoFocusOnList = (options.autoFocusOnList === undefined) || options.autoFocusOnList; // default to true - input.quickNavigate = options.quickNavigate; - input.contextKey = options.contextKey; - input.busy = true; - Promise.all([picks, options.activeItem]) - .then(([items, _activeItem]) => { - activeItem = _activeItem; - input.busy = false; - input.items = items; - if (input.canSelectMany) { - input.selectedItems = items.filter(item => item.type !== 'separator' && item.picked); - } - if (activeItem) { - input.activeItems = [activeItem]; - } - }); - input.show(); - Promise.resolve(picks).then(undefined, err => { - reject(err); - input.hide(); - }); - }); - } - createQuickPick() { - const ui = this.getUI(); - return new QuickPick(ui); - } - show(controller) { - const ui = this.getUI(); - this.onShowEmitter.fire(); - const oldController = this.controller; - this.controller = controller; - if (oldController) { - oldController.didHide(); - } - this.setEnabled(true); - ui.leftActionBar.clear(); - ui.title.textContent = ''; - ui.description.textContent = ''; - ui.rightActionBar.clear(); - ui.checkAll.checked = false; - // ui.inputBox.value = ''; Avoid triggering an event. - ui.inputBox.placeholder = ''; - ui.inputBox.password = false; - ui.inputBox.showDecoration(_common_severity_js__WEBPACK_IMPORTED_MODULE_13__["default"].Ignore); - ui.visibleCount.setCount(0); - ui.count.setCount(0); - ui.message.textContent = ''; - ui.progressBar.stop(); - ui.list.setElements([]); - ui.list.matchOnDescription = false; - ui.list.matchOnDetail = false; - ui.list.matchOnLabel = true; - ui.list.sortByLabel = true; - ui.ignoreFocusOut = false; - this.setComboboxAccessibility(false); - ui.inputBox.ariaLabel = ''; - const backKeybindingLabel = this.options.backKeybindingLabel(); - backButton.tooltip = backKeybindingLabel ? Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('quickInput.backWithKeybinding', "Back ({0})", backKeybindingLabel) : Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('quickInput.back', "Back"); - ui.container.style.display = ''; - this.updateLayout(); - ui.inputBox.setFocus(); - } - setVisibilities(visibilities) { - const ui = this.getUI(); - ui.title.style.display = visibilities.title ? '' : 'none'; - ui.description.style.display = visibilities.description ? '' : 'none'; - ui.checkAll.style.display = visibilities.checkAll ? '' : 'none'; - ui.filterContainer.style.display = visibilities.inputBox ? '' : 'none'; - ui.visibleCountContainer.style.display = visibilities.visibleCount ? '' : 'none'; - ui.countContainer.style.display = visibilities.count ? '' : 'none'; - ui.okContainer.style.display = visibilities.ok ? '' : 'none'; - ui.customButtonContainer.style.display = visibilities.customButton ? '' : 'none'; - ui.message.style.display = visibilities.message ? '' : 'none'; - ui.progressBar.getContainer().style.display = visibilities.progressBar ? '' : 'none'; - ui.list.display(!!visibilities.list); - ui.container.classList[visibilities.checkAll ? 'add' : 'remove']('show-checkboxes'); - this.updateLayout(); // TODO - } - setComboboxAccessibility(enabled) { - if (enabled !== this.comboboxAccessibility) { - const ui = this.getUI(); - this.comboboxAccessibility = enabled; - if (this.comboboxAccessibility) { - ui.inputBox.setAttribute('role', 'combobox'); - ui.inputBox.setAttribute('aria-haspopup', 'true'); - ui.inputBox.setAttribute('aria-autocomplete', 'list'); - ui.inputBox.setAttribute('aria-activedescendant', ui.list.getActiveDescendant() || ''); - } - else { - ui.inputBox.removeAttribute('role'); - ui.inputBox.removeAttribute('aria-haspopup'); - ui.inputBox.removeAttribute('aria-autocomplete'); - ui.inputBox.removeAttribute('aria-activedescendant'); - } - } - } - setEnabled(enabled) { - if (enabled !== this.enabled) { - this.enabled = enabled; - for (const item of this.getUI().leftActionBar.viewItems) { - item.getAction().enabled = enabled; - } - for (const item of this.getUI().rightActionBar.viewItems) { - item.getAction().enabled = enabled; - } - this.getUI().checkAll.disabled = !enabled; - // this.getUI().inputBox.enabled = enabled; Avoid loosing focus. - this.getUI().ok.enabled = enabled; - this.getUI().list.enabled = enabled; - } - } - hide() { - var _a; - const controller = this.controller; - if (controller) { - const focusChanged = !((_a = this.ui) === null || _a === void 0 ? void 0 : _a.container.contains(document.activeElement)); - this.controller = null; - this.onHideEmitter.fire(); - this.getUI().container.style.display = 'none'; - if (!focusChanged) { - if (this.previousFocusElement && this.previousFocusElement.offsetParent) { - this.previousFocusElement.focus(); - this.previousFocusElement = undefined; - } - else { - this.options.returnFocus(); - } - } - controller.didHide(); - } - } - layout(dimension, titleBarOffset) { - this.dimension = dimension; - this.titleBarOffset = titleBarOffset; - this.updateLayout(); - } - updateLayout() { - if (this.ui) { - this.ui.container.style.top = `${this.titleBarOffset}px`; - const style = this.ui.container.style; - const width = Math.min(this.dimension.width * 0.62 /* golden cut */, QuickInputController.MAX_WIDTH); - style.width = width + 'px'; - style.marginLeft = '-' + (width / 2) + 'px'; - this.ui.inputBox.layout(); - this.ui.list.layout(this.dimension && this.dimension.height * 0.4); - } - } - applyStyles(styles) { - this.styles = styles; - this.updateStyles(); - } - updateStyles() { - if (this.ui) { - const { quickInputTitleBackground, quickInputBackground, quickInputForeground, contrastBorder, widgetShadow, } = this.styles.widget; - this.ui.titleBar.style.backgroundColor = quickInputTitleBackground ? quickInputTitleBackground.toString() : ''; - this.ui.container.style.backgroundColor = quickInputBackground ? quickInputBackground.toString() : ''; - this.ui.container.style.color = quickInputForeground ? quickInputForeground.toString() : ''; - this.ui.container.style.border = contrastBorder ? `1px solid ${contrastBorder}` : ''; - this.ui.container.style.boxShadow = widgetShadow ? `0 5px 8px ${widgetShadow}` : ''; - this.ui.inputBox.style(this.styles.inputBox); - this.ui.count.style(this.styles.countBadge); - this.ui.ok.style(this.styles.button); - this.ui.customButton.style(this.styles.button); - this.ui.progressBar.style(this.styles.progressBar); - this.ui.list.style(this.styles.list); - const content = []; - if (this.styles.list.listInactiveFocusForeground) { - content.push(`.monaco-list .monaco-list-row.focused { color: ${this.styles.list.listInactiveFocusForeground}; }`); - content.push(`.monaco-list .monaco-list-row.focused:hover { color: ${this.styles.list.listInactiveFocusForeground}; }`); // overwrite :hover style in this case! - } - if (this.styles.list.pickerGroupBorder) { - content.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`); - } - if (this.styles.list.pickerGroupForeground) { - content.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`); - } - const newStyles = content.join('\n'); - if (newStyles !== this.ui.styleSheet.innerHTML) { - this.ui.styleSheet.innerHTML = newStyles; - } - } - } -} -QuickInputController.MAX_WIDTH = 600; // Max total width of quick input widget - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputBox.js ***! - \******************************************************************************************/ -/*! exports provided: QuickInputBox */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputBox", function() { return QuickInputBox; }); -/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"); -/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _browser_ui_inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../browser/ui/inputbox/inputBox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _common_severity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../browser/mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -const $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]; -class QuickInputBox extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(parent) { - super(); - this.parent = parent; - this.onKeyDown = (handler) => { - return _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this.inputBox.inputElement, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].KEY_DOWN, (e) => { - handler(new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__["StandardKeyboardEvent"](e)); - }); - }; - this.onMouseDown = (handler) => { - return _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this.inputBox.inputElement, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_DOWN, (e) => { - handler(new _browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_6__["StandardMouseEvent"](e)); - }); - }; - this.onDidChange = (handler) => { - return this.inputBox.onDidChange(handler); - }; - this.container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.parent, $('.quick-input-box')); - this.inputBox = this._register(new _browser_ui_inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_2__["InputBox"](this.container, undefined)); - } - get value() { - return this.inputBox.value; - } - set value(value) { - this.inputBox.value = value; - } - select(range = null) { - this.inputBox.select(range); - } - isSelectionAtEnd() { - return this.inputBox.isSelectionAtEnd(); - } - get placeholder() { - return this.inputBox.inputElement.getAttribute('placeholder') || ''; - } - set placeholder(placeholder) { - this.inputBox.setPlaceHolder(placeholder); - } - get ariaLabel() { - return this.inputBox.getAriaLabel(); - } - set ariaLabel(ariaLabel) { - this.inputBox.setAriaLabel(ariaLabel); - } - get password() { - return this.inputBox.inputElement.type === 'password'; - } - set password(password) { - this.inputBox.inputElement.type = password ? 'password' : 'text'; - } - setAttribute(name, value) { - this.inputBox.inputElement.setAttribute(name, value); - } - removeAttribute(name) { - this.inputBox.inputElement.removeAttribute(name); - } - showDecoration(decoration) { - if (decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Ignore) { - this.inputBox.hideMessage(); - } - else { - this.inputBox.showMessage({ type: decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Info ? 1 /* INFO */ : decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Warning ? 2 /* WARNING */ : 3 /* ERROR */, content: '' }); - } - } - stylesForType(decoration) { - return this.inputBox.stylesForType(decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Info ? 1 /* INFO */ : decoration === _common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Warning ? 2 /* WARNING */ : 3 /* ERROR */); - } - setFocus() { - this.inputBox.focus(); - } - layout() { - this.inputBox.layout(); - } - style(styles) { - this.inputBox.style(styles); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputList.js ***! - \*******************************************************************************************/ -/*! exports provided: QuickInputListFocus, QuickInputList */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputListFocus", function() { return QuickInputListFocus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputList", function() { return QuickInputList; }); -/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"); -/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_codicon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/codicon.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicon.js"); -/* harmony import */ var _common_comparers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/comparers.js */ "./node_modules/monaco-editor/esm/vs/base/common/comparers.js"); -/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/ui/iconLabel/iconLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js"); -/* harmony import */ var _browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../browser/ui/highlightedlabel/highlightedLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js"); -/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); -/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../browser/ui/actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _quickInputUtils_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./quickInputUtils.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js"); -/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _browser_ui_keybindingLabel_keybindingLabel_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../browser/ui/keybindingLabel/keybindingLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; - - - - - - - - - - - - - - - - - - - -const $ = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]; -class ListElement { - constructor(init) { - this.hidden = false; - this._onChecked = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onChecked = this._onChecked.event; - Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_6__["assign"])(this, init); - } - get checked() { - return !!this._checked; - } - set checked(value) { - if (value !== this._checked) { - this._checked = value; - this._onChecked.fire(value); - } - } - dispose() { - this._onChecked.dispose(); - } -} -class ListElementRenderer { - get templateId() { - return ListElementRenderer.ID; - } - renderTemplate(container) { - const data = Object.create(null); - data.toDisposeElement = []; - data.toDisposeTemplate = []; - data.entry = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](container, $('.quick-input-list-entry')); - // Checkbox - const label = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](data.entry, $('label.quick-input-list-label')); - data.toDisposeTemplate.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](label, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, e => { - if (!data.checkbox.offsetParent) { // If checkbox not visible: - e.preventDefault(); // Prevent toggle of checkbox when it is immediately shown afterwards. #91740 - } - })); - data.checkbox = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](label, $('input.quick-input-list-checkbox')); - data.checkbox.type = 'checkbox'; - data.toDisposeTemplate.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](data.checkbox, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CHANGE, e => { - data.element.checked = data.checkbox.checked; - })); - // Rows - const rows = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](label, $('.quick-input-list-rows')); - const row1 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](rows, $('.quick-input-list-row')); - const row2 = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](rows, $('.quick-input-list-row')); - // Label - data.label = new _browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_8__["IconLabel"](row1, { supportHighlights: true, supportDescriptionHighlights: true, supportCodicons: true }); - // Keybinding - const keybindingContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](row1, $('.quick-input-list-entry-keybinding')); - data.keybinding = new _browser_ui_keybindingLabel_keybindingLabel_js__WEBPACK_IMPORTED_MODULE_17__["KeybindingLabel"](keybindingContainer, _common_platform_js__WEBPACK_IMPORTED_MODULE_12__["OS"]); - // Detail - const detailContainer = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](row2, $('.quick-input-list-label-meta')); - data.detail = new _browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_9__["HighlightedLabel"](detailContainer, true); - // Separator - data.separator = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](data.entry, $('.quick-input-list-separator')); - // Actions - data.actionBar = new _browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_13__["ActionBar"](data.entry); - data.actionBar.domNode.classList.add('quick-input-list-entry-action-bar'); - data.toDisposeTemplate.push(data.actionBar); - return data; - } - renderElement(element, index, data) { - data.toDisposeElement = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(data.toDisposeElement); - data.element = element; - data.checkbox.checked = element.checked; - data.toDisposeElement.push(element.onChecked(checked => data.checkbox.checked = checked)); - const { labelHighlights, descriptionHighlights, detailHighlights } = element; - // Label - const options = Object.create(null); - options.matches = labelHighlights || []; - options.descriptionTitle = element.saneDescription; - options.descriptionMatches = descriptionHighlights || []; - options.extraClasses = element.item.iconClasses; - options.italic = element.item.italic; - options.strikethrough = element.item.strikethrough; - data.label.setLabel(element.saneLabel, element.saneDescription, options); - // Keybinding - data.keybinding.set(element.item.keybinding); - // Meta - data.detail.set(element.saneDetail, detailHighlights); - // Separator - if (element.separator && element.separator.label) { - data.separator.textContent = element.separator.label; - data.separator.style.display = ''; - } - else { - data.separator.style.display = 'none'; - } - if (element.separator) { - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](data.entry, 'quick-input-list-separator-border'); - } - else { - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](data.entry, 'quick-input-list-separator-border'); - } - // Actions - data.actionBar.clear(); - const buttons = element.item.buttons; - if (buttons && buttons.length) { - data.actionBar.push(buttons.map((button, index) => { - let cssClasses = button.iconClass || (button.iconPath ? Object(_quickInputUtils_js__WEBPACK_IMPORTED_MODULE_15__["getIconClass"])(button.iconPath) : undefined); - if (button.alwaysVisible) { - cssClasses = cssClasses ? `${cssClasses} always-visible` : 'always-visible'; - } - const action = new _common_actions_js__WEBPACK_IMPORTED_MODULE_14__["Action"](`id-${index}`, '', cssClasses, true, () => { - element.fireButtonTriggered({ - button, - item: element.item - }); - return Promise.resolve(); - }); - action.tooltip = button.tooltip || ''; - return action; - }), { icon: true, label: false }); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](data.entry, 'has-actions'); - } - else { - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](data.entry, 'has-actions'); - } - } - disposeElement(element, index, data) { - data.toDisposeElement = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(data.toDisposeElement); - } - disposeTemplate(data) { - data.toDisposeElement = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(data.toDisposeElement); - data.toDisposeTemplate = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(data.toDisposeTemplate); - } -} -ListElementRenderer.ID = 'listelement'; -class ListElementDelegate { - getHeight(element) { - return element.saneDetail ? 44 : 22; - } - getTemplateId(element) { - return ListElementRenderer.ID; - } -} -var QuickInputListFocus; -(function (QuickInputListFocus) { - QuickInputListFocus[QuickInputListFocus["First"] = 1] = "First"; - QuickInputListFocus[QuickInputListFocus["Second"] = 2] = "Second"; - QuickInputListFocus[QuickInputListFocus["Last"] = 3] = "Last"; - QuickInputListFocus[QuickInputListFocus["Next"] = 4] = "Next"; - QuickInputListFocus[QuickInputListFocus["Previous"] = 5] = "Previous"; - QuickInputListFocus[QuickInputListFocus["NextPage"] = 6] = "NextPage"; - QuickInputListFocus[QuickInputListFocus["PreviousPage"] = 7] = "PreviousPage"; -})(QuickInputListFocus || (QuickInputListFocus = {})); -class QuickInputList { - constructor(parent, id, options) { - this.parent = parent; - this.inputElements = []; - this.elements = []; - this.elementsToIndexes = new Map(); - this.matchOnDescription = false; - this.matchOnDetail = false; - this.matchOnLabel = true; - this.sortByLabel = true; - this._onChangedAllVisibleChecked = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onChangedAllVisibleChecked = this._onChangedAllVisibleChecked.event; - this._onChangedCheckedCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onChangedCheckedCount = this._onChangedCheckedCount.event; - this._onChangedVisibleCount = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onChangedVisibleCount = this._onChangedVisibleCount.event; - this._onChangedCheckedElements = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onChangedCheckedElements = this._onChangedCheckedElements.event; - this._onButtonTriggered = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onButtonTriggered = this._onButtonTriggered.event; - this._onKeyDown = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onKeyDown = this._onKeyDown.event; - this._onLeave = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onLeave = this._onLeave.event; - this._fireCheckedEvents = true; - this.elementDisposables = []; - this.disposables = []; - this.id = id; - this.container = _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.parent, $('.quick-input-list')); - const delegate = new ListElementDelegate(); - const accessibilityProvider = new QuickInputAccessibilityProvider(); - this.list = options.createList('QuickInput', this.container, delegate, [new ListElementRenderer()], { - identityProvider: { getId: element => element.saneLabel }, - setRowLineHeight: false, - multipleSelectionSupport: false, - horizontalScrolling: false, - accessibilityProvider - }); - this.list.getHTMLElement().id = id; - this.disposables.push(this.list); - this.disposables.push(this.list.onKeyDown(e => { - const event = new _browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_7__["StandardKeyboardEvent"](e); - switch (event.keyCode) { - case 10 /* Space */: - this.toggleCheckbox(); - break; - case 31 /* KEY_A */: - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_12__["isMacintosh"] ? e.metaKey : e.ctrlKey) { - this.list.setFocus(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__["range"])(this.list.length)); - } - break; - case 16 /* UpArrow */: - const focus1 = this.list.getFocus(); - if (focus1.length === 1 && focus1[0] === 0) { - this._onLeave.fire(); - } - break; - case 18 /* DownArrow */: - const focus2 = this.list.getFocus(); - if (focus2.length === 1 && focus2[0] === this.list.length - 1) { - this._onLeave.fire(); - } - break; - } - this._onKeyDown.fire(event); - })); - this.disposables.push(this.list.onMouseDown(e => { - if (e.browserEvent.button !== 2) { - // Works around / fixes #64350. - e.browserEvent.preventDefault(); - } - })); - this.disposables.push(_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this.container, _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, e => { - if (e.x || e.y) { // Avoid 'click' triggered by 'space' on checkbox. - this._onLeave.fire(); - } - })); - this.disposables.push(this.list.onMouseMiddleClick(e => { - this._onLeave.fire(); - })); - this.disposables.push(this.list.onContextMenu(e => { - if (typeof e.index === 'number') { - e.browserEvent.preventDefault(); - // we want to treat a context menu event as - // a gesture to open the item at the index - // since we do not have any context menu - // this enables for example macOS to Ctrl- - // click on an item to open it. - this.list.setSelection([e.index]); - } - })); - this.disposables.push(this._onChangedAllVisibleChecked, this._onChangedCheckedCount, this._onChangedVisibleCount, this._onChangedCheckedElements, this._onButtonTriggered, this._onLeave, this._onKeyDown); - } - get onDidChangeFocus() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Event"].map(this.list.onDidChangeFocus, e => e.elements.map(e => e.item)); - } - get onDidChangeSelection() { - return _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Event"].map(this.list.onDidChangeSelection, e => ({ items: e.elements.map(e => e.item), event: e.browserEvent })); - } - getAllVisibleChecked() { - return this.allVisibleChecked(this.elements, false); - } - allVisibleChecked(elements, whenNoneVisible = true) { - for (let i = 0, n = elements.length; i < n; i++) { - const element = elements[i]; - if (!element.hidden) { - if (!element.checked) { - return false; - } - else { - whenNoneVisible = true; - } - } - } - return whenNoneVisible; - } - getCheckedCount() { - let count = 0; - const elements = this.elements; - for (let i = 0, n = elements.length; i < n; i++) { - if (elements[i].checked) { - count++; - } - } - return count; - } - getVisibleCount() { - let count = 0; - const elements = this.elements; - for (let i = 0, n = elements.length; i < n; i++) { - if (!elements[i].hidden) { - count++; - } - } - return count; - } - setAllVisibleChecked(checked) { - try { - this._fireCheckedEvents = false; - this.elements.forEach(element => { - if (!element.hidden) { - element.checked = checked; - } - }); - } - finally { - this._fireCheckedEvents = true; - this.fireCheckedEvents(); - } - } - setElements(inputElements) { - this.elementDisposables = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this.elementDisposables); - const fireButtonTriggered = (event) => this.fireButtonTriggered(event); - this.inputElements = inputElements; - this.elements = inputElements.reduce((result, item, index) => { - var _a, _b, _c; - if (item.type !== 'separator') { - const previous = index && inputElements[index - 1]; - const saneLabel = item.label && item.label.replace(/\r?\n/g, ' '); - const saneDescription = item.description && item.description.replace(/\r?\n/g, ' '); - const saneDetail = item.detail && item.detail.replace(/\r?\n/g, ' '); - const saneAriaLabel = item.ariaLabel || [saneLabel, saneDescription, saneDetail] - .map(s => s && Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["parseCodicons"])(s).text) - .filter(s => !!s) - .join(', '); - result.push(new ListElement({ - index, - item, - saneLabel, - saneAriaLabel, - saneDescription, - saneDetail, - labelHighlights: (_a = item.highlights) === null || _a === void 0 ? void 0 : _a.label, - descriptionHighlights: (_b = item.highlights) === null || _b === void 0 ? void 0 : _b.description, - detailHighlights: (_c = item.highlights) === null || _c === void 0 ? void 0 : _c.detail, - checked: false, - separator: previous && previous.type === 'separator' ? previous : undefined, - fireButtonTriggered - })); - } - return result; - }, []); - this.elementDisposables.push(...this.elements); - this.elementDisposables.push(...this.elements.map(element => element.onChecked(() => this.fireCheckedEvents()))); - this.elementsToIndexes = this.elements.reduce((map, element, index) => { - map.set(element.item, index); - return map; - }, new Map()); - this.list.splice(0, this.list.length); // Clear focus and selection first, sending the events when the list is empty. - this.list.splice(0, this.list.length, this.elements); - this._onChangedVisibleCount.fire(this.elements.length); - } - getFocusedElements() { - return this.list.getFocusedElements() - .map(e => e.item); - } - setFocusedElements(items) { - this.list.setFocus(items - .filter(item => this.elementsToIndexes.has(item)) - .map(item => this.elementsToIndexes.get(item))); - if (items.length > 0) { - const focused = this.list.getFocus()[0]; - if (typeof focused === 'number') { - this.list.reveal(focused); - } - } - } - getActiveDescendant() { - return this.list.getHTMLElement().getAttribute('aria-activedescendant'); - } - setSelectedElements(items) { - this.list.setSelection(items - .filter(item => this.elementsToIndexes.has(item)) - .map(item => this.elementsToIndexes.get(item))); - } - getCheckedElements() { - return this.elements.filter(e => e.checked) - .map(e => e.item); - } - setCheckedElements(items) { - try { - this._fireCheckedEvents = false; - const checked = new Set(); - for (const item of items) { - checked.add(item); - } - for (const element of this.elements) { - element.checked = checked.has(element.item); - } - } - finally { - this._fireCheckedEvents = true; - this.fireCheckedEvents(); - } - } - set enabled(value) { - this.list.getHTMLElement().style.pointerEvents = value ? '' : 'none'; - } - focus(what) { - if (!this.list.length) { - return; - } - if (what === QuickInputListFocus.Next && this.list.getFocus()[0] === this.list.length - 1) { - what = QuickInputListFocus.First; - } - if (what === QuickInputListFocus.Previous && this.list.getFocus()[0] === 0) { - what = QuickInputListFocus.Last; - } - if (what === QuickInputListFocus.Second && this.list.length < 2) { - what = QuickInputListFocus.First; - } - switch (what) { - case QuickInputListFocus.First: - this.list.focusFirst(); - break; - case QuickInputListFocus.Second: - this.list.focusNth(1); - break; - case QuickInputListFocus.Last: - this.list.focusLast(); - break; - case QuickInputListFocus.Next: - this.list.focusNext(); - break; - case QuickInputListFocus.Previous: - this.list.focusPrevious(); - break; - case QuickInputListFocus.NextPage: - this.list.focusNextPage(); - break; - case QuickInputListFocus.PreviousPage: - this.list.focusPreviousPage(); - break; - } - const focused = this.list.getFocus()[0]; - if (typeof focused === 'number') { - this.list.reveal(focused); - } - } - clearFocus() { - this.list.setFocus([]); - } - domFocus() { - this.list.domFocus(); - } - layout(maxHeight) { - this.list.getHTMLElement().style.maxHeight = maxHeight ? `calc(${Math.floor(maxHeight / 44) * 44}px)` : ''; - this.list.layout(); - } - filter(query) { - if (!(this.sortByLabel || this.matchOnLabel || this.matchOnDescription || this.matchOnDetail)) { - this.list.layout(); - return false; - } - query = query.trim(); - // Reset filtering - if (!query || !(this.matchOnLabel || this.matchOnDescription || this.matchOnDetail)) { - this.elements.forEach(element => { - element.labelHighlights = undefined; - element.descriptionHighlights = undefined; - element.detailHighlights = undefined; - element.hidden = false; - const previous = element.index && this.inputElements[element.index - 1]; - element.separator = previous && previous.type === 'separator' ? previous : undefined; - }); - } - // Filter by value (since we support codicons, use codicon aware fuzzy matching) - else { - this.elements.forEach(element => { - const labelHighlights = this.matchOnLabel ? Object(_common_types_js__WEBPACK_IMPORTED_MODULE_16__["withNullAsUndefined"])(Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["matchesFuzzyCodiconAware"])(query, Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["parseCodicons"])(element.saneLabel))) : undefined; - const descriptionHighlights = this.matchOnDescription ? Object(_common_types_js__WEBPACK_IMPORTED_MODULE_16__["withNullAsUndefined"])(Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["matchesFuzzyCodiconAware"])(query, Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["parseCodicons"])(element.saneDescription || ''))) : undefined; - const detailHighlights = this.matchOnDetail ? Object(_common_types_js__WEBPACK_IMPORTED_MODULE_16__["withNullAsUndefined"])(Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["matchesFuzzyCodiconAware"])(query, Object(_common_codicon_js__WEBPACK_IMPORTED_MODULE_3__["parseCodicons"])(element.saneDetail || ''))) : undefined; - if (labelHighlights || descriptionHighlights || detailHighlights) { - element.labelHighlights = labelHighlights; - element.descriptionHighlights = descriptionHighlights; - element.detailHighlights = detailHighlights; - element.hidden = false; - } - else { - element.labelHighlights = undefined; - element.descriptionHighlights = undefined; - element.detailHighlights = undefined; - element.hidden = !element.item.alwaysShow; - } - element.separator = undefined; - }); - } - const shownElements = this.elements.filter(element => !element.hidden); - // Sort by value - if (this.sortByLabel && query) { - const normalizedSearchValue = query.toLowerCase(); - shownElements.sort((a, b) => { - return compareEntries(a, b, normalizedSearchValue); - }); - } - this.elementsToIndexes = shownElements.reduce((map, element, index) => { - map.set(element.item, index); - return map; - }, new Map()); - this.list.splice(0, this.list.length, shownElements); - this.list.setFocus([]); - this.list.layout(); - this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()); - this._onChangedVisibleCount.fire(shownElements.length); - return true; - } - toggleCheckbox() { - try { - this._fireCheckedEvents = false; - const elements = this.list.getFocusedElements(); - const allChecked = this.allVisibleChecked(elements); - for (const element of elements) { - element.checked = !allChecked; - } - } - finally { - this._fireCheckedEvents = true; - this.fireCheckedEvents(); - } - } - display(display) { - this.container.style.display = display ? '' : 'none'; - } - isDisplayed() { - return this.container.style.display !== 'none'; - } - dispose() { - this.elementDisposables = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this.elementDisposables); - this.disposables = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this.disposables); - } - fireCheckedEvents() { - if (this._fireCheckedEvents) { - this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()); - this._onChangedCheckedCount.fire(this.getCheckedCount()); - this._onChangedCheckedElements.fire(this.getCheckedElements()); - } - } - fireButtonTriggered(event) { - this._onButtonTriggered.fire(event); - } - style(styles) { - this.list.style(styles); - } -} -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], QuickInputList.prototype, "onDidChangeFocus", null); -__decorate([ - _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] -], QuickInputList.prototype, "onDidChangeSelection", null); -function compareEntries(elementA, elementB, lookFor) { - const labelHighlightsA = elementA.labelHighlights || []; - const labelHighlightsB = elementB.labelHighlights || []; - if (labelHighlightsA.length && !labelHighlightsB.length) { - return -1; - } - if (!labelHighlightsA.length && labelHighlightsB.length) { - return 1; - } - if (labelHighlightsA.length === 0 && labelHighlightsB.length === 0) { - return 0; - } - return Object(_common_comparers_js__WEBPACK_IMPORTED_MODULE_4__["compareAnything"])(elementA.saneLabel, elementB.saneLabel, lookFor); -} -class QuickInputAccessibilityProvider { - getWidgetAriaLabel() { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_18__["localize"])('quickInput', "Quick Input"); - } - getAriaLabel(element) { - return element.saneAriaLabel; - } - getWidgetRole() { - return 'listbox'; - } - getRole() { - return 'option'; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInputUtils.js ***! - \********************************************************************************************/ -/*! exports provided: getIconClass */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIconClass", function() { return getIconClass; }); -/* harmony import */ var _media_quickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/quickInput.css */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css"); -/* harmony import */ var _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const iconPathToClass = {}; -const iconClassGenerator = new _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_2__["IdGenerator"]('quick-input-button-icon-'); -function getIconClass(iconPath) { - if (!iconPath) { - return undefined; - } - let iconClass; - const key = iconPath.dark.toString(); - if (iconPathToClass[key]) { - iconClass = iconPathToClass[key]; - } - else { - iconClass = iconClassGenerator.nextId(); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["createCSSRule"](`.${iconClass}`, `background-image: ${_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["asCSSUrl"](iconPath.light || iconPath.dark)}`); - _browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["createCSSRule"](`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: ${_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["asCSSUrl"](iconPath.dark)}`); - iconPathToClass[key] = iconClass; - } - return iconClass; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js ***! - \**************************************************************************************/ -/*! exports provided: NO_KEY_MODS, ItemActivation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_KEY_MODS", function() { return NO_KEY_MODS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ItemActivation", function() { return ItemActivation; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const NO_KEY_MODS = { ctrlCmd: false, alt: false }; -var ItemActivation; -(function (ItemActivation) { - ItemActivation[ItemActivation["NONE"] = 0] = "NONE"; - ItemActivation[ItemActivation["FIRST"] = 1] = "FIRST"; - ItemActivation[ItemActivation["SECOND"] = 2] = "SECOND"; - ItemActivation[ItemActivation["LAST"] = 3] = "LAST"; -})(ItemActivation || (ItemActivation = {})); -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js ***! - \*******************************************************************************/ -/*! exports provided: DefaultWorkerFactory */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultWorkerFactory", function() { return DefaultWorkerFactory; }); -/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/worker/simpleWorker.js */ "./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -function getWorker(workerId, label) { - // Option for hosts to overwrite the worker script (used in the standalone editor) - if (_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].MonacoEnvironment) { - if (typeof _common_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].MonacoEnvironment.getWorker === 'function') { - return _common_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].MonacoEnvironment.getWorker(workerId, label); - } - if (typeof _common_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].MonacoEnvironment.getWorkerUrl === 'function') { - return new Worker(_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["globals"].MonacoEnvironment.getWorkerUrl(workerId, label)); - } - } - // ESM-comment-begin - // if (typeof require === 'function') { - // // check if the JS lives on a different origin - // const workerMain = require.toUrl('./' + workerId); - // const workerUrl = getWorkerBootstrapUrl(workerMain, label); - // return new Worker(workerUrl, { name: label }); - // } - // ESM-comment-end - throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`); -} -// ESM-comment-begin -// export function getWorkerBootstrapUrl(scriptPath: string, label: string, forceDataUri: boolean = false): string { -// if (forceDataUri || /^((http:)|(https:)|(file:))/.test(scriptPath)) { -// const currentUrl = String(window.location); -// const currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length); -// if (forceDataUri || scriptPath.substring(0, currentOrigin.length) !== currentOrigin) { -// // this is the cross-origin case -// // i.e. the webpage is running at a different origin than where the scripts are loaded from -// const myPath = 'vs/base/worker/defaultWorkerFactory.js'; -// const workerBaseUrl = require.toUrl(myPath).slice(0, -myPath.length); -// const js = `/*${label}*/self.MonacoEnvironment={baseUrl: '${workerBaseUrl}'};importScripts('${scriptPath}');/*${label}*/`; -// if (forceDataUri) { -// const url = `data:text/javascript;charset=utf-8,${encodeURIComponent(js)}`; -// return url; -// } -// const blob = new Blob([js], { type: 'application/javascript' }); -// return URL.createObjectURL(blob); -// } -// } -// return scriptPath + '#' + label; -// } -// ESM-comment-end -function isPromiseLike(obj) { - if (typeof obj.then === 'function') { - return true; - } - return false; -} -/** - * A worker that uses HTML5 web workers so that is has - * its own global scope and its own thread. - */ -class WebWorker { - constructor(moduleId, id, label, onMessageCallback, onErrorCallback) { - this.id = id; - const workerOrPromise = getWorker('workerMain.js', label); - if (isPromiseLike(workerOrPromise)) { - this.worker = workerOrPromise; - } - else { - this.worker = Promise.resolve(workerOrPromise); - } - this.postMessage(moduleId, []); - this.worker.then((w) => { - w.onmessage = function (ev) { - onMessageCallback(ev.data); - }; - w.onmessageerror = onErrorCallback; - if (typeof w.addEventListener === 'function') { - w.addEventListener('error', onErrorCallback); - } - }); - } - getId() { - return this.id; - } - postMessage(message, transfer) { - if (this.worker) { - this.worker.then(w => w.postMessage(message, transfer)); - } - } - dispose() { - if (this.worker) { - this.worker.then(w => w.terminate()); - } - this.worker = null; - } -} -class DefaultWorkerFactory { - constructor(label) { - this._label = label; - this._webWorkerFailedBeforeError = false; - } - create(moduleId, onMessageCallback, onErrorCallback) { - let workerId = (++DefaultWorkerFactory.LAST_WORKER_ID); - if (this._webWorkerFailedBeforeError) { - throw this._webWorkerFailedBeforeError; - } - return new WebWorker(moduleId, workerId, this._label || 'anonymous' + workerId, onMessageCallback, (err) => { - Object(_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_1__["logOnceWebWorkerWarning"])(err); - this._webWorkerFailedBeforeError = err; - onErrorCallback(err); - }); - } -} -DefaultWorkerFactory.LAST_WORKER_ID = 0; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js ***! - \*****************************************************************************/ -/*! exports provided: loadLanguage, registerLanguage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadLanguage", function() { return loadLanguage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLanguage", function() { return registerLanguage; }); -/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var languageDefinitions = {}; -var lazyLanguageLoaders = {}; -var LazyLanguageLoader = /** @class */ (function () { - function LazyLanguageLoader(languageId) { - var _this = this; - this._languageId = languageId; - this._loadingTriggered = false; - this._lazyLoadPromise = new Promise(function (resolve, reject) { - _this._lazyLoadPromiseResolve = resolve; - _this._lazyLoadPromiseReject = reject; - }); - } - LazyLanguageLoader.getOrCreate = function (languageId) { - if (!lazyLanguageLoaders[languageId]) { - lazyLanguageLoaders[languageId] = new LazyLanguageLoader(languageId); - } - return lazyLanguageLoaders[languageId]; - }; - LazyLanguageLoader.prototype.whenLoaded = function () { - return this._lazyLoadPromise; - }; - LazyLanguageLoader.prototype.load = function () { - var _this = this; - if (!this._loadingTriggered) { - this._loadingTriggered = true; - languageDefinitions[this._languageId].loader().then(function (mod) { return _this._lazyLoadPromiseResolve(mod); }, function (err) { return _this._lazyLoadPromiseReject(err); }); - } - return this._lazyLoadPromise; - }; - return LazyLanguageLoader; -}()); -function loadLanguage(languageId) { - return LazyLanguageLoader.getOrCreate(languageId).load(); -} -function registerLanguage(def) { - var languageId = def.id; - languageDefinitions[languageId] = def; - _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__["languages"].register(def); - var lazyLanguageLoader = LazyLanguageLoader.getOrCreate(languageId); - _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__["languages"].setMonarchTokensProvider(languageId, lazyLanguageLoader.whenLoaded().then(function (mod) { return mod.language; })); - _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__["languages"].onLanguage(languageId, function () { - lazyLanguageLoader.load().then(function (mod) { - _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__["languages"].setLanguageConfiguration(languageId, mod.conf); - }); - }); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'abap', - extensions: ['.abap'], - aliases: ['abap', 'ABAP'], - loader: function () { return __webpack_require__.e(/*! import() */ 7).then(__webpack_require__.bind(null, /*! ./abap.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'apex', - extensions: ['.cls'], - aliases: ['Apex', 'apex'], - mimetypes: ['text/x-apex-source', 'text/x-apex'], - loader: function () { return __webpack_require__.e(/*! import() */ 8).then(__webpack_require__.bind(null, /*! ./apex.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'azcli', - extensions: ['.azcli'], - aliases: ['Azure CLI', 'azcli'], - loader: function () { return __webpack_require__.e(/*! import() */ 9).then(__webpack_require__.bind(null, /*! ./azcli.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'bat', - extensions: ['.bat', '.cmd'], - aliases: ['Batch', 'bat'], - loader: function () { return __webpack_require__.e(/*! import() */ 10).then(__webpack_require__.bind(null, /*! ./bat.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'cameligo', - extensions: ['.mligo'], - aliases: ['Cameligo'], - loader: function () { return __webpack_require__.e(/*! import() */ 11).then(__webpack_require__.bind(null, /*! ./cameligo.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js ***! - \*******************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'clojure', - extensions: ['.clj', '.cljs', '.cljc', '.edn'], - aliases: ['clojure', 'Clojure'], - loader: function () { return __webpack_require__.e(/*! import() */ 12).then(__webpack_require__.bind(null, /*! ./clojure.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'coffeescript', - extensions: ['.coffee'], - aliases: ['CoffeeScript', 'coffeescript', 'coffee'], - mimetypes: ['text/x-coffeescript', 'text/coffeescript'], - loader: function () { return __webpack_require__.e(/*! import() */ 13).then(__webpack_require__.bind(null, /*! ./coffee.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'c', - extensions: ['.c', '.h'], - aliases: ['C', 'c'], - loader: function () { return __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ./cpp.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js")); } -}); -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'cpp', - extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'], - aliases: ['C++', 'Cpp', 'cpp'], - loader: function () { return __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ./cpp.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'csharp', - extensions: ['.cs', '.csx', '.cake'], - aliases: ['C#', 'csharp'], - loader: function () { return __webpack_require__.e(/*! import() */ 14).then(__webpack_require__.bind(null, /*! ./csharp.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'csp', - extensions: [], - aliases: ['CSP', 'csp'], - loader: function () { return __webpack_require__.e(/*! import() */ 15).then(__webpack_require__.bind(null, /*! ./csp.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'css', - extensions: ['.css'], - aliases: ['CSS', 'css'], - mimetypes: ['text/css'], - loader: function () { return __webpack_require__.e(/*! import() */ 16).then(__webpack_require__.bind(null, /*! ./css.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/css/css.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'dart', - extensions: ['.dart'], - aliases: ['Dart', 'dart'], - mimetypes: ['text/x-dart-source', 'text/x-dart'], - loader: function () { return __webpack_require__.e(/*! import() */ 17).then(__webpack_require__.bind(null, /*! ./dart.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'dockerfile', - extensions: ['.dockerfile'], - filenames: ['Dockerfile'], - aliases: ['Dockerfile'], - loader: function () { return __webpack_require__.e(/*! import() */ 18).then(__webpack_require__.bind(null, /*! ./dockerfile.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/fillers/monaco-editor-core.js ***! - \*****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'fsharp', - extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'], - aliases: ['F#', 'FSharp', 'fsharp'], - loader: function () { return __webpack_require__.e(/*! import() */ 19).then(__webpack_require__.bind(null, /*! ./fsharp.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js ***! - \*********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'go', - extensions: ['.go'], - aliases: ['Go'], - loader: function () { return __webpack_require__.e(/*! import() */ 20).then(__webpack_require__.bind(null, /*! ./go.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/go/go.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js ***! - \*******************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'graphql', - extensions: ['.graphql', '.gql'], - aliases: ['GraphQL', 'graphql', 'gql'], - mimetypes: ['application/graphql'], - loader: function () { return __webpack_require__.e(/*! import() */ 21).then(__webpack_require__.bind(null, /*! ./graphql.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'handlebars', - extensions: ['.handlebars', '.hbs'], - aliases: ['Handlebars', 'handlebars'], - mimetypes: ['text/x-handlebars-template'], - loader: function () { return __webpack_require__.e(/*! import() */ 22).then(__webpack_require__.bind(null, /*! ./handlebars.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'hcl', - extensions: ['.tf', '.tfvars', '.hcl'], - aliases: ['Terraform', 'tf', 'HCL', 'hcl'], - loader: function () { return __webpack_require__.e(/*! import() */ 23).then(__webpack_require__.bind(null, /*! ./hcl.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'html', - extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'], - aliases: ['HTML', 'htm', 'html', 'xhtml'], - mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'], - loader: function () { return __webpack_require__.e(/*! import() */ 24).then(__webpack_require__.bind(null, /*! ./html.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/html/html.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'ini', - extensions: ['.ini', '.properties', '.gitconfig'], - filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'], - aliases: ['Ini', 'ini'], - loader: function () { return __webpack_require__.e(/*! import() */ 25).then(__webpack_require__.bind(null, /*! ./ini.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'java', - extensions: ['.java', '.jav'], - aliases: ['Java', 'java'], - mimetypes: ['text/x-java-source', 'text/x-java'], - loader: function () { return __webpack_require__.e(/*! import() */ 26).then(__webpack_require__.bind(null, /*! ./java.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/java/java.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'javascript', - extensions: ['.js', '.es6', '.jsx', '.mjs'], - firstLine: '^#!.*\\bnode', - filenames: ['jakefile'], - aliases: ['JavaScript', 'javascript', 'js'], - mimetypes: ['text/javascript'], - loader: function () { return __webpack_require__.e(/*! import() */ 6).then(__webpack_require__.bind(null, /*! ./javascript.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'julia', - extensions: ['.jl'], - aliases: ['julia', 'Julia'], - loader: function () { return __webpack_require__.e(/*! import() */ 27).then(__webpack_require__.bind(null, /*! ./julia.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'kotlin', - extensions: ['.kt'], - aliases: ['Kotlin', 'kotlin'], - mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'], - loader: function () { return __webpack_require__.e(/*! import() */ 28).then(__webpack_require__.bind(null, /*! ./kotlin.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'less', - extensions: ['.less'], - aliases: ['Less', 'less'], - mimetypes: ['text/x-less', 'text/less'], - loader: function () { return __webpack_require__.e(/*! import() */ 29).then(__webpack_require__.bind(null, /*! ./less.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/less/less.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'lexon', - extensions: ['.lex'], - aliases: ['Lexon'], - loader: function () { return __webpack_require__.e(/*! import() */ 30).then(__webpack_require__.bind(null, /*! ./lexon.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'lua', - extensions: ['.lua'], - aliases: ['Lua', 'lua'], - loader: function () { return __webpack_require__.e(/*! import() */ 31).then(__webpack_require__.bind(null, /*! ./lua.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'markdown', - extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'], - aliases: ['Markdown', 'markdown'], - loader: function () { return __webpack_require__.e(/*! import() */ 32).then(__webpack_require__.bind(null, /*! ./markdown.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'mips', - extensions: ['.s'], - aliases: ['MIPS', 'MIPS-V'], - mimetypes: ['text/x-mips', 'text/mips', 'text/plaintext'], - loader: function () { return __webpack_require__.e(/*! import() */ 33).then(__webpack_require__.bind(null, /*! ./mips.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js ***! - \**********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _abap_abap_contribution_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abap/abap.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.contribution.js"); -/* harmony import */ var _apex_apex_contribution_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apex/apex.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.contribution.js"); -/* harmony import */ var _azcli_azcli_contribution_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./azcli/azcli.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.contribution.js"); -/* harmony import */ var _bat_bat_contribution_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bat/bat.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.contribution.js"); -/* harmony import */ var _cameligo_cameligo_contribution_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cameligo/cameligo.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.contribution.js"); -/* harmony import */ var _clojure_clojure_contribution_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clojure/clojure.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.contribution.js"); -/* harmony import */ var _coffee_coffee_contribution_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coffee/coffee.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.contribution.js"); -/* harmony import */ var _cpp_cpp_contribution_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cpp/cpp.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution.js"); -/* harmony import */ var _csharp_csharp_contribution_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./csharp/csharp.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution.js"); -/* harmony import */ var _csp_csp_contribution_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./csp/csp.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.contribution.js"); -/* harmony import */ var _css_css_contribution_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./css/css.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/css/css.contribution.js"); -/* harmony import */ var _dart_dart_contribution_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./dart/dart.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.contribution.js"); -/* harmony import */ var _dockerfile_dockerfile_contribution_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./dockerfile/dockerfile.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.contribution.js"); -/* harmony import */ var _fsharp_fsharp_contribution_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./fsharp/fsharp.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.contribution.js"); -/* harmony import */ var _go_go_contribution_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./go/go.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/go/go.contribution.js"); -/* harmony import */ var _graphql_graphql_contribution_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./graphql/graphql.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.contribution.js"); -/* harmony import */ var _handlebars_handlebars_contribution_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./handlebars/handlebars.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.contribution.js"); -/* harmony import */ var _hcl_hcl_contribution_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./hcl/hcl.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.contribution.js"); -/* harmony import */ var _html_html_contribution_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./html/html.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/html/html.contribution.js"); -/* harmony import */ var _ini_ini_contribution_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ini/ini.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.contribution.js"); -/* harmony import */ var _java_java_contribution_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./java/java.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/java/java.contribution.js"); -/* harmony import */ var _javascript_javascript_contribution_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./javascript/javascript.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution.js"); -/* harmony import */ var _julia_julia_contribution_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./julia/julia.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.contribution.js"); -/* harmony import */ var _kotlin_kotlin_contribution_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./kotlin/kotlin.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution.js"); -/* harmony import */ var _less_less_contribution_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./less/less.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/less/less.contribution.js"); -/* harmony import */ var _lexon_lexon_contribution_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./lexon/lexon.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.contribution.js"); -/* harmony import */ var _lua_lua_contribution_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./lua/lua.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.contribution.js"); -/* harmony import */ var _markdown_markdown_contribution_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./markdown/markdown.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution.js"); -/* harmony import */ var _mips_mips_contribution_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./mips/mips.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/mips/mips.contribution.js"); -/* harmony import */ var _msdax_msdax_contribution_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./msdax/msdax.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js"); -/* harmony import */ var _mysql_mysql_contribution_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./mysql/mysql.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js"); -/* harmony import */ var _objective_c_objective_c_contribution_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./objective-c/objective-c.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js"); -/* harmony import */ var _pascal_pascal_contribution_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./pascal/pascal.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js"); -/* harmony import */ var _pascaligo_pascaligo_contribution_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./pascaligo/pascaligo.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js"); -/* harmony import */ var _perl_perl_contribution_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./perl/perl.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js"); -/* harmony import */ var _pgsql_pgsql_contribution_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./pgsql/pgsql.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js"); -/* harmony import */ var _php_php_contribution_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./php/php.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js"); -/* harmony import */ var _postiats_postiats_contribution_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./postiats/postiats.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js"); -/* harmony import */ var _powerquery_powerquery_contribution_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./powerquery/powerquery.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js"); -/* harmony import */ var _powershell_powershell_contribution_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./powershell/powershell.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js"); -/* harmony import */ var _pug_pug_contribution_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./pug/pug.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js"); -/* harmony import */ var _python_python_contribution_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./python/python.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js"); -/* harmony import */ var _r_r_contribution_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./r/r.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js"); -/* harmony import */ var _razor_razor_contribution_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./razor/razor.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js"); -/* harmony import */ var _redis_redis_contribution_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./redis/redis.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js"); -/* harmony import */ var _redshift_redshift_contribution_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./redshift/redshift.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js"); -/* harmony import */ var _restructuredtext_restructuredtext_contribution_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./restructuredtext/restructuredtext.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js"); -/* harmony import */ var _ruby_ruby_contribution_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./ruby/ruby.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js"); -/* harmony import */ var _rust_rust_contribution_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./rust/rust.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js"); -/* harmony import */ var _sb_sb_contribution_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./sb/sb.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js"); -/* harmony import */ var _scala_scala_contribution_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./scala/scala.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js"); -/* harmony import */ var _scheme_scheme_contribution_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./scheme/scheme.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js"); -/* harmony import */ var _scss_scss_contribution_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./scss/scss.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js"); -/* harmony import */ var _shell_shell_contribution_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./shell/shell.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js"); -/* harmony import */ var _solidity_solidity_contribution_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./solidity/solidity.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js"); -/* harmony import */ var _sophia_sophia_contribution_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./sophia/sophia.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js"); -/* harmony import */ var _sql_sql_contribution_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./sql/sql.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js"); -/* harmony import */ var _st_st_contribution_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./st/st.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js"); -/* harmony import */ var _swift_swift_contribution_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./swift/swift.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js"); -/* harmony import */ var _systemverilog_systemverilog_contribution_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./systemverilog/systemverilog.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js"); -/* harmony import */ var _tcl_tcl_contribution_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./tcl/tcl.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js"); -/* harmony import */ var _twig_twig_contribution_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./twig/twig.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js"); -/* harmony import */ var _typescript_typescript_contribution_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./typescript/typescript.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js"); -/* harmony import */ var _vb_vb_contribution_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./vb/vb.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js"); -/* harmony import */ var _xml_xml_contribution_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./xml/xml.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js"); -/* harmony import */ var _yaml_yaml_contribution_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./yaml/yaml.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution.js"); - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'msdax', - extensions: ['.dax', '.msdax'], - aliases: ['DAX', 'MSDAX'], - loader: function () { return __webpack_require__.e(/*! import() */ 34).then(__webpack_require__.bind(null, /*! ./msdax.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/msdax/msdax.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'mysql', - extensions: [], - aliases: ['MySQL', 'mysql'], - loader: function () { return __webpack_require__.e(/*! import() */ 35).then(__webpack_require__.bind(null, /*! ./mysql.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/mysql/mysql.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.contribution.js ***! - \***************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'objective-c', - extensions: ['.m'], - aliases: ['Objective-C'], - loader: function () { return __webpack_require__.e(/*! import() */ 36).then(__webpack_require__.bind(null, /*! ./objective-c.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/objective-c/objective-c.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'pascal', - extensions: ['.pas', '.p', '.pp'], - aliases: ['Pascal', 'pas'], - mimetypes: ['text/x-pascal-source', 'text/x-pascal'], - loader: function () { return __webpack_require__.e(/*! import() */ 37).then(__webpack_require__.bind(null, /*! ./pascal.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pascal/pascal.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.contribution.js ***! - \***********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'pascaligo', - extensions: ['.ligo'], - aliases: ['Pascaligo', 'ligo'], - loader: function () { return __webpack_require__.e(/*! import() */ 38).then(__webpack_require__.bind(null, /*! ./pascaligo.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pascaligo/pascaligo.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'perl', - extensions: ['.pl'], - aliases: ['Perl', 'pl'], - loader: function () { return __webpack_require__.e(/*! import() */ 39).then(__webpack_require__.bind(null, /*! ./perl.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/perl/perl.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'pgsql', - extensions: [], - aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'], - loader: function () { return __webpack_require__.e(/*! import() */ 40).then(__webpack_require__.bind(null, /*! ./pgsql.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pgsql/pgsql.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/php/php.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'php', - extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'], - aliases: ['PHP', 'php'], - mimetypes: ['application/x-php'], - loader: function () { return __webpack_require__.e(/*! import() */ 41).then(__webpack_require__.bind(null, /*! ./php.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/php/php.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.contribution.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'postiats', - extensions: ['.dats', '.sats', '.hats'], - aliases: ['ATS', 'ATS/Postiats'], - loader: function () { return __webpack_require__.e(/*! import() */ 42).then(__webpack_require__.bind(null, /*! ./postiats.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'powerquery', - extensions: ['.pq', '.pqm'], - aliases: ['PQ', 'M', 'Power Query', 'Power Query M'], - loader: function () { return __webpack_require__.e(/*! import() */ 43).then(__webpack_require__.bind(null, /*! ./powerquery.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'powershell', - extensions: ['.ps1', '.psm1', '.psd1'], - aliases: ['PowerShell', 'powershell', 'ps', 'ps1'], - loader: function () { return __webpack_require__.e(/*! import() */ 44).then(__webpack_require__.bind(null, /*! ./powershell.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'pug', - extensions: ['.jade', '.pug'], - aliases: ['Pug', 'Jade', 'jade'], - loader: function () { return __webpack_require__.e(/*! import() */ 45).then(__webpack_require__.bind(null, /*! ./pug.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/python/python.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'python', - extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'], - aliases: ['Python', 'py'], - firstLine: '^#!/.*\\bpython[0-9.-]*\\b', - loader: function () { return __webpack_require__.e(/*! import() */ 46).then(__webpack_require__.bind(null, /*! ./python.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/python/python.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/r/r.contribution.js ***! - \*******************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'r', - extensions: ['.r', '.rhistory', '.rmd', '.rprofile', '.rt'], - aliases: ['R', 'r'], - loader: function () { return __webpack_require__.e(/*! import() */ 47).then(__webpack_require__.bind(null, /*! ./r.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/r/r.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'razor', - extensions: ['.cshtml'], - aliases: ['Razor', 'razor'], - mimetypes: ['text/x-cshtml'], - loader: function () { return __webpack_require__.e(/*! import() */ 48).then(__webpack_require__.bind(null, /*! ./razor.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/razor/razor.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'redis', - extensions: ['.redis'], - aliases: ['redis'], - loader: function () { return __webpack_require__.e(/*! import() */ 49).then(__webpack_require__.bind(null, /*! ./redis.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.contribution.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'redshift', - extensions: [], - aliases: ['Redshift', 'redshift'], - loader: function () { return __webpack_require__.e(/*! import() */ 50).then(__webpack_require__.bind(null, /*! ./redshift.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js": -/*!*************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.contribution.js ***! - \*************************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'restructuredtext', - extensions: ['.rst'], - aliases: ['reStructuredText', 'restructuredtext'], - loader: function () { return __webpack_require__.e(/*! import() */ 51).then(__webpack_require__.bind(null, /*! ./restructuredtext.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'ruby', - extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'], - filenames: ['rakefile', 'Gemfile'], - aliases: ['Ruby', 'rb'], - loader: function () { return __webpack_require__.e(/*! import() */ 52).then(__webpack_require__.bind(null, /*! ./ruby.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'rust', - extensions: ['.rs', '.rlib'], - aliases: ['Rust', 'rust'], - loader: function () { return __webpack_require__.e(/*! import() */ 53).then(__webpack_require__.bind(null, /*! ./rust.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.contribution.js ***! - \*********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'sb', - extensions: ['.sb'], - aliases: ['Small Basic', 'sb'], - loader: function () { return __webpack_require__.e(/*! import() */ 54).then(__webpack_require__.bind(null, /*! ./sb.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'scala', - extensions: ['.scala', '.sc', '.sbt'], - aliases: ['Scala', 'scala', 'SBT', 'Sbt', 'sbt', 'Dotty', 'dotty'], - mimetypes: ['text/x-scala-source', 'text/x-scala', 'text/x-sbt', 'text/x-dotty'], - loader: function () { return __webpack_require__.e(/*! import() */ 55).then(__webpack_require__.bind(null, /*! ./scala.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'scheme', - extensions: ['.scm', '.ss', '.sch', '.rkt'], - aliases: ['scheme', 'Scheme'], - loader: function () { return __webpack_require__.e(/*! import() */ 56).then(__webpack_require__.bind(null, /*! ./scheme.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'scss', - extensions: ['.scss'], - aliases: ['Sass', 'sass', 'scss'], - mimetypes: ['text/x-scss', 'text/scss'], - loader: function () { return __webpack_require__.e(/*! import() */ 57).then(__webpack_require__.bind(null, /*! ./scss.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'shell', - extensions: ['.sh', '.bash'], - aliases: ['Shell', 'sh'], - loader: function () { return __webpack_require__.e(/*! import() */ 58).then(__webpack_require__.bind(null, /*! ./shell.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.contribution.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'sol', - extensions: ['.sol'], - aliases: ['sol', 'solidity', 'Solidity'], - loader: function () { return __webpack_require__.e(/*! import() */ 59).then(__webpack_require__.bind(null, /*! ./solidity.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.contribution.js ***! - \*****************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'aes', - extensions: ['.aes'], - aliases: ['aes', 'sophia', 'Sophia'], - loader: function () { return __webpack_require__.e(/*! import() */ 60).then(__webpack_require__.bind(null, /*! ./sophia.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'sql', - extensions: ['.sql'], - aliases: ['SQL'], - loader: function () { return __webpack_require__.e(/*! import() */ 61).then(__webpack_require__.bind(null, /*! ./sql.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/st/st.contribution.js ***! - \*********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'st', - extensions: ['.st', '.iecst', '.iecplc', '.lc3lib'], - aliases: ['StructuredText', 'scl', 'stl'], - loader: function () { return __webpack_require__.e(/*! import() */ 62).then(__webpack_require__.bind(null, /*! ./st.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/st/st.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.contribution.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'swift', - aliases: ['Swift', 'swift'], - extensions: ['.swift'], - mimetypes: ['text/swift'], - loader: function () { return __webpack_require__.e(/*! import() */ 63).then(__webpack_require__.bind(null, /*! ./swift.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js": -/*!*******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.contribution.js ***! - \*******************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'systemverilog', - extensions: ['.sv', '.svh'], - aliases: ['SV', 'sv', 'SystemVerilog', 'systemverilog'], - loader: function () { return __webpack_require__.e(/*! import() */ 1).then(__webpack_require__.bind(null, /*! ./systemverilog.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js")); } -}); -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'verilog', - extensions: ['.v', '.vh'], - aliases: ['V', 'v', 'Verilog', 'verilog'], - loader: function () { return __webpack_require__.e(/*! import() */ 1).then(__webpack_require__.bind(null, /*! ./systemverilog.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'tcl', - extensions: ['.tcl'], - aliases: ['tcl', 'Tcl', 'tcltk', 'TclTk', 'tcl/tk', 'Tcl/Tk'], - loader: function () { return __webpack_require__.e(/*! import() */ 64).then(__webpack_require__.bind(null, /*! ./tcl.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.contribution.js ***! - \*************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'twig', - extensions: ['.twig'], - aliases: ['Twig', 'twig'], - mimetypes: ['text/x-twig'], - loader: function () { return __webpack_require__.e(/*! import() */ 65).then(__webpack_require__.bind(null, /*! ./twig.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js ***! - \*************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'typescript', - extensions: ['.ts', '.tsx'], - aliases: ['TypeScript', 'ts', 'typescript'], - mimetypes: ['text/typescript'], - loader: function () { return __webpack_require__.e(/*! import() */ 66).then(__webpack_require__.bind(null, /*! ./typescript.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.contribution.js ***! - \*********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'vb', - extensions: ['.vb'], - aliases: ['Visual Basic', 'vb'], - loader: function () { return __webpack_require__.e(/*! import() */ 67).then(__webpack_require__.bind(null, /*! ./vb.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.js")); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.contribution.js ***! - \***********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _contribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_.contribution.js */ "./node_modules/monaco-editor/esm/vs/basic-languages/_.contribution.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -Object(_contribution_js__WEBPACK_IMPORTED_MODULE_0__["registerLanguage"])({ - id: 'xml', - extensions: [ - '.xml', - '.dtd', - '.ascx', - '.csproj', - '.config', - '.wxi', - '.wxl', - '.wxs', - '.xaml', - '.svg', - '.svgz', - '.opf', - '.xsl' - ], - firstLine: '(\\<\\?xml.*)|(\\ this._values[id]); - } -} -function clearAllFontInfos() { - CSSBasedConfiguration.INSTANCE.clearCache(); -} -class CSSBasedConfiguration extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor() { - super(); - this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._cache = new CSSBasedConfigurationCache(); - this._evictUntrustedReadingsTimeout = -1; - } - dispose() { - if (this._evictUntrustedReadingsTimeout !== -1) { - clearTimeout(this._evictUntrustedReadingsTimeout); - this._evictUntrustedReadingsTimeout = -1; - } - super.dispose(); - } - clearCache() { - this._cache = new CSSBasedConfigurationCache(); - this._onDidChange.fire(); - } - _writeToCache(item, value) { - this._cache.put(item, value); - if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) { - // Try reading again after some time - this._evictUntrustedReadingsTimeout = setTimeout(() => { - this._evictUntrustedReadingsTimeout = -1; - this._evictUntrustedReadings(); - }, 5000); - } - } - _evictUntrustedReadings() { - const values = this._cache.getValues(); - let somethingRemoved = false; - for (let i = 0, len = values.length; i < len; i++) { - const item = values[i]; - if (!item.isTrusted) { - somethingRemoved = true; - this._cache.remove(item); - } - } - if (somethingRemoved) { - this._onDidChange.fire(); - } - } - readConfiguration(bareFontInfo) { - if (!this._cache.has(bareFontInfo)) { - let readConfig = CSSBasedConfiguration._actualReadConfiguration(bareFontInfo); - if (readConfig.typicalHalfwidthCharacterWidth <= 2 || readConfig.typicalFullwidthCharacterWidth <= 2 || readConfig.spaceWidth <= 2 || readConfig.maxDigitWidth <= 2) { - // Hey, it's Bug 14341 ... we couldn't read - readConfig = new _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_8__["FontInfo"]({ - zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["getZoomLevel"](), - fontFamily: readConfig.fontFamily, - fontWeight: readConfig.fontWeight, - fontSize: readConfig.fontSize, - fontFeatureSettings: readConfig.fontFeatureSettings, - lineHeight: readConfig.lineHeight, - letterSpacing: readConfig.letterSpacing, - isMonospace: readConfig.isMonospace, - typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5), - typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5), - canUseHalfwidthRightwardsArrow: readConfig.canUseHalfwidthRightwardsArrow, - spaceWidth: Math.max(readConfig.spaceWidth, 5), - middotWidth: Math.max(readConfig.middotWidth, 5), - wsmiddotWidth: Math.max(readConfig.wsmiddotWidth, 5), - maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5), - }, false); - } - this._writeToCache(bareFontInfo, readConfig); - } - return this._cache.get(bareFontInfo); - } - static createRequest(chr, type, all, monospace) { - const result = new _charWidthReader_js__WEBPACK_IMPORTED_MODULE_4__["CharWidthRequest"](chr, type); - all.push(result); - if (monospace) { - monospace.push(result); - } - return result; - } - static _actualReadConfiguration(bareFontInfo) { - const all = []; - const monospace = []; - const typicalHalfwidthCharacter = this.createRequest('n', 0 /* Regular */, all, monospace); - const typicalFullwidthCharacter = this.createRequest('\uff4d', 0 /* Regular */, all, null); - const space = this.createRequest(' ', 0 /* Regular */, all, monospace); - const digit0 = this.createRequest('0', 0 /* Regular */, all, monospace); - const digit1 = this.createRequest('1', 0 /* Regular */, all, monospace); - const digit2 = this.createRequest('2', 0 /* Regular */, all, monospace); - const digit3 = this.createRequest('3', 0 /* Regular */, all, monospace); - const digit4 = this.createRequest('4', 0 /* Regular */, all, monospace); - const digit5 = this.createRequest('5', 0 /* Regular */, all, monospace); - const digit6 = this.createRequest('6', 0 /* Regular */, all, monospace); - const digit7 = this.createRequest('7', 0 /* Regular */, all, monospace); - const digit8 = this.createRequest('8', 0 /* Regular */, all, monospace); - const digit9 = this.createRequest('9', 0 /* Regular */, all, monospace); - // monospace test: used for whitespace rendering - const rightwardsArrow = this.createRequest('→', 0 /* Regular */, all, monospace); - const halfwidthRightwardsArrow = this.createRequest('→', 0 /* Regular */, all, null); - // U+00B7 - MIDDLE DOT - const middot = this.createRequest('·', 0 /* Regular */, all, monospace); - // U+2E31 - WORD SEPARATOR MIDDLE DOT - const wsmiddotWidth = this.createRequest(String.fromCharCode(0x2E31), 0 /* Regular */, all, null); - // monospace test: some characters - this.createRequest('|', 0 /* Regular */, all, monospace); - this.createRequest('/', 0 /* Regular */, all, monospace); - this.createRequest('-', 0 /* Regular */, all, monospace); - this.createRequest('_', 0 /* Regular */, all, monospace); - this.createRequest('i', 0 /* Regular */, all, monospace); - this.createRequest('l', 0 /* Regular */, all, monospace); - this.createRequest('m', 0 /* Regular */, all, monospace); - // monospace italic test - this.createRequest('|', 1 /* Italic */, all, monospace); - this.createRequest('_', 1 /* Italic */, all, monospace); - this.createRequest('i', 1 /* Italic */, all, monospace); - this.createRequest('l', 1 /* Italic */, all, monospace); - this.createRequest('m', 1 /* Italic */, all, monospace); - this.createRequest('n', 1 /* Italic */, all, monospace); - // monospace bold test - this.createRequest('|', 2 /* Bold */, all, monospace); - this.createRequest('_', 2 /* Bold */, all, monospace); - this.createRequest('i', 2 /* Bold */, all, monospace); - this.createRequest('l', 2 /* Bold */, all, monospace); - this.createRequest('m', 2 /* Bold */, all, monospace); - this.createRequest('n', 2 /* Bold */, all, monospace); - Object(_charWidthReader_js__WEBPACK_IMPORTED_MODULE_4__["readCharWidths"])(bareFontInfo, all); - const maxDigitWidth = Math.max(digit0.width, digit1.width, digit2.width, digit3.width, digit4.width, digit5.width, digit6.width, digit7.width, digit8.width, digit9.width); - let isMonospace = (bareFontInfo.fontFeatureSettings === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_7__["EditorFontLigatures"].OFF); - const referenceWidth = monospace[0].width; - for (let i = 1, len = monospace.length; isMonospace && i < len; i++) { - const diff = referenceWidth - monospace[i].width; - if (diff < -0.001 || diff > 0.001) { - isMonospace = false; - break; - } - } - let canUseHalfwidthRightwardsArrow = true; - if (isMonospace && halfwidthRightwardsArrow.width !== referenceWidth) { - // using a halfwidth rightwards arrow would break monospace... - canUseHalfwidthRightwardsArrow = false; - } - if (halfwidthRightwardsArrow.width > rightwardsArrow.width) { - // using a halfwidth rightwards arrow would paint a larger arrow than a regular rightwards arrow - canUseHalfwidthRightwardsArrow = false; - } - // let's trust the zoom level only 2s after it was changed. - const canTrustBrowserZoomLevel = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["getTimeSinceLastZoomLevelChanged"]() > 2000); - return new _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_8__["FontInfo"]({ - zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["getZoomLevel"](), - fontFamily: bareFontInfo.fontFamily, - fontWeight: bareFontInfo.fontWeight, - fontSize: bareFontInfo.fontSize, - fontFeatureSettings: bareFontInfo.fontFeatureSettings, - lineHeight: bareFontInfo.lineHeight, - letterSpacing: bareFontInfo.letterSpacing, - isMonospace: isMonospace, - typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width, - typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width, - canUseHalfwidthRightwardsArrow: canUseHalfwidthRightwardsArrow, - spaceWidth: space.width, - middotWidth: middot.width, - wsmiddotWidth: wsmiddotWidth.width, - maxDigitWidth: maxDigitWidth - }, canTrustBrowserZoomLevel); - } -} -CSSBasedConfiguration.INSTANCE = new CSSBasedConfiguration(); -class Configuration extends _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_6__["CommonEditorConfiguration"] { - constructor(isSimpleWidget, options, referenceDomElement = null, accessibilityService) { - super(isSimpleWidget, options); - this.accessibilityService = accessibilityService; - this._elementSizeObserver = this._register(new _elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_5__["ElementSizeObserver"](referenceDomElement, options.dimension, () => this._onReferenceDomElementSizeChanged())); - this._register(CSSBasedConfiguration.INSTANCE.onDidChange(() => this._onCSSBasedConfigurationChanged())); - if (this._validatedOptions.get(9 /* automaticLayout */)) { - this._elementSizeObserver.startObserving(); - } - this._register(_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["onDidChangeZoomLevel"](_ => this._recomputeOptions())); - this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions())); - this._recomputeOptions(); - } - static applyFontInfoSlow(domNode, fontInfo) { - domNode.style.fontFamily = fontInfo.getMassagedFontFamily(); - domNode.style.fontWeight = fontInfo.fontWeight; - domNode.style.fontSize = fontInfo.fontSize + 'px'; - domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings; - domNode.style.lineHeight = fontInfo.lineHeight + 'px'; - domNode.style.letterSpacing = fontInfo.letterSpacing + 'px'; - } - static applyFontInfo(domNode, fontInfo) { - domNode.setFontFamily(fontInfo.getMassagedFontFamily()); - domNode.setFontWeight(fontInfo.fontWeight); - domNode.setFontSize(fontInfo.fontSize); - domNode.setFontFeatureSettings(fontInfo.fontFeatureSettings); - domNode.setLineHeight(fontInfo.lineHeight); - domNode.setLetterSpacing(fontInfo.letterSpacing); - } - _onReferenceDomElementSizeChanged() { - this._recomputeOptions(); - } - _onCSSBasedConfigurationChanged() { - this._recomputeOptions(); - } - observeReferenceElement(dimension) { - this._elementSizeObserver.observe(dimension); - } - dispose() { - super.dispose(); - } - _getExtraEditorClassName() { - let extra = ''; - if (!_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isSafari"] && !_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebkitWebView"]) { - // Use user-select: none in all browsers except Safari and native macOS WebView - extra += 'no-user-select '; - } - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__["isMacintosh"]) { - extra += 'mac '; - } - return extra; - } - _getEnvConfiguration() { - return { - extraEditorClassName: this._getExtraEditorClassName(), - outerWidth: this._elementSizeObserver.getWidth(), - outerHeight: this._elementSizeObserver.getHeight(), - emptySelectionClipboard: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"] || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"], - pixelRatio: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["getPixelRatio"](), - zoomLevel: _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["getZoomLevel"](), - accessibilitySupport: (this.accessibilityService.isScreenReaderOptimized() - ? 2 /* Enabled */ - : this.accessibilityService.getAccessibilitySupport()) - }; - } - readConfiguration(bareFontInfo) { - return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js ***! - \****************************************************************************************/ -/*! exports provided: ElementSizeObserver */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementSizeObserver", function() { return ElementSizeObserver; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class ElementSizeObserver extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor(referenceDomElement, dimension, changeCallback) { - super(); - this.referenceDomElement = referenceDomElement; - this.changeCallback = changeCallback; - this.width = -1; - this.height = -1; - this.resizeObserver = null; - this.measureReferenceDomElementToken = -1; - this.measureReferenceDomElement(false, dimension); - } - dispose() { - this.stopObserving(); - super.dispose(); - } - getWidth() { - return this.width; - } - getHeight() { - return this.height; - } - startObserving() { - if (typeof ResizeObserver !== 'undefined') { - if (!this.resizeObserver && this.referenceDomElement) { - this.resizeObserver = new ResizeObserver((entries) => { - if (entries && entries[0] && entries[0].contentRect) { - this.observe({ width: entries[0].contentRect.width, height: entries[0].contentRect.height }); - } - else { - this.observe(); - } - }); - this.resizeObserver.observe(this.referenceDomElement); - } - } - else { - if (this.measureReferenceDomElementToken === -1) { - // setInterval type defaults to NodeJS.Timeout instead of number, so specify it as a number - this.measureReferenceDomElementToken = setInterval(() => this.observe(), 100); - } - } - } - stopObserving() { - if (this.resizeObserver) { - this.resizeObserver.disconnect(); - this.resizeObserver = null; - } - if (this.measureReferenceDomElementToken !== -1) { - clearInterval(this.measureReferenceDomElementToken); - this.measureReferenceDomElementToken = -1; - } - } - observe(dimension) { - this.measureReferenceDomElement(true, dimension); - } - measureReferenceDomElement(callChangeCallback, dimension) { - let observedWidth = 0; - let observedHeight = 0; - if (dimension) { - observedWidth = dimension.width; - observedHeight = dimension.height; - } - else if (this.referenceDomElement) { - observedWidth = this.referenceDomElement.clientWidth; - observedHeight = this.referenceDomElement.clientHeight; - } - observedWidth = Math.max(5, observedWidth); - observedHeight = Math.max(5, observedHeight); - if (this.width !== observedWidth || this.height !== observedHeight) { - this.width = observedWidth; - this.height = observedHeight; - if (callChangeCallback) { - this.changeCallback(); - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js ***! - \*************************************************************************************/ -/*! exports provided: CoreEditorCommand, EditorScroll_, RevealLine_, CoreNavigationCommands, CoreEditingCommands */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoreEditorCommand", function() { return CoreEditorCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorScroll_", function() { return EditorScroll_; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RevealLine_", function() { return RevealLine_; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoreNavigationCommands", function() { return CoreNavigationCommands; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoreEditingCommands", function() { return CoreEditingCommands; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/controller/cursorColumnSelection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js"); -/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/controller/cursorDeleteOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js"); -/* harmony import */ var _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/controller/cursorMoveCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js"); -/* harmony import */ var _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/controller/cursorTypeOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - -const CORE_WEIGHT = 0 /* EditorCore */; -class CoreEditorCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorCommand"] { - runEditorCommand(accessor, editor, args) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - // the editor has no view => has no cursors - return; - } - this.runCoreEditorCommand(viewModel, args || {}); - } -} -var EditorScroll_; -(function (EditorScroll_) { - const isEditorScrollArgs = function (arg) { - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isObject"](arg)) { - return false; - } - const scrollArg = arg; - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isString"](scrollArg.to)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isUndefined"](scrollArg.by) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isString"](scrollArg.by)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isUndefined"](scrollArg.value) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isNumber"](scrollArg.value)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isUndefined"](scrollArg.revealCursor) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isBoolean"](scrollArg.revealCursor)) { - return false; - } - return true; - }; - EditorScroll_.description = { - description: 'Scroll editor in the given direction', - args: [ - { - name: 'Editor scroll argument object', - description: `Property-value pairs that can be passed through this argument: - * 'to': A mandatory direction value. - \`\`\` - 'up', 'down' - \`\`\` - * 'by': Unit to move. Default is computed based on 'to' value. - \`\`\` - 'line', 'wrappedLine', 'page', 'halfPage' - \`\`\` - * 'value': Number of units to move. Default is '1'. - * 'revealCursor': If 'true' reveals the cursor if it is outside view port. - `, - constraint: isEditorScrollArgs, - schema: { - 'type': 'object', - 'required': ['to'], - 'properties': { - 'to': { - 'type': 'string', - 'enum': ['up', 'down'] - }, - 'by': { - 'type': 'string', - 'enum': ['line', 'wrappedLine', 'page', 'halfPage'] - }, - 'value': { - 'type': 'number', - 'default': 1 - }, - 'revealCursor': { - 'type': 'boolean', - } - } - } - } - ] - }; - /** - * Directions in the view for editor scroll command. - */ - EditorScroll_.RawDirection = { - Up: 'up', - Down: 'down', - }; - /** - * Units for editor scroll 'by' argument - */ - EditorScroll_.RawUnit = { - Line: 'line', - WrappedLine: 'wrappedLine', - Page: 'page', - HalfPage: 'halfPage' - }; - function parse(args) { - let direction; - switch (args.to) { - case EditorScroll_.RawDirection.Up: - direction = 1 /* Up */; - break; - case EditorScroll_.RawDirection.Down: - direction = 2 /* Down */; - break; - default: - // Illegal arguments - return null; - } - let unit; - switch (args.by) { - case EditorScroll_.RawUnit.Line: - unit = 1 /* Line */; - break; - case EditorScroll_.RawUnit.WrappedLine: - unit = 2 /* WrappedLine */; - break; - case EditorScroll_.RawUnit.Page: - unit = 3 /* Page */; - break; - case EditorScroll_.RawUnit.HalfPage: - unit = 4 /* HalfPage */; - break; - default: - unit = 2 /* WrappedLine */; - } - const value = Math.floor(args.value || 1); - const revealCursor = !!args.revealCursor; - return { - direction: direction, - unit: unit, - value: value, - revealCursor: revealCursor, - select: (!!args.select) - }; - } - EditorScroll_.parse = parse; -})(EditorScroll_ || (EditorScroll_ = {})); -var RevealLine_; -(function (RevealLine_) { - const isRevealLineArgs = function (arg) { - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isObject"](arg)) { - return false; - } - const reveaLineArg = arg; - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isNumber"](reveaLineArg.lineNumber)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isUndefined"](reveaLineArg.at) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["isString"](reveaLineArg.at)) { - return false; - } - return true; - }; - RevealLine_.description = { - description: 'Reveal the given line at the given logical position', - args: [ - { - name: 'Reveal line argument object', - description: `Property-value pairs that can be passed through this argument: - * 'lineNumber': A mandatory line number value. - * 'at': Logical position at which line has to be revealed . - \`\`\` - 'top', 'center', 'bottom' - \`\`\` - `, - constraint: isRevealLineArgs, - schema: { - 'type': 'object', - 'required': ['lineNumber'], - 'properties': { - 'lineNumber': { - 'type': 'number', - }, - 'at': { - 'type': 'string', - 'enum': ['top', 'center', 'bottom'] - } - } - } - } - ] - }; - /** - * Values for reveal line 'at' argument - */ - RevealLine_.RawAtArgument = { - Top: 'top', - Center: 'center', - Bottom: 'bottom' - }; -})(RevealLine_ || (RevealLine_ = {})); -class EditorOrNativeTextInputCommand { - constructor(target) { - // 1. handle case when focus is in editor. - target.addImplementation(10000, (accessor, args) => { - // Only if editor text focus (i.e. not if editor has widget focus). - const focusedEditor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]).getFocusedCodeEditor(); - if (focusedEditor && focusedEditor.hasTextFocus()) { - this.runEditorCommand(accessor, focusedEditor, args); - return true; - } - return false; - }); - // 2. handle case when focus is in some other `input` / `textarea`. - target.addImplementation(1000, (accessor, args) => { - // Only if focused on an element that allows for entering text - const activeElement = document.activeElement; - if (activeElement && ['input', 'textarea'].indexOf(activeElement.tagName.toLowerCase()) >= 0) { - this.runDOMCommand(); - return true; - } - return false; - }); - // 3. (default) handle case when focus is somewhere else. - target.addImplementation(0, (accessor, args) => { - // Redirecting to active editor - const activeEditor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]).getActiveCodeEditor(); - if (activeEditor) { - activeEditor.focus(); - this.runEditorCommand(accessor, activeEditor, args); - return true; - } - return false; - }); - } -} -var CoreNavigationCommands; -(function (CoreNavigationCommands) { - class BaseMoveToCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveTo(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position, args.viewPosition) - ]); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.MoveTo = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new BaseMoveToCommand({ - id: '_moveTo', - inSelectionMode: false, - precondition: undefined - })); - CoreNavigationCommands.MoveToSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new BaseMoveToCommand({ - id: '_moveToSelect', - inSelectionMode: true, - precondition: undefined - })); - class ColumnSelectCommand extends CoreEditorCommand { - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - const result = this._getColumnSelectResult(viewModel, viewModel.getPrimaryCursorState(), viewModel.getCursorColumnSelectData(), args); - viewModel.setCursorStates(args.source, 3 /* Explicit */, result.viewStates.map((viewState) => _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorState"].fromViewState(viewState))); - viewModel.setCursorColumnSelectData({ - isReal: true, - fromViewLineNumber: result.fromLineNumber, - fromViewVisualColumn: result.fromVisualColumn, - toViewLineNumber: result.toLineNumber, - toViewVisualColumn: result.toVisualColumn - }); - if (result.reversed) { - viewModel.revealTopMostCursor(args.source); - } - else { - viewModel.revealBottomMostCursor(args.source); - } - } - } - CoreNavigationCommands.ColumnSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends ColumnSelectCommand { - constructor() { - super({ - id: 'columnSelect', - precondition: undefined - }); - } - _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) { - // validate `args` - const validatedPosition = viewModel.model.validatePosition(args.position); - const validatedViewPosition = viewModel.coordinatesConverter.validateViewPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_9__["Position"](args.viewPosition.lineNumber, args.viewPosition.column), validatedPosition); - let fromViewLineNumber = args.doColumnSelect ? prevColumnSelectData.fromViewLineNumber : validatedViewPosition.lineNumber; - let fromViewVisualColumn = args.doColumnSelect ? prevColumnSelectData.fromViewVisualColumn : args.mouseColumn - 1; - return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__["ColumnSelection"].columnSelect(viewModel.cursorConfig, viewModel, fromViewLineNumber, fromViewVisualColumn, validatedViewPosition.lineNumber, args.mouseColumn - 1); - } - }); - CoreNavigationCommands.CursorColumnSelectLeft = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends ColumnSelectCommand { - constructor() { - super({ - id: 'cursorColumnSelectLeft', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */, - linux: { primary: 0 } - } - }); - } - _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) { - return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__["ColumnSelection"].columnSelectLeft(viewModel.cursorConfig, viewModel, prevColumnSelectData); - } - }); - CoreNavigationCommands.CursorColumnSelectRight = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends ColumnSelectCommand { - constructor() { - super({ - id: 'cursorColumnSelectRight', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */, - linux: { primary: 0 } - } - }); - } - _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) { - return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__["ColumnSelection"].columnSelectRight(viewModel.cursorConfig, viewModel, prevColumnSelectData); - } - }); - class ColumnSelectUpCommand extends ColumnSelectCommand { - constructor(opts) { - super(opts); - this._isPaged = opts.isPaged; - } - _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) { - return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__["ColumnSelection"].columnSelectUp(viewModel.cursorConfig, viewModel, prevColumnSelectData, this._isPaged); - } - } - CoreNavigationCommands.CursorColumnSelectUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new ColumnSelectUpCommand({ - isPaged: false, - id: 'cursorColumnSelectUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */, - linux: { primary: 0 } - } - })); - CoreNavigationCommands.CursorColumnSelectPageUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new ColumnSelectUpCommand({ - isPaged: true, - id: 'cursorColumnSelectPageUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 11 /* PageUp */, - linux: { primary: 0 } - } - })); - class ColumnSelectDownCommand extends ColumnSelectCommand { - constructor(opts) { - super(opts); - this._isPaged = opts.isPaged; - } - _getColumnSelectResult(viewModel, primary, prevColumnSelectData, args) { - return _common_controller_cursorColumnSelection_js__WEBPACK_IMPORTED_MODULE_4__["ColumnSelection"].columnSelectDown(viewModel.cursorConfig, viewModel, prevColumnSelectData, this._isPaged); - } - } - CoreNavigationCommands.CursorColumnSelectDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new ColumnSelectDownCommand({ - isPaged: false, - id: 'cursorColumnSelectDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */, - linux: { primary: 0 } - } - })); - CoreNavigationCommands.CursorColumnSelectPageDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new ColumnSelectDownCommand({ - isPaged: true, - id: 'cursorColumnSelectPageDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 512 /* Alt */ | 12 /* PageDown */, - linux: { primary: 0 } - } - })); - class CursorMoveImpl extends CoreEditorCommand { - constructor() { - super({ - id: 'cursorMove', - precondition: undefined, - description: _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMove"].description - }); - } - runCoreEditorCommand(viewModel, args) { - const parsed = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMove"].parse(args); - if (!parsed) { - // illegal arguments - return; - } - this._runCursorMove(viewModel, args.source, parsed); - } - _runCursorMove(viewModel, source, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(source, 3 /* Explicit */, CursorMoveImpl._move(viewModel, viewModel.getCursorStates(), args)); - viewModel.revealPrimaryCursor(source, true); - } - static _move(viewModel, cursors, args) { - const inSelectionMode = args.select; - const value = args.value; - switch (args.direction) { - case 0 /* Left */: - case 1 /* Right */: - case 2 /* Up */: - case 3 /* Down */: - case 4 /* WrappedLineStart */: - case 5 /* WrappedLineFirstNonWhitespaceCharacter */: - case 6 /* WrappedLineColumnCenter */: - case 7 /* WrappedLineEnd */: - case 8 /* WrappedLineLastNonWhitespaceCharacter */: - return _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].simpleMove(viewModel, cursors, args.direction, inSelectionMode, value, args.unit); - case 9 /* ViewPortTop */: - case 11 /* ViewPortBottom */: - case 10 /* ViewPortCenter */: - case 12 /* ViewPortIfOutside */: - return _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].viewportMove(viewModel, cursors, args.direction, inSelectionMode, value); - default: - return null; - } - } - } - CoreNavigationCommands.CursorMoveImpl = CursorMoveImpl; - CoreNavigationCommands.CursorMove = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveImpl()); - class CursorMoveBasedCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._staticArgs = opts.args; - } - runCoreEditorCommand(viewModel, dynamicArgs) { - let args = this._staticArgs; - if (this._staticArgs.value === -1 /* PAGE_SIZE_MARKER */) { - // -1 is a marker for page size - args = { - direction: this._staticArgs.direction, - unit: this._staticArgs.unit, - select: this._staticArgs.select, - value: viewModel.cursorConfig.pageSize - }; - } - viewModel.model.pushStackElement(); - viewModel.setCursorStates(dynamicArgs.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].simpleMove(viewModel, viewModel.getCursorStates(), args.direction, args.select, args.value, args.unit)); - viewModel.revealPrimaryCursor(dynamicArgs.source, true); - } - } - CoreNavigationCommands.CursorLeft = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 0 /* Left */, - unit: 0 /* None */, - select: false, - value: 1 - }, - id: 'cursorLeft', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 15 /* LeftArrow */, - mac: { primary: 15 /* LeftArrow */, secondary: [256 /* WinCtrl */ | 32 /* KEY_B */] } - } - })); - CoreNavigationCommands.CursorLeftSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 0 /* Left */, - unit: 0 /* None */, - select: true, - value: 1 - }, - id: 'cursorLeftSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 15 /* LeftArrow */ - } - })); - CoreNavigationCommands.CursorRight = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 1 /* Right */, - unit: 0 /* None */, - select: false, - value: 1 - }, - id: 'cursorRight', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 17 /* RightArrow */, - mac: { primary: 17 /* RightArrow */, secondary: [256 /* WinCtrl */ | 36 /* KEY_F */] } - } - })); - CoreNavigationCommands.CursorRightSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 1 /* Right */, - unit: 0 /* None */, - select: true, - value: 1 - }, - id: 'cursorRightSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 17 /* RightArrow */ - } - })); - CoreNavigationCommands.CursorUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 2 /* Up */, - unit: 2 /* WrappedLine */, - select: false, - value: 1 - }, - id: 'cursorUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 16 /* UpArrow */, - mac: { primary: 16 /* UpArrow */, secondary: [256 /* WinCtrl */ | 46 /* KEY_P */] } - } - })); - CoreNavigationCommands.CursorUpSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 2 /* Up */, - unit: 2 /* WrappedLine */, - select: true, - value: 1 - }, - id: 'cursorUpSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 16 /* UpArrow */, - secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */], - mac: { primary: 1024 /* Shift */ | 16 /* UpArrow */ }, - linux: { primary: 1024 /* Shift */ | 16 /* UpArrow */ } - } - })); - CoreNavigationCommands.CursorPageUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 2 /* Up */, - unit: 2 /* WrappedLine */, - select: false, - value: -1 /* PAGE_SIZE_MARKER */ - }, - id: 'cursorPageUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 11 /* PageUp */ - } - })); - CoreNavigationCommands.CursorPageUpSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 2 /* Up */, - unit: 2 /* WrappedLine */, - select: true, - value: -1 /* PAGE_SIZE_MARKER */ - }, - id: 'cursorPageUpSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 11 /* PageUp */ - } - })); - CoreNavigationCommands.CursorDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 3 /* Down */, - unit: 2 /* WrappedLine */, - select: false, - value: 1 - }, - id: 'cursorDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 18 /* DownArrow */, - mac: { primary: 18 /* DownArrow */, secondary: [256 /* WinCtrl */ | 44 /* KEY_N */] } - } - })); - CoreNavigationCommands.CursorDownSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 3 /* Down */, - unit: 2 /* WrappedLine */, - select: true, - value: 1 - }, - id: 'cursorDownSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 18 /* DownArrow */, - secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */], - mac: { primary: 1024 /* Shift */ | 18 /* DownArrow */ }, - linux: { primary: 1024 /* Shift */ | 18 /* DownArrow */ } - } - })); - CoreNavigationCommands.CursorPageDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 3 /* Down */, - unit: 2 /* WrappedLine */, - select: false, - value: -1 /* PAGE_SIZE_MARKER */ - }, - id: 'cursorPageDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 12 /* PageDown */ - } - })); - CoreNavigationCommands.CursorPageDownSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new CursorMoveBasedCommand({ - args: { - direction: 3 /* Down */, - unit: 2 /* WrappedLine */, - select: true, - value: -1 /* PAGE_SIZE_MARKER */ - }, - id: 'cursorPageDownSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 12 /* PageDown */ - } - })); - CoreNavigationCommands.CreateCursor = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'createCursor', - precondition: undefined - }); - } - runCoreEditorCommand(viewModel, args) { - let newState; - if (args.wholeLine) { - newState = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].line(viewModel, viewModel.getPrimaryCursorState(), false, args.position, args.viewPosition); - } - else { - newState = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveTo(viewModel, viewModel.getPrimaryCursorState(), false, args.position, args.viewPosition); - } - const states = viewModel.getCursorStates(); - // Check if we should remove a cursor (sort of like a toggle) - if (states.length > 1) { - const newModelPosition = (newState.modelState ? newState.modelState.position : null); - const newViewPosition = (newState.viewState ? newState.viewState.position : null); - for (let i = 0, len = states.length; i < len; i++) { - const state = states[i]; - if (newModelPosition && !state.modelState.selection.containsPosition(newModelPosition)) { - continue; - } - if (newViewPosition && !state.viewState.selection.containsPosition(newViewPosition)) { - continue; - } - // => Remove the cursor - states.splice(i, 1); - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, states); - return; - } - } - // => Add the new cursor - states.push(newState); - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, states); - } - }); - CoreNavigationCommands.LastCursorMoveToSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: '_lastCursorMoveToSelect', - precondition: undefined - }); - } - runCoreEditorCommand(viewModel, args) { - const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex(); - const states = viewModel.getCursorStates(); - const newStates = states.slice(0); - newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveTo(viewModel, states[lastAddedCursorIndex], true, args.position, args.viewPosition); - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates); - } - }); - class HomeCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveToBeginningOfLine(viewModel, viewModel.getCursorStates(), this._inSelectionMode)); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.CursorHome = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new HomeCommand({ - inSelectionMode: false, - id: 'cursorHome', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 14 /* Home */, - mac: { primary: 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 15 /* LeftArrow */] } - } - })); - CoreNavigationCommands.CursorHomeSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new HomeCommand({ - inSelectionMode: true, - id: 'cursorHomeSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 14 /* Home */, - mac: { primary: 1024 /* Shift */ | 14 /* Home */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */] } - } - })); - class LineStartCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, this._exec(viewModel.getCursorStates())); - viewModel.revealPrimaryCursor(args.source, true); - } - _exec(cursors) { - const result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const lineNumber = cursor.modelState.position.lineNumber; - result[i] = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorState"].fromModelState(cursor.modelState.move(this._inSelectionMode, lineNumber, 1, 0)); - } - return result; - } - } - CoreNavigationCommands.CursorLineStart = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineStartCommand({ - inSelectionMode: false, - id: 'cursorLineStart', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 31 /* KEY_A */ } - } - })); - CoreNavigationCommands.CursorLineStartSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineStartCommand({ - inSelectionMode: true, - id: 'cursorLineStartSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 31 /* KEY_A */ } - } - })); - class EndCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveToEndOfLine(viewModel, viewModel.getCursorStates(), this._inSelectionMode, args.sticky || false)); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.CursorEnd = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new EndCommand({ - inSelectionMode: false, - id: 'cursorEnd', - precondition: undefined, - kbOpts: { - args: { sticky: false }, - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 13 /* End */, - mac: { primary: 13 /* End */, secondary: [2048 /* CtrlCmd */ | 17 /* RightArrow */] } - }, - description: { - description: `Go to End`, - args: [{ - name: 'args', - schema: { - type: 'object', - properties: { - 'sticky': { - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('stickydesc', "Stick to the end even when going to longer lines"), - type: 'boolean', - default: false - } - } - } - }] - } - })); - CoreNavigationCommands.CursorEndSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new EndCommand({ - inSelectionMode: true, - id: 'cursorEndSelect', - precondition: undefined, - kbOpts: { - args: { sticky: false }, - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 13 /* End */, - mac: { primary: 1024 /* Shift */ | 13 /* End */, secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */] } - }, - description: { - description: `Select to End`, - args: [{ - name: 'args', - schema: { - type: 'object', - properties: { - 'sticky': { - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('stickydesc', "Stick to the end even when going to longer lines"), - type: 'boolean', - default: false - } - } - } - }] - } - })); - class LineEndCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, this._exec(viewModel, viewModel.getCursorStates())); - viewModel.revealPrimaryCursor(args.source, true); - } - _exec(viewModel, cursors) { - const result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const lineNumber = cursor.modelState.position.lineNumber; - const maxColumn = viewModel.model.getLineMaxColumn(lineNumber); - result[i] = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorState"].fromModelState(cursor.modelState.move(this._inSelectionMode, lineNumber, maxColumn, 0)); - } - return result; - } - } - CoreNavigationCommands.CursorLineEnd = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineEndCommand({ - inSelectionMode: false, - id: 'cursorLineEnd', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 35 /* KEY_E */ } - } - })); - CoreNavigationCommands.CursorLineEndSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineEndCommand({ - inSelectionMode: true, - id: 'cursorLineEndSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 35 /* KEY_E */ } - } - })); - class TopCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveToBeginningOfBuffer(viewModel, viewModel.getCursorStates(), this._inSelectionMode)); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.CursorTop = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new TopCommand({ - inSelectionMode: false, - id: 'cursorTop', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 14 /* Home */, - mac: { primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */ } - } - })); - CoreNavigationCommands.CursorTopSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new TopCommand({ - inSelectionMode: true, - id: 'cursorTopSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 14 /* Home */, - mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */ } - } - })); - class BottomCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].moveToEndOfBuffer(viewModel, viewModel.getCursorStates(), this._inSelectionMode)); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.CursorBottom = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new BottomCommand({ - inSelectionMode: false, - id: 'cursorBottom', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 13 /* End */, - mac: { primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */ } - } - })); - CoreNavigationCommands.CursorBottomSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new BottomCommand({ - inSelectionMode: true, - id: 'cursorBottomSelect', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 13 /* End */, - mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */ } - } - })); - class EditorScrollImpl extends CoreEditorCommand { - constructor() { - super({ - id: 'editorScroll', - precondition: undefined, - description: EditorScroll_.description - }); - } - runCoreEditorCommand(viewModel, args) { - const parsed = EditorScroll_.parse(args); - if (!parsed) { - // illegal arguments - return; - } - this._runEditorScroll(viewModel, args.source, parsed); - } - _runEditorScroll(viewModel, source, args) { - const desiredScrollTop = this._computeDesiredScrollTop(viewModel, args); - if (args.revealCursor) { - // must ensure cursor is in new visible range - const desiredVisibleViewRange = viewModel.getCompletelyVisibleViewRangeAtScrollTop(desiredScrollTop); - viewModel.setCursorStates(source, 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].findPositionInViewportIfOutside(viewModel, viewModel.getPrimaryCursorState(), desiredVisibleViewRange, args.select) - ]); - } - viewModel.setScrollTop(desiredScrollTop, 0 /* Smooth */); - } - _computeDesiredScrollTop(viewModel, args) { - if (args.unit === 1 /* Line */) { - // scrolling by model lines - const visibleViewRange = viewModel.getCompletelyVisibleViewRange(); - const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange); - let desiredTopModelLineNumber; - if (args.direction === 1 /* Up */) { - // must go x model lines up - desiredTopModelLineNumber = Math.max(1, visibleModelRange.startLineNumber - args.value); - } - else { - // must go x model lines down - desiredTopModelLineNumber = Math.min(viewModel.model.getLineCount(), visibleModelRange.startLineNumber + args.value); - } - const viewPosition = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_9__["Position"](desiredTopModelLineNumber, 1)); - return viewModel.getVerticalOffsetForLineNumber(viewPosition.lineNumber); - } - let noOfLines; - if (args.unit === 3 /* Page */) { - noOfLines = viewModel.cursorConfig.pageSize * args.value; - } - else if (args.unit === 4 /* HalfPage */) { - noOfLines = Math.round(viewModel.cursorConfig.pageSize / 2) * args.value; - } - else { - noOfLines = args.value; - } - const deltaLines = (args.direction === 1 /* Up */ ? -1 : 1) * noOfLines; - return viewModel.getScrollTop() + deltaLines * viewModel.cursorConfig.lineHeight; - } - } - CoreNavigationCommands.EditorScrollImpl = EditorScrollImpl; - CoreNavigationCommands.EditorScroll = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new EditorScrollImpl()); - CoreNavigationCommands.ScrollLineUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'scrollLineUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 16 /* UpArrow */, - mac: { primary: 256 /* WinCtrl */ | 11 /* PageUp */ } - } - }); - } - runCoreEditorCommand(viewModel, args) { - CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, { - direction: 1 /* Up */, - unit: 2 /* WrappedLine */, - value: 1, - revealCursor: false, - select: false - }); - } - }); - CoreNavigationCommands.ScrollPageUp = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'scrollPageUp', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 11 /* PageUp */, - win: { primary: 512 /* Alt */ | 11 /* PageUp */ }, - linux: { primary: 512 /* Alt */ | 11 /* PageUp */ } - } - }); - } - runCoreEditorCommand(viewModel, args) { - CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, { - direction: 1 /* Up */, - unit: 3 /* Page */, - value: 1, - revealCursor: false, - select: false - }); - } - }); - CoreNavigationCommands.ScrollLineDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'scrollLineDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 18 /* DownArrow */, - mac: { primary: 256 /* WinCtrl */ | 12 /* PageDown */ } - } - }); - } - runCoreEditorCommand(viewModel, args) { - CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, { - direction: 2 /* Down */, - unit: 2 /* WrappedLine */, - value: 1, - revealCursor: false, - select: false - }); - } - }); - CoreNavigationCommands.ScrollPageDown = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'scrollPageDown', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 12 /* PageDown */, - win: { primary: 512 /* Alt */ | 12 /* PageDown */ }, - linux: { primary: 512 /* Alt */ | 12 /* PageDown */ } - } - }); - } - runCoreEditorCommand(viewModel, args) { - CoreNavigationCommands.EditorScroll._runEditorScroll(viewModel, args.source, { - direction: 2 /* Down */, - unit: 3 /* Page */, - value: 1, - revealCursor: false, - select: false - }); - } - }); - class WordCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].word(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position) - ]); - viewModel.revealPrimaryCursor(args.source, true); - } - } - CoreNavigationCommands.WordSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new WordCommand({ - inSelectionMode: false, - id: '_wordSelect', - precondition: undefined - })); - CoreNavigationCommands.WordSelectDrag = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new WordCommand({ - inSelectionMode: true, - id: '_wordSelectDrag', - precondition: undefined - })); - CoreNavigationCommands.LastCursorWordSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'lastCursorWordSelect', - precondition: undefined - }); - } - runCoreEditorCommand(viewModel, args) { - const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex(); - const states = viewModel.getCursorStates(); - const newStates = states.slice(0); - const lastAddedState = states[lastAddedCursorIndex]; - newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].word(viewModel, lastAddedState, lastAddedState.modelState.hasSelection(), args.position); - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates); - } - }); - class LineCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].line(viewModel, viewModel.getPrimaryCursorState(), this._inSelectionMode, args.position, args.viewPosition) - ]); - viewModel.revealPrimaryCursor(args.source, false); - } - } - CoreNavigationCommands.LineSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineCommand({ - inSelectionMode: false, - id: '_lineSelect', - precondition: undefined - })); - CoreNavigationCommands.LineSelectDrag = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LineCommand({ - inSelectionMode: true, - id: '_lineSelectDrag', - precondition: undefined - })); - class LastCursorLineCommand extends CoreEditorCommand { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - } - runCoreEditorCommand(viewModel, args) { - const lastAddedCursorIndex = viewModel.getLastAddedCursorIndex(); - const states = viewModel.getCursorStates(); - const newStates = states.slice(0); - newStates[lastAddedCursorIndex] = _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].line(viewModel, states[lastAddedCursorIndex], this._inSelectionMode, args.position, args.viewPosition); - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, newStates); - } - } - CoreNavigationCommands.LastCursorLineSelect = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LastCursorLineCommand({ - inSelectionMode: false, - id: 'lastCursorLineSelect', - precondition: undefined - })); - CoreNavigationCommands.LastCursorLineSelectDrag = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new LastCursorLineCommand({ - inSelectionMode: true, - id: 'lastCursorLineSelectDrag', - precondition: undefined - })); - CoreNavigationCommands.ExpandLineSelection = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'expandLineSelection', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 42 /* KEY_L */ - } - }); - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].expandLineSelection(viewModel, viewModel.getCursorStates())); - viewModel.revealPrimaryCursor(args.source, true); - } - }); - CoreNavigationCommands.CancelSelection = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'cancelSelection', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].hasNonEmptySelection, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } - }); - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].cancelSelection(viewModel, viewModel.getPrimaryCursorState()) - ]); - viewModel.revealPrimaryCursor(args.source, true); - } - }); - CoreNavigationCommands.RemoveSecondaryCursors = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'removeSecondaryCursors', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].hasMultipleSelections, - kbOpts: { - weight: CORE_WEIGHT + 1, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } - }); - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - viewModel.getPrimaryCursorState() - ]); - viewModel.revealPrimaryCursor(args.source, true); - } - }); - CoreNavigationCommands.RevealLine = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'revealLine', - precondition: undefined, - description: RevealLine_.description - }); - } - runCoreEditorCommand(viewModel, args) { - const revealLineArg = args; - let lineNumber = (revealLineArg.lineNumber || 0) + 1; - if (lineNumber < 1) { - lineNumber = 1; - } - const lineCount = viewModel.model.getLineCount(); - if (lineNumber > lineCount) { - lineNumber = lineCount; - } - const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](lineNumber, 1, lineNumber, viewModel.model.getLineMaxColumn(lineNumber)); - let revealAt = 0 /* Simple */; - if (revealLineArg.at) { - switch (revealLineArg.at) { - case RevealLine_.RawAtArgument.Top: - revealAt = 3 /* Top */; - break; - case RevealLine_.RawAtArgument.Center: - revealAt = 1 /* Center */; - break; - case RevealLine_.RawAtArgument.Bottom: - revealAt = 4 /* Bottom */; - break; - default: - break; - } - } - const viewRange = viewModel.coordinatesConverter.convertModelRangeToViewRange(range); - viewModel.revealRange(args.source, false, viewRange, revealAt, 0 /* Smooth */); - } - }); - CoreNavigationCommands.SelectAll = new class extends EditorOrNativeTextInputCommand { - constructor() { - super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["SelectAllCommand"]); - } - runDOMCommand() { - document.execCommand('selectAll'); - } - runEditorCommand(accessor, editor, args) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - // the editor has no view => has no cursors - return; - } - this.runCoreEditorCommand(viewModel, args); - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates('keyboard', 3 /* Explicit */, [ - _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_7__["CursorMoveCommands"].selectAll(viewModel, viewModel.getPrimaryCursorState()) - ]); - } - }(); - CoreNavigationCommands.SetSelection = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditorCommand { - constructor() { - super({ - id: 'setSelection', - precondition: undefined - }); - } - runCoreEditorCommand(viewModel, args) { - viewModel.model.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, [ - _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorState"].fromModelSelection(args.selection) - ]); - } - }); -})(CoreNavigationCommands || (CoreNavigationCommands = {})); -const columnSelectionCondition = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].columnSelection); -function registerColumnSelection(id, keybinding) { - _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_13__["KeybindingsRegistry"].registerKeybindingRule({ - id: id, - primary: keybinding, - when: columnSelectionCondition, - weight: CORE_WEIGHT + 1 - }); -} -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectLeft.id, 1024 /* Shift */ | 15 /* LeftArrow */); -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectRight.id, 1024 /* Shift */ | 17 /* RightArrow */); -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectUp.id, 1024 /* Shift */ | 16 /* UpArrow */); -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectPageUp.id, 1024 /* Shift */ | 11 /* PageUp */); -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectDown.id, 1024 /* Shift */ | 18 /* DownArrow */); -registerColumnSelection(CoreNavigationCommands.CursorColumnSelectPageDown.id, 1024 /* Shift */ | 12 /* PageDown */); -function registerCommand(command) { - command.register(); - return command; -} -var CoreEditingCommands; -(function (CoreEditingCommands) { - class CoreEditingCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorCommand"] { - runEditorCommand(accessor, editor, args) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - // the editor has no view => has no cursors - return; - } - this.runCoreEditingCommand(editor, viewModel, args || {}); - } - } - CoreEditingCommands.CoreEditingCommand = CoreEditingCommand; - CoreEditingCommands.LineBreakInsert = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditingCommand { - constructor() { - super({ - id: 'lineBreakInsert', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 45 /* KEY_O */ } - } - }); - } - runCoreEditingCommand(editor, viewModel, args) { - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_8__["TypeOperations"].lineBreakInsert(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection))); - } - }); - CoreEditingCommands.Outdent = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditingCommand { - constructor() { - super({ - id: 'outdent', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].tabDoesNotMoveFocus), - primary: 1024 /* Shift */ | 2 /* Tab */ - } - }); - } - runCoreEditingCommand(editor, viewModel, args) { - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_8__["TypeOperations"].outdent(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection))); - editor.pushUndoStop(); - } - }); - CoreEditingCommands.Tab = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditingCommand { - constructor() { - super({ - id: 'tab', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].tabDoesNotMoveFocus), - primary: 2 /* Tab */ - } - }); - } - runCoreEditingCommand(editor, viewModel, args) { - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_8__["TypeOperations"].tab(viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection))); - editor.pushUndoStop(); - } - }); - CoreEditingCommands.DeleteLeft = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditingCommand { - constructor() { - super({ - id: 'deleteLeft', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 1 /* Backspace */, - secondary: [1024 /* Shift */ | 1 /* Backspace */], - mac: { primary: 1 /* Backspace */, secondary: [1024 /* Shift */ | 1 /* Backspace */, 256 /* WinCtrl */ | 38 /* KEY_H */, 256 /* WinCtrl */ | 1 /* Backspace */] } - } - }); - } - runCoreEditingCommand(editor, viewModel, args) { - const [shouldPushStackElementBefore, commands] = _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_6__["DeleteOperations"].deleteLeft(viewModel.getPrevEditOperationType(), viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection)); - if (shouldPushStackElementBefore) { - editor.pushUndoStop(); - } - editor.executeCommands(this.id, commands); - viewModel.setPrevEditOperationType(2 /* DeletingLeft */); - } - }); - CoreEditingCommands.DeleteRight = Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new class extends CoreEditingCommand { - constructor() { - super({ - id: 'deleteRight', - precondition: undefined, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 20 /* Delete */, - mac: { primary: 20 /* Delete */, secondary: [256 /* WinCtrl */ | 34 /* KEY_D */, 256 /* WinCtrl */ | 20 /* Delete */] } - } - }); - } - runCoreEditingCommand(editor, viewModel, args) { - const [shouldPushStackElementBefore, commands] = _common_controller_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_6__["DeleteOperations"].deleteRight(viewModel.getPrevEditOperationType(), viewModel.cursorConfig, viewModel.model, viewModel.getCursorStates().map(s => s.modelState.selection)); - if (shouldPushStackElementBefore) { - editor.pushUndoStop(); - } - editor.executeCommands(this.id, commands); - viewModel.setPrevEditOperationType(3 /* DeletingRight */); - } - }); - CoreEditingCommands.Undo = new class extends EditorOrNativeTextInputCommand { - constructor() { - super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["UndoCommand"]); - } - runDOMCommand() { - document.execCommand('undo'); - } - runEditorCommand(accessor, editor, args) { - if (!editor.hasModel() || editor.getOption(72 /* readOnly */) === true) { - return; - } - editor.getModel().undo(); - } - }(); - CoreEditingCommands.Redo = new class extends EditorOrNativeTextInputCommand { - constructor() { - super(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["RedoCommand"]); - } - runDOMCommand() { - document.execCommand('redo'); - } - runEditorCommand(accessor, editor, args) { - if (!editor.hasModel() || editor.getOption(72 /* readOnly */) === true) { - return; - } - editor.getModel().redo(); - } - }(); -})(CoreEditingCommands || (CoreEditingCommands = {})); -/** - * A command that will invoke a command on the focused editor. - */ -class EditorHandlerCommand extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["Command"] { - constructor(id, handlerId, description) { - super({ - id: id, - precondition: undefined, - description: description - }); - this._handlerId = handlerId; - } - runCommand(accessor, args) { - const editor = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]).getFocusedCodeEditor(); - if (!editor) { - return; - } - editor.trigger('keyboard', this._handlerId, args); - } -} -function registerOverwritableCommand(handlerId, description) { - registerCommand(new EditorHandlerCommand('default:' + handlerId, handlerId)); - registerCommand(new EditorHandlerCommand(handlerId, handlerId, description)); -} -registerOverwritableCommand("type" /* Type */, { - description: `Type`, - args: [{ - name: 'args', - schema: { - 'type': 'object', - 'required': ['text'], - 'properties': { - 'text': { - 'type': 'string' - } - }, - } - }] -}); -registerOverwritableCommand("replacePreviousChar" /* ReplacePreviousChar */); -registerOverwritableCommand("compositionStart" /* CompositionStart */); -registerOverwritableCommand("compositionEnd" /* CompositionEnd */); -registerOverwritableCommand("paste" /* Paste */); -registerOverwritableCommand("cut" /* Cut */); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js ***! - \*************************************************************************************/ -/*! exports provided: createMouseMoveEventMerger, MouseHandler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMouseMoveEventMerger", function() { return createMouseMoveEventMerger; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseHandler", function() { return MouseHandler; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mouseTarget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js"); -/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../editorDom.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js"); -/* harmony import */ var _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/config/editorZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -/** - * Merges mouse events when mouse move events are throttled - */ -function createMouseMoveEventMerger(mouseTargetFactory) { - return function (lastEvent, currentEvent) { - let targetIsWidget = false; - if (mouseTargetFactory) { - targetIsWidget = mouseTargetFactory.mouseTargetIsWidget(currentEvent); - } - if (!targetIsWidget) { - currentEvent.preventDefault(); - } - return currentEvent; - }; -} -class MouseHandler extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_10__["ViewEventHandler"] { - constructor(context, viewController, viewHelper) { - super(); - this._context = context; - this.viewController = viewController; - this.viewHelper = viewHelper; - this.mouseTargetFactory = new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTargetFactory"](this._context, viewHelper); - this._mouseDownOperation = this._register(new MouseDownOperation(this._context, this.viewController, this.viewHelper, (e, testEventTarget) => this._createMouseTarget(e, testEventTarget), (e) => this._getMouseColumn(e))); - this.lastMouseLeaveTime = -1; - const mouseEvents = new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__["EditorMouseEventFactory"](this.viewHelper.viewDomNode); - this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode, (e) => this._onContextMenu(e, true))); - this._register(mouseEvents.onMouseMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), createMouseMoveEventMerger(this.mouseTargetFactory), MouseHandler.MOUSE_MOVE_MINIMUM_TIME)); - this._register(mouseEvents.onMouseUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e))); - this._register(mouseEvents.onMouseLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e))); - this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e))); - const onMouseWheel = (browserEvent) => { - this.viewController.emitMouseWheel(browserEvent); - if (!this._context.configuration.options.get(59 /* mouseWheelZoom */)) { - return; - } - const e = new _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_1__["StandardWheelEvent"](browserEvent); - if (e.browserEvent.ctrlKey || e.browserEvent.metaKey) { - const zoomLevel = _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__["EditorZoom"].getZoomLevel(); - const delta = e.deltaY > 0 ? 1 : -1; - _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_7__["EditorZoom"].setZoomLevel(zoomLevel + delta); - e.preventDefault(); - e.stopPropagation(); - } - }; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.viewDomNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].MOUSE_WHEEL, onMouseWheel, { capture: true, passive: false })); - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - super.dispose(); - } - // --- begin event handlers - onCursorStateChanged(e) { - this._mouseDownOperation.onCursorStateChanged(e); - return false; - } - onFocusChanged(e) { - return false; - } - onScrollChanged(e) { - this._mouseDownOperation.onScrollChanged(); - return false; - } - // --- end event handlers - getTargetAtClientPoint(clientX, clientY) { - const clientPos = new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__["ClientCoordinates"](clientX, clientY); - const pos = clientPos.toPageCoordinates(); - const editorPos = Object(_editorDom_js__WEBPACK_IMPORTED_MODULE_6__["createEditorPagePosition"])(this.viewHelper.viewDomNode); - if (pos.y < editorPos.y || pos.y > editorPos.y + editorPos.height || pos.x < editorPos.x || pos.x > editorPos.x + editorPos.width) { - return null; - } - return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), editorPos, pos, null); - } - _createMouseTarget(e, testEventTarget) { - return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, testEventTarget ? e.target : null); - } - _getMouseColumn(e) { - return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos); - } - _onContextMenu(e, testEventTarget) { - this.viewController.emitContextMenu({ - event: e, - target: this._createMouseTarget(e, testEventTarget) - }); - } - _onMouseMove(e) { - if (this._mouseDownOperation.isActive()) { - // In selection/drag operation - return; - } - const actualMouseMoveTime = e.timestamp; - if (actualMouseMoveTime < this.lastMouseLeaveTime) { - // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it. - return; - } - this.viewController.emitMouseMove({ - event: e, - target: this._createMouseTarget(e, true) - }); - } - _onMouseLeave(e) { - this.lastMouseLeaveTime = (new Date()).getTime(); - this.viewController.emitMouseLeave({ - event: e, - target: null - }); - } - _onMouseUp(e) { - this.viewController.emitMouseUp({ - event: e, - target: this._createMouseTarget(e, true) - }); - } - _onMouseDown(e) { - const t = this._createMouseTarget(e, true); - const targetIsContent = (t.type === 6 /* CONTENT_TEXT */ || t.type === 7 /* CONTENT_EMPTY */); - const targetIsGutter = (t.type === 2 /* GUTTER_GLYPH_MARGIN */ || t.type === 3 /* GUTTER_LINE_NUMBERS */ || t.type === 4 /* GUTTER_LINE_DECORATIONS */); - const targetIsLineNumbers = (t.type === 3 /* GUTTER_LINE_NUMBERS */); - const selectOnLineNumbers = this._context.configuration.options.get(90 /* selectOnLineNumbers */); - const targetIsViewZone = (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */); - const targetIsWidget = (t.type === 9 /* CONTENT_WIDGET */); - let shouldHandle = e.leftButton || e.middleButton; - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isMacintosh"] && e.leftButton && e.ctrlKey) { - shouldHandle = false; - } - const focus = () => { - e.preventDefault(); - this.viewHelper.focusTextArea(); - }; - if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) { - focus(); - this._mouseDownOperation.start(t.type, e); - } - else if (targetIsGutter) { - // Do not steal focus - e.preventDefault(); - } - else if (targetIsViewZone) { - const viewZoneData = t.detail; - if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) { - focus(); - this._mouseDownOperation.start(t.type, e); - e.preventDefault(); - } - } - else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) { - focus(); - e.preventDefault(); - } - this.viewController.emitMouseDown({ - event: e, - target: t - }); - } -} -MouseHandler.MOUSE_MOVE_MINIMUM_TIME = 100; // ms -class MouseDownOperation extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(context, viewController, viewHelper, createMouseTarget, getMouseColumn) { - super(); - this._context = context; - this._viewController = viewController; - this._viewHelper = viewHelper; - this._createMouseTarget = createMouseTarget; - this._getMouseColumn = getMouseColumn; - this._mouseMoveMonitor = this._register(new _editorDom_js__WEBPACK_IMPORTED_MODULE_6__["GlobalEditorMouseMoveMonitor"](this._viewHelper.viewDomNode)); - this._onScrollTimeout = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"]()); - this._mouseState = new MouseDownState(); - this._currentSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](1, 1, 1, 1); - this._isActive = false; - this._lastMouseEvent = null; - } - dispose() { - super.dispose(); - } - isActive() { - return this._isActive; - } - _onMouseDownThenMove(e) { - this._lastMouseEvent = e; - this._mouseState.setModifiers(e); - const position = this._findMousePosition(e, true); - if (!position) { - // Ignoring because position is unknown - return; - } - if (this._mouseState.isDragAndDrop) { - this._viewController.emitMouseDrag({ - event: e, - target: position - }); - } - else { - this._dispatchMouse(position, true); - } - } - start(targetType, e) { - this._lastMouseEvent = e; - this._mouseState.setStartedOnLineNumbers(targetType === 3 /* GUTTER_LINE_NUMBERS */); - this._mouseState.setStartButtons(e); - this._mouseState.setModifiers(e); - const position = this._findMousePosition(e, true); - if (!position || !position.position) { - // Ignoring because position is unknown - return; - } - this._mouseState.trySetCount(e.detail, position.position); - // Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it. - e.detail = this._mouseState.count; - const options = this._context.configuration.options; - if (!options.get(72 /* readOnly */) - && options.get(25 /* dragAndDrop */) - && !options.get(13 /* columnSelection */) - && !this._mouseState.altKey // we don't support multiple mouse - && e.detail < 2 // only single click on a selection can work - && !this._isActive // the mouse is not down yet - && !this._currentSelection.isEmpty() // we don't drag single cursor - && (position.type === 6 /* CONTENT_TEXT */) // single click on text - && position.position && this._currentSelection.containsPosition(position.position) // single click on a selection - ) { - this._mouseState.isDragAndDrop = true; - this._isActive = true; - this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), () => { - const position = this._findMousePosition(this._lastMouseEvent, true); - this._viewController.emitMouseDrop({ - event: this._lastMouseEvent, - target: (position ? this._createMouseTarget(this._lastMouseEvent, true) : null) // Ignoring because position is unknown, e.g., Content View Zone - }); - this._stop(); - }); - return; - } - this._mouseState.isDragAndDrop = false; - this._dispatchMouse(position, e.shiftKey); - if (!this._isActive) { - this._isActive = true; - this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), () => this._stop()); - } - } - _stop() { - this._isActive = false; - this._onScrollTimeout.cancel(); - } - onScrollChanged() { - if (!this._isActive) { - return; - } - this._onScrollTimeout.setIfNotSet(() => { - if (!this._lastMouseEvent) { - return; - } - const position = this._findMousePosition(this._lastMouseEvent, false); - if (!position) { - // Ignoring because position is unknown - return; - } - if (this._mouseState.isDragAndDrop) { - // Ignoring because users are dragging the text - return; - } - this._dispatchMouse(position, true); - }, 10); - } - onCursorStateChanged(e) { - this._currentSelection = e.selections[0]; - } - _getPositionOutsideEditor(e) { - const editorContent = e.editorPos; - const model = this._context.model; - const viewLayout = this._context.viewLayout; - const mouseColumn = this._getMouseColumn(e); - if (e.posy < editorContent.y) { - const verticalOffset = Math.max(viewLayout.getCurrentScrollTop() - (editorContent.y - e.posy), 0); - const viewZoneData = _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["HitTestContext"].getZoneAtCoord(this._context, verticalOffset); - if (viewZoneData) { - const newPosition = this._helpPositionJumpOverViewZone(viewZoneData); - if (newPosition) { - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition); - } - } - const aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset); - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](aboveLineNumber, 1)); - } - if (e.posy > editorContent.y + editorContent.height) { - const verticalOffset = viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y); - const viewZoneData = _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["HitTestContext"].getZoneAtCoord(this._context, verticalOffset); - if (viewZoneData) { - const newPosition = this._helpPositionJumpOverViewZone(viewZoneData); - if (newPosition) { - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition); - } - } - const belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset); - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](belowLineNumber, model.getLineMaxColumn(belowLineNumber))); - } - const possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y)); - if (e.posx < editorContent.x) { - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](possibleLineNumber, 1)); - } - if (e.posx > editorContent.x + editorContent.width) { - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](possibleLineNumber, model.getLineMaxColumn(possibleLineNumber))); - } - return null; - } - _findMousePosition(e, testEventTarget) { - const positionOutsideEditor = this._getPositionOutsideEditor(e); - if (positionOutsideEditor) { - return positionOutsideEditor; - } - const t = this._createMouseTarget(e, testEventTarget); - const hintedPosition = t.position; - if (!hintedPosition) { - return null; - } - if (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */) { - const newPosition = this._helpPositionJumpOverViewZone(t.detail); - if (newPosition) { - return new _mouseTarget_js__WEBPACK_IMPORTED_MODULE_5__["MouseTarget"](t.element, t.type, t.mouseColumn, newPosition, null, t.detail); - } - } - return t; - } - _helpPositionJumpOverViewZone(viewZoneData) { - // Force position on view zones to go above or below depending on where selection started from - const selectionStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn); - const positionBefore = viewZoneData.positionBefore; - const positionAfter = viewZoneData.positionAfter; - if (positionBefore && positionAfter) { - if (positionBefore.isBefore(selectionStart)) { - return positionBefore; - } - else { - return positionAfter; - } - } - return null; - } - _dispatchMouse(position, inSelectionMode) { - if (!position.position) { - return; - } - this._viewController.dispatchMouse({ - position: position.position, - mouseColumn: position.mouseColumn, - startedOnLineNumbers: this._mouseState.startedOnLineNumbers, - inSelectionMode: inSelectionMode, - mouseDownCount: this._mouseState.count, - altKey: this._mouseState.altKey, - ctrlKey: this._mouseState.ctrlKey, - metaKey: this._mouseState.metaKey, - shiftKey: this._mouseState.shiftKey, - leftButton: this._mouseState.leftButton, - middleButton: this._mouseState.middleButton, - }); - } -} -class MouseDownState { - constructor() { - this._altKey = false; - this._ctrlKey = false; - this._metaKey = false; - this._shiftKey = false; - this._leftButton = false; - this._middleButton = false; - this._startedOnLineNumbers = false; - this._lastMouseDownPosition = null; - this._lastMouseDownPositionEqualCount = 0; - this._lastMouseDownCount = 0; - this._lastSetMouseDownCountTime = 0; - this.isDragAndDrop = false; - } - get altKey() { return this._altKey; } - get ctrlKey() { return this._ctrlKey; } - get metaKey() { return this._metaKey; } - get shiftKey() { return this._shiftKey; } - get leftButton() { return this._leftButton; } - get middleButton() { return this._middleButton; } - get startedOnLineNumbers() { return this._startedOnLineNumbers; } - get count() { - return this._lastMouseDownCount; - } - setModifiers(source) { - this._altKey = source.altKey; - this._ctrlKey = source.ctrlKey; - this._metaKey = source.metaKey; - this._shiftKey = source.shiftKey; - } - setStartButtons(source) { - this._leftButton = source.leftButton; - this._middleButton = source.middleButton; - } - setStartedOnLineNumbers(startedOnLineNumbers) { - this._startedOnLineNumbers = startedOnLineNumbers; - } - trySetCount(setMouseDownCount, newMouseDownPosition) { - // a. Invalidate multiple clicking if too much time has passed (will be hit by IE because the detail field of mouse events contains garbage in IE10) - const currentTime = (new Date()).getTime(); - if (currentTime - this._lastSetMouseDownCountTime > MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME) { - setMouseDownCount = 1; - } - this._lastSetMouseDownCountTime = currentTime; - // b. Ensure that we don't jump from single click to triple click in one go (will be hit by IE because the detail field of mouse events contains garbage in IE10) - if (setMouseDownCount > this._lastMouseDownCount + 1) { - setMouseDownCount = this._lastMouseDownCount + 1; - } - // c. Invalidate multiple clicking if the logical position is different - if (this._lastMouseDownPosition && this._lastMouseDownPosition.equals(newMouseDownPosition)) { - this._lastMouseDownPositionEqualCount++; - } - else { - this._lastMouseDownPositionEqualCount = 1; - } - this._lastMouseDownPosition = newMouseDownPosition; - // Finally set the lastMouseDownCount - this._lastMouseDownCount = Math.min(setMouseDownCount, this._lastMouseDownPositionEqualCount); - } -} -MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; // ms - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js ***! - \************************************************************************************/ -/*! exports provided: PointerHandlerLastRenderData, MouseTarget, HitTestContext, MouseTargetFactory, shadowCaretRangeFromPoint */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointerHandlerLastRenderData", function() { return PointerHandlerLastRenderData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseTarget", function() { return MouseTarget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HitTestContext", function() { return HitTestContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseTargetFactory", function() { return MouseTargetFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shadowCaretRangeFromPoint", function() { return shadowCaretRangeFromPoint; }); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../editorDom.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../viewParts/lines/viewLine.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -class PointerHandlerLastRenderData { - constructor(lastViewCursorsRenderData, lastTextareaPosition) { - this.lastViewCursorsRenderData = lastViewCursorsRenderData; - this.lastTextareaPosition = lastTextareaPosition; - } -} -class MouseTarget { - constructor(element, type, mouseColumn = 0, position = null, range = null, detail = null) { - this.element = element; - this.type = type; - this.mouseColumn = mouseColumn; - this.position = position; - if (!range && position) { - range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber, position.column, position.lineNumber, position.column); - } - this.range = range; - this.detail = detail; - } - static _typeToString(type) { - if (type === 1 /* TEXTAREA */) { - return 'TEXTAREA'; - } - if (type === 2 /* GUTTER_GLYPH_MARGIN */) { - return 'GUTTER_GLYPH_MARGIN'; - } - if (type === 3 /* GUTTER_LINE_NUMBERS */) { - return 'GUTTER_LINE_NUMBERS'; - } - if (type === 4 /* GUTTER_LINE_DECORATIONS */) { - return 'GUTTER_LINE_DECORATIONS'; - } - if (type === 5 /* GUTTER_VIEW_ZONE */) { - return 'GUTTER_VIEW_ZONE'; - } - if (type === 6 /* CONTENT_TEXT */) { - return 'CONTENT_TEXT'; - } - if (type === 7 /* CONTENT_EMPTY */) { - return 'CONTENT_EMPTY'; - } - if (type === 8 /* CONTENT_VIEW_ZONE */) { - return 'CONTENT_VIEW_ZONE'; - } - if (type === 9 /* CONTENT_WIDGET */) { - return 'CONTENT_WIDGET'; - } - if (type === 10 /* OVERVIEW_RULER */) { - return 'OVERVIEW_RULER'; - } - if (type === 11 /* SCROLLBAR */) { - return 'SCROLLBAR'; - } - if (type === 12 /* OVERLAY_WIDGET */) { - return 'OVERLAY_WIDGET'; - } - return 'UNKNOWN'; - } - static toString(target) { - return this._typeToString(target.type) + ': ' + target.position + ' - ' + target.range + ' - ' + target.detail; - } - toString() { - return MouseTarget.toString(this); - } -} -class ElementPath { - static isTextArea(path) { - return (path.length === 2 - && path[0] === 3 /* OverflowGuard */ - && path[1] === 6 /* TextArea */); - } - static isChildOfViewLines(path) { - return (path.length >= 4 - && path[0] === 3 /* OverflowGuard */ - && path[3] === 7 /* ViewLines */); - } - static isStrictChildOfViewLines(path) { - return (path.length > 4 - && path[0] === 3 /* OverflowGuard */ - && path[3] === 7 /* ViewLines */); - } - static isChildOfScrollableElement(path) { - return (path.length >= 2 - && path[0] === 3 /* OverflowGuard */ - && path[1] === 5 /* ScrollableElement */); - } - static isChildOfMinimap(path) { - return (path.length >= 2 - && path[0] === 3 /* OverflowGuard */ - && path[1] === 8 /* Minimap */); - } - static isChildOfContentWidgets(path) { - return (path.length >= 4 - && path[0] === 3 /* OverflowGuard */ - && path[3] === 1 /* ContentWidgets */); - } - static isChildOfOverflowingContentWidgets(path) { - return (path.length >= 1 - && path[0] === 2 /* OverflowingContentWidgets */); - } - static isChildOfOverlayWidgets(path) { - return (path.length >= 2 - && path[0] === 3 /* OverflowGuard */ - && path[1] === 4 /* OverlayWidgets */); - } -} -class HitTestContext { - constructor(context, viewHelper, lastRenderData) { - this.model = context.model; - const options = context.configuration.options; - this.layoutInfo = options.get(117 /* layoutInfo */); - this.viewDomNode = viewHelper.viewDomNode; - this.lineHeight = options.get(51 /* lineHeight */); - this.typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - this.lastRenderData = lastRenderData; - this._context = context; - this._viewHelper = viewHelper; - } - getZoneAtCoord(mouseVerticalOffset) { - return HitTestContext.getZoneAtCoord(this._context, mouseVerticalOffset); - } - static getZoneAtCoord(context, mouseVerticalOffset) { - // The target is either a view zone or the empty space after the last view-line - const viewZoneWhitespace = context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset); - if (viewZoneWhitespace) { - let viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2, lineCount = context.model.getLineCount(), positionBefore = null, position, positionAfter = null; - if (viewZoneWhitespace.afterLineNumber !== lineCount) { - // There are more lines after this view zone - positionAfter = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](viewZoneWhitespace.afterLineNumber + 1, 1); - } - if (viewZoneWhitespace.afterLineNumber > 0) { - // There are more lines above this view zone - positionBefore = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](viewZoneWhitespace.afterLineNumber, context.model.getLineMaxColumn(viewZoneWhitespace.afterLineNumber)); - } - if (positionAfter === null) { - position = positionBefore; - } - else if (positionBefore === null) { - position = positionAfter; - } - else if (mouseVerticalOffset < viewZoneMiddle) { - position = positionBefore; - } - else { - position = positionAfter; - } - return { - viewZoneId: viewZoneWhitespace.id, - afterLineNumber: viewZoneWhitespace.afterLineNumber, - positionBefore: positionBefore, - positionAfter: positionAfter, - position: position - }; - } - return null; - } - getFullLineRangeAtCoord(mouseVerticalOffset) { - if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) { - // Below the last line - const lineNumber = this._context.model.getLineCount(); - const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); - return { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](lineNumber, maxLineColumn, lineNumber, maxLineColumn), - isAfterLines: true - }; - } - const lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); - const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); - return { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](lineNumber, 1, lineNumber, maxLineColumn), - isAfterLines: false - }; - } - getLineNumberAtVerticalOffset(mouseVerticalOffset) { - return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); - } - isAfterLines(mouseVerticalOffset) { - return this._context.viewLayout.isAfterLines(mouseVerticalOffset); - } - getVerticalOffsetForLineNumber(lineNumber) { - return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber); - } - findAttribute(element, attr) { - return HitTestContext._findAttribute(element, attr, this._viewHelper.viewDomNode); - } - static _findAttribute(element, attr, stopAt) { - while (element && element !== document.body) { - if (element.hasAttribute && element.hasAttribute(attr)) { - return element.getAttribute(attr); - } - if (element === stopAt) { - return null; - } - element = element.parentNode; - } - return null; - } - getLineWidth(lineNumber) { - return this._viewHelper.getLineWidth(lineNumber); - } - visibleRangeForPosition(lineNumber, column) { - return this._viewHelper.visibleRangeForPosition(lineNumber, column); - } - getPositionFromDOMInfo(spanNode, offset) { - return this._viewHelper.getPositionFromDOMInfo(spanNode, offset); - } - getCurrentScrollTop() { - return this._context.viewLayout.getCurrentScrollTop(); - } - getCurrentScrollLeft() { - return this._context.viewLayout.getCurrentScrollLeft(); - } -} -class BareHitTestRequest { - constructor(ctx, editorPos, pos) { - this.editorPos = editorPos; - this.pos = pos; - this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + pos.y - editorPos.y); - this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + pos.x - editorPos.x - ctx.layoutInfo.contentLeft; - this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft && pos.x - editorPos.x >= ctx.layoutInfo.glyphMarginLeft); - this.isInContentArea = !this.isInMarginArea; - this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth)); - } -} -class HitTestRequest extends BareHitTestRequest { - constructor(ctx, editorPos, pos, target) { - super(ctx, editorPos, pos); - this._ctx = ctx; - if (target) { - this.target = target; - this.targetPath = _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["PartFingerprints"].collect(target, ctx.viewDomNode); - } - else { - this.target = null; - this.targetPath = new Uint8Array(0); - } - } - toString() { - return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target ? this.target.outerHTML : null}`; - } - fulfill(type, position = null, range = null, detail = null) { - let mouseColumn = this.mouseColumn; - if (position && position.column < this._ctx.model.getLineMaxColumn(position.lineNumber)) { - // Most likely, the line contains foreign decorations... - mouseColumn = _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_6__["CursorColumns"].visibleColumnFromColumn(this._ctx.model.getLineContent(position.lineNumber), position.column, this._ctx.model.getTextModelOptions().tabSize) + 1; - } - return new MouseTarget(this.target, type, mouseColumn, position, range, detail); - } - withTarget(target) { - return new HitTestRequest(this._ctx, this.editorPos, this.pos, target); - } -} -const EMPTY_CONTENT_AFTER_LINES = { isAfterLines: true }; -function createEmptyContentDataInLines(horizontalDistanceToText) { - return { - isAfterLines: false, - horizontalDistanceToText: horizontalDistanceToText - }; -} -class MouseTargetFactory { - constructor(context, viewHelper) { - this._context = context; - this._viewHelper = viewHelper; - } - mouseTargetIsWidget(e) { - const t = e.target; - const path = _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["PartFingerprints"].collect(t, this._viewHelper.viewDomNode); - // Is it a content widget? - if (ElementPath.isChildOfContentWidgets(path) || ElementPath.isChildOfOverflowingContentWidgets(path)) { - return true; - } - // Is it an overlay widget? - if (ElementPath.isChildOfOverlayWidgets(path)) { - return true; - } - return false; - } - createMouseTarget(lastRenderData, editorPos, pos, target) { - const ctx = new HitTestContext(this._context, this._viewHelper, lastRenderData); - const request = new HitTestRequest(ctx, editorPos, pos, target); - try { - const r = MouseTargetFactory._createMouseTarget(ctx, request, false); - // console.log(r.toString()); - return r; - } - catch (err) { - // console.log(err); - return request.fulfill(0 /* UNKNOWN */); - } - } - static _createMouseTarget(ctx, request, domHitTestExecuted) { - // console.log(`${domHitTestExecuted ? '=>' : ''}CAME IN REQUEST: ${request}`); - // First ensure the request has a target - if (request.target === null) { - if (domHitTestExecuted) { - // Still no target... and we have already executed hit test... - return request.fulfill(0 /* UNKNOWN */); - } - const hitTestResult = MouseTargetFactory._doHitTest(ctx, request); - if (hitTestResult.position) { - return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column); - } - return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true); - } - // we know for a fact that request.target is not null - const resolvedRequest = request; - let result = null; - result = result || MouseTargetFactory._hitTestContentWidget(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestOverlayWidget(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestMinimap(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestScrollbarSlider(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestViewZone(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestMargin(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestViewCursor(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestTextArea(ctx, resolvedRequest); - result = result || MouseTargetFactory._hitTestViewLines(ctx, resolvedRequest, domHitTestExecuted); - result = result || MouseTargetFactory._hitTestScrollbar(ctx, resolvedRequest); - return (result || request.fulfill(0 /* UNKNOWN */)); - } - static _hitTestContentWidget(ctx, request) { - // Is it a content widget? - if (ElementPath.isChildOfContentWidgets(request.targetPath) || ElementPath.isChildOfOverflowingContentWidgets(request.targetPath)) { - const widgetId = ctx.findAttribute(request.target, 'widgetId'); - if (widgetId) { - return request.fulfill(9 /* CONTENT_WIDGET */, null, null, widgetId); - } - else { - return request.fulfill(0 /* UNKNOWN */); - } - } - return null; - } - static _hitTestOverlayWidget(ctx, request) { - // Is it an overlay widget? - if (ElementPath.isChildOfOverlayWidgets(request.targetPath)) { - const widgetId = ctx.findAttribute(request.target, 'widgetId'); - if (widgetId) { - return request.fulfill(12 /* OVERLAY_WIDGET */, null, null, widgetId); - } - else { - return request.fulfill(0 /* UNKNOWN */); - } - } - return null; - } - static _hitTestViewCursor(ctx, request) { - if (request.target) { - // Check if we've hit a painted cursor - const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData; - for (const d of lastViewCursorsRenderData) { - if (request.target === d.domNode) { - return request.fulfill(6 /* CONTENT_TEXT */, d.position); - } - } - } - if (request.isInContentArea) { - // Edge has a bug when hit-testing the exact position of a cursor, - // instead of returning the correct dom node, it returns the - // first or last rendered view line dom node, therefore help it out - // and first check if we are on top of a cursor - const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData; - const mouseContentHorizontalOffset = request.mouseContentHorizontalOffset; - const mouseVerticalOffset = request.mouseVerticalOffset; - for (const d of lastViewCursorsRenderData) { - if (mouseContentHorizontalOffset < d.contentLeft) { - // mouse position is to the left of the cursor - continue; - } - if (mouseContentHorizontalOffset > d.contentLeft + d.width) { - // mouse position is to the right of the cursor - continue; - } - const cursorVerticalOffset = ctx.getVerticalOffsetForLineNumber(d.position.lineNumber); - if (cursorVerticalOffset <= mouseVerticalOffset - && mouseVerticalOffset <= cursorVerticalOffset + d.height) { - return request.fulfill(6 /* CONTENT_TEXT */, d.position); - } - } - } - return null; - } - static _hitTestViewZone(ctx, request) { - const viewZoneData = ctx.getZoneAtCoord(request.mouseVerticalOffset); - if (viewZoneData) { - const mouseTargetType = (request.isInContentArea ? 8 /* CONTENT_VIEW_ZONE */ : 5 /* GUTTER_VIEW_ZONE */); - return request.fulfill(mouseTargetType, viewZoneData.position, null, viewZoneData); - } - return null; - } - static _hitTestTextArea(ctx, request) { - // Is it the textarea? - if (ElementPath.isTextArea(request.targetPath)) { - if (ctx.lastRenderData.lastTextareaPosition) { - return request.fulfill(6 /* CONTENT_TEXT */, ctx.lastRenderData.lastTextareaPosition); - } - return request.fulfill(1 /* TEXTAREA */, ctx.lastRenderData.lastTextareaPosition); - } - return null; - } - static _hitTestMargin(ctx, request) { - if (request.isInMarginArea) { - const res = ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset); - const pos = res.range.getStartPosition(); - let offset = Math.abs(request.pos.x - request.editorPos.x); - const detail = { - isAfterLines: res.isAfterLines, - glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft, - glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth, - lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth, - offsetX: offset - }; - offset -= ctx.layoutInfo.glyphMarginLeft; - if (offset <= ctx.layoutInfo.glyphMarginWidth) { - // On the glyph margin - return request.fulfill(2 /* GUTTER_GLYPH_MARGIN */, pos, res.range, detail); - } - offset -= ctx.layoutInfo.glyphMarginWidth; - if (offset <= ctx.layoutInfo.lineNumbersWidth) { - // On the line numbers - return request.fulfill(3 /* GUTTER_LINE_NUMBERS */, pos, res.range, detail); - } - offset -= ctx.layoutInfo.lineNumbersWidth; - // On the line decorations - return request.fulfill(4 /* GUTTER_LINE_DECORATIONS */, pos, res.range, detail); - } - return null; - } - static _hitTestViewLines(ctx, request, domHitTestExecuted) { - if (!ElementPath.isChildOfViewLines(request.targetPath)) { - return null; - } - // Check if it is below any lines and any view zones - if (ctx.isAfterLines(request.mouseVerticalOffset)) { - // This most likely indicates it happened after the last view-line - const lineCount = ctx.model.getLineCount(); - const maxLineColumn = ctx.model.getLineMaxColumn(lineCount); - return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineCount, maxLineColumn), undefined, EMPTY_CONTENT_AFTER_LINES); - } - if (domHitTestExecuted) { - // Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines) - // See https://github.com/Microsoft/vscode/issues/46942 - if (ElementPath.isStrictChildOfViewLines(request.targetPath)) { - const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset); - if (ctx.model.getLineLength(lineNumber) === 0) { - const lineWidth = ctx.getLineWidth(lineNumber); - const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth); - return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineNumber, 1), undefined, detail); - } - const lineWidth = ctx.getLineWidth(lineNumber); - if (request.mouseContentHorizontalOffset >= lineWidth) { - const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth); - const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineNumber, ctx.model.getLineMaxColumn(lineNumber)); - return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail); - } - } - // We have already executed hit test... - return request.fulfill(0 /* UNKNOWN */); - } - const hitTestResult = MouseTargetFactory._doHitTest(ctx, request); - if (hitTestResult.position) { - return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column); - } - return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true); - } - static _hitTestMinimap(ctx, request) { - if (ElementPath.isChildOfMinimap(request.targetPath)) { - const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset); - const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber); - return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](possibleLineNumber, maxColumn)); - } - return null; - } - static _hitTestScrollbarSlider(ctx, request) { - if (ElementPath.isChildOfScrollableElement(request.targetPath)) { - if (request.target && request.target.nodeType === 1) { - const className = request.target.className; - if (className && /\b(slider|scrollbar)\b/.test(className)) { - const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset); - const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber); - return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](possibleLineNumber, maxColumn)); - } - } - } - return null; - } - static _hitTestScrollbar(ctx, request) { - // Is it the overview ruler? - // Is it a child of the scrollable element? - if (ElementPath.isChildOfScrollableElement(request.targetPath)) { - const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset); - const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber); - return request.fulfill(11 /* SCROLLBAR */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](possibleLineNumber, maxColumn)); - } - return null; - } - getMouseColumn(editorPos, pos) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - const mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft; - return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth); - } - static _getMouseColumn(mouseContentHorizontalOffset, typicalHalfwidthCharacterWidth) { - if (mouseContentHorizontalOffset < 0) { - return 1; - } - const chars = Math.round(mouseContentHorizontalOffset / typicalHalfwidthCharacterWidth); - return (chars + 1); - } - static createMouseTargetFromHitTestPosition(ctx, request, lineNumber, column) { - const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineNumber, column); - const lineWidth = ctx.getLineWidth(lineNumber); - if (request.mouseContentHorizontalOffset > lineWidth) { - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"] && pos.column === 1) { - // See https://github.com/Microsoft/vscode/issues/10875 - const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth); - return request.fulfill(7 /* CONTENT_EMPTY */, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineNumber, ctx.model.getLineMaxColumn(lineNumber)), undefined, detail); - } - const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth); - return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail); - } - const visibleRange = ctx.visibleRangeForPosition(lineNumber, column); - if (!visibleRange) { - return request.fulfill(0 /* UNKNOWN */, pos); - } - const columnHorizontalOffset = visibleRange.left; - if (request.mouseContentHorizontalOffset === columnHorizontalOffset) { - return request.fulfill(6 /* CONTENT_TEXT */, pos); - } - const points = []; - points.push({ offset: visibleRange.left, column: column }); - if (column > 1) { - const visibleRange = ctx.visibleRangeForPosition(lineNumber, column - 1); - if (visibleRange) { - points.push({ offset: visibleRange.left, column: column - 1 }); - } - } - const lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber); - if (column < lineMaxColumn) { - const visibleRange = ctx.visibleRangeForPosition(lineNumber, column + 1); - if (visibleRange) { - points.push({ offset: visibleRange.left, column: column + 1 }); - } - } - points.sort((a, b) => a.offset - b.offset); - for (let i = 1; i < points.length; i++) { - const prev = points[i - 1]; - const curr = points[i]; - if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) { - const rng = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](lineNumber, prev.column, lineNumber, curr.column); - return request.fulfill(6 /* CONTENT_TEXT */, pos, rng); - } - } - return request.fulfill(6 /* CONTENT_TEXT */, pos); - } - /** - * Most probably WebKit browsers and Edge - */ - static _doHitTestWithCaretRangeFromPoint(ctx, request) { - // In Chrome, especially on Linux it is possible to click between lines, - // so try to adjust the `hity` below so that it lands in the center of a line - const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset); - const lineVerticalOffset = ctx.getVerticalOffsetForLineNumber(lineNumber); - const lineCenteredVerticalOffset = lineVerticalOffset + Math.floor(ctx.lineHeight / 2); - let adjustedPageY = request.pos.y + (lineCenteredVerticalOffset - request.mouseVerticalOffset); - if (adjustedPageY <= request.editorPos.y) { - adjustedPageY = request.editorPos.y + 1; - } - if (adjustedPageY >= request.editorPos.y + ctx.layoutInfo.height) { - adjustedPageY = request.editorPos.y + ctx.layoutInfo.height - 1; - } - const adjustedPage = new _editorDom_js__WEBPACK_IMPORTED_MODULE_1__["PageCoordinates"](request.pos.x, adjustedPageY); - const r = this._actualDoHitTestWithCaretRangeFromPoint(ctx, adjustedPage.toClientCoordinates()); - if (r.position) { - return r; - } - // Also try to hit test without the adjustment (for the edge cases that we are near the top or bottom) - return this._actualDoHitTestWithCaretRangeFromPoint(ctx, request.pos.toClientCoordinates()); - } - static _actualDoHitTestWithCaretRangeFromPoint(ctx, coords) { - const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__["getShadowRoot"](ctx.viewDomNode); - let range; - if (shadowRoot) { - if (typeof shadowRoot.caretRangeFromPoint === 'undefined') { - range = shadowCaretRangeFromPoint(shadowRoot, coords.clientX, coords.clientY); - } - else { - range = shadowRoot.caretRangeFromPoint(coords.clientX, coords.clientY); - } - } - else { - range = document.caretRangeFromPoint(coords.clientX, coords.clientY); - } - if (!range || !range.startContainer) { - return { - position: null, - hitTarget: null - }; - } - // Chrome always hits a TEXT_NODE, while Edge sometimes hits a token span - const startContainer = range.startContainer; - let hitTarget = null; - if (startContainer.nodeType === startContainer.TEXT_NODE) { - // startContainer is expected to be the token text - const parent1 = startContainer.parentNode; // expected to be the token span - const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span - const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div - const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null; - if (parent3ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__["ViewLine"].CLASS_NAME) { - const p = ctx.getPositionFromDOMInfo(parent1, range.startOffset); - return { - position: p, - hitTarget: null - }; - } - else { - hitTarget = startContainer.parentNode; - } - } - else if (startContainer.nodeType === startContainer.ELEMENT_NODE) { - // startContainer is expected to be the token span - const parent1 = startContainer.parentNode; // expected to be the view line container span - const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line div - const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null; - if (parent2ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__["ViewLine"].CLASS_NAME) { - const p = ctx.getPositionFromDOMInfo(startContainer, startContainer.textContent.length); - return { - position: p, - hitTarget: null - }; - } - else { - hitTarget = startContainer; - } - } - return { - position: null, - hitTarget: hitTarget - }; - } - /** - * Most probably Gecko - */ - static _doHitTestWithCaretPositionFromPoint(ctx, coords) { - const hitResult = document.caretPositionFromPoint(coords.clientX, coords.clientY); - if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) { - // offsetNode is expected to be the token text - const parent1 = hitResult.offsetNode.parentNode; // expected to be the token span - const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span - const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div - const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null; - if (parent3ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__["ViewLine"].CLASS_NAME) { - const p = ctx.getPositionFromDOMInfo(hitResult.offsetNode.parentNode, hitResult.offset); - return { - position: p, - hitTarget: null - }; - } - else { - return { - position: null, - hitTarget: hitResult.offsetNode.parentNode - }; - } - } - // For inline decorations, Gecko returns the `` of the line and the offset is the `` with the inline decoration - if (hitResult.offsetNode.nodeType === hitResult.offsetNode.ELEMENT_NODE) { - const parent1 = hitResult.offsetNode.parentNode; // expected to be the view line div - const parent1ClassName = parent1 && parent1.nodeType === parent1.ELEMENT_NODE ? parent1.className : null; - if (parent1ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__["ViewLine"].CLASS_NAME) { - const tokenSpan = hitResult.offsetNode.childNodes[Math.min(hitResult.offset, hitResult.offsetNode.childNodes.length - 1)]; - if (tokenSpan) { - const p = ctx.getPositionFromDOMInfo(tokenSpan, 0); - return { - position: p, - hitTarget: null - }; - } - } - } - return { - position: null, - hitTarget: hitResult.offsetNode - }; - } - /** - * Most probably IE - */ - static _doHitTestWithMoveToPoint(ctx, coords) { - let resultPosition = null; - let resultHitTarget = null; - const textRange = document.body.createTextRange(); - try { - textRange.moveToPoint(coords.clientX, coords.clientY); - } - catch (err) { - return { - position: null, - hitTarget: null - }; - } - textRange.collapse(true); - // Now, let's do our best to figure out what we hit :) - const parentElement = textRange ? textRange.parentElement() : null; - const parent1 = parentElement ? parentElement.parentNode : null; - const parent2 = parent1 ? parent1.parentNode : null; - const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : ''; - if (parent2ClassName === _viewParts_lines_viewLine_js__WEBPACK_IMPORTED_MODULE_3__["ViewLine"].CLASS_NAME) { - const rangeToContainEntireSpan = textRange.duplicate(); - rangeToContainEntireSpan.moveToElementText(parentElement); - rangeToContainEntireSpan.setEndPoint('EndToStart', textRange); - resultPosition = ctx.getPositionFromDOMInfo(parentElement, rangeToContainEntireSpan.text.length); - // Move range out of the span node, IE doesn't like having many ranges in - // the same spot and will act badly for lines containing dashes ('-') - rangeToContainEntireSpan.moveToElementText(ctx.viewDomNode); - } - else { - // Looks like we've hit the hover or something foreign - resultHitTarget = parentElement; - } - // Move range out of the span node, IE doesn't like having many ranges in - // the same spot and will act badly for lines containing dashes ('-') - textRange.moveToElementText(ctx.viewDomNode); - return { - position: resultPosition, - hitTarget: resultHitTarget - }; - } - static _doHitTest(ctx, request) { - // State of the art (18.10.2012): - // The spec says browsers should support document.caretPositionFromPoint, but nobody implemented it (http://dev.w3.org/csswg/cssom-view/) - // Gecko: - // - they tried to implement it once, but failed: https://bugzilla.mozilla.org/show_bug.cgi?id=654352 - // - however, they do give out rangeParent/rangeOffset properties on mouse events - // Webkit: - // - they have implemented a previous version of the spec which was using document.caretRangeFromPoint - // IE: - // - they have a proprietary method on ranges, moveToPoint: https://msdn.microsoft.com/en-us/library/ie/ms536632(v=vs.85).aspx - // 24.08.2016: Edge has added WebKit's document.caretRangeFromPoint, but it is quite buggy - // - when hit testing the cursor it returns the first or the last line in the viewport - // - it inconsistently hits text nodes or span nodes, while WebKit only hits text nodes - // - when toggling render whitespace on, and hit testing in the empty content after a line, it always hits offset 0 of the first span of the line - // Thank you browsers for making this so 'easy' :) - if (typeof document.caretRangeFromPoint === 'function') { - return this._doHitTestWithCaretRangeFromPoint(ctx, request); - } - else if (document.caretPositionFromPoint) { - return this._doHitTestWithCaretPositionFromPoint(ctx, request.pos.toClientCoordinates()); - } - else if (document.body.createTextRange) { - return this._doHitTestWithMoveToPoint(ctx, request.pos.toClientCoordinates()); - } - return { - position: null, - hitTarget: null - }; - } -} -function shadowCaretRangeFromPoint(shadowRoot, x, y) { - const range = document.createRange(); - // Get the element under the point - let el = shadowRoot.elementFromPoint(x, y); - if (el !== null) { - // Get the last child of the element until its firstChild is a text node - // This assumes that the pointer is on the right of the line, out of the tokens - // and that we want to get the offset of the last token of the line - while (el && el.firstChild && el.firstChild.nodeType !== el.firstChild.TEXT_NODE) { - el = el.lastChild; - } - // Grab its rect - const rect = el.getBoundingClientRect(); - // And its font - const font = window.getComputedStyle(el, null).getPropertyValue('font'); - // And also its txt content - const text = el.innerText; - // Position the pixel cursor at the left of the element - let pixelCursor = rect.left; - let offset = 0; - let step; - // If the point is on the right of the box put the cursor after the last character - if (x > rect.left + rect.width) { - offset = text.length; - } - else { - const charWidthReader = CharWidthReader.getInstance(); - // Goes through all the characters of the innerText, and checks if the x of the point - // belongs to the character. - for (let i = 0; i < text.length + 1; i++) { - // The step is half the width of the character - step = charWidthReader.getCharWidth(text.charAt(i), font) / 2; - // Move to the center of the character - pixelCursor += step; - // If the x of the point is smaller that the position of the cursor, the point is over that character - if (x < pixelCursor) { - offset = i; - break; - } - // Move between the current character and the next - pixelCursor += step; - } - } - // Creates a range with the text node of the element and set the offset found - range.setStart(el.firstChild, offset); - range.setEnd(el.firstChild, offset); - } - return range; -} -class CharWidthReader { - constructor() { - this._cache = {}; - this._canvas = document.createElement('canvas'); - } - static getInstance() { - if (!CharWidthReader._INSTANCE) { - CharWidthReader._INSTANCE = new CharWidthReader(); - } - return CharWidthReader._INSTANCE; - } - getCharWidth(char, font) { - const cacheKey = char + font; - if (this._cache[cacheKey]) { - return this._cache[cacheKey]; - } - const context = this._canvas.getContext('2d'); - context.font = font; - const metrics = context.measureText(char); - const width = metrics.width; - this._cache[cacheKey] = width; - return width; - } -} -CharWidthReader._INSTANCE = null; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js ***! - \***************************************************************************************/ -/*! exports provided: PointerEventHandler, PointerHandler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointerEventHandler", function() { return PointerEventHandler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointerHandler", function() { return PointerHandler; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouseHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js"); -/* harmony import */ var _editorDom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../editorDom.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js"); -/* harmony import */ var _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -function gestureChangeEventMerger(lastEvent, currentEvent) { - const r = { - translationY: currentEvent.translationY, - translationX: currentEvent.translationX - }; - if (lastEvent) { - r.translationY += lastEvent.translationY; - r.translationX += lastEvent.translationX; - } - return r; -} -/** - * Basically Edge but should be modified to handle any pointerEnabled, even without support of MSGesture - */ -class StandardPointerHandler extends _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["MouseHandler"] { - constructor(context, viewController, viewHelper) { - super(context, viewController, viewHelper); - this.viewHelper.linesContentDomNode.style.touchAction = 'none'; - // TODO@Alex -> this expects that the view is added in 100 ms, might not be the case - // This handler should be added when the dom node is in the dom tree - this._installGestureHandlerTimeout = window.setTimeout(() => { - this._installGestureHandlerTimeout = -1; - // TODO@Alex: replace the usage of MSGesture here with something that works across all browsers - if (window.MSGesture) { - const touchGesture = new MSGesture(); - const penGesture = new MSGesture(); - touchGesture.target = this.viewHelper.linesContentDomNode; - penGesture.target = this.viewHelper.linesContentDomNode; - this.viewHelper.linesContentDomNode.addEventListener('pointerdown', (e) => { - const pointerType = e.pointerType; - if (pointerType === 'mouse') { - this._lastPointerType = 'mouse'; - return; - } - else if (pointerType === 'touch') { - this._lastPointerType = 'touch'; - touchGesture.addPointer(e.pointerId); - } - else { - this._lastPointerType = 'pen'; - penGesture.addPointer(e.pointerId); - } - }); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableThrottledListener"](this.viewHelper.linesContentDomNode, 'MSGestureChange', (e) => this._onGestureChange(e), gestureChangeEventMerger)); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, 'MSGestureTap', (e) => this._onCaptureGestureTap(e), true)); - } - }, 100); - this._lastPointerType = 'mouse'; - } - _onMouseDown(e) { - if (this._lastPointerType === 'mouse') { - super._onMouseDown(e); - } - } - _onCaptureGestureTap(rawEvent) { - const e = new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorMouseEvent"](rawEvent, this.viewHelper.viewDomNode); - const t = this._createMouseTarget(e, false); - if (t.position) { - this.viewController.moveTo(t.position); - } - // IE does not want to focus when coming in from the browser's address bar - if (e.browserEvent.fromElement) { - e.preventDefault(); - this.viewHelper.focusTextArea(); - } - else { - // TODO@Alex -> cancel this is focus is lost - setTimeout(() => { - this.viewHelper.focusTextArea(); - }); - } - } - _onGestureChange(e) { - this._context.model.deltaScrollNow(-e.translationX, -e.translationY); - } - dispose() { - window.clearTimeout(this._installGestureHandlerTimeout); - super.dispose(); - } -} -/** - * Currently only tested on iOS 13/ iPadOS. - */ -class PointerEventHandler extends _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["MouseHandler"] { - constructor(context, viewController, viewHelper) { - super(context, viewController, viewHelper); - this._register(_base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["Gesture"].addTarget(this.viewHelper.linesContentDomNode)); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Tap, (e) => this.onTap(e))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Change, (e) => this.onChange(e))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Contextmenu, (e) => this._onContextMenu(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorMouseEvent"](e, this.viewHelper.viewDomNode), false))); - this._lastPointerType = 'mouse'; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, 'pointerdown', (e) => { - const pointerType = e.pointerType; - if (pointerType === 'mouse') { - this._lastPointerType = 'mouse'; - return; - } - else if (pointerType === 'touch') { - this._lastPointerType = 'touch'; - } - else { - this._lastPointerType = 'pen'; - } - })); - // PonterEvents - const pointerEvents = new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorPointerEventFactory"](this.viewHelper.viewDomNode); - this._register(pointerEvents.onPointerMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), Object(_mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["createMouseMoveEventMerger"])(this.mouseTargetFactory), _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["MouseHandler"].MOUSE_MOVE_MINIMUM_TIME)); - this._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e))); - this._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e))); - this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e))); - } - onTap(event) { - if (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget)) { - return; - } - event.preventDefault(); - this.viewHelper.focusTextArea(); - const target = this._createMouseTarget(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorMouseEvent"](event, this.viewHelper.viewDomNode), false); - if (target.position) { - // this.viewController.moveTo(target.position); - this.viewController.dispatchMouse({ - position: target.position, - mouseColumn: target.position.column, - startedOnLineNumbers: false, - mouseDownCount: event.tapCount, - inSelectionMode: false, - altKey: false, - ctrlKey: false, - metaKey: false, - shiftKey: false, - leftButton: false, - middleButton: false, - }); - } - } - onChange(e) { - if (this._lastPointerType === 'touch') { - this._context.model.deltaScrollNow(-e.translationX, -e.translationY); - } - } - _onMouseDown(e) { - if (e.target && this.viewHelper.linesContentDomNode.contains(e.target) && this._lastPointerType === 'touch') { - return; - } - super._onMouseDown(e); - } -} -class TouchHandler extends _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["MouseHandler"] { - constructor(context, viewController, viewHelper) { - super(context, viewController, viewHelper); - this._register(_base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["Gesture"].addTarget(this.viewHelper.linesContentDomNode)); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Tap, (e) => this.onTap(e))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Change, (e) => this.onChange(e))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.viewHelper.linesContentDomNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Contextmenu, (e) => this._onContextMenu(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorMouseEvent"](e, this.viewHelper.viewDomNode), false))); - } - onTap(event) { - event.preventDefault(); - this.viewHelper.focusTextArea(); - const target = this._createMouseTarget(new _editorDom_js__WEBPACK_IMPORTED_MODULE_5__["EditorMouseEvent"](event, this.viewHelper.viewDomNode), false); - if (target.position) { - this.viewController.moveTo(target.position); - } - } - onChange(e) { - this._context.model.deltaScrollNow(-e.translationX, -e.translationY); - } -} -class PointerHandler extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(context, viewController, viewHelper) { - super(); - if ((_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isIOS"] && _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_6__["BrowserFeatures"].pointerEvents)) { - this.handler = this._register(new PointerEventHandler(context, viewController, viewHelper)); - } - else if (window.TouchEvent) { - this.handler = this._register(new TouchHandler(context, viewController, viewHelper)); - } - else if (window.navigator.pointerEnabled || window.PointerEvent) { - this.handler = this._register(new StandardPointerHandler(context, viewController, viewHelper)); - } - else { - this.handler = this._register(new _mouseHandler_js__WEBPACK_IMPORTED_MODULE_4__["MouseHandler"](context, viewController, viewHelper)); - } - } - getTargetAtClientPoint(clientX, clientY) { - return this.handler.getTargetAtClientPoint(clientX, clientY); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css ***! - \*****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./textAreaHandler.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_textAreaHandler_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js ***! - \****************************************************************************************/ -/*! exports provided: TextAreaHandler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextAreaHandler", function() { return TextAreaHandler; }); -/* harmony import */ var _textAreaHandler_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./textAreaHandler.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textAreaInput.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js"); -/* harmony import */ var _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./textAreaState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewParts/lineNumbers/lineNumbers.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js"); -/* harmony import */ var _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../viewParts/margin/margin.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/controller/wordCharacterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/mouseCursor/mouseCursor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - -class VisibleTextAreaData { - constructor(top, left, width) { - this.top = top; - this.left = left; - this.width = width; - } - setWidth(width) { - return new VisibleTextAreaData(this.top, this.left, width); - } -} -const canUseZeroSizeTextarea = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__["isEdge"] || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__["isFirefox"]); -class TextAreaHandler extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__["ViewPart"] { - constructor(context, viewController, viewHelper) { - super(context); - // --- end view API - this._primaryCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__["Position"](1, 1); - this._primaryCursorVisibleRange = null; - this._viewController = viewController; - this._viewHelper = viewHelper; - this._scrollLeft = 0; - this._scrollTop = 0; - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._setAccessibilityOptions(options); - this._contentLeft = layoutInfo.contentLeft; - this._contentWidth = layoutInfo.contentWidth; - this._contentHeight = layoutInfo.height; - this._fontInfo = options.get(36 /* fontInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._emptySelectionClipboard = options.get(26 /* emptySelectionClipboard */); - this._copyWithSyntaxHighlighting = options.get(16 /* copyWithSyntaxHighlighting */); - this._visibleTextArea = null; - this._selections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__["Selection"](1, 1, 1, 1)]; - this._modelSelections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__["Selection"](1, 1, 1, 1)]; - this._lastRenderPosition = null; - // Text Area (The focus will always be in the textarea when the cursor is blinking) - this.textArea = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('textarea')); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_9__["PartFingerprints"].write(this.textArea, 6 /* TextArea */); - this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]}`); - this.textArea.setAttribute('wrap', 'off'); - this.textArea.setAttribute('autocorrect', 'off'); - this.textArea.setAttribute('autocapitalize', 'off'); - this.textArea.setAttribute('autocomplete', 'off'); - this.textArea.setAttribute('spellcheck', 'false'); - this.textArea.setAttribute('aria-label', this._getAriaLabel(options)); - this.textArea.setAttribute('tabindex', String(options.get(102 /* tabIndex */))); - this.textArea.setAttribute('role', 'textbox'); - this.textArea.setAttribute('aria-roledescription', _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editor', "editor")); - this.textArea.setAttribute('aria-multiline', 'true'); - this.textArea.setAttribute('aria-haspopup', 'false'); - this.textArea.setAttribute('aria-autocomplete', 'both'); - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWeb"] && options.get(72 /* readOnly */)) { - this.textArea.setAttribute('readonly', 'true'); - } - this.textAreaCover = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this.textAreaCover.setPosition('absolute'); - const simpleModel = { - getLineCount: () => { - return this._context.model.getLineCount(); - }, - getLineMaxColumn: (lineNumber) => { - return this._context.model.getLineMaxColumn(lineNumber); - }, - getValueInRange: (range, eol) => { - return this._context.model.getValueInRange(range, eol); - } - }; - const textAreaInputHost = { - getDataToCopy: (generateHTML) => { - const rawTextToCopy = this._context.model.getPlainTextToCopy(this._modelSelections, this._emptySelectionClipboard, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWindows"]); - const newLineCharacter = this._context.model.getEOL(); - const isFromEmptySelection = (this._emptySelectionClipboard && this._modelSelections.length === 1 && this._modelSelections[0].isEmpty()); - const multicursorText = (Array.isArray(rawTextToCopy) ? rawTextToCopy : null); - const text = (Array.isArray(rawTextToCopy) ? rawTextToCopy.join(newLineCharacter) : rawTextToCopy); - let html = undefined; - let mode = null; - if (generateHTML) { - if (_textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__["CopyOptions"].forceCopyWithSyntaxHighlighting || (this._copyWithSyntaxHighlighting && text.length < 65536)) { - const richText = this._context.model.getRichTextToCopy(this._modelSelections, this._emptySelectionClipboard); - if (richText) { - html = richText.html; - mode = richText.mode; - } - } - } - return { - isFromEmptySelection, - multicursorText, - text, - html, - mode - }; - }, - getScreenReaderContent: (currentState) => { - if (this._accessibilitySupport === 1 /* Disabled */) { - // We know for a fact that a screen reader is not attached - // On OSX, we write the character before the cursor to allow for "long-press" composition - // Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isMacintosh"]) { - const selection = this._selections[0]; - if (selection.isEmpty()) { - const position = selection.getStartPosition(); - let textBefore = this._getWordBeforePosition(position); - if (textBefore.length === 0) { - textBefore = this._getCharacterBeforePosition(position); - } - if (textBefore.length > 0) { - return new _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__["TextAreaState"](textBefore, textBefore.length, textBefore.length, position, position); - } - } - } - return _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__["TextAreaState"].EMPTY; - } - return _textAreaState_js__WEBPACK_IMPORTED_MODULE_8__["PagedScreenReaderStrategy"].fromEditorSelection(currentState, simpleModel, this._selections[0], this._accessibilityPageSize, this._accessibilitySupport === 0 /* Unknown */); - }, - deduceModelPosition: (viewAnchorPosition, deltaOffset, lineFeedCnt) => { - return this._context.model.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt); - } - }; - this._textAreaInput = this._register(new _textAreaInput_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaInput"](textAreaInputHost, this.textArea)); - this._register(this._textAreaInput.onKeyDown((e) => { - this._viewController.emitKeyDown(e); - })); - this._register(this._textAreaInput.onKeyUp((e) => { - this._viewController.emitKeyUp(e); - })); - this._register(this._textAreaInput.onPaste((e) => { - let pasteOnNewLine = false; - let multicursorText = null; - let mode = null; - if (e.metadata) { - pasteOnNewLine = (this._emptySelectionClipboard && !!e.metadata.isFromEmptySelection); - multicursorText = (typeof e.metadata.multicursorText !== 'undefined' ? e.metadata.multicursorText : null); - mode = e.metadata.mode; - } - this._viewController.paste(e.text, pasteOnNewLine, multicursorText, mode); - })); - this._register(this._textAreaInput.onCut(() => { - this._viewController.cut(); - })); - this._register(this._textAreaInput.onType((e) => { - if (e.replaceCharCnt) { - this._viewController.replacePreviousChar(e.text, e.replaceCharCnt); - } - else { - this._viewController.type(e.text); - } - })); - this._register(this._textAreaInput.onSelectionChangeRequest((modelSelection) => { - this._viewController.setSelection(modelSelection); - })); - this._register(this._textAreaInput.onCompositionStart((e) => { - const lineNumber = this._selections[0].startLineNumber; - const column = this._selections[0].startColumn - (e.moveOneCharacterLeft ? 1 : 0); - this._context.model.revealRange('keyboard', true, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](lineNumber, column, lineNumber, column), 0 /* Simple */, 1 /* Immediate */); - // Find range pixel position - const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); - if (visibleRange) { - this._visibleTextArea = new VisibleTextAreaData(this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, canUseZeroSizeTextarea ? 0 : 1); - this._render(); - } - // Show the textarea - this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]} ime-input`); - this._viewController.compositionStart(); - })); - this._register(this._textAreaInput.onCompositionUpdate((e) => { - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__["isEdge"]) { - // Due to isEdgeOrIE (where the textarea was not cleared initially) - // we cannot assume the text consists only of the composited text - this._visibleTextArea = this._visibleTextArea.setWidth(0); - } - else { - // adjust width by its size - this._visibleTextArea = this._visibleTextArea.setWidth(measureText(e.data, this._fontInfo)); - } - this._render(); - })); - this._register(this._textAreaInput.onCompositionEnd(() => { - this._visibleTextArea = null; - this._render(); - this.textArea.setClassName(`inputarea ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_17__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]}`); - this._viewController.compositionEnd(); - })); - this._register(this._textAreaInput.onFocus(() => { - this._context.model.setHasFocus(true); - })); - this._register(this._textAreaInput.onBlur(() => { - this._context.model.setHasFocus(false); - })); - } - dispose() { - super.dispose(); - } - _getWordBeforePosition(position) { - const lineContent = this._context.model.getLineContent(position.lineNumber); - const wordSeparators = Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_13__["getMapForWordSeparators"])(this._context.configuration.options.get(105 /* wordSeparators */)); - let column = position.column; - let distance = 0; - while (column > 1) { - const charCode = lineContent.charCodeAt(column - 2); - const charClass = wordSeparators.get(charCode); - if (charClass !== 0 /* Regular */ || distance > 50) { - return lineContent.substring(column - 1, position.column - 1); - } - distance++; - column--; - } - return lineContent.substring(0, position.column - 1); - } - _getCharacterBeforePosition(position) { - if (position.column > 1) { - const lineContent = this._context.model.getLineContent(position.lineNumber); - const charBefore = lineContent.charAt(position.column - 2); - if (!_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["isHighSurrogate"](charBefore.charCodeAt(0))) { - return charBefore; - } - } - return ''; - } - _getAriaLabel(options) { - const accessibilitySupport = options.get(2 /* accessibilitySupport */); - if (accessibilitySupport === 1 /* Disabled */) { - return _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('accessibilityOffAriaLabel', "The editor is not accessible at this time. Press {0} for options.", _base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isLinux"] ? 'Shift+Alt+F1' : 'Alt+F1'); - } - return options.get(4 /* ariaLabel */); - } - _setAccessibilityOptions(options) { - this._accessibilitySupport = options.get(2 /* accessibilitySupport */); - const accessibilityPageSize = options.get(3 /* accessibilityPageSize */); - if (this._accessibilitySupport === 2 /* Enabled */ && accessibilityPageSize === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__["EditorOptions"].accessibilityPageSize.defaultValue) { - // If a screen reader is attached and the default value is not set we shuold automatically increase the page size to 100 for a better experience - // If we put more than 100 lines the nvda can not handle this https://github.com/microsoft/vscode/issues/89717 - this._accessibilityPageSize = 100; - } - else { - this._accessibilityPageSize = accessibilityPageSize; - } - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._setAccessibilityOptions(options); - this._contentLeft = layoutInfo.contentLeft; - this._contentWidth = layoutInfo.contentWidth; - this._contentHeight = layoutInfo.height; - this._fontInfo = options.get(36 /* fontInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._emptySelectionClipboard = options.get(26 /* emptySelectionClipboard */); - this._copyWithSyntaxHighlighting = options.get(16 /* copyWithSyntaxHighlighting */); - this.textArea.setAttribute('aria-label', this._getAriaLabel(options)); - this.textArea.setAttribute('tabindex', String(options.get(102 /* tabIndex */))); - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isWeb"] && e.hasChanged(72 /* readOnly */)) { - if (options.get(72 /* readOnly */)) { - this.textArea.setAttribute('readonly', 'true'); - } - else { - this.textArea.removeAttribute('readonly'); - } - } - if (e.hasChanged(2 /* accessibilitySupport */)) { - this._textAreaInput.writeScreenReaderContent('strategy changed'); - } - return true; - } - onCursorStateChanged(e) { - this._selections = e.selections.slice(0); - this._modelSelections = e.modelSelections.slice(0); - this._textAreaInput.writeScreenReaderContent('selection changed'); - return true; - } - onDecorationsChanged(e) { - // true for inline decorations that can end up relayouting text - return true; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - this._scrollLeft = e.scrollLeft; - this._scrollTop = e.scrollTop; - return true; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - // --- begin view API - isFocused() { - return this._textAreaInput.isFocused(); - } - focusTextArea() { - this._textAreaInput.focusTextArea(); - } - getLastRenderData() { - return this._lastRenderPosition; - } - setAriaOptions(options) { - if (options.activeDescendant) { - this.textArea.setAttribute('aria-haspopup', 'true'); - this.textArea.setAttribute('aria-autocomplete', 'list'); - this.textArea.setAttribute('aria-activedescendant', options.activeDescendant); - } - else { - this.textArea.setAttribute('aria-haspopup', 'false'); - this.textArea.setAttribute('aria-autocomplete', 'both'); - this.textArea.removeAttribute('aria-activedescendant'); - } - if (options.role) { - this.textArea.setAttribute('role', options.role); - } - } - prepareRender(ctx) { - this._primaryCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_14__["Position"](this._selections[0].positionLineNumber, this._selections[0].positionColumn); - this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(this._primaryCursorPosition); - } - render(ctx) { - this._textAreaInput.writeScreenReaderContent('render'); - this._render(); - } - _render() { - if (this._visibleTextArea) { - // The text area is visible for composition reasons - this._renderInsideEditor(null, this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight); - return; - } - if (!this._primaryCursorVisibleRange) { - // The primary cursor is outside the viewport => place textarea to the top left - this._renderAtTopLeft(); - return; - } - const left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft; - if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) { - // cursor is outside the viewport - this._renderAtTopLeft(); - return; - } - const top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop; - if (top < 0 || top > this._contentHeight) { - // cursor is outside the viewport - this._renderAtTopLeft(); - return; - } - // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["isMacintosh"]) { - // For the popup emoji input, we will make the text area as high as the line height - // We will also make the fontSize and lineHeight the correct dimensions to help with the placement of these pickers - this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, this._lineHeight); - return; - } - this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1); - } - _renderInsideEditor(renderedPosition, top, left, width, height) { - this._lastRenderPosition = renderedPosition; - const ta = this.textArea; - const tac = this.textAreaCover; - _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__["Configuration"].applyFontInfo(ta, this._fontInfo); - ta.setTop(top); - ta.setLeft(left); - ta.setWidth(width); - ta.setHeight(height); - tac.setTop(0); - tac.setLeft(0); - tac.setWidth(0); - tac.setHeight(0); - } - _renderAtTopLeft() { - this._lastRenderPosition = null; - const ta = this.textArea; - const tac = this.textAreaCover; - _config_configuration_js__WEBPACK_IMPORTED_MODULE_6__["Configuration"].applyFontInfo(ta, this._fontInfo); - ta.setTop(0); - ta.setLeft(0); - tac.setTop(0); - tac.setLeft(0); - if (canUseZeroSizeTextarea) { - ta.setWidth(0); - ta.setHeight(0); - tac.setWidth(0); - tac.setHeight(0); - return; - } - // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) - // specifically, when doing Korean IME, setting the textarea to 0x0 breaks IME badly. - ta.setWidth(1); - ta.setHeight(1); - tac.setWidth(1); - tac.setHeight(1); - const options = this._context.configuration.options; - if (options.get(42 /* glyphMargin */)) { - tac.setClassName('monaco-editor-background textAreaCover ' + _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_11__["Margin"].OUTER_CLASS_NAME); - } - else { - if (options.get(52 /* lineNumbers */).renderType !== 0 /* Off */) { - tac.setClassName('monaco-editor-background textAreaCover ' + _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_10__["LineNumbersOverlay"].CLASS_NAME); - } - else { - tac.setClassName('monaco-editor-background textAreaCover'); - } - } - } -} -function measureText(text, fontInfo) { - // adjust width by its size - const canvasElem = document.createElement('canvas'); - const context = canvasElem.getContext('2d'); - context.font = createFontString(fontInfo); - const metrics = context.measureText(text); - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_2__["isFirefox"]) { - return metrics.width + 2; // +2 for Japanese... - } - else { - return metrics.width; - } -} -function createFontString(bareFontInfo) { - return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily); -} -function doCreateFontString(fontStyle, fontWeight, fontSize, lineHeight, fontFamily) { - // The full font syntax is: - // style | variant | weight | stretch | size/line-height | fontFamily - // (https://developer.mozilla.org/en-US/docs/Web/CSS/font) - // But it appears Edge and IE11 cannot properly parse `stretch`. - return `${fontStyle} normal ${fontWeight} ${fontSize}px / ${lineHeight}px ${fontFamily}`; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js ***! - \**************************************************************************************/ -/*! exports provided: CopyOptions, InMemoryClipboardMetadataManager, TextAreaInput */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CopyOptions", function() { return CopyOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InMemoryClipboardMetadataManager", function() { return InMemoryClipboardMetadataManager; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextAreaInput", function() { return TextAreaInput; }); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textAreaState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -const CopyOptions = { - forceCopyWithSyntaxHighlighting: false -}; -/** - * Every time we write to the clipboard, we record a bit of extra metadata here. - * Every time we read from the cipboard, if the text matches our last written text, - * we can fetch the previous metadata. - */ -class InMemoryClipboardMetadataManager { - constructor() { - this._lastState = null; - } - set(lastCopiedValue, data) { - this._lastState = { lastCopiedValue, data }; - } - get(pastedText) { - if (this._lastState && this._lastState.lastCopiedValue === pastedText) { - // match! - return this._lastState.data; - } - this._lastState = null; - return null; - } -} -InMemoryClipboardMetadataManager.INSTANCE = new InMemoryClipboardMetadataManager(); -/** - * Writes screen reader content to the textarea and is able to analyze its input events to generate: - * - onCut - * - onPaste - * - onType - * - * Composition events are generated for presentation purposes (composition input is reflected in onType). - */ -class TextAreaInput extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(host, textArea) { - super(); - this.textArea = textArea; - this._onFocus = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onFocus = this._onFocus.event; - this._onBlur = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onBlur = this._onBlur.event; - this._onKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onKeyDown = this._onKeyDown.event; - this._onKeyUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onKeyUp = this._onKeyUp.event; - this._onCut = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onCut = this._onCut.event; - this._onPaste = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onPaste = this._onPaste.event; - this._onType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onType = this._onType.event; - this._onCompositionStart = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onCompositionStart = this._onCompositionStart.event; - this._onCompositionUpdate = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onCompositionUpdate = this._onCompositionUpdate.event; - this._onCompositionEnd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onCompositionEnd = this._onCompositionEnd.event; - this._onSelectionChangeRequest = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onSelectionChangeRequest = this._onSelectionChangeRequest.event; - this._host = host; - this._textArea = this._register(new TextAreaWrapper(textArea)); - this._asyncTriggerCut = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["RunOnceScheduler"](() => this._onCut.fire(), 0)); - this._textAreaState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].EMPTY; - this._selectionChangeListener = null; - this.writeScreenReaderContent('ctor'); - this._hasFocus = false; - this._isDoingComposition = false; - this._nextCommand = 0 /* Type */; - let lastKeyDown = null; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](textArea.domNode, 'keydown', (e) => { - if (e.keyCode === 109 /* KEY_IN_COMPOSITION */ - || (this._isDoingComposition && e.keyCode === 1 /* Backspace */)) { - // Stop propagation for keyDown events if the IME is processing key input - e.stopPropagation(); - } - if (e.equals(9 /* Escape */)) { - // Prevent default always for `Esc`, otherwise it will generate a keypress - // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx - e.preventDefault(); - } - lastKeyDown = e; - this._onKeyDown.fire(e); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](textArea.domNode, 'keyup', (e) => { - this._onKeyUp.fire(e); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'compositionstart', (e) => { - if (this._isDoingComposition) { - return; - } - this._isDoingComposition = true; - let moveOneCharacterLeft = false; - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__["isMacintosh"] - && lastKeyDown - && lastKeyDown.equals(109 /* KEY_IN_COMPOSITION */) - && this._textAreaState.selectionStart === this._textAreaState.selectionEnd - && this._textAreaState.selectionStart > 0 - && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === e.data) { - // Handling long press case on macOS + arrow key => pretend the character was selected - if (lastKeyDown.code === 'ArrowRight' || lastKeyDown.code === 'ArrowLeft') { - moveOneCharacterLeft = true; - } - } - if (moveOneCharacterLeft) { - this._textAreaState = new _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"](this._textAreaState.value, this._textAreaState.selectionStart - 1, this._textAreaState.selectionEnd, this._textAreaState.selectionStartPosition ? new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](this._textAreaState.selectionStartPosition.lineNumber, this._textAreaState.selectionStartPosition.column - 1) : null, this._textAreaState.selectionEndPosition); - } - else if (!_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"]) { - // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. - this._setAndWriteTextAreaState('compositionstart', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].EMPTY); - } - this._onCompositionStart.fire({ moveOneCharacterLeft }); - })); - /** - * Deduce the typed input from a text area's value and the last observed state. - */ - const deduceInputFromTextAreaValue = (couldBeEmojiInput) => { - const oldState = this._textAreaState; - const newState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].readFromTextArea(this._textArea); - return [newState, _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].deduceInput(oldState, newState, couldBeEmojiInput)]; - }; - /** - * Deduce the composition input from a string. - */ - const deduceComposition = (text) => { - const oldState = this._textAreaState; - const newState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].selectedText(text); - const typeInput = { - text: newState.value, - replaceCharCnt: oldState.selectionEnd - oldState.selectionStart - }; - return [newState, typeInput]; - }; - const compositionDataInValid = (locale) => { - // https://github.com/Microsoft/monaco-editor/issues/339 - // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. - // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, - // which breaks this path of code. - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"] && locale === 'ja') { - return true; - } - return false; - }; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'compositionupdate', (e) => { - if (compositionDataInValid(e.locale)) { - const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ false); - this._textAreaState = newState; - this._onType.fire(typeInput); - this._onCompositionUpdate.fire(e); - return; - } - const [newState, typeInput] = deduceComposition(e.data || ''); - this._textAreaState = newState; - this._onType.fire(typeInput); - this._onCompositionUpdate.fire(e); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'compositionend', (e) => { - // https://github.com/microsoft/monaco-editor/issues/1663 - // On iOS 13.2, Chinese system IME randomly trigger an additional compositionend event with empty data - if (!this._isDoingComposition) { - return; - } - if (compositionDataInValid(e.locale)) { - // https://github.com/Microsoft/monaco-editor/issues/339 - const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ false); - this._textAreaState = newState; - this._onType.fire(typeInput); - } - else { - const [newState, typeInput] = deduceComposition(e.data || ''); - this._textAreaState = newState; - this._onType.fire(typeInput); - } - // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) - // we cannot assume the text at the end consists only of the composited text - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"] || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isChrome"]) { - this._textAreaState = _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].readFromTextArea(this._textArea); - } - if (!this._isDoingComposition) { - return; - } - this._isDoingComposition = false; - this._onCompositionEnd.fire(); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'input', () => { - // Pretend here we touched the text area, as the `input` event will most likely - // result in a `selectionchange` event which we want to ignore - this._textArea.setIgnoreSelectionChangeTime('received input event'); - if (this._isDoingComposition) { - return; - } - const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__["isMacintosh"]); - if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__["isHighSurrogate"](typeInput.text.charCodeAt(0))) { - // Ignore invalid input but keep it around for next time - return; - } - this._textAreaState = newState; - if (this._nextCommand === 0 /* Type */) { - if (typeInput.text !== '') { - this._onType.fire(typeInput); - } - } - else { - if (typeInput.text !== '' || typeInput.replaceCharCnt !== 0) { - this._firePaste(typeInput.text, null); - } - this._nextCommand = 0 /* Type */; - } - })); - // --- Clipboard operations - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'cut', (e) => { - // Pretend here we touched the text area, as the `cut` event will most likely - // result in a `selectionchange` event which we want to ignore - this._textArea.setIgnoreSelectionChangeTime('received cut event'); - this._ensureClipboardGetsEditorSelection(e); - this._asyncTriggerCut.schedule(); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'copy', (e) => { - this._ensureClipboardGetsEditorSelection(e); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'paste', (e) => { - // Pretend here we touched the text area, as the `paste` event will most likely - // result in a `selectionchange` event which we want to ignore - this._textArea.setIgnoreSelectionChangeTime('received paste event'); - if (ClipboardEventUtils.canUseTextData(e)) { - const [pastePlainText, metadata] = ClipboardEventUtils.getTextData(e); - if (pastePlainText !== '') { - this._firePaste(pastePlainText, metadata); - } - } - else { - if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) { - // Clean up the textarea, to get a clean paste - this._setAndWriteTextAreaState('paste', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].EMPTY); - } - this._nextCommand = 1 /* Paste */; - } - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'focus', () => { - this._setHasFocus(true); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](textArea.domNode, 'blur', () => { - this._setHasFocus(false); - })); - } - _installSelectionChangeListener() { - // See https://github.com/Microsoft/vscode/issues/27216 and https://github.com/microsoft/vscode/issues/98256 - // When using a Braille display, it is possible for users to reposition the - // system caret. This is reflected in Chrome as a `selectionchange` event. - // - // The `selectionchange` event appears to be emitted under numerous other circumstances, - // so it is quite a challenge to distinguish a `selectionchange` coming in from a user - // using a Braille display from all the other cases. - // - // The problems with the `selectionchange` event are: - // * the event is emitted when the textarea is focused programmatically -- textarea.focus() - // * the event is emitted when the selection is changed in the textarea programmatically -- textarea.setSelectionRange(...) - // * the event is emitted when the value of the textarea is changed programmatically -- textarea.value = '...' - // * the event is emitted when tabbing into the textarea - // * the event is emitted asynchronously (sometimes with a delay as high as a few tens of ms) - // * the event sometimes comes in bursts for a single logical textarea operation - // `selectionchange` events often come multiple times for a single logical change - // so throttle multiple `selectionchange` events that burst in a short period of time. - let previousSelectionChangeEventTime = 0; - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](document, 'selectionchange', (e) => { - if (!this._hasFocus) { - return; - } - if (this._isDoingComposition) { - return; - } - if (!_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isChrome"]) { - // Support only for Chrome until testing happens on other browsers - return; - } - const now = Date.now(); - const delta1 = now - previousSelectionChangeEventTime; - previousSelectionChangeEventTime = now; - if (delta1 < 5) { - // received another `selectionchange` event within 5ms of the previous `selectionchange` event - // => ignore it - return; - } - const delta2 = now - this._textArea.getIgnoreSelectionChangeTime(); - this._textArea.resetSelectionChangeTime(); - if (delta2 < 100) { - // received a `selectionchange` event within 100ms since we touched the textarea - // => ignore it, since we caused it - return; - } - if (!this._textAreaState.selectionStartPosition || !this._textAreaState.selectionEndPosition) { - // Cannot correlate a position in the textarea with a position in the editor... - return; - } - const newValue = this._textArea.getValue(); - if (this._textAreaState.value !== newValue) { - // Cannot correlate a position in the textarea with a position in the editor... - return; - } - const newSelectionStart = this._textArea.getSelectionStart(); - const newSelectionEnd = this._textArea.getSelectionEnd(); - if (this._textAreaState.selectionStart === newSelectionStart && this._textAreaState.selectionEnd === newSelectionEnd) { - // Nothing to do... - return; - } - const _newSelectionStartPosition = this._textAreaState.deduceEditorPosition(newSelectionStart); - const newSelectionStartPosition = this._host.deduceModelPosition(_newSelectionStartPosition[0], _newSelectionStartPosition[1], _newSelectionStartPosition[2]); - const _newSelectionEndPosition = this._textAreaState.deduceEditorPosition(newSelectionEnd); - const newSelectionEndPosition = this._host.deduceModelPosition(_newSelectionEndPosition[0], _newSelectionEndPosition[1], _newSelectionEndPosition[2]); - const newSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](newSelectionStartPosition.lineNumber, newSelectionStartPosition.column, newSelectionEndPosition.lineNumber, newSelectionEndPosition.column); - this._onSelectionChangeRequest.fire(newSelection); - }); - } - dispose() { - super.dispose(); - if (this._selectionChangeListener) { - this._selectionChangeListener.dispose(); - this._selectionChangeListener = null; - } - } - focusTextArea() { - // Setting this._hasFocus and writing the screen reader content - // will result in a focus() and setSelectionRange() in the textarea - this._setHasFocus(true); - // If the editor is off DOM, focus cannot be really set, so let's double check that we have managed to set the focus - this.refreshFocusState(); - } - isFocused() { - return this._hasFocus; - } - refreshFocusState() { - const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getShadowRoot"](this.textArea.domNode); - if (shadowRoot) { - this._setHasFocus(shadowRoot.activeElement === this.textArea.domNode); - } - else if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["isInDOM"](this.textArea.domNode)) { - this._setHasFocus(document.activeElement === this.textArea.domNode); - } - else { - this._setHasFocus(false); - } - } - _setHasFocus(newHasFocus) { - if (this._hasFocus === newHasFocus) { - // no change - return; - } - this._hasFocus = newHasFocus; - if (this._selectionChangeListener) { - this._selectionChangeListener.dispose(); - this._selectionChangeListener = null; - } - if (this._hasFocus) { - this._selectionChangeListener = this._installSelectionChangeListener(); - } - if (this._hasFocus) { - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"]) { - // Edge has a bug where setting the selection range while the focus event - // is dispatching doesn't work. To reproduce, "tab into" the editor. - this._setAndWriteTextAreaState('focusgain', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].EMPTY); - } - else { - this.writeScreenReaderContent('focusgain'); - } - } - if (this._hasFocus) { - this._onFocus.fire(); - } - else { - this._onBlur.fire(); - } - } - _setAndWriteTextAreaState(reason, textAreaState) { - if (!this._hasFocus) { - textAreaState = textAreaState.collapseSelection(); - } - textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus); - this._textAreaState = textAreaState; - } - writeScreenReaderContent(reason) { - if (this._isDoingComposition) { - // Do not write to the text area when doing composition - return; - } - this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState)); - } - _ensureClipboardGetsEditorSelection(e) { - const dataToCopy = this._host.getDataToCopy(ClipboardEventUtils.canUseTextData(e) && _base_browser_canIUse_js__WEBPACK_IMPORTED_MODULE_10__["BrowserFeatures"].clipboard.richText); - const storedMetadata = { - version: 1, - isFromEmptySelection: dataToCopy.isFromEmptySelection, - multicursorText: dataToCopy.multicursorText, - mode: dataToCopy.mode - }; - InMemoryClipboardMetadataManager.INSTANCE.set( - // When writing "LINE\r\n" to the clipboard and then pasting, - // Firefox pastes "LINE\n", so let's work around this quirk - (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] ? dataToCopy.text.replace(/\r\n/g, '\n') : dataToCopy.text), storedMetadata); - if (!ClipboardEventUtils.canUseTextData(e)) { - // Looks like an old browser. The strategy is to place the text - // we'd like to be copied to the clipboard in the textarea and select it. - this._setAndWriteTextAreaState('copy or cut', _textAreaState_js__WEBPACK_IMPORTED_MODULE_7__["TextAreaState"].selectedText(dataToCopy.text)); - return; - } - ClipboardEventUtils.setTextData(e, dataToCopy.text, dataToCopy.html, storedMetadata); - } - _firePaste(text, metadata) { - if (!metadata) { - // try the in-memory store - metadata = InMemoryClipboardMetadataManager.INSTANCE.get(text); - } - this._onPaste.fire({ - text: text, - metadata: metadata - }); - } -} -class ClipboardEventUtils { - static canUseTextData(e) { - if (e.clipboardData) { - return true; - } - if (window.clipboardData) { - return true; - } - return false; - } - static getTextData(e) { - if (e.clipboardData) { - e.preventDefault(); - const text = e.clipboardData.getData('text/plain'); - let metadata = null; - const rawmetadata = e.clipboardData.getData('vscode-editor-data'); - if (typeof rawmetadata === 'string') { - try { - metadata = JSON.parse(rawmetadata); - if (metadata.version !== 1) { - metadata = null; - } - } - catch (err) { - // no problem! - } - } - return [text, metadata]; - } - if (window.clipboardData) { - e.preventDefault(); - const text = window.clipboardData.getData('Text'); - return [text, null]; - } - throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!'); - } - static setTextData(e, text, html, metadata) { - if (e.clipboardData) { - e.clipboardData.setData('text/plain', text); - if (typeof html === 'string') { - e.clipboardData.setData('text/html', html); - } - e.clipboardData.setData('vscode-editor-data', JSON.stringify(metadata)); - e.preventDefault(); - return; - } - if (window.clipboardData) { - window.clipboardData.setData('Text', text); - e.preventDefault(); - return; - } - throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!'); - } -} -class TextAreaWrapper extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(_textArea) { - super(); - this._actual = _textArea; - this._ignoreSelectionChangeTime = 0; - } - setIgnoreSelectionChangeTime(reason) { - this._ignoreSelectionChangeTime = Date.now(); - } - getIgnoreSelectionChangeTime() { - return this._ignoreSelectionChangeTime; - } - resetSelectionChangeTime() { - this._ignoreSelectionChangeTime = 0; - } - getValue() { - // console.log('current value: ' + this._textArea.value); - return this._actual.domNode.value; - } - setValue(reason, value) { - const textArea = this._actual.domNode; - if (textArea.value === value) { - // No change - return; - } - // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value); - this.setIgnoreSelectionChangeTime('setValue'); - textArea.value = value; - } - getSelectionStart() { - return this._actual.domNode.selectionStart; - } - getSelectionEnd() { - return this._actual.domNode.selectionEnd; - } - setSelectionRange(reason, selectionStart, selectionEnd) { - const textArea = this._actual.domNode; - let activeElement = null; - const shadowRoot = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getShadowRoot"](textArea); - if (shadowRoot) { - activeElement = shadowRoot.activeElement; - } - else { - activeElement = document.activeElement; - } - const currentIsFocused = (activeElement === textArea); - const currentSelectionStart = textArea.selectionStart; - const currentSelectionEnd = textArea.selectionEnd; - if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) { - // No change - // Firefox iframe bug https://github.com/Microsoft/monaco-editor/issues/643#issuecomment-367871377 - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && window.parent !== window) { - textArea.focus(); - } - return; - } - // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd); - if (currentIsFocused) { - // No need to focus, only need to change the selection range - this.setIgnoreSelectionChangeTime('setSelectionRange'); - textArea.setSelectionRange(selectionStart, selectionEnd); - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && window.parent !== window) { - textArea.focus(); - } - return; - } - // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. - // Here, we try to undo the browser's desperate reveal. - try { - const scrollState = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["saveParentsScrollTop"](textArea); - this.setIgnoreSelectionChangeTime('setSelectionRange'); - textArea.focus(); - textArea.setSelectionRange(selectionStart, selectionEnd); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["restoreParentsScrollTop"](textArea, scrollState); - } - catch (e) { - // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js ***! - \**************************************************************************************/ -/*! exports provided: TextAreaState, PagedScreenReaderStrategy */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextAreaState", function() { return TextAreaState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagedScreenReaderStrategy", function() { return PagedScreenReaderStrategy; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class TextAreaState { - constructor(value, selectionStart, selectionEnd, selectionStartPosition, selectionEndPosition) { - this.value = value; - this.selectionStart = selectionStart; - this.selectionEnd = selectionEnd; - this.selectionStartPosition = selectionStartPosition; - this.selectionEndPosition = selectionEndPosition; - } - toString() { - return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ']'; - } - static readFromTextArea(textArea) { - return new TextAreaState(textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), null, null); - } - collapseSelection() { - return new TextAreaState(this.value, this.value.length, this.value.length, null, null); - } - writeToTextArea(reason, textArea, select) { - // console.log(Date.now() + ': writeToTextArea ' + reason + ': ' + this.toString()); - textArea.setValue(reason, this.value); - if (select) { - textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd); - } - } - deduceEditorPosition(offset) { - if (offset <= this.selectionStart) { - const str = this.value.substring(offset, this.selectionStart); - return this._finishDeduceEditorPosition(this.selectionStartPosition, str, -1); - } - if (offset >= this.selectionEnd) { - const str = this.value.substring(this.selectionEnd, offset); - return this._finishDeduceEditorPosition(this.selectionEndPosition, str, 1); - } - const str1 = this.value.substring(this.selectionStart, offset); - if (str1.indexOf(String.fromCharCode(8230)) === -1) { - return this._finishDeduceEditorPosition(this.selectionStartPosition, str1, 1); - } - const str2 = this.value.substring(offset, this.selectionEnd); - return this._finishDeduceEditorPosition(this.selectionEndPosition, str2, -1); - } - _finishDeduceEditorPosition(anchor, deltaText, signum) { - let lineFeedCnt = 0; - let lastLineFeedIndex = -1; - while ((lastLineFeedIndex = deltaText.indexOf('\n', lastLineFeedIndex + 1)) !== -1) { - lineFeedCnt++; - } - return [anchor, signum * deltaText.length, lineFeedCnt]; - } - static selectedText(text) { - return new TextAreaState(text, 0, text.length, null, null); - } - static deduceInput(previousState, currentState, couldBeEmojiInput) { - if (!previousState) { - // This is the EMPTY state - return { - text: '', - replaceCharCnt: 0 - }; - } - // console.log('------------------------deduceInput'); - // console.log('PREVIOUS STATE: ' + previousState.toString()); - // console.log('CURRENT STATE: ' + currentState.toString()); - let previousValue = previousState.value; - let previousSelectionStart = previousState.selectionStart; - let previousSelectionEnd = previousState.selectionEnd; - let currentValue = currentState.value; - let currentSelectionStart = currentState.selectionStart; - let currentSelectionEnd = currentState.selectionEnd; - // Strip the previous suffix from the value (without interfering with the current selection) - const previousSuffix = previousValue.substring(previousSelectionEnd); - const currentSuffix = currentValue.substring(currentSelectionEnd); - const suffixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["commonSuffixLength"](previousSuffix, currentSuffix); - currentValue = currentValue.substring(0, currentValue.length - suffixLength); - previousValue = previousValue.substring(0, previousValue.length - suffixLength); - const previousPrefix = previousValue.substring(0, previousSelectionStart); - const currentPrefix = currentValue.substring(0, currentSelectionStart); - const prefixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["commonPrefixLength"](previousPrefix, currentPrefix); - currentValue = currentValue.substring(prefixLength); - previousValue = previousValue.substring(prefixLength); - currentSelectionStart -= prefixLength; - previousSelectionStart -= prefixLength; - currentSelectionEnd -= prefixLength; - previousSelectionEnd -= prefixLength; - // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd); - // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd); - if (couldBeEmojiInput && currentSelectionStart === currentSelectionEnd && previousValue.length > 0) { - // on OSX, emojis from the emoji picker are inserted at random locations - // the only hints we can use is that the selection is immediately after the inserted emoji - // and that none of the old text has been deleted - let potentialEmojiInput = null; - if (currentSelectionStart === currentValue.length) { - // emoji potentially inserted "somewhere" after the previous selection => it should appear at the end of `currentValue` - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["startsWith"](currentValue, previousValue)) { - // only if all of the old text is accounted for - potentialEmojiInput = currentValue.substring(previousValue.length); - } - } - else { - // emoji potentially inserted "somewhere" before the previous selection => it should appear at the start of `currentValue` - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["endsWith"](currentValue, previousValue)) { - // only if all of the old text is accounted for - potentialEmojiInput = currentValue.substring(0, currentValue.length - previousValue.length); - } - } - if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) { - // now we check that this is indeed an emoji - // emojis can grow quite long, so a length check is of no help - // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England - // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint - // http://emojipedia.org/variation-selector-16/ - // > An invisible codepoint which specifies that the preceding character - // > should be displayed with emoji presentation. Only required if the - // > preceding character defaults to text presentation. - if (/\uFE0F/.test(potentialEmojiInput) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsEmoji"](potentialEmojiInput)) { - return { - text: potentialEmojiInput, - replaceCharCnt: 0 - }; - } - } - } - if (currentSelectionStart === currentSelectionEnd) { - // composition accept case (noticed in FF + Japanese) - // [blahblah] => blahblah| - if (previousValue === currentValue - && previousSelectionStart === 0 - && previousSelectionEnd === previousValue.length - && currentSelectionStart === currentValue.length - && currentValue.indexOf('\n') === -1) { - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsFullWidthCharacter"](currentValue)) { - return { - text: '', - replaceCharCnt: 0 - }; - } - } - // no current selection - const replacePreviousCharacters = (previousPrefix.length - prefixLength); - // console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars'); - return { - text: currentValue, - replaceCharCnt: replacePreviousCharacters - }; - } - // there is a current selection => composition case - const replacePreviousCharacters = previousSelectionEnd - previousSelectionStart; - return { - text: currentValue, - replaceCharCnt: replacePreviousCharacters - }; - } -} -TextAreaState.EMPTY = new TextAreaState('', 0, 0, null, null); -class PagedScreenReaderStrategy { - static _getPageOfLine(lineNumber, linesPerPage) { - return Math.floor((lineNumber - 1) / linesPerPage); - } - static _getRangeForPage(page, linesPerPage) { - const offset = page * linesPerPage; - const startLineNumber = offset + 1; - const endLineNumber = offset + linesPerPage; - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, 1, endLineNumber + 1, 1); - } - static fromEditorSelection(previousState, model, selection, linesPerPage, trimLongText) { - const selectionStartPage = PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber, linesPerPage); - const selectionStartPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionStartPage, linesPerPage); - const selectionEndPage = PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber, linesPerPage); - const selectionEndPageRange = PagedScreenReaderStrategy._getRangeForPage(selectionEndPage, linesPerPage); - const pretextRange = selectionStartPageRange.intersectRanges(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](1, 1, selection.startLineNumber, selection.startColumn)); - let pretext = model.getValueInRange(pretextRange, 1 /* LF */); - const lastLine = model.getLineCount(); - const lastLineMaxColumn = model.getLineMaxColumn(lastLine); - const posttextRange = selectionEndPageRange.intersectRanges(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn)); - let posttext = model.getValueInRange(posttextRange, 1 /* LF */); - let text; - if (selectionStartPage === selectionEndPage || selectionStartPage + 1 === selectionEndPage) { - // take full selection - text = model.getValueInRange(selection, 1 /* LF */); - } - else { - const selectionRange1 = selectionStartPageRange.intersectRanges(selection); - const selectionRange2 = selectionEndPageRange.intersectRanges(selection); - text = (model.getValueInRange(selectionRange1, 1 /* LF */) - + String.fromCharCode(8230) - + model.getValueInRange(selectionRange2, 1 /* LF */)); - } - // Chromium handles very poorly text even of a few thousand chars - // Cut text to avoid stalling the entire UI - if (trimLongText) { - const LIMIT_CHARS = 500; - if (pretext.length > LIMIT_CHARS) { - pretext = pretext.substring(pretext.length - LIMIT_CHARS, pretext.length); - } - if (posttext.length > LIMIT_CHARS) { - posttext = posttext.substring(0, LIMIT_CHARS); - } - if (text.length > 2 * LIMIT_CHARS) { - text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); - } - } - return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](selection.startLineNumber, selection.startColumn), new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](selection.endLineNumber, selection.endColumn)); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js ***! - \******************************************************************************/ -/*! exports provided: EditorState, EditorStateCancellationTokenSource, TextModelCancellationTokenSource, StableEditorScrollState */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorState", function() { return EditorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorStateCancellationTokenSource", function() { return EditorStateCancellationTokenSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextModelCancellationTokenSource", function() { return TextModelCancellationTokenSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StableEditorScrollState", function() { return StableEditorScrollState; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _keybindingCancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./keybindingCancellation.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class EditorState { - constructor(editor, flags) { - this.flags = flags; - if ((this.flags & 1 /* Value */) !== 0) { - const model = editor.getModel(); - this.modelVersionId = model ? _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["format"]('{0}#{1}', model.uri.toString(), model.getVersionId()) : null; - } - else { - this.modelVersionId = null; - } - if ((this.flags & 4 /* Position */) !== 0) { - this.position = editor.getPosition(); - } - else { - this.position = null; - } - if ((this.flags & 2 /* Selection */) !== 0) { - this.selection = editor.getSelection(); - } - else { - this.selection = null; - } - if ((this.flags & 8 /* Scroll */) !== 0) { - this.scrollLeft = editor.getScrollLeft(); - this.scrollTop = editor.getScrollTop(); - } - else { - this.scrollLeft = -1; - this.scrollTop = -1; - } - } - _equals(other) { - if (!(other instanceof EditorState)) { - return false; - } - const state = other; - if (this.modelVersionId !== state.modelVersionId) { - return false; - } - if (this.scrollLeft !== state.scrollLeft || this.scrollTop !== state.scrollTop) { - return false; - } - if (!this.position && state.position || this.position && !state.position || this.position && state.position && !this.position.equals(state.position)) { - return false; - } - if (!this.selection && state.selection || this.selection && !state.selection || this.selection && state.selection && !this.selection.equalsRange(state.selection)) { - return false; - } - return true; - } - validate(editor) { - return this._equals(new EditorState(editor, this.flags)); - } -} -/** - * A cancellation token source that cancels when the editor changes as expressed - * by the provided flags - * @param range If provided, changes in position and selection within this range will not trigger cancellation - */ -class EditorStateCancellationTokenSource extends _keybindingCancellation_js__WEBPACK_IMPORTED_MODULE_4__["EditorKeybindingCancellationTokenSource"] { - constructor(editor, flags, range, parent) { - super(editor, parent); - this.editor = editor; - this._listener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - if (flags & 4 /* Position */) { - this._listener.add(editor.onDidChangeCursorPosition(e => { - if (!range || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].containsPosition(range, e.position)) { - this.cancel(); - } - })); - } - if (flags & 2 /* Selection */) { - this._listener.add(editor.onDidChangeCursorSelection(e => { - if (!range || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].containsRange(range, e.selection)) { - this.cancel(); - } - })); - } - if (flags & 8 /* Scroll */) { - this._listener.add(editor.onDidScrollChange(_ => this.cancel())); - } - if (flags & 1 /* Value */) { - this._listener.add(editor.onDidChangeModel(_ => this.cancel())); - this._listener.add(editor.onDidChangeModelContent(_ => this.cancel())); - } - } - dispose() { - this._listener.dispose(); - super.dispose(); - } -} -/** - * A cancellation token source that cancels when the provided model changes - */ -class TextModelCancellationTokenSource extends _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationTokenSource"] { - constructor(model, parent) { - super(parent); - this._listener = model.onDidChangeContent(() => this.cancel()); - } - dispose() { - this._listener.dispose(); - super.dispose(); - } -} -class StableEditorScrollState { - constructor(_visiblePosition, _visiblePositionScrollDelta, _cursorPosition) { - this._visiblePosition = _visiblePosition; - this._visiblePositionScrollDelta = _visiblePositionScrollDelta; - this._cursorPosition = _cursorPosition; - } - static capture(editor) { - let visiblePosition = null; - let visiblePositionScrollDelta = 0; - if (editor.getScrollTop() !== 0) { - const visibleRanges = editor.getVisibleRanges(); - if (visibleRanges.length > 0) { - visiblePosition = visibleRanges[0].getStartPosition(); - const visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column); - visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop; - } - } - return new StableEditorScrollState(visiblePosition, visiblePositionScrollDelta, editor.getPosition()); - } - restore(editor) { - if (this._visiblePosition) { - const visiblePositionScrollTop = editor.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column); - editor.setScrollTop(visiblePositionScrollTop + this._visiblePositionScrollDelta); - } - } - restoreRelativeVerticalPositionOfCursor(editor) { - const currentCursorPosition = editor.getPosition(); - if (!this._cursorPosition || !currentCursorPosition) { - return; - } - const offset = editor.getTopForLineNumber(currentCursorPosition.lineNumber) - editor.getTopForLineNumber(this._cursorPosition.lineNumber); - editor.setScrollTop(editor.getScrollTop() + offset); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/core/keybindingCancellation.js ***! - \*****************************************************************************************/ -/*! exports provided: EditorKeybindingCancellationTokenSource */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorKeybindingCancellationTokenSource", function() { return EditorKeybindingCancellationTokenSource; }); -/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -const IEditorCancellationTokens = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__["createDecorator"])('IEditorCancelService'); -const ctxCancellableOperation = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__["RawContextKey"]('cancellableOperation', false); -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_5__["registerSingleton"])(IEditorCancellationTokens, class { - constructor() { - this._tokens = new WeakMap(); - } - add(editor, cts) { - let data = this._tokens.get(editor); - if (!data) { - data = editor.invokeWithinContext(accessor => { - const key = ctxCancellableOperation.bindTo(accessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__["IContextKeyService"])); - const tokens = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_3__["LinkedList"](); - return { key, tokens }; - }); - this._tokens.set(editor, data); - } - let removeFn; - data.key.set(true); - removeFn = data.tokens.push(cts); - return () => { - // remove w/o cancellation - if (removeFn) { - removeFn(); - data.key.set(!data.tokens.isEmpty()); - removeFn = undefined; - } - }; - } - cancel(editor) { - const data = this._tokens.get(editor); - if (!data) { - return; - } - // remove with cancellation - const cts = data.tokens.pop(); - if (cts) { - cts.cancel(); - data.key.set(!data.tokens.isEmpty()); - } - } -}, true); -class EditorKeybindingCancellationTokenSource extends _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationTokenSource"] { - constructor(editor, parent) { - super(parent); - this.editor = editor; - this._unregister = editor.invokeWithinContext(accessor => accessor.get(IEditorCancellationTokens).add(editor, this)); - } - dispose() { - this._unregister(); - super.dispose(); - } -} -Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new class extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["EditorCommand"] { - constructor() { - super({ - id: 'editor.cancelOperation', - kbOpts: { - weight: 100 /* EditorContrib */, - primary: 9 /* Escape */ - }, - precondition: ctxCancellableOperation - }); - } - runEditorCommand(accessor, editor) { - accessor.get(IEditorCancellationTokens).cancel(editor); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js ***! - \***************************************************************************/ -/*! exports provided: isCodeEditor, isDiffEditor, getCodeEditor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCodeEditor", function() { return isCodeEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDiffEditor", function() { return isDiffEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCodeEditor", function() { return getCodeEditor; }); -/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/editorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - *@internal - */ -function isCodeEditor(thing) { - if (thing && typeof thing.getEditorType === 'function') { - return thing.getEditorType() === _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__["EditorType"].ICodeEditor; - } - else { - return false; - } -} -/** - *@internal - */ -function isDiffEditor(thing) { - if (thing && typeof thing.getEditorType === 'function') { - return thing.getEditorType() === _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_0__["EditorType"].IDiffEditor; - } - else { - return false; - } -} -/** - *@internal - */ -function getCodeEditor(thing) { - if (isCodeEditor(thing)) { - return thing; - } - if (isDiffEditor(thing)) { - return thing.getModifiedEditor(); - } - return null; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js ***! - \***********************************************************************/ -/*! exports provided: PageCoordinates, ClientCoordinates, EditorPagePosition, createEditorPagePosition, EditorMouseEvent, EditorMouseEventFactory, EditorPointerEventFactory, GlobalEditorMouseMoveMonitor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageCoordinates", function() { return PageCoordinates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCoordinates", function() { return ClientCoordinates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorPagePosition", function() { return EditorPagePosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEditorPagePosition", function() { return createEditorPagePosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorMouseEvent", function() { return EditorMouseEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorMouseEventFactory", function() { return EditorMouseEventFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorPointerEventFactory", function() { return EditorPointerEventFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalEditorMouseMoveMonitor", function() { return GlobalEditorMouseMoveMonitor; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/browser/globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/browser/mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -/** - * Coordinates relative to the whole document (e.g. mouse event's pageX and pageY) - */ -class PageCoordinates { - constructor(x, y) { - this.x = x; - this.y = y; - } - toClientCoordinates() { - return new ClientCoordinates(this.x - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollX, this.y - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollY); - } -} -/** - * Coordinates within the application's client area (i.e. origin is document's scroll position). - * - * For example, clicking in the top-left corner of the client area will - * always result in a mouse event with a client.x value of 0, regardless - * of whether the page is scrolled horizontally. - */ -class ClientCoordinates { - constructor(clientX, clientY) { - this.clientX = clientX; - this.clientY = clientY; - } - toPageCoordinates() { - return new PageCoordinates(this.clientX + _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollX, this.clientY + _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollY); - } -} -/** - * The position of the editor in the page. - */ -class EditorPagePosition { - constructor(x, y, width, height) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } -} -function createEditorPagePosition(editorViewDomNode) { - const editorPos = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"](editorViewDomNode); - return new EditorPagePosition(editorPos.left, editorPos.top, editorPos.width, editorPos.height); -} -class EditorMouseEvent extends _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardMouseEvent"] { - constructor(e, editorViewDomNode) { - super(e); - this.pos = new PageCoordinates(this.posx, this.posy); - this.editorPos = createEditorPagePosition(editorViewDomNode); - } -} -class EditorMouseEventFactory { - constructor(editorViewDomNode) { - this._editorViewDomNode = editorViewDomNode; - } - _create(e) { - return new EditorMouseEvent(e, this._editorViewDomNode); - } - onContextMenu(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](target, 'contextmenu', (e) => { - callback(this._create(e)); - }); - } - onMouseUp(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](target, 'mouseup', (e) => { - callback(this._create(e)); - }); - } - onMouseDown(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](target, 'mousedown', (e) => { - callback(this._create(e)); - }); - } - onMouseLeave(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableNonBubblingMouseOutListener"](target, (e) => { - callback(this._create(e)); - }); - } - onMouseMoveThrottled(target, callback, merger, minimumTimeMs) { - const myMerger = (lastEvent, currentEvent) => { - return merger(lastEvent, this._create(currentEvent)); - }; - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableThrottledListener"](target, 'mousemove', callback, myMerger, minimumTimeMs); - } -} -class EditorPointerEventFactory { - constructor(editorViewDomNode) { - this._editorViewDomNode = editorViewDomNode; - } - _create(e) { - return new EditorMouseEvent(e, this._editorViewDomNode); - } - onPointerUp(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](target, 'pointerup', (e) => { - callback(this._create(e)); - }); - } - onPointerDown(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](target, 'pointerdown', (e) => { - callback(this._create(e)); - }); - } - onPointerLeave(target, callback) { - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableNonBubblingPointerOutListener"](target, (e) => { - callback(this._create(e)); - }); - } - onPointerMoveThrottled(target, callback, merger, minimumTimeMs) { - const myMerger = (lastEvent, currentEvent) => { - return merger(lastEvent, this._create(currentEvent)); - }; - return _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableThrottledListener"](target, 'pointermove', callback, myMerger, minimumTimeMs); - } -} -class GlobalEditorMouseMoveMonitor extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editorViewDomNode) { - super(); - this._editorViewDomNode = editorViewDomNode; - this._globalMouseMoveMonitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__["GlobalMouseMoveMonitor"]()); - this._keydownListener = null; - } - startMonitoring(initialElement, initialButtons, merger, mouseMoveCallback, onStopCallback) { - // Add a <> keydown event listener that will cancel the monitoring - // if something other than a modifier key is pressed - this._keydownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addStandardDisposableListener"](document, 'keydown', (e) => { - const kb = e.toKeybinding(); - if (kb.isModifierKey()) { - // Allow modifier keys - return; - } - this._globalMouseMoveMonitor.stopMonitoring(true); - }, true); - const myMerger = (lastEvent, currentEvent) => { - return merger(lastEvent, new EditorMouseEvent(currentEvent, this._editorViewDomNode)); - }; - this._globalMouseMoveMonitor.startMonitoring(initialElement, initialButtons, myMerger, mouseMoveCallback, () => { - this._keydownListener.dispose(); - onStopCallback(); - }); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js ***! - \******************************************************************************/ -/*! exports provided: Command, MultiCommand, ProxyCommand, EditorCommand, EditorAction, MultiEditorAction, registerLanguageCommand, registerDefaultLanguageCommand, registerModelAndPositionCommand, registerModelCommand, registerEditorCommand, registerEditorAction, registerMultiEditorAction, registerInstantiatedEditorAction, registerEditorContribution, EditorExtensionsRegistry, UndoCommand, RedoCommand, SelectAllCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiCommand", function() { return MultiCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProxyCommand", function() { return ProxyCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorCommand", function() { return EditorCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorAction", function() { return EditorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiEditorAction", function() { return MultiEditorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLanguageCommand", function() { return registerLanguageCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDefaultLanguageCommand", function() { return registerDefaultLanguageCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerModelAndPositionCommand", function() { return registerModelAndPositionCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerModelCommand", function() { return registerModelCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerEditorCommand", function() { return registerEditorCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerEditorAction", function() { return registerEditorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerMultiEditorAction", function() { return registerMultiEditorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerInstantiatedEditorAction", function() { return registerInstantiatedEditorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerEditorContribution", function() { return registerEditorContribution; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorExtensionsRegistry", function() { return EditorExtensionsRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoCommand", function() { return UndoCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedoCommand", function() { return RedoCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectAllCommand", function() { return SelectAllCommand; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../platform/telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - -class Command { - constructor(opts) { - this.id = opts.id; - this.precondition = opts.precondition; - this._kbOpts = opts.kbOpts; - this._menuOpts = opts.menuOpts; - this._description = opts.description; - } - register() { - if (Array.isArray(this._menuOpts)) { - this._menuOpts.forEach(this._registerMenuItem, this); - } - else if (this._menuOpts) { - this._registerMenuItem(this._menuOpts); - } - if (this._kbOpts) { - let kbWhen = this._kbOpts.kbExpr; - if (this.precondition) { - if (kbWhen) { - kbWhen = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_9__["ContextKeyExpr"].and(kbWhen, this.precondition); - } - else { - kbWhen = this.precondition; - } - } - _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_10__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: this.id, - handler: (accessor, args) => this.runCommand(accessor, args), - weight: this._kbOpts.weight, - args: this._kbOpts.args, - when: kbWhen, - primary: this._kbOpts.primary, - secondary: this._kbOpts.secondary, - win: this._kbOpts.win, - linux: this._kbOpts.linux, - mac: this._kbOpts.mac, - description: this._description - }); - } - else { - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["CommandsRegistry"].registerCommand({ - id: this.id, - handler: (accessor, args) => this.runCommand(accessor, args), - description: this._description - }); - } - } - _registerMenuItem(item) { - _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuRegistry"].appendMenuItem(item.menuId, { - group: item.group, - command: { - id: this.id, - title: item.title, - icon: item.icon - // precondition: this.precondition - }, - when: item.when, - order: item.order - }); - } -} -class MultiCommand extends Command { - constructor() { - super(...arguments); - this._implementations = []; - } - /** - * A higher priority gets to be looked at first - */ - addImplementation(priority, implementation) { - this._implementations.push([priority, implementation]); - this._implementations.sort((a, b) => b[0] - a[0]); - return { - dispose: () => { - for (let i = 0; i < this._implementations.length; i++) { - if (this._implementations[i][1] === implementation) { - this._implementations.splice(i, 1); - return; - } - } - } - }; - } - runCommand(accessor, args) { - for (const impl of this._implementations) { - if (impl[1](accessor, args)) { - return; - } - } - } -} -//#endregion -/** - * A command that delegates to another command's implementation. - * - * This lets different commands be registered but share the same implementation - */ -class ProxyCommand extends Command { - constructor(command, opts) { - super(opts); - this.command = command; - } - runCommand(accessor, args) { - return this.command.runCommand(accessor, args); - } -} -class EditorCommand extends Command { - /** - * Create a command class that is bound to a certain editor contribution. - */ - static bindToContribution(controllerGetter) { - return class EditorControllerCommandImpl extends EditorCommand { - constructor(opts) { - super(opts); - this._callback = opts.handler; - } - runEditorCommand(accessor, editor, args) { - const controller = controllerGetter(editor); - if (controller) { - this._callback(controllerGetter(editor), args); - } - } - }; - } - runCommand(accessor, args) { - const codeEditorService = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]); - // Find the editor with text focus or active - const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor(); - if (!editor) { - // well, at least we tried... - return; - } - return editor.invokeWithinContext((editorAccessor) => { - const kbService = editorAccessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_9__["IContextKeyService"]); - if (!kbService.contextMatchesRules(Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_13__["withNullAsUndefined"])(this.precondition))) { - // precondition does not hold - return; - } - return this.runEditorCommand(editorAccessor, editor, args); - }); - } -} -class EditorAction extends EditorCommand { - constructor(opts) { - super(EditorAction.convertOptions(opts)); - this.label = opts.label; - this.alias = opts.alias; - } - static convertOptions(opts) { - let menuOpts; - if (Array.isArray(opts.menuOpts)) { - menuOpts = opts.menuOpts; - } - else if (opts.menuOpts) { - menuOpts = [opts.menuOpts]; - } - else { - menuOpts = []; - } - function withDefaults(item) { - if (!item.menuId) { - item.menuId = _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].EditorContext; - } - if (!item.title) { - item.title = opts.label; - } - item.when = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_9__["ContextKeyExpr"].and(opts.precondition, item.when); - return item; - } - if (Array.isArray(opts.contextMenuOpts)) { - menuOpts.push(...opts.contextMenuOpts.map(withDefaults)); - } - else if (opts.contextMenuOpts) { - menuOpts.push(withDefaults(opts.contextMenuOpts)); - } - opts.menuOpts = menuOpts; - return opts; - } - runEditorCommand(accessor, editor, args) { - this.reportTelemetry(accessor, editor); - return this.run(accessor, editor, args || {}); - } - reportTelemetry(accessor, editor) { - accessor.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_12__["ITelemetryService"]).publicLog2('editorActionInvoked', { name: this.label, id: this.id }); - } -} -class MultiEditorAction extends EditorAction { - constructor(opts) { - super(opts); - this._implementations = []; - } - runEditorCommand(accessor, editor, args) { - this.reportTelemetry(accessor, editor); - for (const impl of this._implementations) { - if (impl[1](accessor, args)) { - return; - } - } - return this.run(accessor, editor, args || {}); - } -} -//#endregion -// --- Registration of commands and actions -function registerLanguageCommand(id, handler) { - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["CommandsRegistry"].registerCommand(id, (accessor, args) => handler(accessor, args || {})); -} -function registerDefaultLanguageCommand(id, handler) { - registerLanguageCommand(id, function (accessor, args) { - const { resource, position } = args; - if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"])) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])('resource'); - } - if (!_common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].isIPosition(position)) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])('position'); - } - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__["IModelService"]).getModel(resource); - if (model) { - const editorPosition = _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].lift(position); - return handler(model, editorPosition, args); - } - return accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_6__["ITextModelService"]).createModelReference(resource).then(reference => { - return new Promise((resolve, reject) => { - try { - const result = handler(reference.object.textEditorModel, _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].lift(position), args); - resolve(result); - } - catch (err) { - reject(err); - } - }).finally(() => { - reference.dispose(); - }); - }); - }); -} -function registerModelAndPositionCommand(id, handler) { - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["CommandsRegistry"].registerCommand(id, function (accessor, ...args) { - const [resource, position] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_13__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].isUri(resource)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_13__["assertType"])(_common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].isIPosition(position)); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__["IModelService"]).getModel(resource); - if (model) { - const editorPosition = _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].lift(position); - return handler(model, editorPosition, ...args.slice(2)); - } - return accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_6__["ITextModelService"]).createModelReference(resource).then(reference => { - return new Promise((resolve, reject) => { - try { - const result = handler(reference.object.textEditorModel, _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].lift(position), args.slice(2)); - resolve(result); - } - catch (err) { - reject(err); - } - }).finally(() => { - reference.dispose(); - }); - }); - }); -} -function registerModelCommand(id, handler) { - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["CommandsRegistry"].registerCommand(id, function (accessor, ...args) { - const [resource] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_13__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].isUri(resource)); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__["IModelService"]).getModel(resource); - if (model) { - return handler(model, ...args.slice(1)); - } - return accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_6__["ITextModelService"]).createModelReference(resource).then(reference => { - return new Promise((resolve, reject) => { - try { - const result = handler(reference.object.textEditorModel, args.slice(1)); - resolve(result); - } - catch (err) { - reject(err); - } - }).finally(() => { - reference.dispose(); - }); - }); - }); -} -function registerEditorCommand(editorCommand) { - EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand); - return editorCommand; -} -function registerEditorAction(ctor) { - const action = new ctor(); - EditorContributionRegistry.INSTANCE.registerEditorAction(action); - return action; -} -function registerMultiEditorAction(action) { - EditorContributionRegistry.INSTANCE.registerEditorAction(action); - return action; -} -function registerInstantiatedEditorAction(editorAction) { - EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction); -} -function registerEditorContribution(id, ctor) { - EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor); -} -var EditorExtensionsRegistry; -(function (EditorExtensionsRegistry) { - function getEditorCommand(commandId) { - return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId); - } - EditorExtensionsRegistry.getEditorCommand = getEditorCommand; - function getEditorActions() { - return EditorContributionRegistry.INSTANCE.getEditorActions(); - } - EditorExtensionsRegistry.getEditorActions = getEditorActions; - function getEditorContributions() { - return EditorContributionRegistry.INSTANCE.getEditorContributions(); - } - EditorExtensionsRegistry.getEditorContributions = getEditorContributions; - function getSomeEditorContributions(ids) { - return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0); - } - EditorExtensionsRegistry.getSomeEditorContributions = getSomeEditorContributions; - function getDiffEditorContributions() { - return EditorContributionRegistry.INSTANCE.getDiffEditorContributions(); - } - EditorExtensionsRegistry.getDiffEditorContributions = getDiffEditorContributions; -})(EditorExtensionsRegistry || (EditorExtensionsRegistry = {})); -// Editor extension points -const Extensions = { - EditorCommonContributions: 'editor.contributions' -}; -class EditorContributionRegistry { - constructor() { - this.editorContributions = []; - this.diffEditorContributions = []; - this.editorActions = []; - this.editorCommands = Object.create(null); - } - registerEditorContribution(id, ctor) { - this.editorContributions.push({ id, ctor: ctor }); - } - getEditorContributions() { - return this.editorContributions.slice(0); - } - getDiffEditorContributions() { - return this.diffEditorContributions.slice(0); - } - registerEditorAction(action) { - action.register(); - this.editorActions.push(action); - } - getEditorActions() { - return this.editorActions.slice(0); - } - registerEditorCommand(editorCommand) { - editorCommand.register(); - this.editorCommands[editorCommand.id] = editorCommand; - } - getEditorCommand(commandId) { - return (this.editorCommands[commandId] || null); - } -} -EditorContributionRegistry.INSTANCE = new EditorContributionRegistry(); -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__["Registry"].add(Extensions.EditorCommonContributions, EditorContributionRegistry.INSTANCE); -function registerCommand(command) { - command.register(); - return command; -} -const UndoCommand = registerCommand(new MultiCommand({ - id: 'undo', - precondition: undefined, - kbOpts: { - weight: 0 /* EditorCore */, - primary: 2048 /* CtrlCmd */ | 56 /* KEY_Z */ - }, - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarEditMenu, - group: '1_do', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miUndo', comment: ['&& denotes a mnemonic'] }, "&&Undo"), - order: 1 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('undo', "Undo"), - order: 1 - }] -})); -registerCommand(new ProxyCommand(UndoCommand, { id: 'default:undo', precondition: undefined })); -const RedoCommand = registerCommand(new MultiCommand({ - id: 'redo', - precondition: undefined, - kbOpts: { - weight: 0 /* EditorCore */, - primary: 2048 /* CtrlCmd */ | 55 /* KEY_Y */, - secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */], - mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 56 /* KEY_Z */ } - }, - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarEditMenu, - group: '1_do', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miRedo', comment: ['&& denotes a mnemonic'] }, "&&Redo"), - order: 2 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('redo', "Redo"), - order: 1 - }] -})); -registerCommand(new ProxyCommand(RedoCommand, { id: 'default:redo', precondition: undefined })); -const SelectAllCommand = registerCommand(new MultiCommand({ - id: 'editor.action.selectAll', - precondition: undefined, - kbOpts: { - weight: 0 /* EditorCore */, - kbExpr: null, - primary: 2048 /* CtrlCmd */ | 31 /* KEY_A */ - }, - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarSelectionMenu, - group: '1_basic', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, "&&Select All"), - order: 1 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('selectAll', "Select All"), - order: 1 - }] -})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js ***! - \************************************************************************************************/ -/*! exports provided: AbstractCodeEditorService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractCodeEditorService", function() { return AbstractCodeEditorService; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class AbstractCodeEditorService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(); - this._onCodeEditorAdd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onCodeEditorAdd = this._onCodeEditorAdd.event; - this._onCodeEditorRemove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onCodeEditorRemove = this._onCodeEditorRemove.event; - this._onDiffEditorAdd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this._onDiffEditorRemove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this._modelProperties = new Map(); - this._codeEditors = Object.create(null); - this._diffEditors = Object.create(null); - } - addCodeEditor(editor) { - this._codeEditors[editor.getId()] = editor; - this._onCodeEditorAdd.fire(editor); - } - removeCodeEditor(editor) { - if (delete this._codeEditors[editor.getId()]) { - this._onCodeEditorRemove.fire(editor); - } - } - listCodeEditors() { - return Object.keys(this._codeEditors).map(id => this._codeEditors[id]); - } - addDiffEditor(editor) { - this._diffEditors[editor.getId()] = editor; - this._onDiffEditorAdd.fire(editor); - } - removeDiffEditor(editor) { - if (delete this._diffEditors[editor.getId()]) { - this._onDiffEditorRemove.fire(editor); - } - } - listDiffEditors() { - return Object.keys(this._diffEditors).map(id => this._diffEditors[id]); - } - getFocusedCodeEditor() { - let editorWithWidgetFocus = null; - const editors = this.listCodeEditors(); - for (const editor of editors) { - if (editor.hasTextFocus()) { - // bingo! - return editor; - } - if (editor.hasWidgetFocus()) { - editorWithWidgetFocus = editor; - } - } - return editorWithWidgetFocus; - } - setModelProperty(resource, key, value) { - const key1 = resource.toString(); - let dest; - if (this._modelProperties.has(key1)) { - dest = this._modelProperties.get(key1); - } - else { - dest = new Map(); - this._modelProperties.set(key1, dest); - } - dest.set(key, value); - } - getModelProperty(resource, key) { - const key1 = resource.toString(); - if (this._modelProperties.has(key1)) { - const innerMap = this._modelProperties.get(key1); - return innerMap.get(key); - } - return undefined; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js ***! - \**************************************************************************************/ -/*! exports provided: IBulkEditService, ResourceEdit, ResourceTextEdit, ResourceFileEdit */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IBulkEditService", function() { return IBulkEditService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceEdit", function() { return ResourceEdit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceTextEdit", function() { return ResourceTextEdit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceFileEdit", function() { return ResourceFileEdit; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const IBulkEditService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('IWorkspaceEditService'); -function isWorkspaceFileEdit(thing) { - return Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"])(thing) && (Boolean(thing.newUri) || Boolean(thing.oldUri)); -} -function isWorkspaceTextEdit(thing) { - return Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"])(thing) && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__["URI"].isUri(thing.resource) && Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"])(thing.edit); -} -class ResourceEdit { - constructor(metadata) { - this.metadata = metadata; - } - static convert(edit) { - return edit.edits.map(edit => { - if (isWorkspaceTextEdit(edit)) { - return new ResourceTextEdit(edit.resource, edit.edit, edit.modelVersionId, edit.metadata); - } - if (isWorkspaceFileEdit(edit)) { - return new ResourceFileEdit(edit.oldUri, edit.newUri, edit.options, edit.metadata); - } - throw new Error('Unsupported edit'); - }); - } -} -class ResourceTextEdit extends ResourceEdit { - constructor(resource, textEdit, versionId, metadata) { - super(metadata); - this.resource = resource; - this.textEdit = textEdit; - this.versionId = versionId; - this.metadata = metadata; - } -} -class ResourceFileEdit extends ResourceEdit { - constructor(oldResource, newResource, options, metadata) { - super(metadata); - this.oldResource = oldResource; - this.newResource = newResource; - this.options = options; - this.metadata = metadata; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js ***! - \****************************************************************************************/ -/*! exports provided: ICodeEditorService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ICodeEditorService", function() { return ICodeEditorService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ICodeEditorService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('codeEditorService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js ***! - \********************************************************************************************/ -/*! exports provided: RefCountedStyleSheet, GlobalStyleSheet, CodeEditorServiceImpl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RefCountedStyleSheet", function() { return RefCountedStyleSheet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalStyleSheet", function() { return GlobalStyleSheet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeEditorServiceImpl", function() { return CodeEditorServiceImpl; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _abstractCodeEditorService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./abstractCodeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js"); -/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - -class RefCountedStyleSheet { - constructor(parent, editorId, styleSheet) { - this._parent = parent; - this._editorId = editorId; - this._styleSheet = styleSheet; - this._refCount = 0; - } - ref() { - this._refCount++; - } - unref() { - var _a; - this._refCount--; - if (this._refCount === 0) { - (_a = this._styleSheet.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this._styleSheet); - this._parent._removeEditorStyleSheets(this._editorId); - } - } - insertRule(rule, index) { - const sheet = this._styleSheet.sheet; - sheet.insertRule(rule, index); - } - removeRulesContainingSelector(ruleName) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeCSSRulesContainingSelector"](ruleName, this._styleSheet); - } -} -class GlobalStyleSheet { - constructor(styleSheet) { - this._styleSheet = styleSheet; - } - ref() { - } - unref() { - } - insertRule(rule, index) { - const sheet = this._styleSheet.sheet; - sheet.insertRule(rule, index); - } - removeRulesContainingSelector(ruleName) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeCSSRulesContainingSelector"](ruleName, this._styleSheet); - } -} -let CodeEditorServiceImpl = class CodeEditorServiceImpl extends _abstractCodeEditorService_js__WEBPACK_IMPORTED_MODULE_4__["AbstractCodeEditorService"] { - constructor(themeService, styleSheet = null) { - super(); - this._decorationOptionProviders = new Map(); - this._editorStyleSheets = new Map(); - this._globalStyleSheet = styleSheet ? styleSheet : null; - this._themeService = themeService; - } - _getOrCreateGlobalStyleSheet() { - if (!this._globalStyleSheet) { - this._globalStyleSheet = new GlobalStyleSheet(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createStyleSheet"]()); - } - return this._globalStyleSheet; - } - _getOrCreateStyleSheet(editor) { - if (!editor) { - return this._getOrCreateGlobalStyleSheet(); - } - const domNode = editor.getContainerDomNode(); - if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["isInShadowDOM"](domNode)) { - return this._getOrCreateGlobalStyleSheet(); - } - const editorId = editor.getId(); - if (!this._editorStyleSheets.has(editorId)) { - const refCountedStyleSheet = new RefCountedStyleSheet(this, editorId, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createStyleSheet"](domNode)); - this._editorStyleSheets.set(editorId, refCountedStyleSheet); - } - return this._editorStyleSheets.get(editorId); - } - _removeEditorStyleSheets(editorId) { - this._editorStyleSheets.delete(editorId); - } - registerDecorationType(key, options, parentTypeKey, editor) { - let provider = this._decorationOptionProviders.get(key); - if (!provider) { - const styleSheet = this._getOrCreateStyleSheet(editor); - const providerArgs = { - styleSheet: styleSheet, - key: key, - parentTypeKey: parentTypeKey, - options: options || Object.create(null) - }; - if (!parentTypeKey) { - provider = new DecorationTypeOptionsProvider(this._themeService, styleSheet, providerArgs); - } - else { - provider = new DecorationSubTypeOptionsProvider(this._themeService, styleSheet, providerArgs); - } - this._decorationOptionProviders.set(key, provider); - } - provider.refCount++; - } - removeDecorationType(key) { - const provider = this._decorationOptionProviders.get(key); - if (provider) { - provider.refCount--; - if (provider.refCount <= 0) { - this._decorationOptionProviders.delete(key); - provider.dispose(); - this.listCodeEditors().forEach((ed) => ed.removeDecorations(key)); - } - } - } - resolveDecorationOptions(decorationTypeKey, writable) { - const provider = this._decorationOptionProviders.get(decorationTypeKey); - if (!provider) { - throw new Error('Unknown decoration type key: ' + decorationTypeKey); - } - return provider.getOptions(this, writable); - } -}; -CodeEditorServiceImpl = __decorate([ - __param(0, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["IThemeService"]) -], CodeEditorServiceImpl); - -class DecorationSubTypeOptionsProvider { - constructor(themeService, styleSheet, providerArgs) { - this._styleSheet = styleSheet; - this._styleSheet.ref(); - this._parentTypeKey = providerArgs.parentTypeKey; - this.refCount = 0; - this._beforeContentRules = new DecorationCSSRules(3 /* BeforeContentClassName */, providerArgs, themeService); - this._afterContentRules = new DecorationCSSRules(4 /* AfterContentClassName */, providerArgs, themeService); - } - getOptions(codeEditorService, writable) { - const options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true); - if (this._beforeContentRules) { - options.beforeContentClassName = this._beforeContentRules.className; - } - if (this._afterContentRules) { - options.afterContentClassName = this._afterContentRules.className; - } - return options; - } - dispose() { - if (this._beforeContentRules) { - this._beforeContentRules.dispose(); - this._beforeContentRules = null; - } - if (this._afterContentRules) { - this._afterContentRules.dispose(); - this._afterContentRules = null; - } - this._styleSheet.unref(); - } -} -class DecorationTypeOptionsProvider { - constructor(themeService, styleSheet, providerArgs) { - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._styleSheet = styleSheet; - this._styleSheet.ref(); - this.refCount = 0; - const createCSSRules = (type) => { - const rules = new DecorationCSSRules(type, providerArgs, themeService); - this._disposables.add(rules); - if (rules.hasContent) { - return rules.className; - } - return undefined; - }; - const createInlineCSSRules = (type) => { - const rules = new DecorationCSSRules(type, providerArgs, themeService); - this._disposables.add(rules); - if (rules.hasContent) { - return { className: rules.className, hasLetterSpacing: rules.hasLetterSpacing }; - } - return null; - }; - this.className = createCSSRules(0 /* ClassName */); - const inlineData = createInlineCSSRules(1 /* InlineClassName */); - if (inlineData) { - this.inlineClassName = inlineData.className; - this.inlineClassNameAffectsLetterSpacing = inlineData.hasLetterSpacing; - } - this.beforeContentClassName = createCSSRules(3 /* BeforeContentClassName */); - this.afterContentClassName = createCSSRules(4 /* AfterContentClassName */); - this.glyphMarginClassName = createCSSRules(2 /* GlyphMarginClassName */); - const options = providerArgs.options; - this.isWholeLine = Boolean(options.isWholeLine); - this.stickiness = options.rangeBehavior; - const lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor; - const darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor; - if (typeof lightOverviewRulerColor !== 'undefined' - || typeof darkOverviewRulerColor !== 'undefined') { - this.overviewRuler = { - color: lightOverviewRulerColor || darkOverviewRulerColor, - darkColor: darkOverviewRulerColor || lightOverviewRulerColor, - position: options.overviewRulerLane || _common_model_js__WEBPACK_IMPORTED_MODULE_6__["OverviewRulerLane"].Center - }; - } - } - getOptions(codeEditorService, writable) { - if (!writable) { - return this; - } - return { - inlineClassName: this.inlineClassName, - beforeContentClassName: this.beforeContentClassName, - afterContentClassName: this.afterContentClassName, - className: this.className, - glyphMarginClassName: this.glyphMarginClassName, - isWholeLine: this.isWholeLine, - overviewRuler: this.overviewRuler, - stickiness: this.stickiness - }; - } - dispose() { - this._disposables.dispose(); - this._styleSheet.unref(); - } -} -const _CSS_MAP = { - color: 'color:{0} !important;', - opacity: 'opacity:{0};', - backgroundColor: 'background-color:{0};', - outline: 'outline:{0};', - outlineColor: 'outline-color:{0};', - outlineStyle: 'outline-style:{0};', - outlineWidth: 'outline-width:{0};', - border: 'border:{0};', - borderColor: 'border-color:{0};', - borderRadius: 'border-radius:{0};', - borderSpacing: 'border-spacing:{0};', - borderStyle: 'border-style:{0};', - borderWidth: 'border-width:{0};', - fontStyle: 'font-style:{0};', - fontWeight: 'font-weight:{0};', - textDecoration: 'text-decoration:{0};', - cursor: 'cursor:{0};', - letterSpacing: 'letter-spacing:{0};', - gutterIconPath: 'background:{0} center center no-repeat;', - gutterIconSize: 'background-size:{0};', - contentText: 'content:\'{0}\';', - contentIconPath: 'content:{0};', - margin: 'margin:{0};', - width: 'width:{0};', - height: 'height:{0};' -}; -class DecorationCSSRules { - constructor(ruleType, providerArgs, themeService) { - this._theme = themeService.getColorTheme(); - this._ruleType = ruleType; - this._providerArgs = providerArgs; - this._usesThemeColors = false; - this._hasContent = false; - this._hasLetterSpacing = false; - let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType); - if (this._providerArgs.parentTypeKey) { - className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType); - } - this._className = className; - this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType); - this._buildCSS(); - if (this._usesThemeColors) { - this._themeListener = themeService.onDidColorThemeChange(theme => { - this._theme = themeService.getColorTheme(); - this._removeCSS(); - this._buildCSS(); - }); - } - else { - this._themeListener = null; - } - } - dispose() { - if (this._hasContent) { - this._removeCSS(); - this._hasContent = false; - } - if (this._themeListener) { - this._themeListener.dispose(); - this._themeListener = null; - } - } - get hasContent() { - return this._hasContent; - } - get hasLetterSpacing() { - return this._hasLetterSpacing; - } - get className() { - return this._className; - } - _buildCSS() { - const options = this._providerArgs.options; - let unthemedCSS, lightCSS, darkCSS; - switch (this._ruleType) { - case 0 /* ClassName */: - unthemedCSS = this.getCSSTextForModelDecorationClassName(options); - lightCSS = this.getCSSTextForModelDecorationClassName(options.light); - darkCSS = this.getCSSTextForModelDecorationClassName(options.dark); - break; - case 1 /* InlineClassName */: - unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options); - lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light); - darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark); - break; - case 2 /* GlyphMarginClassName */: - unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options); - lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light); - darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark); - break; - case 3 /* BeforeContentClassName */: - unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before); - lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before); - darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before); - break; - case 4 /* AfterContentClassName */: - unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after); - lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after); - darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after); - break; - default: - throw new Error('Unknown rule type: ' + this._ruleType); - } - const sheet = this._providerArgs.styleSheet; - let hasContent = false; - if (unthemedCSS.length > 0) { - sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0); - hasContent = true; - } - if (lightCSS.length > 0) { - sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0); - hasContent = true; - } - if (darkCSS.length > 0) { - sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0); - hasContent = true; - } - this._hasContent = hasContent; - } - _removeCSS() { - this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector); - } - /** - * Build the CSS for decorations styled via `className`. - */ - getCSSTextForModelDecorationClassName(opts) { - if (!opts) { - return ''; - } - const cssTextArr = []; - this.collectCSSText(opts, ['backgroundColor'], cssTextArr); - this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); - this.collectBorderSettingsCSSText(opts, cssTextArr); - return cssTextArr.join(''); - } - /** - * Build the CSS for decorations styled via `inlineClassName`. - */ - getCSSTextForModelDecorationInlineClassName(opts) { - if (!opts) { - return ''; - } - const cssTextArr = []; - this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'cursor', 'color', 'opacity', 'letterSpacing'], cssTextArr); - if (opts.letterSpacing) { - this._hasLetterSpacing = true; - } - return cssTextArr.join(''); - } - /** - * Build the CSS for decorations styled before or after content. - */ - getCSSTextForModelDecorationContentClassName(opts) { - if (!opts) { - return ''; - } - const cssTextArr = []; - if (typeof opts !== 'undefined') { - this.collectBorderSettingsCSSText(opts, cssTextArr); - if (typeof opts.contentIconPath !== 'undefined') { - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"](_CSS_MAP.contentIconPath, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"](_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].revive(opts.contentIconPath)))); - } - if (typeof opts.contentText === 'string') { - const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line - const escaped = truncated.replace(/['\\]/g, '\\$&'); - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"](_CSS_MAP.contentText, escaped)); - } - this.collectCSSText(opts, ['fontStyle', 'fontWeight', 'textDecoration', 'color', 'opacity', 'backgroundColor', 'margin'], cssTextArr); - if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) { - cssTextArr.push('display:inline-block;'); - } - } - return cssTextArr.join(''); - } - /** - * Build the CSS for decorations styled via `glpyhMarginClassName`. - */ - getCSSTextForModelDecorationGlyphMarginClassName(opts) { - if (!opts) { - return ''; - } - const cssTextArr = []; - if (typeof opts.gutterIconPath !== 'undefined') { - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"](_CSS_MAP.gutterIconPath, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"](_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].revive(opts.gutterIconPath)))); - if (typeof opts.gutterIconSize !== 'undefined') { - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"](_CSS_MAP.gutterIconSize, opts.gutterIconSize)); - } - } - return cssTextArr.join(''); - } - collectBorderSettingsCSSText(opts, cssTextArr) { - if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) { - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"]('box-sizing: border-box;')); - return true; - } - return false; - } - collectCSSText(opts, properties, cssTextArr) { - const lenBefore = cssTextArr.length; - for (let property of properties) { - const value = this.resolveValue(opts[property]); - if (typeof value === 'string') { - cssTextArr.push(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"](_CSS_MAP[property], value)); - } - } - return cssTextArr.length !== lenBefore; - } - resolveValue(value) { - if (Object(_common_editorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isThemeColor"])(value)) { - this._usesThemeColors = true; - const color = this._theme.getColor(value.id); - if (color) { - return color.toString(); - } - return 'transparent'; - } - return value; - } -} -class CSSNameHelper { - static getClassName(key, type) { - return 'ced-' + key + '-' + type; - } - static getSelector(key, parentKey, ruleType) { - let selector = '.monaco-editor .' + this.getClassName(key, ruleType); - if (parentKey) { - selector = selector + '.' + this.getClassName(parentKey, ruleType); - } - if (ruleType === 3 /* BeforeContentClassName */) { - selector += '::before'; - } - else if (ruleType === 4 /* AfterContentClassName */) { - selector += '::after'; - } - return selector; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js ***! - \************************************************************************************/ -/*! exports provided: OpenerService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OpenerService", function() { return OpenerService; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/* harmony import */ var _base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/marshalling.js */ "./node_modules/monaco-editor/esm/vs/base/common/marshalling.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/editor/common/editor.js */ "./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - -let CommandOpener = class CommandOpener { - constructor(_commandService) { - this._commandService = _commandService; - } - open(target) { - return __awaiter(this, void 0, void 0, function* () { - if (!Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].command)) { - return false; - } - // run command or bail out if command isn't known - if (typeof target === 'string') { - target = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_5__["URI"].parse(target); - } - // execute as command - let args = []; - try { - args = Object(_base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_2__["parse"])(decodeURIComponent(target.query)); - } - catch (_a) { - // ignore and retry - try { - args = Object(_base_common_marshalling_js__WEBPACK_IMPORTED_MODULE_2__["parse"])(target.query); - } - catch (_b) { - // ignore error - } - } - if (!Array.isArray(args)) { - args = [args]; - } - yield this._commandService.executeCommand(target.path, ...args); - return true; - }); - } -}; -CommandOpener = __decorate([ - __param(0, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__["ICommandService"]) -], CommandOpener); -let EditorOpener = class EditorOpener { - constructor(_editorService) { - this._editorService = _editorService; - } - open(target, options) { - return __awaiter(this, void 0, void 0, function* () { - if (typeof target === 'string') { - target = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_5__["URI"].parse(target); - } - let selection = undefined; - const match = /^L?(\d+)(?:,(\d+))?/.exec(target.fragment); - if (match) { - // support file:///some/file.js#73,84 - // support file:///some/file.js#L73 - selection = { - startLineNumber: parseInt(match[1]), - startColumn: match[2] ? parseInt(match[2]) : 1 - }; - // remove fragment - target = target.with({ fragment: '' }); - } - if (target.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].file) { - target = Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_4__["normalizePath"])(target); // workaround for non-normalized paths (https://github.com/Microsoft/vscode/issues/12954) - } - yield this._editorService.openCodeEditor({ resource: target, options: { selection, context: (options === null || options === void 0 ? void 0 : options.fromUserGesture) ? _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_9__["EditorOpenContext"].USER : _platform_editor_common_editor_js__WEBPACK_IMPORTED_MODULE_9__["EditorOpenContext"].API } }, this._editorService.getFocusedCodeEditor(), options === null || options === void 0 ? void 0 : options.openToSide); - return true; - }); - } -}; -EditorOpener = __decorate([ - __param(0, _codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]) -], EditorOpener); -let OpenerService = class OpenerService { - constructor(editorService, commandService) { - this._openers = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_1__["LinkedList"](); - this._validators = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_1__["LinkedList"](); - this._resolvers = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_1__["LinkedList"](); - // Default external opener is going through window.open() - this._externalOpener = { - openExternal: href => { - // ensure to open HTTP/HTTPS links into new windows - // to not trigger a navigation. Any other link is - // safe to be set as HREF to prevent a blank window - // from opening. - if (Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(href, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].http) || Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(href, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].https)) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["windowOpenNoOpener"](href); - } - else { - window.location.href = href; - } - return Promise.resolve(true); - } - }; - // Default opener: maito, http(s), command, and catch-all-editors - this._openers.push({ - open: (target, options) => __awaiter(this, void 0, void 0, function* () { - if ((options === null || options === void 0 ? void 0 : options.openExternal) || Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].mailto) || Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].http) || Object(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_8__["matchesScheme"])(target, _base_common_network_js__WEBPACK_IMPORTED_MODULE_3__["Schemas"].https)) { - // open externally - yield this._doOpenExternal(target, options); - return true; - } - return false; - }) - }); - this._openers.push(new CommandOpener(commandService)); - this._openers.push(new EditorOpener(editorService)); - } - open(target, options) { - return __awaiter(this, void 0, void 0, function* () { - // check with contributed validators - for (const validator of this._validators.toArray()) { - if (!(yield validator.shouldOpen(target))) { - return false; - } - } - // check with contributed openers - for (const opener of this._openers.toArray()) { - const handled = yield opener.open(target, options); - if (handled) { - return true; - } - } - return false; - }); - } - resolveExternalUri(resource, options) { - return __awaiter(this, void 0, void 0, function* () { - for (const resolver of this._resolvers.toArray()) { - const result = yield resolver.resolveExternalUri(resource, options); - if (result) { - return result; - } - } - return { resolved: resource, dispose: () => { } }; - }); - } - _doOpenExternal(resource, options) { - return __awaiter(this, void 0, void 0, function* () { - //todo@joh IExternalUriResolver should support `uri: URI | string` - const uri = typeof resource === 'string' ? _base_common_uri_js__WEBPACK_IMPORTED_MODULE_5__["URI"].parse(resource) : resource; - const { resolved } = yield this.resolveExternalUri(uri, options); - if (typeof resource === 'string' && uri.toString() === resolved.toString()) { - // open the url-string AS IS - return this._externalOpener.openExternal(resource); - } - else { - // open URI using the toString(noEncode)+encodeURI-trick - return this._externalOpener.openExternal(encodeURI(resolved.toString(true))); - } - }); - } - dispose() { - this._validators.clear(); - } -}; -OpenerService = __decorate([ - __param(0, _codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]), - __param(1, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_7__["ICommandService"]) -], OpenerService); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js ***! - \****************************************************************************************/ -/*! exports provided: DOMLineBreaksComputerFactory */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOMLineBreaksComputerFactory", function() { return DOMLineBreaksComputerFactory; }); -/* harmony import */ var _common_viewModel_splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/viewModel/splitLinesCollection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js"); -/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class DOMLineBreaksComputerFactory { - static create() { - return new DOMLineBreaksComputerFactory(); - } - constructor() { - } - createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) { - tabSize = tabSize | 0; //@perf - wrappingColumn = +wrappingColumn; //@perf - let requests = []; - return { - addRequest: (lineText, previousLineBreakData) => { - requests.push(lineText); - }, - finalize: () => { - return createLineBreaks(requests, fontInfo, tabSize, wrappingColumn, wrappingIndent); - } - }; - } -} -function createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wrappingIndent) { - if (firstLineBreakColumn === -1) { - const result = []; - for (let i = 0, len = requests.length; i < len; i++) { - result[i] = null; - } - return result; - } - const overallWidth = Math.round(firstLineBreakColumn * fontInfo.typicalHalfwidthCharacterWidth); - // Cannot respect WrappingIndent.Indent and WrappingIndent.DeepIndent because that would require - // two dom layouts, in order to first set the width of the first line, and then set the width of the wrapped lines - if (wrappingIndent === 2 /* Indent */ || wrappingIndent === 3 /* DeepIndent */) { - wrappingIndent = 1 /* Same */; - } - const containerDomNode = document.createElement('div'); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__["Configuration"].applyFontInfoSlow(containerDomNode, fontInfo); - const sb = Object(_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["createStringBuilder"])(10000); - const firstNonWhitespaceIndices = []; - const wrappedTextIndentLengths = []; - const renderLineContents = []; - const allCharOffsets = []; - const allVisibleColumns = []; - for (let i = 0; i < requests.length; i++) { - const lineContent = requests[i]; - let firstNonWhitespaceIndex = 0; - let wrappedTextIndentLength = 0; - let width = overallWidth; - if (wrappingIndent !== 0 /* None */) { - firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["firstNonWhitespaceIndex"](lineContent); - if (firstNonWhitespaceIndex === -1) { - // all whitespace line - firstNonWhitespaceIndex = 0; - } - else { - // Track existing indent - for (let i = 0; i < firstNonWhitespaceIndex; i++) { - const charWidth = (lineContent.charCodeAt(i) === 9 /* Tab */ - ? (tabSize - (wrappedTextIndentLength % tabSize)) - : 1); - wrappedTextIndentLength += charWidth; - } - const indentWidth = Math.ceil(fontInfo.spaceWidth * wrappedTextIndentLength); - // Force sticking to beginning of line if no character would fit except for the indentation - if (indentWidth + fontInfo.typicalFullwidthCharacterWidth > overallWidth) { - firstNonWhitespaceIndex = 0; - wrappedTextIndentLength = 0; - } - else { - width = overallWidth - indentWidth; - } - } - } - const renderLineContent = lineContent.substr(firstNonWhitespaceIndex); - const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb); - firstNonWhitespaceIndices[i] = firstNonWhitespaceIndex; - wrappedTextIndentLengths[i] = wrappedTextIndentLength; - renderLineContents[i] = renderLineContent; - allCharOffsets[i] = tmp[0]; - allVisibleColumns[i] = tmp[1]; - } - containerDomNode.innerHTML = sb.build(); - containerDomNode.style.position = 'absolute'; - containerDomNode.style.top = '10000'; - containerDomNode.style.wordWrap = 'break-word'; - document.body.appendChild(containerDomNode); - let range = document.createRange(); - const lineDomNodes = Array.prototype.slice.call(containerDomNode.children, 0); - let result = []; - for (let i = 0; i < requests.length; i++) { - const lineDomNode = lineDomNodes[i]; - const breakOffsets = readLineBreaks(range, lineDomNode, renderLineContents[i], allCharOffsets[i]); - if (breakOffsets === null) { - result[i] = null; - continue; - } - const firstNonWhitespaceIndex = firstNonWhitespaceIndices[i]; - const wrappedTextIndentLength = wrappedTextIndentLengths[i]; - const visibleColumns = allVisibleColumns[i]; - const breakOffsetsVisibleColumn = []; - for (let j = 0, len = breakOffsets.length; j < len; j++) { - breakOffsetsVisibleColumn[j] = visibleColumns[breakOffsets[j]]; - } - if (firstNonWhitespaceIndex !== 0) { - // All break offsets are relative to the renderLineContent, make them absolute again - for (let j = 0, len = breakOffsets.length; j < len; j++) { - breakOffsets[j] += firstNonWhitespaceIndex; - } - } - result[i] = new _common_viewModel_splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_0__["LineBreakData"](breakOffsets, breakOffsetsVisibleColumn, wrappedTextIndentLength); - } - document.body.removeChild(containerDomNode); - return result; -} -function renderLine(lineContent, initialVisibleColumn, tabSize, width, sb) { - sb.appendASCIIString('
    '); - // if (containsRTL) { - // sb.appendASCIIString('" dir="ltr'); - // } - const len = lineContent.length; - let visibleColumn = initialVisibleColumn; - let charOffset = 0; - let charOffsets = []; - let visibleColumns = []; - let nextCharCode = (0 < len ? lineContent.charCodeAt(0) : 0 /* Null */); - sb.appendASCIIString(''); - for (let charIndex = 0; charIndex < len; charIndex++) { - if (charIndex !== 0 && charIndex % 16384 /* SPAN_MODULO_LIMIT */ === 0) { - sb.appendASCIIString(''); - } - charOffsets[charIndex] = charOffset; - visibleColumns[charIndex] = visibleColumn; - const charCode = nextCharCode; - nextCharCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */); - let producedCharacters = 1; - let charWidth = 1; - switch (charCode) { - case 9 /* Tab */: - producedCharacters = (tabSize - (visibleColumn % tabSize)); - charWidth = producedCharacters; - for (let space = 1; space <= producedCharacters; space++) { - if (space < producedCharacters) { - sb.write1(0xA0); //   - } - else { - sb.appendASCII(32 /* Space */); - } - } - break; - case 32 /* Space */: - if (nextCharCode === 32 /* Space */) { - sb.write1(0xA0); //   - } - else { - sb.appendASCII(32 /* Space */); - } - break; - case 60 /* LessThan */: - sb.appendASCIIString('<'); - break; - case 62 /* GreaterThan */: - sb.appendASCIIString('>'); - break; - case 38 /* Ampersand */: - sb.appendASCIIString('&'); - break; - case 0 /* Null */: - sb.appendASCIIString('�'); - break; - case 65279 /* UTF8_BOM */: - case 8232 /* LINE_SEPARATOR */: - case 8233 /* PARAGRAPH_SEPARATOR */: - case 133 /* NEXT_LINE */: - sb.write1(0xFFFD); - break; - default: - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["isFullWidthCharacter"](charCode)) { - charWidth++; - } - // if (renderControlCharacters && charCode < 32) { - // sb.write1(9216 + charCode); - // } else { - sb.write1(charCode); - // } - } - charOffset += producedCharacters; - visibleColumn += charWidth; - } - sb.appendASCIIString(''); - charOffsets[lineContent.length] = charOffset; - visibleColumns[lineContent.length] = visibleColumn; - sb.appendASCIIString('
    '); - return [charOffsets, visibleColumns]; -} -function readLineBreaks(range, lineDomNode, lineContent, charOffsets) { - if (lineContent.length <= 1) { - return null; - } - const spans = Array.prototype.slice.call(lineDomNode.children, 0); - const breakOffsets = []; - try { - discoverBreaks(range, spans, charOffsets, 0, null, lineContent.length - 1, null, breakOffsets); - } - catch (err) { - console.log(err); - return null; - } - if (breakOffsets.length === 0) { - return null; - } - breakOffsets.push(lineContent.length); - return breakOffsets; -} -function discoverBreaks(range, spans, charOffsets, low, lowRects, high, highRects, result) { - if (low === high) { - return; - } - lowRects = lowRects || readClientRect(range, spans, charOffsets[low], charOffsets[low + 1]); - highRects = highRects || readClientRect(range, spans, charOffsets[high], charOffsets[high + 1]); - if (Math.abs(lowRects[0].top - highRects[0].top) <= 0.1) { - // same line - return; - } - // there is at least one line break between these two offsets - if (low + 1 === high) { - // the two characters are adjacent, so the line break must be exactly between them - result.push(high); - return; - } - const mid = low + ((high - low) / 2) | 0; - const midRects = readClientRect(range, spans, charOffsets[mid], charOffsets[mid + 1]); - discoverBreaks(range, spans, charOffsets, low, lowRects, mid, midRects, result); - discoverBreaks(range, spans, charOffsets, mid, midRects, high, highRects, result); -} -function readClientRect(range, spans, startOffset, endOffset) { - range.setStart(spans[(startOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, startOffset % 16384 /* SPAN_MODULO_LIMIT */); - range.setEnd(spans[(endOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, endOffset % 16384 /* SPAN_MODULO_LIMIT */); - return range.getClientRects(); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js ***! - \*************************************************************************************/ -/*! exports provided: DynamicViewOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicViewOverlay", function() { return DynamicViewOverlay; }); -/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class DynamicViewOverlay extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_0__["ViewEventHandler"] { -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js ***! - \*********************************************************************************/ -/*! exports provided: ViewController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewController", function() { return ViewController; }); -/* harmony import */ var _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../controller/coreCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class ViewController { - constructor(configuration, viewModel, userInputEvents, commandDelegate) { - this.configuration = configuration; - this.viewModel = viewModel; - this.userInputEvents = userInputEvents; - this.commandDelegate = commandDelegate; - } - paste(text, pasteOnNewLine, multicursorText, mode) { - this.commandDelegate.paste(text, pasteOnNewLine, multicursorText, mode); - } - type(text) { - this.commandDelegate.type(text); - } - replacePreviousChar(text, replaceCharCnt) { - this.commandDelegate.replacePreviousChar(text, replaceCharCnt); - } - compositionStart() { - this.commandDelegate.startComposition(); - } - compositionEnd() { - this.commandDelegate.endComposition(); - } - cut() { - this.commandDelegate.cut(); - } - setSelection(modelSelection) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].SetSelection.runCoreEditorCommand(this.viewModel, { - source: 'keyboard', - selection: modelSelection - }); - } - _validateViewColumn(viewPosition) { - const minColumn = this.viewModel.getLineMinColumn(viewPosition.lineNumber); - if (viewPosition.column < minColumn) { - return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](viewPosition.lineNumber, minColumn); - } - return viewPosition; - } - _hasMulticursorModifier(data) { - switch (this.configuration.options.get(61 /* multiCursorModifier */)) { - case 'altKey': - return data.altKey; - case 'ctrlKey': - return data.ctrlKey; - case 'metaKey': - return data.metaKey; - default: - return false; - } - } - _hasNonMulticursorModifier(data) { - switch (this.configuration.options.get(61 /* multiCursorModifier */)) { - case 'altKey': - return data.ctrlKey || data.metaKey; - case 'ctrlKey': - return data.altKey || data.metaKey; - case 'metaKey': - return data.ctrlKey || data.altKey; - default: - return false; - } - } - dispatchMouse(data) { - const options = this.configuration.options; - const selectionClipboardIsOn = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isLinux"] && options.get(88 /* selectionClipboard */)); - const columnSelection = options.get(13 /* columnSelection */); - if (data.middleButton && !selectionClipboardIsOn) { - this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode); - } - else if (data.startedOnLineNumbers) { - // If the dragging started on the gutter, then have operations work on the entire line - if (this._hasMulticursorModifier(data)) { - if (data.inSelectionMode) { - this._lastCursorLineSelect(data.position); - } - else { - this._createCursor(data.position, true); - } - } - else { - if (data.inSelectionMode) { - this._lineSelectDrag(data.position); - } - else { - this._lineSelect(data.position); - } - } - } - else if (data.mouseDownCount >= 4) { - this._selectAll(); - } - else if (data.mouseDownCount === 3) { - if (this._hasMulticursorModifier(data)) { - if (data.inSelectionMode) { - this._lastCursorLineSelectDrag(data.position); - } - else { - this._lastCursorLineSelect(data.position); - } - } - else { - if (data.inSelectionMode) { - this._lineSelectDrag(data.position); - } - else { - this._lineSelect(data.position); - } - } - } - else if (data.mouseDownCount === 2) { - if (this._hasMulticursorModifier(data)) { - this._lastCursorWordSelect(data.position); - } - else { - if (data.inSelectionMode) { - this._wordSelectDrag(data.position); - } - else { - this._wordSelect(data.position); - } - } - } - else { - if (this._hasMulticursorModifier(data)) { - if (!this._hasNonMulticursorModifier(data)) { - if (data.shiftKey) { - this._columnSelect(data.position, data.mouseColumn, true); - } - else { - // Do multi-cursor operations only when purely alt is pressed - if (data.inSelectionMode) { - this._lastCursorMoveToSelect(data.position); - } - else { - this._createCursor(data.position, false); - } - } - } - } - else { - if (data.inSelectionMode) { - if (data.altKey) { - this._columnSelect(data.position, data.mouseColumn, true); - } - else { - if (columnSelection) { - this._columnSelect(data.position, data.mouseColumn, true); - } - else { - this._moveToSelect(data.position); - } - } - } - else { - this.moveTo(data.position); - } - } - } - } - _usualArgs(viewPosition) { - viewPosition = this._validateViewColumn(viewPosition); - return { - source: 'mouse', - position: this._convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }; - } - moveTo(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].MoveTo.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _moveToSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].MoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _columnSelect(viewPosition, mouseColumn, doColumnSelect) { - viewPosition = this._validateViewColumn(viewPosition); - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].ColumnSelect.runCoreEditorCommand(this.viewModel, { - source: 'mouse', - position: this._convertViewToModelPosition(viewPosition), - viewPosition: viewPosition, - mouseColumn: mouseColumn, - doColumnSelect: doColumnSelect - }); - } - _createCursor(viewPosition, wholeLine) { - viewPosition = this._validateViewColumn(viewPosition); - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].CreateCursor.runCoreEditorCommand(this.viewModel, { - source: 'mouse', - position: this._convertViewToModelPosition(viewPosition), - viewPosition: viewPosition, - wholeLine: wholeLine - }); - } - _lastCursorMoveToSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _wordSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].WordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _wordSelectDrag(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].WordSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _lastCursorWordSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LastCursorWordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _lineSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _lineSelectDrag(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _lastCursorLineSelect(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LastCursorLineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _lastCursorLineSelectDrag(viewPosition) { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition)); - } - _selectAll() { - _controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__["CoreNavigationCommands"].SelectAll.runCoreEditorCommand(this.viewModel, { source: 'mouse' }); - } - // ---------------------- - _convertViewToModelPosition(viewPosition) { - return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition); - } - emitKeyDown(e) { - this.userInputEvents.emitKeyDown(e); - } - emitKeyUp(e) { - this.userInputEvents.emitKeyUp(e); - } - emitContextMenu(e) { - this.userInputEvents.emitContextMenu(e); - } - emitMouseMove(e) { - this.userInputEvents.emitMouseMove(e); - } - emitMouseLeave(e) { - this.userInputEvents.emitMouseLeave(e); - } - emitMouseUp(e) { - this.userInputEvents.emitMouseUp(e); - } - emitMouseDown(e) { - this.userInputEvents.emitMouseDown(e); - } - emitMouseDrag(e) { - this.userInputEvents.emitMouseDrag(e); - } - emitMouseDrop(e) { - this.userInputEvents.emitMouseDrop(e); - } - emitMouseWheel(e) { - this.userInputEvents.emitMouseWheel(e); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js ***! - \***************************************************************************/ -/*! exports provided: View */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "View", function() { return View; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _controller_pointerHandler_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../controller/pointerHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js"); -/* harmony import */ var _controller_textAreaHandler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../controller/textAreaHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js"); -/* harmony import */ var _viewController_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./viewController.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js"); -/* harmony import */ var _viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./viewUserInputEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js"); -/* harmony import */ var _viewOverlays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./viewOverlays.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js"); -/* harmony import */ var _viewPart_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _viewParts_contentWidgets_contentWidgets_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewParts/contentWidgets/contentWidgets.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js"); -/* harmony import */ var _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../viewParts/currentLineHighlight/currentLineHighlight.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js"); -/* harmony import */ var _viewParts_decorations_decorations_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../viewParts/decorations/decorations.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js"); -/* harmony import */ var _viewParts_editorScrollbar_editorScrollbar_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../viewParts/editorScrollbar/editorScrollbar.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js"); -/* harmony import */ var _viewParts_glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../viewParts/glyphMargin/glyphMargin.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js"); -/* harmony import */ var _viewParts_indentGuides_indentGuides_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../viewParts/indentGuides/indentGuides.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js"); -/* harmony import */ var _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../viewParts/lineNumbers/lineNumbers.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js"); -/* harmony import */ var _viewParts_lines_viewLines_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../viewParts/lines/viewLines.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js"); -/* harmony import */ var _viewParts_linesDecorations_linesDecorations_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../viewParts/linesDecorations/linesDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js"); -/* harmony import */ var _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../viewParts/margin/margin.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js"); -/* harmony import */ var _viewParts_marginDecorations_marginDecorations_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../viewParts/marginDecorations/marginDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js"); -/* harmony import */ var _viewParts_minimap_minimap_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../viewParts/minimap/minimap.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js"); -/* harmony import */ var _viewParts_overlayWidgets_overlayWidgets_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../viewParts/overlayWidgets/overlayWidgets.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js"); -/* harmony import */ var _viewParts_overviewRuler_decorationsOverviewRuler_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../viewParts/overviewRuler/decorationsOverviewRuler.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js"); -/* harmony import */ var _viewParts_overviewRuler_overviewRuler_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../viewParts/overviewRuler/overviewRuler.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js"); -/* harmony import */ var _viewParts_rulers_rulers_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../viewParts/rulers/rulers.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js"); -/* harmony import */ var _viewParts_scrollDecoration_scrollDecoration_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../viewParts/scrollDecoration/scrollDecoration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js"); -/* harmony import */ var _viewParts_selections_selections_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../viewParts/selections/selections.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js"); -/* harmony import */ var _viewParts_viewCursors_viewCursors_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../viewParts/viewCursors/viewCursors.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js"); -/* harmony import */ var _viewParts_viewZones_viewZones_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../viewParts/viewZones/viewZones.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../common/view/renderingContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js"); -/* harmony import */ var _common_view_viewContext_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../common/view/viewContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js"); -/* harmony import */ var _common_viewLayout_viewLinesViewportData_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../common/viewLayout/viewLinesViewportData.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js"); -/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../controller/mouseTarget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -class View extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_35__["ViewEventHandler"] { - constructor(commandDelegate, configuration, themeService, model, userInputEvents, overflowWidgetsDomNode) { - super(); - this._selections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](1, 1, 1, 1)]; - this._renderAnimationFrame = null; - const viewController = new _viewController_js__WEBPACK_IMPORTED_MODULE_6__["ViewController"](configuration, model, userInputEvents, commandDelegate); - // The view context is passed on to most classes (basically to reduce param. counts in ctors) - this._context = new _common_view_viewContext_js__WEBPACK_IMPORTED_MODULE_33__["ViewContext"](configuration, themeService.getColorTheme(), model); - // Ensure the view is the first event handler in order to update the layout - this._context.addEventHandler(this); - this._register(themeService.onDidColorThemeChange(theme => { - this._context.theme.update(theme); - this._context.model.onDidColorThemeChange(); - this.render(true, false); - })); - this._viewParts = []; - // Keyboard handler - this._textAreaHandler = new _controller_textAreaHandler_js__WEBPACK_IMPORTED_MODULE_5__["TextAreaHandler"](this._context, viewController, this._createTextAreaHandlerHelper()); - this._viewParts.push(this._textAreaHandler); - // These two dom nodes must be constructed up front, since references are needed in the layout provider (scrolling & co.) - this._linesContent = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._linesContent.setClassName('lines-content' + ' monaco-editor-background'); - this._linesContent.setPosition('absolute'); - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this.domNode.setClassName(this._getEditorClassName()); - // Set role 'code' for better screen reader support https://github.com/microsoft/vscode/issues/93438 - this.domNode.setAttribute('role', 'code'); - this._overflowGuardContainer = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - _viewPart_js__WEBPACK_IMPORTED_MODULE_9__["PartFingerprints"].write(this._overflowGuardContainer, 3 /* OverflowGuard */); - this._overflowGuardContainer.setClassName('overflow-guard'); - this._scrollbar = new _viewParts_editorScrollbar_editorScrollbar_js__WEBPACK_IMPORTED_MODULE_13__["EditorScrollbar"](this._context, this._linesContent, this.domNode, this._overflowGuardContainer); - this._viewParts.push(this._scrollbar); - // View Lines - this._viewLines = new _viewParts_lines_viewLines_js__WEBPACK_IMPORTED_MODULE_17__["ViewLines"](this._context, this._linesContent); - // View Zones - this._viewZones = new _viewParts_viewZones_viewZones_js__WEBPACK_IMPORTED_MODULE_29__["ViewZones"](this._context); - this._viewParts.push(this._viewZones); - // Decorations overview ruler - const decorationsOverviewRuler = new _viewParts_overviewRuler_decorationsOverviewRuler_js__WEBPACK_IMPORTED_MODULE_23__["DecorationsOverviewRuler"](this._context); - this._viewParts.push(decorationsOverviewRuler); - const scrollDecoration = new _viewParts_scrollDecoration_scrollDecoration_js__WEBPACK_IMPORTED_MODULE_26__["ScrollDecorationViewPart"](this._context); - this._viewParts.push(scrollDecoration); - const contentViewOverlays = new _viewOverlays_js__WEBPACK_IMPORTED_MODULE_8__["ContentViewOverlays"](this._context); - this._viewParts.push(contentViewOverlays); - contentViewOverlays.addDynamicOverlay(new _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_11__["CurrentLineHighlightOverlay"](this._context)); - contentViewOverlays.addDynamicOverlay(new _viewParts_selections_selections_js__WEBPACK_IMPORTED_MODULE_27__["SelectionsOverlay"](this._context)); - contentViewOverlays.addDynamicOverlay(new _viewParts_indentGuides_indentGuides_js__WEBPACK_IMPORTED_MODULE_15__["IndentGuidesOverlay"](this._context)); - contentViewOverlays.addDynamicOverlay(new _viewParts_decorations_decorations_js__WEBPACK_IMPORTED_MODULE_12__["DecorationsOverlay"](this._context)); - const marginViewOverlays = new _viewOverlays_js__WEBPACK_IMPORTED_MODULE_8__["MarginViewOverlays"](this._context); - this._viewParts.push(marginViewOverlays); - marginViewOverlays.addDynamicOverlay(new _viewParts_currentLineHighlight_currentLineHighlight_js__WEBPACK_IMPORTED_MODULE_11__["CurrentLineMarginHighlightOverlay"](this._context)); - marginViewOverlays.addDynamicOverlay(new _viewParts_glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_14__["GlyphMarginOverlay"](this._context)); - marginViewOverlays.addDynamicOverlay(new _viewParts_marginDecorations_marginDecorations_js__WEBPACK_IMPORTED_MODULE_20__["MarginViewLineDecorationsOverlay"](this._context)); - marginViewOverlays.addDynamicOverlay(new _viewParts_linesDecorations_linesDecorations_js__WEBPACK_IMPORTED_MODULE_18__["LinesDecorationsOverlay"](this._context)); - marginViewOverlays.addDynamicOverlay(new _viewParts_lineNumbers_lineNumbers_js__WEBPACK_IMPORTED_MODULE_16__["LineNumbersOverlay"](this._context)); - const margin = new _viewParts_margin_margin_js__WEBPACK_IMPORTED_MODULE_19__["Margin"](this._context); - margin.getDomNode().appendChild(this._viewZones.marginDomNode); - margin.getDomNode().appendChild(marginViewOverlays.getDomNode()); - this._viewParts.push(margin); - // Content widgets - this._contentWidgets = new _viewParts_contentWidgets_contentWidgets_js__WEBPACK_IMPORTED_MODULE_10__["ViewContentWidgets"](this._context, this.domNode); - this._viewParts.push(this._contentWidgets); - this._viewCursors = new _viewParts_viewCursors_viewCursors_js__WEBPACK_IMPORTED_MODULE_28__["ViewCursors"](this._context); - this._viewParts.push(this._viewCursors); - // Overlay widgets - this._overlayWidgets = new _viewParts_overlayWidgets_overlayWidgets_js__WEBPACK_IMPORTED_MODULE_22__["ViewOverlayWidgets"](this._context); - this._viewParts.push(this._overlayWidgets); - const rulers = new _viewParts_rulers_rulers_js__WEBPACK_IMPORTED_MODULE_25__["Rulers"](this._context); - this._viewParts.push(rulers); - const minimap = new _viewParts_minimap_minimap_js__WEBPACK_IMPORTED_MODULE_21__["Minimap"](this._context); - this._viewParts.push(minimap); - // -------------- Wire dom nodes up - if (decorationsOverviewRuler) { - const overviewRulerData = this._scrollbar.getOverviewRulerLayoutInfo(); - overviewRulerData.parent.insertBefore(decorationsOverviewRuler.getDomNode(), overviewRulerData.insertBefore); - } - this._linesContent.appendChild(contentViewOverlays.getDomNode()); - this._linesContent.appendChild(rulers.domNode); - this._linesContent.appendChild(this._viewZones.domNode); - this._linesContent.appendChild(this._viewLines.getDomNode()); - this._linesContent.appendChild(this._contentWidgets.domNode); - this._linesContent.appendChild(this._viewCursors.getDomNode()); - this._overflowGuardContainer.appendChild(margin.getDomNode()); - this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()); - this._overflowGuardContainer.appendChild(scrollDecoration.getDomNode()); - this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea); - this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover); - this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()); - this._overflowGuardContainer.appendChild(minimap.getDomNode()); - this.domNode.appendChild(this._overflowGuardContainer); - if (overflowWidgetsDomNode) { - overflowWidgetsDomNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode); - } - else { - this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode); - } - this._applyLayout(); - // Pointer handler - this._pointerHandler = this._register(new _controller_pointerHandler_js__WEBPACK_IMPORTED_MODULE_4__["PointerHandler"](this._context, viewController, this._createPointerHandlerHelper())); - } - _flushAccumulatedAndRenderNow() { - this._renderNow(); - } - _createPointerHandlerHelper() { - return { - viewDomNode: this.domNode.domNode, - linesContentDomNode: this._linesContent.domNode, - focusTextArea: () => { - this.focus(); - }, - getLastRenderData: () => { - const lastViewCursorsRenderData = this._viewCursors.getLastRenderData() || []; - const lastTextareaPosition = this._textAreaHandler.getLastRenderData(); - return new _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_37__["PointerHandlerLastRenderData"](lastViewCursorsRenderData, lastTextareaPosition); - }, - shouldSuppressMouseDownOnViewZone: (viewZoneId) => { - return this._viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId); - }, - shouldSuppressMouseDownOnWidget: (widgetId) => { - return this._contentWidgets.shouldSuppressMouseDownOnWidget(widgetId); - }, - getPositionFromDOMInfo: (spanNode, offset) => { - this._flushAccumulatedAndRenderNow(); - return this._viewLines.getPositionFromDOMInfo(spanNode, offset); - }, - visibleRangeForPosition: (lineNumber, column) => { - this._flushAccumulatedAndRenderNow(); - return this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_30__["Position"](lineNumber, column)); - }, - getLineWidth: (lineNumber) => { - this._flushAccumulatedAndRenderNow(); - return this._viewLines.getLineWidth(lineNumber); - } - }; - } - _createTextAreaHandlerHelper() { - return { - visibleRangeForPositionRelativeToEditor: (lineNumber, column) => { - this._flushAccumulatedAndRenderNow(); - return this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_30__["Position"](lineNumber, column)); - } - }; - } - _applyLayout() { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this.domNode.setWidth(layoutInfo.width); - this.domNode.setHeight(layoutInfo.height); - this._overflowGuardContainer.setWidth(layoutInfo.width); - this._overflowGuardContainer.setHeight(layoutInfo.height); - this._linesContent.setWidth(1000000); - this._linesContent.setHeight(1000000); - } - _getEditorClassName() { - const focused = this._textAreaHandler.isFocused() ? ' focused' : ''; - return this._context.configuration.options.get(114 /* editorClassName */) + ' ' + Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__["getThemeTypeSelector"])(this._context.theme.type) + focused; - } - // --- begin event handlers - handleEvents(events) { - super.handleEvents(events); - this._scheduleRender(); - } - onConfigurationChanged(e) { - this.domNode.setClassName(this._getEditorClassName()); - this._applyLayout(); - return false; - } - onCursorStateChanged(e) { - this._selections = e.selections; - return false; - } - onFocusChanged(e) { - this.domNode.setClassName(this._getEditorClassName()); - return false; - } - onThemeChanged(e) { - this.domNode.setClassName(this._getEditorClassName()); - return false; - } - // --- end event handlers - dispose() { - if (this._renderAnimationFrame !== null) { - this._renderAnimationFrame.dispose(); - this._renderAnimationFrame = null; - } - this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(); - this._context.removeEventHandler(this); - this._viewLines.dispose(); - // Destroy view parts - for (let i = 0, len = this._viewParts.length; i < len; i++) { - this._viewParts[i].dispose(); - } - super.dispose(); - } - _scheduleRender() { - if (this._renderAnimationFrame === null) { - this._renderAnimationFrame = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["runAtThisOrScheduleAtNextAnimationFrame"](this._onRenderScheduled.bind(this), 100); - } - } - _onRenderScheduled() { - this._renderAnimationFrame = null; - this._flushAccumulatedAndRenderNow(); - } - _renderNow() { - safeInvokeNoArg(() => this._actualRender()); - } - _getViewPartsToRender() { - let result = [], resultLen = 0; - for (let i = 0, len = this._viewParts.length; i < len; i++) { - const viewPart = this._viewParts[i]; - if (viewPart.shouldRender()) { - result[resultLen++] = viewPart; - } - } - return result; - } - _actualRender() { - if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["isInDOM"](this.domNode.domNode)) { - return; - } - let viewPartsToRender = this._getViewPartsToRender(); - if (!this._viewLines.shouldRender() && viewPartsToRender.length === 0) { - // Nothing to render - return; - } - const partialViewportData = this._context.viewLayout.getLinesViewportData(); - this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber); - const viewportData = new _common_viewLayout_viewLinesViewportData_js__WEBPACK_IMPORTED_MODULE_34__["ViewportData"](this._selections, partialViewportData, this._context.viewLayout.getWhitespaceViewportData(), this._context.model); - if (this._contentWidgets.shouldRender()) { - // Give the content widgets a chance to set their max width before a possible synchronous layout - this._contentWidgets.onBeforeRender(viewportData); - } - if (this._viewLines.shouldRender()) { - this._viewLines.renderText(viewportData); - this._viewLines.onDidRender(); - // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again - viewPartsToRender = this._getViewPartsToRender(); - } - const renderingContext = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_32__["RenderingContext"](this._context.viewLayout, viewportData, this._viewLines); - // Render the rest of the parts - for (let i = 0, len = viewPartsToRender.length; i < len; i++) { - const viewPart = viewPartsToRender[i]; - viewPart.prepareRender(renderingContext); - } - for (let i = 0, len = viewPartsToRender.length; i < len; i++) { - const viewPart = viewPartsToRender[i]; - viewPart.render(renderingContext); - viewPart.onDidRender(); - } - } - // --- BEGIN CodeEditor helpers - delegateVerticalScrollbarMouseDown(browserEvent) { - this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); - } - restoreState(scrollPosition) { - this._context.model.setScrollPosition({ scrollTop: scrollPosition.scrollTop }, 1 /* Immediate */); - this._context.model.tokenizeViewport(); - this._renderNow(); - this._viewLines.updateLineWidths(); - this._context.model.setScrollPosition({ scrollLeft: scrollPosition.scrollLeft }, 1 /* Immediate */); - } - getOffsetForColumn(modelLineNumber, modelColumn) { - const modelPosition = this._context.model.validateModelPosition({ - lineNumber: modelLineNumber, - column: modelColumn - }); - const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - this._flushAccumulatedAndRenderNow(); - const visibleRange = this._viewLines.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_30__["Position"](viewPosition.lineNumber, viewPosition.column)); - if (!visibleRange) { - return -1; - } - return visibleRange.left; - } - getTargetAtClientPoint(clientX, clientY) { - const mouseTarget = this._pointerHandler.getTargetAtClientPoint(clientX, clientY); - if (!mouseTarget) { - return null; - } - return _viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_7__["ViewUserInputEvents"].convertViewToModelMouseTarget(mouseTarget, this._context.model.coordinatesConverter); - } - createOverviewRuler(cssClassName) { - return new _viewParts_overviewRuler_overviewRuler_js__WEBPACK_IMPORTED_MODULE_24__["OverviewRuler"](this._context, cssClassName); - } - change(callback) { - this._viewZones.changeViewZones(callback); - this._scheduleRender(); - } - render(now, everything) { - if (everything) { - // Force everything to render... - this._viewLines.forceShouldRender(); - for (let i = 0, len = this._viewParts.length; i < len; i++) { - const viewPart = this._viewParts[i]; - viewPart.forceShouldRender(); - } - } - if (now) { - this._flushAccumulatedAndRenderNow(); - } - else { - this._scheduleRender(); - } - } - focus() { - this._textAreaHandler.focusTextArea(); - } - isFocused() { - return this._textAreaHandler.isFocused(); - } - setAriaOptions(options) { - this._textAreaHandler.setAriaOptions(options); - } - addContentWidget(widgetData) { - this._contentWidgets.addWidget(widgetData.widget); - this.layoutContentWidget(widgetData); - this._scheduleRender(); - } - layoutContentWidget(widgetData) { - let newRange = widgetData.position ? widgetData.position.range || null : null; - if (newRange === null) { - const newPosition = widgetData.position ? widgetData.position.position : null; - if (newPosition !== null) { - newRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_31__["Range"](newPosition.lineNumber, newPosition.column, newPosition.lineNumber, newPosition.column); - } - } - const newPreference = widgetData.position ? widgetData.position.preference : null; - this._contentWidgets.setWidgetPosition(widgetData.widget, newRange, newPreference); - this._scheduleRender(); - } - removeContentWidget(widgetData) { - this._contentWidgets.removeWidget(widgetData.widget); - this._scheduleRender(); - } - addOverlayWidget(widgetData) { - this._overlayWidgets.addWidget(widgetData.widget); - this.layoutOverlayWidget(widgetData); - this._scheduleRender(); - } - layoutOverlayWidget(widgetData) { - const newPreference = widgetData.position ? widgetData.position.preference : null; - const shouldRender = this._overlayWidgets.setWidgetPosition(widgetData.widget, newPreference); - if (shouldRender) { - this._scheduleRender(); - } - } - removeOverlayWidget(widgetData) { - this._overlayWidgets.removeWidget(widgetData.widget); - this._scheduleRender(); - } -} -function safeInvokeNoArg(func) { - try { - return func(); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"])(e); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js ***! - \****************************************************************************/ -/*! exports provided: RenderedLinesCollection, VisibleLinesCollection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderedLinesCollection", function() { return RenderedLinesCollection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VisibleLinesCollection", function() { return VisibleLinesCollection; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class RenderedLinesCollection { - constructor(createLine) { - this._createLine = createLine; - this._set(1, []); - } - flush() { - this._set(1, []); - } - _set(rendLineNumberStart, lines) { - this._lines = lines; - this._rendLineNumberStart = rendLineNumberStart; - } - _get() { - return { - rendLineNumberStart: this._rendLineNumberStart, - lines: this._lines - }; - } - /** - * @returns Inclusive line number that is inside this collection - */ - getStartLineNumber() { - return this._rendLineNumberStart; - } - /** - * @returns Inclusive line number that is inside this collection - */ - getEndLineNumber() { - return this._rendLineNumberStart + this._lines.length - 1; - } - getCount() { - return this._lines.length; - } - getLine(lineNumber) { - const lineIndex = lineNumber - this._rendLineNumberStart; - if (lineIndex < 0 || lineIndex >= this._lines.length) { - throw new Error('Illegal value for lineNumber'); - } - return this._lines[lineIndex]; - } - /** - * @returns Lines that were removed from this collection - */ - onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) { - if (this.getCount() === 0) { - // no lines - return null; - } - const startLineNumber = this.getStartLineNumber(); - const endLineNumber = this.getEndLineNumber(); - if (deleteToLineNumber < startLineNumber) { - // deleting above the viewport - const deleteCnt = deleteToLineNumber - deleteFromLineNumber + 1; - this._rendLineNumberStart -= deleteCnt; - return null; - } - if (deleteFromLineNumber > endLineNumber) { - // deleted below the viewport - return null; - } - // Record what needs to be deleted - let deleteStartIndex = 0; - let deleteCount = 0; - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const lineIndex = lineNumber - this._rendLineNumberStart; - if (deleteFromLineNumber <= lineNumber && lineNumber <= deleteToLineNumber) { - // this is a line to be deleted - if (deleteCount === 0) { - // this is the first line to be deleted - deleteStartIndex = lineIndex; - deleteCount = 1; - } - else { - deleteCount++; - } - } - } - // Adjust this._rendLineNumberStart for lines deleted above - if (deleteFromLineNumber < startLineNumber) { - // Something was deleted above - let deleteAboveCount = 0; - if (deleteToLineNumber < startLineNumber) { - // the entire deleted lines are above - deleteAboveCount = deleteToLineNumber - deleteFromLineNumber + 1; - } - else { - deleteAboveCount = startLineNumber - deleteFromLineNumber; - } - this._rendLineNumberStart -= deleteAboveCount; - } - const deleted = this._lines.splice(deleteStartIndex, deleteCount); - return deleted; - } - onLinesChanged(changeFromLineNumber, changeToLineNumber) { - if (this.getCount() === 0) { - // no lines - return false; - } - const startLineNumber = this.getStartLineNumber(); - const endLineNumber = this.getEndLineNumber(); - let someoneNotified = false; - for (let changedLineNumber = changeFromLineNumber; changedLineNumber <= changeToLineNumber; changedLineNumber++) { - if (changedLineNumber >= startLineNumber && changedLineNumber <= endLineNumber) { - // Notify the line - this._lines[changedLineNumber - this._rendLineNumberStart].onContentChanged(); - someoneNotified = true; - } - } - return someoneNotified; - } - onLinesInserted(insertFromLineNumber, insertToLineNumber) { - if (this.getCount() === 0) { - // no lines - return null; - } - const insertCnt = insertToLineNumber - insertFromLineNumber + 1; - const startLineNumber = this.getStartLineNumber(); - const endLineNumber = this.getEndLineNumber(); - if (insertFromLineNumber <= startLineNumber) { - // inserting above the viewport - this._rendLineNumberStart += insertCnt; - return null; - } - if (insertFromLineNumber > endLineNumber) { - // inserting below the viewport - return null; - } - if (insertCnt + insertFromLineNumber > endLineNumber) { - // insert inside the viewport in such a way that all remaining lines are pushed outside - const deleted = this._lines.splice(insertFromLineNumber - this._rendLineNumberStart, endLineNumber - insertFromLineNumber + 1); - return deleted; - } - // insert inside the viewport, push out some lines, but not all remaining lines - const newLines = []; - for (let i = 0; i < insertCnt; i++) { - newLines[i] = this._createLine(); - } - const insertIndex = insertFromLineNumber - this._rendLineNumberStart; - const beforeLines = this._lines.slice(0, insertIndex); - const afterLines = this._lines.slice(insertIndex, this._lines.length - insertCnt); - const deletedLines = this._lines.slice(this._lines.length - insertCnt, this._lines.length); - this._lines = beforeLines.concat(newLines).concat(afterLines); - return deletedLines; - } - onTokensChanged(ranges) { - if (this.getCount() === 0) { - // no lines - return false; - } - const startLineNumber = this.getStartLineNumber(); - const endLineNumber = this.getEndLineNumber(); - let notifiedSomeone = false; - for (let i = 0, len = ranges.length; i < len; i++) { - const rng = ranges[i]; - if (rng.toLineNumber < startLineNumber || rng.fromLineNumber > endLineNumber) { - // range outside viewport - continue; - } - const from = Math.max(startLineNumber, rng.fromLineNumber); - const to = Math.min(endLineNumber, rng.toLineNumber); - for (let lineNumber = from; lineNumber <= to; lineNumber++) { - const lineIndex = lineNumber - this._rendLineNumberStart; - this._lines[lineIndex].onTokensChanged(); - notifiedSomeone = true; - } - } - return notifiedSomeone; - } -} -class VisibleLinesCollection { - constructor(host) { - this._host = host; - this.domNode = this._createDomNode(); - this._linesCollection = new RenderedLinesCollection(() => this._host.createVisibleLine()); - } - _createDomNode() { - const domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(document.createElement('div')); - domNode.setClassName('view-layer'); - domNode.setPosition('absolute'); - domNode.domNode.setAttribute('role', 'presentation'); - domNode.domNode.setAttribute('aria-hidden', 'true'); - return domNode; - } - // ---- begin view event handlers - onConfigurationChanged(e) { - if (e.hasChanged(117 /* layoutInfo */)) { - return true; - } - return false; - } - onFlushed(e) { - this._linesCollection.flush(); - // No need to clear the dom node because a full .innerHTML will occur in ViewLayerRenderer._render - return true; - } - onLinesChanged(e) { - return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber); - } - onLinesDeleted(e) { - const deleted = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber); - if (deleted) { - // Remove from DOM - for (let i = 0, len = deleted.length; i < len; i++) { - const lineDomNode = deleted[i].getDomNode(); - if (lineDomNode) { - this.domNode.domNode.removeChild(lineDomNode); - } - } - } - return true; - } - onLinesInserted(e) { - const deleted = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber); - if (deleted) { - // Remove from DOM - for (let i = 0, len = deleted.length; i < len; i++) { - const lineDomNode = deleted[i].getDomNode(); - if (lineDomNode) { - this.domNode.domNode.removeChild(lineDomNode); - } - } - } - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged; - } - onTokensChanged(e) { - return this._linesCollection.onTokensChanged(e.ranges); - } - onZonesChanged(e) { - return true; - } - // ---- end view event handlers - getStartLineNumber() { - return this._linesCollection.getStartLineNumber(); - } - getEndLineNumber() { - return this._linesCollection.getEndLineNumber(); - } - getVisibleLine(lineNumber) { - return this._linesCollection.getLine(lineNumber); - } - renderLines(viewportData) { - const inp = this._linesCollection._get(); - const renderer = new ViewLayerRenderer(this.domNode.domNode, this._host, viewportData); - const ctx = { - rendLineNumberStart: inp.rendLineNumberStart, - lines: inp.lines, - linesLength: inp.lines.length - }; - // Decide if this render will do a single update (single large .innerHTML) or many updates (inserting/removing dom nodes) - const resCtx = renderer.render(ctx, viewportData.startLineNumber, viewportData.endLineNumber, viewportData.relativeVerticalOffset); - this._linesCollection._set(resCtx.rendLineNumberStart, resCtx.lines); - } -} -class ViewLayerRenderer { - constructor(domNode, host, viewportData) { - this.domNode = domNode; - this.host = host; - this.viewportData = viewportData; - } - render(inContext, startLineNumber, stopLineNumber, deltaTop) { - const ctx = { - rendLineNumberStart: inContext.rendLineNumberStart, - lines: inContext.lines.slice(0), - linesLength: inContext.linesLength - }; - if ((ctx.rendLineNumberStart + ctx.linesLength - 1 < startLineNumber) || (stopLineNumber < ctx.rendLineNumberStart)) { - // There is no overlap whatsoever - ctx.rendLineNumberStart = startLineNumber; - ctx.linesLength = stopLineNumber - startLineNumber + 1; - ctx.lines = []; - for (let x = startLineNumber; x <= stopLineNumber; x++) { - ctx.lines[x - startLineNumber] = this.host.createVisibleLine(); - } - this._finishRendering(ctx, true, deltaTop); - return ctx; - } - // Update lines which will remain untouched - this._renderUntouchedLines(ctx, Math.max(startLineNumber - ctx.rendLineNumberStart, 0), Math.min(stopLineNumber - ctx.rendLineNumberStart, ctx.linesLength - 1), deltaTop, startLineNumber); - if (ctx.rendLineNumberStart > startLineNumber) { - // Insert lines before - const fromLineNumber = startLineNumber; - const toLineNumber = Math.min(stopLineNumber, ctx.rendLineNumberStart - 1); - if (fromLineNumber <= toLineNumber) { - this._insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber); - ctx.linesLength += toLineNumber - fromLineNumber + 1; - } - } - else if (ctx.rendLineNumberStart < startLineNumber) { - // Remove lines before - const removeCnt = Math.min(ctx.linesLength, startLineNumber - ctx.rendLineNumberStart); - if (removeCnt > 0) { - this._removeLinesBefore(ctx, removeCnt); - ctx.linesLength -= removeCnt; - } - } - ctx.rendLineNumberStart = startLineNumber; - if (ctx.rendLineNumberStart + ctx.linesLength - 1 < stopLineNumber) { - // Insert lines after - const fromLineNumber = ctx.rendLineNumberStart + ctx.linesLength; - const toLineNumber = stopLineNumber; - if (fromLineNumber <= toLineNumber) { - this._insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber); - ctx.linesLength += toLineNumber - fromLineNumber + 1; - } - } - else if (ctx.rendLineNumberStart + ctx.linesLength - 1 > stopLineNumber) { - // Remove lines after - const fromLineNumber = Math.max(0, stopLineNumber - ctx.rendLineNumberStart + 1); - const toLineNumber = ctx.linesLength - 1; - const removeCnt = toLineNumber - fromLineNumber + 1; - if (removeCnt > 0) { - this._removeLinesAfter(ctx, removeCnt); - ctx.linesLength -= removeCnt; - } - } - this._finishRendering(ctx, false, deltaTop); - return ctx; - } - _renderUntouchedLines(ctx, startIndex, endIndex, deltaTop, deltaLN) { - const rendLineNumberStart = ctx.rendLineNumberStart; - const lines = ctx.lines; - for (let i = startIndex; i <= endIndex; i++) { - const lineNumber = rendLineNumberStart + i; - lines[i].layoutLine(lineNumber, deltaTop[lineNumber - deltaLN]); - } - } - _insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) { - const newLines = []; - let newLinesLen = 0; - for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) { - newLines[newLinesLen++] = this.host.createVisibleLine(); - } - ctx.lines = newLines.concat(ctx.lines); - } - _removeLinesBefore(ctx, removeCount) { - for (let i = 0; i < removeCount; i++) { - const lineDomNode = ctx.lines[i].getDomNode(); - if (lineDomNode) { - this.domNode.removeChild(lineDomNode); - } - } - ctx.lines.splice(0, removeCount); - } - _insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) { - const newLines = []; - let newLinesLen = 0; - for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) { - newLines[newLinesLen++] = this.host.createVisibleLine(); - } - ctx.lines = ctx.lines.concat(newLines); - } - _removeLinesAfter(ctx, removeCount) { - const removeIndex = ctx.linesLength - removeCount; - for (let i = 0; i < removeCount; i++) { - const lineDomNode = ctx.lines[removeIndex + i].getDomNode(); - if (lineDomNode) { - this.domNode.removeChild(lineDomNode); - } - } - ctx.lines.splice(removeIndex, removeCount); - } - _finishRenderingNewLines(ctx, domNodeIsEmpty, newLinesHTML, wasNew) { - const lastChild = this.domNode.lastChild; - if (domNodeIsEmpty || !lastChild) { - this.domNode.innerHTML = newLinesHTML; - } - else { - lastChild.insertAdjacentHTML('afterend', newLinesHTML); - } - let currChild = this.domNode.lastChild; - for (let i = ctx.linesLength - 1; i >= 0; i--) { - const line = ctx.lines[i]; - if (wasNew[i]) { - line.setDomNode(currChild); - currChild = currChild.previousSibling; - } - } - } - _finishRenderingInvalidLines(ctx, invalidLinesHTML, wasInvalid) { - const hugeDomNode = document.createElement('div'); - hugeDomNode.innerHTML = invalidLinesHTML; - for (let i = 0; i < ctx.linesLength; i++) { - const line = ctx.lines[i]; - if (wasInvalid[i]) { - const source = hugeDomNode.firstChild; - const lineDomNode = line.getDomNode(); - lineDomNode.parentNode.replaceChild(source, lineDomNode); - line.setDomNode(source); - } - } - } - _finishRendering(ctx, domNodeIsEmpty, deltaTop) { - const sb = ViewLayerRenderer._sb; - const linesLength = ctx.linesLength; - const lines = ctx.lines; - const rendLineNumberStart = ctx.rendLineNumberStart; - const wasNew = []; - { - sb.reset(); - let hadNewLine = false; - for (let i = 0; i < linesLength; i++) { - const line = lines[i]; - wasNew[i] = false; - const lineDomNode = line.getDomNode(); - if (lineDomNode) { - // line is not new - continue; - } - const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb); - if (!renderResult) { - // line does not need rendering - continue; - } - wasNew[i] = true; - hadNewLine = true; - } - if (hadNewLine) { - this._finishRenderingNewLines(ctx, domNodeIsEmpty, sb.build(), wasNew); - } - } - { - sb.reset(); - let hadInvalidLine = false; - const wasInvalid = []; - for (let i = 0; i < linesLength; i++) { - const line = lines[i]; - wasInvalid[i] = false; - if (wasNew[i]) { - // line was new - continue; - } - const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb); - if (!renderResult) { - // line does not need rendering - continue; - } - wasInvalid[i] = true; - hadInvalidLine = true; - } - if (hadInvalidLine) { - this._finishRenderingInvalidLines(ctx, sb.build(), wasInvalid); - } - } - } -} -ViewLayerRenderer._sb = Object(_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["createStringBuilder"])(100000); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js ***! - \*******************************************************************************/ -/*! exports provided: ViewOverlays, ViewOverlayLine, ContentViewOverlays, MarginViewOverlays */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewOverlays", function() { return ViewOverlays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewOverlayLine", function() { return ViewOverlayLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentViewOverlays", function() { return ContentViewOverlays; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarginViewOverlays", function() { return MarginViewOverlays; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _viewLayer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./viewLayer.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js"); -/* harmony import */ var _viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class ViewOverlays extends _viewPart_js__WEBPACK_IMPORTED_MODULE_3__["ViewPart"] { - constructor(context) { - super(context); - this._visibleLines = new _viewLayer_js__WEBPACK_IMPORTED_MODULE_2__["VisibleLinesCollection"](this); - this.domNode = this._visibleLines.domNode; - this._dynamicOverlays = []; - this._isFocused = false; - this.domNode.setClassName('view-overlays'); - } - shouldRender() { - if (super.shouldRender()) { - return true; - } - for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) { - const dynamicOverlay = this._dynamicOverlays[i]; - if (dynamicOverlay.shouldRender()) { - return true; - } - } - return false; - } - dispose() { - super.dispose(); - for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) { - const dynamicOverlay = this._dynamicOverlays[i]; - dynamicOverlay.dispose(); - } - this._dynamicOverlays = []; - } - getDomNode() { - return this.domNode; - } - // ---- begin IVisibleLinesHost - createVisibleLine() { - return new ViewOverlayLine(this._context.configuration, this._dynamicOverlays); - } - // ---- end IVisibleLinesHost - addDynamicOverlay(overlay) { - this._dynamicOverlays.push(overlay); - } - // ----- event handlers - onConfigurationChanged(e) { - this._visibleLines.onConfigurationChanged(e); - const startLineNumber = this._visibleLines.getStartLineNumber(); - const endLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const line = this._visibleLines.getVisibleLine(lineNumber); - line.onConfigurationChanged(e); - } - return true; - } - onFlushed(e) { - return this._visibleLines.onFlushed(e); - } - onFocusChanged(e) { - this._isFocused = e.isFocused; - return true; - } - onLinesChanged(e) { - return this._visibleLines.onLinesChanged(e); - } - onLinesDeleted(e) { - return this._visibleLines.onLinesDeleted(e); - } - onLinesInserted(e) { - return this._visibleLines.onLinesInserted(e); - } - onScrollChanged(e) { - return this._visibleLines.onScrollChanged(e) || true; - } - onTokensChanged(e) { - return this._visibleLines.onTokensChanged(e); - } - onZonesChanged(e) { - return this._visibleLines.onZonesChanged(e); - } - // ----- end event handlers - prepareRender(ctx) { - const toRender = this._dynamicOverlays.filter(overlay => overlay.shouldRender()); - for (let i = 0, len = toRender.length; i < len; i++) { - const dynamicOverlay = toRender[i]; - dynamicOverlay.prepareRender(ctx); - dynamicOverlay.onDidRender(); - } - } - render(ctx) { - // Overwriting to bypass `shouldRender` flag - this._viewOverlaysRender(ctx); - this.domNode.toggleClassName('focused', this._isFocused); - } - _viewOverlaysRender(ctx) { - this._visibleLines.renderLines(ctx.viewportData); - } -} -class ViewOverlayLine { - constructor(configuration, dynamicOverlays) { - this._configuration = configuration; - this._lineHeight = this._configuration.options.get(51 /* lineHeight */); - this._dynamicOverlays = dynamicOverlays; - this._domNode = null; - this._renderedContent = null; - } - getDomNode() { - if (!this._domNode) { - return null; - } - return this._domNode.domNode; - } - setDomNode(domNode) { - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(domNode); - } - onContentChanged() { - // Nothing - } - onTokensChanged() { - // Nothing - } - onConfigurationChanged(e) { - this._lineHeight = this._configuration.options.get(51 /* lineHeight */); - } - renderLine(lineNumber, deltaTop, viewportData, sb) { - let result = ''; - for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) { - const dynamicOverlay = this._dynamicOverlays[i]; - result += dynamicOverlay.render(viewportData.startLineNumber, lineNumber); - } - if (this._renderedContent === result) { - // No rendering needed - return false; - } - this._renderedContent = result; - sb.appendASCIIString('
    '); - sb.appendASCIIString(result); - sb.appendASCIIString('
    '); - return true; - } - layoutLine(lineNumber, deltaTop) { - if (this._domNode) { - this._domNode.setTop(deltaTop); - this._domNode.setHeight(this._lineHeight); - } - } -} -class ContentViewOverlays extends ViewOverlays { - constructor(context) { - super(context); - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._contentWidth = layoutInfo.contentWidth; - this.domNode.setHeight(0); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._contentWidth = layoutInfo.contentWidth; - return super.onConfigurationChanged(e) || true; - } - onScrollChanged(e) { - return super.onScrollChanged(e) || e.scrollWidthChanged; - } - // --- end event handlers - _viewOverlaysRender(ctx) { - super._viewOverlaysRender(ctx); - this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth)); - } -} -class MarginViewOverlays extends ViewOverlays { - constructor(context) { - super(context); - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._contentLeft = layoutInfo.contentLeft; - this.domNode.setClassName('margin-view-overlays'); - this.domNode.setWidth(1); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__["Configuration"].applyFontInfo(this.domNode, options.get(36 /* fontInfo */)); - } - onConfigurationChanged(e) { - const options = this._context.configuration.options; - _config_configuration_js__WEBPACK_IMPORTED_MODULE_1__["Configuration"].applyFontInfo(this.domNode, options.get(36 /* fontInfo */)); - const layoutInfo = options.get(117 /* layoutInfo */); - this._contentLeft = layoutInfo.contentLeft; - return super.onConfigurationChanged(e) || true; - } - onScrollChanged(e) { - return super.onScrollChanged(e) || e.scrollHeightChanged; - } - _viewOverlaysRender(ctx) { - super._viewOverlaysRender(ctx); - const height = Math.min(ctx.scrollHeight, 1000000); - this.domNode.setHeight(height); - this.domNode.setWidth(this._contentLeft); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js ***! - \***************************************************************************/ -/*! exports provided: ViewPart, PartFingerprints */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewPart", function() { return ViewPart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartFingerprints", function() { return PartFingerprints; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/viewModel/viewEventHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class ViewPart extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_1__["ViewEventHandler"] { - constructor(context) { - super(); - this._context = context; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - super.dispose(); - } -} -class PartFingerprints { - static write(target, partId) { - if (target instanceof _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["FastDomNode"]) { - target.setAttribute('data-mprt', String(partId)); - } - else { - target.setAttribute('data-mprt', String(partId)); - } - } - static read(target) { - const r = target.getAttribute('data-mprt'); - if (r === null) { - return 0 /* None */; - } - return parseInt(r, 10); - } - static collect(child, stopAt) { - let result = [], resultLen = 0; - while (child && child !== document.body) { - if (child === stopAt) { - break; - } - if (child.nodeType === child.ELEMENT_NODE) { - result[resultLen++] = this.read(child); - } - child = child.parentElement; - } - const r = new Uint8Array(resultLen); - for (let i = 0; i < resultLen; i++) { - r[i] = result[resultLen - i - 1]; - } - return r; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js ***! - \**************************************************************************************/ -/*! exports provided: ViewUserInputEvents */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewUserInputEvents", function() { return ViewUserInputEvents; }); -/* harmony import */ var _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../controller/mouseTarget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class ViewUserInputEvents { - constructor(coordinatesConverter) { - this.onKeyDown = null; - this.onKeyUp = null; - this.onContextMenu = null; - this.onMouseMove = null; - this.onMouseLeave = null; - this.onMouseDown = null; - this.onMouseUp = null; - this.onMouseDrag = null; - this.onMouseDrop = null; - this.onMouseWheel = null; - this._coordinatesConverter = coordinatesConverter; - } - emitKeyDown(e) { - if (this.onKeyDown) { - this.onKeyDown(e); - } - } - emitKeyUp(e) { - if (this.onKeyUp) { - this.onKeyUp(e); - } - } - emitContextMenu(e) { - if (this.onContextMenu) { - this.onContextMenu(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseMove(e) { - if (this.onMouseMove) { - this.onMouseMove(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseLeave(e) { - if (this.onMouseLeave) { - this.onMouseLeave(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseDown(e) { - if (this.onMouseDown) { - this.onMouseDown(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseUp(e) { - if (this.onMouseUp) { - this.onMouseUp(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseDrag(e) { - if (this.onMouseDrag) { - this.onMouseDrag(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseDrop(e) { - if (this.onMouseDrop) { - this.onMouseDrop(this._convertViewToModelMouseEvent(e)); - } - } - emitMouseWheel(e) { - if (this.onMouseWheel) { - this.onMouseWheel(e); - } - } - _convertViewToModelMouseEvent(e) { - if (e.target) { - return { - event: e.event, - target: this._convertViewToModelMouseTarget(e.target) - }; - } - return e; - } - _convertViewToModelMouseTarget(target) { - return ViewUserInputEvents.convertViewToModelMouseTarget(target, this._coordinatesConverter); - } - static convertViewToModelMouseTarget(target, coordinatesConverter) { - return new ExternalMouseTarget(target.element, target.type, target.mouseColumn, target.position ? coordinatesConverter.convertViewPositionToModelPosition(target.position) : null, target.range ? coordinatesConverter.convertViewRangeToModelRange(target.range) : null, target.detail); - } -} -class ExternalMouseTarget { - constructor(element, type, mouseColumn, position, range, detail) { - this.element = element; - this.type = type; - this.mouseColumn = mouseColumn; - this.position = position; - this.range = range; - this.detail = detail; - } - toString() { - return _controller_mouseTarget_js__WEBPACK_IMPORTED_MODULE_0__["MouseTarget"].toString(this); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js": -/*!*****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js ***! - \*****************************************************************************************************/ -/*! exports provided: ViewContentWidgets */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContentWidgets", function() { return ViewContentWidgets; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class Coordinate { - constructor(top, left) { - this.top = top; - this.left = left; - } -} -class ViewContentWidgets extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context, viewDomNode) { - super(context); - this._viewDomNode = viewDomNode; - this._widgets = {}; - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["PartFingerprints"].write(this.domNode, 1 /* ContentWidgets */); - this.domNode.setClassName('contentWidgets'); - this.domNode.setPosition('absolute'); - this.domNode.setTop(0); - this.overflowingContentWidgetsDomNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["PartFingerprints"].write(this.overflowingContentWidgetsDomNode, 2 /* OverflowingContentWidgets */); - this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets'); - } - dispose() { - super.dispose(); - this._widgets = {}; - } - // --- begin event handlers - onConfigurationChanged(e) { - const keys = Object.keys(this._widgets); - for (const widgetId of keys) { - this._widgets[widgetId].onConfigurationChanged(e); - } - return true; - } - onDecorationsChanged(e) { - // true for inline decorations that can end up relayouting text - return true; - } - onFlushed(e) { - return true; - } - onLineMappingChanged(e) { - const keys = Object.keys(this._widgets); - for (const widgetId of keys) { - this._widgets[widgetId].onLineMappingChanged(e); - } - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return true; - } - onZonesChanged(e) { - return true; - } - // ---- end view event handlers - addWidget(_widget) { - const myWidget = new Widget(this._context, this._viewDomNode, _widget); - this._widgets[myWidget.id] = myWidget; - if (myWidget.allowEditorOverflow) { - this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode); - } - else { - this.domNode.appendChild(myWidget.domNode); - } - this.setShouldRender(); - } - setWidgetPosition(widget, range, preference) { - const myWidget = this._widgets[widget.getId()]; - myWidget.setPosition(range, preference); - this.setShouldRender(); - } - removeWidget(widget) { - const widgetId = widget.getId(); - if (this._widgets.hasOwnProperty(widgetId)) { - const myWidget = this._widgets[widgetId]; - delete this._widgets[widgetId]; - const domNode = myWidget.domNode.domNode; - domNode.parentNode.removeChild(domNode); - domNode.removeAttribute('monaco-visible-content-widget'); - this.setShouldRender(); - } - } - shouldSuppressMouseDownOnWidget(widgetId) { - if (this._widgets.hasOwnProperty(widgetId)) { - return this._widgets[widgetId].suppressMouseDown; - } - return false; - } - onBeforeRender(viewportData) { - const keys = Object.keys(this._widgets); - for (const widgetId of keys) { - this._widgets[widgetId].onBeforeRender(viewportData); - } - } - prepareRender(ctx) { - const keys = Object.keys(this._widgets); - for (const widgetId of keys) { - this._widgets[widgetId].prepareRender(ctx); - } - } - render(ctx) { - const keys = Object.keys(this._widgets); - for (const widgetId of keys) { - this._widgets[widgetId].render(ctx); - } - } -} -class Widget { - constructor(context, viewDomNode, actual) { - this._context = context; - this._viewDomNode = viewDomNode; - this._actual = actual; - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(this._actual.getDomNode()); - this.id = this._actual.getId(); - this.allowEditorOverflow = this._actual.allowEditorOverflow || false; - this.suppressMouseDown = this._actual.suppressMouseDown || false; - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._fixedOverflowWidgets = options.get(30 /* fixedOverflowWidgets */); - this._contentWidth = layoutInfo.contentWidth; - this._contentLeft = layoutInfo.contentLeft; - this._lineHeight = options.get(51 /* lineHeight */); - this._range = null; - this._viewRange = null; - this._preference = []; - this._cachedDomNodeClientWidth = -1; - this._cachedDomNodeClientHeight = -1; - this._maxWidth = this._getMaxWidth(); - this._isVisible = false; - this._renderData = null; - this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute'); - this.domNode.setVisibility('hidden'); - this.domNode.setAttribute('widgetId', this.id); - this.domNode.setMaxWidth(this._maxWidth); - } - onConfigurationChanged(e) { - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - if (e.hasChanged(117 /* layoutInfo */)) { - const layoutInfo = options.get(117 /* layoutInfo */); - this._contentLeft = layoutInfo.contentLeft; - this._contentWidth = layoutInfo.contentWidth; - this._maxWidth = this._getMaxWidth(); - } - } - onLineMappingChanged(e) { - this._setPosition(this._range); - } - _setPosition(range) { - this._range = range; - this._viewRange = null; - if (this._range) { - // Do not trust that widgets give a valid position - const validModelRange = this._context.model.validateModelRange(this._range); - if (this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getStartPosition()) || this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getEndPosition())) { - this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange(validModelRange); - } - } - } - _getMaxWidth() { - return (this.allowEditorOverflow - ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth - : this._contentWidth); - } - setPosition(range, preference) { - this._setPosition(range); - this._preference = preference; - this._cachedDomNodeClientWidth = -1; - this._cachedDomNodeClientHeight = -1; - } - _layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) { - // Our visible box is split horizontally by the current line => 2 boxes - // a) the box above the line - const aboveLineTop = topLeft.top; - const heightAboveLine = aboveLineTop; - // b) the box under the line - const underLineTop = bottomLeft.top + this._lineHeight; - const heightUnderLine = ctx.viewportHeight - underLineTop; - const aboveTop = aboveLineTop - height; - const fitsAbove = (heightAboveLine >= height); - const belowTop = underLineTop; - const fitsBelow = (heightUnderLine >= height); - // And its left - let actualAboveLeft = topLeft.left; - let actualBelowLeft = bottomLeft.left; - if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) { - actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width; - } - if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) { - actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width; - } - if (actualAboveLeft < ctx.scrollLeft) { - actualAboveLeft = ctx.scrollLeft; - } - if (actualBelowLeft < ctx.scrollLeft) { - actualBelowLeft = ctx.scrollLeft; - } - return { - fitsAbove: fitsAbove, - aboveTop: aboveTop, - aboveLeft: actualAboveLeft, - fitsBelow: fitsBelow, - belowTop: belowTop, - belowLeft: actualBelowLeft, - }; - } - _layoutHorizontalSegmentInPage(windowSize, domNodePosition, left, width) { - // Initially, the limits are defined as the dom node limits - const MIN_LIMIT = Math.max(0, domNodePosition.left - width); - const MAX_LIMIT = Math.min(domNodePosition.left + domNodePosition.width + width, windowSize.width); - let absoluteLeft = domNodePosition.left + left - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollX; - if (absoluteLeft + width > MAX_LIMIT) { - const delta = absoluteLeft - (MAX_LIMIT - width); - absoluteLeft -= delta; - left -= delta; - } - if (absoluteLeft < MIN_LIMIT) { - const delta = absoluteLeft - MIN_LIMIT; - absoluteLeft -= delta; - left -= delta; - } - return [left, absoluteLeft]; - } - _layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) { - const aboveTop = topLeft.top - height; - const belowTop = bottomLeft.top + this._lineHeight; - const domNodePosition = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"](this._viewDomNode.domNode); - const absoluteAboveTop = domNodePosition.top + aboveTop - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollY; - const absoluteBelowTop = domNodePosition.top + belowTop - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["StandardWindow"].scrollY; - const windowSize = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["getClientArea"](document.body); - const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft, width); - const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft, width); - // Leave some clearance to the top/bottom - const TOP_PADDING = 22; - const BOTTOM_PADDING = 22; - const fitsAbove = (absoluteAboveTop >= TOP_PADDING); - const fitsBelow = (absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING); - if (this._fixedOverflowWidgets) { - return { - fitsAbove, - aboveTop: Math.max(absoluteAboveTop, TOP_PADDING), - aboveLeft: absoluteAboveLeft, - fitsBelow, - belowTop: absoluteBelowTop, - belowLeft: absoluteBelowLeft - }; - } - return { - fitsAbove, - aboveTop: aboveTop, - aboveLeft, - fitsBelow, - belowTop, - belowLeft - }; - } - _prepareRenderWidgetAtExactPositionOverflowing(topLeft) { - return new Coordinate(topLeft.top, topLeft.left + this._contentLeft); - } - /** - * Compute `this._topLeft` - */ - _getTopAndBottomLeft(ctx) { - if (!this._viewRange) { - return [null, null]; - } - const visibleRangesForRange = ctx.linesVisibleRangesForRange(this._viewRange, false); - if (!visibleRangesForRange || visibleRangesForRange.length === 0) { - return [null, null]; - } - let firstLine = visibleRangesForRange[0]; - let lastLine = visibleRangesForRange[0]; - for (const visibleRangesForLine of visibleRangesForRange) { - if (visibleRangesForLine.lineNumber < firstLine.lineNumber) { - firstLine = visibleRangesForLine; - } - if (visibleRangesForLine.lineNumber > lastLine.lineNumber) { - lastLine = visibleRangesForLine; - } - } - let firstLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //firstLine.Constants.MAX_SAFE_SMALL_INTEGER; - for (const visibleRange of firstLine.ranges) { - if (visibleRange.left < firstLineMinLeft) { - firstLineMinLeft = visibleRange.left; - } - } - let lastLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //lastLine.Constants.MAX_SAFE_SMALL_INTEGER; - for (const visibleRange of lastLine.ranges) { - if (visibleRange.left < lastLineMinLeft) { - lastLineMinLeft = visibleRange.left; - } - } - const topForPosition = ctx.getVerticalOffsetForLineNumber(firstLine.lineNumber) - ctx.scrollTop; - const topLeft = new Coordinate(topForPosition, firstLineMinLeft); - const topForBottomLine = ctx.getVerticalOffsetForLineNumber(lastLine.lineNumber) - ctx.scrollTop; - const bottomLeft = new Coordinate(topForBottomLine, lastLineMinLeft); - return [topLeft, bottomLeft]; - } - _prepareRenderWidget(ctx) { - const [topLeft, bottomLeft] = this._getTopAndBottomLeft(ctx); - if (!topLeft || !bottomLeft) { - return null; - } - if (this._cachedDomNodeClientWidth === -1 || this._cachedDomNodeClientHeight === -1) { - const domNode = this.domNode.domNode; - this._cachedDomNodeClientWidth = domNode.clientWidth; - this._cachedDomNodeClientHeight = domNode.clientHeight; - } - let placement; - if (this.allowEditorOverflow) { - placement = this._layoutBoxInPage(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx); - } - else { - placement = this._layoutBoxInViewport(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx); - } - // Do two passes, first for perfect fit, second picks first option - if (this._preference) { - for (let pass = 1; pass <= 2; pass++) { - for (const pref of this._preference) { - // placement - if (pref === 1 /* ABOVE */) { - if (!placement) { - // Widget outside of viewport - return null; - } - if (pass === 2 || placement.fitsAbove) { - return new Coordinate(placement.aboveTop, placement.aboveLeft); - } - } - else if (pref === 2 /* BELOW */) { - if (!placement) { - // Widget outside of viewport - return null; - } - if (pass === 2 || placement.fitsBelow) { - return new Coordinate(placement.belowTop, placement.belowLeft); - } - } - else { - if (this.allowEditorOverflow) { - return this._prepareRenderWidgetAtExactPositionOverflowing(topLeft); - } - else { - return topLeft; - } - } - } - } - } - return null; - } - /** - * On this first pass, we ensure that the content widget (if it is in the viewport) has the max width set correctly. - */ - onBeforeRender(viewportData) { - if (!this._viewRange || !this._preference) { - return; - } - if (this._viewRange.endLineNumber < viewportData.startLineNumber || this._viewRange.startLineNumber > viewportData.endLineNumber) { - // Outside of viewport - return; - } - this.domNode.setMaxWidth(this._maxWidth); - } - prepareRender(ctx) { - this._renderData = this._prepareRenderWidget(ctx); - } - render(ctx) { - if (!this._renderData) { - // This widget should be invisible - if (this._isVisible) { - this.domNode.removeAttribute('monaco-visible-content-widget'); - this._isVisible = false; - this.domNode.setVisibility('hidden'); - } - return; - } - // This widget should be visible - if (this.allowEditorOverflow) { - this.domNode.setTop(this._renderData.top); - this.domNode.setLeft(this._renderData.left); - } - else { - this.domNode.setTop(this._renderData.top + ctx.scrollTop - ctx.bigNumbersDelta); - this.domNode.setLeft(this._renderData.left); - } - if (!this._isVisible) { - this.domNode.setVisibility('inherit'); - this.domNode.setAttribute('monaco-visible-content-widget', 'true'); - this._isVisible = true; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css": -/*!******************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css ***! - \******************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./currentLineHighlight.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js": -/*!*****************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js ***! - \*****************************************************************************************************************/ -/*! exports provided: AbstractLineHighlightOverlay, CurrentLineHighlightOverlay, CurrentLineMarginHighlightOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractLineHighlightOverlay", function() { return AbstractLineHighlightOverlay; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrentLineHighlightOverlay", function() { return CurrentLineHighlightOverlay; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrentLineMarginHighlightOverlay", function() { return CurrentLineMarginHighlightOverlay; }); -/* harmony import */ var _currentLineHighlight_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./currentLineHighlight.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"); -/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -let isRenderedUsingBorder = true; -class AbstractLineHighlightOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__["DynamicViewOverlay"] { - constructor(context) { - super(); - this._context = context; - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._renderLineHighlight = options.get(77 /* renderLineHighlight */); - this._renderLineHightlightOnlyWhenFocus = options.get(78 /* renderLineHighlightOnlyWhenFocus */); - this._contentLeft = layoutInfo.contentLeft; - this._contentWidth = layoutInfo.contentWidth; - this._selectionIsEmpty = true; - this._focused = false; - this._cursorLineNumbers = []; - this._selections = []; - this._renderData = null; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - super.dispose(); - } - _readFromSelections() { - let hasChanged = false; - // Only render the first selection when using border - const renderSelections = isRenderedUsingBorder ? this._selections.slice(0, 1) : this._selections; - const cursorsLineNumbers = renderSelections.map(s => s.positionLineNumber); - cursorsLineNumbers.sort((a, b) => a - b); - if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["equals"](this._cursorLineNumbers, cursorsLineNumbers)) { - this._cursorLineNumbers = cursorsLineNumbers; - hasChanged = true; - } - const selectionIsEmpty = renderSelections.every(s => s.isEmpty()); - if (this._selectionIsEmpty !== selectionIsEmpty) { - this._selectionIsEmpty = selectionIsEmpty; - hasChanged = true; - } - return hasChanged; - } - // --- begin event handlers - onThemeChanged(e) { - return this._readFromSelections(); - } - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._renderLineHighlight = options.get(77 /* renderLineHighlight */); - this._renderLineHightlightOnlyWhenFocus = options.get(78 /* renderLineHighlightOnlyWhenFocus */); - this._contentLeft = layoutInfo.contentLeft; - this._contentWidth = layoutInfo.contentWidth; - return true; - } - onCursorStateChanged(e) { - this._selections = e.selections; - return this._readFromSelections(); - } - onFlushed(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollWidthChanged || e.scrollTopChanged; - } - onZonesChanged(e) { - return true; - } - onFocusChanged(e) { - if (!this._renderLineHightlightOnlyWhenFocus) { - return false; - } - this._focused = e.isFocused; - return true; - } - // --- end event handlers - prepareRender(ctx) { - if (!this._shouldRenderThis()) { - this._renderData = null; - return; - } - const renderedLine = this._renderOne(ctx); - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - const len = this._cursorLineNumbers.length; - let index = 0; - const renderData = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - while (index < len && this._cursorLineNumbers[index] < lineNumber) { - index++; - } - if (index < len && this._cursorLineNumbers[index] === lineNumber) { - renderData[lineIndex] = renderedLine; - } - else { - renderData[lineIndex] = ''; - } - } - this._renderData = renderData; - } - render(startLineNumber, lineNumber) { - if (!this._renderData) { - return ''; - } - const lineIndex = lineNumber - startLineNumber; - if (lineIndex >= this._renderData.length) { - return ''; - } - return this._renderData[lineIndex]; - } -} -class CurrentLineHighlightOverlay extends AbstractLineHighlightOverlay { - _renderOne(ctx) { - const className = 'current-line' + (this._shouldRenderOther() ? ' current-line-both' : ''); - return `
    `; - } - _shouldRenderThis() { - return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') - && this._selectionIsEmpty - && (!this._renderLineHightlightOnlyWhenFocus || this._focused)); - } - _shouldRenderOther() { - return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') - && (!this._renderLineHightlightOnlyWhenFocus || this._focused)); - } -} -class CurrentLineMarginHighlightOverlay extends AbstractLineHighlightOverlay { - _renderOne(ctx) { - const className = 'current-line current-line-margin' + (this._shouldRenderOther() ? ' current-line-margin-both' : ''); - return `
    `; - } - _shouldRenderThis() { - return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') - && (!this._renderLineHightlightOnlyWhenFocus || this._focused)); - } - _shouldRenderOther() { - return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') - && this._selectionIsEmpty - && (!this._renderLineHightlightOnlyWhenFocus || this._focused)); - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["registerThemingParticipant"])((theme, collector) => { - isRenderedUsingBorder = false; - const lineHighlight = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorLineHighlight"]); - if (lineHighlight) { - collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`); - collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); - } - if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorLineHighlightBorder"])) { - const lineHighlightBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorLineHighlightBorder"]); - if (lineHighlightBorder) { - isRenderedUsingBorder = true; - collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); - collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); - if (theme.type === 'hc') { - collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`); - collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`); - } - } - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css ***! - \************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./decorations.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_decorations_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js ***! - \***********************************************************************************************/ -/*! exports provided: DecorationsOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecorationsOverlay", function() { return DecorationsOverlay; }); -/* harmony import */ var _decorations_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decorations.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css"); -/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class DecorationsOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__["DynamicViewOverlay"] { - constructor(context) { - super(); - this._context = context; - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - this._renderResult = null; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - this._renderResult = null; - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - return true; - } - onDecorationsChanged(e) { - return true; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged || e.scrollWidthChanged; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - prepareRender(ctx) { - const _decorations = ctx.getDecorationsInViewport(); - // Keep only decorations with `className` - let decorations = [], decorationsLen = 0; - for (let i = 0, len = _decorations.length; i < len; i++) { - const d = _decorations[i]; - if (d.options.className) { - decorations[decorationsLen++] = d; - } - } - // Sort decorations for consistent render output - decorations = decorations.sort((a, b) => { - if (a.options.zIndex < b.options.zIndex) { - return -1; - } - if (a.options.zIndex > b.options.zIndex) { - return 1; - } - const aClassName = a.options.className; - const bClassName = b.options.className; - if (aClassName < bClassName) { - return -1; - } - if (aClassName > bClassName) { - return 1; - } - return _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingStarts(a.range, b.range); - }); - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - const output = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - output[lineIndex] = ''; - } - // Render first whole line decorations and then regular decorations - this._renderWholeLineDecorations(ctx, decorations, output); - this._renderNormalDecorations(ctx, decorations, output); - this._renderResult = output; - } - _renderWholeLineDecorations(ctx, decorations, output) { - const lineHeight = String(this._lineHeight); - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - for (let i = 0, lenI = decorations.length; i < lenI; i++) { - const d = decorations[i]; - if (!d.options.isWholeLine) { - continue; - } - const decorationOutput = ('
    '); - const startLineNumber = Math.max(d.range.startLineNumber, visibleStartLineNumber); - const endLineNumber = Math.min(d.range.endLineNumber, visibleEndLineNumber); - for (let j = startLineNumber; j <= endLineNumber; j++) { - const lineIndex = j - visibleStartLineNumber; - output[lineIndex] += decorationOutput; - } - } - } - _renderNormalDecorations(ctx, decorations, output) { - const lineHeight = String(this._lineHeight); - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - let prevClassName = null; - let prevShowIfCollapsed = false; - let prevRange = null; - for (let i = 0, lenI = decorations.length; i < lenI; i++) { - const d = decorations[i]; - if (d.options.isWholeLine) { - continue; - } - const className = d.options.className; - const showIfCollapsed = Boolean(d.options.showIfCollapsed); - let range = d.range; - if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) { - range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1)); - } - if (prevClassName === className && prevShowIfCollapsed === showIfCollapsed && _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].areIntersectingOrTouching(prevRange, range)) { - // merge into previous decoration - prevRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].plusRange(prevRange, range); - continue; - } - // flush previous decoration - if (prevClassName !== null) { - this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output); - } - prevClassName = className; - prevShowIfCollapsed = showIfCollapsed; - prevRange = range; - } - if (prevClassName !== null) { - this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output); - } - } - _renderNormalDecoration(ctx, range, className, showIfCollapsed, lineHeight, visibleStartLineNumber, output) { - const linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/ className === 'findMatch'); - if (!linesVisibleRanges) { - return; - } - for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) { - const lineVisibleRanges = linesVisibleRanges[j]; - if (lineVisibleRanges.outsideRenderedLine) { - continue; - } - const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; - if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) { - const singleVisibleRange = lineVisibleRanges.ranges[0]; - if (singleVisibleRange.width === 0) { - // collapsed range case => make the decoration visible by faking its width - lineVisibleRanges.ranges[0] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_3__["HorizontalRange"](singleVisibleRange.left, this._typicalHalfwidthCharacterWidth); - } - } - for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) { - const visibleRange = lineVisibleRanges.ranges[k]; - const decorationOutput = ('
    '); - output[lineIndex] += decorationOutput; - } - } - } - render(startLineNumber, lineNumber) { - if (!this._renderResult) { - return ''; - } - const lineIndex = lineNumber - startLineNumber; - if (lineIndex < 0 || lineIndex >= this._renderResult.length) { - return ''; - } - return this._renderResult[lineIndex]; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js": -/*!*******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js ***! - \*******************************************************************************************************/ -/*! exports provided: EditorScrollbar */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorScrollbar", function() { return EditorScrollbar; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/ui/scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class EditorScrollbar extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__["ViewPart"] { - constructor(context, linesContent, viewDomNode, overflowGuardDomNode) { - super(context); - const options = this._context.configuration.options; - const scrollbar = options.get(84 /* scrollbar */); - const mouseWheelScrollSensitivity = options.get(58 /* mouseWheelScrollSensitivity */); - const fastScrollSensitivity = options.get(28 /* fastScrollSensitivity */); - const scrollPredominantAxis = options.get(87 /* scrollPredominantAxis */); - const scrollbarOptions = { - listenOnDomNode: viewDomNode.domNode, - className: 'editor-scrollable' + ' ' + Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["getThemeTypeSelector"])(context.theme.type), - useShadows: false, - lazyRender: true, - vertical: scrollbar.vertical, - horizontal: scrollbar.horizontal, - verticalHasArrows: scrollbar.verticalHasArrows, - horizontalHasArrows: scrollbar.horizontalHasArrows, - verticalScrollbarSize: scrollbar.verticalScrollbarSize, - verticalSliderSize: scrollbar.verticalSliderSize, - horizontalScrollbarSize: scrollbar.horizontalScrollbarSize, - horizontalSliderSize: scrollbar.horizontalSliderSize, - handleMouseWheel: scrollbar.handleMouseWheel, - alwaysConsumeMouseWheel: scrollbar.alwaysConsumeMouseWheel, - arrowSize: scrollbar.arrowSize, - mouseWheelScrollSensitivity: mouseWheelScrollSensitivity, - fastScrollSensitivity: fastScrollSensitivity, - scrollPredominantAxis: scrollPredominantAxis, - }; - this.scrollbar = this._register(new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_2__["SmoothScrollableElement"](linesContent.domNode, scrollbarOptions, this._context.viewLayout.getScrollable())); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__["PartFingerprints"].write(this.scrollbar.getDomNode(), 5 /* ScrollableElement */); - this.scrollbarDomNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(this.scrollbar.getDomNode()); - this.scrollbarDomNode.setPosition('absolute'); - this._setLayout(); - // When having a zone widget that calls .focus() on one of its dom elements, - // the browser will try desperately to reveal that dom node, unexpectedly - // changing the .scrollTop of this.linesContent - const onBrowserDesperateReveal = (domNode, lookAtScrollTop, lookAtScrollLeft) => { - const newScrollPosition = {}; - if (lookAtScrollTop) { - const deltaTop = domNode.scrollTop; - if (deltaTop) { - newScrollPosition.scrollTop = this._context.viewLayout.getCurrentScrollTop() + deltaTop; - domNode.scrollTop = 0; - } - } - if (lookAtScrollLeft) { - const deltaLeft = domNode.scrollLeft; - if (deltaLeft) { - newScrollPosition.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + deltaLeft; - domNode.scrollLeft = 0; - } - } - this._context.model.setScrollPosition(newScrollPosition, 1 /* Immediate */); - }; - // I've seen this happen both on the view dom node & on the lines content dom node. - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](viewDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(viewDomNode.domNode, true, true))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](linesContent.domNode, 'scroll', (e) => onBrowserDesperateReveal(linesContent.domNode, true, false))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](overflowGuardDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(overflowGuardDomNode.domNode, true, false))); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this.scrollbarDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(this.scrollbarDomNode.domNode, true, false))); - } - dispose() { - super.dispose(); - } - _setLayout() { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this.scrollbarDomNode.setLeft(layoutInfo.contentLeft); - const minimap = options.get(56 /* minimap */); - const side = minimap.side; - if (side === 'right') { - this.scrollbarDomNode.setWidth(layoutInfo.contentWidth + layoutInfo.minimap.minimapWidth); - } - else { - this.scrollbarDomNode.setWidth(layoutInfo.contentWidth); - } - this.scrollbarDomNode.setHeight(layoutInfo.height); - } - getOverviewRulerLayoutInfo() { - return this.scrollbar.getOverviewRulerLayoutInfo(); - } - getDomNode() { - return this.scrollbarDomNode; - } - delegateVerticalScrollbarMouseDown(browserEvent) { - this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); - } - // --- begin event handlers - onConfigurationChanged(e) { - if (e.hasChanged(84 /* scrollbar */) - || e.hasChanged(58 /* mouseWheelScrollSensitivity */) - || e.hasChanged(28 /* fastScrollSensitivity */)) { - const options = this._context.configuration.options; - const scrollbar = options.get(84 /* scrollbar */); - const mouseWheelScrollSensitivity = options.get(58 /* mouseWheelScrollSensitivity */); - const fastScrollSensitivity = options.get(28 /* fastScrollSensitivity */); - const scrollPredominantAxis = options.get(87 /* scrollPredominantAxis */); - const newOpts = { - handleMouseWheel: scrollbar.handleMouseWheel, - mouseWheelScrollSensitivity: mouseWheelScrollSensitivity, - fastScrollSensitivity: fastScrollSensitivity, - scrollPredominantAxis: scrollPredominantAxis - }; - this.scrollbar.updateOptions(newOpts); - } - if (e.hasChanged(117 /* layoutInfo */)) { - this._setLayout(); - } - return true; - } - onScrollChanged(e) { - return true; - } - onThemeChanged(e) { - this.scrollbar.updateClassName('editor-scrollable' + ' ' + Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["getThemeTypeSelector"])(this._context.theme.type)); - return true; - } - // --- end event handlers - prepareRender(ctx) { - // Nothing to do - } - render(ctx) { - this.scrollbar.renderNow(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css ***! - \************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./glyphMargin.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_glyphMargin_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js ***! - \***********************************************************************************************/ -/*! exports provided: DecorationToRender, DedupOverlay, GlyphMarginOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecorationToRender", function() { return DecorationToRender; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DedupOverlay", function() { return DedupOverlay; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlyphMarginOverlay", function() { return GlyphMarginOverlay; }); -/* harmony import */ var _glyphMargin_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./glyphMargin.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"); -/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class DecorationToRender { - constructor(startLineNumber, endLineNumber, className) { - this.startLineNumber = +startLineNumber; - this.endLineNumber = +endLineNumber; - this.className = String(className); - } -} -class DedupOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_1__["DynamicViewOverlay"] { - _render(visibleStartLineNumber, visibleEndLineNumber, decorations) { - const output = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - output[lineIndex] = []; - } - if (decorations.length === 0) { - return output; - } - decorations.sort((a, b) => { - if (a.className === b.className) { - if (a.startLineNumber === b.startLineNumber) { - return a.endLineNumber - b.endLineNumber; - } - return a.startLineNumber - b.startLineNumber; - } - return (a.className < b.className ? -1 : 1); - }); - let prevClassName = null; - let prevEndLineIndex = 0; - for (let i = 0, len = decorations.length; i < len; i++) { - const d = decorations[i]; - const className = d.className; - let startLineIndex = Math.max(d.startLineNumber, visibleStartLineNumber) - visibleStartLineNumber; - const endLineIndex = Math.min(d.endLineNumber, visibleEndLineNumber) - visibleStartLineNumber; - if (prevClassName === className) { - startLineIndex = Math.max(prevEndLineIndex + 1, startLineIndex); - prevEndLineIndex = Math.max(prevEndLineIndex, endLineIndex); - } - else { - prevClassName = className; - prevEndLineIndex = endLineIndex; - } - for (let i = startLineIndex; i <= prevEndLineIndex; i++) { - output[i].push(prevClassName); - } - } - return output; - } -} -class GlyphMarginOverlay extends DedupOverlay { - constructor(context) { - super(); - this._context = context; - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._glyphMargin = options.get(42 /* glyphMargin */); - this._glyphMarginLeft = layoutInfo.glyphMarginLeft; - this._glyphMarginWidth = layoutInfo.glyphMarginWidth; - this._renderResult = null; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - this._renderResult = null; - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._glyphMargin = options.get(42 /* glyphMargin */); - this._glyphMarginLeft = layoutInfo.glyphMarginLeft; - this._glyphMarginWidth = layoutInfo.glyphMarginWidth; - return true; - } - onDecorationsChanged(e) { - return true; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - _getDecorations(ctx) { - const decorations = ctx.getDecorationsInViewport(); - let r = [], rLen = 0; - for (let i = 0, len = decorations.length; i < len; i++) { - const d = decorations[i]; - const glyphMarginClassName = d.options.glyphMarginClassName; - if (glyphMarginClassName) { - r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, glyphMarginClassName); - } - } - return r; - } - prepareRender(ctx) { - if (!this._glyphMargin) { - this._renderResult = null; - return; - } - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx)); - const lineHeight = this._lineHeight.toString(); - const left = this._glyphMarginLeft.toString(); - const width = this._glyphMarginWidth.toString(); - const common = '" style="left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;">
    '; - const output = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - const classNames = toRender[lineIndex]; - if (classNames.length === 0) { - output[lineIndex] = ''; - } - else { - output[lineIndex] = ('
    = 1) { - const leftMostVisiblePosition = ctx.visibleRangeForPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](lineNumber, 1)); - let left = leftMostVisiblePosition ? leftMostVisiblePosition.left : 0; - for (let i = 1; i <= indent; i++) { - const className = (containsActiveIndentGuide && i === activeIndentLevel ? 'cigra' : 'cigr'); - result += `
    `; - left += indentWidth; - if (left > scrollWidth || (this._maxIndentLeft > 0 && left > this._maxIndentLeft)) { - break; - } - } - } - output[lineIndex] = result; - } - this._renderResult = output; - } - render(startLineNumber, lineNumber) { - if (!this._renderResult) { - return ''; - } - const lineIndex = lineNumber - startLineNumber; - if (lineIndex < 0 || lineIndex >= this._renderResult.length) { - return ''; - } - return this._renderResult[lineIndex]; - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["registerThemingParticipant"])((theme, collector) => { - const editorIndentGuidesColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorIndentGuides"]); - if (editorIndentGuidesColor) { - collector.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${editorIndentGuidesColor} inset; }`); - } - const editorActiveIndentGuidesColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorActiveIndentGuides"]) || editorIndentGuidesColor; - if (editorActiveIndentGuidesColor) { - collector.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${editorActiveIndentGuidesColor} inset; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css ***! - \************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./lineNumbers.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_lineNumbers_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js ***! - \***********************************************************************************************/ -/*! exports provided: LineNumbersOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineNumbersOverlay", function() { return LineNumbersOverlay; }); -/* harmony import */ var _lineNumbers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lineNumbers.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class LineNumbersOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__["DynamicViewOverlay"] { - constructor(context) { - super(); - this._context = context; - this._readConfig(); - this._lastCursorModelPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](1, 1); - this._renderResult = null; - this._context.addEventHandler(this); - } - _readConfig() { - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - const lineNumbers = options.get(52 /* lineNumbers */); - this._renderLineNumbers = lineNumbers.renderType; - this._renderCustomLineNumbers = lineNumbers.renderFn; - this._renderFinalNewline = options.get(76 /* renderFinalNewline */); - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineNumbersLeft = layoutInfo.lineNumbersLeft; - this._lineNumbersWidth = layoutInfo.lineNumbersWidth; - } - dispose() { - this._context.removeEventHandler(this); - this._renderResult = null; - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - this._readConfig(); - return true; - } - onCursorStateChanged(e) { - const primaryViewPosition = e.selections[0].getPosition(); - this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition); - if (this._renderLineNumbers === 2 /* Relative */ || this._renderLineNumbers === 3 /* Interval */) { - return true; - } - return false; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - _getLineRenderLineNumber(viewLineNumber) { - const modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](viewLineNumber, 1)); - if (modelPosition.column !== 1) { - return ''; - } - const modelLineNumber = modelPosition.lineNumber; - if (this._renderCustomLineNumbers) { - return this._renderCustomLineNumbers(modelLineNumber); - } - if (this._renderLineNumbers === 2 /* Relative */) { - const diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber); - if (diff === 0) { - return '' + modelLineNumber + ''; - } - return String(diff); - } - if (this._renderLineNumbers === 3 /* Interval */) { - if (this._lastCursorModelPosition.lineNumber === modelLineNumber) { - return String(modelLineNumber); - } - if (modelLineNumber % 10 === 0) { - return String(modelLineNumber); - } - return ''; - } - return String(modelLineNumber); - } - prepareRender(ctx) { - if (this._renderLineNumbers === 0 /* Off */) { - this._renderResult = null; - return; - } - const lineHeightClassName = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isLinux"] ? (this._lineHeight % 2 === 0 ? ' lh-even' : ' lh-odd') : ''); - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - const common = '
    '; - const lineCount = this._context.model.getLineCount(); - const output = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - if (!this._renderFinalNewline) { - if (lineNumber === lineCount && this._context.model.getLineLength(lineNumber) === 0) { - // Do not render last (empty) line - output[lineIndex] = ''; - continue; - } - } - const renderLineNumber = this._getLineRenderLineNumber(lineNumber); - if (renderLineNumber) { - output[lineIndex] = (common - + renderLineNumber - + '
    '); - } - else { - output[lineIndex] = ''; - } - } - this._renderResult = output; - } - render(startLineNumber, lineNumber) { - if (!this._renderResult) { - return ''; - } - const lineIndex = lineNumber - startLineNumber; - if (lineIndex < 0 || lineIndex >= this._renderResult.length) { - return ''; - } - return this._renderResult[lineIndex]; - } -} -LineNumbersOverlay.CLASS_NAME = 'line-numbers'; -// theming -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__["registerThemingParticipant"])((theme, collector) => { - const lineNumbers = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["editorLineNumbers"]); - if (lineNumbers) { - collector.addRule(`.monaco-editor .line-numbers { color: ${lineNumbers}; }`); - } - const activeLineNumber = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["editorActiveLineNumber"]); - if (activeLineNumber) { - collector.addRule(`.monaco-editor .current-line ~ .line-numbers { color: ${activeLineNumber}; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js ***! - \***************************************************************************************/ -/*! exports provided: RangeUtil */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeUtil", function() { return RangeUtil; }); -/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class FloatHorizontalRange { - constructor(left, width) { - this.left = left; - this.width = width; - } - toString() { - return `[${this.left},${this.width}]`; - } - static compare(a, b) { - return a.left - b.left; - } -} -class RangeUtil { - static _createRange() { - if (!this._handyReadyRange) { - this._handyReadyRange = document.createRange(); - } - return this._handyReadyRange; - } - static _detachRange(range, endNode) { - // Move range out of the span node, IE doesn't like having many ranges in - // the same spot and will act badly for lines containing dashes ('-') - range.selectNodeContents(endNode); - } - static _readClientRects(startElement, startOffset, endElement, endOffset, endNode) { - const range = this._createRange(); - try { - range.setStart(startElement, startOffset); - range.setEnd(endElement, endOffset); - return range.getClientRects(); - } - catch (e) { - // This is life ... - return null; - } - finally { - this._detachRange(range, endNode); - } - } - static _mergeAdjacentRanges(ranges) { - if (ranges.length === 1) { - // There is nothing to merge - return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__["HorizontalRange"](ranges[0].left, ranges[0].width)]; - } - ranges.sort(FloatHorizontalRange.compare); - let result = [], resultLen = 0; - let prevLeft = ranges[0].left; - let prevWidth = ranges[0].width; - for (let i = 1, len = ranges.length; i < len; i++) { - const range = ranges[i]; - const myLeft = range.left; - const myWidth = range.width; - if (prevLeft + prevWidth + 0.9 /* account for browser's rounding errors*/ >= myLeft) { - prevWidth = Math.max(prevWidth, myLeft + myWidth - prevLeft); - } - else { - result[resultLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__["HorizontalRange"](prevLeft, prevWidth); - prevLeft = myLeft; - prevWidth = myWidth; - } - } - result[resultLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_0__["HorizontalRange"](prevLeft, prevWidth); - return result; - } - static _createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft) { - if (!clientRects || clientRects.length === 0) { - return null; - } - // We go through FloatHorizontalRange because it has been observed in bi-di text - // that the clientRects are not coming in sorted from the browser - const result = []; - for (let i = 0, len = clientRects.length; i < len; i++) { - const clientRect = clientRects[i]; - result[i] = new FloatHorizontalRange(Math.max(0, clientRect.left - clientRectDeltaLeft), clientRect.width); - } - return this._mergeAdjacentRanges(result); - } - static readHorizontalRanges(domNode, startChildIndex, startOffset, endChildIndex, endOffset, clientRectDeltaLeft, endNode) { - // Panic check - const min = 0; - const max = domNode.children.length - 1; - if (min > max) { - return null; - } - startChildIndex = Math.min(max, Math.max(min, startChildIndex)); - endChildIndex = Math.min(max, Math.max(min, endChildIndex)); - if (startChildIndex === endChildIndex && startOffset === endOffset && startOffset === 0) { - // We must find the position at the beginning of a - // To cover cases of empty s, aboid using a range and use the 's bounding box - const clientRects = domNode.children[startChildIndex].getClientRects(); - return this._createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft); - } - // If crossing over to a span only to select offset 0, then use the previous span's maximum offset - // Chrome is buggy and doesn't handle 0 offsets well sometimes. - if (startChildIndex !== endChildIndex) { - if (endChildIndex > 0 && endOffset === 0) { - endChildIndex--; - endOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - } - } - let startElement = domNode.children[startChildIndex].firstChild; - let endElement = domNode.children[endChildIndex].firstChild; - if (!startElement || !endElement) { - // When having an empty (without any text content), try to move to the previous - if (!startElement && startOffset === 0 && startChildIndex > 0) { - startElement = domNode.children[startChildIndex - 1].firstChild; - startOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - } - if (!endElement && endOffset === 0 && endChildIndex > 0) { - endElement = domNode.children[endChildIndex - 1].firstChild; - endOffset = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - } - } - if (!startElement || !endElement) { - return null; - } - startOffset = Math.min(startElement.textContent.length, Math.max(0, startOffset)); - endOffset = Math.min(endElement.textContent.length, Math.max(0, endOffset)); - const clientRects = this._readClientRects(startElement, startOffset, endElement, endOffset, endNode); - return this._createHorizontalRangesFromClientRects(clientRects, clientRectDeltaLeft); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js ***! - \**************************************************************************************/ -/*! exports provided: DomReadingContext, ViewLineOptions, ViewLine */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomReadingContext", function() { return DomReadingContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLineOptions", function() { return ViewLineOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLine", function() { return ViewLine; }); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rangeUtil.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/rangeUtil.js"); -/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js"); -/* harmony import */ var _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/viewLayout/lineDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js"); -/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/viewLayout/viewLineRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - -const canUseFastRenderedViewLine = (function () { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"]) { - // In VSCode we know very well when the zoom level changes - return true; - } - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isLinux"] || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] || _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isSafari"]) { - // On Linux, it appears that zooming affects char widths (in pixels), which is unexpected. - // -- - // Even though we read character widths correctly, having read them at a specific zoom level - // does not mean they are the same at the current zoom level. - // -- - // This could be improved if we ever figure out how to get an event when browsers zoom, - // but until then we have to stick with reading client rects. - // -- - // The same has been observed with Firefox on Windows7 - // -- - // The same has been oversved with Safari - return false; - } - return true; -})(); -let monospaceAssumptionsAreValid = true; -const alwaysRenderInlineSelection = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdge"]); -class DomReadingContext { - constructor(domNode, endNode) { - this._domNode = domNode; - this._clientRectDeltaLeft = 0; - this._clientRectDeltaLeftRead = false; - this.endNode = endNode; - } - get clientRectDeltaLeft() { - if (!this._clientRectDeltaLeftRead) { - this._clientRectDeltaLeftRead = true; - this._clientRectDeltaLeft = this._domNode.getBoundingClientRect().left; - } - return this._clientRectDeltaLeft; - } -} -class ViewLineOptions { - constructor(config, themeType) { - this.themeType = themeType; - const options = config.options; - const fontInfo = options.get(36 /* fontInfo */); - this.renderWhitespace = options.get(80 /* renderWhitespace */); - this.renderControlCharacters = options.get(74 /* renderControlCharacters */); - this.spaceWidth = fontInfo.spaceWidth; - this.middotWidth = fontInfo.middotWidth; - this.wsmiddotWidth = fontInfo.wsmiddotWidth; - this.useMonospaceOptimizations = (fontInfo.isMonospace - && !options.get(24 /* disableMonospaceOptimizations */)); - this.canUseHalfwidthRightwardsArrow = fontInfo.canUseHalfwidthRightwardsArrow; - this.lineHeight = options.get(51 /* lineHeight */); - this.stopRenderingLineAfter = options.get(95 /* stopRenderingLineAfter */); - this.fontLigatures = options.get(37 /* fontLigatures */); - } - equals(other) { - return (this.themeType === other.themeType - && this.renderWhitespace === other.renderWhitespace - && this.renderControlCharacters === other.renderControlCharacters - && this.spaceWidth === other.spaceWidth - && this.middotWidth === other.middotWidth - && this.wsmiddotWidth === other.wsmiddotWidth - && this.useMonospaceOptimizations === other.useMonospaceOptimizations - && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow - && this.lineHeight === other.lineHeight - && this.stopRenderingLineAfter === other.stopRenderingLineAfter - && this.fontLigatures === other.fontLigatures); - } -} -class ViewLine { - constructor(options) { - this._options = options; - this._isMaybeInvalid = true; - this._renderedViewLine = null; - } - // --- begin IVisibleLineData - getDomNode() { - if (this._renderedViewLine && this._renderedViewLine.domNode) { - return this._renderedViewLine.domNode.domNode; - } - return null; - } - setDomNode(domNode) { - if (this._renderedViewLine) { - this._renderedViewLine.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(domNode); - } - else { - throw new Error('I have no rendered view line to set the dom node to...'); - } - } - onContentChanged() { - this._isMaybeInvalid = true; - } - onTokensChanged() { - this._isMaybeInvalid = true; - } - onDecorationsChanged() { - this._isMaybeInvalid = true; - } - onOptionsChanged(newOptions) { - this._isMaybeInvalid = true; - this._options = newOptions; - } - onSelectionChanged() { - if (alwaysRenderInlineSelection || this._options.themeType === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["HIGH_CONTRAST"] || this._options.renderWhitespace === 'selection') { - this._isMaybeInvalid = true; - return true; - } - return false; - } - renderLine(lineNumber, deltaTop, viewportData, sb) { - if (this._isMaybeInvalid === false) { - // it appears that nothing relevant has changed - return false; - } - this._isMaybeInvalid = false; - const lineData = viewportData.getViewLineRenderingData(lineNumber); - const options = this._options; - const actualInlineDecorations = _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__["LineDecoration"].filter(lineData.inlineDecorations, lineNumber, lineData.minColumn, lineData.maxColumn); - // Only send selection information when needed for rendering whitespace - let selectionsOnLine = null; - if (alwaysRenderInlineSelection || options.themeType === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["HIGH_CONTRAST"] || this._options.renderWhitespace === 'selection') { - const selections = viewportData.selections; - for (const selection of selections) { - if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) { - // Selection does not intersect line - continue; - } - const startColumn = (selection.startLineNumber === lineNumber ? selection.startColumn : lineData.minColumn); - const endColumn = (selection.endLineNumber === lineNumber ? selection.endColumn : lineData.maxColumn); - if (startColumn < endColumn) { - if (options.themeType === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["HIGH_CONTRAST"] || this._options.renderWhitespace !== 'selection') { - actualInlineDecorations.push(new _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_5__["LineDecoration"](startColumn, endColumn, 'inline-selected-text', 0 /* Regular */)); - } - else { - if (!selectionsOnLine) { - selectionsOnLine = []; - } - selectionsOnLine.push(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["LineRange"](startColumn - 1, endColumn - 1)); - } - } - } - } - const renderLineInput = new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["RenderLineInput"](options.useMonospaceOptimizations, options.canUseHalfwidthRightwardsArrow, lineData.content, lineData.continuesWithWrappedLine, lineData.isBasicASCII, lineData.containsRTL, lineData.minColumn - 1, lineData.tokens, actualInlineDecorations, lineData.tabSize, lineData.startVisibleColumn, options.spaceWidth, options.middotWidth, options.wsmiddotWidth, options.stopRenderingLineAfter, options.renderWhitespace, options.renderControlCharacters, options.fontLigatures !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_8__["EditorFontLigatures"].OFF, selectionsOnLine); - if (this._renderedViewLine && this._renderedViewLine.input.equals(renderLineInput)) { - // no need to do anything, we have the same render input - return false; - } - sb.appendASCIIString('
    '); - const output = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["renderViewLine"])(renderLineInput, sb); - sb.appendASCIIString('
    '); - let renderedViewLine = null; - if (monospaceAssumptionsAreValid && canUseFastRenderedViewLine && lineData.isBasicASCII && options.useMonospaceOptimizations && output.containsForeignElements === 0 /* None */) { - if (lineData.content.length < 300 && renderLineInput.lineTokens.getCount() < 100) { - // Browser rounding errors have been observed in Chrome and IE, so using the fast - // view line only for short lines. Please test before removing the length check... - // --- - // Another rounding error has been observed on Linux in VSCode, where width - // rounding errors add up to an observable large number... - // --- - // Also see another example of rounding errors on Windows in - // https://github.com/Microsoft/vscode/issues/33178 - renderedViewLine = new FastRenderedViewLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping); - } - } - if (!renderedViewLine) { - renderedViewLine = createRenderedLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping, output.containsRTL, output.containsForeignElements); - } - this._renderedViewLine = renderedViewLine; - return true; - } - layoutLine(lineNumber, deltaTop) { - if (this._renderedViewLine && this._renderedViewLine.domNode) { - this._renderedViewLine.domNode.setTop(deltaTop); - this._renderedViewLine.domNode.setHeight(this._options.lineHeight); - } - } - // --- end IVisibleLineData - getWidth() { - if (!this._renderedViewLine) { - return 0; - } - return this._renderedViewLine.getWidth(); - } - getWidthIsFast() { - if (!this._renderedViewLine) { - return true; - } - return this._renderedViewLine.getWidthIsFast(); - } - needsMonospaceFontCheck() { - if (!this._renderedViewLine) { - return false; - } - return (this._renderedViewLine instanceof FastRenderedViewLine); - } - monospaceAssumptionsAreValid() { - if (!this._renderedViewLine) { - return monospaceAssumptionsAreValid; - } - if (this._renderedViewLine instanceof FastRenderedViewLine) { - return this._renderedViewLine.monospaceAssumptionsAreValid(); - } - return monospaceAssumptionsAreValid; - } - onMonospaceAssumptionsInvalidated() { - if (this._renderedViewLine && this._renderedViewLine instanceof FastRenderedViewLine) { - this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine(); - } - } - getVisibleRangesForRange(startColumn, endColumn, context) { - if (!this._renderedViewLine) { - return null; - } - startColumn = startColumn | 0; // @perf - endColumn = endColumn | 0; // @perf - startColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, startColumn)); - endColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, endColumn)); - const stopRenderingLineAfter = this._renderedViewLine.input.stopRenderingLineAfter | 0; // @perf - let outsideRenderedLine = false; - if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1 && endColumn > stopRenderingLineAfter + 1) { - // This range is obviously not visible - outsideRenderedLine = true; - } - if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1) { - startColumn = stopRenderingLineAfter + 1; - } - if (stopRenderingLineAfter !== -1 && endColumn > stopRenderingLineAfter + 1) { - endColumn = stopRenderingLineAfter + 1; - } - const horizontalRanges = this._renderedViewLine.getVisibleRangesForRange(startColumn, endColumn, context); - if (horizontalRanges && horizontalRanges.length > 0) { - return new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__["VisibleRanges"](outsideRenderedLine, horizontalRanges); - } - return null; - } - getColumnOfNodeOffset(lineNumber, spanNode, offset) { - if (!this._renderedViewLine) { - return 1; - } - return this._renderedViewLine.getColumnOfNodeOffset(lineNumber, spanNode, offset); - } -} -ViewLine.CLASS_NAME = 'view-line'; -/** - * A rendered line which is guaranteed to contain only regular ASCII and is rendered with a monospace font. - */ -class FastRenderedViewLine { - constructor(domNode, renderLineInput, characterMapping) { - this.domNode = domNode; - this.input = renderLineInput; - this._characterMapping = characterMapping; - this._charWidth = renderLineInput.spaceWidth; - } - getWidth() { - return this._getCharPosition(this._characterMapping.length); - } - getWidthIsFast() { - return true; - } - monospaceAssumptionsAreValid() { - if (!this.domNode) { - return monospaceAssumptionsAreValid; - } - const expectedWidth = this.getWidth(); - const actualWidth = this.domNode.domNode.firstChild.offsetWidth; - if (Math.abs(expectedWidth - actualWidth) >= 2) { - // more than 2px off - console.warn(`monospace assumptions have been violated, therefore disabling monospace optimizations!`); - monospaceAssumptionsAreValid = false; - } - return monospaceAssumptionsAreValid; - } - toSlowRenderedLine() { - return createRenderedLine(this.domNode, this.input, this._characterMapping, false, 0 /* None */); - } - getVisibleRangesForRange(startColumn, endColumn, context) { - const startPosition = this._getCharPosition(startColumn); - const endPosition = this._getCharPosition(endColumn); - return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalRange"](startPosition, endPosition - startPosition)]; - } - _getCharPosition(column) { - const charOffset = this._characterMapping.getAbsoluteOffsets(); - if (charOffset.length === 0) { - // No characters on this line - return 0; - } - return Math.round(this._charWidth * charOffset[column - 1]); - } - getColumnOfNodeOffset(lineNumber, spanNode, offset) { - const spanNodeTextContentLength = spanNode.textContent.length; - let spanIndex = -1; - while (spanNode) { - spanNode = spanNode.previousSibling; - spanIndex++; - } - const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset); - return charOffset + 1; - } -} -/** - * Every time we render a line, we save what we have rendered in an instance of this class. - */ -class RenderedViewLine { - constructor(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) { - this.domNode = domNode; - this.input = renderLineInput; - this._characterMapping = characterMapping; - this._isWhitespaceOnly = /^\s*$/.test(renderLineInput.lineContent); - this._containsForeignElements = containsForeignElements; - this._cachedWidth = -1; - this._pixelOffsetCache = null; - if (!containsRTL || this._characterMapping.length === 0 /* the line is empty */) { - this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1)); - for (let column = 0, len = this._characterMapping.length; column <= len; column++) { - this._pixelOffsetCache[column] = -1; - } - } - } - // --- Reading from the DOM methods - _getReadingTarget(myDomNode) { - return myDomNode.domNode.firstChild; - } - /** - * Width of the line in pixels - */ - getWidth() { - if (!this.domNode) { - return 0; - } - if (this._cachedWidth === -1) { - this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth; - } - return this._cachedWidth; - } - getWidthIsFast() { - if (this._cachedWidth === -1) { - return false; - } - return true; - } - /** - * Visible ranges for a model range - */ - getVisibleRangesForRange(startColumn, endColumn, context) { - if (!this.domNode) { - return null; - } - if (this._pixelOffsetCache !== null) { - // the text is LTR - const startOffset = this._readPixelOffset(this.domNode, startColumn, context); - if (startOffset === -1) { - return null; - } - const endOffset = this._readPixelOffset(this.domNode, endColumn, context); - if (endOffset === -1) { - return null; - } - return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalRange"](startOffset, endOffset - startOffset)]; - } - return this._readVisibleRangesForRange(this.domNode, startColumn, endColumn, context); - } - _readVisibleRangesForRange(domNode, startColumn, endColumn, context) { - if (startColumn === endColumn) { - const pixelOffset = this._readPixelOffset(domNode, startColumn, context); - if (pixelOffset === -1) { - return null; - } - else { - return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalRange"](pixelOffset, 0)]; - } - } - else { - return this._readRawVisibleRangesForRange(domNode, startColumn, endColumn, context); - } - } - _readPixelOffset(domNode, column, context) { - if (this._characterMapping.length === 0) { - // This line has no content - if (this._containsForeignElements === 0 /* None */) { - // We can assume the line is really empty - return 0; - } - if (this._containsForeignElements === 2 /* After */) { - // We have foreign elements after the (empty) line - return 0; - } - if (this._containsForeignElements === 1 /* Before */) { - // We have foreign elements before the (empty) line - return this.getWidth(); - } - // We have foreign elements before & after the (empty) line - const readingTarget = this._getReadingTarget(domNode); - if (readingTarget.firstChild) { - return readingTarget.firstChild.offsetWidth; - } - else { - return 0; - } - } - if (this._pixelOffsetCache !== null) { - // the text is LTR - const cachedPixelOffset = this._pixelOffsetCache[column]; - if (cachedPixelOffset !== -1) { - return cachedPixelOffset; - } - const result = this._actualReadPixelOffset(domNode, column, context); - this._pixelOffsetCache[column] = result; - return result; - } - return this._actualReadPixelOffset(domNode, column, context); - } - _actualReadPixelOffset(domNode, column, context) { - if (this._characterMapping.length === 0) { - // This line has no content - const r = _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__["RangeUtil"].readHorizontalRanges(this._getReadingTarget(domNode), 0, 0, 0, 0, context.clientRectDeltaLeft, context.endNode); - if (!r || r.length === 0) { - return -1; - } - return r[0].left; - } - if (column === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0 /* None */) { - // This branch helps in the case of whitespace only lines which have a width set - return this.getWidth(); - } - const partData = this._characterMapping.charOffsetToPartData(column - 1); - const partIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getPartIndex(partData); - const charOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getCharIndex(partData); - const r = _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__["RangeUtil"].readHorizontalRanges(this._getReadingTarget(domNode), partIndex, charOffsetInPart, partIndex, charOffsetInPart, context.clientRectDeltaLeft, context.endNode); - if (!r || r.length === 0) { - return -1; - } - const result = r[0].left; - if (this.input.isBasicASCII) { - const charOffset = this._characterMapping.getAbsoluteOffsets(); - const expectedResult = Math.round(this.input.spaceWidth * charOffset[column - 1]); - if (Math.abs(expectedResult - result) <= 1) { - return expectedResult; - } - } - return result; - } - _readRawVisibleRangesForRange(domNode, startColumn, endColumn, context) { - if (startColumn === 1 && endColumn === this._characterMapping.length) { - // This branch helps IE with bidi text & gives a performance boost to other browsers when reading visible ranges for an entire line - return [new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalRange"](0, this.getWidth())]; - } - const startPartData = this._characterMapping.charOffsetToPartData(startColumn - 1); - const startPartIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getPartIndex(startPartData); - const startCharOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getCharIndex(startPartData); - const endPartData = this._characterMapping.charOffsetToPartData(endColumn - 1); - const endPartIndex = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getPartIndex(endPartData); - const endCharOffsetInPart = _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_6__["CharacterMapping"].getCharIndex(endPartData); - return _rangeUtil_js__WEBPACK_IMPORTED_MODULE_3__["RangeUtil"].readHorizontalRanges(this._getReadingTarget(domNode), startPartIndex, startCharOffsetInPart, endPartIndex, endCharOffsetInPart, context.clientRectDeltaLeft, context.endNode); - } - /** - * Returns the column for the text found at a specific offset inside a rendered dom node - */ - getColumnOfNodeOffset(lineNumber, spanNode, offset) { - const spanNodeTextContentLength = spanNode.textContent.length; - let spanIndex = -1; - while (spanNode) { - spanNode = spanNode.previousSibling; - spanIndex++; - } - const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset); - return charOffset + 1; - } -} -class WebKitRenderedViewLine extends RenderedViewLine { - _readVisibleRangesForRange(domNode, startColumn, endColumn, context) { - const output = super._readVisibleRangesForRange(domNode, startColumn, endColumn, context); - if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) { - return output; - } - // WebKit is buggy and returns an expanded range (to contain words in some cases) - // The last client rect is enlarged (I think) - if (!this.input.containsRTL) { - // This is an attempt to patch things up - // Find position of last column - const endPixelOffset = this._readPixelOffset(domNode, endColumn, context); - if (endPixelOffset !== -1) { - const lastRange = output[output.length - 1]; - if (lastRange.left < endPixelOffset) { - // Trim down the width of the last visible range to not go after the last column's position - lastRange.width = endPixelOffset - lastRange.left; - } - } - } - return output; - } -} -const createRenderedLine = (function () { - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"]) { - return createWebKitRenderedLine; - } - return createNormalRenderedLine; -})(); -function createWebKitRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) { - return new WebKitRenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements); -} -function createNormalRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) { - return new RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./viewLines.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_viewLines_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js ***! - \***************************************************************************************/ -/*! exports provided: ViewLines */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLines", function() { return ViewLines; }); -/* harmony import */ var _viewLines_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./viewLines.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../view/viewLayer.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _viewLine_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./viewLine.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/view/renderingContext.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js"); -/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/browser/ui/mouseCursor/mouseCursor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -class LastRenderedData { - constructor() { - this._currentVisibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"](1, 1, 1, 1); - } - getCurrentVisibleRange() { - return this._currentVisibleRange; - } - setCurrentVisibleRange(currentVisibleRange) { - this._currentVisibleRange = currentVisibleRange; - } -} -class HorizontalRevealRangeRequest { - constructor(lineNumber, startColumn, endColumn, startScrollTop, stopScrollTop, scrollType) { - this.lineNumber = lineNumber; - this.startColumn = startColumn; - this.endColumn = endColumn; - this.startScrollTop = startScrollTop; - this.stopScrollTop = stopScrollTop; - this.scrollType = scrollType; - this.type = 'range'; - this.minLineNumber = lineNumber; - this.maxLineNumber = lineNumber; - } -} -class HorizontalRevealSelectionsRequest { - constructor(selections, startScrollTop, stopScrollTop, scrollType) { - this.selections = selections; - this.startScrollTop = startScrollTop; - this.stopScrollTop = stopScrollTop; - this.scrollType = scrollType; - this.type = 'selections'; - let minLineNumber = selections[0].startLineNumber; - let maxLineNumber = selections[0].endLineNumber; - for (let i = 1, len = selections.length; i < len; i++) { - const selection = selections[i]; - minLineNumber = Math.min(minLineNumber, selection.startLineNumber); - maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber); - } - this.minLineNumber = minLineNumber; - this.maxLineNumber = maxLineNumber; - } -} -class ViewLines extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__["ViewPart"] { - constructor(context, linesContent) { - super(context); - this._linesContent = linesContent; - this._textRangeRestingSpot = document.createElement('div'); - this._visibleLines = new _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_4__["VisibleLinesCollection"](this); - this.domNode = this._visibleLines.domNode; - const conf = this._context.configuration; - const options = this._context.configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - const wrappingInfo = options.get(118 /* wrappingInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - this._isViewportWrapping = wrappingInfo.isViewportWrapping; - this._revealHorizontalRightPadding = options.get(81 /* revealHorizontalRightPadding */); - this._cursorSurroundingLines = options.get(20 /* cursorSurroundingLines */); - this._cursorSurroundingLinesStyle = options.get(21 /* cursorSurroundingLinesStyle */); - this._canUseLayerHinting = !options.get(23 /* disableLayerHinting */); - this._viewLineOptions = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["ViewLineOptions"](conf, this._context.theme.type); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_5__["PartFingerprints"].write(this.domNode, 7 /* ViewLines */); - this.domNode.setClassName(`view-lines ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_10__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]}`); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__["Configuration"].applyFontInfo(this.domNode, fontInfo); - // --- width & height - this._maxLineWidth = 0; - this._asyncUpdateLineWidths = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["RunOnceScheduler"](() => { - this._updateLineWidthsSlow(); - }, 200); - this._asyncCheckMonospaceFontAssumptions = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["RunOnceScheduler"](() => { - this._checkMonospaceFontAssumptions(); - }, 2000); - this._lastRenderedData = new LastRenderedData(); - this._horizontalRevealRequest = null; - } - dispose() { - this._asyncUpdateLineWidths.dispose(); - this._asyncCheckMonospaceFontAssumptions.dispose(); - super.dispose(); - } - getDomNode() { - return this.domNode; - } - // ---- begin IVisibleLinesHost - createVisibleLine() { - return new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["ViewLine"](this._viewLineOptions); - } - // ---- end IVisibleLinesHost - // ---- begin view event handlers - onConfigurationChanged(e) { - this._visibleLines.onConfigurationChanged(e); - if (e.hasChanged(118 /* wrappingInfo */)) { - this._maxLineWidth = 0; - } - const options = this._context.configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - const wrappingInfo = options.get(118 /* wrappingInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - this._isViewportWrapping = wrappingInfo.isViewportWrapping; - this._revealHorizontalRightPadding = options.get(81 /* revealHorizontalRightPadding */); - this._cursorSurroundingLines = options.get(20 /* cursorSurroundingLines */); - this._cursorSurroundingLinesStyle = options.get(21 /* cursorSurroundingLinesStyle */); - this._canUseLayerHinting = !options.get(23 /* disableLayerHinting */); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__["Configuration"].applyFontInfo(this.domNode, fontInfo); - this._onOptionsMaybeChanged(); - if (e.hasChanged(117 /* layoutInfo */)) { - this._maxLineWidth = 0; - } - return true; - } - _onOptionsMaybeChanged() { - const conf = this._context.configuration; - const newViewLineOptions = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["ViewLineOptions"](conf, this._context.theme.type); - if (!this._viewLineOptions.equals(newViewLineOptions)) { - this._viewLineOptions = newViewLineOptions; - const startLineNumber = this._visibleLines.getStartLineNumber(); - const endLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const line = this._visibleLines.getVisibleLine(lineNumber); - line.onOptionsChanged(this._viewLineOptions); - } - return true; - } - return false; - } - onCursorStateChanged(e) { - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - let r = false; - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - r = this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged() || r; - } - return r; - } - onDecorationsChanged(e) { - if (true /*e.inlineDecorationsChanged*/) { - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - this._visibleLines.getVisibleLine(lineNumber).onDecorationsChanged(); - } - } - return true; - } - onFlushed(e) { - const shouldRender = this._visibleLines.onFlushed(e); - this._maxLineWidth = 0; - return shouldRender; - } - onLinesChanged(e) { - return this._visibleLines.onLinesChanged(e); - } - onLinesDeleted(e) { - return this._visibleLines.onLinesDeleted(e); - } - onLinesInserted(e) { - return this._visibleLines.onLinesInserted(e); - } - onRevealRangeRequest(e) { - // Using the future viewport here in order to handle multiple - // incoming reveal range requests that might all desire to be animated - const desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.selections, e.verticalType); - if (desiredScrollTop === -1) { - // marker to abort the reveal range request - return false; - } - // validate the new desired scroll top - let newScrollPosition = this._context.viewLayout.validateScrollPosition({ scrollTop: desiredScrollTop }); - if (e.revealHorizontal) { - if (e.range && e.range.startLineNumber !== e.range.endLineNumber) { - // Two or more lines? => scroll to base (That's how you see most of the two lines) - newScrollPosition = { - scrollTop: newScrollPosition.scrollTop, - scrollLeft: 0 - }; - } - else if (e.range) { - // We don't necessarily know the horizontal offset of this range since the line might not be in the view... - this._horizontalRevealRequest = new HorizontalRevealRangeRequest(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType); - } - else if (e.selections && e.selections.length > 0) { - this._horizontalRevealRequest = new HorizontalRevealSelectionsRequest(e.selections, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType); - } - } - else { - this._horizontalRevealRequest = null; - } - const scrollTopDelta = Math.abs(this._context.viewLayout.getCurrentScrollTop() - newScrollPosition.scrollTop); - const scrollType = (scrollTopDelta <= this._lineHeight ? 1 /* Immediate */ : e.scrollType); - this._context.model.setScrollPosition(newScrollPosition, scrollType); - return true; - } - onScrollChanged(e) { - if (this._horizontalRevealRequest && e.scrollLeftChanged) { - // cancel any outstanding horizontal reveal request if someone else scrolls horizontally. - this._horizontalRevealRequest = null; - } - if (this._horizontalRevealRequest && e.scrollTopChanged) { - const min = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop); - const max = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop); - if (e.scrollTop < min || e.scrollTop > max) { - // cancel any outstanding horizontal reveal request if someone else scrolls vertically. - this._horizontalRevealRequest = null; - } - } - this.domNode.setWidth(e.scrollWidth); - return this._visibleLines.onScrollChanged(e) || true; - } - onTokensChanged(e) { - return this._visibleLines.onTokensChanged(e); - } - onZonesChanged(e) { - this._context.model.setMaxLineWidth(this._maxLineWidth); - return this._visibleLines.onZonesChanged(e); - } - onThemeChanged(e) { - return this._onOptionsMaybeChanged(); - } - // ---- end view event handlers - // ----------- HELPERS FOR OTHERS - getPositionFromDOMInfo(spanNode, offset) { - const viewLineDomNode = this._getViewLineDomNode(spanNode); - if (viewLineDomNode === null) { - // Couldn't find view line node - return null; - } - const lineNumber = this._getLineNumberFor(viewLineDomNode); - if (lineNumber === -1) { - // Couldn't find view line node - return null; - } - if (lineNumber < 1 || lineNumber > this._context.model.getLineCount()) { - // lineNumber is outside range - return null; - } - if (this._context.model.getLineMaxColumn(lineNumber) === 1) { - // Line is empty - return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"](lineNumber, 1); - } - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) { - // Couldn't find line - return null; - } - let column = this._visibleLines.getVisibleLine(lineNumber).getColumnOfNodeOffset(lineNumber, spanNode, offset); - const minColumn = this._context.model.getLineMinColumn(lineNumber); - if (column < minColumn) { - column = minColumn; - } - return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"](lineNumber, column); - } - _getViewLineDomNode(node) { - while (node && node.nodeType === 1) { - if (node.className === _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["ViewLine"].CLASS_NAME) { - return node; - } - node = node.parentElement; - } - return null; - } - /** - * @returns the line number of this view line dom node. - */ - _getLineNumberFor(domNode) { - const startLineNumber = this._visibleLines.getStartLineNumber(); - const endLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const line = this._visibleLines.getVisibleLine(lineNumber); - if (domNode === line.getDomNode()) { - return lineNumber; - } - } - return -1; - } - getLineWidth(lineNumber) { - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) { - // Couldn't find line - return -1; - } - return this._visibleLines.getVisibleLine(lineNumber).getWidth(); - } - linesVisibleRangesForRange(_range, includeNewLines) { - if (this.shouldRender()) { - // Cannot read from the DOM because it is dirty - // i.e. the model & the dom are out of sync, so I'd be reading something stale - return null; - } - const originalEndLineNumber = _range.endLineNumber; - const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].intersectRanges(_range, this._lastRenderedData.getCurrentVisibleRange()); - if (!range) { - return null; - } - let visibleRanges = [], visibleRangesLen = 0; - const domReadingContext = new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["DomReadingContext"](this.domNode.domNode, this._textRangeRestingSpot); - let nextLineModelLineNumber = 0; - if (includeNewLines) { - nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"](range.startLineNumber, 1)).lineNumber; - } - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) { - if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) { - continue; - } - const startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1; - const endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.model.getLineMaxColumn(lineNumber); - const visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, domReadingContext); - if (!visibleRangesForLine) { - continue; - } - if (includeNewLines && lineNumber < originalEndLineNumber) { - const currentLineModelLineNumber = nextLineModelLineNumber; - nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"](lineNumber + 1, 1)).lineNumber; - if (currentLineModelLineNumber !== nextLineModelLineNumber) { - visibleRangesForLine.ranges[visibleRangesForLine.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth; - } - } - visibleRanges[visibleRangesLen++] = new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__["LineVisibleRanges"](visibleRangesForLine.outsideRenderedLine, lineNumber, visibleRangesForLine.ranges); - } - if (visibleRangesLen === 0) { - return null; - } - return visibleRanges; - } - _visibleRangesForLineRange(lineNumber, startColumn, endColumn) { - if (this.shouldRender()) { - // Cannot read from the DOM because it is dirty - // i.e. the model & the dom are out of sync, so I'd be reading something stale - return null; - } - if (lineNumber < this._visibleLines.getStartLineNumber() || lineNumber > this._visibleLines.getEndLineNumber()) { - return null; - } - return this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, new _viewLine_js__WEBPACK_IMPORTED_MODULE_6__["DomReadingContext"](this.domNode.domNode, this._textRangeRestingSpot)); - } - visibleRangeForPosition(position) { - const visibleRanges = this._visibleRangesForLineRange(position.lineNumber, position.column, position.column); - if (!visibleRanges) { - return null; - } - return new _common_view_renderingContext_js__WEBPACK_IMPORTED_MODULE_9__["HorizontalPosition"](visibleRanges.outsideRenderedLine, visibleRanges.ranges[0].left); - } - // --- implementation - updateLineWidths() { - this._updateLineWidths(false); - } - /** - * Updates the max line width if it is fast to compute. - * Returns true if all lines were taken into account. - * Returns false if some lines need to be reevaluated (in a slow fashion). - */ - _updateLineWidthsFast() { - return this._updateLineWidths(true); - } - _updateLineWidthsSlow() { - this._updateLineWidths(false); - } - _updateLineWidths(fast) { - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - let localMaxLineWidth = 1; - let allWidthsComputed = true; - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - const visibleLine = this._visibleLines.getVisibleLine(lineNumber); - if (fast && !visibleLine.getWidthIsFast()) { - // Cannot compute width in a fast way for this line - allWidthsComputed = false; - continue; - } - localMaxLineWidth = Math.max(localMaxLineWidth, visibleLine.getWidth()); - } - if (allWidthsComputed && rendStartLineNumber === 1 && rendEndLineNumber === this._context.model.getLineCount()) { - // we know the max line width for all the lines - this._maxLineWidth = 0; - } - this._ensureMaxLineWidth(localMaxLineWidth); - return allWidthsComputed; - } - _checkMonospaceFontAssumptions() { - // Problems with monospace assumptions are more apparent for longer lines, - // as small rounding errors start to sum up, so we will select the longest - // line for a closer inspection - let longestLineNumber = -1; - let longestWidth = -1; - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - const visibleLine = this._visibleLines.getVisibleLine(lineNumber); - if (visibleLine.needsMonospaceFontCheck()) { - const lineWidth = visibleLine.getWidth(); - if (lineWidth > longestWidth) { - longestWidth = lineWidth; - longestLineNumber = lineNumber; - } - } - } - if (longestLineNumber === -1) { - return; - } - if (!this._visibleLines.getVisibleLine(longestLineNumber).monospaceAssumptionsAreValid()) { - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - const visibleLine = this._visibleLines.getVisibleLine(lineNumber); - visibleLine.onMonospaceAssumptionsInvalidated(); - } - } - } - prepareRender() { - throw new Error('Not supported'); - } - render() { - throw new Error('Not supported'); - } - renderText(viewportData) { - // (1) render lines - ensures lines are in the DOM - this._visibleLines.renderLines(viewportData); - this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange); - this.domNode.setWidth(this._context.viewLayout.getScrollWidth()); - this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000)); - // (2) compute horizontal scroll position: - // - this must happen after the lines are in the DOM since it might need a line that rendered just now - // - it might change `scrollWidth` and `scrollLeft` - if (this._horizontalRevealRequest) { - const horizontalRevealRequest = this._horizontalRevealRequest; - // Check that we have the line that contains the horizontal range in the viewport - if (viewportData.startLineNumber <= horizontalRevealRequest.minLineNumber && horizontalRevealRequest.maxLineNumber <= viewportData.endLineNumber) { - this._horizontalRevealRequest = null; - // allow `visibleRangesForRange2` to work - this.onDidRender(); - // compute new scroll position - const newScrollLeft = this._computeScrollLeftToReveal(horizontalRevealRequest); - if (newScrollLeft) { - if (!this._isViewportWrapping) { - // ensure `scrollWidth` is large enough - this._ensureMaxLineWidth(newScrollLeft.maxHorizontalOffset); - } - // set `scrollLeft` - this._context.model.setScrollPosition({ - scrollLeft: newScrollLeft.scrollLeft - }, horizontalRevealRequest.scrollType); - } - } - } - // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small) - if (!this._updateLineWidthsFast()) { - // Computing the width of some lines would be slow => delay it - this._asyncUpdateLineWidths.schedule(); - } - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isLinux"] && !this._asyncCheckMonospaceFontAssumptions.isScheduled()) { - const rendStartLineNumber = this._visibleLines.getStartLineNumber(); - const rendEndLineNumber = this._visibleLines.getEndLineNumber(); - for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) { - const visibleLine = this._visibleLines.getVisibleLine(lineNumber); - if (visibleLine.needsMonospaceFontCheck()) { - this._asyncCheckMonospaceFontAssumptions.schedule(); - break; - } - } - } - // (3) handle scrolling - this._linesContent.setLayerHinting(this._canUseLayerHinting); - this._linesContent.setContain('strict'); - const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta; - this._linesContent.setTop(-adjustedScrollTop); - this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft()); - } - // --- width - _ensureMaxLineWidth(lineWidth) { - const iLineWidth = Math.ceil(lineWidth); - if (this._maxLineWidth < iLineWidth) { - this._maxLineWidth = iLineWidth; - this._context.model.setMaxLineWidth(this._maxLineWidth); - } - } - _computeScrollTopToRevealRange(viewport, source, range, selections, verticalType) { - const viewportStartY = viewport.top; - const viewportHeight = viewport.height; - const viewportEndY = viewportStartY + viewportHeight; - let boxIsSingleRange; - let boxStartY; - let boxEndY; - // Have a box that includes one extra line height (for the horizontal scrollbar) - if (selections && selections.length > 0) { - let minLineNumber = selections[0].startLineNumber; - let maxLineNumber = selections[0].endLineNumber; - for (let i = 1, len = selections.length; i < len; i++) { - const selection = selections[i]; - minLineNumber = Math.min(minLineNumber, selection.startLineNumber); - maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber); - } - boxIsSingleRange = false; - boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(minLineNumber); - boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(maxLineNumber) + this._lineHeight; - } - else if (range) { - boxIsSingleRange = true; - boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); - boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; - } - else { - return -1; - } - const shouldIgnoreScrollOff = source === 'mouse' && this._cursorSurroundingLinesStyle === 'default'; - if (!shouldIgnoreScrollOff) { - const context = Math.min((viewportHeight / this._lineHeight) / 2, this._cursorSurroundingLines); - boxStartY -= context * this._lineHeight; - boxEndY += Math.max(0, (context - 1)) * this._lineHeight; - } - if (verticalType === 0 /* Simple */ || verticalType === 4 /* Bottom */) { - // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom - boxEndY += this._lineHeight; - } - let newScrollTop; - if (boxEndY - boxStartY > viewportHeight) { - // the box is larger than the viewport ... scroll to its top - if (!boxIsSingleRange) { - // do not reveal multiple cursors if there are more than fit the viewport - return -1; - } - newScrollTop = boxStartY; - } - else if (verticalType === 5 /* NearTop */ || verticalType === 6 /* NearTopIfOutsideViewport */) { - if (verticalType === 6 /* NearTopIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { - // Box is already in the viewport... do nothing - newScrollTop = viewportStartY; - } - else { - // We want a gap that is 20% of the viewport, but with a minimum of 5 lines - const desiredGapAbove = Math.max(5 * this._lineHeight, viewportHeight * 0.2); - // Try to scroll just above the box with the desired gap - const desiredScrollTop = boxStartY - desiredGapAbove; - // But ensure that the box is not pushed out of viewport - const minScrollTop = boxEndY - viewportHeight; - newScrollTop = Math.max(minScrollTop, desiredScrollTop); - } - } - else if (verticalType === 1 /* Center */ || verticalType === 2 /* CenterIfOutsideViewport */) { - if (verticalType === 2 /* CenterIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { - // Box is already in the viewport... do nothing - newScrollTop = viewportStartY; - } - else { - // Box is outside the viewport... center it - const boxMiddleY = (boxStartY + boxEndY) / 2; - newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2); - } - } - else { - newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === 3 /* Top */, verticalType === 4 /* Bottom */); - } - return newScrollTop; - } - _computeScrollLeftToReveal(horizontalRevealRequest) { - const viewport = this._context.viewLayout.getCurrentViewport(); - const viewportStartX = viewport.left; - const viewportEndX = viewportStartX + viewport.width; - let boxStartX = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - let boxEndX = 0; - if (horizontalRevealRequest.type === 'range') { - const visibleRanges = this._visibleRangesForLineRange(horizontalRevealRequest.lineNumber, horizontalRevealRequest.startColumn, horizontalRevealRequest.endColumn); - if (!visibleRanges) { - return null; - } - for (const visibleRange of visibleRanges.ranges) { - boxStartX = Math.min(boxStartX, visibleRange.left); - boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width); - } - } - else { - for (const selection of horizontalRevealRequest.selections) { - if (selection.startLineNumber !== selection.endLineNumber) { - return null; - } - const visibleRanges = this._visibleRangesForLineRange(selection.startLineNumber, selection.startColumn, selection.endColumn); - if (!visibleRanges) { - return null; - } - for (const visibleRange of visibleRanges.ranges) { - boxStartX = Math.min(boxStartX, visibleRange.left); - boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width); - } - } - } - boxStartX = Math.max(0, boxStartX - ViewLines.HORIZONTAL_EXTRA_PX); - boxEndX += this._revealHorizontalRightPadding; - if (horizontalRevealRequest.type === 'selections' && boxEndX - boxStartX > viewport.width) { - return null; - } - const newScrollLeft = this._computeMinimumScrolling(viewportStartX, viewportEndX, boxStartX, boxEndX); - return { - scrollLeft: newScrollLeft, - maxHorizontalOffset: boxEndX - }; - } - _computeMinimumScrolling(viewportStart, viewportEnd, boxStart, boxEnd, revealAtStart, revealAtEnd) { - viewportStart = viewportStart | 0; - viewportEnd = viewportEnd | 0; - boxStart = boxStart | 0; - boxEnd = boxEnd | 0; - revealAtStart = !!revealAtStart; - revealAtEnd = !!revealAtEnd; - const viewportLength = viewportEnd - viewportStart; - const boxLength = boxEnd - boxStart; - if (boxLength < viewportLength) { - // The box would fit in the viewport - if (revealAtStart) { - return boxStart; - } - if (revealAtEnd) { - return Math.max(0, boxEnd - viewportLength); - } - if (boxStart < viewportStart) { - // The box is above the viewport - return boxStart; - } - else if (boxEnd > viewportEnd) { - // The box is below the viewport - return Math.max(0, boxEnd - viewportLength); - } - } - else { - // The box would not fit in the viewport - // Reveal the beginning of the box - return boxStart; - } - return viewportStart; - } -} -/** - * Adds this amount of pixels to the right of lines (no-one wants to type near the edge of the viewport) - */ -ViewLines.HORIZONTAL_EXTRA_PX = 30; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css ***! - \**********************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./linesDecorations.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_linesDecorations_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js": -/*!*********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js ***! - \*********************************************************************************************************/ -/*! exports provided: LinesDecorationsOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinesDecorationsOverlay", function() { return LinesDecorationsOverlay; }); -/* harmony import */ var _linesDecorations_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linesDecorations.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"); -/* harmony import */ var _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../glyphMargin/glyphMargin.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class LinesDecorationsOverlay extends _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__["DedupOverlay"] { - constructor(context) { - super(); - this._context = context; - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._decorationsLeft = layoutInfo.decorationsLeft; - this._decorationsWidth = layoutInfo.decorationsWidth; - this._renderResult = null; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - this._renderResult = null; - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._decorationsLeft = layoutInfo.decorationsLeft; - this._decorationsWidth = layoutInfo.decorationsWidth; - return true; - } - onDecorationsChanged(e) { - return true; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - _getDecorations(ctx) { - const decorations = ctx.getDecorationsInViewport(); - let r = [], rLen = 0; - for (let i = 0, len = decorations.length; i < len; i++) { - const d = decorations[i]; - const linesDecorationsClassName = d.options.linesDecorationsClassName; - if (linesDecorationsClassName) { - r[rLen++] = new _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__["DecorationToRender"](d.range.startLineNumber, d.range.endLineNumber, linesDecorationsClassName); - } - const firstLineDecorationClassName = d.options.firstLineDecorationClassName; - if (firstLineDecorationClassName) { - r[rLen++] = new _glyphMargin_glyphMargin_js__WEBPACK_IMPORTED_MODULE_1__["DecorationToRender"](d.range.startLineNumber, d.range.startLineNumber, firstLineDecorationClassName); - } - } - return r; - } - prepareRender(ctx) { - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx)); - const left = this._decorationsLeft.toString(); - const width = this._decorationsWidth.toString(); - const common = '" style="left:' + left + 'px;width:' + width + 'px;">
    '; - const output = []; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - const classNames = toRender[lineIndex]; - let lineOutput = ''; - for (let i = 0, len = classNames.length; i < len; i++) { - lineOutput += '
    '; - } - output[lineIndex] = lineOutput; - } - this._renderResult = output; - } - render(startLineNumber, lineNumber) { - if (!this._renderResult) { - return ''; - } - return this._renderResult[lineNumber - startLineNumber]; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./minimap.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_minimap_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.js ***! - \***************************************************************************************/ -/*! exports provided: Minimap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Minimap", function() { return Minimap; }); -/* harmony import */ var _minimap_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimap.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../view/viewLayer.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_rgba_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/core/rgba.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js"); -/* harmony import */ var _common_viewModel_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/viewModel/minimapTokensColorTracker.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js"); -/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/viewModel/viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../base/browser/touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _minimapCharRendererFactory_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./minimapCharRendererFactory.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - -/** - * The orthogonal distance to the slider at which dragging "resets". This implements "snapping" - */ -const MOUSE_DRAG_RESET_DISTANCE = 140; -const GUTTER_DECORATION_WIDTH = 2; -class MinimapOptions { - constructor(configuration, theme, tokensColorTracker) { - const options = configuration.options; - const pixelRatio = options.get(115 /* pixelRatio */); - const layoutInfo = options.get(117 /* layoutInfo */); - const minimapLayout = layoutInfo.minimap; - const fontInfo = options.get(36 /* fontInfo */); - const minimapOpts = options.get(56 /* minimap */); - this.renderMinimap = minimapLayout.renderMinimap; - this.size = minimapOpts.size; - this.minimapHeightIsEditorHeight = minimapLayout.minimapHeightIsEditorHeight; - this.scrollBeyondLastLine = options.get(86 /* scrollBeyondLastLine */); - this.showSlider = minimapOpts.showSlider; - this.pixelRatio = pixelRatio; - this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - this.lineHeight = options.get(51 /* lineHeight */); - this.minimapLeft = minimapLayout.minimapLeft; - this.minimapWidth = minimapLayout.minimapWidth; - this.minimapHeight = layoutInfo.height; - this.canvasInnerWidth = minimapLayout.minimapCanvasInnerWidth; - this.canvasInnerHeight = minimapLayout.minimapCanvasInnerHeight; - this.canvasOuterWidth = minimapLayout.minimapCanvasOuterWidth; - this.canvasOuterHeight = minimapLayout.minimapCanvasOuterHeight; - this.isSampling = minimapLayout.minimapIsSampling; - this.editorHeight = layoutInfo.height; - this.fontScale = minimapLayout.minimapScale; - this.minimapLineHeight = minimapLayout.minimapLineHeight; - this.minimapCharWidth = 1 /* BASE_CHAR_WIDTH */ * this.fontScale; - this.charRenderer = Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_20__["once"])(() => _minimapCharRendererFactory_js__WEBPACK_IMPORTED_MODULE_18__["MinimapCharRendererFactory"].create(this.fontScale, fontInfo.fontFamily)); - this.backgroundColor = MinimapOptions._getMinimapBackground(theme, tokensColorTracker); - } - static _getMinimapBackground(theme, tokensColorTracker) { - const themeColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapBackground"]); - if (themeColor) { - return new _common_core_rgba_js__WEBPACK_IMPORTED_MODULE_11__["RGBA8"](themeColor.rgba.r, themeColor.rgba.g, themeColor.rgba.b, themeColor.rgba.a); - } - return tokensColorTracker.getColor(2 /* DefaultBackground */); - } - equals(other) { - return (this.renderMinimap === other.renderMinimap - && this.size === other.size - && this.minimapHeightIsEditorHeight === other.minimapHeightIsEditorHeight - && this.scrollBeyondLastLine === other.scrollBeyondLastLine - && this.showSlider === other.showSlider - && this.pixelRatio === other.pixelRatio - && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth - && this.lineHeight === other.lineHeight - && this.minimapLeft === other.minimapLeft - && this.minimapWidth === other.minimapWidth - && this.minimapHeight === other.minimapHeight - && this.canvasInnerWidth === other.canvasInnerWidth - && this.canvasInnerHeight === other.canvasInnerHeight - && this.canvasOuterWidth === other.canvasOuterWidth - && this.canvasOuterHeight === other.canvasOuterHeight - && this.isSampling === other.isSampling - && this.editorHeight === other.editorHeight - && this.fontScale === other.fontScale - && this.minimapLineHeight === other.minimapLineHeight - && this.minimapCharWidth === other.minimapCharWidth - && this.backgroundColor && this.backgroundColor.equals(other.backgroundColor)); - } -} -class MinimapLayout { - constructor(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber) { - this.scrollTop = scrollTop; - this.scrollHeight = scrollHeight; - this.sliderNeeded = sliderNeeded; - this._computedSliderRatio = computedSliderRatio; - this.sliderTop = sliderTop; - this.sliderHeight = sliderHeight; - this.startLineNumber = startLineNumber; - this.endLineNumber = endLineNumber; - } - /** - * Compute a desired `scrollPosition` such that the slider moves by `delta`. - */ - getDesiredScrollTopFromDelta(delta) { - const desiredSliderPosition = this.sliderTop + delta; - return Math.round(desiredSliderPosition / this._computedSliderRatio); - } - getDesiredScrollTopFromTouchLocation(pageY) { - return Math.round((pageY - this.sliderHeight / 2) / this._computedSliderRatio); - } - static create(options, viewportStartLineNumber, viewportEndLineNumber, viewportHeight, viewportContainsWhitespaceGaps, lineCount, realLineCount, scrollTop, scrollHeight, previousLayout) { - const pixelRatio = options.pixelRatio; - const minimapLineHeight = options.minimapLineHeight; - const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight); - const lineHeight = options.lineHeight; - if (options.minimapHeightIsEditorHeight) { - const logicalScrollHeight = (realLineCount * options.lineHeight - + (options.scrollBeyondLastLine ? viewportHeight - options.lineHeight : 0)); - const sliderHeight = Math.max(1, Math.floor(viewportHeight * viewportHeight / logicalScrollHeight)); - const maxMinimapSliderTop = Math.max(0, options.minimapHeight - sliderHeight); - // The slider can move from 0 to `maxMinimapSliderTop` - // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`. - const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight); - const sliderTop = (scrollTop * computedSliderRatio); - const sliderNeeded = (maxMinimapSliderTop > 0); - const maxLinesFitting = Math.floor(options.canvasInnerHeight / options.minimapLineHeight); - return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, 1, Math.min(lineCount, maxLinesFitting)); - } - // The visible line count in a viewport can change due to a number of reasons: - // a) with the same viewport width, different scroll positions can result in partial lines being visible: - // e.g. for a line height of 20, and a viewport height of 600 - // * scrollTop = 0 => visible lines are [1, 30] - // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible) - // * scrollTop = 20 => visible lines are [2, 31] - // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count) - // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible) - // We must first establish a desirable slider height. - let sliderHeight; - if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) { - // case b) from above: there are whitespace gaps in the viewport. - // In this case, the height of the slider directly reflects the visible line count. - const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; - sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); - } - else { - // The slider has a stable height - const expectedViewportLineCount = viewportHeight / lineHeight; - sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); - } - let maxMinimapSliderTop; - if (options.scrollBeyondLastLine) { - // The minimap slider, when dragged all the way down, will contain the last line at its top - maxMinimapSliderTop = (lineCount - 1) * minimapLineHeight / pixelRatio; - } - else { - // The minimap slider, when dragged all the way down, will contain the last line at its bottom - maxMinimapSliderTop = Math.max(0, lineCount * minimapLineHeight / pixelRatio - sliderHeight); - } - maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, maxMinimapSliderTop); - // The slider can move from 0 to `maxMinimapSliderTop` - // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`. - const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight); - const sliderTop = (scrollTop * computedSliderRatio); - let extraLinesAtTheBottom = 0; - if (options.scrollBeyondLastLine) { - const expectedViewportLineCount = viewportHeight / lineHeight; - extraLinesAtTheBottom = expectedViewportLineCount - 1; - } - if (minimapLinesFitting >= lineCount + extraLinesAtTheBottom) { - // All lines fit in the minimap - const startLineNumber = 1; - const endLineNumber = lineCount; - const sliderNeeded = (maxMinimapSliderTop > 0); - return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); - } - else { - let startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight)); - // Avoid flickering caused by a partial viewport start line - // by being consistent w.r.t. the previous layout decision - if (previousLayout && previousLayout.scrollHeight === scrollHeight) { - if (previousLayout.scrollTop > scrollTop) { - // Scrolling up => never increase `startLineNumber` - startLineNumber = Math.min(startLineNumber, previousLayout.startLineNumber); - } - if (previousLayout.scrollTop < scrollTop) { - // Scrolling down => never decrease `startLineNumber` - startLineNumber = Math.max(startLineNumber, previousLayout.startLineNumber); - } - } - const endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1); - return new MinimapLayout(scrollTop, scrollHeight, true, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); - } - } -} -class MinimapLine { - constructor(dy) { - this.dy = dy; - } - onContentChanged() { - this.dy = -1; - } - onTokensChanged() { - this.dy = -1; - } -} -MinimapLine.INVALID = new MinimapLine(-1); -class RenderData { - constructor(renderedLayout, imageData, lines) { - this.renderedLayout = renderedLayout; - this._imageData = imageData; - this._renderedLines = new _view_viewLayer_js__WEBPACK_IMPORTED_MODULE_7__["RenderedLinesCollection"](() => MinimapLine.INVALID); - this._renderedLines._set(renderedLayout.startLineNumber, lines); - } - /** - * Check if the current RenderData matches accurately the new desired layout and no painting is needed. - */ - linesEquals(layout) { - if (!this.scrollEquals(layout)) { - return false; - } - const tmp = this._renderedLines._get(); - const lines = tmp.lines; - for (let i = 0, len = lines.length; i < len; i++) { - if (lines[i].dy === -1) { - // This line is invalid - return false; - } - } - return true; - } - /** - * Check if the current RenderData matches the new layout's scroll position - */ - scrollEquals(layout) { - return this.renderedLayout.startLineNumber === layout.startLineNumber - && this.renderedLayout.endLineNumber === layout.endLineNumber; - } - _get() { - const tmp = this._renderedLines._get(); - return { - imageData: this._imageData, - rendLineNumberStart: tmp.rendLineNumberStart, - lines: tmp.lines - }; - } - onLinesChanged(changeFromLineNumber, changeToLineNumber) { - return this._renderedLines.onLinesChanged(changeFromLineNumber, changeToLineNumber); - } - onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) { - this._renderedLines.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber); - } - onLinesInserted(insertFromLineNumber, insertToLineNumber) { - this._renderedLines.onLinesInserted(insertFromLineNumber, insertToLineNumber); - } - onTokensChanged(ranges) { - return this._renderedLines.onTokensChanged(ranges); - } -} -/** - * Some sort of double buffering. - * - * Keeps two buffers around that will be rotated for painting. - * Always gives a buffer that is filled with the background color. - */ -class MinimapBuffers { - constructor(ctx, WIDTH, HEIGHT, background) { - this._backgroundFillData = MinimapBuffers._createBackgroundFillData(WIDTH, HEIGHT, background); - this._buffers = [ - ctx.createImageData(WIDTH, HEIGHT), - ctx.createImageData(WIDTH, HEIGHT) - ]; - this._lastUsedBuffer = 0; - } - getBuffer() { - // rotate buffers - this._lastUsedBuffer = 1 - this._lastUsedBuffer; - const result = this._buffers[this._lastUsedBuffer]; - // fill with background color - result.data.set(this._backgroundFillData); - return result; - } - static _createBackgroundFillData(WIDTH, HEIGHT, background) { - const backgroundR = background.r; - const backgroundG = background.g; - const backgroundB = background.b; - const result = new Uint8ClampedArray(WIDTH * HEIGHT * 4); - let offset = 0; - for (let i = 0; i < HEIGHT; i++) { - for (let j = 0; j < WIDTH; j++) { - result[offset] = backgroundR; - result[offset + 1] = backgroundG; - result[offset + 2] = backgroundB; - result[offset + 3] = 255; - offset += 4; - } - } - return result; - } -} -class MinimapSamplingState { - constructor(samplingRatio, minimapLines) { - this.samplingRatio = samplingRatio; - this.minimapLines = minimapLines; - } - static compute(options, viewLineCount, oldSamplingState) { - if (options.renderMinimap === 0 /* None */ || !options.isSampling) { - return [null, []]; - } - // ratio is intentionally not part of the layout to avoid the layout changing all the time - // so we need to recompute it again... - const pixelRatio = options.pixelRatio; - const lineHeight = options.lineHeight; - const scrollBeyondLastLine = options.scrollBeyondLastLine; - const { minimapLineCount } = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__["EditorLayoutInfoComputer"].computeContainedMinimapLineCount({ - viewLineCount: viewLineCount, - scrollBeyondLastLine: scrollBeyondLastLine, - height: options.editorHeight, - lineHeight: lineHeight, - pixelRatio: pixelRatio - }); - const ratio = viewLineCount / minimapLineCount; - const halfRatio = ratio / 2; - if (!oldSamplingState || oldSamplingState.minimapLines.length === 0) { - let result = []; - result[0] = 1; - if (minimapLineCount > 1) { - for (let i = 0, lastIndex = minimapLineCount - 1; i < lastIndex; i++) { - result[i] = Math.round(i * ratio + halfRatio); - } - result[minimapLineCount - 1] = viewLineCount; - } - return [new MinimapSamplingState(ratio, result), []]; - } - const oldMinimapLines = oldSamplingState.minimapLines; - const oldLength = oldMinimapLines.length; - let result = []; - let oldIndex = 0; - let oldDeltaLineCount = 0; - let minViewLineNumber = 1; - const MAX_EVENT_COUNT = 10; // generate at most 10 events, if there are more than 10 changes, just flush all previous data - let events = []; - let lastEvent = null; - for (let i = 0; i < minimapLineCount; i++) { - const fromViewLineNumber = Math.max(minViewLineNumber, Math.round(i * ratio)); - const toViewLineNumber = Math.max(fromViewLineNumber, Math.round((i + 1) * ratio)); - while (oldIndex < oldLength && oldMinimapLines[oldIndex] < fromViewLineNumber) { - if (events.length < MAX_EVENT_COUNT) { - const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount; - if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) { - lastEvent.deleteToLineNumber++; - } - else { - lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber }; - events.push(lastEvent); - } - oldDeltaLineCount--; - } - oldIndex++; - } - let selectedViewLineNumber; - if (oldIndex < oldLength && oldMinimapLines[oldIndex] <= toViewLineNumber) { - // reuse the old sampled line - selectedViewLineNumber = oldMinimapLines[oldIndex]; - oldIndex++; - } - else { - if (i === 0) { - selectedViewLineNumber = 1; - } - else if (i + 1 === minimapLineCount) { - selectedViewLineNumber = viewLineCount; - } - else { - selectedViewLineNumber = Math.round(i * ratio + halfRatio); - } - if (events.length < MAX_EVENT_COUNT) { - const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount; - if (lastEvent && lastEvent.type === 'inserted' && lastEvent._i === i - 1) { - lastEvent.insertToLineNumber++; - } - else { - lastEvent = { type: 'inserted', _i: i, insertFromLineNumber: oldMinimapLineNumber, insertToLineNumber: oldMinimapLineNumber }; - events.push(lastEvent); - } - oldDeltaLineCount++; - } - } - result[i] = selectedViewLineNumber; - minViewLineNumber = selectedViewLineNumber; - } - if (events.length < MAX_EVENT_COUNT) { - while (oldIndex < oldLength) { - const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount; - if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) { - lastEvent.deleteToLineNumber++; - } - else { - lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber }; - events.push(lastEvent); - } - oldDeltaLineCount--; - oldIndex++; - } - } - else { - // too many events, just give up - events = [{ type: 'flush' }]; - } - return [new MinimapSamplingState(ratio, result), events]; - } - modelLineToMinimapLine(lineNumber) { - return Math.min(this.minimapLines.length, Math.max(1, Math.round(lineNumber / this.samplingRatio))); - } - /** - * Will return null if the model line ranges are not intersecting with a sampled model line. - */ - modelLineRangeToMinimapLineRange(fromLineNumber, toLineNumber) { - let fromLineIndex = this.modelLineToMinimapLine(fromLineNumber) - 1; - while (fromLineIndex > 0 && this.minimapLines[fromLineIndex - 1] >= fromLineNumber) { - fromLineIndex--; - } - let toLineIndex = this.modelLineToMinimapLine(toLineNumber) - 1; - while (toLineIndex + 1 < this.minimapLines.length && this.minimapLines[toLineIndex + 1] <= toLineNumber) { - toLineIndex++; - } - if (fromLineIndex === toLineIndex) { - const sampledLineNumber = this.minimapLines[fromLineIndex]; - if (sampledLineNumber < fromLineNumber || sampledLineNumber > toLineNumber) { - // This line is not part of the sampled lines ==> nothing to do - return null; - } - } - return [fromLineIndex + 1, toLineIndex + 1]; - } - /** - * Will always return a range, even if it is not intersecting with a sampled model line. - */ - decorationLineRangeToMinimapLineRange(startLineNumber, endLineNumber) { - let minimapLineStart = this.modelLineToMinimapLine(startLineNumber); - let minimapLineEnd = this.modelLineToMinimapLine(endLineNumber); - if (startLineNumber !== endLineNumber && minimapLineEnd === minimapLineStart) { - if (minimapLineEnd === this.minimapLines.length) { - if (minimapLineStart > 1) { - minimapLineStart--; - } - } - else { - minimapLineEnd++; - } - } - return [minimapLineStart, minimapLineEnd]; - } - onLinesDeleted(e) { - // have the mapping be sticky - const deletedLineCount = e.toLineNumber - e.fromLineNumber + 1; - let changeStartIndex = this.minimapLines.length; - let changeEndIndex = 0; - for (let i = this.minimapLines.length - 1; i >= 0; i--) { - if (this.minimapLines[i] < e.fromLineNumber) { - break; - } - if (this.minimapLines[i] <= e.toLineNumber) { - // this line got deleted => move to previous available - this.minimapLines[i] = Math.max(1, e.fromLineNumber - 1); - changeStartIndex = Math.min(changeStartIndex, i); - changeEndIndex = Math.max(changeEndIndex, i); - } - else { - this.minimapLines[i] -= deletedLineCount; - } - } - return [changeStartIndex, changeEndIndex]; - } - onLinesInserted(e) { - // have the mapping be sticky - const insertedLineCount = e.toLineNumber - e.fromLineNumber + 1; - for (let i = this.minimapLines.length - 1; i >= 0; i--) { - if (this.minimapLines[i] < e.fromLineNumber) { - break; - } - this.minimapLines[i] += insertedLineCount; - } - } -} -class Minimap extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__["ViewPart"] { - constructor(context) { - super(context); - this.tokensColorTracker = _common_viewModel_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_12__["MinimapTokensColorTracker"].getInstance(); - this._selections = []; - this._minimapSelections = null; - this.options = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker); - const [samplingState,] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), null); - this._samplingState = samplingState; - this._shouldCheckSampling = false; - this._actual = new InnerMinimap(context.theme, this); - } - dispose() { - this._actual.dispose(); - super.dispose(); - } - getDomNode() { - return this._actual.getDomNode(); - } - _onOptionsMaybeChanged() { - const opts = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker); - if (this.options.equals(opts)) { - return false; - } - this.options = opts; - this._recreateLineSampling(); - this._actual.onDidChangeOptions(); - return true; - } - // ---- begin view event handlers - onConfigurationChanged(e) { - return this._onOptionsMaybeChanged(); - } - onCursorStateChanged(e) { - this._selections = e.selections; - this._minimapSelections = null; - return this._actual.onSelectionChanged(); - } - onDecorationsChanged(e) { - if (e.affectsMinimap) { - return this._actual.onDecorationsChanged(); - } - return false; - } - onFlushed(e) { - if (this._samplingState) { - this._shouldCheckSampling = true; - } - return this._actual.onFlushed(); - } - onLinesChanged(e) { - if (this._samplingState) { - const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, e.toLineNumber); - if (minimapLineRange) { - return this._actual.onLinesChanged(minimapLineRange[0], minimapLineRange[1]); - } - else { - return false; - } - } - else { - return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber); - } - } - onLinesDeleted(e) { - if (this._samplingState) { - const [changeStartIndex, changeEndIndex] = this._samplingState.onLinesDeleted(e); - if (changeStartIndex <= changeEndIndex) { - this._actual.onLinesChanged(changeStartIndex + 1, changeEndIndex + 1); - } - this._shouldCheckSampling = true; - return true; - } - else { - return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber); - } - } - onLinesInserted(e) { - if (this._samplingState) { - this._samplingState.onLinesInserted(e); - this._shouldCheckSampling = true; - return true; - } - else { - return this._actual.onLinesInserted(e.fromLineNumber, e.toLineNumber); - } - } - onScrollChanged(e) { - return this._actual.onScrollChanged(); - } - onThemeChanged(e) { - this._context.model.invalidateMinimapColorCache(); - this._actual.onThemeChanged(); - this._onOptionsMaybeChanged(); - return true; - } - onTokensChanged(e) { - if (this._samplingState) { - let ranges = []; - for (const range of e.ranges) { - const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(range.fromLineNumber, range.toLineNumber); - if (minimapLineRange) { - ranges.push({ fromLineNumber: minimapLineRange[0], toLineNumber: minimapLineRange[1] }); - } - } - if (ranges.length) { - return this._actual.onTokensChanged(ranges); - } - else { - return false; - } - } - else { - return this._actual.onTokensChanged(e.ranges); - } - } - onTokensColorsChanged(e) { - return this._actual.onTokensColorsChanged(); - } - onZonesChanged(e) { - return this._actual.onZonesChanged(); - } - // --- end event handlers - prepareRender(ctx) { - if (this._shouldCheckSampling) { - this._shouldCheckSampling = false; - this._recreateLineSampling(); - } - } - render(ctx) { - let viewportStartLineNumber = ctx.visibleRange.startLineNumber; - let viewportEndLineNumber = ctx.visibleRange.endLineNumber; - if (this._samplingState) { - viewportStartLineNumber = this._samplingState.modelLineToMinimapLine(viewportStartLineNumber); - viewportEndLineNumber = this._samplingState.modelLineToMinimapLine(viewportEndLineNumber); - } - const minimapCtx = { - viewportContainsWhitespaceGaps: (ctx.viewportData.whitespaceViewportData.length > 0), - scrollWidth: ctx.scrollWidth, - scrollHeight: ctx.scrollHeight, - viewportStartLineNumber: viewportStartLineNumber, - viewportEndLineNumber: viewportEndLineNumber, - scrollTop: ctx.scrollTop, - scrollLeft: ctx.scrollLeft, - viewportWidth: ctx.viewportWidth, - viewportHeight: ctx.viewportHeight, - }; - this._actual.render(minimapCtx); - } - //#region IMinimapModel - _recreateLineSampling() { - this._minimapSelections = null; - const wasSampling = Boolean(this._samplingState); - const [samplingState, events] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), this._samplingState); - this._samplingState = samplingState; - if (wasSampling && this._samplingState) { - // was sampling, is sampling - for (const event of events) { - switch (event.type) { - case 'deleted': - this._actual.onLinesDeleted(event.deleteFromLineNumber, event.deleteToLineNumber); - break; - case 'inserted': - this._actual.onLinesInserted(event.insertFromLineNumber, event.insertToLineNumber); - break; - case 'flush': - this._actual.onFlushed(); - break; - } - } - } - } - getLineCount() { - if (this._samplingState) { - return this._samplingState.minimapLines.length; - } - return this._context.model.getLineCount(); - } - getRealLineCount() { - return this._context.model.getLineCount(); - } - getLineContent(lineNumber) { - if (this._samplingState) { - return this._context.model.getLineContent(this._samplingState.minimapLines[lineNumber - 1]); - } - return this._context.model.getLineContent(lineNumber); - } - getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) { - if (this._samplingState) { - let result = []; - for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) { - if (needed[lineIndex]) { - result[lineIndex] = this._context.model.getViewLineData(this._samplingState.minimapLines[startLineNumber + lineIndex - 1]); - } - else { - result[lineIndex] = null; - } - } - return result; - } - return this._context.model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed).data; - } - getSelections() { - if (this._minimapSelections === null) { - if (this._samplingState) { - this._minimapSelections = []; - for (const selection of this._selections) { - const [minimapLineStart, minimapLineEnd] = this._samplingState.decorationLineRangeToMinimapLineRange(selection.startLineNumber, selection.endLineNumber); - this._minimapSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_16__["Selection"](minimapLineStart, selection.startColumn, minimapLineEnd, selection.endColumn)); - } - } - else { - this._minimapSelections = this._selections; - } - } - return this._minimapSelections; - } - getMinimapDecorationsInViewport(startLineNumber, endLineNumber) { - let visibleRange; - if (this._samplingState) { - const modelStartLineNumber = this._samplingState.minimapLines[startLineNumber - 1]; - const modelEndLineNumber = this._samplingState.minimapLines[endLineNumber - 1]; - visibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](modelStartLineNumber, 1, modelEndLineNumber, this._context.model.getLineMaxColumn(modelEndLineNumber)); - } - else { - visibleRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](startLineNumber, 1, endLineNumber, this._context.model.getLineMaxColumn(endLineNumber)); - } - const decorations = this._context.model.getDecorationsInViewport(visibleRange); - if (this._samplingState) { - let result = []; - for (const decoration of decorations) { - if (!decoration.options.minimap) { - continue; - } - const range = decoration.range; - const minimapStartLineNumber = this._samplingState.modelLineToMinimapLine(range.startLineNumber); - const minimapEndLineNumber = this._samplingState.modelLineToMinimapLine(range.endLineNumber); - result.push(new _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_13__["ViewModelDecoration"](new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](minimapStartLineNumber, range.startColumn, minimapEndLineNumber, range.endColumn), decoration.options)); - } - return result; - } - return decorations; - } - getOptions() { - return this._context.model.getTextModelOptions(); - } - revealLineNumber(lineNumber) { - if (this._samplingState) { - lineNumber = this._samplingState.minimapLines[lineNumber - 1]; - } - this._context.model.revealRange('mouse', false, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](lineNumber, 1, lineNumber, 1), 1 /* Center */, 0 /* Smooth */); - } - setScrollTop(scrollTop) { - this._context.model.setScrollPosition({ - scrollTop: scrollTop - }, 1 /* Immediate */); - } -} -class InnerMinimap extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(theme, model) { - super(); - this._renderDecorations = false; - this._gestureInProgress = false; - this._theme = theme; - this._model = model; - this._lastRenderData = null; - this._buffers = null; - this._selectionColor = this._theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapSelection"]); - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_8__["PartFingerprints"].write(this._domNode, 8 /* Minimap */); - this._domNode.setClassName(this._getMinimapDomNodeClassName()); - this._domNode.setPosition('absolute'); - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._shadow = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._shadow.setClassName('minimap-shadow-hidden'); - this._domNode.appendChild(this._shadow); - this._canvas = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('canvas')); - this._canvas.setPosition('absolute'); - this._canvas.setLeft(0); - this._domNode.appendChild(this._canvas); - this._decorationsCanvas = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('canvas')); - this._decorationsCanvas.setPosition('absolute'); - this._decorationsCanvas.setClassName('minimap-decorations-layer'); - this._decorationsCanvas.setLeft(0); - this._domNode.appendChild(this._decorationsCanvas); - this._slider = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._slider.setPosition('absolute'); - this._slider.setClassName('minimap-slider'); - this._slider.setLayerHinting(true); - this._slider.setContain('strict'); - this._domNode.appendChild(this._slider); - this._sliderHorizontal = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._sliderHorizontal.setPosition('absolute'); - this._sliderHorizontal.setClassName('minimap-slider-horizontal'); - this._slider.appendChild(this._sliderHorizontal); - this._applyLayout(); - this._mouseDownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._domNode.domNode, 'mousedown', (e) => { - e.preventDefault(); - const renderMinimap = this._model.options.renderMinimap; - if (renderMinimap === 0 /* None */) { - return; - } - if (!this._lastRenderData) { - return; - } - if (this._model.options.size !== 'proportional') { - if (e.leftButton && this._lastRenderData) { - // pretend the click occured in the center of the slider - const position = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this._slider.domNode); - const initialPosY = position.top + position.height / 2; - this._startSliderDragging(e.buttons, e.posx, initialPosY, e.posy, this._lastRenderData.renderedLayout); - } - return; - } - const minimapLineHeight = this._model.options.minimapLineHeight; - const internalOffsetY = (this._model.options.canvasInnerHeight / this._model.options.canvasOuterHeight) * e.browserEvent.offsetY; - const lineIndex = Math.floor(internalOffsetY / minimapLineHeight); - let lineNumber = lineIndex + this._lastRenderData.renderedLayout.startLineNumber; - lineNumber = Math.min(lineNumber, this._model.getLineCount()); - this._model.revealLineNumber(lineNumber); - }); - this._sliderMouseMoveMonitor = new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["GlobalMouseMoveMonitor"](); - this._sliderMouseDownListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._slider.domNode, 'mousedown', (e) => { - e.preventDefault(); - e.stopPropagation(); - if (e.leftButton && this._lastRenderData) { - this._startSliderDragging(e.buttons, e.posx, e.posy, e.posy, this._lastRenderData.renderedLayout); - } - }); - this._gestureDisposable = _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__["Gesture"].addTarget(this._domNode.domNode); - this._sliderTouchStartListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__["EventType"].Start, (e) => { - e.preventDefault(); - e.stopPropagation(); - if (this._lastRenderData) { - this._slider.toggleClassName('active', true); - this._gestureInProgress = true; - this.scrollDueToTouchEvent(e); - } - }, { passive: false }); - this._sliderTouchMoveListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__["EventType"].Change, (e) => { - e.preventDefault(); - e.stopPropagation(); - if (this._lastRenderData && this._gestureInProgress) { - this.scrollDueToTouchEvent(e); - } - }, { passive: false }); - this._sliderTouchEndListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._domNode.domNode, _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_17__["EventType"].End, (e) => { - e.preventDefault(); - e.stopPropagation(); - this._gestureInProgress = false; - this._slider.toggleClassName('active', false); - }); - } - _startSliderDragging(initialButtons, initialPosX, initialPosY, posy, initialSliderState) { - this._slider.toggleClassName('active', true); - const handleMouseMove = (posy, posx) => { - const mouseOrthogonalDelta = Math.abs(posx - initialPosX); - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_5__["isWindows"] && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the scrollbar => reset dragging - this._model.setScrollTop(initialSliderState.scrollTop); - return; - } - const mouseDelta = posy - initialPosY; - this._model.setScrollTop(initialSliderState.getDesiredScrollTopFromDelta(mouseDelta)); - }; - if (posy !== initialPosY) { - handleMouseMove(posy, initialPosX); - } - this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode, initialButtons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["standardMouseMoveMerger"], (mouseMoveData) => handleMouseMove(mouseMoveData.posy, mouseMoveData.posx), () => { - this._slider.toggleClassName('active', false); - }); - } - scrollDueToTouchEvent(touch) { - const startY = this._domNode.domNode.getBoundingClientRect().top; - const scrollTop = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(touch.pageY - startY); - this._model.setScrollTop(scrollTop); - } - dispose() { - this._mouseDownListener.dispose(); - this._sliderMouseMoveMonitor.dispose(); - this._sliderMouseDownListener.dispose(); - this._gestureDisposable.dispose(); - this._sliderTouchStartListener.dispose(); - this._sliderTouchMoveListener.dispose(); - this._sliderTouchEndListener.dispose(); - super.dispose(); - } - _getMinimapDomNodeClassName() { - if (this._model.options.showSlider === 'always') { - return 'minimap slider-always'; - } - return 'minimap slider-mouseover'; - } - getDomNode() { - return this._domNode; - } - _applyLayout() { - this._domNode.setLeft(this._model.options.minimapLeft); - this._domNode.setWidth(this._model.options.minimapWidth); - this._domNode.setHeight(this._model.options.minimapHeight); - this._shadow.setHeight(this._model.options.minimapHeight); - this._canvas.setWidth(this._model.options.canvasOuterWidth); - this._canvas.setHeight(this._model.options.canvasOuterHeight); - this._canvas.domNode.width = this._model.options.canvasInnerWidth; - this._canvas.domNode.height = this._model.options.canvasInnerHeight; - this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth); - this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight); - this._decorationsCanvas.domNode.width = this._model.options.canvasInnerWidth; - this._decorationsCanvas.domNode.height = this._model.options.canvasInnerHeight; - this._slider.setWidth(this._model.options.minimapWidth); - } - _getBuffer() { - if (!this._buffers) { - if (this._model.options.canvasInnerWidth > 0 && this._model.options.canvasInnerHeight > 0) { - this._buffers = new MinimapBuffers(this._canvas.domNode.getContext('2d'), this._model.options.canvasInnerWidth, this._model.options.canvasInnerHeight, this._model.options.backgroundColor); - } - } - return this._buffers ? this._buffers.getBuffer() : null; - } - // ---- begin view event handlers - onDidChangeOptions() { - this._lastRenderData = null; - this._buffers = null; - this._applyLayout(); - this._domNode.setClassName(this._getMinimapDomNodeClassName()); - } - onSelectionChanged() { - this._renderDecorations = true; - return true; - } - onDecorationsChanged() { - this._renderDecorations = true; - return true; - } - onFlushed() { - this._lastRenderData = null; - return true; - } - onLinesChanged(changeFromLineNumber, changeToLineNumber) { - if (this._lastRenderData) { - return this._lastRenderData.onLinesChanged(changeFromLineNumber, changeToLineNumber); - } - return false; - } - onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) { - if (this._lastRenderData) { - this._lastRenderData.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber); - } - return true; - } - onLinesInserted(insertFromLineNumber, insertToLineNumber) { - if (this._lastRenderData) { - this._lastRenderData.onLinesInserted(insertFromLineNumber, insertToLineNumber); - } - return true; - } - onScrollChanged() { - this._renderDecorations = true; - return true; - } - onThemeChanged() { - this._selectionColor = this._theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapSelection"]); - this._renderDecorations = true; - return true; - } - onTokensChanged(ranges) { - if (this._lastRenderData) { - return this._lastRenderData.onTokensChanged(ranges); - } - return false; - } - onTokensColorsChanged() { - this._lastRenderData = null; - this._buffers = null; - return true; - } - onZonesChanged() { - this._lastRenderData = null; - return true; - } - // --- end event handlers - render(renderingCtx) { - const renderMinimap = this._model.options.renderMinimap; - if (renderMinimap === 0 /* None */) { - this._shadow.setClassName('minimap-shadow-hidden'); - this._sliderHorizontal.setWidth(0); - this._sliderHorizontal.setHeight(0); - return; - } - if (renderingCtx.scrollLeft + renderingCtx.viewportWidth >= renderingCtx.scrollWidth) { - this._shadow.setClassName('minimap-shadow-hidden'); - } - else { - this._shadow.setClassName('minimap-shadow-visible'); - } - const layout = MinimapLayout.create(this._model.options, renderingCtx.viewportStartLineNumber, renderingCtx.viewportEndLineNumber, renderingCtx.viewportHeight, renderingCtx.viewportContainsWhitespaceGaps, this._model.getLineCount(), this._model.getRealLineCount(), renderingCtx.scrollTop, renderingCtx.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null); - this._slider.setDisplay(layout.sliderNeeded ? 'block' : 'none'); - this._slider.setTop(layout.sliderTop); - this._slider.setHeight(layout.sliderHeight); - // Compute horizontal slider coordinates - const scrollLeftChars = renderingCtx.scrollLeft / this._model.options.typicalHalfwidthCharacterWidth; - const horizontalSliderLeft = Math.min(this._model.options.minimapWidth, Math.round(scrollLeftChars * this._model.options.minimapCharWidth / this._model.options.pixelRatio)); - this._sliderHorizontal.setLeft(horizontalSliderLeft); - this._sliderHorizontal.setWidth(this._model.options.minimapWidth - horizontalSliderLeft); - this._sliderHorizontal.setTop(0); - this._sliderHorizontal.setHeight(layout.sliderHeight); - this.renderDecorations(layout); - this._lastRenderData = this.renderLines(layout); - } - renderDecorations(layout) { - if (this._renderDecorations) { - this._renderDecorations = false; - const selections = this._model.getSelections(); - const decorations = this._model.getMinimapDecorationsInViewport(layout.startLineNumber, layout.endLineNumber); - const { canvasInnerWidth, canvasInnerHeight } = this._model.options; - const lineHeight = this._model.options.minimapLineHeight; - const characterWidth = this._model.options.minimapCharWidth; - const tabSize = this._model.getOptions().tabSize; - const canvasContext = this._decorationsCanvas.domNode.getContext('2d'); - canvasContext.clearRect(0, 0, canvasInnerWidth, canvasInnerHeight); - const lineOffsetMap = new Map(); - for (let i = 0; i < selections.length; i++) { - const selection = selections[i]; - for (let line = selection.startLineNumber; line <= selection.endLineNumber; line++) { - this.renderDecorationOnLine(canvasContext, lineOffsetMap, selection, this._selectionColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth); - } - } - // Loop over decorations, ignoring those that don't have the minimap property set and rendering rectangles for each line the decoration spans - for (let i = 0; i < decorations.length; i++) { - const decoration = decorations[i]; - if (!decoration.options.minimap) { - continue; - } - const decorationColor = decoration.options.minimap.getColor(this._theme); - for (let line = decoration.range.startLineNumber; line <= decoration.range.endLineNumber; line++) { - switch (decoration.options.minimap.position) { - case _common_model_js__WEBPACK_IMPORTED_MODULE_19__["MinimapPosition"].Inline: - this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration.range, decorationColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth); - continue; - case _common_model_js__WEBPACK_IMPORTED_MODULE_19__["MinimapPosition"].Gutter: - const y = (line - layout.startLineNumber) * lineHeight; - const x = 2; - this.renderDecoration(canvasContext, decorationColor, x, y, GUTTER_DECORATION_WIDTH, lineHeight); - continue; - } - } - } - } - } - renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout, lineNumber, height, lineHeight, tabSize, charWidth) { - const y = (lineNumber - layout.startLineNumber) * lineHeight; - // Skip rendering the line if it's vertically outside our viewport - if (y + height < 0 || y > this._model.options.canvasInnerHeight) { - return; - } - // Cache line offset data so that it is only read once per line - let lineIndexToXOffset = lineOffsetMap.get(lineNumber); - const isFirstDecorationForLine = !lineIndexToXOffset; - if (!lineIndexToXOffset) { - const lineData = this._model.getLineContent(lineNumber); - lineIndexToXOffset = [_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__["MINIMAP_GUTTER_WIDTH"]]; - for (let i = 1; i < lineData.length + 1; i++) { - const charCode = lineData.charCodeAt(i - 1); - const dx = charCode === 9 /* Tab */ - ? tabSize * charWidth - : _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__["isFullWidthCharacter"](charCode) - ? 2 * charWidth - : charWidth; - lineIndexToXOffset[i] = lineIndexToXOffset[i - 1] + dx; - } - lineOffsetMap.set(lineNumber, lineIndexToXOffset); - } - const { startColumn, endColumn, startLineNumber, endLineNumber } = decorationRange; - const x = startLineNumber === lineNumber ? lineIndexToXOffset[startColumn - 1] : _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__["MINIMAP_GUTTER_WIDTH"]; - const endColumnForLine = endLineNumber > lineNumber ? lineIndexToXOffset.length - 1 : endColumn - 1; - if (endColumnForLine > 0) { - // If the decoration starts at the last character of the column and spans over it, ensure it has a width - const width = lineIndexToXOffset[endColumnForLine] - x || 2; - this.renderDecoration(canvasContext, decorationColor, x, y, width, height); - } - if (isFirstDecorationForLine) { - this.renderLineHighlight(canvasContext, decorationColor, y, height); - } - } - renderLineHighlight(canvasContext, decorationColor, y, height) { - canvasContext.fillStyle = decorationColor && decorationColor.transparent(0.5).toString() || ''; - canvasContext.fillRect(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__["MINIMAP_GUTTER_WIDTH"], y, canvasContext.canvas.width, height); - } - renderDecoration(canvasContext, decorationColor, x, y, width, height) { - canvasContext.fillStyle = decorationColor && decorationColor.toString() || ''; - canvasContext.fillRect(x, y, width, height); - } - renderLines(layout) { - const startLineNumber = layout.startLineNumber; - const endLineNumber = layout.endLineNumber; - const minimapLineHeight = this._model.options.minimapLineHeight; - // Check if nothing changed w.r.t. lines from last frame - if (this._lastRenderData && this._lastRenderData.linesEquals(layout)) { - const _lastData = this._lastRenderData._get(); - // Nice!! Nothing changed from last frame - return new RenderData(layout, _lastData.imageData, _lastData.lines); - } - // Oh well!! We need to repaint some lines... - const imageData = this._getBuffer(); - if (!imageData) { - // 0 width or 0 height canvas, nothing to do - return null; - } - // Render untouched lines by using last rendered data. - let [_dirtyY1, _dirtyY2, needed] = InnerMinimap._renderUntouchedLines(imageData, startLineNumber, endLineNumber, minimapLineHeight, this._lastRenderData); - // Fetch rendering info from view model for rest of lines that need rendering. - const lineInfo = this._model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed); - const tabSize = this._model.getOptions().tabSize; - const background = this._model.options.backgroundColor; - const tokensColorTracker = this._model.tokensColorTracker; - const useLighterFont = tokensColorTracker.backgroundIsLight(); - const renderMinimap = this._model.options.renderMinimap; - const charRenderer = this._model.options.charRenderer(); - const fontScale = this._model.options.fontScale; - const minimapCharWidth = this._model.options.minimapCharWidth; - const baseCharHeight = (renderMinimap === 1 /* Text */ ? 2 /* BASE_CHAR_HEIGHT */ : 2 /* BASE_CHAR_HEIGHT */ + 1); - const renderMinimapLineHeight = baseCharHeight * fontScale; - const innerLinePadding = (minimapLineHeight > renderMinimapLineHeight ? Math.floor((minimapLineHeight - renderMinimapLineHeight) / 2) : 0); - // Render the rest of lines - let dy = 0; - const renderedLines = []; - for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) { - if (needed[lineIndex]) { - InnerMinimap._renderLine(imageData, background, useLighterFont, renderMinimap, minimapCharWidth, tokensColorTracker, charRenderer, dy, innerLinePadding, tabSize, lineInfo[lineIndex], fontScale, minimapLineHeight); - } - renderedLines[lineIndex] = new MinimapLine(dy); - dy += minimapLineHeight; - } - const dirtyY1 = (_dirtyY1 === -1 ? 0 : _dirtyY1); - const dirtyY2 = (_dirtyY2 === -1 ? imageData.height : _dirtyY2); - const dirtyHeight = dirtyY2 - dirtyY1; - // Finally, paint to the canvas - const ctx = this._canvas.domNode.getContext('2d'); - ctx.putImageData(imageData, 0, 0, 0, dirtyY1, imageData.width, dirtyHeight); - // Save rendered data for reuse on next frame if possible - return new RenderData(layout, imageData, renderedLines); - } - static _renderUntouchedLines(target, startLineNumber, endLineNumber, minimapLineHeight, lastRenderData) { - const needed = []; - if (!lastRenderData) { - for (let i = 0, len = endLineNumber - startLineNumber + 1; i < len; i++) { - needed[i] = true; - } - return [-1, -1, needed]; - } - const _lastData = lastRenderData._get(); - const lastTargetData = _lastData.imageData.data; - const lastStartLineNumber = _lastData.rendLineNumberStart; - const lastLines = _lastData.lines; - const lastLinesLength = lastLines.length; - const WIDTH = target.width; - const targetData = target.data; - const maxDestPixel = (endLineNumber - startLineNumber + 1) * minimapLineHeight * WIDTH * 4; - let dirtyPixel1 = -1; // the pixel offset up to which all the data is equal to the prev frame - let dirtyPixel2 = -1; // the pixel offset after which all the data is equal to the prev frame - let copySourceStart = -1; - let copySourceEnd = -1; - let copyDestStart = -1; - let copyDestEnd = -1; - let dest_dy = 0; - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const lineIndex = lineNumber - startLineNumber; - const lastLineIndex = lineNumber - lastStartLineNumber; - const source_dy = (lastLineIndex >= 0 && lastLineIndex < lastLinesLength ? lastLines[lastLineIndex].dy : -1); - if (source_dy === -1) { - needed[lineIndex] = true; - dest_dy += minimapLineHeight; - continue; - } - const sourceStart = source_dy * WIDTH * 4; - const sourceEnd = (source_dy + minimapLineHeight) * WIDTH * 4; - const destStart = dest_dy * WIDTH * 4; - const destEnd = (dest_dy + minimapLineHeight) * WIDTH * 4; - if (copySourceEnd === sourceStart && copyDestEnd === destStart) { - // contiguous zone => extend copy request - copySourceEnd = sourceEnd; - copyDestEnd = destEnd; - } - else { - if (copySourceStart !== -1) { - // flush existing copy request - targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart); - if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) { - dirtyPixel1 = copySourceEnd; - } - if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) { - dirtyPixel2 = copySourceStart; - } - } - copySourceStart = sourceStart; - copySourceEnd = sourceEnd; - copyDestStart = destStart; - copyDestEnd = destEnd; - } - needed[lineIndex] = false; - dest_dy += minimapLineHeight; - } - if (copySourceStart !== -1) { - // flush existing copy request - targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart); - if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) { - dirtyPixel1 = copySourceEnd; - } - if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) { - dirtyPixel2 = copySourceStart; - } - } - const dirtyY1 = (dirtyPixel1 === -1 ? -1 : dirtyPixel1 / (WIDTH * 4)); - const dirtyY2 = (dirtyPixel2 === -1 ? -1 : dirtyPixel2 / (WIDTH * 4)); - return [dirtyY1, dirtyY2, needed]; - } - static _renderLine(target, backgroundColor, useLighterFont, renderMinimap, charWidth, colorTracker, minimapCharRenderer, dy, innerLinePadding, tabSize, lineData, fontScale, minimapLineHeight) { - const content = lineData.content; - const tokens = lineData.tokens; - const maxDx = target.width - charWidth; - const force1pxHeight = (minimapLineHeight === 1); - let dx = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_9__["MINIMAP_GUTTER_WIDTH"]; - let charIndex = 0; - let tabsCharDelta = 0; - for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) { - const tokenEndIndex = tokens.getEndOffset(tokenIndex); - const tokenColorId = tokens.getForeground(tokenIndex); - const tokenColor = colorTracker.getColor(tokenColorId); - for (; charIndex < tokenEndIndex; charIndex++) { - if (dx > maxDx) { - // hit edge of minimap - return; - } - const charCode = content.charCodeAt(charIndex); - if (charCode === 9 /* Tab */) { - const insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize; - tabsCharDelta += insertSpacesCount - 1; - // No need to render anything since tab is invisible - dx += insertSpacesCount * charWidth; - } - else if (charCode === 32 /* Space */) { - // No need to render anything since space is invisible - dx += charWidth; - } - else { - // Render twice for a full width character - const count = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__["isFullWidthCharacter"](charCode) ? 2 : 1; - for (let i = 0; i < count; i++) { - if (renderMinimap === 2 /* Blocks */) { - minimapCharRenderer.blockRenderChar(target, dx, dy + innerLinePadding, tokenColor, backgroundColor, useLighterFont, force1pxHeight); - } - else { // RenderMinimap.Text - minimapCharRenderer.renderChar(target, dx, dy + innerLinePadding, charCode, tokenColor, backgroundColor, fontScale, useLighterFont, force1pxHeight); - } - dx += charWidth; - if (dx > maxDx) { - // hit edge of minimap - return; - } - } - } - } - } - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__["registerThemingParticipant"])((theme, collector) => { - const minimapBackgroundValue = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapBackground"]); - if (minimapBackgroundValue) { - collector.addRule(`.monaco-editor .minimap > canvas { opacity: ${minimapBackgroundValue.rgba.a}; will-change: opacity; }`); - } - const sliderBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapSliderBackground"]); - if (sliderBackground) { - collector.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${sliderBackground}; }`); - } - const sliderHoverBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapSliderHoverBackground"]); - if (sliderHoverBackground) { - collector.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${sliderHoverBackground}; }`); - } - const sliderActiveBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["minimapSliderActiveBackground"]); - if (sliderActiveBackground) { - collector.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${sliderActiveBackground}; }`); - } - const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["scrollbarShadow"]); - if (shadow) { - collector.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${shadow} -6px 0 6px -6px inset; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js ***! - \***************************************************************************************************/ -/*! exports provided: MinimapCharRenderer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapCharRenderer", function() { return MinimapCharRenderer; }); -/* harmony import */ var _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimapCharSheet.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js"); -/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/uint.js */ "./node_modules/monaco-editor/esm/vs/base/common/uint.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class MinimapCharRenderer { - constructor(charData, scale) { - this.scale = scale; - this.charDataNormal = MinimapCharRenderer.soften(charData, 12 / 15); - this.charDataLight = MinimapCharRenderer.soften(charData, 50 / 60); - } - static soften(input, ratio) { - let result = new Uint8ClampedArray(input.length); - for (let i = 0, len = input.length; i < len; i++) { - result[i] = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_1__["toUint8"])(input[i] * ratio); - } - return result; - } - renderChar(target, dx, dy, chCode, color, backgroundColor, fontScale, useLighterFont, force1pxHeight) { - const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale; - const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale; - const renderHeight = (force1pxHeight ? 1 : charHeight); - if (dx + charWidth > target.width || dy + renderHeight > target.height) { - console.warn('bad render request outside image data'); - return; - } - const charData = useLighterFont ? this.charDataLight : this.charDataNormal; - const charIndex = Object(_minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_0__["getCharIndex"])(chCode, fontScale); - const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */; - const backgroundR = backgroundColor.r; - const backgroundG = backgroundColor.g; - const backgroundB = backgroundColor.b; - const deltaR = color.r - backgroundR; - const deltaG = color.g - backgroundG; - const deltaB = color.b - backgroundB; - const dest = target.data; - let sourceOffset = charIndex * charWidth * charHeight; - let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */; - for (let y = 0; y < renderHeight; y++) { - let column = row; - for (let x = 0; x < charWidth; x++) { - const c = charData[sourceOffset++] / 255; - dest[column++] = backgroundR + deltaR * c; - dest[column++] = backgroundG + deltaG * c; - dest[column++] = backgroundB + deltaB * c; - column++; - } - row += destWidth; - } - } - blockRenderChar(target, dx, dy, color, backgroundColor, useLighterFont, force1pxHeight) { - const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale; - const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale; - const renderHeight = (force1pxHeight ? 1 : charHeight); - if (dx + charWidth > target.width || dy + renderHeight > target.height) { - console.warn('bad render request outside image data'); - return; - } - const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */; - const c = 0.5; - const backgroundR = backgroundColor.r; - const backgroundG = backgroundColor.g; - const backgroundB = backgroundColor.b; - const deltaR = color.r - backgroundR; - const deltaG = color.g - backgroundG; - const deltaB = color.b - backgroundB; - const colorR = backgroundR + deltaR * c; - const colorG = backgroundG + deltaG * c; - const colorB = backgroundB + deltaB * c; - const dest = target.data; - let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */; - for (let y = 0; y < renderHeight; y++) { - let column = row; - for (let x = 0; x < charWidth; x++) { - dest[column++] = colorR; - dest[column++] = colorG; - dest[column++] = colorB; - column++; - } - row += destWidth; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js ***! - \**********************************************************************************************************/ -/*! exports provided: MinimapCharRendererFactory */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapCharRendererFactory", function() { return MinimapCharRendererFactory; }); -/* harmony import */ var _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minimapCharRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js"); -/* harmony import */ var _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minimapCharSheet.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js"); -/* harmony import */ var _minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./minimapPreBaked.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js"); -/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/uint.js */ "./node_modules/monaco-editor/esm/vs/base/common/uint.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -/** - * Creates character renderers. It takes a 'scale' that determines how large - * characters should be drawn. Using this, it draws data into a canvas and - * then downsamples the characters as necessary for the current display. - * This makes rendering more efficient, rather than drawing a full (tiny) - * font, or downsampling in real-time. - */ -class MinimapCharRendererFactory { - /** - * Creates a new character renderer factory with the given scale. - */ - static create(scale, fontFamily) { - // renderers are immutable. By default we'll 'create' a new minimap - // character renderer whenever we switch editors, no need to do extra work. - if (this.lastCreated && scale === this.lastCreated.scale && fontFamily === this.lastFontFamily) { - return this.lastCreated; - } - let factory; - if (_minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__["prebakedMiniMaps"][scale]) { - factory = new _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__["MinimapCharRenderer"](_minimapPreBaked_js__WEBPACK_IMPORTED_MODULE_2__["prebakedMiniMaps"][scale](), scale); - } - else { - factory = MinimapCharRendererFactory.createFromSampleData(MinimapCharRendererFactory.createSampleData(fontFamily).data, scale); - } - this.lastFontFamily = fontFamily; - this.lastCreated = factory; - return factory; - } - /** - * Creates the font sample data, writing to a canvas. - */ - static createSampleData(fontFamily) { - const canvas = document.createElement('canvas'); - const ctx = canvas.getContext('2d'); - canvas.style.height = `${16 /* SAMPLED_CHAR_HEIGHT */}px`; - canvas.height = 16 /* SAMPLED_CHAR_HEIGHT */; - canvas.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */; - canvas.style.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */ + 'px'; - ctx.fillStyle = '#ffffff'; - ctx.font = `bold ${16 /* SAMPLED_CHAR_HEIGHT */}px ${fontFamily}`; - ctx.textBaseline = 'middle'; - let x = 0; - for (const code of _minimapCharSheet_js__WEBPACK_IMPORTED_MODULE_1__["allCharCodes"]) { - ctx.fillText(String.fromCharCode(code), x, 16 /* SAMPLED_CHAR_HEIGHT */ / 2); - x += 10 /* SAMPLED_CHAR_WIDTH */; - } - return ctx.getImageData(0, 0, 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */, 16 /* SAMPLED_CHAR_HEIGHT */); - } - /** - * Creates a character renderer from the canvas sample data. - */ - static createFromSampleData(source, scale) { - const expectedLength = 16 /* SAMPLED_CHAR_HEIGHT */ * 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */ * 96 /* CHAR_COUNT */; - if (source.length !== expectedLength) { - throw new Error('Unexpected source in MinimapCharRenderer'); - } - let charData = MinimapCharRendererFactory._downsample(source, scale); - return new _minimapCharRenderer_js__WEBPACK_IMPORTED_MODULE_0__["MinimapCharRenderer"](charData, scale); - } - static _downsampleChar(source, sourceOffset, dest, destOffset, scale) { - const width = 1 /* BASE_CHAR_WIDTH */ * scale; - const height = 2 /* BASE_CHAR_HEIGHT */ * scale; - let targetIndex = destOffset; - let brightest = 0; - // This is essentially an ad-hoc rescaling algorithm. Standard approaches - // like bicubic interpolation are awesome for scaling between image sizes, - // but don't work so well when scaling to very small pixel values, we end - // up with blurry, indistinct forms. - // - // The approach taken here is simply mapping each source pixel to the target - // pixels, and taking the weighted values for all pixels in each, and then - // averaging them out. Finally we apply an intensity boost in _downsample, - // since when scaling to the smallest pixel sizes there's more black space - // which causes characters to be much less distinct. - for (let y = 0; y < height; y++) { - // 1. For this destination pixel, get the source pixels we're sampling - // from (x1, y1) to the next pixel (x2, y2) - const sourceY1 = (y / height) * 16 /* SAMPLED_CHAR_HEIGHT */; - const sourceY2 = ((y + 1) / height) * 16 /* SAMPLED_CHAR_HEIGHT */; - for (let x = 0; x < width; x++) { - const sourceX1 = (x / width) * 10 /* SAMPLED_CHAR_WIDTH */; - const sourceX2 = ((x + 1) / width) * 10 /* SAMPLED_CHAR_WIDTH */; - // 2. Sample all of them, summing them up and weighting them. Similar - // to bilinear interpolation. - let value = 0; - let samples = 0; - for (let sy = sourceY1; sy < sourceY2; sy++) { - const sourceRow = sourceOffset + Math.floor(sy) * 3840 /* RGBA_SAMPLED_ROW_WIDTH */; - const yBalance = 1 - (sy - Math.floor(sy)); - for (let sx = sourceX1; sx < sourceX2; sx++) { - const xBalance = 1 - (sx - Math.floor(sx)); - const sourceIndex = sourceRow + Math.floor(sx) * 4 /* RGBA_CHANNELS_CNT */; - const weight = xBalance * yBalance; - samples += weight; - value += ((source[sourceIndex] * source[sourceIndex + 3]) / 255) * weight; - } - } - const final = value / samples; - brightest = Math.max(brightest, final); - dest[targetIndex++] = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_3__["toUint8"])(final); - } - } - return brightest; - } - static _downsample(data, scale) { - const pixelsPerCharacter = 2 /* BASE_CHAR_HEIGHT */ * scale * 1 /* BASE_CHAR_WIDTH */ * scale; - const resultLen = pixelsPerCharacter * 96 /* CHAR_COUNT */; - const result = new Uint8ClampedArray(resultLen); - let resultOffset = 0; - let sourceOffset = 0; - let brightest = 0; - for (let charIndex = 0; charIndex < 96 /* CHAR_COUNT */; charIndex++) { - brightest = Math.max(brightest, this._downsampleChar(data, sourceOffset, result, resultOffset, scale)); - resultOffset += pixelsPerCharacter; - sourceOffset += 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */; - } - if (brightest > 0) { - const adjust = 255 / brightest; - for (let i = 0; i < resultLen; i++) { - result[i] *= adjust; - } - } - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js ***! - \************************************************************************************************/ -/*! exports provided: allCharCodes, getCharIndex */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "allCharCodes", function() { return allCharCodes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCharIndex", function() { return getCharIndex; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const allCharCodes = (() => { - const v = []; - for (let i = 32 /* START_CH_CODE */; i <= 126 /* END_CH_CODE */; i++) { - v.push(i); - } - v.push(65533 /* UNKNOWN_CODE */); - return v; -})(); -const getCharIndex = (chCode, fontScale) => { - chCode -= 32 /* START_CH_CODE */; - if (chCode < 0 || chCode > 96 /* CHAR_COUNT */) { - if (fontScale <= 2) { - // for smaller scales, we can get away with using any ASCII character... - return (chCode + 96 /* CHAR_COUNT */) % 96 /* CHAR_COUNT */; - } - return 96 /* CHAR_COUNT */ - 1; // unknown symbol - } - return chCode; -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapPreBaked.js ***! - \***********************************************************************************************/ -/*! exports provided: prebakedMiniMaps */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prebakedMiniMaps", function() { return prebakedMiniMaps; }); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const charTable = { - '0': 0, - '1': 1, - '2': 2, - '3': 3, - '4': 4, - '5': 5, - '6': 6, - '7': 7, - '8': 8, - '9': 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15 -}; -const decodeData = (str) => { - const output = new Uint8ClampedArray(str.length / 2); - for (let i = 0; i < str.length; i += 2) { - output[i >> 1] = (charTable[str[i]] << 4) | (charTable[str[i + 1]] & 0xF); - } - return output; -}; -/* -const encodeData = (data: Uint8ClampedArray, length: string) => { - const chars = '0123456789ABCDEF'; - let output = ''; - for (let i = 0; i < data.length; i++) { - output += chars[data[i] >> 4] + chars[data[i] & 0xf]; - } - return output; -}; -*/ -/** - * Map of minimap scales to prebaked sample data at those scales. We don't - * sample much larger data, because then font family becomes visible, which - * is use-configurable. - */ -const prebakedMiniMaps = { - 1: Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__["once"])(() => decodeData('0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792')), - 2: Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_0__["once"])(() => decodeData('000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126')) -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css": -/*!******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css ***! - \******************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./overlayWidgets.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_overlayWidgets_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js": -/*!*****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js ***! - \*****************************************************************************************************/ -/*! exports provided: ViewOverlayWidgets */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewOverlayWidgets", function() { return ViewOverlayWidgets; }); -/* harmony import */ var _overlayWidgets_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./overlayWidgets.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class ViewOverlayWidgets extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context) { - super(context); - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._widgets = {}; - this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth; - this._minimapWidth = layoutInfo.minimap.minimapWidth; - this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight; - this._editorHeight = layoutInfo.height; - this._editorWidth = layoutInfo.width; - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["PartFingerprints"].write(this._domNode, 4 /* OverlayWidgets */); - this._domNode.setClassName('overlayWidgets'); - } - dispose() { - super.dispose(); - this._widgets = {}; - } - getDomNode() { - return this._domNode; - } - // ---- begin view event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth; - this._minimapWidth = layoutInfo.minimap.minimapWidth; - this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight; - this._editorHeight = layoutInfo.height; - this._editorWidth = layoutInfo.width; - return true; - } - // ---- end view event handlers - addWidget(widget) { - const domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(widget.getDomNode()); - this._widgets[widget.getId()] = { - widget: widget, - preference: null, - domNode: domNode - }; - // This is sync because a widget wants to be in the dom - domNode.setPosition('absolute'); - domNode.setAttribute('widgetId', widget.getId()); - this._domNode.appendChild(domNode); - this.setShouldRender(); - } - setWidgetPosition(widget, preference) { - const widgetData = this._widgets[widget.getId()]; - if (widgetData.preference === preference) { - return false; - } - widgetData.preference = preference; - this.setShouldRender(); - return true; - } - removeWidget(widget) { - const widgetId = widget.getId(); - if (this._widgets.hasOwnProperty(widgetId)) { - const widgetData = this._widgets[widgetId]; - const domNode = widgetData.domNode.domNode; - delete this._widgets[widgetId]; - domNode.parentNode.removeChild(domNode); - this.setShouldRender(); - } - } - _renderWidget(widgetData) { - const domNode = widgetData.domNode; - if (widgetData.preference === null) { - domNode.unsetTop(); - return; - } - if (widgetData.preference === 0 /* TOP_RIGHT_CORNER */) { - domNode.setTop(0); - domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth); - } - else if (widgetData.preference === 1 /* BOTTOM_RIGHT_CORNER */) { - const widgetHeight = domNode.domNode.clientHeight; - domNode.setTop((this._editorHeight - widgetHeight - 2 * this._horizontalScrollbarHeight)); - domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth); - } - else if (widgetData.preference === 2 /* TOP_CENTER */) { - domNode.setTop(0); - domNode.domNode.style.right = '50%'; - } - } - prepareRender(ctx) { - // Nothing to read - } - render(ctx) { - this._domNode.setWidth(this._editorWidth); - const keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - this._renderWidget(this._widgets[widgetId]); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js": -/*!**************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js ***! - \**************************************************************************************************************/ -/*! exports provided: DecorationsOverviewRuler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecorationsOverviewRuler", function() { return DecorationsOverviewRuler; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class Settings { - constructor(config, theme) { - const options = config.options; - this.lineHeight = options.get(51 /* lineHeight */); - this.pixelRatio = options.get(115 /* pixelRatio */); - this.overviewRulerLanes = options.get(65 /* overviewRulerLanes */); - this.renderBorder = options.get(64 /* overviewRulerBorder */); - const borderColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorOverviewRulerBorder"]); - this.borderColor = borderColor ? borderColor.toString() : null; - this.hideCursor = options.get(44 /* hideCursorInOverviewRuler */); - const cursorColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorCursorForeground"]); - this.cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null; - this.themeType = theme.type; - const minimapOpts = options.get(56 /* minimap */); - const minimapEnabled = minimapOpts.enabled; - const minimapSide = minimapOpts.side; - const backgroundColor = minimapEnabled - ? theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorOverviewRulerBackground"]) || _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["TokenizationRegistry"].getDefaultBackground() - : null; - if (backgroundColor === null || minimapSide === 'left') { - this.backgroundColor = null; - } - else { - this.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].Format.CSS.formatHex(backgroundColor); - } - const layoutInfo = options.get(117 /* layoutInfo */); - const position = layoutInfo.overviewRuler; - this.top = position.top; - this.right = position.right; - this.domWidth = position.width; - this.domHeight = position.height; - if (this.overviewRulerLanes === 0) { - // overview ruler is off - this.canvasWidth = 0; - this.canvasHeight = 0; - } - else { - this.canvasWidth = (this.domWidth * this.pixelRatio) | 0; - this.canvasHeight = (this.domHeight * this.pixelRatio) | 0; - } - const [x, w] = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes); - this.x = x; - this.w = w; - } - _initLanes(canvasLeftOffset, canvasWidth, laneCount) { - const remainingWidth = canvasWidth - canvasLeftOffset; - if (laneCount >= 3) { - const leftWidth = Math.floor(remainingWidth / 3); - const rightWidth = Math.floor(remainingWidth / 3); - const centerWidth = remainingWidth - leftWidth - rightWidth; - const leftOffset = canvasLeftOffset; - const centerOffset = leftOffset + leftWidth; - const rightOffset = leftOffset + leftWidth + centerWidth; - return [ - [ - 0, - leftOffset, - centerOffset, - leftOffset, - rightOffset, - leftOffset, - centerOffset, - leftOffset, - ], [ - 0, - leftWidth, - centerWidth, - leftWidth + centerWidth, - rightWidth, - leftWidth + centerWidth + rightWidth, - centerWidth + rightWidth, - leftWidth + centerWidth + rightWidth, - ] - ]; - } - else if (laneCount === 2) { - const leftWidth = Math.floor(remainingWidth / 2); - const rightWidth = remainingWidth - leftWidth; - const leftOffset = canvasLeftOffset; - const rightOffset = leftOffset + leftWidth; - return [ - [ - 0, - leftOffset, - leftOffset, - leftOffset, - rightOffset, - leftOffset, - leftOffset, - leftOffset, - ], [ - 0, - leftWidth, - leftWidth, - leftWidth, - rightWidth, - leftWidth + rightWidth, - leftWidth + rightWidth, - leftWidth + rightWidth, - ] - ]; - } - else { - const offset = canvasLeftOffset; - const width = remainingWidth; - return [ - [ - 0, - offset, - offset, - offset, - offset, - offset, - offset, - offset, - ], [ - 0, - width, - width, - width, - width, - width, - width, - width, - ] - ]; - } - } - equals(other) { - return (this.lineHeight === other.lineHeight - && this.pixelRatio === other.pixelRatio - && this.overviewRulerLanes === other.overviewRulerLanes - && this.renderBorder === other.renderBorder - && this.borderColor === other.borderColor - && this.hideCursor === other.hideCursor - && this.cursorColor === other.cursorColor - && this.themeType === other.themeType - && this.backgroundColor === other.backgroundColor - && this.top === other.top - && this.right === other.right - && this.domWidth === other.domWidth - && this.domHeight === other.domHeight - && this.canvasWidth === other.canvasWidth - && this.canvasHeight === other.canvasHeight); - } -} -class DecorationsOverviewRuler extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context) { - super(context); - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(document.createElement('canvas')); - this._domNode.setClassName('decorationsOverviewRuler'); - this._domNode.setPosition('absolute'); - this._domNode.setLayerHinting(true); - this._domNode.setContain('strict'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._updateSettings(false); - this._tokensColorTrackerListener = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["TokenizationRegistry"].onDidChange((e) => { - if (e.changedColorMap) { - this._updateSettings(true); - } - }); - this._cursorPositions = []; - } - dispose() { - super.dispose(); - this._tokensColorTrackerListener.dispose(); - } - _updateSettings(renderNow) { - const newSettings = new Settings(this._context.configuration, this._context.theme); - if (this._settings && this._settings.equals(newSettings)) { - // nothing to do - return false; - } - this._settings = newSettings; - this._domNode.setTop(this._settings.top); - this._domNode.setRight(this._settings.right); - this._domNode.setWidth(this._settings.domWidth); - this._domNode.setHeight(this._settings.domHeight); - this._domNode.domNode.width = this._settings.canvasWidth; - this._domNode.domNode.height = this._settings.canvasHeight; - if (renderNow) { - this._render(); - } - return true; - } - // ---- begin view event handlers - onConfigurationChanged(e) { - return this._updateSettings(false); - } - onCursorStateChanged(e) { - this._cursorPositions = []; - for (let i = 0, len = e.selections.length; i < len; i++) { - this._cursorPositions[i] = e.selections[i].getPosition(); - } - this._cursorPositions.sort(_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].compare); - return true; - } - onDecorationsChanged(e) { - if (e.affectsOverviewRuler) { - return true; - } - return false; - } - onFlushed(e) { - return true; - } - onScrollChanged(e) { - return e.scrollHeightChanged; - } - onZonesChanged(e) { - return true; - } - onThemeChanged(e) { - // invalidate color cache - this._context.model.invalidateOverviewRulerColorCache(); - return this._updateSettings(false); - } - // ---- end view event handlers - getDomNode() { - return this._domNode.domNode; - } - prepareRender(ctx) { - // Nothing to read - } - render(editorCtx) { - this._render(); - } - _render() { - if (this._settings.overviewRulerLanes === 0) { - // overview ruler is off - this._domNode.setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : ''); - return; - } - const canvasWidth = this._settings.canvasWidth; - const canvasHeight = this._settings.canvasHeight; - const lineHeight = this._settings.lineHeight; - const viewLayout = this._context.viewLayout; - const outerHeight = this._context.viewLayout.getScrollHeight(); - const heightRatio = canvasHeight / outerHeight; - const decorations = this._context.model.getAllOverviewRulerDecorations(this._context.theme); - const minDecorationHeight = (6 /* MIN_DECORATION_HEIGHT */ * this._settings.pixelRatio) | 0; - const halfMinDecorationHeight = (minDecorationHeight / 2) | 0; - const canvasCtx = this._domNode.domNode.getContext('2d'); - if (this._settings.backgroundColor === null) { - canvasCtx.clearRect(0, 0, canvasWidth, canvasHeight); - } - else { - canvasCtx.fillStyle = this._settings.backgroundColor; - canvasCtx.fillRect(0, 0, canvasWidth, canvasHeight); - } - const x = this._settings.x; - const w = this._settings.w; - // Avoid flickering by always rendering the colors in the same order - // colors that don't use transparency will be sorted last (they start with #) - const colors = Object.keys(decorations); - colors.sort(); - for (let cIndex = 0, cLen = colors.length; cIndex < cLen; cIndex++) { - const color = colors[cIndex]; - const colorDecorations = decorations[color]; - canvasCtx.fillStyle = color; - let prevLane = 0; - let prevY1 = 0; - let prevY2 = 0; - for (let i = 0, len = colorDecorations.length; i < len; i++) { - const lane = colorDecorations[3 * i]; - const startLineNumber = colorDecorations[3 * i + 1]; - const endLineNumber = colorDecorations[3 * i + 2]; - let y1 = (viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio) | 0; - let y2 = ((viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio) | 0; - const height = y2 - y1; - if (height < minDecorationHeight) { - let yCenter = ((y1 + y2) / 2) | 0; - if (yCenter < halfMinDecorationHeight) { - yCenter = halfMinDecorationHeight; - } - else if (yCenter + halfMinDecorationHeight > canvasHeight) { - yCenter = canvasHeight - halfMinDecorationHeight; - } - y1 = yCenter - halfMinDecorationHeight; - y2 = yCenter + halfMinDecorationHeight; - } - if (y1 > prevY2 + 1 || lane !== prevLane) { - // flush prev - if (i !== 0) { - canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1); - } - prevLane = lane; - prevY1 = y1; - prevY2 = y2; - } - else { - // merge into prev - if (y2 > prevY2) { - prevY2 = y2; - } - } - } - canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1); - } - // Draw cursors - if (!this._settings.hideCursor && this._settings.cursorColor) { - const cursorHeight = (2 * this._settings.pixelRatio) | 0; - const halfCursorHeight = (cursorHeight / 2) | 0; - const cursorX = this._settings.x[7 /* Full */]; - const cursorW = this._settings.w[7 /* Full */]; - canvasCtx.fillStyle = this._settings.cursorColor; - let prevY1 = -100; - let prevY2 = -100; - for (let i = 0, len = this._cursorPositions.length; i < len; i++) { - const cursor = this._cursorPositions[i]; - let yCenter = (viewLayout.getVerticalOffsetForLineNumber(cursor.lineNumber) * heightRatio) | 0; - if (yCenter < halfCursorHeight) { - yCenter = halfCursorHeight; - } - else if (yCenter + halfCursorHeight > canvasHeight) { - yCenter = canvasHeight - halfCursorHeight; - } - const y1 = yCenter - halfCursorHeight; - const y2 = y1 + cursorHeight; - if (y1 > prevY2 + 1) { - // flush prev - if (i !== 0) { - canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1); - } - prevY1 = y1; - prevY2 = y2; - } - else { - // merge into prev - if (y2 > prevY2) { - prevY2 = y2; - } - } - } - canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1); - } - if (this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0) { - canvasCtx.beginPath(); - canvasCtx.lineWidth = 1; - canvasCtx.strokeStyle = this._settings.borderColor; - canvasCtx.moveTo(0, 0); - canvasCtx.lineTo(0, canvasHeight); - canvasCtx.stroke(); - canvasCtx.moveTo(0, 0); - canvasCtx.lineTo(canvasWidth, 0); - canvasCtx.stroke(); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js ***! - \***************************************************************************************************/ -/*! exports provided: OverviewRuler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverviewRuler", function() { return OverviewRuler; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/view/overviewZoneManager.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js"); -/* harmony import */ var _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/viewModel/viewEventHandler.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class OverviewRuler extends _common_viewModel_viewEventHandler_js__WEBPACK_IMPORTED_MODULE_2__["ViewEventHandler"] { - constructor(context, cssClassName) { - super(); - this._context = context; - const options = this._context.configuration.options; - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(document.createElement('canvas')); - this._domNode.setClassName(cssClassName); - this._domNode.setPosition('absolute'); - this._domNode.setLayerHinting(true); - this._domNode.setContain('strict'); - this._zoneManager = new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_1__["OverviewZoneManager"]((lineNumber) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber)); - this._zoneManager.setDOMWidth(0); - this._zoneManager.setDOMHeight(0); - this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()); - this._zoneManager.setLineHeight(options.get(51 /* lineHeight */)); - this._zoneManager.setPixelRatio(options.get(115 /* pixelRatio */)); - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - super.dispose(); - } - // ---- begin view event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - if (e.hasChanged(51 /* lineHeight */)) { - this._zoneManager.setLineHeight(options.get(51 /* lineHeight */)); - this._render(); - } - if (e.hasChanged(115 /* pixelRatio */)) { - this._zoneManager.setPixelRatio(options.get(115 /* pixelRatio */)); - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this._render(); - } - return true; - } - onFlushed(e) { - this._render(); - return true; - } - onScrollChanged(e) { - if (e.scrollHeightChanged) { - this._zoneManager.setOuterHeight(e.scrollHeight); - this._render(); - } - return true; - } - onZonesChanged(e) { - this._render(); - return true; - } - // ---- end view event handlers - getDomNode() { - return this._domNode.domNode; - } - setLayout(position) { - this._domNode.setTop(position.top); - this._domNode.setRight(position.right); - let hasChanged = false; - hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged; - hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged; - if (hasChanged) { - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this._render(); - } - } - setZones(zones) { - this._zoneManager.setZones(zones); - this._render(); - } - _render() { - if (this._zoneManager.getOuterHeight() === 0) { - return false; - } - const width = this._zoneManager.getCanvasWidth(); - const height = this._zoneManager.getCanvasHeight(); - const colorZones = this._zoneManager.resolveColorZones(); - const id2Color = this._zoneManager.getId2Color(); - const ctx = this._domNode.domNode.getContext('2d'); - ctx.clearRect(0, 0, width, height); - if (colorZones.length > 0) { - this._renderOneLane(ctx, colorZones, id2Color, width); - } - return true; - } - _renderOneLane(ctx, colorZones, id2Color, width) { - let currentColorId = 0; - let currentFrom = 0; - let currentTo = 0; - for (const zone of colorZones) { - const zoneColorId = zone.colorId; - const zoneFrom = zone.from; - const zoneTo = zone.to; - if (zoneColorId !== currentColorId) { - ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); - currentColorId = zoneColorId; - ctx.fillStyle = id2Color[currentColorId]; - currentFrom = zoneFrom; - currentTo = zoneTo; - } - else { - if (currentTo >= zoneFrom) { - currentTo = Math.max(currentTo, zoneTo); - } - else { - ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); - currentFrom = zoneFrom; - currentTo = zoneTo; - } - } - } - ctx.fillRect(0, currentFrom, width, currentTo - currentFrom); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./rulers.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_rulers_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js ***! - \*************************************************************************************/ -/*! exports provided: Rulers */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rulers", function() { return Rulers; }); -/* harmony import */ var _rulers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rulers.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class Rulers extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context) { - super(context); - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this.domNode.setAttribute('role', 'presentation'); - this.domNode.setAttribute('aria-hidden', 'true'); - this.domNode.setClassName('view-rulers'); - this._renderedRulers = []; - const options = this._context.configuration.options; - this._rulers = options.get(83 /* rulers */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - } - dispose() { - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - this._rulers = options.get(83 /* rulers */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - return true; - } - onScrollChanged(e) { - return e.scrollHeightChanged; - } - // --- end event handlers - prepareRender(ctx) { - // Nothing to read - } - _ensureRulersCount() { - const currentCount = this._renderedRulers.length; - const desiredCount = this._rulers.length; - if (currentCount === desiredCount) { - // Nothing to do - return; - } - if (currentCount < desiredCount) { - const { tabSize } = this._context.model.getTextModelOptions(); - const rulerWidth = tabSize; - let addCount = desiredCount - currentCount; - while (addCount > 0) { - const node = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - node.setClassName('view-ruler'); - node.setWidth(rulerWidth); - this.domNode.appendChild(node); - this._renderedRulers.push(node); - addCount--; - } - return; - } - let removeCount = currentCount - desiredCount; - while (removeCount > 0) { - const node = this._renderedRulers.pop(); - this.domNode.removeChild(node); - removeCount--; - } - } - render(ctx) { - this._ensureRulersCount(); - for (let i = 0, len = this._rulers.length; i < len; i++) { - const node = this._renderedRulers[i]; - const ruler = this._rulers[i]; - node.setBoxShadow(ruler.color ? `1px 0 0 0 ${ruler.color} inset` : ``); - node.setHeight(Math.min(ctx.scrollHeight, 1000000)); - node.setLeft(ruler.column * this._typicalHalfwidthCharacterWidth); - } - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["registerThemingParticipant"])((theme, collector) => { - const rulerColor = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorRuler"]); - if (rulerColor) { - collector.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${rulerColor} inset; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css ***! - \**********************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./scrollDecoration.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_scrollDecoration_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js": -/*!*********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js ***! - \*********************************************************************************************************/ -/*! exports provided: ScrollDecorationViewPart */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollDecorationViewPart", function() { return ScrollDecorationViewPart; }); -/* harmony import */ var _scrollDecoration_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scrollDecoration.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class ScrollDecorationViewPart extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context) { - super(context); - this._scrollTop = 0; - this._width = 0; - this._updateWidth(); - this._shouldShow = false; - const options = this._context.configuration.options; - const scrollbar = options.get(84 /* scrollbar */); - this._useShadows = scrollbar.useShadows; - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); - } - dispose() { - super.dispose(); - } - _updateShouldShow() { - const newShouldShow = (this._useShadows && this._scrollTop > 0); - if (this._shouldShow !== newShouldShow) { - this._shouldShow = newShouldShow; - return true; - } - return false; - } - getDomNode() { - return this._domNode; - } - _updateWidth() { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - if (layoutInfo.minimap.renderMinimap === 0 || (layoutInfo.minimap.minimapWidth > 0 && layoutInfo.minimap.minimapLeft === 0)) { - this._width = layoutInfo.width; - } - else { - this._width = layoutInfo.width - layoutInfo.minimap.minimapWidth - layoutInfo.verticalScrollbarWidth; - } - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const scrollbar = options.get(84 /* scrollbar */); - this._useShadows = scrollbar.useShadows; - this._updateWidth(); - this._updateShouldShow(); - return true; - } - onScrollChanged(e) { - this._scrollTop = e.scrollTop; - return this._updateShouldShow(); - } - // --- end event handlers - prepareRender(ctx) { - // Nothing to read - } - render(ctx) { - this._domNode.setWidth(this._width); - this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : ''); - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["registerThemingParticipant"])((theme, collector) => { - const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["scrollbarShadow"]); - if (shadow) { - collector.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${shadow} 0 6px 6px -6px inset; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./selections.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_selections_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js ***! - \*********************************************************************************************/ -/*! exports provided: SelectionsOverlay */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionsOverlay", function() { return SelectionsOverlay; }); -/* harmony import */ var _selections_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selections.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/dynamicViewOverlay.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class HorizontalRangeWithStyle { - constructor(other) { - this.left = other.left; - this.width = other.width; - this.startStyle = null; - this.endStyle = null; - } -} -class LineVisibleRangesWithStyle { - constructor(lineNumber, ranges) { - this.lineNumber = lineNumber; - this.ranges = ranges; - } -} -function toStyledRange(item) { - return new HorizontalRangeWithStyle(item); -} -function toStyled(item) { - return new LineVisibleRangesWithStyle(item.lineNumber, item.ranges.map(toStyledRange)); -} -// TODO@Alex: Remove this once IE11 fixes Bug #524217 -// The problem in IE11 is that it does some sort of auto-zooming to accomodate for displays with different pixel density. -// Unfortunately, this auto-zooming is buggy around dealing with rounded borders -const isIEWithZoomingIssuesNearRoundedBorders = _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__["isEdge"]; -class SelectionsOverlay extends _view_dynamicViewOverlay_js__WEBPACK_IMPORTED_MODULE_2__["DynamicViewOverlay"] { - constructor(context) { - super(); - this._previousFrameVisibleRangesWithStyle = []; - this._context = context; - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - this._roundedSelection = options.get(82 /* roundedSelection */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - this._selections = []; - this._renderResult = null; - this._context.addEventHandler(this); - } - dispose() { - this._context.removeEventHandler(this); - this._renderResult = null; - super.dispose(); - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - this._lineHeight = options.get(51 /* lineHeight */); - this._roundedSelection = options.get(82 /* roundedSelection */); - this._typicalHalfwidthCharacterWidth = options.get(36 /* fontInfo */).typicalHalfwidthCharacterWidth; - return true; - } - onCursorStateChanged(e) { - this._selections = e.selections.slice(0); - return true; - } - onDecorationsChanged(e) { - // true for inline decorations that can end up relayouting text - return true; //e.inlineDecorationsChanged; - } - onFlushed(e) { - return true; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - _visibleRangesHaveGaps(linesVisibleRanges) { - for (let i = 0, len = linesVisibleRanges.length; i < len; i++) { - const lineVisibleRanges = linesVisibleRanges[i]; - if (lineVisibleRanges.ranges.length > 1) { - // There are two ranges on the same line - return true; - } - } - return false; - } - _enrichVisibleRangesWithStyle(viewport, linesVisibleRanges, previousFrame) { - const epsilon = this._typicalHalfwidthCharacterWidth / 4; - let previousFrameTop = null; - let previousFrameBottom = null; - if (previousFrame && previousFrame.length > 0 && linesVisibleRanges.length > 0) { - const topLineNumber = linesVisibleRanges[0].lineNumber; - if (topLineNumber === viewport.startLineNumber) { - for (let i = 0; !previousFrameTop && i < previousFrame.length; i++) { - if (previousFrame[i].lineNumber === topLineNumber) { - previousFrameTop = previousFrame[i].ranges[0]; - } - } - } - const bottomLineNumber = linesVisibleRanges[linesVisibleRanges.length - 1].lineNumber; - if (bottomLineNumber === viewport.endLineNumber) { - for (let i = previousFrame.length - 1; !previousFrameBottom && i >= 0; i--) { - if (previousFrame[i].lineNumber === bottomLineNumber) { - previousFrameBottom = previousFrame[i].ranges[0]; - } - } - } - if (previousFrameTop && !previousFrameTop.startStyle) { - previousFrameTop = null; - } - if (previousFrameBottom && !previousFrameBottom.startStyle) { - previousFrameBottom = null; - } - } - for (let i = 0, len = linesVisibleRanges.length; i < len; i++) { - // We know for a fact that there is precisely one range on each line - const curLineRange = linesVisibleRanges[i].ranges[0]; - const curLeft = curLineRange.left; - const curRight = curLineRange.left + curLineRange.width; - const startStyle = { - top: 0 /* EXTERN */, - bottom: 0 /* EXTERN */ - }; - const endStyle = { - top: 0 /* EXTERN */, - bottom: 0 /* EXTERN */ - }; - if (i > 0) { - // Look above - const prevLeft = linesVisibleRanges[i - 1].ranges[0].left; - const prevRight = linesVisibleRanges[i - 1].ranges[0].left + linesVisibleRanges[i - 1].ranges[0].width; - if (abs(curLeft - prevLeft) < epsilon) { - startStyle.top = 2 /* FLAT */; - } - else if (curLeft > prevLeft) { - startStyle.top = 1 /* INTERN */; - } - if (abs(curRight - prevRight) < epsilon) { - endStyle.top = 2 /* FLAT */; - } - else if (prevLeft < curRight && curRight < prevRight) { - endStyle.top = 1 /* INTERN */; - } - } - else if (previousFrameTop) { - // Accept some hiccups near the viewport edges to save on repaints - startStyle.top = previousFrameTop.startStyle.top; - endStyle.top = previousFrameTop.endStyle.top; - } - if (i + 1 < len) { - // Look below - const nextLeft = linesVisibleRanges[i + 1].ranges[0].left; - const nextRight = linesVisibleRanges[i + 1].ranges[0].left + linesVisibleRanges[i + 1].ranges[0].width; - if (abs(curLeft - nextLeft) < epsilon) { - startStyle.bottom = 2 /* FLAT */; - } - else if (nextLeft < curLeft && curLeft < nextRight) { - startStyle.bottom = 1 /* INTERN */; - } - if (abs(curRight - nextRight) < epsilon) { - endStyle.bottom = 2 /* FLAT */; - } - else if (curRight < nextRight) { - endStyle.bottom = 1 /* INTERN */; - } - } - else if (previousFrameBottom) { - // Accept some hiccups near the viewport edges to save on repaints - startStyle.bottom = previousFrameBottom.startStyle.bottom; - endStyle.bottom = previousFrameBottom.endStyle.bottom; - } - curLineRange.startStyle = startStyle; - curLineRange.endStyle = endStyle; - } - } - _getVisibleRangesWithStyle(selection, ctx, previousFrame) { - const _linesVisibleRanges = ctx.linesVisibleRangesForRange(selection, true) || []; - const linesVisibleRanges = _linesVisibleRanges.map(toStyled); - const visibleRangesHaveGaps = this._visibleRangesHaveGaps(linesVisibleRanges); - if (!isIEWithZoomingIssuesNearRoundedBorders && !visibleRangesHaveGaps && this._roundedSelection) { - this._enrichVisibleRangesWithStyle(ctx.visibleRange, linesVisibleRanges, previousFrame); - } - // The visible ranges are sorted TOP-BOTTOM and LEFT-RIGHT - return linesVisibleRanges; - } - _createSelectionPiece(top, height, className, left, width) { - return ('
    '); - } - _actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) { - if (visibleRanges.length === 0) { - return; - } - const visibleRangesHaveStyle = !!visibleRanges[0].ranges[0].startStyle; - const fullLineHeight = (this._lineHeight).toString(); - const reducedLineHeight = (this._lineHeight - 1).toString(); - const firstLineNumber = visibleRanges[0].lineNumber; - const lastLineNumber = visibleRanges[visibleRanges.length - 1].lineNumber; - for (let i = 0, len = visibleRanges.length; i < len; i++) { - const lineVisibleRanges = visibleRanges[i]; - const lineNumber = lineVisibleRanges.lineNumber; - const lineIndex = lineNumber - visibleStartLineNumber; - const lineHeight = hasMultipleSelections ? (lineNumber === lastLineNumber || lineNumber === firstLineNumber ? reducedLineHeight : fullLineHeight) : fullLineHeight; - const top = hasMultipleSelections ? (lineNumber === firstLineNumber ? 1 : 0) : 0; - let innerCornerOutput = ''; - let restOfSelectionOutput = ''; - for (let j = 0, lenJ = lineVisibleRanges.ranges.length; j < lenJ; j++) { - const visibleRange = lineVisibleRanges.ranges[j]; - if (visibleRangesHaveStyle) { - const startStyle = visibleRange.startStyle; - const endStyle = visibleRange.endStyle; - if (startStyle.top === 1 /* INTERN */ || startStyle.bottom === 1 /* INTERN */) { - // Reverse rounded corner to the left - // First comes the selection (blue layer) - innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH); - // Second comes the background (white layer) with inverse border radius - let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME; - if (startStyle.top === 1 /* INTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT; - } - if (startStyle.bottom === 1 /* INTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT; - } - innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH); - } - if (endStyle.top === 1 /* INTERN */ || endStyle.bottom === 1 /* INTERN */) { - // Reverse rounded corner to the right - // First comes the selection (blue layer) - innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH); - // Second comes the background (white layer) with inverse border radius - let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME; - if (endStyle.top === 1 /* INTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT; - } - if (endStyle.bottom === 1 /* INTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT; - } - innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH); - } - } - let className = SelectionsOverlay.SELECTION_CLASS_NAME; - if (visibleRangesHaveStyle) { - const startStyle = visibleRange.startStyle; - const endStyle = visibleRange.endStyle; - if (startStyle.top === 0 /* EXTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT; - } - if (startStyle.bottom === 0 /* EXTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT; - } - if (endStyle.top === 0 /* EXTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT; - } - if (endStyle.bottom === 0 /* EXTERN */) { - className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT; - } - } - restOfSelectionOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left, visibleRange.width); - } - output2[lineIndex][0] += innerCornerOutput; - output2[lineIndex][1] += restOfSelectionOutput; - } - } - prepareRender(ctx) { - // Build HTML for inner corners separate from HTML for the rest of selections, - // as the inner corner HTML can interfere with that of other selections. - // In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777. - const output = []; - const visibleStartLineNumber = ctx.visibleRange.startLineNumber; - const visibleEndLineNumber = ctx.visibleRange.endLineNumber; - for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { - const lineIndex = lineNumber - visibleStartLineNumber; - output[lineIndex] = ['', '']; - } - const thisFrameVisibleRangesWithStyle = []; - for (let i = 0, len = this._selections.length; i < len; i++) { - const selection = this._selections[i]; - if (selection.isEmpty()) { - thisFrameVisibleRangesWithStyle[i] = null; - continue; - } - const visibleRangesWithStyle = this._getVisibleRangesWithStyle(selection, ctx, this._previousFrameVisibleRangesWithStyle[i]); - thisFrameVisibleRangesWithStyle[i] = visibleRangesWithStyle; - this._actualRenderOneSelection(output, visibleStartLineNumber, this._selections.length > 1, visibleRangesWithStyle); - } - this._previousFrameVisibleRangesWithStyle = thisFrameVisibleRangesWithStyle; - this._renderResult = output.map(([internalCorners, restOfSelection]) => internalCorners + restOfSelection); - } - render(startLineNumber, lineNumber) { - if (!this._renderResult) { - return ''; - } - const lineIndex = lineNumber - startLineNumber; - if (lineIndex < 0 || lineIndex >= this._renderResult.length) { - return ''; - } - return this._renderResult[lineIndex]; - } -} -SelectionsOverlay.SELECTION_CLASS_NAME = 'selected-text'; -SelectionsOverlay.SELECTION_TOP_LEFT = 'top-left-radius'; -SelectionsOverlay.SELECTION_BOTTOM_LEFT = 'bottom-left-radius'; -SelectionsOverlay.SELECTION_TOP_RIGHT = 'top-right-radius'; -SelectionsOverlay.SELECTION_BOTTOM_RIGHT = 'bottom-right-radius'; -SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME = 'monaco-editor-background'; -SelectionsOverlay.ROUNDED_PIECE_WIDTH = 10; -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["registerThemingParticipant"])((theme, collector) => { - const editorSelectionColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorSelectionBackground"]); - if (editorSelectionColor) { - collector.addRule(`.monaco-editor .focused .selected-text { background-color: ${editorSelectionColor}; }`); - } - const editorInactiveSelectionColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorInactiveSelection"]); - if (editorInactiveSelectionColor) { - collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`); - } - const editorSelectionForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["editorSelectionForeground"]); - if (editorSelectionForegroundColor && !editorSelectionForegroundColor.isTransparent()) { - collector.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${editorSelectionForegroundColor}; }`); - } -}); -function abs(n) { - return n < 0 ? -n : n; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js ***! - \**********************************************************************************************/ -/*! exports provided: ViewCursor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewCursor", function() { return ViewCursor; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/browser/ui/mouseCursor/mouseCursor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -class ViewCursorRenderData { - constructor(top, left, width, height, textContent, textContentClassName) { - this.top = top; - this.left = left; - this.width = width; - this.height = height; - this.textContent = textContent; - this.textContentClassName = textContentClassName; - } -} -class ViewCursor { - constructor(context) { - this._context = context; - const options = this._context.configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - this._cursorStyle = options.get(19 /* cursorStyle */); - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - this._lineCursorWidth = Math.min(options.get(22 /* cursorWidth */), this._typicalHalfwidthCharacterWidth); - this._isVisible = true; - // Create the dom node - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this._domNode.setClassName(`cursor ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]}`); - this._domNode.setHeight(this._lineHeight); - this._domNode.setTop(0); - this._domNode.setLeft(0); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__["Configuration"].applyFontInfo(this._domNode, fontInfo); - this._domNode.setDisplay('none'); - this._position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"](1, 1); - this._lastRenderedContent = ''; - this._renderData = null; - } - getDomNode() { - return this._domNode; - } - getPosition() { - return this._position; - } - show() { - if (!this._isVisible) { - this._domNode.setVisibility('inherit'); - this._isVisible = true; - } - } - hide() { - if (this._isVisible) { - this._domNode.setVisibility('hidden'); - this._isVisible = false; - } - } - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - this._cursorStyle = options.get(19 /* cursorStyle */); - this._lineHeight = options.get(51 /* lineHeight */); - this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - this._lineCursorWidth = Math.min(options.get(22 /* cursorWidth */), this._typicalHalfwidthCharacterWidth); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_3__["Configuration"].applyFontInfo(this._domNode, fontInfo); - return true; - } - onCursorPositionChanged(position) { - this._position = position; - return true; - } - _prepareRender(ctx) { - let textContent = ''; - if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].Line || this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].LineThin) { - const visibleRange = ctx.visibleRangeForPosition(this._position); - if (!visibleRange || visibleRange.outsideRenderedLine) { - // Outside viewport - return null; - } - let width; - if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].Line) { - width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["computeScreenAwareSize"](this._lineCursorWidth > 0 ? this._lineCursorWidth : 2); - if (width > 2) { - const lineContent = this._context.model.getLineContent(this._position.lineNumber); - const nextCharLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["nextCharLength"](lineContent, this._position.column - 1); - textContent = lineContent.substr(this._position.column - 1, nextCharLength); - } - } - else { - width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["computeScreenAwareSize"](1); - } - let left = visibleRange.left; - if (width >= 2 && left >= 1) { - // try to center cursor - left -= 1; - } - const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; - return new ViewCursorRenderData(top, left, width, this._lineHeight, textContent, ''); - } - const lineContent = this._context.model.getLineContent(this._position.lineNumber); - const nextCharLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["nextCharLength"](lineContent, this._position.column - 1); - const visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + nextCharLength), false); - if (!visibleRangeForCharacter || visibleRangeForCharacter.length === 0) { - // Outside viewport - return null; - } - const firstVisibleRangeForCharacter = visibleRangeForCharacter[0]; - if (firstVisibleRangeForCharacter.outsideRenderedLine || firstVisibleRangeForCharacter.ranges.length === 0) { - // Outside viewport - return null; - } - const range = firstVisibleRangeForCharacter.ranges[0]; - const width = range.width < 1 ? this._typicalHalfwidthCharacterWidth : range.width; - let textContentClassName = ''; - if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].Block) { - const lineData = this._context.model.getViewLineData(this._position.lineNumber); - textContent = lineContent.substr(this._position.column - 1, nextCharLength); - const tokenIndex = lineData.tokens.findTokenIndexAtOffset(this._position.column - 1); - textContentClassName = lineData.tokens.getClassName(tokenIndex); - } - let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; - let height = this._lineHeight; - // Underline might interfere with clicking - if (this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].Underline || this._cursorStyle === _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["TextEditorCursorStyle"].UnderlineThin) { - top += this._lineHeight - 2; - height = 2; - } - return new ViewCursorRenderData(top, range.left, width, height, textContent, textContentClassName); - } - prepareRender(ctx) { - this._renderData = this._prepareRender(ctx); - } - render(ctx) { - if (!this._renderData) { - this._domNode.setDisplay('none'); - return null; - } - if (this._lastRenderedContent !== this._renderData.textContent) { - this._lastRenderedContent = this._renderData.textContent; - this._domNode.domNode.textContent = this._lastRenderedContent; - } - this._domNode.setClassName(`cursor ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_7__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]} ${this._renderData.textContentClassName}`); - this._domNode.setDisplay('block'); - this._domNode.setTop(this._renderData.top); - this._domNode.setLeft(this._renderData.left); - this._domNode.setWidth(this._renderData.width); - this._domNode.setLineHeight(this._renderData.height); - this._domNode.setHeight(this._renderData.height); - return { - domNode: this._domNode.domNode, - position: this._position, - contentLeft: this._renderData.left, - height: this._renderData.height, - width: 2 - }; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css ***! - \************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./viewCursors.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_viewCursors_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js ***! - \***********************************************************************************************/ -/*! exports provided: ViewCursors */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewCursors", function() { return ViewCursors; }); -/* harmony import */ var _viewCursors_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./viewCursors.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./viewCursor.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -class ViewCursors extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_3__["ViewPart"] { - constructor(context) { - super(context); - const options = this._context.configuration.options; - this._readOnly = options.get(72 /* readOnly */); - this._cursorBlinking = options.get(17 /* cursorBlinking */); - this._cursorStyle = options.get(19 /* cursorStyle */); - this._cursorSmoothCaretAnimation = options.get(18 /* cursorSmoothCaretAnimation */); - this._selectionIsEmpty = true; - this._isVisible = false; - this._primaryCursor = new _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__["ViewCursor"](this._context); - this._secondaryCursors = []; - this._renderData = []; - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._updateDomClassName(); - this._domNode.appendChild(this._primaryCursor.getDomNode()); - this._startCursorBlinkAnimation = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"](); - this._cursorFlatBlinkInterval = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["IntervalTimer"](); - this._blinkingEnabled = false; - this._editorHasFocus = false; - this._updateBlinking(); - } - dispose() { - super.dispose(); - this._startCursorBlinkAnimation.dispose(); - this._cursorFlatBlinkInterval.dispose(); - } - getDomNode() { - return this._domNode; - } - // --- begin event handlers - onConfigurationChanged(e) { - const options = this._context.configuration.options; - this._readOnly = options.get(72 /* readOnly */); - this._cursorBlinking = options.get(17 /* cursorBlinking */); - this._cursorStyle = options.get(19 /* cursorStyle */); - this._cursorSmoothCaretAnimation = options.get(18 /* cursorSmoothCaretAnimation */); - this._updateBlinking(); - this._updateDomClassName(); - this._primaryCursor.onConfigurationChanged(e); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._secondaryCursors[i].onConfigurationChanged(e); - } - return true; - } - _onCursorPositionChanged(position, secondaryPositions) { - this._primaryCursor.onCursorPositionChanged(position); - this._updateBlinking(); - if (this._secondaryCursors.length < secondaryPositions.length) { - // Create new cursors - const addCnt = secondaryPositions.length - this._secondaryCursors.length; - for (let i = 0; i < addCnt; i++) { - const newCursor = new _viewCursor_js__WEBPACK_IMPORTED_MODULE_4__["ViewCursor"](this._context); - this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling); - this._secondaryCursors.push(newCursor); - } - } - else if (this._secondaryCursors.length > secondaryPositions.length) { - // Remove some cursors - const removeCnt = this._secondaryCursors.length - secondaryPositions.length; - for (let i = 0; i < removeCnt; i++) { - this._domNode.removeChild(this._secondaryCursors[0].getDomNode()); - this._secondaryCursors.splice(0, 1); - } - } - for (let i = 0; i < secondaryPositions.length; i++) { - this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i]); - } - } - onCursorStateChanged(e) { - const positions = []; - for (let i = 0, len = e.selections.length; i < len; i++) { - positions[i] = e.selections[i].getPosition(); - } - this._onCursorPositionChanged(positions[0], positions.slice(1)); - const selectionIsEmpty = e.selections[0].isEmpty(); - if (this._selectionIsEmpty !== selectionIsEmpty) { - this._selectionIsEmpty = selectionIsEmpty; - this._updateDomClassName(); - } - return true; - } - onDecorationsChanged(e) { - // true for inline decorations that can end up relayouting text - return true; - } - onFlushed(e) { - return true; - } - onFocusChanged(e) { - this._editorHasFocus = e.isFocused; - this._updateBlinking(); - return false; - } - onLinesChanged(e) { - return true; - } - onLinesDeleted(e) { - return true; - } - onLinesInserted(e) { - return true; - } - onScrollChanged(e) { - return true; - } - onTokensChanged(e) { - const shouldRender = (position) => { - for (let i = 0, len = e.ranges.length; i < len; i++) { - if (e.ranges[i].fromLineNumber <= position.lineNumber && position.lineNumber <= e.ranges[i].toLineNumber) { - return true; - } - } - return false; - }; - if (shouldRender(this._primaryCursor.getPosition())) { - return true; - } - for (const secondaryCursor of this._secondaryCursors) { - if (shouldRender(secondaryCursor.getPosition())) { - return true; - } - } - return false; - } - onZonesChanged(e) { - return true; - } - // --- end event handlers - // ---- blinking logic - _getCursorBlinking() { - if (!this._editorHasFocus) { - return 0 /* Hidden */; - } - if (this._readOnly) { - return 5 /* Solid */; - } - return this._cursorBlinking; - } - _updateBlinking() { - this._startCursorBlinkAnimation.cancel(); - this._cursorFlatBlinkInterval.cancel(); - const blinkingStyle = this._getCursorBlinking(); - // hidden and solid are special as they involve no animations - const isHidden = (blinkingStyle === 0 /* Hidden */); - const isSolid = (blinkingStyle === 5 /* Solid */); - if (isHidden) { - this._hide(); - } - else { - this._show(); - } - this._blinkingEnabled = false; - this._updateDomClassName(); - if (!isHidden && !isSolid) { - if (blinkingStyle === 1 /* Blink */) { - // flat blinking is handled by JavaScript to save battery life due to Chromium step timing issue https://bugs.chromium.org/p/chromium/issues/detail?id=361587 - this._cursorFlatBlinkInterval.cancelAndSet(() => { - if (this._isVisible) { - this._hide(); - } - else { - this._show(); - } - }, ViewCursors.BLINK_INTERVAL); - } - else { - this._startCursorBlinkAnimation.setIfNotSet(() => { - this._blinkingEnabled = true; - this._updateDomClassName(); - }, ViewCursors.BLINK_INTERVAL); - } - } - } - // --- end blinking logic - _updateDomClassName() { - this._domNode.setClassName(this._getClassName()); - } - _getClassName() { - let result = 'cursors-layer'; - if (!this._selectionIsEmpty) { - result += ' has-selection'; - } - switch (this._cursorStyle) { - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].Line: - result += ' cursor-line-style'; - break; - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].Block: - result += ' cursor-block-style'; - break; - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].Underline: - result += ' cursor-underline-style'; - break; - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].LineThin: - result += ' cursor-line-thin-style'; - break; - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].BlockOutline: - result += ' cursor-block-outline-style'; - break; - case _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["TextEditorCursorStyle"].UnderlineThin: - result += ' cursor-underline-thin-style'; - break; - default: - result += ' cursor-line-style'; - } - if (this._blinkingEnabled) { - switch (this._getCursorBlinking()) { - case 1 /* Blink */: - result += ' cursor-blink'; - break; - case 2 /* Smooth */: - result += ' cursor-smooth'; - break; - case 3 /* Phase */: - result += ' cursor-phase'; - break; - case 4 /* Expand */: - result += ' cursor-expand'; - break; - case 5 /* Solid */: - result += ' cursor-solid'; - break; - default: - result += ' cursor-solid'; - } - } - else { - result += ' cursor-solid'; - } - if (this._cursorSmoothCaretAnimation) { - result += ' cursor-smooth-caret-animation'; - } - return result; - } - _show() { - this._primaryCursor.show(); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._secondaryCursors[i].show(); - } - this._isVisible = true; - } - _hide() { - this._primaryCursor.hide(); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._secondaryCursors[i].hide(); - } - this._isVisible = false; - } - // ---- IViewPart implementation - prepareRender(ctx) { - this._primaryCursor.prepareRender(ctx); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._secondaryCursors[i].prepareRender(ctx); - } - } - render(ctx) { - let renderData = [], renderDataLen = 0; - const primaryRenderData = this._primaryCursor.render(ctx); - if (primaryRenderData) { - renderData[renderDataLen++] = primaryRenderData; - } - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - const secondaryRenderData = this._secondaryCursors[i].render(ctx); - if (secondaryRenderData) { - renderData[renderDataLen++] = secondaryRenderData; - } - } - this._renderData = renderData; - } - getLastRenderData() { - return this._renderData; - } -} -ViewCursors.BLINK_INTERVAL = 500; -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["registerThemingParticipant"])((theme, collector) => { - const caret = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorCursorForeground"]); - if (caret) { - let caretBackground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorCursorBackground"]); - if (!caretBackground) { - caretBackground = caret.opposite(); - } - collector.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${caret}; border-color: ${caret}; color: ${caretBackground}; }`); - if (theme.type === 'hc') { - collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${caretBackground}; border-right: 1px solid ${caretBackground}; }`); - } - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js ***! - \*******************************************************************************************/ -/*! exports provided: ViewZones */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewZones", function() { return ViewZones; }); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../view/viewPart.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewPart.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const invalidFunc = () => { throw new Error(`Invalid change accessor`); }; -class ViewZones extends _view_viewPart_js__WEBPACK_IMPORTED_MODULE_2__["ViewPart"] { - constructor(context) { - super(context); - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._contentWidth = layoutInfo.contentWidth; - this._contentLeft = layoutInfo.contentLeft; - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(document.createElement('div')); - this.domNode.setClassName('view-zones'); - this.domNode.setPosition('absolute'); - this.domNode.setAttribute('role', 'presentation'); - this.domNode.setAttribute('aria-hidden', 'true'); - this.marginDomNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(document.createElement('div')); - this.marginDomNode.setClassName('margin-view-zones'); - this.marginDomNode.setPosition('absolute'); - this.marginDomNode.setAttribute('role', 'presentation'); - this.marginDomNode.setAttribute('aria-hidden', 'true'); - this._zones = {}; - } - dispose() { - super.dispose(); - this._zones = {}; - } - // ---- begin view event handlers - _recomputeWhitespacesProps() { - const whitespaces = this._context.viewLayout.getWhitespaces(); - const oldWhitespaces = new Map(); - for (const whitespace of whitespaces) { - oldWhitespaces.set(whitespace.id, whitespace); - } - let hadAChange = false; - this._context.model.changeWhitespace((whitespaceAccessor) => { - const keys = Object.keys(this._zones); - for (let i = 0, len = keys.length; i < len; i++) { - const id = keys[i]; - const zone = this._zones[id]; - const props = this._computeWhitespaceProps(zone.delegate); - const oldWhitespace = oldWhitespaces.get(id); - if (oldWhitespace && (oldWhitespace.afterLineNumber !== props.afterViewLineNumber || oldWhitespace.height !== props.heightInPx)) { - whitespaceAccessor.changeOneWhitespace(id, props.afterViewLineNumber, props.heightInPx); - this._safeCallOnComputedHeight(zone.delegate, props.heightInPx); - hadAChange = true; - } - } - }); - return hadAChange; - } - onConfigurationChanged(e) { - const options = this._context.configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this._lineHeight = options.get(51 /* lineHeight */); - this._contentWidth = layoutInfo.contentWidth; - this._contentLeft = layoutInfo.contentLeft; - if (e.hasChanged(51 /* lineHeight */)) { - this._recomputeWhitespacesProps(); - } - return true; - } - onLineMappingChanged(e) { - return this._recomputeWhitespacesProps(); - } - onLinesDeleted(e) { - return true; - } - onScrollChanged(e) { - return e.scrollTopChanged || e.scrollWidthChanged; - } - onZonesChanged(e) { - return true; - } - onLinesInserted(e) { - return true; - } - // ---- end view event handlers - _getZoneOrdinal(zone) { - if (typeof zone.afterColumn !== 'undefined') { - return zone.afterColumn; - } - return 10000; - } - _computeWhitespaceProps(zone) { - if (zone.afterLineNumber === 0) { - return { - afterViewLineNumber: 0, - heightInPx: this._heightInPixels(zone), - minWidthInPx: this._minWidthInPixels(zone) - }; - } - let zoneAfterModelPosition; - if (typeof zone.afterColumn !== 'undefined') { - zoneAfterModelPosition = this._context.model.validateModelPosition({ - lineNumber: zone.afterLineNumber, - column: zone.afterColumn - }); - } - else { - const validAfterLineNumber = this._context.model.validateModelPosition({ - lineNumber: zone.afterLineNumber, - column: 1 - }).lineNumber; - zoneAfterModelPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](validAfterLineNumber, this._context.model.getModelLineMaxColumn(validAfterLineNumber)); - } - let zoneBeforeModelPosition; - if (zoneAfterModelPosition.column === this._context.model.getModelLineMaxColumn(zoneAfterModelPosition.lineNumber)) { - zoneBeforeModelPosition = this._context.model.validateModelPosition({ - lineNumber: zoneAfterModelPosition.lineNumber + 1, - column: 1 - }); - } - else { - zoneBeforeModelPosition = this._context.model.validateModelPosition({ - lineNumber: zoneAfterModelPosition.lineNumber, - column: zoneAfterModelPosition.column + 1 - }); - } - const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition); - const isVisible = this._context.model.coordinatesConverter.modelPositionIsVisible(zoneBeforeModelPosition); - return { - afterViewLineNumber: viewPosition.lineNumber, - heightInPx: (isVisible ? this._heightInPixels(zone) : 0), - minWidthInPx: this._minWidthInPixels(zone) - }; - } - changeViewZones(callback) { - let zonesHaveChanged = false; - this._context.model.changeWhitespace((whitespaceAccessor) => { - const changeAccessor = { - addZone: (zone) => { - zonesHaveChanged = true; - return this._addZone(whitespaceAccessor, zone); - }, - removeZone: (id) => { - if (!id) { - return; - } - zonesHaveChanged = this._removeZone(whitespaceAccessor, id) || zonesHaveChanged; - }, - layoutZone: (id) => { - if (!id) { - return; - } - zonesHaveChanged = this._layoutZone(whitespaceAccessor, id) || zonesHaveChanged; - } - }; - safeInvoke1Arg(callback, changeAccessor); - // Invalidate changeAccessor - changeAccessor.addZone = invalidFunc; - changeAccessor.removeZone = invalidFunc; - changeAccessor.layoutZone = invalidFunc; - }); - return zonesHaveChanged; - } - _addZone(whitespaceAccessor, zone) { - const props = this._computeWhitespaceProps(zone); - const whitespaceId = whitespaceAccessor.insertWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx, props.minWidthInPx); - const myZone = { - whitespaceId: whitespaceId, - delegate: zone, - isVisible: false, - domNode: Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(zone.domNode), - marginDomNode: zone.marginDomNode ? Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_0__["createFastDomNode"])(zone.marginDomNode) : null - }; - this._safeCallOnComputedHeight(myZone.delegate, props.heightInPx); - myZone.domNode.setPosition('absolute'); - myZone.domNode.domNode.style.width = '100%'; - myZone.domNode.setDisplay('none'); - myZone.domNode.setAttribute('monaco-view-zone', myZone.whitespaceId); - this.domNode.appendChild(myZone.domNode); - if (myZone.marginDomNode) { - myZone.marginDomNode.setPosition('absolute'); - myZone.marginDomNode.domNode.style.width = '100%'; - myZone.marginDomNode.setDisplay('none'); - myZone.marginDomNode.setAttribute('monaco-view-zone', myZone.whitespaceId); - this.marginDomNode.appendChild(myZone.marginDomNode); - } - this._zones[myZone.whitespaceId] = myZone; - this.setShouldRender(); - return myZone.whitespaceId; - } - _removeZone(whitespaceAccessor, id) { - if (this._zones.hasOwnProperty(id)) { - const zone = this._zones[id]; - delete this._zones[id]; - whitespaceAccessor.removeWhitespace(zone.whitespaceId); - zone.domNode.removeAttribute('monaco-visible-view-zone'); - zone.domNode.removeAttribute('monaco-view-zone'); - zone.domNode.domNode.parentNode.removeChild(zone.domNode.domNode); - if (zone.marginDomNode) { - zone.marginDomNode.removeAttribute('monaco-visible-view-zone'); - zone.marginDomNode.removeAttribute('monaco-view-zone'); - zone.marginDomNode.domNode.parentNode.removeChild(zone.marginDomNode.domNode); - } - this.setShouldRender(); - return true; - } - return false; - } - _layoutZone(whitespaceAccessor, id) { - if (this._zones.hasOwnProperty(id)) { - const zone = this._zones[id]; - const props = this._computeWhitespaceProps(zone.delegate); - // const newOrdinal = this._getZoneOrdinal(zone.delegate); - whitespaceAccessor.changeOneWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx); - // TODO@Alex: change `newOrdinal` too - this._safeCallOnComputedHeight(zone.delegate, props.heightInPx); - this.setShouldRender(); - return true; - } - return false; - } - shouldSuppressMouseDownOnViewZone(id) { - if (this._zones.hasOwnProperty(id)) { - const zone = this._zones[id]; - return Boolean(zone.delegate.suppressMouseDown); - } - return false; - } - _heightInPixels(zone) { - if (typeof zone.heightInPx === 'number') { - return zone.heightInPx; - } - if (typeof zone.heightInLines === 'number') { - return this._lineHeight * zone.heightInLines; - } - return this._lineHeight; - } - _minWidthInPixels(zone) { - if (typeof zone.minWidthInPx === 'number') { - return zone.minWidthInPx; - } - return 0; - } - _safeCallOnComputedHeight(zone, height) { - if (typeof zone.onComputedHeight === 'function') { - try { - zone.onComputedHeight(height); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - } - } - } - _safeCallOnDomNodeTop(zone, top) { - if (typeof zone.onDomNodeTop === 'function') { - try { - zone.onDomNodeTop(top); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - } - } - } - prepareRender(ctx) { - // Nothing to read - } - render(ctx) { - const visibleWhitespaces = ctx.viewportData.whitespaceViewportData; - const visibleZones = {}; - let hasVisibleZone = false; - for (let i = 0, len = visibleWhitespaces.length; i < len; i++) { - visibleZones[visibleWhitespaces[i].id] = visibleWhitespaces[i]; - hasVisibleZone = true; - } - const keys = Object.keys(this._zones); - for (let i = 0, len = keys.length; i < len; i++) { - const id = keys[i]; - const zone = this._zones[id]; - let newTop = 0; - let newHeight = 0; - let newDisplay = 'none'; - if (visibleZones.hasOwnProperty(id)) { - newTop = visibleZones[id].verticalOffset - ctx.bigNumbersDelta; - newHeight = visibleZones[id].height; - newDisplay = 'block'; - // zone is visible - if (!zone.isVisible) { - zone.domNode.setAttribute('monaco-visible-view-zone', 'true'); - zone.isVisible = true; - } - this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(visibleZones[id].verticalOffset)); - } - else { - if (zone.isVisible) { - zone.domNode.removeAttribute('monaco-visible-view-zone'); - zone.isVisible = false; - } - this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(-1000000)); - } - zone.domNode.setTop(newTop); - zone.domNode.setHeight(newHeight); - zone.domNode.setDisplay(newDisplay); - if (zone.marginDomNode) { - zone.marginDomNode.setTop(newTop); - zone.marginDomNode.setHeight(newHeight); - zone.marginDomNode.setDisplay(newDisplay); - } - } - if (hasVisibleZone) { - this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth)); - this.marginDomNode.setWidth(this._contentLeft); - } - } -} -function safeInvoke1Arg(func, arg1) { - try { - return func(arg1); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js ***! - \*************************************************************************************/ -/*! exports provided: CodeEditorWidget, BooleanEventEmitter, EditorModeContext */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeEditorWidget", function() { return CodeEditorWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanEventEmitter", function() { return BooleanEventEmitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorModeContext", function() { return EditorModeContext; }); -/* harmony import */ var _media_editor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/editor.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _view_viewImpl_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../view/viewImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewImpl.js"); -/* harmony import */ var _view_viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../view/viewUserInputEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_controller_cursor_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/controller/cursor.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js"); -/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorAction_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../common/editorAction.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js"); -/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/editorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _common_viewModel_viewModelImpl_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../common/viewModel/viewModelImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _common_viewModel_monospaceLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../common/viewModel/monospaceLineBreaksComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js"); -/* harmony import */ var _view_domLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../view/domLineBreaksComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js"); -/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -let EDITOR_ID = 0; -class ModelData { - constructor(model, viewModel, view, hasRealView, listenersToRemove) { - this.model = model; - this.viewModel = viewModel; - this.view = view; - this.hasRealView = hasRealView; - this.listenersToRemove = listenersToRemove; - } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["dispose"])(this.listenersToRemove); - this.model.onBeforeDetached(); - if (this.hasRealView) { - this.view.dispose(); - } - this.viewModel.dispose(); - } -} -let CodeEditorWidget = class CodeEditorWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(domElement, options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) { - super(); - //#region Eventing - this._onDidDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidDispose = this._onDidDispose.event; - this._onDidChangeModelContent = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModelContent = this._onDidChangeModelContent.event; - this._onDidChangeModelLanguage = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModelLanguage = this._onDidChangeModelLanguage.event; - this._onDidChangeModelLanguageConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModelLanguageConfiguration = this._onDidChangeModelLanguageConfiguration.event; - this._onDidChangeModelOptions = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModelOptions = this._onDidChangeModelOptions.event; - this._onDidChangeModelDecorations = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModelDecorations = this._onDidChangeModelDecorations.event; - this._onDidChangeConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeConfiguration = this._onDidChangeConfiguration.event; - this._onDidChangeModel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeModel = this._onDidChangeModel.event; - this._onDidChangeCursorPosition = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeCursorPosition = this._onDidChangeCursorPosition.event; - this._onDidChangeCursorSelection = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeCursorSelection = this._onDidChangeCursorSelection.event; - this._onDidAttemptReadOnlyEdit = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidAttemptReadOnlyEdit = this._onDidAttemptReadOnlyEdit.event; - this._onDidLayoutChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidLayoutChange = this._onDidLayoutChange.event; - this._editorTextFocus = this._register(new BooleanEventEmitter()); - this.onDidFocusEditorText = this._editorTextFocus.onDidChangeToTrue; - this.onDidBlurEditorText = this._editorTextFocus.onDidChangeToFalse; - this._editorWidgetFocus = this._register(new BooleanEventEmitter()); - this.onDidFocusEditorWidget = this._editorWidgetFocus.onDidChangeToTrue; - this.onDidBlurEditorWidget = this._editorWidgetFocus.onDidChangeToFalse; - this._onWillType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onWillType = this._onWillType.event; - this._onDidType = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidType = this._onDidType.event; - this._onDidCompositionStart = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidCompositionStart = this._onDidCompositionStart.event; - this._onDidCompositionEnd = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidCompositionEnd = this._onDidCompositionEnd.event; - this._onDidPaste = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidPaste = this._onDidPaste.event; - this._onMouseUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseUp = this._onMouseUp.event; - this._onMouseDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseDown = this._onMouseDown.event; - this._onMouseDrag = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseDrag = this._onMouseDrag.event; - this._onMouseDrop = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseDrop = this._onMouseDrop.event; - this._onContextMenu = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onContextMenu = this._onContextMenu.event; - this._onMouseMove = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseMove = this._onMouseMove.event; - this._onMouseLeave = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseLeave = this._onMouseLeave.event; - this._onMouseWheel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onMouseWheel = this._onMouseWheel.event; - this._onKeyUp = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onKeyUp = this._onKeyUp.event; - this._onKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onKeyDown = this._onKeyDown.event; - this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidContentSizeChange = this._onDidContentSizeChange.event; - this._onDidScrollChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidScrollChange = this._onDidScrollChange.event; - this._onDidChangeViewZones = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeViewZones = this._onDidChangeViewZones.event; - options = options || {}; - this._domElement = domElement; - this._overflowWidgetsDomNode = options.overflowWidgetsDomNode; - this._id = (++EDITOR_ID); - this._decorationTypeKeysToIds = {}; - this._decorationTypeSubtypes = {}; - this.isSimpleWidget = codeEditorWidgetOptions.isSimpleWidget || false; - this._telemetryData = codeEditorWidgetOptions.telemetryData; - this._configuration = this._register(this._createConfiguration(options, accessibilityService)); - this._register(this._configuration.onDidChange((e) => { - this._onDidChangeConfiguration.fire(e); - const options = this._configuration.options; - if (e.hasChanged(117 /* layoutInfo */)) { - const layoutInfo = options.get(117 /* layoutInfo */); - this._onDidLayoutChange.fire(layoutInfo); - } - })); - this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement)); - this._notificationService = notificationService; - this._codeEditorService = codeEditorService; - this._commandService = commandService; - this._themeService = themeService; - this._register(new EditorContextKeysManager(this, this._contextKeyService)); - this._register(new EditorModeContext(this, this._contextKeyService)); - this._instantiationService = instantiationService.createChild(new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_28__["ServiceCollection"]([_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_26__["IContextKeyService"], this._contextKeyService])); - this._modelData = null; - this._contributions = {}; - this._actions = {}; - this._focusTracker = new CodeEditorWidgetFocusTracker(domElement); - this._focusTracker.onChange(() => { - this._editorWidgetFocus.setValue(this._focusTracker.hasFocus()); - }); - this._contentWidgets = {}; - this._overlayWidgets = {}; - let contributions; - if (Array.isArray(codeEditorWidgetOptions.contributions)) { - contributions = codeEditorWidgetOptions.contributions; - } - else { - contributions = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["EditorExtensionsRegistry"].getEditorContributions(); - } - for (const desc of contributions) { - try { - const contribution = this._instantiationService.createInstance(desc.ctor, this); - this._contributions[desc.id] = contribution; - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"])(err); - } - } - _editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["EditorExtensionsRegistry"].getEditorActions().forEach((action) => { - const internalAction = new _common_editorAction_js__WEBPACK_IMPORTED_MODULE_18__["InternalEditorAction"](action.id, action.label, action.alias, Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_32__["withNullAsUndefined"])(action.precondition), () => { - return this._instantiationService.invokeFunction((accessor) => { - return Promise.resolve(action.runEditorCommand(accessor, this, null)); - }); - }, this._contextKeyService); - this._actions[internalAction.id] = internalAction; - }); - this._codeEditorService.addCodeEditor(this); - } - _createConfiguration(options, accessibilityService) { - return new _config_configuration_js__WEBPACK_IMPORTED_MODULE_7__["Configuration"](this.isSimpleWidget, options, this._domElement, accessibilityService); - } - getId() { - return this.getEditorType() + ':' + this._id; - } - getEditorType() { - return _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_19__["EditorType"].ICodeEditor; - } - dispose() { - this._codeEditorService.removeCodeEditor(this); - this._focusTracker.dispose(); - const keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - const contributionId = keys[i]; - this._contributions[contributionId].dispose(); - } - this._removeDecorationTypes(); - this._postDetachModelCleanup(this._detachModel()); - this._onDidDispose.fire(); - super.dispose(); - } - invokeWithinContext(fn) { - return this._instantiationService.invokeFunction(fn); - } - updateOptions(newOptions) { - this._configuration.updateOptions(newOptions); - } - getOptions() { - return this._configuration.options; - } - getOption(id) { - return this._configuration.options.get(id); - } - getRawOptions() { - return this._configuration.getRawOptions(); - } - getOverflowWidgetsDomNode() { - return this._overflowWidgetsDomNode; - } - getConfiguredWordAtPosition(position) { - if (!this._modelData) { - return null; - } - return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_35__["WordOperations"].getWordAtPosition(this._modelData.model, this._configuration.options.get(105 /* wordSeparators */), position); - } - getValue(options = null) { - if (!this._modelData) { - return ''; - } - const preserveBOM = (options && options.preserveBOM) ? true : false; - let eolPreference = 0 /* TextDefined */; - if (options && options.lineEnding && options.lineEnding === '\n') { - eolPreference = 1 /* LF */; - } - else if (options && options.lineEnding && options.lineEnding === '\r\n') { - eolPreference = 2 /* CRLF */; - } - return this._modelData.model.getValue(eolPreference, preserveBOM); - } - setValue(newValue) { - if (!this._modelData) { - return; - } - this._modelData.model.setValue(newValue); - } - getModel() { - if (!this._modelData) { - return null; - } - return this._modelData.model; - } - setModel(_model = null) { - const model = _model; - if (this._modelData === null && model === null) { - // Current model is the new model - return; - } - if (this._modelData && this._modelData.model === model) { - // Current model is the new model - return; - } - const hasTextFocus = this.hasTextFocus(); - const detachedModel = this._detachModel(); - this._attachModel(model); - if (hasTextFocus && this.hasModel()) { - this.focus(); - } - const e = { - oldModelUrl: detachedModel ? detachedModel.uri : null, - newModelUrl: model ? model.uri : null - }; - this._removeDecorationTypes(); - this._onDidChangeModel.fire(e); - this._postDetachModelCleanup(detachedModel); - } - _removeDecorationTypes() { - this._decorationTypeKeysToIds = {}; - if (this._decorationTypeSubtypes) { - for (let decorationType in this._decorationTypeSubtypes) { - const subTypes = this._decorationTypeSubtypes[decorationType]; - for (let subType in subTypes) { - this._removeDecorationType(decorationType + '-' + subType); - } - } - this._decorationTypeSubtypes = {}; - } - } - getVisibleRanges() { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.getVisibleRanges(); - } - getVisibleRangesPlusViewportAboveBelow() { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow(); - } - getWhitespaces() { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.viewLayout.getWhitespaces(); - } - static _getVerticalOffsetForPosition(modelData, modelLineNumber, modelColumn) { - const modelPosition = modelData.model.validatePosition({ - lineNumber: modelLineNumber, - column: modelColumn - }); - const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber); - } - getTopForLineNumber(lineNumber) { - if (!this._modelData) { - return -1; - } - return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, 1); - } - getTopForPosition(lineNumber, column) { - if (!this._modelData) { - return -1; - } - return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, column); - } - setHiddenAreas(ranges) { - if (this._modelData) { - this._modelData.viewModel.setHiddenAreas(ranges.map(r => _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"].lift(r))); - } - } - getVisibleColumnFromPosition(rawPosition) { - if (!this._modelData) { - return rawPosition.column; - } - const position = this._modelData.model.validatePosition(rawPosition); - const tabSize = this._modelData.model.getOptions().tabSize; - return _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_14__["CursorColumns"].visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1; - } - getPosition() { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getPosition(); - } - setPosition(position) { - if (!this._modelData) { - return; - } - if (!_common_core_position_js__WEBPACK_IMPORTED_MODULE_15__["Position"].isIPosition(position)) { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.setSelections('api', [{ - selectionStartLineNumber: position.lineNumber, - selectionStartColumn: position.column, - positionLineNumber: position.lineNumber, - positionColumn: position.column - }]); - } - _sendRevealRange(modelRange, verticalType, revealHorizontal, scrollType) { - if (!this._modelData) { - return; - } - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"].isIRange(modelRange)) { - throw new Error('Invalid arguments'); - } - const validatedModelRange = this._modelData.model.validateRange(modelRange); - const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange); - this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType); - } - revealLine(lineNumber, scrollType = 0 /* Smooth */) { - this._revealLine(lineNumber, 0 /* Simple */, scrollType); - } - revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) { - this._revealLine(lineNumber, 1 /* Center */, scrollType); - } - revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) { - this._revealLine(lineNumber, 2 /* CenterIfOutsideViewport */, scrollType); - } - revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) { - this._revealLine(lineNumber, 5 /* NearTop */, scrollType); - } - _revealLine(lineNumber, revealType, scrollType) { - if (typeof lineNumber !== 'number') { - throw new Error('Invalid arguments'); - } - this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"](lineNumber, 1, lineNumber, 1), revealType, false, scrollType); - } - revealPosition(position, scrollType = 0 /* Smooth */) { - this._revealPosition(position, 0 /* Simple */, true, scrollType); - } - revealPositionInCenter(position, scrollType = 0 /* Smooth */) { - this._revealPosition(position, 1 /* Center */, true, scrollType); - } - revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) { - this._revealPosition(position, 2 /* CenterIfOutsideViewport */, true, scrollType); - } - revealPositionNearTop(position, scrollType = 0 /* Smooth */) { - this._revealPosition(position, 5 /* NearTop */, true, scrollType); - } - _revealPosition(position, verticalType, revealHorizontal, scrollType) { - if (!_common_core_position_js__WEBPACK_IMPORTED_MODULE_15__["Position"].isIPosition(position)) { - throw new Error('Invalid arguments'); - } - this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"](position.lineNumber, position.column, position.lineNumber, position.column), verticalType, revealHorizontal, scrollType); - } - getSelection() { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getSelection(); - } - getSelections() { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getSelections(); - } - setSelection(something) { - const isSelection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_17__["Selection"].isISelection(something); - const isRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"].isIRange(something); - if (!isSelection && !isRange) { - throw new Error('Invalid arguments'); - } - if (isSelection) { - this._setSelectionImpl(something); - } - else if (isRange) { - // act as if it was an IRange - const selection = { - selectionStartLineNumber: something.startLineNumber, - selectionStartColumn: something.startColumn, - positionLineNumber: something.endLineNumber, - positionColumn: something.endColumn - }; - this._setSelectionImpl(selection); - } - } - _setSelectionImpl(sel) { - if (!this._modelData) { - return; - } - const selection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_17__["Selection"](sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); - this._modelData.viewModel.setSelections('api', [selection]); - } - revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this._revealLines(startLineNumber, endLineNumber, 0 /* Simple */, scrollType); - } - revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this._revealLines(startLineNumber, endLineNumber, 1 /* Center */, scrollType); - } - revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this._revealLines(startLineNumber, endLineNumber, 2 /* CenterIfOutsideViewport */, scrollType); - } - revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this._revealLines(startLineNumber, endLineNumber, 5 /* NearTop */, scrollType); - } - _revealLines(startLineNumber, endLineNumber, verticalType, scrollType) { - if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') { - throw new Error('Invalid arguments'); - } - this._sendRevealRange(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"](startLineNumber, 1, endLineNumber, 1), verticalType, false, scrollType); - } - revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) { - this._revealRange(range, revealVerticalInCenter ? 1 /* Center */ : 0 /* Simple */, revealHorizontal, scrollType); - } - revealRangeInCenter(range, scrollType = 0 /* Smooth */) { - this._revealRange(range, 1 /* Center */, true, scrollType); - } - revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) { - this._revealRange(range, 2 /* CenterIfOutsideViewport */, true, scrollType); - } - revealRangeNearTop(range, scrollType = 0 /* Smooth */) { - this._revealRange(range, 5 /* NearTop */, true, scrollType); - } - revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) { - this._revealRange(range, 6 /* NearTopIfOutsideViewport */, true, scrollType); - } - revealRangeAtTop(range, scrollType = 0 /* Smooth */) { - this._revealRange(range, 3 /* Top */, true, scrollType); - } - _revealRange(range, verticalType, revealHorizontal, scrollType) { - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"].isIRange(range)) { - throw new Error('Invalid arguments'); - } - this._sendRevealRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"].lift(range), verticalType, revealHorizontal, scrollType); - } - setSelections(ranges, source = 'api') { - if (!this._modelData) { - return; - } - if (!ranges || ranges.length === 0) { - throw new Error('Invalid arguments'); - } - for (let i = 0, len = ranges.length; i < len; i++) { - if (!_common_core_selection_js__WEBPACK_IMPORTED_MODULE_17__["Selection"].isISelection(ranges[i])) { - throw new Error('Invalid arguments'); - } - } - this._modelData.viewModel.setSelections(source, ranges); - } - getContentWidth() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getContentWidth(); - } - getScrollWidth() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getScrollWidth(); - } - getScrollLeft() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getCurrentScrollLeft(); - } - getContentHeight() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getContentHeight(); - } - getScrollHeight() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getScrollHeight(); - } - getScrollTop() { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getCurrentScrollTop(); - } - setScrollLeft(newScrollLeft, scrollType = 1 /* Immediate */) { - if (!this._modelData) { - return; - } - if (typeof newScrollLeft !== 'number') { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.setScrollPosition({ - scrollLeft: newScrollLeft - }, scrollType); - } - setScrollTop(newScrollTop, scrollType = 1 /* Immediate */) { - if (!this._modelData) { - return; - } - if (typeof newScrollTop !== 'number') { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.setScrollPosition({ - scrollTop: newScrollTop - }, scrollType); - } - setScrollPosition(position, scrollType = 1 /* Immediate */) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.setScrollPosition(position, scrollType); - } - saveViewState() { - if (!this._modelData) { - return null; - } - const contributionsState = {}; - const keys = Object.keys(this._contributions); - for (const id of keys) { - const contribution = this._contributions[id]; - if (typeof contribution.saveViewState === 'function') { - contributionsState[id] = contribution.saveViewState(); - } - } - const cursorState = this._modelData.viewModel.saveCursorState(); - const viewState = this._modelData.viewModel.saveState(); - return { - cursorState: cursorState, - viewState: viewState, - contributionsState: contributionsState - }; - } - restoreViewState(s) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - const codeEditorState = s; - if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) { - const cursorState = codeEditorState.cursorState; - if (Array.isArray(cursorState)) { - this._modelData.viewModel.restoreCursorState(cursorState); - } - else { - // Backwards compatibility - this._modelData.viewModel.restoreCursorState([cursorState]); - } - const contributionsState = codeEditorState.contributionsState || {}; - const keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - const id = keys[i]; - const contribution = this._contributions[id]; - if (typeof contribution.restoreViewState === 'function') { - contribution.restoreViewState(contributionsState[id]); - } - } - const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState); - this._modelData.view.restoreState(reducedState); - } - } - getContribution(id) { - return (this._contributions[id] || null); - } - getActions() { - const result = []; - const keys = Object.keys(this._actions); - for (let i = 0, len = keys.length; i < len; i++) { - const id = keys[i]; - result.push(this._actions[id]); - } - return result; - } - getSupportedActions() { - let result = this.getActions(); - result = result.filter(action => action.isSupported()); - return result; - } - getAction(id) { - return this._actions[id] || null; - } - trigger(source, handlerId, payload) { - payload = payload || {}; - switch (handlerId) { - case "compositionStart" /* CompositionStart */: - this._startComposition(); - return; - case "compositionEnd" /* CompositionEnd */: - this._endComposition(source); - return; - case "type" /* Type */: { - const args = payload; - this._type(source, args.text || ''); - return; - } - case "replacePreviousChar" /* ReplacePreviousChar */: { - const args = payload; - this._replacePreviousChar(source, args.text || '', args.replaceCharCnt || 0); - return; - } - case "paste" /* Paste */: { - const args = payload; - this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null); - return; - } - case "cut" /* Cut */: - this._cut(source); - return; - } - const action = this.getAction(handlerId); - if (action) { - Promise.resolve(action.run()).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"]); - return; - } - if (!this._modelData) { - return; - } - if (this._triggerEditorCommand(source, handlerId, payload)) { - return; - } - } - _startComposition() { - if (!this._modelData) { - return; - } - this._modelData.viewModel.startComposition(); - this._onDidCompositionStart.fire(); - } - _endComposition(source) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.endComposition(source); - this._onDidCompositionEnd.fire(); - } - _type(source, text) { - if (!this._modelData || text.length === 0) { - return; - } - if (source === 'keyboard') { - this._onWillType.fire(text); - } - this._modelData.viewModel.type(text, source); - if (source === 'keyboard') { - this._onDidType.fire(text); - } - } - _replacePreviousChar(source, text, replaceCharCnt) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.replacePreviousChar(text, replaceCharCnt, source); - } - _paste(source, text, pasteOnNewLine, multicursorText, mode) { - if (!this._modelData || text.length === 0) { - return; - } - const startPosition = this._modelData.viewModel.getSelection().getStartPosition(); - this._modelData.viewModel.paste(text, pasteOnNewLine, multicursorText, source); - const endPosition = this._modelData.viewModel.getSelection().getStartPosition(); - if (source === 'keyboard') { - this._onDidPaste.fire({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_16__["Range"](startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column), - mode: mode - }); - } - } - _cut(source) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.cut(source); - } - _triggerEditorCommand(source, handlerId, payload) { - const command = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["EditorExtensionsRegistry"].getEditorCommand(handlerId); - if (command) { - payload = payload || {}; - payload.source = source; - this._instantiationService.invokeFunction((accessor) => { - Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"]); - }); - return true; - } - return false; - } - _getViewModel() { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel; - } - pushUndoStop() { - if (!this._modelData) { - return false; - } - if (this._configuration.options.get(72 /* readOnly */)) { - // read only editor => sorry! - return false; - } - this._modelData.model.pushStackElement(); - return true; - } - executeEdits(source, edits, endCursorState) { - if (!this._modelData) { - return false; - } - if (this._configuration.options.get(72 /* readOnly */)) { - // read only editor => sorry! - return false; - } - let cursorStateComputer; - if (!endCursorState) { - cursorStateComputer = () => null; - } - else if (Array.isArray(endCursorState)) { - cursorStateComputer = () => endCursorState; - } - else { - cursorStateComputer = endCursorState; - } - this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer); - return true; - } - executeCommand(source, command) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.executeCommand(command, source); - } - executeCommands(source, commands) { - if (!this._modelData) { - return; - } - this._modelData.viewModel.executeCommands(commands, source); - } - changeDecorations(callback) { - if (!this._modelData) { - // callback will not be called - return null; - } - return this._modelData.model.changeDecorations(callback, this._id); - } - getLineDecorations(lineNumber) { - if (!this._modelData) { - return null; - } - return this._modelData.model.getLineDecorations(lineNumber, this._id, Object(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_12__["filterValidationDecorations"])(this._configuration.options)); - } - deltaDecorations(oldDecorations, newDecorations) { - if (!this._modelData) { - return []; - } - if (oldDecorations.length === 0 && newDecorations.length === 0) { - return oldDecorations; - } - return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id); - } - removeDecorations(decorationTypeKey) { - // remove decorations for type and sub type - const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey]; - if (oldDecorationsIds) { - this.deltaDecorations(oldDecorationsIds, []); - } - if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) { - delete this._decorationTypeKeysToIds[decorationTypeKey]; - } - if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) { - delete this._decorationTypeSubtypes[decorationTypeKey]; - } - } - getLayoutInfo() { - const options = this._configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - return layoutInfo; - } - createOverviewRuler(cssClassName) { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.createOverviewRuler(cssClassName); - } - getContainerDomNode() { - return this._domElement; - } - getDomNode() { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.domNode.domNode; - } - delegateVerticalScrollbarMouseDown(browserEvent) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.delegateVerticalScrollbarMouseDown(browserEvent); - } - layout(dimension) { - this._configuration.observeReferenceElement(dimension); - this.render(); - } - focus() { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.focus(); - } - hasTextFocus() { - if (!this._modelData || !this._modelData.hasRealView) { - return false; - } - return this._modelData.view.isFocused(); - } - hasWidgetFocus() { - return this._focusTracker && this._focusTracker.hasFocus(); - } - addContentWidget(widget) { - const widgetData = { - widget: widget, - position: widget.getPosition() - }; - if (this._contentWidgets.hasOwnProperty(widget.getId())) { - console.warn('Overwriting a content widget with the same id.'); - } - this._contentWidgets[widget.getId()] = widgetData; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.addContentWidget(widgetData); - } - } - layoutContentWidget(widget) { - const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._contentWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.layoutContentWidget(widgetData); - } - } - } - removeContentWidget(widget) { - const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._contentWidgets[widgetId]; - delete this._contentWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.removeContentWidget(widgetData); - } - } - } - addOverlayWidget(widget) { - const widgetData = { - widget: widget, - position: widget.getPosition() - }; - if (this._overlayWidgets.hasOwnProperty(widget.getId())) { - console.warn('Overwriting an overlay widget with the same id.'); - } - this._overlayWidgets[widget.getId()] = widgetData; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.addOverlayWidget(widgetData); - } - } - layoutOverlayWidget(widget) { - const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._overlayWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.layoutOverlayWidget(widgetData); - } - } - } - removeOverlayWidget(widget) { - const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._overlayWidgets[widgetId]; - delete this._overlayWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.removeOverlayWidget(widgetData); - } - } - } - changeViewZones(callback) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.change(callback); - } - getTargetAtClientPoint(clientX, clientY) { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.getTargetAtClientPoint(clientX, clientY); - } - getScrolledVisiblePosition(rawPosition) { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - const position = this._modelData.model.validatePosition(rawPosition); - const options = this._configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop(); - const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft(); - return { - top: top, - left: left, - height: options.get(51 /* lineHeight */) - }; - } - getOffsetForColumn(lineNumber, column) { - if (!this._modelData || !this._modelData.hasRealView) { - return -1; - } - return this._modelData.view.getOffsetForColumn(lineNumber, column); - } - render(forceRedraw = false) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.render(true, forceRedraw); - } - setAriaOptions(options) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.setAriaOptions(options); - } - applyFontInfo(target) { - _config_configuration_js__WEBPACK_IMPORTED_MODULE_7__["Configuration"].applyFontInfoSlow(target, this._configuration.options.get(36 /* fontInfo */)); - } - _attachModel(model) { - if (!model) { - this._modelData = null; - return; - } - const listenersToRemove = []; - this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language); - this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines()); - this._configuration.setMaxLineNumber(model.getLineCount()); - model.onBeforeAttached(); - const viewModel = new _common_viewModel_viewModelImpl_js__WEBPACK_IMPORTED_MODULE_24__["ViewModel"](this._id, this._configuration, model, _view_domLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_34__["DOMLineBreaksComputerFactory"].create(), _common_viewModel_monospaceLineBreaksComputer_js__WEBPACK_IMPORTED_MODULE_33__["MonospaceLineBreaksComputerFactory"].create(this._configuration.options), (callback) => _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["scheduleAtNextAnimationFrame"](callback)); - listenersToRemove.push(model.onDidChangeDecorations((e) => this._onDidChangeModelDecorations.fire(e))); - listenersToRemove.push(model.onDidChangeLanguage((e) => { - this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language); - this._onDidChangeModelLanguage.fire(e); - })); - listenersToRemove.push(model.onDidChangeLanguageConfiguration((e) => this._onDidChangeModelLanguageConfiguration.fire(e))); - listenersToRemove.push(model.onDidChangeContent((e) => this._onDidChangeModelContent.fire(e))); - listenersToRemove.push(model.onDidChangeOptions((e) => this._onDidChangeModelOptions.fire(e))); - // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model - listenersToRemove.push(model.onWillDispose(() => this.setModel(null))); - listenersToRemove.push(viewModel.onEvent((e) => { - switch (e.kind) { - case 0 /* ContentSizeChanged */: - this._onDidContentSizeChange.fire(e); - break; - case 1 /* FocusChanged */: - this._editorTextFocus.setValue(e.hasFocus); - break; - case 2 /* ScrollChanged */: - this._onDidScrollChange.fire(e); - break; - case 3 /* ViewZonesChanged */: - this._onDidChangeViewZones.fire(); - break; - case 4 /* ReadOnlyEditAttempt */: - this._onDidAttemptReadOnlyEdit.fire(); - break; - case 5 /* CursorStateChanged */: { - if (e.reachedMaxCursorCount) { - this._notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('cursors.maximum', "The number of cursors has been limited to {0}.", _common_controller_cursor_js__WEBPACK_IMPORTED_MODULE_13__["Cursor"].MAX_CURSOR_COUNT)); - } - const positions = []; - for (let i = 0, len = e.selections.length; i < len; i++) { - positions[i] = e.selections[i].getPosition(); - } - const e1 = { - position: positions[0], - secondaryPositions: positions.slice(1), - reason: e.reason, - source: e.source - }; - this._onDidChangeCursorPosition.fire(e1); - const e2 = { - selection: e.selections[0], - secondarySelections: e.selections.slice(1), - modelVersionId: e.modelVersionId, - oldSelections: e.oldSelections, - oldModelVersionId: e.oldModelVersionId, - source: e.source, - reason: e.reason - }; - this._onDidChangeCursorSelection.fire(e2); - break; - } - } - })); - const [view, hasRealView] = this._createView(viewModel); - if (hasRealView) { - this._domElement.appendChild(view.domNode.domNode); - let keys = Object.keys(this._contentWidgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - view.addContentWidget(this._contentWidgets[widgetId]); - } - keys = Object.keys(this._overlayWidgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - view.addOverlayWidget(this._overlayWidgets[widgetId]); - } - view.render(false, true); - view.domNode.domNode.setAttribute('data-uri', model.uri.toString()); - } - this._modelData = new ModelData(model, viewModel, view, hasRealView, listenersToRemove); - } - _createView(viewModel) { - let commandDelegate; - if (this.isSimpleWidget) { - commandDelegate = { - paste: (text, pasteOnNewLine, multicursorText, mode) => { - this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode); - }, - type: (text) => { - this._type('keyboard', text); - }, - replacePreviousChar: (text, replaceCharCnt) => { - this._replacePreviousChar('keyboard', text, replaceCharCnt); - }, - startComposition: () => { - this._startComposition(); - }, - endComposition: () => { - this._endComposition('keyboard'); - }, - cut: () => { - this._cut('keyboard'); - } - }; - } - else { - commandDelegate = { - paste: (text, pasteOnNewLine, multicursorText, mode) => { - const payload = { text, pasteOnNewLine, multicursorText, mode }; - this._commandService.executeCommand("paste" /* Paste */, payload); - }, - type: (text) => { - const payload = { text }; - this._commandService.executeCommand("type" /* Type */, payload); - }, - replacePreviousChar: (text, replaceCharCnt) => { - const payload = { text, replaceCharCnt }; - this._commandService.executeCommand("replacePreviousChar" /* ReplacePreviousChar */, payload); - }, - startComposition: () => { - this._commandService.executeCommand("compositionStart" /* CompositionStart */, {}); - }, - endComposition: () => { - this._commandService.executeCommand("compositionEnd" /* CompositionEnd */, {}); - }, - cut: () => { - this._commandService.executeCommand("cut" /* Cut */, {}); - } - }; - } - const viewUserInputEvents = new _view_viewUserInputEvents_js__WEBPACK_IMPORTED_MODULE_11__["ViewUserInputEvents"](viewModel.coordinatesConverter); - viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e); - viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e); - viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e); - viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e); - viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e); - viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e); - viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e); - viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e); - viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e); - viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e); - const view = new _view_viewImpl_js__WEBPACK_IMPORTED_MODULE_10__["View"](commandDelegate, this._configuration, this._themeService, viewModel, viewUserInputEvents, this._overflowWidgetsDomNode); - return [view, true]; - } - _postDetachModelCleanup(detachedModel) { - if (detachedModel) { - detachedModel.removeAllDecorationsWithOwnerId(this._id); - } - } - _detachModel() { - if (!this._modelData) { - return null; - } - const model = this._modelData.model; - const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null; - this._modelData.dispose(); - this._modelData = null; - this._domElement.removeAttribute('data-mode-id'); - if (removeDomNode && this._domElement.contains(removeDomNode)) { - this._domElement.removeChild(removeDomNode); - } - return model; - } - _removeDecorationType(key) { - this._codeEditorService.removeDecorationType(key); - } - hasModel() { - return (this._modelData !== null); - } -}; -CodeEditorWidget = __decorate([ - __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_27__["IInstantiationService"]), - __param(4, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_9__["ICodeEditorService"]), - __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_25__["ICommandService"]), - __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_26__["IContextKeyService"]), - __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_30__["IThemeService"]), - __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_29__["INotificationService"]), - __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_31__["IAccessibilityService"]) -], CodeEditorWidget); - -class BooleanEventEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor() { - super(); - this._onDidChangeToTrue = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeToTrue = this._onDidChangeToTrue.event; - this._onDidChangeToFalse = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onDidChangeToFalse = this._onDidChangeToFalse.event; - this._value = 0 /* NotSet */; - } - setValue(_value) { - const value = (_value ? 2 /* True */ : 1 /* False */); - if (this._value === value) { - return; - } - this._value = value; - if (this._value === 2 /* True */) { - this._onDidChangeToTrue.fire(); - } - else if (this._value === 1 /* False */) { - this._onDidChangeToFalse.fire(); - } - } -} -class EditorContextKeysManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(editor, contextKeyService) { - super(); - this._editor = editor; - contextKeyService.createKey('editorId', editor.getId()); - this._editorSimpleInput = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].editorSimpleInput.bindTo(contextKeyService); - this._editorFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].focus.bindTo(contextKeyService); - this._textInputFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].textInputFocus.bindTo(contextKeyService); - this._editorTextFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].editorTextFocus.bindTo(contextKeyService); - this._editorTabMovesFocus = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].tabMovesFocus.bindTo(contextKeyService); - this._editorReadonly = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].readOnly.bindTo(contextKeyService); - this._editorColumnSelection = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].columnSelection.bindTo(contextKeyService); - this._hasMultipleSelections = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasMultipleSelections.bindTo(contextKeyService); - this._hasNonEmptySelection = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasNonEmptySelection.bindTo(contextKeyService); - this._canUndo = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].canUndo.bindTo(contextKeyService); - this._canRedo = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].canRedo.bindTo(contextKeyService); - this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig())); - this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection())); - this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus())); - this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus())); - this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus())); - this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus())); - this._register(this._editor.onDidChangeModel(() => this._updateFromModel())); - this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel())); - this._updateFromConfig(); - this._updateFromSelection(); - this._updateFromFocus(); - this._updateFromModel(); - this._editorSimpleInput.set(this._editor.isSimpleWidget); - } - _updateFromConfig() { - const options = this._editor.getOptions(); - this._editorTabMovesFocus.set(options.get(116 /* tabFocusMode */)); - this._editorReadonly.set(options.get(72 /* readOnly */)); - this._editorColumnSelection.set(options.get(13 /* columnSelection */)); - } - _updateFromSelection() { - const selections = this._editor.getSelections(); - if (!selections) { - this._hasMultipleSelections.reset(); - this._hasNonEmptySelection.reset(); - } - else { - this._hasMultipleSelections.set(selections.length > 1); - this._hasNonEmptySelection.set(selections.some(s => !s.isEmpty())); - } - } - _updateFromFocus() { - this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget); - this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget); - this._textInputFocus.set(this._editor.hasTextFocus()); - } - _updateFromModel() { - const model = this._editor.getModel(); - this._canUndo.set(Boolean(model && model.canUndo())); - this._canRedo.set(Boolean(model && model.canRedo())); - } -} -class EditorModeContext extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(_editor, _contextKeyService) { - super(); - this._editor = _editor; - this._contextKeyService = _contextKeyService; - this._langId = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].languageId.bindTo(_contextKeyService); - this._hasCompletionItemProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasCompletionItemProvider.bindTo(_contextKeyService); - this._hasCodeActionsProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasCodeActionsProvider.bindTo(_contextKeyService); - this._hasCodeLensProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasCodeLensProvider.bindTo(_contextKeyService); - this._hasDefinitionProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDefinitionProvider.bindTo(_contextKeyService); - this._hasDeclarationProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDeclarationProvider.bindTo(_contextKeyService); - this._hasImplementationProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasImplementationProvider.bindTo(_contextKeyService); - this._hasTypeDefinitionProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasTypeDefinitionProvider.bindTo(_contextKeyService); - this._hasHoverProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasHoverProvider.bindTo(_contextKeyService); - this._hasDocumentHighlightProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDocumentHighlightProvider.bindTo(_contextKeyService); - this._hasDocumentSymbolProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDocumentSymbolProvider.bindTo(_contextKeyService); - this._hasReferenceProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasReferenceProvider.bindTo(_contextKeyService); - this._hasRenameProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasRenameProvider.bindTo(_contextKeyService); - this._hasSignatureHelpProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasSignatureHelpProvider.bindTo(_contextKeyService); - this._hasDocumentFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDocumentFormattingProvider.bindTo(_contextKeyService); - this._hasDocumentSelectionFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService); - this._hasMultipleDocumentFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService); - this._hasMultipleDocumentSelectionFormattingProvider = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService); - this._isInWalkThrough = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_20__["EditorContextKeys"].isInWalkThroughSnippet.bindTo(_contextKeyService); - const update = () => this._update(); - // update when model/mode changes - this._register(_editor.onDidChangeModel(update)); - this._register(_editor.onDidChangeModelLanguage(update)); - // update when registries change - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CompletionProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CodeActionProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CodeLensProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DefinitionProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DeclarationProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["ImplementationProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["TypeDefinitionProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["HoverProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentHighlightProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentSymbolProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["ReferenceProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["RenameProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentFormattingEditProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentRangeFormattingEditProviderRegistry"].onDidChange(update)); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["SignatureHelpProviderRegistry"].onDidChange(update)); - update(); - } - dispose() { - super.dispose(); - } - reset() { - this._contextKeyService.bufferChangeEvents(() => { - this._langId.reset(); - this._hasCompletionItemProvider.reset(); - this._hasCodeActionsProvider.reset(); - this._hasCodeLensProvider.reset(); - this._hasDefinitionProvider.reset(); - this._hasDeclarationProvider.reset(); - this._hasImplementationProvider.reset(); - this._hasTypeDefinitionProvider.reset(); - this._hasHoverProvider.reset(); - this._hasDocumentHighlightProvider.reset(); - this._hasDocumentSymbolProvider.reset(); - this._hasReferenceProvider.reset(); - this._hasRenameProvider.reset(); - this._hasDocumentFormattingProvider.reset(); - this._hasDocumentSelectionFormattingProvider.reset(); - this._hasSignatureHelpProvider.reset(); - this._isInWalkThrough.reset(); - }); - } - _update() { - const model = this._editor.getModel(); - if (!model) { - this.reset(); - return; - } - this._contextKeyService.bufferChangeEvents(() => { - this._langId.set(model.getLanguageIdentifier().language); - this._hasCompletionItemProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CompletionProviderRegistry"].has(model)); - this._hasCodeActionsProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CodeActionProviderRegistry"].has(model)); - this._hasCodeLensProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["CodeLensProviderRegistry"].has(model)); - this._hasDefinitionProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DefinitionProviderRegistry"].has(model)); - this._hasDeclarationProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DeclarationProviderRegistry"].has(model)); - this._hasImplementationProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["ImplementationProviderRegistry"].has(model)); - this._hasTypeDefinitionProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["TypeDefinitionProviderRegistry"].has(model)); - this._hasHoverProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["HoverProviderRegistry"].has(model)); - this._hasDocumentHighlightProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentHighlightProviderRegistry"].has(model)); - this._hasDocumentSymbolProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentSymbolProviderRegistry"].has(model)); - this._hasReferenceProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["ReferenceProviderRegistry"].has(model)); - this._hasRenameProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["RenameProviderRegistry"].has(model)); - this._hasSignatureHelpProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["SignatureHelpProviderRegistry"].has(model)); - this._hasDocumentFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentFormattingEditProviderRegistry"].has(model) || _common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentRangeFormattingEditProviderRegistry"].has(model)); - this._hasDocumentSelectionFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentRangeFormattingEditProviderRegistry"].has(model)); - this._hasMultipleDocumentFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentFormattingEditProviderRegistry"].all(model).length + _common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentRangeFormattingEditProviderRegistry"].all(model).length > 1); - this._hasMultipleDocumentSelectionFormattingProvider.set(_common_modes_js__WEBPACK_IMPORTED_MODULE_21__["DocumentRangeFormattingEditProviderRegistry"].all(model).length > 1); - this._isInWalkThrough.set(model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__["Schemas"].walkThroughSnippet); - }); - } -} -class CodeEditorWidgetFocusTracker extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(domElement) { - super(); - this._onChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); - this.onChange = this._onChange.event; - this._hasFocus = false; - this._domFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["trackFocus"](domElement)); - this._register(this._domFocusTracker.onDidFocus(() => { - this._hasFocus = true; - this._onChange.fire(undefined); - })); - this._register(this._domFocusTracker.onDidBlur(() => { - this._hasFocus = false; - this._onChange.fire(undefined); - })); - } - hasFocus() { - return this._hasFocus; - } -} -const squigglyStart = encodeURIComponent(``); -function getSquigglySVGData(color) { - return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd; -} -const dotdotdotStart = encodeURIComponent(``); -function getDotDotDotSVGData(color) { - return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd; -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_30__["registerThemingParticipant"])((theme, collector) => { - const errorBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorErrorBorder"]); - if (errorBorderColor) { - collector.addRule(`.monaco-editor .${"squiggly-error" /* EditorErrorDecoration */} { border-bottom: 4px double ${errorBorderColor}; }`); - } - const errorForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorErrorForeground"]); - if (errorForeground) { - collector.addRule(`.monaco-editor .${"squiggly-error" /* EditorErrorDecoration */} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); - } - const warningBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorWarningBorder"]); - if (warningBorderColor) { - collector.addRule(`.monaco-editor .${"squiggly-warning" /* EditorWarningDecoration */} { border-bottom: 4px double ${warningBorderColor}; }`); - } - const warningForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorWarningForeground"]); - if (warningForeground) { - collector.addRule(`.monaco-editor .${"squiggly-warning" /* EditorWarningDecoration */} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); - } - const infoBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorInfoBorder"]); - if (infoBorderColor) { - collector.addRule(`.monaco-editor .${"squiggly-info" /* EditorInfoDecoration */} { border-bottom: 4px double ${infoBorderColor}; }`); - } - const infoForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorInfoForeground"]); - if (infoForeground) { - collector.addRule(`.monaco-editor .${"squiggly-info" /* EditorInfoDecoration */} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`); - } - const hintBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorHintBorder"]); - if (hintBorderColor) { - collector.addRule(`.monaco-editor .${"squiggly-hint" /* EditorHintDecoration */} { border-bottom: 2px dotted ${hintBorderColor}; }`); - } - const hintForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorHintForeground"]); - if (hintForeground) { - collector.addRule(`.monaco-editor .${"squiggly-hint" /* EditorHintDecoration */} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`); - } - const unnecessaryForeground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_22__["editorUnnecessaryCodeOpacity"]); - if (unnecessaryForeground) { - collector.addRule(`.monaco-editor.showUnused .${"squiggly-inline-unnecessary" /* EditorUnnecessaryInlineDecoration */} { opacity: ${unnecessaryForeground.rgba.a}; }`); - } - const unnecessaryBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_22__["editorUnnecessaryCodeBorder"]); - if (unnecessaryBorder) { - collector.addRule(`.monaco-editor.showUnused .${"squiggly-unnecessary" /* EditorUnnecessaryDecoration */} { border-bottom: 2px dashed ${unnecessaryBorder}; }`); - } - const deprecatedForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_23__["editorForeground"]) || 'inherit'; - collector.addRule(`.monaco-editor.showDeprecated .${"squiggly-inline-deprecated" /* EditorDeprecatedInlineDecoration */} { text-decoration: line-through; text-decoration-color: ${deprecatedForeground}}`); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js ***! - \*************************************************************************************/ -/*! exports provided: DiffEditorWidget, createDecoration, DECORATIONS, DiffEditorWidgetSideBySide, isChangeOrInsert, isChangeOrDelete */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffEditorWidget", function() { return DiffEditorWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDecoration", function() { return createDecoration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DECORATIONS", function() { return DECORATIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffEditorWidgetSideBySide", function() { return DiffEditorWidgetSideBySide; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isChangeOrInsert", function() { return isChangeOrInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isChangeOrDelete", function() { return isChangeOrDelete; }); -/* harmony import */ var _media_diffEditor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/diffEditor.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _core_editorState_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./codeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js"); -/* harmony import */ var _diffReview_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diffReview.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../common/editorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../common/view/overviewZoneManager.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js"); -/* harmony import */ var _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../common/viewLayout/lineDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js"); -/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js"); -/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _inlineDiffMargin_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./inlineDiffMargin.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _config_elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../config/elementSizeObserver.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../../base/browser/ui/mouseCursor/mouseCursor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -class VisualEditorState { - constructor(_contextMenuService, _clipboardService) { - this._contextMenuService = _contextMenuService; - this._clipboardService = _clipboardService; - this._zones = []; - this.inlineDiffMargins = []; - this._zonesMap = {}; - this._decorations = []; - } - getForeignViewZones(allViewZones) { - return allViewZones.filter((z) => !this._zonesMap[String(z.id)]); - } - clean(editor) { - // (1) View zones - if (this._zones.length > 0) { - editor.changeViewZones((viewChangeAccessor) => { - for (let i = 0, length = this._zones.length; i < length; i++) { - viewChangeAccessor.removeZone(this._zones[i]); - } - }); - } - this._zones = []; - this._zonesMap = {}; - // (2) Model decorations - this._decorations = editor.deltaDecorations(this._decorations, []); - } - apply(editor, overviewRuler, newDecorations, restoreScrollState) { - const scrollState = restoreScrollState ? _core_editorState_js__WEBPACK_IMPORTED_MODULE_10__["StableEditorScrollState"].capture(editor) : null; - // view zones - editor.changeViewZones((viewChangeAccessor) => { - for (let i = 0, length = this._zones.length; i < length; i++) { - viewChangeAccessor.removeZone(this._zones[i]); - } - for (let i = 0, length = this.inlineDiffMargins.length; i < length; i++) { - this.inlineDiffMargins[i].dispose(); - } - this._zones = []; - this._zonesMap = {}; - this.inlineDiffMargins = []; - for (let i = 0, length = newDecorations.zones.length; i < length; i++) { - const viewZone = newDecorations.zones[i]; - viewZone.suppressMouseDown = true; - let zoneId = viewChangeAccessor.addZone(viewZone); - this._zones.push(zoneId); - this._zonesMap[String(zoneId)] = true; - if (newDecorations.zones[i].diff && viewZone.marginDomNode) { - viewZone.suppressMouseDown = false; - this.inlineDiffMargins.push(new _inlineDiffMargin_js__WEBPACK_IMPORTED_MODULE_31__["InlineDiffMargin"](zoneId, viewZone.marginDomNode, editor, newDecorations.zones[i].diff, this._contextMenuService, this._clipboardService)); - } - } - }); - if (scrollState) { - scrollState.restore(editor); - } - // decorations - this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations); - // overview ruler - if (overviewRuler) { - overviewRuler.setZones(newDecorations.overviewZones); - } - } -} -let DIFF_EDITOR_ID = 0; -const diffInsertIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_37__["registerIcon"])('diff-insert', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_37__["Codicon"].add); -const diffRemoveIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_37__["registerIcon"])('diff-remove', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_37__["Codicon"].remove); -let DiffEditorWidget = class DiffEditorWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(domElement, options, clipboardService, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, _editorProgressService) { - super(); - this._editorProgressService = _editorProgressService; - this._onDidDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidDispose = this._onDidDispose.event; - this._onDidUpdateDiff = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidUpdateDiff = this._onDidUpdateDiff.event; - this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this._lastOriginalWarning = null; - this._lastModifiedWarning = null; - this._editorWorkerService = editorWorkerService; - this._codeEditorService = codeEditorService; - this._contextKeyService = this._register(contextKeyService.createScoped(domElement)); - this._contextKeyService.createKey('isInDiffEditor', true); - this._themeService = themeService; - this._notificationService = notificationService; - this.id = (++DIFF_EDITOR_ID); - this._state = 0 /* Idle */; - this._updatingDiffProgress = null; - this._domElement = domElement; - options = options || {}; - // renderSideBySide - this._renderSideBySide = true; - if (typeof options.renderSideBySide !== 'undefined') { - this._renderSideBySide = options.renderSideBySide; - } - // maxComputationTime - this._maxComputationTime = 5000; - if (typeof options.maxComputationTime !== 'undefined') { - this._maxComputationTime = options.maxComputationTime; - } - // ignoreTrimWhitespace - this._ignoreTrimWhitespace = true; - if (typeof options.ignoreTrimWhitespace !== 'undefined') { - this._ignoreTrimWhitespace = options.ignoreTrimWhitespace; - } - // renderIndicators - this._renderIndicators = true; - if (typeof options.renderIndicators !== 'undefined') { - this._renderIndicators = options.renderIndicators; - } - this._originalIsEditable = false; - if (typeof options.originalEditable !== 'undefined') { - this._originalIsEditable = Boolean(options.originalEditable); - } - this._originalCodeLens = false; - if (typeof options.originalCodeLens !== 'undefined') { - this._originalCodeLens = Boolean(options.originalCodeLens); - } - this._modifiedCodeLens = false; - if (typeof options.modifiedCodeLens !== 'undefined') { - this._modifiedCodeLens = Boolean(options.modifiedCodeLens); - } - this._updateDecorationsRunner = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__["RunOnceScheduler"](() => this._updateDecorations(), 0)); - this._containerDomElement = document.createElement('div'); - this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide); - this._containerDomElement.style.position = 'relative'; - this._containerDomElement.style.height = '100%'; - this._domElement.appendChild(this._containerDomElement); - this._overviewViewportDomElement = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this._overviewViewportDomElement.setClassName('diffViewport'); - this._overviewViewportDomElement.setPosition('absolute'); - this._overviewDomElement = document.createElement('div'); - this._overviewDomElement.className = 'diffOverview'; - this._overviewDomElement.style.position = 'absolute'; - this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addStandardDisposableListener"](this._overviewDomElement, 'mousedown', (e) => { - this.modifiedEditor.delegateVerticalScrollbarMouseDown(e); - })); - this._containerDomElement.appendChild(this._overviewDomElement); - // Create left side - this._originalDomNode = document.createElement('div'); - this._originalDomNode.className = 'editor original'; - this._originalDomNode.style.position = 'absolute'; - this._originalDomNode.style.height = '100%'; - this._containerDomElement.appendChild(this._originalDomNode); - // Create right side - this._modifiedDomNode = document.createElement('div'); - this._modifiedDomNode.className = 'editor modified'; - this._modifiedDomNode.style.position = 'absolute'; - this._modifiedDomNode.style.height = '100%'; - this._containerDomElement.appendChild(this._modifiedDomNode); - this._beginUpdateDecorationsTimeout = -1; - this._currentlyChangingViewZones = false; - this._diffComputationToken = 0; - this._originalEditorState = new VisualEditorState(contextMenuService, clipboardService); - this._modifiedEditorState = new VisualEditorState(contextMenuService, clipboardService); - this._isVisible = true; - this._isHandlingScrollEvent = false; - this._elementSizeObserver = this._register(new _config_elementSizeObserver_js__WEBPACK_IMPORTED_MODULE_36__["ElementSizeObserver"](this._containerDomElement, undefined, () => this._onDidContainerSizeChanged())); - if (options.automaticLayout) { - this._elementSizeObserver.startObserving(); - } - this._diffComputationResult = null; - const leftContextKeyService = this._contextKeyService.createScoped(); - const leftServices = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_26__["ServiceCollection"](); - leftServices.set(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_24__["IContextKeyService"], leftContextKeyService); - const leftScopedInstantiationService = instantiationService.createChild(leftServices); - const rightContextKeyService = this._contextKeyService.createScoped(); - const rightServices = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_26__["ServiceCollection"](); - rightServices.set(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_24__["IContextKeyService"], rightContextKeyService); - const rightScopedInstantiationService = instantiationService.createChild(rightServices); - this.originalEditor = this._createLeftHandSideEditor(options, leftScopedInstantiationService, leftContextKeyService); - this.modifiedEditor = this._createRightHandSideEditor(options, rightScopedInstantiationService, rightContextKeyService); - this._originalOverviewRuler = null; - this._modifiedOverviewRuler = null; - this._reviewPane = new _diffReview_js__WEBPACK_IMPORTED_MODULE_13__["DiffReview"](this); - this._containerDomElement.appendChild(this._reviewPane.domNode.domNode); - this._containerDomElement.appendChild(this._reviewPane.shadow.domNode); - this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode); - // enableSplitViewResizing - this._enableSplitViewResizing = true; - if (typeof options.enableSplitViewResizing !== 'undefined') { - this._enableSplitViewResizing = options.enableSplitViewResizing; - } - if (this._renderSideBySide) { - this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing)); - } - else { - this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing)); - } - this._register(themeService.onDidColorThemeChange(t => { - if (this._strategy && this._strategy.applyColors(t)) { - this._updateDecorationsRunner.schedule(); - } - this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide); - })); - const contributions = _editorExtensions_js__WEBPACK_IMPORTED_MODULE_33__["EditorExtensionsRegistry"].getDiffEditorContributions(); - for (const desc of contributions) { - try { - this._register(instantiationService.createInstance(desc.ctor, this)); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_34__["onUnexpectedError"])(err); - } - } - this._codeEditorService.addDiffEditor(this); - } - _setState(newState) { - if (this._state === newState) { - return; - } - this._state = newState; - if (this._updatingDiffProgress) { - this._updatingDiffProgress.done(); - this._updatingDiffProgress = null; - } - if (this._state === 1 /* ComputingDiff */) { - this._updatingDiffProgress = this._editorProgressService.show(true, 1000); - } - } - diffReviewNext() { - this._reviewPane.next(); - } - diffReviewPrev() { - this._reviewPane.prev(); - } - static _getClassName(theme, renderSideBySide) { - let result = 'monaco-diff-editor monaco-editor-background '; - if (renderSideBySide) { - result += 'side-by-side '; - } - result += Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_29__["getThemeTypeSelector"])(theme.type); - return result; - } - _recreateOverviewRulers() { - if (this._originalOverviewRuler) { - this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()); - this._originalOverviewRuler.dispose(); - } - if (this.originalEditor.hasModel()) { - this._originalOverviewRuler = this.originalEditor.createOverviewRuler('original diffOverviewRuler'); - this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode()); - } - if (this._modifiedOverviewRuler) { - this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()); - this._modifiedOverviewRuler.dispose(); - } - if (this.modifiedEditor.hasModel()) { - this._modifiedOverviewRuler = this.modifiedEditor.createOverviewRuler('modified diffOverviewRuler'); - this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()); - } - this._layoutOverviewRulers(); - } - _createLeftHandSideEditor(options, instantiationService, contextKeyService) { - const editor = this._createInnerEditor(instantiationService, this._originalDomNode, this._adjustOptionsForLeftHandSide(options, this._originalIsEditable, this._originalCodeLens)); - this._register(editor.onDidScrollChange((e) => { - if (this._isHandlingScrollEvent) { - return; - } - if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { - return; - } - this._isHandlingScrollEvent = true; - this.modifiedEditor.setScrollPosition({ - scrollLeft: e.scrollLeft, - scrollTop: e.scrollTop - }); - this._isHandlingScrollEvent = false; - this._layoutOverviewViewport(); - })); - this._register(editor.onDidChangeViewZones(() => { - this._onViewZonesChanged(); - })); - this._register(editor.onDidChangeModelContent(() => { - if (this._isVisible) { - this._beginUpdateDecorationsSoon(); - } - })); - const isInDiffLeftEditorKey = contextKeyService.createKey('isInDiffLeftEditor', undefined); - this._register(editor.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true))); - this._register(editor.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false))); - this._register(editor.onDidContentSizeChange(e => { - const width = this.originalEditor.getContentWidth() + this.modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH; - const height = Math.max(this.modifiedEditor.getContentHeight(), this.originalEditor.getContentHeight()); - this._onDidContentSizeChange.fire({ - contentHeight: height, - contentWidth: width, - contentHeightChanged: e.contentHeightChanged, - contentWidthChanged: e.contentWidthChanged - }); - })); - return editor; - } - _createRightHandSideEditor(options, instantiationService, contextKeyService) { - const editor = this._createInnerEditor(instantiationService, this._modifiedDomNode, this._adjustOptionsForRightHandSide(options, this._modifiedCodeLens)); - this._register(editor.onDidScrollChange((e) => { - if (this._isHandlingScrollEvent) { - return; - } - if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { - return; - } - this._isHandlingScrollEvent = true; - this.originalEditor.setScrollPosition({ - scrollLeft: e.scrollLeft, - scrollTop: e.scrollTop - }); - this._isHandlingScrollEvent = false; - this._layoutOverviewViewport(); - })); - this._register(editor.onDidChangeViewZones(() => { - this._onViewZonesChanged(); - })); - this._register(editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(36 /* fontInfo */) && editor.getModel()) { - this._onViewZonesChanged(); - } - })); - this._register(editor.onDidChangeModelContent(() => { - if (this._isVisible) { - this._beginUpdateDecorationsSoon(); - } - })); - this._register(editor.onDidChangeModelOptions((e) => { - if (e.tabSize) { - this._updateDecorationsRunner.schedule(); - } - })); - const isInDiffRightEditorKey = contextKeyService.createKey('isInDiffRightEditor', undefined); - this._register(editor.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true))); - this._register(editor.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false))); - this._register(editor.onDidContentSizeChange(e => { - const width = this.originalEditor.getContentWidth() + this.modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH; - const height = Math.max(this.modifiedEditor.getContentHeight(), this.originalEditor.getContentHeight()); - this._onDidContentSizeChange.fire({ - contentHeight: height, - contentWidth: width, - contentHeightChanged: e.contentHeightChanged, - contentWidthChanged: e.contentWidthChanged - }); - })); - return editor; - } - _createInnerEditor(instantiationService, container, options) { - return instantiationService.createInstance(_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_12__["CodeEditorWidget"], container, options, {}); - } - dispose() { - this._codeEditorService.removeDiffEditor(this); - if (this._beginUpdateDecorationsTimeout !== -1) { - window.clearTimeout(this._beginUpdateDecorationsTimeout); - this._beginUpdateDecorationsTimeout = -1; - } - this._cleanViewZonesAndDecorations(); - if (this._originalOverviewRuler) { - this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()); - this._originalOverviewRuler.dispose(); - } - if (this._modifiedOverviewRuler) { - this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()); - this._modifiedOverviewRuler.dispose(); - } - this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode); - this._containerDomElement.removeChild(this._overviewDomElement); - this._containerDomElement.removeChild(this._originalDomNode); - this.originalEditor.dispose(); - this._containerDomElement.removeChild(this._modifiedDomNode); - this.modifiedEditor.dispose(); - this._strategy.dispose(); - this._containerDomElement.removeChild(this._reviewPane.domNode.domNode); - this._containerDomElement.removeChild(this._reviewPane.shadow.domNode); - this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode); - this._reviewPane.dispose(); - this._domElement.removeChild(this._containerDomElement); - this._onDidDispose.fire(); - super.dispose(); - } - //------------ begin IDiffEditor methods - getId() { - return this.getEditorType() + ':' + this.id; - } - getEditorType() { - return _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_17__["EditorType"].IDiffEditor; - } - getLineChanges() { - if (!this._diffComputationResult) { - return null; - } - return this._diffComputationResult.changes; - } - getOriginalEditor() { - return this.originalEditor; - } - getModifiedEditor() { - return this.modifiedEditor; - } - updateOptions(newOptions) { - // Handle side by side - let renderSideBySideChanged = false; - if (typeof newOptions.renderSideBySide !== 'undefined') { - if (this._renderSideBySide !== newOptions.renderSideBySide) { - this._renderSideBySide = newOptions.renderSideBySide; - renderSideBySideChanged = true; - } - } - if (typeof newOptions.maxComputationTime !== 'undefined') { - this._maxComputationTime = newOptions.maxComputationTime; - if (this._isVisible) { - this._beginUpdateDecorationsSoon(); - } - } - let beginUpdateDecorations = false; - if (typeof newOptions.ignoreTrimWhitespace !== 'undefined') { - if (this._ignoreTrimWhitespace !== newOptions.ignoreTrimWhitespace) { - this._ignoreTrimWhitespace = newOptions.ignoreTrimWhitespace; - // Begin comparing - beginUpdateDecorations = true; - } - } - if (typeof newOptions.renderIndicators !== 'undefined') { - if (this._renderIndicators !== newOptions.renderIndicators) { - this._renderIndicators = newOptions.renderIndicators; - beginUpdateDecorations = true; - } - } - if (beginUpdateDecorations) { - this._beginUpdateDecorations(); - } - if (typeof newOptions.originalEditable !== 'undefined') { - this._originalIsEditable = Boolean(newOptions.originalEditable); - } - if (typeof newOptions.originalCodeLens !== 'undefined') { - this._originalCodeLens = Boolean(newOptions.originalCodeLens); - } - if (typeof newOptions.modifiedCodeLens !== 'undefined') { - this._modifiedCodeLens = Boolean(newOptions.modifiedCodeLens); - } - this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions, this._modifiedCodeLens)); - this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions, this._originalIsEditable, this._originalCodeLens)); - // enableSplitViewResizing - if (typeof newOptions.enableSplitViewResizing !== 'undefined') { - this._enableSplitViewResizing = newOptions.enableSplitViewResizing; - } - this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing); - // renderSideBySide - if (renderSideBySideChanged) { - if (this._renderSideBySide) { - this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing)); - } - else { - this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing)); - } - // Update class name - this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide); - } - } - getModel() { - return { - original: this.originalEditor.getModel(), - modified: this.modifiedEditor.getModel() - }; - } - setModel(model) { - // Guard us against partial null model - if (model && (!model.original || !model.modified)) { - throw new Error(!model.original ? 'DiffEditorWidget.setModel: Original model is null' : 'DiffEditorWidget.setModel: Modified model is null'); - } - // Remove all view zones & decorations - this._cleanViewZonesAndDecorations(); - // Update code editor models - this.originalEditor.setModel(model ? model.original : null); - this.modifiedEditor.setModel(model ? model.modified : null); - this._updateDecorationsRunner.cancel(); - // this.originalEditor.onDidChangeModelOptions - if (model) { - this.originalEditor.setScrollTop(0); - this.modifiedEditor.setScrollTop(0); - } - // Disable any diff computations that will come in - this._diffComputationResult = null; - this._diffComputationToken++; - this._setState(0 /* Idle */); - if (model) { - this._recreateOverviewRulers(); - // Begin comparing - this._beginUpdateDecorations(); - } - this._layoutOverviewViewport(); - } - getDomNode() { - return this._domElement; - } - getVisibleColumnFromPosition(position) { - return this.modifiedEditor.getVisibleColumnFromPosition(position); - } - getPosition() { - return this.modifiedEditor.getPosition(); - } - setPosition(position) { - this.modifiedEditor.setPosition(position); - } - revealLine(lineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLine(lineNumber, scrollType); - } - revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLineInCenter(lineNumber, scrollType); - } - revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType); - } - revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLineNearTop(lineNumber, scrollType); - } - revealPosition(position, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealPosition(position, scrollType); - } - revealPositionInCenter(position, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealPositionInCenter(position, scrollType); - } - revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealPositionInCenterIfOutsideViewport(position, scrollType); - } - revealPositionNearTop(position, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealPositionNearTop(position, scrollType); - } - getSelection() { - return this.modifiedEditor.getSelection(); - } - getSelections() { - return this.modifiedEditor.getSelections(); - } - setSelection(something) { - this.modifiedEditor.setSelection(something); - } - setSelections(ranges) { - this.modifiedEditor.setSelections(ranges); - } - revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLines(startLineNumber, endLineNumber, scrollType); - } - revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType); - } - revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType); - } - revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType); - } - revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) { - this.modifiedEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal); - } - revealRangeInCenter(range, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealRangeInCenter(range, scrollType); - } - revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealRangeInCenterIfOutsideViewport(range, scrollType); - } - revealRangeNearTop(range, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealRangeNearTop(range, scrollType); - } - revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealRangeNearTopIfOutsideViewport(range, scrollType); - } - revealRangeAtTop(range, scrollType = 0 /* Smooth */) { - this.modifiedEditor.revealRangeAtTop(range, scrollType); - } - getSupportedActions() { - return this.modifiedEditor.getSupportedActions(); - } - saveViewState() { - let originalViewState = this.originalEditor.saveViewState(); - let modifiedViewState = this.modifiedEditor.saveViewState(); - return { - original: originalViewState, - modified: modifiedViewState - }; - } - restoreViewState(s) { - if (s.original && s.modified) { - let diffEditorState = s; - this.originalEditor.restoreViewState(diffEditorState.original); - this.modifiedEditor.restoreViewState(diffEditorState.modified); - } - } - layout(dimension) { - this._elementSizeObserver.observe(dimension); - } - focus() { - this.modifiedEditor.focus(); - } - hasTextFocus() { - return this.originalEditor.hasTextFocus() || this.modifiedEditor.hasTextFocus(); - } - trigger(source, handlerId, payload) { - this.modifiedEditor.trigger(source, handlerId, payload); - } - changeDecorations(callback) { - return this.modifiedEditor.changeDecorations(callback); - } - //------------ end IDiffEditor methods - //------------ begin layouting methods - _onDidContainerSizeChanged() { - this._doLayout(); - } - _getReviewHeight() { - return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : 0; - } - _layoutOverviewRulers() { - if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) { - return; - } - const height = this._elementSizeObserver.getHeight(); - const reviewHeight = this._getReviewHeight(); - let freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH; - let layoutInfo = this.modifiedEditor.getLayoutInfo(); - if (layoutInfo) { - this._originalOverviewRuler.setLayout({ - top: 0, - width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, - right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH, - height: (height - reviewHeight) - }); - this._modifiedOverviewRuler.setLayout({ - top: 0, - right: 0, - width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, - height: (height - reviewHeight) - }); - } - } - //------------ end layouting methods - _onViewZonesChanged() { - if (this._currentlyChangingViewZones) { - return; - } - this._updateDecorationsRunner.schedule(); - } - _beginUpdateDecorationsSoon() { - // Clear previous timeout if necessary - if (this._beginUpdateDecorationsTimeout !== -1) { - window.clearTimeout(this._beginUpdateDecorationsTimeout); - this._beginUpdateDecorationsTimeout = -1; - } - this._beginUpdateDecorationsTimeout = window.setTimeout(() => this._beginUpdateDecorations(), DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY); - } - static _equals(a, b) { - if (!a && !b) { - return true; - } - if (!a || !b) { - return false; - } - return (a.toString() === b.toString()); - } - _beginUpdateDecorations() { - this._beginUpdateDecorationsTimeout = -1; - const currentOriginalModel = this.originalEditor.getModel(); - const currentModifiedModel = this.modifiedEditor.getModel(); - if (!currentOriginalModel || !currentModifiedModel) { - return; - } - // Prevent old diff requests to come if a new request has been initiated - // The best method would be to call cancel on the Promise, but this is not - // yet supported, so using tokens for now. - this._diffComputationToken++; - let currentToken = this._diffComputationToken; - this._setState(1 /* ComputingDiff */); - if (!this._editorWorkerService.canComputeDiff(currentOriginalModel.uri, currentModifiedModel.uri)) { - if (!DiffEditorWidget._equals(currentOriginalModel.uri, this._lastOriginalWarning) - || !DiffEditorWidget._equals(currentModifiedModel.uri, this._lastModifiedWarning)) { - this._lastOriginalWarning = currentOriginalModel.uri; - this._lastModifiedWarning = currentModifiedModel.uri; - this._notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]("diff.tooLarge", "Cannot compare files because one file is too large.")); - } - return; - } - this._editorWorkerService.computeDiff(currentOriginalModel.uri, currentModifiedModel.uri, this._ignoreTrimWhitespace, this._maxComputationTime).then((result) => { - if (currentToken === this._diffComputationToken - && currentOriginalModel === this.originalEditor.getModel() - && currentModifiedModel === this.modifiedEditor.getModel()) { - this._setState(2 /* DiffComputed */); - this._diffComputationResult = result; - this._updateDecorationsRunner.schedule(); - this._onDidUpdateDiff.fire(); - } - }, (error) => { - if (currentToken === this._diffComputationToken - && currentOriginalModel === this.originalEditor.getModel() - && currentModifiedModel === this.modifiedEditor.getModel()) { - this._setState(2 /* DiffComputed */); - this._diffComputationResult = null; - this._updateDecorationsRunner.schedule(); - } - }); - } - _cleanViewZonesAndDecorations() { - this._originalEditorState.clean(this.originalEditor); - this._modifiedEditorState.clean(this.modifiedEditor); - } - _updateDecorations() { - if (!this.originalEditor.getModel() || !this.modifiedEditor.getModel() || !this._originalOverviewRuler || !this._modifiedOverviewRuler) { - return; - } - const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []); - let foreignOriginal = this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()); - let foreignModified = this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()); - let diffDecorations = this._strategy.getEditorsDiffDecorations(lineChanges, this._ignoreTrimWhitespace, this._renderIndicators, foreignOriginal, foreignModified, this.originalEditor, this.modifiedEditor); - try { - this._currentlyChangingViewZones = true; - this._originalEditorState.apply(this.originalEditor, this._originalOverviewRuler, diffDecorations.original, false); - this._modifiedEditorState.apply(this.modifiedEditor, this._modifiedOverviewRuler, diffDecorations.modified, true); - } - finally { - this._currentlyChangingViewZones = false; - } - } - _adjustOptionsForSubEditor(options) { - let clonedOptions = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_8__["deepClone"](options || {}); - clonedOptions.inDiffEditor = true; - clonedOptions.wordWrap = 'off'; - clonedOptions.wordWrapMinified = false; - clonedOptions.automaticLayout = false; - clonedOptions.scrollbar = clonedOptions.scrollbar || {}; - clonedOptions.scrollbar.vertical = 'visible'; - clonedOptions.folding = false; - clonedOptions.codeLens = false; - clonedOptions.fixedOverflowWidgets = true; - clonedOptions.overflowWidgetsDomNode = options.overflowWidgetsDomNode; - // clonedOptions.lineDecorationsWidth = '2ch'; - if (!clonedOptions.minimap) { - clonedOptions.minimap = {}; - } - clonedOptions.minimap.enabled = false; - return clonedOptions; - } - _adjustOptionsForLeftHandSide(options, isEditable, isCodeLensEnabled) { - let result = this._adjustOptionsForSubEditor(options); - if (isCodeLensEnabled) { - result.codeLens = true; - } - result.readOnly = !isEditable; - result.extraEditorClassName = 'original-in-monaco-diff-editor'; - return result; - } - _adjustOptionsForRightHandSide(options, isCodeLensEnabled) { - let result = this._adjustOptionsForSubEditor(options); - if (isCodeLensEnabled) { - result.codeLens = true; - } - result.revealHorizontalRightPadding = _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_14__["EditorOptions"].revealHorizontalRightPadding.defaultValue + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; - result.scrollbar.verticalHasArrows = false; - result.extraEditorClassName = 'modified-in-monaco-diff-editor'; - return result; - } - doLayout() { - this._elementSizeObserver.observe(); - this._doLayout(); - } - _doLayout() { - const width = this._elementSizeObserver.getWidth(); - const height = this._elementSizeObserver.getHeight(); - const reviewHeight = this._getReviewHeight(); - let splitPoint = this._strategy.layout(); - this._originalDomNode.style.width = splitPoint + 'px'; - this._originalDomNode.style.left = '0px'; - this._modifiedDomNode.style.width = (width - splitPoint) + 'px'; - this._modifiedDomNode.style.left = splitPoint + 'px'; - this._overviewDomElement.style.top = '0px'; - this._overviewDomElement.style.height = (height - reviewHeight) + 'px'; - this._overviewDomElement.style.width = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px'; - this._overviewDomElement.style.left = (width - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH) + 'px'; - this._overviewViewportDomElement.setWidth(DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH); - this._overviewViewportDomElement.setHeight(30); - this.originalEditor.layout({ width: splitPoint, height: (height - reviewHeight) }); - this.modifiedEditor.layout({ width: width - splitPoint - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH, height: (height - reviewHeight) }); - if (this._originalOverviewRuler || this._modifiedOverviewRuler) { - this._layoutOverviewRulers(); - } - this._reviewPane.layout(height - reviewHeight, width, reviewHeight); - this._layoutOverviewViewport(); - } - _layoutOverviewViewport() { - let layout = this._computeOverviewViewport(); - if (!layout) { - this._overviewViewportDomElement.setTop(0); - this._overviewViewportDomElement.setHeight(0); - } - else { - this._overviewViewportDomElement.setTop(layout.top); - this._overviewViewportDomElement.setHeight(layout.height); - } - } - _computeOverviewViewport() { - let layoutInfo = this.modifiedEditor.getLayoutInfo(); - if (!layoutInfo) { - return null; - } - let scrollTop = this.modifiedEditor.getScrollTop(); - let scrollHeight = this.modifiedEditor.getScrollHeight(); - let computedAvailableSize = Math.max(0, layoutInfo.height); - let computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * 0); - let computedRatio = scrollHeight > 0 ? (computedRepresentableSize / scrollHeight) : 0; - let computedSliderSize = Math.max(0, Math.floor(layoutInfo.height * computedRatio)); - let computedSliderPosition = Math.floor(scrollTop * computedRatio); - return { - height: computedSliderSize, - top: computedSliderPosition - }; - } - _createDataSource() { - return { - getWidth: () => { - return this._elementSizeObserver.getWidth(); - }, - getHeight: () => { - return (this._elementSizeObserver.getHeight() - this._getReviewHeight()); - }, - getContainerDomNode: () => { - return this._containerDomElement; - }, - relayoutEditors: () => { - this._doLayout(); - }, - getOriginalEditor: () => { - return this.originalEditor; - }, - getModifiedEditor: () => { - return this.modifiedEditor; - } - }; - } - _setStrategy(newStrategy) { - if (this._strategy) { - this._strategy.dispose(); - } - this._strategy = newStrategy; - newStrategy.applyColors(this._themeService.getColorTheme()); - if (this._diffComputationResult) { - this._updateDecorations(); - } - // Just do a layout, the strategy might need it - this._doLayout(); - } - _getLineChangeAtOrBeforeLineNumber(lineNumber, startLineNumberExtractor) { - const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []); - if (lineChanges.length === 0 || lineNumber < startLineNumberExtractor(lineChanges[0])) { - // There are no changes or `lineNumber` is before the first change - return null; - } - let min = 0, max = lineChanges.length - 1; - while (min < max) { - let mid = Math.floor((min + max) / 2); - let midStart = startLineNumberExtractor(lineChanges[mid]); - let midEnd = (mid + 1 <= max ? startLineNumberExtractor(lineChanges[mid + 1]) : 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - if (lineNumber < midStart) { - max = mid - 1; - } - else if (lineNumber >= midEnd) { - min = mid + 1; - } - else { - // HIT! - min = mid; - max = mid; - } - } - return lineChanges[min]; - } - _getEquivalentLineForOriginalLineNumber(lineNumber) { - let lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.originalStartLineNumber); - if (!lineChange) { - return lineNumber; - } - let originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0); - let modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0); - let lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0); - let lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0); - let delta = lineNumber - originalEquivalentLineNumber; - if (delta <= lineChangeOriginalLength) { - return modifiedEquivalentLineNumber + Math.min(delta, lineChangeModifiedLength); - } - return modifiedEquivalentLineNumber + lineChangeModifiedLength - lineChangeOriginalLength + delta; - } - _getEquivalentLineForModifiedLineNumber(lineNumber) { - let lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.modifiedStartLineNumber); - if (!lineChange) { - return lineNumber; - } - let originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0); - let modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0); - let lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0); - let lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0); - let delta = lineNumber - modifiedEquivalentLineNumber; - if (delta <= lineChangeModifiedLength) { - return originalEquivalentLineNumber + Math.min(delta, lineChangeOriginalLength); - } - return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta; - } - getDiffLineInformationForOriginal(lineNumber) { - if (!this._diffComputationResult) { - // Cannot answer that which I don't know - return null; - } - return { - equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(lineNumber) - }; - } - getDiffLineInformationForModified(lineNumber) { - if (!this._diffComputationResult) { - // Cannot answer that which I don't know - return null; - } - return { - equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(lineNumber) - }; - } -}; -DiffEditorWidget.ONE_OVERVIEW_WIDTH = 15; -DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH = 30; -DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms -DiffEditorWidget = __decorate([ - __param(2, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_32__["IClipboardService"]), - __param(3, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_19__["IEditorWorkerService"]), - __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_24__["IContextKeyService"]), - __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_25__["IInstantiationService"]), - __param(6, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_11__["ICodeEditorService"]), - __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_29__["IThemeService"]), - __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_27__["INotificationService"]), - __param(9, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_30__["IContextMenuService"]), - __param(10, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_35__["IEditorProgressService"]) -], DiffEditorWidget); - -class DiffEditorWidgetStyle extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(dataSource) { - super(); - this._dataSource = dataSource; - this._insertColor = null; - this._removeColor = null; - } - applyColors(theme) { - let newInsertColor = (theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffInserted"]) || _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["defaultInsertColor"]).transparent(2); - let newRemoveColor = (theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffRemoved"]) || _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["defaultRemoveColor"]).transparent(2); - let hasChanges = !newInsertColor.equals(this._insertColor) || !newRemoveColor.equals(this._removeColor); - this._insertColor = newInsertColor; - this._removeColor = newRemoveColor; - return hasChanges; - } - getEditorsDiffDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalWhitespaces, modifiedWhitespaces, originalEditor, modifiedEditor) { - // Get view zones - modifiedWhitespaces = modifiedWhitespaces.sort((a, b) => { - return a.afterLineNumber - b.afterLineNumber; - }); - originalWhitespaces = originalWhitespaces.sort((a, b) => { - return a.afterLineNumber - b.afterLineNumber; - }); - let zones = this._getViewZones(lineChanges, originalWhitespaces, modifiedWhitespaces, originalEditor, modifiedEditor, renderIndicators); - // Get decorations & overview ruler zones - let originalDecorations = this._getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor); - let modifiedDecorations = this._getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor); - return { - original: { - decorations: originalDecorations.decorations, - overviewZones: originalDecorations.overviewZones, - zones: zones.original - }, - modified: { - decorations: modifiedDecorations.decorations, - overviewZones: modifiedDecorations.overviewZones, - zones: zones.modified - } - }; - } -} -class ForeignViewZonesIterator { - constructor(source) { - this._source = source; - this._index = -1; - this.current = null; - this.advance(); - } - advance() { - this._index++; - if (this._index < this._source.length) { - this.current = this._source[this._index]; - } - else { - this.current = null; - } - } -} -class ViewZonesComputer { - constructor(lineChanges, originalForeignVZ, originalLineHeight, modifiedForeignVZ, modifiedLineHeight) { - this.lineChanges = lineChanges; - this.originalForeignVZ = originalForeignVZ; - this.originalLineHeight = originalLineHeight; - this.modifiedForeignVZ = modifiedForeignVZ; - this.modifiedLineHeight = modifiedLineHeight; - } - getViewZones() { - let result = { - original: [], - modified: [] - }; - let lineChangeModifiedLength = 0; - let lineChangeOriginalLength = 0; - let originalEquivalentLineNumber = 0; - let modifiedEquivalentLineNumber = 0; - let originalEndEquivalentLineNumber = 0; - let modifiedEndEquivalentLineNumber = 0; - let sortMyViewZones = (a, b) => { - return a.afterLineNumber - b.afterLineNumber; - }; - let addAndCombineIfPossible = (destination, item) => { - if (item.domNode === null && destination.length > 0) { - let lastItem = destination[destination.length - 1]; - if (lastItem.afterLineNumber === item.afterLineNumber && lastItem.domNode === null) { - lastItem.heightInLines += item.heightInLines; - return; - } - } - destination.push(item); - }; - let modifiedForeignVZ = new ForeignViewZonesIterator(this.modifiedForeignVZ); - let originalForeignVZ = new ForeignViewZonesIterator(this.originalForeignVZ); - // In order to include foreign view zones after the last line change, the for loop will iterate once more after the end of the `lineChanges` array - for (let i = 0, length = this.lineChanges.length; i <= length; i++) { - let lineChange = (i < length ? this.lineChanges[i] : null); - if (lineChange !== null) { - originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0); - modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0); - lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0); - lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0); - originalEndEquivalentLineNumber = Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber); - modifiedEndEquivalentLineNumber = Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber); - } - else { - // Increase to very large value to get the producing tests of foreign view zones running - originalEquivalentLineNumber += 10000000 + lineChangeOriginalLength; - modifiedEquivalentLineNumber += 10000000 + lineChangeModifiedLength; - originalEndEquivalentLineNumber = originalEquivalentLineNumber; - modifiedEndEquivalentLineNumber = modifiedEquivalentLineNumber; - } - // Each step produces view zones, and after producing them, we try to cancel them out, to avoid empty-empty view zone cases - let stepOriginal = []; - let stepModified = []; - // ---------------------------- PRODUCE VIEW ZONES - // [PRODUCE] View zone(s) in original-side due to foreign view zone(s) in modified-side - while (modifiedForeignVZ.current && modifiedForeignVZ.current.afterLineNumber <= modifiedEndEquivalentLineNumber) { - let viewZoneLineNumber; - if (modifiedForeignVZ.current.afterLineNumber <= modifiedEquivalentLineNumber) { - viewZoneLineNumber = originalEquivalentLineNumber - modifiedEquivalentLineNumber + modifiedForeignVZ.current.afterLineNumber; - } - else { - viewZoneLineNumber = originalEndEquivalentLineNumber; - } - let marginDomNode = null; - if (lineChange && lineChange.modifiedStartLineNumber <= modifiedForeignVZ.current.afterLineNumber && modifiedForeignVZ.current.afterLineNumber <= lineChange.modifiedEndLineNumber) { - marginDomNode = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(); - } - stepOriginal.push({ - afterLineNumber: viewZoneLineNumber, - heightInLines: modifiedForeignVZ.current.height / this.modifiedLineHeight, - domNode: null, - marginDomNode: marginDomNode - }); - modifiedForeignVZ.advance(); - } - // [PRODUCE] View zone(s) in modified-side due to foreign view zone(s) in original-side - while (originalForeignVZ.current && originalForeignVZ.current.afterLineNumber <= originalEndEquivalentLineNumber) { - let viewZoneLineNumber; - if (originalForeignVZ.current.afterLineNumber <= originalEquivalentLineNumber) { - viewZoneLineNumber = modifiedEquivalentLineNumber - originalEquivalentLineNumber + originalForeignVZ.current.afterLineNumber; - } - else { - viewZoneLineNumber = modifiedEndEquivalentLineNumber; - } - stepModified.push({ - afterLineNumber: viewZoneLineNumber, - heightInLines: originalForeignVZ.current.height / this.originalLineHeight, - domNode: null - }); - originalForeignVZ.advance(); - } - if (lineChange !== null && isChangeOrInsert(lineChange)) { - let r = this._produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength); - if (r) { - stepOriginal.push(r); - } - } - if (lineChange !== null && isChangeOrDelete(lineChange)) { - let r = this._produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength); - if (r) { - stepModified.push(r); - } - } - // ---------------------------- END PRODUCE VIEW ZONES - // ---------------------------- EMIT MINIMAL VIEW ZONES - // [CANCEL & EMIT] Try to cancel view zones out - let stepOriginalIndex = 0; - let stepModifiedIndex = 0; - stepOriginal = stepOriginal.sort(sortMyViewZones); - stepModified = stepModified.sort(sortMyViewZones); - while (stepOriginalIndex < stepOriginal.length && stepModifiedIndex < stepModified.length) { - let original = stepOriginal[stepOriginalIndex]; - let modified = stepModified[stepModifiedIndex]; - let originalDelta = original.afterLineNumber - originalEquivalentLineNumber; - let modifiedDelta = modified.afterLineNumber - modifiedEquivalentLineNumber; - if (originalDelta < modifiedDelta) { - addAndCombineIfPossible(result.original, original); - stepOriginalIndex++; - } - else if (modifiedDelta < originalDelta) { - addAndCombineIfPossible(result.modified, modified); - stepModifiedIndex++; - } - else if (original.shouldNotShrink) { - addAndCombineIfPossible(result.original, original); - stepOriginalIndex++; - } - else if (modified.shouldNotShrink) { - addAndCombineIfPossible(result.modified, modified); - stepModifiedIndex++; - } - else { - if (original.heightInLines >= modified.heightInLines) { - // modified view zone gets removed - original.heightInLines -= modified.heightInLines; - stepModifiedIndex++; - } - else { - // original view zone gets removed - modified.heightInLines -= original.heightInLines; - stepOriginalIndex++; - } - } - } - // [EMIT] Remaining original view zones - while (stepOriginalIndex < stepOriginal.length) { - addAndCombineIfPossible(result.original, stepOriginal[stepOriginalIndex]); - stepOriginalIndex++; - } - // [EMIT] Remaining modified view zones - while (stepModifiedIndex < stepModified.length) { - addAndCombineIfPossible(result.modified, stepModified[stepModifiedIndex]); - stepModifiedIndex++; - } - // ---------------------------- END EMIT MINIMAL VIEW ZONES - } - return { - original: ViewZonesComputer._ensureDomNodes(result.original), - modified: ViewZonesComputer._ensureDomNodes(result.modified), - }; - } - static _ensureDomNodes(zones) { - return zones.map((z) => { - if (!z.domNode) { - z.domNode = createFakeLinesDiv(); - } - return z; - }); - } -} -function createDecoration(startLineNumber, startColumn, endLineNumber, endColumn, options) { - return { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](startLineNumber, startColumn, endLineNumber, endColumn), - options: options - }; -} -const DECORATIONS = { - charDelete: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'char-delete' - }), - charDeleteWholeLine: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'char-delete', - isWholeLine: true - }), - charInsert: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'char-insert' - }), - charInsertWholeLine: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'char-insert', - isWholeLine: true - }), - lineInsert: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'line-insert', - marginClassName: 'line-insert', - isWholeLine: true - }), - lineInsertWithSign: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'line-insert', - linesDecorationsClassName: 'insert-sign ' + diffInsertIcon.classNames, - marginClassName: 'line-insert', - isWholeLine: true - }), - lineDelete: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'line-delete', - marginClassName: 'line-delete', - isWholeLine: true - }), - lineDeleteWithSign: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - className: 'line-delete', - linesDecorationsClassName: 'delete-sign ' + diffRemoveIcon.classNames, - marginClassName: 'line-delete', - isWholeLine: true - }), - lineDeleteMargin: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_18__["ModelDecorationOptions"].register({ - marginClassName: 'line-delete', - }) -}; -class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle { - constructor(dataSource, enableSplitViewResizing) { - super(dataSource); - this._disableSash = (enableSplitViewResizing === false); - this._sashRatio = null; - this._sashPosition = null; - this._startSashPosition = null; - this._sash = this._register(new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_4__["Sash"](this._dataSource.getContainerDomNode(), this, { orientation: 0 /* VERTICAL */ })); - if (this._disableSash) { - this._sash.state = 0 /* Disabled */; - } - this._sash.onDidStart(() => this.onSashDragStart()); - this._sash.onDidChange((e) => this.onSashDrag(e)); - this._sash.onDidEnd(() => this.onSashDragEnd()); - this._sash.onDidReset(() => this.onSashReset()); - } - setEnableSplitViewResizing(enableSplitViewResizing) { - let newDisableSash = (enableSplitViewResizing === false); - if (this._disableSash !== newDisableSash) { - this._disableSash = newDisableSash; - this._sash.state = this._disableSash ? 0 /* Disabled */ : 3 /* Enabled */; - } - } - layout(sashRatio = this._sashRatio) { - let w = this._dataSource.getWidth(); - let contentWidth = w - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; - let sashPosition = Math.floor((sashRatio || 0.5) * contentWidth); - let midPoint = Math.floor(0.5 * contentWidth); - sashPosition = this._disableSash ? midPoint : sashPosition || midPoint; - if (contentWidth > DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH * 2) { - if (sashPosition < DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) { - sashPosition = DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH; - } - if (sashPosition > contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) { - sashPosition = contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH; - } - } - else { - sashPosition = midPoint; - } - if (this._sashPosition !== sashPosition) { - this._sashPosition = sashPosition; - this._sash.layout(); - } - return this._sashPosition; - } - onSashDragStart() { - this._startSashPosition = this._sashPosition; - } - onSashDrag(e) { - let w = this._dataSource.getWidth(); - let contentWidth = w - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; - let sashPosition = this.layout((this._startSashPosition + (e.currentX - e.startX)) / contentWidth); - this._sashRatio = sashPosition / contentWidth; - this._dataSource.relayoutEditors(); - } - onSashDragEnd() { - this._sash.layout(); - } - onSashReset() { - this._sashRatio = 0.5; - this._dataSource.relayoutEditors(); - this._sash.layout(); - } - getVerticalSashTop(sash) { - return 0; - } - getVerticalSashLeft(sash) { - return this._sashPosition; - } - getVerticalSashHeight(sash) { - return this._dataSource.getHeight(); - } - _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor) { - let c = new SideBySideViewZonesComputer(lineChanges, originalForeignVZ, originalEditor.getOption(51 /* lineHeight */), modifiedForeignVZ, modifiedEditor.getOption(51 /* lineHeight */)); - return c.getViewZones(); - } - _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) { - const overviewZoneColor = String(this._removeColor); - let result = { - decorations: [], - overviewZones: [] - }; - let originalModel = originalEditor.getModel(); - for (let i = 0, length = lineChanges.length; i < length; i++) { - let lineChange = lineChanges[i]; - if (isChangeOrDelete(lineChange)) { - result.decorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), - options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete) - }); - if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charDeleteWholeLine)); - } - result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_20__["OverviewRulerZone"](lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, overviewZoneColor)); - if (lineChange.charChanges) { - for (let j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) { - let charChange = lineChange.charChanges[j]; - if (isChangeOrDelete(charChange)) { - if (ignoreTrimWhitespace) { - for (let lineNumber = charChange.originalStartLineNumber; lineNumber <= charChange.originalEndLineNumber; lineNumber++) { - let startColumn; - let endColumn; - if (lineNumber === charChange.originalStartLineNumber) { - startColumn = charChange.originalStartColumn; - } - else { - startColumn = originalModel.getLineFirstNonWhitespaceColumn(lineNumber); - } - if (lineNumber === charChange.originalEndLineNumber) { - endColumn = charChange.originalEndColumn; - } - else { - endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber); - } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete)); - } - } - else { - result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete)); - } - } - } - } - } - } - return result; - } - _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) { - const overviewZoneColor = String(this._insertColor); - let result = { - decorations: [], - overviewZones: [] - }; - let modifiedModel = modifiedEditor.getModel(); - for (let i = 0, length = lineChanges.length; i < length; i++) { - let lineChange = lineChanges[i]; - if (isChangeOrInsert(lineChange)) { - result.decorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), - options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) - }); - if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine)); - } - result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_20__["OverviewRulerZone"](lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, overviewZoneColor)); - if (lineChange.charChanges) { - for (let j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) { - let charChange = lineChange.charChanges[j]; - if (isChangeOrInsert(charChange)) { - if (ignoreTrimWhitespace) { - for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) { - let startColumn; - let endColumn; - if (lineNumber === charChange.modifiedStartLineNumber) { - startColumn = charChange.modifiedStartColumn; - } - else { - startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber); - } - if (lineNumber === charChange.modifiedEndLineNumber) { - endColumn = charChange.modifiedEndColumn; - } - else { - endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); - } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); - } - } - else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); - } - } - } - } - } - } - return result; - } -} -DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH = 100; -class SideBySideViewZonesComputer extends ViewZonesComputer { - constructor(lineChanges, originalForeignVZ, originalLineHeight, modifiedForeignVZ, modifiedLineHeight) { - super(lineChanges, originalForeignVZ, originalLineHeight, modifiedForeignVZ, modifiedLineHeight); - } - _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() { - return null; - } - _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) { - if (lineChangeModifiedLength > lineChangeOriginalLength) { - return { - afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber), - heightInLines: (lineChangeModifiedLength - lineChangeOriginalLength), - domNode: null - }; - } - return null; - } - _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) { - if (lineChangeOriginalLength > lineChangeModifiedLength) { - return { - afterLineNumber: Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber), - heightInLines: (lineChangeOriginalLength - lineChangeModifiedLength), - domNode: null - }; - } - return null; - } -} -class DiffEditorWidgetInline extends DiffEditorWidgetStyle { - constructor(dataSource, enableSplitViewResizing) { - super(dataSource); - this.decorationsLeft = dataSource.getOriginalEditor().getLayoutInfo().decorationsLeft; - this._register(dataSource.getOriginalEditor().onDidLayoutChange((layoutInfo) => { - if (this.decorationsLeft !== layoutInfo.decorationsLeft) { - this.decorationsLeft = layoutInfo.decorationsLeft; - dataSource.relayoutEditors(); - } - })); - } - setEnableSplitViewResizing(enableSplitViewResizing) { - // Nothing to do.. - } - _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) { - let computer = new InlineViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators); - return computer.getViewZones(); - } - _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) { - const overviewZoneColor = String(this._removeColor); - let result = { - decorations: [], - overviewZones: [] - }; - for (let i = 0, length = lineChanges.length; i < length; i++) { - let lineChange = lineChanges[i]; - // Add overview zones in the overview ruler - if (isChangeOrDelete(lineChange)) { - result.decorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), - options: DECORATIONS.lineDeleteMargin - }); - result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_20__["OverviewRulerZone"](lineChange.originalStartLineNumber, lineChange.originalEndLineNumber, overviewZoneColor)); - } - } - return result; - } - _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalEditor, modifiedEditor) { - const overviewZoneColor = String(this._insertColor); - let result = { - decorations: [], - overviewZones: [] - }; - let modifiedModel = modifiedEditor.getModel(); - for (let i = 0, length = lineChanges.length; i < length; i++) { - let lineChange = lineChanges[i]; - // Add decorations & overview zones - if (isChangeOrInsert(lineChange)) { - result.decorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */), - options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) - }); - result.overviewZones.push(new _common_view_overviewZoneManager_js__WEBPACK_IMPORTED_MODULE_20__["OverviewRulerZone"](lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber, overviewZoneColor)); - if (lineChange.charChanges) { - for (let j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) { - let charChange = lineChange.charChanges[j]; - if (isChangeOrInsert(charChange)) { - if (ignoreTrimWhitespace) { - for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) { - let startColumn; - let endColumn; - if (lineNumber === charChange.modifiedStartLineNumber) { - startColumn = charChange.modifiedStartColumn; - } - else { - startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber); - } - if (lineNumber === charChange.modifiedEndLineNumber) { - endColumn = charChange.modifiedEndColumn; - } - else { - endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); - } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); - } - } - else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); - } - } - } - } - else { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine)); - } - } - } - return result; - } - layout() { - // An editor should not be smaller than 5px - return Math.max(5, this.decorationsLeft); - } -} -class InlineViewZonesComputer extends ViewZonesComputer { - constructor(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) { - super(lineChanges, originalForeignVZ, originalEditor.getOption(51 /* lineHeight */), modifiedForeignVZ, modifiedEditor.getOption(51 /* lineHeight */)); - this.originalModel = originalEditor.getModel(); - this.modifiedEditorOptions = modifiedEditor.getOptions(); - this.modifiedEditorTabSize = modifiedEditor.getModel().getOptions().tabSize; - this.renderIndicators = renderIndicators; - } - _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() { - let result = document.createElement('div'); - result.className = 'inline-added-margin-view-zone'; - return result; - } - _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) { - let marginDomNode = document.createElement('div'); - marginDomNode.className = 'inline-added-margin-view-zone'; - return { - afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber), - heightInLines: lineChangeModifiedLength, - domNode: document.createElement('div'), - marginDomNode: marginDomNode - }; - } - _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) { - let decorations = []; - if (lineChange.charChanges) { - for (let j = 0, lengthJ = lineChange.charChanges.length; j < lengthJ; j++) { - let charChange = lineChange.charChanges[j]; - if (isChangeOrDelete(charChange)) { - decorations.push(new _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_23__["InlineDecoration"](new _common_core_range_js__WEBPACK_IMPORTED_MODULE_15__["Range"](charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn), 'char-delete', 0 /* Regular */)); - } - } - } - let sb = Object(_common_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_16__["createStringBuilder"])(10000); - let marginHTML = []; - const layoutInfo = this.modifiedEditorOptions.get(117 /* layoutInfo */); - const fontInfo = this.modifiedEditorOptions.get(36 /* fontInfo */); - const lineDecorationsWidth = layoutInfo.decorationsWidth; - let lineHeight = this.modifiedEditorOptions.get(51 /* lineHeight */); - const typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth; - let maxCharsPerLine = 0; - const originalContent = []; - for (let lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) { - maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(lineNumber - lineChange.originalStartLineNumber, this.originalModel, this.modifiedEditorOptions, this.modifiedEditorTabSize, lineNumber, decorations, sb)); - originalContent.push(this.originalModel.getLineContent(lineNumber)); - if (this.renderIndicators) { - let index = lineNumber - lineChange.originalStartLineNumber; - marginHTML = marginHTML.concat([ - `
    ` - ]); - } - } - maxCharsPerLine += this.modifiedEditorOptions.get(85 /* scrollBeyondLastColumn */); - let domNode = document.createElement('div'); - domNode.className = `view-lines line-delete ${_base_browser_ui_mouseCursor_mouseCursor_js__WEBPACK_IMPORTED_MODULE_38__["MOUSE_CURSOR_TEXT_CSS_CLASS_NAME"]}`; - domNode.innerHTML = sb.build(); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_9__["Configuration"].applyFontInfoSlow(domNode, fontInfo); - let marginDomNode = document.createElement('div'); - marginDomNode.className = 'inline-deleted-margin-view-zone'; - marginDomNode.innerHTML = marginHTML.join(''); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_9__["Configuration"].applyFontInfoSlow(marginDomNode, fontInfo); - return { - shouldNotShrink: true, - afterLineNumber: (lineChange.modifiedEndLineNumber === 0 ? lineChange.modifiedStartLineNumber : lineChange.modifiedStartLineNumber - 1), - heightInLines: lineChangeOriginalLength, - minWidthInPx: (maxCharsPerLine * typicalHalfwidthCharacterWidth), - domNode: domNode, - marginDomNode: marginDomNode, - diff: { - originalStartLineNumber: lineChange.originalStartLineNumber, - originalEndLineNumber: lineChange.originalEndLineNumber, - modifiedStartLineNumber: lineChange.modifiedStartLineNumber, - modifiedEndLineNumber: lineChange.modifiedEndLineNumber, - originalContent: originalContent - } - }; - } - _renderOriginalLine(count, originalModel, options, tabSize, lineNumber, decorations, sb) { - const lineTokens = originalModel.getLineTokens(lineNumber); - const lineContent = lineTokens.getLineContent(); - const fontInfo = options.get(36 /* fontInfo */); - const actualDecorations = _common_viewLayout_lineDecorations_js__WEBPACK_IMPORTED_MODULE_21__["LineDecoration"].filter(decorations, lineNumber, 1, lineContent.length + 1); - sb.appendASCIIString('
    '); - const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_23__["ViewLineRenderingData"].isBasicASCII(lineContent, originalModel.mightContainNonBasicASCII()); - const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_23__["ViewLineRenderingData"].containsRTL(lineContent, isBasicASCII, originalModel.mightContainRTL()); - const output = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_22__["renderViewLine"])(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_22__["RenderLineInput"]((fontInfo.isMonospace && !options.get(24 /* disableMonospaceOptimizations */)), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, actualDecorations, tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, options.get(95 /* stopRenderingLineAfter */), options.get(80 /* renderWhitespace */), options.get(74 /* renderControlCharacters */), options.get(37 /* fontLigatures */) !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_14__["EditorFontLigatures"].OFF, null // Send no selections, original line cannot be selected - ), sb); - sb.appendASCIIString('
    '); - const absoluteOffsets = output.characterMapping.getAbsoluteOffsets(); - return absoluteOffsets.length > 0 ? absoluteOffsets[absoluteOffsets.length - 1] : 0; - } -} -function isChangeOrInsert(lineChange) { - return lineChange.modifiedEndLineNumber > 0; -} -function isChangeOrDelete(lineChange) { - return lineChange.originalEndLineNumber > 0; -} -function createFakeLinesDiv() { - let r = document.createElement('div'); - r.className = 'diagonal-fill'; - return r; -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_29__["registerThemingParticipant"])((theme, collector) => { - const added = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffInserted"]); - if (added) { - collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${added}; }`); - collector.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${added}; }`); - collector.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${added}; }`); - } - const removed = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffRemoved"]); - if (removed) { - collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${removed}; }`); - collector.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${removed}; }`); - collector.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${removed}; }`); - } - const addedOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffInsertedOutline"]); - if (addedOutline) { - collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${addedOutline}; }`); - } - const removedOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffRemovedOutline"]); - if (removedOutline) { - collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${removedOutline}; }`); - } - const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["scrollbarShadow"]); - if (shadow) { - collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`); - } - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffBorder"]); - if (border) { - collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${border}; }`); - } - const scrollbarSliderBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["scrollbarSliderBackground"]); - if (scrollbarSliderBackgroundColor) { - collector.addRule(` - .monaco-diff-editor .diffViewport { - background: ${scrollbarSliderBackgroundColor}; - } - `); - } - const scrollbarSliderHoverBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["scrollbarSliderHoverBackground"]); - if (scrollbarSliderHoverBackgroundColor) { - collector.addRule(` - .monaco-diff-editor .diffViewport:hover { - background: ${scrollbarSliderHoverBackgroundColor}; - } - `); - } - const scrollbarSliderActiveBackgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["scrollbarSliderActiveBackground"]); - if (scrollbarSliderActiveBackgroundColor) { - collector.addRule(` - .monaco-diff-editor .diffViewport:active { - background: ${scrollbarSliderActiveBackgroundColor}; - } - `); - } - const diffDiagonalFillColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_28__["diffDiagonalFill"]); - collector.addRule(` - .monaco-editor .diagonal-fill { - background-image: linear-gradient( - -45deg, - ${diffDiagonalFillColor} 12.5%, - #0000 12.5%, #0000 50%, - ${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%, - #0000 62.5%, #0000 100% - ); - background-size: 8px 8px; - } - `); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js ***! - \**********************************************************************************/ -/*! exports provided: DiffNavigator */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffNavigator", function() { return DiffNavigator; }); -/* harmony import */ var _base_common_assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/assert.js */ "./node_modules/monaco-editor/esm/vs/base/common/assert.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const defaultOptions = { - followsCaret: true, - ignoreCharChanges: true, - alwaysRevealFirst: true -}; -/** - * Create a new diff navigator for the provided diff editor. - */ -class DiffNavigator extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(editor, options = {}) { - super(); - this._onDidUpdate = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this._editor = editor; - this._options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["mixin"](options, defaultOptions, false); - this.disposed = false; - this.nextIdx = -1; - this.ranges = []; - this.ignoreSelectionChange = false; - this.revealFirst = Boolean(this._options.alwaysRevealFirst); - // hook up to diff editor for diff, disposal, and caret move - this._register(this._editor.onDidDispose(() => this.dispose())); - this._register(this._editor.onDidUpdateDiff(() => this._onDiffUpdated())); - if (this._options.followsCaret) { - this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e) => { - if (this.ignoreSelectionChange) { - return; - } - this.nextIdx = -1; - })); - } - if (this._options.alwaysRevealFirst) { - this._register(this._editor.getModifiedEditor().onDidChangeModel((e) => { - this.revealFirst = true; - })); - } - // init things - this._init(); - } - _init() { - let changes = this._editor.getLineChanges(); - if (!changes) { - return; - } - } - _onDiffUpdated() { - this._init(); - this._compute(this._editor.getLineChanges()); - if (this.revealFirst) { - // Only reveal first on first non-null changes - if (this._editor.getLineChanges() !== null) { - this.revealFirst = false; - this.nextIdx = -1; - this.next(1 /* Immediate */); - } - } - } - _compute(lineChanges) { - // new ranges - this.ranges = []; - if (lineChanges) { - // create ranges from changes - lineChanges.forEach((lineChange) => { - if (!this._options.ignoreCharChanges && lineChange.charChanges) { - lineChange.charChanges.forEach((charChange) => { - this.ranges.push({ - rhs: true, - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn) - }); - }); - } - else { - this.ranges.push({ - rhs: true, - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](lineChange.modifiedStartLineNumber, 1, lineChange.modifiedStartLineNumber, 1) - }); - } - }); - } - // sort - this.ranges.sort((left, right) => { - if (left.range.getStartPosition().isBeforeOrEqual(right.range.getStartPosition())) { - return -1; - } - else if (right.range.getStartPosition().isBeforeOrEqual(left.range.getStartPosition())) { - return 1; - } - else { - return 0; - } - }); - this._onDidUpdate.fire(this); - } - _initIdx(fwd) { - let found = false; - let position = this._editor.getPosition(); - if (!position) { - this.nextIdx = 0; - return; - } - for (let i = 0, len = this.ranges.length; i < len && !found; i++) { - let range = this.ranges[i].range; - if (position.isBeforeOrEqual(range.getStartPosition())) { - this.nextIdx = i + (fwd ? 0 : -1); - found = true; - } - } - if (!found) { - // after the last change - this.nextIdx = fwd ? 0 : this.ranges.length - 1; - } - if (this.nextIdx < 0) { - this.nextIdx = this.ranges.length - 1; - } - } - _move(fwd, scrollType) { - _base_common_assert_js__WEBPACK_IMPORTED_MODULE_0__["ok"](!this.disposed, 'Illegal State - diff navigator has been disposed'); - if (!this.canNavigate()) { - return; - } - if (this.nextIdx === -1) { - this._initIdx(fwd); - } - else if (fwd) { - this.nextIdx += 1; - if (this.nextIdx >= this.ranges.length) { - this.nextIdx = 0; - } - } - else { - this.nextIdx -= 1; - if (this.nextIdx < 0) { - this.nextIdx = this.ranges.length - 1; - } - } - let info = this.ranges[this.nextIdx]; - this.ignoreSelectionChange = true; - try { - let pos = info.range.getStartPosition(); - this._editor.setPosition(pos); - this._editor.revealPositionInCenter(pos, scrollType); - } - finally { - this.ignoreSelectionChange = false; - } - } - canNavigate() { - return this.ranges && this.ranges.length > 0; - } - next(scrollType = 0 /* Smooth */) { - this._move(true, scrollType); - } - previous(scrollType = 0 /* Smooth */) { - this._move(false, scrollType); - } - dispose() { - super.dispose(); - this.ranges = []; - this.disposed = true; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js ***! - \*******************************************************************************/ -/*! exports provided: DiffReview */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffReview", function() { return DiffReview; }); -/* harmony import */ var _media_diffReview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/diffReview.css */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/lineTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js"); -/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - -const DIFF_LINES_PADDING = 3; -class DiffEntry { - constructor(originalLineStart, originalLineEnd, modifiedLineStart, modifiedLineEnd) { - this.originalLineStart = originalLineStart; - this.originalLineEnd = originalLineEnd; - this.modifiedLineStart = modifiedLineStart; - this.modifiedLineEnd = modifiedLineEnd; - } - getType() { - if (this.originalLineStart === 0) { - return 1 /* Insert */; - } - if (this.modifiedLineStart === 0) { - return 2 /* Delete */; - } - return 0 /* Equal */; - } -} -class Diff { - constructor(entries) { - this.entries = entries; - } -} -const diffReviewInsertIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["registerIcon"])('diff-review-insert', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["Codicon"].add); -const diffReviewRemoveIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["registerIcon"])('diff-review-remove', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["Codicon"].remove); -const diffReviewCloseIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["registerIcon"])('diff-review-close', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_20__["Codicon"].close); -class DiffReview extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(diffEditor) { - super(); - this._width = 0; - this._diffEditor = diffEditor; - this._isVisible = false; - this.shadow = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this.shadow.setClassName('diff-review-shadow'); - this.actionBarContainer = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this.actionBarContainer.setClassName('diff-review-actions'); - this._actionBar = this._register(new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_4__["ActionBar"](this.actionBarContainer.domNode)); - this._actionBar.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["Action"]('diffreview.close', _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.close', "Close"), 'close-diff-review ' + diffReviewCloseIcon.classNames, true, () => { - this.hide(); - return Promise.resolve(null); - }), { label: false, icon: true }); - this.domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this.domNode.setClassName('diff-review monaco-editor-background'); - this._content = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_3__["createFastDomNode"])(document.createElement('div')); - this._content.setClassName('diff-review-content'); - this._content.setAttribute('role', 'code'); - this.scrollbar = this._register(new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_5__["DomScrollableElement"](this._content.domNode, {})); - this.domNode.domNode.appendChild(this.scrollbar.getDomNode()); - this._register(diffEditor.onDidUpdateDiff(() => { - if (!this._isVisible) { - return; - } - this._diffs = this._compute(); - this._render(); - })); - this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(() => { - if (!this._isVisible) { - return; - } - this._render(); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addStandardDisposableListener"](this.domNode.domNode, 'click', (e) => { - e.preventDefault(); - let row = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["findParentWithClass"](e.target, 'diff-review-row'); - if (row) { - this._goToRow(row); - } - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addStandardDisposableListener"](this.domNode.domNode, 'keydown', (e) => { - if (e.equals(18 /* DownArrow */) - || e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */) - || e.equals(512 /* Alt */ | 18 /* DownArrow */)) { - e.preventDefault(); - this._goToRow(this._getNextRow()); - } - if (e.equals(16 /* UpArrow */) - || e.equals(2048 /* CtrlCmd */ | 16 /* UpArrow */) - || e.equals(512 /* Alt */ | 16 /* UpArrow */)) { - e.preventDefault(); - this._goToRow(this._getPrevRow()); - } - if (e.equals(9 /* Escape */) - || e.equals(2048 /* CtrlCmd */ | 9 /* Escape */) - || e.equals(512 /* Alt */ | 9 /* Escape */) - || e.equals(1024 /* Shift */ | 9 /* Escape */)) { - e.preventDefault(); - this.hide(); - } - if (e.equals(10 /* Space */) - || e.equals(3 /* Enter */)) { - e.preventDefault(); - this.accept(); - } - })); - this._diffs = []; - this._currentDiff = null; - } - prev() { - let index = 0; - if (!this._isVisible) { - this._diffs = this._compute(); - } - if (this._isVisible) { - let currentIndex = -1; - for (let i = 0, len = this._diffs.length; i < len; i++) { - if (this._diffs[i] === this._currentDiff) { - currentIndex = i; - break; - } - } - index = (this._diffs.length + currentIndex - 1); - } - else { - index = this._findDiffIndex(this._diffEditor.getPosition()); - } - if (this._diffs.length === 0) { - // Nothing to do - return; - } - index = index % this._diffs.length; - const entries = this._diffs[index].entries; - this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__["Position"](entries[0].modifiedLineStart, 1)); - this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd }); - this._isVisible = true; - this._diffEditor.doLayout(); - this._render(); - this._goToRow(this._getNextRow()); - } - next() { - let index = 0; - if (!this._isVisible) { - this._diffs = this._compute(); - } - if (this._isVisible) { - let currentIndex = -1; - for (let i = 0, len = this._diffs.length; i < len; i++) { - if (this._diffs[i] === this._currentDiff) { - currentIndex = i; - break; - } - } - index = (currentIndex + 1); - } - else { - index = this._findDiffIndex(this._diffEditor.getPosition()); - } - if (this._diffs.length === 0) { - // Nothing to do - return; - } - index = index % this._diffs.length; - const entries = this._diffs[index].entries; - this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__["Position"](entries[0].modifiedLineStart, 1)); - this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd }); - this._isVisible = true; - this._diffEditor.doLayout(); - this._render(); - this._goToRow(this._getNextRow()); - } - accept() { - let jumpToLineNumber = -1; - let current = this._getCurrentFocusedRow(); - if (current) { - let lineNumber = parseInt(current.getAttribute('data-line'), 10); - if (!isNaN(lineNumber)) { - jumpToLineNumber = lineNumber; - } - } - this.hide(); - if (jumpToLineNumber !== -1) { - this._diffEditor.setPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__["Position"](jumpToLineNumber, 1)); - this._diffEditor.revealPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__["Position"](jumpToLineNumber, 1), 1 /* Immediate */); - } - } - hide() { - this._isVisible = false; - this._diffEditor.updateOptions({ readOnly: false }); - this._diffEditor.focus(); - this._diffEditor.doLayout(); - this._render(); - } - _getPrevRow() { - let current = this._getCurrentFocusedRow(); - if (!current) { - return this._getFirstRow(); - } - if (current.previousElementSibling) { - return current.previousElementSibling; - } - return current; - } - _getNextRow() { - let current = this._getCurrentFocusedRow(); - if (!current) { - return this._getFirstRow(); - } - if (current.nextElementSibling) { - return current.nextElementSibling; - } - return current; - } - _getFirstRow() { - return this.domNode.domNode.querySelector('.diff-review-row'); - } - _getCurrentFocusedRow() { - let result = document.activeElement; - if (result && /diff-review-row/.test(result.className)) { - return result; - } - return null; - } - _goToRow(row) { - let prev = this._getCurrentFocusedRow(); - row.tabIndex = 0; - row.focus(); - if (prev && prev !== row) { - prev.tabIndex = -1; - } - this.scrollbar.scanDomNode(); - } - isVisible() { - return this._isVisible; - } - layout(top, width, height) { - this._width = width; - this.shadow.setTop(top - 6); - this.shadow.setWidth(width); - this.shadow.setHeight(this._isVisible ? 6 : 0); - this.domNode.setTop(top); - this.domNode.setWidth(width); - this.domNode.setHeight(height); - this._content.setHeight(height); - this._content.setWidth(width); - if (this._isVisible) { - this.actionBarContainer.setAttribute('aria-hidden', 'false'); - this.actionBarContainer.setDisplay('block'); - } - else { - this.actionBarContainer.setAttribute('aria-hidden', 'true'); - this.actionBarContainer.setDisplay('none'); - } - } - _compute() { - const lineChanges = this._diffEditor.getLineChanges(); - if (!lineChanges || lineChanges.length === 0) { - return []; - } - const originalModel = this._diffEditor.getOriginalEditor().getModel(); - const modifiedModel = this._diffEditor.getModifiedEditor().getModel(); - if (!originalModel || !modifiedModel) { - return []; - } - return DiffReview._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount()); - } - static _mergeAdjacent(lineChanges, originalLineCount, modifiedLineCount) { - if (!lineChanges || lineChanges.length === 0) { - return []; - } - let diffs = [], diffsLength = 0; - for (let i = 0, len = lineChanges.length; i < len; i++) { - const lineChange = lineChanges[i]; - const originalStart = lineChange.originalStartLineNumber; - const originalEnd = lineChange.originalEndLineNumber; - const modifiedStart = lineChange.modifiedStartLineNumber; - const modifiedEnd = lineChange.modifiedEndLineNumber; - let r = [], rLength = 0; - // Emit before anchors - { - const originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1); - const modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1); - // Make sure we don't step into the previous diff - let minOriginal = 1; - let minModified = 1; - if (i > 0) { - const prevLineChange = lineChanges[i - 1]; - if (prevLineChange.originalEndLineNumber === 0) { - minOriginal = prevLineChange.originalStartLineNumber + 1; - } - else { - minOriginal = prevLineChange.originalEndLineNumber + 1; - } - if (prevLineChange.modifiedEndLineNumber === 0) { - minModified = prevLineChange.modifiedStartLineNumber + 1; - } - else { - minModified = prevLineChange.modifiedEndLineNumber + 1; - } - } - let fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1; - let fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1; - if (fromOriginal < minOriginal) { - const delta = minOriginal - fromOriginal; - fromOriginal = fromOriginal + delta; - fromModified = fromModified + delta; - } - if (fromModified < minModified) { - const delta = minModified - fromModified; - fromOriginal = fromOriginal + delta; - fromModified = fromModified + delta; - } - r[rLength++] = new DiffEntry(fromOriginal, originalEqualAbove, fromModified, modifiedEqualAbove); - } - // Emit deleted lines - { - if (originalEnd !== 0) { - r[rLength++] = new DiffEntry(originalStart, originalEnd, 0, 0); - } - } - // Emit inserted lines - { - if (modifiedEnd !== 0) { - r[rLength++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd); - } - } - // Emit after anchors - { - const originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1); - const modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1); - // Make sure we don't step into the next diff - let maxOriginal = originalLineCount; - let maxModified = modifiedLineCount; - if (i + 1 < len) { - const nextLineChange = lineChanges[i + 1]; - if (nextLineChange.originalEndLineNumber === 0) { - maxOriginal = nextLineChange.originalStartLineNumber; - } - else { - maxOriginal = nextLineChange.originalStartLineNumber - 1; - } - if (nextLineChange.modifiedEndLineNumber === 0) { - maxModified = nextLineChange.modifiedStartLineNumber; - } - else { - maxModified = nextLineChange.modifiedStartLineNumber - 1; - } - } - let toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1; - let toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1; - if (toOriginal > maxOriginal) { - const delta = maxOriginal - toOriginal; - toOriginal = toOriginal + delta; - toModified = toModified + delta; - } - if (toModified > maxModified) { - const delta = maxModified - toModified; - toOriginal = toOriginal + delta; - toModified = toModified + delta; - } - r[rLength++] = new DiffEntry(originalEqualBelow, toOriginal, modifiedEqualBelow, toModified); - } - diffs[diffsLength++] = new Diff(r); - } - // Merge adjacent diffs - let curr = diffs[0].entries; - let r = [], rLength = 0; - for (let i = 1, len = diffs.length; i < len; i++) { - const thisDiff = diffs[i].entries; - const currLast = curr[curr.length - 1]; - const thisFirst = thisDiff[0]; - if (currLast.getType() === 0 /* Equal */ - && thisFirst.getType() === 0 /* Equal */ - && thisFirst.originalLineStart <= currLast.originalLineEnd) { - // We are dealing with equal lines that overlap - curr[curr.length - 1] = new DiffEntry(currLast.originalLineStart, thisFirst.originalLineEnd, currLast.modifiedLineStart, thisFirst.modifiedLineEnd); - curr = curr.concat(thisDiff.slice(1)); - continue; - } - r[rLength++] = new Diff(curr); - curr = thisDiff; - } - r[rLength++] = new Diff(curr); - return r; - } - _findDiffIndex(pos) { - const lineNumber = pos.lineNumber; - for (let i = 0, len = this._diffs.length; i < len; i++) { - const diff = this._diffs[i].entries; - const lastModifiedLine = diff[diff.length - 1].modifiedLineEnd; - if (lineNumber <= lastModifiedLine) { - return i; - } - } - return 0; - } - _render() { - const originalOptions = this._diffEditor.getOriginalEditor().getOptions(); - const modifiedOptions = this._diffEditor.getModifiedEditor().getOptions(); - const originalModel = this._diffEditor.getOriginalEditor().getModel(); - const modifiedModel = this._diffEditor.getModifiedEditor().getModel(); - const originalModelOpts = originalModel.getOptions(); - const modifiedModelOpts = modifiedModel.getOptions(); - if (!this._isVisible || !originalModel || !modifiedModel) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](this._content.domNode); - this._currentDiff = null; - this.scrollbar.scanDomNode(); - return; - } - this._diffEditor.updateOptions({ readOnly: true }); - const diffIndex = this._findDiffIndex(this._diffEditor.getPosition()); - if (this._diffs[diffIndex] === this._currentDiff) { - return; - } - this._currentDiff = this._diffs[diffIndex]; - const diffs = this._diffs[diffIndex].entries; - let container = document.createElement('div'); - container.className = 'diff-review-table'; - container.setAttribute('role', 'list'); - container.setAttribute('aria-label', 'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'); - _config_configuration_js__WEBPACK_IMPORTED_MODULE_8__["Configuration"].applyFontInfoSlow(container, modifiedOptions.get(36 /* fontInfo */)); - let minOriginalLine = 0; - let maxOriginalLine = 0; - let minModifiedLine = 0; - let maxModifiedLine = 0; - for (let i = 0, len = diffs.length; i < len; i++) { - const diffEntry = diffs[i]; - const originalLineStart = diffEntry.originalLineStart; - const originalLineEnd = diffEntry.originalLineEnd; - const modifiedLineStart = diffEntry.modifiedLineStart; - const modifiedLineEnd = diffEntry.modifiedLineEnd; - if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) { - minOriginalLine = originalLineStart; - } - if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) { - maxOriginalLine = originalLineEnd; - } - if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) { - minModifiedLine = modifiedLineStart; - } - if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) { - maxModifiedLine = modifiedLineEnd; - } - } - let header = document.createElement('div'); - header.className = 'diff-review-row'; - let cell = document.createElement('div'); - cell.className = 'diff-review-cell diff-review-summary'; - const originalChangedLinesCnt = maxOriginalLine - minOriginalLine + 1; - const modifiedChangedLinesCnt = maxModifiedLine - minModifiedLine + 1; - cell.appendChild(document.createTextNode(`${diffIndex + 1}/${this._diffs.length}: @@ -${minOriginalLine},${originalChangedLinesCnt} +${minModifiedLine},${modifiedChangedLinesCnt} @@`)); - header.setAttribute('data-line', String(minModifiedLine)); - const getAriaLines = (lines) => { - if (lines === 0) { - return _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('no_lines_changed', "no lines changed"); - } - else if (lines === 1) { - return _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('one_line_changed', "1 line changed"); - } - else { - return _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('more_lines_changed', "{0} lines changed", lines); - } - }; - const originalChangedLinesCntAria = getAriaLines(originalChangedLinesCnt); - const modifiedChangedLinesCntAria = getAriaLines(modifiedChangedLinesCnt); - header.setAttribute('aria-label', _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]({ - key: 'header', - comment: [ - 'This is the ARIA label for a git diff header.', - 'A git diff header looks like this: @@ -154,12 +159,39 @@.', - 'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.', - 'Variables 0 and 1 refer to the diff index out of total number of diffs.', - 'Variables 2 and 4 will be numbers (a line number).', - 'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.' - ] - }, "Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria)); - header.appendChild(cell); - // @@ -504,7 +517,7 @@ - header.setAttribute('role', 'listitem'); - container.appendChild(header); - const lineHeight = modifiedOptions.get(51 /* lineHeight */); - let modLine = minModifiedLine; - for (let i = 0, len = diffs.length; i < len; i++) { - const diffEntry = diffs[i]; - DiffReview._renderSection(container, diffEntry, modLine, lineHeight, this._width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts); - if (diffEntry.modifiedLineStart !== 0) { - modLine = diffEntry.modifiedLineEnd; - } - } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](this._content.domNode); - this._content.domNode.appendChild(container); - this.scrollbar.scanDomNode(); - } - static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts) { - const type = diffEntry.getType(); - let rowClassName = 'diff-review-row'; - let lineNumbersExtraClassName = ''; - const spacerClassName = 'diff-review-spacer'; - let spacerIcon = null; - switch (type) { - case 1 /* Insert */: - rowClassName = 'diff-review-row line-insert'; - lineNumbersExtraClassName = ' char-insert'; - spacerIcon = diffReviewInsertIcon; - break; - case 2 /* Delete */: - rowClassName = 'diff-review-row line-delete'; - lineNumbersExtraClassName = ' char-delete'; - spacerIcon = diffReviewRemoveIcon; - break; - } - const originalLineStart = diffEntry.originalLineStart; - const originalLineEnd = diffEntry.originalLineEnd; - const modifiedLineStart = diffEntry.modifiedLineStart; - const modifiedLineEnd = diffEntry.modifiedLineEnd; - const cnt = Math.max(modifiedLineEnd - modifiedLineStart, originalLineEnd - originalLineStart); - const originalLayoutInfo = originalOptions.get(117 /* layoutInfo */); - const originalLineNumbersWidth = originalLayoutInfo.glyphMarginWidth + originalLayoutInfo.lineNumbersWidth; - const modifiedLayoutInfo = modifiedOptions.get(117 /* layoutInfo */); - const modifiedLineNumbersWidth = 10 + modifiedLayoutInfo.glyphMarginWidth + modifiedLayoutInfo.lineNumbersWidth; - for (let i = 0; i <= cnt; i++) { - const originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i); - const modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i); - const row = document.createElement('div'); - row.style.minWidth = width + 'px'; - row.className = rowClassName; - row.setAttribute('role', 'listitem'); - if (modifiedLine !== 0) { - modLine = modifiedLine; - } - row.setAttribute('data-line', String(modLine)); - let cell = document.createElement('div'); - cell.className = 'diff-review-cell'; - cell.style.height = `${lineHeight}px`; - row.appendChild(cell); - const originalLineNumber = document.createElement('span'); - originalLineNumber.style.width = (originalLineNumbersWidth + 'px'); - originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px'); - originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName; - if (originalLine !== 0) { - originalLineNumber.appendChild(document.createTextNode(String(originalLine))); - } - else { - originalLineNumber.innerText = '\u00a0'; - } - cell.appendChild(originalLineNumber); - const modifiedLineNumber = document.createElement('span'); - modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px'); - modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px'); - modifiedLineNumber.style.paddingRight = '10px'; - modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName; - if (modifiedLine !== 0) { - modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine))); - } - else { - modifiedLineNumber.innerText = '\u00a0'; - } - cell.appendChild(modifiedLineNumber); - const spacer = document.createElement('span'); - spacer.className = spacerClassName; - if (spacerIcon) { - const spacerCodicon = document.createElement('span'); - spacerCodicon.className = spacerIcon.classNames; - spacerCodicon.innerText = '\u00a0\u00a0'; - spacer.appendChild(spacerCodicon); - } - else { - spacer.innerText = '\u00a0\u00a0'; - } - cell.appendChild(spacer); - let lineContent; - if (modifiedLine !== 0) { - cell.insertAdjacentHTML('beforeend', this._renderLine(modifiedModel, modifiedOptions, modifiedModelOpts.tabSize, modifiedLine)); - lineContent = modifiedModel.getLineContent(modifiedLine); - } - else { - cell.insertAdjacentHTML('beforeend', this._renderLine(originalModel, originalOptions, originalModelOpts.tabSize, originalLine)); - lineContent = originalModel.getLineContent(originalLine); - } - if (lineContent.length === 0) { - lineContent = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('blankLine', "blank"); - } - let ariaLabel = ''; - switch (type) { - case 0 /* Equal */: - if (originalLine === modifiedLine) { - ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]({ key: 'unchangedLine', comment: ['The placholders are contents of the line and should not be translated.'] }, "{0} unchanged line {1}", lineContent, originalLine); - } - else { - ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('equalLine', "{0} original line {1} modified line {2}", lineContent, originalLine, modifiedLine); - } - break; - case 1 /* Insert */: - ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('insertLine', "+ {0} modified line {1}", lineContent, modifiedLine); - break; - case 2 /* Delete */: - ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('deleteLine', "- {0} original line {1}", lineContent, originalLine); - break; - } - row.setAttribute('aria-label', ariaLabel); - dest.appendChild(row); - } - } - static _renderLine(model, options, tabSize, lineNumber) { - const lineContent = model.getLineContent(lineNumber); - const fontInfo = options.get(36 /* fontInfo */); - const defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */) - | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) - | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; - const tokens = new Uint32Array(2); - tokens[0] = lineContent.length; - tokens[1] = defaultMetadata; - const lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_12__["LineTokens"](tokens, lineContent); - const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__["ViewLineRenderingData"].isBasicASCII(lineContent, model.mightContainNonBasicASCII()); - const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_16__["ViewLineRenderingData"].containsRTL(lineContent, isBasicASCII, model.mightContainRTL()); - const r = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__["renderViewLine2"])(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_15__["RenderLineInput"]((fontInfo.isMonospace && !options.get(24 /* disableMonospaceOptimizations */)), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, options.get(95 /* stopRenderingLineAfter */), options.get(80 /* renderWhitespace */), options.get(74 /* renderControlCharacters */), options.get(37 /* fontLigatures */) !== _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__["EditorFontLigatures"].OFF, null)); - return r.html; - } -} -// theming -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__["registerThemingParticipant"])((theme, collector) => { - const lineNumbers = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorLineNumbers"]); - if (lineNumbers) { - collector.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${lineNumbers}; }`); - } - const shadow = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_18__["scrollbarShadow"]); - if (shadow) { - collector.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${shadow} 0 -6px 6px -6px inset; }`); - } -}); -class DiffReviewNext extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.diffReview.next', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editor.action.diffReview.next', "Go to Next Difference"), - alias: 'Go to Next Difference', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].has('isInDiffEditor'), - kbOpts: { - kbExpr: null, - primary: 65 /* F7 */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - const diffEditor = findFocusedDiffEditor(accessor); - if (diffEditor) { - diffEditor.diffReviewNext(); - } - } -} -class DiffReviewPrev extends _editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.diffReview.prev', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editor.action.diffReview.prev', "Go to Previous Difference"), - alias: 'Go to Previous Difference', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].has('isInDiffEditor'), - kbOpts: { - kbExpr: null, - primary: 1024 /* Shift */ | 65 /* F7 */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - const diffEditor = findFocusedDiffEditor(accessor); - if (diffEditor) { - diffEditor.diffReviewPrev(); - } - } -} -function findFocusedDiffEditor(accessor) { - const codeEditorService = accessor.get(_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_10__["ICodeEditorService"]); - const diffEditors = codeEditorService.listDiffEditors(); - const activeCodeEditor = codeEditorService.getActiveCodeEditor(); - if (!activeCodeEditor) { - return null; - } - for (let i = 0, len = diffEditors.length; i < len; i++) { - const diffEditor = diffEditors[i]; - if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) { - return diffEditor; - } - } - return null; -} -Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__["registerEditorAction"])(DiffReviewNext); -Object(_editorExtensions_js__WEBPACK_IMPORTED_MODULE_9__["registerEditorAction"])(DiffReviewPrev); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js ***! - \*********************************************************************************************/ -/*! exports provided: EmbeddedCodeEditorWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedCodeEditorWidget", function() { return EmbeddedCodeEditorWidget; }); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - -let EmbeddedCodeEditorWidget = class EmbeddedCodeEditorWidget extends _codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__["CodeEditorWidget"] { - constructor(domElement, options, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) { - super(domElement, Object.assign(Object.assign({}, parentEditor.getRawOptions()), { overflowWidgetsDomNode: parentEditor.getOverflowWidgetsDomNode() }), {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService); - this._parentEditor = parentEditor; - this._overwriteOptions = options; - // Overwrite parent's options - super.updateOptions(this._overwriteOptions); - this._register(parentEditor.onDidChangeConfiguration((e) => this._onParentConfigurationChanged(e))); - } - getParentEditor() { - return this._parentEditor; - } - _onParentConfigurationChanged(e) { - super.updateOptions(this._parentEditor.getRawOptions()); - super.updateOptions(this._overwriteOptions); - } - updateOptions(newOptions) { - _base_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["mixin"](this._overwriteOptions, newOptions, true); - super.updateOptions(this._overwriteOptions); - } -}; -EmbeddedCodeEditorWidget = __decorate([ - __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__["IInstantiationService"]), - __param(4, _services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__["ICodeEditorService"]), - __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__["ICommandService"]), - __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["IContextKeyService"]), - __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["IThemeService"]), - __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__["INotificationService"]), - __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_8__["IAccessibilityService"]) -], EmbeddedCodeEditorWidget); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js ***! - \*************************************************************************************/ -/*! exports provided: InlineDiffMargin */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InlineDiffMargin", function() { return InlineDiffMargin; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -class InlineDiffMargin extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(_viewZoneId, _marginDomNode, editor, diff, _contextMenuService, _clipboardService) { - super(); - this._viewZoneId = _viewZoneId; - this._marginDomNode = _marginDomNode; - this.editor = editor; - this.diff = diff; - this._contextMenuService = _contextMenuService; - this._clipboardService = _clipboardService; - this._visibility = false; - // make sure the diff margin shows above overlay. - this._marginDomNode.style.zIndex = '10'; - this._diffActions = document.createElement('div'); - this._diffActions.className = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].lightBulb.classNames + ' lightbulb-glyph'; - this._diffActions.style.position = 'absolute'; - const lineHeight = editor.getOption(51 /* lineHeight */); - const lineFeed = editor.getModel().getEOL(); - this._diffActions.style.right = '0px'; - this._diffActions.style.visibility = 'hidden'; - this._diffActions.style.height = `${lineHeight}px`; - this._diffActions.style.lineHeight = `${lineHeight}px`; - this._marginDomNode.appendChild(this._diffActions); - const actions = []; - // default action - actions.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Action"]('diff.clipboard.copyDeletedContent', diff.originalEndLineNumber > diff.modifiedStartLineNumber - ? _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('diff.clipboard.copyDeletedLinesContent.label', "Copy deleted lines") - : _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('diff.clipboard.copyDeletedLinesContent.single.label', "Copy deleted line"), undefined, true, () => __awaiter(this, void 0, void 0, function* () { - yield this._clipboardService.writeText(diff.originalContent.join(lineFeed) + lineFeed); - }))); - let currentLineNumberOffset = 0; - let copyLineAction = undefined; - if (diff.originalEndLineNumber > diff.modifiedStartLineNumber) { - copyLineAction = new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Action"]('diff.clipboard.copyDeletedLineContent', _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('diff.clipboard.copyDeletedLineContent.label', "Copy deleted line ({0})", diff.originalStartLineNumber), undefined, true, () => __awaiter(this, void 0, void 0, function* () { - yield this._clipboardService.writeText(diff.originalContent[currentLineNumberOffset]); - })); - actions.push(copyLineAction); - } - const readOnly = editor.getOption(72 /* readOnly */); - if (!readOnly) { - actions.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Action"]('diff.inline.revertChange', _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('diff.inline.revertChange.label', "Revert this change"), undefined, true, () => __awaiter(this, void 0, void 0, function* () { - if (diff.modifiedEndLineNumber === 0) { - // deletion only - const column = editor.getModel().getLineMaxColumn(diff.modifiedStartLineNumber); - editor.executeEdits('diffEditor', [ - { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](diff.modifiedStartLineNumber, column, diff.modifiedStartLineNumber, column), - text: lineFeed + diff.originalContent.join(lineFeed) - } - ]); - } - else { - const column = editor.getModel().getLineMaxColumn(diff.modifiedEndLineNumber); - editor.executeEdits('diffEditor', [ - { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](diff.modifiedStartLineNumber, 1, diff.modifiedEndLineNumber, column), - text: diff.originalContent.join(lineFeed) - } - ]); - } - }))); - } - const showContextMenu = (x, y) => { - this._contextMenuService.showContextMenu({ - getAnchor: () => { - return { - x, - y - }; - }, - getActions: () => { - if (copyLineAction) { - copyLineAction.label = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('diff.clipboard.copyDeletedLineContent.label', "Copy deleted line ({0})", diff.originalStartLineNumber + currentLineNumberOffset); - } - return actions; - }, - autoSelectFirstItem: true - }); - }; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._diffActions, 'mousedown', e => { - const { top, height } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this._diffActions); - let pad = Math.floor(lineHeight / 3); - e.preventDefault(); - showContextMenu(e.posx, top + height + pad); - })); - this._register(editor.onMouseMove((e) => { - if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) { - const viewZoneId = e.target.detail.viewZoneId; - if (viewZoneId === this._viewZoneId) { - this.visibility = true; - currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight); - } - else { - this.visibility = false; - } - } - else { - this.visibility = false; - } - })); - this._register(editor.onMouseDown((e) => { - if (!e.event.rightButton) { - return; - } - if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) { - const viewZoneId = e.target.detail.viewZoneId; - if (viewZoneId === this._viewZoneId) { - e.event.preventDefault(); - currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight); - showContextMenu(e.event.posx, e.event.posy + lineHeight); - } - } - })); - } - get visibility() { - return this._visibility; - } - set visibility(_visibility) { - if (this._visibility !== _visibility) { - this._visibility = _visibility; - if (_visibility) { - this._diffActions.style.visibility = 'visible'; - } - else { - this._diffActions.style.visibility = 'hidden'; - } - } - } - _updateLightBulbPosition(marginDomNode, y, lineHeight) { - const { top } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](marginDomNode); - const offset = y - top; - const lineNumberOffset = Math.floor(offset / lineHeight); - const newTop = lineNumberOffset * lineHeight; - this._diffActions.style.top = `${newTop}px`; - return lineNumberOffset; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./diffEditor.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_diffEditor_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./diffReview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_diffReview_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css ***! - \**********************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./editor.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_editor_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js ***! - \************************************************************************************/ -/*! exports provided: ReplaceCommand, ReplaceCommandThatSelectsText, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState, ReplaceCommandThatPreservesSelection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceCommand", function() { return ReplaceCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceCommandThatSelectsText", function() { return ReplaceCommandThatSelectsText; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceCommandWithoutChangingPosition", function() { return ReplaceCommandWithoutChangingPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceCommandWithOffsetCursorState", function() { return ReplaceCommandWithOffsetCursorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceCommandThatPreservesSelection", function() { return ReplaceCommandThatPreservesSelection; }); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class ReplaceCommand { - constructor(range, text, insertsAutoWhitespace = false) { - this._range = range; - this._text = text; - this.insertsAutoWhitespace = insertsAutoWhitespace; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._range, this._text); - } - computeCursorState(model, helper) { - let inverseEditOperations = helper.getInverseEditOperations(); - let srcRange = inverseEditOperations[0].range; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.endLineNumber, srcRange.endColumn, srcRange.endLineNumber, srcRange.endColumn); - } -} -class ReplaceCommandThatSelectsText { - constructor(range, text) { - this._range = range; - this._text = text; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._range, this._text); - } - computeCursorState(model, helper) { - const inverseEditOperations = helper.getInverseEditOperations(); - const srcRange = inverseEditOperations[0].range; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.startLineNumber, srcRange.startColumn, srcRange.endLineNumber, srcRange.endColumn); - } -} -class ReplaceCommandWithoutChangingPosition { - constructor(range, text, insertsAutoWhitespace = false) { - this._range = range; - this._text = text; - this.insertsAutoWhitespace = insertsAutoWhitespace; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._range, this._text); - } - computeCursorState(model, helper) { - let inverseEditOperations = helper.getInverseEditOperations(); - let srcRange = inverseEditOperations[0].range; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.startLineNumber, srcRange.startColumn, srcRange.startLineNumber, srcRange.startColumn); - } -} -class ReplaceCommandWithOffsetCursorState { - constructor(range, text, lineNumberDeltaOffset, columnDeltaOffset, insertsAutoWhitespace = false) { - this._range = range; - this._text = text; - this._columnDeltaOffset = columnDeltaOffset; - this._lineNumberDeltaOffset = lineNumberDeltaOffset; - this.insertsAutoWhitespace = insertsAutoWhitespace; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._range, this._text); - } - computeCursorState(model, helper) { - let inverseEditOperations = helper.getInverseEditOperations(); - let srcRange = inverseEditOperations[0].range; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset, srcRange.endLineNumber + this._lineNumberDeltaOffset, srcRange.endColumn + this._columnDeltaOffset); - } -} -class ReplaceCommandThatPreservesSelection { - constructor(editRange, text, initialSelection, forceMoveMarkers = false) { - this._range = editRange; - this._text = text; - this._initialSelection = initialSelection; - this._forceMoveMarkers = forceMoveMarkers; - this._selectionId = null; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._range, this._text, this._forceMoveMarkers); - this._selectionId = builder.trackSelection(this._initialSelection); - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this._selectionId); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js ***! - \**********************************************************************************/ -/*! exports provided: cachedStringRepeat, ShiftCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cachedStringRepeat", function() { return cachedStringRepeat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShiftCommand", function() { return ShiftCommand; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const repeatCache = Object.create(null); -function cachedStringRepeat(str, count) { - if (!repeatCache[str]) { - repeatCache[str] = ['', str]; - } - const cache = repeatCache[str]; - for (let i = cache.length; i <= count; i++) { - cache[i] = cache[i - 1] + str; - } - return cache[count]; -} -class ShiftCommand { - constructor(range, opts) { - this._opts = opts; - this._selection = range; - this._selectionId = null; - this._useLastEditRangeForCursorEndPosition = false; - this._selectionStartColumnStaysPut = false; - } - static unshiftIndent(line, column, tabSize, indentSize, insertSpaces) { - // Determine the visible column where the content starts - const contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].visibleColumnFromColumn(line, column, tabSize); - if (insertSpaces) { - const indent = cachedStringRepeat(' ', indentSize); - const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].prevIndentTabStop(contentStartVisibleColumn, indentSize); - const indentCount = desiredTabStop / indentSize; // will be an integer - return cachedStringRepeat(indent, indentCount); - } - else { - const indent = '\t'; - const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].prevRenderTabStop(contentStartVisibleColumn, tabSize); - const indentCount = desiredTabStop / tabSize; // will be an integer - return cachedStringRepeat(indent, indentCount); - } - } - static shiftIndent(line, column, tabSize, indentSize, insertSpaces) { - // Determine the visible column where the content starts - const contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].visibleColumnFromColumn(line, column, tabSize); - if (insertSpaces) { - const indent = cachedStringRepeat(' ', indentSize); - const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].nextIndentTabStop(contentStartVisibleColumn, indentSize); - const indentCount = desiredTabStop / indentSize; // will be an integer - return cachedStringRepeat(indent, indentCount); - } - else { - const indent = '\t'; - const desiredTabStop = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].nextRenderTabStop(contentStartVisibleColumn, tabSize); - const indentCount = desiredTabStop / tabSize; // will be an integer - return cachedStringRepeat(indent, indentCount); - } - } - _addEditOperation(builder, range, text) { - if (this._useLastEditRangeForCursorEndPosition) { - builder.addTrackedEditOperation(range, text); - } - else { - builder.addEditOperation(range, text); - } - } - getEditOperations(model, builder) { - const startLine = this._selection.startLineNumber; - let endLine = this._selection.endLineNumber; - if (this._selection.endColumn === 1 && startLine !== endLine) { - endLine = endLine - 1; - } - const { tabSize, indentSize, insertSpaces } = this._opts; - const shouldIndentEmptyLines = (startLine === endLine); - if (this._opts.useTabStops) { - // if indenting or outdenting on a whitespace only line - if (this._selection.isEmpty()) { - if (/^\s*$/.test(model.getLineContent(startLine))) { - this._useLastEditRangeForCursorEndPosition = true; - } - } - // keep track of previous line's "miss-alignment" - let previousLineExtraSpaces = 0, extraSpaces = 0; - for (let lineNumber = startLine; lineNumber <= endLine; lineNumber++, previousLineExtraSpaces = extraSpaces) { - extraSpaces = 0; - let lineText = model.getLineContent(lineNumber); - let indentationEndIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineText); - if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) { - // empty line or line with no leading whitespace => nothing to do - continue; - } - if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) { - // do not indent empty lines => nothing to do - continue; - } - if (indentationEndIndex === -1) { - // the entire line is whitespace - indentationEndIndex = lineText.length; - } - if (lineNumber > 1) { - let contentStartVisibleColumn = _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorColumns"].visibleColumnFromColumn(lineText, indentationEndIndex + 1, tabSize); - if (contentStartVisibleColumn % indentSize !== 0) { - // The current line is "miss-aligned", so let's see if this is expected... - // This can only happen when it has trailing commas in the indent - if (model.isCheapToTokenize(lineNumber - 1)) { - let enterAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__["LanguageConfigurationRegistry"].getEnterAction(this._opts.autoIndent, model, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber - 1, model.getLineMaxColumn(lineNumber - 1), lineNumber - 1, model.getLineMaxColumn(lineNumber - 1))); - if (enterAction) { - extraSpaces = previousLineExtraSpaces; - if (enterAction.appendText) { - for (let j = 0, lenJ = enterAction.appendText.length; j < lenJ && extraSpaces < indentSize; j++) { - if (enterAction.appendText.charCodeAt(j) === 32 /* Space */) { - extraSpaces++; - } - else { - break; - } - } - } - if (enterAction.removeText) { - extraSpaces = Math.max(0, extraSpaces - enterAction.removeText); - } - // Act as if `prefixSpaces` is not part of the indentation - for (let j = 0; j < extraSpaces; j++) { - if (indentationEndIndex === 0 || lineText.charCodeAt(indentationEndIndex - 1) !== 32 /* Space */) { - break; - } - indentationEndIndex--; - } - } - } - } - } - if (this._opts.isUnshift && indentationEndIndex === 0) { - // line with no leading whitespace => nothing to do - continue; - } - let desiredIndent; - if (this._opts.isUnshift) { - desiredIndent = ShiftCommand.unshiftIndent(lineText, indentationEndIndex + 1, tabSize, indentSize, insertSpaces); - } - else { - desiredIndent = ShiftCommand.shiftIndent(lineText, indentationEndIndex + 1, tabSize, indentSize, insertSpaces); - } - this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, 1, lineNumber, indentationEndIndex + 1), desiredIndent); - if (lineNumber === startLine && !this._selection.isEmpty()) { - // Force the startColumn to stay put because we're inserting after it - this._selectionStartColumnStaysPut = (this._selection.startColumn <= indentationEndIndex + 1); - } - } - } - else { - // if indenting or outdenting on a whitespace only line - if (!this._opts.isUnshift && this._selection.isEmpty() && model.getLineLength(startLine) === 0) { - this._useLastEditRangeForCursorEndPosition = true; - } - const oneIndent = (insertSpaces ? cachedStringRepeat(' ', indentSize) : '\t'); - for (let lineNumber = startLine; lineNumber <= endLine; lineNumber++) { - const lineText = model.getLineContent(lineNumber); - let indentationEndIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineText); - if (this._opts.isUnshift && (lineText.length === 0 || indentationEndIndex === 0)) { - // empty line or line with no leading whitespace => nothing to do - continue; - } - if (!shouldIndentEmptyLines && !this._opts.isUnshift && lineText.length === 0) { - // do not indent empty lines => nothing to do - continue; - } - if (indentationEndIndex === -1) { - // the entire line is whitespace - indentationEndIndex = lineText.length; - } - if (this._opts.isUnshift && indentationEndIndex === 0) { - // line with no leading whitespace => nothing to do - continue; - } - if (this._opts.isUnshift) { - indentationEndIndex = Math.min(indentationEndIndex, indentSize); - for (let i = 0; i < indentationEndIndex; i++) { - const chr = lineText.charCodeAt(i); - if (chr === 9 /* Tab */) { - indentationEndIndex = i + 1; - break; - } - } - this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); - } - else { - this._addEditOperation(builder, new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, 1, lineNumber, 1), oneIndent); - if (lineNumber === startLine && !this._selection.isEmpty()) { - // Force the startColumn to stay put because we're inserting after it - this._selectionStartColumnStaysPut = (this._selection.startColumn === 1); - } - } - } - } - this._selectionId = builder.trackSelection(this._selection); - } - computeCursorState(model, helper) { - if (this._useLastEditRangeForCursorEndPosition) { - let lastOp = helper.getInverseEditOperations()[0]; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](lastOp.range.endLineNumber, lastOp.range.endColumn, lastOp.range.endLineNumber, lastOp.range.endColumn); - } - const result = helper.getTrackedSelection(this._selectionId); - if (this._selectionStartColumnStaysPut) { - // The selection start should not move - let initialStartColumn = this._selection.startColumn; - let resultStartColumn = result.startColumn; - if (resultStartColumn <= initialStartColumn) { - return result; - } - if (result.getDirection() === 0 /* LTR */) { - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](result.startLineNumber, initialStartColumn, result.endLineNumber, result.endColumn); - } - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](result.endLineNumber, result.endColumn, result.startLineNumber, initialStartColumn); - } - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js ***! - \**********************************************************************************************/ -/*! exports provided: SurroundSelectionCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurroundSelectionCommand", function() { return SurroundSelectionCommand; }); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class SurroundSelectionCommand { - constructor(range, charBeforeSelection, charAfterSelection) { - this._range = range; - this._charBeforeSelection = charBeforeSelection; - this._charAfterSelection = charAfterSelection; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(new _core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection); - builder.addTrackedEditOperation(new _core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection); - } - computeCursorState(model, helper) { - let inverseEditOperations = helper.getInverseEditOperations(); - let firstOperationRange = inverseEditOperations[0].range; - let secondOperationRange = inverseEditOperations[1].range; - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](firstOperationRange.endLineNumber, firstOperationRange.endColumn, secondOperationRange.endLineNumber, secondOperationRange.endColumn - this._charAfterSelection.length); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js ***! - \***************************************************************************************************/ -/*! exports provided: TrimTrailingWhitespaceCommand, trimTrailingWhitespace */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrimTrailingWhitespaceCommand", function() { return TrimTrailingWhitespaceCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trimTrailingWhitespace", function() { return trimTrailingWhitespace; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class TrimTrailingWhitespaceCommand { - constructor(selection, cursors) { - this._selection = selection; - this._cursors = cursors; - this._selectionId = null; - } - getEditOperations(model, builder) { - let ops = trimTrailingWhitespace(model, this._cursors); - for (let i = 0, len = ops.length; i < len; i++) { - let op = ops[i]; - builder.addEditOperation(op.range, op.text); - } - this._selectionId = builder.trackSelection(this._selection); - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this._selectionId); - } -} -/** - * Generate commands for trimming trailing whitespace on a model and ignore lines on which cursors are sitting. - */ -function trimTrailingWhitespace(model, cursors) { - // Sort cursors ascending - cursors.sort((a, b) => { - if (a.lineNumber === b.lineNumber) { - return a.column - b.column; - } - return a.lineNumber - b.lineNumber; - }); - // Reduce multiple cursors on the same line and only keep the last one on the line - for (let i = cursors.length - 2; i >= 0; i--) { - if (cursors[i].lineNumber === cursors[i + 1].lineNumber) { - // Remove cursor at `i` - cursors.splice(i, 1); - } - } - let r = []; - let rLen = 0; - let cursorIndex = 0; - let cursorLen = cursors.length; - for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) { - let lineContent = model.getLineContent(lineNumber); - let maxLineColumn = lineContent.length + 1; - let minEditColumn = 0; - if (cursorIndex < cursorLen && cursors[cursorIndex].lineNumber === lineNumber) { - minEditColumn = cursors[cursorIndex].column; - cursorIndex++; - if (minEditColumn === maxLineColumn) { - // The cursor is at the end of the line => no edits for sure on this line - continue; - } - } - if (lineContent.length === 0) { - continue; - } - let lastNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["lastNonWhitespaceIndex"](lineContent); - let fromColumn = 0; - if (lastNonWhitespaceIndex === -1) { - // Entire line is whitespace - fromColumn = 1; - } - else if (lastNonWhitespaceIndex !== lineContent.length - 1) { - // There is trailing whitespace - fromColumn = lastNonWhitespaceIndex + 2; - } - else { - // There is no trailing whitespace - continue; - } - fromColumn = Math.max(minEditColumn, fromColumn); - r[rLen++] = _core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__["EditOperation"].delete(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, fromColumn, lineNumber, maxLineColumn)); - } - return r; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js ***! - \**************************************************************************************/ -/*! exports provided: TabFocus, ComputedEditorOptions, CommonEditorConfiguration, editorConfigurationBaseNode, isEditorConfigurationKey, isDiffEditorConfigurationKey */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TabFocus", function() { return TabFocus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComputedEditorOptions", function() { return ComputedEditorOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonEditorConfiguration", function() { return CommonEditorConfiguration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorConfigurationBaseNode", function() { return editorConfigurationBaseNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEditorConfigurationKey", function() { return isEditorConfigurationKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDiffEditorConfigurationKey", function() { return isDiffEditorConfigurationKey; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _editorZoom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editorZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js"); -/* harmony import */ var _fontInfo_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fontInfo.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js"); -/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_collections_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/collections.js */ "./node_modules/monaco-editor/esm/vs/base/common/collections.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -const TabFocus = new class { - constructor() { - this._tabFocus = false; - this._onDidChangeTabFocus = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this.onDidChangeTabFocus = this._onDidChangeTabFocus.event; - } - getTabFocusMode() { - return this._tabFocus; - } - setTabFocusMode(tabFocusMode) { - if (this._tabFocus === tabFocusMode) { - return; - } - this._tabFocus = tabFocusMode; - this._onDidChangeTabFocus.fire(this._tabFocus); - } -}; -const hasOwnProperty = Object.hasOwnProperty; -class ComputedEditorOptions { - constructor() { - this._values = []; - } - _read(id) { - return this._values[id]; - } - get(id) { - return this._values[id]; - } - _write(id, value) { - this._values[id] = value; - } -} -class RawEditorOptions { - constructor() { - this._values = []; - } - _read(id) { - return this._values[id]; - } - _write(id, value) { - this._values[id] = value; - } -} -class EditorConfiguration2 { - static readOptions(_options) { - const options = _options; - const result = new RawEditorOptions(); - for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["editorOptionsRegistry"]) { - const value = (editorOption.name === '_never_' ? undefined : options[editorOption.name]); - result._write(editorOption.id, value); - } - return result; - } - static validateOptions(options) { - const result = new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["ValidatedEditorOptions"](); - for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["editorOptionsRegistry"]) { - result._write(editorOption.id, editorOption.validate(options._read(editorOption.id))); - } - return result; - } - static computeOptions(options, env) { - const result = new ComputedEditorOptions(); - for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["editorOptionsRegistry"]) { - result._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id))); - } - return result; - } - static _deepEquals(a, b) { - if (typeof a !== 'object' || typeof b !== 'object') { - return (a === b); - } - if (Array.isArray(a) || Array.isArray(b)) { - return (Array.isArray(a) && Array.isArray(b) ? _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__["equals"](a, b) : false); - } - for (let key in a) { - if (!EditorConfiguration2._deepEquals(a[key], b[key])) { - return false; - } - } - return true; - } - static checkEquals(a, b) { - const result = []; - let somethingChanged = false; - for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["editorOptionsRegistry"]) { - const changed = !EditorConfiguration2._deepEquals(a._read(editorOption.id), b._read(editorOption.id)); - result[editorOption.id] = changed; - if (changed) { - somethingChanged = true; - } - } - return (somethingChanged ? new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["ConfigurationChangedEvent"](result) : null); - } -} -/** - * Compatibility with old options - */ -function migrateOptions(options) { - const wordWrap = options.wordWrap; - if (wordWrap === true) { - options.wordWrap = 'on'; - } - else if (wordWrap === false) { - options.wordWrap = 'off'; - } - const lineNumbers = options.lineNumbers; - if (lineNumbers === true) { - options.lineNumbers = 'on'; - } - else if (lineNumbers === false) { - options.lineNumbers = 'off'; - } - const autoClosingBrackets = options.autoClosingBrackets; - if (autoClosingBrackets === false) { - options.autoClosingBrackets = 'never'; - options.autoClosingQuotes = 'never'; - options.autoSurround = 'never'; - } - const cursorBlinking = options.cursorBlinking; - if (cursorBlinking === 'visible') { - options.cursorBlinking = 'solid'; - } - const renderWhitespace = options.renderWhitespace; - if (renderWhitespace === true) { - options.renderWhitespace = 'boundary'; - } - else if (renderWhitespace === false) { - options.renderWhitespace = 'none'; - } - const renderLineHighlight = options.renderLineHighlight; - if (renderLineHighlight === true) { - options.renderLineHighlight = 'line'; - } - else if (renderLineHighlight === false) { - options.renderLineHighlight = 'none'; - } - const acceptSuggestionOnEnter = options.acceptSuggestionOnEnter; - if (acceptSuggestionOnEnter === true) { - options.acceptSuggestionOnEnter = 'on'; - } - else if (acceptSuggestionOnEnter === false) { - options.acceptSuggestionOnEnter = 'off'; - } - const tabCompletion = options.tabCompletion; - if (tabCompletion === false) { - options.tabCompletion = 'off'; - } - else if (tabCompletion === true) { - options.tabCompletion = 'onlySnippets'; - } - const suggest = options.suggest; - if (suggest && typeof suggest.filteredTypes === 'object' && suggest.filteredTypes) { - const mapping = {}; - mapping['method'] = 'showMethods'; - mapping['function'] = 'showFunctions'; - mapping['constructor'] = 'showConstructors'; - mapping['field'] = 'showFields'; - mapping['variable'] = 'showVariables'; - mapping['class'] = 'showClasses'; - mapping['struct'] = 'showStructs'; - mapping['interface'] = 'showInterfaces'; - mapping['module'] = 'showModules'; - mapping['property'] = 'showProperties'; - mapping['event'] = 'showEvents'; - mapping['operator'] = 'showOperators'; - mapping['unit'] = 'showUnits'; - mapping['value'] = 'showValues'; - mapping['constant'] = 'showConstants'; - mapping['enum'] = 'showEnums'; - mapping['enumMember'] = 'showEnumMembers'; - mapping['keyword'] = 'showKeywords'; - mapping['text'] = 'showWords'; - mapping['color'] = 'showColors'; - mapping['file'] = 'showFiles'; - mapping['reference'] = 'showReferences'; - mapping['folder'] = 'showFolders'; - mapping['typeParameter'] = 'showTypeParameters'; - mapping['snippet'] = 'showSnippets'; - Object(_base_common_collections_js__WEBPACK_IMPORTED_MODULE_10__["forEach"])(mapping, entry => { - const value = suggest.filteredTypes[entry.key]; - if (value === false) { - suggest[entry.value] = value; - } - }); - // delete (suggest).filteredTypes; - } - const hover = options.hover; - if (hover === true) { - options.hover = { - enabled: true - }; - } - else if (hover === false) { - options.hover = { - enabled: false - }; - } - const parameterHints = options.parameterHints; - if (parameterHints === true) { - options.parameterHints = { - enabled: true - }; - } - else if (parameterHints === false) { - options.parameterHints = { - enabled: false - }; - } - const autoIndent = options.autoIndent; - if (autoIndent === true) { - options.autoIndent = 'full'; - } - else if (autoIndent === false) { - options.autoIndent = 'advanced'; - } - const matchBrackets = options.matchBrackets; - if (matchBrackets === true) { - options.matchBrackets = 'always'; - } - else if (matchBrackets === false) { - options.matchBrackets = 'never'; - } -} -function deepCloneAndMigrateOptions(_options) { - const options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](_options); - migrateOptions(options); - return options; -} -class CommonEditorConfiguration extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(isSimpleWidget, _options) { - super(); - this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._onDidChangeFast = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeFast = this._onDidChangeFast.event; - this.isSimpleWidget = isSimpleWidget; - this._isDominatedByLongLines = false; - this._computeOptionsMemory = new _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["ComputeOptionsMemory"](); - this._viewLineCount = 1; - this._lineNumbersDigitCount = 1; - this._rawOptions = deepCloneAndMigrateOptions(_options); - this._readOptions = EditorConfiguration2.readOptions(this._rawOptions); - this._validatedOptions = EditorConfiguration2.validateOptions(this._readOptions); - this._register(_editorZoom_js__WEBPACK_IMPORTED_MODULE_6__["EditorZoom"].onDidChangeZoomLevel(_ => this._recomputeOptions())); - this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions())); - } - observeReferenceElement(dimension) { - } - dispose() { - super.dispose(); - } - _recomputeOptions() { - const oldOptions = this.options; - const newOptions = this._computeInternalOptions(); - if (!oldOptions) { - this.options = newOptions; - } - else { - const changeEvent = EditorConfiguration2.checkEquals(oldOptions, newOptions); - if (changeEvent === null) { - // nothing changed! - return; - } - this.options = newOptions; - this._onDidChangeFast.fire(changeEvent); - this._onDidChange.fire(changeEvent); - } - } - getRawOptions() { - return this._rawOptions; - } - _computeInternalOptions() { - const partialEnv = this._getEnvConfiguration(); - const bareFontInfo = _fontInfo_js__WEBPACK_IMPORTED_MODULE_7__["BareFontInfo"].createFromValidatedSettings(this._validatedOptions, partialEnv.zoomLevel, this.isSimpleWidget); - const env = { - memory: this._computeOptionsMemory, - outerWidth: partialEnv.outerWidth, - outerHeight: partialEnv.outerHeight, - fontInfo: this.readConfiguration(bareFontInfo), - extraEditorClassName: partialEnv.extraEditorClassName, - isDominatedByLongLines: this._isDominatedByLongLines, - viewLineCount: this._viewLineCount, - lineNumbersDigitCount: this._lineNumbersDigitCount, - emptySelectionClipboard: partialEnv.emptySelectionClipboard, - pixelRatio: partialEnv.pixelRatio, - tabFocusMode: TabFocus.getTabFocusMode(), - accessibilitySupport: partialEnv.accessibilitySupport - }; - return EditorConfiguration2.computeOptions(this._validatedOptions, env); - } - static _subsetEquals(base, subset) { - for (const key in subset) { - if (hasOwnProperty.call(subset, key)) { - const subsetValue = subset[key]; - const baseValue = base[key]; - if (baseValue === subsetValue) { - continue; - } - if (Array.isArray(baseValue) && Array.isArray(subsetValue)) { - if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_4__["equals"](baseValue, subsetValue)) { - return false; - } - continue; - } - if (baseValue && typeof baseValue === 'object' && subsetValue && typeof subsetValue === 'object') { - if (!this._subsetEquals(baseValue, subsetValue)) { - return false; - } - continue; - } - return false; - } - } - return true; - } - updateOptions(_newOptions) { - if (typeof _newOptions === 'undefined') { - return; - } - const newOptions = deepCloneAndMigrateOptions(_newOptions); - if (CommonEditorConfiguration._subsetEquals(this._rawOptions, newOptions)) { - return; - } - this._rawOptions = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["mixin"](this._rawOptions, newOptions || {}); - this._readOptions = EditorConfiguration2.readOptions(this._rawOptions); - this._validatedOptions = EditorConfiguration2.validateOptions(this._readOptions); - this._recomputeOptions(); - } - setIsDominatedByLongLines(isDominatedByLongLines) { - this._isDominatedByLongLines = isDominatedByLongLines; - this._recomputeOptions(); - } - setMaxLineNumber(maxLineNumber) { - const lineNumbersDigitCount = CommonEditorConfiguration._digitCount(maxLineNumber); - if (this._lineNumbersDigitCount === lineNumbersDigitCount) { - return; - } - this._lineNumbersDigitCount = lineNumbersDigitCount; - this._recomputeOptions(); - } - setViewLineCount(viewLineCount) { - if (this._viewLineCount === viewLineCount) { - return; - } - this._viewLineCount = viewLineCount; - this._recomputeOptions(); - } - static _digitCount(n) { - let r = 0; - while (n) { - n = Math.floor(n / 10); - r++; - } - return r ? r : 1; - } -} -const editorConfigurationBaseNode = Object.freeze({ - id: 'editor', - order: 5, - type: 'object', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorConfigurationTitle', "Editor"), - scope: 5 /* LANGUAGE_OVERRIDABLE */, -}); -const configurationRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__["Registry"].as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__["Extensions"].Configuration); -const editorConfiguration = Object.assign(Object.assign({}, editorConfigurationBaseNode), { properties: { - 'editor.tabSize': { - type: 'number', - default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].tabSize, - minimum: 1, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('tabSize', "The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") - }, - // 'editor.indentSize': { - // 'anyOf': [ - // { - // type: 'string', - // enum: ['tabSize'] - // }, - // { - // type: 'number', - // minimum: 1 - // } - // ], - // default: 'tabSize', - // markdownDescription: nls.localize('indentSize', "The number of spaces used for indentation or 'tabSize' to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") - // }, - 'editor.insertSpaces': { - type: 'boolean', - default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].insertSpaces, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('insertSpaces', "Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.") - }, - 'editor.detectIndentation': { - type: 'boolean', - default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].detectIndentation, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('detectIndentation', "Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.") - }, - 'editor.trimAutoWhitespace': { - type: 'boolean', - default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].trimAutoWhitespace, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('trimAutoWhitespace', "Remove trailing auto inserted whitespace.") - }, - 'editor.largeFileOptimizations': { - type: 'boolean', - default: _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].largeFileOptimizations, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('largeFileOptimizations', "Special handling for large files to disable certain memory intensive features.") - }, - 'editor.wordBasedSuggestions': { - type: 'boolean', - default: true, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordBasedSuggestions', "Controls whether completions should be computed based on words in the document.") - }, - 'editor.semanticHighlighting.enabled': { - enum: [true, false, 'configuredByTheme'], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('semanticHighlighting.true', 'Semantic highlighting enabled for all color themes.'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('semanticHighlighting.false', 'Semantic highlighting disabled for all color themes.'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('semanticHighlighting.configuredByTheme', 'Semantic highlighting is configured by the current color theme\'s `semanticHighlighting` setting.') - ], - default: 'configuredByTheme', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('semanticHighlighting.enabled', "Controls whether the semanticHighlighting is shown for the languages that support it.") - }, - 'editor.stablePeek': { - type: 'boolean', - default: false, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('stablePeek', "Keep peek editors open even when double clicking their content or when hitting `Escape`.") - }, - 'editor.maxTokenizationLineLength': { - type: 'integer', - default: 20000, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('maxTokenizationLineLength', "Lines above this length will not be tokenized for performance reasons") - }, - 'diffEditor.maxComputationTime': { - type: 'number', - default: 5000, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('maxComputationTime', "Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.") - }, - 'diffEditor.renderSideBySide': { - type: 'boolean', - default: true, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('sideBySide', "Controls whether the diff editor shows the diff side by side or inline.") - }, - 'diffEditor.ignoreTrimWhitespace': { - type: 'boolean', - default: true, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('ignoreTrimWhitespace', "When enabled, the diff editor ignores changes in leading or trailing whitespace.") - }, - 'diffEditor.renderIndicators': { - type: 'boolean', - default: true, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderIndicators', "Controls whether the diff editor shows +/- indicators for added/removed changes.") - }, - 'diffEditor.codeLens': { - type: 'boolean', - default: false, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('codeLens', "Controls whether the editor shows CodeLens.") - } - } }); -function isConfigurationPropertySchema(x) { - return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined'); -} -// Add properties from the Editor Option Registry -for (const editorOption of _editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["editorOptionsRegistry"]) { - const schema = editorOption.schema; - if (typeof schema !== 'undefined') { - if (isConfigurationPropertySchema(schema)) { - // This is a single schema contribution - editorConfiguration.properties[`editor.${editorOption.name}`] = schema; - } - else { - for (let key in schema) { - if (hasOwnProperty.call(schema, key)) { - editorConfiguration.properties[key] = schema[key]; - } - } - } - } -} -let cachedEditorConfigurationKeys = null; -function getEditorConfigurationKeys() { - if (cachedEditorConfigurationKeys === null) { - cachedEditorConfigurationKeys = Object.create(null); - Object.keys(editorConfiguration.properties).forEach((prop) => { - cachedEditorConfigurationKeys[prop] = true; - }); - } - return cachedEditorConfigurationKeys; -} -function isEditorConfigurationKey(key) { - const editorConfigurationKeys = getEditorConfigurationKeys(); - return (editorConfigurationKeys[`editor.${key}`] || false); -} -function isDiffEditorConfigurationKey(key) { - const editorConfigurationKeys = getEditorConfigurationKeys(); - return (editorConfigurationKeys[`diffEditor.${key}`] || false); -} -configurationRegistry.registerConfiguration(editorConfiguration); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js ***! - \*********************************************************************************/ -/*! exports provided: MINIMAP_GUTTER_WIDTH, ConfigurationChangedEvent, ValidatedEditorOptions, ComputeOptionsMemory, TextEditorCursorStyle, EditorFontLigatures, EditorLayoutInfoComputer, filterValidationDecorations, EDITOR_FONT_DEFAULTS, EDITOR_MODEL_DEFAULTS, editorOptionsRegistry, EditorOptions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MINIMAP_GUTTER_WIDTH", function() { return MINIMAP_GUTTER_WIDTH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfigurationChangedEvent", function() { return ConfigurationChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidatedEditorOptions", function() { return ValidatedEditorOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComputeOptionsMemory", function() { return ComputeOptionsMemory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEditorCursorStyle", function() { return TextEditorCursorStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorFontLigatures", function() { return EditorFontLigatures; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorLayoutInfoComputer", function() { return EditorLayoutInfoComputer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterValidationDecorations", function() { return filterValidationDecorations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EDITOR_FONT_DEFAULTS", function() { return EDITOR_FONT_DEFAULTS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EDITOR_MODEL_DEFAULTS", function() { return EDITOR_MODEL_DEFAULTS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorOptionsRegistry", function() { return editorOptionsRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorOptions", function() { return EditorOptions; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/wordHelper.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/** - * @internal - * The width of the minimap gutter, in pixels. - */ -const MINIMAP_GUTTER_WIDTH = 8; -//#endregion -/** - * An event describing that the configuration of the editor has changed. - */ -class ConfigurationChangedEvent { - /** - * @internal - */ - constructor(values) { - this._values = values; - } - hasChanged(id) { - return this._values[id]; - } -} -/** - * @internal - */ -class ValidatedEditorOptions { - constructor() { - this._values = []; - } - _read(option) { - return this._values[option]; - } - get(id) { - return this._values[id]; - } - _write(option, value) { - this._values[option] = value; - } -} -/** - * @internal - */ -class ComputeOptionsMemory { - constructor() { - this.stableMinimapLayoutInput = null; - this.stableFitMaxMinimapScale = 0; - this.stableFitRemainingWidth = 0; - } -} -/** - * @internal - */ -class BaseEditorOption { - constructor(id, name, defaultValue, schema) { - this.id = id; - this.name = name; - this.defaultValue = defaultValue; - this.schema = schema; - } - compute(env, options, value) { - return value; - } -} -/** - * @internal - */ -class ComputedEditorOption { - constructor(id, deps = null) { - this.schema = undefined; - this.id = id; - this.name = '_never_'; - this.defaultValue = undefined; - this.deps = deps; - } - validate(input) { - return this.defaultValue; - } -} -class SimpleEditorOption { - constructor(id, name, defaultValue, schema) { - this.id = id; - this.name = name; - this.defaultValue = defaultValue; - this.schema = schema; - } - validate(input) { - if (typeof input === 'undefined') { - return this.defaultValue; - } - return input; - } - compute(env, options, value) { - return value; - } -} -class EditorBooleanOption extends SimpleEditorOption { - static boolean(value, defaultValue) { - if (typeof value === 'undefined') { - return defaultValue; - } - if (value === 'false') { - // treat the string 'false' as false - return false; - } - return Boolean(value); - } - constructor(id, name, defaultValue, schema = undefined) { - if (typeof schema !== 'undefined') { - schema.type = 'boolean'; - schema.default = defaultValue; - } - super(id, name, defaultValue, schema); - } - validate(input) { - return EditorBooleanOption.boolean(input, this.defaultValue); - } -} -class EditorIntOption extends SimpleEditorOption { - constructor(id, name, defaultValue, minimum, maximum, schema = undefined) { - if (typeof schema !== 'undefined') { - schema.type = 'integer'; - schema.default = defaultValue; - schema.minimum = minimum; - schema.maximum = maximum; - } - super(id, name, defaultValue, schema); - this.minimum = minimum; - this.maximum = maximum; - } - static clampedInt(value, defaultValue, minimum, maximum) { - if (typeof value === 'undefined') { - return defaultValue; - } - let r = parseInt(value, 10); - if (isNaN(r)) { - return defaultValue; - } - r = Math.max(minimum, r); - r = Math.min(maximum, r); - return r | 0; - } - validate(input) { - return EditorIntOption.clampedInt(input, this.defaultValue, this.minimum, this.maximum); - } -} -class EditorFloatOption extends SimpleEditorOption { - constructor(id, name, defaultValue, validationFn, schema) { - if (typeof schema !== 'undefined') { - schema.type = 'number'; - schema.default = defaultValue; - } - super(id, name, defaultValue, schema); - this.validationFn = validationFn; - } - static clamp(n, min, max) { - if (n < min) { - return min; - } - if (n > max) { - return max; - } - return n; - } - static float(value, defaultValue) { - if (typeof value === 'number') { - return value; - } - if (typeof value === 'undefined') { - return defaultValue; - } - const r = parseFloat(value); - return (isNaN(r) ? defaultValue : r); - } - validate(input) { - return this.validationFn(EditorFloatOption.float(input, this.defaultValue)); - } -} -class EditorStringOption extends SimpleEditorOption { - static string(value, defaultValue) { - if (typeof value !== 'string') { - return defaultValue; - } - return value; - } - constructor(id, name, defaultValue, schema = undefined) { - if (typeof schema !== 'undefined') { - schema.type = 'string'; - schema.default = defaultValue; - } - super(id, name, defaultValue, schema); - } - validate(input) { - return EditorStringOption.string(input, this.defaultValue); - } -} -class EditorStringEnumOption extends SimpleEditorOption { - constructor(id, name, defaultValue, allowedValues, schema = undefined) { - if (typeof schema !== 'undefined') { - schema.type = 'string'; - schema.enum = allowedValues; - schema.default = defaultValue; - } - super(id, name, defaultValue, schema); - this._allowedValues = allowedValues; - } - static stringSet(value, defaultValue, allowedValues) { - if (typeof value !== 'string') { - return defaultValue; - } - if (allowedValues.indexOf(value) === -1) { - return defaultValue; - } - return value; - } - validate(input) { - return EditorStringEnumOption.stringSet(input, this.defaultValue, this._allowedValues); - } -} -class EditorEnumOption extends BaseEditorOption { - constructor(id, name, defaultValue, defaultStringValue, allowedValues, convert, schema = undefined) { - if (typeof schema !== 'undefined') { - schema.type = 'string'; - schema.enum = allowedValues; - schema.default = defaultStringValue; - } - super(id, name, defaultValue, schema); - this._allowedValues = allowedValues; - this._convert = convert; - } - validate(input) { - if (typeof input !== 'string') { - return this.defaultValue; - } - if (this._allowedValues.indexOf(input) === -1) { - return this.defaultValue; - } - return this._convert(input); - } -} -//#endregion -//#region autoIndent -function _autoIndentFromString(autoIndent) { - switch (autoIndent) { - case 'none': return 0 /* None */; - case 'keep': return 1 /* Keep */; - case 'brackets': return 2 /* Brackets */; - case 'advanced': return 3 /* Advanced */; - case 'full': return 4 /* Full */; - } -} -//#endregion -//#region accessibilitySupport -class EditorAccessibilitySupport extends BaseEditorOption { - constructor() { - super(2 /* accessibilitySupport */, 'accessibilitySupport', 0 /* Unknown */, { - type: 'string', - enum: ['auto', 'on', 'off'], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilitySupport.auto', "The editor will use platform APIs to detect when a Screen Reader is attached."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilitySupport.on', "The editor will be permanently optimized for usage with a Screen Reader."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilitySupport.off', "The editor will never be optimized for usage with a Screen Reader."), - ], - default: 'auto', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers.") - }); - } - validate(input) { - switch (input) { - case 'auto': return 0 /* Unknown */; - case 'off': return 1 /* Disabled */; - case 'on': return 2 /* Enabled */; - } - return this.defaultValue; - } - compute(env, options, value) { - if (value === 0 /* Unknown */) { - // The editor reads the `accessibilitySupport` from the environment - return env.accessibilitySupport; - } - return value; - } -} -class EditorComments extends BaseEditorOption { - constructor() { - const defaults = { - insertSpace: true, - ignoreEmptyLines: true, - }; - super(14 /* comments */, 'comments', defaults, { - 'editor.comments.insertSpace': { - type: 'boolean', - default: defaults.insertSpace, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comments.insertSpace', "Controls whether a space character is inserted when commenting.") - }, - 'editor.comments.ignoreEmptyLines': { - type: 'boolean', - default: defaults.ignoreEmptyLines, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comments.ignoreEmptyLines', 'Controls if empty lines should be ignored with toggle, add or remove actions for line comments.') - }, - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - insertSpace: EditorBooleanOption.boolean(input.insertSpace, this.defaultValue.insertSpace), - ignoreEmptyLines: EditorBooleanOption.boolean(input.ignoreEmptyLines, this.defaultValue.ignoreEmptyLines), - }; - } -} -function _cursorBlinkingStyleFromString(cursorBlinkingStyle) { - switch (cursorBlinkingStyle) { - case 'blink': return 1 /* Blink */; - case 'smooth': return 2 /* Smooth */; - case 'phase': return 3 /* Phase */; - case 'expand': return 4 /* Expand */; - case 'solid': return 5 /* Solid */; - } -} -//#endregion -//#region cursorStyle -/** - * The style in which the editor's cursor should be rendered. - */ -var TextEditorCursorStyle; -(function (TextEditorCursorStyle) { - /** - * As a vertical line (sitting between two characters). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Line"] = 1] = "Line"; - /** - * As a block (sitting on top of a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Block"] = 2] = "Block"; - /** - * As a horizontal line (sitting under a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Underline"] = 3] = "Underline"; - /** - * As a thin vertical line (sitting between two characters). - */ - TextEditorCursorStyle[TextEditorCursorStyle["LineThin"] = 4] = "LineThin"; - /** - * As an outlined block (sitting on top of a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["BlockOutline"] = 5] = "BlockOutline"; - /** - * As a thin horizontal line (sitting under a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["UnderlineThin"] = 6] = "UnderlineThin"; -})(TextEditorCursorStyle || (TextEditorCursorStyle = {})); -function _cursorStyleFromString(cursorStyle) { - switch (cursorStyle) { - case 'line': return TextEditorCursorStyle.Line; - case 'block': return TextEditorCursorStyle.Block; - case 'underline': return TextEditorCursorStyle.Underline; - case 'line-thin': return TextEditorCursorStyle.LineThin; - case 'block-outline': return TextEditorCursorStyle.BlockOutline; - case 'underline-thin': return TextEditorCursorStyle.UnderlineThin; - } -} -//#endregion -//#region editorClassName -class EditorClassName extends ComputedEditorOption { - constructor() { - super(114 /* editorClassName */, [57 /* mouseStyle */, 27 /* extraEditorClassName */]); - } - compute(env, options, _) { - const classNames = ['monaco-editor']; - if (options.get(27 /* extraEditorClassName */)) { - classNames.push(options.get(27 /* extraEditorClassName */)); - } - if (env.extraEditorClassName) { - classNames.push(env.extraEditorClassName); - } - if (options.get(57 /* mouseStyle */) === 'default') { - classNames.push('mouse-default'); - } - else if (options.get(57 /* mouseStyle */) === 'copy') { - classNames.push('mouse-copy'); - } - if (options.get(92 /* showUnused */)) { - classNames.push('showUnused'); - } - if (options.get(113 /* showDeprecated */)) { - classNames.push('showDeprecated'); - } - return classNames.join(' '); - } -} -//#endregion -//#region emptySelectionClipboard -class EditorEmptySelectionClipboard extends EditorBooleanOption { - constructor() { - super(26 /* emptySelectionClipboard */, 'emptySelectionClipboard', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('emptySelectionClipboard', "Controls whether copying without a selection copies the current line.") }); - } - compute(env, options, value) { - return value && env.emptySelectionClipboard; - } -} -class EditorFind extends BaseEditorOption { - constructor() { - const defaults = { - cursorMoveOnType: true, - seedSearchStringFromSelection: true, - autoFindInSelection: 'never', - globalFindClipboard: false, - addExtraSpaceOnTop: true, - loop: true - }; - super(29 /* find */, 'find', defaults, { - 'editor.find.cursorMoveOnType': { - type: 'boolean', - default: defaults.cursorMoveOnType, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.cursorMoveOnType', "Controls whether the cursor should jump to find matches while typing.") - }, - 'editor.find.seedSearchStringFromSelection': { - type: 'boolean', - default: defaults.seedSearchStringFromSelection, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.seedSearchStringFromSelection', "Controls whether the search string in the Find Widget is seeded from the editor selection.") - }, - 'editor.find.autoFindInSelection': { - type: 'string', - enum: ['never', 'always', 'multiline'], - default: defaults.autoFindInSelection, - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.find.autoFindInSelection.never', 'Never turn on Find in selection automatically (default)'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.find.autoFindInSelection.always', 'Always turn on Find in selection automatically'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.find.autoFindInSelection.multiline', 'Turn on Find in selection automatically when multiple lines of content are selected.') - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.autoFindInSelection', "Controls the condition for turning on find in selection automatically.") - }, - 'editor.find.globalFindClipboard': { - type: 'boolean', - default: defaults.globalFindClipboard, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.globalFindClipboard', "Controls whether the Find Widget should read or modify the shared find clipboard on macOS."), - included: _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"] - }, - 'editor.find.addExtraSpaceOnTop': { - type: 'boolean', - default: defaults.addExtraSpaceOnTop, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.addExtraSpaceOnTop', "Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.") - }, - 'editor.find.loop': { - type: 'boolean', - default: defaults.loop, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('find.loop', "Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.") - }, - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - cursorMoveOnType: EditorBooleanOption.boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType), - seedSearchStringFromSelection: EditorBooleanOption.boolean(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection), - autoFindInSelection: typeof _input.autoFindInSelection === 'boolean' - ? (_input.autoFindInSelection ? 'always' : 'never') - : EditorStringEnumOption.stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']), - globalFindClipboard: EditorBooleanOption.boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard), - addExtraSpaceOnTop: EditorBooleanOption.boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop), - loop: EditorBooleanOption.boolean(input.loop, this.defaultValue.loop), - }; - } -} -//#endregion -//#region fontLigatures -/** - * @internal - */ -class EditorFontLigatures extends BaseEditorOption { - constructor() { - super(37 /* fontLigatures */, 'fontLigatures', EditorFontLigatures.OFF, { - anyOf: [ - { - type: 'boolean', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontLigatures', "Enables/Disables font ligatures."), - }, - { - type: 'string', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontFeatureSettings', "Explicit font-feature-settings.") - } - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontLigaturesGeneral', "Configures font ligatures or font features."), - default: false - }); - } - validate(input) { - if (typeof input === 'undefined') { - return this.defaultValue; - } - if (typeof input === 'string') { - if (input === 'false') { - return EditorFontLigatures.OFF; - } - if (input === 'true') { - return EditorFontLigatures.ON; - } - return input; - } - if (Boolean(input)) { - return EditorFontLigatures.ON; - } - return EditorFontLigatures.OFF; - } -} -EditorFontLigatures.OFF = '"liga" off, "calt" off'; -EditorFontLigatures.ON = '"liga" on, "calt" on'; -//#endregion -//#region fontInfo -class EditorFontInfo extends ComputedEditorOption { - constructor() { - super(36 /* fontInfo */); - } - compute(env, options, _) { - return env.fontInfo; - } -} -//#endregion -//#region fontSize -class EditorFontSize extends SimpleEditorOption { - constructor() { - super(38 /* fontSize */, 'fontSize', EDITOR_FONT_DEFAULTS.fontSize, { - type: 'number', - minimum: 6, - maximum: 100, - default: EDITOR_FONT_DEFAULTS.fontSize, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontSize', "Controls the font size in pixels.") - }); - } - validate(input) { - let r = EditorFloatOption.float(input, this.defaultValue); - if (r === 0) { - return EDITOR_FONT_DEFAULTS.fontSize; - } - return EditorFloatOption.clamp(r, 6, 100); - } - compute(env, options, value) { - // The final fontSize respects the editor zoom level. - // So take the result from env.fontInfo - return env.fontInfo.fontSize; - } -} -//#endregion -//#region fontWeight -class EditorFontWeight extends BaseEditorOption { - constructor() { - super(39 /* fontWeight */, 'fontWeight', EDITOR_FONT_DEFAULTS.fontWeight, { - anyOf: [ - { - type: 'number', - minimum: EditorFontWeight.MINIMUM_VALUE, - maximum: EditorFontWeight.MAXIMUM_VALUE, - errorMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontWeightErrorMessage', "Only \"normal\" and \"bold\" keywords or numbers between 1 and 1000 are allowed.") - }, - { - type: 'string', - pattern: '^(normal|bold|1000|[1-9][0-9]{0,2})$' - }, - { - enum: EditorFontWeight.SUGGESTION_VALUES - } - ], - default: EDITOR_FONT_DEFAULTS.fontWeight, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontWeight', "Controls the font weight. Accepts \"normal\" and \"bold\" keywords or numbers between 1 and 1000.") - }); - } - validate(input) { - if (input === 'normal' || input === 'bold') { - return input; - } - return String(EditorIntOption.clampedInt(input, EDITOR_FONT_DEFAULTS.fontWeight, EditorFontWeight.MINIMUM_VALUE, EditorFontWeight.MAXIMUM_VALUE)); - } -} -EditorFontWeight.SUGGESTION_VALUES = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900']; -EditorFontWeight.MINIMUM_VALUE = 1; -EditorFontWeight.MAXIMUM_VALUE = 1000; -class EditorGoToLocation extends BaseEditorOption { - constructor() { - const defaults = { - multiple: 'peek', - multipleDefinitions: 'peek', - multipleTypeDefinitions: 'peek', - multipleDeclarations: 'peek', - multipleImplementations: 'peek', - multipleReferences: 'peek', - alternativeDefinitionCommand: 'editor.action.goToReferences', - alternativeTypeDefinitionCommand: 'editor.action.goToReferences', - alternativeDeclarationCommand: 'editor.action.goToReferences', - alternativeImplementationCommand: '', - alternativeReferenceCommand: '', - }; - const jsonSubset = { - type: 'string', - enum: ['peek', 'gotoAndPeek', 'goto'], - default: defaults.multiple, - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.gotoLocation.multiple.peek', 'Show peek view of the results (default)'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.gotoLocation.multiple.gotoAndPeek', 'Go to the primary result and show a peek view'), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.gotoLocation.multiple.goto', 'Go to the primary result and enable peek-less navigation to others') - ] - }; - super(43 /* gotoLocation */, 'gotoLocation', defaults, { - 'editor.gotoLocation.multiple': { - deprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.gotoLocation.multiple.deprecated', "This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead."), - }, - 'editor.gotoLocation.multipleDefinitions': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.editor.gotoLocation.multipleDefinitions', "Controls the behavior the 'Go to Definition'-command when multiple target locations exist.") }, jsonSubset), - 'editor.gotoLocation.multipleTypeDefinitions': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.editor.gotoLocation.multipleTypeDefinitions', "Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.") }, jsonSubset), - 'editor.gotoLocation.multipleDeclarations': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.editor.gotoLocation.multipleDeclarations', "Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.") }, jsonSubset), - 'editor.gotoLocation.multipleImplementations': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.editor.gotoLocation.multipleImplemenattions', "Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.") }, jsonSubset), - 'editor.gotoLocation.multipleReferences': Object.assign({ description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.editor.gotoLocation.multipleReferences', "Controls the behavior the 'Go to References'-command when multiple target locations exist.") }, jsonSubset), - 'editor.gotoLocation.alternativeDefinitionCommand': { - type: 'string', - default: defaults.alternativeDefinitionCommand, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('alternativeDefinitionCommand', "Alternative command id that is being executed when the result of 'Go to Definition' is the current location.") - }, - 'editor.gotoLocation.alternativeTypeDefinitionCommand': { - type: 'string', - default: defaults.alternativeTypeDefinitionCommand, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('alternativeTypeDefinitionCommand', "Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.") - }, - 'editor.gotoLocation.alternativeDeclarationCommand': { - type: 'string', - default: defaults.alternativeDeclarationCommand, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('alternativeDeclarationCommand', "Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.") - }, - 'editor.gotoLocation.alternativeImplementationCommand': { - type: 'string', - default: defaults.alternativeImplementationCommand, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('alternativeImplementationCommand', "Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.") - }, - 'editor.gotoLocation.alternativeReferenceCommand': { - type: 'string', - default: defaults.alternativeReferenceCommand, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('alternativeReferenceCommand', "Alternative command id that is being executed when the result of 'Go to Reference' is the current location.") - }, - }); - } - validate(_input) { - var _a, _b, _c, _d, _e; - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - multiple: EditorStringEnumOption.stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']), - multipleDefinitions: (_a = input.multipleDefinitions) !== null && _a !== void 0 ? _a : EditorStringEnumOption.stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']), - multipleTypeDefinitions: (_b = input.multipleTypeDefinitions) !== null && _b !== void 0 ? _b : EditorStringEnumOption.stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']), - multipleDeclarations: (_c = input.multipleDeclarations) !== null && _c !== void 0 ? _c : EditorStringEnumOption.stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']), - multipleImplementations: (_d = input.multipleImplementations) !== null && _d !== void 0 ? _d : EditorStringEnumOption.stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']), - multipleReferences: (_e = input.multipleReferences) !== null && _e !== void 0 ? _e : EditorStringEnumOption.stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']), - alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand), - alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand), - alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand), - alternativeImplementationCommand: EditorStringOption.string(input.alternativeImplementationCommand, this.defaultValue.alternativeImplementationCommand), - alternativeReferenceCommand: EditorStringOption.string(input.alternativeReferenceCommand, this.defaultValue.alternativeReferenceCommand), - }; - } -} -class EditorHover extends BaseEditorOption { - constructor() { - const defaults = { - enabled: true, - delay: 300, - sticky: true - }; - super(46 /* hover */, 'hover', defaults, { - 'editor.hover.enabled': { - type: 'boolean', - default: defaults.enabled, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('hover.enabled', "Controls whether the hover is shown.") - }, - 'editor.hover.delay': { - type: 'number', - default: defaults.delay, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('hover.delay', "Controls the delay in milliseconds after which the hover is shown.") - }, - 'editor.hover.sticky': { - type: 'boolean', - default: defaults.sticky, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('hover.sticky', "Controls whether the hover should remain visible when mouse is moved over it.") - }, - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled), - delay: EditorIntOption.clampedInt(input.delay, this.defaultValue.delay, 0, 10000), - sticky: EditorBooleanOption.boolean(input.sticky, this.defaultValue.sticky) - }; - } -} -/** - * @internal - */ -class EditorLayoutInfoComputer extends ComputedEditorOption { - constructor() { - super(117 /* layoutInfo */, [ - 42 /* glyphMargin */, 50 /* lineDecorationsWidth */, 31 /* folding */, - 56 /* minimap */, 84 /* scrollbar */, 52 /* lineNumbers */, - 53 /* lineNumbersMinChars */, 86 /* scrollBeyondLastLine */, - 106 /* wordWrap */, 109 /* wordWrapColumn */, 110 /* wordWrapMinified */, - 2 /* accessibilitySupport */ - ]); - } - compute(env, options, _) { - return EditorLayoutInfoComputer.computeLayout(options, { - memory: env.memory, - outerWidth: env.outerWidth, - outerHeight: env.outerHeight, - isDominatedByLongLines: env.isDominatedByLongLines, - lineHeight: env.fontInfo.lineHeight, - viewLineCount: env.viewLineCount, - lineNumbersDigitCount: env.lineNumbersDigitCount, - typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, - maxDigitWidth: env.fontInfo.maxDigitWidth, - pixelRatio: env.pixelRatio - }); - } - static computeContainedMinimapLineCount(input) { - const typicalViewportLineCount = input.height / input.lineHeight; - const extraLinesBeyondLastLine = input.scrollBeyondLastLine ? (typicalViewportLineCount - 1) : 0; - const desiredRatio = (input.viewLineCount + extraLinesBeyondLastLine) / (input.pixelRatio * input.height); - const minimapLineCount = Math.floor(input.viewLineCount / desiredRatio); - return { typicalViewportLineCount, extraLinesBeyondLastLine, desiredRatio, minimapLineCount }; - } - static _computeMinimapLayout(input, memory) { - const outerWidth = input.outerWidth; - const outerHeight = input.outerHeight; - const pixelRatio = input.pixelRatio; - if (!input.minimap.enabled) { - return { - renderMinimap: 0 /* None */, - minimapLeft: 0, - minimapWidth: 0, - minimapHeightIsEditorHeight: false, - minimapIsSampling: false, - minimapScale: 1, - minimapLineHeight: 1, - minimapCanvasInnerWidth: 0, - minimapCanvasInnerHeight: Math.floor(pixelRatio * outerHeight), - minimapCanvasOuterWidth: 0, - minimapCanvasOuterHeight: outerHeight, - }; - } - // Can use memory if only the `viewLineCount` and `remainingWidth` have changed - const stableMinimapLayoutInput = memory.stableMinimapLayoutInput; - const couldUseMemory = (stableMinimapLayoutInput - // && input.outerWidth === lastMinimapLayoutInput.outerWidth !!! INTENTIONAL OMITTED - && input.outerHeight === stableMinimapLayoutInput.outerHeight - && input.lineHeight === stableMinimapLayoutInput.lineHeight - && input.typicalHalfwidthCharacterWidth === stableMinimapLayoutInput.typicalHalfwidthCharacterWidth - && input.pixelRatio === stableMinimapLayoutInput.pixelRatio - && input.scrollBeyondLastLine === stableMinimapLayoutInput.scrollBeyondLastLine - && input.minimap.enabled === stableMinimapLayoutInput.minimap.enabled - && input.minimap.side === stableMinimapLayoutInput.minimap.side - && input.minimap.size === stableMinimapLayoutInput.minimap.size - && input.minimap.showSlider === stableMinimapLayoutInput.minimap.showSlider - && input.minimap.renderCharacters === stableMinimapLayoutInput.minimap.renderCharacters - && input.minimap.maxColumn === stableMinimapLayoutInput.minimap.maxColumn - && input.minimap.scale === stableMinimapLayoutInput.minimap.scale - && input.verticalScrollbarWidth === stableMinimapLayoutInput.verticalScrollbarWidth - // && input.viewLineCount === lastMinimapLayoutInput.viewLineCount !!! INTENTIONAL OMITTED - // && input.remainingWidth === lastMinimapLayoutInput.remainingWidth !!! INTENTIONAL OMITTED - && input.isViewportWrapping === stableMinimapLayoutInput.isViewportWrapping); - const lineHeight = input.lineHeight; - const typicalHalfwidthCharacterWidth = input.typicalHalfwidthCharacterWidth; - const scrollBeyondLastLine = input.scrollBeyondLastLine; - const minimapRenderCharacters = input.minimap.renderCharacters; - let minimapScale = (pixelRatio >= 2 ? Math.round(input.minimap.scale * 2) : input.minimap.scale); - const minimapMaxColumn = input.minimap.maxColumn; - const minimapSize = input.minimap.size; - const minimapSide = input.minimap.side; - const verticalScrollbarWidth = input.verticalScrollbarWidth; - const viewLineCount = input.viewLineCount; - const remainingWidth = input.remainingWidth; - const isViewportWrapping = input.isViewportWrapping; - const baseCharHeight = minimapRenderCharacters ? 2 : 3; - let minimapCanvasInnerHeight = Math.floor(pixelRatio * outerHeight); - const minimapCanvasOuterHeight = minimapCanvasInnerHeight / pixelRatio; - let minimapHeightIsEditorHeight = false; - let minimapIsSampling = false; - let minimapLineHeight = baseCharHeight * minimapScale; - let minimapCharWidth = minimapScale / pixelRatio; - let minimapWidthMultiplier = 1; - if (minimapSize === 'fill' || minimapSize === 'fit') { - const { typicalViewportLineCount, extraLinesBeyondLastLine, desiredRatio, minimapLineCount } = EditorLayoutInfoComputer.computeContainedMinimapLineCount({ - viewLineCount: viewLineCount, - scrollBeyondLastLine: scrollBeyondLastLine, - height: outerHeight, - lineHeight: lineHeight, - pixelRatio: pixelRatio - }); - // ratio is intentionally not part of the layout to avoid the layout changing all the time - // when doing sampling - const ratio = viewLineCount / minimapLineCount; - if (ratio > 1) { - minimapHeightIsEditorHeight = true; - minimapIsSampling = true; - minimapScale = 1; - minimapLineHeight = 1; - minimapCharWidth = minimapScale / pixelRatio; - } - else { - let fitBecomesFill = false; - let maxMinimapScale = minimapScale + 1; - if (minimapSize === 'fit') { - const effectiveMinimapHeight = Math.ceil((viewLineCount + extraLinesBeyondLastLine) * minimapLineHeight); - if (isViewportWrapping && couldUseMemory && remainingWidth <= memory.stableFitRemainingWidth) { - // There is a loop when using `fit` and viewport wrapping: - // - view line count impacts minimap layout - // - minimap layout impacts viewport width - // - viewport width impacts view line count - // To break the loop, once we go to a smaller minimap scale, we try to stick with it. - fitBecomesFill = true; - maxMinimapScale = memory.stableFitMaxMinimapScale; - } - else { - fitBecomesFill = (effectiveMinimapHeight > minimapCanvasInnerHeight); - if (isViewportWrapping && fitBecomesFill) { - // remember for next time - memory.stableMinimapLayoutInput = input; - memory.stableFitRemainingWidth = remainingWidth; - } - else { - memory.stableMinimapLayoutInput = null; - memory.stableFitRemainingWidth = 0; - } - } - } - if (minimapSize === 'fill' || fitBecomesFill) { - minimapHeightIsEditorHeight = true; - const configuredMinimapScale = minimapScale; - minimapLineHeight = Math.min(lineHeight * pixelRatio, Math.max(1, Math.floor(1 / desiredRatio))); - minimapScale = Math.min(maxMinimapScale, Math.max(1, Math.floor(minimapLineHeight / baseCharHeight))); - if (minimapScale > configuredMinimapScale) { - minimapWidthMultiplier = Math.min(2, minimapScale / configuredMinimapScale); - } - minimapCharWidth = minimapScale / pixelRatio / minimapWidthMultiplier; - minimapCanvasInnerHeight = Math.ceil((Math.max(typicalViewportLineCount, viewLineCount + extraLinesBeyondLastLine)) * minimapLineHeight); - if (isViewportWrapping && fitBecomesFill) { - memory.stableFitMaxMinimapScale = minimapScale; - } - } - } - } - // Given: - // (leaving 2px for the cursor to have space after the last character) - // viewportColumn = (contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth - // minimapWidth = viewportColumn * minimapCharWidth - // contentWidth = remainingWidth - minimapWidth - // What are good values for contentWidth and minimapWidth ? - // minimapWidth = ((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth - 2) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth - 2) * minimapCharWidth - // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth - // minimapWidth = ((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) - const minimapMaxWidth = Math.floor(minimapMaxColumn * minimapCharWidth); - const minimapWidth = Math.min(minimapMaxWidth, Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth - 2) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))) + MINIMAP_GUTTER_WIDTH); - let minimapCanvasInnerWidth = Math.floor(pixelRatio * minimapWidth); - const minimapCanvasOuterWidth = minimapCanvasInnerWidth / pixelRatio; - minimapCanvasInnerWidth = Math.floor(minimapCanvasInnerWidth * minimapWidthMultiplier); - const renderMinimap = (minimapRenderCharacters ? 1 /* Text */ : 2 /* Blocks */); - const minimapLeft = (minimapSide === 'left' ? 0 : (outerWidth - minimapWidth - verticalScrollbarWidth)); - return { - renderMinimap, - minimapLeft, - minimapWidth, - minimapHeightIsEditorHeight, - minimapIsSampling, - minimapScale, - minimapLineHeight, - minimapCanvasInnerWidth, - minimapCanvasInnerHeight, - minimapCanvasOuterWidth, - minimapCanvasOuterHeight, - }; - } - static computeLayout(options, env) { - const outerWidth = env.outerWidth | 0; - const outerHeight = env.outerHeight | 0; - const lineHeight = env.lineHeight | 0; - const lineNumbersDigitCount = env.lineNumbersDigitCount | 0; - const typicalHalfwidthCharacterWidth = env.typicalHalfwidthCharacterWidth; - const maxDigitWidth = env.maxDigitWidth; - const pixelRatio = env.pixelRatio; - const viewLineCount = env.viewLineCount; - const wordWrap = options.get(106 /* wordWrap */); - const wordWrapColumn = options.get(109 /* wordWrapColumn */); - const wordWrapMinified = options.get(110 /* wordWrapMinified */); - const accessibilitySupport = options.get(2 /* accessibilitySupport */); - const isDominatedByLongLines = env.isDominatedByLongLines; - const showGlyphMargin = options.get(42 /* glyphMargin */); - const showLineNumbers = (options.get(52 /* lineNumbers */).renderType !== 0 /* Off */); - const lineNumbersMinChars = options.get(53 /* lineNumbersMinChars */); - const scrollBeyondLastLine = options.get(86 /* scrollBeyondLastLine */); - const minimap = options.get(56 /* minimap */); - const scrollbar = options.get(84 /* scrollbar */); - const verticalScrollbarWidth = scrollbar.verticalScrollbarSize; - const verticalScrollbarHasArrows = scrollbar.verticalHasArrows; - const scrollbarArrowSize = scrollbar.arrowSize; - const horizontalScrollbarHeight = scrollbar.horizontalScrollbarSize; - const rawLineDecorationsWidth = options.get(50 /* lineDecorationsWidth */); - const folding = options.get(31 /* folding */); - let lineDecorationsWidth; - if (typeof rawLineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(rawLineDecorationsWidth)) { - const multiple = parseFloat(rawLineDecorationsWidth.substr(0, rawLineDecorationsWidth.length - 2)); - lineDecorationsWidth = EditorIntOption.clampedInt(multiple * typicalHalfwidthCharacterWidth, 0, 0, 1000); - } - else { - lineDecorationsWidth = EditorIntOption.clampedInt(rawLineDecorationsWidth, 0, 0, 1000); - } - if (folding) { - lineDecorationsWidth += 16; - } - let lineNumbersWidth = 0; - if (showLineNumbers) { - const digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); - lineNumbersWidth = Math.round(digitCount * maxDigitWidth); - } - let glyphMarginWidth = 0; - if (showGlyphMargin) { - glyphMarginWidth = lineHeight; - } - let glyphMarginLeft = 0; - let lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; - let decorationsLeft = lineNumbersLeft + lineNumbersWidth; - let contentLeft = decorationsLeft + lineDecorationsWidth; - const remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; - let isWordWrapMinified = false; - let isViewportWrapping = false; - let wrappingColumn = -1; - if (accessibilitySupport !== 2 /* Enabled */) { - // See https://github.com/Microsoft/vscode/issues/27766 - // Never enable wrapping when a screen reader is attached - // because arrow down etc. will not move the cursor in the way - // a screen reader expects. - if (wordWrapMinified && isDominatedByLongLines) { - // Force viewport width wrapping if model is dominated by long lines - isWordWrapMinified = true; - isViewportWrapping = true; - } - else if (wordWrap === 'on' || wordWrap === 'bounded') { - isViewportWrapping = true; - } - else if (wordWrap === 'wordWrapColumn') { - wrappingColumn = wordWrapColumn; - } - } - const minimapLayout = EditorLayoutInfoComputer._computeMinimapLayout({ - outerWidth: outerWidth, - outerHeight: outerHeight, - lineHeight: lineHeight, - typicalHalfwidthCharacterWidth: typicalHalfwidthCharacterWidth, - pixelRatio: pixelRatio, - scrollBeyondLastLine: scrollBeyondLastLine, - minimap: minimap, - verticalScrollbarWidth: verticalScrollbarWidth, - viewLineCount: viewLineCount, - remainingWidth: remainingWidth, - isViewportWrapping: isViewportWrapping, - }, env.memory || new ComputeOptionsMemory()); - if (minimapLayout.renderMinimap !== 0 /* None */ && minimapLayout.minimapLeft === 0) { - // the minimap is rendered to the left, so move everything to the right - glyphMarginLeft += minimapLayout.minimapWidth; - lineNumbersLeft += minimapLayout.minimapWidth; - decorationsLeft += minimapLayout.minimapWidth; - contentLeft += minimapLayout.minimapWidth; - } - const contentWidth = remainingWidth - minimapLayout.minimapWidth; - // (leaving 2px for the cursor to have space after the last character) - const viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth - 2) / typicalHalfwidthCharacterWidth)); - const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); - if (isViewportWrapping) { - // compute the actual wrappingColumn - wrappingColumn = Math.max(1, viewportColumn); - if (wordWrap === 'bounded') { - wrappingColumn = Math.min(wrappingColumn, wordWrapColumn); - } - } - return { - width: outerWidth, - height: outerHeight, - glyphMarginLeft: glyphMarginLeft, - glyphMarginWidth: glyphMarginWidth, - lineNumbersLeft: lineNumbersLeft, - lineNumbersWidth: lineNumbersWidth, - decorationsLeft: decorationsLeft, - decorationsWidth: lineDecorationsWidth, - contentLeft: contentLeft, - contentWidth: contentWidth, - minimap: minimapLayout, - viewportColumn: viewportColumn, - isWordWrapMinified: isWordWrapMinified, - isViewportWrapping: isViewportWrapping, - wrappingColumn: wrappingColumn, - verticalScrollbarWidth: verticalScrollbarWidth, - horizontalScrollbarHeight: horizontalScrollbarHeight, - overviewRuler: { - top: verticalArrowSize, - width: verticalScrollbarWidth, - height: (outerHeight - 2 * verticalArrowSize), - right: 0 - } - }; - } -} -class EditorLightbulb extends BaseEditorOption { - constructor() { - const defaults = { enabled: true }; - super(49 /* lightbulb */, 'lightbulb', defaults, { - 'editor.lightbulb.enabled': { - type: 'boolean', - default: defaults.enabled, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('codeActions', "Enables the code action lightbulb in the editor.") - }, - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled) - }; - } -} -//#endregion -//#region lineHeight -class EditorLineHeight extends EditorIntOption { - constructor() { - super(51 /* lineHeight */, 'lineHeight', EDITOR_FONT_DEFAULTS.lineHeight, 0, 150, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineHeight', "Controls the line height. Use 0 to compute the line height from the font size.") }); - } - compute(env, options, value) { - // The lineHeight is computed from the fontSize if it is 0. - // Moreover, the final lineHeight respects the editor zoom level. - // So take the result from env.fontInfo - return env.fontInfo.lineHeight; - } -} -class EditorMinimap extends BaseEditorOption { - constructor() { - const defaults = { - enabled: true, - size: 'proportional', - side: 'right', - showSlider: 'mouseover', - renderCharacters: true, - maxColumn: 120, - scale: 1, - }; - super(56 /* minimap */, 'minimap', defaults, { - 'editor.minimap.enabled': { - type: 'boolean', - default: defaults.enabled, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.enabled', "Controls whether the minimap is shown.") - }, - 'editor.minimap.size': { - type: 'string', - enum: ['proportional', 'fill', 'fit'], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.size.proportional', "The minimap has the same size as the editor contents (and might scroll)."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.size.fill', "The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.size.fit', "The minimap will shrink as necessary to never be larger than the editor (no scrolling)."), - ], - default: defaults.size, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.size', "Controls the size of the minimap.") - }, - 'editor.minimap.side': { - type: 'string', - enum: ['left', 'right'], - default: defaults.side, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.side', "Controls the side where to render the minimap.") - }, - 'editor.minimap.showSlider': { - type: 'string', - enum: ['always', 'mouseover'], - default: defaults.showSlider, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.showSlider', "Controls when the minimap slider is shown.") - }, - 'editor.minimap.scale': { - type: 'number', - default: defaults.scale, - minimum: 1, - maximum: 3, - enum: [1, 2, 3], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.scale', "Scale of content drawn in the minimap: 1, 2 or 3.") - }, - 'editor.minimap.renderCharacters': { - type: 'boolean', - default: defaults.renderCharacters, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.renderCharacters', "Render the actual characters on a line as opposed to color blocks.") - }, - 'editor.minimap.maxColumn': { - type: 'number', - default: defaults.maxColumn, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('minimap.maxColumn', "Limit the width of the minimap to render at most a certain number of columns.") - } - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled), - size: EditorStringEnumOption.stringSet(input.size, this.defaultValue.size, ['proportional', 'fill', 'fit']), - side: EditorStringEnumOption.stringSet(input.side, this.defaultValue.side, ['right', 'left']), - showSlider: EditorStringEnumOption.stringSet(input.showSlider, this.defaultValue.showSlider, ['always', 'mouseover']), - renderCharacters: EditorBooleanOption.boolean(input.renderCharacters, this.defaultValue.renderCharacters), - scale: EditorIntOption.clampedInt(input.scale, 1, 1, 3), - maxColumn: EditorIntOption.clampedInt(input.maxColumn, this.defaultValue.maxColumn, 1, 10000), - }; - } -} -//#endregion -//#region multiCursorModifier -function _multiCursorModifierFromString(multiCursorModifier) { - if (multiCursorModifier === 'ctrlCmd') { - return (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"] ? 'metaKey' : 'ctrlKey'); - } - return 'altKey'; -} -class EditorPadding extends BaseEditorOption { - constructor() { - super(66 /* padding */, 'padding', { top: 0, bottom: 0 }, { - 'editor.padding.top': { - type: 'number', - default: 0, - minimum: 0, - maximum: 1000, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('padding.top', "Controls the amount of space between the top edge of the editor and the first line.") - }, - 'editor.padding.bottom': { - type: 'number', - default: 0, - minimum: 0, - maximum: 1000, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('padding.bottom', "Controls the amount of space between the bottom edge of the editor and the last line.") - } - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - top: EditorIntOption.clampedInt(input.top, 0, 0, 1000), - bottom: EditorIntOption.clampedInt(input.bottom, 0, 0, 1000) - }; - } -} -class EditorParameterHints extends BaseEditorOption { - constructor() { - const defaults = { - enabled: true, - cycle: false - }; - super(67 /* parameterHints */, 'parameterHints', defaults, { - 'editor.parameterHints.enabled': { - type: 'boolean', - default: defaults.enabled, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('parameterHints.enabled', "Enables a pop-up that shows parameter documentation and type information as you type.") - }, - 'editor.parameterHints.cycle': { - type: 'boolean', - default: defaults.cycle, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('parameterHints.cycle', "Controls whether the parameter hints menu cycles or closes when reaching the end of the list.") - }, - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled), - cycle: EditorBooleanOption.boolean(input.cycle, this.defaultValue.cycle) - }; - } -} -//#endregion -//#region pixelRatio -class EditorPixelRatio extends ComputedEditorOption { - constructor() { - super(115 /* pixelRatio */); - } - compute(env, options, _) { - return env.pixelRatio; - } -} -class EditorQuickSuggestions extends BaseEditorOption { - constructor() { - const defaults = { - other: true, - comments: false, - strings: false - }; - super(70 /* quickSuggestions */, 'quickSuggestions', defaults, { - anyOf: [ - { - type: 'boolean', - }, - { - type: 'object', - properties: { - strings: { - type: 'boolean', - default: defaults.strings, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickSuggestions.strings', "Enable quick suggestions inside strings.") - }, - comments: { - type: 'boolean', - default: defaults.comments, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickSuggestions.comments', "Enable quick suggestions inside comments.") - }, - other: { - type: 'boolean', - default: defaults.other, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickSuggestions.other', "Enable quick suggestions outside of strings and comments.") - }, - } - } - ], - default: defaults, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickSuggestions', "Controls whether suggestions should automatically show up while typing.") - }); - this.defaultValue = defaults; - } - validate(_input) { - if (typeof _input === 'boolean') { - return _input; - } - if (_input && typeof _input === 'object') { - const input = _input; - const opts = { - other: EditorBooleanOption.boolean(input.other, this.defaultValue.other), - comments: EditorBooleanOption.boolean(input.comments, this.defaultValue.comments), - strings: EditorBooleanOption.boolean(input.strings, this.defaultValue.strings), - }; - if (opts.other && opts.comments && opts.strings) { - return true; // all on - } - else if (!opts.other && !opts.comments && !opts.strings) { - return false; // all off - } - else { - return opts; - } - } - return this.defaultValue; - } -} -class EditorRenderLineNumbersOption extends BaseEditorOption { - constructor() { - super(52 /* lineNumbers */, 'lineNumbers', { renderType: 1 /* On */, renderFn: null }, { - type: 'string', - enum: ['off', 'on', 'relative', 'interval'], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineNumbers.off', "Line numbers are not rendered."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineNumbers.on', "Line numbers are rendered as absolute number."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineNumbers.relative', "Line numbers are rendered as distance in lines to cursor position."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineNumbers.interval', "Line numbers are rendered every 10 lines.") - ], - default: 'on', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineNumbers', "Controls the display of line numbers.") - }); - } - validate(lineNumbers) { - let renderType = this.defaultValue.renderType; - let renderFn = this.defaultValue.renderFn; - if (typeof lineNumbers !== 'undefined') { - if (typeof lineNumbers === 'function') { - renderType = 4 /* Custom */; - renderFn = lineNumbers; - } - else if (lineNumbers === 'interval') { - renderType = 3 /* Interval */; - } - else if (lineNumbers === 'relative') { - renderType = 2 /* Relative */; - } - else if (lineNumbers === 'on') { - renderType = 1 /* On */; - } - else { - renderType = 0 /* Off */; - } - } - return { - renderType, - renderFn - }; - } -} -//#endregion -//#region renderValidationDecorations -/** - * @internal - */ -function filterValidationDecorations(options) { - const renderValidationDecorations = options.get(79 /* renderValidationDecorations */); - if (renderValidationDecorations === 'editable') { - return options.get(72 /* readOnly */); - } - return renderValidationDecorations === 'on' ? false : true; -} -class EditorRulers extends BaseEditorOption { - constructor() { - const defaults = []; - const columnSchema = { type: 'number', description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rulers.size', "Number of monospace characters at which this editor ruler will render.") }; - super(83 /* rulers */, 'rulers', defaults, { - type: 'array', - items: { - anyOf: [ - columnSchema, - { - type: [ - 'object' - ], - properties: { - column: columnSchema, - color: { - type: 'string', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rulers.color', "Color of this editor ruler."), - format: 'color-hex' - } - } - } - ] - }, - default: defaults, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rulers', "Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.") - }); - } - validate(input) { - if (Array.isArray(input)) { - let rulers = []; - for (let _element of input) { - if (typeof _element === 'number') { - rulers.push({ - column: EditorIntOption.clampedInt(_element, 0, 0, 10000), - color: null - }); - } - else if (_element && typeof _element === 'object') { - const element = _element; - rulers.push({ - column: EditorIntOption.clampedInt(element.column, 0, 0, 10000), - color: element.color - }); - } - } - rulers.sort((a, b) => a.column - b.column); - return rulers; - } - return this.defaultValue; - } -} -function _scrollbarVisibilityFromString(visibility, defaultValue) { - if (typeof visibility !== 'string') { - return defaultValue; - } - switch (visibility) { - case 'hidden': return 2 /* Hidden */; - case 'visible': return 3 /* Visible */; - default: return 1 /* Auto */; - } -} -class EditorScrollbar extends BaseEditorOption { - constructor() { - super(84 /* scrollbar */, 'scrollbar', { - vertical: 1 /* Auto */, - horizontal: 1 /* Auto */, - arrowSize: 11, - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false, - horizontalScrollbarSize: 12, - horizontalSliderSize: 12, - verticalScrollbarSize: 14, - verticalSliderSize: 14, - handleMouseWheel: true, - alwaysConsumeMouseWheel: true - }); - } - validate(_input) { - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - const horizontalScrollbarSize = EditorIntOption.clampedInt(input.horizontalScrollbarSize, this.defaultValue.horizontalScrollbarSize, 0, 1000); - const verticalScrollbarSize = EditorIntOption.clampedInt(input.verticalScrollbarSize, this.defaultValue.verticalScrollbarSize, 0, 1000); - return { - arrowSize: EditorIntOption.clampedInt(input.arrowSize, this.defaultValue.arrowSize, 0, 1000), - vertical: _scrollbarVisibilityFromString(input.vertical, this.defaultValue.vertical), - horizontal: _scrollbarVisibilityFromString(input.horizontal, this.defaultValue.horizontal), - useShadows: EditorBooleanOption.boolean(input.useShadows, this.defaultValue.useShadows), - verticalHasArrows: EditorBooleanOption.boolean(input.verticalHasArrows, this.defaultValue.verticalHasArrows), - horizontalHasArrows: EditorBooleanOption.boolean(input.horizontalHasArrows, this.defaultValue.horizontalHasArrows), - handleMouseWheel: EditorBooleanOption.boolean(input.handleMouseWheel, this.defaultValue.handleMouseWheel), - alwaysConsumeMouseWheel: EditorBooleanOption.boolean(input.alwaysConsumeMouseWheel, this.defaultValue.alwaysConsumeMouseWheel), - horizontalScrollbarSize: horizontalScrollbarSize, - horizontalSliderSize: EditorIntOption.clampedInt(input.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), - verticalScrollbarSize: verticalScrollbarSize, - verticalSliderSize: EditorIntOption.clampedInt(input.verticalSliderSize, verticalScrollbarSize, 0, 1000), - }; - } -} -class EditorSuggest extends BaseEditorOption { - constructor() { - const defaults = { - insertMode: 'insert', - filterGraceful: true, - snippetsPreventQuickSuggestions: true, - localityBonus: false, - shareSuggestSelections: false, - showIcons: true, - maxVisibleSuggestions: 12, - showMethods: true, - showFunctions: true, - showConstructors: true, - showFields: true, - showVariables: true, - showClasses: true, - showStructs: true, - showInterfaces: true, - showModules: true, - showProperties: true, - showEvents: true, - showOperators: true, - showUnits: true, - showValues: true, - showConstants: true, - showEnums: true, - showEnumMembers: true, - showKeywords: true, - showWords: true, - showColors: true, - showFiles: true, - showReferences: true, - showFolders: true, - showTypeParameters: true, - showSnippets: true, - showUsers: true, - showIssues: true, - statusBar: { - visible: false - } - }; - super(96 /* suggest */, 'suggest', defaults, { - 'editor.suggest.insertMode': { - type: 'string', - enum: ['insert', 'replace'], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.insertMode.insert', "Insert suggestion without overwriting text right of the cursor."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.insertMode.replace', "Insert suggestion and overwrite text right of the cursor."), - ], - default: defaults.insertMode, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.insertMode', "Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.") - }, - 'editor.suggest.filterGraceful': { - type: 'boolean', - default: defaults.filterGraceful, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.filterGraceful', "Controls whether filtering and sorting suggestions accounts for small typos.") - }, - 'editor.suggest.localityBonus': { - type: 'boolean', - default: defaults.localityBonus, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.localityBonus', "Controls whether sorting favours words that appear close to the cursor.") - }, - 'editor.suggest.shareSuggestSelections': { - type: 'boolean', - default: defaults.shareSuggestSelections, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.shareSuggestSelections', "Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).") - }, - 'editor.suggest.snippetsPreventQuickSuggestions': { - type: 'boolean', - default: defaults.snippetsPreventQuickSuggestions, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.snippetsPreventQuickSuggestions', "Controls whether an active snippet prevents quick suggestions.") - }, - 'editor.suggest.showIcons': { - type: 'boolean', - default: defaults.showIcons, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.showIcons', "Controls whether to show or hide icons in suggestions.") - }, - 'editor.suggest.maxVisibleSuggestions': { - type: 'number', - default: defaults.maxVisibleSuggestions, - minimum: 1, - maximum: 15, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggest.maxVisibleSuggestions', "Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).") - }, - 'editor.suggest.filteredTypes': { - type: 'object', - deprecationMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('deprecated', "This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.") - }, - 'editor.suggest.showMethods': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showMethods', "When enabled IntelliSense shows `method`-suggestions.") - }, - 'editor.suggest.showFunctions': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showFunctions', "When enabled IntelliSense shows `function`-suggestions.") - }, - 'editor.suggest.showConstructors': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showConstructors', "When enabled IntelliSense shows `constructor`-suggestions.") - }, - 'editor.suggest.showFields': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showFields', "When enabled IntelliSense shows `field`-suggestions.") - }, - 'editor.suggest.showVariables': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showVariables', "When enabled IntelliSense shows `variable`-suggestions.") - }, - 'editor.suggest.showClasses': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showClasss', "When enabled IntelliSense shows `class`-suggestions.") - }, - 'editor.suggest.showStructs': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showStructs', "When enabled IntelliSense shows `struct`-suggestions.") - }, - 'editor.suggest.showInterfaces': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showInterfaces', "When enabled IntelliSense shows `interface`-suggestions.") - }, - 'editor.suggest.showModules': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showModules', "When enabled IntelliSense shows `module`-suggestions.") - }, - 'editor.suggest.showProperties': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showPropertys', "When enabled IntelliSense shows `property`-suggestions.") - }, - 'editor.suggest.showEvents': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showEvents', "When enabled IntelliSense shows `event`-suggestions.") - }, - 'editor.suggest.showOperators': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showOperators', "When enabled IntelliSense shows `operator`-suggestions.") - }, - 'editor.suggest.showUnits': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showUnits', "When enabled IntelliSense shows `unit`-suggestions.") - }, - 'editor.suggest.showValues': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showValues', "When enabled IntelliSense shows `value`-suggestions.") - }, - 'editor.suggest.showConstants': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showConstants', "When enabled IntelliSense shows `constant`-suggestions.") - }, - 'editor.suggest.showEnums': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showEnums', "When enabled IntelliSense shows `enum`-suggestions.") - }, - 'editor.suggest.showEnumMembers': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showEnumMembers', "When enabled IntelliSense shows `enumMember`-suggestions.") - }, - 'editor.suggest.showKeywords': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showKeywords', "When enabled IntelliSense shows `keyword`-suggestions.") - }, - 'editor.suggest.showWords': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showTexts', "When enabled IntelliSense shows `text`-suggestions.") - }, - 'editor.suggest.showColors': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showColors', "When enabled IntelliSense shows `color`-suggestions.") - }, - 'editor.suggest.showFiles': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showFiles', "When enabled IntelliSense shows `file`-suggestions.") - }, - 'editor.suggest.showReferences': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showReferences', "When enabled IntelliSense shows `reference`-suggestions.") - }, - 'editor.suggest.showCustomcolors': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showCustomcolors', "When enabled IntelliSense shows `customcolor`-suggestions.") - }, - 'editor.suggest.showFolders': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showFolders', "When enabled IntelliSense shows `folder`-suggestions.") - }, - 'editor.suggest.showTypeParameters': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showTypeParameters', "When enabled IntelliSense shows `typeParameter`-suggestions.") - }, - 'editor.suggest.showSnippets': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showSnippets', "When enabled IntelliSense shows `snippet`-suggestions.") - }, - 'editor.suggest.showUsers': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showUsers', "When enabled IntelliSense shows `user`-suggestions.") - }, - 'editor.suggest.showIssues': { - type: 'boolean', - default: true, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.showIssues', "When enabled IntelliSense shows `issues`-suggestions.") - }, - 'editor.suggest.statusBar.visible': { - type: 'boolean', - default: false, - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.suggest.statusBar.visible', "Controls the visibility of the status bar at the bottom of the suggest widget.") - } - }); - } - validate(_input) { - var _a; - if (!_input || typeof _input !== 'object') { - return this.defaultValue; - } - const input = _input; - return { - insertMode: EditorStringEnumOption.stringSet(input.insertMode, this.defaultValue.insertMode, ['insert', 'replace']), - filterGraceful: EditorBooleanOption.boolean(input.filterGraceful, this.defaultValue.filterGraceful), - snippetsPreventQuickSuggestions: EditorBooleanOption.boolean(input.snippetsPreventQuickSuggestions, this.defaultValue.filterGraceful), - localityBonus: EditorBooleanOption.boolean(input.localityBonus, this.defaultValue.localityBonus), - shareSuggestSelections: EditorBooleanOption.boolean(input.shareSuggestSelections, this.defaultValue.shareSuggestSelections), - showIcons: EditorBooleanOption.boolean(input.showIcons, this.defaultValue.showIcons), - maxVisibleSuggestions: EditorIntOption.clampedInt(input.maxVisibleSuggestions, this.defaultValue.maxVisibleSuggestions, 1, 15), - showMethods: EditorBooleanOption.boolean(input.showMethods, this.defaultValue.showMethods), - showFunctions: EditorBooleanOption.boolean(input.showFunctions, this.defaultValue.showFunctions), - showConstructors: EditorBooleanOption.boolean(input.showConstructors, this.defaultValue.showConstructors), - showFields: EditorBooleanOption.boolean(input.showFields, this.defaultValue.showFields), - showVariables: EditorBooleanOption.boolean(input.showVariables, this.defaultValue.showVariables), - showClasses: EditorBooleanOption.boolean(input.showClasses, this.defaultValue.showClasses), - showStructs: EditorBooleanOption.boolean(input.showStructs, this.defaultValue.showStructs), - showInterfaces: EditorBooleanOption.boolean(input.showInterfaces, this.defaultValue.showInterfaces), - showModules: EditorBooleanOption.boolean(input.showModules, this.defaultValue.showModules), - showProperties: EditorBooleanOption.boolean(input.showProperties, this.defaultValue.showProperties), - showEvents: EditorBooleanOption.boolean(input.showEvents, this.defaultValue.showEvents), - showOperators: EditorBooleanOption.boolean(input.showOperators, this.defaultValue.showOperators), - showUnits: EditorBooleanOption.boolean(input.showUnits, this.defaultValue.showUnits), - showValues: EditorBooleanOption.boolean(input.showValues, this.defaultValue.showValues), - showConstants: EditorBooleanOption.boolean(input.showConstants, this.defaultValue.showConstants), - showEnums: EditorBooleanOption.boolean(input.showEnums, this.defaultValue.showEnums), - showEnumMembers: EditorBooleanOption.boolean(input.showEnumMembers, this.defaultValue.showEnumMembers), - showKeywords: EditorBooleanOption.boolean(input.showKeywords, this.defaultValue.showKeywords), - showWords: EditorBooleanOption.boolean(input.showWords, this.defaultValue.showWords), - showColors: EditorBooleanOption.boolean(input.showColors, this.defaultValue.showColors), - showFiles: EditorBooleanOption.boolean(input.showFiles, this.defaultValue.showFiles), - showReferences: EditorBooleanOption.boolean(input.showReferences, this.defaultValue.showReferences), - showFolders: EditorBooleanOption.boolean(input.showFolders, this.defaultValue.showFolders), - showTypeParameters: EditorBooleanOption.boolean(input.showTypeParameters, this.defaultValue.showTypeParameters), - showSnippets: EditorBooleanOption.boolean(input.showSnippets, this.defaultValue.showSnippets), - showUsers: EditorBooleanOption.boolean(input.showUsers, this.defaultValue.showUsers), - showIssues: EditorBooleanOption.boolean(input.showIssues, this.defaultValue.showIssues), - statusBar: { - visible: EditorBooleanOption.boolean((_a = input.statusBar) === null || _a === void 0 ? void 0 : _a.visible, !!this.defaultValue.statusBar.visible) - } - }; - } -} -//#endregion -//#region tabFocusMode -class EditorTabFocusMode extends ComputedEditorOption { - constructor() { - super(116 /* tabFocusMode */, [72 /* readOnly */]); - } - compute(env, options, _) { - const readOnly = options.get(72 /* readOnly */); - return (readOnly ? true : env.tabFocusMode); - } -} -function _wrappingIndentFromString(wrappingIndent) { - switch (wrappingIndent) { - case 'none': return 0 /* None */; - case 'same': return 1 /* Same */; - case 'indent': return 2 /* Indent */; - case 'deepIndent': return 3 /* DeepIndent */; - } -} -class EditorWrappingInfoComputer extends ComputedEditorOption { - constructor() { - super(118 /* wrappingInfo */, [117 /* layoutInfo */]); - } - compute(env, options, _) { - const layoutInfo = options.get(117 /* layoutInfo */); - return { - isDominatedByLongLines: env.isDominatedByLongLines, - isWordWrapMinified: layoutInfo.isWordWrapMinified, - isViewportWrapping: layoutInfo.isViewportWrapping, - wrappingColumn: layoutInfo.wrappingColumn, - }; - } -} -//#endregion -const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; -const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; -const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace, \'Droid Sans Fallback\''; -/** - * @internal - */ -const EDITOR_FONT_DEFAULTS = { - fontFamily: (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"] ? DEFAULT_MAC_FONT_FAMILY : (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isLinux"] ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)), - fontWeight: 'normal', - fontSize: (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"] ? 12 : 14), - lineHeight: 0, - letterSpacing: 0, -}; -/** - * @internal - */ -const EDITOR_MODEL_DEFAULTS = { - tabSize: 4, - indentSize: 4, - insertSpaces: true, - detectIndentation: true, - trimAutoWhitespace: true, - largeFileOptimizations: true -}; -/** - * @internal - */ -const editorOptionsRegistry = []; -function register(option) { - editorOptionsRegistry[option.id] = option; - return option; -} -/** - * WORKAROUND: TS emits "any" for complex editor options values (anything except string, bool, enum, etc. ends up being "any") - * @monacodtsreplace - * /accessibilitySupport, any/accessibilitySupport, AccessibilitySupport/ - * /comments, any/comments, EditorCommentsOptions/ - * /find, any/find, EditorFindOptions/ - * /fontInfo, any/fontInfo, FontInfo/ - * /gotoLocation, any/gotoLocation, GoToLocationOptions/ - * /hover, any/hover, EditorHoverOptions/ - * /lightbulb, any/lightbulb, EditorLightbulbOptions/ - * /minimap, any/minimap, EditorMinimapOptions/ - * /parameterHints, any/parameterHints, InternalParameterHintOptions/ - * /quickSuggestions, any/quickSuggestions, ValidQuickSuggestionsOptions/ - * /suggest, any/suggest, InternalSuggestOptions/ - */ -const EditorOptions = { - acceptSuggestionOnCommitCharacter: register(new EditorBooleanOption(0 /* acceptSuggestionOnCommitCharacter */, 'acceptSuggestionOnCommitCharacter', true, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('acceptSuggestionOnCommitCharacter', "Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.") })), - acceptSuggestionOnEnter: register(new EditorStringEnumOption(1 /* acceptSuggestionOnEnter */, 'acceptSuggestionOnEnter', 'on', ['on', 'smart', 'off'], { - markdownEnumDescriptions: [ - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('acceptSuggestionOnEnterSmart', "Only accept a suggestion with `Enter` when it makes a textual change."), - '' - ], - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('acceptSuggestionOnEnter', "Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.") - })), - accessibilitySupport: register(new EditorAccessibilitySupport()), - accessibilityPageSize: register(new EditorIntOption(3 /* accessibilityPageSize */, 'accessibilityPageSize', 10, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilityPageSize', "Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.") })), - ariaLabel: register(new EditorStringOption(4 /* ariaLabel */, 'ariaLabel', _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorViewAccessibleLabel', "Editor content"))), - autoClosingBrackets: register(new EditorStringEnumOption(5 /* autoClosingBrackets */, 'autoClosingBrackets', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], { - enumDescriptions: [ - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoClosingBrackets.languageDefined', "Use language configurations to determine when to autoclose brackets."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoClosingBrackets.beforeWhitespace', "Autoclose brackets only when the cursor is to the left of whitespace."), - '', - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('autoClosingBrackets', "Controls whether the editor should automatically close brackets after the user adds an opening bracket.") - })), - autoClosingOvertype: register(new EditorStringEnumOption(6 /* autoClosingOvertype */, 'autoClosingOvertype', 'auto', ['always', 'auto', 'never'], { - enumDescriptions: [ - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoClosingOvertype.auto', "Type over closing quotes or brackets only if they were automatically inserted."), - '', - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('autoClosingOvertype', "Controls whether the editor should type over closing quotes or brackets.") - })), - autoClosingQuotes: register(new EditorStringEnumOption(7 /* autoClosingQuotes */, 'autoClosingQuotes', 'languageDefined', ['always', 'languageDefined', 'beforeWhitespace', 'never'], { - enumDescriptions: [ - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoClosingQuotes.languageDefined', "Use language configurations to determine when to autoclose quotes."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoClosingQuotes.beforeWhitespace', "Autoclose quotes only when the cursor is to the left of whitespace."), - '', - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('autoClosingQuotes', "Controls whether the editor should automatically close quotes after the user adds an opening quote.") - })), - autoIndent: register(new EditorEnumOption(8 /* autoIndent */, 'autoIndent', 4 /* Full */, 'full', ['none', 'keep', 'brackets', 'advanced', 'full'], _autoIndentFromString, { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoIndent.none', "The editor will not insert indentation automatically."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoIndent.keep', "The editor will keep the current line's indentation."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoIndent.brackets', "The editor will keep the current line's indentation and honor language defined brackets."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoIndent.advanced', "The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoIndent.full', "The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('autoIndent', "Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.") - })), - automaticLayout: register(new EditorBooleanOption(9 /* automaticLayout */, 'automaticLayout', false)), - autoSurround: register(new EditorStringEnumOption(10 /* autoSurround */, 'autoSurround', 'languageDefined', ['languageDefined', 'quotes', 'brackets', 'never'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoSurround.languageDefined', "Use language configurations to determine when to automatically surround selections."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoSurround.quotes', "Surround with quotes but not brackets."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.autoSurround.brackets', "Surround with brackets but not quotes."), - '' - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('autoSurround', "Controls whether the editor should automatically surround selections.") - })), - codeLens: register(new EditorBooleanOption(11 /* codeLens */, 'codeLens', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('codeLens', "Controls whether the editor shows CodeLens.") })), - colorDecorators: register(new EditorBooleanOption(12 /* colorDecorators */, 'colorDecorators', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('colorDecorators', "Controls whether the editor should render the inline color decorators and color picker.") })), - columnSelection: register(new EditorBooleanOption(13 /* columnSelection */, 'columnSelection', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('columnSelection', "Enable that the selection with the mouse and keys is doing column selection.") })), - comments: register(new EditorComments()), - contextmenu: register(new EditorBooleanOption(15 /* contextmenu */, 'contextmenu', true)), - copyWithSyntaxHighlighting: register(new EditorBooleanOption(16 /* copyWithSyntaxHighlighting */, 'copyWithSyntaxHighlighting', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('copyWithSyntaxHighlighting', "Controls whether syntax highlighting should be copied into the clipboard.") })), - cursorBlinking: register(new EditorEnumOption(17 /* cursorBlinking */, 'cursorBlinking', 1 /* Blink */, 'blink', ['blink', 'smooth', 'phase', 'expand', 'solid'], _cursorBlinkingStyleFromString, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorBlinking', "Control the cursor animation style.") })), - cursorSmoothCaretAnimation: register(new EditorBooleanOption(18 /* cursorSmoothCaretAnimation */, 'cursorSmoothCaretAnimation', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorSmoothCaretAnimation', "Controls whether the smooth caret animation should be enabled.") })), - cursorStyle: register(new EditorEnumOption(19 /* cursorStyle */, 'cursorStyle', TextEditorCursorStyle.Line, 'line', ['line', 'block', 'underline', 'line-thin', 'block-outline', 'underline-thin'], _cursorStyleFromString, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorStyle', "Controls the cursor style.") })), - cursorSurroundingLines: register(new EditorIntOption(20 /* cursorSurroundingLines */, 'cursorSurroundingLines', 0, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorSurroundingLines', "Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or `scrollOffset` in some other editors.") })), - cursorSurroundingLinesStyle: register(new EditorStringEnumOption(21 /* cursorSurroundingLinesStyle */, 'cursorSurroundingLinesStyle', 'default', ['default', 'all'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorSurroundingLinesStyle.default', "`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorSurroundingLinesStyle.all', "`cursorSurroundingLines` is enforced always.") - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorSurroundingLinesStyle', "Controls when `cursorSurroundingLines` should be enforced.") - })), - cursorWidth: register(new EditorIntOption(22 /* cursorWidth */, 'cursorWidth', 0, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursorWidth', "Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.") })), - disableLayerHinting: register(new EditorBooleanOption(23 /* disableLayerHinting */, 'disableLayerHinting', false)), - disableMonospaceOptimizations: register(new EditorBooleanOption(24 /* disableMonospaceOptimizations */, 'disableMonospaceOptimizations', false)), - dragAndDrop: register(new EditorBooleanOption(25 /* dragAndDrop */, 'dragAndDrop', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('dragAndDrop', "Controls whether the editor should allow moving selections via drag and drop.") })), - emptySelectionClipboard: register(new EditorEmptySelectionClipboard()), - extraEditorClassName: register(new EditorStringOption(27 /* extraEditorClassName */, 'extraEditorClassName', '')), - fastScrollSensitivity: register(new EditorFloatOption(28 /* fastScrollSensitivity */, 'fastScrollSensitivity', 5, x => (x <= 0 ? 5 : x), { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fastScrollSensitivity', "Scrolling speed multiplier when pressing `Alt`.") })), - find: register(new EditorFind()), - fixedOverflowWidgets: register(new EditorBooleanOption(30 /* fixedOverflowWidgets */, 'fixedOverflowWidgets', false)), - folding: register(new EditorBooleanOption(31 /* folding */, 'folding', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('folding', "Controls whether the editor has code folding enabled.") })), - foldingStrategy: register(new EditorStringEnumOption(32 /* foldingStrategy */, 'foldingStrategy', 'auto', ['auto', 'indentation'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('foldingStrategy.auto', "Use a language-specific folding strategy if available, else the indentation-based one."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('foldingStrategy.indentation', "Use the indentation-based folding strategy."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('foldingStrategy', "Controls the strategy for computing folding ranges.") - })), - foldingHighlight: register(new EditorBooleanOption(33 /* foldingHighlight */, 'foldingHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('foldingHighlight', "Controls whether the editor should highlight folded ranges.") })), - unfoldOnClickAfterEndOfLine: register(new EditorBooleanOption(34 /* unfoldOnClickAfterEndOfLine */, 'unfoldOnClickAfterEndOfLine', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unfoldOnClickAfterEndOfLine', "Controls whether clicking on the empty content after a folded line will unfold the line.") })), - fontFamily: register(new EditorStringOption(35 /* fontFamily */, 'fontFamily', EDITOR_FONT_DEFAULTS.fontFamily, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('fontFamily', "Controls the font family.") })), - fontInfo: register(new EditorFontInfo()), - fontLigatures2: register(new EditorFontLigatures()), - fontSize: register(new EditorFontSize()), - fontWeight: register(new EditorFontWeight()), - formatOnPaste: register(new EditorBooleanOption(40 /* formatOnPaste */, 'formatOnPaste', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('formatOnPaste', "Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") })), - formatOnType: register(new EditorBooleanOption(41 /* formatOnType */, 'formatOnType', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('formatOnType', "Controls whether the editor should automatically format the line after typing.") })), - glyphMargin: register(new EditorBooleanOption(42 /* glyphMargin */, 'glyphMargin', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('glyphMargin', "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.") })), - gotoLocation: register(new EditorGoToLocation()), - hideCursorInOverviewRuler: register(new EditorBooleanOption(44 /* hideCursorInOverviewRuler */, 'hideCursorInOverviewRuler', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('hideCursorInOverviewRuler', "Controls whether the cursor should be hidden in the overview ruler.") })), - highlightActiveIndentGuide: register(new EditorBooleanOption(45 /* highlightActiveIndentGuide */, 'highlightActiveIndentGuide', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('highlightActiveIndentGuide', "Controls whether the editor should highlight the active indent guide.") })), - hover: register(new EditorHover()), - inDiffEditor: register(new EditorBooleanOption(47 /* inDiffEditor */, 'inDiffEditor', false)), - letterSpacing: register(new EditorFloatOption(48 /* letterSpacing */, 'letterSpacing', EDITOR_FONT_DEFAULTS.letterSpacing, x => EditorFloatOption.clamp(x, -5, 20), { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('letterSpacing', "Controls the letter spacing in pixels.") })), - lightbulb: register(new EditorLightbulb()), - lineDecorationsWidth: register(new SimpleEditorOption(50 /* lineDecorationsWidth */, 'lineDecorationsWidth', 10)), - lineHeight: register(new EditorLineHeight()), - lineNumbers: register(new EditorRenderLineNumbersOption()), - lineNumbersMinChars: register(new EditorIntOption(53 /* lineNumbersMinChars */, 'lineNumbersMinChars', 5, 1, 300)), - links: register(new EditorBooleanOption(54 /* links */, 'links', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('links', "Controls whether the editor should detect links and make them clickable.") })), - matchBrackets: register(new EditorStringEnumOption(55 /* matchBrackets */, 'matchBrackets', 'always', ['always', 'near', 'never'], { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('matchBrackets', "Highlight matching brackets.") })), - minimap: register(new EditorMinimap()), - mouseStyle: register(new EditorStringEnumOption(57 /* mouseStyle */, 'mouseStyle', 'text', ['text', 'default', 'copy'])), - mouseWheelScrollSensitivity: register(new EditorFloatOption(58 /* mouseWheelScrollSensitivity */, 'mouseWheelScrollSensitivity', 1, x => (x === 0 ? 1 : x), { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.") })), - mouseWheelZoom: register(new EditorBooleanOption(59 /* mouseWheelZoom */, 'mouseWheelZoom', false, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mouseWheelZoom', "Zoom the font of the editor when using mouse wheel and holding `Ctrl`.") })), - multiCursorMergeOverlapping: register(new EditorBooleanOption(60 /* multiCursorMergeOverlapping */, 'multiCursorMergeOverlapping', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorMergeOverlapping', "Merge multiple cursors when they are overlapping.") })), - multiCursorModifier: register(new EditorEnumOption(61 /* multiCursorModifier */, 'multiCursorModifier', 'altKey', 'alt', ['ctrlCmd', 'alt'], _multiCursorModifierFromString, { - markdownEnumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on macOS."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on macOS.") - ], - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'multiCursorModifier', - comment: [ - '- `ctrlCmd` refers to a value the setting can take and should not be localized.', - '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.' - ] - }, "The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).") - })), - multiCursorPaste: register(new EditorStringEnumOption(62 /* multiCursorPaste */, 'multiCursorPaste', 'spread', ['spread', 'full'], { - markdownEnumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorPaste.spread', "Each cursor pastes a single line of the text."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorPaste.full', "Each cursor pastes the full text.") - ], - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('multiCursorPaste', "Controls pasting when the line count of the pasted text matches the cursor count.") - })), - occurrencesHighlight: register(new EditorBooleanOption(63 /* occurrencesHighlight */, 'occurrencesHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('occurrencesHighlight', "Controls whether the editor should highlight semantic symbol occurrences.") })), - overviewRulerBorder: register(new EditorBooleanOption(64 /* overviewRulerBorder */, 'overviewRulerBorder', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRulerBorder', "Controls whether a border should be drawn around the overview ruler.") })), - overviewRulerLanes: register(new EditorIntOption(65 /* overviewRulerLanes */, 'overviewRulerLanes', 3, 0, 3)), - padding: register(new EditorPadding()), - parameterHints: register(new EditorParameterHints()), - peekWidgetDefaultFocus: register(new EditorStringEnumOption(68 /* peekWidgetDefaultFocus */, 'peekWidgetDefaultFocus', 'tree', ['tree', 'editor'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('peekWidgetDefaultFocus.tree', "Focus the tree when opening peek"), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('peekWidgetDefaultFocus.editor', "Focus the editor when opening peek") - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('peekWidgetDefaultFocus', "Controls whether to focus the inline editor or the tree in the peek widget.") - })), - definitionLinkOpensInPeek: register(new EditorBooleanOption(69 /* definitionLinkOpensInPeek */, 'definitionLinkOpensInPeek', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('definitionLinkOpensInPeek', "Controls whether the Go to Definition mouse gesture always opens the peek widget.") })), - quickSuggestions: register(new EditorQuickSuggestions()), - quickSuggestionsDelay: register(new EditorIntOption(71 /* quickSuggestionsDelay */, 'quickSuggestionsDelay', 10, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickSuggestionsDelay', "Controls the delay in milliseconds after which quick suggestions will show up.") })), - readOnly: register(new EditorBooleanOption(72 /* readOnly */, 'readOnly', false)), - renameOnType: register(new EditorBooleanOption(73 /* renameOnType */, 'renameOnType', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renameOnType', "Controls whether the editor auto renames on type.") })), - renderControlCharacters: register(new EditorBooleanOption(74 /* renderControlCharacters */, 'renderControlCharacters', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderControlCharacters', "Controls whether the editor should render control characters.") })), - renderIndentGuides: register(new EditorBooleanOption(75 /* renderIndentGuides */, 'renderIndentGuides', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderIndentGuides', "Controls whether the editor should render indent guides.") })), - renderFinalNewline: register(new EditorBooleanOption(76 /* renderFinalNewline */, 'renderFinalNewline', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderFinalNewline', "Render last line number when the file ends with a newline.") })), - renderLineHighlight: register(new EditorStringEnumOption(77 /* renderLineHighlight */, 'renderLineHighlight', 'line', ['none', 'gutter', 'line', 'all'], { - enumDescriptions: [ - '', - '', - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderLineHighlight.all', "Highlights both the gutter and the current line."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderLineHighlight', "Controls how the editor should render the current line highlight.") - })), - renderLineHighlightOnlyWhenFocus: register(new EditorBooleanOption(78 /* renderLineHighlightOnlyWhenFocus */, 'renderLineHighlightOnlyWhenFocus', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderLineHighlightOnlyWhenFocus', "Controls if the editor should render the current line highlight only when the editor is focused") })), - renderValidationDecorations: register(new EditorStringEnumOption(79 /* renderValidationDecorations */, 'renderValidationDecorations', 'editable', ['editable', 'on', 'off'])), - renderWhitespace: register(new EditorStringEnumOption(80 /* renderWhitespace */, 'renderWhitespace', 'selection', ['none', 'boundary', 'selection', 'trailing', 'all'], { - enumDescriptions: [ - '', - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderWhitespace.boundary', "Render whitespace characters except for single spaces between words."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderWhitespace.selection', "Render whitespace characters only on selected text."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderWhitespace.trailing', "Render only trailing whitespace characters"), - '' - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('renderWhitespace', "Controls how the editor should render whitespace characters.") - })), - revealHorizontalRightPadding: register(new EditorIntOption(81 /* revealHorizontalRightPadding */, 'revealHorizontalRightPadding', 30, 0, 1000)), - roundedSelection: register(new EditorBooleanOption(82 /* roundedSelection */, 'roundedSelection', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('roundedSelection', "Controls whether selections should have rounded corners.") })), - rulers: register(new EditorRulers()), - scrollbar: register(new EditorScrollbar()), - scrollBeyondLastColumn: register(new EditorIntOption(85 /* scrollBeyondLastColumn */, 'scrollBeyondLastColumn', 5, 0, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('scrollBeyondLastColumn', "Controls the number of extra characters beyond which the editor will scroll horizontally.") })), - scrollBeyondLastLine: register(new EditorBooleanOption(86 /* scrollBeyondLastLine */, 'scrollBeyondLastLine', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('scrollBeyondLastLine', "Controls whether the editor will scroll beyond the last line.") })), - scrollPredominantAxis: register(new EditorBooleanOption(87 /* scrollPredominantAxis */, 'scrollPredominantAxis', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('scrollPredominantAxis', "Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.") })), - selectionClipboard: register(new EditorBooleanOption(88 /* selectionClipboard */, 'selectionClipboard', true, { - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('selectionClipboard', "Controls whether the Linux primary clipboard should be supported."), - included: _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isLinux"] - })), - selectionHighlight: register(new EditorBooleanOption(89 /* selectionHighlight */, 'selectionHighlight', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('selectionHighlight', "Controls whether the editor should highlight matches similar to the selection.") })), - selectOnLineNumbers: register(new EditorBooleanOption(90 /* selectOnLineNumbers */, 'selectOnLineNumbers', true)), - showFoldingControls: register(new EditorStringEnumOption(91 /* showFoldingControls */, 'showFoldingControls', 'mouseover', ['always', 'mouseover'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('showFoldingControls.always', "Always show the folding controls."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('showFoldingControls.mouseover', "Only show the folding controls when the mouse is over the gutter."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('showFoldingControls', "Controls when the folding controls on the gutter are shown.") - })), - showUnused: register(new EditorBooleanOption(92 /* showUnused */, 'showUnused', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('showUnused', "Controls fading out of unused code.") })), - showDeprecated: register(new EditorBooleanOption(113 /* showDeprecated */, 'showDeprecated', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('showDeprecated', "Controls strikethrough deprecated variables.") })), - snippetSuggestions: register(new EditorStringEnumOption(93 /* snippetSuggestions */, 'snippetSuggestions', 'inline', ['top', 'bottom', 'inline', 'none'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('snippetSuggestions.top', "Show snippet suggestions on top of other suggestions."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('snippetSuggestions.bottom', "Show snippet suggestions below other suggestions."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('snippetSuggestions.inline', "Show snippets suggestions with other suggestions."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('snippetSuggestions.none', "Do not show snippet suggestions."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('snippetSuggestions', "Controls whether snippets are shown with other suggestions and how they are sorted.") - })), - smoothScrolling: register(new EditorBooleanOption(94 /* smoothScrolling */, 'smoothScrolling', false, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('smoothScrolling', "Controls whether the editor will scroll using an animation.") })), - stopRenderingLineAfter: register(new EditorIntOption(95 /* stopRenderingLineAfter */, 'stopRenderingLineAfter', 10000, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */)), - suggest: register(new EditorSuggest()), - suggestFontSize: register(new EditorIntOption(97 /* suggestFontSize */, 'suggestFontSize', 0, 0, 1000, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestFontSize', "Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.") })), - suggestLineHeight: register(new EditorIntOption(98 /* suggestLineHeight */, 'suggestLineHeight', 0, 0, 1000, { markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestLineHeight', "Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.") })), - suggestOnTriggerCharacters: register(new EditorBooleanOption(99 /* suggestOnTriggerCharacters */, 'suggestOnTriggerCharacters', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestOnTriggerCharacters', "Controls whether suggestions should automatically show up when typing trigger characters.") })), - suggestSelection: register(new EditorStringEnumOption(100 /* suggestSelection */, 'suggestSelection', 'recentlyUsed', ['first', 'recentlyUsed', 'recentlyUsedByPrefix'], { - markdownEnumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestSelection.first', "Always select the first suggestion."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestSelection.recentlyUsed', "Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestSelection.recentlyUsedByPrefix', "Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('suggestSelection', "Controls how suggestions are pre-selected when showing the suggest list.") - })), - tabCompletion: register(new EditorStringEnumOption(101 /* tabCompletion */, 'tabCompletion', 'off', ['on', 'off', 'onlySnippets'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('tabCompletion.on', "Tab complete will insert the best matching suggestion when pressing tab."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('tabCompletion.off', "Disable tab completions."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('tabCompletion.onlySnippets', "Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('tabCompletion', "Enables tab completions.") - })), - tabIndex: register(new EditorIntOption(102 /* tabIndex */, 'tabIndex', 0, -1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */)), - unusualLineTerminators: register(new EditorStringEnumOption(103 /* unusualLineTerminators */, 'unusualLineTerminators', 'prompt', ['off', 'prompt', 'auto'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.off', "Unusual line terminators are ignored."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.prompt', "Unusual line terminators prompt to be removed."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.auto', "Unusual line terminators are automatically removed."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators', "Remove unusual line terminators that might cause problems.") - })), - useTabStops: register(new EditorBooleanOption(104 /* useTabStops */, 'useTabStops', true, { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('useTabStops', "Inserting and deleting whitespace follows tab stops.") })), - wordSeparators: register(new EditorStringOption(105 /* wordSeparators */, 'wordSeparators', _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_2__["USUAL_WORD_SEPARATORS"], { description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordSeparators', "Characters that will be used as word separators when doing word related navigations or operations.") })), - wordWrap: register(new EditorStringEnumOption(106 /* wordWrap */, 'wordWrap', 'off', ['off', 'on', 'wordWrapColumn', 'bounded'], { - markdownEnumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordWrap.off', "Lines will never wrap."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordWrap.on', "Lines will wrap at the viewport width."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'wordWrap.wordWrapColumn', - comment: [ - '- `editor.wordWrapColumn` refers to a different setting and should not be localized.' - ] - }, "Lines will wrap at `#editor.wordWrapColumn#`."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'wordWrap.bounded', - comment: [ - '- viewport means the edge of the visible window size.', - '- `editor.wordWrapColumn` refers to a different setting and should not be localized.' - ] - }, "Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'wordWrap', - comment: [ - '- \'off\', \'on\', \'wordWrapColumn\' and \'bounded\' refer to values the setting can take and should not be localized.', - '- `editor.wordWrapColumn` refers to a different setting and should not be localized.' - ] - }, "Controls how lines should wrap.") - })), - wordWrapBreakAfterCharacters: register(new EditorStringOption(107 /* wordWrapBreakAfterCharacters */, 'wordWrapBreakAfterCharacters', ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」')), - wordWrapBreakBeforeCharacters: register(new EditorStringOption(108 /* wordWrapBreakBeforeCharacters */, 'wordWrapBreakBeforeCharacters', '([{‘“〈《「『【〔([{「£¥$£¥++')), - wordWrapColumn: register(new EditorIntOption(109 /* wordWrapColumn */, 'wordWrapColumn', 80, 1, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, { - markdownDescription: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'wordWrapColumn', - comment: [ - '- `editor.wordWrap` refers to a different setting and should not be localized.', - '- \'wordWrapColumn\' and \'bounded\' refer to values the different setting can take and should not be localized.' - ] - }, "Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.") - })), - wordWrapMinified: register(new EditorBooleanOption(110 /* wordWrapMinified */, 'wordWrapMinified', true)), - wrappingIndent: register(new EditorEnumOption(111 /* wrappingIndent */, 'wrappingIndent', 1 /* Same */, 'same', ['none', 'same', 'indent', 'deepIndent'], _wrappingIndentFromString, { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingIndent.none', "No indentation. Wrapped lines begin at column 1."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingIndent.same', "Wrapped lines get the same indentation as the parent."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingIndent.indent', "Wrapped lines get +1 indentation toward the parent."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingIndent.deepIndent', "Wrapped lines get +2 indentation toward the parent."), - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingIndent', "Controls the indentation of wrapped lines."), - })), - wrappingStrategy: register(new EditorStringEnumOption(112 /* wrappingStrategy */, 'wrappingStrategy', 'simple', ['simple', 'advanced'], { - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingStrategy.simple', "Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingStrategy.advanced', "Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.") - ], - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wrappingStrategy', "Controls the algorithm that computes wrapping points.") - })), - // Leave these at the end (because they have dependencies!) - editorClassName: register(new EditorClassName()), - pixelRatio: register(new EditorPixelRatio()), - tabFocusMode: register(new EditorTabFocusMode()), - layoutInfo: register(new EditorLayoutInfoComputer()), - wrappingInfo: register(new EditorWrappingInfoComputer()) -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js ***! - \******************************************************************************/ -/*! exports provided: EditorZoom */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorZoom", function() { return EditorZoom; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const EditorZoom = new class { - constructor() { - this._zoomLevel = 0; - this._onDidChangeZoomLevel = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event; - } - getZoomLevel() { - return this._zoomLevel; - } - setZoomLevel(zoomLevel) { - zoomLevel = Math.min(Math.max(-5, zoomLevel), 20); - if (this._zoomLevel === zoomLevel) { - return; - } - this._zoomLevel = zoomLevel; - this._onDidChangeZoomLevel.fire(this._zoomLevel); - } -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js ***! - \****************************************************************************/ -/*! exports provided: BareFontInfo, FontInfo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BareFontInfo", function() { return BareFontInfo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontInfo", function() { return FontInfo; }); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _editorZoom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editorZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/** - * Determined from empirical observations. - * @internal - */ -const GOLDEN_LINE_HEIGHT_RATIO = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["isMacintosh"] ? 1.5 : 1.35; -/** - * @internal - */ -const MINIMUM_LINE_HEIGHT = 8; -class BareFontInfo { - /** - * @internal - */ - constructor(opts) { - this.zoomLevel = opts.zoomLevel; - this.fontFamily = String(opts.fontFamily); - this.fontWeight = String(opts.fontWeight); - this.fontSize = opts.fontSize; - this.fontFeatureSettings = opts.fontFeatureSettings; - this.lineHeight = opts.lineHeight | 0; - this.letterSpacing = opts.letterSpacing; - } - /** - * @internal - */ - static createFromValidatedSettings(options, zoomLevel, ignoreEditorZoom) { - const fontFamily = options.get(35 /* fontFamily */); - const fontWeight = options.get(39 /* fontWeight */); - const fontSize = options.get(38 /* fontSize */); - const fontFeatureSettings = options.get(37 /* fontLigatures */); - const lineHeight = options.get(51 /* lineHeight */); - const letterSpacing = options.get(48 /* letterSpacing */); - return BareFontInfo._create(fontFamily, fontWeight, fontSize, fontFeatureSettings, lineHeight, letterSpacing, zoomLevel, ignoreEditorZoom); - } - /** - * @internal - */ - static _create(fontFamily, fontWeight, fontSize, fontFeatureSettings, lineHeight, letterSpacing, zoomLevel, ignoreEditorZoom) { - if (lineHeight === 0) { - lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize); - } - else if (lineHeight < MINIMUM_LINE_HEIGHT) { - lineHeight = MINIMUM_LINE_HEIGHT; - } - const editorZoomLevelMultiplier = 1 + (ignoreEditorZoom ? 0 : _editorZoom_js__WEBPACK_IMPORTED_MODULE_1__["EditorZoom"].getZoomLevel() * 0.1); - fontSize *= editorZoomLevelMultiplier; - lineHeight *= editorZoomLevelMultiplier; - return new BareFontInfo({ - zoomLevel: zoomLevel, - fontFamily: fontFamily, - fontWeight: fontWeight, - fontSize: fontSize, - fontFeatureSettings: fontFeatureSettings, - lineHeight: lineHeight, - letterSpacing: letterSpacing - }); - } - /** - * @internal - */ - getId() { - return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.fontFeatureSettings + '-' + this.lineHeight + '-' + this.letterSpacing; - } - /** - * @internal - */ - getMassagedFontFamily() { - if (/[,"']/.test(this.fontFamily)) { - // Looks like the font family might be already escaped - return this.fontFamily; - } - if (/[+ ]/.test(this.fontFamily)) { - // Wrap a font family using + or with quotes - return `"${this.fontFamily}"`; - } - return this.fontFamily; - } -} -class FontInfo extends BareFontInfo { - /** - * @internal - */ - constructor(opts, isTrusted) { - super(opts); - this.isTrusted = isTrusted; - this.isMonospace = opts.isMonospace; - this.typicalHalfwidthCharacterWidth = opts.typicalHalfwidthCharacterWidth; - this.typicalFullwidthCharacterWidth = opts.typicalFullwidthCharacterWidth; - this.canUseHalfwidthRightwardsArrow = opts.canUseHalfwidthRightwardsArrow; - this.spaceWidth = opts.spaceWidth; - this.middotWidth = opts.middotWidth; - this.wsmiddotWidth = opts.wsmiddotWidth; - this.maxDigitWidth = opts.maxDigitWidth; - } - /** - * @internal - */ - equals(other) { - return (this.fontFamily === other.fontFamily - && this.fontWeight === other.fontWeight - && this.fontSize === other.fontSize - && this.fontFeatureSettings === other.fontFeatureSettings - && this.lineHeight === other.lineHeight - && this.letterSpacing === other.letterSpacing - && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth - && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth - && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow - && this.spaceWidth === other.spaceWidth - && this.middotWidth === other.middotWidth - && this.wsmiddotWidth === other.wsmiddotWidth - && this.maxDigitWidth === other.maxDigitWidth); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js ***! - \******************************************************************************/ -/*! exports provided: CursorModelState, Cursor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorModelState", function() { return CursorModelState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cursor", function() { return Cursor; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorCollection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js"); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cursorDeleteOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js"); -/* harmony import */ var _cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cursorTypeOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../view/viewEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewModel/viewModelEventDispatcher.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -/** - * A snapshot of the cursor and the model state - */ -class CursorModelState { - constructor(model, cursor) { - this.modelVersionId = model.getVersionId(); - this.cursorState = cursor.getCursorStates(); - } - equals(other) { - if (!other) { - return false; - } - if (this.modelVersionId !== other.modelVersionId) { - return false; - } - if (this.cursorState.length !== other.cursorState.length) { - return false; - } - for (let i = 0, len = this.cursorState.length; i < len; i++) { - if (!this.cursorState[i].equals(other.cursorState[i])) { - return false; - } - } - return true; - } -} -class AutoClosedAction { - constructor(model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations) { - this._model = model; - this._autoClosedCharactersDecorations = autoClosedCharactersDecorations; - this._autoClosedEnclosingDecorations = autoClosedEnclosingDecorations; - } - static getAllAutoClosedCharacters(autoClosedActions) { - let autoClosedCharacters = []; - for (const autoClosedAction of autoClosedActions) { - autoClosedCharacters = autoClosedCharacters.concat(autoClosedAction.getAutoClosedCharactersRanges()); - } - return autoClosedCharacters; - } - dispose() { - this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []); - this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, []); - } - getAutoClosedCharactersRanges() { - let result = []; - for (let i = 0; i < this._autoClosedCharactersDecorations.length; i++) { - const decorationRange = this._model.getDecorationRange(this._autoClosedCharactersDecorations[i]); - if (decorationRange) { - result.push(decorationRange); - } - } - return result; - } - isValid(selections) { - let enclosingRanges = []; - for (let i = 0; i < this._autoClosedEnclosingDecorations.length; i++) { - const decorationRange = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]); - if (decorationRange) { - enclosingRanges.push(decorationRange); - if (decorationRange.startLineNumber !== decorationRange.endLineNumber) { - // Stop tracking if the range becomes multiline... - return false; - } - } - } - enclosingRanges.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts); - selections.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts); - for (let i = 0; i < selections.length; i++) { - if (i >= enclosingRanges.length) { - return false; - } - if (!enclosingRanges[i].strictContainsRange(selections[i])) { - return false; - } - } - return true; - } -} -class Cursor extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["Disposable"] { - constructor(model, viewModel, coordinatesConverter, cursorConfig) { - super(); - this._model = model; - this._knownModelVersionId = this._model.getVersionId(); - this._viewModel = viewModel; - this._coordinatesConverter = coordinatesConverter; - this.context = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorContext"](this._model, this._coordinatesConverter, cursorConfig); - this._cursors = new _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__["CursorCollection"](this.context); - this._hasFocus = false; - this._isHandling = false; - this._isDoingComposition = false; - this._selectionsWhenCompositionStarted = null; - this._columnSelectData = null; - this._autoClosedActions = []; - this._prevEditOperationType = 0 /* Other */; - } - dispose() { - this._cursors.dispose(); - this._autoClosedActions = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this._autoClosedActions); - super.dispose(); - } - updateConfiguration(cursorConfig) { - this.context = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorContext"](this._model, this._coordinatesConverter, cursorConfig); - this._cursors.updateContext(this.context); - } - onLineMappingChanged(eventsCollector) { - if (this._knownModelVersionId !== this._model.getVersionId()) { - // There are model change events that I didn't yet receive. - // - // This can happen when editing the model, and the view model receives the change events first, - // and the view model emits line mapping changed events, all before the cursor gets a chance to - // recover from markers. - // - // The model change listener above will be called soon and we'll ensure a valid cursor state there. - return; - } - // Ensure valid state - this.setStates(eventsCollector, 'viewModel', 0 /* NotSet */, this.getCursorStates()); - } - setHasFocus(hasFocus) { - this._hasFocus = hasFocus; - } - _validateAutoClosedActions() { - if (this._autoClosedActions.length > 0) { - let selections = this._cursors.getSelections(); - for (let i = 0; i < this._autoClosedActions.length; i++) { - const autoClosedAction = this._autoClosedActions[i]; - if (!autoClosedAction.isValid(selections)) { - autoClosedAction.dispose(); - this._autoClosedActions.splice(i, 1); - i--; - } - } - } - } - // ------ some getters/setters - getPrimaryCursorState() { - return this._cursors.getPrimaryCursor(); - } - getLastAddedCursorIndex() { - return this._cursors.getLastAddedCursorIndex(); - } - getCursorStates() { - return this._cursors.getAll(); - } - setStates(eventsCollector, source, reason, states) { - let reachedMaxCursorCount = false; - if (states !== null && states.length > Cursor.MAX_CURSOR_COUNT) { - states = states.slice(0, Cursor.MAX_CURSOR_COUNT); - reachedMaxCursorCount = true; - } - const oldState = new CursorModelState(this._model, this); - this._cursors.setStates(states); - this._cursors.normalize(); - this._columnSelectData = null; - this._validateAutoClosedActions(); - return this._emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount); - } - setCursorColumnSelectData(columnSelectData) { - this._columnSelectData = columnSelectData; - } - revealPrimary(eventsCollector, source, revealHorizontal, scrollType) { - const viewPositions = this._cursors.getViewPositions(); - if (viewPositions.length > 1) { - this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), 0 /* Simple */, revealHorizontal, scrollType); - return; - } - else { - const viewPosition = viewPositions[0]; - const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this._emitCursorRevealRange(eventsCollector, source, viewRange, null, 0 /* Simple */, revealHorizontal, scrollType); - } - } - _revealPrimaryCursor(eventsCollector, source, verticalType, revealHorizontal, scrollType) { - const viewPositions = this._cursors.getViewPositions(); - if (viewPositions.length > 1) { - this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), verticalType, revealHorizontal, scrollType); - } - else { - const viewPosition = viewPositions[0]; - const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this._emitCursorRevealRange(eventsCollector, source, viewRange, null, verticalType, revealHorizontal, scrollType); - } - } - _emitCursorRevealRange(eventsCollector, source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType) { - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__["ViewRevealRangeRequestEvent"](source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType)); - } - saveState() { - let result = []; - const selections = this._cursors.getSelections(); - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - result.push({ - inSelectionMode: !selection.isEmpty(), - selectionStart: { - lineNumber: selection.selectionStartLineNumber, - column: selection.selectionStartColumn, - }, - position: { - lineNumber: selection.positionLineNumber, - column: selection.positionColumn, - } - }); - } - return result; - } - restoreState(eventsCollector, states) { - let desiredSelections = []; - for (let i = 0, len = states.length; i < len; i++) { - const state = states[i]; - let positionLineNumber = 1; - let positionColumn = 1; - // Avoid missing properties on the literal - if (state.position && state.position.lineNumber) { - positionLineNumber = state.position.lineNumber; - } - if (state.position && state.position.column) { - positionColumn = state.position.column; - } - let selectionStartLineNumber = positionLineNumber; - let selectionStartColumn = positionColumn; - // Avoid missing properties on the literal - if (state.selectionStart && state.selectionStart.lineNumber) { - selectionStartLineNumber = state.selectionStart.lineNumber; - } - if (state.selectionStart && state.selectionStart.column) { - selectionStartColumn = state.selectionStart.column; - } - desiredSelections.push({ - selectionStartLineNumber: selectionStartLineNumber, - selectionStartColumn: selectionStartColumn, - positionLineNumber: positionLineNumber, - positionColumn: positionColumn - }); - } - this.setStates(eventsCollector, 'restoreState', 0 /* NotSet */, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorState"].fromModelSelections(desiredSelections)); - this.revealPrimary(eventsCollector, 'restoreState', true, 1 /* Immediate */); - } - onModelContentChanged(eventsCollector, e) { - this._knownModelVersionId = e.versionId; - if (this._isHandling) { - return; - } - const hadFlushEvent = e.containsEvent(1 /* Flush */); - this._prevEditOperationType = 0 /* Other */; - if (hadFlushEvent) { - // a model.setValue() was called - this._cursors.dispose(); - this._cursors = new _cursorCollection_js__WEBPACK_IMPORTED_MODULE_2__["CursorCollection"](this.context); - this._validateAutoClosedActions(); - this._emitStateChangedIfNecessary(eventsCollector, 'model', 1 /* ContentFlush */, null, false); - } - else { - if (this._hasFocus && e.resultingSelection && e.resultingSelection.length > 0) { - const cursorState = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorState"].fromModelSelections(e.resultingSelection); - if (this.setStates(eventsCollector, 'modelChange', e.isUndoing ? 5 /* Undo */ : e.isRedoing ? 6 /* Redo */ : 2 /* RecoverFromMarkers */, cursorState)) { - this._revealPrimaryCursor(eventsCollector, 'modelChange', 0 /* Simple */, true, 0 /* Smooth */); - } - } - else { - const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); - this.setStates(eventsCollector, 'modelChange', 2 /* RecoverFromMarkers */, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorState"].fromModelSelections(selectionsFromMarkers)); - } - } - } - getSelection() { - return this._cursors.getPrimaryCursor().modelState.selection; - } - getTopMostViewPosition() { - return this._cursors.getTopMostViewPosition(); - } - getBottomMostViewPosition() { - return this._cursors.getBottomMostViewPosition(); - } - getCursorColumnSelectData() { - if (this._columnSelectData) { - return this._columnSelectData; - } - const primaryCursor = this._cursors.getPrimaryCursor(); - const viewSelectionStart = primaryCursor.viewState.selectionStart.getStartPosition(); - const viewPosition = primaryCursor.viewState.position; - return { - isReal: false, - fromViewLineNumber: viewSelectionStart.lineNumber, - fromViewVisualColumn: _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorColumns"].visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewSelectionStart), - toViewLineNumber: viewPosition.lineNumber, - toViewVisualColumn: _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorColumns"].visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewPosition), - }; - } - getSelections() { - return this._cursors.getSelections(); - } - setSelections(eventsCollector, source, selections) { - this.setStates(eventsCollector, source, 0 /* NotSet */, _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["CursorState"].fromModelSelections(selections)); - } - getPrevEditOperationType() { - return this._prevEditOperationType; - } - setPrevEditOperationType(type) { - this._prevEditOperationType = type; - } - // ------ auxiliary handling logic - _pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges) { - let autoClosedCharactersDeltaDecorations = []; - let autoClosedEnclosingDeltaDecorations = []; - for (let i = 0, len = autoClosedCharactersRanges.length; i < len; i++) { - autoClosedCharactersDeltaDecorations.push({ - range: autoClosedCharactersRanges[i], - options: { - inlineClassName: 'auto-closed-character', - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ - } - }); - autoClosedEnclosingDeltaDecorations.push({ - range: autoClosedEnclosingRanges[i], - options: { - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ - } - }); - } - const autoClosedCharactersDecorations = this._model.deltaDecorations([], autoClosedCharactersDeltaDecorations); - const autoClosedEnclosingDecorations = this._model.deltaDecorations([], autoClosedEnclosingDeltaDecorations); - this._autoClosedActions.push(new AutoClosedAction(this._model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations)); - } - _executeEditOperation(opResult) { - if (!opResult) { - // Nothing to execute - return; - } - if (opResult.shouldPushStackElementBefore) { - this._model.pushStackElement(); - } - const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands); - if (result) { - // The commands were applied correctly - this._interpretCommandResult(result); - // Check for auto-closing closed characters - let autoClosedCharactersRanges = []; - let autoClosedEnclosingRanges = []; - for (let i = 0; i < opResult.commands.length; i++) { - const command = opResult.commands[i]; - if (command instanceof _cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeWithAutoClosingCommand"] && command.enclosingRange && command.closeCharacterRange) { - autoClosedCharactersRanges.push(command.closeCharacterRange); - autoClosedEnclosingRanges.push(command.enclosingRange); - } - } - if (autoClosedCharactersRanges.length > 0) { - this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges); - } - this._prevEditOperationType = opResult.type; - } - if (opResult.shouldPushStackElementAfter) { - this._model.pushStackElement(); - } - } - _interpretCommandResult(cursorState) { - if (!cursorState || cursorState.length === 0) { - cursorState = this._cursors.readSelectionFromMarkers(); - } - this._columnSelectData = null; - this._cursors.setSelections(cursorState); - this._cursors.normalize(); - } - // ----------------------------------------------------------------------------------------------------------- - // ----- emitting events - _emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount) { - const newState = new CursorModelState(this._model, this); - if (newState.equals(oldState)) { - return false; - } - const selections = this._cursors.getSelections(); - const viewSelections = this._cursors.getViewSelections(); - // Let the view get the event first. - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_8__["ViewCursorStateChangedEvent"](viewSelections, selections)); - // Only after the view has been notified, let the rest of the world know... - if (!oldState - || oldState.cursorState.length !== newState.cursorState.length - || newState.cursorState.some((newCursorState, i) => !newCursorState.modelState.equals(oldState.cursorState[i].modelState))) { - const oldSelections = oldState ? oldState.cursorState.map(s => s.modelState.selection) : null; - const oldModelVersionId = oldState ? oldState.modelVersionId : 0; - eventsCollector.emitOutgoingEvent(new _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_10__["CursorStateChangedEvent"](oldSelections, selections, oldModelVersionId, newState.modelVersionId, source || 'keyboard', reason, reachedMaxCursorCount)); - } - return true; - } - // ----------------------------------------------------------------------------------------------------------- - // ----- handlers beyond this point - _findAutoClosingPairs(edits) { - if (!edits.length) { - return null; - } - let indices = []; - for (let i = 0, len = edits.length; i < len; i++) { - const edit = edits[i]; - if (!edit.text || edit.text.indexOf('\n') >= 0) { - return null; - } - const m = edit.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/); - if (!m) { - return null; - } - const closeChar = m[1]; - const autoClosingPairsCandidates = this.context.cursorConfig.autoClosingPairsClose2.get(closeChar); - if (!autoClosingPairsCandidates || autoClosingPairsCandidates.length !== 1) { - return null; - } - const openChar = autoClosingPairsCandidates[0].open; - const closeCharIndex = edit.text.length - m[2].length - 1; - const openCharIndex = edit.text.lastIndexOf(openChar, closeCharIndex - 1); - if (openCharIndex === -1) { - return null; - } - indices.push([openCharIndex, closeCharIndex]); - } - return indices; - } - executeEdits(eventsCollector, source, edits, cursorStateComputer) { - let autoClosingIndices = null; - if (source === 'snippet') { - autoClosingIndices = this._findAutoClosingPairs(edits); - } - if (autoClosingIndices) { - edits[0]._isTracked = true; - } - let autoClosedCharactersRanges = []; - let autoClosedEnclosingRanges = []; - const selections = this._model.pushEditOperations(this.getSelections(), edits, (undoEdits) => { - if (autoClosingIndices) { - for (let i = 0, len = autoClosingIndices.length; i < len; i++) { - const [openCharInnerIndex, closeCharInnerIndex] = autoClosingIndices[i]; - const undoEdit = undoEdits[i]; - const lineNumber = undoEdit.range.startLineNumber; - const openCharIndex = undoEdit.range.startColumn - 1 + openCharInnerIndex; - const closeCharIndex = undoEdit.range.startColumn - 1 + closeCharInnerIndex; - autoClosedCharactersRanges.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](lineNumber, closeCharIndex + 1, lineNumber, closeCharIndex + 2)); - autoClosedEnclosingRanges.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](lineNumber, openCharIndex + 1, lineNumber, closeCharIndex + 2)); - } - } - const selections = cursorStateComputer(undoEdits); - if (selections) { - // Don't recover the selection from markers because - // we know what it should be. - this._isHandling = true; - } - return selections; - }); - if (selections) { - this._isHandling = false; - this.setSelections(eventsCollector, source, selections); - } - if (autoClosedCharactersRanges.length > 0) { - this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges); - } - } - _executeEdit(callback, eventsCollector, source, cursorChangeReason = 0 /* NotSet */) { - if (this.context.cursorConfig.readOnly) { - // we cannot edit when read only... - return; - } - const oldState = new CursorModelState(this._model, this); - this._cursors.stopTrackingSelections(); - this._isHandling = true; - try { - this._cursors.ensureValidState(); - callback(); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(err); - } - this._isHandling = false; - this._cursors.startTrackingSelections(); - this._validateAutoClosedActions(); - if (this._emitStateChangedIfNecessary(eventsCollector, source, cursorChangeReason, oldState, false)) { - this._revealPrimaryCursor(eventsCollector, source, 0 /* Simple */, true, 0 /* Smooth */); - } - } - setIsDoingComposition(isDoingComposition) { - this._isDoingComposition = isDoingComposition; - } - startComposition(eventsCollector) { - this._selectionsWhenCompositionStarted = this.getSelections().slice(0); - } - endComposition(eventsCollector, source) { - this._executeEdit(() => { - if (source === 'keyboard') { - // composition finishes, let's check if we need to auto complete if necessary. - const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions); - this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeOperations"].compositionEndWithInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this._selectionsWhenCompositionStarted, this.getSelections(), autoClosedCharacters)); - this._selectionsWhenCompositionStarted = null; - } - }, eventsCollector, source); - } - type(eventsCollector, text, source) { - this._executeEdit(() => { - if (source === 'keyboard') { - // If this event is coming straight from the keyboard, look for electric characters and enter - const len = text.length; - let offset = 0; - while (offset < len) { - const charLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["nextCharLength"](text, offset); - const chr = text.substr(offset, charLength); - // Here we must interpret each typed character individually - const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions); - this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeOperations"].typeWithInterceptors(this._isDoingComposition, this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), autoClosedCharacters, chr)); - offset += charLength; - } - } - else { - this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeOperations"].typeWithoutInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text)); - } - }, eventsCollector, source); - } - replacePreviousChar(eventsCollector, text, replaceCharCnt, source) { - this._executeEdit(() => { - this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeOperations"].replacePreviousChar(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text, replaceCharCnt)); - }, eventsCollector, source); - } - paste(eventsCollector, text, pasteOnNewLine, multicursorText, source) { - this._executeEdit(() => { - this._executeEditOperation(_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_5__["TypeOperations"].paste(this.context.cursorConfig, this._model, this.getSelections(), text, pasteOnNewLine, multicursorText || [])); - }, eventsCollector, source, 4 /* Paste */); - } - cut(eventsCollector, source) { - this._executeEdit(() => { - this._executeEditOperation(_cursorDeleteOperations_js__WEBPACK_IMPORTED_MODULE_4__["DeleteOperations"].cut(this.context.cursorConfig, this._model, this.getSelections())); - }, eventsCollector, source); - } - executeCommand(eventsCollector, command, source) { - this._executeEdit(() => { - this._cursors.killSecondaryCursors(); - this._executeEditOperation(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["EditOperationResult"](0 /* Other */, [command], { - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false - })); - }, eventsCollector, source); - } - executeCommands(eventsCollector, commands, source) { - this._executeEdit(() => { - this._executeEditOperation(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_3__["EditOperationResult"](0 /* Other */, commands, { - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false - })); - }, eventsCollector, source); - } -} -Cursor.MAX_CURSOR_COUNT = 10000; -class CommandExecutor { - static executeCommands(model, selectionsBefore, commands) { - const ctx = { - model: model, - selectionsBefore: selectionsBefore, - trackedRanges: [], - trackedRangesDirection: [] - }; - const result = this._innerExecuteCommands(ctx, commands); - for (let i = 0, len = ctx.trackedRanges.length; i < len; i++) { - ctx.model._setTrackedRange(ctx.trackedRanges[i], null, 0 /* AlwaysGrowsWhenTypingAtEdges */); - } - return result; - } - static _innerExecuteCommands(ctx, commands) { - if (this._arrayIsEmpty(commands)) { - return null; - } - const commandsData = this._getEditOperations(ctx, commands); - if (commandsData.operations.length === 0) { - return null; - } - const rawOperations = commandsData.operations; - const loserCursorsMap = this._getLoserCursorMap(rawOperations); - if (loserCursorsMap.hasOwnProperty('0')) { - // These commands are very messed up - console.warn('Ignoring commands'); - return null; - } - // Remove operations belonging to losing cursors - let filteredOperations = []; - for (let i = 0, len = rawOperations.length; i < len; i++) { - if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) { - filteredOperations.push(rawOperations[i]); - } - } - // TODO@Alex: find a better way to do this. - // give the hint that edit operations are tracked to the model - if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) { - filteredOperations[0]._isTracked = true; - } - let selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, (inverseEditOperations) => { - let groupedInverseEditOperations = []; - for (let i = 0; i < ctx.selectionsBefore.length; i++) { - groupedInverseEditOperations[i] = []; - } - for (const op of inverseEditOperations) { - if (!op.identifier) { - // perhaps auto whitespace trim edits - continue; - } - groupedInverseEditOperations[op.identifier.major].push(op); - } - const minorBasedSorter = (a, b) => { - return a.identifier.minor - b.identifier.minor; - }; - let cursorSelections = []; - for (let i = 0; i < ctx.selectionsBefore.length; i++) { - if (groupedInverseEditOperations[i].length > 0) { - groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].computeCursorState(ctx.model, { - getInverseEditOperations: () => { - return groupedInverseEditOperations[i]; - }, - getTrackedSelection: (id) => { - const idx = parseInt(id, 10); - const range = ctx.model._getTrackedRange(ctx.trackedRanges[idx]); - if (ctx.trackedRangesDirection[idx] === 0 /* LTR */) { - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); - } - }); - } - else { - cursorSelections[i] = ctx.selectionsBefore[i]; - } - } - return cursorSelections; - }); - if (!selectionsAfter) { - selectionsAfter = ctx.selectionsBefore; - } - // Extract losing cursors - let losingCursors = []; - for (let losingCursorIndex in loserCursorsMap) { - if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) { - losingCursors.push(parseInt(losingCursorIndex, 10)); - } - } - // Sort losing cursors descending - losingCursors.sort((a, b) => { - return b - a; - }); - // Remove losing cursors - for (const losingCursor of losingCursors) { - selectionsAfter.splice(losingCursor, 1); - } - return selectionsAfter; - } - static _arrayIsEmpty(commands) { - for (let i = 0, len = commands.length; i < len; i++) { - if (commands[i]) { - return false; - } - } - return true; - } - static _getEditOperations(ctx, commands) { - let operations = []; - let hadTrackedEditOperation = false; - for (let i = 0, len = commands.length; i < len; i++) { - const command = commands[i]; - if (command) { - const r = this._getEditOperationsFromCommand(ctx, i, command); - operations = operations.concat(r.operations); - hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; - } - } - return { - operations: operations, - hadTrackedEditOperation: hadTrackedEditOperation - }; - } - static _getEditOperationsFromCommand(ctx, majorIdentifier, command) { - // This method acts as a transaction, if the command fails - // everything it has done is ignored - let operations = []; - let operationMinor = 0; - const addEditOperation = (range, text, forceMoveMarkers = false) => { - if (_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].isEmpty(range) && text === '') { - // This command wants to add a no-op => no thank you - return; - } - operations.push({ - identifier: { - major: majorIdentifier, - minor: operationMinor++ - }, - range: range, - text: text, - forceMoveMarkers: forceMoveMarkers, - isAutoWhitespaceEdit: command.insertsAutoWhitespace - }); - }; - let hadTrackedEditOperation = false; - const addTrackedEditOperation = (selection, text, forceMoveMarkers) => { - hadTrackedEditOperation = true; - addEditOperation(selection, text, forceMoveMarkers); - }; - const trackSelection = (_selection, trackPreviousOnEmpty) => { - const selection = _core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"].liftSelection(_selection); - let stickiness; - if (selection.isEmpty()) { - if (typeof trackPreviousOnEmpty === 'boolean') { - if (trackPreviousOnEmpty) { - stickiness = 2 /* GrowsOnlyWhenTypingBefore */; - } - else { - stickiness = 3 /* GrowsOnlyWhenTypingAfter */; - } - } - else { - // Try to lock it with surrounding text - const maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber); - if (selection.startColumn === maxLineColumn) { - stickiness = 2 /* GrowsOnlyWhenTypingBefore */; - } - else { - stickiness = 3 /* GrowsOnlyWhenTypingAfter */; - } - } - } - else { - stickiness = 1 /* NeverGrowsWhenTypingAtEdges */; - } - const l = ctx.trackedRanges.length; - const id = ctx.model._setTrackedRange(null, selection, stickiness); - ctx.trackedRanges[l] = id; - ctx.trackedRangesDirection[l] = selection.getDirection(); - return l.toString(); - }; - const editOperationBuilder = { - addEditOperation: addEditOperation, - addTrackedEditOperation: addTrackedEditOperation, - trackSelection: trackSelection - }; - try { - command.getEditOperations(ctx.model, editOperationBuilder); - } - catch (e) { - // TODO@Alex use notification service if this should be user facing - // e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return { - operations: [], - hadTrackedEditOperation: false - }; - } - return { - operations: operations, - hadTrackedEditOperation: hadTrackedEditOperation - }; - } - static _getLoserCursorMap(operations) { - // This is destructive on the array - operations = operations.slice(0); - // Sort operations with last one first - operations.sort((a, b) => { - // Note the minus! - return -(_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingEnds(a.range, b.range)); - }); - // Operations can not overlap! - let loserCursorsMap = {}; - for (let i = 1; i < operations.length; i++) { - const previousOp = operations[i - 1]; - const currentOp = operations[i]; - if (_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].getStartPosition(previousOp.range).isBefore(_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].getEndPosition(currentOp.range))) { - let loserMajor; - if (previousOp.identifier.major > currentOp.identifier.major) { - // previousOp loses the battle - loserMajor = previousOp.identifier.major; - } - else { - loserMajor = currentOp.identifier.major; - } - loserCursorsMap[loserMajor.toString()] = true; - for (let j = 0; j < operations.length; j++) { - if (operations[j].identifier.major === loserMajor) { - operations.splice(j, 1); - if (j < i) { - i--; - } - j--; - } - } - if (i > 0) { - i--; - } - } - } - return loserCursorsMap; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCollection.js ***! - \****************************************************************************************/ -/*! exports provided: CursorCollection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorCollection", function() { return CursorCollection; }); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./oneCursor.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class CursorCollection { - constructor(context) { - this.context = context; - this.primaryCursor = new _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__["OneCursor"](context); - this.secondaryCursors = []; - this.lastAddedCursorIndex = 0; - } - dispose() { - this.primaryCursor.dispose(this.context); - this.killSecondaryCursors(); - } - startTrackingSelections() { - this.primaryCursor.startTrackingSelection(this.context); - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - this.secondaryCursors[i].startTrackingSelection(this.context); - } - } - stopTrackingSelections() { - this.primaryCursor.stopTrackingSelection(this.context); - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - this.secondaryCursors[i].stopTrackingSelection(this.context); - } - } - updateContext(context) { - this.context = context; - } - ensureValidState() { - this.primaryCursor.ensureValidState(this.context); - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - this.secondaryCursors[i].ensureValidState(this.context); - } - } - readSelectionFromMarkers() { - let result = []; - result[0] = this.primaryCursor.readSelectionFromMarkers(this.context); - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].readSelectionFromMarkers(this.context); - } - return result; - } - getAll() { - let result = []; - result[0] = this.primaryCursor.asCursorState(); - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].asCursorState(); - } - return result; - } - getViewPositions() { - let result = []; - result[0] = this.primaryCursor.viewState.position; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].viewState.position; - } - return result; - } - getTopMostViewPosition() { - let result = this.primaryCursor.viewState.position; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - const viewPosition = this.secondaryCursors[i].viewState.position; - if (viewPosition.isBefore(result)) { - result = viewPosition; - } - } - return result; - } - getBottomMostViewPosition() { - let result = this.primaryCursor.viewState.position; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - const viewPosition = this.secondaryCursors[i].viewState.position; - if (result.isBeforeOrEqual(viewPosition)) { - result = viewPosition; - } - } - return result; - } - getSelections() { - let result = []; - result[0] = this.primaryCursor.modelState.selection; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].modelState.selection; - } - return result; - } - getViewSelections() { - let result = []; - result[0] = this.primaryCursor.viewState.selection; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].viewState.selection; - } - return result; - } - setSelections(selections) { - this.setStates(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorState"].fromModelSelections(selections)); - } - getPrimaryCursor() { - return this.primaryCursor.asCursorState(); - } - setStates(states) { - if (states === null) { - return; - } - this.primaryCursor.setState(this.context, states[0].modelState, states[0].viewState); - this._setSecondaryStates(states.slice(1)); - } - /** - * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`. - */ - _setSecondaryStates(secondaryStates) { - const secondaryCursorsLength = this.secondaryCursors.length; - const secondaryStatesLength = secondaryStates.length; - if (secondaryCursorsLength < secondaryStatesLength) { - let createCnt = secondaryStatesLength - secondaryCursorsLength; - for (let i = 0; i < createCnt; i++) { - this._addSecondaryCursor(); - } - } - else if (secondaryCursorsLength > secondaryStatesLength) { - let removeCnt = secondaryCursorsLength - secondaryStatesLength; - for (let i = 0; i < removeCnt; i++) { - this._removeSecondaryCursor(this.secondaryCursors.length - 1); - } - } - for (let i = 0; i < secondaryStatesLength; i++) { - this.secondaryCursors[i].setState(this.context, secondaryStates[i].modelState, secondaryStates[i].viewState); - } - } - killSecondaryCursors() { - this._setSecondaryStates([]); - } - _addSecondaryCursor() { - this.secondaryCursors.push(new _oneCursor_js__WEBPACK_IMPORTED_MODULE_1__["OneCursor"](this.context)); - this.lastAddedCursorIndex = this.secondaryCursors.length; - } - getLastAddedCursorIndex() { - if (this.secondaryCursors.length === 0 || this.lastAddedCursorIndex === 0) { - return 0; - } - return this.lastAddedCursorIndex; - } - _removeSecondaryCursor(removeIndex) { - if (this.lastAddedCursorIndex >= removeIndex + 1) { - this.lastAddedCursorIndex--; - } - this.secondaryCursors[removeIndex].dispose(this.context); - this.secondaryCursors.splice(removeIndex, 1); - } - _getAll() { - let result = []; - result[0] = this.primaryCursor; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i]; - } - return result; - } - normalize() { - if (this.secondaryCursors.length === 0) { - return; - } - let cursors = this._getAll(); - let sortedCursors = []; - for (let i = 0, len = cursors.length; i < len; i++) { - sortedCursors.push({ - index: i, - selection: cursors[i].modelState.selection, - }); - } - sortedCursors.sort((a, b) => { - if (a.selection.startLineNumber === b.selection.startLineNumber) { - return a.selection.startColumn - b.selection.startColumn; - } - return a.selection.startLineNumber - b.selection.startLineNumber; - }); - for (let sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) { - const current = sortedCursors[sortedCursorIndex]; - const next = sortedCursors[sortedCursorIndex + 1]; - const currentSelection = current.selection; - const nextSelection = next.selection; - if (!this.context.cursorConfig.multiCursorMergeOverlapping) { - continue; - } - let shouldMergeCursors; - if (nextSelection.isEmpty() || currentSelection.isEmpty()) { - // Merge touching cursors if one of them is collapsed - shouldMergeCursors = nextSelection.getStartPosition().isBeforeOrEqual(currentSelection.getEndPosition()); - } - else { - // Merge only overlapping cursors (i.e. allow touching ranges) - shouldMergeCursors = nextSelection.getStartPosition().isBefore(currentSelection.getEndPosition()); - } - if (shouldMergeCursors) { - const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; - const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; - const looserIndex = sortedCursors[looserSortedCursorIndex].index; - const winnerIndex = sortedCursors[winnerSortedCursorIndex].index; - const looserSelection = sortedCursors[looserSortedCursorIndex].selection; - const winnerSelection = sortedCursors[winnerSortedCursorIndex].selection; - if (!looserSelection.equalsSelection(winnerSelection)) { - const resultingRange = looserSelection.plusRange(winnerSelection); - const looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn); - const winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn); - // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor) - let resultingSelectionIsLTR; - if (looserIndex === this.lastAddedCursorIndex) { - resultingSelectionIsLTR = looserSelectionIsLTR; - this.lastAddedCursorIndex = winnerIndex; - } - else { - // Winner takes it all - resultingSelectionIsLTR = winnerSelectionIsLTR; - } - let resultingSelection; - if (resultingSelectionIsLTR) { - resultingSelection = new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__["Selection"](resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn); - } - else { - resultingSelection = new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__["Selection"](resultingRange.endLineNumber, resultingRange.endColumn, resultingRange.startLineNumber, resultingRange.startColumn); - } - sortedCursors[winnerSortedCursorIndex].selection = resultingSelection; - const resultingState = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorState"].fromModelSelection(resultingSelection); - cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState); - } - for (const sortedCursor of sortedCursors) { - if (sortedCursor.index > looserIndex) { - sortedCursor.index--; - } - } - cursors.splice(looserIndex, 1); - sortedCursors.splice(looserSortedCursorIndex, 1); - this._removeSecondaryCursor(looserIndex - 1); - sortedCursorIndex--; - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorColumnSelection.js ***! - \*********************************************************************************************/ -/*! exports provided: ColumnSelection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnSelection", function() { return ColumnSelection; }); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class ColumnSelection { - static columnSelect(config, model, fromLineNumber, fromVisibleColumn, toLineNumber, toVisibleColumn) { - let lineCount = Math.abs(toLineNumber - fromLineNumber) + 1; - let reversed = (fromLineNumber > toLineNumber); - let isRTL = (fromVisibleColumn > toVisibleColumn); - let isLTR = (fromVisibleColumn < toVisibleColumn); - let result = []; - // console.log(`fromVisibleColumn: ${fromVisibleColumn}, toVisibleColumn: ${toVisibleColumn}`); - for (let i = 0; i < lineCount; i++) { - let lineNumber = fromLineNumber + (reversed ? -i : i); - let startColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].columnFromVisibleColumn2(config, model, lineNumber, fromVisibleColumn); - let endColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].columnFromVisibleColumn2(config, model, lineNumber, toVisibleColumn); - let visibleStartColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, startColumn)); - let visibleEndColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, endColumn)); - // console.log(`lineNumber: ${lineNumber}: visibleStartColumn: ${visibleStartColumn}, visibleEndColumn: ${visibleEndColumn}`); - if (isLTR) { - if (visibleStartColumn > toVisibleColumn) { - continue; - } - if (visibleEndColumn < fromVisibleColumn) { - continue; - } - } - if (isRTL) { - if (visibleEndColumn > fromVisibleColumn) { - continue; - } - if (visibleStartColumn < toVisibleColumn) { - continue; - } - } - result.push(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, startColumn, lineNumber, startColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, endColumn), 0)); - } - if (result.length === 0) { - // We are after all the lines, so add cursor at the end of each line - for (let i = 0; i < lineCount; i++) { - const lineNumber = fromLineNumber + (reversed ? -i : i); - const maxColumn = model.getLineMaxColumn(lineNumber); - result.push(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, maxColumn, lineNumber, maxColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, maxColumn), 0)); - } - } - return { - viewStates: result, - reversed: reversed, - fromLineNumber: fromLineNumber, - fromVisualColumn: fromVisibleColumn, - toLineNumber: toLineNumber, - toVisualColumn: toVisibleColumn - }; - } - static columnSelectLeft(config, model, prevColumnSelectData) { - let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn; - if (toViewVisualColumn > 1) { - toViewVisualColumn--; - } - return ColumnSelection.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn); - } - static columnSelectRight(config, model, prevColumnSelectData) { - let maxVisualViewColumn = 0; - const minViewLineNumber = Math.min(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber); - const maxViewLineNumber = Math.max(prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.toViewLineNumber); - for (let lineNumber = minViewLineNumber; lineNumber <= maxViewLineNumber; lineNumber++) { - const lineMaxViewColumn = model.getLineMaxColumn(lineNumber); - const lineMaxVisualViewColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn2(config, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, lineMaxViewColumn)); - maxVisualViewColumn = Math.max(maxVisualViewColumn, lineMaxVisualViewColumn); - } - let toViewVisualColumn = prevColumnSelectData.toViewVisualColumn; - if (toViewVisualColumn < maxVisualViewColumn) { - toViewVisualColumn++; - } - return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, prevColumnSelectData.toViewLineNumber, toViewVisualColumn); - } - static columnSelectUp(config, model, prevColumnSelectData, isPaged) { - const linesCount = isPaged ? config.pageSize : 1; - const toViewLineNumber = Math.max(1, prevColumnSelectData.toViewLineNumber - linesCount); - return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn); - } - static columnSelectDown(config, model, prevColumnSelectData, isPaged) { - const linesCount = isPaged ? config.pageSize : 1; - const toViewLineNumber = Math.min(model.getLineCount(), prevColumnSelectData.toViewLineNumber + linesCount); - return this.columnSelect(config, model, prevColumnSelectData.fromViewLineNumber, prevColumnSelectData.fromViewVisualColumn, toViewLineNumber, prevColumnSelectData.toViewVisualColumn); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js ***! - \************************************************************************************/ -/*! exports provided: CursorConfiguration, SingleCursorState, CursorContext, PartialModelCursorState, PartialViewCursorState, CursorState, EditOperationResult, CursorColumns, isQuote */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorConfiguration", function() { return CursorConfiguration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SingleCursorState", function() { return SingleCursorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorContext", function() { return CursorContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartialModelCursorState", function() { return PartialModelCursorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartialViewCursorState", function() { return PartialViewCursorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorState", function() { return CursorState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditOperationResult", function() { return EditOperationResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorColumns", function() { return CursorColumns; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isQuote", function() { return isQuote; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -const autoCloseAlways = () => true; -const autoCloseNever = () => false; -const autoCloseBeforeWhitespace = (chr) => (chr === ' ' || chr === '\t'); -function appendEntry(target, key, value) { - if (target.has(key)) { - target.get(key).push(value); - } - else { - target.set(key, [value]); - } -} -class CursorConfiguration { - constructor(languageIdentifier, modelOptions, configuration) { - this._languageIdentifier = languageIdentifier; - const options = configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - this.readOnly = options.get(72 /* readOnly */); - this.tabSize = modelOptions.tabSize; - this.indentSize = modelOptions.indentSize; - this.insertSpaces = modelOptions.insertSpaces; - this.lineHeight = options.get(51 /* lineHeight */); - this.pageSize = Math.max(1, Math.floor(layoutInfo.height / this.lineHeight) - 2); - this.useTabStops = options.get(104 /* useTabStops */); - this.wordSeparators = options.get(105 /* wordSeparators */); - this.emptySelectionClipboard = options.get(26 /* emptySelectionClipboard */); - this.copyWithSyntaxHighlighting = options.get(16 /* copyWithSyntaxHighlighting */); - this.multiCursorMergeOverlapping = options.get(60 /* multiCursorMergeOverlapping */); - this.multiCursorPaste = options.get(62 /* multiCursorPaste */); - this.autoClosingBrackets = options.get(5 /* autoClosingBrackets */); - this.autoClosingQuotes = options.get(7 /* autoClosingQuotes */); - this.autoClosingOvertype = options.get(6 /* autoClosingOvertype */); - this.autoSurround = options.get(10 /* autoSurround */); - this.autoIndent = options.get(8 /* autoIndent */); - this.autoClosingPairsOpen2 = new Map(); - this.autoClosingPairsClose2 = new Map(); - this.surroundingPairs = {}; - this._electricChars = null; - this.shouldAutoCloseBefore = { - quote: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingQuotes), - bracket: CursorConfiguration._getShouldAutoClose(languageIdentifier, this.autoClosingBrackets) - }; - let autoClosingPairs = CursorConfiguration._getAutoClosingPairs(languageIdentifier); - if (autoClosingPairs) { - for (const pair of autoClosingPairs) { - appendEntry(this.autoClosingPairsOpen2, pair.open.charAt(pair.open.length - 1), pair); - if (pair.close.length === 1) { - appendEntry(this.autoClosingPairsClose2, pair.close, pair); - } - } - } - let surroundingPairs = CursorConfiguration._getSurroundingPairs(languageIdentifier); - if (surroundingPairs) { - for (const pair of surroundingPairs) { - this.surroundingPairs[pair.open] = pair.close; - } - } - } - static shouldRecreate(e) { - return (e.hasChanged(117 /* layoutInfo */) - || e.hasChanged(105 /* wordSeparators */) - || e.hasChanged(26 /* emptySelectionClipboard */) - || e.hasChanged(60 /* multiCursorMergeOverlapping */) - || e.hasChanged(62 /* multiCursorPaste */) - || e.hasChanged(5 /* autoClosingBrackets */) - || e.hasChanged(7 /* autoClosingQuotes */) - || e.hasChanged(6 /* autoClosingOvertype */) - || e.hasChanged(10 /* autoSurround */) - || e.hasChanged(104 /* useTabStops */) - || e.hasChanged(51 /* lineHeight */) - || e.hasChanged(72 /* readOnly */)); - } - get electricChars() { - if (!this._electricChars) { - this._electricChars = {}; - let electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier); - if (electricChars) { - for (const char of electricChars) { - this._electricChars[char] = true; - } - } - } - return this._electricChars; - } - normalizeIndentation(str) { - return _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__["TextModel"].normalizeIndentation(str, this.indentSize, this.insertSpaces); - } - static _getElectricCharacters(languageIdentifier) { - try { - return _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getElectricCharacters(languageIdentifier.id); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return null; - } - } - static _getAutoClosingPairs(languageIdentifier) { - try { - return _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getAutoClosingPairs(languageIdentifier.id); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return null; - } - } - static _getShouldAutoClose(languageIdentifier, autoCloseConfig) { - switch (autoCloseConfig) { - case 'beforeWhitespace': - return autoCloseBeforeWhitespace; - case 'languageDefined': - return CursorConfiguration._getLanguageDefinedShouldAutoClose(languageIdentifier); - case 'always': - return autoCloseAlways; - case 'never': - return autoCloseNever; - } - } - static _getLanguageDefinedShouldAutoClose(languageIdentifier) { - try { - const autoCloseBeforeSet = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getAutoCloseBeforeSet(languageIdentifier.id); - return c => autoCloseBeforeSet.indexOf(c) !== -1; - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return autoCloseNever; - } - } - static _getSurroundingPairs(languageIdentifier) { - try { - return _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getSurroundingPairs(languageIdentifier.id); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return null; - } - } -} -/** - * Represents the cursor state on either the model or on the view model. - */ -class SingleCursorState { - constructor(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns) { - this.selectionStart = selectionStart; - this.selectionStartLeftoverVisibleColumns = selectionStartLeftoverVisibleColumns; - this.position = position; - this.leftoverVisibleColumns = leftoverVisibleColumns; - this.selection = SingleCursorState._computeSelection(this.selectionStart, this.position); - } - equals(other) { - return (this.selectionStartLeftoverVisibleColumns === other.selectionStartLeftoverVisibleColumns - && this.leftoverVisibleColumns === other.leftoverVisibleColumns - && this.position.equals(other.position) - && this.selectionStart.equalsRange(other.selectionStart)); - } - hasSelection() { - return (!this.selection.isEmpty() || !this.selectionStart.isEmpty()); - } - move(inSelectionMode, lineNumber, column, leftoverVisibleColumns) { - if (inSelectionMode) { - // move just position - return new SingleCursorState(this.selectionStart, this.selectionStartLeftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](lineNumber, column), leftoverVisibleColumns); - } - else { - // move everything - return new SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](lineNumber, column, lineNumber, column), leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](lineNumber, column), leftoverVisibleColumns); - } - } - static _computeSelection(selectionStart, position) { - let startLineNumber, startColumn, endLineNumber, endColumn; - if (selectionStart.isEmpty()) { - startLineNumber = selectionStart.startLineNumber; - startColumn = selectionStart.startColumn; - endLineNumber = position.lineNumber; - endColumn = position.column; - } - else { - if (position.isBeforeOrEqual(selectionStart.getStartPosition())) { - startLineNumber = selectionStart.endLineNumber; - startColumn = selectionStart.endColumn; - endLineNumber = position.lineNumber; - endColumn = position.column; - } - else { - startLineNumber = selectionStart.startLineNumber; - startColumn = selectionStart.startColumn; - endLineNumber = position.lineNumber; - endColumn = position.column; - } - } - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_4__["Selection"](startLineNumber, startColumn, endLineNumber, endColumn); - } -} -class CursorContext { - constructor(model, coordinatesConverter, cursorConfig) { - this.model = model; - this.coordinatesConverter = coordinatesConverter; - this.cursorConfig = cursorConfig; - } -} -class PartialModelCursorState { - constructor(modelState) { - this.modelState = modelState; - this.viewState = null; - } -} -class PartialViewCursorState { - constructor(viewState) { - this.modelState = null; - this.viewState = viewState; - } -} -class CursorState { - constructor(modelState, viewState) { - this.modelState = modelState; - this.viewState = viewState; - } - static fromModelState(modelState) { - return new PartialModelCursorState(modelState); - } - static fromViewState(viewState) { - return new PartialViewCursorState(viewState); - } - static fromModelSelection(modelSelection) { - const selectionStartLineNumber = modelSelection.selectionStartLineNumber; - const selectionStartColumn = modelSelection.selectionStartColumn; - const positionLineNumber = modelSelection.positionLineNumber; - const positionColumn = modelSelection.positionColumn; - const modelState = new SingleCursorState(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](positionLineNumber, positionColumn), 0); - return CursorState.fromModelState(modelState); - } - static fromModelSelections(modelSelections) { - let states = []; - for (let i = 0, len = modelSelections.length; i < len; i++) { - states[i] = this.fromModelSelection(modelSelections[i]); - } - return states; - } - equals(other) { - return (this.viewState.equals(other.viewState) && this.modelState.equals(other.modelState)); - } -} -class EditOperationResult { - constructor(type, commands, opts) { - this.type = type; - this.commands = commands; - this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore; - this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter; - } -} -/** - * Common operations that work and make sense both on the model and on the view model. - */ -class CursorColumns { - static visibleColumnFromColumn(lineContent, column, tabSize) { - const lineContentLength = lineContent.length; - const endOffset = column - 1 < lineContentLength ? column - 1 : lineContentLength; - let result = 0; - let i = 0; - while (i < endOffset) { - const codePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getNextCodePoint"](lineContent, endOffset, i); - i += (codePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - if (codePoint === 9 /* Tab */) { - result = CursorColumns.nextRenderTabStop(result, tabSize); - } - else { - let graphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getGraphemeBreakType"](codePoint); - while (i < endOffset) { - const nextCodePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getNextCodePoint"](lineContent, endOffset, i); - const nextGraphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getGraphemeBreakType"](nextCodePoint); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["breakBetweenGraphemeBreakType"](graphemeBreakType, nextGraphemeBreakType)) { - break; - } - i += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - graphemeBreakType = nextGraphemeBreakType; - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isFullWidthCharacter"](codePoint) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isEmojiImprecise"](codePoint)) { - result = result + 2; - } - else { - result = result + 1; - } - } - } - return result; - } - static visibleColumnFromColumn2(config, model, position) { - return this.visibleColumnFromColumn(model.getLineContent(position.lineNumber), position.column, config.tabSize); - } - static columnFromVisibleColumn(lineContent, visibleColumn, tabSize) { - if (visibleColumn <= 0) { - return 1; - } - const lineLength = lineContent.length; - let beforeVisibleColumn = 0; - let beforeColumn = 1; - let i = 0; - while (i < lineLength) { - const codePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getNextCodePoint"](lineContent, lineLength, i); - i += (codePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - let afterVisibleColumn; - if (codePoint === 9 /* Tab */) { - afterVisibleColumn = CursorColumns.nextRenderTabStop(beforeVisibleColumn, tabSize); - } - else { - let graphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getGraphemeBreakType"](codePoint); - while (i < lineLength) { - const nextCodePoint = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getNextCodePoint"](lineContent, lineLength, i); - const nextGraphemeBreakType = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getGraphemeBreakType"](nextCodePoint); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["breakBetweenGraphemeBreakType"](graphemeBreakType, nextGraphemeBreakType)) { - break; - } - i += (nextCodePoint >= 65536 /* UNICODE_SUPPLEMENTARY_PLANE_BEGIN */ ? 2 : 1); - graphemeBreakType = nextGraphemeBreakType; - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isFullWidthCharacter"](codePoint) || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isEmojiImprecise"](codePoint)) { - afterVisibleColumn = beforeVisibleColumn + 2; - } - else { - afterVisibleColumn = beforeVisibleColumn + 1; - } - } - const afterColumn = i + 1; - if (afterVisibleColumn >= visibleColumn) { - const beforeDelta = visibleColumn - beforeVisibleColumn; - const afterDelta = afterVisibleColumn - visibleColumn; - if (afterDelta < beforeDelta) { - return afterColumn; - } - else { - return beforeColumn; - } - } - beforeVisibleColumn = afterVisibleColumn; - beforeColumn = afterColumn; - } - // walked the entire string - return lineLength + 1; - } - static columnFromVisibleColumn2(config, model, lineNumber, visibleColumn) { - let result = this.columnFromVisibleColumn(model.getLineContent(lineNumber), visibleColumn, config.tabSize); - let minColumn = model.getLineMinColumn(lineNumber); - if (result < minColumn) { - return minColumn; - } - let maxColumn = model.getLineMaxColumn(lineNumber); - if (result > maxColumn) { - return maxColumn; - } - return result; - } - /** - * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) - */ - static nextRenderTabStop(visibleColumn, tabSize) { - return visibleColumn + tabSize - visibleColumn % tabSize; - } - /** - * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) - */ - static nextIndentTabStop(visibleColumn, indentSize) { - return visibleColumn + indentSize - visibleColumn % indentSize; - } - /** - * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) - */ - static prevRenderTabStop(column, tabSize) { - return column - 1 - (column - 1) % tabSize; - } - /** - * ATTENTION: This works with 0-based columns (as oposed to the regular 1-based columns) - */ - static prevIndentTabStop(column, indentSize) { - return column - 1 - (column - 1) % indentSize; - } -} -function isQuote(ch) { - return (ch === '\'' || ch === '"' || ch === '`'); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorDeleteOperations.js ***! - \**********************************************************************************************/ -/*! exports provided: DeleteOperations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteOperations", function() { return DeleteOperations; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorMoveOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class DeleteOperations { - static deleteRight(prevEditOperationType, config, model, selections) { - let commands = []; - let shouldPushStackElementBefore = (prevEditOperationType !== 3 /* DeletingRight */); - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - let deleteSelection = selection; - if (deleteSelection.isEmpty()) { - let position = selection.getPosition(); - let rightOfPosition = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__["MoveOperations"].right(config, model, position.lineNumber, position.column); - deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](rightOfPosition.lineNumber, rightOfPosition.column, position.lineNumber, position.column); - } - if (deleteSelection.isEmpty()) { - // Probably at end of file => ignore - commands[i] = null; - continue; - } - if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) { - shouldPushStackElementBefore = true; - } - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](deleteSelection, ''); - } - return [shouldPushStackElementBefore, commands]; - } - static _isAutoClosingPairDelete(config, model, selections) { - if (config.autoClosingBrackets === 'never' && config.autoClosingQuotes === 'never') { - return false; - } - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - const position = selection.getPosition(); - if (!selection.isEmpty()) { - return false; - } - const lineText = model.getLineContent(position.lineNumber); - const character = lineText[position.column - 2]; - const autoClosingPairCandidates = config.autoClosingPairsOpen2.get(character); - if (!autoClosingPairCandidates) { - return false; - } - if (Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["isQuote"])(character)) { - if (config.autoClosingQuotes === 'never') { - return false; - } - } - else { - if (config.autoClosingBrackets === 'never') { - return false; - } - } - const afterCharacter = lineText[position.column - 1]; - let foundAutoClosingPair = false; - for (const autoClosingPairCandidate of autoClosingPairCandidates) { - if (autoClosingPairCandidate.open === character && autoClosingPairCandidate.close === afterCharacter) { - foundAutoClosingPair = true; - } - } - if (!foundAutoClosingPair) { - return false; - } - } - return true; - } - static _runAutoClosingPairDelete(config, model, selections) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const position = selections[i].getPosition(); - const deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, position.column - 1, position.lineNumber, position.column + 1); - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](deleteSelection, ''); - } - return [true, commands]; - } - static deleteLeft(prevEditOperationType, config, model, selections) { - if (this._isAutoClosingPairDelete(config, model, selections)) { - return this._runAutoClosingPairDelete(config, model, selections); - } - let commands = []; - let shouldPushStackElementBefore = (prevEditOperationType !== 2 /* DeletingLeft */); - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - let deleteSelection = selection; - if (deleteSelection.isEmpty()) { - let position = selection.getPosition(); - if (config.useTabStops && position.column > 1) { - let lineContent = model.getLineContent(position.lineNumber); - let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineContent); - let lastIndentationColumn = (firstNonWhitespaceIndex === -1 - ? /* entire string is whitespace */ lineContent.length + 1 - : firstNonWhitespaceIndex + 1); - if (position.column <= lastIndentationColumn) { - let fromVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["CursorColumns"].visibleColumnFromColumn2(config, model, position); - let toVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["CursorColumns"].prevIndentTabStop(fromVisibleColumn, config.indentSize); - let toColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["CursorColumns"].columnFromVisibleColumn2(config, model, position.lineNumber, toVisibleColumn); - deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, toColumn, position.lineNumber, position.column); - } - else { - deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, position.column - 1, position.lineNumber, position.column); - } - } - else { - let leftOfPosition = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_3__["MoveOperations"].left(config, model, position.lineNumber, position.column); - deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](leftOfPosition.lineNumber, leftOfPosition.column, position.lineNumber, position.column); - } - } - if (deleteSelection.isEmpty()) { - // Probably at beginning of file => ignore - commands[i] = null; - continue; - } - if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) { - shouldPushStackElementBefore = true; - } - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](deleteSelection, ''); - } - return [shouldPushStackElementBefore, commands]; - } - static cut(config, model, selections) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (selection.isEmpty()) { - if (config.emptySelectionClipboard) { - // This is a full line cut - let position = selection.getPosition(); - let startLineNumber, startColumn, endLineNumber, endColumn; - if (position.lineNumber < model.getLineCount()) { - // Cutting a line in the middle of the model - startLineNumber = position.lineNumber; - startColumn = 1; - endLineNumber = position.lineNumber + 1; - endColumn = 1; - } - else if (position.lineNumber > 1) { - // Cutting the last line & there are more than 1 lines in the model - startLineNumber = position.lineNumber - 1; - startColumn = model.getLineMaxColumn(position.lineNumber - 1); - endLineNumber = position.lineNumber; - endColumn = model.getLineMaxColumn(position.lineNumber); - } - else { - // Cutting the single line that the model contains - startLineNumber = position.lineNumber; - startColumn = 1; - endLineNumber = position.lineNumber; - endColumn = model.getLineMaxColumn(position.lineNumber); - } - let deleteSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - if (!deleteSelection.isEmpty()) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](deleteSelection, ''); - } - else { - commands[i] = null; - } - } - else { - // Cannot cut empty selection - commands[i] = null; - } - } - else { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](selection, ''); - } - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["EditOperationResult"](0 /* Other */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js ***! - \******************************************************************************************/ -/*! exports provided: CursorMoveCommands, CursorMove */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorMoveCommands", function() { return CursorMoveCommands; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorMove", function() { return CursorMove; }); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cursorMoveOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js"); -/* harmony import */ var _cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cursorWordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class CursorMoveCommands { - static addCursorDown(viewModel, cursors, useLogicalLine) { - let result = [], resultLen = 0; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[resultLen++] = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"](cursor.modelState, cursor.viewState); - if (useLogicalLine) { - result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].translateDown(viewModel.cursorConfig, viewModel.model, cursor.modelState)); - } - else { - result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].translateDown(viewModel.cursorConfig, viewModel, cursor.viewState)); - } - } - return result; - } - static addCursorUp(viewModel, cursors, useLogicalLine) { - let result = [], resultLen = 0; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[resultLen++] = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"](cursor.modelState, cursor.viewState); - if (useLogicalLine) { - result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].translateUp(viewModel.cursorConfig, viewModel.model, cursor.modelState)); - } - else { - result[resultLen++] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].translateUp(viewModel.cursorConfig, viewModel, cursor.viewState)); - } - } - return result; - } - static moveToBeginningOfLine(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = this._moveToLineStart(viewModel, cursor, inSelectionMode); - } - return result; - } - static _moveToLineStart(viewModel, cursor, inSelectionMode) { - const currentViewStateColumn = cursor.viewState.position.column; - const currentModelStateColumn = cursor.modelState.position.column; - const isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn; - const currentViewStatelineNumber = cursor.viewState.position.lineNumber; - const firstNonBlankColumn = viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber); - const isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn; - if (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) { - return this._moveToLineStartByView(viewModel, cursor, inSelectionMode); - } - else { - return this._moveToLineStartByModel(viewModel, cursor, inSelectionMode); - } - } - static _moveToLineStartByView(viewModel, cursor, inSelectionMode) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToBeginningOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode)); - } - static _moveToLineStartByModel(viewModel, cursor, inSelectionMode) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToBeginningOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)); - } - static moveToEndOfLine(viewModel, cursors, inSelectionMode, sticky) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = this._moveToLineEnd(viewModel, cursor, inSelectionMode, sticky); - } - return result; - } - static _moveToLineEnd(viewModel, cursor, inSelectionMode, sticky) { - const viewStatePosition = cursor.viewState.position; - const viewModelMaxColumn = viewModel.getLineMaxColumn(viewStatePosition.lineNumber); - const isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn; - const modelStatePosition = cursor.modelState.position; - const modelMaxColumn = viewModel.model.getLineMaxColumn(modelStatePosition.lineNumber); - const isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column; - if (isEndOfViewLine || isEndLineOfWrappedLine) { - return this._moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky); - } - else { - return this._moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky); - } - } - static _moveToLineEndByView(viewModel, cursor, inSelectionMode, sticky) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToEndOfLine(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, sticky)); - } - static _moveToLineEndByModel(viewModel, cursor, inSelectionMode, sticky) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToEndOfLine(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, sticky)); - } - static expandLineSelection(viewModel, cursors) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const startLineNumber = cursor.modelState.selection.startLineNumber; - const lineCount = viewModel.model.getLineCount(); - let endLineNumber = cursor.modelState.selection.endLineNumber; - let endColumn; - if (endLineNumber === lineCount) { - endColumn = viewModel.model.getLineMaxColumn(lineCount); - } - else { - endLineNumber++; - endColumn = 1; - } - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startLineNumber, 1, startLineNumber, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](endLineNumber, endColumn), 0)); - } - return result; - } - static moveToBeginningOfBuffer(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToBeginningOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)); - } - return result; - } - static moveToEndOfBuffer(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveToEndOfBuffer(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode)); - } - return result; - } - static selectAll(viewModel, cursor) { - const lineCount = viewModel.model.getLineCount(); - const maxColumn = viewModel.model.getLineMaxColumn(lineCount); - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineCount, maxColumn), 0)); - } - static line(viewModel, cursor, inSelectionMode, _position, _viewPosition) { - const position = viewModel.model.validatePosition(_position); - const viewPosition = (_viewPosition - ? viewModel.coordinatesConverter.validateViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](_viewPosition.lineNumber, _viewPosition.column), position) - : viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)); - if (!inSelectionMode || !cursor.modelState.hasSelection()) { - // Entering line selection for the first time - const lineCount = viewModel.model.getLineCount(); - let selectToLineNumber = position.lineNumber + 1; - let selectToColumn = 1; - if (selectToLineNumber > lineCount) { - selectToLineNumber = lineCount; - selectToColumn = viewModel.model.getLineMaxColumn(selectToLineNumber); - } - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber, 1, selectToLineNumber, selectToColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](selectToLineNumber, selectToColumn), 0)); - } - // Continuing line selection - const enteringLineNumber = cursor.modelState.selectionStart.getStartPosition().lineNumber; - if (position.lineNumber < enteringLineNumber) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), viewPosition.lineNumber, 1, 0)); - } - else if (position.lineNumber > enteringLineNumber) { - const lineCount = viewModel.getLineCount(); - let selectToViewLineNumber = viewPosition.lineNumber + 1; - let selectToViewColumn = 1; - if (selectToViewLineNumber > lineCount) { - selectToViewLineNumber = lineCount; - selectToViewColumn = viewModel.getLineMaxColumn(selectToViewLineNumber); - } - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(cursor.viewState.move(cursor.modelState.hasSelection(), selectToViewLineNumber, selectToViewColumn, 0)); - } - else { - const endPositionOfSelectionStart = cursor.modelState.selectionStart.getEndPosition(); - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(cursor.modelState.move(cursor.modelState.hasSelection(), endPositionOfSelectionStart.lineNumber, endPositionOfSelectionStart.column, 0)); - } - } - static word(viewModel, cursor, inSelectionMode, _position) { - const position = viewModel.model.validatePosition(_position); - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__["WordOperations"].word(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, position)); - } - static cancelSelection(viewModel, cursor) { - if (!cursor.modelState.hasSelection()) { - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"](cursor.modelState, cursor.viewState); - } - const lineNumber = cursor.viewState.position.lineNumber; - const column = cursor.viewState.position.column; - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](lineNumber, column, lineNumber, column), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](lineNumber, column), 0)); - } - static moveTo(viewModel, cursor, inSelectionMode, _position, _viewPosition) { - const position = viewModel.model.validatePosition(_position); - const viewPosition = (_viewPosition - ? viewModel.coordinatesConverter.validateViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](_viewPosition.lineNumber, _viewPosition.column), position) - : viewModel.coordinatesConverter.convertModelPositionToViewPosition(position)); - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(cursor.viewState.move(inSelectionMode, viewPosition.lineNumber, viewPosition.column, 0)); - } - static simpleMove(viewModel, cursors, direction, inSelectionMode, value, unit) { - switch (direction) { - case 0 /* Left */: { - if (unit === 4 /* HalfLine */) { - // Move left by half the current line length - return this._moveHalfLineLeft(viewModel, cursors, inSelectionMode); - } - else { - // Move left by `moveParams.value` columns - return this._moveLeft(viewModel, cursors, inSelectionMode, value); - } - } - case 1 /* Right */: { - if (unit === 4 /* HalfLine */) { - // Move right by half the current line length - return this._moveHalfLineRight(viewModel, cursors, inSelectionMode); - } - else { - // Move right by `moveParams.value` columns - return this._moveRight(viewModel, cursors, inSelectionMode, value); - } - } - case 2 /* Up */: { - if (unit === 2 /* WrappedLine */) { - // Move up by view lines - return this._moveUpByViewLines(viewModel, cursors, inSelectionMode, value); - } - else { - // Move up by model lines - return this._moveUpByModelLines(viewModel, cursors, inSelectionMode, value); - } - } - case 3 /* Down */: { - if (unit === 2 /* WrappedLine */) { - // Move down by view lines - return this._moveDownByViewLines(viewModel, cursors, inSelectionMode, value); - } - else { - // Move down by model lines - return this._moveDownByModelLines(viewModel, cursors, inSelectionMode, value); - } - } - case 4 /* WrappedLineStart */: { - // Move to the beginning of the current view line - return this._moveToViewMinColumn(viewModel, cursors, inSelectionMode); - } - case 5 /* WrappedLineFirstNonWhitespaceCharacter */: { - // Move to the first non-whitespace column of the current view line - return this._moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode); - } - case 6 /* WrappedLineColumnCenter */: { - // Move to the "center" of the current view line - return this._moveToViewCenterColumn(viewModel, cursors, inSelectionMode); - } - case 7 /* WrappedLineEnd */: { - // Move to the end of the current view line - return this._moveToViewMaxColumn(viewModel, cursors, inSelectionMode); - } - case 8 /* WrappedLineLastNonWhitespaceCharacter */: { - // Move to the last non-whitespace column of the current view line - return this._moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode); - } - default: - return null; - } - } - static viewportMove(viewModel, cursors, direction, inSelectionMode, value) { - const visibleViewRange = viewModel.getCompletelyVisibleViewRange(); - const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange); - switch (direction) { - case 9 /* ViewPortTop */: { - // Move to the nth line start in the viewport (from the top) - const modelLineNumber = this._firstLineNumberInRange(viewModel.model, visibleModelRange, value); - const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber); - return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)]; - } - case 11 /* ViewPortBottom */: { - // Move to the nth line start in the viewport (from the bottom) - const modelLineNumber = this._lastLineNumberInRange(viewModel.model, visibleModelRange, value); - const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber); - return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)]; - } - case 10 /* ViewPortCenter */: { - // Move to the line start in the viewport center - const modelLineNumber = Math.round((visibleModelRange.startLineNumber + visibleModelRange.endLineNumber) / 2); - const modelColumn = viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber); - return [this._moveToModelPosition(viewModel, cursors[0], inSelectionMode, modelLineNumber, modelColumn)]; - } - case 12 /* ViewPortIfOutside */: { - // Move to a position inside the viewport - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = this.findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode); - } - return result; - } - default: - return null; - } - } - static findPositionInViewportIfOutside(viewModel, cursor, visibleViewRange, inSelectionMode) { - let viewLineNumber = cursor.viewState.position.lineNumber; - if (visibleViewRange.startLineNumber <= viewLineNumber && viewLineNumber <= visibleViewRange.endLineNumber - 1) { - // Nothing to do, cursor is in viewport - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"](cursor.modelState, cursor.viewState); - } - else { - if (viewLineNumber > visibleViewRange.endLineNumber - 1) { - viewLineNumber = visibleViewRange.endLineNumber - 1; - } - if (viewLineNumber < visibleViewRange.startLineNumber) { - viewLineNumber = visibleViewRange.startLineNumber; - } - const viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber); - return this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - } - /** - * Find the nth line start included in the range (from the start). - */ - static _firstLineNumberInRange(model, range, count) { - let startLineNumber = range.startLineNumber; - if (range.startColumn !== model.getLineMinColumn(startLineNumber)) { - // Move on to the second line if the first line start is not included in the range - startLineNumber++; - } - return Math.min(range.endLineNumber, startLineNumber + count - 1); - } - /** - * Find the nth line start included in the range (from the end). - */ - static _lastLineNumberInRange(model, range, count) { - let startLineNumber = range.startLineNumber; - if (range.startColumn !== model.getLineMinColumn(startLineNumber)) { - // Move on to the second line if the first line start is not included in the range - startLineNumber++; - } - return Math.max(startLineNumber, range.endLineNumber - count + 1); - } - static _moveLeft(viewModel, cursors, inSelectionMode, noOfColumns) { - const hasMultipleCursors = (cursors.length > 1); - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const skipWrappingPointStop = hasMultipleCursors || !cursor.viewState.hasSelection(); - let newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns); - if (skipWrappingPointStop && noOfColumns === 1 && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) { - // moved over to the previous view line - const newViewModelPosition = viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position); - if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) { - // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position - newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveLeft(viewModel.cursorConfig, viewModel, newViewState, inSelectionMode, 1); - } - } - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(newViewState); - } - return result; - } - static _moveHalfLineLeft(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const halfLine = Math.round(viewModel.getLineContent(viewLineNumber).length / 2); - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveLeft(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine)); - } - return result; - } - static _moveRight(viewModel, cursors, inSelectionMode, noOfColumns) { - const hasMultipleCursors = (cursors.length > 1); - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const skipWrappingPointStop = hasMultipleCursors || !cursor.viewState.hasSelection(); - let newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, noOfColumns); - if (skipWrappingPointStop && noOfColumns === 1 && newViewState.position.lineNumber !== cursor.viewState.position.lineNumber) { - // moved over to the next view line - const newViewModelPosition = viewModel.coordinatesConverter.convertViewPositionToModelPosition(newViewState.position); - if (newViewModelPosition.lineNumber === cursor.modelState.position.lineNumber) { - // stayed on the same model line => pass wrapping point where 2 view positions map to a single model position - newViewState = _cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveRight(viewModel.cursorConfig, viewModel, newViewState, inSelectionMode, 1); - } - } - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(newViewState); - } - return result; - } - static _moveHalfLineRight(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const halfLine = Math.round(viewModel.getLineContent(viewLineNumber).length / 2); - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveRight(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, halfLine)); - } - return result; - } - static _moveDownByViewLines(viewModel, cursors, inSelectionMode, linesCount) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveDown(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount)); - } - return result; - } - static _moveDownByModelLines(viewModel, cursors, inSelectionMode, linesCount) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveDown(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount)); - } - return result; - } - static _moveUpByViewLines(viewModel, cursors, inSelectionMode, linesCount) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveUp(viewModel.cursorConfig, viewModel, cursor.viewState, inSelectionMode, linesCount)); - } - return result; - } - static _moveUpByModelLines(viewModel, cursors, inSelectionMode, linesCount) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - result[i] = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_2__["MoveOperations"].moveUp(viewModel.cursorConfig, viewModel.model, cursor.modelState, inSelectionMode, linesCount)); - } - return result; - } - static _moveToViewPosition(viewModel, cursor, inSelectionMode, toViewLineNumber, toViewColumn) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromViewState(cursor.viewState.move(inSelectionMode, toViewLineNumber, toViewColumn, 0)); - } - static _moveToModelPosition(viewModel, cursor, inSelectionMode, toModelLineNumber, toModelColumn) { - return _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["CursorState"].fromModelState(cursor.modelState.move(inSelectionMode, toModelLineNumber, toModelColumn, 0)); - } - static _moveToViewMinColumn(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const viewColumn = viewModel.getLineMinColumn(viewLineNumber); - result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - return result; - } - static _moveToViewFirstNonWhitespaceColumn(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const viewColumn = viewModel.getLineFirstNonWhitespaceColumn(viewLineNumber); - result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - return result; - } - static _moveToViewCenterColumn(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const viewColumn = Math.round((viewModel.getLineMaxColumn(viewLineNumber) + viewModel.getLineMinColumn(viewLineNumber)) / 2); - result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - return result; - } - static _moveToViewMaxColumn(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const viewColumn = viewModel.getLineMaxColumn(viewLineNumber); - result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - return result; - } - static _moveToViewLastNonWhitespaceColumn(viewModel, cursors, inSelectionMode) { - let result = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const viewLineNumber = cursor.viewState.position.lineNumber; - const viewColumn = viewModel.getLineLastNonWhitespaceColumn(viewLineNumber); - result[i] = this._moveToViewPosition(viewModel, cursor, inSelectionMode, viewLineNumber, viewColumn); - } - return result; - } -} -var CursorMove; -(function (CursorMove) { - const isCursorMoveArgs = function (arg) { - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"](arg)) { - return false; - } - let cursorMoveArg = arg; - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isString"](cursorMoveArg.to)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isUndefined"](cursorMoveArg.select) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isBoolean"](cursorMoveArg.select)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isUndefined"](cursorMoveArg.by) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isString"](cursorMoveArg.by)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isUndefined"](cursorMoveArg.value) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isNumber"](cursorMoveArg.value)) { - return false; - } - return true; - }; - CursorMove.description = { - description: 'Move cursor to a logical position in the view', - args: [ - { - name: 'Cursor move argument object', - description: `Property-value pairs that can be passed through this argument: - * 'to': A mandatory logical position value providing where to move the cursor. - \`\`\` - 'left', 'right', 'up', 'down' - 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' - 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' - 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' - \`\`\` - * 'by': Unit to move. Default is computed based on 'to' value. - \`\`\` - 'line', 'wrappedLine', 'character', 'halfLine' - \`\`\` - * 'value': Number of units to move. Default is '1'. - * 'select': If 'true' makes the selection. Default is 'false'. - `, - constraint: isCursorMoveArgs, - schema: { - 'type': 'object', - 'required': ['to'], - 'properties': { - 'to': { - 'type': 'string', - 'enum': ['left', 'right', 'up', 'down', 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter', 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter', 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'] - }, - 'by': { - 'type': 'string', - 'enum': ['line', 'wrappedLine', 'character', 'halfLine'] - }, - 'value': { - 'type': 'number', - 'default': 1 - }, - 'select': { - 'type': 'boolean', - 'default': false - } - } - } - } - ] - }; - /** - * Positions in the view for cursor move command. - */ - CursorMove.RawDirection = { - Left: 'left', - Right: 'right', - Up: 'up', - Down: 'down', - WrappedLineStart: 'wrappedLineStart', - WrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter', - WrappedLineColumnCenter: 'wrappedLineColumnCenter', - WrappedLineEnd: 'wrappedLineEnd', - WrappedLineLastNonWhitespaceCharacter: 'wrappedLineLastNonWhitespaceCharacter', - ViewPortTop: 'viewPortTop', - ViewPortCenter: 'viewPortCenter', - ViewPortBottom: 'viewPortBottom', - ViewPortIfOutside: 'viewPortIfOutside' - }; - /** - * Units for Cursor move 'by' argument - */ - CursorMove.RawUnit = { - Line: 'line', - WrappedLine: 'wrappedLine', - Character: 'character', - HalfLine: 'halfLine' - }; - function parse(args) { - if (!args.to) { - // illegal arguments - return null; - } - let direction; - switch (args.to) { - case CursorMove.RawDirection.Left: - direction = 0 /* Left */; - break; - case CursorMove.RawDirection.Right: - direction = 1 /* Right */; - break; - case CursorMove.RawDirection.Up: - direction = 2 /* Up */; - break; - case CursorMove.RawDirection.Down: - direction = 3 /* Down */; - break; - case CursorMove.RawDirection.WrappedLineStart: - direction = 4 /* WrappedLineStart */; - break; - case CursorMove.RawDirection.WrappedLineFirstNonWhitespaceCharacter: - direction = 5 /* WrappedLineFirstNonWhitespaceCharacter */; - break; - case CursorMove.RawDirection.WrappedLineColumnCenter: - direction = 6 /* WrappedLineColumnCenter */; - break; - case CursorMove.RawDirection.WrappedLineEnd: - direction = 7 /* WrappedLineEnd */; - break; - case CursorMove.RawDirection.WrappedLineLastNonWhitespaceCharacter: - direction = 8 /* WrappedLineLastNonWhitespaceCharacter */; - break; - case CursorMove.RawDirection.ViewPortTop: - direction = 9 /* ViewPortTop */; - break; - case CursorMove.RawDirection.ViewPortBottom: - direction = 11 /* ViewPortBottom */; - break; - case CursorMove.RawDirection.ViewPortCenter: - direction = 10 /* ViewPortCenter */; - break; - case CursorMove.RawDirection.ViewPortIfOutside: - direction = 12 /* ViewPortIfOutside */; - break; - default: - // illegal arguments - return null; - } - let unit = 0 /* None */; - switch (args.by) { - case CursorMove.RawUnit.Line: - unit = 1 /* Line */; - break; - case CursorMove.RawUnit.WrappedLine: - unit = 2 /* WrappedLine */; - break; - case CursorMove.RawUnit.Character: - unit = 3 /* Character */; - break; - case CursorMove.RawUnit.HalfLine: - unit = 4 /* HalfLine */; - break; - } - return { - direction: direction, - unit: unit, - select: (!!args.select), - value: (args.value || 1) - }; - } - CursorMove.parse = parse; -})(CursorMove || (CursorMove = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js ***! - \********************************************************************************************/ -/*! exports provided: CursorPosition, MoveOperations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorPosition", function() { return CursorPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveOperations", function() { return MoveOperations; }); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class CursorPosition { - constructor(lineNumber, column, leftoverVisibleColumns) { - this.lineNumber = lineNumber; - this.column = column; - this.leftoverVisibleColumns = leftoverVisibleColumns; - } -} -class MoveOperations { - static leftPosition(model, lineNumber, column) { - if (column > model.getLineMinColumn(lineNumber)) { - column = column - _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["prevCharLength"](model.getLineContent(lineNumber), column - 1); - } - else if (lineNumber > 1) { - lineNumber = lineNumber - 1; - column = model.getLineMaxColumn(lineNumber); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, column); - } - static left(config, model, lineNumber, column) { - const pos = MoveOperations.leftPosition(model, lineNumber, column); - return new CursorPosition(pos.lineNumber, pos.column, 0); - } - static moveLeft(config, model, cursor, inSelectionMode, noOfColumns) { - let lineNumber, column; - if (cursor.hasSelection() && !inSelectionMode) { - // If we are in selection mode, move left without selection cancels selection and puts cursor at the beginning of the selection - lineNumber = cursor.selection.startLineNumber; - column = cursor.selection.startColumn; - } - else { - let r = MoveOperations.left(config, model, cursor.position.lineNumber, cursor.position.column - (noOfColumns - 1)); - lineNumber = r.lineNumber; - column = r.column; - } - return cursor.move(inSelectionMode, lineNumber, column, 0); - } - static rightPosition(model, lineNumber, column) { - if (column < model.getLineMaxColumn(lineNumber)) { - column = column + _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["nextCharLength"](model.getLineContent(lineNumber), column - 1); - } - else if (lineNumber < model.getLineCount()) { - lineNumber = lineNumber + 1; - column = model.getLineMinColumn(lineNumber); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineNumber, column); - } - static right(config, model, lineNumber, column) { - const pos = MoveOperations.rightPosition(model, lineNumber, column); - return new CursorPosition(pos.lineNumber, pos.column, 0); - } - static moveRight(config, model, cursor, inSelectionMode, noOfColumns) { - let lineNumber, column; - if (cursor.hasSelection() && !inSelectionMode) { - // If we are in selection mode, move right without selection cancels selection and puts cursor at the end of the selection - lineNumber = cursor.selection.endLineNumber; - column = cursor.selection.endColumn; - } - else { - let r = MoveOperations.right(config, model, cursor.position.lineNumber, cursor.position.column + (noOfColumns - 1)); - lineNumber = r.lineNumber; - column = r.column; - } - return cursor.move(inSelectionMode, lineNumber, column, 0); - } - static down(config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnLastLine) { - const currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns; - const lineCount = model.getLineCount(); - const wasOnLastPosition = (lineNumber === lineCount && column === model.getLineMaxColumn(lineNumber)); - lineNumber = lineNumber + count; - if (lineNumber > lineCount) { - lineNumber = lineCount; - if (allowMoveOnLastLine) { - column = model.getLineMaxColumn(lineNumber); - } - else { - column = Math.min(model.getLineMaxColumn(lineNumber), column); - } - } - else { - column = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn); - } - if (wasOnLastPosition) { - leftoverVisibleColumns = 0; - } - else { - leftoverVisibleColumns = currentVisibleColumn - _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize); - } - return new CursorPosition(lineNumber, column, leftoverVisibleColumns); - } - static moveDown(config, model, cursor, inSelectionMode, linesCount) { - let lineNumber, column; - if (cursor.hasSelection() && !inSelectionMode) { - // If we are in selection mode, move down acts relative to the end of selection - lineNumber = cursor.selection.endLineNumber; - column = cursor.selection.endColumn; - } - else { - lineNumber = cursor.position.lineNumber; - column = cursor.position.column; - } - let r = MoveOperations.down(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true); - return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns); - } - static translateDown(config, model, cursor) { - let selection = cursor.selection; - let selectionStart = MoveOperations.down(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false); - let position = MoveOperations.down(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false); - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](position.lineNumber, position.column), position.leftoverVisibleColumns); - } - static up(config, model, lineNumber, column, leftoverVisibleColumns, count, allowMoveOnFirstLine) { - const currentVisibleColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize) + leftoverVisibleColumns; - const wasOnFirstPosition = (lineNumber === 1 && column === 1); - lineNumber = lineNumber - count; - if (lineNumber < 1) { - lineNumber = 1; - if (allowMoveOnFirstLine) { - column = model.getLineMinColumn(lineNumber); - } - else { - column = Math.min(model.getLineMaxColumn(lineNumber), column); - } - } - else { - column = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].columnFromVisibleColumn2(config, model, lineNumber, currentVisibleColumn); - } - if (wasOnFirstPosition) { - leftoverVisibleColumns = 0; - } - else { - leftoverVisibleColumns = currentVisibleColumn - _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorColumns"].visibleColumnFromColumn(model.getLineContent(lineNumber), column, config.tabSize); - } - return new CursorPosition(lineNumber, column, leftoverVisibleColumns); - } - static moveUp(config, model, cursor, inSelectionMode, linesCount) { - let lineNumber, column; - if (cursor.hasSelection() && !inSelectionMode) { - // If we are in selection mode, move up acts relative to the beginning of selection - lineNumber = cursor.selection.startLineNumber; - column = cursor.selection.startColumn; - } - else { - lineNumber = cursor.position.lineNumber; - column = cursor.position.column; - } - let r = MoveOperations.up(config, model, lineNumber, column, cursor.leftoverVisibleColumns, linesCount, true); - return cursor.move(inSelectionMode, r.lineNumber, r.column, r.leftoverVisibleColumns); - } - static translateUp(config, model, cursor) { - let selection = cursor.selection; - let selectionStart = MoveOperations.up(config, model, selection.selectionStartLineNumber, selection.selectionStartColumn, cursor.selectionStartLeftoverVisibleColumns, 1, false); - let position = MoveOperations.up(config, model, selection.positionLineNumber, selection.positionColumn, cursor.leftoverVisibleColumns, 1, false); - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](selectionStart.lineNumber, selectionStart.column, selectionStart.lineNumber, selectionStart.column), selectionStart.leftoverVisibleColumns, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](position.lineNumber, position.column), position.leftoverVisibleColumns); - } - static moveToBeginningOfLine(config, model, cursor, inSelectionMode) { - let lineNumber = cursor.position.lineNumber; - let minColumn = model.getLineMinColumn(lineNumber); - let firstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(lineNumber) || minColumn; - let column; - let relevantColumnNumber = cursor.position.column; - if (relevantColumnNumber === firstNonBlankColumn) { - column = minColumn; - } - else { - column = firstNonBlankColumn; - } - return cursor.move(inSelectionMode, lineNumber, column, 0); - } - static moveToEndOfLine(config, model, cursor, inSelectionMode, sticky) { - let lineNumber = cursor.position.lineNumber; - let maxColumn = model.getLineMaxColumn(lineNumber); - return cursor.move(inSelectionMode, lineNumber, maxColumn, sticky ? 1073741824 /* MAX_SAFE_SMALL_INTEGER */ - maxColumn : 0); - } - static moveToBeginningOfBuffer(config, model, cursor, inSelectionMode) { - return cursor.move(inSelectionMode, 1, 1, 0); - } - static moveToEndOfBuffer(config, model, cursor, inSelectionMode) { - let lastLineNumber = model.getLineCount(); - let lastColumn = model.getLineMaxColumn(lastLineNumber); - return cursor.move(inSelectionMode, lastLineNumber, lastColumn, 0); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js ***! - \********************************************************************************************/ -/*! exports provided: TypeOperations, TypeWithAutoClosingCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TypeOperations", function() { return TypeOperations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TypeWithAutoClosingCommand", function() { return TypeWithAutoClosingCommand; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../commands/shiftCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js"); -/* harmony import */ var _commands_surroundSelectionCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../commands/surroundSelectionCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js"); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./wordCharacterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modes/languageConfiguration.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js"); -/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -class TypeOperations { - static indent(config, model, selections) { - if (model === null || selections === null) { - return []; - } - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__["ShiftCommand"](selections[i], { - isUnshift: false, - tabSize: config.tabSize, - indentSize: config.indentSize, - insertSpaces: config.insertSpaces, - useTabStops: config.useTabStops, - autoIndent: config.autoIndent - }); - } - return commands; - } - static outdent(config, model, selections) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__["ShiftCommand"](selections[i], { - isUnshift: true, - tabSize: config.tabSize, - indentSize: config.indentSize, - insertSpaces: config.insertSpaces, - useTabStops: config.useTabStops, - autoIndent: config.autoIndent - }); - } - return commands; - } - static shiftIndent(config, indentation, count) { - count = count || 1; - return _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__["ShiftCommand"].shiftIndent(indentation, indentation.length + count, config.tabSize, config.indentSize, config.insertSpaces); - } - static unshiftIndent(config, indentation, count) { - count = count || 1; - return _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__["ShiftCommand"].unshiftIndent(indentation, indentation.length + count, config.tabSize, config.indentSize, config.insertSpaces); - } - static _distributedPaste(config, model, selections, text) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selections[i], text[i]); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](0 /* Other */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); - } - static _simplePaste(config, model, selections, text, pasteOnNewLine) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - let position = selection.getPosition(); - if (pasteOnNewLine && !selection.isEmpty()) { - pasteOnNewLine = false; - } - if (pasteOnNewLine && text.indexOf('\n') !== text.length - 1) { - pasteOnNewLine = false; - } - if (pasteOnNewLine) { - // Paste entire line at the beginning of line - let typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](position.lineNumber, 1, position.lineNumber, 1); - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandThatPreservesSelection"](typeSelection, text, selection, true); - } - else { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selection, text); - } - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](0 /* Other */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); - } - static _distributePasteToCursors(config, selections, text, pasteOnNewLine, multicursorText) { - if (pasteOnNewLine) { - return null; - } - if (selections.length === 1) { - return null; - } - if (multicursorText && multicursorText.length === selections.length) { - return multicursorText; - } - if (config.multiCursorPaste === 'spread') { - // Try to spread the pasted text in case the line count matches the cursor count - // Remove trailing \n if present - if (text.charCodeAt(text.length - 1) === 10 /* LineFeed */) { - text = text.substr(0, text.length - 1); - } - // Remove trailing \r if present - if (text.charCodeAt(text.length - 1) === 13 /* CarriageReturn */) { - text = text.substr(0, text.length - 1); - } - let lines = text.split(/\r\n|\r|\n/); - if (lines.length === selections.length) { - return lines; - } - } - return null; - } - static paste(config, model, selections, text, pasteOnNewLine, multicursorText) { - const distributedPaste = this._distributePasteToCursors(config, selections, text, pasteOnNewLine, multicursorText); - if (distributedPaste) { - selections = selections.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].compareRangesUsingStarts); - return this._distributedPaste(config, model, selections, distributedPaste); - } - else { - return this._simplePaste(config, model, selections, text, pasteOnNewLine); - } - } - static _goodIndentForLine(config, model, lineNumber) { - let action = null; - let indentation = ''; - const expectedIndentAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getInheritIndentForLine(config.autoIndent, model, lineNumber, false); - if (expectedIndentAction) { - action = expectedIndentAction.action; - indentation = expectedIndentAction.indentation; - } - else if (lineNumber > 1) { - let lastLineNumber; - for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { - const lineText = model.getLineContent(lastLineNumber); - const nonWhitespaceIdx = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["lastNonWhitespaceIndex"](lineText); - if (nonWhitespaceIdx >= 0) { - break; - } - } - if (lastLineNumber < 1) { - // No previous line with content found - return null; - } - const maxColumn = model.getLineMaxColumn(lastLineNumber); - const expectedEnterAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getEnterAction(config.autoIndent, model, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](lastLineNumber, maxColumn, lastLineNumber, maxColumn)); - if (expectedEnterAction) { - indentation = expectedEnterAction.indentation + expectedEnterAction.appendText; - } - } - if (action) { - if (action === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].Indent) { - indentation = TypeOperations.shiftIndent(config, indentation); - } - if (action === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].Outdent) { - indentation = TypeOperations.unshiftIndent(config, indentation); - } - indentation = config.normalizeIndentation(indentation); - } - if (!indentation) { - return null; - } - return indentation; - } - static _replaceJumpToNextIndent(config, model, selection, insertsAutoWhitespace) { - let typeText = ''; - let position = selection.getStartPosition(); - if (config.insertSpaces) { - let visibleColumnFromColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorColumns"].visibleColumnFromColumn2(config, model, position); - let indentSize = config.indentSize; - let spacesCnt = indentSize - (visibleColumnFromColumn % indentSize); - for (let i = 0; i < spacesCnt; i++) { - typeText += ' '; - } - } - else { - typeText = '\t'; - } - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selection, typeText, insertsAutoWhitespace); - } - static tab(config, model, selections) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (selection.isEmpty()) { - let lineText = model.getLineContent(selection.startLineNumber); - if (/^\s*$/.test(lineText) && model.isCheapToTokenize(selection.startLineNumber)) { - let goodIndent = this._goodIndentForLine(config, model, selection.startLineNumber); - goodIndent = goodIndent || '\t'; - let possibleTypeText = config.normalizeIndentation(goodIndent); - if (!_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["startsWith"](lineText, possibleTypeText)) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText, true); - continue; - } - } - commands[i] = this._replaceJumpToNextIndent(config, model, selection, true); - } - else { - if (selection.startLineNumber === selection.endLineNumber) { - let lineMaxColumn = model.getLineMaxColumn(selection.startLineNumber); - if (selection.startColumn !== 1 || selection.endColumn !== lineMaxColumn) { - // This is a single line selection that is not the entire line - commands[i] = this._replaceJumpToNextIndent(config, model, selection, false); - continue; - } - } - commands[i] = new _commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_3__["ShiftCommand"](selection, { - isUnshift: false, - tabSize: config.tabSize, - indentSize: config.indentSize, - insertSpaces: config.insertSpaces, - useTabStops: config.useTabStops, - autoIndent: config.autoIndent - }); - } - } - return commands; - } - static replacePreviousChar(prevEditOperationType, config, model, selections, txt, replaceCharCnt) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (!selection.isEmpty()) { - // looks like https://github.com/Microsoft/vscode/issues/2773 - // where a cursor operation occurred before a canceled composition - // => ignore composition - commands[i] = null; - continue; - } - const pos = selection.getPosition(); - const startColumn = Math.max(1, pos.column - replaceCharCnt); - const range = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](pos.lineNumber, startColumn, pos.lineNumber, pos.column); - const oldText = model.getValueInRange(range); - if (oldText === txt) { - // => ignore composition that doesn't do anything - commands[i] = null; - continue; - } - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](range, txt); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */), - shouldPushStackElementAfter: false - }); - } - static _typeCommand(range, text, keepPosition) { - if (keepPosition) { - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithoutChangingPosition"](range, text, true); - } - else { - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](range, text, true); - } - } - static _enter(config, model, keepPosition, range) { - if (config.autoIndent === 0 /* None */) { - return TypeOperations._typeCommand(range, '\n', keepPosition); - } - if (!model.isCheapToTokenize(range.getStartPosition().lineNumber) || config.autoIndent === 1 /* Keep */) { - let lineText = model.getLineContent(range.startLineNumber); - let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getLeadingWhitespace"](lineText).substring(0, range.startColumn - 1); - return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation), keepPosition); - } - const r = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getEnterAction(config.autoIndent, model, range); - if (r) { - if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].None) { - // Nothing special - return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(r.indentation + r.appendText), keepPosition); - } - else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].Indent) { - // Indent once - return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(r.indentation + r.appendText), keepPosition); - } - else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].IndentOutdent) { - // Ultra special - const normalIndent = config.normalizeIndentation(r.indentation); - const increasedIndent = config.normalizeIndentation(r.indentation + r.appendText); - const typeText = '\n' + increasedIndent + '\n' + normalIndent; - if (keepPosition) { - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithoutChangingPosition"](range, typeText, true); - } - else { - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithOffsetCursorState"](range, typeText, -1, increasedIndent.length - normalIndent.length, true); - } - } - else if (r.indentAction === _modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_9__["IndentAction"].Outdent) { - const actualIndentation = TypeOperations.unshiftIndent(config, r.indentation); - return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(actualIndentation + r.appendText), keepPosition); - } - } - const lineText = model.getLineContent(range.startLineNumber); - const indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getLeadingWhitespace"](lineText).substring(0, range.startColumn - 1); - if (config.autoIndent >= 4 /* Full */) { - const ir = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getIndentForEnter(config.autoIndent, model, range, { - unshiftIndent: (indent) => { - return TypeOperations.unshiftIndent(config, indent); - }, - shiftIndent: (indent) => { - return TypeOperations.shiftIndent(config, indent); - }, - normalizeIndentation: (indent) => { - return config.normalizeIndentation(indent); - } - }); - if (ir) { - let oldEndViewColumn = _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["CursorColumns"].visibleColumnFromColumn2(config, model, range.getEndPosition()); - const oldEndColumn = range.endColumn; - let beforeText = '\n'; - if (indentation !== config.normalizeIndentation(ir.beforeEnter)) { - beforeText = config.normalizeIndentation(ir.beforeEnter) + lineText.substring(indentation.length, range.startColumn - 1) + '\n'; - range = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, 1, range.endLineNumber, range.endColumn); - } - const newLineContent = model.getLineContent(range.endLineNumber); - const firstNonWhitespace = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["firstNonWhitespaceIndex"](newLineContent); - if (firstNonWhitespace >= 0) { - range = range.setEndPosition(range.endLineNumber, Math.max(range.endColumn, firstNonWhitespace + 1)); - } - else { - range = range.setEndPosition(range.endLineNumber, model.getLineMaxColumn(range.endLineNumber)); - } - if (keepPosition) { - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithoutChangingPosition"](range, beforeText + config.normalizeIndentation(ir.afterEnter), true); - } - else { - let offset = 0; - if (oldEndColumn <= firstNonWhitespace + 1) { - if (!config.insertSpaces) { - oldEndViewColumn = Math.ceil(oldEndViewColumn / config.indentSize); - } - offset = Math.min(oldEndViewColumn + 1 - config.normalizeIndentation(ir.afterEnter).length - 1, 0); - } - return new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithOffsetCursorState"](range, beforeText + config.normalizeIndentation(ir.afterEnter), 0, offset, true); - } - } - } - return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation), keepPosition); - } - static _isAutoIndentType(config, model, selections) { - if (config.autoIndent < 4 /* Full */) { - return false; - } - for (let i = 0, len = selections.length; i < len; i++) { - if (!model.isCheapToTokenize(selections[i].getEndPosition().lineNumber)) { - return false; - } - } - return true; - } - static _runAutoIndentType(config, model, range, ch) { - const currentIndentation = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getIndentationAtPosition(model, range.startLineNumber, range.startColumn); - const actualIndentation = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getIndentActionForType(config.autoIndent, model, range, ch, { - shiftIndent: (indentation) => { - return TypeOperations.shiftIndent(config, indentation); - }, - unshiftIndent: (indentation) => { - return TypeOperations.unshiftIndent(config, indentation); - }, - }); - if (actualIndentation === null) { - return null; - } - if (actualIndentation !== config.normalizeIndentation(currentIndentation)) { - const firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(range.startLineNumber); - if (firstNonWhitespace === 0) { - return TypeOperations._typeCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, 0, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) + ch, false); - } - else { - return TypeOperations._typeCommand(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, 0, range.endLineNumber, range.endColumn), config.normalizeIndentation(actualIndentation) + - model.getLineContent(range.startLineNumber).substring(firstNonWhitespace - 1, range.startColumn - 1) + ch, false); - } - } - return null; - } - static _isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch) { - if (config.autoClosingOvertype === 'never') { - return false; - } - if (!config.autoClosingPairsClose2.has(ch)) { - return false; - } - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (!selection.isEmpty()) { - return false; - } - const position = selection.getPosition(); - const lineText = model.getLineContent(position.lineNumber); - const afterCharacter = lineText.charAt(position.column - 1); - if (afterCharacter !== ch) { - return false; - } - // Do not over-type quotes after a backslash - const chIsQuote = Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isQuote"])(ch); - const beforeCharacter = position.column > 2 ? lineText.charCodeAt(position.column - 2) : 0 /* Null */; - if (beforeCharacter === 92 /* Backslash */ && chIsQuote) { - return false; - } - // Must over-type a closing character typed by the editor - if (config.autoClosingOvertype === 'auto') { - let found = false; - for (let j = 0, lenJ = autoClosedCharacters.length; j < lenJ; j++) { - const autoClosedCharacter = autoClosedCharacters[j]; - if (position.lineNumber === autoClosedCharacter.startLineNumber && position.column === autoClosedCharacter.startColumn) { - found = true; - break; - } - } - if (!found) { - return false; - } - } - } - return true; - } - static _runAutoClosingOvertype(prevEditOperationType, config, model, selections, ch) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - const position = selection.getPosition(); - const typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](position.lineNumber, position.column, position.lineNumber, position.column + 1); - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](typeSelection, ch); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */), - shouldPushStackElementAfter: false - }); - } - static _autoClosingPairIsSymmetric(autoClosingPair) { - const { open, close } = autoClosingPair; - return (open.indexOf(close) >= 0 || close.indexOf(open) >= 0); - } - static _isBeforeClosingBrace(config, autoClosingPair, characterAfter) { - const otherAutoClosingPairs = config.autoClosingPairsClose2.get(characterAfter); - if (!otherAutoClosingPairs) { - return false; - } - const thisBraceIsSymmetric = TypeOperations._autoClosingPairIsSymmetric(autoClosingPair); - for (const otherAutoClosingPair of otherAutoClosingPairs) { - const otherBraceIsSymmetric = TypeOperations._autoClosingPairIsSymmetric(otherAutoClosingPair); - if (!thisBraceIsSymmetric && otherBraceIsSymmetric) { - continue; - } - return true; - } - return false; - } - static _findAutoClosingPairOpen(config, model, positions, ch) { - const autoClosingPairCandidates = config.autoClosingPairsOpen2.get(ch); - if (!autoClosingPairCandidates) { - return null; - } - // Determine which auto-closing pair it is - let autoClosingPair = null; - for (const autoClosingPairCandidate of autoClosingPairCandidates) { - if (autoClosingPair === null || autoClosingPairCandidate.open.length > autoClosingPair.open.length) { - let candidateIsMatch = true; - for (const position of positions) { - const relevantText = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](position.lineNumber, position.column - autoClosingPairCandidate.open.length + 1, position.lineNumber, position.column)); - if (relevantText + ch !== autoClosingPairCandidate.open) { - candidateIsMatch = false; - break; - } - } - if (candidateIsMatch) { - autoClosingPair = autoClosingPairCandidate; - } - } - } - return autoClosingPair; - } - static _isAutoClosingOpenCharType(config, model, selections, ch, insertOpenCharacter) { - const chIsQuote = Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isQuote"])(ch); - const autoCloseConfig = chIsQuote ? config.autoClosingQuotes : config.autoClosingBrackets; - if (autoCloseConfig === 'never') { - return null; - } - const autoClosingPair = this._findAutoClosingPairOpen(config, model, selections.map(s => s.getPosition()), ch); - if (!autoClosingPair) { - return null; - } - const shouldAutoCloseBefore = chIsQuote ? config.shouldAutoCloseBefore.quote : config.shouldAutoCloseBefore.bracket; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (!selection.isEmpty()) { - return null; - } - const position = selection.getPosition(); - const lineText = model.getLineContent(position.lineNumber); - // Only consider auto closing the pair if a space follows or if another autoclosed pair follows - if (lineText.length > position.column - 1) { - const characterAfter = lineText.charAt(position.column - 1); - const isBeforeCloseBrace = TypeOperations._isBeforeClosingBrace(config, autoClosingPair, characterAfter); - if (!isBeforeCloseBrace && !shouldAutoCloseBefore(characterAfter)) { - return null; - } - } - if (!model.isCheapToTokenize(position.lineNumber)) { - // Do not force tokenization - return null; - } - // Do not auto-close ' or " after a word character - if (autoClosingPair.open.length === 1 && chIsQuote && autoCloseConfig !== 'always') { - const wordSeparators = Object(_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_6__["getMapForWordSeparators"])(config.wordSeparators); - if (insertOpenCharacter && position.column > 1 && wordSeparators.get(lineText.charCodeAt(position.column - 2)) === 0 /* Regular */) { - return null; - } - if (!insertOpenCharacter && position.column > 2 && wordSeparators.get(lineText.charCodeAt(position.column - 3)) === 0 /* Regular */) { - return null; - } - } - model.forceTokenization(position.lineNumber); - const lineTokens = model.getLineTokens(position.lineNumber); - let shouldAutoClosePair = false; - try { - shouldAutoClosePair = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].shouldAutoClosePair(autoClosingPair, lineTokens, insertOpenCharacter ? position.column : position.column - 1); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - } - if (!shouldAutoClosePair) { - return null; - } - } - return autoClosingPair; - } - static _runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, insertOpenCharacter, autoClosingPair) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - commands[i] = new TypeWithAutoClosingCommand(selection, ch, insertOpenCharacter, autoClosingPair.close); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false - }); - } - static _shouldSurroundChar(config, ch) { - if (Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isQuote"])(ch)) { - return (config.autoSurround === 'quotes' || config.autoSurround === 'languageDefined'); - } - else { - // Character is a bracket - return (config.autoSurround === 'brackets' || config.autoSurround === 'languageDefined'); - } - } - static _isSurroundSelectionType(config, model, selections, ch) { - if (!TypeOperations._shouldSurroundChar(config, ch) || !config.surroundingPairs.hasOwnProperty(ch)) { - return false; - } - const isTypingAQuoteCharacter = Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isQuote"])(ch); - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - if (selection.isEmpty()) { - return false; - } - let selectionContainsOnlyWhitespace = true; - for (let lineNumber = selection.startLineNumber; lineNumber <= selection.endLineNumber; lineNumber++) { - const lineText = model.getLineContent(lineNumber); - const startIndex = (lineNumber === selection.startLineNumber ? selection.startColumn - 1 : 0); - const endIndex = (lineNumber === selection.endLineNumber ? selection.endColumn - 1 : lineText.length); - const selectedText = lineText.substring(startIndex, endIndex); - if (/[^ \t]/.test(selectedText)) { - // this selected text contains something other than whitespace - selectionContainsOnlyWhitespace = false; - break; - } - } - if (selectionContainsOnlyWhitespace) { - return false; - } - if (isTypingAQuoteCharacter && selection.startLineNumber === selection.endLineNumber && selection.startColumn + 1 === selection.endColumn) { - const selectionText = model.getValueInRange(selection); - if (Object(_cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["isQuote"])(selectionText)) { - // Typing a quote character on top of another quote character - // => disable surround selection type - return false; - } - } - } - return true; - } - static _runSurroundSelectionType(prevEditOperationType, config, model, selections, ch) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const selection = selections[i]; - const closeCharacter = config.surroundingPairs[ch]; - commands[i] = new _commands_surroundSelectionCommand_js__WEBPACK_IMPORTED_MODULE_4__["SurroundSelectionCommand"](selection, ch, closeCharacter); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](0 /* Other */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); - } - static _isTypeInterceptorElectricChar(config, model, selections) { - if (selections.length === 1 && model.isCheapToTokenize(selections[0].getEndPosition().lineNumber)) { - return true; - } - return false; - } - static _typeInterceptorElectricChar(prevEditOperationType, config, model, selection, ch) { - if (!config.electricChars.hasOwnProperty(ch) || !selection.isEmpty()) { - return null; - } - let position = selection.getPosition(); - model.forceTokenization(position.lineNumber); - let lineTokens = model.getLineTokens(position.lineNumber); - let electricAction; - try { - electricAction = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].onElectricCharacter(ch, lineTokens, position.column); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return null; - } - if (!electricAction) { - return null; - } - if (electricAction.matchOpenBracket) { - let endColumn = (lineTokens.getLineContent() + ch).lastIndexOf(electricAction.matchOpenBracket) + 1; - let match = model.findMatchingBracketUp(electricAction.matchOpenBracket, { - lineNumber: position.lineNumber, - column: endColumn - }); - if (match) { - if (match.startLineNumber === position.lineNumber) { - // matched something on the same line => no change in indentation - return null; - } - let matchLine = model.getLineContent(match.startLineNumber); - let matchLineIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["getLeadingWhitespace"](matchLine); - let newIndentation = config.normalizeIndentation(matchLineIndentation); - let lineText = model.getLineContent(position.lineNumber); - let lineFirstNonBlankColumn = model.getLineFirstNonWhitespaceColumn(position.lineNumber) || position.column; - let prefix = lineText.substring(lineFirstNonBlankColumn - 1, position.column - 1); - let typeText = newIndentation + prefix + ch; - let typeSelection = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](position.lineNumber, 1, position.lineNumber, position.column); - const command = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](typeSelection, typeText); - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, [command], { - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: true - }); - } - } - return null; - } - /** - * This is very similar with typing, but the character is already in the text buffer! - */ - static compositionEndWithInterceptors(prevEditOperationType, config, model, selectionsWhenCompositionStarted, selections, autoClosedCharacters) { - if (!selectionsWhenCompositionStarted || _core_selection_js__WEBPACK_IMPORTED_MODULE_8__["Selection"].selectionsArrEqual(selectionsWhenCompositionStarted, selections)) { - // no content was typed - return null; - } - let ch = null; - // extract last typed character - for (const selection of selections) { - if (!selection.isEmpty()) { - return null; - } - const position = selection.getPosition(); - const currentChar = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](position.lineNumber, position.column - 1, position.lineNumber, position.column)); - if (ch === null) { - ch = currentChar; - } - else if (ch !== currentChar) { - return null; - } - } - if (!ch) { - return null; - } - if (this._isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch)) { - // Unfortunately, the close character is at this point "doubled", so we need to delete it... - const commands = selections.map(s => new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](s.positionLineNumber, s.positionColumn, s.positionLineNumber, s.positionColumn + 1), '', false)); - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false - }); - } - const autoClosingPairOpenCharType = this._isAutoClosingOpenCharType(config, model, selections, ch, false); - if (autoClosingPairOpenCharType) { - return this._runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, false, autoClosingPairOpenCharType); - } - return null; - } - static typeWithInterceptors(isDoingComposition, prevEditOperationType, config, model, selections, autoClosedCharacters, ch) { - if (!isDoingComposition && ch === '\n') { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = TypeOperations._enter(config, model, false, selections[i]); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); - } - if (!isDoingComposition && this._isAutoIndentType(config, model, selections)) { - let commands = []; - let autoIndentFails = false; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = this._runAutoIndentType(config, model, selections[i], ch); - if (!commands[i]) { - autoIndentFails = true; - break; - } - } - if (!autoIndentFails) { - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); - } - } - if (!isDoingComposition && this._isAutoClosingOvertype(config, model, selections, autoClosedCharacters, ch)) { - return this._runAutoClosingOvertype(prevEditOperationType, config, model, selections, ch); - } - if (!isDoingComposition) { - const autoClosingPairOpenCharType = this._isAutoClosingOpenCharType(config, model, selections, ch, true); - if (autoClosingPairOpenCharType) { - return this._runAutoClosingOpenCharType(prevEditOperationType, config, model, selections, ch, true, autoClosingPairOpenCharType); - } - } - if (this._isSurroundSelectionType(config, model, selections, ch)) { - return this._runSurroundSelectionType(prevEditOperationType, config, model, selections, ch); - } - // Electric characters make sense only when dealing with a single cursor, - // as multiple cursors typing brackets for example would interfer with bracket matching - if (!isDoingComposition && this._isTypeInterceptorElectricChar(config, model, selections)) { - const r = this._typeInterceptorElectricChar(prevEditOperationType, config, model, selections[0], ch); - if (r) { - return r; - } - } - // A simple character type - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selections[i], ch); - } - let shouldPushStackElementBefore = (prevEditOperationType !== 1 /* Typing */); - if (ch === ' ') { - shouldPushStackElementBefore = true; - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: shouldPushStackElementBefore, - shouldPushStackElementAfter: false - }); - } - static typeWithoutInterceptors(prevEditOperationType, config, model, selections, str) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selections[i], str); - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_5__["EditOperationResult"](1 /* Typing */, commands, { - shouldPushStackElementBefore: (prevEditOperationType !== 1 /* Typing */), - shouldPushStackElementAfter: false - }); - } - static lineInsertBefore(config, model, selections) { - if (model === null || selections === null) { - return []; - } - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - let lineNumber = selections[i].positionLineNumber; - if (lineNumber === 1) { - commands[i] = new _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithoutChangingPosition"](new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, 1, 1), '\n'); - } - else { - lineNumber--; - let column = model.getLineMaxColumn(lineNumber); - commands[i] = this._enter(config, model, false, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](lineNumber, column, lineNumber, column)); - } - } - return commands; - } - static lineInsertAfter(config, model, selections) { - if (model === null || selections === null) { - return []; - } - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - const lineNumber = selections[i].positionLineNumber; - let column = model.getLineMaxColumn(lineNumber); - commands[i] = this._enter(config, model, false, new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](lineNumber, column, lineNumber, column)); - } - return commands; - } - static lineBreakInsert(config, model, selections) { - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = this._enter(config, model, true, selections[i]); - } - return commands; - } -} -class TypeWithAutoClosingCommand extends _commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandWithOffsetCursorState"] { - constructor(selection, openCharacter, insertOpenCharacter, closeCharacter) { - super(selection, (insertOpenCharacter ? openCharacter : '') + closeCharacter, 0, -closeCharacter.length); - this._openCharacter = openCharacter; - this._closeCharacter = closeCharacter; - this.closeCharacterRange = null; - this.enclosingRange = null; - } - computeCursorState(model, helper) { - let inverseEditOperations = helper.getInverseEditOperations(); - let range = inverseEditOperations[0].range; - this.closeCharacterRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, range.endColumn - this._closeCharacter.length, range.endLineNumber, range.endColumn); - this.enclosingRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, range.endColumn - this._openCharacter.length - this._closeCharacter.length, range.endLineNumber, range.endColumn); - return super.computeCursorState(model, helper); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js ***! - \********************************************************************************************/ -/*! exports provided: WordOperations, WordPartOperations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordOperations", function() { return WordOperations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordPartOperations", function() { return WordPartOperations; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./wordCharacterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class WordOperations { - static _createWord(lineContent, wordType, nextCharClass, start, end) { - // console.log('WORD ==> ' + start + ' => ' + end + ':::: <<<' + lineContent.substring(start, end) + '>>>'); - return { start: start, end: end, wordType: wordType, nextCharClass: nextCharClass }; - } - static _findPreviousWordOnLine(wordSeparators, model, position) { - let lineContent = model.getLineContent(position.lineNumber); - return this._doFindPreviousWordOnLine(lineContent, wordSeparators, position); - } - static _doFindPreviousWordOnLine(lineContent, wordSeparators, position) { - let wordType = 0 /* None */; - for (let chIndex = position.column - 2; chIndex >= 0; chIndex--) { - let chCode = lineContent.charCodeAt(chIndex); - let chClass = wordSeparators.get(chCode); - if (chClass === 0 /* Regular */) { - if (wordType === 2 /* Separator */) { - return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1)); - } - wordType = 1 /* Regular */; - } - else if (chClass === 2 /* WordSeparator */) { - if (wordType === 1 /* Regular */) { - return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1)); - } - wordType = 2 /* Separator */; - } - else if (chClass === 1 /* Whitespace */) { - if (wordType !== 0 /* None */) { - return this._createWord(lineContent, wordType, chClass, chIndex + 1, this._findEndOfWord(lineContent, wordSeparators, wordType, chIndex + 1)); - } - } - } - if (wordType !== 0 /* None */) { - return this._createWord(lineContent, wordType, 1 /* Whitespace */, 0, this._findEndOfWord(lineContent, wordSeparators, wordType, 0)); - } - return null; - } - static _findEndOfWord(lineContent, wordSeparators, wordType, startIndex) { - let len = lineContent.length; - for (let chIndex = startIndex; chIndex < len; chIndex++) { - let chCode = lineContent.charCodeAt(chIndex); - let chClass = wordSeparators.get(chCode); - if (chClass === 1 /* Whitespace */) { - return chIndex; - } - if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) { - return chIndex; - } - if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) { - return chIndex; - } - } - return len; - } - static _findNextWordOnLine(wordSeparators, model, position) { - let lineContent = model.getLineContent(position.lineNumber); - return this._doFindNextWordOnLine(lineContent, wordSeparators, position); - } - static _doFindNextWordOnLine(lineContent, wordSeparators, position) { - let wordType = 0 /* None */; - let len = lineContent.length; - for (let chIndex = position.column - 1; chIndex < len; chIndex++) { - let chCode = lineContent.charCodeAt(chIndex); - let chClass = wordSeparators.get(chCode); - if (chClass === 0 /* Regular */) { - if (wordType === 2 /* Separator */) { - return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex); - } - wordType = 1 /* Regular */; - } - else if (chClass === 2 /* WordSeparator */) { - if (wordType === 1 /* Regular */) { - return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex); - } - wordType = 2 /* Separator */; - } - else if (chClass === 1 /* Whitespace */) { - if (wordType !== 0 /* None */) { - return this._createWord(lineContent, wordType, chClass, this._findStartOfWord(lineContent, wordSeparators, wordType, chIndex - 1), chIndex); - } - } - } - if (wordType !== 0 /* None */) { - return this._createWord(lineContent, wordType, 1 /* Whitespace */, this._findStartOfWord(lineContent, wordSeparators, wordType, len - 1), len); - } - return null; - } - static _findStartOfWord(lineContent, wordSeparators, wordType, startIndex) { - for (let chIndex = startIndex; chIndex >= 0; chIndex--) { - let chCode = lineContent.charCodeAt(chIndex); - let chClass = wordSeparators.get(chCode); - if (chClass === 1 /* Whitespace */) { - return chIndex + 1; - } - if (wordType === 1 /* Regular */ && chClass === 2 /* WordSeparator */) { - return chIndex + 1; - } - if (wordType === 2 /* Separator */ && chClass === 0 /* Regular */) { - return chIndex + 1; - } - } - return 0; - } - static moveWordLeft(wordSeparators, model, position, wordNavigationType) { - let lineNumber = position.lineNumber; - let column = position.column; - if (column === 1) { - if (lineNumber > 1) { - lineNumber = lineNumber - 1; - column = model.getLineMaxColumn(lineNumber); - } - } - let prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column)); - if (wordNavigationType === 0 /* WordStart */) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1); - } - if (wordNavigationType === 1 /* WordStartFast */) { - if (prevWordOnLine - && prevWordOnLine.wordType === 2 /* Separator */ - && prevWordOnLine.end - prevWordOnLine.start === 1 - && prevWordOnLine.nextCharClass === 0 /* Regular */) { - // Skip over a word made up of one single separator and followed by a regular character - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine.start + 1)); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1); - } - if (wordNavigationType === 3 /* WordAccessibility */) { - while (prevWordOnLine - && prevWordOnLine.wordType === 2 /* Separator */) { - // Skip over words made up of only separators - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine.start + 1)); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine ? prevWordOnLine.start + 1 : 1); - } - // We are stopping at the ending of words - if (prevWordOnLine && column <= prevWordOnLine.end + 1) { - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine.start + 1)); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine ? prevWordOnLine.end + 1 : 1); - } - static _moveWordPartLeft(model, position) { - const lineNumber = position.lineNumber; - const maxColumn = model.getLineMaxColumn(lineNumber); - if (position.column === 1) { - return (lineNumber > 1 ? new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber - 1, model.getLineMaxColumn(lineNumber - 1)) : position); - } - const lineContent = model.getLineContent(lineNumber); - for (let column = position.column - 1; column > 1; column--) { - const left = lineContent.charCodeAt(column - 2); - const right = lineContent.charCodeAt(column - 1); - if (left === 95 /* Underline */ && right !== 95 /* Underline */) { - // snake_case_variables - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowerAsciiLetter"](left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](right)) { - // camelCaseVariables - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](right)) { - // thisIsACamelCaseWithOneLetterWords - if (column + 1 < maxColumn) { - const rightRight = lineContent.charCodeAt(column); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowerAsciiLetter"](rightRight)) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - } - } - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, 1); - } - static moveWordRight(wordSeparators, model, position, wordNavigationType) { - let lineNumber = position.lineNumber; - let column = position.column; - let movedDown = false; - if (column === model.getLineMaxColumn(lineNumber)) { - if (lineNumber < model.getLineCount()) { - movedDown = true; - lineNumber = lineNumber + 1; - column = 1; - } - } - let nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column)); - if (wordNavigationType === 2 /* WordEnd */) { - if (nextWordOnLine && nextWordOnLine.wordType === 2 /* Separator */) { - if (nextWordOnLine.end - nextWordOnLine.start === 1 && nextWordOnLine.nextCharClass === 0 /* Regular */) { - // Skip over a word made up of one single separator and followed by a regular character - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, nextWordOnLine.end + 1)); - } - } - if (nextWordOnLine) { - column = nextWordOnLine.end + 1; - } - else { - column = model.getLineMaxColumn(lineNumber); - } - } - else if (wordNavigationType === 3 /* WordAccessibility */) { - if (movedDown) { - // If we move to the next line, pretend that the cursor is right before the first character. - // This is needed when the first word starts right at the first character - and in order not to miss it, - // we need to start before. - column = 0; - } - while (nextWordOnLine - && (nextWordOnLine.wordType === 2 /* Separator */ - || nextWordOnLine.start + 1 <= column)) { - // Skip over a word made up of one single separator - // Also skip over word if it begins before current cursor position to ascertain we're moving forward at least 1 character. - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, nextWordOnLine.end + 1)); - } - if (nextWordOnLine) { - column = nextWordOnLine.start + 1; - } - else { - column = model.getLineMaxColumn(lineNumber); - } - } - else { - if (nextWordOnLine && !movedDown && column >= nextWordOnLine.start + 1) { - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, nextWordOnLine.end + 1)); - } - if (nextWordOnLine) { - column = nextWordOnLine.start + 1; - } - else { - column = model.getLineMaxColumn(lineNumber); - } - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - static _moveWordPartRight(model, position) { - const lineNumber = position.lineNumber; - const maxColumn = model.getLineMaxColumn(lineNumber); - if (position.column === maxColumn) { - return (lineNumber < model.getLineCount() ? new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber + 1, 1) : position); - } - const lineContent = model.getLineContent(lineNumber); - for (let column = position.column + 1; column < maxColumn; column++) { - const left = lineContent.charCodeAt(column - 2); - const right = lineContent.charCodeAt(column - 1); - if (left !== 95 /* Underline */ && right === 95 /* Underline */) { - // snake_case_variables - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowerAsciiLetter"](left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](right)) { - // camelCaseVariables - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](left) && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isUpperAsciiLetter"](right)) { - // thisIsACamelCaseWithOneLetterWords - if (column + 1 < maxColumn) { - const rightRight = lineContent.charCodeAt(column); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowerAsciiLetter"](rightRight)) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - } - } - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, maxColumn); - } - static _deleteWordLeftWhitespace(model, position) { - const lineContent = model.getLineContent(position.lineNumber); - const startIndex = position.column - 2; - const lastNonWhitespace = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["lastNonWhitespaceIndex"](lineContent, startIndex); - if (lastNonWhitespace + 1 < startIndex) { - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, lastNonWhitespace + 2, position.lineNumber, position.column); - } - return null; - } - static deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - if (!selection.isEmpty()) { - return selection; - } - const position = new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](selection.positionLineNumber, selection.positionColumn); - let lineNumber = position.lineNumber; - let column = position.column; - if (lineNumber === 1 && column === 1) { - // Ignore deleting at beginning of file - return null; - } - if (whitespaceHeuristics) { - let r = this._deleteWordLeftWhitespace(model, position); - if (r) { - return r; - } - } - let prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, position); - if (wordNavigationType === 0 /* WordStart */) { - if (prevWordOnLine) { - column = prevWordOnLine.start + 1; - } - else { - if (column > 1) { - column = 1; - } - else { - lineNumber--; - column = model.getLineMaxColumn(lineNumber); - } - } - } - else { - if (prevWordOnLine && column <= prevWordOnLine.end + 1) { - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, prevWordOnLine.start + 1)); - } - if (prevWordOnLine) { - column = prevWordOnLine.end + 1; - } - else { - if (column > 1) { - column = 1; - } - else { - lineNumber--; - column = model.getLineMaxColumn(lineNumber); - } - } - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](lineNumber, column, position.lineNumber, position.column); - } - static _deleteWordPartLeft(model, selection) { - if (!selection.isEmpty()) { - return selection; - } - const pos = selection.getPosition(); - const toPosition = WordOperations._moveWordPartLeft(model, pos); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](pos.lineNumber, pos.column, toPosition.lineNumber, toPosition.column); - } - static _findFirstNonWhitespaceChar(str, startIndex) { - let len = str.length; - for (let chIndex = startIndex; chIndex < len; chIndex++) { - let ch = str.charAt(chIndex); - if (ch !== ' ' && ch !== '\t') { - return chIndex; - } - } - return len; - } - static _deleteWordRightWhitespace(model, position) { - const lineContent = model.getLineContent(position.lineNumber); - const startIndex = position.column - 1; - const firstNonWhitespace = this._findFirstNonWhitespaceChar(lineContent, startIndex); - if (startIndex + 1 < firstNonWhitespace) { - // bingo - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, position.column, position.lineNumber, firstNonWhitespace + 1); - } - return null; - } - static deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - if (!selection.isEmpty()) { - return selection; - } - const position = new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](selection.positionLineNumber, selection.positionColumn); - let lineNumber = position.lineNumber; - let column = position.column; - const lineCount = model.getLineCount(); - const maxColumn = model.getLineMaxColumn(lineNumber); - if (lineNumber === lineCount && column === maxColumn) { - // Ignore deleting at end of file - return null; - } - if (whitespaceHeuristics) { - let r = this._deleteWordRightWhitespace(model, position); - if (r) { - return r; - } - } - let nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, position); - if (wordNavigationType === 2 /* WordEnd */) { - if (nextWordOnLine) { - column = nextWordOnLine.end + 1; - } - else { - if (column < maxColumn || lineNumber === lineCount) { - column = maxColumn; - } - else { - lineNumber++; - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, 1)); - if (nextWordOnLine) { - column = nextWordOnLine.start + 1; - } - else { - column = model.getLineMaxColumn(lineNumber); - } - } - } - } - else { - if (nextWordOnLine && column >= nextWordOnLine.start + 1) { - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, nextWordOnLine.end + 1)); - } - if (nextWordOnLine) { - column = nextWordOnLine.start + 1; - } - else { - if (column < maxColumn || lineNumber === lineCount) { - column = maxColumn; - } - else { - lineNumber++; - nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, 1)); - if (nextWordOnLine) { - column = nextWordOnLine.start + 1; - } - else { - column = model.getLineMaxColumn(lineNumber); - } - } - } - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](lineNumber, column, position.lineNumber, position.column); - } - static _deleteWordPartRight(model, selection) { - if (!selection.isEmpty()) { - return selection; - } - const pos = selection.getPosition(); - const toPosition = WordOperations._moveWordPartRight(model, pos); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](pos.lineNumber, pos.column, toPosition.lineNumber, toPosition.column); - } - static _createWordAtPosition(model, lineNumber, word) { - const range = new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](lineNumber, word.start + 1, lineNumber, word.end + 1); - return { - word: model.getValueInRange(range), - startColumn: range.startColumn, - endColumn: range.endColumn - }; - } - static getWordAtPosition(model, _wordSeparators, position) { - const wordSeparators = Object(_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_2__["getMapForWordSeparators"])(_wordSeparators); - const prevWord = WordOperations._findPreviousWordOnLine(wordSeparators, model, position); - if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start <= position.column - 1 && position.column - 1 <= prevWord.end) { - return WordOperations._createWordAtPosition(model, position.lineNumber, prevWord); - } - const nextWord = WordOperations._findNextWordOnLine(wordSeparators, model, position); - if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start <= position.column - 1 && position.column - 1 <= nextWord.end) { - return WordOperations._createWordAtPosition(model, position.lineNumber, nextWord); - } - return null; - } - static word(config, model, cursor, inSelectionMode, position) { - const wordSeparators = Object(_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_2__["getMapForWordSeparators"])(config.wordSeparators); - let prevWord = WordOperations._findPreviousWordOnLine(wordSeparators, model, position); - let nextWord = WordOperations._findNextWordOnLine(wordSeparators, model, position); - if (!inSelectionMode) { - // Entering word selection for the first time - let startColumn; - let endColumn; - if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start <= position.column - 1 && position.column - 1 <= prevWord.end) { - // isTouchingPrevWord - startColumn = prevWord.start + 1; - endColumn = prevWord.end + 1; - } - else if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start <= position.column - 1 && position.column - 1 <= nextWord.end) { - // isTouchingNextWord - startColumn = nextWord.start + 1; - endColumn = nextWord.end + 1; - } - else { - if (prevWord) { - startColumn = prevWord.end + 1; - } - else { - startColumn = 1; - } - if (nextWord) { - endColumn = nextWord.start + 1; - } - else { - endColumn = model.getLineMaxColumn(position.lineNumber); - } - } - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_1__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, startColumn, position.lineNumber, endColumn), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](position.lineNumber, endColumn), 0); - } - let startColumn; - let endColumn; - if (prevWord && prevWord.wordType === 1 /* Regular */ && prevWord.start < position.column - 1 && position.column - 1 < prevWord.end) { - // isInsidePrevWord - startColumn = prevWord.start + 1; - endColumn = prevWord.end + 1; - } - else if (nextWord && nextWord.wordType === 1 /* Regular */ && nextWord.start < position.column - 1 && position.column - 1 < nextWord.end) { - // isInsideNextWord - startColumn = nextWord.start + 1; - endColumn = nextWord.end + 1; - } - else { - startColumn = position.column; - endColumn = position.column; - } - let lineNumber = position.lineNumber; - let column; - if (cursor.selectionStart.containsPosition(position)) { - column = cursor.selectionStart.endColumn; - } - else if (position.isBeforeOrEqual(cursor.selectionStart.getStartPosition())) { - column = startColumn; - let possiblePosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - if (cursor.selectionStart.containsPosition(possiblePosition)) { - column = cursor.selectionStart.endColumn; - } - } - else { - column = endColumn; - let possiblePosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - if (cursor.selectionStart.containsPosition(possiblePosition)) { - column = cursor.selectionStart.startColumn; - } - } - return cursor.move(true, lineNumber, column, 0); - } -} -class WordPartOperations extends WordOperations { - static deleteWordPartLeft(wordSeparators, model, selection, whitespaceHeuristics) { - const candidates = enforceDefined([ - WordOperations.deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, 0 /* WordStart */), - WordOperations.deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, 2 /* WordEnd */), - WordOperations._deleteWordPartLeft(model, selection) - ]); - candidates.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].compareRangesUsingEnds); - return candidates[2]; - } - static deleteWordPartRight(wordSeparators, model, selection, whitespaceHeuristics) { - const candidates = enforceDefined([ - WordOperations.deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, 0 /* WordStart */), - WordOperations.deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, 2 /* WordEnd */), - WordOperations._deleteWordPartRight(model, selection) - ]); - candidates.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].compareRangesUsingStarts); - return candidates[0]; - } - static moveWordPartLeft(wordSeparators, model, position) { - const candidates = enforceDefined([ - WordOperations.moveWordLeft(wordSeparators, model, position, 0 /* WordStart */), - WordOperations.moveWordLeft(wordSeparators, model, position, 2 /* WordEnd */), - WordOperations._moveWordPartLeft(model, position) - ]); - candidates.sort(_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].compare); - return candidates[2]; - } - static moveWordPartRight(wordSeparators, model, position) { - const candidates = enforceDefined([ - WordOperations.moveWordRight(wordSeparators, model, position, 0 /* WordStart */), - WordOperations.moveWordRight(wordSeparators, model, position, 2 /* WordEnd */), - WordOperations._moveWordPartRight(model, position) - ]); - candidates.sort(_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].compare); - return candidates[0]; - } -} -function enforceDefined(arr) { - return arr.filter(el => Boolean(el)); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/oneCursor.js ***! - \*********************************************************************************/ -/*! exports provided: OneCursor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneCursor", function() { return OneCursor; }); -/* harmony import */ var _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class OneCursor { - constructor(context) { - this._selTrackedRange = null; - this._trackSelection = true; - this._setState(context, new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](1, 1), 0), new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](1, 1, 1, 1), 0, new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](1, 1), 0)); - } - dispose(context) { - this._removeTrackedRange(context); - } - startTrackingSelection(context) { - this._trackSelection = true; - this._updateTrackedRange(context); - } - stopTrackingSelection(context) { - this._trackSelection = false; - this._removeTrackedRange(context); - } - _updateTrackedRange(context) { - if (!this._trackSelection) { - // don't track the selection - return; - } - this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, 0 /* AlwaysGrowsWhenTypingAtEdges */); - } - _removeTrackedRange(context) { - this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, null, 0 /* AlwaysGrowsWhenTypingAtEdges */); - } - asCursorState() { - return new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["CursorState"](this.modelState, this.viewState); - } - readSelectionFromMarkers(context) { - const range = context.model._getTrackedRange(this._selTrackedRange); - if (this.modelState.selection.getDirection() === 0 /* LTR */) { - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } - return new _core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); - } - ensureValidState(context) { - this._setState(context, this.modelState, this.viewState); - } - setState(context, modelState, viewState) { - this._setState(context, modelState, viewState); - } - _setState(context, modelState, viewState) { - if (!modelState) { - if (!viewState) { - return; - } - // We only have the view state => compute the model state - const selectionStart = context.model.validateRange(context.coordinatesConverter.convertViewRangeToModelRange(viewState.selectionStart)); - const position = context.model.validatePosition(context.coordinatesConverter.convertViewPositionToModelPosition(viewState.position)); - modelState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](selectionStart, viewState.selectionStartLeftoverVisibleColumns, position, viewState.leftoverVisibleColumns); - } - else { - // Validate new model state - const selectionStart = context.model.validateRange(modelState.selectionStart); - const selectionStartLeftoverVisibleColumns = modelState.selectionStart.equalsRange(selectionStart) ? modelState.selectionStartLeftoverVisibleColumns : 0; - const position = context.model.validatePosition(modelState.position); - const leftoverVisibleColumns = modelState.position.equals(position) ? modelState.leftoverVisibleColumns : 0; - modelState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns); - } - if (!viewState) { - // We only have the model state => compute the view state - const viewSelectionStart1 = context.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](modelState.selectionStart.startLineNumber, modelState.selectionStart.startColumn)); - const viewSelectionStart2 = context.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](modelState.selectionStart.endLineNumber, modelState.selectionStart.endColumn)); - const viewSelectionStart = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](viewSelectionStart1.lineNumber, viewSelectionStart1.column, viewSelectionStart2.lineNumber, viewSelectionStart2.column); - const viewPosition = context.coordinatesConverter.convertModelPositionToViewPosition(modelState.position); - viewState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns); - } - else { - // Validate new view state - const viewSelectionStart = context.coordinatesConverter.validateViewRange(viewState.selectionStart, modelState.selectionStart); - const viewPosition = context.coordinatesConverter.validateViewPosition(viewState.position, modelState.position); - viewState = new _cursorCommon_js__WEBPACK_IMPORTED_MODULE_0__["SingleCursorState"](viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns); - } - this.modelState = modelState; - this.viewState = viewState; - this._updateTrackedRange(context); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js ***! - \***********************************************************************************************/ -/*! exports provided: WordCharacterClassifier, getMapForWordSeparators */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordCharacterClassifier", function() { return WordCharacterClassifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMapForWordSeparators", function() { return getMapForWordSeparators; }); -/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class WordCharacterClassifier extends _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__["CharacterClassifier"] { - constructor(wordSeparators) { - super(0 /* Regular */); - for (let i = 0, len = wordSeparators.length; i < len; i++) { - this.set(wordSeparators.charCodeAt(i), 2 /* WordSeparator */); - } - this.set(32 /* Space */, 1 /* Whitespace */); - this.set(9 /* Tab */, 1 /* Whitespace */); - } -} -function once(computeFn) { - let cache = {}; // TODO@Alex unbounded cache - return (input) => { - if (!cache.hasOwnProperty(input)) { - cache[input] = computeFn(input); - } - return cache[input]; - }; -} -const getMapForWordSeparators = once((input) => new WordCharacterClassifier(input)); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js ***! - \*************************************************************************************/ -/*! exports provided: CharacterClassifier, CharacterSet */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharacterClassifier", function() { return CharacterClassifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharacterSet", function() { return CharacterSet; }); -/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uint.js */ "./node_modules/monaco-editor/esm/vs/base/common/uint.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * A fast character classifier that uses a compact array for ASCII values. - */ -class CharacterClassifier { - constructor(_defaultValue) { - let defaultValue = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint8"])(_defaultValue); - this._defaultValue = defaultValue; - this._asciiMap = CharacterClassifier._createAsciiMap(defaultValue); - this._map = new Map(); - } - static _createAsciiMap(defaultValue) { - let asciiMap = new Uint8Array(256); - for (let i = 0; i < 256; i++) { - asciiMap[i] = defaultValue; - } - return asciiMap; - } - set(charCode, _value) { - let value = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint8"])(_value); - if (charCode >= 0 && charCode < 256) { - this._asciiMap[charCode] = value; - } - else { - this._map.set(charCode, value); - } - } - get(charCode) { - if (charCode >= 0 && charCode < 256) { - return this._asciiMap[charCode]; - } - else { - return (this._map.get(charCode) || this._defaultValue); - } - } -} -class CharacterSet { - constructor() { - this._actual = new CharacterClassifier(0 /* False */); - } - add(charCode) { - this._actual.set(charCode, 1 /* True */); - } - has(charCode) { - return (this._actual.get(charCode) === 1 /* True */); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js ***! - \*******************************************************************************/ -/*! exports provided: EditOperation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditOperation", function() { return EditOperation; }); -/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class EditOperation { - static insert(position, text) { - return { - range: new _range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](position.lineNumber, position.column, position.lineNumber, position.column), - text: text, - forceMoveMarkers: true - }; - } - static delete(range) { - return { - range: range, - text: null - }; - } - static replace(range, text) { - return { - range: range, - text: text - }; - } - static replaceMove(range, text) { - return { - range: range, - text: text, - forceMoveMarkers: true - }; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js ***! - \****************************************************************************/ -/*! exports provided: LineTokens, SlicedLineTokens */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineTokens", function() { return LineTokens; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlicedLineTokens", function() { return SlicedLineTokens; }); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class LineTokens { - constructor(tokens, text) { - this._tokens = tokens; - this._tokensCount = (this._tokens.length >>> 1); - this._text = text; - } - equals(other) { - if (other instanceof LineTokens) { - return this.slicedEquals(other, 0, this._tokensCount); - } - return false; - } - slicedEquals(other, sliceFromTokenIndex, sliceTokenCount) { - if (this._text !== other._text) { - return false; - } - if (this._tokensCount !== other._tokensCount) { - return false; - } - const from = (sliceFromTokenIndex << 1); - const to = from + (sliceTokenCount << 1); - for (let i = from; i < to; i++) { - if (this._tokens[i] !== other._tokens[i]) { - return false; - } - } - return true; - } - getLineContent() { - return this._text; - } - getCount() { - return this._tokensCount; - } - getStartOffset(tokenIndex) { - if (tokenIndex > 0) { - return this._tokens[(tokenIndex - 1) << 1]; - } - return 0; - } - getMetadata(tokenIndex) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return metadata; - } - getLanguageId(tokenIndex) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return _modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getLanguageId(metadata); - } - getStandardTokenType(tokenIndex) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return _modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getTokenType(metadata); - } - getForeground(tokenIndex) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return _modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getForeground(metadata); - } - getClassName(tokenIndex) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return _modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getClassNameFromMetadata(metadata); - } - getInlineStyle(tokenIndex, colorMap) { - const metadata = this._tokens[(tokenIndex << 1) + 1]; - return _modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getInlineStyleFromMetadata(metadata, colorMap); - } - getEndOffset(tokenIndex) { - return this._tokens[tokenIndex << 1]; - } - /** - * Find the token containing offset `offset`. - * @param offset The search offset - * @return The index of the token containing the offset. - */ - findTokenIndexAtOffset(offset) { - return LineTokens.findIndexInTokensArray(this._tokens, offset); - } - inflate() { - return this; - } - sliceAndInflate(startOffset, endOffset, deltaOffset) { - return new SlicedLineTokens(this, startOffset, endOffset, deltaOffset); - } - static convertToEndOffset(tokens, lineTextLength) { - const tokenCount = (tokens.length >>> 1); - const lastTokenIndex = tokenCount - 1; - for (let tokenIndex = 0; tokenIndex < lastTokenIndex; tokenIndex++) { - tokens[tokenIndex << 1] = tokens[(tokenIndex + 1) << 1]; - } - tokens[lastTokenIndex << 1] = lineTextLength; - } - static findIndexInTokensArray(tokens, desiredIndex) { - if (tokens.length <= 2) { - return 0; - } - let low = 0; - let high = (tokens.length >>> 1) - 1; - while (low < high) { - const mid = low + Math.floor((high - low) / 2); - const endOffset = tokens[(mid << 1)]; - if (endOffset === desiredIndex) { - return mid + 1; - } - else if (endOffset < desiredIndex) { - low = mid + 1; - } - else if (endOffset > desiredIndex) { - high = mid; - } - } - return low; - } -} -class SlicedLineTokens { - constructor(source, startOffset, endOffset, deltaOffset) { - this._source = source; - this._startOffset = startOffset; - this._endOffset = endOffset; - this._deltaOffset = deltaOffset; - this._firstTokenIndex = source.findTokenIndexAtOffset(startOffset); - this._tokensCount = 0; - for (let i = this._firstTokenIndex, len = source.getCount(); i < len; i++) { - const tokenStartOffset = source.getStartOffset(i); - if (tokenStartOffset >= endOffset) { - break; - } - this._tokensCount++; - } - } - equals(other) { - if (other instanceof SlicedLineTokens) { - return (this._startOffset === other._startOffset - && this._endOffset === other._endOffset - && this._deltaOffset === other._deltaOffset - && this._source.slicedEquals(other._source, this._firstTokenIndex, this._tokensCount)); - } - return false; - } - getCount() { - return this._tokensCount; - } - getForeground(tokenIndex) { - return this._source.getForeground(this._firstTokenIndex + tokenIndex); - } - getEndOffset(tokenIndex) { - const tokenEndOffset = this._source.getEndOffset(this._firstTokenIndex + tokenIndex); - return Math.min(this._endOffset, tokenEndOffset) - this._startOffset + this._deltaOffset; - } - getClassName(tokenIndex) { - return this._source.getClassName(this._firstTokenIndex + tokenIndex); - } - getInlineStyle(tokenIndex, colorMap) { - return this._source.getInlineStyle(this._firstTokenIndex + tokenIndex, colorMap); - } - findTokenIndexAtOffset(offset) { - return this._source.findTokenIndexAtOffset(offset + this._startOffset - this._deltaOffset) - this._firstTokenIndex; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js ***! - \**************************************************************************/ -/*! exports provided: Position */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * A position in the editor. - */ -class Position { - constructor(lineNumber, column) { - this.lineNumber = lineNumber; - this.column = column; - } - /** - * Create a new position from this position. - * - * @param newLineNumber new line number - * @param newColumn new column - */ - with(newLineNumber = this.lineNumber, newColumn = this.column) { - if (newLineNumber === this.lineNumber && newColumn === this.column) { - return this; - } - else { - return new Position(newLineNumber, newColumn); - } - } - /** - * Derive a new position from this position. - * - * @param deltaLineNumber line number delta - * @param deltaColumn column delta - */ - delta(deltaLineNumber = 0, deltaColumn = 0) { - return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn); - } - /** - * Test if this position equals other position - */ - equals(other) { - return Position.equals(this, other); - } - /** - * Test if position `a` equals position `b` - */ - static equals(a, b) { - if (!a && !b) { - return true; - } - return (!!a && - !!b && - a.lineNumber === b.lineNumber && - a.column === b.column); - } - /** - * Test if this position is before other position. - * If the two positions are equal, the result will be false. - */ - isBefore(other) { - return Position.isBefore(this, other); - } - /** - * Test if position `a` is before position `b`. - * If the two positions are equal, the result will be false. - */ - static isBefore(a, b) { - if (a.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a.lineNumber) { - return false; - } - return a.column < b.column; - } - /** - * Test if this position is before other position. - * If the two positions are equal, the result will be true. - */ - isBeforeOrEqual(other) { - return Position.isBeforeOrEqual(this, other); - } - /** - * Test if position `a` is before position `b`. - * If the two positions are equal, the result will be true. - */ - static isBeforeOrEqual(a, b) { - if (a.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a.lineNumber) { - return false; - } - return a.column <= b.column; - } - /** - * A function that compares positions, useful for sorting - */ - static compare(a, b) { - let aLineNumber = a.lineNumber | 0; - let bLineNumber = b.lineNumber | 0; - if (aLineNumber === bLineNumber) { - let aColumn = a.column | 0; - let bColumn = b.column | 0; - return aColumn - bColumn; - } - return aLineNumber - bLineNumber; - } - /** - * Clone this position. - */ - clone() { - return new Position(this.lineNumber, this.column); - } - /** - * Convert to a human-readable representation. - */ - toString() { - return '(' + this.lineNumber + ',' + this.column + ')'; - } - // --- - /** - * Create a `Position` from an `IPosition`. - */ - static lift(pos) { - return new Position(pos.lineNumber, pos.column); - } - /** - * Test if `obj` is an `IPosition`. - */ - static isIPosition(obj) { - return (obj - && (typeof obj.lineNumber === 'number') - && (typeof obj.column === 'number')); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js ***! - \***********************************************************************/ -/*! exports provided: Range */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; }); -/* harmony import */ var _position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn) - */ -class Range { - constructor(startLineNumber, startColumn, endLineNumber, endColumn) { - if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) { - this.startLineNumber = endLineNumber; - this.startColumn = endColumn; - this.endLineNumber = startLineNumber; - this.endColumn = startColumn; - } - else { - this.startLineNumber = startLineNumber; - this.startColumn = startColumn; - this.endLineNumber = endLineNumber; - this.endColumn = endColumn; - } - } - /** - * Test if this range is empty. - */ - isEmpty() { - return Range.isEmpty(this); - } - /** - * Test if `range` is empty. - */ - static isEmpty(range) { - return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn); - } - /** - * Test if position is in this range. If the position is at the edges, will return true. - */ - containsPosition(position) { - return Range.containsPosition(this, position); - } - /** - * Test if `position` is in `range`. If the position is at the edges, will return true. - */ - static containsPosition(range, position) { - if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { - return false; - } - if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) { - return false; - } - if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) { - return false; - } - return true; - } - /** - * Test if range is in this range. If the range is equal to this range, will return true. - */ - containsRange(range) { - return Range.containsRange(this, range); - } - /** - * Test if `otherRange` is in `range`. If the ranges are equal, will return true. - */ - static containsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) { - return false; - } - return true; - } - /** - * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. - */ - strictContainsRange(range) { - return Range.strictContainsRange(this, range); - } - /** - * Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false. - */ - static strictContainsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { - return false; - } - return true; - } - /** - * A reunion of the two ranges. - * The smallest position will be used as the start point, and the largest one as the end point. - */ - plusRange(range) { - return Range.plusRange(this, range); - } - /** - * A reunion of the two ranges. - * The smallest position will be used as the start point, and the largest one as the end point. - */ - static plusRange(a, b) { - let startLineNumber; - let startColumn; - let endLineNumber; - let endColumn; - if (b.startLineNumber < a.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = b.startColumn; - } - else if (b.startLineNumber === a.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = Math.min(b.startColumn, a.startColumn); - } - else { - startLineNumber = a.startLineNumber; - startColumn = a.startColumn; - } - if (b.endLineNumber > a.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = b.endColumn; - } - else if (b.endLineNumber === a.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = Math.max(b.endColumn, a.endColumn); - } - else { - endLineNumber = a.endLineNumber; - endColumn = a.endColumn; - } - return new Range(startLineNumber, startColumn, endLineNumber, endColumn); - } - /** - * A intersection of the two ranges. - */ - intersectRanges(range) { - return Range.intersectRanges(this, range); - } - /** - * A intersection of the two ranges. - */ - static intersectRanges(a, b) { - let resultStartLineNumber = a.startLineNumber; - let resultStartColumn = a.startColumn; - let resultEndLineNumber = a.endLineNumber; - let resultEndColumn = a.endColumn; - let otherStartLineNumber = b.startLineNumber; - let otherStartColumn = b.startColumn; - let otherEndLineNumber = b.endLineNumber; - let otherEndColumn = b.endColumn; - if (resultStartLineNumber < otherStartLineNumber) { - resultStartLineNumber = otherStartLineNumber; - resultStartColumn = otherStartColumn; - } - else if (resultStartLineNumber === otherStartLineNumber) { - resultStartColumn = Math.max(resultStartColumn, otherStartColumn); - } - if (resultEndLineNumber > otherEndLineNumber) { - resultEndLineNumber = otherEndLineNumber; - resultEndColumn = otherEndColumn; - } - else if (resultEndLineNumber === otherEndLineNumber) { - resultEndColumn = Math.min(resultEndColumn, otherEndColumn); - } - // Check if selection is now empty - if (resultStartLineNumber > resultEndLineNumber) { - return null; - } - if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) { - return null; - } - return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn); - } - /** - * Test if this range equals other. - */ - equalsRange(other) { - return Range.equalsRange(this, other); - } - /** - * Test if range `a` equals `b`. - */ - static equalsRange(a, b) { - return (!!a && - !!b && - a.startLineNumber === b.startLineNumber && - a.startColumn === b.startColumn && - a.endLineNumber === b.endLineNumber && - a.endColumn === b.endColumn); - } - /** - * Return the end position (which will be after or equal to the start position) - */ - getEndPosition() { - return Range.getEndPosition(this); - } - /** - * Return the end position (which will be after or equal to the start position) - */ - static getEndPosition(range) { - return new _position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](range.endLineNumber, range.endColumn); - } - /** - * Return the start position (which will be before or equal to the end position) - */ - getStartPosition() { - return Range.getStartPosition(this); - } - /** - * Return the start position (which will be before or equal to the end position) - */ - static getStartPosition(range) { - return new _position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](range.startLineNumber, range.startColumn); - } - /** - * Transform to a user presentable string representation. - */ - toString() { - return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']'; - } - /** - * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position. - */ - setEndPosition(endLineNumber, endColumn) { - return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn); - } - /** - * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. - */ - setStartPosition(startLineNumber, startColumn) { - return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn); - } - /** - * Create a new empty range using this range's start position. - */ - collapseToStart() { - return Range.collapseToStart(this); - } - /** - * Create a new empty range using this range's start position. - */ - static collapseToStart(range) { - return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); - } - // --- - static fromPositions(start, end = start) { - return new Range(start.lineNumber, start.column, end.lineNumber, end.column); - } - static lift(range) { - if (!range) { - return null; - } - return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } - /** - * Test if `obj` is an `IRange`. - */ - static isIRange(obj) { - return (obj - && (typeof obj.startLineNumber === 'number') - && (typeof obj.startColumn === 'number') - && (typeof obj.endLineNumber === 'number') - && (typeof obj.endColumn === 'number')); - } - /** - * Test if the two ranges are touching in any way. - */ - static areIntersectingOrTouching(a, b) { - // Check if `a` is before `b` - if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) { - return false; - } - // Check if `b` is before `a` - if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) { - return false; - } - // These ranges must intersect - return true; - } - /** - * Test if the two ranges are intersecting. If the ranges are touching it returns true. - */ - static areIntersecting(a, b) { - // Check if `a` is before `b` - if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) { - return false; - } - // Check if `b` is before `a` - if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) { - return false; - } - // These ranges must intersect - return true; - } - /** - * A function that compares ranges, useful for sorting ranges - * It will first compare ranges on the startPosition and then on the endPosition - */ - static compareRangesUsingStarts(a, b) { - if (a && b) { - const aStartLineNumber = a.startLineNumber | 0; - const bStartLineNumber = b.startLineNumber | 0; - if (aStartLineNumber === bStartLineNumber) { - const aStartColumn = a.startColumn | 0; - const bStartColumn = b.startColumn | 0; - if (aStartColumn === bStartColumn) { - const aEndLineNumber = a.endLineNumber | 0; - const bEndLineNumber = b.endLineNumber | 0; - if (aEndLineNumber === bEndLineNumber) { - const aEndColumn = a.endColumn | 0; - const bEndColumn = b.endColumn | 0; - return aEndColumn - bEndColumn; - } - return aEndLineNumber - bEndLineNumber; - } - return aStartColumn - bStartColumn; - } - return aStartLineNumber - bStartLineNumber; - } - const aExists = (a ? 1 : 0); - const bExists = (b ? 1 : 0); - return aExists - bExists; - } - /** - * A function that compares ranges, useful for sorting ranges - * It will first compare ranges on the endPosition and then on the startPosition - */ - static compareRangesUsingEnds(a, b) { - if (a.endLineNumber === b.endLineNumber) { - if (a.endColumn === b.endColumn) { - if (a.startLineNumber === b.startLineNumber) { - return a.startColumn - b.startColumn; - } - return a.startLineNumber - b.startLineNumber; - } - return a.endColumn - b.endColumn; - } - return a.endLineNumber - b.endLineNumber; - } - /** - * Test if the range spans multiple lines. - */ - static spansMultipleLines(range) { - return range.endLineNumber > range.startLineNumber; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js ***! - \**********************************************************************/ -/*! exports provided: RGBA8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RGBA8", function() { return RGBA8; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * A very VM friendly rgba datastructure. - * Please don't touch unless you take a look at the IR. - */ -class RGBA8 { - constructor(r, g, b, a) { - this.r = RGBA8._clamp(r); - this.g = RGBA8._clamp(g); - this.b = RGBA8._clamp(b); - this.a = RGBA8._clamp(a); - } - equals(other) { - return (this.r === other.r - && this.g === other.g - && this.b === other.b - && this.a === other.a); - } - static _clamp(c) { - if (c < 0) { - return 0; - } - if (c > 255) { - return 255; - } - return c | 0; - } -} -RGBA8.Empty = new RGBA8(0, 0, 0, 0); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js ***! - \***************************************************************************/ -/*! exports provided: Selection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); -/* harmony import */ var _position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/** - * A selection in the editor. - * The selection is a range that has an orientation. - */ -class Selection extends _range_js__WEBPACK_IMPORTED_MODULE_1__["Range"] { - constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { - super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn); - this.selectionStartLineNumber = selectionStartLineNumber; - this.selectionStartColumn = selectionStartColumn; - this.positionLineNumber = positionLineNumber; - this.positionColumn = positionColumn; - } - /** - * Transform to a human-readable representation. - */ - toString() { - return '[' + this.selectionStartLineNumber + ',' + this.selectionStartColumn + ' -> ' + this.positionLineNumber + ',' + this.positionColumn + ']'; - } - /** - * Test if equals other selection. - */ - equalsSelection(other) { - return (Selection.selectionsEqual(this, other)); - } - /** - * Test if the two selections are equal. - */ - static selectionsEqual(a, b) { - return (a.selectionStartLineNumber === b.selectionStartLineNumber && - a.selectionStartColumn === b.selectionStartColumn && - a.positionLineNumber === b.positionLineNumber && - a.positionColumn === b.positionColumn); - } - /** - * Get directions (LTR or RTL). - */ - getDirection() { - if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { - return 0 /* LTR */; - } - return 1 /* RTL */; - } - /** - * Create a new selection with a different `positionLineNumber` and `positionColumn`. - */ - setEndPosition(endLineNumber, endColumn) { - if (this.getDirection() === 0 /* LTR */) { - return new Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn); - } - return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); - } - /** - * Get the position at `positionLineNumber` and `positionColumn`. - */ - getPosition() { - return new _position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](this.positionLineNumber, this.positionColumn); - } - /** - * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. - */ - setStartPosition(startLineNumber, startColumn) { - if (this.getDirection() === 0 /* LTR */) { - return new Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn); - } - return new Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn); - } - // ---- - /** - * Create a `Selection` from one or two positions - */ - static fromPositions(start, end = start) { - return new Selection(start.lineNumber, start.column, end.lineNumber, end.column); - } - /** - * Create a `Selection` from an `ISelection`. - */ - static liftSelection(sel) { - return new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); - } - /** - * `a` equals `b`. - */ - static selectionsArrEqual(a, b) { - if (a && !b || !a && b) { - return false; - } - if (!a && !b) { - return true; - } - if (a.length !== b.length) { - return false; - } - for (let i = 0, len = a.length; i < len; i++) { - if (!this.selectionsEqual(a[i], b[i])) { - return false; - } - } - return true; - } - /** - * Test if `obj` is an `ISelection`. - */ - static isISelection(obj) { - return (obj - && (typeof obj.selectionStartLineNumber === 'number') - && (typeof obj.selectionStartColumn === 'number') - && (typeof obj.positionLineNumber === 'number') - && (typeof obj.positionColumn === 'number')); - } - /** - * Create with a direction. - */ - static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) { - if (direction === 0 /* LTR */) { - return new Selection(startLineNumber, startColumn, endLineNumber, endColumn); - } - return new Selection(endLineNumber, endColumn, startLineNumber, startColumn); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js ***! - \*******************************************************************************/ -/*! exports provided: getPlatformTextDecoder, hasTextDecoder, createStringBuilder, decodeUTF16LE */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlatformTextDecoder", function() { return getPlatformTextDecoder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasTextDecoder", function() { return hasTextDecoder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStringBuilder", function() { return createStringBuilder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeUTF16LE", function() { return decodeUTF16LE; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/buffer.js */ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -let _platformTextDecoder; -function getPlatformTextDecoder() { - if (!_platformTextDecoder) { - _platformTextDecoder = new TextDecoder(_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isLittleEndian"]() ? 'UTF-16LE' : 'UTF-16BE'); - } - return _platformTextDecoder; -} -const hasTextDecoder = (typeof TextDecoder !== 'undefined'); -let createStringBuilder; -let decodeUTF16LE; -if (hasTextDecoder) { - createStringBuilder = (capacity) => new StringBuilder(capacity); - decodeUTF16LE = standardDecodeUTF16LE; -} -else { - createStringBuilder = (capacity) => new CompatStringBuilder(); - decodeUTF16LE = compatDecodeUTF16LE; -} -function standardDecodeUTF16LE(source, offset, len) { - const view = new Uint16Array(source.buffer, offset, len); - return getPlatformTextDecoder().decode(view); -} -function compatDecodeUTF16LE(source, offset, len) { - let result = []; - let resultLen = 0; - for (let i = 0; i < len; i++) { - const charCode = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_2__["readUInt16LE"](source, offset); - offset += 2; - result[resultLen++] = String.fromCharCode(charCode); - } - return result.join(''); -} -class StringBuilder { - constructor(capacity) { - this._capacity = capacity | 0; - this._buffer = new Uint16Array(this._capacity); - this._completedStrings = null; - this._bufferLength = 0; - } - reset() { - this._completedStrings = null; - this._bufferLength = 0; - } - build() { - if (this._completedStrings !== null) { - this._flushBuffer(); - return this._completedStrings.join(''); - } - return this._buildBuffer(); - } - _buildBuffer() { - if (this._bufferLength === 0) { - return ''; - } - const view = new Uint16Array(this._buffer.buffer, 0, this._bufferLength); - return getPlatformTextDecoder().decode(view); - } - _flushBuffer() { - const bufferString = this._buildBuffer(); - this._bufferLength = 0; - if (this._completedStrings === null) { - this._completedStrings = [bufferString]; - } - else { - this._completedStrings[this._completedStrings.length] = bufferString; - } - } - write1(charCode) { - const remainingSpace = this._capacity - this._bufferLength; - if (remainingSpace <= 1) { - if (remainingSpace === 0 || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCode)) { - this._flushBuffer(); - } - } - this._buffer[this._bufferLength++] = charCode; - } - appendASCII(charCode) { - if (this._bufferLength === this._capacity) { - // buffer is full - this._flushBuffer(); - } - this._buffer[this._bufferLength++] = charCode; - } - appendASCIIString(str) { - const strLen = str.length; - if (this._bufferLength + strLen >= this._capacity) { - // This string does not fit in the remaining buffer space - this._flushBuffer(); - this._completedStrings[this._completedStrings.length] = str; - return; - } - for (let i = 0; i < strLen; i++) { - this._buffer[this._bufferLength++] = str.charCodeAt(i); - } - } -} -class CompatStringBuilder { - constructor() { - this._pieces = []; - this._piecesLen = 0; - } - reset() { - this._pieces = []; - this._piecesLen = 0; - } - build() { - return this._pieces.join(''); - } - write1(charCode) { - this._pieces[this._piecesLen++] = String.fromCharCode(charCode); - } - appendASCII(charCode) { - this._pieces[this._piecesLen++] = String.fromCharCode(charCode); - } - appendASCIIString(str) { - this._pieces[this._piecesLen++] = str; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js": -/*!***********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js ***! - \***********************************************************************/ -/*! exports provided: Token, TokenizationResult, TokenizationResult2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Token", function() { return Token; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationResult", function() { return TokenizationResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationResult2", function() { return TokenizationResult2; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class Token { - constructor(offset, type, language) { - this.offset = offset | 0; // @perf - this.type = type; - this.language = language; - } - toString() { - return '(' + this.offset + ', ' + this.type + ')'; - } -} -class TokenizationResult { - constructor(tokens, endState) { - this.tokens = tokens; - this.endState = endState; - } -} -class TokenizationResult2 { - constructor(tokens, endState) { - this.tokens = tokens; - this.endState = endState; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js ***! - \******************************************************************************/ -/*! exports provided: DiffComputer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiffComputer", function() { return DiffComputer; }); -/* harmony import */ var _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/diff/diff.js */ "./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -const MINIMUM_MATCHING_CHARACTER_LENGTH = 3; -function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) { - const diffAlgo = new _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_0__["LcsDiff"](originalSequence, modifiedSequence, continueProcessingPredicate); - return diffAlgo.ComputeDiff(pretty); -} -class LineSequence { - constructor(lines) { - const startColumns = []; - const endColumns = []; - for (let i = 0, length = lines.length; i < length; i++) { - startColumns[i] = getFirstNonBlankColumn(lines[i], 1); - endColumns[i] = getLastNonBlankColumn(lines[i], 1); - } - this.lines = lines; - this._startColumns = startColumns; - this._endColumns = endColumns; - } - getElements() { - const elements = []; - for (let i = 0, len = this.lines.length; i < len; i++) { - elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1); - } - return elements; - } - getStartLineNumber(i) { - return i + 1; - } - getEndLineNumber(i) { - return i + 1; - } - createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) { - const charCodes = []; - const lineNumbers = []; - const columns = []; - let len = 0; - for (let index = startIndex; index <= endIndex; index++) { - const lineContent = this.lines[index]; - const startColumn = (shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1); - const endColumn = (shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1); - for (let col = startColumn; col < endColumn; col++) { - charCodes[len] = lineContent.charCodeAt(col - 1); - lineNumbers[len] = index + 1; - columns[len] = col; - len++; - } - } - return new CharSequence(charCodes, lineNumbers, columns); - } -} -class CharSequence { - constructor(charCodes, lineNumbers, columns) { - this._charCodes = charCodes; - this._lineNumbers = lineNumbers; - this._columns = columns; - } - getElements() { - return this._charCodes; - } - getStartLineNumber(i) { - return this._lineNumbers[i]; - } - getStartColumn(i) { - return this._columns[i]; - } - getEndLineNumber(i) { - return this._lineNumbers[i]; - } - getEndColumn(i) { - return this._columns[i] + 1; - } -} -class CharChange { - constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalStartColumn = originalStartColumn; - this.originalEndLineNumber = originalEndLineNumber; - this.originalEndColumn = originalEndColumn; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedStartColumn = modifiedStartColumn; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.modifiedEndColumn = modifiedEndColumn; - } - static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) { - let originalStartLineNumber; - let originalStartColumn; - let originalEndLineNumber; - let originalEndColumn; - let modifiedStartLineNumber; - let modifiedStartColumn; - let modifiedEndLineNumber; - let modifiedEndColumn; - if (diffChange.originalLength === 0) { - originalStartLineNumber = 0; - originalStartColumn = 0; - originalEndLineNumber = 0; - originalEndColumn = 0; - } - else { - originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart); - originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart); - originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); - originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1); - } - if (diffChange.modifiedLength === 0) { - modifiedStartLineNumber = 0; - modifiedStartColumn = 0; - modifiedEndLineNumber = 0; - modifiedEndColumn = 0; - } - else { - modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart); - modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart); - modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1); - } - return new CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn); - } -} -function postProcessCharChanges(rawChanges) { - if (rawChanges.length <= 1) { - return rawChanges; - } - const result = [rawChanges[0]]; - let prevChange = result[0]; - for (let i = 1, len = rawChanges.length; i < len; i++) { - const currChange = rawChanges[i]; - const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength); - const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength); - // Both of the above should be equal, but the continueProcessingPredicate may prevent this from being true - const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength); - if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) { - // Merge the current change into the previous one - prevChange.originalLength = (currChange.originalStart + currChange.originalLength) - prevChange.originalStart; - prevChange.modifiedLength = (currChange.modifiedStart + currChange.modifiedLength) - prevChange.modifiedStart; - } - else { - // Add the current change - result.push(currChange); - prevChange = currChange; - } - } - return result; -} -class LineChange { - constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalEndLineNumber = originalEndLineNumber; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.charChanges = charChanges; - } - static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) { - let originalStartLineNumber; - let originalEndLineNumber; - let modifiedStartLineNumber; - let modifiedEndLineNumber; - let charChanges = undefined; - if (diffChange.originalLength === 0) { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1; - originalEndLineNumber = 0; - } - else { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart); - originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); - } - if (diffChange.modifiedLength === 0) { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1; - modifiedEndLineNumber = 0; - } - else { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart); - modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - } - if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) { - // Compute character changes for diff chunks of at most 20 lines... - const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1); - const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1); - let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes; - if (shouldPostProcessCharChanges) { - rawChanges = postProcessCharChanges(rawChanges); - } - charChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence)); - } - } - return new LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges); - } -} -class DiffComputer { - constructor(originalLines, modifiedLines, opts) { - this.shouldComputeCharChanges = opts.shouldComputeCharChanges; - this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges; - this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace; - this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff; - this.originalLines = originalLines; - this.modifiedLines = modifiedLines; - this.original = new LineSequence(originalLines); - this.modified = new LineSequence(modifiedLines); - this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime); - this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5000)); // never run after 5s for character changes... - } - computeDiff() { - if (this.original.lines.length === 1 && this.original.lines[0].length === 0) { - // empty original => fast path - return { - quitEarly: false, - changes: [{ - originalStartLineNumber: 1, - originalEndLineNumber: 1, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: this.modified.lines.length, - charChanges: [{ - modifiedEndColumn: 0, - modifiedEndLineNumber: 0, - modifiedStartColumn: 0, - modifiedStartLineNumber: 0, - originalEndColumn: 0, - originalEndLineNumber: 0, - originalStartColumn: 0, - originalStartLineNumber: 0 - }] - }] - }; - } - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { - // empty modified => fast path - return { - quitEarly: false, - changes: [{ - originalStartLineNumber: 1, - originalEndLineNumber: this.original.lines.length, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: 1, - charChanges: [{ - modifiedEndColumn: 0, - modifiedEndLineNumber: 0, - modifiedStartColumn: 0, - modifiedStartLineNumber: 0, - originalEndColumn: 0, - originalEndLineNumber: 0, - originalStartColumn: 0, - originalStartLineNumber: 0 - }] - }] - }; - } - const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff); - const rawChanges = diffResult.changes; - const quitEarly = diffResult.quitEarly; - // The diff is always computed with ignoring trim whitespace - // This ensures we get the prettiest diff - if (this.shouldIgnoreTrimWhitespace) { - const lineChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - } - return { - quitEarly: quitEarly, - changes: lineChanges - }; - } - // Need to post-process and introduce changes where the trim whitespace is different - // Note that we are looping starting at -1 to also cover the lines before the first change - const result = []; - let originalLineIndex = 0; - let modifiedLineIndex = 0; - for (let i = -1 /* !!!! */, len = rawChanges.length; i < len; i++) { - const nextChange = (i + 1 < len ? rawChanges[i + 1] : null); - const originalStop = (nextChange ? nextChange.originalStart : this.originalLines.length); - const modifiedStop = (nextChange ? nextChange.modifiedStart : this.modifiedLines.length); - while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) { - const originalLine = this.originalLines[originalLineIndex]; - const modifiedLine = this.modifiedLines[modifiedLineIndex]; - if (originalLine !== modifiedLine) { - // These lines differ only in trim whitespace - // Check the leading whitespace - { - let originalStartColumn = getFirstNonBlankColumn(originalLine, 1); - let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1); - while (originalStartColumn > 1 && modifiedStartColumn > 1) { - const originalChar = originalLine.charCodeAt(originalStartColumn - 2); - const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2); - if (originalChar !== modifiedChar) { - break; - } - originalStartColumn--; - modifiedStartColumn--; - } - if (originalStartColumn > 1 || modifiedStartColumn > 1) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn); - } - } - // Check the trailing whitespace - { - let originalEndColumn = getLastNonBlankColumn(originalLine, 1); - let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1); - const originalMaxColumn = originalLine.length + 1; - const modifiedMaxColumn = modifiedLine.length + 1; - while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) { - const originalChar = originalLine.charCodeAt(originalEndColumn - 1); - const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1); - if (originalChar !== modifiedChar) { - break; - } - originalEndColumn++; - modifiedEndColumn++; - } - if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn); - } - } - } - originalLineIndex++; - modifiedLineIndex++; - } - if (nextChange) { - // Emit the actual change - result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - originalLineIndex += nextChange.originalLength; - modifiedLineIndex += nextChange.modifiedLength; - } - } - return { - quitEarly: quitEarly, - changes: result - }; - } - _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) { - // Merged into previous - return; - } - let charChanges = undefined; - if (this.shouldComputeCharChanges) { - charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)]; - } - result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges)); - } - _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - const len = result.length; - if (len === 0) { - return false; - } - const prevChange = result[len - 1]; - if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) { - // Don't merge with inserts/deletes - return false; - } - if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) { - prevChange.originalEndLineNumber = originalLineNumber; - prevChange.modifiedEndLineNumber = modifiedLineNumber; - if (this.shouldComputeCharChanges && prevChange.charChanges) { - prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); - } - return true; - } - return false; - } -} -function getFirstNonBlankColumn(txt, defaultValue) { - const r = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["firstNonWhitespaceIndex"](txt); - if (r === -1) { - return defaultValue; - } - return r + 1; -} -function getLastNonBlankColumn(txt, defaultValue) { - const r = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["lastNonWhitespaceIndex"](txt); - if (r === -1) { - return defaultValue; - } - return r + 2; -} -function createContinueProcessingPredicate(maximumRuntime) { - if (maximumRuntime === 0) { - return () => true; - } - const startTime = Date.now(); - return () => { - return Date.now() - startTime < maximumRuntime; - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js ***! - \*************************************************************************/ -/*! exports provided: InternalEditorAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternalEditorAction", function() { return InternalEditorAction; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class InternalEditorAction { - constructor(id, label, alias, precondition, run, contextKeyService) { - this.id = id; - this.label = label; - this.alias = alias; - this._precondition = precondition; - this._run = run; - this._contextKeyService = contextKeyService; - } - isSupported() { - return this._contextKeyService.contextMatchesRules(this._precondition); - } - run() { - if (!this.isSupported()) { - return Promise.resolve(undefined); - } - return this._run(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js ***! - \*************************************************************************/ -/*! exports provided: isThemeColor, EditorType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isThemeColor", function() { return isThemeColor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorType", function() { return EditorType; }); -/** - * @internal - */ -function isThemeColor(o) { - return o && typeof o.id === 'string'; -} -/** - * The type of the `IEditor`. - */ -const EditorType = { - ICodeEditor: 'vs.editor.ICodeEditor', - IDiffEditor: 'vs.editor.IDiffEditor' -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js ***! - \******************************************************************************/ -/*! exports provided: EditorContextKeys */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorContextKeys", function() { return EditorContextKeys; }); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var EditorContextKeys; -(function (EditorContextKeys) { - EditorContextKeys.editorSimpleInput = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorSimpleInput', false); - /** - * A context key that is set when the editor's text has focus (cursor is blinking). - * Is false when focus is in simple editor widgets (repl input, scm commit input). - */ - EditorContextKeys.editorTextFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorTextFocus', false); - /** - * A context key that is set when the editor's text or an editor's widget has focus. - */ - EditorContextKeys.focus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorFocus', false); - /** - * A context key that is set when any editor input has focus (regular editor, repl input...). - */ - EditorContextKeys.textInputFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('textInputFocus', false); - EditorContextKeys.readOnly = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorReadonly', false); - EditorContextKeys.columnSelection = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorColumnSelection', false); - EditorContextKeys.writable = EditorContextKeys.readOnly.toNegated(); - EditorContextKeys.hasNonEmptySelection = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasSelection', false); - EditorContextKeys.hasOnlyEmptySelection = EditorContextKeys.hasNonEmptySelection.toNegated(); - EditorContextKeys.hasMultipleSelections = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasMultipleSelections', false); - EditorContextKeys.hasSingleSelection = EditorContextKeys.hasMultipleSelections.toNegated(); - EditorContextKeys.tabMovesFocus = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorTabMovesFocus', false); - EditorContextKeys.tabDoesNotMoveFocus = EditorContextKeys.tabMovesFocus.toNegated(); - EditorContextKeys.isInWalkThroughSnippet = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('isInEmbeddedEditor', false); - EditorContextKeys.canUndo = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('canUndo', false); - EditorContextKeys.canRedo = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('canRedo', false); - EditorContextKeys.hoverVisible = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHoverVisible', false); - /** - * A context key that is set when an editor is part of a larger editor, like notebooks or - * (future) a diff editor - */ - EditorContextKeys.inCompositeEditor = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('inCompositeEditor', undefined); - EditorContextKeys.notInCompositeEditor = EditorContextKeys.inCompositeEditor.toNegated(); - // -- mode context keys - EditorContextKeys.languageId = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorLangId', ''); - EditorContextKeys.hasCompletionItemProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasCompletionItemProvider', false); - EditorContextKeys.hasCodeActionsProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasCodeActionsProvider', false); - EditorContextKeys.hasCodeLensProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasCodeLensProvider', false); - EditorContextKeys.hasDefinitionProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDefinitionProvider', false); - EditorContextKeys.hasDeclarationProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDeclarationProvider', false); - EditorContextKeys.hasImplementationProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasImplementationProvider', false); - EditorContextKeys.hasTypeDefinitionProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasTypeDefinitionProvider', false); - EditorContextKeys.hasHoverProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasHoverProvider', false); - EditorContextKeys.hasDocumentHighlightProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDocumentHighlightProvider', false); - EditorContextKeys.hasDocumentSymbolProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDocumentSymbolProvider', false); - EditorContextKeys.hasReferenceProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasReferenceProvider', false); - EditorContextKeys.hasRenameProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasRenameProvider', false); - EditorContextKeys.hasSignatureHelpProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasSignatureHelpProvider', false); - // -- mode context keys: formatting - EditorContextKeys.hasDocumentFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDocumentFormattingProvider', false); - EditorContextKeys.hasDocumentSelectionFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasDocumentSelectionFormattingProvider', false); - EditorContextKeys.hasMultipleDocumentFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasMultipleDocumentFormattingProvider', false); - EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('editorHasMultipleDocumentSelectionFormattingProvider', false); -})(EditorContextKeys || (EditorContextKeys = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model.js ***! - \******************************************************************/ -/*! exports provided: OverviewRulerLane, MinimapPosition, TextModelResolvedOptions, FindMatch, ValidAnnotatedEditOperation, ApplyEditsResult */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverviewRulerLane", function() { return OverviewRulerLane; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapPosition", function() { return MinimapPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextModelResolvedOptions", function() { return TextModelResolvedOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindMatch", function() { return FindMatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValidAnnotatedEditOperation", function() { return ValidAnnotatedEditOperation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplyEditsResult", function() { return ApplyEditsResult; }); -/** - * Vertical Lane in the overview ruler of the editor. - */ -var OverviewRulerLane; -(function (OverviewRulerLane) { - OverviewRulerLane[OverviewRulerLane["Left"] = 1] = "Left"; - OverviewRulerLane[OverviewRulerLane["Center"] = 2] = "Center"; - OverviewRulerLane[OverviewRulerLane["Right"] = 4] = "Right"; - OverviewRulerLane[OverviewRulerLane["Full"] = 7] = "Full"; -})(OverviewRulerLane || (OverviewRulerLane = {})); -/** - * Position in the minimap to render the decoration. - */ -var MinimapPosition; -(function (MinimapPosition) { - MinimapPosition[MinimapPosition["Inline"] = 1] = "Inline"; - MinimapPosition[MinimapPosition["Gutter"] = 2] = "Gutter"; -})(MinimapPosition || (MinimapPosition = {})); -class TextModelResolvedOptions { - /** - * @internal - */ - constructor(src) { - this.tabSize = Math.max(1, src.tabSize | 0); - this.indentSize = src.tabSize | 0; - this.insertSpaces = Boolean(src.insertSpaces); - this.defaultEOL = src.defaultEOL | 0; - this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace); - } - /** - * @internal - */ - equals(other) { - return (this.tabSize === other.tabSize - && this.indentSize === other.indentSize - && this.insertSpaces === other.insertSpaces - && this.defaultEOL === other.defaultEOL - && this.trimAutoWhitespace === other.trimAutoWhitespace); - } - /** - * @internal - */ - createChangeEvent(newOpts) { - return { - tabSize: this.tabSize !== newOpts.tabSize, - indentSize: this.indentSize !== newOpts.indentSize, - insertSpaces: this.insertSpaces !== newOpts.insertSpaces, - trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace, - }; - } -} -class FindMatch { - /** - * @internal - */ - constructor(range, matches) { - this.range = range; - this.matches = matches; - } -} -/** - * @internal - */ -class ValidAnnotatedEditOperation { - constructor(identifier, range, text, forceMoveMarkers, isAutoWhitespaceEdit, _isTracked) { - this.identifier = identifier; - this.range = range; - this.text = text; - this.forceMoveMarkers = forceMoveMarkers; - this.isAutoWhitespaceEdit = isAutoWhitespaceEdit; - this._isTracked = _isTracked; - } -} -/** - * @internal - */ -class ApplyEditsResult { - constructor(reverseEdits, changes, trimAutoWhitespaceLineNumbers) { - this.reverseEdits = reverseEdits; - this.changes = changes; - this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js ***! - \****************************************************************************/ -/*! exports provided: SingleModelEditStackElement, MultiModelEditStackElement, isEditStackElement, EditStack */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SingleModelEditStackElement", function() { return SingleModelEditStackElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiModelEditStackElement", function() { return MultiModelEditStackElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEditStackElement", function() { return isEditStackElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditStack", function() { return EditStack; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _textChange_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textChange.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js"); -/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/buffer.js */ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -function uriGetComparisonKey(resource) { - return resource.toString(); -} -class SingleModelEditStackData { - constructor(beforeVersionId, afterVersionId, beforeEOL, afterEOL, beforeCursorState, afterCursorState, changes) { - this.beforeVersionId = beforeVersionId; - this.afterVersionId = afterVersionId; - this.beforeEOL = beforeEOL; - this.afterEOL = afterEOL; - this.beforeCursorState = beforeCursorState; - this.afterCursorState = afterCursorState; - this.changes = changes; - } - static create(model, beforeCursorState) { - const alternativeVersionId = model.getAlternativeVersionId(); - const eol = getModelEOL(model); - return new SingleModelEditStackData(alternativeVersionId, alternativeVersionId, eol, eol, beforeCursorState, beforeCursorState, []); - } - append(model, textChanges, afterEOL, afterVersionId, afterCursorState) { - if (textChanges.length > 0) { - this.changes = Object(_textChange_js__WEBPACK_IMPORTED_MODULE_4__["compressConsecutiveTextChanges"])(this.changes, textChanges); - } - this.afterEOL = afterEOL; - this.afterVersionId = afterVersionId; - this.afterCursorState = afterCursorState; - } - static _writeSelectionsSize(selections) { - return 4 + 4 * 4 * (selections ? selections.length : 0); - } - static _writeSelections(b, selections, offset) { - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, (selections ? selections.length : 0), offset); - offset += 4; - if (selections) { - for (const selection of selections) { - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, selection.selectionStartLineNumber, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, selection.selectionStartColumn, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, selection.positionLineNumber, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, selection.positionColumn, offset); - offset += 4; - } - } - return offset; - } - static _readSelections(b, offset, dest) { - const count = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - for (let i = 0; i < count; i++) { - const selectionStartLineNumber = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const selectionStartColumn = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const positionLineNumber = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const positionColumn = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - dest.push(new _core_selection_js__WEBPACK_IMPORTED_MODULE_2__["Selection"](selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn)); - } - return offset; - } - serialize() { - let necessarySize = (+4 // beforeVersionId - + 4 // afterVersionId - + 1 // beforeEOL - + 1 // afterEOL - + SingleModelEditStackData._writeSelectionsSize(this.beforeCursorState) - + SingleModelEditStackData._writeSelectionsSize(this.afterCursorState) - + 4 // change count - ); - for (const change of this.changes) { - necessarySize += change.writeSize(); - } - const b = new Uint8Array(necessarySize); - let offset = 0; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, this.beforeVersionId, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, this.afterVersionId, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt8"](b, this.beforeEOL, offset); - offset += 1; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt8"](b, this.afterEOL, offset); - offset += 1; - offset = SingleModelEditStackData._writeSelections(b, this.beforeCursorState, offset); - offset = SingleModelEditStackData._writeSelections(b, this.afterCursorState, offset); - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["writeUInt32BE"](b, this.changes.length, offset); - offset += 4; - for (const change of this.changes) { - offset = change.write(b, offset); - } - return b.buffer; - } - static deserialize(source) { - const b = new Uint8Array(source); - let offset = 0; - const beforeVersionId = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const afterVersionId = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const beforeEOL = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt8"](b, offset); - offset += 1; - const afterEOL = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt8"](b, offset); - offset += 1; - const beforeCursorState = []; - offset = SingleModelEditStackData._readSelections(b, offset, beforeCursorState); - const afterCursorState = []; - offset = SingleModelEditStackData._readSelections(b, offset, afterCursorState); - const changeCount = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_5__["readUInt32BE"](b, offset); - offset += 4; - const changes = []; - for (let i = 0; i < changeCount; i++) { - offset = _textChange_js__WEBPACK_IMPORTED_MODULE_4__["TextChange"].read(b, offset, changes); - } - return new SingleModelEditStackData(beforeVersionId, afterVersionId, beforeEOL, afterEOL, beforeCursorState, afterCursorState, changes); - } -} -class SingleModelEditStackElement { - constructor(model, beforeCursorState) { - this.model = model; - this._data = SingleModelEditStackData.create(model, beforeCursorState); - } - get type() { - return 0 /* Resource */; - } - get resource() { - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].isUri(this.model)) { - return this.model; - } - return this.model.uri; - } - get label() { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('edit', "Typing"); - } - toString() { - const data = (this._data instanceof SingleModelEditStackData ? this._data : SingleModelEditStackData.deserialize(this._data)); - return data.changes.map(change => change.toString()).join(', '); - } - matchesResource(resource) { - const uri = (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].isUri(this.model) ? this.model : this.model.uri); - return (uri.toString() === resource.toString()); - } - setModel(model) { - this.model = model; - } - canAppend(model) { - return (this.model === model && this._data instanceof SingleModelEditStackData); - } - append(model, textChanges, afterEOL, afterVersionId, afterCursorState) { - if (this._data instanceof SingleModelEditStackData) { - this._data.append(model, textChanges, afterEOL, afterVersionId, afterCursorState); - } - } - close() { - if (this._data instanceof SingleModelEditStackData) { - this._data = this._data.serialize(); - } - } - undo() { - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].isUri(this.model)) { - // don't have a model - throw new Error(`Invalid SingleModelEditStackElement`); - } - if (this._data instanceof SingleModelEditStackData) { - this._data = this._data.serialize(); - } - const data = SingleModelEditStackData.deserialize(this._data); - this.model._applyUndo(data.changes, data.beforeEOL, data.beforeVersionId, data.beforeCursorState); - } - redo() { - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].isUri(this.model)) { - // don't have a model - throw new Error(`Invalid SingleModelEditStackElement`); - } - if (this._data instanceof SingleModelEditStackData) { - this._data = this._data.serialize(); - } - const data = SingleModelEditStackData.deserialize(this._data); - this.model._applyRedo(data.changes, data.afterEOL, data.afterVersionId, data.afterCursorState); - } -} -class MultiModelEditStackElement { - constructor(label, editStackElements) { - this.type = 1 /* Workspace */; - this.label = label; - this._isOpen = true; - this._editStackElementsArr = editStackElements.slice(0); - this._editStackElementsMap = new Map(); - for (const editStackElement of this._editStackElementsArr) { - const key = uriGetComparisonKey(editStackElement.resource); - this._editStackElementsMap.set(key, editStackElement); - } - this._delegate = null; - } - get resources() { - return this._editStackElementsArr.map(editStackElement => editStackElement.resource); - } - prepareUndoRedo() { - if (this._delegate) { - return this._delegate.prepareUndoRedo(this); - } - } - matchesResource(resource) { - const key = uriGetComparisonKey(resource); - return (this._editStackElementsMap.has(key)); - } - setModel(model) { - const key = uriGetComparisonKey(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].isUri(model) ? model : model.uri); - if (this._editStackElementsMap.has(key)) { - this._editStackElementsMap.get(key).setModel(model); - } - } - canAppend(model) { - if (!this._isOpen) { - return false; - } - const key = uriGetComparisonKey(model.uri); - if (this._editStackElementsMap.has(key)) { - const editStackElement = this._editStackElementsMap.get(key); - return editStackElement.canAppend(model); - } - return false; - } - append(model, textChanges, afterEOL, afterVersionId, afterCursorState) { - const key = uriGetComparisonKey(model.uri); - const editStackElement = this._editStackElementsMap.get(key); - editStackElement.append(model, textChanges, afterEOL, afterVersionId, afterCursorState); - } - close() { - this._isOpen = false; - } - undo() { - this._isOpen = false; - for (const editStackElement of this._editStackElementsArr) { - editStackElement.undo(); - } - } - redo() { - for (const editStackElement of this._editStackElementsArr) { - editStackElement.redo(); - } - } - split() { - return this._editStackElementsArr; - } -} -function getModelEOL(model) { - const eol = model.getEOL(); - if (eol === '\n') { - return 0 /* LF */; - } - else { - return 1 /* CRLF */; - } -} -function isEditStackElement(element) { - if (!element) { - return false; - } - return ((element instanceof SingleModelEditStackElement) || (element instanceof MultiModelEditStackElement)); -} -class EditStack { - constructor(model, undoRedoService) { - this._model = model; - this._undoRedoService = undoRedoService; - } - pushStackElement() { - const lastElement = this._undoRedoService.getLastElement(this._model.uri); - if (isEditStackElement(lastElement)) { - lastElement.close(); - } - } - clear() { - this._undoRedoService.removeElements(this._model.uri); - } - _getOrCreateEditStackElement(beforeCursorState) { - const lastElement = this._undoRedoService.getLastElement(this._model.uri); - if (isEditStackElement(lastElement) && lastElement.canAppend(this._model)) { - return lastElement; - } - const newElement = new SingleModelEditStackElement(this._model, beforeCursorState); - this._undoRedoService.pushElement(newElement); - return newElement; - } - pushEOL(eol) { - const editStackElement = this._getOrCreateEditStackElement(null); - this._model.setEOL(eol); - editStackElement.append(this._model, [], getModelEOL(this._model), this._model.getAlternativeVersionId(), null); - } - pushEditOperation(beforeCursorState, editOperations, cursorStateComputer) { - const editStackElement = this._getOrCreateEditStackElement(beforeCursorState); - const inverseEditOperations = this._model.applyEdits(editOperations, true); - const afterCursorState = EditStack._computeCursorState(cursorStateComputer, inverseEditOperations); - const textChanges = inverseEditOperations.map((op, index) => ({ index: index, textChange: op.textChange })); - textChanges.sort((a, b) => { - if (a.textChange.oldPosition === b.textChange.oldPosition) { - return a.index - b.index; - } - return a.textChange.oldPosition - b.textChange.oldPosition; - }); - editStackElement.append(this._model, textChanges.map(op => op.textChange), getModelEOL(this._model), this._model.getAlternativeVersionId(), afterCursorState); - return afterCursorState; - } - static _computeCursorState(cursorStateComputer, inverseEditOperations) { - try { - return cursorStateComputer ? cursorStateComputer(inverseEditOperations) : null; - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - return null; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js ***! - \*************************************************************************************/ -/*! exports provided: guessIndentation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "guessIndentation", function() { return guessIndentation; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class SpacesDiffResult { - constructor() { - this.spacesDiff = 0; - this.looksLikeAlignment = false; - } -} -/** - * Compute the diff in spaces between two line's indentation. - */ -function spacesDiff(a, aLength, b, bLength, result) { - result.spacesDiff = 0; - result.looksLikeAlignment = false; - // This can go both ways (e.g.): - // - a: "\t" - // - b: "\t " - // => This should count 1 tab and 4 spaces - let i; - for (i = 0; i < aLength && i < bLength; i++) { - let aCharCode = a.charCodeAt(i); - let bCharCode = b.charCodeAt(i); - if (aCharCode !== bCharCode) { - break; - } - } - let aSpacesCnt = 0, aTabsCount = 0; - for (let j = i; j < aLength; j++) { - let aCharCode = a.charCodeAt(j); - if (aCharCode === 32 /* Space */) { - aSpacesCnt++; - } - else { - aTabsCount++; - } - } - let bSpacesCnt = 0, bTabsCount = 0; - for (let j = i; j < bLength; j++) { - let bCharCode = b.charCodeAt(j); - if (bCharCode === 32 /* Space */) { - bSpacesCnt++; - } - else { - bTabsCount++; - } - } - if (aSpacesCnt > 0 && aTabsCount > 0) { - return; - } - if (bSpacesCnt > 0 && bTabsCount > 0) { - return; - } - let tabsDiff = Math.abs(aTabsCount - bTabsCount); - let spacesDiff = Math.abs(aSpacesCnt - bSpacesCnt); - if (tabsDiff === 0) { - // check if the indentation difference might be caused by alignment reasons - // sometime folks like to align their code, but this should not be used as a hint - result.spacesDiff = spacesDiff; - if (spacesDiff > 0 && 0 <= bSpacesCnt - 1 && bSpacesCnt - 1 < a.length && bSpacesCnt < b.length) { - if (b.charCodeAt(bSpacesCnt) !== 32 /* Space */ && a.charCodeAt(bSpacesCnt - 1) === 32 /* Space */) { - if (a.charCodeAt(a.length - 1) === 44 /* Comma */) { - // This looks like an alignment desire: e.g. - // const a = b + c, - // d = b - c; - result.looksLikeAlignment = true; - } - } - } - return; - } - if (spacesDiff % tabsDiff === 0) { - result.spacesDiff = spacesDiff / tabsDiff; - return; - } -} -function guessIndentation(source, defaultTabSize, defaultInsertSpaces) { - // Look at most at the first 10k lines - const linesCount = Math.min(source.getLineCount(), 10000); - let linesIndentedWithTabsCount = 0; // number of lines that contain at least one tab in indentation - let linesIndentedWithSpacesCount = 0; // number of lines that contain only spaces in indentation - let previousLineText = ''; // content of latest line that contained non-whitespace chars - let previousLineIndentation = 0; // index at which latest line contained the first non-whitespace char - const ALLOWED_TAB_SIZE_GUESSES = [2, 4, 6, 8, 3, 5, 7]; // prefer even guesses for `tabSize`, limit to [2, 8]. - const MAX_ALLOWED_TAB_SIZE_GUESS = 8; // max(ALLOWED_TAB_SIZE_GUESSES) = 8 - let spacesDiffCount = [0, 0, 0, 0, 0, 0, 0, 0, 0]; // `tabSize` scores - let tmp = new SpacesDiffResult(); - for (let lineNumber = 1; lineNumber <= linesCount; lineNumber++) { - let currentLineLength = source.getLineLength(lineNumber); - let currentLineText = source.getLineContent(lineNumber); - // if the text buffer is chunk based, so long lines are cons-string, v8 will flattern the string when we check charCode. - // checking charCode on chunks directly is cheaper. - const useCurrentLineText = (currentLineLength <= 65536); - let currentLineHasContent = false; // does `currentLineText` contain non-whitespace chars - let currentLineIndentation = 0; // index at which `currentLineText` contains the first non-whitespace char - let currentLineSpacesCount = 0; // count of spaces found in `currentLineText` indentation - let currentLineTabsCount = 0; // count of tabs found in `currentLineText` indentation - for (let j = 0, lenJ = currentLineLength; j < lenJ; j++) { - let charCode = (useCurrentLineText ? currentLineText.charCodeAt(j) : source.getLineCharCode(lineNumber, j)); - if (charCode === 9 /* Tab */) { - currentLineTabsCount++; - } - else if (charCode === 32 /* Space */) { - currentLineSpacesCount++; - } - else { - // Hit non whitespace character on this line - currentLineHasContent = true; - currentLineIndentation = j; - break; - } - } - // Ignore empty or only whitespace lines - if (!currentLineHasContent) { - continue; - } - if (currentLineTabsCount > 0) { - linesIndentedWithTabsCount++; - } - else if (currentLineSpacesCount > 1) { - linesIndentedWithSpacesCount++; - } - spacesDiff(previousLineText, previousLineIndentation, currentLineText, currentLineIndentation, tmp); - if (tmp.looksLikeAlignment) { - // if defaultInsertSpaces === true && the spaces count == tabSize, we may want to count it as valid indentation - // - // - item1 - // - item2 - // - // otherwise skip this line entirely - // - // const a = 1, - // b = 2; - if (!(defaultInsertSpaces && defaultTabSize === tmp.spacesDiff)) { - continue; - } - } - let currentSpacesDiff = tmp.spacesDiff; - if (currentSpacesDiff <= MAX_ALLOWED_TAB_SIZE_GUESS) { - spacesDiffCount[currentSpacesDiff]++; - } - previousLineText = currentLineText; - previousLineIndentation = currentLineIndentation; - } - let insertSpaces = defaultInsertSpaces; - if (linesIndentedWithTabsCount !== linesIndentedWithSpacesCount) { - insertSpaces = (linesIndentedWithTabsCount < linesIndentedWithSpacesCount); - } - let tabSize = defaultTabSize; - // Guess tabSize only if inserting spaces... - if (insertSpaces) { - let tabSizeScore = (insertSpaces ? 0 : 0.1 * linesCount); - // console.log("score threshold: " + tabSizeScore); - ALLOWED_TAB_SIZE_GUESSES.forEach((possibleTabSize) => { - let possibleTabSizeScore = spacesDiffCount[possibleTabSize]; - if (possibleTabSizeScore > tabSizeScore) { - tabSizeScore = possibleTabSizeScore; - tabSize = possibleTabSize; - } - }); - // Let a tabSize of 2 win even if it is not the maximum - // (only in case 4 was guessed) - if (tabSize === 4 && spacesDiffCount[4] > 0 && spacesDiffCount[2] > 0 && spacesDiffCount[2] >= spacesDiffCount[4] / 2) { - tabSize = 2; - } - } - // console.log('--------------------------'); - // console.log('linesIndentedWithTabsCount: ' + linesIndentedWithTabsCount + ', linesIndentedWithSpacesCount: ' + linesIndentedWithSpacesCount); - // console.log('spacesDiffCount: ' + spacesDiffCount); - // console.log('tabSize: ' + tabSize + ', tabSizeScore: ' + tabSizeScore); - return { - insertSpaces: insertSpaces, - tabSize: tabSize - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js ***! - \*******************************************************************************/ -/*! exports provided: getNodeColor, getNodeIsInOverviewRuler, IntervalNode, SENTINEL, IntervalTree, nodeAcceptEdit, recomputeMaxEnd, intervalCompare */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodeColor", function() { return getNodeColor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodeIsInOverviewRuler", function() { return getNodeIsInOverviewRuler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntervalNode", function() { return IntervalNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SENTINEL", function() { return SENTINEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntervalTree", function() { return IntervalTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeAcceptEdit", function() { return nodeAcceptEdit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recomputeMaxEnd", function() { return recomputeMaxEnd; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intervalCompare", function() { return intervalCompare; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function getNodeColor(node) { - return ((node.metadata & 1 /* ColorMask */) >>> 0 /* ColorOffset */); -} -function setNodeColor(node, color) { - node.metadata = ((node.metadata & 254 /* ColorMaskInverse */) | (color << 0 /* ColorOffset */)); -} -function getNodeIsVisited(node) { - return ((node.metadata & 2 /* IsVisitedMask */) >>> 1 /* IsVisitedOffset */) === 1; -} -function setNodeIsVisited(node, value) { - node.metadata = ((node.metadata & 253 /* IsVisitedMaskInverse */) | ((value ? 1 : 0) << 1 /* IsVisitedOffset */)); -} -function getNodeIsForValidation(node) { - return ((node.metadata & 4 /* IsForValidationMask */) >>> 2 /* IsForValidationOffset */) === 1; -} -function setNodeIsForValidation(node, value) { - node.metadata = ((node.metadata & 251 /* IsForValidationMaskInverse */) | ((value ? 1 : 0) << 2 /* IsForValidationOffset */)); -} -function getNodeIsInOverviewRuler(node) { - return ((node.metadata & 8 /* IsInOverviewRulerMask */) >>> 3 /* IsInOverviewRulerOffset */) === 1; -} -function setNodeIsInOverviewRuler(node, value) { - node.metadata = ((node.metadata & 247 /* IsInOverviewRulerMaskInverse */) | ((value ? 1 : 0) << 3 /* IsInOverviewRulerOffset */)); -} -function getNodeStickiness(node) { - return ((node.metadata & 48 /* StickinessMask */) >>> 4 /* StickinessOffset */); -} -function _setNodeStickiness(node, stickiness) { - node.metadata = ((node.metadata & 207 /* StickinessMaskInverse */) | (stickiness << 4 /* StickinessOffset */)); -} -function getCollapseOnReplaceEdit(node) { - return ((node.metadata & 64 /* CollapseOnReplaceEditMask */) >>> 6 /* CollapseOnReplaceEditOffset */) === 1; -} -function setCollapseOnReplaceEdit(node, value) { - node.metadata = ((node.metadata & 191 /* CollapseOnReplaceEditMaskInverse */) | ((value ? 1 : 0) << 6 /* CollapseOnReplaceEditOffset */)); -} -class IntervalNode { - constructor(id, start, end) { - this.metadata = 0; - this.parent = this; - this.left = this; - this.right = this; - setNodeColor(this, 1 /* Red */); - this.start = start; - this.end = end; - // FORCE_OVERFLOWING_TEST: this.delta = start; - this.delta = 0; - this.maxEnd = end; - this.id = id; - this.ownerId = 0; - this.options = null; - setNodeIsForValidation(this, false); - _setNodeStickiness(this, 1 /* NeverGrowsWhenTypingAtEdges */); - setNodeIsInOverviewRuler(this, false); - setCollapseOnReplaceEdit(this, false); - this.cachedVersionId = 0; - this.cachedAbsoluteStart = start; - this.cachedAbsoluteEnd = end; - this.range = null; - setNodeIsVisited(this, false); - } - reset(versionId, start, end, range) { - this.start = start; - this.end = end; - this.maxEnd = end; - this.cachedVersionId = versionId; - this.cachedAbsoluteStart = start; - this.cachedAbsoluteEnd = end; - this.range = range; - } - setOptions(options) { - this.options = options; - let className = this.options.className; - setNodeIsForValidation(this, (className === "squiggly-error" /* EditorErrorDecoration */ - || className === "squiggly-warning" /* EditorWarningDecoration */ - || className === "squiggly-info" /* EditorInfoDecoration */)); - _setNodeStickiness(this, this.options.stickiness); - setNodeIsInOverviewRuler(this, (this.options.overviewRuler && this.options.overviewRuler.color) ? true : false); - setCollapseOnReplaceEdit(this, this.options.collapseOnReplaceEdit); - } - setCachedOffsets(absoluteStart, absoluteEnd, cachedVersionId) { - if (this.cachedVersionId !== cachedVersionId) { - this.range = null; - } - this.cachedVersionId = cachedVersionId; - this.cachedAbsoluteStart = absoluteStart; - this.cachedAbsoluteEnd = absoluteEnd; - } - detach() { - this.parent = null; - this.left = null; - this.right = null; - } -} -const SENTINEL = new IntervalNode(null, 0, 0); -SENTINEL.parent = SENTINEL; -SENTINEL.left = SENTINEL; -SENTINEL.right = SENTINEL; -setNodeColor(SENTINEL, 0 /* Black */); -class IntervalTree { - constructor() { - this.root = SENTINEL; - this.requestNormalizeDelta = false; - } - intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId) { - if (this.root === SENTINEL) { - return []; - } - return intervalSearch(this, start, end, filterOwnerId, filterOutValidation, cachedVersionId); - } - search(filterOwnerId, filterOutValidation, cachedVersionId) { - if (this.root === SENTINEL) { - return []; - } - return search(this, filterOwnerId, filterOutValidation, cachedVersionId); - } - /** - * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes! - */ - collectNodesFromOwner(ownerId) { - return collectNodesFromOwner(this, ownerId); - } - /** - * Will not set `cachedAbsoluteStart` nor `cachedAbsoluteEnd` on the returned nodes! - */ - collectNodesPostOrder() { - return collectNodesPostOrder(this); - } - insert(node) { - rbTreeInsert(this, node); - this._normalizeDeltaIfNecessary(); - } - delete(node) { - rbTreeDelete(this, node); - this._normalizeDeltaIfNecessary(); - } - resolveNode(node, cachedVersionId) { - const initialNode = node; - let delta = 0; - while (node !== this.root) { - if (node === node.parent.right) { - delta += node.parent.delta; - } - node = node.parent; - } - const nodeStart = initialNode.start + delta; - const nodeEnd = initialNode.end + delta; - initialNode.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId); - } - acceptReplace(offset, length, textLength, forceMoveMarkers) { - // Our strategy is to remove all directly impacted nodes, and then add them back to the tree. - // (1) collect all nodes that are intersecting this edit as nodes of interest - const nodesOfInterest = searchForEditing(this, offset, offset + length); - // (2) remove all nodes that are intersecting this edit - for (let i = 0, len = nodesOfInterest.length; i < len; i++) { - const node = nodesOfInterest[i]; - rbTreeDelete(this, node); - } - this._normalizeDeltaIfNecessary(); - // (3) edit all tree nodes except the nodes of interest - noOverlapReplace(this, offset, offset + length, textLength); - this._normalizeDeltaIfNecessary(); - // (4) edit the nodes of interest and insert them back in the tree - for (let i = 0, len = nodesOfInterest.length; i < len; i++) { - const node = nodesOfInterest[i]; - node.start = node.cachedAbsoluteStart; - node.end = node.cachedAbsoluteEnd; - nodeAcceptEdit(node, offset, (offset + length), textLength, forceMoveMarkers); - node.maxEnd = node.end; - rbTreeInsert(this, node); - } - this._normalizeDeltaIfNecessary(); - } - _normalizeDeltaIfNecessary() { - if (!this.requestNormalizeDelta) { - return; - } - this.requestNormalizeDelta = false; - normalizeDelta(this); - } -} -//#region Delta Normalization -function normalizeDelta(T) { - let node = T.root; - let delta = 0; - while (node !== SENTINEL) { - if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) { - // go left - node = node.left; - continue; - } - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - delta += node.delta; - node = node.right; - continue; - } - // handle current node - node.start = delta + node.start; - node.end = delta + node.end; - node.delta = 0; - recomputeMaxEnd(node); - setNodeIsVisited(node, true); - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - if (node === node.parent.right) { - delta -= node.parent.delta; - } - node = node.parent; - } - setNodeIsVisited(T.root, false); -} -function adjustMarkerBeforeColumn(markerOffset, markerStickToPreviousCharacter, checkOffset, moveSemantics) { - if (markerOffset < checkOffset) { - return true; - } - if (markerOffset > checkOffset) { - return false; - } - if (moveSemantics === 1 /* ForceMove */) { - return false; - } - if (moveSemantics === 2 /* ForceStay */) { - return true; - } - return markerStickToPreviousCharacter; -} -/** - * This is a lot more complicated than strictly necessary to maintain the same behaviour - * as when decorations were implemented using two markers. - */ -function nodeAcceptEdit(node, start, end, textLength, forceMoveMarkers) { - const nodeStickiness = getNodeStickiness(node); - const startStickToPreviousCharacter = (nodeStickiness === 0 /* AlwaysGrowsWhenTypingAtEdges */ - || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */); - const endStickToPreviousCharacter = (nodeStickiness === 1 /* NeverGrowsWhenTypingAtEdges */ - || nodeStickiness === 2 /* GrowsOnlyWhenTypingBefore */); - const deletingCnt = (end - start); - const insertingCnt = textLength; - const commonLength = Math.min(deletingCnt, insertingCnt); - const nodeStart = node.start; - let startDone = false; - const nodeEnd = node.end; - let endDone = false; - if (start <= nodeStart && nodeEnd <= end && getCollapseOnReplaceEdit(node)) { - // This edit encompasses the entire decoration range - // and the decoration has asked to become collapsed - node.start = start; - startDone = true; - node.end = start; - endDone = true; - } - { - const moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : (deletingCnt > 0 ? 2 /* ForceStay */ : 0 /* MarkerDefined */); - if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start, moveSemantics)) { - startDone = true; - } - if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start, moveSemantics)) { - endDone = true; - } - } - if (commonLength > 0 && !forceMoveMarkers) { - const moveSemantics = (deletingCnt > insertingCnt ? 2 /* ForceStay */ : 0 /* MarkerDefined */); - if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, start + commonLength, moveSemantics)) { - startDone = true; - } - if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, start + commonLength, moveSemantics)) { - endDone = true; - } - } - { - const moveSemantics = forceMoveMarkers ? 1 /* ForceMove */ : 0 /* MarkerDefined */; - if (!startDone && adjustMarkerBeforeColumn(nodeStart, startStickToPreviousCharacter, end, moveSemantics)) { - node.start = start + insertingCnt; - startDone = true; - } - if (!endDone && adjustMarkerBeforeColumn(nodeEnd, endStickToPreviousCharacter, end, moveSemantics)) { - node.end = start + insertingCnt; - endDone = true; - } - } - // Finish - const deltaColumn = (insertingCnt - deletingCnt); - if (!startDone) { - node.start = Math.max(0, nodeStart + deltaColumn); - } - if (!endDone) { - node.end = Math.max(0, nodeEnd + deltaColumn); - } - if (node.start > node.end) { - node.end = node.start; - } -} -function searchForEditing(T, start, end) { - // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree - // Now, it is known that two intervals A and B overlap only when both - // A.low <= B.high and A.high >= B.low. When searching the trees for - // nodes overlapping with a given interval, you can immediately skip: - // a) all nodes to the right of nodes whose low value is past the end of the given interval. - // b) all nodes that have their maximum 'high' value below the start of the given interval. - let node = T.root; - let delta = 0; - let nodeMaxEnd = 0; - let nodeStart = 0; - let nodeEnd = 0; - let result = []; - let resultLen = 0; - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - if (node === node.parent.right) { - delta -= node.parent.delta; - } - node = node.parent; - continue; - } - if (!getNodeIsVisited(node.left)) { - // first time seeing this node - nodeMaxEnd = delta + node.maxEnd; - if (nodeMaxEnd < start) { - // cover case b) from above - // there is no need to search this node or its children - setNodeIsVisited(node, true); - continue; - } - if (node.left !== SENTINEL) { - // go left - node = node.left; - continue; - } - } - // handle current node - nodeStart = delta + node.start; - if (nodeStart > end) { - // cover case a) from above - // there is no need to search this node or its right subtree - setNodeIsVisited(node, true); - continue; - } - nodeEnd = delta + node.end; - if (nodeEnd >= start) { - node.setCachedOffsets(nodeStart, nodeEnd, 0); - result[resultLen++] = node; - } - setNodeIsVisited(node, true); - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - delta += node.delta; - node = node.right; - continue; - } - } - setNodeIsVisited(T.root, false); - return result; -} -function noOverlapReplace(T, start, end, textLength) { - // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree - // Now, it is known that two intervals A and B overlap only when both - // A.low <= B.high and A.high >= B.low. When searching the trees for - // nodes overlapping with a given interval, you can immediately skip: - // a) all nodes to the right of nodes whose low value is past the end of the given interval. - // b) all nodes that have their maximum 'high' value below the start of the given interval. - let node = T.root; - let delta = 0; - let nodeMaxEnd = 0; - let nodeStart = 0; - const editDelta = (textLength - (end - start)); - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - if (node === node.parent.right) { - delta -= node.parent.delta; - } - recomputeMaxEnd(node); - node = node.parent; - continue; - } - if (!getNodeIsVisited(node.left)) { - // first time seeing this node - nodeMaxEnd = delta + node.maxEnd; - if (nodeMaxEnd < start) { - // cover case b) from above - // there is no need to search this node or its children - setNodeIsVisited(node, true); - continue; - } - if (node.left !== SENTINEL) { - // go left - node = node.left; - continue; - } - } - // handle current node - nodeStart = delta + node.start; - if (nodeStart > end) { - node.start += editDelta; - node.end += editDelta; - node.delta += editDelta; - if (node.delta < -1073741824 /* MIN_SAFE_DELTA */ || node.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - // cover case a) from above - // there is no need to search this node or its right subtree - setNodeIsVisited(node, true); - continue; - } - setNodeIsVisited(node, true); - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - delta += node.delta; - node = node.right; - continue; - } - } - setNodeIsVisited(T.root, false); -} -//#endregion -//#region Searching -function collectNodesFromOwner(T, ownerId) { - let node = T.root; - let result = []; - let resultLen = 0; - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - node = node.parent; - continue; - } - if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) { - // go left - node = node.left; - continue; - } - // handle current node - if (node.ownerId === ownerId) { - result[resultLen++] = node; - } - setNodeIsVisited(node, true); - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - node = node.right; - continue; - } - } - setNodeIsVisited(T.root, false); - return result; -} -function collectNodesPostOrder(T) { - let node = T.root; - let result = []; - let resultLen = 0; - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - node = node.parent; - continue; - } - if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) { - // go left - node = node.left; - continue; - } - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - node = node.right; - continue; - } - // handle current node - result[resultLen++] = node; - setNodeIsVisited(node, true); - } - setNodeIsVisited(T.root, false); - return result; -} -function search(T, filterOwnerId, filterOutValidation, cachedVersionId) { - let node = T.root; - let delta = 0; - let nodeStart = 0; - let nodeEnd = 0; - let result = []; - let resultLen = 0; - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - if (node === node.parent.right) { - delta -= node.parent.delta; - } - node = node.parent; - continue; - } - if (node.left !== SENTINEL && !getNodeIsVisited(node.left)) { - // go left - node = node.left; - continue; - } - // handle current node - nodeStart = delta + node.start; - nodeEnd = delta + node.end; - node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId); - let include = true; - if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) { - include = false; - } - if (filterOutValidation && getNodeIsForValidation(node)) { - include = false; - } - if (include) { - result[resultLen++] = node; - } - setNodeIsVisited(node, true); - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - delta += node.delta; - node = node.right; - continue; - } - } - setNodeIsVisited(T.root, false); - return result; -} -function intervalSearch(T, intervalStart, intervalEnd, filterOwnerId, filterOutValidation, cachedVersionId) { - // https://en.wikipedia.org/wiki/Interval_tree#Augmented_tree - // Now, it is known that two intervals A and B overlap only when both - // A.low <= B.high and A.high >= B.low. When searching the trees for - // nodes overlapping with a given interval, you can immediately skip: - // a) all nodes to the right of nodes whose low value is past the end of the given interval. - // b) all nodes that have their maximum 'high' value below the start of the given interval. - let node = T.root; - let delta = 0; - let nodeMaxEnd = 0; - let nodeStart = 0; - let nodeEnd = 0; - let result = []; - let resultLen = 0; - while (node !== SENTINEL) { - if (getNodeIsVisited(node)) { - // going up from this node - setNodeIsVisited(node.left, false); - setNodeIsVisited(node.right, false); - if (node === node.parent.right) { - delta -= node.parent.delta; - } - node = node.parent; - continue; - } - if (!getNodeIsVisited(node.left)) { - // first time seeing this node - nodeMaxEnd = delta + node.maxEnd; - if (nodeMaxEnd < intervalStart) { - // cover case b) from above - // there is no need to search this node or its children - setNodeIsVisited(node, true); - continue; - } - if (node.left !== SENTINEL) { - // go left - node = node.left; - continue; - } - } - // handle current node - nodeStart = delta + node.start; - if (nodeStart > intervalEnd) { - // cover case a) from above - // there is no need to search this node or its right subtree - setNodeIsVisited(node, true); - continue; - } - nodeEnd = delta + node.end; - if (nodeEnd >= intervalStart) { - // There is overlap - node.setCachedOffsets(nodeStart, nodeEnd, cachedVersionId); - let include = true; - if (filterOwnerId && node.ownerId && node.ownerId !== filterOwnerId) { - include = false; - } - if (filterOutValidation && getNodeIsForValidation(node)) { - include = false; - } - if (include) { - result[resultLen++] = node; - } - } - setNodeIsVisited(node, true); - if (node.right !== SENTINEL && !getNodeIsVisited(node.right)) { - // go right - delta += node.delta; - node = node.right; - continue; - } - } - setNodeIsVisited(T.root, false); - return result; -} -//#endregion -//#region Insertion -function rbTreeInsert(T, newNode) { - if (T.root === SENTINEL) { - newNode.parent = SENTINEL; - newNode.left = SENTINEL; - newNode.right = SENTINEL; - setNodeColor(newNode, 0 /* Black */); - T.root = newNode; - return T.root; - } - treeInsert(T, newNode); - recomputeMaxEndWalkToRoot(newNode.parent); - // repair tree - let x = newNode; - while (x !== T.root && getNodeColor(x.parent) === 1 /* Red */) { - if (x.parent === x.parent.parent.left) { - const y = x.parent.parent.right; - if (getNodeColor(y) === 1 /* Red */) { - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(y, 0 /* Black */); - setNodeColor(x.parent.parent, 1 /* Red */); - x = x.parent.parent; - } - else { - if (x === x.parent.right) { - x = x.parent; - leftRotate(T, x); - } - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(x.parent.parent, 1 /* Red */); - rightRotate(T, x.parent.parent); - } - } - else { - const y = x.parent.parent.left; - if (getNodeColor(y) === 1 /* Red */) { - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(y, 0 /* Black */); - setNodeColor(x.parent.parent, 1 /* Red */); - x = x.parent.parent; - } - else { - if (x === x.parent.left) { - x = x.parent; - rightRotate(T, x); - } - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(x.parent.parent, 1 /* Red */); - leftRotate(T, x.parent.parent); - } - } - } - setNodeColor(T.root, 0 /* Black */); - return newNode; -} -function treeInsert(T, z) { - let delta = 0; - let x = T.root; - const zAbsoluteStart = z.start; - const zAbsoluteEnd = z.end; - while (true) { - const cmp = intervalCompare(zAbsoluteStart, zAbsoluteEnd, x.start + delta, x.end + delta); - if (cmp < 0) { - // this node should be inserted to the left - // => it is not affected by the node's delta - if (x.left === SENTINEL) { - z.start -= delta; - z.end -= delta; - z.maxEnd -= delta; - x.left = z; - break; - } - else { - x = x.left; - } - } - else { - // this node should be inserted to the right - // => it is not affected by the node's delta - if (x.right === SENTINEL) { - z.start -= (delta + x.delta); - z.end -= (delta + x.delta); - z.maxEnd -= (delta + x.delta); - x.right = z; - break; - } - else { - delta += x.delta; - x = x.right; - } - } - } - z.parent = x; - z.left = SENTINEL; - z.right = SENTINEL; - setNodeColor(z, 1 /* Red */); -} -//#endregion -//#region Deletion -function rbTreeDelete(T, z) { - let x; - let y; - // RB-DELETE except we don't swap z and y in case c) - // i.e. we always delete what's pointed at by z. - if (z.left === SENTINEL) { - x = z.right; - y = z; - // x's delta is no longer influenced by z's delta - x.delta += z.delta; - if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - x.start += z.delta; - x.end += z.delta; - } - else if (z.right === SENTINEL) { - x = z.left; - y = z; - } - else { - y = leftest(z.right); - x = y.right; - // y's delta is no longer influenced by z's delta, - // but we don't want to walk the entire right-hand-side subtree of x. - // we therefore maintain z's delta in y, and adjust only x - x.start += y.delta; - x.end += y.delta; - x.delta += y.delta; - if (x.delta < -1073741824 /* MIN_SAFE_DELTA */ || x.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - y.start += z.delta; - y.end += z.delta; - y.delta = z.delta; - if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - } - if (y === T.root) { - T.root = x; - setNodeColor(x, 0 /* Black */); - z.detach(); - resetSentinel(); - recomputeMaxEnd(x); - T.root.parent = SENTINEL; - return; - } - let yWasRed = (getNodeColor(y) === 1 /* Red */); - if (y === y.parent.left) { - y.parent.left = x; - } - else { - y.parent.right = x; - } - if (y === z) { - x.parent = y.parent; - } - else { - if (y.parent === z) { - x.parent = y; - } - else { - x.parent = y.parent; - } - y.left = z.left; - y.right = z.right; - y.parent = z.parent; - setNodeColor(y, getNodeColor(z)); - if (z === T.root) { - T.root = y; - } - else { - if (z === z.parent.left) { - z.parent.left = y; - } - else { - z.parent.right = y; - } - } - if (y.left !== SENTINEL) { - y.left.parent = y; - } - if (y.right !== SENTINEL) { - y.right.parent = y; - } - } - z.detach(); - if (yWasRed) { - recomputeMaxEndWalkToRoot(x.parent); - if (y !== z) { - recomputeMaxEndWalkToRoot(y); - recomputeMaxEndWalkToRoot(y.parent); - } - resetSentinel(); - return; - } - recomputeMaxEndWalkToRoot(x); - recomputeMaxEndWalkToRoot(x.parent); - if (y !== z) { - recomputeMaxEndWalkToRoot(y); - recomputeMaxEndWalkToRoot(y.parent); - } - // RB-DELETE-FIXUP - let w; - while (x !== T.root && getNodeColor(x) === 0 /* Black */) { - if (x === x.parent.left) { - w = x.parent.right; - if (getNodeColor(w) === 1 /* Red */) { - setNodeColor(w, 0 /* Black */); - setNodeColor(x.parent, 1 /* Red */); - leftRotate(T, x.parent); - w = x.parent.right; - } - if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) { - setNodeColor(w, 1 /* Red */); - x = x.parent; - } - else { - if (getNodeColor(w.right) === 0 /* Black */) { - setNodeColor(w.left, 0 /* Black */); - setNodeColor(w, 1 /* Red */); - rightRotate(T, w); - w = x.parent.right; - } - setNodeColor(w, getNodeColor(x.parent)); - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(w.right, 0 /* Black */); - leftRotate(T, x.parent); - x = T.root; - } - } - else { - w = x.parent.left; - if (getNodeColor(w) === 1 /* Red */) { - setNodeColor(w, 0 /* Black */); - setNodeColor(x.parent, 1 /* Red */); - rightRotate(T, x.parent); - w = x.parent.left; - } - if (getNodeColor(w.left) === 0 /* Black */ && getNodeColor(w.right) === 0 /* Black */) { - setNodeColor(w, 1 /* Red */); - x = x.parent; - } - else { - if (getNodeColor(w.left) === 0 /* Black */) { - setNodeColor(w.right, 0 /* Black */); - setNodeColor(w, 1 /* Red */); - leftRotate(T, w); - w = x.parent.left; - } - setNodeColor(w, getNodeColor(x.parent)); - setNodeColor(x.parent, 0 /* Black */); - setNodeColor(w.left, 0 /* Black */); - rightRotate(T, x.parent); - x = T.root; - } - } - } - setNodeColor(x, 0 /* Black */); - resetSentinel(); -} -function leftest(node) { - while (node.left !== SENTINEL) { - node = node.left; - } - return node; -} -function resetSentinel() { - SENTINEL.parent = SENTINEL; - SENTINEL.delta = 0; // optional - SENTINEL.start = 0; // optional - SENTINEL.end = 0; // optional -} -//#endregion -//#region Rotations -function leftRotate(T, x) { - const y = x.right; // set y. - y.delta += x.delta; // y's delta is no longer influenced by x's delta - if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - y.start += x.delta; - y.end += x.delta; - x.right = y.left; // turn y's left subtree into x's right subtree. - if (y.left !== SENTINEL) { - y.left.parent = x; - } - y.parent = x.parent; // link x's parent to y. - if (x.parent === SENTINEL) { - T.root = y; - } - else if (x === x.parent.left) { - x.parent.left = y; - } - else { - x.parent.right = y; - } - y.left = x; // put x on y's left. - x.parent = y; - recomputeMaxEnd(x); - recomputeMaxEnd(y); -} -function rightRotate(T, y) { - const x = y.left; - y.delta -= x.delta; - if (y.delta < -1073741824 /* MIN_SAFE_DELTA */ || y.delta > 1073741824 /* MAX_SAFE_DELTA */) { - T.requestNormalizeDelta = true; - } - y.start -= x.delta; - y.end -= x.delta; - y.left = x.right; - if (x.right !== SENTINEL) { - x.right.parent = y; - } - x.parent = y.parent; - if (y.parent === SENTINEL) { - T.root = x; - } - else if (y === y.parent.right) { - y.parent.right = x; - } - else { - y.parent.left = x; - } - x.right = y; - y.parent = x; - recomputeMaxEnd(y); - recomputeMaxEnd(x); -} -//#endregion -//#region max end computation -function computeMaxEnd(node) { - let maxEnd = node.end; - if (node.left !== SENTINEL) { - const leftMaxEnd = node.left.maxEnd; - if (leftMaxEnd > maxEnd) { - maxEnd = leftMaxEnd; - } - } - if (node.right !== SENTINEL) { - const rightMaxEnd = node.right.maxEnd + node.delta; - if (rightMaxEnd > maxEnd) { - maxEnd = rightMaxEnd; - } - } - return maxEnd; -} -function recomputeMaxEnd(node) { - node.maxEnd = computeMaxEnd(node); -} -function recomputeMaxEndWalkToRoot(node) { - while (node !== SENTINEL) { - const maxEnd = computeMaxEnd(node); - if (node.maxEnd === maxEnd) { - // no need to go further - return; - } - node.maxEnd = maxEnd; - node = node.parent; - } -} -//#endregion -//#region utils -function intervalCompare(aStart, aEnd, bStart, bEnd) { - if (aStart === bStart) { - return aEnd - bEnd; - } - return aStart - bStart; -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js ***! - \**********************************************************************************/ -/*! exports provided: MirrorTextModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MirrorTextModel", function() { return MirrorTextModel; }); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _viewModel_prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../viewModel/prefixSumComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class MirrorTextModel { - constructor(uri, lines, eol, versionId) { - this._uri = uri; - this._lines = lines; - this._eol = eol; - this._versionId = versionId; - this._lineStarts = null; - this._cachedTextValue = null; - } - dispose() { - this._lines.length = 0; - } - getText() { - if (this._cachedTextValue === null) { - this._cachedTextValue = this._lines.join(this._eol); - } - return this._cachedTextValue; - } - onEvents(e) { - if (e.eol && e.eol !== this._eol) { - this._eol = e.eol; - this._lineStarts = null; - } - // Update my lines - const changes = e.changes; - for (const change of changes) { - this._acceptDeleteRange(change.range); - this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](change.range.startLineNumber, change.range.startColumn), change.text); - } - this._versionId = e.versionId; - this._cachedTextValue = null; - } - _ensureLineStarts() { - if (!this._lineStarts) { - const eolLength = this._eol.length; - const linesLength = this._lines.length; - const lineStartValues = new Uint32Array(linesLength); - for (let i = 0; i < linesLength; i++) { - lineStartValues[i] = this._lines[i].length + eolLength; - } - this._lineStarts = new _viewModel_prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_1__["PrefixSumComputer"](lineStartValues); - } - } - /** - * All changes to a line's text go through this method - */ - _setLineText(lineIndex, newValue) { - this._lines[lineIndex] = newValue; - if (this._lineStarts) { - // update prefix sum - this._lineStarts.changeValue(lineIndex, this._lines[lineIndex].length + this._eol.length); - } - } - _acceptDeleteRange(range) { - if (range.startLineNumber === range.endLineNumber) { - if (range.startColumn === range.endColumn) { - // Nothing to delete - return; - } - // Delete text on the affected line - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) - + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1)); - return; - } - // Take remaining text on last line and append it to remaining text on first line - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) - + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1)); - // Delete middle lines - this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); - if (this._lineStarts) { - // update prefix sum - this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber); - } - } - _acceptInsertText(position, insertText) { - if (insertText.length === 0) { - // Nothing to insert - return; - } - let insertLines = insertText.split(/\r\n|\r|\n/); - if (insertLines.length === 1) { - // Inserting text on one line - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) - + insertLines[0] - + this._lines[position.lineNumber - 1].substring(position.column - 1)); - return; - } - // Append overflowing text from first line to the end of text to insert - insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1); - // Delete overflowing text from first line and insert text on first line - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) - + insertLines[0]); - // Insert new lines & store lengths - let newLengths = new Uint32Array(insertLines.length - 1); - for (let i = 1; i < insertLines.length; i++) { - this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]); - newLengths[i - 1] = insertLines[i].length + this._eol.length; - } - if (this._lineStarts) { - // update prefix sum - this._lineStarts.insertValues(position.lineNumber, newLengths); - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js": -/*!****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js ***! - \****************************************************************************************************/ -/*! exports provided: AverageBufferSize, createUintArray, LineStarts, createLineStartsFast, createLineStarts, Piece, StringBuffer, PieceTreeBase */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AverageBufferSize", function() { return AverageBufferSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUintArray", function() { return createUintArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineStarts", function() { return LineStarts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLineStartsFast", function() { return createLineStartsFast; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLineStarts", function() { return createLineStarts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Piece", function() { return Piece; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringBuffer", function() { return StringBuffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieceTreeBase", function() { return PieceTreeBase; }); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rbTreeBase.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js"); -/* harmony import */ var _textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../textModelSearch.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -// const lfRegex = new RegExp(/\r\n|\r|\n/g); -const AverageBufferSize = 65535; -function createUintArray(arr) { - let r; - if (arr[arr.length - 1] < 65536) { - r = new Uint16Array(arr.length); - } - else { - r = new Uint32Array(arr.length); - } - r.set(arr, 0); - return r; -} -class LineStarts { - constructor(lineStarts, cr, lf, crlf, isBasicASCII) { - this.lineStarts = lineStarts; - this.cr = cr; - this.lf = lf; - this.crlf = crlf; - this.isBasicASCII = isBasicASCII; - } -} -function createLineStartsFast(str, readonly = true) { - let r = [0], rLength = 1; - for (let i = 0, len = str.length; i < len; i++) { - const chr = str.charCodeAt(i); - if (chr === 13 /* CarriageReturn */) { - if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) { - // \r\n... case - r[rLength++] = i + 2; - i++; // skip \n - } - else { - // \r... case - r[rLength++] = i + 1; - } - } - else if (chr === 10 /* LineFeed */) { - r[rLength++] = i + 1; - } - } - if (readonly) { - return createUintArray(r); - } - else { - return r; - } -} -function createLineStarts(r, str) { - r.length = 0; - r[0] = 0; - let rLength = 1; - let cr = 0, lf = 0, crlf = 0; - let isBasicASCII = true; - for (let i = 0, len = str.length; i < len; i++) { - const chr = str.charCodeAt(i); - if (chr === 13 /* CarriageReturn */) { - if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) { - // \r\n... case - crlf++; - r[rLength++] = i + 2; - i++; // skip \n - } - else { - cr++; - // \r... case - r[rLength++] = i + 1; - } - } - else if (chr === 10 /* LineFeed */) { - lf++; - r[rLength++] = i + 1; - } - else { - if (isBasicASCII) { - if (chr !== 9 /* Tab */ && (chr < 32 || chr > 126)) { - isBasicASCII = false; - } - } - } - } - const result = new LineStarts(createUintArray(r), cr, lf, crlf, isBasicASCII); - r.length = 0; - return result; -} -class Piece { - constructor(bufferIndex, start, end, lineFeedCnt, length) { - this.bufferIndex = bufferIndex; - this.start = start; - this.end = end; - this.lineFeedCnt = lineFeedCnt; - this.length = length; - } -} -class StringBuffer { - constructor(buffer, lineStarts) { - this.buffer = buffer; - this.lineStarts = lineStarts; - } -} -/** - * Readonly snapshot for piece tree. - * In a real multiple thread environment, to make snapshot reading always work correctly, we need to - * 1. Make TreeNode.piece immutable, then reading and writing can run in parallel. - * 2. TreeNode/Buffers normalization should not happen during snapshot reading. - */ -class PieceTreeSnapshot { - constructor(tree, BOM) { - this._pieces = []; - this._tree = tree; - this._BOM = BOM; - this._index = 0; - if (tree.root !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - tree.iterate(tree.root, node => { - if (node !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - this._pieces.push(node.piece); - } - return true; - }); - } - } - read() { - if (this._pieces.length === 0) { - if (this._index === 0) { - this._index++; - return this._BOM; - } - else { - return null; - } - } - if (this._index > this._pieces.length - 1) { - return null; - } - if (this._index === 0) { - return this._BOM + this._tree.getPieceContent(this._pieces[this._index++]); - } - return this._tree.getPieceContent(this._pieces[this._index++]); - } -} -class PieceTreeSearchCache { - constructor(limit) { - this._limit = limit; - this._cache = []; - } - get(offset) { - for (let i = this._cache.length - 1; i >= 0; i--) { - let nodePos = this._cache[i]; - if (nodePos.nodeStartOffset <= offset && nodePos.nodeStartOffset + nodePos.node.piece.length >= offset) { - return nodePos; - } - } - return null; - } - get2(lineNumber) { - for (let i = this._cache.length - 1; i >= 0; i--) { - let nodePos = this._cache[i]; - if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) { - return nodePos; - } - } - return null; - } - set(nodePosition) { - if (this._cache.length >= this._limit) { - this._cache.shift(); - } - this._cache.push(nodePosition); - } - validate(offset) { - let hasInvalidVal = false; - let tmp = this._cache; - for (let i = 0; i < tmp.length; i++) { - let nodePos = tmp[i]; - if (nodePos.node.parent === null || nodePos.nodeStartOffset >= offset) { - tmp[i] = null; - hasInvalidVal = true; - continue; - } - } - if (hasInvalidVal) { - let newArr = []; - for (const entry of tmp) { - if (entry !== null) { - newArr.push(entry); - } - } - this._cache = newArr; - } - } -} -class PieceTreeBase { - constructor(chunks, eol, eolNormalized) { - this.create(chunks, eol, eolNormalized); - } - create(chunks, eol, eolNormalized) { - this._buffers = [ - new StringBuffer('', [0]) - ]; - this._lastChangeBufferPos = { line: 0, column: 0 }; - this.root = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - this._lineCnt = 1; - this._length = 0; - this._EOL = eol; - this._EOLLength = eol.length; - this._EOLNormalized = eolNormalized; - let lastNode = null; - for (let i = 0, len = chunks.length; i < len; i++) { - if (chunks[i].buffer.length > 0) { - if (!chunks[i].lineStarts) { - chunks[i].lineStarts = createLineStartsFast(chunks[i].buffer); - } - let piece = new Piece(i + 1, { line: 0, column: 0 }, { line: chunks[i].lineStarts.length - 1, column: chunks[i].buffer.length - chunks[i].lineStarts[chunks[i].lineStarts.length - 1] }, chunks[i].lineStarts.length - 1, chunks[i].buffer.length); - this._buffers.push(chunks[i]); - lastNode = this.rbInsertRight(lastNode, piece); - } - } - this._searchCache = new PieceTreeSearchCache(1); - this._lastVisitedLine = { lineNumber: 0, value: '' }; - this.computeBufferMetadata(); - } - normalizeEOL(eol) { - let averageBufferSize = AverageBufferSize; - let min = averageBufferSize - Math.floor(averageBufferSize / 3); - let max = min * 2; - let tempChunk = ''; - let tempChunkLen = 0; - let chunks = []; - this.iterate(this.root, node => { - let str = this.getNodeContent(node); - let len = str.length; - if (tempChunkLen <= min || tempChunkLen + len < max) { - tempChunk += str; - tempChunkLen += len; - return true; - } - // flush anyways - let text = tempChunk.replace(/\r\n|\r|\n/g, eol); - chunks.push(new StringBuffer(text, createLineStartsFast(text))); - tempChunk = str; - tempChunkLen = len; - return true; - }); - if (tempChunkLen > 0) { - let text = tempChunk.replace(/\r\n|\r|\n/g, eol); - chunks.push(new StringBuffer(text, createLineStartsFast(text))); - } - this.create(chunks, eol, true); - } - // #region Buffer API - getEOL() { - return this._EOL; - } - setEOL(newEOL) { - this._EOL = newEOL; - this._EOLLength = this._EOL.length; - this.normalizeEOL(newEOL); - } - createSnapshot(BOM) { - return new PieceTreeSnapshot(this, BOM); - } - getOffsetAt(lineNumber, column) { - let leftLen = 0; // inorder - let x = this.root; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] && x.lf_left + 1 >= lineNumber) { - x = x.left; - } - else if (x.lf_left + x.piece.lineFeedCnt + 1 >= lineNumber) { - leftLen += x.size_left; - // lineNumber >= 2 - let accumualtedValInCurrentIndex = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - return leftLen += accumualtedValInCurrentIndex + column - 1; - } - else { - lineNumber -= x.lf_left + x.piece.lineFeedCnt; - leftLen += x.size_left + x.piece.length; - x = x.right; - } - } - return leftLen; - } - getPositionAt(offset) { - offset = Math.floor(offset); - offset = Math.max(0, offset); - let x = this.root; - let lfCnt = 0; - let originalOffset = offset; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.size_left !== 0 && x.size_left >= offset) { - x = x.left; - } - else if (x.size_left + x.piece.length >= offset) { - let out = this.getIndexOf(x, offset - x.size_left); - lfCnt += x.lf_left + out.index; - if (out.index === 0) { - let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1); - let column = originalOffset - lineStartOffset; - return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](lfCnt + 1, column + 1); - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](lfCnt + 1, out.remainder + 1); - } - else { - offset -= x.size_left + x.piece.length; - lfCnt += x.lf_left + x.piece.lineFeedCnt; - if (x.right === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - // last node - let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1); - let column = originalOffset - offset - lineStartOffset; - return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](lfCnt + 1, column + 1); - } - else { - x = x.right; - } - } - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](1, 1); - } - getValueInRange(range, eol) { - if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) { - return ''; - } - let startPosition = this.nodeAt2(range.startLineNumber, range.startColumn); - let endPosition = this.nodeAt2(range.endLineNumber, range.endColumn); - let value = this.getValueInRange2(startPosition, endPosition); - if (eol) { - if (eol !== this._EOL || !this._EOLNormalized) { - return value.replace(/\r\n|\r|\n/g, eol); - } - if (eol === this.getEOL() && this._EOLNormalized) { - if (eol === '\r\n') { - } - return value; - } - return value.replace(/\r\n|\r|\n/g, eol); - } - return value; - } - getValueInRange2(startPosition, endPosition) { - if (startPosition.node === endPosition.node) { - let node = startPosition.node; - let buffer = this._buffers[node.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start); - return buffer.substring(startOffset + startPosition.remainder, startOffset + endPosition.remainder); - } - let x = startPosition.node; - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - let ret = buffer.substring(startOffset + startPosition.remainder, startOffset + x.piece.length); - x = x.next(); - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - if (x === endPosition.node) { - ret += buffer.substring(startOffset, startOffset + endPosition.remainder); - break; - } - else { - ret += buffer.substr(startOffset, x.piece.length); - } - x = x.next(); - } - return ret; - } - getLinesContent() { - let lines = []; - let linesLength = 0; - let currentLine = ''; - let danglingCR = false; - this.iterate(this.root, node => { - if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - return true; - } - const piece = node.piece; - let pieceLength = piece.length; - if (pieceLength === 0) { - return true; - } - const buffer = this._buffers[piece.bufferIndex].buffer; - const lineStarts = this._buffers[piece.bufferIndex].lineStarts; - const pieceStartLine = piece.start.line; - const pieceEndLine = piece.end.line; - let pieceStartOffset = lineStarts[pieceStartLine] + piece.start.column; - if (danglingCR) { - if (buffer.charCodeAt(pieceStartOffset) === 10 /* LineFeed */) { - // pretend the \n was in the previous piece.. - pieceStartOffset++; - pieceLength--; - } - lines[linesLength++] = currentLine; - currentLine = ''; - danglingCR = false; - if (pieceLength === 0) { - return true; - } - } - if (pieceStartLine === pieceEndLine) { - // this piece has no new lines - if (!this._EOLNormalized && buffer.charCodeAt(pieceStartOffset + pieceLength - 1) === 13 /* CarriageReturn */) { - danglingCR = true; - currentLine += buffer.substr(pieceStartOffset, pieceLength - 1); - } - else { - currentLine += buffer.substr(pieceStartOffset, pieceLength); - } - return true; - } - // add the text before the first line start in this piece - currentLine += (this._EOLNormalized - ? buffer.substring(pieceStartOffset, Math.max(pieceStartOffset, lineStarts[pieceStartLine + 1] - this._EOLLength)) - : buffer.substring(pieceStartOffset, lineStarts[pieceStartLine + 1]).replace(/(\r\n|\r|\n)$/, '')); - lines[linesLength++] = currentLine; - for (let line = pieceStartLine + 1; line < pieceEndLine; line++) { - currentLine = (this._EOLNormalized - ? buffer.substring(lineStarts[line], lineStarts[line + 1] - this._EOLLength) - : buffer.substring(lineStarts[line], lineStarts[line + 1]).replace(/(\r\n|\r|\n)$/, '')); - lines[linesLength++] = currentLine; - } - if (!this._EOLNormalized && buffer.charCodeAt(lineStarts[pieceEndLine] + piece.end.column - 1) === 13 /* CarriageReturn */) { - danglingCR = true; - if (piece.end.column === 0) { - // The last line ended with a \r, let's undo the push, it will be pushed by next iteration - linesLength--; - } - else { - currentLine = buffer.substr(lineStarts[pieceEndLine], piece.end.column - 1); - } - } - else { - currentLine = buffer.substr(lineStarts[pieceEndLine], piece.end.column); - } - return true; - }); - if (danglingCR) { - lines[linesLength++] = currentLine; - currentLine = ''; - } - lines[linesLength++] = currentLine; - return lines; - } - getLength() { - return this._length; - } - getLineCount() { - return this._lineCnt; - } - getLineContent(lineNumber) { - if (this._lastVisitedLine.lineNumber === lineNumber) { - return this._lastVisitedLine.value; - } - this._lastVisitedLine.lineNumber = lineNumber; - if (lineNumber === this._lineCnt) { - this._lastVisitedLine.value = this.getLineRawContent(lineNumber); - } - else if (this._EOLNormalized) { - this._lastVisitedLine.value = this.getLineRawContent(lineNumber, this._EOLLength); - } - else { - this._lastVisitedLine.value = this.getLineRawContent(lineNumber).replace(/(\r\n|\r|\n)$/, ''); - } - return this._lastVisitedLine.value; - } - _getCharCode(nodePos) { - if (nodePos.remainder === nodePos.node.piece.length) { - // the char we want to fetch is at the head of next node. - let matchingNode = nodePos.node.next(); - if (!matchingNode) { - return 0; - } - let buffer = this._buffers[matchingNode.piece.bufferIndex]; - let startOffset = this.offsetInBuffer(matchingNode.piece.bufferIndex, matchingNode.piece.start); - return buffer.buffer.charCodeAt(startOffset); - } - else { - let buffer = this._buffers[nodePos.node.piece.bufferIndex]; - let startOffset = this.offsetInBuffer(nodePos.node.piece.bufferIndex, nodePos.node.piece.start); - let targetOffset = startOffset + nodePos.remainder; - return buffer.buffer.charCodeAt(targetOffset); - } - } - getLineCharCode(lineNumber, index) { - let nodePos = this.nodeAt2(lineNumber, index + 1); - return this._getCharCode(nodePos); - } - getLineLength(lineNumber) { - if (lineNumber === this.getLineCount()) { - let startOffset = this.getOffsetAt(lineNumber, 1); - return this.getLength() - startOffset; - } - return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength; - } - findMatchesInNode(node, searcher, startLineNumber, startColumn, startCursor, endCursor, searchData, captureMatches, limitResultCount, resultLen, result) { - let buffer = this._buffers[node.piece.bufferIndex]; - let startOffsetInBuffer = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start); - let start = this.offsetInBuffer(node.piece.bufferIndex, startCursor); - let end = this.offsetInBuffer(node.piece.bufferIndex, endCursor); - let m; - // Reset regex to search from the beginning - let ret = { line: 0, column: 0 }; - let searchText; - let offsetInBuffer; - if (searcher._wordSeparators) { - searchText = buffer.buffer.substring(start, end); - offsetInBuffer = (offset) => offset + start; - searcher.reset(0); - } - else { - searchText = buffer.buffer; - offsetInBuffer = (offset) => offset; - searcher.reset(start); - } - do { - m = searcher.next(searchText); - if (m) { - if (offsetInBuffer(m.index) >= end) { - return resultLen; - } - this.positionInBuffer(node, offsetInBuffer(m.index) - startOffsetInBuffer, ret); - let lineFeedCnt = this.getLineFeedCnt(node.piece.bufferIndex, startCursor, ret); - let retStartColumn = ret.line === startCursor.line ? ret.column - startCursor.column + startColumn : ret.column + 1; - let retEndColumn = retStartColumn + m[0].length; - result[resultLen++] = Object(_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__["createFindMatch"])(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](startLineNumber + lineFeedCnt, retStartColumn, startLineNumber + lineFeedCnt, retEndColumn), m, captureMatches); - if (offsetInBuffer(m.index) + m[0].length >= end) { - return resultLen; - } - if (resultLen >= limitResultCount) { - return resultLen; - } - } - } while (m); - return resultLen; - } - findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) { - const result = []; - let resultLen = 0; - const searcher = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__["Searcher"](searchData.wordSeparators, searchData.regex); - let startPosition = this.nodeAt2(searchRange.startLineNumber, searchRange.startColumn); - if (startPosition === null) { - return []; - } - let endPosition = this.nodeAt2(searchRange.endLineNumber, searchRange.endColumn); - if (endPosition === null) { - return []; - } - let start = this.positionInBuffer(startPosition.node, startPosition.remainder); - let end = this.positionInBuffer(endPosition.node, endPosition.remainder); - if (startPosition.node === endPosition.node) { - this.findMatchesInNode(startPosition.node, searcher, searchRange.startLineNumber, searchRange.startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result); - return result; - } - let startLineNumber = searchRange.startLineNumber; - let currentNode = startPosition.node; - while (currentNode !== endPosition.node) { - let lineBreakCnt = this.getLineFeedCnt(currentNode.piece.bufferIndex, start, currentNode.piece.end); - if (lineBreakCnt >= 1) { - // last line break position - let lineStarts = this._buffers[currentNode.piece.bufferIndex].lineStarts; - let startOffsetInBuffer = this.offsetInBuffer(currentNode.piece.bufferIndex, currentNode.piece.start); - let nextLineStartOffset = lineStarts[start.line + lineBreakCnt]; - let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1; - resultLen = this.findMatchesInNode(currentNode, searcher, startLineNumber, startColumn, start, this.positionInBuffer(currentNode, nextLineStartOffset - startOffsetInBuffer), searchData, captureMatches, limitResultCount, resultLen, result); - if (resultLen >= limitResultCount) { - return result; - } - startLineNumber += lineBreakCnt; - } - let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0; - // search for the remaining content - if (startLineNumber === searchRange.endLineNumber) { - const text = this.getLineContent(startLineNumber).substring(startColumn, searchRange.endColumn - 1); - resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount); - return result; - } - resultLen = this._findMatchesInLine(searchData, searcher, this.getLineContent(startLineNumber).substr(startColumn), startLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount); - if (resultLen >= limitResultCount) { - return result; - } - startLineNumber++; - startPosition = this.nodeAt2(startLineNumber, 1); - currentNode = startPosition.node; - start = this.positionInBuffer(startPosition.node, startPosition.remainder); - } - if (startLineNumber === searchRange.endLineNumber) { - let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn - 1 : 0; - const text = this.getLineContent(startLineNumber).substring(startColumn, searchRange.endColumn - 1); - resultLen = this._findMatchesInLine(searchData, searcher, text, searchRange.endLineNumber, startColumn, resultLen, result, captureMatches, limitResultCount); - return result; - } - let startColumn = startLineNumber === searchRange.startLineNumber ? searchRange.startColumn : 1; - resultLen = this.findMatchesInNode(endPosition.node, searcher, startLineNumber, startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result); - return result; - } - _findMatchesInLine(searchData, searcher, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) { - const wordSeparators = searchData.wordSeparators; - if (!captureMatches && searchData.simpleSearch) { - const searchString = searchData.simpleSearch; - const searchStringLen = searchString.length; - const textLength = text.length; - let lastMatchIndex = -searchStringLen; - while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) { - if (!wordSeparators || Object(_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__["isValidMatch"])(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) { - result[resultLen++] = new _model_js__WEBPACK_IMPORTED_MODULE_2__["FindMatch"](new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null); - if (resultLen >= limitResultCount) { - return resultLen; - } - } - } - return resultLen; - } - let m; - // Reset regex to search from the beginning - searcher.reset(0); - do { - m = searcher.next(text); - if (m) { - result[resultLen++] = Object(_textModelSearch_js__WEBPACK_IMPORTED_MODULE_4__["createFindMatch"])(new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches); - if (resultLen >= limitResultCount) { - return resultLen; - } - } - } while (m); - return resultLen; - } - // #endregion - // #region Piece Table - insert(offset, value, eolNormalized = false) { - this._EOLNormalized = this._EOLNormalized && eolNormalized; - this._lastVisitedLine.lineNumber = 0; - this._lastVisitedLine.value = ''; - if (this.root !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - let { node, remainder, nodeStartOffset } = this.nodeAt(offset); - let piece = node.piece; - let bufferIndex = piece.bufferIndex; - let insertPosInBuffer = this.positionInBuffer(node, remainder); - if (node.piece.bufferIndex === 0 && - piece.end.line === this._lastChangeBufferPos.line && - piece.end.column === this._lastChangeBufferPos.column && - (nodeStartOffset + piece.length === offset) && - value.length < AverageBufferSize) { - // changed buffer - this.appendToNode(node, value); - this.computeBufferMetadata(); - return; - } - if (nodeStartOffset === offset) { - this.insertContentToNodeLeft(value, node); - this._searchCache.validate(offset); - } - else if (nodeStartOffset + node.piece.length > offset) { - // we are inserting into the middle of a node. - let nodesToDel = []; - let newRightPiece = new Piece(piece.bufferIndex, insertPosInBuffer, piece.end, this.getLineFeedCnt(piece.bufferIndex, insertPosInBuffer, piece.end), this.offsetInBuffer(bufferIndex, piece.end) - this.offsetInBuffer(bufferIndex, insertPosInBuffer)); - if (this.shouldCheckCRLF() && this.endWithCR(value)) { - let headOfRight = this.nodeCharCodeAt(node, remainder); - if (headOfRight === 10 /** \n */) { - let newStart = { line: newRightPiece.start.line + 1, column: 0 }; - newRightPiece = new Piece(newRightPiece.bufferIndex, newStart, newRightPiece.end, this.getLineFeedCnt(newRightPiece.bufferIndex, newStart, newRightPiece.end), newRightPiece.length - 1); - value += '\n'; - } - } - // reuse node for content before insertion point. - if (this.shouldCheckCRLF() && this.startWithLF(value)) { - let tailOfLeft = this.nodeCharCodeAt(node, remainder - 1); - if (tailOfLeft === 13 /** \r */) { - let previousPos = this.positionInBuffer(node, remainder - 1); - this.deleteNodeTail(node, previousPos); - value = '\r' + value; - if (node.piece.length === 0) { - nodesToDel.push(node); - } - } - else { - this.deleteNodeTail(node, insertPosInBuffer); - } - } - else { - this.deleteNodeTail(node, insertPosInBuffer); - } - let newPieces = this.createNewPieces(value); - if (newRightPiece.length > 0) { - this.rbInsertRight(node, newRightPiece); - } - let tmpNode = node; - for (let k = 0; k < newPieces.length; k++) { - tmpNode = this.rbInsertRight(tmpNode, newPieces[k]); - } - this.deleteNodes(nodesToDel); - } - else { - this.insertContentToNodeRight(value, node); - } - } - else { - // insert new node - let pieces = this.createNewPieces(value); - let node = this.rbInsertLeft(null, pieces[0]); - for (let k = 1; k < pieces.length; k++) { - node = this.rbInsertRight(node, pieces[k]); - } - } - // todo, this is too brutal. Total line feed count should be updated the same way as lf_left. - this.computeBufferMetadata(); - } - delete(offset, cnt) { - this._lastVisitedLine.lineNumber = 0; - this._lastVisitedLine.value = ''; - if (cnt <= 0 || this.root === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - return; - } - let startPosition = this.nodeAt(offset); - let endPosition = this.nodeAt(offset + cnt); - let startNode = startPosition.node; - let endNode = endPosition.node; - if (startNode === endNode) { - let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder); - let endSplitPosInBuffer = this.positionInBuffer(startNode, endPosition.remainder); - if (startPosition.nodeStartOffset === offset) { - if (cnt === startNode.piece.length) { // delete node - let next = startNode.next(); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["rbDelete"])(this, startNode); - this.validateCRLFWithPrevNode(next); - this.computeBufferMetadata(); - return; - } - this.deleteNodeHead(startNode, endSplitPosInBuffer); - this._searchCache.validate(offset); - this.validateCRLFWithPrevNode(startNode); - this.computeBufferMetadata(); - return; - } - if (startPosition.nodeStartOffset + startNode.piece.length === offset + cnt) { - this.deleteNodeTail(startNode, startSplitPosInBuffer); - this.validateCRLFWithNextNode(startNode); - this.computeBufferMetadata(); - return; - } - // delete content in the middle, this node will be splitted to nodes - this.shrinkNode(startNode, startSplitPosInBuffer, endSplitPosInBuffer); - this.computeBufferMetadata(); - return; - } - let nodesToDel = []; - let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder); - this.deleteNodeTail(startNode, startSplitPosInBuffer); - this._searchCache.validate(offset); - if (startNode.piece.length === 0) { - nodesToDel.push(startNode); - } - // update last touched node - let endSplitPosInBuffer = this.positionInBuffer(endNode, endPosition.remainder); - this.deleteNodeHead(endNode, endSplitPosInBuffer); - if (endNode.piece.length === 0) { - nodesToDel.push(endNode); - } - // delete nodes in between - let secondNode = startNode.next(); - for (let node = secondNode; node !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] && node !== endNode; node = node.next()) { - nodesToDel.push(node); - } - let prev = startNode.piece.length === 0 ? startNode.prev() : startNode; - this.deleteNodes(nodesToDel); - this.validateCRLFWithNextNode(prev); - this.computeBufferMetadata(); - } - insertContentToNodeLeft(value, node) { - // we are inserting content to the beginning of node - let nodesToDel = []; - if (this.shouldCheckCRLF() && this.endWithCR(value) && this.startWithLF(node)) { - // move `\n` to new node. - let piece = node.piece; - let newStart = { line: piece.start.line + 1, column: 0 }; - let nPiece = new Piece(piece.bufferIndex, newStart, piece.end, this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end), piece.length - 1); - node.piece = nPiece; - value += '\n'; - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, node, -1, -1); - if (node.piece.length === 0) { - nodesToDel.push(node); - } - } - let newPieces = this.createNewPieces(value); - let newNode = this.rbInsertLeft(node, newPieces[newPieces.length - 1]); - for (let k = newPieces.length - 2; k >= 0; k--) { - newNode = this.rbInsertLeft(newNode, newPieces[k]); - } - this.validateCRLFWithPrevNode(newNode); - this.deleteNodes(nodesToDel); - } - insertContentToNodeRight(value, node) { - // we are inserting to the right of this node. - if (this.adjustCarriageReturnFromNext(value, node)) { - // move \n to the new node. - value += '\n'; - } - let newPieces = this.createNewPieces(value); - let newNode = this.rbInsertRight(node, newPieces[0]); - let tmpNode = newNode; - for (let k = 1; k < newPieces.length; k++) { - tmpNode = this.rbInsertRight(tmpNode, newPieces[k]); - } - this.validateCRLFWithPrevNode(newNode); - } - positionInBuffer(node, remainder, ret) { - let piece = node.piece; - let bufferIndex = node.piece.bufferIndex; - let lineStarts = this._buffers[bufferIndex].lineStarts; - let startOffset = lineStarts[piece.start.line] + piece.start.column; - let offset = startOffset + remainder; - // binary search offset between startOffset and endOffset - let low = piece.start.line; - let high = piece.end.line; - let mid = 0; - let midStop = 0; - let midStart = 0; - while (low <= high) { - mid = low + ((high - low) / 2) | 0; - midStart = lineStarts[mid]; - if (mid === high) { - break; - } - midStop = lineStarts[mid + 1]; - if (offset < midStart) { - high = mid - 1; - } - else if (offset >= midStop) { - low = mid + 1; - } - else { - break; - } - } - if (ret) { - ret.line = mid; - ret.column = offset - midStart; - return null; - } - return { - line: mid, - column: offset - midStart - }; - } - getLineFeedCnt(bufferIndex, start, end) { - // we don't need to worry about start: abc\r|\n, or abc|\r, or abc|\n, or abc|\r\n doesn't change the fact that, there is one line break after start. - // now let's take care of end: abc\r|\n, if end is in between \r and \n, we need to add line feed count by 1 - if (end.column === 0) { - return end.line - start.line; - } - let lineStarts = this._buffers[bufferIndex].lineStarts; - if (end.line === lineStarts.length - 1) { // it means, there is no \n after end, otherwise, there will be one more lineStart. - return end.line - start.line; - } - let nextLineStartOffset = lineStarts[end.line + 1]; - let endOffset = lineStarts[end.line] + end.column; - if (nextLineStartOffset > endOffset + 1) { // there are more than 1 character after end, which means it can't be \n - return end.line - start.line; - } - // endOffset + 1 === nextLineStartOffset - // character at endOffset is \n, so we check the character before first - // if character at endOffset is \r, end.column is 0 and we can't get here. - let previousCharOffset = endOffset - 1; // end.column > 0 so it's okay. - let buffer = this._buffers[bufferIndex].buffer; - if (buffer.charCodeAt(previousCharOffset) === 13) { - return end.line - start.line + 1; - } - else { - return end.line - start.line; - } - } - offsetInBuffer(bufferIndex, cursor) { - let lineStarts = this._buffers[bufferIndex].lineStarts; - return lineStarts[cursor.line] + cursor.column; - } - deleteNodes(nodes) { - for (let i = 0; i < nodes.length; i++) { - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["rbDelete"])(this, nodes[i]); - } - } - createNewPieces(text) { - if (text.length > AverageBufferSize) { - // the content is large, operations like substring, charCode becomes slow - // so here we split it into smaller chunks, just like what we did for CR/LF normalization - let newPieces = []; - while (text.length > AverageBufferSize) { - const lastChar = text.charCodeAt(AverageBufferSize - 1); - let splitText; - if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) { - // last character is \r or a high surrogate => keep it back - splitText = text.substring(0, AverageBufferSize - 1); - text = text.substring(AverageBufferSize - 1); - } - else { - splitText = text.substring(0, AverageBufferSize); - text = text.substring(AverageBufferSize); - } - let lineStarts = createLineStartsFast(splitText); - newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: splitText.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, splitText.length)); - this._buffers.push(new StringBuffer(splitText, lineStarts)); - } - let lineStarts = createLineStartsFast(text); - newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: text.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, text.length)); - this._buffers.push(new StringBuffer(text, lineStarts)); - return newPieces; - } - let startOffset = this._buffers[0].buffer.length; - const lineStarts = createLineStartsFast(text, false); - let start = this._lastChangeBufferPos; - if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === startOffset - && startOffset !== 0 - && this.startWithLF(text) - && this.endWithCR(this._buffers[0].buffer) // todo, we can check this._lastChangeBufferPos's column as it's the last one - ) { - this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line, column: this._lastChangeBufferPos.column + 1 }; - start = this._lastChangeBufferPos; - for (let i = 0; i < lineStarts.length; i++) { - lineStarts[i] += startOffset + 1; - } - this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1)); - this._buffers[0].buffer += '_' + text; - startOffset += 1; - } - else { - if (startOffset !== 0) { - for (let i = 0; i < lineStarts.length; i++) { - lineStarts[i] += startOffset; - } - } - this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1)); - this._buffers[0].buffer += text; - } - const endOffset = this._buffers[0].buffer.length; - let endIndex = this._buffers[0].lineStarts.length - 1; - let endColumn = endOffset - this._buffers[0].lineStarts[endIndex]; - let endPos = { line: endIndex, column: endColumn }; - let newPiece = new Piece(0, /** todo@peng */ start, endPos, this.getLineFeedCnt(0, start, endPos), endOffset - startOffset); - this._lastChangeBufferPos = endPos; - return [newPiece]; - } - getLineRawContent(lineNumber, endOffset = 0) { - let x = this.root; - let ret = ''; - let cache = this._searchCache.get2(lineNumber); - if (cache) { - x = cache.node; - let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber - 1); - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - if (cache.nodeStartLineNumber + x.piece.lineFeedCnt === lineNumber) { - ret = buffer.substring(startOffset + prevAccumulatedValue, startOffset + x.piece.length); - } - else { - let accumulatedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber); - return buffer.substring(startOffset + prevAccumulatedValue, startOffset + accumulatedValue - endOffset); - } - } - else { - let nodeStartOffset = 0; - const originalLineNumber = lineNumber; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] && x.lf_left >= lineNumber - 1) { - x = x.left; - } - else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) { - let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - let accumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1); - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - nodeStartOffset += x.size_left; - this._searchCache.set({ - node: x, - nodeStartOffset, - nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left) - }); - return buffer.substring(startOffset + prevAccumulatedValue, startOffset + accumulatedValue - endOffset); - } - else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) { - let prevAccumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - let buffer = this._buffers[x.piece.bufferIndex].buffer; - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - ret = buffer.substring(startOffset + prevAccumulatedValue, startOffset + x.piece.length); - break; - } - else { - lineNumber -= x.lf_left + x.piece.lineFeedCnt; - nodeStartOffset += x.size_left + x.piece.length; - x = x.right; - } - } - } - // search in order, to find the node contains end column - x = x.next(); - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - let buffer = this._buffers[x.piece.bufferIndex].buffer; - if (x.piece.lineFeedCnt > 0) { - let accumulatedValue = this.getAccumulatedValue(x, 0); - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - ret += buffer.substring(startOffset, startOffset + accumulatedValue - endOffset); - return ret; - } - else { - let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start); - ret += buffer.substr(startOffset, x.piece.length); - } - x = x.next(); - } - return ret; - } - computeBufferMetadata() { - let x = this.root; - let lfCnt = 1; - let len = 0; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - lfCnt += x.lf_left + x.piece.lineFeedCnt; - len += x.size_left + x.piece.length; - x = x.right; - } - this._lineCnt = lfCnt; - this._length = len; - this._searchCache.validate(this._length); - } - // #region node operations - getIndexOf(node, accumulatedValue) { - let piece = node.piece; - let pos = this.positionInBuffer(node, accumulatedValue); - let lineCnt = pos.line - piece.start.line; - if (this.offsetInBuffer(piece.bufferIndex, piece.end) - this.offsetInBuffer(piece.bufferIndex, piece.start) === accumulatedValue) { - // we are checking the end of this node, so a CRLF check is necessary. - let realLineCnt = this.getLineFeedCnt(node.piece.bufferIndex, piece.start, pos); - if (realLineCnt !== lineCnt) { - // aha yes, CRLF - return { index: realLineCnt, remainder: 0 }; - } - } - return { index: lineCnt, remainder: pos.column }; - } - getAccumulatedValue(node, index) { - if (index < 0) { - return 0; - } - let piece = node.piece; - let lineStarts = this._buffers[piece.bufferIndex].lineStarts; - let expectedLineStartIndex = piece.start.line + index + 1; - if (expectedLineStartIndex > piece.end.line) { - return lineStarts[piece.end.line] + piece.end.column - lineStarts[piece.start.line] - piece.start.column; - } - else { - return lineStarts[expectedLineStartIndex] - lineStarts[piece.start.line] - piece.start.column; - } - } - deleteNodeTail(node, pos) { - const piece = node.piece; - const originalLFCnt = piece.lineFeedCnt; - const originalEndOffset = this.offsetInBuffer(piece.bufferIndex, piece.end); - const newEnd = pos; - const newEndOffset = this.offsetInBuffer(piece.bufferIndex, newEnd); - const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd); - const lf_delta = newLineFeedCnt - originalLFCnt; - const size_delta = newEndOffset - originalEndOffset; - const newLength = piece.length + size_delta; - node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, node, size_delta, lf_delta); - } - deleteNodeHead(node, pos) { - const piece = node.piece; - const originalLFCnt = piece.lineFeedCnt; - const originalStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start); - const newStart = pos; - const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end); - const newStartOffset = this.offsetInBuffer(piece.bufferIndex, newStart); - const lf_delta = newLineFeedCnt - originalLFCnt; - const size_delta = originalStartOffset - newStartOffset; - const newLength = piece.length + size_delta; - node.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, node, size_delta, lf_delta); - } - shrinkNode(node, start, end) { - const piece = node.piece; - const originalStartPos = piece.start; - const originalEndPos = piece.end; - // old piece, originalStartPos, start - const oldLength = piece.length; - const oldLFCnt = piece.lineFeedCnt; - const newEnd = start; - const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd); - const newLength = this.offsetInBuffer(piece.bufferIndex, start) - this.offsetInBuffer(piece.bufferIndex, originalStartPos); - node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, node, newLength - oldLength, newLineFeedCnt - oldLFCnt); - // new right piece, end, originalEndPos - let newPiece = new Piece(piece.bufferIndex, end, originalEndPos, this.getLineFeedCnt(piece.bufferIndex, end, originalEndPos), this.offsetInBuffer(piece.bufferIndex, originalEndPos) - this.offsetInBuffer(piece.bufferIndex, end)); - let newNode = this.rbInsertRight(node, newPiece); - this.validateCRLFWithPrevNode(newNode); - } - appendToNode(node, value) { - if (this.adjustCarriageReturnFromNext(value, node)) { - value += '\n'; - } - const hitCRLF = this.shouldCheckCRLF() && this.startWithLF(value) && this.endWithCR(node); - const startOffset = this._buffers[0].buffer.length; - this._buffers[0].buffer += value; - const lineStarts = createLineStartsFast(value, false); - for (let i = 0; i < lineStarts.length; i++) { - lineStarts[i] += startOffset; - } - if (hitCRLF) { - let prevStartOffset = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2]; - this._buffers[0].lineStarts.pop(); - // _lastChangeBufferPos is already wrong - this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line - 1, column: startOffset - prevStartOffset }; - } - this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1)); - const endIndex = this._buffers[0].lineStarts.length - 1; - const endColumn = this._buffers[0].buffer.length - this._buffers[0].lineStarts[endIndex]; - const newEnd = { line: endIndex, column: endColumn }; - const newLength = node.piece.length + value.length; - const oldLineFeedCnt = node.piece.lineFeedCnt; - const newLineFeedCnt = this.getLineFeedCnt(0, node.piece.start, newEnd); - const lf_delta = newLineFeedCnt - oldLineFeedCnt; - node.piece = new Piece(node.piece.bufferIndex, node.piece.start, newEnd, newLineFeedCnt, newLength); - this._lastChangeBufferPos = newEnd; - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, node, value.length, lf_delta); - } - nodeAt(offset) { - let x = this.root; - let cache = this._searchCache.get(offset); - if (cache) { - return { - node: cache.node, - nodeStartOffset: cache.nodeStartOffset, - remainder: offset - cache.nodeStartOffset - }; - } - let nodeStartOffset = 0; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.size_left > offset) { - x = x.left; - } - else if (x.size_left + x.piece.length >= offset) { - nodeStartOffset += x.size_left; - let ret = { - node: x, - remainder: offset - x.size_left, - nodeStartOffset - }; - this._searchCache.set(ret); - return ret; - } - else { - offset -= x.size_left + x.piece.length; - nodeStartOffset += x.size_left + x.piece.length; - x = x.right; - } - } - return null; - } - nodeAt2(lineNumber, column) { - let x = this.root; - let nodeStartOffset = 0; - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.left !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] && x.lf_left >= lineNumber - 1) { - x = x.left; - } - else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) { - let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - let accumulatedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1); - nodeStartOffset += x.size_left; - return { - node: x, - remainder: Math.min(prevAccumualtedValue + column - 1, accumulatedValue), - nodeStartOffset - }; - } - else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) { - let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2); - if (prevAccumualtedValue + column - 1 <= x.piece.length) { - return { - node: x, - remainder: prevAccumualtedValue + column - 1, - nodeStartOffset - }; - } - else { - column -= x.piece.length - prevAccumualtedValue; - break; - } - } - else { - lineNumber -= x.lf_left + x.piece.lineFeedCnt; - nodeStartOffset += x.size_left + x.piece.length; - x = x.right; - } - } - // search in order, to find the node contains position.column - x = x.next(); - while (x !== _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - if (x.piece.lineFeedCnt > 0) { - let accumulatedValue = this.getAccumulatedValue(x, 0); - let nodeStartOffset = this.offsetOfNode(x); - return { - node: x, - remainder: Math.min(column - 1, accumulatedValue), - nodeStartOffset - }; - } - else { - if (x.piece.length >= column - 1) { - let nodeStartOffset = this.offsetOfNode(x); - return { - node: x, - remainder: column - 1, - nodeStartOffset - }; - } - else { - column -= x.piece.length; - } - } - x = x.next(); - } - return null; - } - nodeCharCodeAt(node, offset) { - if (node.piece.lineFeedCnt < 1) { - return -1; - } - let buffer = this._buffers[node.piece.bufferIndex]; - let newOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start) + offset; - return buffer.buffer.charCodeAt(newOffset); - } - offsetOfNode(node) { - if (!node) { - return 0; - } - let pos = node.size_left; - while (node !== this.root) { - if (node.parent.right === node) { - pos += node.parent.size_left + node.parent.piece.length; - } - node = node.parent; - } - return pos; - } - // #endregion - // #region CRLF - shouldCheckCRLF() { - return !(this._EOLNormalized && this._EOL === '\n'); - } - startWithLF(val) { - if (typeof val === 'string') { - return val.charCodeAt(0) === 10; - } - if (val === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] || val.piece.lineFeedCnt === 0) { - return false; - } - let piece = val.piece; - let lineStarts = this._buffers[piece.bufferIndex].lineStarts; - let line = piece.start.line; - let startOffset = lineStarts[line] + piece.start.column; - if (line === lineStarts.length - 1) { - // last line, so there is no line feed at the end of this line - return false; - } - let nextLineOffset = lineStarts[line + 1]; - if (nextLineOffset > startOffset + 1) { - return false; - } - return this._buffers[piece.bufferIndex].buffer.charCodeAt(startOffset) === 10; - } - endWithCR(val) { - if (typeof val === 'string') { - return val.charCodeAt(val.length - 1) === 13; - } - if (val === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"] || val.piece.lineFeedCnt === 0) { - return false; - } - return this.nodeCharCodeAt(val, val.piece.length - 1) === 13; - } - validateCRLFWithPrevNode(nextNode) { - if (this.shouldCheckCRLF() && this.startWithLF(nextNode)) { - let node = nextNode.prev(); - if (this.endWithCR(node)) { - this.fixCRLF(node, nextNode); - } - } - } - validateCRLFWithNextNode(node) { - if (this.shouldCheckCRLF() && this.endWithCR(node)) { - let nextNode = node.next(); - if (this.startWithLF(nextNode)) { - this.fixCRLF(node, nextNode); - } - } - } - fixCRLF(prev, next) { - let nodesToDel = []; - // update node - let lineStarts = this._buffers[prev.piece.bufferIndex].lineStarts; - let newEnd; - if (prev.piece.end.column === 0) { - // it means, last line ends with \r, not \r\n - newEnd = { line: prev.piece.end.line - 1, column: lineStarts[prev.piece.end.line] - lineStarts[prev.piece.end.line - 1] - 1 }; - } - else { - // \r\n - newEnd = { line: prev.piece.end.line, column: prev.piece.end.column - 1 }; - } - const prevNewLength = prev.piece.length - 1; - const prevNewLFCnt = prev.piece.lineFeedCnt - 1; - prev.piece = new Piece(prev.piece.bufferIndex, prev.piece.start, newEnd, prevNewLFCnt, prevNewLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, prev, -1, -1); - if (prev.piece.length === 0) { - nodesToDel.push(prev); - } - // update nextNode - let newStart = { line: next.piece.start.line + 1, column: 0 }; - const newLength = next.piece.length - 1; - const newLineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, newStart, next.piece.end); - next.piece = new Piece(next.piece.bufferIndex, newStart, next.piece.end, newLineFeedCnt, newLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, next, -1, -1); - if (next.piece.length === 0) { - nodesToDel.push(next); - } - // create new piece which contains \r\n - let pieces = this.createNewPieces('\r\n'); - this.rbInsertRight(prev, pieces[0]); - // delete empty nodes - for (let i = 0; i < nodesToDel.length; i++) { - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["rbDelete"])(this, nodesToDel[i]); - } - } - adjustCarriageReturnFromNext(value, node) { - if (this.shouldCheckCRLF() && this.endWithCR(value)) { - let nextNode = node.next(); - if (this.startWithLF(nextNode)) { - // move `\n` forward - value += '\n'; - if (nextNode.piece.length === 1) { - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["rbDelete"])(this, nextNode); - } - else { - const piece = nextNode.piece; - const newStart = { line: piece.start.line + 1, column: 0 }; - const newLength = piece.length - 1; - const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end); - nextNode.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength); - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["updateTreeMetadata"])(this, nextNode, -1, -1); - } - return true; - } - } - return false; - } - // #endregion - // #endregion - // #region Tree operations - iterate(node, callback) { - if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - return callback(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]); - } - let leftRet = this.iterate(node.left, callback); - if (!leftRet) { - return leftRet; - } - return callback(node) && this.iterate(node.right, callback); - } - getNodeContent(node) { - if (node === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - return ''; - } - let buffer = this._buffers[node.piece.bufferIndex]; - let currentContent; - let piece = node.piece; - let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start); - let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end); - currentContent = buffer.buffer.substring(startOffset, endOffset); - return currentContent; - } - getPieceContent(piece) { - let buffer = this._buffers[piece.bufferIndex]; - let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start); - let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end); - let currentContent = buffer.buffer.substring(startOffset, endOffset); - return currentContent; - } - /** - * node node - * / \ / \ - * a b <---- a b - * / - * z - */ - rbInsertRight(node, p) { - let z = new _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["TreeNode"](p, 1 /* Red */); - z.left = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.right = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.parent = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.size_left = 0; - z.lf_left = 0; - let x = this.root; - if (x === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - this.root = z; - z.color = 0 /* Black */; - } - else if (node.right === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - node.right = z; - z.parent = node; - } - else { - let nextNode = Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["leftest"])(node.right); - nextNode.left = z; - z.parent = nextNode; - } - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["fixInsert"])(this, z); - return z; - } - /** - * node node - * / \ / \ - * a b ----> a b - * \ - * z - */ - rbInsertLeft(node, p) { - let z = new _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["TreeNode"](p, 1 /* Red */); - z.left = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.right = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.parent = _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]; - z.size_left = 0; - z.lf_left = 0; - if (this.root === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - this.root = z; - z.color = 0 /* Black */; - } - else if (node.left === _rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["SENTINEL"]) { - node.left = z; - z.parent = node; - } - else { - let prevNode = Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["righttest"])(node.left); // a - prevNode.right = z; - z.parent = prevNode; - } - Object(_rbTreeBase_js__WEBPACK_IMPORTED_MODULE_3__["fixInsert"])(this, z); - return z; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js ***! - \**********************************************************************************************************/ -/*! exports provided: PieceTreeTextBuffer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieceTreeTextBuffer", function() { return PieceTreeTextBuffer; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pieceTreeBase.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js"); -/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tokensStore.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js"); -/* harmony import */ var _textChange_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../textChange.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -class PieceTreeTextBuffer { - constructor(chunks, BOM, eol, containsRTL, containsUnusualLineTerminators, isBasicASCII, eolNormalized) { - this._onDidChangeContent = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this._BOM = BOM; - this._mightContainNonBasicASCII = !isBasicASCII; - this._mightContainRTL = containsRTL; - this._mightContainUnusualLineTerminators = containsUnusualLineTerminators; - this._pieceTree = new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_4__["PieceTreeBase"](chunks, eol, eolNormalized); - } - dispose() { - this._onDidChangeContent.dispose(); - } - mightContainRTL() { - return this._mightContainRTL; - } - mightContainUnusualLineTerminators() { - return this._mightContainUnusualLineTerminators; - } - resetMightContainUnusualLineTerminators() { - this._mightContainUnusualLineTerminators = false; - } - mightContainNonBasicASCII() { - return this._mightContainNonBasicASCII; - } - getBOM() { - return this._BOM; - } - getEOL() { - return this._pieceTree.getEOL(); - } - createSnapshot(preserveBOM) { - return this._pieceTree.createSnapshot(preserveBOM ? this._BOM : ''); - } - getOffsetAt(lineNumber, column) { - return this._pieceTree.getOffsetAt(lineNumber, column); - } - getPositionAt(offset) { - return this._pieceTree.getPositionAt(offset); - } - getRangeAt(start, length) { - let end = start + length; - const startPosition = this.getPositionAt(start); - const endPosition = this.getPositionAt(end); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column); - } - getValueInRange(range, eol = 0 /* TextDefined */) { - if (range.isEmpty()) { - return ''; - } - const lineEnding = this._getEndOfLine(eol); - return this._pieceTree.getValueInRange(range, lineEnding); - } - getValueLengthInRange(range, eol = 0 /* TextDefined */) { - if (range.isEmpty()) { - return 0; - } - if (range.startLineNumber === range.endLineNumber) { - return (range.endColumn - range.startColumn); - } - let startOffset = this.getOffsetAt(range.startLineNumber, range.startColumn); - let endOffset = this.getOffsetAt(range.endLineNumber, range.endColumn); - return endOffset - startOffset; - } - getCharacterCountInRange(range, eol = 0 /* TextDefined */) { - if (this._mightContainNonBasicASCII) { - // we must count by iterating - let result = 0; - const fromLineNumber = range.startLineNumber; - const toLineNumber = range.endLineNumber; - for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) { - const lineContent = this.getLineContent(lineNumber); - const fromOffset = (lineNumber === fromLineNumber ? range.startColumn - 1 : 0); - const toOffset = (lineNumber === toLineNumber ? range.endColumn - 1 : lineContent.length); - for (let offset = fromOffset; offset < toOffset; offset++) { - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isHighSurrogate"](lineContent.charCodeAt(offset))) { - result = result + 1; - offset = offset + 1; - } - else { - result = result + 1; - } - } - } - result += this._getEndOfLine(eol).length * (toLineNumber - fromLineNumber); - return result; - } - return this.getValueLengthInRange(range, eol); - } - getLength() { - return this._pieceTree.getLength(); - } - getLineCount() { - return this._pieceTree.getLineCount(); - } - getLinesContent() { - return this._pieceTree.getLinesContent(); - } - getLineContent(lineNumber) { - return this._pieceTree.getLineContent(lineNumber); - } - getLineCharCode(lineNumber, index) { - return this._pieceTree.getLineCharCode(lineNumber, index); - } - getLineLength(lineNumber) { - return this._pieceTree.getLineLength(lineNumber); - } - getLineFirstNonWhitespaceColumn(lineNumber) { - const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["firstNonWhitespaceIndex"](this.getLineContent(lineNumber)); - if (result === -1) { - return 0; - } - return result + 1; - } - getLineLastNonWhitespaceColumn(lineNumber) { - const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["lastNonWhitespaceIndex"](this.getLineContent(lineNumber)); - if (result === -1) { - return 0; - } - return result + 2; - } - _getEndOfLine(eol) { - switch (eol) { - case 1 /* LF */: - return '\n'; - case 2 /* CRLF */: - return '\r\n'; - case 0 /* TextDefined */: - return this.getEOL(); - default: - throw new Error('Unknown EOL preference'); - } - } - setEOL(newEOL) { - this._pieceTree.setEOL(newEOL); - } - applyEdits(rawOperations, recordTrimAutoWhitespace, computeUndoEdits) { - let mightContainRTL = this._mightContainRTL; - let mightContainUnusualLineTerminators = this._mightContainUnusualLineTerminators; - let mightContainNonBasicASCII = this._mightContainNonBasicASCII; - let canReduceOperations = true; - let operations = []; - for (let i = 0; i < rawOperations.length; i++) { - let op = rawOperations[i]; - if (canReduceOperations && op._isTracked) { - canReduceOperations = false; - } - let validatedRange = op.range; - if (op.text) { - let textMightContainNonBasicASCII = true; - if (!mightContainNonBasicASCII) { - textMightContainNonBasicASCII = !_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isBasicASCII"](op.text); - mightContainNonBasicASCII = textMightContainNonBasicASCII; - } - if (!mightContainRTL && textMightContainNonBasicASCII) { - // check if the new inserted text contains RTL - mightContainRTL = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["containsRTL"](op.text); - } - if (!mightContainUnusualLineTerminators && textMightContainNonBasicASCII) { - // check if the new inserted text contains unusual line terminators - mightContainUnusualLineTerminators = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["containsUnusualLineTerminators"](op.text); - } - } - let validText = ''; - let eolCount = 0; - let firstLineLength = 0; - let lastLineLength = 0; - if (op.text) { - let strEOL; - [eolCount, firstLineLength, lastLineLength, strEOL] = Object(_tokensStore_js__WEBPACK_IMPORTED_MODULE_5__["countEOL"])(op.text); - const bufferEOL = this.getEOL(); - const expectedStrEOL = (bufferEOL === '\r\n' ? 2 /* CRLF */ : 1 /* LF */); - if (strEOL === 0 /* Unknown */ || strEOL === expectedStrEOL) { - validText = op.text; - } - else { - validText = op.text.replace(/\r\n|\r|\n/g, bufferEOL); - } - } - operations[i] = { - sortIndex: i, - identifier: op.identifier || null, - range: validatedRange, - rangeOffset: this.getOffsetAt(validatedRange.startLineNumber, validatedRange.startColumn), - rangeLength: this.getValueLengthInRange(validatedRange), - text: validText, - eolCount: eolCount, - firstLineLength: firstLineLength, - lastLineLength: lastLineLength, - forceMoveMarkers: Boolean(op.forceMoveMarkers), - isAutoWhitespaceEdit: op.isAutoWhitespaceEdit || false - }; - } - // Sort operations ascending - operations.sort(PieceTreeTextBuffer._sortOpsAscending); - let hasTouchingRanges = false; - for (let i = 0, count = operations.length - 1; i < count; i++) { - let rangeEnd = operations[i].range.getEndPosition(); - let nextRangeStart = operations[i + 1].range.getStartPosition(); - if (nextRangeStart.isBeforeOrEqual(rangeEnd)) { - if (nextRangeStart.isBefore(rangeEnd)) { - // overlapping ranges - throw new Error('Overlapping ranges are not allowed!'); - } - hasTouchingRanges = true; - } - } - if (canReduceOperations) { - operations = this._reduceOperations(operations); - } - // Delta encode operations - let reverseRanges = (computeUndoEdits || recordTrimAutoWhitespace ? PieceTreeTextBuffer._getInverseEditRanges(operations) : []); - let newTrimAutoWhitespaceCandidates = []; - if (recordTrimAutoWhitespace) { - for (let i = 0; i < operations.length; i++) { - let op = operations[i]; - let reverseRange = reverseRanges[i]; - if (op.isAutoWhitespaceEdit && op.range.isEmpty()) { - // Record already the future line numbers that might be auto whitespace removal candidates on next edit - for (let lineNumber = reverseRange.startLineNumber; lineNumber <= reverseRange.endLineNumber; lineNumber++) { - let currentLineContent = ''; - if (lineNumber === reverseRange.startLineNumber) { - currentLineContent = this.getLineContent(op.range.startLineNumber); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["firstNonWhitespaceIndex"](currentLineContent) !== -1) { - continue; - } - } - newTrimAutoWhitespaceCandidates.push({ lineNumber: lineNumber, oldContent: currentLineContent }); - } - } - } - } - let reverseOperations = null; - if (computeUndoEdits) { - let reverseRangeDeltaOffset = 0; - reverseOperations = []; - for (let i = 0; i < operations.length; i++) { - const op = operations[i]; - const reverseRange = reverseRanges[i]; - const bufferText = this.getValueInRange(op.range); - const reverseRangeOffset = op.rangeOffset + reverseRangeDeltaOffset; - reverseRangeDeltaOffset += (op.text.length - bufferText.length); - reverseOperations[i] = { - sortIndex: op.sortIndex, - identifier: op.identifier, - range: reverseRange, - text: bufferText, - textChange: new _textChange_js__WEBPACK_IMPORTED_MODULE_6__["TextChange"](op.rangeOffset, bufferText, reverseRangeOffset, op.text) - }; - } - // Can only sort reverse operations when the order is not significant - if (!hasTouchingRanges) { - reverseOperations.sort((a, b) => a.sortIndex - b.sortIndex); - } - } - this._mightContainRTL = mightContainRTL; - this._mightContainUnusualLineTerminators = mightContainUnusualLineTerminators; - this._mightContainNonBasicASCII = mightContainNonBasicASCII; - const contentChanges = this._doApplyEdits(operations); - let trimAutoWhitespaceLineNumbers = null; - if (recordTrimAutoWhitespace && newTrimAutoWhitespaceCandidates.length > 0) { - // sort line numbers auto whitespace removal candidates for next edit descending - newTrimAutoWhitespaceCandidates.sort((a, b) => b.lineNumber - a.lineNumber); - trimAutoWhitespaceLineNumbers = []; - for (let i = 0, len = newTrimAutoWhitespaceCandidates.length; i < len; i++) { - let lineNumber = newTrimAutoWhitespaceCandidates[i].lineNumber; - if (i > 0 && newTrimAutoWhitespaceCandidates[i - 1].lineNumber === lineNumber) { - // Do not have the same line number twice - continue; - } - let prevContent = newTrimAutoWhitespaceCandidates[i].oldContent; - let lineContent = this.getLineContent(lineNumber); - if (lineContent.length === 0 || lineContent === prevContent || _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["firstNonWhitespaceIndex"](lineContent) !== -1) { - continue; - } - trimAutoWhitespaceLineNumbers.push(lineNumber); - } - } - this._onDidChangeContent.fire(); - return new _model_js__WEBPACK_IMPORTED_MODULE_3__["ApplyEditsResult"](reverseOperations, contentChanges, trimAutoWhitespaceLineNumbers); - } - /** - * Transform operations such that they represent the same logic edit, - * but that they also do not cause OOM crashes. - */ - _reduceOperations(operations) { - if (operations.length < 1000) { - // We know from empirical testing that a thousand edits work fine regardless of their shape. - return operations; - } - // At one point, due to how events are emitted and how each operation is handled, - // some operations can trigger a high amount of temporary string allocations, - // that will immediately get edited again. - // e.g. a formatter inserting ridiculous ammounts of \n on a model with a single line - // Therefore, the strategy is to collapse all the operations into a huge single edit operation - return [this._toSingleEditOperation(operations)]; - } - _toSingleEditOperation(operations) { - let forceMoveMarkers = false; - const firstEditRange = operations[0].range; - const lastEditRange = operations[operations.length - 1].range; - const entireEditRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](firstEditRange.startLineNumber, firstEditRange.startColumn, lastEditRange.endLineNumber, lastEditRange.endColumn); - let lastEndLineNumber = firstEditRange.startLineNumber; - let lastEndColumn = firstEditRange.startColumn; - const result = []; - for (let i = 0, len = operations.length; i < len; i++) { - const operation = operations[i]; - const range = operation.range; - forceMoveMarkers = forceMoveMarkers || operation.forceMoveMarkers; - // (1) -- Push old text - result.push(this.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lastEndLineNumber, lastEndColumn, range.startLineNumber, range.startColumn))); - // (2) -- Push new text - if (operation.text.length > 0) { - result.push(operation.text); - } - lastEndLineNumber = range.endLineNumber; - lastEndColumn = range.endColumn; - } - const text = result.join(''); - const [eolCount, firstLineLength, lastLineLength] = Object(_tokensStore_js__WEBPACK_IMPORTED_MODULE_5__["countEOL"])(text); - return { - sortIndex: 0, - identifier: operations[0].identifier, - range: entireEditRange, - rangeOffset: this.getOffsetAt(entireEditRange.startLineNumber, entireEditRange.startColumn), - rangeLength: this.getValueLengthInRange(entireEditRange, 0 /* TextDefined */), - text: text, - eolCount: eolCount, - firstLineLength: firstLineLength, - lastLineLength: lastLineLength, - forceMoveMarkers: forceMoveMarkers, - isAutoWhitespaceEdit: false - }; - } - _doApplyEdits(operations) { - operations.sort(PieceTreeTextBuffer._sortOpsDescending); - let contentChanges = []; - // operations are from bottom to top - for (let i = 0; i < operations.length; i++) { - let op = operations[i]; - const startLineNumber = op.range.startLineNumber; - const startColumn = op.range.startColumn; - const endLineNumber = op.range.endLineNumber; - const endColumn = op.range.endColumn; - if (startLineNumber === endLineNumber && startColumn === endColumn && op.text.length === 0) { - // no-op - continue; - } - if (op.text) { - // replacement - this._pieceTree.delete(op.rangeOffset, op.rangeLength); - this._pieceTree.insert(op.rangeOffset, op.text, true); - } - else { - // deletion - this._pieceTree.delete(op.rangeOffset, op.rangeLength); - } - const contentChangeRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - contentChanges.push({ - range: contentChangeRange, - rangeLength: op.rangeLength, - text: op.text, - rangeOffset: op.rangeOffset, - forceMoveMarkers: op.forceMoveMarkers - }); - } - return contentChanges; - } - findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) { - return this._pieceTree.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount); - } - /** - * Assumes `operations` are validated and sorted ascending - */ - static _getInverseEditRanges(operations) { - let result = []; - let prevOpEndLineNumber = 0; - let prevOpEndColumn = 0; - let prevOp = null; - for (let i = 0, len = operations.length; i < len; i++) { - let op = operations[i]; - let startLineNumber; - let startColumn; - if (prevOp) { - if (prevOp.range.endLineNumber === op.range.startLineNumber) { - startLineNumber = prevOpEndLineNumber; - startColumn = prevOpEndColumn + (op.range.startColumn - prevOp.range.endColumn); - } - else { - startLineNumber = prevOpEndLineNumber + (op.range.startLineNumber - prevOp.range.endLineNumber); - startColumn = op.range.startColumn; - } - } - else { - startLineNumber = op.range.startLineNumber; - startColumn = op.range.startColumn; - } - let resultRange; - if (op.text.length > 0) { - // the operation inserts something - const lineCount = op.eolCount + 1; - if (lineCount === 1) { - // single line insert - resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, startColumn, startLineNumber, startColumn + op.firstLineLength); - } - else { - // multi line insert - resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, startColumn, startLineNumber + lineCount - 1, op.lastLineLength + 1); - } - } - else { - // There is nothing to insert - resultRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, startColumn, startLineNumber, startColumn); - } - prevOpEndLineNumber = resultRange.endLineNumber; - prevOpEndColumn = resultRange.endColumn; - result.push(resultRange); - prevOp = op; - } - return result; - } - static _sortOpsAscending(a, b) { - let r = _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingEnds(a.range, b.range); - if (r === 0) { - return a.sortIndex - b.sortIndex; - } - return r; - } - static _sortOpsDescending(a, b) { - let r = _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingEnds(a.range, b.range); - if (r === 0) { - return b.sortIndex - a.sortIndex; - } - return -r; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js": -/*!*****************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js ***! - \*****************************************************************************************************************/ -/*! exports provided: PieceTreeTextBufferFactory, PieceTreeTextBufferBuilder */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieceTreeTextBufferFactory", function() { return PieceTreeTextBufferFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PieceTreeTextBufferBuilder", function() { return PieceTreeTextBufferBuilder; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieceTreeBase.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js"); -/* harmony import */ var _pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pieceTreeTextBuffer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class PieceTreeTextBufferFactory { - constructor(_chunks, _bom, _cr, _lf, _crlf, _containsRTL, _containsUnusualLineTerminators, _isBasicASCII, _normalizeEOL) { - this._chunks = _chunks; - this._bom = _bom; - this._cr = _cr; - this._lf = _lf; - this._crlf = _crlf; - this._containsRTL = _containsRTL; - this._containsUnusualLineTerminators = _containsUnusualLineTerminators; - this._isBasicASCII = _isBasicASCII; - this._normalizeEOL = _normalizeEOL; - } - _getEOL(defaultEOL) { - const totalEOLCount = this._cr + this._lf + this._crlf; - const totalCRCount = this._cr + this._crlf; - if (totalEOLCount === 0) { - // This is an empty file or a file with precisely one line - return (defaultEOL === 1 /* LF */ ? '\n' : '\r\n'); - } - if (totalCRCount > totalEOLCount / 2) { - // More than half of the file contains \r\n ending lines - return '\r\n'; - } - // At least one line more ends in \n - return '\n'; - } - create(defaultEOL) { - const eol = this._getEOL(defaultEOL); - let chunks = this._chunks; - if (this._normalizeEOL && - ((eol === '\r\n' && (this._cr > 0 || this._lf > 0)) - || (eol === '\n' && (this._cr > 0 || this._crlf > 0)))) { - // Normalize pieces - for (let i = 0, len = chunks.length; i < len; i++) { - let str = chunks[i].buffer.replace(/\r\n|\r|\n/g, eol); - let newLineStart = Object(_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__["createLineStartsFast"])(str); - chunks[i] = new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__["StringBuffer"](str, newLineStart); - } - } - return new _pieceTreeTextBuffer_js__WEBPACK_IMPORTED_MODULE_2__["PieceTreeTextBuffer"](chunks, this._bom, eol, this._containsRTL, this._containsUnusualLineTerminators, this._isBasicASCII, this._normalizeEOL); - } -} -class PieceTreeTextBufferBuilder { - constructor() { - this.chunks = []; - this.BOM = ''; - this._hasPreviousChar = false; - this._previousChar = 0; - this._tmpLineStarts = []; - this.cr = 0; - this.lf = 0; - this.crlf = 0; - this.containsRTL = false; - this.containsUnusualLineTerminators = false; - this.isBasicASCII = true; - } - acceptChunk(chunk) { - if (chunk.length === 0) { - return; - } - if (this.chunks.length === 0) { - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["startsWithUTF8BOM"](chunk)) { - this.BOM = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["UTF8_BOM_CHARACTER"]; - chunk = chunk.substr(1); - } - } - const lastChar = chunk.charCodeAt(chunk.length - 1); - if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) { - // last character is \r or a high surrogate => keep it back - this._acceptChunk1(chunk.substr(0, chunk.length - 1), false); - this._hasPreviousChar = true; - this._previousChar = lastChar; - } - else { - this._acceptChunk1(chunk, false); - this._hasPreviousChar = false; - this._previousChar = lastChar; - } - } - _acceptChunk1(chunk, allowEmptyStrings) { - if (!allowEmptyStrings && chunk.length === 0) { - // Nothing to do - return; - } - if (this._hasPreviousChar) { - this._acceptChunk2(String.fromCharCode(this._previousChar) + chunk); - } - else { - this._acceptChunk2(chunk); - } - } - _acceptChunk2(chunk) { - const lineStarts = Object(_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__["createLineStarts"])(this._tmpLineStarts, chunk); - this.chunks.push(new _pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__["StringBuffer"](chunk, lineStarts.lineStarts)); - this.cr += lineStarts.cr; - this.lf += lineStarts.lf; - this.crlf += lineStarts.crlf; - if (this.isBasicASCII) { - this.isBasicASCII = lineStarts.isBasicASCII; - } - if (!this.isBasicASCII && !this.containsRTL) { - // No need to check if it is basic ASCII - this.containsRTL = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsRTL"](chunk); - } - if (!this.isBasicASCII && !this.containsUnusualLineTerminators) { - // No need to check if it is basic ASCII - this.containsUnusualLineTerminators = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsUnusualLineTerminators"](chunk); - } - } - finish(normalizeEOL = true) { - this._finish(); - return new PieceTreeTextBufferFactory(this.chunks, this.BOM, this.cr, this.lf, this.crlf, this.containsRTL, this.containsUnusualLineTerminators, this.isBasicASCII, normalizeEOL); - } - _finish() { - if (this.chunks.length === 0) { - this._acceptChunk1('', true); - } - if (this._hasPreviousChar) { - this._hasPreviousChar = false; - // recreate last chunk - let lastChunk = this.chunks[this.chunks.length - 1]; - lastChunk.buffer += String.fromCharCode(this._previousChar); - let newLineStarts = Object(_pieceTreeBase_js__WEBPACK_IMPORTED_MODULE_1__["createLineStartsFast"])(lastChunk.buffer); - lastChunk.lineStarts = newLineStarts; - if (this._previousChar === 13 /* CarriageReturn */) { - this.cr++; - } - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase.js ***! - \*************************************************************************************************/ -/*! exports provided: TreeNode, SENTINEL, leftest, righttest, calculateSize, calculateLF, resetSentinel, leftRotate, rightRotate, rbDelete, fixInsert, updateTreeMetadata, recomputeTreeMetadata */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeNode", function() { return TreeNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SENTINEL", function() { return SENTINEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftest", function() { return leftest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "righttest", function() { return righttest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateSize", function() { return calculateSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateLF", function() { return calculateLF; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetSentinel", function() { return resetSentinel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "leftRotate", function() { return leftRotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rightRotate", function() { return rightRotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rbDelete", function() { return rbDelete; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixInsert", function() { return fixInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateTreeMetadata", function() { return updateTreeMetadata; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recomputeTreeMetadata", function() { return recomputeTreeMetadata; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class TreeNode { - constructor(piece, color) { - this.piece = piece; - this.color = color; - this.size_left = 0; - this.lf_left = 0; - this.parent = this; - this.left = this; - this.right = this; - } - next() { - if (this.right !== SENTINEL) { - return leftest(this.right); - } - let node = this; - while (node.parent !== SENTINEL) { - if (node.parent.left === node) { - break; - } - node = node.parent; - } - if (node.parent === SENTINEL) { - return SENTINEL; - } - else { - return node.parent; - } - } - prev() { - if (this.left !== SENTINEL) { - return righttest(this.left); - } - let node = this; - while (node.parent !== SENTINEL) { - if (node.parent.right === node) { - break; - } - node = node.parent; - } - if (node.parent === SENTINEL) { - return SENTINEL; - } - else { - return node.parent; - } - } - detach() { - this.parent = null; - this.left = null; - this.right = null; - } -} -const SENTINEL = new TreeNode(null, 0 /* Black */); -SENTINEL.parent = SENTINEL; -SENTINEL.left = SENTINEL; -SENTINEL.right = SENTINEL; -SENTINEL.color = 0 /* Black */; -function leftest(node) { - while (node.left !== SENTINEL) { - node = node.left; - } - return node; -} -function righttest(node) { - while (node.right !== SENTINEL) { - node = node.right; - } - return node; -} -function calculateSize(node) { - if (node === SENTINEL) { - return 0; - } - return node.size_left + node.piece.length + calculateSize(node.right); -} -function calculateLF(node) { - if (node === SENTINEL) { - return 0; - } - return node.lf_left + node.piece.lineFeedCnt + calculateLF(node.right); -} -function resetSentinel() { - SENTINEL.parent = SENTINEL; -} -function leftRotate(tree, x) { - let y = x.right; - // fix size_left - y.size_left += x.size_left + (x.piece ? x.piece.length : 0); - y.lf_left += x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0); - x.right = y.left; - if (y.left !== SENTINEL) { - y.left.parent = x; - } - y.parent = x.parent; - if (x.parent === SENTINEL) { - tree.root = y; - } - else if (x.parent.left === x) { - x.parent.left = y; - } - else { - x.parent.right = y; - } - y.left = x; - x.parent = y; -} -function rightRotate(tree, y) { - let x = y.left; - y.left = x.right; - if (x.right !== SENTINEL) { - x.right.parent = y; - } - x.parent = y.parent; - // fix size_left - y.size_left -= x.size_left + (x.piece ? x.piece.length : 0); - y.lf_left -= x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0); - if (y.parent === SENTINEL) { - tree.root = x; - } - else if (y === y.parent.right) { - y.parent.right = x; - } - else { - y.parent.left = x; - } - x.right = y; - y.parent = x; -} -function rbDelete(tree, z) { - let x; - let y; - if (z.left === SENTINEL) { - y = z; - x = y.right; - } - else if (z.right === SENTINEL) { - y = z; - x = y.left; - } - else { - y = leftest(z.right); - x = y.right; - } - if (y === tree.root) { - tree.root = x; - // if x is null, we are removing the only node - x.color = 0 /* Black */; - z.detach(); - resetSentinel(); - tree.root.parent = SENTINEL; - return; - } - let yWasRed = (y.color === 1 /* Red */); - if (y === y.parent.left) { - y.parent.left = x; - } - else { - y.parent.right = x; - } - if (y === z) { - x.parent = y.parent; - recomputeTreeMetadata(tree, x); - } - else { - if (y.parent === z) { - x.parent = y; - } - else { - x.parent = y.parent; - } - // as we make changes to x's hierarchy, update size_left of subtree first - recomputeTreeMetadata(tree, x); - y.left = z.left; - y.right = z.right; - y.parent = z.parent; - y.color = z.color; - if (z === tree.root) { - tree.root = y; - } - else { - if (z === z.parent.left) { - z.parent.left = y; - } - else { - z.parent.right = y; - } - } - if (y.left !== SENTINEL) { - y.left.parent = y; - } - if (y.right !== SENTINEL) { - y.right.parent = y; - } - // update metadata - // we replace z with y, so in this sub tree, the length change is z.item.length - y.size_left = z.size_left; - y.lf_left = z.lf_left; - recomputeTreeMetadata(tree, y); - } - z.detach(); - if (x.parent.left === x) { - let newSizeLeft = calculateSize(x); - let newLFLeft = calculateLF(x); - if (newSizeLeft !== x.parent.size_left || newLFLeft !== x.parent.lf_left) { - let delta = newSizeLeft - x.parent.size_left; - let lf_delta = newLFLeft - x.parent.lf_left; - x.parent.size_left = newSizeLeft; - x.parent.lf_left = newLFLeft; - updateTreeMetadata(tree, x.parent, delta, lf_delta); - } - } - recomputeTreeMetadata(tree, x.parent); - if (yWasRed) { - resetSentinel(); - return; - } - // RB-DELETE-FIXUP - let w; - while (x !== tree.root && x.color === 0 /* Black */) { - if (x === x.parent.left) { - w = x.parent.right; - if (w.color === 1 /* Red */) { - w.color = 0 /* Black */; - x.parent.color = 1 /* Red */; - leftRotate(tree, x.parent); - w = x.parent.right; - } - if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) { - w.color = 1 /* Red */; - x = x.parent; - } - else { - if (w.right.color === 0 /* Black */) { - w.left.color = 0 /* Black */; - w.color = 1 /* Red */; - rightRotate(tree, w); - w = x.parent.right; - } - w.color = x.parent.color; - x.parent.color = 0 /* Black */; - w.right.color = 0 /* Black */; - leftRotate(tree, x.parent); - x = tree.root; - } - } - else { - w = x.parent.left; - if (w.color === 1 /* Red */) { - w.color = 0 /* Black */; - x.parent.color = 1 /* Red */; - rightRotate(tree, x.parent); - w = x.parent.left; - } - if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) { - w.color = 1 /* Red */; - x = x.parent; - } - else { - if (w.left.color === 0 /* Black */) { - w.right.color = 0 /* Black */; - w.color = 1 /* Red */; - leftRotate(tree, w); - w = x.parent.left; - } - w.color = x.parent.color; - x.parent.color = 0 /* Black */; - w.left.color = 0 /* Black */; - rightRotate(tree, x.parent); - x = tree.root; - } - } - } - x.color = 0 /* Black */; - resetSentinel(); -} -function fixInsert(tree, x) { - recomputeTreeMetadata(tree, x); - while (x !== tree.root && x.parent.color === 1 /* Red */) { - if (x.parent === x.parent.parent.left) { - const y = x.parent.parent.right; - if (y.color === 1 /* Red */) { - x.parent.color = 0 /* Black */; - y.color = 0 /* Black */; - x.parent.parent.color = 1 /* Red */; - x = x.parent.parent; - } - else { - if (x === x.parent.right) { - x = x.parent; - leftRotate(tree, x); - } - x.parent.color = 0 /* Black */; - x.parent.parent.color = 1 /* Red */; - rightRotate(tree, x.parent.parent); - } - } - else { - const y = x.parent.parent.left; - if (y.color === 1 /* Red */) { - x.parent.color = 0 /* Black */; - y.color = 0 /* Black */; - x.parent.parent.color = 1 /* Red */; - x = x.parent.parent; - } - else { - if (x === x.parent.left) { - x = x.parent; - rightRotate(tree, x); - } - x.parent.color = 0 /* Black */; - x.parent.parent.color = 1 /* Red */; - leftRotate(tree, x.parent.parent); - } - } - } - tree.root.color = 0 /* Black */; -} -function updateTreeMetadata(tree, x, delta, lineFeedCntDelta) { - // node length change or line feed count change - while (x !== tree.root && x !== SENTINEL) { - if (x.parent.left === x) { - x.parent.size_left += delta; - x.parent.lf_left += lineFeedCntDelta; - } - x = x.parent; - } -} -function recomputeTreeMetadata(tree, x) { - let delta = 0; - let lf_delta = 0; - if (x === tree.root) { - return; - } - if (delta === 0) { - // go upwards till the node whose left subtree is changed. - while (x !== tree.root && x === x.parent.right) { - x = x.parent; - } - if (x === tree.root) { - // well, it means we add a node to the end (inorder) - return; - } - // x is the node whose right subtree is changed. - x = x.parent; - delta = calculateSize(x.left) - x.size_left; - lf_delta = calculateLF(x.left) - x.lf_left; - x.size_left += delta; - x.lf_left += lf_delta; - } - // go upwards till root. O(logN) - while (x !== tree.root && (delta !== 0 || lf_delta !== 0)) { - if (x.parent.left === x) { - x.parent.size_left += delta; - x.parent.lf_left += lf_delta; - } - x = x.parent; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textChange.js ***! - \*****************************************************************************/ -/*! exports provided: TextChange, compressConsecutiveTextChanges */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextChange", function() { return TextChange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compressConsecutiveTextChanges", function() { return compressConsecutiveTextChanges; }); -/* harmony import */ var _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/buffer.js */ "./node_modules/monaco-editor/esm/vs/base/common/buffer.js"); -/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class TextChange { - constructor(oldPosition, oldText, newPosition, newText) { - this.oldPosition = oldPosition; - this.oldText = oldText; - this.newPosition = newPosition; - this.newText = newText; - } - get oldLength() { - return this.oldText.length; - } - get oldEnd() { - return this.oldPosition + this.oldText.length; - } - get newLength() { - return this.newText.length; - } - get newEnd() { - return this.newPosition + this.newText.length; - } - toString() { - if (this.oldText.length === 0) { - return `(insert@${this.oldPosition} "${this.newText}")`; - } - if (this.newText.length === 0) { - return `(delete@${this.oldPosition} "${this.oldText}")`; - } - return `(replace@${this.oldPosition} "${this.oldText}" with "${this.newText}")`; - } - static _writeStringSize(str) { - return (4 + 2 * str.length); - } - static _writeString(b, str, offset) { - const len = str.length; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["writeUInt32BE"](b, len, offset); - offset += 4; - for (let i = 0; i < len; i++) { - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["writeUInt16LE"](b, str.charCodeAt(i), offset); - offset += 2; - } - return offset; - } - static _readString(b, offset) { - const len = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["readUInt32BE"](b, offset); - offset += 4; - return Object(_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["decodeUTF16LE"])(b, offset, len); - } - writeSize() { - return (+4 // oldPosition - + 4 // newPosition - + TextChange._writeStringSize(this.oldText) - + TextChange._writeStringSize(this.newText)); - } - write(b, offset) { - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["writeUInt32BE"](b, this.oldPosition, offset); - offset += 4; - _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["writeUInt32BE"](b, this.newPosition, offset); - offset += 4; - offset = TextChange._writeString(b, this.oldText, offset); - offset = TextChange._writeString(b, this.newText, offset); - return offset; - } - static read(b, offset, dest) { - const oldPosition = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["readUInt32BE"](b, offset); - offset += 4; - const newPosition = _base_common_buffer_js__WEBPACK_IMPORTED_MODULE_0__["readUInt32BE"](b, offset); - offset += 4; - const oldText = TextChange._readString(b, offset); - offset += TextChange._writeStringSize(oldText); - const newText = TextChange._readString(b, offset); - offset += TextChange._writeStringSize(newText); - dest.push(new TextChange(oldPosition, oldText, newPosition, newText)); - return offset; - } -} -function compressConsecutiveTextChanges(prevEdits, currEdits) { - if (prevEdits === null || prevEdits.length === 0) { - return currEdits; - } - const compressor = new TextChangeCompressor(prevEdits, currEdits); - return compressor.compress(); -} -class TextChangeCompressor { - constructor(prevEdits, currEdits) { - this._prevEdits = prevEdits; - this._currEdits = currEdits; - this._result = []; - this._resultLen = 0; - this._prevLen = this._prevEdits.length; - this._prevDeltaOffset = 0; - this._currLen = this._currEdits.length; - this._currDeltaOffset = 0; - } - compress() { - let prevIndex = 0; - let currIndex = 0; - let prevEdit = this._getPrev(prevIndex); - let currEdit = this._getCurr(currIndex); - while (prevIndex < this._prevLen || currIndex < this._currLen) { - if (prevEdit === null) { - this._acceptCurr(currEdit); - currEdit = this._getCurr(++currIndex); - continue; - } - if (currEdit === null) { - this._acceptPrev(prevEdit); - prevEdit = this._getPrev(++prevIndex); - continue; - } - if (currEdit.oldEnd <= prevEdit.newPosition) { - this._acceptCurr(currEdit); - currEdit = this._getCurr(++currIndex); - continue; - } - if (prevEdit.newEnd <= currEdit.oldPosition) { - this._acceptPrev(prevEdit); - prevEdit = this._getPrev(++prevIndex); - continue; - } - if (currEdit.oldPosition < prevEdit.newPosition) { - const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newPosition - currEdit.oldPosition); - this._acceptCurr(e1); - currEdit = e2; - continue; - } - if (prevEdit.newPosition < currEdit.oldPosition) { - const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldPosition - prevEdit.newPosition); - this._acceptPrev(e1); - prevEdit = e2; - continue; - } - // At this point, currEdit.oldPosition === prevEdit.newPosition - let mergePrev; - let mergeCurr; - if (currEdit.oldEnd === prevEdit.newEnd) { - mergePrev = prevEdit; - mergeCurr = currEdit; - prevEdit = this._getPrev(++prevIndex); - currEdit = this._getCurr(++currIndex); - } - else if (currEdit.oldEnd < prevEdit.newEnd) { - const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldLength); - mergePrev = e1; - mergeCurr = currEdit; - prevEdit = e2; - currEdit = this._getCurr(++currIndex); - } - else { - const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newLength); - mergePrev = prevEdit; - mergeCurr = e1; - prevEdit = this._getPrev(++prevIndex); - currEdit = e2; - } - this._result[this._resultLen++] = new TextChange(mergePrev.oldPosition, mergePrev.oldText, mergeCurr.newPosition, mergeCurr.newText); - this._prevDeltaOffset += mergePrev.newLength - mergePrev.oldLength; - this._currDeltaOffset += mergeCurr.newLength - mergeCurr.oldLength; - } - const merged = TextChangeCompressor._merge(this._result); - const cleaned = TextChangeCompressor._removeNoOps(merged); - return cleaned; - } - _acceptCurr(currEdit) { - this._result[this._resultLen++] = TextChangeCompressor._rebaseCurr(this._prevDeltaOffset, currEdit); - this._currDeltaOffset += currEdit.newLength - currEdit.oldLength; - } - _getCurr(currIndex) { - return (currIndex < this._currLen ? this._currEdits[currIndex] : null); - } - _acceptPrev(prevEdit) { - this._result[this._resultLen++] = TextChangeCompressor._rebasePrev(this._currDeltaOffset, prevEdit); - this._prevDeltaOffset += prevEdit.newLength - prevEdit.oldLength; - } - _getPrev(prevIndex) { - return (prevIndex < this._prevLen ? this._prevEdits[prevIndex] : null); - } - static _rebaseCurr(prevDeltaOffset, currEdit) { - return new TextChange(currEdit.oldPosition - prevDeltaOffset, currEdit.oldText, currEdit.newPosition, currEdit.newText); - } - static _rebasePrev(currDeltaOffset, prevEdit) { - return new TextChange(prevEdit.oldPosition, prevEdit.oldText, prevEdit.newPosition + currDeltaOffset, prevEdit.newText); - } - static _splitPrev(edit, offset) { - const preText = edit.newText.substr(0, offset); - const postText = edit.newText.substr(offset); - return [ - new TextChange(edit.oldPosition, edit.oldText, edit.newPosition, preText), - new TextChange(edit.oldEnd, '', edit.newPosition + offset, postText) - ]; - } - static _splitCurr(edit, offset) { - const preText = edit.oldText.substr(0, offset); - const postText = edit.oldText.substr(offset); - return [ - new TextChange(edit.oldPosition, preText, edit.newPosition, edit.newText), - new TextChange(edit.oldPosition + offset, postText, edit.newEnd, '') - ]; - } - static _merge(edits) { - if (edits.length === 0) { - return edits; - } - let result = [], resultLen = 0; - let prev = edits[0]; - for (let i = 1; i < edits.length; i++) { - const curr = edits[i]; - if (prev.oldEnd === curr.oldPosition) { - // Merge into `prev` - prev = new TextChange(prev.oldPosition, prev.oldText + curr.oldText, prev.newPosition, prev.newText + curr.newText); - } - else { - result[resultLen++] = prev; - prev = curr; - } - } - result[resultLen++] = prev; - return result; - } - static _removeNoOps(edits) { - if (edits.length === 0) { - return edits; - } - let result = [], resultLen = 0; - for (let i = 0; i < edits.length; i++) { - const edit = edits[i]; - if (edit.oldText === edit.newText) { - continue; - } - result[resultLen++] = edit; - } - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js ***! - \****************************************************************************/ -/*! exports provided: createTextBufferFactory, createTextBuffer, LONG_LINE_BOUNDARY, TextModel, ModelDecorationOverviewRulerOptions, ModelDecorationMinimapOptions, ModelDecorationOptions, DidChangeDecorationsEmitter, DidChangeContentEmitter */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTextBufferFactory", function() { return createTextBufferFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTextBuffer", function() { return createTextBuffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LONG_LINE_BOUNDARY", function() { return LONG_LINE_BOUNDARY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextModel", function() { return TextModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelDecorationOverviewRulerOptions", function() { return ModelDecorationOverviewRulerOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelDecorationMinimapOptions", function() { return ModelDecorationMinimapOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelDecorationOptions", function() { return ModelDecorationOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DidChangeDecorationsEmitter", function() { return DidChangeDecorationsEmitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DidChangeContentEmitter", function() { return DidChangeContentEmitter; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _editStack_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editStack.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js"); -/* harmony import */ var _indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./indentationGuesser.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js"); -/* harmony import */ var _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./intervalTree.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js"); -/* harmony import */ var _pieceTreeTextBuffer_pieceTreeTextBufferBuilder_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js"); -/* harmony import */ var _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./textModelEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js"); -/* harmony import */ var _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./textModelSearch.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js"); -/* harmony import */ var _textModelTokens_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textModelTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js"); -/* harmony import */ var _wordHelper_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./wordHelper.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js"); -/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _modes_supports_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../modes/supports.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js"); -/* harmony import */ var _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../modes/supports/richEditBrackets.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js"); -/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./tokensStore.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - -function createTextBufferBuilder() { - return new _pieceTreeTextBuffer_pieceTreeTextBufferBuilder_js__WEBPACK_IMPORTED_MODULE_13__["PieceTreeTextBufferBuilder"](); -} -function createTextBufferFactory(text) { - const builder = createTextBufferBuilder(); - builder.acceptChunk(text); - return builder.finish(); -} -function createTextBuffer(value, defaultEOL) { - const factory = (typeof value === 'string' ? createTextBufferFactory(value) : value); - return factory.create(defaultEOL); -} -let MODEL_ID = 0; -const LIMIT_FIND_COUNT = 999; -const LONG_LINE_BOUNDARY = 10000; -class TextModelSnapshot { - constructor(source) { - this._source = source; - this._eos = false; - } - read() { - if (this._eos) { - return null; - } - let result = [], resultCnt = 0, resultLength = 0; - do { - let tmp = this._source.read(); - if (tmp === null) { - // end-of-stream - this._eos = true; - if (resultCnt === 0) { - return null; - } - else { - return result.join(''); - } - } - if (tmp.length > 0) { - result[resultCnt++] = tmp; - resultLength += tmp.length; - } - if (resultLength >= 64 * 1024) { - return result.join(''); - } - } while (true); - } -} -const invalidFunc = () => { throw new Error(`Invalid change accessor`); }; -class BracketSearchCanceled { - constructor() { - this._searchCanceledBrand = undefined; - } -} -BracketSearchCanceled.INSTANCE = new BracketSearchCanceled(); -function stripBracketSearchCanceled(result) { - if (result instanceof BracketSearchCanceled) { - return null; - } - return result; -} -class TextModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - //#endregion - constructor(source, creationOptions, languageIdentifier, associatedResource = null, undoRedoService) { - super(); - //#region Events - this._onWillDispose = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onWillDispose = this._onWillDispose.event; - this._onDidChangeDecorations = this._register(new DidChangeDecorationsEmitter()); - this.onDidChangeDecorations = this._onDidChangeDecorations.event; - this._onDidChangeLanguage = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeLanguage = this._onDidChangeLanguage.event; - this._onDidChangeLanguageConfiguration = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeLanguageConfiguration = this._onDidChangeLanguageConfiguration.event; - this._onDidChangeTokens = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeTokens = this._onDidChangeTokens.event; - this._onDidChangeOptions = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeOptions = this._onDidChangeOptions.event; - this._onDidChangeAttached = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeAttached = this._onDidChangeAttached.event; - this._eventEmitter = this._register(new DidChangeContentEmitter()); - // Generate a new unique model id - MODEL_ID++; - this.id = '$model' + MODEL_ID; - this.isForSimpleWidget = creationOptions.isForSimpleWidget; - if (typeof associatedResource === 'undefined' || associatedResource === null) { - this._associatedResource = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"].parse('inmemory://model/' + MODEL_ID); - } - else { - this._associatedResource = associatedResource; - } - this._undoRedoService = undoRedoService; - this._attachedEditorCount = 0; - this._buffer = createTextBuffer(source, creationOptions.defaultEOL); - this._options = TextModel.resolveOptions(this._buffer, creationOptions); - const bufferLineCount = this._buffer.getLineCount(); - const bufferTextLength = this._buffer.getValueLengthInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, bufferLineCount, this._buffer.getLineLength(bufferLineCount) + 1), 0 /* TextDefined */); - // !!! Make a decision in the ctor and permanently respect this decision !!! - // If a model is too large at construction time, it will never get tokenized, - // under no circumstances. - if (creationOptions.largeFileOptimizations) { - this._isTooLargeForTokenization = ((bufferTextLength > TextModel.LARGE_FILE_SIZE_THRESHOLD) - || (bufferLineCount > TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD)); - } - else { - this._isTooLargeForTokenization = false; - } - this._isTooLargeForSyncing = (bufferTextLength > TextModel.MODEL_SYNC_LIMIT); - this._versionId = 1; - this._alternativeVersionId = 1; - this._initialUndoRedoSnapshot = null; - this._isDisposed = false; - this._isDisposing = false; - this._languageIdentifier = languageIdentifier || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_19__["NULL_LANGUAGE_IDENTIFIER"]; - this._languageRegistryListener = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].onDidChange((e) => { - if (e.languageIdentifier.id === this._languageIdentifier.id) { - this._onDidChangeLanguageConfiguration.fire({}); - } - }); - this._instanceId = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["singleLetterHash"](MODEL_ID); - this._lastDecorationId = 0; - this._decorations = Object.create(null); - this._decorationsTree = new DecorationsTrees(); - this._commandManager = new _editStack_js__WEBPACK_IMPORTED_MODULE_10__["EditStack"](this, undoRedoService); - this._isUndoing = false; - this._isRedoing = false; - this._trimAutoWhitespaceLines = null; - this._tokens = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__["TokensStore"](); - this._tokens2 = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_22__["TokensStore2"](); - this._tokenization = new _textModelTokens_js__WEBPACK_IMPORTED_MODULE_16__["TextModelTokenization"](this); - } - static resolveOptions(textBuffer, options) { - if (options.detectIndentation) { - const guessedIndentation = Object(_indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__["guessIndentation"])(textBuffer, options.tabSize, options.insertSpaces); - return new _model_js__WEBPACK_IMPORTED_MODULE_9__["TextModelResolvedOptions"]({ - tabSize: guessedIndentation.tabSize, - indentSize: guessedIndentation.tabSize, - insertSpaces: guessedIndentation.insertSpaces, - trimAutoWhitespace: options.trimAutoWhitespace, - defaultEOL: options.defaultEOL - }); - } - return new _model_js__WEBPACK_IMPORTED_MODULE_9__["TextModelResolvedOptions"]({ - tabSize: options.tabSize, - indentSize: options.indentSize, - insertSpaces: options.insertSpaces, - trimAutoWhitespace: options.trimAutoWhitespace, - defaultEOL: options.defaultEOL - }); - } - onDidChangeRawContentFast(listener) { - return this._eventEmitter.fastEvent((e) => listener(e.rawContentChangedEvent)); - } - onDidChangeContentFast(listener) { - return this._eventEmitter.fastEvent((e) => listener(e.contentChangedEvent)); - } - onDidChangeContent(listener) { - return this._eventEmitter.slowEvent((e) => listener(e.contentChangedEvent)); - } - dispose() { - this._isDisposing = true; - this._onWillDispose.fire(); - this._languageRegistryListener.dispose(); - this._tokenization.dispose(); - this._isDisposed = true; - super.dispose(); - this._isDisposing = false; - } - _assertNotDisposed() { - if (this._isDisposed) { - throw new Error('Model is disposed!'); - } - } - _emitContentChangedEvent(rawChange, change) { - if (this._isDisposing) { - // Do not confuse listeners by emitting any event after disposing - return; - } - this._eventEmitter.fire(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["InternalModelContentChangeEvent"](rawChange, change)); - } - setValue(value) { - this._assertNotDisposed(); - if (value === null) { - // There's nothing to do - return; - } - const textBuffer = createTextBuffer(value, this._options.defaultEOL); - this.setValueFromTextBuffer(textBuffer); - } - _createContentChanged2(range, rangeOffset, rangeLength, text, isUndoing, isRedoing, isFlush) { - return { - changes: [{ - range: range, - rangeOffset: rangeOffset, - rangeLength: rangeLength, - text: text, - }], - eol: this._buffer.getEOL(), - versionId: this.getVersionId(), - isUndoing: isUndoing, - isRedoing: isRedoing, - isFlush: isFlush - }; - } - setValueFromTextBuffer(textBuffer) { - this._assertNotDisposed(); - if (textBuffer === null) { - // There's nothing to do - return; - } - const oldFullModelRange = this.getFullModelRange(); - const oldModelValueLength = this.getValueLengthInRange(oldFullModelRange); - const endLineNumber = this.getLineCount(); - const endColumn = this.getLineMaxColumn(endLineNumber); - this._buffer = textBuffer; - this._increaseVersionId(); - // Flush all tokens - this._tokens.flush(); - this._tokens2.flush(); - // Destroy all my decorations - this._decorations = Object.create(null); - this._decorationsTree = new DecorationsTrees(); - // Destroy my edit history and settings - this._commandManager.clear(); - this._trimAutoWhitespaceLines = null; - this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawContentChangedEvent"]([ - new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawFlush"]() - ], this._versionId, false, false), this._createContentChanged2(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, true)); - } - setEOL(eol) { - this._assertNotDisposed(); - const newEOL = (eol === 1 /* CRLF */ ? '\r\n' : '\n'); - if (this._buffer.getEOL() === newEOL) { - // Nothing to do - return; - } - const oldFullModelRange = this.getFullModelRange(); - const oldModelValueLength = this.getValueLengthInRange(oldFullModelRange); - const endLineNumber = this.getLineCount(); - const endColumn = this.getLineMaxColumn(endLineNumber); - this._onBeforeEOLChange(); - this._buffer.setEOL(newEOL); - this._increaseVersionId(); - this._onAfterEOLChange(); - this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawContentChangedEvent"]([ - new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawEOLChanged"]() - ], this._versionId, false, false), this._createContentChanged2(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, endLineNumber, endColumn), 0, oldModelValueLength, this.getValue(), false, false, false)); - } - _onBeforeEOLChange() { - // Ensure all decorations get their `range` set. - const versionId = this.getVersionId(); - const allDecorations = this._decorationsTree.search(0, false, false, versionId); - this._ensureNodesHaveRanges(allDecorations); - } - _onAfterEOLChange() { - // Transform back `range` to offsets - const versionId = this.getVersionId(); - const allDecorations = this._decorationsTree.collectNodesPostOrder(); - for (let i = 0, len = allDecorations.length; i < len; i++) { - const node = allDecorations[i]; - const delta = node.cachedAbsoluteStart - node.start; - const startOffset = this._buffer.getOffsetAt(node.range.startLineNumber, node.range.startColumn); - const endOffset = this._buffer.getOffsetAt(node.range.endLineNumber, node.range.endColumn); - node.cachedAbsoluteStart = startOffset; - node.cachedAbsoluteEnd = endOffset; - node.cachedVersionId = versionId; - node.start = startOffset - delta; - node.end = endOffset - delta; - Object(_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["recomputeMaxEnd"])(node); - } - } - onBeforeAttached() { - this._attachedEditorCount++; - if (this._attachedEditorCount === 1) { - this._onDidChangeAttached.fire(undefined); - } - } - onBeforeDetached() { - this._attachedEditorCount--; - if (this._attachedEditorCount === 0) { - this._onDidChangeAttached.fire(undefined); - } - } - isAttachedToEditor() { - return this._attachedEditorCount > 0; - } - getAttachedEditorCount() { - return this._attachedEditorCount; - } - isTooLargeForSyncing() { - return this._isTooLargeForSyncing; - } - isTooLargeForTokenization() { - return this._isTooLargeForTokenization; - } - isDisposed() { - return this._isDisposed; - } - isDominatedByLongLines() { - this._assertNotDisposed(); - if (this.isTooLargeForTokenization()) { - // Cannot word wrap huge files anyways, so it doesn't really matter - return false; - } - let smallLineCharCount = 0; - let longLineCharCount = 0; - const lineCount = this._buffer.getLineCount(); - for (let lineNumber = 1; lineNumber <= lineCount; lineNumber++) { - const lineLength = this._buffer.getLineLength(lineNumber); - if (lineLength >= LONG_LINE_BOUNDARY) { - longLineCharCount += lineLength; - } - else { - smallLineCharCount += lineLength; - } - } - return (longLineCharCount > smallLineCharCount); - } - get uri() { - return this._associatedResource; - } - //#region Options - getOptions() { - this._assertNotDisposed(); - return this._options; - } - getFormattingOptions() { - return { - tabSize: this._options.indentSize, - insertSpaces: this._options.insertSpaces - }; - } - updateOptions(_newOpts) { - this._assertNotDisposed(); - let tabSize = (typeof _newOpts.tabSize !== 'undefined') ? _newOpts.tabSize : this._options.tabSize; - let indentSize = (typeof _newOpts.indentSize !== 'undefined') ? _newOpts.indentSize : this._options.indentSize; - let insertSpaces = (typeof _newOpts.insertSpaces !== 'undefined') ? _newOpts.insertSpaces : this._options.insertSpaces; - let trimAutoWhitespace = (typeof _newOpts.trimAutoWhitespace !== 'undefined') ? _newOpts.trimAutoWhitespace : this._options.trimAutoWhitespace; - let newOpts = new _model_js__WEBPACK_IMPORTED_MODULE_9__["TextModelResolvedOptions"]({ - tabSize: tabSize, - indentSize: indentSize, - insertSpaces: insertSpaces, - defaultEOL: this._options.defaultEOL, - trimAutoWhitespace: trimAutoWhitespace - }); - if (this._options.equals(newOpts)) { - return; - } - let e = this._options.createChangeEvent(newOpts); - this._options = newOpts; - this._onDidChangeOptions.fire(e); - } - detectIndentation(defaultInsertSpaces, defaultTabSize) { - this._assertNotDisposed(); - let guessedIndentation = Object(_indentationGuesser_js__WEBPACK_IMPORTED_MODULE_11__["guessIndentation"])(this._buffer, defaultTabSize, defaultInsertSpaces); - this.updateOptions({ - insertSpaces: guessedIndentation.insertSpaces, - tabSize: guessedIndentation.tabSize, - indentSize: guessedIndentation.tabSize, - }); - } - static _normalizeIndentationFromWhitespace(str, indentSize, insertSpaces) { - let spacesCnt = 0; - for (let i = 0; i < str.length; i++) { - if (str.charAt(i) === '\t') { - spacesCnt += indentSize; - } - else { - spacesCnt++; - } - } - let result = ''; - if (!insertSpaces) { - let tabsCnt = Math.floor(spacesCnt / indentSize); - spacesCnt = spacesCnt % indentSize; - for (let i = 0; i < tabsCnt; i++) { - result += '\t'; - } - } - for (let i = 0; i < spacesCnt; i++) { - result += ' '; - } - return result; - } - static normalizeIndentation(str, indentSize, insertSpaces) { - let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["firstNonWhitespaceIndex"](str); - if (firstNonWhitespaceIndex === -1) { - firstNonWhitespaceIndex = str.length; - } - return TextModel._normalizeIndentationFromWhitespace(str.substring(0, firstNonWhitespaceIndex), indentSize, insertSpaces) + str.substring(firstNonWhitespaceIndex); - } - normalizeIndentation(str) { - this._assertNotDisposed(); - return TextModel.normalizeIndentation(str, this._options.indentSize, this._options.insertSpaces); - } - //#endregion - //#region Reading - getVersionId() { - this._assertNotDisposed(); - return this._versionId; - } - mightContainRTL() { - return this._buffer.mightContainRTL(); - } - mightContainUnusualLineTerminators() { - return this._buffer.mightContainUnusualLineTerminators(); - } - removeUnusualLineTerminators(selections = null) { - const matches = this.findMatches(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["UNUSUAL_LINE_TERMINATORS"].source, false, true, false, null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - this._buffer.resetMightContainUnusualLineTerminators(); - this.pushEditOperations(selections, matches.map(m => ({ range: m.range, text: null })), () => null); - } - mightContainNonBasicASCII() { - return this._buffer.mightContainNonBasicASCII(); - } - getAlternativeVersionId() { - this._assertNotDisposed(); - return this._alternativeVersionId; - } - getOffsetAt(rawPosition) { - this._assertNotDisposed(); - let position = this._validatePosition(rawPosition.lineNumber, rawPosition.column, 0 /* Relaxed */); - return this._buffer.getOffsetAt(position.lineNumber, position.column); - } - getPositionAt(rawOffset) { - this._assertNotDisposed(); - let offset = (Math.min(this._buffer.getLength(), Math.max(0, rawOffset))); - return this._buffer.getPositionAt(offset); - } - _increaseVersionId() { - this._versionId = this._versionId + 1; - this._alternativeVersionId = this._versionId; - } - _overwriteVersionId(versionId) { - this._versionId = versionId; - } - _overwriteAlternativeVersionId(newAlternativeVersionId) { - this._alternativeVersionId = newAlternativeVersionId; - } - _overwriteInitialUndoRedoSnapshot(newInitialUndoRedoSnapshot) { - this._initialUndoRedoSnapshot = newInitialUndoRedoSnapshot; - } - getValue(eol, preserveBOM = false) { - this._assertNotDisposed(); - const fullModelRange = this.getFullModelRange(); - const fullModelValue = this.getValueInRange(fullModelRange, eol); - if (preserveBOM) { - return this._buffer.getBOM() + fullModelValue; - } - return fullModelValue; - } - createSnapshot(preserveBOM = false) { - return new TextModelSnapshot(this._buffer.createSnapshot(preserveBOM)); - } - getValueLength(eol, preserveBOM = false) { - this._assertNotDisposed(); - const fullModelRange = this.getFullModelRange(); - const fullModelValue = this.getValueLengthInRange(fullModelRange, eol); - if (preserveBOM) { - return this._buffer.getBOM().length + fullModelValue; - } - return fullModelValue; - } - getValueInRange(rawRange, eol = 0 /* TextDefined */) { - this._assertNotDisposed(); - return this._buffer.getValueInRange(this.validateRange(rawRange), eol); - } - getValueLengthInRange(rawRange, eol = 0 /* TextDefined */) { - this._assertNotDisposed(); - return this._buffer.getValueLengthInRange(this.validateRange(rawRange), eol); - } - getCharacterCountInRange(rawRange, eol = 0 /* TextDefined */) { - this._assertNotDisposed(); - return this._buffer.getCharacterCountInRange(this.validateRange(rawRange), eol); - } - getLineCount() { - this._assertNotDisposed(); - return this._buffer.getLineCount(); - } - getLineContent(lineNumber) { - this._assertNotDisposed(); - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._buffer.getLineContent(lineNumber); - } - getLineLength(lineNumber) { - this._assertNotDisposed(); - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._buffer.getLineLength(lineNumber); - } - getLinesContent() { - this._assertNotDisposed(); - return this._buffer.getLinesContent(); - } - getEOL() { - this._assertNotDisposed(); - return this._buffer.getEOL(); - } - getLineMinColumn(lineNumber) { - this._assertNotDisposed(); - return 1; - } - getLineMaxColumn(lineNumber) { - this._assertNotDisposed(); - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._buffer.getLineLength(lineNumber) + 1; - } - getLineFirstNonWhitespaceColumn(lineNumber) { - this._assertNotDisposed(); - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._buffer.getLineFirstNonWhitespaceColumn(lineNumber); - } - getLineLastNonWhitespaceColumn(lineNumber) { - this._assertNotDisposed(); - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._buffer.getLineLastNonWhitespaceColumn(lineNumber); - } - /** - * Validates `range` is within buffer bounds, but allows it to sit in between surrogate pairs, etc. - * Will try to not allocate if possible. - */ - _validateRangeRelaxedNoAllocations(range) { - const linesCount = this._buffer.getLineCount(); - const initialStartLineNumber = range.startLineNumber; - const initialStartColumn = range.startColumn; - let startLineNumber; - let startColumn; - if (initialStartLineNumber < 1) { - startLineNumber = 1; - startColumn = 1; - } - else if (initialStartLineNumber > linesCount) { - startLineNumber = linesCount; - startColumn = this.getLineMaxColumn(startLineNumber); - } - else { - startLineNumber = initialStartLineNumber | 0; - if (initialStartColumn <= 1) { - startColumn = 1; - } - else { - const maxColumn = this.getLineMaxColumn(startLineNumber); - if (initialStartColumn >= maxColumn) { - startColumn = maxColumn; - } - else { - startColumn = initialStartColumn | 0; - } - } - } - const initialEndLineNumber = range.endLineNumber; - const initialEndColumn = range.endColumn; - let endLineNumber; - let endColumn; - if (initialEndLineNumber < 1) { - endLineNumber = 1; - endColumn = 1; - } - else if (initialEndLineNumber > linesCount) { - endLineNumber = linesCount; - endColumn = this.getLineMaxColumn(endLineNumber); - } - else { - endLineNumber = initialEndLineNumber | 0; - if (initialEndColumn <= 1) { - endColumn = 1; - } - else { - const maxColumn = this.getLineMaxColumn(endLineNumber); - if (initialEndColumn >= maxColumn) { - endColumn = maxColumn; - } - else { - endColumn = initialEndColumn | 0; - } - } - } - if (initialStartLineNumber === startLineNumber - && initialStartColumn === startColumn - && initialEndLineNumber === endLineNumber - && initialEndColumn === endColumn - && range instanceof _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"] - && !(range instanceof _core_selection_js__WEBPACK_IMPORTED_MODULE_8__["Selection"])) { - return range; - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - } - _isValidPosition(lineNumber, column, validationType) { - if (typeof lineNumber !== 'number' || typeof column !== 'number') { - return false; - } - if (isNaN(lineNumber) || isNaN(column)) { - return false; - } - if (lineNumber < 1 || column < 1) { - return false; - } - if ((lineNumber | 0) !== lineNumber || (column | 0) !== column) { - return false; - } - const lineCount = this._buffer.getLineCount(); - if (lineNumber > lineCount) { - return false; - } - if (column === 1) { - return true; - } - const maxColumn = this.getLineMaxColumn(lineNumber); - if (column > maxColumn) { - return false; - } - if (validationType === 1 /* SurrogatePairs */) { - // !!At this point, column > 1 - const charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBefore)) { - return false; - } - } - return true; - } - _validatePosition(_lineNumber, _column, validationType) { - const lineNumber = Math.floor((typeof _lineNumber === 'number' && !isNaN(_lineNumber)) ? _lineNumber : 1); - const column = Math.floor((typeof _column === 'number' && !isNaN(_column)) ? _column : 1); - const lineCount = this._buffer.getLineCount(); - if (lineNumber < 1) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](1, 1); - } - if (lineNumber > lineCount) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineCount, this.getLineMaxColumn(lineCount)); - } - if (column <= 1) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineNumber, 1); - } - const maxColumn = this.getLineMaxColumn(lineNumber); - if (column >= maxColumn) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineNumber, maxColumn); - } - if (validationType === 1 /* SurrogatePairs */) { - // If the position would end up in the middle of a high-low surrogate pair, - // we move it to before the pair - // !!At this point, column > 1 - const charCodeBefore = this._buffer.getLineCharCode(lineNumber, column - 2); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBefore)) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineNumber, column - 1); - } - } - return new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineNumber, column); - } - validatePosition(position) { - const validationType = 1 /* SurrogatePairs */; - this._assertNotDisposed(); - // Avoid object allocation and cover most likely case - if (position instanceof _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"]) { - if (this._isValidPosition(position.lineNumber, position.column, validationType)) { - return position; - } - } - return this._validatePosition(position.lineNumber, position.column, validationType); - } - _isValidRange(range, validationType) { - const startLineNumber = range.startLineNumber; - const startColumn = range.startColumn; - const endLineNumber = range.endLineNumber; - const endColumn = range.endColumn; - if (!this._isValidPosition(startLineNumber, startColumn, 0 /* Relaxed */)) { - return false; - } - if (!this._isValidPosition(endLineNumber, endColumn, 0 /* Relaxed */)) { - return false; - } - if (validationType === 1 /* SurrogatePairs */) { - const charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0); - const charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0); - const startInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBeforeStart); - const endInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBeforeEnd); - if (!startInsideSurrogatePair && !endInsideSurrogatePair) { - return true; - } - return false; - } - return true; - } - validateRange(_range) { - const validationType = 1 /* SurrogatePairs */; - this._assertNotDisposed(); - // Avoid object allocation and cover most likely case - if ((_range instanceof _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"]) && !(_range instanceof _core_selection_js__WEBPACK_IMPORTED_MODULE_8__["Selection"])) { - if (this._isValidRange(_range, validationType)) { - return _range; - } - } - const start = this._validatePosition(_range.startLineNumber, _range.startColumn, 0 /* Relaxed */); - const end = this._validatePosition(_range.endLineNumber, _range.endColumn, 0 /* Relaxed */); - const startLineNumber = start.lineNumber; - const startColumn = start.column; - const endLineNumber = end.lineNumber; - const endColumn = end.column; - if (validationType === 1 /* SurrogatePairs */) { - const charCodeBeforeStart = (startColumn > 1 ? this._buffer.getLineCharCode(startLineNumber, startColumn - 2) : 0); - const charCodeBeforeEnd = (endColumn > 1 && endColumn <= this._buffer.getLineLength(endLineNumber) ? this._buffer.getLineCharCode(endLineNumber, endColumn - 2) : 0); - const startInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBeforeStart); - const endInsideSurrogatePair = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["isHighSurrogate"](charCodeBeforeEnd); - if (!startInsideSurrogatePair && !endInsideSurrogatePair) { - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - } - if (startLineNumber === endLineNumber && startColumn === endColumn) { - // do not expand a collapsed range, simply move it to a valid location - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn - 1, endLineNumber, endColumn - 1); - } - if (startInsideSurrogatePair && endInsideSurrogatePair) { - // expand range at both ends - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn - 1, endLineNumber, endColumn + 1); - } - if (startInsideSurrogatePair) { - // only expand range at the start - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn - 1, endLineNumber, endColumn); - } - // only expand range at the end - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn, endLineNumber, endColumn + 1); - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - } - modifyPosition(rawPosition, offset) { - this._assertNotDisposed(); - let candidate = this.getOffsetAt(rawPosition) + offset; - return this.getPositionAt(Math.min(this._buffer.getLength(), Math.max(0, candidate))); - } - getFullModelRange() { - this._assertNotDisposed(); - const lineCount = this.getLineCount(); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, lineCount, this.getLineMaxColumn(lineCount)); - } - findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount) { - return this._buffer.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount); - } - findMatches(searchString, rawSearchScope, isRegex, matchCase, wordSeparators, captureMatches, limitResultCount = LIMIT_FIND_COUNT) { - this._assertNotDisposed(); - let searchRanges = null; - if (rawSearchScope !== null) { - if (!Array.isArray(rawSearchScope)) { - rawSearchScope = [rawSearchScope]; - } - if (rawSearchScope.every((searchScope) => _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].isIRange(searchScope))) { - searchRanges = rawSearchScope.map((searchScope) => this.validateRange(searchScope)); - } - } - if (searchRanges === null) { - searchRanges = [this.getFullModelRange()]; - } - searchRanges = searchRanges.sort((d1, d2) => d1.startLineNumber - d2.startLineNumber || d1.startColumn - d2.startColumn); - const uniqueSearchRanges = []; - uniqueSearchRanges.push(searchRanges.reduce((prev, curr) => { - if (_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].areIntersecting(prev, curr)) { - return prev.plusRange(curr); - } - uniqueSearchRanges.push(prev); - return curr; - })); - let matchMapper; - if (!isRegex && searchString.indexOf('\n') < 0) { - // not regex, not multi line - const searchParams = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators); - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return []; - } - matchMapper = (searchRange) => this.findMatchesLineByLine(searchRange, searchData, captureMatches, limitResultCount); - } - else { - matchMapper = (searchRange) => _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["TextModelSearch"].findMatches(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators), searchRange, captureMatches, limitResultCount); - } - return uniqueSearchRanges.map(matchMapper).reduce((arr, matches) => arr.concat(matches), []); - } - findNextMatch(searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) { - this._assertNotDisposed(); - const searchStart = this.validatePosition(rawSearchStart); - if (!isRegex && searchString.indexOf('\n') < 0) { - const searchParams = new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators); - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return null; - } - const lineCount = this.getLineCount(); - let searchRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](searchStart.lineNumber, searchStart.column, lineCount, this.getLineMaxColumn(lineCount)); - let ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1); - _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["TextModelSearch"].findNextMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); - if (ret.length > 0) { - return ret[0]; - } - searchRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](1, 1, searchStart.lineNumber, this.getLineMaxColumn(searchStart.lineNumber)); - ret = this.findMatchesLineByLine(searchRange, searchData, captureMatches, 1); - if (ret.length > 0) { - return ret[0]; - } - return null; - } - return _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["TextModelSearch"].findNextMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); - } - findPreviousMatch(searchString, rawSearchStart, isRegex, matchCase, wordSeparators, captureMatches) { - this._assertNotDisposed(); - const searchStart = this.validatePosition(rawSearchStart); - return _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["TextModelSearch"].findPreviousMatch(this, new _textModelSearch_js__WEBPACK_IMPORTED_MODULE_15__["SearchParams"](searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); - } - //#endregion - //#region Editing - pushStackElement() { - this._commandManager.pushStackElement(); - } - pushEOL(eol) { - const currentEOL = (this.getEOL() === '\n' ? 0 /* LF */ : 1 /* CRLF */); - if (currentEOL === eol) { - return; - } - try { - this._onDidChangeDecorations.beginDeferredEmit(); - this._eventEmitter.beginDeferredEmit(); - if (this._initialUndoRedoSnapshot === null) { - this._initialUndoRedoSnapshot = this._undoRedoService.createSnapshot(this.uri); - } - this._commandManager.pushEOL(eol); - } - finally { - this._eventEmitter.endDeferredEmit(); - this._onDidChangeDecorations.endDeferredEmit(); - } - } - _validateEditOperation(rawOperation) { - if (rawOperation instanceof _model_js__WEBPACK_IMPORTED_MODULE_9__["ValidAnnotatedEditOperation"]) { - return rawOperation; - } - return new _model_js__WEBPACK_IMPORTED_MODULE_9__["ValidAnnotatedEditOperation"](rawOperation.identifier || null, this.validateRange(rawOperation.range), rawOperation.text, rawOperation.forceMoveMarkers || false, rawOperation.isAutoWhitespaceEdit || false, rawOperation._isTracked || false); - } - _validateEditOperations(rawOperations) { - const result = []; - for (let i = 0, len = rawOperations.length; i < len; i++) { - result[i] = this._validateEditOperation(rawOperations[i]); - } - return result; - } - pushEditOperations(beforeCursorState, editOperations, cursorStateComputer) { - try { - this._onDidChangeDecorations.beginDeferredEmit(); - this._eventEmitter.beginDeferredEmit(); - return this._pushEditOperations(beforeCursorState, this._validateEditOperations(editOperations), cursorStateComputer); - } - finally { - this._eventEmitter.endDeferredEmit(); - this._onDidChangeDecorations.endDeferredEmit(); - } - } - _pushEditOperations(beforeCursorState, editOperations, cursorStateComputer) { - if (this._options.trimAutoWhitespace && this._trimAutoWhitespaceLines) { - // Go through each saved line number and insert a trim whitespace edit - // if it is safe to do so (no conflicts with other edits). - let incomingEdits = editOperations.map((op) => { - return { - range: this.validateRange(op.range), - text: op.text - }; - }); - // Sometimes, auto-formatters change ranges automatically which can cause undesired auto whitespace trimming near the cursor - // We'll use the following heuristic: if the edits occur near the cursor, then it's ok to trim auto whitespace - let editsAreNearCursors = true; - if (beforeCursorState) { - for (let i = 0, len = beforeCursorState.length; i < len; i++) { - let sel = beforeCursorState[i]; - let foundEditNearSel = false; - for (let j = 0, lenJ = incomingEdits.length; j < lenJ; j++) { - let editRange = incomingEdits[j].range; - let selIsAbove = editRange.startLineNumber > sel.endLineNumber; - let selIsBelow = sel.startLineNumber > editRange.endLineNumber; - if (!selIsAbove && !selIsBelow) { - foundEditNearSel = true; - break; - } - } - if (!foundEditNearSel) { - editsAreNearCursors = false; - break; - } - } - } - if (editsAreNearCursors) { - for (let i = 0, len = this._trimAutoWhitespaceLines.length; i < len; i++) { - let trimLineNumber = this._trimAutoWhitespaceLines[i]; - let maxLineColumn = this.getLineMaxColumn(trimLineNumber); - let allowTrimLine = true; - for (let j = 0, lenJ = incomingEdits.length; j < lenJ; j++) { - let editRange = incomingEdits[j].range; - let editText = incomingEdits[j].text; - if (trimLineNumber < editRange.startLineNumber || trimLineNumber > editRange.endLineNumber) { - // `trimLine` is completely outside this edit - continue; - } - // At this point: - // editRange.startLineNumber <= trimLine <= editRange.endLineNumber - if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === maxLineColumn - && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(0) === '\n') { - // This edit inserts a new line (and maybe other text) after `trimLine` - continue; - } - if (trimLineNumber === editRange.startLineNumber && editRange.startColumn === 1 - && editRange.isEmpty() && editText && editText.length > 0 && editText.charAt(editText.length - 1) === '\n') { - // This edit inserts a new line (and maybe other text) before `trimLine` - continue; - } - // Looks like we can't trim this line as it would interfere with an incoming edit - allowTrimLine = false; - break; - } - if (allowTrimLine) { - const trimRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](trimLineNumber, 1, trimLineNumber, maxLineColumn); - editOperations.push(new _model_js__WEBPACK_IMPORTED_MODULE_9__["ValidAnnotatedEditOperation"](null, trimRange, null, false, false, false)); - } - } - } - this._trimAutoWhitespaceLines = null; - } - if (this._initialUndoRedoSnapshot === null) { - this._initialUndoRedoSnapshot = this._undoRedoService.createSnapshot(this.uri); - } - return this._commandManager.pushEditOperation(beforeCursorState, editOperations, cursorStateComputer); - } - _applyUndo(changes, eol, resultingAlternativeVersionId, resultingSelection) { - const edits = changes.map((change) => { - const rangeStart = this.getPositionAt(change.newPosition); - const rangeEnd = this.getPositionAt(change.newEnd); - return { - range: new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](rangeStart.lineNumber, rangeStart.column, rangeEnd.lineNumber, rangeEnd.column), - text: change.oldText - }; - }); - this._applyUndoRedoEdits(edits, eol, true, false, resultingAlternativeVersionId, resultingSelection); - } - _applyRedo(changes, eol, resultingAlternativeVersionId, resultingSelection) { - const edits = changes.map((change) => { - const rangeStart = this.getPositionAt(change.oldPosition); - const rangeEnd = this.getPositionAt(change.oldEnd); - return { - range: new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](rangeStart.lineNumber, rangeStart.column, rangeEnd.lineNumber, rangeEnd.column), - text: change.newText - }; - }); - this._applyUndoRedoEdits(edits, eol, false, true, resultingAlternativeVersionId, resultingSelection); - } - _applyUndoRedoEdits(edits, eol, isUndoing, isRedoing, resultingAlternativeVersionId, resultingSelection) { - try { - this._onDidChangeDecorations.beginDeferredEmit(); - this._eventEmitter.beginDeferredEmit(); - this._isUndoing = isUndoing; - this._isRedoing = isRedoing; - this.applyEdits(edits, false); - this.setEOL(eol); - this._overwriteAlternativeVersionId(resultingAlternativeVersionId); - } - finally { - this._isUndoing = false; - this._isRedoing = false; - this._eventEmitter.endDeferredEmit(resultingSelection); - this._onDidChangeDecorations.endDeferredEmit(); - } - } - applyEdits(rawOperations, computeUndoEdits = false) { - try { - this._onDidChangeDecorations.beginDeferredEmit(); - this._eventEmitter.beginDeferredEmit(); - const operations = this._validateEditOperations(rawOperations); - return this._doApplyEdits(operations, computeUndoEdits); - } - finally { - this._eventEmitter.endDeferredEmit(); - this._onDidChangeDecorations.endDeferredEmit(); - } - } - _doApplyEdits(rawOperations, computeUndoEdits) { - const oldLineCount = this._buffer.getLineCount(); - const result = this._buffer.applyEdits(rawOperations, this._options.trimAutoWhitespace, computeUndoEdits); - const newLineCount = this._buffer.getLineCount(); - const contentChanges = result.changes; - this._trimAutoWhitespaceLines = result.trimAutoWhitespaceLineNumbers; - if (contentChanges.length !== 0) { - let rawContentChanges = []; - let lineCount = oldLineCount; - for (let i = 0, len = contentChanges.length; i < len; i++) { - const change = contentChanges[i]; - const [eolCount, firstLineLength, lastLineLength] = Object(_tokensStore_js__WEBPACK_IMPORTED_MODULE_22__["countEOL"])(change.text); - this._tokens.acceptEdit(change.range, eolCount, firstLineLength); - this._tokens2.acceptEdit(change.range, eolCount, firstLineLength, lastLineLength, change.text.length > 0 ? change.text.charCodeAt(0) : 0 /* Null */); - this._onDidChangeDecorations.fire(); - this._decorationsTree.acceptReplace(change.rangeOffset, change.rangeLength, change.text.length, change.forceMoveMarkers); - const startLineNumber = change.range.startLineNumber; - const endLineNumber = change.range.endLineNumber; - const deletingLinesCnt = endLineNumber - startLineNumber; - const insertingLinesCnt = eolCount; - const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); - const changeLineCountDelta = (insertingLinesCnt - deletingLinesCnt); - for (let j = editingLinesCnt; j >= 0; j--) { - const editLineNumber = startLineNumber + j; - const currentEditLineNumber = newLineCount - lineCount - changeLineCountDelta + editLineNumber; - rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawLineChanged"](editLineNumber, this.getLineContent(currentEditLineNumber))); - } - if (editingLinesCnt < deletingLinesCnt) { - // Must delete some lines - const spliceStartLineNumber = startLineNumber + editingLinesCnt; - rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawLinesDeleted"](spliceStartLineNumber + 1, endLineNumber)); - } - if (editingLinesCnt < insertingLinesCnt) { - // Must insert some lines - const spliceLineNumber = startLineNumber + editingLinesCnt; - const cnt = insertingLinesCnt - editingLinesCnt; - const fromLineNumber = newLineCount - lineCount - cnt + spliceLineNumber + 1; - let newLines = []; - for (let i = 0; i < cnt; i++) { - let lineNumber = fromLineNumber + i; - newLines[lineNumber - fromLineNumber] = this.getLineContent(lineNumber); - } - rawContentChanges.push(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawLinesInserted"](spliceLineNumber + 1, startLineNumber + insertingLinesCnt, newLines)); - } - lineCount += changeLineCountDelta; - } - this._increaseVersionId(); - this._emitContentChangedEvent(new _textModelEvents_js__WEBPACK_IMPORTED_MODULE_14__["ModelRawContentChangedEvent"](rawContentChanges, this.getVersionId(), this._isUndoing, this._isRedoing), { - changes: contentChanges, - eol: this._buffer.getEOL(), - versionId: this.getVersionId(), - isUndoing: this._isUndoing, - isRedoing: this._isRedoing, - isFlush: false - }); - } - return (result.reverseEdits === null ? undefined : result.reverseEdits); - } - undo() { - this._undoRedoService.undo(this.uri); - } - canUndo() { - return this._undoRedoService.canUndo(this.uri); - } - redo() { - this._undoRedoService.redo(this.uri); - } - canRedo() { - return this._undoRedoService.canRedo(this.uri); - } - //#endregion - //#region Decorations - changeDecorations(callback, ownerId = 0) { - this._assertNotDisposed(); - try { - this._onDidChangeDecorations.beginDeferredEmit(); - return this._changeDecorations(ownerId, callback); - } - finally { - this._onDidChangeDecorations.endDeferredEmit(); - } - } - _changeDecorations(ownerId, callback) { - let changeAccessor = { - addDecoration: (range, options) => { - return this._deltaDecorationsImpl(ownerId, [], [{ range: range, options: options }])[0]; - }, - changeDecoration: (id, newRange) => { - this._changeDecorationImpl(id, newRange); - }, - changeDecorationOptions: (id, options) => { - this._changeDecorationOptionsImpl(id, _normalizeOptions(options)); - }, - removeDecoration: (id) => { - this._deltaDecorationsImpl(ownerId, [id], []); - }, - deltaDecorations: (oldDecorations, newDecorations) => { - if (oldDecorations.length === 0 && newDecorations.length === 0) { - // nothing to do - return []; - } - return this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations); - } - }; - let result = null; - try { - result = callback(changeAccessor); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - } - // Invalidate change accessor - changeAccessor.addDecoration = invalidFunc; - changeAccessor.changeDecoration = invalidFunc; - changeAccessor.changeDecorationOptions = invalidFunc; - changeAccessor.removeDecoration = invalidFunc; - changeAccessor.deltaDecorations = invalidFunc; - return result; - } - deltaDecorations(oldDecorations, newDecorations, ownerId = 0) { - this._assertNotDisposed(); - if (!oldDecorations) { - oldDecorations = []; - } - if (oldDecorations.length === 0 && newDecorations.length === 0) { - // nothing to do - return []; - } - try { - this._onDidChangeDecorations.beginDeferredEmit(); - return this._deltaDecorationsImpl(ownerId, oldDecorations, newDecorations); - } - finally { - this._onDidChangeDecorations.endDeferredEmit(); - } - } - _getTrackedRange(id) { - return this.getDecorationRange(id); - } - _setTrackedRange(id, newRange, newStickiness) { - const node = (id ? this._decorations[id] : null); - if (!node) { - if (!newRange) { - // node doesn't exist, the request is to delete => nothing to do - return null; - } - // node doesn't exist, the request is to set => add the tracked range - return this._deltaDecorationsImpl(0, [], [{ range: newRange, options: TRACKED_RANGE_OPTIONS[newStickiness] }])[0]; - } - if (!newRange) { - // node exists, the request is to delete => delete node - this._decorationsTree.delete(node); - delete this._decorations[node.id]; - return null; - } - // node exists, the request is to set => change the tracked range and its options - const range = this._validateRangeRelaxedNoAllocations(newRange); - const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn); - const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn); - this._decorationsTree.delete(node); - node.reset(this.getVersionId(), startOffset, endOffset, range); - node.setOptions(TRACKED_RANGE_OPTIONS[newStickiness]); - this._decorationsTree.insert(node); - return node.id; - } - removeAllDecorationsWithOwnerId(ownerId) { - if (this._isDisposed) { - return; - } - const nodes = this._decorationsTree.collectNodesFromOwner(ownerId); - for (let i = 0, len = nodes.length; i < len; i++) { - const node = nodes[i]; - this._decorationsTree.delete(node); - delete this._decorations[node.id]; - } - } - getDecorationOptions(decorationId) { - const node = this._decorations[decorationId]; - if (!node) { - return null; - } - return node.options; - } - getDecorationRange(decorationId) { - const node = this._decorations[decorationId]; - if (!node) { - return null; - } - const versionId = this.getVersionId(); - if (node.cachedVersionId !== versionId) { - this._decorationsTree.resolveNode(node, versionId); - } - if (node.range === null) { - node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd); - } - return node.range; - } - getLineDecorations(lineNumber, ownerId = 0, filterOutValidation = false) { - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - return []; - } - return this.getLinesDecorations(lineNumber, lineNumber, ownerId, filterOutValidation); - } - getLinesDecorations(_startLineNumber, _endLineNumber, ownerId = 0, filterOutValidation = false) { - let lineCount = this.getLineCount(); - let startLineNumber = Math.min(lineCount, Math.max(1, _startLineNumber)); - let endLineNumber = Math.min(lineCount, Math.max(1, _endLineNumber)); - let endColumn = this.getLineMaxColumn(endLineNumber); - return this._getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](startLineNumber, 1, endLineNumber, endColumn), ownerId, filterOutValidation); - } - getDecorationsInRange(range, ownerId = 0, filterOutValidation = false) { - let validatedRange = this.validateRange(range); - return this._getDecorationsInRange(validatedRange, ownerId, filterOutValidation); - } - getOverviewRulerDecorations(ownerId = 0, filterOutValidation = false) { - const versionId = this.getVersionId(); - const result = this._decorationsTree.search(ownerId, filterOutValidation, true, versionId); - return this._ensureNodesHaveRanges(result); - } - getAllDecorations(ownerId = 0, filterOutValidation = false) { - const versionId = this.getVersionId(); - const result = this._decorationsTree.search(ownerId, filterOutValidation, false, versionId); - return this._ensureNodesHaveRanges(result); - } - _getDecorationsInRange(filterRange, filterOwnerId, filterOutValidation) { - const startOffset = this._buffer.getOffsetAt(filterRange.startLineNumber, filterRange.startColumn); - const endOffset = this._buffer.getOffsetAt(filterRange.endLineNumber, filterRange.endColumn); - const versionId = this.getVersionId(); - const result = this._decorationsTree.intervalSearch(startOffset, endOffset, filterOwnerId, filterOutValidation, versionId); - return this._ensureNodesHaveRanges(result); - } - _ensureNodesHaveRanges(nodes) { - for (let i = 0, len = nodes.length; i < len; i++) { - const node = nodes[i]; - if (node.range === null) { - node.range = this._getRangeAt(node.cachedAbsoluteStart, node.cachedAbsoluteEnd); - } - } - return nodes; - } - _getRangeAt(start, end) { - return this._buffer.getRangeAt(start, end - start); - } - _changeDecorationImpl(decorationId, _range) { - const node = this._decorations[decorationId]; - if (!node) { - return; - } - const range = this._validateRangeRelaxedNoAllocations(_range); - const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn); - const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn); - this._decorationsTree.delete(node); - node.reset(this.getVersionId(), startOffset, endOffset, range); - this._decorationsTree.insert(node); - this._onDidChangeDecorations.checkAffectedAndFire(node.options); - } - _changeDecorationOptionsImpl(decorationId, options) { - const node = this._decorations[decorationId]; - if (!node) { - return; - } - const nodeWasInOverviewRuler = (node.options.overviewRuler && node.options.overviewRuler.color ? true : false); - const nodeIsInOverviewRuler = (options.overviewRuler && options.overviewRuler.color ? true : false); - this._onDidChangeDecorations.checkAffectedAndFire(node.options); - this._onDidChangeDecorations.checkAffectedAndFire(options); - if (nodeWasInOverviewRuler !== nodeIsInOverviewRuler) { - // Delete + Insert due to an overview ruler status change - this._decorationsTree.delete(node); - node.setOptions(options); - this._decorationsTree.insert(node); - } - else { - node.setOptions(options); - } - } - _deltaDecorationsImpl(ownerId, oldDecorationsIds, newDecorations) { - const versionId = this.getVersionId(); - const oldDecorationsLen = oldDecorationsIds.length; - let oldDecorationIndex = 0; - const newDecorationsLen = newDecorations.length; - let newDecorationIndex = 0; - let result = new Array(newDecorationsLen); - while (oldDecorationIndex < oldDecorationsLen || newDecorationIndex < newDecorationsLen) { - let node = null; - if (oldDecorationIndex < oldDecorationsLen) { - // (1) get ourselves an old node - do { - node = this._decorations[oldDecorationsIds[oldDecorationIndex++]]; - } while (!node && oldDecorationIndex < oldDecorationsLen); - // (2) remove the node from the tree (if it exists) - if (node) { - this._decorationsTree.delete(node); - this._onDidChangeDecorations.checkAffectedAndFire(node.options); - } - } - if (newDecorationIndex < newDecorationsLen) { - // (3) create a new node if necessary - if (!node) { - const internalDecorationId = (++this._lastDecorationId); - const decorationId = `${this._instanceId};${internalDecorationId}`; - node = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["IntervalNode"](decorationId, 0, 0); - this._decorations[decorationId] = node; - } - // (4) initialize node - const newDecoration = newDecorations[newDecorationIndex]; - const range = this._validateRangeRelaxedNoAllocations(newDecoration.range); - const options = _normalizeOptions(newDecoration.options); - const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn); - const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn); - node.ownerId = ownerId; - node.reset(versionId, startOffset, endOffset, range); - node.setOptions(options); - this._onDidChangeDecorations.checkAffectedAndFire(options); - this._decorationsTree.insert(node); - result[newDecorationIndex] = node.id; - newDecorationIndex++; - } - else { - if (node) { - delete this._decorations[node.id]; - } - } - } - return result; - } - setTokens(tokens) { - if (tokens.length === 0) { - return; - } - let ranges = []; - for (let i = 0, len = tokens.length; i < len; i++) { - const element = tokens[i]; - let minChangedLineNumber = 0; - let maxChangedLineNumber = 0; - let hasChange = false; - for (let j = 0, lenJ = element.tokens.length; j < lenJ; j++) { - const lineNumber = element.startLineNumber + j; - if (hasChange) { - this._tokens.setTokens(this._languageIdentifier.id, lineNumber - 1, this._buffer.getLineLength(lineNumber), element.tokens[j], false); - maxChangedLineNumber = lineNumber; - } - else { - const lineHasChange = this._tokens.setTokens(this._languageIdentifier.id, lineNumber - 1, this._buffer.getLineLength(lineNumber), element.tokens[j], true); - if (lineHasChange) { - hasChange = true; - minChangedLineNumber = lineNumber; - maxChangedLineNumber = lineNumber; - } - } - } - if (hasChange) { - ranges.push({ fromLineNumber: minChangedLineNumber, toLineNumber: maxChangedLineNumber }); - } - } - if (ranges.length > 0) { - this._emitModelTokensChangedEvent({ - tokenizationSupportChanged: false, - semanticTokensApplied: false, - ranges: ranges - }); - } - } - setSemanticTokens(tokens, isComplete) { - this._tokens2.set(tokens, isComplete); - this._emitModelTokensChangedEvent({ - tokenizationSupportChanged: false, - semanticTokensApplied: tokens !== null, - ranges: [{ fromLineNumber: 1, toLineNumber: this.getLineCount() }] - }); - } - hasSemanticTokens() { - return this._tokens2.isComplete(); - } - setPartialSemanticTokens(range, tokens) { - if (this.hasSemanticTokens()) { - return; - } - const changedRange = this._tokens2.setPartial(range, tokens); - this._emitModelTokensChangedEvent({ - tokenizationSupportChanged: false, - semanticTokensApplied: true, - ranges: [{ fromLineNumber: changedRange.startLineNumber, toLineNumber: changedRange.endLineNumber }] - }); - } - tokenizeViewport(startLineNumber, endLineNumber) { - startLineNumber = Math.max(1, startLineNumber); - endLineNumber = Math.min(this._buffer.getLineCount(), endLineNumber); - this._tokenization.tokenizeViewport(startLineNumber, endLineNumber); - } - clearTokens() { - this._tokens.flush(); - this._emitModelTokensChangedEvent({ - tokenizationSupportChanged: true, - semanticTokensApplied: false, - ranges: [{ - fromLineNumber: 1, - toLineNumber: this._buffer.getLineCount() - }] - }); - } - _emitModelTokensChangedEvent(e) { - if (!this._isDisposing) { - this._onDidChangeTokens.fire(e); - } - } - resetTokenization() { - this._tokenization.reset(); - } - forceTokenization(lineNumber) { - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - this._tokenization.forceTokenization(lineNumber); - } - isCheapToTokenize(lineNumber) { - return this._tokenization.isCheapToTokenize(lineNumber); - } - tokenizeIfCheap(lineNumber) { - if (this.isCheapToTokenize(lineNumber)) { - this.forceTokenization(lineNumber); - } - } - getLineTokens(lineNumber) { - if (lineNumber < 1 || lineNumber > this.getLineCount()) { - throw new Error('Illegal value for lineNumber'); - } - return this._getLineTokens(lineNumber); - } - _getLineTokens(lineNumber) { - const lineText = this.getLineContent(lineNumber); - const syntacticTokens = this._tokens.getTokens(this._languageIdentifier.id, lineNumber - 1, lineText); - return this._tokens2.addSemanticTokens(lineNumber, syntacticTokens); - } - getLanguageIdentifier() { - return this._languageIdentifier; - } - getModeId() { - return this._languageIdentifier.language; - } - setMode(languageIdentifier) { - if (this._languageIdentifier.id === languageIdentifier.id) { - // There's nothing to do - return; - } - let e = { - oldLanguage: this._languageIdentifier.language, - newLanguage: languageIdentifier.language - }; - this._languageIdentifier = languageIdentifier; - this._onDidChangeLanguage.fire(e); - this._onDidChangeLanguageConfiguration.fire({}); - } - getLanguageIdAtPosition(lineNumber, column) { - const position = this.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](lineNumber, column)); - const lineTokens = this.getLineTokens(position.lineNumber); - return lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(position.column - 1)); - } - // Having tokens allows implementing additional helper methods - getWordAtPosition(_position) { - this._assertNotDisposed(); - const position = this.validatePosition(_position); - const lineContent = this.getLineContent(position.lineNumber); - const lineTokens = this._getLineTokens(position.lineNumber); - const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - // (1). First try checking right biased word - const [rbStartOffset, rbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex); - const rightBiasedWord = Object(_wordHelper_js__WEBPACK_IMPORTED_MODULE_17__["getWordAtText"])(position.column, _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getWordDefinition(lineTokens.getLanguageId(tokenIndex)), lineContent.substring(rbStartOffset, rbEndOffset), rbStartOffset); - // Make sure the result touches the original passed in position - if (rightBiasedWord && rightBiasedWord.startColumn <= _position.column && _position.column <= rightBiasedWord.endColumn) { - return rightBiasedWord; - } - // (2). Else, if we were at a language boundary, check the left biased word - if (tokenIndex > 0 && rbStartOffset === position.column - 1) { - // edge case, where `position` sits between two tokens belonging to two different languages - const [lbStartOffset, lbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex - 1); - const leftBiasedWord = Object(_wordHelper_js__WEBPACK_IMPORTED_MODULE_17__["getWordAtText"])(position.column, _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getWordDefinition(lineTokens.getLanguageId(tokenIndex - 1)), lineContent.substring(lbStartOffset, lbEndOffset), lbStartOffset); - // Make sure the result touches the original passed in position - if (leftBiasedWord && leftBiasedWord.startColumn <= _position.column && _position.column <= leftBiasedWord.endColumn) { - return leftBiasedWord; - } - } - return null; - } - static _findLanguageBoundaries(lineTokens, tokenIndex) { - const languageId = lineTokens.getLanguageId(tokenIndex); - // go left until a different language is hit - let startOffset = 0; - for (let i = tokenIndex; i >= 0 && lineTokens.getLanguageId(i) === languageId; i--) { - startOffset = lineTokens.getStartOffset(i); - } - // go right until a different language is hit - let endOffset = lineTokens.getLineContent().length; - for (let i = tokenIndex, tokenCount = lineTokens.getCount(); i < tokenCount && lineTokens.getLanguageId(i) === languageId; i++) { - endOffset = lineTokens.getEndOffset(i); - } - return [startOffset, endOffset]; - } - getWordUntilPosition(position) { - const wordAtPosition = this.getWordAtPosition(position); - if (!wordAtPosition) { - return { - word: '', - startColumn: position.column, - endColumn: position.column - }; - } - return { - word: wordAtPosition.word.substr(0, position.column - wordAtPosition.startColumn), - startColumn: wordAtPosition.startColumn, - endColumn: position.column - }; - } - findMatchingBracketUp(_bracket, _position) { - let bracket = _bracket.toLowerCase(); - let position = this.validatePosition(_position); - let lineTokens = this._getLineTokens(position.lineNumber); - let languageId = lineTokens.getLanguageId(lineTokens.findTokenIndexAtOffset(position.column - 1)); - let bracketsSupport = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - if (!bracketsSupport) { - return null; - } - let data = bracketsSupport.textIsBracket[bracket]; - if (!data) { - return null; - } - return stripBracketSearchCanceled(this._findMatchingBracketUp(data, position, null)); - } - matchBracket(position) { - return this._matchBracket(this.validatePosition(position)); - } - _matchBracket(position) { - const lineNumber = position.lineNumber; - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - if (tokenIndex < 0) { - return null; - } - const currentModeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(lineTokens.getLanguageId(tokenIndex)); - // check that the token is not to be ignored - if (currentModeBrackets && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))) { - // limit search to not go before `maxBracketLength` - let searchStartOffset = Math.max(0, position.column - 1 - currentModeBrackets.maxBracketLength); - for (let i = tokenIndex - 1; i >= 0; i--) { - const tokenEndOffset = lineTokens.getEndOffset(i); - if (tokenEndOffset <= searchStartOffset) { - break; - } - if (Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(i))) { - searchStartOffset = tokenEndOffset; - } - } - // limit search to not go after `maxBracketLength` - const searchEndOffset = Math.min(lineText.length, position.column - 1 + currentModeBrackets.maxBracketLength); - // it might be the case that [currentTokenStart -> currentTokenEnd] contains multiple brackets - // `bestResult` will contain the most right-side result - let bestResult = null; - while (true) { - const foundBracket = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(currentModeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (!foundBracket) { - // there are no more brackets in this text - break; - } - // check that we didn't hit a bracket too far away from position - if (foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) { - const foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1).toLowerCase(); - const r = this._matchFoundBracket(foundBracket, currentModeBrackets.textIsBracket[foundBracketText], currentModeBrackets.textIsOpenBracket[foundBracketText], null); - if (r) { - if (r instanceof BracketSearchCanceled) { - return null; - } - bestResult = r; - } - } - searchStartOffset = foundBracket.endColumn - 1; - } - if (bestResult) { - return bestResult; - } - } - // If position is in between two tokens, try also looking in the previous token - if (tokenIndex > 0 && lineTokens.getStartOffset(tokenIndex) === position.column - 1) { - const prevTokenIndex = tokenIndex - 1; - const prevModeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(lineTokens.getLanguageId(prevTokenIndex)); - // check that previous token is not to be ignored - if (prevModeBrackets && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(prevTokenIndex))) { - // limit search in case previous token is very large, there's no need to go beyond `maxBracketLength` - const searchStartOffset = Math.max(0, position.column - 1 - prevModeBrackets.maxBracketLength); - let searchEndOffset = Math.min(lineText.length, position.column - 1 + prevModeBrackets.maxBracketLength); - for (let i = prevTokenIndex + 1; i < tokenCount; i++) { - const tokenStartOffset = lineTokens.getStartOffset(i); - if (tokenStartOffset >= searchEndOffset) { - break; - } - if (Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(i))) { - searchEndOffset = tokenStartOffset; - } - } - const foundBracket = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findPrevBracketInRange(prevModeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - // check that we didn't hit a bracket too far away from position - if (foundBracket && foundBracket.startColumn <= position.column && position.column <= foundBracket.endColumn) { - const foundBracketText = lineText.substring(foundBracket.startColumn - 1, foundBracket.endColumn - 1).toLowerCase(); - const r = this._matchFoundBracket(foundBracket, prevModeBrackets.textIsBracket[foundBracketText], prevModeBrackets.textIsOpenBracket[foundBracketText], null); - if (r) { - if (r instanceof BracketSearchCanceled) { - return null; - } - return r; - } - } - } - } - return null; - } - _matchFoundBracket(foundBracket, data, isOpen, continueSearchPredicate) { - if (!data) { - return null; - } - const matched = (isOpen - ? this._findMatchingBracketDown(data, foundBracket.getEndPosition(), continueSearchPredicate) - : this._findMatchingBracketUp(data, foundBracket.getStartPosition(), continueSearchPredicate)); - if (!matched) { - return null; - } - if (matched instanceof BracketSearchCanceled) { - return matched; - } - return [foundBracket, matched]; - } - _findMatchingBracketUp(bracket, position, continueSearchPredicate) { - // console.log('_findMatchingBracketUp: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position)); - const languageId = bracket.languageIdentifier.id; - const reversedBracketRegex = bracket.reversedRegex; - let count = -1; - let totalCallCount = 0; - const searchPrevMatchingBracketInRange = (lineNumber, lineText, searchStartOffset, searchEndOffset) => { - while (true) { - if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) { - return BracketSearchCanceled.INSTANCE; - } - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findPrevBracketInRange(reversedBracketRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (!r) { - break; - } - const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase(); - if (bracket.isOpen(hitText)) { - count++; - } - else if (bracket.isClose(hitText)) { - count--; - } - if (count === 0) { - return r; - } - searchEndOffset = r.startColumn - 1; - } - return null; - }; - for (let lineNumber = position.lineNumber; lineNumber >= 1; lineNumber--) { - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - let tokenIndex = tokenCount - 1; - let searchStartOffset = lineText.length; - let searchEndOffset = lineText.length; - if (lineNumber === position.lineNumber) { - tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - searchStartOffset = position.column - 1; - searchEndOffset = position.column - 1; - } - let prevSearchInToken = true; - for (; tokenIndex >= 0; tokenIndex--) { - const searchInToken = (lineTokens.getLanguageId(tokenIndex) === languageId && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))); - if (searchInToken) { - // this token should be searched - if (prevSearchInToken) { - // the previous token should be searched, simply extend searchStartOffset - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - } - else { - // the previous token should not be searched - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - } - else { - // this token should not be searched - if (prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchPrevMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return r; - } - } - } - prevSearchInToken = searchInToken; - } - if (prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchPrevMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return r; - } - } - } - return null; - } - _findMatchingBracketDown(bracket, position, continueSearchPredicate) { - // console.log('_findMatchingBracketDown: ', 'bracket: ', JSON.stringify(bracket), 'startPosition: ', String(position)); - const languageId = bracket.languageIdentifier.id; - const bracketRegex = bracket.forwardRegex; - let count = 1; - let totalCallCount = 0; - const searchNextMatchingBracketInRange = (lineNumber, lineText, searchStartOffset, searchEndOffset) => { - while (true) { - if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) { - return BracketSearchCanceled.INSTANCE; - } - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(bracketRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (!r) { - break; - } - const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase(); - if (bracket.isOpen(hitText)) { - count++; - } - else if (bracket.isClose(hitText)) { - count--; - } - if (count === 0) { - return r; - } - searchStartOffset = r.endColumn - 1; - } - return null; - }; - const lineCount = this.getLineCount(); - for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) { - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - let tokenIndex = 0; - let searchStartOffset = 0; - let searchEndOffset = 0; - if (lineNumber === position.lineNumber) { - tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - searchStartOffset = position.column - 1; - searchEndOffset = position.column - 1; - } - let prevSearchInToken = true; - for (; tokenIndex < tokenCount; tokenIndex++) { - const searchInToken = (lineTokens.getLanguageId(tokenIndex) === languageId && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))); - if (searchInToken) { - // this token should be searched - if (prevSearchInToken) { - // the previous token should be searched, simply extend searchEndOffset - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - else { - // the previous token should not be searched - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - } - else { - // this token should not be searched - if (prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchNextMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return r; - } - } - } - prevSearchInToken = searchInToken; - } - if (prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchNextMatchingBracketInRange(lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return r; - } - } - } - return null; - } - findPrevBracket(_position) { - const position = this.validatePosition(_position); - let languageId = -1; - let modeBrackets = null; - for (let lineNumber = position.lineNumber; lineNumber >= 1; lineNumber--) { - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - let tokenIndex = tokenCount - 1; - let searchStartOffset = lineText.length; - let searchEndOffset = lineText.length; - if (lineNumber === position.lineNumber) { - tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - searchStartOffset = position.column - 1; - searchEndOffset = position.column - 1; - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - } - } - let prevSearchInToken = true; - for (; tokenIndex >= 0; tokenIndex--) { - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - // language id change! - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - prevSearchInToken = false; - } - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - } - const searchInToken = (!!modeBrackets && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))); - if (searchInToken) { - // this token should be searched - if (prevSearchInToken) { - // the previous token should be searched, simply extend searchStartOffset - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - } - else { - // the previous token should not be searched - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - } - else { - // this token should not be searched - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - } - } - prevSearchInToken = searchInToken; - } - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findPrevBracketInRange(modeBrackets.reversedRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - } - } - return null; - } - findNextBracket(_position) { - const position = this.validatePosition(_position); - const lineCount = this.getLineCount(); - let languageId = -1; - let modeBrackets = null; - for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) { - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - let tokenIndex = 0; - let searchStartOffset = 0; - let searchEndOffset = 0; - if (lineNumber === position.lineNumber) { - tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - searchStartOffset = position.column - 1; - searchEndOffset = position.column - 1; - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - } - } - let prevSearchInToken = true; - for (; tokenIndex < tokenCount; tokenIndex++) { - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - // language id change! - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - prevSearchInToken = false; - } - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - } - const searchInToken = (!!modeBrackets && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))); - if (searchInToken) { - // this token should be searched - if (prevSearchInToken) { - // the previous token should be searched, simply extend searchEndOffset - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - else { - // the previous token should not be searched - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - } - else { - // this token should not be searched - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - } - } - prevSearchInToken = searchInToken; - } - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return this._toFoundBracket(modeBrackets, r); - } - } - } - return null; - } - findEnclosingBrackets(_position, maxDuration) { - let continueSearchPredicate; - if (typeof maxDuration === 'undefined') { - continueSearchPredicate = null; - } - else { - const startTime = Date.now(); - continueSearchPredicate = () => { - return (Date.now() - startTime <= maxDuration); - }; - } - const position = this.validatePosition(_position); - const lineCount = this.getLineCount(); - const savedCounts = new Map(); - let counts = []; - const resetCounts = (languageId, modeBrackets) => { - if (!savedCounts.has(languageId)) { - let tmp = []; - for (let i = 0, len = modeBrackets ? modeBrackets.brackets.length : 0; i < len; i++) { - tmp[i] = 0; - } - savedCounts.set(languageId, tmp); - } - counts = savedCounts.get(languageId); - }; - let totalCallCount = 0; - const searchInRange = (modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset) => { - while (true) { - if (continueSearchPredicate && (++totalCallCount) % 100 === 0 && !continueSearchPredicate()) { - return BracketSearchCanceled.INSTANCE; - } - const r = _modes_supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_21__["BracketsUtils"].findNextBracketInRange(modeBrackets.forwardRegex, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (!r) { - break; - } - const hitText = lineText.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase(); - const bracket = modeBrackets.textIsBracket[hitText]; - if (bracket) { - if (bracket.isOpen(hitText)) { - counts[bracket.index]++; - } - else if (bracket.isClose(hitText)) { - counts[bracket.index]--; - } - if (counts[bracket.index] === -1) { - return this._matchFoundBracket(r, bracket, false, continueSearchPredicate); - } - } - searchStartOffset = r.endColumn - 1; - } - return null; - }; - let languageId = -1; - let modeBrackets = null; - for (let lineNumber = position.lineNumber; lineNumber <= lineCount; lineNumber++) { - const lineTokens = this._getLineTokens(lineNumber); - const tokenCount = lineTokens.getCount(); - const lineText = this._buffer.getLineContent(lineNumber); - let tokenIndex = 0; - let searchStartOffset = 0; - let searchEndOffset = 0; - if (lineNumber === position.lineNumber) { - tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); - searchStartOffset = position.column - 1; - searchEndOffset = position.column - 1; - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - resetCounts(languageId, modeBrackets); - } - } - let prevSearchInToken = true; - for (; tokenIndex < tokenCount; tokenIndex++) { - const tokenLanguageId = lineTokens.getLanguageId(tokenIndex); - if (languageId !== tokenLanguageId) { - // language id change! - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return stripBracketSearchCanceled(r); - } - prevSearchInToken = false; - } - languageId = tokenLanguageId; - modeBrackets = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getBracketsSupport(languageId); - resetCounts(languageId, modeBrackets); - } - const searchInToken = (!!modeBrackets && !Object(_modes_supports_js__WEBPACK_IMPORTED_MODULE_20__["ignoreBracketsInToken"])(lineTokens.getStandardTokenType(tokenIndex))); - if (searchInToken) { - // this token should be searched - if (prevSearchInToken) { - // the previous token should be searched, simply extend searchEndOffset - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - else { - // the previous token should not be searched - searchStartOffset = lineTokens.getStartOffset(tokenIndex); - searchEndOffset = lineTokens.getEndOffset(tokenIndex); - } - } - else { - // this token should not be searched - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return stripBracketSearchCanceled(r); - } - } - } - prevSearchInToken = searchInToken; - } - if (modeBrackets && prevSearchInToken && searchStartOffset !== searchEndOffset) { - const r = searchInRange(modeBrackets, lineNumber, lineText, searchStartOffset, searchEndOffset); - if (r) { - return stripBracketSearchCanceled(r); - } - } - } - return null; - } - _toFoundBracket(modeBrackets, r) { - if (!r) { - return null; - } - let text = this.getValueInRange(r); - text = text.toLowerCase(); - let data = modeBrackets.textIsBracket[text]; - if (!data) { - return null; - } - return { - range: r, - open: data.open, - close: data.close, - isOpen: modeBrackets.textIsOpenBracket[text] - }; - } - /** - * Returns: - * - -1 => the line consists of whitespace - * - otherwise => the indent level is returned value - */ - static computeIndentLevel(line, tabSize) { - let indent = 0; - let i = 0; - let len = line.length; - while (i < len) { - let chCode = line.charCodeAt(i); - if (chCode === 32 /* Space */) { - indent++; - } - else if (chCode === 9 /* Tab */) { - indent = indent - indent % tabSize + tabSize; - } - else { - break; - } - i++; - } - if (i === len) { - return -1; // line only consists of whitespace - } - return indent; - } - _computeIndentLevel(lineIndex) { - return TextModel.computeIndentLevel(this._buffer.getLineContent(lineIndex + 1), this._options.tabSize); - } - getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber) { - this._assertNotDisposed(); - const lineCount = this.getLineCount(); - if (lineNumber < 1 || lineNumber > lineCount) { - throw new Error('Illegal value for lineNumber'); - } - const foldingRules = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getFoldingRules(this._languageIdentifier.id); - const offSide = Boolean(foldingRules && foldingRules.offSide); - let up_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let up_aboveContentLineIndent = -1; - let up_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let up_belowContentLineIndent = -1; - const up_resolveIndents = (lineNumber) => { - if (up_aboveContentLineIndex !== -1 && (up_aboveContentLineIndex === -2 || up_aboveContentLineIndex > lineNumber - 1)) { - up_aboveContentLineIndex = -1; - up_aboveContentLineIndent = -1; - // must find previous line with content - for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - up_aboveContentLineIndex = lineIndex; - up_aboveContentLineIndent = indent; - break; - } - } - } - if (up_belowContentLineIndex === -2) { - up_belowContentLineIndex = -1; - up_belowContentLineIndent = -1; - // must find next line with content - for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - up_belowContentLineIndex = lineIndex; - up_belowContentLineIndent = indent; - break; - } - } - } - }; - let down_aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let down_aboveContentLineIndent = -1; - let down_belowContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let down_belowContentLineIndent = -1; - const down_resolveIndents = (lineNumber) => { - if (down_aboveContentLineIndex === -2) { - down_aboveContentLineIndex = -1; - down_aboveContentLineIndent = -1; - // must find previous line with content - for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - down_aboveContentLineIndex = lineIndex; - down_aboveContentLineIndent = indent; - break; - } - } - } - if (down_belowContentLineIndex !== -1 && (down_belowContentLineIndex === -2 || down_belowContentLineIndex < lineNumber - 1)) { - down_belowContentLineIndex = -1; - down_belowContentLineIndent = -1; - // must find next line with content - for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - down_belowContentLineIndex = lineIndex; - down_belowContentLineIndent = indent; - break; - } - } - } - }; - let startLineNumber = 0; - let goUp = true; - let endLineNumber = 0; - let goDown = true; - let indent = 0; - let initialIndent = 0; - for (let distance = 0; goUp || goDown; distance++) { - const upLineNumber = lineNumber - distance; - const downLineNumber = lineNumber + distance; - if (distance > 1 && (upLineNumber < 1 || upLineNumber < minLineNumber)) { - goUp = false; - } - if (distance > 1 && (downLineNumber > lineCount || downLineNumber > maxLineNumber)) { - goDown = false; - } - if (distance > 50000) { - // stop processing - goUp = false; - goDown = false; - } - let upLineIndentLevel = -1; - if (goUp) { - // compute indent level going up - const currentIndent = this._computeIndentLevel(upLineNumber - 1); - if (currentIndent >= 0) { - // This line has content (besides whitespace) - // Use the line's indent - up_belowContentLineIndex = upLineNumber - 1; - up_belowContentLineIndent = currentIndent; - upLineIndentLevel = Math.ceil(currentIndent / this._options.indentSize); - } - else { - up_resolveIndents(upLineNumber); - upLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, up_aboveContentLineIndent, up_belowContentLineIndent); - } - } - let downLineIndentLevel = -1; - if (goDown) { - // compute indent level going down - const currentIndent = this._computeIndentLevel(downLineNumber - 1); - if (currentIndent >= 0) { - // This line has content (besides whitespace) - // Use the line's indent - down_aboveContentLineIndex = downLineNumber - 1; - down_aboveContentLineIndent = currentIndent; - downLineIndentLevel = Math.ceil(currentIndent / this._options.indentSize); - } - else { - down_resolveIndents(downLineNumber); - downLineIndentLevel = this._getIndentLevelForWhitespaceLine(offSide, down_aboveContentLineIndent, down_belowContentLineIndent); - } - } - if (distance === 0) { - initialIndent = upLineIndentLevel; - continue; - } - if (distance === 1) { - if (downLineNumber <= lineCount && downLineIndentLevel >= 0 && initialIndent + 1 === downLineIndentLevel) { - // This is the beginning of a scope, we have special handling here, since we want the - // child scope indent to be active, not the parent scope - goUp = false; - startLineNumber = downLineNumber; - endLineNumber = downLineNumber; - indent = downLineIndentLevel; - continue; - } - if (upLineNumber >= 1 && upLineIndentLevel >= 0 && upLineIndentLevel - 1 === initialIndent) { - // This is the end of a scope, just like above - goDown = false; - startLineNumber = upLineNumber; - endLineNumber = upLineNumber; - indent = upLineIndentLevel; - continue; - } - startLineNumber = lineNumber; - endLineNumber = lineNumber; - indent = initialIndent; - if (indent === 0) { - // No need to continue - return { startLineNumber, endLineNumber, indent }; - } - } - if (goUp) { - if (upLineIndentLevel >= indent) { - startLineNumber = upLineNumber; - } - else { - goUp = false; - } - } - if (goDown) { - if (downLineIndentLevel >= indent) { - endLineNumber = downLineNumber; - } - else { - goDown = false; - } - } - } - return { startLineNumber, endLineNumber, indent }; - } - getLinesIndentGuides(startLineNumber, endLineNumber) { - this._assertNotDisposed(); - const lineCount = this.getLineCount(); - if (startLineNumber < 1 || startLineNumber > lineCount) { - throw new Error('Illegal value for startLineNumber'); - } - if (endLineNumber < 1 || endLineNumber > lineCount) { - throw new Error('Illegal value for endLineNumber'); - } - const foldingRules = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_18__["LanguageConfigurationRegistry"].getFoldingRules(this._languageIdentifier.id); - const offSide = Boolean(foldingRules && foldingRules.offSide); - let result = new Array(endLineNumber - startLineNumber + 1); - let aboveContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let aboveContentLineIndent = -1; - let belowContentLineIndex = -2; /* -2 is a marker for not having computed it */ - let belowContentLineIndent = -1; - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - let resultIndex = lineNumber - startLineNumber; - const currentIndent = this._computeIndentLevel(lineNumber - 1); - if (currentIndent >= 0) { - // This line has content (besides whitespace) - // Use the line's indent - aboveContentLineIndex = lineNumber - 1; - aboveContentLineIndent = currentIndent; - result[resultIndex] = Math.ceil(currentIndent / this._options.indentSize); - continue; - } - if (aboveContentLineIndex === -2) { - aboveContentLineIndex = -1; - aboveContentLineIndent = -1; - // must find previous line with content - for (let lineIndex = lineNumber - 2; lineIndex >= 0; lineIndex--) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - aboveContentLineIndex = lineIndex; - aboveContentLineIndent = indent; - break; - } - } - } - if (belowContentLineIndex !== -1 && (belowContentLineIndex === -2 || belowContentLineIndex < lineNumber - 1)) { - belowContentLineIndex = -1; - belowContentLineIndent = -1; - // must find next line with content - for (let lineIndex = lineNumber; lineIndex < lineCount; lineIndex++) { - let indent = this._computeIndentLevel(lineIndex); - if (indent >= 0) { - belowContentLineIndex = lineIndex; - belowContentLineIndent = indent; - break; - } - } - } - result[resultIndex] = this._getIndentLevelForWhitespaceLine(offSide, aboveContentLineIndent, belowContentLineIndent); - } - return result; - } - _getIndentLevelForWhitespaceLine(offSide, aboveContentLineIndent, belowContentLineIndent) { - if (aboveContentLineIndent === -1 || belowContentLineIndent === -1) { - // At the top or bottom of the file - return 0; - } - else if (aboveContentLineIndent < belowContentLineIndent) { - // we are inside the region above - return (1 + Math.floor(aboveContentLineIndent / this._options.indentSize)); - } - else if (aboveContentLineIndent === belowContentLineIndent) { - // we are in between two regions - return Math.ceil(belowContentLineIndent / this._options.indentSize); - } - else { - if (offSide) { - // same level as region below - return Math.ceil(belowContentLineIndent / this._options.indentSize); - } - else { - // we are inside the region that ends below - return (1 + Math.floor(belowContentLineIndent / this._options.indentSize)); - } - } - } -} -TextModel.MODEL_SYNC_LIMIT = 50 * 1024 * 1024; // 50 MB -TextModel.LARGE_FILE_SIZE_THRESHOLD = 20 * 1024 * 1024; // 20 MB; -TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD = 300 * 1000; // 300K lines -TextModel.DEFAULT_CREATION_OPTIONS = { - isForSimpleWidget: false, - tabSize: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].tabSize, - indentSize: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].indentSize, - insertSpaces: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].insertSpaces, - detectIndentation: false, - defaultEOL: 1 /* LF */, - trimAutoWhitespace: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].trimAutoWhitespace, - largeFileOptimizations: _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_5__["EDITOR_MODEL_DEFAULTS"].largeFileOptimizations, -}; -//#region Decorations -class DecorationsTrees { - constructor() { - this._decorationsTree0 = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["IntervalTree"](); - this._decorationsTree1 = new _intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["IntervalTree"](); - } - intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId) { - const r0 = this._decorationsTree0.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId); - const r1 = this._decorationsTree1.intervalSearch(start, end, filterOwnerId, filterOutValidation, cachedVersionId); - return r0.concat(r1); - } - search(filterOwnerId, filterOutValidation, overviewRulerOnly, cachedVersionId) { - if (overviewRulerOnly) { - return this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId); - } - else { - const r0 = this._decorationsTree0.search(filterOwnerId, filterOutValidation, cachedVersionId); - const r1 = this._decorationsTree1.search(filterOwnerId, filterOutValidation, cachedVersionId); - return r0.concat(r1); - } - } - collectNodesFromOwner(ownerId) { - const r0 = this._decorationsTree0.collectNodesFromOwner(ownerId); - const r1 = this._decorationsTree1.collectNodesFromOwner(ownerId); - return r0.concat(r1); - } - collectNodesPostOrder() { - const r0 = this._decorationsTree0.collectNodesPostOrder(); - const r1 = this._decorationsTree1.collectNodesPostOrder(); - return r0.concat(r1); - } - insert(node) { - if (Object(_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["getNodeIsInOverviewRuler"])(node)) { - this._decorationsTree1.insert(node); - } - else { - this._decorationsTree0.insert(node); - } - } - delete(node) { - if (Object(_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["getNodeIsInOverviewRuler"])(node)) { - this._decorationsTree1.delete(node); - } - else { - this._decorationsTree0.delete(node); - } - } - resolveNode(node, cachedVersionId) { - if (Object(_intervalTree_js__WEBPACK_IMPORTED_MODULE_12__["getNodeIsInOverviewRuler"])(node)) { - this._decorationsTree1.resolveNode(node, cachedVersionId); - } - else { - this._decorationsTree0.resolveNode(node, cachedVersionId); - } - } - acceptReplace(offset, length, textLength, forceMoveMarkers) { - this._decorationsTree0.acceptReplace(offset, length, textLength, forceMoveMarkers); - this._decorationsTree1.acceptReplace(offset, length, textLength, forceMoveMarkers); - } -} -function cleanClassName(className) { - return className.replace(/[^a-z0-9\-_]/gi, ' '); -} -class DecorationOptions { - constructor(options) { - this.color = options.color || ''; - this.darkColor = options.darkColor || ''; - } -} -class ModelDecorationOverviewRulerOptions extends DecorationOptions { - constructor(options) { - super(options); - this._resolvedColor = null; - this.position = (typeof options.position === 'number' ? options.position : _model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center); - } - getColor(theme) { - if (!this._resolvedColor) { - if (theme.type !== 'light' && this.darkColor) { - this._resolvedColor = this._resolveColor(this.darkColor, theme); - } - else { - this._resolvedColor = this._resolveColor(this.color, theme); - } - } - return this._resolvedColor; - } - invalidateCachedColor() { - this._resolvedColor = null; - } - _resolveColor(color, theme) { - if (typeof color === 'string') { - return color; - } - let c = color ? theme.getColor(color.id) : null; - if (!c) { - return ''; - } - return c.toString(); - } -} -class ModelDecorationMinimapOptions extends DecorationOptions { - constructor(options) { - super(options); - this.position = options.position; - } - getColor(theme) { - if (!this._resolvedColor) { - if (theme.type !== 'light' && this.darkColor) { - this._resolvedColor = this._resolveColor(this.darkColor, theme); - } - else { - this._resolvedColor = this._resolveColor(this.color, theme); - } - } - return this._resolvedColor; - } - invalidateCachedColor() { - this._resolvedColor = undefined; - } - _resolveColor(color, theme) { - if (typeof color === 'string') { - return _base_common_color_js__WEBPACK_IMPORTED_MODULE_23__["Color"].fromHex(color); - } - return theme.getColor(color.id); - } -} -class ModelDecorationOptions { - constructor(options) { - this.stickiness = options.stickiness || 0 /* AlwaysGrowsWhenTypingAtEdges */; - this.zIndex = options.zIndex || 0; - this.className = options.className ? cleanClassName(options.className) : null; - this.hoverMessage = options.hoverMessage || null; - this.glyphMarginHoverMessage = options.glyphMarginHoverMessage || null; - this.isWholeLine = options.isWholeLine || false; - this.showIfCollapsed = options.showIfCollapsed || false; - this.collapseOnReplaceEdit = options.collapseOnReplaceEdit || false; - this.overviewRuler = options.overviewRuler ? new ModelDecorationOverviewRulerOptions(options.overviewRuler) : null; - this.minimap = options.minimap ? new ModelDecorationMinimapOptions(options.minimap) : null; - this.glyphMarginClassName = options.glyphMarginClassName ? cleanClassName(options.glyphMarginClassName) : null; - this.linesDecorationsClassName = options.linesDecorationsClassName ? cleanClassName(options.linesDecorationsClassName) : null; - this.firstLineDecorationClassName = options.firstLineDecorationClassName ? cleanClassName(options.firstLineDecorationClassName) : null; - this.marginClassName = options.marginClassName ? cleanClassName(options.marginClassName) : null; - this.inlineClassName = options.inlineClassName ? cleanClassName(options.inlineClassName) : null; - this.inlineClassNameAffectsLetterSpacing = options.inlineClassNameAffectsLetterSpacing || false; - this.beforeContentClassName = options.beforeContentClassName ? cleanClassName(options.beforeContentClassName) : null; - this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : null; - } - static register(options) { - return new ModelDecorationOptions(options); - } - static createDynamic(options) { - return new ModelDecorationOptions(options); - } -} -ModelDecorationOptions.EMPTY = ModelDecorationOptions.register({}); -/** - * The order carefully matches the values of the enum. - */ -const TRACKED_RANGE_OPTIONS = [ - ModelDecorationOptions.register({ stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */ }), - ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ }), - ModelDecorationOptions.register({ stickiness: 2 /* GrowsOnlyWhenTypingBefore */ }), - ModelDecorationOptions.register({ stickiness: 3 /* GrowsOnlyWhenTypingAfter */ }), -]; -function _normalizeOptions(options) { - if (options instanceof ModelDecorationOptions) { - return options; - } - return ModelDecorationOptions.createDynamic(options); -} -class DidChangeDecorationsEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor() { - super(); - this._actual = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.event = this._actual.event; - this._deferredCnt = 0; - this._shouldFire = false; - this._affectsMinimap = false; - this._affectsOverviewRuler = false; - } - beginDeferredEmit() { - this._deferredCnt++; - } - endDeferredEmit() { - this._deferredCnt--; - if (this._deferredCnt === 0) { - if (this._shouldFire) { - const event = { - affectsMinimap: this._affectsMinimap, - affectsOverviewRuler: this._affectsOverviewRuler, - }; - this._shouldFire = false; - this._affectsMinimap = false; - this._affectsOverviewRuler = false; - this._actual.fire(event); - } - } - } - checkAffectedAndFire(options) { - if (!this._affectsMinimap) { - this._affectsMinimap = options.minimap && options.minimap.position ? true : false; - } - if (!this._affectsOverviewRuler) { - this._affectsOverviewRuler = options.overviewRuler && options.overviewRuler.color ? true : false; - } - this._shouldFire = true; - } - fire() { - this._affectsMinimap = true; - this._affectsOverviewRuler = true; - this._shouldFire = true; - } -} -//#endregion -class DidChangeContentEmitter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor() { - super(); - /** - * Both `fastEvent` and `slowEvent` work the same way and contain the same events, but first we invoke `fastEvent` and then `slowEvent`. - */ - this._fastEmitter = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.fastEvent = this._fastEmitter.event; - this._slowEmitter = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.slowEvent = this._slowEmitter.event; - this._deferredCnt = 0; - this._deferredEvent = null; - } - beginDeferredEmit() { - this._deferredCnt++; - } - endDeferredEmit(resultingSelection = null) { - this._deferredCnt--; - if (this._deferredCnt === 0) { - if (this._deferredEvent !== null) { - this._deferredEvent.rawContentChangedEvent.resultingSelection = resultingSelection; - const e = this._deferredEvent; - this._deferredEvent = null; - this._fastEmitter.fire(e); - this._slowEmitter.fire(e); - } - } - } - fire(e) { - if (this._deferredCnt > 0) { - if (this._deferredEvent) { - this._deferredEvent = this._deferredEvent.merge(e); - } - else { - this._deferredEvent = e; - } - return; - } - this._fastEmitter.fire(e); - this._slowEmitter.fire(e); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelEvents.js ***! - \**********************************************************************************/ -/*! exports provided: ModelRawFlush, ModelRawLineChanged, ModelRawLinesDeleted, ModelRawLinesInserted, ModelRawEOLChanged, ModelRawContentChangedEvent, InternalModelContentChangeEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawFlush", function() { return ModelRawFlush; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawLineChanged", function() { return ModelRawLineChanged; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawLinesDeleted", function() { return ModelRawLinesDeleted; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawLinesInserted", function() { return ModelRawLinesInserted; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawEOLChanged", function() { return ModelRawEOLChanged; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelRawContentChangedEvent", function() { return ModelRawContentChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternalModelContentChangeEvent", function() { return InternalModelContentChangeEvent; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * An event describing that a model has been reset to a new value. - * @internal - */ -class ModelRawFlush { - constructor() { - this.changeType = 1 /* Flush */; - } -} -/** - * An event describing that a line has changed in a model. - * @internal - */ -class ModelRawLineChanged { - constructor(lineNumber, detail) { - this.changeType = 2 /* LineChanged */; - this.lineNumber = lineNumber; - this.detail = detail; - } -} -/** - * An event describing that line(s) have been deleted in a model. - * @internal - */ -class ModelRawLinesDeleted { - constructor(fromLineNumber, toLineNumber) { - this.changeType = 3 /* LinesDeleted */; - this.fromLineNumber = fromLineNumber; - this.toLineNumber = toLineNumber; - } -} -/** - * An event describing that line(s) have been inserted in a model. - * @internal - */ -class ModelRawLinesInserted { - constructor(fromLineNumber, toLineNumber, detail) { - this.changeType = 4 /* LinesInserted */; - this.fromLineNumber = fromLineNumber; - this.toLineNumber = toLineNumber; - this.detail = detail; - } -} -/** - * An event describing that a model has had its EOL changed. - * @internal - */ -class ModelRawEOLChanged { - constructor() { - this.changeType = 5 /* EOLChanged */; - } -} -/** - * An event describing a change in the text of a model. - * @internal - */ -class ModelRawContentChangedEvent { - constructor(changes, versionId, isUndoing, isRedoing) { - this.changes = changes; - this.versionId = versionId; - this.isUndoing = isUndoing; - this.isRedoing = isRedoing; - this.resultingSelection = null; - } - containsEvent(type) { - for (let i = 0, len = this.changes.length; i < len; i++) { - const change = this.changes[i]; - if (change.changeType === type) { - return true; - } - } - return false; - } - static merge(a, b) { - const changes = [].concat(a.changes).concat(b.changes); - const versionId = b.versionId; - const isUndoing = (a.isUndoing || b.isUndoing); - const isRedoing = (a.isRedoing || b.isRedoing); - return new ModelRawContentChangedEvent(changes, versionId, isUndoing, isRedoing); - } -} -/** - * @internal - */ -class InternalModelContentChangeEvent { - constructor(rawContentChangedEvent, contentChangedEvent) { - this.rawContentChangedEvent = rawContentChangedEvent; - this.contentChangedEvent = contentChangedEvent; - } - merge(other) { - const rawContentChangedEvent = ModelRawContentChangedEvent.merge(this.rawContentChangedEvent, other.rawContentChangedEvent); - const contentChangedEvent = InternalModelContentChangeEvent._mergeChangeEvents(this.contentChangedEvent, other.contentChangedEvent); - return new InternalModelContentChangeEvent(rawContentChangedEvent, contentChangedEvent); - } - static _mergeChangeEvents(a, b) { - const changes = [].concat(a.changes).concat(b.changes); - const eol = b.eol; - const versionId = b.versionId; - const isUndoing = (a.isUndoing || b.isUndoing); - const isRedoing = (a.isRedoing || b.isRedoing); - const isFlush = (a.isFlush || b.isFlush); - return { - changes: changes, - eol: eol, - versionId: versionId, - isUndoing: isUndoing, - isRedoing: isRedoing, - isFlush: isFlush - }; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js ***! - \**********************************************************************************/ -/*! exports provided: SearchParams, isMultilineRegexSource, SearchData, createFindMatch, TextModelSearch, isValidMatch, Searcher */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SearchParams", function() { return SearchParams; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMultilineRegexSource", function() { return isMultilineRegexSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SearchData", function() { return SearchData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFindMatch", function() { return createFindMatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextModelSearch", function() { return TextModelSearch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMatch", function() { return isValidMatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Searcher", function() { return Searcher; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../controller/wordCharacterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -const LIMIT_FIND_COUNT = 999; -class SearchParams { - constructor(searchString, isRegex, matchCase, wordSeparators) { - this.searchString = searchString; - this.isRegex = isRegex; - this.matchCase = matchCase; - this.wordSeparators = wordSeparators; - } - parseSearchRequest() { - if (this.searchString === '') { - return null; - } - // Try to create a RegExp out of the params - let multiline; - if (this.isRegex) { - multiline = isMultilineRegexSource(this.searchString); - } - else { - multiline = (this.searchString.indexOf('\n') >= 0); - } - let regex = null; - try { - regex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["createRegExp"](this.searchString, this.isRegex, { - matchCase: this.matchCase, - wholeWord: false, - multiline: multiline, - global: true, - unicode: true - }); - } - catch (err) { - return null; - } - if (!regex) { - return null; - } - let canUseSimpleSearch = (!this.isRegex && !multiline); - if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) { - // casing might make a difference - canUseSimpleSearch = this.matchCase; - } - return new SearchData(regex, this.wordSeparators ? Object(_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_1__["getMapForWordSeparators"])(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null); - } -} -function isMultilineRegexSource(searchString) { - if (!searchString || searchString.length === 0) { - return false; - } - for (let i = 0, len = searchString.length; i < len; i++) { - const chCode = searchString.charCodeAt(i); - if (chCode === 92 /* Backslash */) { - // move to next char - i++; - if (i >= len) { - // string ends with a \ - break; - } - const nextChCode = searchString.charCodeAt(i); - if (nextChCode === 110 /* n */ || nextChCode === 114 /* r */ || nextChCode === 87 /* W */ || nextChCode === 119 /* w */) { - return true; - } - } - } - return false; -} -class SearchData { - constructor(regex, wordSeparators, simpleSearch) { - this.regex = regex; - this.wordSeparators = wordSeparators; - this.simpleSearch = simpleSearch; - } -} -function createFindMatch(range, rawMatches, captureMatches) { - if (!captureMatches) { - return new _model_js__WEBPACK_IMPORTED_MODULE_4__["FindMatch"](range, null); - } - let matches = []; - for (let i = 0, len = rawMatches.length; i < len; i++) { - matches[i] = rawMatches[i]; - } - return new _model_js__WEBPACK_IMPORTED_MODULE_4__["FindMatch"](range, matches); -} -class LineFeedCounter { - constructor(text) { - let lineFeedsOffsets = []; - let lineFeedsOffsetsLen = 0; - for (let i = 0, textLen = text.length; i < textLen; i++) { - if (text.charCodeAt(i) === 10 /* LineFeed */) { - lineFeedsOffsets[lineFeedsOffsetsLen++] = i; - } - } - this._lineFeedsOffsets = lineFeedsOffsets; - } - findLineFeedCountBeforeOffset(offset) { - const lineFeedsOffsets = this._lineFeedsOffsets; - let min = 0; - let max = lineFeedsOffsets.length - 1; - if (max === -1) { - // no line feeds - return 0; - } - if (offset <= lineFeedsOffsets[0]) { - // before first line feed - return 0; - } - while (min < max) { - const mid = min + ((max - min) / 2 >> 0); - if (lineFeedsOffsets[mid] >= offset) { - max = mid - 1; - } - else { - if (lineFeedsOffsets[mid + 1] >= offset) { - // bingo! - min = mid; - max = mid; - } - else { - min = mid + 1; - } - } - } - return min + 1; - } -} -class TextModelSearch { - static findMatches(model, searchParams, searchRange, captureMatches, limitResultCount) { - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return []; - } - if (searchData.regex.multiline) { - return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount); - } - return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount); - } - /** - * Multiline search always executes on the lines concatenated with \n. - * We must therefore compensate for the count of \n in case the model is CRLF - */ - static _getMultilineMatchRange(model, deltaOffset, text, lfCounter, matchIndex, match0) { - let startOffset; - let lineFeedCountBeforeMatch = 0; - if (lfCounter) { - lineFeedCountBeforeMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex); - startOffset = deltaOffset + matchIndex + lineFeedCountBeforeMatch /* add as many \r as there were \n */; - } - else { - startOffset = deltaOffset + matchIndex; - } - let endOffset; - if (lfCounter) { - let lineFeedCountBeforeEndOfMatch = lfCounter.findLineFeedCountBeforeOffset(matchIndex + match0.length); - let lineFeedCountInMatch = lineFeedCountBeforeEndOfMatch - lineFeedCountBeforeMatch; - endOffset = startOffset + match0.length + lineFeedCountInMatch /* add as many \r as there were \n */; - } - else { - endOffset = startOffset + match0.length; - } - const startPosition = model.getPositionAt(startOffset); - const endPosition = model.getPositionAt(endOffset); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column); - } - static _doFindMatchesMultiline(model, searchRange, searcher, captureMatches, limitResultCount) { - const deltaOffset = model.getOffsetAt(searchRange.getStartPosition()); - // We always execute multiline search over the lines joined with \n - // This makes it that \n will match the EOL for both CRLF and LF models - // We compensate for offset errors in `_getMultilineMatchRange` - const text = model.getValueInRange(searchRange, 1 /* LF */); - const lfCounter = (model.getEOL() === '\r\n' ? new LineFeedCounter(text) : null); - const result = []; - let counter = 0; - let m; - searcher.reset(0); - while ((m = searcher.next(text))) { - result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches); - if (counter >= limitResultCount) { - return result; - } - } - return result; - } - static _doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount) { - const result = []; - let resultLen = 0; - // Early case for a search range that starts & stops on the same line number - if (searchRange.startLineNumber === searchRange.endLineNumber) { - const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1, searchRange.endColumn - 1); - resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount); - return result; - } - // Collect results from first line - const text = model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn - 1); - resultLen = this._findMatchesInLine(searchData, text, searchRange.startLineNumber, searchRange.startColumn - 1, resultLen, result, captureMatches, limitResultCount); - // Collect results from middle lines - for (let lineNumber = searchRange.startLineNumber + 1; lineNumber < searchRange.endLineNumber && resultLen < limitResultCount; lineNumber++) { - resultLen = this._findMatchesInLine(searchData, model.getLineContent(lineNumber), lineNumber, 0, resultLen, result, captureMatches, limitResultCount); - } - // Collect results from last line - if (resultLen < limitResultCount) { - const text = model.getLineContent(searchRange.endLineNumber).substring(0, searchRange.endColumn - 1); - resultLen = this._findMatchesInLine(searchData, text, searchRange.endLineNumber, 0, resultLen, result, captureMatches, limitResultCount); - } - return result; - } - static _findMatchesInLine(searchData, text, lineNumber, deltaOffset, resultLen, result, captureMatches, limitResultCount) { - const wordSeparators = searchData.wordSeparators; - if (!captureMatches && searchData.simpleSearch) { - const searchString = searchData.simpleSearch; - const searchStringLen = searchString.length; - const textLength = text.length; - let lastMatchIndex = -searchStringLen; - while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) { - if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) { - result[resultLen++] = new _model_js__WEBPACK_IMPORTED_MODULE_4__["FindMatch"](new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null); - if (resultLen >= limitResultCount) { - return resultLen; - } - } - } - return resultLen; - } - const searcher = new Searcher(searchData.wordSeparators, searchData.regex); - let m; - // Reset regex to search from the beginning - searcher.reset(0); - do { - m = searcher.next(text); - if (m) { - result[resultLen++] = createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches); - if (resultLen >= limitResultCount) { - return resultLen; - } - } - } while (m); - return resultLen; - } - static findNextMatch(model, searchParams, searchStart, captureMatches) { - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return null; - } - const searcher = new Searcher(searchData.wordSeparators, searchData.regex); - if (searchData.regex.multiline) { - return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches); - } - return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches); - } - static _doFindNextMatchMultiline(model, searchStart, searcher, captureMatches) { - const searchTextStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](searchStart.lineNumber, 1); - const deltaOffset = model.getOffsetAt(searchTextStart); - const lineCount = model.getLineCount(); - // We always execute multiline search over the lines joined with \n - // This makes it that \n will match the EOL for both CRLF and LF models - // We compensate for offset errors in `_getMultilineMatchRange` - const text = model.getValueInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), 1 /* LF */); - const lfCounter = (model.getEOL() === '\r\n' ? new LineFeedCounter(text) : null); - searcher.reset(searchStart.column - 1); - let m = searcher.next(text); - if (m) { - return createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, lfCounter, m.index, m[0]), m, captureMatches); - } - if (searchStart.lineNumber !== 1 || searchStart.column !== 1) { - // Try again from the top - return this._doFindNextMatchMultiline(model, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](1, 1), searcher, captureMatches); - } - return null; - } - static _doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches) { - const lineCount = model.getLineCount(); - const startLineNumber = searchStart.lineNumber; - // Look in first line - const text = model.getLineContent(startLineNumber); - const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches); - if (r) { - return r; - } - for (let i = 1; i <= lineCount; i++) { - const lineIndex = (startLineNumber + i - 1) % lineCount; - const text = model.getLineContent(lineIndex + 1); - const r = this._findFirstMatchInLine(searcher, text, lineIndex + 1, 1, captureMatches); - if (r) { - return r; - } - } - return null; - } - static _findFirstMatchInLine(searcher, text, lineNumber, fromColumn, captureMatches) { - // Set regex to search from column - searcher.reset(fromColumn - 1); - const m = searcher.next(text); - if (m) { - return createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches); - } - return null; - } - static findPreviousMatch(model, searchParams, searchStart, captureMatches) { - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return null; - } - const searcher = new Searcher(searchData.wordSeparators, searchData.regex); - if (searchData.regex.multiline) { - return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches); - } - return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches); - } - static _doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches) { - const matches = this._doFindMatchesMultiline(model, new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT); - if (matches.length > 0) { - return matches[matches.length - 1]; - } - const lineCount = model.getLineCount(); - if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) { - // Try again with all content - return this._doFindPreviousMatchMultiline(model, new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches); - } - return null; - } - static _doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches) { - const lineCount = model.getLineCount(); - const startLineNumber = searchStart.lineNumber; - // Look in first line - const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1); - const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches); - if (r) { - return r; - } - for (let i = 1; i <= lineCount; i++) { - const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount; - const text = model.getLineContent(lineIndex + 1); - const r = this._findLastMatchInLine(searcher, text, lineIndex + 1, captureMatches); - if (r) { - return r; - } - } - return null; - } - static _findLastMatchInLine(searcher, text, lineNumber, captureMatches) { - let bestResult = null; - let m; - searcher.reset(0); - while ((m = searcher.next(text))) { - bestResult = createFindMatch(new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches); - } - return bestResult; - } -} -function leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex === 0) { - // Match starts at start of string - return true; - } - const charBefore = text.charCodeAt(matchStartIndex - 1); - if (wordSeparators.get(charBefore) !== 0 /* Regular */) { - // The character before the match is a word separator - return true; - } - if (charBefore === 13 /* CarriageReturn */ || charBefore === 10 /* LineFeed */) { - // The character before the match is line break or carriage return. - return true; - } - if (matchLength > 0) { - const firstCharInMatch = text.charCodeAt(matchStartIndex); - if (wordSeparators.get(firstCharInMatch) !== 0 /* Regular */) { - // The first character inside the match is a word separator - return true; - } - } - return false; -} -function rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex + matchLength === textLength) { - // Match ends at end of string - return true; - } - const charAfter = text.charCodeAt(matchStartIndex + matchLength); - if (wordSeparators.get(charAfter) !== 0 /* Regular */) { - // The character after the match is a word separator - return true; - } - if (charAfter === 13 /* CarriageReturn */ || charAfter === 10 /* LineFeed */) { - // The character after the match is line break or carriage return. - return true; - } - if (matchLength > 0) { - const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1); - if (wordSeparators.get(lastCharInMatch) !== 0 /* Regular */) { - // The last character in the match is a word separator - return true; - } - } - return false; -} -function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) { - return (leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) - && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength)); -} -class Searcher { - constructor(wordSeparators, searchRegex) { - this._wordSeparators = wordSeparators; - this._searchRegex = searchRegex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; - } - reset(lastIndex) { - this._searchRegex.lastIndex = lastIndex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; - } - next(text) { - const textLength = text.length; - let m; - do { - if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { - // Reached the end of the line - return null; - } - m = this._searchRegex.exec(text); - if (!m) { - return null; - } - const matchStartIndex = m.index; - const matchLength = m[0].length; - if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { - if (matchLength === 0) { - // the search result is an empty string and won't advance `regex.lastIndex`, so `regex.exec` will stuck here - // we attempt to recover from that by advancing by two if surrogate pair found and by one otherwise - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getNextCodePoint"](text, textLength, this._searchRegex.lastIndex) > 0xFFFF) { - this._searchRegex.lastIndex += 2; - } - else { - this._searchRegex.lastIndex += 1; - } - continue; - } - // Exit early if the regex matches the same range twice - return null; - } - this._prevMatchStartIndex = matchStartIndex; - this._prevMatchLength = matchLength; - if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { - return m; - } - } while (m); - return null; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js ***! - \**********************************************************************************/ -/*! exports provided: TokenizationStateStore, TextModelTokenization */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationStateStore", function() { return TokenizationStateStore; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextModelTokenization", function() { return TextModelTokenization; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/lineTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"); -/* harmony import */ var _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tokensStore.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - -class TokenizationStateStore { - constructor() { - this._beginState = []; - this._valid = []; - this._len = 0; - this._invalidLineStartIndex = 0; - } - _reset(initialState) { - this._beginState = []; - this._valid = []; - this._len = 0; - this._invalidLineStartIndex = 0; - if (initialState) { - this._setBeginState(0, initialState); - } - } - flush(initialState) { - this._reset(initialState); - } - get invalidLineStartIndex() { - return this._invalidLineStartIndex; - } - _invalidateLine(lineIndex) { - if (lineIndex < this._len) { - this._valid[lineIndex] = false; - } - if (lineIndex < this._invalidLineStartIndex) { - this._invalidLineStartIndex = lineIndex; - } - } - _isValid(lineIndex) { - if (lineIndex < this._len) { - return this._valid[lineIndex]; - } - return false; - } - getBeginState(lineIndex) { - if (lineIndex < this._len) { - return this._beginState[lineIndex]; - } - return null; - } - _ensureLine(lineIndex) { - while (lineIndex >= this._len) { - this._beginState[this._len] = null; - this._valid[this._len] = false; - this._len++; - } - } - _deleteLines(start, deleteCount) { - if (deleteCount === 0) { - return; - } - if (start + deleteCount > this._len) { - deleteCount = this._len - start; - } - this._beginState.splice(start, deleteCount); - this._valid.splice(start, deleteCount); - this._len -= deleteCount; - } - _insertLines(insertIndex, insertCount) { - if (insertCount === 0) { - return; - } - let beginState = []; - let valid = []; - for (let i = 0; i < insertCount; i++) { - beginState[i] = null; - valid[i] = false; - } - this._beginState = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["arrayInsert"](this._beginState, insertIndex, beginState); - this._valid = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["arrayInsert"](this._valid, insertIndex, valid); - this._len += insertCount; - } - _setValid(lineIndex, valid) { - this._ensureLine(lineIndex); - this._valid[lineIndex] = valid; - } - _setBeginState(lineIndex, beginState) { - this._ensureLine(lineIndex); - this._beginState[lineIndex] = beginState; - } - setEndState(linesLength, lineIndex, endState) { - this._setValid(lineIndex, true); - this._invalidLineStartIndex = lineIndex + 1; - // Check if this was the last line - if (lineIndex === linesLength - 1) { - return; - } - // Check if the end state has changed - const previousEndState = this.getBeginState(lineIndex + 1); - if (previousEndState === null || !endState.equals(previousEndState)) { - this._setBeginState(lineIndex + 1, endState); - this._invalidateLine(lineIndex + 1); - return; - } - // Perhaps we can skip tokenizing some lines... - let i = lineIndex + 1; - while (i < linesLength) { - if (!this._isValid(i)) { - break; - } - i++; - } - this._invalidLineStartIndex = i; - } - setFakeTokens(lineIndex) { - this._setValid(lineIndex, false); - } - //#region Editing - applyEdits(range, eolCount) { - const deletingLinesCnt = range.endLineNumber - range.startLineNumber; - const insertingLinesCnt = eolCount; - const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); - for (let j = editingLinesCnt; j >= 0; j--) { - this._invalidateLine(range.startLineNumber + j - 1); - } - this._acceptDeleteRange(range); - this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](range.startLineNumber, range.startColumn), eolCount); - } - _acceptDeleteRange(range) { - const firstLineIndex = range.startLineNumber - 1; - if (firstLineIndex >= this._len) { - return; - } - this._deleteLines(range.startLineNumber, range.endLineNumber - range.startLineNumber); - } - _acceptInsertText(position, eolCount) { - const lineIndex = position.lineNumber - 1; - if (lineIndex >= this._len) { - return; - } - this._insertLines(position.lineNumber, eolCount); - } -} -class TextModelTokenization extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["Disposable"] { - constructor(textModel) { - super(); - this._isDisposed = false; - this._textModel = textModel; - this._tokenizationStateStore = new TokenizationStateStore(); - this._tokenizationSupport = null; - this._register(_modes_js__WEBPACK_IMPORTED_MODULE_4__["TokenizationRegistry"].onDidChange((e) => { - const languageIdentifier = this._textModel.getLanguageIdentifier(); - if (e.changedLanguages.indexOf(languageIdentifier.language) === -1) { - return; - } - this._resetTokenizationState(); - this._textModel.clearTokens(); - })); - this._register(this._textModel.onDidChangeRawContentFast((e) => { - if (e.containsEvent(1 /* Flush */)) { - this._resetTokenizationState(); - return; - } - })); - this._register(this._textModel.onDidChangeContentFast((e) => { - for (let i = 0, len = e.changes.length; i < len; i++) { - const change = e.changes[i]; - const [eolCount] = Object(_tokensStore_js__WEBPACK_IMPORTED_MODULE_8__["countEOL"])(change.text); - this._tokenizationStateStore.applyEdits(change.range, eolCount); - } - this._beginBackgroundTokenization(); - })); - this._register(this._textModel.onDidChangeAttached(() => { - this._beginBackgroundTokenization(); - })); - this._register(this._textModel.onDidChangeLanguage(() => { - this._resetTokenizationState(); - this._textModel.clearTokens(); - })); - this._resetTokenizationState(); - } - dispose() { - this._isDisposed = true; - super.dispose(); - } - _resetTokenizationState() { - const [tokenizationSupport, initialState] = initializeTokenization(this._textModel); - this._tokenizationSupport = tokenizationSupport; - this._tokenizationStateStore.flush(initialState); - this._beginBackgroundTokenization(); - } - _beginBackgroundTokenization() { - if (this._textModel.isAttachedToEditor() && this._hasLinesToTokenize()) { - _base_common_platform_js__WEBPACK_IMPORTED_MODULE_9__["setImmediate"](() => { - if (this._isDisposed) { - // disposed in the meantime - return; - } - this._revalidateTokensNow(); - }); - } - } - _revalidateTokensNow(toLineNumber = this._textModel.getLineCount()) { - const MAX_ALLOWED_TIME = 1; - const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__["MultilineTokensBuilder"](); - const sw = _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_7__["StopWatch"].create(false); - while (this._hasLinesToTokenize()) { - if (sw.elapsed() > MAX_ALLOWED_TIME) { - // Stop if MAX_ALLOWED_TIME is reached - break; - } - const tokenizedLineNumber = this._tokenizeOneInvalidLine(builder); - if (tokenizedLineNumber >= toLineNumber) { - break; - } - } - this._beginBackgroundTokenization(); - this._textModel.setTokens(builder.tokens); - } - tokenizeViewport(startLineNumber, endLineNumber) { - const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__["MultilineTokensBuilder"](); - this._tokenizeViewport(builder, startLineNumber, endLineNumber); - this._textModel.setTokens(builder.tokens); - } - reset() { - this._resetTokenizationState(); - this._textModel.clearTokens(); - } - forceTokenization(lineNumber) { - const builder = new _tokensStore_js__WEBPACK_IMPORTED_MODULE_8__["MultilineTokensBuilder"](); - this._updateTokensUntilLine(builder, lineNumber); - this._textModel.setTokens(builder.tokens); - } - isCheapToTokenize(lineNumber) { - if (!this._tokenizationSupport) { - return true; - } - const firstInvalidLineNumber = this._tokenizationStateStore.invalidLineStartIndex + 1; - if (lineNumber > firstInvalidLineNumber) { - return false; - } - if (lineNumber < firstInvalidLineNumber) { - return true; - } - if (this._textModel.getLineLength(lineNumber) < 2048 /* CHEAP_TOKENIZATION_LENGTH_LIMIT */) { - return true; - } - return false; - } - _hasLinesToTokenize() { - if (!this._tokenizationSupport) { - return false; - } - return (this._tokenizationStateStore.invalidLineStartIndex < this._textModel.getLineCount()); - } - _tokenizeOneInvalidLine(builder) { - if (!this._hasLinesToTokenize()) { - return this._textModel.getLineCount() + 1; - } - const lineNumber = this._tokenizationStateStore.invalidLineStartIndex + 1; - this._updateTokensUntilLine(builder, lineNumber); - return lineNumber; - } - _updateTokensUntilLine(builder, lineNumber) { - if (!this._tokenizationSupport) { - return; - } - const languageIdentifier = this._textModel.getLanguageIdentifier(); - const linesLength = this._textModel.getLineCount(); - const endLineIndex = lineNumber - 1; - // Validate all states up to and including endLineIndex - for (let lineIndex = this._tokenizationStateStore.invalidLineStartIndex; lineIndex <= endLineIndex; lineIndex++) { - const text = this._textModel.getLineContent(lineIndex + 1); - const lineStartState = this._tokenizationStateStore.getBeginState(lineIndex); - const r = safeTokenize(languageIdentifier, this._tokenizationSupport, text, lineStartState); - builder.add(lineIndex + 1, r.tokens); - this._tokenizationStateStore.setEndState(linesLength, lineIndex, r.endState); - lineIndex = this._tokenizationStateStore.invalidLineStartIndex - 1; // -1 because the outer loop increments it - } - } - _tokenizeViewport(builder, startLineNumber, endLineNumber) { - if (!this._tokenizationSupport) { - // nothing to do - return; - } - if (endLineNumber <= this._tokenizationStateStore.invalidLineStartIndex) { - // nothing to do - return; - } - if (startLineNumber <= this._tokenizationStateStore.invalidLineStartIndex) { - // tokenization has reached the viewport start... - this._updateTokensUntilLine(builder, endLineNumber); - return; - } - let nonWhitespaceColumn = this._textModel.getLineFirstNonWhitespaceColumn(startLineNumber); - let fakeLines = []; - let initialState = null; - for (let i = startLineNumber - 1; nonWhitespaceColumn > 0 && i >= 1; i--) { - let newNonWhitespaceIndex = this._textModel.getLineFirstNonWhitespaceColumn(i); - if (newNonWhitespaceIndex === 0) { - continue; - } - if (newNonWhitespaceIndex < nonWhitespaceColumn) { - initialState = this._tokenizationStateStore.getBeginState(i - 1); - if (initialState) { - break; - } - fakeLines.push(this._textModel.getLineContent(i)); - nonWhitespaceColumn = newNonWhitespaceIndex; - } - } - if (!initialState) { - initialState = this._tokenizationSupport.getInitialState(); - } - const languageIdentifier = this._textModel.getLanguageIdentifier(); - let state = initialState; - for (let i = fakeLines.length - 1; i >= 0; i--) { - let r = safeTokenize(languageIdentifier, this._tokenizationSupport, fakeLines[i], state); - state = r.endState; - } - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - let text = this._textModel.getLineContent(lineNumber); - let r = safeTokenize(languageIdentifier, this._tokenizationSupport, text, state); - builder.add(lineNumber, r.tokens); - this._tokenizationStateStore.setFakeTokens(lineNumber - 1); - state = r.endState; - } - } -} -function initializeTokenization(textModel) { - const languageIdentifier = textModel.getLanguageIdentifier(); - let tokenizationSupport = (textModel.isTooLargeForTokenization() - ? null - : _modes_js__WEBPACK_IMPORTED_MODULE_4__["TokenizationRegistry"].get(languageIdentifier.language)); - let initialState = null; - if (tokenizationSupport) { - try { - initialState = tokenizationSupport.getInitialState(); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - tokenizationSupport = null; - } - } - return [tokenizationSupport, initialState]; -} -function safeTokenize(languageIdentifier, tokenizationSupport, text, state) { - let r = null; - if (tokenizationSupport) { - try { - r = tokenizationSupport.tokenize2(text, state.clone(), 0); - } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(e); - } - } - if (!r) { - r = Object(_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_5__["nullTokenize2"])(languageIdentifier.id, text, state, 0); - } - _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__["LineTokens"].convertToEndOffset(r.tokens, text.length); - return r; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js ***! - \******************************************************************************/ -/*! exports provided: countEOL, MultilineTokensBuilder, SparseEncodedTokens, LineTokens2, MultilineTokens2, MultilineTokens, TokensStore2, TokensStore */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "countEOL", function() { return countEOL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultilineTokensBuilder", function() { return MultilineTokensBuilder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SparseEncodedTokens", function() { return SparseEncodedTokens; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineTokens2", function() { return LineTokens2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultilineTokens2", function() { return MultilineTokens2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultilineTokens", function() { return MultilineTokens; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokensStore2", function() { return TokensStore2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokensStore", function() { return TokensStore; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/lineTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -function countEOL(text) { - let eolCount = 0; - let firstLineLength = 0; - let lastLineStart = 0; - let eol = 0 /* Unknown */; - for (let i = 0, len = text.length; i < len; i++) { - const chr = text.charCodeAt(i); - if (chr === 13 /* CarriageReturn */) { - if (eolCount === 0) { - firstLineLength = i; - } - eolCount++; - if (i + 1 < len && text.charCodeAt(i + 1) === 10 /* LineFeed */) { - // \r\n... case - eol |= 2 /* CRLF */; - i++; // skip \n - } - else { - // \r... case - eol |= 3 /* Invalid */; - } - lastLineStart = i + 1; - } - else if (chr === 10 /* LineFeed */) { - // \n... case - eol |= 1 /* LF */; - if (eolCount === 0) { - firstLineLength = i; - } - eolCount++; - lastLineStart = i + 1; - } - } - if (eolCount === 0) { - firstLineLength = text.length; - } - return [eolCount, firstLineLength, text.length - lastLineStart, eol]; -} -function getDefaultMetadata(topLevelLanguageId) { - return ((topLevelLanguageId << 0 /* LANGUAGEID_OFFSET */) - | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */) - | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */) - | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) - | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; -} -const EMPTY_LINE_TOKENS = (new Uint32Array(0)).buffer; -class MultilineTokensBuilder { - constructor() { - this.tokens = []; - } - add(lineNumber, lineTokens) { - if (this.tokens.length > 0) { - const last = this.tokens[this.tokens.length - 1]; - const lastLineNumber = last.startLineNumber + last.tokens.length - 1; - if (lastLineNumber + 1 === lineNumber) { - // append - last.tokens.push(lineTokens); - return; - } - } - this.tokens.push(new MultilineTokens(lineNumber, [lineTokens])); - } -} -class SparseEncodedTokens { - constructor(tokens) { - this._tokens = tokens; - this._tokenCount = tokens.length / 4; - } - toString(startLineNumber) { - let pieces = []; - for (let i = 0; i < this._tokenCount; i++) { - pieces.push(`(${this._getDeltaLine(i) + startLineNumber},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`); - } - return `[${pieces.join(',')}]`; - } - getMaxDeltaLine() { - const tokenCount = this._getTokenCount(); - if (tokenCount === 0) { - return -1; - } - return this._getDeltaLine(tokenCount - 1); - } - getRange() { - const tokenCount = this._getTokenCount(); - if (tokenCount === 0) { - return null; - } - const startChar = this._getStartCharacter(0); - const maxDeltaLine = this._getDeltaLine(tokenCount - 1); - const endChar = this._getEndCharacter(tokenCount - 1); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](0, startChar + 1, maxDeltaLine, endChar + 1); - } - _getTokenCount() { - return this._tokenCount; - } - _getDeltaLine(tokenIndex) { - return this._tokens[4 * tokenIndex]; - } - _getStartCharacter(tokenIndex) { - return this._tokens[4 * tokenIndex + 1]; - } - _getEndCharacter(tokenIndex) { - return this._tokens[4 * tokenIndex + 2]; - } - isEmpty() { - return (this._getTokenCount() === 0); - } - getLineTokens(deltaLine) { - let low = 0; - let high = this._getTokenCount() - 1; - while (low < high) { - const mid = low + Math.floor((high - low) / 2); - const midDeltaLine = this._getDeltaLine(mid); - if (midDeltaLine < deltaLine) { - low = mid + 1; - } - else if (midDeltaLine > deltaLine) { - high = mid - 1; - } - else { - let min = mid; - while (min > low && this._getDeltaLine(min - 1) === deltaLine) { - min--; - } - let max = mid; - while (max < high && this._getDeltaLine(max + 1) === deltaLine) { - max++; - } - return new LineTokens2(this._tokens.subarray(4 * min, 4 * max + 4)); - } - } - if (this._getDeltaLine(low) === deltaLine) { - return new LineTokens2(this._tokens.subarray(4 * low, 4 * low + 4)); - } - return null; - } - clear() { - this._tokenCount = 0; - } - removeTokens(startDeltaLine, startChar, endDeltaLine, endChar) { - const tokens = this._tokens; - const tokenCount = this._tokenCount; - let newTokenCount = 0; - let hasDeletedTokens = false; - let firstDeltaLine = 0; - for (let i = 0; i < tokenCount; i++) { - const srcOffset = 4 * i; - const tokenDeltaLine = tokens[srcOffset]; - const tokenStartCharacter = tokens[srcOffset + 1]; - const tokenEndCharacter = tokens[srcOffset + 2]; - const tokenMetadata = tokens[srcOffset + 3]; - if ((tokenDeltaLine > startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter >= startChar)) - && (tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter <= endChar))) { - hasDeletedTokens = true; - } - else { - if (newTokenCount === 0) { - firstDeltaLine = tokenDeltaLine; - } - if (hasDeletedTokens) { - // must move the token to the left - const destOffset = 4 * newTokenCount; - tokens[destOffset] = tokenDeltaLine - firstDeltaLine; - tokens[destOffset + 1] = tokenStartCharacter; - tokens[destOffset + 2] = tokenEndCharacter; - tokens[destOffset + 3] = tokenMetadata; - } - newTokenCount++; - } - } - this._tokenCount = newTokenCount; - return firstDeltaLine; - } - split(startDeltaLine, startChar, endDeltaLine, endChar) { - const tokens = this._tokens; - const tokenCount = this._tokenCount; - let aTokens = []; - let bTokens = []; - let destTokens = aTokens; - let destOffset = 0; - let destFirstDeltaLine = 0; - for (let i = 0; i < tokenCount; i++) { - const srcOffset = 4 * i; - const tokenDeltaLine = tokens[srcOffset]; - const tokenStartCharacter = tokens[srcOffset + 1]; - const tokenEndCharacter = tokens[srcOffset + 2]; - const tokenMetadata = tokens[srcOffset + 3]; - if ((tokenDeltaLine > startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter >= startChar))) { - if ((tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter <= endChar))) { - // this token is touching the range - continue; - } - else { - // this token is after the range - if (destTokens !== bTokens) { - // this token is the first token after the range - destTokens = bTokens; - destOffset = 0; - destFirstDeltaLine = tokenDeltaLine; - } - } - } - destTokens[destOffset++] = tokenDeltaLine - destFirstDeltaLine; - destTokens[destOffset++] = tokenStartCharacter; - destTokens[destOffset++] = tokenEndCharacter; - destTokens[destOffset++] = tokenMetadata; - } - return [new SparseEncodedTokens(new Uint32Array(aTokens)), new SparseEncodedTokens(new Uint32Array(bTokens)), destFirstDeltaLine]; - } - acceptDeleteRange(horizontalShiftForFirstLineTokens, startDeltaLine, startCharacter, endDeltaLine, endCharacter) { - // This is a bit complex, here are the cases I used to think about this: - // - // 1. The token starts before the deletion range - // 1a. The token is completely before the deletion range - // ----------- - // xxxxxxxxxxx - // 1b. The token starts before, the deletion range ends after the token - // ----------- - // xxxxxxxxxxx - // 1c. The token starts before, the deletion range ends precisely with the token - // --------------- - // xxxxxxxx - // 1d. The token starts before, the deletion range is inside the token - // --------------- - // xxxxx - // - // 2. The token starts at the same position with the deletion range - // 2a. The token starts at the same position, and ends inside the deletion range - // ------- - // xxxxxxxxxxx - // 2b. The token starts at the same position, and ends at the same position as the deletion range - // ---------- - // xxxxxxxxxx - // 2c. The token starts at the same position, and ends after the deletion range - // ------------- - // xxxxxxx - // - // 3. The token starts inside the deletion range - // 3a. The token is inside the deletion range - // ------- - // xxxxxxxxxxxxx - // 3b. The token starts inside the deletion range, and ends at the same position as the deletion range - // ---------- - // xxxxxxxxxxxxx - // 3c. The token starts inside the deletion range, and ends after the deletion range - // ------------ - // xxxxxxxxxxx - // - // 4. The token starts after the deletion range - // ----------- - // xxxxxxxx - // - const tokens = this._tokens; - const tokenCount = this._tokenCount; - const deletedLineCount = (endDeltaLine - startDeltaLine); - let newTokenCount = 0; - let hasDeletedTokens = false; - for (let i = 0; i < tokenCount; i++) { - const srcOffset = 4 * i; - let tokenDeltaLine = tokens[srcOffset]; - let tokenStartCharacter = tokens[srcOffset + 1]; - let tokenEndCharacter = tokens[srcOffset + 2]; - const tokenMetadata = tokens[srcOffset + 3]; - if (tokenDeltaLine < startDeltaLine || (tokenDeltaLine === startDeltaLine && tokenEndCharacter <= startCharacter)) { - // 1a. The token is completely before the deletion range - // => nothing to do - newTokenCount++; - continue; - } - else if (tokenDeltaLine === startDeltaLine && tokenStartCharacter < startCharacter) { - // 1b, 1c, 1d - // => the token survives, but it needs to shrink - if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) { - // 1d. The token starts before, the deletion range is inside the token - // => the token shrinks by the deletion character count - tokenEndCharacter -= (endCharacter - startCharacter); - } - else { - // 1b. The token starts before, the deletion range ends after the token - // 1c. The token starts before, the deletion range ends precisely with the token - // => the token shrinks its ending to the deletion start - tokenEndCharacter = startCharacter; - } - } - else if (tokenDeltaLine === startDeltaLine && tokenStartCharacter === startCharacter) { - // 2a, 2b, 2c - if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) { - // 2c. The token starts at the same position, and ends after the deletion range - // => the token shrinks by the deletion character count - tokenEndCharacter -= (endCharacter - startCharacter); - } - else { - // 2a. The token starts at the same position, and ends inside the deletion range - // 2b. The token starts at the same position, and ends at the same position as the deletion range - // => the token is deleted - hasDeletedTokens = true; - continue; - } - } - else if (tokenDeltaLine < endDeltaLine || (tokenDeltaLine === endDeltaLine && tokenStartCharacter < endCharacter)) { - // 3a, 3b, 3c - if (tokenDeltaLine === endDeltaLine && tokenEndCharacter > endCharacter) { - // 3c. The token starts inside the deletion range, and ends after the deletion range - // => the token moves left and shrinks - if (tokenDeltaLine === startDeltaLine) { - // the deletion started on the same line as the token - // => the token moves left and shrinks - tokenStartCharacter = startCharacter; - tokenEndCharacter = tokenStartCharacter + (tokenEndCharacter - endCharacter); - } - else { - // the deletion started on a line above the token - // => the token moves to the beginning of the line - tokenStartCharacter = 0; - tokenEndCharacter = tokenStartCharacter + (tokenEndCharacter - endCharacter); - } - } - else { - // 3a. The token is inside the deletion range - // 3b. The token starts inside the deletion range, and ends at the same position as the deletion range - // => the token is deleted - hasDeletedTokens = true; - continue; - } - } - else if (tokenDeltaLine > endDeltaLine) { - // 4. (partial) The token starts after the deletion range, on a line below... - if (deletedLineCount === 0 && !hasDeletedTokens) { - // early stop, there is no need to walk all the tokens and do nothing... - newTokenCount = tokenCount; - break; - } - tokenDeltaLine -= deletedLineCount; - } - else if (tokenDeltaLine === endDeltaLine && tokenStartCharacter >= endCharacter) { - // 4. (continued) The token starts after the deletion range, on the last line where a deletion occurs - if (horizontalShiftForFirstLineTokens && tokenDeltaLine === 0) { - tokenStartCharacter += horizontalShiftForFirstLineTokens; - tokenEndCharacter += horizontalShiftForFirstLineTokens; - } - tokenDeltaLine -= deletedLineCount; - tokenStartCharacter -= (endCharacter - startCharacter); - tokenEndCharacter -= (endCharacter - startCharacter); - } - else { - throw new Error(`Not possible!`); - } - const destOffset = 4 * newTokenCount; - tokens[destOffset] = tokenDeltaLine; - tokens[destOffset + 1] = tokenStartCharacter; - tokens[destOffset + 2] = tokenEndCharacter; - tokens[destOffset + 3] = tokenMetadata; - newTokenCount++; - } - this._tokenCount = newTokenCount; - } - acceptInsertText(deltaLine, character, eolCount, firstLineLength, lastLineLength, firstCharCode) { - // Here are the cases I used to think about this: - // - // 1. The token is completely before the insertion point - // ----------- | - // 2. The token ends precisely at the insertion point - // -----------| - // 3. The token contains the insertion point - // -----|------ - // 4. The token starts precisely at the insertion point - // |----------- - // 5. The token is completely after the insertion point - // | ----------- - // - const isInsertingPreciselyOneWordCharacter = (eolCount === 0 - && firstLineLength === 1 - && ((firstCharCode >= 48 /* Digit0 */ && firstCharCode <= 57 /* Digit9 */) - || (firstCharCode >= 65 /* A */ && firstCharCode <= 90 /* Z */) - || (firstCharCode >= 97 /* a */ && firstCharCode <= 122 /* z */))); - const tokens = this._tokens; - const tokenCount = this._tokenCount; - for (let i = 0; i < tokenCount; i++) { - const offset = 4 * i; - let tokenDeltaLine = tokens[offset]; - let tokenStartCharacter = tokens[offset + 1]; - let tokenEndCharacter = tokens[offset + 2]; - if (tokenDeltaLine < deltaLine || (tokenDeltaLine === deltaLine && tokenEndCharacter < character)) { - // 1. The token is completely before the insertion point - // => nothing to do - continue; - } - else if (tokenDeltaLine === deltaLine && tokenEndCharacter === character) { - // 2. The token ends precisely at the insertion point - // => expand the end character only if inserting precisely one character that is a word character - if (isInsertingPreciselyOneWordCharacter) { - tokenEndCharacter += 1; - } - else { - continue; - } - } - else if (tokenDeltaLine === deltaLine && tokenStartCharacter < character && character < tokenEndCharacter) { - // 3. The token contains the insertion point - if (eolCount === 0) { - // => just expand the end character - tokenEndCharacter += firstLineLength; - } - else { - // => cut off the token - tokenEndCharacter = character; - } - } - else { - // 4. or 5. - if (tokenDeltaLine === deltaLine && tokenStartCharacter === character) { - // 4. The token starts precisely at the insertion point - // => grow the token (by keeping its start constant) only if inserting precisely one character that is a word character - // => otherwise behave as in case 5. - if (isInsertingPreciselyOneWordCharacter) { - continue; - } - } - // => the token must move and keep its size constant - if (tokenDeltaLine === deltaLine) { - tokenDeltaLine += eolCount; - // this token is on the line where the insertion is taking place - if (eolCount === 0) { - tokenStartCharacter += firstLineLength; - tokenEndCharacter += firstLineLength; - } - else { - const tokenLength = tokenEndCharacter - tokenStartCharacter; - tokenStartCharacter = lastLineLength + (tokenStartCharacter - character); - tokenEndCharacter = tokenStartCharacter + tokenLength; - } - } - else { - tokenDeltaLine += eolCount; - } - } - tokens[offset] = tokenDeltaLine; - tokens[offset + 1] = tokenStartCharacter; - tokens[offset + 2] = tokenEndCharacter; - } - } -} -class LineTokens2 { - constructor(tokens) { - this._tokens = tokens; - } - getCount() { - return this._tokens.length / 4; - } - getStartCharacter(tokenIndex) { - return this._tokens[4 * tokenIndex + 1]; - } - getEndCharacter(tokenIndex) { - return this._tokens[4 * tokenIndex + 2]; - } - getMetadata(tokenIndex) { - return this._tokens[4 * tokenIndex + 3]; - } -} -class MultilineTokens2 { - constructor(startLineNumber, tokens) { - this.startLineNumber = startLineNumber; - this.tokens = tokens; - this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine(); - } - toString() { - return this.tokens.toString(this.startLineNumber); - } - _updateEndLineNumber() { - this.endLineNumber = this.startLineNumber + this.tokens.getMaxDeltaLine(); - } - isEmpty() { - return this.tokens.isEmpty(); - } - getLineTokens(lineNumber) { - if (this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber) { - return this.tokens.getLineTokens(lineNumber - this.startLineNumber); - } - return null; - } - getRange() { - const deltaRange = this.tokens.getRange(); - if (!deltaRange) { - return deltaRange; - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](this.startLineNumber + deltaRange.startLineNumber, deltaRange.startColumn, this.startLineNumber + deltaRange.endLineNumber, deltaRange.endColumn); - } - removeTokens(range) { - const startLineIndex = range.startLineNumber - this.startLineNumber; - const endLineIndex = range.endLineNumber - this.startLineNumber; - this.startLineNumber += this.tokens.removeTokens(startLineIndex, range.startColumn - 1, endLineIndex, range.endColumn - 1); - this._updateEndLineNumber(); - } - split(range) { - // split tokens to two: - // a) all the tokens before `range` - // b) all the tokens after `range` - const startLineIndex = range.startLineNumber - this.startLineNumber; - const endLineIndex = range.endLineNumber - this.startLineNumber; - const [a, b, bDeltaLine] = this.tokens.split(startLineIndex, range.startColumn - 1, endLineIndex, range.endColumn - 1); - return [new MultilineTokens2(this.startLineNumber, a), new MultilineTokens2(this.startLineNumber + bDeltaLine, b)]; - } - applyEdit(range, text) { - const [eolCount, firstLineLength, lastLineLength] = countEOL(text); - this.acceptEdit(range, eolCount, firstLineLength, lastLineLength, text.length > 0 ? text.charCodeAt(0) : 0 /* Null */); - } - acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode) { - this._acceptDeleteRange(range); - this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](range.startLineNumber, range.startColumn), eolCount, firstLineLength, lastLineLength, firstCharCode); - this._updateEndLineNumber(); - } - _acceptDeleteRange(range) { - if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) { - // Nothing to delete - return; - } - const firstLineIndex = range.startLineNumber - this.startLineNumber; - const lastLineIndex = range.endLineNumber - this.startLineNumber; - if (lastLineIndex < 0) { - // this deletion occurs entirely before this block, so we only need to adjust line numbers - const deletedLinesCount = lastLineIndex - firstLineIndex; - this.startLineNumber -= deletedLinesCount; - return; - } - const tokenMaxDeltaLine = this.tokens.getMaxDeltaLine(); - if (firstLineIndex >= tokenMaxDeltaLine + 1) { - // this deletion occurs entirely after this block, so there is nothing to do - return; - } - if (firstLineIndex < 0 && lastLineIndex >= tokenMaxDeltaLine + 1) { - // this deletion completely encompasses this block - this.startLineNumber = 0; - this.tokens.clear(); - return; - } - if (firstLineIndex < 0) { - const deletedBefore = -firstLineIndex; - this.startLineNumber -= deletedBefore; - this.tokens.acceptDeleteRange(range.startColumn - 1, 0, 0, lastLineIndex, range.endColumn - 1); - } - else { - this.tokens.acceptDeleteRange(0, firstLineIndex, range.startColumn - 1, lastLineIndex, range.endColumn - 1); - } - } - _acceptInsertText(position, eolCount, firstLineLength, lastLineLength, firstCharCode) { - if (eolCount === 0 && firstLineLength === 0) { - // Nothing to insert - return; - } - const lineIndex = position.lineNumber - this.startLineNumber; - if (lineIndex < 0) { - // this insertion occurs before this block, so we only need to adjust line numbers - this.startLineNumber += eolCount; - return; - } - const tokenMaxDeltaLine = this.tokens.getMaxDeltaLine(); - if (lineIndex >= tokenMaxDeltaLine + 1) { - // this insertion occurs after this block, so there is nothing to do - return; - } - this.tokens.acceptInsertText(lineIndex, position.column - 1, eolCount, firstLineLength, lastLineLength, firstCharCode); - } -} -class MultilineTokens { - constructor(startLineNumber, tokens) { - this.startLineNumber = startLineNumber; - this.tokens = tokens; - } -} -function toUint32Array(arr) { - if (arr instanceof Uint32Array) { - return arr; - } - else { - return new Uint32Array(arr); - } -} -class TokensStore2 { - constructor() { - this._pieces = []; - this._isComplete = false; - } - flush() { - this._pieces = []; - this._isComplete = false; - } - set(pieces, isComplete) { - this._pieces = pieces || []; - this._isComplete = isComplete; - } - setPartial(_range, pieces) { - // console.log(`setPartial ${_range} ${pieces.map(p => p.toString()).join(', ')}`); - let range = _range; - if (pieces.length > 0) { - const _firstRange = pieces[0].getRange(); - const _lastRange = pieces[pieces.length - 1].getRange(); - if (!_firstRange || !_lastRange) { - return _range; - } - range = _range.plusRange(_firstRange).plusRange(_lastRange); - } - let insertPosition = null; - for (let i = 0, len = this._pieces.length; i < len; i++) { - const piece = this._pieces[i]; - if (piece.endLineNumber < range.startLineNumber) { - // this piece is before the range - continue; - } - if (piece.startLineNumber > range.endLineNumber) { - // this piece is after the range, so mark the spot before this piece - // as a good insertion position and stop looping - insertPosition = insertPosition || { index: i }; - break; - } - // this piece might intersect with the range - piece.removeTokens(range); - if (piece.isEmpty()) { - // remove the piece if it became empty - this._pieces.splice(i, 1); - i--; - len--; - continue; - } - if (piece.endLineNumber < range.startLineNumber) { - // after removal, this piece is before the range - continue; - } - if (piece.startLineNumber > range.endLineNumber) { - // after removal, this piece is after the range - insertPosition = insertPosition || { index: i }; - continue; - } - // after removal, this piece contains the range - const [a, b] = piece.split(range); - if (a.isEmpty()) { - // this piece is actually after the range - insertPosition = insertPosition || { index: i }; - continue; - } - if (b.isEmpty()) { - // this piece is actually before the range - continue; - } - this._pieces.splice(i, 1, a, b); - i++; - len++; - insertPosition = insertPosition || { index: i }; - } - insertPosition = insertPosition || { index: this._pieces.length }; - if (pieces.length > 0) { - this._pieces = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["arrayInsert"](this._pieces, insertPosition.index, pieces); - } - // console.log(`I HAVE ${this._pieces.length} pieces`); - // console.log(`${this._pieces.map(p => p.toString()).join('\n')}`); - return range; - } - isComplete() { - return this._isComplete; - } - addSemanticTokens(lineNumber, aTokens) { - const pieces = this._pieces; - if (pieces.length === 0) { - return aTokens; - } - const pieceIndex = TokensStore2._findFirstPieceWithLine(pieces, lineNumber); - const bTokens = pieces[pieceIndex].getLineTokens(lineNumber); - if (!bTokens) { - return aTokens; - } - const aLen = aTokens.getCount(); - const bLen = bTokens.getCount(); - let aIndex = 0; - let result = [], resultLen = 0; - let lastEndOffset = 0; - const emitToken = (endOffset, metadata) => { - if (endOffset === lastEndOffset) { - return; - } - lastEndOffset = endOffset; - result[resultLen++] = endOffset; - result[resultLen++] = metadata; - }; - for (let bIndex = 0; bIndex < bLen; bIndex++) { - const bStartCharacter = bTokens.getStartCharacter(bIndex); - const bEndCharacter = bTokens.getEndCharacter(bIndex); - const bMetadata = bTokens.getMetadata(bIndex); - const bMask = (((bMetadata & 1 /* SEMANTIC_USE_ITALIC */) ? 2048 /* ITALIC_MASK */ : 0) - | ((bMetadata & 2 /* SEMANTIC_USE_BOLD */) ? 4096 /* BOLD_MASK */ : 0) - | ((bMetadata & 4 /* SEMANTIC_USE_UNDERLINE */) ? 8192 /* UNDERLINE_MASK */ : 0) - | ((bMetadata & 8 /* SEMANTIC_USE_FOREGROUND */) ? 8372224 /* FOREGROUND_MASK */ : 0) - | ((bMetadata & 16 /* SEMANTIC_USE_BACKGROUND */) ? 4286578688 /* BACKGROUND_MASK */ : 0)) >>> 0; - const aMask = (~bMask) >>> 0; - // push any token from `a` that is before `b` - while (aIndex < aLen && aTokens.getEndOffset(aIndex) <= bStartCharacter) { - emitToken(aTokens.getEndOffset(aIndex), aTokens.getMetadata(aIndex)); - aIndex++; - } - // push the token from `a` if it intersects the token from `b` - if (aIndex < aLen && aTokens.getStartOffset(aIndex) < bStartCharacter) { - emitToken(bStartCharacter, aTokens.getMetadata(aIndex)); - } - // skip any tokens from `a` that are contained inside `b` - while (aIndex < aLen && aTokens.getEndOffset(aIndex) < bEndCharacter) { - emitToken(aTokens.getEndOffset(aIndex), (aTokens.getMetadata(aIndex) & aMask) | (bMetadata & bMask)); - aIndex++; - } - if (aIndex < aLen) { - emitToken(bEndCharacter, (aTokens.getMetadata(aIndex) & aMask) | (bMetadata & bMask)); - if (aTokens.getEndOffset(aIndex) === bEndCharacter) { - // `a` ends exactly at the same spot as `b`! - aIndex++; - } - } - else { - const aMergeIndex = Math.min(Math.max(0, aIndex - 1), aLen - 1); - // push the token from `b` - emitToken(bEndCharacter, (aTokens.getMetadata(aMergeIndex) & aMask) | (bMetadata & bMask)); - } - } - // push the remaining tokens from `a` - while (aIndex < aLen) { - emitToken(aTokens.getEndOffset(aIndex), aTokens.getMetadata(aIndex)); - aIndex++; - } - return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"](new Uint32Array(result), aTokens.getLineContent()); - } - static _findFirstPieceWithLine(pieces, lineNumber) { - let low = 0; - let high = pieces.length - 1; - while (low < high) { - let mid = low + Math.floor((high - low) / 2); - if (pieces[mid].endLineNumber < lineNumber) { - low = mid + 1; - } - else if (pieces[mid].startLineNumber > lineNumber) { - high = mid - 1; - } - else { - while (mid > low && pieces[mid - 1].startLineNumber <= lineNumber && lineNumber <= pieces[mid - 1].endLineNumber) { - mid--; - } - return mid; - } - } - return low; - } - //#region Editing - acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode) { - for (const piece of this._pieces) { - piece.acceptEdit(range, eolCount, firstLineLength, lastLineLength, firstCharCode); - } - } -} -class TokensStore { - constructor() { - this._lineTokens = []; - this._len = 0; - } - flush() { - this._lineTokens = []; - this._len = 0; - } - getTokens(topLevelLanguageId, lineIndex, lineText) { - let rawLineTokens = null; - if (lineIndex < this._len) { - rawLineTokens = this._lineTokens[lineIndex]; - } - if (rawLineTokens !== null && rawLineTokens !== EMPTY_LINE_TOKENS) { - return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"](toUint32Array(rawLineTokens), lineText); - } - let lineTokens = new Uint32Array(2); - lineTokens[0] = lineText.length; - lineTokens[1] = getDefaultMetadata(topLevelLanguageId); - return new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"](lineTokens, lineText); - } - static _massageTokens(topLevelLanguageId, lineTextLength, _tokens) { - const tokens = _tokens ? toUint32Array(_tokens) : null; - if (lineTextLength === 0) { - let hasDifferentLanguageId = false; - if (tokens && tokens.length > 1) { - hasDifferentLanguageId = (_modes_js__WEBPACK_IMPORTED_MODULE_4__["TokenMetadata"].getLanguageId(tokens[1]) !== topLevelLanguageId); - } - if (!hasDifferentLanguageId) { - return EMPTY_LINE_TOKENS; - } - } - if (!tokens || tokens.length === 0) { - const tokens = new Uint32Array(2); - tokens[0] = lineTextLength; - tokens[1] = getDefaultMetadata(topLevelLanguageId); - return tokens.buffer; - } - // Ensure the last token covers the end of the text - tokens[tokens.length - 2] = lineTextLength; - if (tokens.byteOffset === 0 && tokens.byteLength === tokens.buffer.byteLength) { - // Store directly the ArrayBuffer pointer to save an object - return tokens.buffer; - } - return tokens; - } - _ensureLine(lineIndex) { - while (lineIndex >= this._len) { - this._lineTokens[this._len] = null; - this._len++; - } - } - _deleteLines(start, deleteCount) { - if (deleteCount === 0) { - return; - } - if (start + deleteCount > this._len) { - deleteCount = this._len - start; - } - this._lineTokens.splice(start, deleteCount); - this._len -= deleteCount; - } - _insertLines(insertIndex, insertCount) { - if (insertCount === 0) { - return; - } - let lineTokens = []; - for (let i = 0; i < insertCount; i++) { - lineTokens[i] = null; - } - this._lineTokens = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["arrayInsert"](this._lineTokens, insertIndex, lineTokens); - this._len += insertCount; - } - setTokens(topLevelLanguageId, lineIndex, lineTextLength, _tokens, checkEquality) { - const tokens = TokensStore._massageTokens(topLevelLanguageId, lineTextLength, _tokens); - this._ensureLine(lineIndex); - const oldTokens = this._lineTokens[lineIndex]; - this._lineTokens[lineIndex] = tokens; - if (checkEquality) { - return !TokensStore._equals(oldTokens, tokens); - } - return false; - } - static _equals(_a, _b) { - if (!_a || !_b) { - return !_a && !_b; - } - const a = toUint32Array(_a); - const b = toUint32Array(_b); - if (a.length !== b.length) { - return false; - } - for (let i = 0, len = a.length; i < len; i++) { - if (a[i] !== b[i]) { - return false; - } - } - return true; - } - //#region Editing - acceptEdit(range, eolCount, firstLineLength) { - this._acceptDeleteRange(range); - this._acceptInsertText(new _core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](range.startLineNumber, range.startColumn), eolCount, firstLineLength); - } - _acceptDeleteRange(range) { - const firstLineIndex = range.startLineNumber - 1; - if (firstLineIndex >= this._len) { - return; - } - if (range.startLineNumber === range.endLineNumber) { - if (range.startColumn === range.endColumn) { - // Nothing to delete - return; - } - this._lineTokens[firstLineIndex] = TokensStore._delete(this._lineTokens[firstLineIndex], range.startColumn - 1, range.endColumn - 1); - return; - } - this._lineTokens[firstLineIndex] = TokensStore._deleteEnding(this._lineTokens[firstLineIndex], range.startColumn - 1); - const lastLineIndex = range.endLineNumber - 1; - let lastLineTokens = null; - if (lastLineIndex < this._len) { - lastLineTokens = TokensStore._deleteBeginning(this._lineTokens[lastLineIndex], range.endColumn - 1); - } - // Take remaining text on last line and append it to remaining text on first line - this._lineTokens[firstLineIndex] = TokensStore._append(this._lineTokens[firstLineIndex], lastLineTokens); - // Delete middle lines - this._deleteLines(range.startLineNumber, range.endLineNumber - range.startLineNumber); - } - _acceptInsertText(position, eolCount, firstLineLength) { - if (eolCount === 0 && firstLineLength === 0) { - // Nothing to insert - return; - } - const lineIndex = position.lineNumber - 1; - if (lineIndex >= this._len) { - return; - } - if (eolCount === 0) { - // Inserting text on one line - this._lineTokens[lineIndex] = TokensStore._insert(this._lineTokens[lineIndex], position.column - 1, firstLineLength); - return; - } - this._lineTokens[lineIndex] = TokensStore._deleteEnding(this._lineTokens[lineIndex], position.column - 1); - this._lineTokens[lineIndex] = TokensStore._insert(this._lineTokens[lineIndex], position.column - 1, firstLineLength); - this._insertLines(position.lineNumber, eolCount); - } - static _deleteBeginning(lineTokens, toChIndex) { - if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) { - return lineTokens; - } - return TokensStore._delete(lineTokens, 0, toChIndex); - } - static _deleteEnding(lineTokens, fromChIndex) { - if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) { - return lineTokens; - } - const tokens = toUint32Array(lineTokens); - const lineTextLength = tokens[tokens.length - 2]; - return TokensStore._delete(lineTokens, fromChIndex, lineTextLength); - } - static _delete(lineTokens, fromChIndex, toChIndex) { - if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS || fromChIndex === toChIndex) { - return lineTokens; - } - const tokens = toUint32Array(lineTokens); - const tokensCount = (tokens.length >>> 1); - // special case: deleting everything - if (fromChIndex === 0 && tokens[tokens.length - 2] === toChIndex) { - return EMPTY_LINE_TOKENS; - } - const fromTokenIndex = _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"].findIndexInTokensArray(tokens, fromChIndex); - const fromTokenStartOffset = (fromTokenIndex > 0 ? tokens[(fromTokenIndex - 1) << 1] : 0); - const fromTokenEndOffset = tokens[fromTokenIndex << 1]; - if (toChIndex < fromTokenEndOffset) { - // the delete range is inside a single token - const delta = (toChIndex - fromChIndex); - for (let i = fromTokenIndex; i < tokensCount; i++) { - tokens[i << 1] -= delta; - } - return lineTokens; - } - let dest; - let lastEnd; - if (fromTokenStartOffset !== fromChIndex) { - tokens[fromTokenIndex << 1] = fromChIndex; - dest = ((fromTokenIndex + 1) << 1); - lastEnd = fromChIndex; - } - else { - dest = (fromTokenIndex << 1); - lastEnd = fromTokenStartOffset; - } - const delta = (toChIndex - fromChIndex); - for (let tokenIndex = fromTokenIndex + 1; tokenIndex < tokensCount; tokenIndex++) { - const tokenEndOffset = tokens[tokenIndex << 1] - delta; - if (tokenEndOffset > lastEnd) { - tokens[dest++] = tokenEndOffset; - tokens[dest++] = tokens[(tokenIndex << 1) + 1]; - lastEnd = tokenEndOffset; - } - } - if (dest === tokens.length) { - // nothing to trim - return lineTokens; - } - let tmp = new Uint32Array(dest); - tmp.set(tokens.subarray(0, dest), 0); - return tmp.buffer; - } - static _append(lineTokens, _otherTokens) { - if (_otherTokens === EMPTY_LINE_TOKENS) { - return lineTokens; - } - if (lineTokens === EMPTY_LINE_TOKENS) { - return _otherTokens; - } - if (lineTokens === null) { - return lineTokens; - } - if (_otherTokens === null) { - // cannot determine combined line length... - return null; - } - const myTokens = toUint32Array(lineTokens); - const otherTokens = toUint32Array(_otherTokens); - const otherTokensCount = (otherTokens.length >>> 1); - let result = new Uint32Array(myTokens.length + otherTokens.length); - result.set(myTokens, 0); - let dest = myTokens.length; - const delta = myTokens[myTokens.length - 2]; - for (let i = 0; i < otherTokensCount; i++) { - result[dest++] = otherTokens[(i << 1)] + delta; - result[dest++] = otherTokens[(i << 1) + 1]; - } - return result.buffer; - } - static _insert(lineTokens, chIndex, textLength) { - if (lineTokens === null || lineTokens === EMPTY_LINE_TOKENS) { - // nothing to do - return lineTokens; - } - const tokens = toUint32Array(lineTokens); - const tokensCount = (tokens.length >>> 1); - let fromTokenIndex = _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"].findIndexInTokensArray(tokens, chIndex); - if (fromTokenIndex > 0) { - const fromTokenStartOffset = tokens[(fromTokenIndex - 1) << 1]; - if (fromTokenStartOffset === chIndex) { - fromTokenIndex--; - } - } - for (let tokenIndex = fromTokenIndex; tokenIndex < tokensCount; tokenIndex++) { - tokens[tokenIndex << 1] += textLength; - } - return lineTokens; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js ***! - \*****************************************************************************/ -/*! exports provided: USUAL_WORD_SEPARATORS, DEFAULT_WORD_REGEXP, ensureValidWordDefinition, getWordAtText */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USUAL_WORD_SEPARATORS", function() { return USUAL_WORD_SEPARATORS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_WORD_REGEXP", function() { return DEFAULT_WORD_REGEXP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ensureValidWordDefinition", function() { return ensureValidWordDefinition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWordAtText", function() { return getWordAtText; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'; -/** - * Create a word definition regular expression based on default word separators. - * Optionally provide allowed separators that should be included in words. - * - * The default would look like this: - * /(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g - */ -function createWordRegExp(allowInWords = '') { - let source = '(-?\\d*\\.\\d\\w*)|([^'; - for (const sep of USUAL_WORD_SEPARATORS) { - if (allowInWords.indexOf(sep) >= 0) { - continue; - } - source += '\\' + sep; - } - source += '\\s]+)'; - return new RegExp(source, 'g'); -} -// catches numbers (including floating numbers) in the first group, and alphanum in the second -const DEFAULT_WORD_REGEXP = createWordRegExp(); -function ensureValidWordDefinition(wordDefinition) { - let result = DEFAULT_WORD_REGEXP; - if (wordDefinition && (wordDefinition instanceof RegExp)) { - if (!wordDefinition.global) { - let flags = 'g'; - if (wordDefinition.ignoreCase) { - flags += 'i'; - } - if (wordDefinition.multiline) { - flags += 'm'; - } - if (wordDefinition.unicode) { - flags += 'u'; - } - result = new RegExp(wordDefinition.source, flags); - } - else { - result = wordDefinition; - } - } - result.lastIndex = 0; - return result; -} -const _defaultConfig = { - maxLen: 1000, - windowSize: 15, - timeBudget: 150 -}; -function getWordAtText(column, wordDefinition, text, textOffset, config = _defaultConfig) { - if (text.length > config.maxLen) { - // don't throw strings that long at the regexp - // but use a sub-string in which a word must occur - let start = column - config.maxLen / 2; - if (start < 0) { - textOffset += column; - start = 0; - } - else { - textOffset += start; - } - text = text.substring(start, column + config.maxLen / 2); - return getWordAtText(column, wordDefinition, text, textOffset, config); - } - const t1 = Date.now(); - const pos = column - 1 - textOffset; - let prevRegexIndex = -1; - let match = null; - for (let i = 1;; i++) { - // check time budget - if (Date.now() - t1 >= config.timeBudget) { - // break; - } - // reset the index at which the regexp should start matching, also know where it - // should stop so that subsequent search don't repeat previous searches - const regexIndex = pos - config.windowSize * i; - wordDefinition.lastIndex = Math.max(0, regexIndex); - const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex); - if (!thisMatch && match) { - // stop: we have something - break; - } - match = thisMatch; - // stop: searched at start - if (regexIndex <= 0) { - break; - } - prevRegexIndex = regexIndex; - } - if (match) { - let result = { - word: match[0], - startColumn: textOffset + 1 + match.index, - endColumn: textOffset + 1 + match.index + match[0].length - }; - wordDefinition.lastIndex = 0; - return result; - } - return null; -} -function _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) { - let match; - while (match = wordDefinition.exec(text)) { - const matchIndex = match.index || 0; - if (matchIndex <= pos && wordDefinition.lastIndex >= pos) { - return match; - } - else if (stopPos > 0 && matchIndex > stopPos) { - return null; - } - } - return null; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js": -/*!******************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes.js ***! - \******************************************************************/ -/*! exports provided: LanguageIdentifier, TokenMetadata, completionKindToCssClass, completionKindFromString, SignatureHelpTriggerKind, DocumentHighlightKind, isLocationLink, SymbolKinds, FoldingRangeKind, ReferenceProviderRegistry, RenameProviderRegistry, CompletionProviderRegistry, SignatureHelpProviderRegistry, HoverProviderRegistry, DocumentSymbolProviderRegistry, DocumentHighlightProviderRegistry, OnTypeRenameProviderRegistry, DefinitionProviderRegistry, DeclarationProviderRegistry, ImplementationProviderRegistry, TypeDefinitionProviderRegistry, CodeLensProviderRegistry, CodeActionProviderRegistry, DocumentFormattingEditProviderRegistry, DocumentRangeFormattingEditProviderRegistry, OnTypeFormattingEditProviderRegistry, LinkProviderRegistry, ColorProviderRegistry, SelectionRangeRegistry, FoldingRangeProviderRegistry, DocumentSemanticTokensProviderRegistry, DocumentRangeSemanticTokensProviderRegistry, TokenizationRegistry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguageIdentifier", function() { return LanguageIdentifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenMetadata", function() { return TokenMetadata; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "completionKindToCssClass", function() { return completionKindToCssClass; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "completionKindFromString", function() { return completionKindFromString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureHelpTriggerKind", function() { return SignatureHelpTriggerKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLocationLink", function() { return isLocationLink; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKinds", function() { return SymbolKinds; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceProviderRegistry", function() { return ReferenceProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameProviderRegistry", function() { return RenameProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionProviderRegistry", function() { return CompletionProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureHelpProviderRegistry", function() { return SignatureHelpProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverProviderRegistry", function() { return HoverProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbolProviderRegistry", function() { return DocumentSymbolProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightProviderRegistry", function() { return DocumentHighlightProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnTypeRenameProviderRegistry", function() { return OnTypeRenameProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefinitionProviderRegistry", function() { return DefinitionProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeclarationProviderRegistry", function() { return DeclarationProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImplementationProviderRegistry", function() { return ImplementationProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TypeDefinitionProviderRegistry", function() { return TypeDefinitionProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensProviderRegistry", function() { return CodeLensProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionProviderRegistry", function() { return CodeActionProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentFormattingEditProviderRegistry", function() { return DocumentFormattingEditProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentRangeFormattingEditProviderRegistry", function() { return DocumentRangeFormattingEditProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnTypeFormattingEditProviderRegistry", function() { return OnTypeFormattingEditProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkProviderRegistry", function() { return LinkProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorProviderRegistry", function() { return ColorProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRangeRegistry", function() { return SelectionRangeRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeProviderRegistry", function() { return FoldingRangeProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSemanticTokensProviderRegistry", function() { return DocumentSemanticTokensProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentRangeSemanticTokensProviderRegistry", function() { return DocumentRangeSemanticTokensProviderRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationRegistry", function() { return TokenizationRegistry; }); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modes/languageFeatureRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js"); -/* harmony import */ var _modes_tokenizationRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modes/tokenizationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -/** - * @internal - */ -class LanguageIdentifier { - constructor(language, id) { - this.language = language; - this.id = id; - } -} -/** - * @internal - */ -class TokenMetadata { - static getLanguageId(metadata) { - return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */; - } - static getTokenType(metadata) { - return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */; - } - static getFontStyle(metadata) { - return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */; - } - static getForeground(metadata) { - return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */; - } - static getBackground(metadata) { - return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */; - } - static getClassNameFromMetadata(metadata) { - let foreground = this.getForeground(metadata); - let className = 'mtk' + foreground; - let fontStyle = this.getFontStyle(metadata); - if (fontStyle & 1 /* Italic */) { - className += ' mtki'; - } - if (fontStyle & 2 /* Bold */) { - className += ' mtkb'; - } - if (fontStyle & 4 /* Underline */) { - className += ' mtku'; - } - return className; - } - static getInlineStyleFromMetadata(metadata, colorMap) { - const foreground = this.getForeground(metadata); - const fontStyle = this.getFontStyle(metadata); - let result = `color: ${colorMap[foreground]};`; - if (fontStyle & 1 /* Italic */) { - result += 'font-style: italic;'; - } - if (fontStyle & 2 /* Bold */) { - result += 'font-weight: bold;'; - } - if (fontStyle & 4 /* Underline */) { - result += 'text-decoration: underline;'; - } - return result; - } -} -/** - * @internal - */ -const completionKindToCssClass = (function () { - let data = Object.create(null); - data[0 /* Method */] = 'symbol-method'; - data[1 /* Function */] = 'symbol-function'; - data[2 /* Constructor */] = 'symbol-constructor'; - data[3 /* Field */] = 'symbol-field'; - data[4 /* Variable */] = 'symbol-variable'; - data[5 /* Class */] = 'symbol-class'; - data[6 /* Struct */] = 'symbol-struct'; - data[7 /* Interface */] = 'symbol-interface'; - data[8 /* Module */] = 'symbol-module'; - data[9 /* Property */] = 'symbol-property'; - data[10 /* Event */] = 'symbol-event'; - data[11 /* Operator */] = 'symbol-operator'; - data[12 /* Unit */] = 'symbol-unit'; - data[13 /* Value */] = 'symbol-value'; - data[14 /* Constant */] = 'symbol-constant'; - data[15 /* Enum */] = 'symbol-enum'; - data[16 /* EnumMember */] = 'symbol-enum-member'; - data[17 /* Keyword */] = 'symbol-keyword'; - data[27 /* Snippet */] = 'symbol-snippet'; - data[18 /* Text */] = 'symbol-text'; - data[19 /* Color */] = 'symbol-color'; - data[20 /* File */] = 'symbol-file'; - data[21 /* Reference */] = 'symbol-reference'; - data[22 /* Customcolor */] = 'symbol-customcolor'; - data[23 /* Folder */] = 'symbol-folder'; - data[24 /* TypeParameter */] = 'symbol-type-parameter'; - data[25 /* User */] = 'account'; - data[26 /* Issue */] = 'issues'; - return function (kind) { - const name = data[kind]; - let codicon = name && _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["iconRegistry"].get(name); - if (!codicon) { - console.info('No codicon found for CompletionItemKind ' + kind); - codicon = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].symbolProperty; - } - return codicon.classNames; - }; -})(); -/** - * @internal - */ -let completionKindFromString = (function () { - let data = Object.create(null); - data['method'] = 0 /* Method */; - data['function'] = 1 /* Function */; - data['constructor'] = 2 /* Constructor */; - data['field'] = 3 /* Field */; - data['variable'] = 4 /* Variable */; - data['class'] = 5 /* Class */; - data['struct'] = 6 /* Struct */; - data['interface'] = 7 /* Interface */; - data['module'] = 8 /* Module */; - data['property'] = 9 /* Property */; - data['event'] = 10 /* Event */; - data['operator'] = 11 /* Operator */; - data['unit'] = 12 /* Unit */; - data['value'] = 13 /* Value */; - data['constant'] = 14 /* Constant */; - data['enum'] = 15 /* Enum */; - data['enum-member'] = 16 /* EnumMember */; - data['enumMember'] = 16 /* EnumMember */; - data['keyword'] = 17 /* Keyword */; - data['snippet'] = 27 /* Snippet */; - data['text'] = 18 /* Text */; - data['color'] = 19 /* Color */; - data['file'] = 20 /* File */; - data['reference'] = 21 /* Reference */; - data['customcolor'] = 22 /* Customcolor */; - data['folder'] = 23 /* Folder */; - data['type-parameter'] = 24 /* TypeParameter */; - data['typeParameter'] = 24 /* TypeParameter */; - data['account'] = 25 /* User */; - data['issue'] = 26 /* Issue */; - return function (value, strict) { - let res = data[value]; - if (typeof res === 'undefined' && !strict) { - res = 9 /* Property */; - } - return res; - }; -})(); -var SignatureHelpTriggerKind; -(function (SignatureHelpTriggerKind) { - SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange"; -})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); -/** - * A document highlight kind. - */ -var DocumentHighlightKind; -(function (DocumentHighlightKind) { - /** - * A textual occurrence. - */ - DocumentHighlightKind[DocumentHighlightKind["Text"] = 0] = "Text"; - /** - * Read-access of a symbol, like reading a variable. - */ - DocumentHighlightKind[DocumentHighlightKind["Read"] = 1] = "Read"; - /** - * Write-access of a symbol, like writing to a variable. - */ - DocumentHighlightKind[DocumentHighlightKind["Write"] = 2] = "Write"; -})(DocumentHighlightKind || (DocumentHighlightKind = {})); -/** - * @internal - */ -function isLocationLink(thing) { - return thing - && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].isUri(thing.uri) - && _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].isIRange(thing.range) - && (_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].isIRange(thing.originSelectionRange) || _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].isIRange(thing.targetSelectionRange)); -} -/** - * @internal - */ -var SymbolKinds; -(function (SymbolKinds) { - const byName = new Map(); - byName.set('file', 0 /* File */); - byName.set('module', 1 /* Module */); - byName.set('namespace', 2 /* Namespace */); - byName.set('package', 3 /* Package */); - byName.set('class', 4 /* Class */); - byName.set('method', 5 /* Method */); - byName.set('property', 6 /* Property */); - byName.set('field', 7 /* Field */); - byName.set('constructor', 8 /* Constructor */); - byName.set('enum', 9 /* Enum */); - byName.set('interface', 10 /* Interface */); - byName.set('function', 11 /* Function */); - byName.set('variable', 12 /* Variable */); - byName.set('constant', 13 /* Constant */); - byName.set('string', 14 /* String */); - byName.set('number', 15 /* Number */); - byName.set('boolean', 16 /* Boolean */); - byName.set('array', 17 /* Array */); - byName.set('object', 18 /* Object */); - byName.set('key', 19 /* Key */); - byName.set('null', 20 /* Null */); - byName.set('enum-member', 21 /* EnumMember */); - byName.set('struct', 22 /* Struct */); - byName.set('event', 23 /* Event */); - byName.set('operator', 24 /* Operator */); - byName.set('type-parameter', 25 /* TypeParameter */); - const byKind = new Map(); - byKind.set(0 /* File */, 'file'); - byKind.set(1 /* Module */, 'module'); - byKind.set(2 /* Namespace */, 'namespace'); - byKind.set(3 /* Package */, 'package'); - byKind.set(4 /* Class */, 'class'); - byKind.set(5 /* Method */, 'method'); - byKind.set(6 /* Property */, 'property'); - byKind.set(7 /* Field */, 'field'); - byKind.set(8 /* Constructor */, 'constructor'); - byKind.set(9 /* Enum */, 'enum'); - byKind.set(10 /* Interface */, 'interface'); - byKind.set(11 /* Function */, 'function'); - byKind.set(12 /* Variable */, 'variable'); - byKind.set(13 /* Constant */, 'constant'); - byKind.set(14 /* String */, 'string'); - byKind.set(15 /* Number */, 'number'); - byKind.set(16 /* Boolean */, 'boolean'); - byKind.set(17 /* Array */, 'array'); - byKind.set(18 /* Object */, 'object'); - byKind.set(19 /* Key */, 'key'); - byKind.set(20 /* Null */, 'null'); - byKind.set(21 /* EnumMember */, 'enum-member'); - byKind.set(22 /* Struct */, 'struct'); - byKind.set(23 /* Event */, 'event'); - byKind.set(24 /* Operator */, 'operator'); - byKind.set(25 /* TypeParameter */, 'type-parameter'); - /** - * @internal - */ - function fromString(value) { - return byName.get(value); - } - SymbolKinds.fromString = fromString; - /** - * @internal - */ - function toString(kind) { - return byKind.get(kind); - } - SymbolKinds.toString = toString; - /** - * @internal - */ - function toCssClassName(kind, inline) { - const symbolName = byKind.get(kind); - let codicon = symbolName && _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["iconRegistry"].get('symbol-' + symbolName); - if (!codicon) { - console.info('No codicon found for SymbolKind ' + kind); - codicon = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].symbolProperty; - } - return `${inline ? 'inline' : 'block'} ${codicon.classNames}`; - } - SymbolKinds.toCssClassName = toCssClassName; -})(SymbolKinds || (SymbolKinds = {})); -class FoldingRangeKind { - /** - * Creates a new [FoldingRangeKind](#FoldingRangeKind). - * - * @param value of the kind. - */ - constructor(value) { - this.value = value; - } -} -/** - * Kind for folding range representing a comment. The value of the kind is 'comment'. - */ -FoldingRangeKind.Comment = new FoldingRangeKind('comment'); -/** - * Kind for folding range representing a import. The value of the kind is 'imports'. - */ -FoldingRangeKind.Imports = new FoldingRangeKind('imports'); -/** - * Kind for folding range representing regions (for example marked by `#region`, `#endregion`). - * The value of the kind is 'region'. - */ -FoldingRangeKind.Region = new FoldingRangeKind('region'); -// --- feature registries ------ -/** - * @internal - */ -const ReferenceProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const RenameProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const CompletionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const SignatureHelpProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const HoverProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentSymbolProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentHighlightProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const OnTypeRenameProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DefinitionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DeclarationProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const ImplementationProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const TypeDefinitionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const CodeLensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const CodeActionProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentRangeFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const OnTypeFormattingEditProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const LinkProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const ColorProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const SelectionRangeRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const FoldingRangeProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentSemanticTokensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const DocumentRangeSemanticTokensProviderRegistry = new _modes_languageFeatureRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageFeatureRegistry"](); -/** - * @internal - */ -const TokenizationRegistry = new _modes_tokenizationRegistry_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistryImpl"](); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js ***! - \*******************************************************************************/ -/*! exports provided: FrankensteinMode */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FrankensteinMode", function() { return FrankensteinMode; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class FrankensteinMode { - constructor(languageIdentifier) { - this._languageIdentifier = languageIdentifier; - } - getId() { - return this._languageIdentifier.language; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js ***! - \****************************************************************************************/ -/*! exports provided: IndentAction, StandardAutoClosingPairConditional */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentAction", function() { return IndentAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardAutoClosingPairConditional", function() { return StandardAutoClosingPairConditional; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -/** - * Describes what to do with the indentation when pressing Enter. - */ -var IndentAction; -(function (IndentAction) { - /** - * Insert new line and copy the previous line's indentation. - */ - IndentAction[IndentAction["None"] = 0] = "None"; - /** - * Insert new line and indent once (relative to the previous line's indentation). - */ - IndentAction[IndentAction["Indent"] = 1] = "Indent"; - /** - * Insert two new lines: - * - the first one indented which will hold the cursor - * - the second one at the same indentation level - */ - IndentAction[IndentAction["IndentOutdent"] = 2] = "IndentOutdent"; - /** - * Insert new line and outdent once (relative to the previous line's indentation). - */ - IndentAction[IndentAction["Outdent"] = 3] = "Outdent"; -})(IndentAction || (IndentAction = {})); -/** - * @internal - */ -class StandardAutoClosingPairConditional { - constructor(source) { - this.open = source.open; - this.close = source.close; - // initially allowed in all tokens - this._standardTokenMask = 0; - if (Array.isArray(source.notIn)) { - for (let i = 0, len = source.notIn.length; i < len; i++) { - const notIn = source.notIn[i]; - switch (notIn) { - case 'string': - this._standardTokenMask |= 2 /* String */; - break; - case 'comment': - this._standardTokenMask |= 1 /* Comment */; - break; - case 'regex': - this._standardTokenMask |= 4 /* RegEx */; - break; - } - } - } - } - isOK(standardToken) { - return (this._standardTokenMask & standardToken) === 0; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js ***! - \************************************************************************************************/ -/*! exports provided: RichEditSupport, LanguageConfigurationChangeEvent, LanguageConfigurationRegistryImpl, LanguageConfigurationRegistry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichEditSupport", function() { return RichEditSupport; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguageConfigurationChangeEvent", function() { return LanguageConfigurationChangeEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguageConfigurationRegistryImpl", function() { return LanguageConfigurationRegistryImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguageConfigurationRegistry", function() { return LanguageConfigurationRegistry; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/wordHelper.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js"); -/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./languageConfiguration.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js"); -/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./supports.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js"); -/* harmony import */ var _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./supports/characterPair.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js"); -/* harmony import */ var _supports_electricCharacter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./supports/electricCharacter.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js"); -/* harmony import */ var _supports_indentRules_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./supports/indentRules.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js"); -/* harmony import */ var _supports_onEnter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./supports/onEnter.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js"); -/* harmony import */ var _supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./supports/richEditBrackets.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - -class RichEditSupport { - constructor(languageIdentifier, previous, rawConf) { - this._languageIdentifier = languageIdentifier; - this._brackets = null; - this._electricCharacter = null; - let prev = null; - if (previous) { - prev = previous._conf; - } - this._conf = RichEditSupport._mergeConf(prev, rawConf); - this._onEnterSupport = (this._conf.brackets || this._conf.indentationRules || this._conf.onEnterRules ? new _supports_onEnter_js__WEBPACK_IMPORTED_MODULE_9__["OnEnterSupport"](this._conf) : null); - this.comments = RichEditSupport._handleComments(this._conf); - this.characterPair = new _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__["CharacterPairSupport"](this._conf); - this.wordDefinition = this._conf.wordPattern || _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_WORD_REGEXP"]; - this.indentationRules = this._conf.indentationRules; - if (this._conf.indentationRules) { - this.indentRulesSupport = new _supports_indentRules_js__WEBPACK_IMPORTED_MODULE_8__["IndentRulesSupport"](this._conf.indentationRules); - } - else { - this.indentRulesSupport = null; - } - this.foldingRules = this._conf.folding || {}; - } - get brackets() { - if (!this._brackets && this._conf.brackets) { - this._brackets = new _supports_richEditBrackets_js__WEBPACK_IMPORTED_MODULE_10__["RichEditBrackets"](this._languageIdentifier, this._conf.brackets); - } - return this._brackets; - } - get electricCharacter() { - if (!this._electricCharacter) { - this._electricCharacter = new _supports_electricCharacter_js__WEBPACK_IMPORTED_MODULE_7__["BracketElectricCharacterSupport"](this.brackets); - } - return this._electricCharacter; - } - onEnter(autoIndent, oneLineAboveText, beforeEnterText, afterEnterText) { - if (!this._onEnterSupport) { - return null; - } - return this._onEnterSupport.onEnter(autoIndent, oneLineAboveText, beforeEnterText, afterEnterText); - } - static _mergeConf(prev, current) { - return { - comments: (prev ? current.comments || prev.comments : current.comments), - brackets: (prev ? current.brackets || prev.brackets : current.brackets), - wordPattern: (prev ? current.wordPattern || prev.wordPattern : current.wordPattern), - indentationRules: (prev ? current.indentationRules || prev.indentationRules : current.indentationRules), - onEnterRules: (prev ? current.onEnterRules || prev.onEnterRules : current.onEnterRules), - autoClosingPairs: (prev ? current.autoClosingPairs || prev.autoClosingPairs : current.autoClosingPairs), - surroundingPairs: (prev ? current.surroundingPairs || prev.surroundingPairs : current.surroundingPairs), - autoCloseBefore: (prev ? current.autoCloseBefore || prev.autoCloseBefore : current.autoCloseBefore), - folding: (prev ? current.folding || prev.folding : current.folding), - __electricCharacterSupport: (prev ? current.__electricCharacterSupport || prev.__electricCharacterSupport : current.__electricCharacterSupport), - }; - } - static _handleComments(conf) { - let commentRule = conf.comments; - if (!commentRule) { - return null; - } - // comment configuration - let comments = {}; - if (commentRule.lineComment) { - comments.lineCommentToken = commentRule.lineComment; - } - if (commentRule.blockComment) { - let [blockStart, blockEnd] = commentRule.blockComment; - comments.blockCommentStartToken = blockStart; - comments.blockCommentEndToken = blockEnd; - } - return comments; - } -} -class LanguageConfigurationChangeEvent { - constructor(languageIdentifier) { - this.languageIdentifier = languageIdentifier; - } -} -class LanguageConfigurationRegistryImpl { - constructor() { - this._entries = new Map(); - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChange = this._onDidChange.event; - } - register(languageIdentifier, configuration) { - let previous = this._getRichEditSupport(languageIdentifier.id); - let current = new RichEditSupport(languageIdentifier, previous, configuration); - this._entries.set(languageIdentifier.id, current); - this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageIdentifier)); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - if (this._entries.get(languageIdentifier.id) === current) { - this._entries.set(languageIdentifier.id, previous); - this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageIdentifier)); - } - }); - } - _getRichEditSupport(languageId) { - return this._entries.get(languageId); - } - getIndentationRules(languageId) { - const value = this._entries.get(languageId); - if (!value) { - return null; - } - return value.indentationRules || null; - } - // begin electricCharacter - _getElectricCharacterSupport(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return null; - } - return value.electricCharacter || null; - } - getElectricCharacters(languageId) { - let electricCharacterSupport = this._getElectricCharacterSupport(languageId); - if (!electricCharacterSupport) { - return []; - } - return electricCharacterSupport.getElectricCharacters(); - } - /** - * Should return opening bracket type to match indentation with - */ - onElectricCharacter(character, context, column) { - let scopedLineTokens = Object(_supports_js__WEBPACK_IMPORTED_MODULE_5__["createScopedLineTokens"])(context, column - 1); - let electricCharacterSupport = this._getElectricCharacterSupport(scopedLineTokens.languageId); - if (!electricCharacterSupport) { - return null; - } - return electricCharacterSupport.onElectricCharacter(character, scopedLineTokens, column - scopedLineTokens.firstCharOffset); - } - // end electricCharacter - getComments(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return null; - } - return value.comments || null; - } - // begin characterPair - _getCharacterPairSupport(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return null; - } - return value.characterPair || null; - } - getAutoClosingPairs(languageId) { - let characterPairSupport = this._getCharacterPairSupport(languageId); - if (!characterPairSupport) { - return []; - } - return characterPairSupport.getAutoClosingPairs(); - } - getAutoCloseBeforeSet(languageId) { - let characterPairSupport = this._getCharacterPairSupport(languageId); - if (!characterPairSupport) { - return _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__["CharacterPairSupport"].DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED; - } - return characterPairSupport.getAutoCloseBeforeSet(); - } - getSurroundingPairs(languageId) { - let characterPairSupport = this._getCharacterPairSupport(languageId); - if (!characterPairSupport) { - return []; - } - return characterPairSupport.getSurroundingPairs(); - } - shouldAutoClosePair(autoClosingPair, context, column) { - const scopedLineTokens = Object(_supports_js__WEBPACK_IMPORTED_MODULE_5__["createScopedLineTokens"])(context, column - 1); - return _supports_characterPair_js__WEBPACK_IMPORTED_MODULE_6__["CharacterPairSupport"].shouldAutoClosePair(autoClosingPair, scopedLineTokens, column - scopedLineTokens.firstCharOffset); - } - // end characterPair - getWordDefinition(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return Object(_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__["ensureValidWordDefinition"])(null); - } - return Object(_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_3__["ensureValidWordDefinition"])(value.wordDefinition || null); - } - getFoldingRules(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return {}; - } - return value.foldingRules; - } - // begin Indent Rules - getIndentRulesSupport(languageId) { - let value = this._getRichEditSupport(languageId); - if (!value) { - return null; - } - return value.indentRulesSupport || null; - } - /** - * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace. - * Result: - * -1: run into the boundary of embedded languages - * 0: every line above are invalid - * else: nearest preceding line of the same language - */ - getPrecedingValidLine(model, lineNumber, indentRulesSupport) { - let languageID = model.getLanguageIdAtPosition(lineNumber, 0); - if (lineNumber > 1) { - let lastLineNumber; - let resultLineNumber = -1; - for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { - if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) { - return resultLineNumber; - } - let text = model.getLineContent(lastLineNumber); - if (indentRulesSupport.shouldIgnore(text) || /^\s+$/.test(text) || text === '') { - resultLineNumber = lastLineNumber; - continue; - } - return lastLineNumber; - } - } - return -1; - } - /** - * Get inherited indentation from above lines. - * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern. - * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line. - * 3. If this line doesn't match any indent rules - * a. check whether the line above it matches indentNextLinePattern - * b. If not, the indent level of this line is the result - * c. If so, it means the indent of this line is *temporary*, go upward utill we find a line whose indent is not temporary (the same workflow a -> b -> c). - * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber` - * - * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not. - */ - getInheritIndentForLine(autoIndent, model, lineNumber, honorIntentialIndent = true) { - if (autoIndent < 4 /* Full */) { - return null; - } - const indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); - if (!indentRulesSupport) { - return null; - } - if (lineNumber <= 1) { - return { - indentation: '', - action: null - }; - } - const precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport); - if (precedingUnIgnoredLine < 0) { - return null; - } - else if (precedingUnIgnoredLine < 1) { - return { - indentation: '', - action: null - }; - } - const precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine); - if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](precedingUnIgnoredLineContent), - action: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent, - line: precedingUnIgnoredLine - }; - } - else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](precedingUnIgnoredLineContent), - action: null, - line: precedingUnIgnoredLine - }; - } - else { - // precedingUnIgnoredLine can not be ignored. - // it doesn't increase indent of following lines - // it doesn't increase just next line - // so current line is not affect by precedingUnIgnoredLine - // and then we should get a correct inheritted indentation from above lines - if (precedingUnIgnoredLine === 1) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(precedingUnIgnoredLine)), - action: null, - line: precedingUnIgnoredLine - }; - } - const previousLine = precedingUnIgnoredLine - 1; - const previousLineIndentMetadata = indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine)); - if (!(previousLineIndentMetadata & (1 /* INCREASE_MASK */ | 2 /* DECREASE_MASK */)) && - (previousLineIndentMetadata & 4 /* INDENT_NEXTLINE_MASK */)) { - let stopLine = 0; - for (let i = previousLine - 1; i > 0; i--) { - if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { - continue; - } - stopLine = i; - break; - } - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(stopLine + 1)), - action: null, - line: stopLine + 1 - }; - } - if (honorIntentialIndent) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(precedingUnIgnoredLine)), - action: null, - line: precedingUnIgnoredLine - }; - } - else { - // search from precedingUnIgnoredLine until we find one whose indent is not temporary - for (let i = precedingUnIgnoredLine; i > 0; i--) { - const lineContent = model.getLineContent(i); - if (indentRulesSupport.shouldIncrease(lineContent)) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](lineContent), - action: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent, - line: i - }; - } - else if (indentRulesSupport.shouldIndentNextLine(lineContent)) { - let stopLine = 0; - for (let j = i - 1; j > 0; j--) { - if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { - continue; - } - stopLine = j; - break; - } - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(stopLine + 1)), - action: null, - line: stopLine + 1 - }; - } - else if (indentRulesSupport.shouldDecrease(lineContent)) { - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](lineContent), - action: null, - line: i - }; - } - } - return { - indentation: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(1)), - action: null, - line: 1 - }; - } - } - } - getGoodIndentForLine(autoIndent, virtualModel, languageId, lineNumber, indentConverter) { - if (autoIndent < 4 /* Full */) { - return null; - } - const richEditSupport = this._getRichEditSupport(languageId); - if (!richEditSupport) { - return null; - } - const indentRulesSupport = this.getIndentRulesSupport(languageId); - if (!indentRulesSupport) { - return null; - } - const indent = this.getInheritIndentForLine(autoIndent, virtualModel, lineNumber); - const lineContent = virtualModel.getLineContent(lineNumber); - if (indent) { - const inheritLine = indent.line; - if (inheritLine !== undefined) { - const enterResult = richEditSupport.onEnter(autoIndent, '', virtualModel.getLineContent(inheritLine), ''); - if (enterResult) { - let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](virtualModel.getLineContent(inheritLine)); - if (enterResult.removeText) { - indentation = indentation.substring(0, indentation.length - enterResult.removeText); - } - if ((enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) || - (enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].IndentOutdent)) { - indentation = indentConverter.shiftIndent(indentation); - } - else if (enterResult.indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Outdent) { - indentation = indentConverter.unshiftIndent(indentation); - } - if (indentRulesSupport.shouldDecrease(lineContent)) { - indentation = indentConverter.unshiftIndent(indentation); - } - if (enterResult.appendText) { - indentation += enterResult.appendText; - } - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](indentation); - } - } - if (indentRulesSupport.shouldDecrease(lineContent)) { - if (indent.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) { - return indent.indentation; - } - else { - return indentConverter.unshiftIndent(indent.indentation); - } - } - else { - if (indent.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) { - return indentConverter.shiftIndent(indent.indentation); - } - else { - return indent.indentation; - } - } - } - return null; - } - getIndentForEnter(autoIndent, model, range, indentConverter) { - if (autoIndent < 4 /* Full */) { - return null; - } - model.forceTokenization(range.startLineNumber); - const lineTokens = model.getLineTokens(range.startLineNumber); - const scopedLineTokens = Object(_supports_js__WEBPACK_IMPORTED_MODULE_5__["createScopedLineTokens"])(lineTokens, range.startColumn - 1); - const scopedLineText = scopedLineTokens.getLineContent(); - let embeddedLanguage = false; - let beforeEnterText; - if (scopedLineTokens.firstCharOffset > 0 && lineTokens.getLanguageId(0) !== scopedLineTokens.languageId) { - // we are in the embeded language content - embeddedLanguage = true; // if embeddedLanguage is true, then we don't touch the indentation of current line - beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); - } - else { - beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn - 1); - } - let afterEnterText; - if (range.isEmpty()) { - afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); - } - else { - const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); - afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); - } - const indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); - if (!indentRulesSupport) { - return null; - } - const beforeEnterResult = beforeEnterText; - const beforeEnterIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](beforeEnterText); - const virtualModel = { - getLineTokens: (lineNumber) => { - return model.getLineTokens(lineNumber); - }, - getLanguageIdentifier: () => { - return model.getLanguageIdentifier(); - }, - getLanguageIdAtPosition: (lineNumber, column) => { - return model.getLanguageIdAtPosition(lineNumber, column); - }, - getLineContent: (lineNumber) => { - if (lineNumber === range.startLineNumber) { - return beforeEnterResult; - } - else { - return model.getLineContent(lineNumber); - } - } - }; - const currentLineIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](lineTokens.getLineContent()); - const afterEnterAction = this.getInheritIndentForLine(autoIndent, virtualModel, range.startLineNumber + 1); - if (!afterEnterAction) { - const beforeEnter = embeddedLanguage ? currentLineIndent : beforeEnterIndent; - return { - beforeEnter: beforeEnter, - afterEnter: beforeEnter - }; - } - let afterEnterIndent = embeddedLanguage ? currentLineIndent : afterEnterAction.indentation; - if (afterEnterAction.action === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) { - afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent); - } - if (indentRulesSupport.shouldDecrease(afterEnterText)) { - afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent); - } - return { - beforeEnter: embeddedLanguage ? currentLineIndent : beforeEnterIndent, - afterEnter: afterEnterIndent - }; - } - /** - * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of - * this line doesn't match decreaseIndentPattern, we should not adjust the indentation. - */ - getIndentActionForType(autoIndent, model, range, ch, indentConverter) { - if (autoIndent < 4 /* Full */) { - return null; - } - const scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); - const indentRulesSupport = this.getIndentRulesSupport(scopedLineTokens.languageId); - if (!indentRulesSupport) { - return null; - } - const scopedLineText = scopedLineTokens.getLineContent(); - const beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); - // selection support - let afterTypeText; - if (range.isEmpty()) { - afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); - } - else { - const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); - afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); - } - // If previous content already matches decreaseIndentPattern, it means indentation of this line should already be adjusted - // Users might change the indentation by purpose and we should honor that instead of readjusting. - if (!indentRulesSupport.shouldDecrease(beforeTypeText + afterTypeText) && indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) { - // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner. - // 1. Get inherited indent action - const r = this.getInheritIndentForLine(autoIndent, model, range.startLineNumber, false); - if (!r) { - return null; - } - let indentation = r.indentation; - if (r.action !== _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) { - indentation = indentConverter.unshiftIndent(indentation); - } - return indentation; - } - return null; - } - getIndentMetadata(model, lineNumber) { - const indentRulesSupport = this.getIndentRulesSupport(model.getLanguageIdentifier().id); - if (!indentRulesSupport) { - return null; - } - if (lineNumber < 1 || lineNumber > model.getLineCount()) { - return null; - } - return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber)); - } - // end Indent Rules - // begin onEnter - getEnterAction(autoIndent, model, range) { - const scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); - const richEditSupport = this._getRichEditSupport(scopedLineTokens.languageId); - if (!richEditSupport) { - return null; - } - const scopedLineText = scopedLineTokens.getLineContent(); - const beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); - // selection support - let afterEnterText; - if (range.isEmpty()) { - afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); - } - else { - const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); - afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); - } - let oneLineAboveText = ''; - if (range.startLineNumber > 1 && scopedLineTokens.firstCharOffset === 0) { - // This is not the first line and the entire line belongs to this mode - const oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber - 1); - if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { - // The line above ends with text belonging to the same mode - oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); - } - } - const enterResult = richEditSupport.onEnter(autoIndent, oneLineAboveText, beforeEnterText, afterEnterText); - if (!enterResult) { - return null; - } - const indentAction = enterResult.indentAction; - let appendText = enterResult.appendText; - const removeText = enterResult.removeText || 0; - // Here we add `\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. - if (!appendText) { - if ((indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) || - (indentAction === _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].IndentOutdent)) { - appendText = '\t'; - } - else { - appendText = ''; - } - } - let indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); - if (removeText) { - indentation = indentation.substring(0, indentation.length - removeText); - } - return { - indentAction: indentAction, - appendText: appendText, - removeText: removeText, - indentation: indentation - }; - } - getIndentationAtPosition(model, lineNumber, column) { - const lineText = model.getLineContent(lineNumber); - let indentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](lineText); - if (indentation.length > column - 1) { - indentation = indentation.substring(0, column - 1); - } - return indentation; - } - getScopedLineTokens(model, lineNumber, columnNumber) { - model.forceTokenization(lineNumber); - const lineTokens = model.getLineTokens(lineNumber); - const column = (typeof columnNumber === 'undefined' ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber - 1); - return Object(_supports_js__WEBPACK_IMPORTED_MODULE_5__["createScopedLineTokens"])(lineTokens, column); - } - // end onEnter - getBracketsSupport(languageId) { - const value = this._getRichEditSupport(languageId); - if (!value) { - return null; - } - return value.brackets || null; - } -} -const LanguageConfigurationRegistry = new LanguageConfigurationRegistryImpl(); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageFeatureRegistry.js ***! - \******************************************************************************************/ -/*! exports provided: LanguageFeatureRegistry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguageFeatureRegistry", function() { return LanguageFeatureRegistry; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _languageSelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./languageSelector.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js"); -/* harmony import */ var _services_modelService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -function isExclusive(selector) { - if (typeof selector === 'string') { - return false; - } - else if (Array.isArray(selector)) { - return selector.every(isExclusive); - } - else { - return !!selector.exclusive; - } -} -class LanguageFeatureRegistry { - constructor() { - this._clock = 0; - this._entries = []; - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - } - get onDidChange() { - return this._onDidChange.event; - } - register(selector, provider) { - let entry = { - selector, - provider, - _score: -1, - _time: this._clock++ - }; - this._entries.push(entry); - this._lastCandidate = undefined; - this._onDidChange.fire(this._entries.length); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - if (entry) { - let idx = this._entries.indexOf(entry); - if (idx >= 0) { - this._entries.splice(idx, 1); - this._lastCandidate = undefined; - this._onDidChange.fire(this._entries.length); - entry = undefined; - } - } - }); - } - has(model) { - return this.all(model).length > 0; - } - all(model) { - if (!model) { - return []; - } - this._updateScores(model); - const result = []; - // from registry - for (let entry of this._entries) { - if (entry._score > 0) { - result.push(entry.provider); - } - } - return result; - } - ordered(model) { - const result = []; - this._orderedForEach(model, entry => result.push(entry.provider)); - return result; - } - orderedGroups(model) { - const result = []; - let lastBucket; - let lastBucketScore; - this._orderedForEach(model, entry => { - if (lastBucket && lastBucketScore === entry._score) { - lastBucket.push(entry.provider); - } - else { - lastBucketScore = entry._score; - lastBucket = [entry.provider]; - result.push(lastBucket); - } - }); - return result; - } - _orderedForEach(model, callback) { - if (!model) { - return; - } - this._updateScores(model); - for (const entry of this._entries) { - if (entry._score > 0) { - callback(entry); - } - } - } - _updateScores(model) { - let candidate = { - uri: model.uri.toString(), - language: model.getLanguageIdentifier().language - }; - if (this._lastCandidate - && this._lastCandidate.language === candidate.language - && this._lastCandidate.uri === candidate.uri) { - // nothing has changed - return; - } - this._lastCandidate = candidate; - for (let entry of this._entries) { - entry._score = Object(_languageSelector_js__WEBPACK_IMPORTED_MODULE_2__["score"])(entry.selector, model.uri, model.getLanguageIdentifier().language, Object(_services_modelService_js__WEBPACK_IMPORTED_MODULE_3__["shouldSynchronizeModel"])(model)); - if (isExclusive(entry.selector) && entry._score > 0) { - // support for one exclusive selector that overwrites - // any other selector - for (let entry of this._entries) { - entry._score = 0; - } - entry._score = 1000; - break; - } - } - // needs sorting - this._entries.sort(LanguageFeatureRegistry._compareByScoreAndTime); - } - static _compareByScoreAndTime(a, b) { - if (a._score < b._score) { - return 1; - } - else if (a._score > b._score) { - return -1; - } - else if (a._time < b._time) { - return 1; - } - else if (a._time > b._time) { - return -1; - } - else { - return 0; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageSelector.js ***! - \***********************************************************************************/ -/*! exports provided: score */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "score", function() { return score; }); -/* harmony import */ var _base_common_glob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/glob.js */ "./node_modules/monaco-editor/esm/vs/base/common/glob.js"); -/* harmony import */ var _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -function score(selector, candidateUri, candidateLanguage, candidateIsSynchronized) { - if (Array.isArray(selector)) { - // array -> take max individual value - let ret = 0; - for (const filter of selector) { - const value = score(filter, candidateUri, candidateLanguage, candidateIsSynchronized); - if (value === 10) { - return value; // already at the highest - } - if (value > ret) { - ret = value; - } - } - return ret; - } - else if (typeof selector === 'string') { - if (!candidateIsSynchronized) { - return 0; - } - // short-hand notion, desugars to - // 'fooLang' -> { language: 'fooLang'} - // '*' -> { language: '*' } - if (selector === '*') { - return 5; - } - else if (selector === candidateLanguage) { - return 10; - } - else { - return 0; - } - } - else if (selector) { - // filter -> select accordingly, use defaults for scheme - const { language, pattern, scheme, hasAccessToAllModels } = selector; - if (!candidateIsSynchronized && !hasAccessToAllModels) { - return 0; - } - let ret = 0; - if (scheme) { - if (scheme === candidateUri.scheme) { - ret = 10; - } - else if (scheme === '*') { - ret = 5; - } - else { - return 0; - } - } - if (language) { - if (language === candidateLanguage) { - ret = 10; - } - else if (language === '*') { - ret = Math.max(ret, 5); - } - else { - return 0; - } - } - if (pattern) { - let normalizedPattern; - if (typeof pattern === 'string') { - normalizedPattern = pattern; - } - else { - // Since this pattern has a `base` property, we need - // to normalize this path first before passing it on - // because we will compare it against `Uri.fsPath` - // which uses platform specific separators. - // Refs: https://github.com/microsoft/vscode/issues/99938 - normalizedPattern = Object.assign(Object.assign({}, pattern), { base: Object(_base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["normalize"])(pattern.base) }); - } - if (normalizedPattern === candidateUri.fsPath || Object(_base_common_glob_js__WEBPACK_IMPORTED_MODULE_0__["match"])(normalizedPattern, candidateUri.fsPath)) { - ret = 10; - } - else { - return 0; - } - } - return ret; - } - else { - return 0; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js ***! - \*******************************************************************************/ -/*! exports provided: Uint8Matrix, StateMachine, LinkComputer, computeLinks */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uint8Matrix", function() { return Uint8Matrix; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StateMachine", function() { return StateMachine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkComputer", function() { return LinkComputer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeLinks", function() { return computeLinks; }); -/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class Uint8Matrix { - constructor(rows, cols, defaultValue) { - const data = new Uint8Array(rows * cols); - for (let i = 0, len = rows * cols; i < len; i++) { - data[i] = defaultValue; - } - this._data = data; - this.rows = rows; - this.cols = cols; - } - get(row, col) { - return this._data[row * this.cols + col]; - } - set(row, col, value) { - this._data[row * this.cols + col] = value; - } -} -class StateMachine { - constructor(edges) { - let maxCharCode = 0; - let maxState = 0 /* Invalid */; - for (let i = 0, len = edges.length; i < len; i++) { - let [from, chCode, to] = edges[i]; - if (chCode > maxCharCode) { - maxCharCode = chCode; - } - if (from > maxState) { - maxState = from; - } - if (to > maxState) { - maxState = to; - } - } - maxCharCode++; - maxState++; - let states = new Uint8Matrix(maxState, maxCharCode, 0 /* Invalid */); - for (let i = 0, len = edges.length; i < len; i++) { - let [from, chCode, to] = edges[i]; - states.set(from, chCode, to); - } - this._states = states; - this._maxCharCode = maxCharCode; - } - nextState(currentState, chCode) { - if (chCode < 0 || chCode >= this._maxCharCode) { - return 0 /* Invalid */; - } - return this._states.get(currentState, chCode); - } -} -// State machine for http:// or https:// or file:// -let _stateMachine = null; -function getStateMachine() { - if (_stateMachine === null) { - _stateMachine = new StateMachine([ - [1 /* Start */, 104 /* h */, 2 /* H */], - [1 /* Start */, 72 /* H */, 2 /* H */], - [1 /* Start */, 102 /* f */, 6 /* F */], - [1 /* Start */, 70 /* F */, 6 /* F */], - [2 /* H */, 116 /* t */, 3 /* HT */], - [2 /* H */, 84 /* T */, 3 /* HT */], - [3 /* HT */, 116 /* t */, 4 /* HTT */], - [3 /* HT */, 84 /* T */, 4 /* HTT */], - [4 /* HTT */, 112 /* p */, 5 /* HTTP */], - [4 /* HTT */, 80 /* P */, 5 /* HTTP */], - [5 /* HTTP */, 115 /* s */, 9 /* BeforeColon */], - [5 /* HTTP */, 83 /* S */, 9 /* BeforeColon */], - [5 /* HTTP */, 58 /* Colon */, 10 /* AfterColon */], - [6 /* F */, 105 /* i */, 7 /* FI */], - [6 /* F */, 73 /* I */, 7 /* FI */], - [7 /* FI */, 108 /* l */, 8 /* FIL */], - [7 /* FI */, 76 /* L */, 8 /* FIL */], - [8 /* FIL */, 101 /* e */, 9 /* BeforeColon */], - [8 /* FIL */, 69 /* E */, 9 /* BeforeColon */], - [9 /* BeforeColon */, 58 /* Colon */, 10 /* AfterColon */], - [10 /* AfterColon */, 47 /* Slash */, 11 /* AlmostThere */], - [11 /* AlmostThere */, 47 /* Slash */, 12 /* End */], - ]); - } - return _stateMachine; -} -let _classifier = null; -function getClassifier() { - if (_classifier === null) { - _classifier = new _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_0__["CharacterClassifier"](0 /* None */); - const FORCE_TERMINATION_CHARACTERS = ' \t<>\'\"、。。、,.:;‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…'; - for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) { - _classifier.set(FORCE_TERMINATION_CHARACTERS.charCodeAt(i), 1 /* ForceTermination */); - } - const CANNOT_END_WITH_CHARACTERS = '.,;'; - for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) { - _classifier.set(CANNOT_END_WITH_CHARACTERS.charCodeAt(i), 2 /* CannotEndIn */); - } - } - return _classifier; -} -class LinkComputer { - static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) { - // Do not allow to end link in certain characters... - let lastIncludedCharIndex = linkEndIndex - 1; - do { - const chCode = line.charCodeAt(lastIncludedCharIndex); - const chClass = classifier.get(chCode); - if (chClass !== 2 /* CannotEndIn */) { - break; - } - lastIncludedCharIndex--; - } while (lastIncludedCharIndex > linkBeginIndex); - // Handle links enclosed in parens, square brackets and curlys. - if (linkBeginIndex > 0) { - const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1); - const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex); - if ((charCodeBeforeLink === 40 /* OpenParen */ && lastCharCodeInLink === 41 /* CloseParen */) - || (charCodeBeforeLink === 91 /* OpenSquareBracket */ && lastCharCodeInLink === 93 /* CloseSquareBracket */) - || (charCodeBeforeLink === 123 /* OpenCurlyBrace */ && lastCharCodeInLink === 125 /* CloseCurlyBrace */)) { - // Do not end in ) if ( is before the link start - // Do not end in ] if [ is before the link start - // Do not end in } if { is before the link start - lastIncludedCharIndex--; - } - } - return { - range: { - startLineNumber: lineNumber, - startColumn: linkBeginIndex + 1, - endLineNumber: lineNumber, - endColumn: lastIncludedCharIndex + 2 - }, - url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1) - }; - } - static computeLinks(model, stateMachine = getStateMachine()) { - const classifier = getClassifier(); - let result = []; - for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) { - const line = model.getLineContent(i); - const len = line.length; - let j = 0; - let linkBeginIndex = 0; - let linkBeginChCode = 0; - let state = 1 /* Start */; - let hasOpenParens = false; - let hasOpenSquareBracket = false; - let inSquareBrackets = false; - let hasOpenCurlyBracket = false; - while (j < len) { - let resetStateMachine = false; - const chCode = line.charCodeAt(j); - if (state === 13 /* Accept */) { - let chClass; - switch (chCode) { - case 40 /* OpenParen */: - hasOpenParens = true; - chClass = 0 /* None */; - break; - case 41 /* CloseParen */: - chClass = (hasOpenParens ? 0 /* None */ : 1 /* ForceTermination */); - break; - case 91 /* OpenSquareBracket */: - inSquareBrackets = true; - hasOpenSquareBracket = true; - chClass = 0 /* None */; - break; - case 93 /* CloseSquareBracket */: - inSquareBrackets = false; - chClass = (hasOpenSquareBracket ? 0 /* None */ : 1 /* ForceTermination */); - break; - case 123 /* OpenCurlyBrace */: - hasOpenCurlyBracket = true; - chClass = 0 /* None */; - break; - case 125 /* CloseCurlyBrace */: - chClass = (hasOpenCurlyBracket ? 0 /* None */ : 1 /* ForceTermination */); - break; - /* The following three rules make it that ' or " or ` are allowed inside links if the link began with a different one */ - case 39 /* SingleQuote */: - chClass = (linkBeginChCode === 34 /* DoubleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */; - break; - case 34 /* DoubleQuote */: - chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 96 /* BackTick */) ? 0 /* None */ : 1 /* ForceTermination */; - break; - case 96 /* BackTick */: - chClass = (linkBeginChCode === 39 /* SingleQuote */ || linkBeginChCode === 34 /* DoubleQuote */) ? 0 /* None */ : 1 /* ForceTermination */; - break; - case 42 /* Asterisk */: - // `*` terminates a link if the link began with `*` - chClass = (linkBeginChCode === 42 /* Asterisk */) ? 1 /* ForceTermination */ : 0 /* None */; - break; - case 124 /* Pipe */: - // `|` terminates a link if the link began with `|` - chClass = (linkBeginChCode === 124 /* Pipe */) ? 1 /* ForceTermination */ : 0 /* None */; - break; - case 32 /* Space */: - // ` ` allow space in between [ and ] - chClass = (inSquareBrackets ? 0 /* None */ : 1 /* ForceTermination */); - break; - default: - chClass = classifier.get(chCode); - } - // Check if character terminates link - if (chClass === 1 /* ForceTermination */) { - result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, j)); - resetStateMachine = true; - } - } - else if (state === 12 /* End */) { - let chClass; - if (chCode === 91 /* OpenSquareBracket */) { - // Allow for the authority part to contain ipv6 addresses which contain [ and ] - hasOpenSquareBracket = true; - chClass = 0 /* None */; - } - else { - chClass = classifier.get(chCode); - } - // Check if character terminates link - if (chClass === 1 /* ForceTermination */) { - resetStateMachine = true; - } - else { - state = 13 /* Accept */; - } - } - else { - state = stateMachine.nextState(state, chCode); - if (state === 0 /* Invalid */) { - resetStateMachine = true; - } - } - if (resetStateMachine) { - state = 1 /* Start */; - hasOpenParens = false; - hasOpenSquareBracket = false; - hasOpenCurlyBracket = false; - // Record where the link started - linkBeginIndex = j + 1; - linkBeginChCode = chCode; - } - j++; - } - if (state === 13 /* Accept */) { - result.push(LinkComputer._createLink(classifier, line, i, linkBeginIndex, len)); - } - } - return result; - } -} -/** - * Returns an array of all links contains in the provided - * document. *Note* that this operation is computational - * expensive and should not run in the UI thread. - */ -function computeLinks(model) { - if (!model || typeof model.getLineCount !== 'function' || typeof model.getLineContent !== 'function') { - // Unknown caller! - return []; - } - return LinkComputer.computeLinks(model); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js ***! - \********************************************************************************/ -/*! exports provided: Extensions, EditorModesRegistry, ModesRegistry, PLAINTEXT_MODE_ID, PLAINTEXT_LANGUAGE_IDENTIFIER */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorModesRegistry", function() { return EditorModesRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModesRegistry", function() { return ModesRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLAINTEXT_MODE_ID", function() { return PLAINTEXT_MODE_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLAINTEXT_LANGUAGE_IDENTIFIER", function() { return PLAINTEXT_LANGUAGE_IDENTIFIER; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -// Define extension point ids -const Extensions = { - ModesRegistry: 'editor.modesRegistry' -}; -class EditorModesRegistry { - constructor() { - this._onDidChangeLanguages = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this.onDidChangeLanguages = this._onDidChangeLanguages.event; - this._languages = []; - this._dynamicLanguages = []; - } - // --- languages - registerLanguage(def) { - this._languages.push(def); - this._onDidChangeLanguages.fire(undefined); - return { - dispose: () => { - for (let i = 0, len = this._languages.length; i < len; i++) { - if (this._languages[i] === def) { - this._languages.splice(i, 1); - return; - } - } - } - }; - } - getLanguages() { - return [].concat(this._languages).concat(this._dynamicLanguages); - } -} -const ModesRegistry = new EditorModesRegistry(); -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_4__["Registry"].add(Extensions.ModesRegistry, ModesRegistry); -const PLAINTEXT_MODE_ID = 'plaintext'; -const PLAINTEXT_LANGUAGE_IDENTIFIER = new _modes_js__WEBPACK_IMPORTED_MODULE_2__["LanguageIdentifier"](PLAINTEXT_MODE_ID, 1 /* PlainText */); -ModesRegistry.registerLanguage({ - id: PLAINTEXT_MODE_ID, - extensions: ['.txt'], - aliases: [_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('plainText.alias', "Plain Text"), 'text'], - mimetypes: ['text/plain'] -}); -_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__["LanguageConfigurationRegistry"].register(PLAINTEXT_LANGUAGE_IDENTIFIER, { - brackets: [ - ['(', ')'], - ['[', ']'], - ['{', '}'], - ], - surroundingPairs: [ - { open: '{', close: '}' }, - { open: '[', close: ']' }, - { open: '(', close: ')' }, - { open: '<', close: '>' }, - { open: '\"', close: '\"' }, - { open: '\'', close: '\'' }, - { open: '`', close: '`' }, - ], - folding: { - offSide: true - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js ***! - \***************************************************************************/ -/*! exports provided: NULL_STATE, NULL_MODE_ID, NULL_LANGUAGE_IDENTIFIER, nullTokenize, nullTokenize2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NULL_STATE", function() { return NULL_STATE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NULL_MODE_ID", function() { return NULL_MODE_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NULL_LANGUAGE_IDENTIFIER", function() { return NULL_LANGUAGE_IDENTIFIER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nullTokenize", function() { return nullTokenize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nullTokenize2", function() { return nullTokenize2; }); -/* harmony import */ var _core_token_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/token.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class NullStateImpl { - clone() { - return this; - } - equals(other) { - return (this === other); - } -} -const NULL_STATE = new NullStateImpl(); -const NULL_MODE_ID = 'vs.editor.nullMode'; -const NULL_LANGUAGE_IDENTIFIER = new _modes_js__WEBPACK_IMPORTED_MODULE_1__["LanguageIdentifier"](NULL_MODE_ID, 0 /* Null */); -function nullTokenize(modeId, buffer, state, deltaOffset) { - return new _core_token_js__WEBPACK_IMPORTED_MODULE_0__["TokenizationResult"]([new _core_token_js__WEBPACK_IMPORTED_MODULE_0__["Token"](deltaOffset, '', modeId)], state); -} -function nullTokenize2(languageId, buffer, state, deltaOffset) { - let tokens = new Uint32Array(2); - tokens[0] = deltaOffset; - tokens[1] = ((languageId << 0 /* LANGUAGEID_OFFSET */) - | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */) - | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */) - | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) - | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; - return new _core_token_js__WEBPACK_IMPORTED_MODULE_0__["TokenizationResult2"](tokens, state === null ? NULL_STATE : state); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js ***! - \***************************************************************************/ -/*! exports provided: createScopedLineTokens, ScopedLineTokens, ignoreBracketsInToken */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createScopedLineTokens", function() { return createScopedLineTokens; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScopedLineTokens", function() { return ScopedLineTokens; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreBracketsInToken", function() { return ignoreBracketsInToken; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function createScopedLineTokens(context, offset) { - let tokenCount = context.getCount(); - let tokenIndex = context.findTokenIndexAtOffset(offset); - let desiredLanguageId = context.getLanguageId(tokenIndex); - let lastTokenIndex = tokenIndex; - while (lastTokenIndex + 1 < tokenCount && context.getLanguageId(lastTokenIndex + 1) === desiredLanguageId) { - lastTokenIndex++; - } - let firstTokenIndex = tokenIndex; - while (firstTokenIndex > 0 && context.getLanguageId(firstTokenIndex - 1) === desiredLanguageId) { - firstTokenIndex--; - } - return new ScopedLineTokens(context, desiredLanguageId, firstTokenIndex, lastTokenIndex + 1, context.getStartOffset(firstTokenIndex), context.getEndOffset(lastTokenIndex)); -} -class ScopedLineTokens { - constructor(actual, languageId, firstTokenIndex, lastTokenIndex, firstCharOffset, lastCharOffset) { - this._actual = actual; - this.languageId = languageId; - this._firstTokenIndex = firstTokenIndex; - this._lastTokenIndex = lastTokenIndex; - this.firstCharOffset = firstCharOffset; - this._lastCharOffset = lastCharOffset; - } - getLineContent() { - const actualLineContent = this._actual.getLineContent(); - return actualLineContent.substring(this.firstCharOffset, this._lastCharOffset); - } - getActualLineContentBefore(offset) { - const actualLineContent = this._actual.getLineContent(); - return actualLineContent.substring(0, this.firstCharOffset + offset); - } - getTokenCount() { - return this._lastTokenIndex - this._firstTokenIndex; - } - findTokenIndexAtOffset(offset) { - return this._actual.findTokenIndexAtOffset(offset + this.firstCharOffset) - this._firstTokenIndex; - } - getStandardTokenType(tokenIndex) { - return this._actual.getStandardTokenType(tokenIndex + this._firstTokenIndex); - } -} -function ignoreBracketsInToken(standardTokenType) { - return (standardTokenType & 7 /* value */) !== 0; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/characterPair.js ***! - \*****************************************************************************************/ -/*! exports provided: CharacterPairSupport */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharacterPairSupport", function() { return CharacterPairSupport; }); -/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../languageConfiguration.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class CharacterPairSupport { - constructor(config) { - if (config.autoClosingPairs) { - this._autoClosingPairs = config.autoClosingPairs.map(el => new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__["StandardAutoClosingPairConditional"](el)); - } - else if (config.brackets) { - this._autoClosingPairs = config.brackets.map(b => new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__["StandardAutoClosingPairConditional"]({ open: b[0], close: b[1] })); - } - else { - this._autoClosingPairs = []; - } - if (config.__electricCharacterSupport && config.__electricCharacterSupport.docComment) { - const docComment = config.__electricCharacterSupport.docComment; - // IDocComment is legacy, only partially supported - this._autoClosingPairs.push(new _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_0__["StandardAutoClosingPairConditional"]({ open: docComment.open, close: docComment.close || '' })); - } - this._autoCloseBefore = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED; - this._surroundingPairs = config.surroundingPairs || this._autoClosingPairs; - } - getAutoClosingPairs() { - return this._autoClosingPairs; - } - getAutoCloseBeforeSet() { - return this._autoCloseBefore; - } - static shouldAutoClosePair(autoClosingPair, context, column) { - // Always complete on empty line - if (context.getTokenCount() === 0) { - return true; - } - const tokenIndex = context.findTokenIndexAtOffset(column - 2); - const standardTokenType = context.getStandardTokenType(tokenIndex); - return autoClosingPair.isOK(standardTokenType); - } - getSurroundingPairs() { - return this._surroundingPairs; - } -} -CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED = ';:.,=}])> \n\t'; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/electricCharacter.js ***! - \*********************************************************************************************/ -/*! exports provided: BracketElectricCharacterSupport */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BracketElectricCharacterSupport", function() { return BracketElectricCharacterSupport; }); -/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../supports.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js"); -/* harmony import */ var _richEditBrackets_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./richEditBrackets.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class BracketElectricCharacterSupport { - constructor(richEditBrackets) { - this._richEditBrackets = richEditBrackets; - } - getElectricCharacters() { - let result = []; - if (this._richEditBrackets) { - for (const bracket of this._richEditBrackets.brackets) { - for (const close of bracket.close) { - const lastChar = close.charAt(close.length - 1); - result.push(lastChar); - } - } - } - // Filter duplicate entries - result = result.filter((item, pos, array) => { - return array.indexOf(item) === pos; - }); - return result; - } - onElectricCharacter(character, context, column) { - if (!this._richEditBrackets || this._richEditBrackets.brackets.length === 0) { - return null; - } - const tokenIndex = context.findTokenIndexAtOffset(column - 1); - if (Object(_supports_js__WEBPACK_IMPORTED_MODULE_0__["ignoreBracketsInToken"])(context.getStandardTokenType(tokenIndex))) { - return null; - } - const reversedBracketRegex = this._richEditBrackets.reversedRegex; - const text = context.getLineContent().substring(0, column - 1) + character; - const r = _richEditBrackets_js__WEBPACK_IMPORTED_MODULE_1__["BracketsUtils"].findPrevBracketInRange(reversedBracketRegex, 1, text, 0, text.length); - if (!r) { - return null; - } - const bracketText = text.substring(r.startColumn - 1, r.endColumn - 1).toLowerCase(); - const isOpen = this._richEditBrackets.textIsOpenBracket[bracketText]; - if (isOpen) { - return null; - } - const textBeforeBracket = context.getActualLineContentBefore(r.startColumn - 1); - if (!/^\s*$/.test(textBeforeBracket)) { - // There is other text on the line before the bracket - return null; - } - return { - matchOpenBracket: bracketText - }; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/indentRules.js ***! - \***************************************************************************************/ -/*! exports provided: IndentRulesSupport */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentRulesSupport", function() { return IndentRulesSupport; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class IndentRulesSupport { - constructor(indentationRules) { - this._indentationRules = indentationRules; - } - shouldIncrease(text) { - if (this._indentationRules) { - if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(text)) { - return true; - } - // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { - // return true; - // } - } - return false; - } - shouldDecrease(text) { - if (this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) { - return true; - } - return false; - } - shouldIndentNextLine(text) { - if (this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { - return true; - } - return false; - } - shouldIgnore(text) { - // the text matches `unIndentedLinePattern` - if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { - return true; - } - return false; - } - getIndentMetadata(text) { - let ret = 0; - if (this.shouldIncrease(text)) { - ret += 1 /* INCREASE_MASK */; - } - if (this.shouldDecrease(text)) { - ret += 2 /* DECREASE_MASK */; - } - if (this.shouldIndentNextLine(text)) { - ret += 4 /* INDENT_NEXTLINE_MASK */; - } - if (this.shouldIgnore(text)) { - ret += 8 /* UNINDENT_MASK */; - } - return ret; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js ***! - \*************************************************************************************************/ -/*! exports provided: BasicInplaceReplace */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BasicInplaceReplace", function() { return BasicInplaceReplace; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class BasicInplaceReplace { - constructor() { - this._defaultValueSet = [ - ['true', 'false'], - ['True', 'False'], - ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'], - ['public', 'protected', 'private'], - ]; - } - navigateValueSet(range1, text1, range2, text2, up) { - if (range1 && text1) { - let result = this.doNavigateValueSet(text1, up); - if (result) { - return { - range: range1, - value: result - }; - } - } - if (range2 && text2) { - let result = this.doNavigateValueSet(text2, up); - if (result) { - return { - range: range2, - value: result - }; - } - } - return null; - } - doNavigateValueSet(text, up) { - let numberResult = this.numberReplace(text, up); - if (numberResult !== null) { - return numberResult; - } - return this.textReplace(text, up); - } - numberReplace(value, up) { - let precision = Math.pow(10, value.length - (value.lastIndexOf('.') + 1)); - let n1 = Number(value); - let n2 = parseFloat(value); - if (!isNaN(n1) && !isNaN(n2) && n1 === n2) { - if (n1 === 0 && !up) { - return null; // don't do negative - // } else if(n1 === 9 && up) { - // return null; // don't insert 10 into a number - } - else { - n1 = Math.floor(n1 * precision); - n1 += up ? precision : -precision; - return String(n1 / precision); - } - } - return null; - } - textReplace(value, up) { - return this.valueSetsReplace(this._defaultValueSet, value, up); - } - valueSetsReplace(valueSets, value, up) { - let result = null; - for (let i = 0, len = valueSets.length; result === null && i < len; i++) { - result = this.valueSetReplace(valueSets[i], value, up); - } - return result; - } - valueSetReplace(valueSet, value, up) { - let idx = valueSet.indexOf(value); - if (idx >= 0) { - idx += up ? +1 : -1; - if (idx < 0) { - idx = valueSet.length - 1; - } - else { - idx %= valueSet.length; - } - return valueSet[idx]; - } - return null; - } -} -BasicInplaceReplace.INSTANCE = new BasicInplaceReplace(); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/onEnter.js ***! - \***********************************************************************************/ -/*! exports provided: OnEnterSupport */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnEnterSupport", function() { return OnEnterSupport; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../languageConfiguration.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class OnEnterSupport { - constructor(opts) { - opts = opts || {}; - opts.brackets = opts.brackets || [ - ['(', ')'], - ['{', '}'], - ['[', ']'] - ]; - this._brackets = []; - opts.brackets.forEach((bracket) => { - const openRegExp = OnEnterSupport._createOpenBracketRegExp(bracket[0]); - const closeRegExp = OnEnterSupport._createCloseBracketRegExp(bracket[1]); - if (openRegExp && closeRegExp) { - this._brackets.push({ - open: bracket[0], - openRegExp: openRegExp, - close: bracket[1], - closeRegExp: closeRegExp, - }); - } - }); - this._regExpRules = opts.onEnterRules || []; - } - onEnter(autoIndent, oneLineAboveText, beforeEnterText, afterEnterText) { - // (1): `regExpRules` - if (autoIndent >= 3 /* Advanced */) { - for (let i = 0, len = this._regExpRules.length; i < len; i++) { - let rule = this._regExpRules[i]; - const regResult = [{ - reg: rule.beforeText, - text: beforeEnterText - }, { - reg: rule.afterText, - text: afterEnterText - }, { - reg: rule.oneLineAboveText, - text: oneLineAboveText - }].every((obj) => { - return obj.reg ? obj.reg.test(obj.text) : true; - }); - if (regResult) { - return rule.action; - } - } - } - // (2): Special indent-outdent - if (autoIndent >= 2 /* Brackets */) { - if (beforeEnterText.length > 0 && afterEnterText.length > 0) { - for (let i = 0, len = this._brackets.length; i < len; i++) { - let bracket = this._brackets[i]; - if (bracket.openRegExp.test(beforeEnterText) && bracket.closeRegExp.test(afterEnterText)) { - return { indentAction: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__["IndentAction"].IndentOutdent }; - } - } - } - } - // (4): Open bracket based logic - if (autoIndent >= 2 /* Brackets */) { - if (beforeEnterText.length > 0) { - for (let i = 0, len = this._brackets.length; i < len; i++) { - let bracket = this._brackets[i]; - if (bracket.openRegExp.test(beforeEnterText)) { - return { indentAction: _languageConfiguration_js__WEBPACK_IMPORTED_MODULE_2__["IndentAction"].Indent }; - } - } - } - } - return null; - } - static _createOpenBracketRegExp(bracket) { - let str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["escapeRegExpCharacters"](bracket); - if (!/\B/.test(str.charAt(0))) { - str = '\\b' + str; - } - str += '\\s*$'; - return OnEnterSupport._safeRegExp(str); - } - static _createCloseBracketRegExp(bracket) { - let str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["escapeRegExpCharacters"](bracket); - if (!/\B/.test(str.charAt(str.length - 1))) { - str = str + '\\b'; - } - str = '^\\s*' + str; - return OnEnterSupport._safeRegExp(str); - } - static _safeRegExp(def) { - try { - return new RegExp(def); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(err); - return null; - } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js ***! - \********************************************************************************************/ -/*! exports provided: RichEditBracket, RichEditBrackets, BracketsUtils */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichEditBracket", function() { return RichEditBracket; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RichEditBrackets", function() { return RichEditBrackets; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BracketsUtils", function() { return BracketsUtils; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class RichEditBracket { - constructor(languageIdentifier, index, open, close, forwardRegex, reversedRegex) { - this.languageIdentifier = languageIdentifier; - this.index = index; - this.open = open; - this.close = close; - this.forwardRegex = forwardRegex; - this.reversedRegex = reversedRegex; - this._openSet = RichEditBracket._toSet(this.open); - this._closeSet = RichEditBracket._toSet(this.close); - } - isOpen(text) { - return this._openSet.has(text); - } - isClose(text) { - return this._closeSet.has(text); - } - static _toSet(arr) { - const result = new Set(); - for (const element of arr) { - result.add(element); - } - return result; - } -} -function groupFuzzyBrackets(brackets) { - const N = brackets.length; - brackets = brackets.map(b => [b[0].toLowerCase(), b[1].toLowerCase()]); - const group = []; - for (let i = 0; i < N; i++) { - group[i] = i; - } - const areOverlapping = (a, b) => { - const [aOpen, aClose] = a; - const [bOpen, bClose] = b; - return (aOpen === bOpen || aOpen === bClose || aClose === bOpen || aClose === bClose); - }; - const mergeGroups = (g1, g2) => { - const newG = Math.min(g1, g2); - const oldG = Math.max(g1, g2); - for (let i = 0; i < N; i++) { - if (group[i] === oldG) { - group[i] = newG; - } - } - }; - // group together brackets that have the same open or the same close sequence - for (let i = 0; i < N; i++) { - const a = brackets[i]; - for (let j = i + 1; j < N; j++) { - const b = brackets[j]; - if (areOverlapping(a, b)) { - mergeGroups(group[i], group[j]); - } - } - } - const result = []; - for (let g = 0; g < N; g++) { - let currentOpen = []; - let currentClose = []; - for (let i = 0; i < N; i++) { - if (group[i] === g) { - const [open, close] = brackets[i]; - currentOpen.push(open); - currentClose.push(close); - } - } - if (currentOpen.length > 0) { - result.push({ - open: currentOpen, - close: currentClose - }); - } - } - return result; -} -class RichEditBrackets { - constructor(languageIdentifier, _brackets) { - const brackets = groupFuzzyBrackets(_brackets); - this.brackets = brackets.map((b, index) => { - return new RichEditBracket(languageIdentifier, index, b.open, b.close, getRegexForBracketPair(b.open, b.close, brackets, index), getReversedRegexForBracketPair(b.open, b.close, brackets, index)); - }); - this.forwardRegex = getRegexForBrackets(this.brackets); - this.reversedRegex = getReversedRegexForBrackets(this.brackets); - this.textIsBracket = {}; - this.textIsOpenBracket = {}; - this.maxBracketLength = 0; - for (const bracket of this.brackets) { - for (const open of bracket.open) { - this.textIsBracket[open] = bracket; - this.textIsOpenBracket[open] = true; - this.maxBracketLength = Math.max(this.maxBracketLength, open.length); - } - for (const close of bracket.close) { - this.textIsBracket[close] = bracket; - this.textIsOpenBracket[close] = false; - this.maxBracketLength = Math.max(this.maxBracketLength, close.length); - } - } - } -} -function collectSuperstrings(str, brackets, currentIndex, dest) { - for (let i = 0, len = brackets.length; i < len; i++) { - if (i === currentIndex) { - continue; - } - const bracket = brackets[i]; - for (const open of bracket.open) { - if (open.indexOf(str) >= 0) { - dest.push(open); - } - } - for (const close of bracket.close) { - if (close.indexOf(str) >= 0) { - dest.push(close); - } - } - } -} -function lengthcmp(a, b) { - return a.length - b.length; -} -function unique(arr) { - if (arr.length <= 1) { - return arr; - } - const result = []; - const seen = new Set(); - for (const element of arr) { - if (seen.has(element)) { - continue; - } - result.push(element); - seen.add(element); - } - return result; -} -function getRegexForBracketPair(open, close, brackets, currentIndex) { - // search in all brackets for other brackets that are a superstring of these brackets - let pieces = []; - pieces = pieces.concat(open); - pieces = pieces.concat(close); - for (let i = 0, len = pieces.length; i < len; i++) { - collectSuperstrings(pieces[i], brackets, currentIndex, pieces); - } - pieces = unique(pieces); - pieces.sort(lengthcmp); - pieces.reverse(); - return createBracketOrRegExp(pieces); -} -function getReversedRegexForBracketPair(open, close, brackets, currentIndex) { - // search in all brackets for other brackets that are a superstring of these brackets - let pieces = []; - pieces = pieces.concat(open); - pieces = pieces.concat(close); - for (let i = 0, len = pieces.length; i < len; i++) { - collectSuperstrings(pieces[i], brackets, currentIndex, pieces); - } - pieces = unique(pieces); - pieces.sort(lengthcmp); - pieces.reverse(); - return createBracketOrRegExp(pieces.map(toReversedString)); -} -function getRegexForBrackets(brackets) { - let pieces = []; - for (const bracket of brackets) { - for (const open of bracket.open) { - pieces.push(open); - } - for (const close of bracket.close) { - pieces.push(close); - } - } - pieces = unique(pieces); - return createBracketOrRegExp(pieces); -} -function getReversedRegexForBrackets(brackets) { - let pieces = []; - for (const bracket of brackets) { - for (const open of bracket.open) { - pieces.push(open); - } - for (const close of bracket.close) { - pieces.push(close); - } - } - pieces = unique(pieces); - return createBracketOrRegExp(pieces.map(toReversedString)); -} -function prepareBracketForRegExp(str) { - // This bracket pair uses letters like e.g. "begin" - "end" - const insertWordBoundaries = (/^[\w ]+$/.test(str)); - str = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["escapeRegExpCharacters"](str); - return (insertWordBoundaries ? `\\b${str}\\b` : str); -} -function createBracketOrRegExp(pieces) { - let regexStr = `(${pieces.map(prepareBracketForRegExp).join(')|(')})`; - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["createRegExp"](regexStr, true); -} -const toReversedString = (function () { - function reverse(str) { - if (_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["hasTextDecoder"]) { - // create a Uint16Array and then use a TextDecoder to create a string - const arr = new Uint16Array(str.length); - let offset = 0; - for (let i = str.length - 1; i >= 0; i--) { - arr[offset++] = str.charCodeAt(i); - } - return _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["getPlatformTextDecoder"]().decode(arr); - } - else { - let result = [], resultLen = 0; - for (let i = str.length - 1; i >= 0; i--) { - result[resultLen++] = str.charAt(i); - } - return result.join(''); - } - } - let lastInput = null; - let lastOutput = null; - return function toReversedString(str) { - if (lastInput !== str) { - lastInput = str; - lastOutput = reverse(lastInput); - } - return lastOutput; - }; -})(); -class BracketsUtils { - static _findPrevBracketInText(reversedBracketRegex, lineNumber, reversedText, offset) { - let m = reversedText.match(reversedBracketRegex); - if (!m) { - return null; - } - let matchOffset = reversedText.length - (m.index || 0); - let matchLength = m[0].length; - let absoluteMatchOffset = offset + matchOffset; - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, absoluteMatchOffset - matchLength + 1, lineNumber, absoluteMatchOffset + 1); - } - static findPrevBracketInRange(reversedBracketRegex, lineNumber, lineText, startOffset, endOffset) { - // Because JS does not support backwards regex search, we search forwards in a reversed string with a reversed regex ;) - const reversedLineText = toReversedString(lineText); - const reversedSubstr = reversedLineText.substring(lineText.length - endOffset, lineText.length - startOffset); - return this._findPrevBracketInText(reversedBracketRegex, lineNumber, reversedSubstr, startOffset); - } - static findNextBracketInText(bracketRegex, lineNumber, text, offset) { - let m = text.match(bracketRegex); - if (!m) { - return null; - } - let matchOffset = m.index || 0; - let matchLength = m[0].length; - if (matchLength === 0) { - return null; - } - let absoluteMatchOffset = offset + matchOffset; - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, absoluteMatchOffset + 1, lineNumber, absoluteMatchOffset + 1 + matchLength); - } - static findNextBracketInRange(bracketRegex, lineNumber, lineText, startOffset, endOffset) { - const substr = lineText.substring(startOffset, endOffset); - return this.findNextBracketInText(bracketRegex, lineNumber, substr, startOffset); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js ***! - \****************************************************************************************/ -/*! exports provided: ParsedTokenThemeRule, parseTokenTheme, ColorMap, TokenTheme, toStandardTokenType, strcmp, ThemeTrieElementRule, ThemeTrieElement, generateTokensCSSForColorMap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParsedTokenThemeRule", function() { return ParsedTokenThemeRule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseTokenTheme", function() { return parseTokenTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorMap", function() { return ColorMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenTheme", function() { return TokenTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStandardTokenType", function() { return toStandardTokenType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "strcmp", function() { return strcmp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThemeTrieElementRule", function() { return ThemeTrieElementRule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThemeTrieElement", function() { return ThemeTrieElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateTokensCSSForColorMap", function() { return generateTokensCSSForColorMap; }); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class ParsedTokenThemeRule { - constructor(token, index, fontStyle, foreground, background) { - this.token = token; - this.index = index; - this.fontStyle = fontStyle; - this.foreground = foreground; - this.background = background; - } -} -/** - * Parse a raw theme into rules. - */ -function parseTokenTheme(source) { - if (!source || !Array.isArray(source)) { - return []; - } - let result = [], resultLen = 0; - for (let i = 0, len = source.length; i < len; i++) { - let entry = source[i]; - let fontStyle = -1 /* NotSet */; - if (typeof entry.fontStyle === 'string') { - fontStyle = 0 /* None */; - let segments = entry.fontStyle.split(' '); - for (let j = 0, lenJ = segments.length; j < lenJ; j++) { - let segment = segments[j]; - switch (segment) { - case 'italic': - fontStyle = fontStyle | 1 /* Italic */; - break; - case 'bold': - fontStyle = fontStyle | 2 /* Bold */; - break; - case 'underline': - fontStyle = fontStyle | 4 /* Underline */; - break; - } - } - } - let foreground = null; - if (typeof entry.foreground === 'string') { - foreground = entry.foreground; - } - let background = null; - if (typeof entry.background === 'string') { - background = entry.background; - } - result[resultLen++] = new ParsedTokenThemeRule(entry.token || '', i, fontStyle, foreground, background); - } - return result; -} -/** - * Resolve rules (i.e. inheritance). - */ -function resolveParsedTokenThemeRules(parsedThemeRules, customTokenColors) { - // Sort rules lexicographically, and then by index if necessary - parsedThemeRules.sort((a, b) => { - let r = strcmp(a.token, b.token); - if (r !== 0) { - return r; - } - return a.index - b.index; - }); - // Determine defaults - let defaultFontStyle = 0 /* None */; - let defaultForeground = '000000'; - let defaultBackground = 'ffffff'; - while (parsedThemeRules.length >= 1 && parsedThemeRules[0].token === '') { - let incomingDefaults = parsedThemeRules.shift(); - if (incomingDefaults.fontStyle !== -1 /* NotSet */) { - defaultFontStyle = incomingDefaults.fontStyle; - } - if (incomingDefaults.foreground !== null) { - defaultForeground = incomingDefaults.foreground; - } - if (incomingDefaults.background !== null) { - defaultBackground = incomingDefaults.background; - } - } - let colorMap = new ColorMap(); - // start with token colors from custom token themes - for (let color of customTokenColors) { - colorMap.getId(color); - } - let foregroundColorId = colorMap.getId(defaultForeground); - let backgroundColorId = colorMap.getId(defaultBackground); - let defaults = new ThemeTrieElementRule(defaultFontStyle, foregroundColorId, backgroundColorId); - let root = new ThemeTrieElement(defaults); - for (let i = 0, len = parsedThemeRules.length; i < len; i++) { - let rule = parsedThemeRules[i]; - root.insert(rule.token, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background)); - } - return new TokenTheme(colorMap, root); -} -const colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/; -class ColorMap { - constructor() { - this._lastColorId = 0; - this._id2color = []; - this._color2id = new Map(); - } - getId(color) { - if (color === null) { - return 0; - } - const match = color.match(colorRegExp); - if (!match) { - throw new Error('Illegal value for token color: ' + color); - } - color = match[1].toUpperCase(); - let value = this._color2id.get(color); - if (value) { - return value; - } - value = ++this._lastColorId; - this._color2id.set(color, value); - this._id2color[value] = _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__["Color"].fromHex('#' + color); - return value; - } - getColorMap() { - return this._id2color.slice(0); - } -} -class TokenTheme { - constructor(colorMap, root) { - this._colorMap = colorMap; - this._root = root; - this._cache = new Map(); - } - static createFromRawTokenTheme(source, customTokenColors) { - return this.createFromParsedTokenTheme(parseTokenTheme(source), customTokenColors); - } - static createFromParsedTokenTheme(source, customTokenColors) { - return resolveParsedTokenThemeRules(source, customTokenColors); - } - getColorMap() { - return this._colorMap.getColorMap(); - } - _match(token) { - return this._root.match(token); - } - match(languageId, token) { - // The cache contains the metadata without the language bits set. - let result = this._cache.get(token); - if (typeof result === 'undefined') { - let rule = this._match(token); - let standardToken = toStandardTokenType(token); - result = (rule.metadata - | (standardToken << 8 /* TOKEN_TYPE_OFFSET */)) >>> 0; - this._cache.set(token, result); - } - return (result - | (languageId << 0 /* LANGUAGEID_OFFSET */)) >>> 0; - } -} -const STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|regexp)\b/; -function toStandardTokenType(tokenType) { - let m = tokenType.match(STANDARD_TOKEN_TYPE_REGEXP); - if (!m) { - return 0 /* Other */; - } - switch (m[1]) { - case 'comment': - return 1 /* Comment */; - case 'string': - return 2 /* String */; - case 'regex': - return 4 /* RegEx */; - case 'regexp': - return 4 /* RegEx */; - } - throw new Error('Unexpected match for standard token type!'); -} -function strcmp(a, b) { - if (a < b) { - return -1; - } - if (a > b) { - return 1; - } - return 0; -} -class ThemeTrieElementRule { - constructor(fontStyle, foreground, background) { - this._fontStyle = fontStyle; - this._foreground = foreground; - this._background = background; - this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */) - | (this._foreground << 14 /* FOREGROUND_OFFSET */) - | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0; - } - clone() { - return new ThemeTrieElementRule(this._fontStyle, this._foreground, this._background); - } - acceptOverwrite(fontStyle, foreground, background) { - if (fontStyle !== -1 /* NotSet */) { - this._fontStyle = fontStyle; - } - if (foreground !== 0 /* None */) { - this._foreground = foreground; - } - if (background !== 0 /* None */) { - this._background = background; - } - this.metadata = ((this._fontStyle << 11 /* FONT_STYLE_OFFSET */) - | (this._foreground << 14 /* FOREGROUND_OFFSET */) - | (this._background << 23 /* BACKGROUND_OFFSET */)) >>> 0; - } -} -class ThemeTrieElement { - constructor(mainRule) { - this._mainRule = mainRule; - this._children = new Map(); - } - match(token) { - if (token === '') { - return this._mainRule; - } - let dotIndex = token.indexOf('.'); - let head; - let tail; - if (dotIndex === -1) { - head = token; - tail = ''; - } - else { - head = token.substring(0, dotIndex); - tail = token.substring(dotIndex + 1); - } - let child = this._children.get(head); - if (typeof child !== 'undefined') { - return child.match(tail); - } - return this._mainRule; - } - insert(token, fontStyle, foreground, background) { - if (token === '') { - // Merge into the main rule - this._mainRule.acceptOverwrite(fontStyle, foreground, background); - return; - } - let dotIndex = token.indexOf('.'); - let head; - let tail; - if (dotIndex === -1) { - head = token; - tail = ''; - } - else { - head = token.substring(0, dotIndex); - tail = token.substring(dotIndex + 1); - } - let child = this._children.get(head); - if (typeof child === 'undefined') { - child = new ThemeTrieElement(this._mainRule.clone()); - this._children.set(head, child); - } - child.insert(tail, fontStyle, foreground, background); - } -} -function generateTokensCSSForColorMap(colorMap) { - let rules = []; - for (let i = 1, len = colorMap.length; i < len; i++) { - let color = colorMap[i]; - rules[i] = `.mtk${i} { color: ${color}; }`; - } - rules.push('.mtki { font-style: italic; }'); - rules.push('.mtkb { font-weight: bold; }'); - rules.push('.mtku { text-decoration: underline; text-underline-position: under; }'); - return rules.join('\n'); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js ***! - \**************************************************************************************/ -/*! exports provided: tokenizeToString, tokenizeLineToHTML */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenizeToString", function() { return tokenizeToString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenizeLineToHTML", function() { return tokenizeLineToHTML; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/lineTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js"); -/* harmony import */ var _nullMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const fallback = { - getInitialState: () => _nullMode_js__WEBPACK_IMPORTED_MODULE_2__["NULL_STATE"], - tokenize2: (buffer, state, deltaOffset) => Object(_nullMode_js__WEBPACK_IMPORTED_MODULE_2__["nullTokenize2"])(0 /* Null */, buffer, state, deltaOffset) -}; -function tokenizeToString(text, tokenizationSupport = fallback) { - return _tokenizeToString(text, tokenizationSupport || fallback); -} -function tokenizeLineToHTML(text, viewLineTokens, colorMap, startOffset, endOffset, tabSize, useNbsp) { - let result = `
    `; - let charIndex = startOffset; - let tabsCharDelta = 0; - for (let tokenIndex = 0, tokenCount = viewLineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) { - const tokenEndIndex = viewLineTokens.getEndOffset(tokenIndex); - if (tokenEndIndex <= startOffset) { - continue; - } - let partContent = ''; - for (; charIndex < tokenEndIndex && charIndex < endOffset; charIndex++) { - const charCode = text.charCodeAt(charIndex); - switch (charCode) { - case 9 /* Tab */: - let insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize; - tabsCharDelta += insertSpacesCount - 1; - while (insertSpacesCount > 0) { - partContent += useNbsp ? ' ' : ' '; - insertSpacesCount--; - } - break; - case 60 /* LessThan */: - partContent += '<'; - break; - case 62 /* GreaterThan */: - partContent += '>'; - break; - case 38 /* Ampersand */: - partContent += '&'; - break; - case 0 /* Null */: - partContent += '�'; - break; - case 65279 /* UTF8_BOM */: - case 8232 /* LINE_SEPARATOR */: - case 8233 /* PARAGRAPH_SEPARATOR */: - case 133 /* NEXT_LINE */: - partContent += '\ufffd'; - break; - case 13 /* CarriageReturn */: - // zero width space, because carriage return would introduce a line break - partContent += '​'; - break; - case 32 /* Space */: - partContent += useNbsp ? ' ' : ' '; - break; - default: - partContent += String.fromCharCode(charCode); - } - } - result += `${partContent}`; - if (tokenEndIndex > endOffset || charIndex >= endOffset) { - break; - } - } - result += `
    `; - return result; -} -function _tokenizeToString(text, tokenizationSupport) { - let result = `
    `; - let lines = text.split(/\r\n|\r|\n/); - let currentState = tokenizationSupport.getInitialState(); - for (let i = 0, len = lines.length; i < len; i++) { - let line = lines[i]; - if (i > 0) { - result += `
    `; - } - let tokenizationResult = tokenizationSupport.tokenize2(line, currentState, 0); - _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"].convertToEndOffset(tokenizationResult.tokens, line.length); - let lineTokens = new _core_lineTokens_js__WEBPACK_IMPORTED_MODULE_1__["LineTokens"](tokenizationResult.tokens, line); - let viewLineTokens = lineTokens.inflate(); - let startOffset = 0; - for (let j = 0, lenJ = viewLineTokens.getCount(); j < lenJ; j++) { - const type = viewLineTokens.getClassName(j); - const endIndex = viewLineTokens.getEndOffset(j); - result += `${_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["escape"](line.substring(startOffset, endIndex))}`; - startOffset = endIndex; - } - currentState = tokenizationResult.endState; - } - result += `
    `; - return result; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/modes/tokenizationRegistry.js ***! - \***************************************************************************************/ -/*! exports provided: TokenizationRegistryImpl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationRegistryImpl", function() { return TokenizationRegistryImpl; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class TokenizationRegistryImpl { - constructor() { - this._map = new Map(); - this._promises = new Map(); - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._colorMap = null; - } - fire(languages) { - this._onDidChange.fire({ - changedLanguages: languages, - changedColorMap: false - }); - } - register(language, support) { - this._map.set(language, support); - this.fire([language]); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - if (this._map.get(language) !== support) { - return; - } - this._map.delete(language); - this.fire([language]); - }); - } - registerPromise(language, supportPromise) { - let registration = null; - let isDisposed = false; - this._promises.set(language, supportPromise.then(support => { - this._promises.delete(language); - if (isDisposed || !support) { - return; - } - registration = this.register(language, support); - })); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - isDisposed = true; - if (registration) { - registration.dispose(); - } - }); - } - getPromise(language) { - const support = this.get(language); - if (support) { - return Promise.resolve(support); - } - const promise = this._promises.get(language); - if (promise) { - return promise.then(_ => this.get(language)); - } - return null; - } - get(language) { - return (this._map.get(language) || null); - } - setColorMap(colorMap) { - this._colorMap = colorMap; - this._onDidChange.fire({ - changedLanguages: Array.from(this._map.keys()), - changedColorMap: true - }); - } - getColorMap() { - return this._colorMap; - } - getDefaultBackground() { - if (this._colorMap && this._colorMap.length > 2 /* DefaultBackground */) { - return this._colorMap[2 /* DefaultBackground */]; - } - return null; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js ***! - \****************************************************************************************/ -/*! exports provided: EditorSimpleWorker, create */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorSimpleWorker", function() { return EditorSimpleWorker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/diff/diff.js */ "./node_modules/monaco-editor/esm/vs/base/common/diff/diff.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _diff_diffComputer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../diff/diffComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/diff/diffComputer.js"); -/* harmony import */ var _model_mirrorTextModel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../model/mirrorTextModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js"); -/* harmony import */ var _model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../model/wordHelper.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js"); -/* harmony import */ var _modes_linkComputer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../modes/linkComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/linkComputer.js"); -/* harmony import */ var _modes_supports_inplaceReplaceSupport_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../modes/supports/inplaceReplaceSupport.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/inplaceReplaceSupport.js"); -/* harmony import */ var _standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../standalone/standaloneBase.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - -/** - * @internal - */ -class MirrorModel extends _model_mirrorTextModel_js__WEBPACK_IMPORTED_MODULE_7__["MirrorTextModel"] { - get uri() { - return this._uri; - } - get version() { - return this._versionId; - } - get eol() { - return this._eol; - } - getValue() { - return this.getText(); - } - getLinesContent() { - return this._lines.slice(0); - } - getLineCount() { - return this._lines.length; - } - getLineContent(lineNumber) { - return this._lines[lineNumber - 1]; - } - getWordAtPosition(position, wordDefinition) { - let wordAtText = Object(_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__["getWordAtText"])(position.column, Object(_model_wordHelper_js__WEBPACK_IMPORTED_MODULE_8__["ensureValidWordDefinition"])(wordDefinition), this._lines[position.lineNumber - 1], 0); - if (wordAtText) { - return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn); - } - return null; - } - words(wordDefinition) { - const lines = this._lines; - const wordenize = this._wordenize.bind(this); - let lineNumber = 0; - let lineText = ''; - let wordRangesIdx = 0; - let wordRanges = []; - return { - *[Symbol.iterator]() { - while (true) { - if (wordRangesIdx < wordRanges.length) { - const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end); - wordRangesIdx += 1; - yield value; - } - else { - if (lineNumber < lines.length) { - lineText = lines[lineNumber]; - wordRanges = wordenize(lineText, wordDefinition); - wordRangesIdx = 0; - lineNumber += 1; - } - else { - break; - } - } - } - } - }; - } - getLineWords(lineNumber, wordDefinition) { - let content = this._lines[lineNumber - 1]; - let ranges = this._wordenize(content, wordDefinition); - let words = []; - for (const range of ranges) { - words.push({ - word: content.substring(range.start, range.end), - startColumn: range.start + 1, - endColumn: range.end + 1 - }); - } - return words; - } - _wordenize(content, wordDefinition) { - const result = []; - let match; - wordDefinition.lastIndex = 0; // reset lastIndex just to be sure - while (match = wordDefinition.exec(content)) { - if (match[0].length === 0) { - // it did match the empty string - break; - } - result.push({ start: match.index, end: match.index + match[0].length }); - } - return result; - } - getValueInRange(range) { - range = this._validateRange(range); - if (range.startLineNumber === range.endLineNumber) { - return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); - } - let lineEnding = this._eol; - let startLineIndex = range.startLineNumber - 1; - let endLineIndex = range.endLineNumber - 1; - let resultLines = []; - resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); - for (let i = startLineIndex + 1; i < endLineIndex; i++) { - resultLines.push(this._lines[i]); - } - resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); - return resultLines.join(lineEnding); - } - offsetAt(position) { - position = this._validatePosition(position); - this._ensureLineStarts(); - return this._lineStarts.getAccumulatedValue(position.lineNumber - 2) + (position.column - 1); - } - positionAt(offset) { - offset = Math.floor(offset); - offset = Math.max(0, offset); - this._ensureLineStarts(); - let out = this._lineStarts.getIndexOf(offset); - let lineLength = this._lines[out.index].length; - // Ensure we return a valid position - return { - lineNumber: 1 + out.index, - column: 1 + Math.min(out.remainder, lineLength) - }; - } - _validateRange(range) { - const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn }); - const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn }); - if (start.lineNumber !== range.startLineNumber - || start.column !== range.startColumn - || end.lineNumber !== range.endLineNumber - || end.column !== range.endColumn) { - return { - startLineNumber: start.lineNumber, - startColumn: start.column, - endLineNumber: end.lineNumber, - endColumn: end.column - }; - } - return range; - } - _validatePosition(position) { - if (!_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"].isIPosition(position)) { - throw new Error('bad position'); - } - let { lineNumber, column } = position; - let hasChanged = false; - if (lineNumber < 1) { - lineNumber = 1; - column = 1; - hasChanged = true; - } - else if (lineNumber > this._lines.length) { - lineNumber = this._lines.length; - column = this._lines[lineNumber - 1].length + 1; - hasChanged = true; - } - else { - let maxCharacter = this._lines[lineNumber - 1].length + 1; - if (column < 1) { - column = 1; - hasChanged = true; - } - else if (column > maxCharacter) { - column = maxCharacter; - hasChanged = true; - } - } - if (!hasChanged) { - return position; - } - else { - return { lineNumber, column }; - } - } -} -/** - * @internal - */ -class EditorSimpleWorker { - constructor(host, foreignModuleFactory) { - this._host = host; - this._models = Object.create(null); - this._foreignModuleFactory = foreignModuleFactory; - this._foreignModule = null; - } - dispose() { - this._models = Object.create(null); - } - _getModel(uri) { - return this._models[uri]; - } - _getModels() { - let all = []; - Object.keys(this._models).forEach((key) => all.push(this._models[key])); - return all; - } - acceptNewModel(data) { - this._models[data.url] = new MirrorModel(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"].parse(data.url), data.lines, data.EOL, data.versionId); - } - acceptModelChanged(strURL, e) { - if (!this._models[strURL]) { - return; - } - let model = this._models[strURL]; - model.onEvents(e); - } - acceptRemovedModel(strURL) { - if (!this._models[strURL]) { - return; - } - delete this._models[strURL]; - } - // ---- BEGIN diff -------------------------------------------------------------------------- - computeDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace, maxComputationTime) { - return __awaiter(this, void 0, void 0, function* () { - const original = this._getModel(originalUrl); - const modified = this._getModel(modifiedUrl); - if (!original || !modified) { - return null; - } - const originalLines = original.getLinesContent(); - const modifiedLines = modified.getLinesContent(); - const diffComputer = new _diff_diffComputer_js__WEBPACK_IMPORTED_MODULE_6__["DiffComputer"](originalLines, modifiedLines, { - shouldComputeCharChanges: true, - shouldPostProcessCharChanges: true, - shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, - shouldMakePrettyDiff: true, - maxComputationTime: maxComputationTime - }); - const diffResult = diffComputer.computeDiff(); - const identical = (diffResult.changes.length > 0 ? false : this._modelsAreIdentical(original, modified)); - return { - quitEarly: diffResult.quitEarly, - identical: identical, - changes: diffResult.changes - }; - }); - } - _modelsAreIdentical(original, modified) { - const originalLineCount = original.getLineCount(); - const modifiedLineCount = modified.getLineCount(); - if (originalLineCount !== modifiedLineCount) { - return false; - } - for (let line = 1; line <= originalLineCount; line++) { - const originalLine = original.getLineContent(line); - const modifiedLine = modified.getLineContent(line); - if (originalLine !== modifiedLine) { - return false; - } - } - return true; - } - computeMoreMinimalEdits(modelUrl, edits) { - return __awaiter(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { - return edits; - } - const result = []; - let lastEol = undefined; - edits = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["mergeSort"])(edits, (a, b) => { - if (a.range && b.range) { - return _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts(a.range, b.range); - } - // eol only changes should go to the end - let aRng = a.range ? 0 : 1; - let bRng = b.range ? 0 : 1; - return aRng - bRng; - }); - for (let { range, text, eol } of edits) { - if (typeof eol === 'number') { - lastEol = eol; - } - if (_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].isEmpty(range) && !text) { - // empty change - continue; - } - const original = model.getValueInRange(range); - text = text.replace(/\r\n|\n|\r/g, model.eol); - if (original === text) { - // noop - continue; - } - // make sure diff won't take too long - if (Math.max(text.length, original.length) > EditorSimpleWorker._diffLimit) { - result.push({ range, text }); - continue; - } - // compute diff between original and edit.text - const changes = Object(_base_common_diff_diff_js__WEBPACK_IMPORTED_MODULE_1__["stringDiff"])(original, text, false); - const editOffset = model.offsetAt(_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].lift(range).getStartPosition()); - for (const change of changes) { - const start = model.positionAt(editOffset + change.originalStart); - const end = model.positionAt(editOffset + change.originalStart + change.originalLength); - const newEdit = { - text: text.substr(change.modifiedStart, change.modifiedLength), - range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column } - }; - if (model.getValueInRange(newEdit.range) !== newEdit.text) { - result.push(newEdit); - } - } - } - if (typeof lastEol === 'number') { - result.push({ eol: lastEol, text: '', range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }); - } - return result; - }); - } - // ---- END minimal edits --------------------------------------------------------------- - computeLinks(modelUrl) { - return __awaiter(this, void 0, void 0, function* () { - let model = this._getModel(modelUrl); - if (!model) { - return null; - } - return Object(_modes_linkComputer_js__WEBPACK_IMPORTED_MODULE_9__["computeLinks"])(model); - }); - } - textualSuggest(modelUrl, position, wordDef, wordDefFlags) { - return __awaiter(this, void 0, void 0, function* () { - const model = this._getModel(modelUrl); - if (!model) { - return null; - } - const words = []; - const seen = new Set(); - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const wordAt = model.getWordAtPosition(position, wordDefRegExp); - if (wordAt) { - seen.add(model.getValueInRange(wordAt)); - } - for (let word of model.words(wordDefRegExp)) { - if (seen.has(word)) { - continue; - } - seen.add(word); - if (!isNaN(Number(word))) { - continue; - } - words.push(word); - if (seen.size > EditorSimpleWorker._suggestionsLimit) { - break; - } - } - return words; - }); - } - // ---- END suggest -------------------------------------------------------------------------- - //#region -- word ranges -- - computeWordRanges(modelUrl, range, wordDef, wordDefFlags) { - return __awaiter(this, void 0, void 0, function* () { - let model = this._getModel(modelUrl); - if (!model) { - return Object.create(null); - } - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const result = Object.create(null); - for (let line = range.startLineNumber; line < range.endLineNumber; line++) { - let words = model.getLineWords(line, wordDefRegExp); - for (const word of words) { - if (!isNaN(Number(word.word))) { - continue; - } - let array = result[word.word]; - if (!array) { - array = []; - result[word.word] = array; - } - array.push({ - startLineNumber: line, - startColumn: word.startColumn, - endLineNumber: line, - endColumn: word.endColumn - }); - } - } - return result; - }); - } - //#endregion - navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) { - return __awaiter(this, void 0, void 0, function* () { - let model = this._getModel(modelUrl); - if (!model) { - return null; - } - let wordDefRegExp = new RegExp(wordDef, wordDefFlags); - if (range.startColumn === range.endColumn) { - range = { - startLineNumber: range.startLineNumber, - startColumn: range.startColumn, - endLineNumber: range.endLineNumber, - endColumn: range.endColumn + 1 - }; - } - let selectionText = model.getValueInRange(range); - let wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp); - if (!wordRange) { - return null; - } - let word = model.getValueInRange(wordRange); - let result = _modes_supports_inplaceReplaceSupport_js__WEBPACK_IMPORTED_MODULE_10__["BasicInplaceReplace"].INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up); - return result; - }); - } - // ---- BEGIN foreign module support -------------------------------------------------------------------------- - loadForeignModule(moduleId, createData, foreignHostMethods) { - const proxyMethodRequest = (method, args) => { - return this._host.fhr(method, args); - }; - const foreignHost = _base_common_types_js__WEBPACK_IMPORTED_MODULE_12__["createProxyObject"](foreignHostMethods, proxyMethodRequest); - let ctx = { - host: foreignHost, - getMirrorModels: () => { - return this._getModels(); - } - }; - if (this._foreignModuleFactory) { - this._foreignModule = this._foreignModuleFactory(ctx, createData); - // static foreing module - return Promise.resolve(_base_common_types_js__WEBPACK_IMPORTED_MODULE_12__["getAllMethodNames"](this._foreignModule)); - } - // ESM-comment-begin - // return new Promise((resolve, reject) => { - // require([moduleId], (foreignModule: { create: IForeignModuleFactory }) => { - // this._foreignModule = foreignModule.create(ctx, createData); - // - // resolve(types.getAllMethodNames(this._foreignModule)); - // - // }, reject); - // }); - // ESM-comment-end - // ESM-uncomment-begin - return Promise.reject(new Error(`Unexpected usage`)); - // ESM-uncomment-end - } - // foreign method request - fmr(method, args) { - if (!this._foreignModule || typeof this._foreignModule[method] !== 'function') { - return Promise.reject(new Error('Missing requestHandler or method: ' + method)); - } - try { - return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args)); - } - catch (e) { - return Promise.reject(e); - } - } -} -// ---- END diff -------------------------------------------------------------------------- -// ---- BEGIN minimal edits --------------------------------------------------------------- -EditorSimpleWorker._diffLimit = 100000; -// ---- BEGIN suggest -------------------------------------------------------------------------- -EditorSimpleWorker._suggestionsLimit = 10000; -/** - * Called on the worker side - * @internal - */ -function create(host) { - return new EditorSimpleWorker(host, null); -} -if (typeof importScripts === 'function') { - // Running in a web worker - _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["globals"].monaco = Object(_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_11__["createMonacoBaseAPI"])(); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js ***! - \*****************************************************************************************/ -/*! exports provided: ID_EDITOR_WORKER_SERVICE, IEditorWorkerService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ID_EDITOR_WORKER_SERVICE", function() { return ID_EDITOR_WORKER_SERVICE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IEditorWorkerService", function() { return IEditorWorkerService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ID_EDITOR_WORKER_SERVICE = 'editorWorkerService'; -const IEditorWorkerService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])(ID_EDITOR_WORKER_SERVICE); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js ***! - \*********************************************************************************************/ -/*! exports provided: EditorWorkerServiceImpl, EditorWorkerHost, EditorWorkerClient */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorWorkerServiceImpl", function() { return EditorWorkerServiceImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorWorkerHost", function() { return EditorWorkerHost; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorWorkerClient", function() { return EditorWorkerClient; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/worker/simpleWorker.js */ "./node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js"); -/* harmony import */ var _base_worker_defaultWorkerFactory_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/worker/defaultWorkerFactory.js */ "./node_modules/monaco-editor/esm/vs/base/worker/defaultWorkerFactory.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./editorSimpleWorker.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js"); -/* harmony import */ var _modelService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./textResourceConfigurationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - - - -/** - * Stop syncing a model to the worker if it was not needed for 1 min. - */ -const STOP_SYNC_MODEL_DELTA_TIME_MS = 60 * 1000; -/** - * Stop the worker if it was not needed for 5 min. - */ -const STOP_WORKER_DELTA_TIME_MS = 5 * 60 * 1000; -function canSyncModel(modelService, resource) { - let model = modelService.getModel(resource); - if (!model) { - return false; - } - if (model.isTooLargeForSyncing()) { - return false; - } - return true; -} -let EditorWorkerServiceImpl = class EditorWorkerServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(modelService, configurationService, logService) { - super(); - this._modelService = modelService; - this._workerManager = this._register(new WorkerManager(this._modelService)); - this._logService = logService; - // register default link-provider and default completions-provider - this._register(_modes_js__WEBPACK_IMPORTED_MODULE_5__["LinkProviderRegistry"].register('*', { - provideLinks: (model, token) => { - if (!canSyncModel(this._modelService, model.uri)) { - return Promise.resolve({ links: [] }); // File too large - } - return this._workerManager.withWorker().then(client => client.computeLinks(model.uri)).then(links => { - return links && { links }; - }); - } - })); - this._register(_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].register('*', new WordBasedCompletionItemProvider(this._workerManager, configurationService, this._modelService))); - } - dispose() { - super.dispose(); - } - canComputeDiff(original, modified) { - return (canSyncModel(this._modelService, original) && canSyncModel(this._modelService, modified)); - } - computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime) { - return this._workerManager.withWorker().then(client => client.computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime)); - } - computeMoreMinimalEdits(resource, edits) { - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__["isNonEmptyArray"])(edits)) { - if (!canSyncModel(this._modelService, resource)) { - return Promise.resolve(edits); // File too large - } - const sw = _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_13__["StopWatch"].create(true); - const result = this._workerManager.withWorker().then(client => client.computeMoreMinimalEdits(resource, edits)); - result.finally(() => this._logService.trace('FORMAT#computeMoreMinimalEdits', resource.toString(true), sw.elapsed())); - return result; - } - else { - return Promise.resolve(undefined); - } - } - canNavigateValueSet(resource) { - return (canSyncModel(this._modelService, resource)); - } - navigateValueSet(resource, range, up) { - return this._workerManager.withWorker().then(client => client.navigateValueSet(resource, range, up)); - } - canComputeWordRanges(resource) { - return canSyncModel(this._modelService, resource); - } - computeWordRanges(resource, range) { - return this._workerManager.withWorker().then(client => client.computeWordRanges(resource, range)); - } -}; -EditorWorkerServiceImpl = __decorate([ - __param(0, _modelService_js__WEBPACK_IMPORTED_MODULE_8__["IModelService"]), - __param(1, _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__["ITextResourceConfigurationService"]), - __param(2, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_12__["ILogService"]) -], EditorWorkerServiceImpl); - -class WordBasedCompletionItemProvider { - constructor(workerManager, configurationService, modelService) { - this._debugDisplayName = 'wordbasedCompletions'; - this._workerManager = workerManager; - this._configurationService = configurationService; - this._modelService = modelService; - } - provideCompletionItems(model, position) { - return __awaiter(this, void 0, void 0, function* () { - const { wordBasedSuggestions } = this._configurationService.getValue(model.uri, position, 'editor'); - if (!wordBasedSuggestions) { - return undefined; - } - if (!canSyncModel(this._modelService, model.uri)) { - return undefined; // File too large - } - const word = model.getWordAtPosition(position); - const replace = !word ? _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].fromPositions(position) : new _core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); - const insert = replace.setEndPosition(position.lineNumber, position.column); - const client = yield this._workerManager.withWorker(); - const words = yield client.textualSuggest(model.uri, position); - if (!words) { - return undefined; - } - return { - suggestions: words.map((word) => { - return { - kind: 18 /* Text */, - label: word, - insertText: word, - range: { insert, replace } - }; - }) - }; - }); - } -} -class WorkerManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(modelService) { - super(); - this._modelService = modelService; - this._editorWorkerClient = null; - this._lastWorkerUsedTime = (new Date()).getTime(); - let stopWorkerInterval = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["IntervalTimer"]()); - stopWorkerInterval.cancelAndSet(() => this._checkStopIdleWorker(), Math.round(STOP_WORKER_DELTA_TIME_MS / 2)); - this._register(this._modelService.onModelRemoved(_ => this._checkStopEmptyWorker())); - } - dispose() { - if (this._editorWorkerClient) { - this._editorWorkerClient.dispose(); - this._editorWorkerClient = null; - } - super.dispose(); - } - /** - * Check if the model service has no more models and stop the worker if that is the case. - */ - _checkStopEmptyWorker() { - if (!this._editorWorkerClient) { - return; - } - let models = this._modelService.getModels(); - if (models.length === 0) { - // There are no more models => nothing possible for me to do - this._editorWorkerClient.dispose(); - this._editorWorkerClient = null; - } - } - /** - * Check if the worker has been idle for a while and then stop it. - */ - _checkStopIdleWorker() { - if (!this._editorWorkerClient) { - return; - } - let timeSinceLastWorkerUsedTime = (new Date()).getTime() - this._lastWorkerUsedTime; - if (timeSinceLastWorkerUsedTime > STOP_WORKER_DELTA_TIME_MS) { - this._editorWorkerClient.dispose(); - this._editorWorkerClient = null; - } - } - withWorker() { - this._lastWorkerUsedTime = (new Date()).getTime(); - if (!this._editorWorkerClient) { - this._editorWorkerClient = new EditorWorkerClient(this._modelService, false, 'editorWorkerService'); - } - return Promise.resolve(this._editorWorkerClient); - } -} -class EditorModelManager extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(proxy, modelService, keepIdleModels) { - super(); - this._syncedModels = Object.create(null); - this._syncedModelsLastUsedTime = Object.create(null); - this._proxy = proxy; - this._modelService = modelService; - if (!keepIdleModels) { - let timer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["IntervalTimer"](); - timer.cancelAndSet(() => this._checkStopModelSync(), Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS / 2)); - this._register(timer); - } - } - dispose() { - for (let modelUrl in this._syncedModels) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._syncedModels[modelUrl]); - } - this._syncedModels = Object.create(null); - this._syncedModelsLastUsedTime = Object.create(null); - super.dispose(); - } - ensureSyncedResources(resources) { - for (const resource of resources) { - let resourceStr = resource.toString(); - if (!this._syncedModels[resourceStr]) { - this._beginModelSync(resource); - } - if (this._syncedModels[resourceStr]) { - this._syncedModelsLastUsedTime[resourceStr] = (new Date()).getTime(); - } - } - } - _checkStopModelSync() { - let currentTime = (new Date()).getTime(); - let toRemove = []; - for (let modelUrl in this._syncedModelsLastUsedTime) { - let elapsedTime = currentTime - this._syncedModelsLastUsedTime[modelUrl]; - if (elapsedTime > STOP_SYNC_MODEL_DELTA_TIME_MS) { - toRemove.push(modelUrl); - } - } - for (const e of toRemove) { - this._stopModelSync(e); - } - } - _beginModelSync(resource) { - let model = this._modelService.getModel(resource); - if (!model) { - return; - } - if (model.isTooLargeForSyncing()) { - return; - } - let modelUrl = resource.toString(); - this._proxy.acceptNewModel({ - url: model.uri.toString(), - lines: model.getLinesContent(), - EOL: model.getEOL(), - versionId: model.getVersionId() - }); - const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - toDispose.add(model.onDidChangeContent((e) => { - this._proxy.acceptModelChanged(modelUrl.toString(), e); - })); - toDispose.add(model.onWillDispose(() => { - this._stopModelSync(modelUrl); - })); - toDispose.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - this._proxy.acceptRemovedModel(modelUrl); - })); - this._syncedModels[modelUrl] = toDispose; - } - _stopModelSync(modelUrl) { - let toDispose = this._syncedModels[modelUrl]; - delete this._syncedModels[modelUrl]; - delete this._syncedModelsLastUsedTime[modelUrl]; - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(toDispose); - } -} -class SynchronousWorkerClient { - constructor(instance) { - this._instance = instance; - this._proxyObj = Promise.resolve(this._instance); - } - dispose() { - this._instance.dispose(); - } - getProxyObject() { - return this._proxyObj; - } -} -class EditorWorkerHost { - constructor(workerClient) { - this._workerClient = workerClient; - } - // foreign host request - fhr(method, args) { - return this._workerClient.fhr(method, args); - } -} -class EditorWorkerClient extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(modelService, keepIdleModels, label) { - super(); - this._disposed = false; - this._modelService = modelService; - this._keepIdleModels = keepIdleModels; - this._workerFactory = new _base_worker_defaultWorkerFactory_js__WEBPACK_IMPORTED_MODULE_3__["DefaultWorkerFactory"](label); - this._worker = null; - this._modelManager = null; - } - // foreign host request - fhr(method, args) { - throw new Error(`Not implemented!`); - } - _getOrCreateWorker() { - if (!this._worker) { - try { - this._worker = this._register(new _base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__["SimpleWorkerClient"](this._workerFactory, 'vs/editor/common/services/editorSimpleWorker', new EditorWorkerHost(this))); - } - catch (err) { - Object(_base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__["logOnceWebWorkerWarning"])(err); - this._worker = new SynchronousWorkerClient(new _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__["EditorSimpleWorker"](new EditorWorkerHost(this), null)); - } - } - return this._worker; - } - _getProxy() { - return this._getOrCreateWorker().getProxyObject().then(undefined, (err) => { - Object(_base_common_worker_simpleWorker_js__WEBPACK_IMPORTED_MODULE_2__["logOnceWebWorkerWarning"])(err); - this._worker = new SynchronousWorkerClient(new _editorSimpleWorker_js__WEBPACK_IMPORTED_MODULE_7__["EditorSimpleWorker"](new EditorWorkerHost(this), null)); - return this._getOrCreateWorker().getProxyObject(); - }); - } - _getOrCreateModelManager(proxy) { - if (!this._modelManager) { - this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, this._keepIdleModels)); - } - return this._modelManager; - } - _withSyncedResources(resources) { - if (this._disposed) { - return Promise.reject(Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__["canceled"])()); - } - return this._getProxy().then((proxy) => { - this._getOrCreateModelManager(proxy).ensureSyncedResources(resources); - return proxy; - }); - } - computeDiff(original, modified, ignoreTrimWhitespace, maxComputationTime) { - return this._withSyncedResources([original, modified]).then(proxy => { - return proxy.computeDiff(original.toString(), modified.toString(), ignoreTrimWhitespace, maxComputationTime); - }); - } - computeMoreMinimalEdits(resource, edits) { - return this._withSyncedResources([resource]).then(proxy => { - return proxy.computeMoreMinimalEdits(resource.toString(), edits); - }); - } - computeLinks(resource) { - return this._withSyncedResources([resource]).then(proxy => { - return proxy.computeLinks(resource.toString()); - }); - } - textualSuggest(resource, position) { - return this._withSyncedResources([resource]).then(proxy => { - let model = this._modelService.getModel(resource); - if (!model) { - return null; - } - let wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getWordDefinition(model.getLanguageIdentifier().id); - let wordDef = wordDefRegExp.source; - let wordDefFlags = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__["regExpFlags"])(wordDefRegExp); - return proxy.textualSuggest(resource.toString(), position, wordDef, wordDefFlags); - }); - } - computeWordRanges(resource, range) { - return this._withSyncedResources([resource]).then(proxy => { - let model = this._modelService.getModel(resource); - if (!model) { - return Promise.resolve(null); - } - let wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getWordDefinition(model.getLanguageIdentifier().id); - let wordDef = wordDefRegExp.source; - let wordDefFlags = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__["regExpFlags"])(wordDefRegExp); - return proxy.computeWordRanges(resource.toString(), range, wordDef, wordDefFlags); - }); - } - navigateValueSet(resource, range, up) { - return this._withSyncedResources([resource]).then(proxy => { - let model = this._modelService.getModel(resource); - if (!model) { - return null; - } - let wordDefRegExp = _modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_6__["LanguageConfigurationRegistry"].getWordDefinition(model.getLanguageIdentifier().id); - let wordDef = wordDefRegExp.source; - let wordDefFlags = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_10__["regExpFlags"])(wordDefRegExp); - return proxy.navigateValueSet(resource.toString(), range, up, wordDef, wordDefFlags); - }); - } - dispose() { - super.dispose(); - this._disposed = true; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js ***! - \************************************************************************************/ -/*! exports provided: getIconClasses, detectModeId, cssEscape */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIconClasses", function() { return getIconClasses; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectModeId", function() { return detectModeId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssEscape", function() { return cssEscape; }); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes/modesRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js"); -/* harmony import */ var _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/files/common/files.js */ "./node_modules/monaco-editor/esm/vs/platform/files/common/files.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -function getIconClasses(modelService, modeService, resource, fileKind) { - // we always set these base classes even if we do not have a path - const classes = fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__["FileKind"].ROOT_FOLDER ? ['rootfolder-icon'] : fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__["FileKind"].FOLDER ? ['folder-icon'] : ['file-icon']; - if (resource) { - // Get the path and name of the resource. For data-URIs, we need to parse specially - let name; - if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__["Schemas"].data) { - const metadata = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["DataUri"].parseMetaData(resource); - name = metadata.get(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["DataUri"].META_DATA_LABEL); - } - else { - name = cssEscape(Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["basenameOrAuthority"])(resource).toLowerCase()); - } - // Folders - if (fileKind === _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_3__["FileKind"].FOLDER) { - classes.push(`${name}-name-folder-icon`); - } - // Files - else { - // Name & Extension(s) - if (name) { - classes.push(`${name}-name-file-icon`); - const dotSegments = name.split('.'); - for (let i = 1; i < dotSegments.length; i++) { - classes.push(`${dotSegments.slice(i).join('.')}-ext-file-icon`); // add each combination of all found extensions if more than one - } - classes.push(`ext-file-icon`); // extra segment to increase file-ext score - } - // Detected Mode - const detectedModeId = detectModeId(modelService, modeService, resource); - if (detectedModeId) { - classes.push(`${cssEscape(detectedModeId)}-lang-file-icon`); - } - } - } - return classes; -} -function detectModeId(modelService, modeService, resource) { - if (!resource) { - return null; // we need a resource at least - } - let modeId = null; - // Data URI: check for encoded metadata - if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_0__["Schemas"].data) { - const metadata = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["DataUri"].parseMetaData(resource); - const mime = metadata.get(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["DataUri"].META_DATA_MIME); - if (mime) { - modeId = modeService.getModeId(mime); - } - } - // Any other URI: check for model if existing - else { - const model = modelService.getModel(resource); - if (model) { - modeId = model.getModeId(); - } - } - // only take if the mode is specific (aka no just plain text) - if (modeId && modeId !== _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_2__["PLAINTEXT_MODE_ID"]) { - return modeId; - } - // otherwise fallback to path based detection - return modeService.getModeIdByFilepathOrFirstLine(resource); -} -function cssEscape(val) { - return val.replace(/\s/g, '\\$&'); // make sure to not introduce CSS classes from files that contain whitespace -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js ***! - \***************************************************************************************/ -/*! exports provided: LanguagesRegistry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LanguagesRegistry", function() { return LanguagesRegistry; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/mime.js */ "./node_modules/monaco-editor/esm/vs/base/common/mime.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes/modesRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js"); -/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - -const hasOwnProperty = Object.prototype.hasOwnProperty; -class LanguagesRegistry extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(useModesRegistry = true, warnOnOverwrite = false) { - super(); - this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._warnOnOverwrite = warnOnOverwrite; - this._nextLanguageId2 = 1; - this._languageIdToLanguage = []; - this._languageToLanguageId = Object.create(null); - this._languages = {}; - this._mimeTypesMap = {}; - this._nameMap = {}; - this._lowercaseNameMap = {}; - if (useModesRegistry) { - this._initializeFromRegistry(); - this._register(_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__["ModesRegistry"].onDidChangeLanguages((m) => this._initializeFromRegistry())); - } - } - _initializeFromRegistry() { - this._languages = {}; - this._mimeTypesMap = {}; - this._nameMap = {}; - this._lowercaseNameMap = {}; - const desc = _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__["ModesRegistry"].getLanguages(); - this._registerLanguages(desc); - } - _registerLanguages(desc) { - for (const d of desc) { - this._registerLanguage(d); - } - // Rebuild fast path maps - this._mimeTypesMap = {}; - this._nameMap = {}; - this._lowercaseNameMap = {}; - Object.keys(this._languages).forEach((langId) => { - let language = this._languages[langId]; - if (language.name) { - this._nameMap[language.name] = language.identifier; - } - language.aliases.forEach((alias) => { - this._lowercaseNameMap[alias.toLowerCase()] = language.identifier; - }); - language.mimetypes.forEach((mimetype) => { - this._mimeTypesMap[mimetype] = language.identifier; - }); - }); - _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_9__["Registry"].as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_8__["Extensions"].Configuration).registerOverrideIdentifiers(_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_6__["ModesRegistry"].getLanguages().map(language => language.id)); - this._onDidChange.fire(); - } - _getLanguageId(language) { - if (this._languageToLanguageId[language]) { - return this._languageToLanguageId[language]; - } - const languageId = this._nextLanguageId2++; - this._languageIdToLanguage[languageId] = language; - this._languageToLanguageId[language] = languageId; - return languageId; - } - _registerLanguage(lang) { - const langId = lang.id; - let resolvedLanguage; - if (hasOwnProperty.call(this._languages, langId)) { - resolvedLanguage = this._languages[langId]; - } - else { - const languageId = this._getLanguageId(langId); - resolvedLanguage = { - identifier: new _modes_js__WEBPACK_IMPORTED_MODULE_5__["LanguageIdentifier"](langId, languageId), - name: null, - mimetypes: [], - aliases: [], - extensions: [], - filenames: [], - configurationFiles: [] - }; - this._languages[langId] = resolvedLanguage; - } - this._mergeLanguage(resolvedLanguage, lang); - } - _mergeLanguage(resolvedLanguage, lang) { - const langId = lang.id; - let primaryMime = null; - if (Array.isArray(lang.mimetypes) && lang.mimetypes.length > 0) { - resolvedLanguage.mimetypes.push(...lang.mimetypes); - primaryMime = lang.mimetypes[0]; - } - if (!primaryMime) { - primaryMime = `text/x-${langId}`; - resolvedLanguage.mimetypes.push(primaryMime); - } - if (Array.isArray(lang.extensions)) { - if (lang.configuration) { - // insert first as this appears to be the 'primary' language definition - resolvedLanguage.extensions = lang.extensions.concat(resolvedLanguage.extensions); - } - else { - resolvedLanguage.extensions = resolvedLanguage.extensions.concat(lang.extensions); - } - for (let extension of lang.extensions) { - _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__["registerTextMime"]({ id: langId, mime: primaryMime, extension: extension }, this._warnOnOverwrite); - } - } - if (Array.isArray(lang.filenames)) { - for (let filename of lang.filenames) { - _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__["registerTextMime"]({ id: langId, mime: primaryMime, filename: filename }, this._warnOnOverwrite); - resolvedLanguage.filenames.push(filename); - } - } - if (Array.isArray(lang.filenamePatterns)) { - for (let filenamePattern of lang.filenamePatterns) { - _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__["registerTextMime"]({ id: langId, mime: primaryMime, filepattern: filenamePattern }, this._warnOnOverwrite); - } - } - if (typeof lang.firstLine === 'string' && lang.firstLine.length > 0) { - let firstLineRegexStr = lang.firstLine; - if (firstLineRegexStr.charAt(0) !== '^') { - firstLineRegexStr = '^' + firstLineRegexStr; - } - try { - let firstLineRegex = new RegExp(firstLineRegexStr); - if (!_base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__["regExpLeadsToEndlessLoop"](firstLineRegex)) { - _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__["registerTextMime"]({ id: langId, mime: primaryMime, firstline: firstLineRegex }, this._warnOnOverwrite); - } - } - catch (err) { - // Most likely, the regex was bad - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(err); - } - } - resolvedLanguage.aliases.push(langId); - let langAliases = null; - if (typeof lang.aliases !== 'undefined' && Array.isArray(lang.aliases)) { - if (lang.aliases.length === 0) { - // signal that this language should not get a name - langAliases = [null]; - } - else { - langAliases = lang.aliases; - } - } - if (langAliases !== null) { - for (const langAlias of langAliases) { - if (!langAlias || langAlias.length === 0) { - continue; - } - resolvedLanguage.aliases.push(langAlias); - } - } - let containsAliases = (langAliases !== null && langAliases.length > 0); - if (containsAliases && langAliases[0] === null) { - // signal that this language should not get a name - } - else { - let bestName = (containsAliases ? langAliases[0] : null) || langId; - if (containsAliases || !resolvedLanguage.name) { - resolvedLanguage.name = bestName; - } - } - if (lang.configuration) { - resolvedLanguage.configurationFiles.push(lang.configuration); - } - } - isRegisteredMode(mimetypeOrModeId) { - // Is this a known mime type ? - if (hasOwnProperty.call(this._mimeTypesMap, mimetypeOrModeId)) { - return true; - } - // Is this a known mode id ? - return hasOwnProperty.call(this._languages, mimetypeOrModeId); - } - getModeIdForLanguageNameLowercase(languageNameLower) { - if (!hasOwnProperty.call(this._lowercaseNameMap, languageNameLower)) { - return null; - } - return this._lowercaseNameMap[languageNameLower].language; - } - extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds) { - if (!commaSeparatedMimetypesOrCommaSeparatedIds) { - return []; - } - return (commaSeparatedMimetypesOrCommaSeparatedIds. - split(','). - map((mimeTypeOrId) => mimeTypeOrId.trim()). - map((mimeTypeOrId) => { - if (hasOwnProperty.call(this._mimeTypesMap, mimeTypeOrId)) { - return this._mimeTypesMap[mimeTypeOrId].language; - } - return mimeTypeOrId; - }). - filter((modeId) => { - return hasOwnProperty.call(this._languages, modeId); - })); - } - getLanguageIdentifier(_modeId) { - if (_modeId === _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__["NULL_MODE_ID"] || _modeId === 0 /* Null */) { - return _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_7__["NULL_LANGUAGE_IDENTIFIER"]; - } - let modeId; - if (typeof _modeId === 'string') { - modeId = _modeId; - } - else { - modeId = this._languageIdToLanguage[_modeId]; - if (!modeId) { - return null; - } - } - if (!hasOwnProperty.call(this._languages, modeId)) { - return null; - } - return this._languages[modeId].identifier; - } - getModeIdsFromFilepathOrFirstLine(resource, firstLine) { - if (!resource && !firstLine) { - return []; - } - let mimeTypes = _base_common_mime_js__WEBPACK_IMPORTED_MODULE_3__["guessMimeTypes"](resource, firstLine); - return this.extractModeIds(mimeTypes.join(',')); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js ***! - \**************************************************************************************************/ -/*! exports provided: MarkerDecorationsService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerDecorationsService", function() { return MarkerDecorationsService; }); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - -function MODEL_ID(resource) { - return resource.toString(); -} -class MarkerDecorations extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(model) { - super(); - this.model = model; - this._markersData = new Map(); - this._register(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - this.model.deltaDecorations([...this._markersData.keys()], []); - this._markersData.clear(); - })); - } - update(markers, newDecorations) { - const oldIds = [...this._markersData.keys()]; - this._markersData.clear(); - const ids = this.model.deltaDecorations(oldIds, newDecorations); - for (let index = 0; index < ids.length; index++) { - this._markersData.set(ids[index], markers[index]); - } - return oldIds.length !== 0 || ids.length !== 0; - } - getMarker(decoration) { - return this._markersData.get(decoration.id); - } -} -let MarkerDecorationsService = class MarkerDecorationsService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(modelService, _markerService) { - super(); - this._markerService = _markerService; - this._onDidChangeMarker = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"]()); - this._markerDecorations = new Map(); - modelService.getModels().forEach(model => this._onModelAdded(model)); - this._register(modelService.onModelAdded(this._onModelAdded, this)); - this._register(modelService.onModelRemoved(this._onModelRemoved, this)); - this._register(this._markerService.onMarkerChanged(this._handleMarkerChange, this)); - } - dispose() { - super.dispose(); - this._markerDecorations.forEach(value => value.dispose()); - this._markerDecorations.clear(); - } - getMarker(model, decoration) { - const markerDecorations = this._markerDecorations.get(MODEL_ID(model.uri)); - return markerDecorations ? (markerDecorations.getMarker(decoration) || null) : null; - } - _handleMarkerChange(changedResources) { - changedResources.forEach((resource) => { - const markerDecorations = this._markerDecorations.get(MODEL_ID(resource)); - if (markerDecorations) { - this._updateDecorations(markerDecorations); - } - }); - } - _onModelAdded(model) { - const markerDecorations = new MarkerDecorations(model); - this._markerDecorations.set(MODEL_ID(model.uri), markerDecorations); - this._updateDecorations(markerDecorations); - } - _onModelRemoved(model) { - const markerDecorations = this._markerDecorations.get(MODEL_ID(model.uri)); - if (markerDecorations) { - markerDecorations.dispose(); - this._markerDecorations.delete(MODEL_ID(model.uri)); - } - // clean up markers for internal, transient models - if (model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__["Schemas"].inMemory - || model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__["Schemas"].internal - || model.uri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_7__["Schemas"].vscode) { - if (this._markerService) { - this._markerService.read({ resource: model.uri }).map(marker => marker.owner).forEach(owner => this._markerService.remove(owner, [model.uri])); - } - } - } - _updateDecorations(markerDecorations) { - // Limit to the first 500 errors/warnings - const markers = this._markerService.read({ resource: markerDecorations.model.uri, take: 500 }); - let newModelDecorations = markers.map((marker) => { - return { - range: this._createDecorationRange(markerDecorations.model, marker), - options: this._createDecorationOption(marker) - }; - }); - if (markerDecorations.update(markers, newModelDecorations)) { - this._onDidChangeMarker.fire(markerDecorations.model); - } - } - _createDecorationRange(model, rawMarker) { - let ret = _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].lift(rawMarker); - if (rawMarker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Hint && !this._hasMarkerTag(rawMarker, 1 /* Unnecessary */) && !this._hasMarkerTag(rawMarker, 2 /* Deprecated */)) { - // * never render hints on multiple lines - // * make enough space for three dots - ret = ret.setEndPosition(ret.startLineNumber, ret.startColumn + 2); - } - ret = model.validateRange(ret); - if (ret.isEmpty()) { - let word = model.getWordAtPosition(ret.getStartPosition()); - if (word) { - ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](ret.startLineNumber, word.startColumn, ret.endLineNumber, word.endColumn); - } - else { - let maxColumn = model.getLineLastNonWhitespaceColumn(ret.startLineNumber) || - model.getLineMaxColumn(ret.startLineNumber); - if (maxColumn === 1) { - // empty line - // console.warn('marker on empty line:', marker); - } - else if (ret.endColumn >= maxColumn) { - // behind eol - ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](ret.startLineNumber, maxColumn - 1, ret.endLineNumber, maxColumn); - } - else { - // extend marker to width = 1 - ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](ret.startLineNumber, ret.startColumn, ret.endLineNumber, ret.endColumn + 1); - } - } - } - else if (rawMarker.endColumn === Number.MAX_VALUE && rawMarker.startColumn === 1 && ret.startLineNumber === ret.endLineNumber) { - let minColumn = model.getLineFirstNonWhitespaceColumn(rawMarker.startLineNumber); - if (minColumn < ret.endColumn) { - ret = new _core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](ret.startLineNumber, minColumn, ret.endLineNumber, ret.endColumn); - rawMarker.startColumn = minColumn; - } - } - return ret; - } - _createDecorationOption(marker) { - let className; - let color = undefined; - let zIndex; - let inlineClassName = undefined; - let minimap; - switch (marker.severity) { - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Hint: - if (this._hasMarkerTag(marker, 2 /* Deprecated */)) { - className = undefined; - } - else if (this._hasMarkerTag(marker, 1 /* Unnecessary */)) { - className = "squiggly-unnecessary" /* EditorUnnecessaryDecoration */; - } - else { - className = "squiggly-hint" /* EditorHintDecoration */; - } - zIndex = 0; - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Warning: - className = "squiggly-warning" /* EditorWarningDecoration */; - color = Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["themeColorFromId"])(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["overviewRulerWarning"]); - zIndex = 20; - minimap = { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["minimapWarning"]), - position: _model_js__WEBPACK_IMPORTED_MODULE_2__["MinimapPosition"].Inline - }; - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Info: - className = "squiggly-info" /* EditorInfoDecoration */; - color = Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["themeColorFromId"])(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["overviewRulerInfo"]); - zIndex = 10; - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Error: - default: - className = "squiggly-error" /* EditorErrorDecoration */; - color = Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["themeColorFromId"])(_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["overviewRulerError"]); - zIndex = 30; - minimap = { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["minimapError"]), - position: _model_js__WEBPACK_IMPORTED_MODULE_2__["MinimapPosition"].Inline - }; - break; - } - if (marker.tags) { - if (marker.tags.indexOf(1 /* Unnecessary */) !== -1) { - inlineClassName = "squiggly-inline-unnecessary" /* EditorUnnecessaryInlineDecoration */; - } - if (marker.tags.indexOf(2 /* Deprecated */) !== -1) { - inlineClassName = "squiggly-inline-deprecated" /* EditorDeprecatedInlineDecoration */; - } - } - return { - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className, - showIfCollapsed: true, - overviewRuler: { - color, - position: _model_js__WEBPACK_IMPORTED_MODULE_2__["OverviewRulerLane"].Right - }, - minimap, - zIndex, - inlineClassName, - }; - } - _hasMarkerTag(marker, tag) { - if (marker.tags) { - return marker.tags.indexOf(tag) >= 0; - } - return false; - } -}; -MarkerDecorationsService = __decorate([ - __param(0, _modelService_js__WEBPACK_IMPORTED_MODULE_5__["IModelService"]), - __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["IMarkerService"]) -], MarkerDecorationsService); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js ***! - \**********************************************************************************************/ -/*! exports provided: IMarkerDecorationsService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IMarkerDecorationsService", function() { return IMarkerDecorationsService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IMarkerDecorationsService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('markerDecorationsService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js ***! - \*********************************************************************************/ -/*! exports provided: IModeService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IModeService", function() { return IModeService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IModeService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('modeService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js ***! - \*************************************************************************************/ -/*! exports provided: ModeServiceImpl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModeServiceImpl", function() { return ModeServiceImpl; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _modes_abstractMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes/abstractMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/abstractMode.js"); -/* harmony import */ var _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _languagesRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./languagesRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class LanguageSelection extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(onLanguagesMaybeChanged, selector) { - super(); - this._onDidChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onDidChange = this._onDidChange.event; - this._selector = selector; - this.languageIdentifier = this._selector(); - this._register(onLanguagesMaybeChanged(() => this._evaluate())); - } - _evaluate() { - let languageIdentifier = this._selector(); - if (languageIdentifier.id === this.languageIdentifier.id) { - // no change - return; - } - this.languageIdentifier = languageIdentifier; - this._onDidChange.fire(this.languageIdentifier); - } -} -class ModeServiceImpl { - constructor(warnOnOverwrite = false) { - this._onDidCreateMode = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidCreateMode = this._onDidCreateMode.event; - this._onLanguagesMaybeChanged = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onLanguagesMaybeChanged = this._onLanguagesMaybeChanged.event; - this._instantiatedModes = {}; - this._registry = new _languagesRegistry_js__WEBPACK_IMPORTED_MODULE_4__["LanguagesRegistry"](true, warnOnOverwrite); - this._registry.onDidChange(() => this._onLanguagesMaybeChanged.fire()); - } - isRegisteredMode(mimetypeOrModeId) { - return this._registry.isRegisteredMode(mimetypeOrModeId); - } - getModeIdForLanguageName(alias) { - return this._registry.getModeIdForLanguageNameLowercase(alias); - } - getModeIdByFilepathOrFirstLine(resource, firstLine) { - const modeIds = this._registry.getModeIdsFromFilepathOrFirstLine(resource, firstLine); - return Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__["firstOrDefault"])(modeIds, null); - } - getModeId(commaSeparatedMimetypesOrCommaSeparatedIds) { - const modeIds = this._registry.extractModeIds(commaSeparatedMimetypesOrCommaSeparatedIds); - return Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__["firstOrDefault"])(modeIds, null); - } - getLanguageIdentifier(modeId) { - return this._registry.getLanguageIdentifier(modeId); - } - // --- instantiation - create(commaSeparatedMimetypesOrCommaSeparatedIds) { - return new LanguageSelection(this.onLanguagesMaybeChanged, () => { - const modeId = this.getModeId(commaSeparatedMimetypesOrCommaSeparatedIds); - return this._createModeAndGetLanguageIdentifier(modeId); - }); - } - createByFilepathOrFirstLine(resource, firstLine) { - return new LanguageSelection(this.onLanguagesMaybeChanged, () => { - const modeId = this.getModeIdByFilepathOrFirstLine(resource, firstLine); - return this._createModeAndGetLanguageIdentifier(modeId); - }); - } - _createModeAndGetLanguageIdentifier(modeId) { - // Fall back to plain text if no mode was found - const languageIdentifier = this.getLanguageIdentifier(modeId || 'plaintext') || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__["NULL_LANGUAGE_IDENTIFIER"]; - this._getOrCreateMode(languageIdentifier.language); - return languageIdentifier; - } - triggerMode(commaSeparatedMimetypesOrCommaSeparatedIds) { - const modeId = this.getModeId(commaSeparatedMimetypesOrCommaSeparatedIds); - // Fall back to plain text if no mode was found - this._getOrCreateMode(modeId || 'plaintext'); - } - _getOrCreateMode(modeId) { - if (!this._instantiatedModes.hasOwnProperty(modeId)) { - let languageIdentifier = this.getLanguageIdentifier(modeId) || _modes_nullMode_js__WEBPACK_IMPORTED_MODULE_3__["NULL_LANGUAGE_IDENTIFIER"]; - this._instantiatedModes[modeId] = new _modes_abstractMode_js__WEBPACK_IMPORTED_MODULE_2__["FrankensteinMode"](languageIdentifier); - this._onDidCreateMode.fire(this._instantiatedModes[modeId]); - } - return this._instantiatedModes[modeId]; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js ***! - \**********************************************************************************/ -/*! exports provided: IModelService, shouldSynchronizeModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IModelService", function() { return IModelService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldSynchronizeModel", function() { return shouldSynchronizeModel; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IModelService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('modelService'); -function shouldSynchronizeModel(model) { - return (!model.isTooLargeForSyncing() && !model.isForSimpleWidget); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js ***! - \**************************************************************************************/ -/*! exports provided: ModelServiceImpl, SEMANTIC_HIGHLIGHTING_SETTING_ID, isSemanticColoringEnabled */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelServiceImpl", function() { return ModelServiceImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SEMANTIC_HIGHLIGHTING_SETTING_ID", function() { return SEMANTIC_HIGHLIGHTING_SETTING_ID; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSemanticColoringEnabled", function() { return isSemanticColoringEnabled; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/modesRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js"); -/* harmony import */ var _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./textResourceConfigurationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedo.js */ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js"); -/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/hash.js */ "./node_modules/monaco-editor/esm/vs/base/common/hash.js"); -/* harmony import */ var _model_editStack_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../model/editStack.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js"); -/* harmony import */ var _semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./semanticTokensProviderStyling.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - -function MODEL_ID(resource) { - return resource.toString(); -} -function computeModelSha1(model) { - // compute the sha1 - const shaComputer = new _base_common_hash_js__WEBPACK_IMPORTED_MODULE_15__["StringSHA1"](); - const snapshot = model.createSnapshot(); - let text; - while ((text = snapshot.read())) { - shaComputer.update(text); - } - return shaComputer.digest(); -} -class ModelData { - constructor(model, onWillDispose, onDidChangeLanguage) { - this._modelEventListeners = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.model = model; - this._languageSelection = null; - this._languageSelectionListener = null; - this._modelEventListeners.add(model.onWillDispose(() => onWillDispose(model))); - this._modelEventListeners.add(model.onDidChangeLanguage((e) => onDidChangeLanguage(model, e))); - } - _disposeLanguageSelection() { - if (this._languageSelectionListener) { - this._languageSelectionListener.dispose(); - this._languageSelectionListener = null; - } - if (this._languageSelection) { - this._languageSelection.dispose(); - this._languageSelection = null; - } - } - dispose() { - this._modelEventListeners.dispose(); - this._disposeLanguageSelection(); - } - setLanguage(languageSelection) { - this._disposeLanguageSelection(); - this._languageSelection = languageSelection; - this._languageSelectionListener = this._languageSelection.onDidChange(() => this.model.setMode(languageSelection.languageIdentifier)); - this.model.setMode(languageSelection.languageIdentifier); - } -} -const DEFAULT_EOL = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isLinux"] || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) ? 1 /* LF */ : 2 /* CRLF */; -class DisposedModelInfo { - constructor(uri, initialUndoRedoSnapshot, time, sharesUndoRedoStack, heapSize, sha1, versionId, alternativeVersionId) { - this.uri = uri; - this.initialUndoRedoSnapshot = initialUndoRedoSnapshot; - this.time = time; - this.sharesUndoRedoStack = sharesUndoRedoStack; - this.heapSize = heapSize; - this.sha1 = sha1; - this.versionId = versionId; - this.alternativeVersionId = alternativeVersionId; - } -} -let ModelServiceImpl = class ModelServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(_configurationService, _resourcePropertiesService, _themeService, _logService, _undoRedoService) { - super(); - this._configurationService = _configurationService; - this._resourcePropertiesService = _resourcePropertiesService; - this._themeService = _themeService; - this._logService = _logService; - this._undoRedoService = _undoRedoService; - this._onModelAdded = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onModelAdded = this._onModelAdded.event; - this._onModelRemoved = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onModelRemoved = this._onModelRemoved.event; - this._onModelModeChanged = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onModelModeChanged = this._onModelModeChanged.event; - this._modelCreationOptionsByLanguageAndResource = Object.create(null); - this._models = {}; - this._disposedModels = new Map(); - this._disposedModelsHeapSize = 0; - this._semanticStyling = this._register(new SemanticStyling(this._themeService, this._logService)); - this._register(this._configurationService.onDidChangeConfiguration(() => this._updateModelOptions())); - this._updateModelOptions(); - this._register(new SemanticColoringFeature(this, this._themeService, this._configurationService, this._semanticStyling)); - } - static _readModelOptions(config, isForSimpleWidget) { - let tabSize = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EDITOR_MODEL_DEFAULTS"].tabSize; - if (config.editor && typeof config.editor.tabSize !== 'undefined') { - const parsedTabSize = parseInt(config.editor.tabSize, 10); - if (!isNaN(parsedTabSize)) { - tabSize = parsedTabSize; - } - if (tabSize < 1) { - tabSize = 1; - } - } - let indentSize = tabSize; - if (config.editor && typeof config.editor.indentSize !== 'undefined' && config.editor.indentSize !== 'tabSize') { - const parsedIndentSize = parseInt(config.editor.indentSize, 10); - if (!isNaN(parsedIndentSize)) { - indentSize = parsedIndentSize; - } - if (indentSize < 1) { - indentSize = 1; - } - } - let insertSpaces = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EDITOR_MODEL_DEFAULTS"].insertSpaces; - if (config.editor && typeof config.editor.insertSpaces !== 'undefined') { - insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces)); - } - let newDefaultEOL = DEFAULT_EOL; - const eol = config.eol; - if (eol === '\r\n') { - newDefaultEOL = 2 /* CRLF */; - } - else if (eol === '\n') { - newDefaultEOL = 1 /* LF */; - } - let trimAutoWhitespace = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EDITOR_MODEL_DEFAULTS"].trimAutoWhitespace; - if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') { - trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace)); - } - let detectIndentation = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EDITOR_MODEL_DEFAULTS"].detectIndentation; - if (config.editor && typeof config.editor.detectIndentation !== 'undefined') { - detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation)); - } - let largeFileOptimizations = _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EDITOR_MODEL_DEFAULTS"].largeFileOptimizations; - if (config.editor && typeof config.editor.largeFileOptimizations !== 'undefined') { - largeFileOptimizations = (config.editor.largeFileOptimizations === 'false' ? false : Boolean(config.editor.largeFileOptimizations)); - } - return { - isForSimpleWidget: isForSimpleWidget, - tabSize: tabSize, - indentSize: indentSize, - insertSpaces: insertSpaces, - detectIndentation: detectIndentation, - defaultEOL: newDefaultEOL, - trimAutoWhitespace: trimAutoWhitespace, - largeFileOptimizations: largeFileOptimizations - }; - } - _getEOL(resource, language) { - if (resource) { - return this._resourcePropertiesService.getEOL(resource, language); - } - const eol = this._configurationService.getValue('files.eol', { overrideIdentifier: language }); - if (eol && eol !== 'auto') { - return eol; - } - return _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["OS"] === 3 /* Linux */ || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["OS"] === 2 /* Macintosh */ ? '\n' : '\r\n'; - } - getCreationOptions(language, resource, isForSimpleWidget) { - let creationOptions = this._modelCreationOptionsByLanguageAndResource[language + resource]; - if (!creationOptions) { - const editor = this._configurationService.getValue('editor', { overrideIdentifier: language, resource }); - const eol = this._getEOL(resource, language); - creationOptions = ModelServiceImpl._readModelOptions({ editor, eol }, isForSimpleWidget); - this._modelCreationOptionsByLanguageAndResource[language + resource] = creationOptions; - } - return creationOptions; - } - _updateModelOptions() { - const oldOptionsByLanguageAndResource = this._modelCreationOptionsByLanguageAndResource; - this._modelCreationOptionsByLanguageAndResource = Object.create(null); - // Update options on all models - const keys = Object.keys(this._models); - for (let i = 0, len = keys.length; i < len; i++) { - const modelId = keys[i]; - const modelData = this._models[modelId]; - const language = modelData.model.getLanguageIdentifier().language; - const uri = modelData.model.uri; - const oldOptions = oldOptionsByLanguageAndResource[language + uri]; - const newOptions = this.getCreationOptions(language, uri, modelData.model.isForSimpleWidget); - ModelServiceImpl._setModelOptionsForModel(modelData.model, newOptions, oldOptions); - } - } - static _setModelOptionsForModel(model, newOptions, currentOptions) { - if (currentOptions && currentOptions.defaultEOL !== newOptions.defaultEOL && model.getLineCount() === 1) { - model.setEOL(newOptions.defaultEOL === 1 /* LF */ ? 0 /* LF */ : 1 /* CRLF */); - } - if (currentOptions - && (currentOptions.detectIndentation === newOptions.detectIndentation) - && (currentOptions.insertSpaces === newOptions.insertSpaces) - && (currentOptions.tabSize === newOptions.tabSize) - && (currentOptions.indentSize === newOptions.indentSize) - && (currentOptions.trimAutoWhitespace === newOptions.trimAutoWhitespace)) { - // Same indent opts, no need to touch the model - return; - } - if (newOptions.detectIndentation) { - model.detectIndentation(newOptions.insertSpaces, newOptions.tabSize); - model.updateOptions({ - trimAutoWhitespace: newOptions.trimAutoWhitespace - }); - } - else { - model.updateOptions({ - insertSpaces: newOptions.insertSpaces, - tabSize: newOptions.tabSize, - indentSize: newOptions.indentSize, - trimAutoWhitespace: newOptions.trimAutoWhitespace - }); - } - } - _removeDisposedModel(resource) { - const disposedModelData = this._disposedModels.get(MODEL_ID(resource)); - if (disposedModelData) { - this._disposedModelsHeapSize -= disposedModelData.heapSize; - } - this._disposedModels.delete(MODEL_ID(resource)); - return disposedModelData; - } - _createModelData(value, languageIdentifier, resource, isForSimpleWidget) { - // create & save the model - const options = this.getCreationOptions(languageIdentifier.language, resource, isForSimpleWidget); - const model = new _model_textModel_js__WEBPACK_IMPORTED_MODULE_5__["TextModel"](value, options, languageIdentifier, resource, this._undoRedoService); - if (resource && this._disposedModels.has(MODEL_ID(resource))) { - const disposedModelData = this._removeDisposedModel(resource); - const elements = this._undoRedoService.getElements(resource); - const sha1IsEqual = (computeModelSha1(model) === disposedModelData.sha1); - if (sha1IsEqual || disposedModelData.sharesUndoRedoStack) { - for (const element of elements.past) { - if (Object(_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__["isEditStackElement"])(element) && element.matchesResource(resource)) { - element.setModel(model); - } - } - for (const element of elements.future) { - if (Object(_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__["isEditStackElement"])(element) && element.matchesResource(resource)) { - element.setModel(model); - } - } - this._undoRedoService.setElementsValidFlag(resource, true, (element) => (Object(_model_editStack_js__WEBPACK_IMPORTED_MODULE_16__["isEditStackElement"])(element) && element.matchesResource(resource))); - if (sha1IsEqual) { - model._overwriteVersionId(disposedModelData.versionId); - model._overwriteAlternativeVersionId(disposedModelData.alternativeVersionId); - model._overwriteInitialUndoRedoSnapshot(disposedModelData.initialUndoRedoSnapshot); - } - } - else { - if (disposedModelData.initialUndoRedoSnapshot !== null) { - this._undoRedoService.restoreSnapshot(disposedModelData.initialUndoRedoSnapshot); - } - } - } - const modelId = MODEL_ID(model.uri); - if (this._models[modelId]) { - // There already exists a model with this id => this is a programmer error - throw new Error('ModelService: Cannot add model because it already exists!'); - } - const modelData = new ModelData(model, (model) => this._onWillDispose(model), (model, e) => this._onDidChangeLanguage(model, e)); - this._models[modelId] = modelData; - return modelData; - } - createModel(value, languageSelection, resource, isForSimpleWidget = false) { - let modelData; - if (languageSelection) { - modelData = this._createModelData(value, languageSelection.languageIdentifier, resource, isForSimpleWidget); - this.setMode(modelData.model, languageSelection); - } - else { - modelData = this._createModelData(value, _modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_7__["PLAINTEXT_LANGUAGE_IDENTIFIER"], resource, isForSimpleWidget); - } - this._onModelAdded.fire(modelData.model); - return modelData.model; - } - setMode(model, languageSelection) { - if (!languageSelection) { - return; - } - const modelData = this._models[MODEL_ID(model.uri)]; - if (!modelData) { - return; - } - modelData.setLanguage(languageSelection); - } - getModels() { - const ret = []; - const keys = Object.keys(this._models); - for (let i = 0, len = keys.length; i < len; i++) { - const modelId = keys[i]; - ret.push(this._models[modelId].model); - } - return ret; - } - getModel(resource) { - const modelId = MODEL_ID(resource); - const modelData = this._models[modelId]; - if (!modelData) { - return null; - } - return modelData.model; - } - getSemanticTokensProviderStyling(provider) { - return this._semanticStyling.get(provider); - } - // --- end IModelService - _onWillDispose(model) { - const modelId = MODEL_ID(model.uri); - const modelData = this._models[modelId]; - delete this._models[modelId]; - modelData.dispose(); - // clean up cache - delete this._modelCreationOptionsByLanguageAndResource[model.getLanguageIdentifier().language + model.uri]; - this._onModelRemoved.fire(model); - } - _onDidChangeLanguage(model, e) { - const oldModeId = e.oldLanguage; - const newModeId = model.getLanguageIdentifier().language; - const oldOptions = this.getCreationOptions(oldModeId, model.uri, model.isForSimpleWidget); - const newOptions = this.getCreationOptions(newModeId, model.uri, model.isForSimpleWidget); - ModelServiceImpl._setModelOptionsForModel(model, newOptions, oldOptions); - this._onModelModeChanged.fire({ model, oldModeId }); - } -}; -ModelServiceImpl = __decorate([ - __param(0, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_9__["IConfigurationService"]), - __param(1, _textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_8__["ITextResourcePropertiesService"]), - __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["IThemeService"]), - __param(3, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_13__["ILogService"]), - __param(4, _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_14__["IUndoRedoService"]) -], ModelServiceImpl); - -const SEMANTIC_HIGHLIGHTING_SETTING_ID = 'editor.semanticHighlighting'; -function isSemanticColoringEnabled(model, themeService, configurationService) { - var _a; - const setting = (_a = configurationService.getValue(SEMANTIC_HIGHLIGHTING_SETTING_ID, { overrideIdentifier: model.getLanguageIdentifier().language, resource: model.uri })) === null || _a === void 0 ? void 0 : _a.enabled; - if (typeof setting === 'boolean') { - return setting; - } - return themeService.getColorTheme().semanticHighlighting; -} -class SemanticColoringFeature extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(modelService, themeService, configurationService, semanticStyling) { - super(); - this._watchers = Object.create(null); - this._semanticStyling = semanticStyling; - const register = (model) => { - this._watchers[model.uri.toString()] = new ModelSemanticColoring(model, themeService, this._semanticStyling); - }; - const deregister = (model, modelSemanticColoring) => { - modelSemanticColoring.dispose(); - delete this._watchers[model.uri.toString()]; - }; - const handleSettingOrThemeChange = () => { - for (let model of modelService.getModels()) { - const curr = this._watchers[model.uri.toString()]; - if (isSemanticColoringEnabled(model, themeService, configurationService)) { - if (!curr) { - register(model); - } - } - else { - if (curr) { - deregister(model, curr); - } - } - } - }; - this._register(modelService.onModelAdded((model) => { - if (isSemanticColoringEnabled(model, themeService, configurationService)) { - register(model); - } - })); - this._register(modelService.onModelRemoved((model) => { - const curr = this._watchers[model.uri.toString()]; - if (curr) { - deregister(model, curr); - } - })); - this._register(configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)) { - handleSettingOrThemeChange(); - } - })); - this._register(themeService.onDidColorThemeChange(handleSettingOrThemeChange)); - } -} -class SemanticStyling extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(_themeService, _logService) { - super(); - this._themeService = _themeService; - this._logService = _logService; - this._caches = new WeakMap(); - this._register(this._themeService.onDidColorThemeChange(() => { - this._caches = new WeakMap(); - })); - } - get(provider) { - if (!this._caches.has(provider)) { - this._caches.set(provider, new _semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_17__["SemanticTokensProviderStyling"](provider.getLegend(), this._themeService, this._logService)); - } - return this._caches.get(provider); - } -} -class SemanticTokensResponse { - constructor(_provider, resultId, data) { - this._provider = _provider; - this.resultId = resultId; - this.data = data; - } - dispose() { - this._provider.releaseDocumentSemanticTokens(this.resultId); - } -} -class ModelSemanticColoring extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(model, themeService, stylingProvider) { - super(); - this._isDisposed = false; - this._model = model; - this._semanticStyling = stylingProvider; - this._fetchDocumentSemanticTokens = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_10__["RunOnceScheduler"](() => this._fetchDocumentSemanticTokensNow(), 300)); - this._currentDocumentResponse = null; - this._currentDocumentRequestCancellationTokenSource = null; - this._documentProvidersChangeListeners = []; - this._register(this._model.onDidChangeContent(() => { - if (!this._fetchDocumentSemanticTokens.isScheduled()) { - this._fetchDocumentSemanticTokens.schedule(); - } - })); - const bindDocumentChangeListeners = () => { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._documentProvidersChangeListeners); - this._documentProvidersChangeListeners = []; - for (const provider of _modes_js__WEBPACK_IMPORTED_MODULE_6__["DocumentSemanticTokensProviderRegistry"].all(model)) { - if (typeof provider.onDidChange === 'function') { - this._documentProvidersChangeListeners.push(provider.onDidChange(() => this._fetchDocumentSemanticTokens.schedule(0))); - } - } - }; - bindDocumentChangeListeners(); - this._register(_modes_js__WEBPACK_IMPORTED_MODULE_6__["DocumentSemanticTokensProviderRegistry"].onDidChange(() => { - bindDocumentChangeListeners(); - this._fetchDocumentSemanticTokens.schedule(); - })); - this._register(themeService.onDidColorThemeChange(_ => { - // clear out existing tokens - this._setDocumentSemanticTokens(null, null, null, []); - this._fetchDocumentSemanticTokens.schedule(); - })); - this._fetchDocumentSemanticTokens.schedule(0); - } - dispose() { - if (this._currentDocumentResponse) { - this._currentDocumentResponse.dispose(); - this._currentDocumentResponse = null; - } - if (this._currentDocumentRequestCancellationTokenSource) { - this._currentDocumentRequestCancellationTokenSource.cancel(); - this._currentDocumentRequestCancellationTokenSource = null; - } - this._setDocumentSemanticTokens(null, null, null, []); - this._isDisposed = true; - super.dispose(); - } - _fetchDocumentSemanticTokensNow() { - if (this._currentDocumentRequestCancellationTokenSource) { - // there is already a request running, let it finish... - return; - } - const provider = this._getSemanticColoringProvider(); - if (!provider) { - return; - } - this._currentDocumentRequestCancellationTokenSource = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_11__["CancellationTokenSource"](); - const pendingChanges = []; - const contentChangeListener = this._model.onDidChangeContent((e) => { - pendingChanges.push(e); - }); - const styling = this._semanticStyling.get(provider); - const lastResultId = this._currentDocumentResponse ? this._currentDocumentResponse.resultId || null : null; - const request = Promise.resolve(provider.provideDocumentSemanticTokens(this._model, lastResultId, this._currentDocumentRequestCancellationTokenSource.token)); - request.then((res) => { - this._currentDocumentRequestCancellationTokenSource = null; - contentChangeListener.dispose(); - this._setDocumentSemanticTokens(provider, res || null, styling, pendingChanges); - }, (err) => { - if (!err || typeof err.message !== 'string' || err.message.indexOf('busy') === -1) { - _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"](err); - } - // Semantic tokens eats up all errors and considers errors to mean that the result is temporarily not available - // The API does not have a special error kind to express this... - this._currentDocumentRequestCancellationTokenSource = null; - contentChangeListener.dispose(); - if (pendingChanges.length > 0) { - // More changes occurred while the request was running - if (!this._fetchDocumentSemanticTokens.isScheduled()) { - this._fetchDocumentSemanticTokens.schedule(); - } - } - }); - } - static _isSemanticTokens(v) { - return v && !!(v.data); - } - static _isSemanticTokensEdits(v) { - return v && Array.isArray(v.edits); - } - static _copy(src, srcOffset, dest, destOffset, length) { - for (let i = 0; i < length; i++) { - dest[destOffset + i] = src[srcOffset + i]; - } - } - _setDocumentSemanticTokens(provider, tokens, styling, pendingChanges) { - const currentResponse = this._currentDocumentResponse; - if (this._currentDocumentResponse) { - this._currentDocumentResponse.dispose(); - this._currentDocumentResponse = null; - } - if (this._isDisposed) { - // disposed! - if (provider && tokens) { - provider.releaseDocumentSemanticTokens(tokens.resultId); - } - return; - } - if (!provider || !styling) { - this._model.setSemanticTokens(null, false); - return; - } - if (!tokens) { - this._model.setSemanticTokens(null, true); - return; - } - if (ModelSemanticColoring._isSemanticTokensEdits(tokens)) { - if (!currentResponse) { - // not possible! - this._model.setSemanticTokens(null, true); - return; - } - if (tokens.edits.length === 0) { - // nothing to do! - tokens = { - resultId: tokens.resultId, - data: currentResponse.data - }; - } - else { - let deltaLength = 0; - for (const edit of tokens.edits) { - deltaLength += (edit.data ? edit.data.length : 0) - edit.deleteCount; - } - const srcData = currentResponse.data; - const destData = new Uint32Array(srcData.length + deltaLength); - let srcLastStart = srcData.length; - let destLastStart = destData.length; - for (let i = tokens.edits.length - 1; i >= 0; i--) { - const edit = tokens.edits[i]; - const copyCount = srcLastStart - (edit.start + edit.deleteCount); - if (copyCount > 0) { - ModelSemanticColoring._copy(srcData, srcLastStart - copyCount, destData, destLastStart - copyCount, copyCount); - destLastStart -= copyCount; - } - if (edit.data) { - ModelSemanticColoring._copy(edit.data, 0, destData, destLastStart - edit.data.length, edit.data.length); - destLastStart -= edit.data.length; - } - srcLastStart = edit.start; - } - if (srcLastStart > 0) { - ModelSemanticColoring._copy(srcData, 0, destData, 0, srcLastStart); - } - tokens = { - resultId: tokens.resultId, - data: destData - }; - } - } - if (ModelSemanticColoring._isSemanticTokens(tokens)) { - this._currentDocumentResponse = new SemanticTokensResponse(provider, tokens.resultId, tokens.data); - const result = Object(_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_17__["toMultilineTokens2"])(tokens, styling, this._model.getLanguageIdentifier()); - // Adjust incoming semantic tokens - if (pendingChanges.length > 0) { - // More changes occurred while the request was running - // We need to: - // 1. Adjust incoming semantic tokens - // 2. Request them again - for (const change of pendingChanges) { - for (const area of result) { - for (const singleChange of change.changes) { - area.applyEdit(singleChange.range, singleChange.text); - } - } - } - if (!this._fetchDocumentSemanticTokens.isScheduled()) { - this._fetchDocumentSemanticTokens.schedule(); - } - } - this._model.setSemanticTokens(result, true); - return; - } - this._model.setSemanticTokens(null, true); - } - _getSemanticColoringProvider() { - const result = _modes_js__WEBPACK_IMPORTED_MODULE_6__["DocumentSemanticTokensProviderRegistry"].ordered(this._model); - return (result.length > 0 ? result[0] : null); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js ***! - \*************************************************************************************/ -/*! exports provided: ITextModelService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITextModelService", function() { return ITextModelService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ITextModelService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('textModelService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js ***! - \***************************************************************************************************/ -/*! exports provided: SemanticTokensProviderStyling, toMultilineTokens2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SemanticTokensProviderStyling", function() { return SemanticTokensProviderStyling; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toMultilineTokens2", function() { return toMultilineTokens2; }); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model/tokensStore.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class SemanticTokensProviderStyling { - constructor(_legend, _themeService, _logService) { - this._legend = _legend; - this._themeService = _themeService; - this._logService = _logService; - this._hashTable = new HashTable(); - } - getMetadata(tokenTypeIndex, tokenModifierSet, languageId) { - const entry = this._hashTable.get(tokenTypeIndex, tokenModifierSet, languageId.id); - let metadata; - if (entry) { - metadata = entry.metadata; - if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__["LogLevel"].Trace) { - this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${tokenTypeIndex} / ${tokenModifierSet}: foreground ${_modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getForeground(metadata)}, fontStyle ${_modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getFontStyle(metadata).toString(2)}`); - } - } - else { - let tokenType = this._legend.tokenTypes[tokenTypeIndex]; - const tokenModifiers = []; - if (tokenType) { - let modifierSet = tokenModifierSet; - for (let modifierIndex = 0; modifierSet > 0 && modifierIndex < this._legend.tokenModifiers.length; modifierIndex++) { - if (modifierSet & 1) { - tokenModifiers.push(this._legend.tokenModifiers[modifierIndex]); - } - modifierSet = modifierSet >> 1; - } - if (modifierSet > 0 && this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__["LogLevel"].Trace) { - this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${tokenModifierSet.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`); - tokenModifiers.push('not-in-legend'); - } - const tokenStyle = this._themeService.getColorTheme().getTokenStyleMetadata(tokenType, tokenModifiers, languageId.language); - if (typeof tokenStyle === 'undefined') { - metadata = 2147483647 /* NO_STYLING */; - } - else { - metadata = 0; - if (typeof tokenStyle.italic !== 'undefined') { - const italicBit = (tokenStyle.italic ? 1 /* Italic */ : 0) << 11 /* FONT_STYLE_OFFSET */; - metadata |= italicBit | 1 /* SEMANTIC_USE_ITALIC */; - } - if (typeof tokenStyle.bold !== 'undefined') { - const boldBit = (tokenStyle.bold ? 2 /* Bold */ : 0) << 11 /* FONT_STYLE_OFFSET */; - metadata |= boldBit | 2 /* SEMANTIC_USE_BOLD */; - } - if (typeof tokenStyle.underline !== 'undefined') { - const underlineBit = (tokenStyle.underline ? 4 /* Underline */ : 0) << 11 /* FONT_STYLE_OFFSET */; - metadata |= underlineBit | 4 /* SEMANTIC_USE_UNDERLINE */; - } - if (tokenStyle.foreground) { - const foregroundBits = (tokenStyle.foreground) << 14 /* FOREGROUND_OFFSET */; - metadata |= foregroundBits | 8 /* SEMANTIC_USE_FOREGROUND */; - } - if (metadata === 0) { - // Nothing! - metadata = 2147483647 /* NO_STYLING */; - } - } - } - else { - if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__["LogLevel"].Trace) { - this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${tokenTypeIndex} for legend: ${JSON.stringify(this._legend.tokenTypes)}`); - } - metadata = 2147483647 /* NO_STYLING */; - tokenType = 'not-in-legend'; - } - this._hashTable.add(tokenTypeIndex, tokenModifierSet, languageId.id, metadata); - if (this._logService.getLevel() === _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_1__["LogLevel"].Trace) { - this._logService.trace(`SemanticTokensProviderStyling ${tokenTypeIndex} (${tokenType}) / ${tokenModifierSet} (${tokenModifiers.join(' ')}): foreground ${_modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getForeground(metadata)}, fontStyle ${_modes_js__WEBPACK_IMPORTED_MODULE_0__["TokenMetadata"].getFontStyle(metadata).toString(2)}`); - } - } - return metadata; - } -} -function toMultilineTokens2(tokens, styling, languageId) { - const srcData = tokens.data; - const tokenCount = (tokens.data.length / 5) | 0; - const tokensPerArea = Math.max(Math.ceil(tokenCount / 1024 /* DesiredMaxAreas */), 400 /* DesiredTokensPerArea */); - const result = []; - let tokenIndex = 0; - let lastLineNumber = 1; - let lastStartCharacter = 0; - while (tokenIndex < tokenCount) { - const tokenStartIndex = tokenIndex; - let tokenEndIndex = Math.min(tokenStartIndex + tokensPerArea, tokenCount); - // Keep tokens on the same line in the same area... - if (tokenEndIndex < tokenCount) { - let smallTokenEndIndex = tokenEndIndex; - while (smallTokenEndIndex - 1 > tokenStartIndex && srcData[5 * smallTokenEndIndex] === 0) { - smallTokenEndIndex--; - } - if (smallTokenEndIndex - 1 === tokenStartIndex) { - // there are so many tokens on this line that our area would be empty, we must now go right - let bigTokenEndIndex = tokenEndIndex; - while (bigTokenEndIndex + 1 < tokenCount && srcData[5 * bigTokenEndIndex] === 0) { - bigTokenEndIndex++; - } - tokenEndIndex = bigTokenEndIndex; - } - else { - tokenEndIndex = smallTokenEndIndex; - } - } - let destData = new Uint32Array((tokenEndIndex - tokenStartIndex) * 4); - let destOffset = 0; - let areaLine = 0; - while (tokenIndex < tokenEndIndex) { - const srcOffset = 5 * tokenIndex; - const deltaLine = srcData[srcOffset]; - const deltaCharacter = srcData[srcOffset + 1]; - const lineNumber = lastLineNumber + deltaLine; - const startCharacter = (deltaLine === 0 ? lastStartCharacter + deltaCharacter : deltaCharacter); - const length = srcData[srcOffset + 2]; - const tokenTypeIndex = srcData[srcOffset + 3]; - const tokenModifierSet = srcData[srcOffset + 4]; - const metadata = styling.getMetadata(tokenTypeIndex, tokenModifierSet, languageId); - if (metadata !== 2147483647 /* NO_STYLING */) { - if (areaLine === 0) { - areaLine = lineNumber; - } - destData[destOffset] = lineNumber - areaLine; - destData[destOffset + 1] = startCharacter; - destData[destOffset + 2] = startCharacter + length; - destData[destOffset + 3] = metadata; - destOffset += 4; - } - lastLineNumber = lineNumber; - lastStartCharacter = startCharacter; - tokenIndex++; - } - if (destOffset !== destData.length) { - destData = destData.subarray(0, destOffset); - } - const tokens = new _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__["MultilineTokens2"](areaLine, new _model_tokensStore_js__WEBPACK_IMPORTED_MODULE_2__["SparseEncodedTokens"](destData)); - result.push(tokens); - } - return result; -} -class HashTableEntry { - constructor(tokenTypeIndex, tokenModifierSet, languageId, metadata) { - this.tokenTypeIndex = tokenTypeIndex; - this.tokenModifierSet = tokenModifierSet; - this.languageId = languageId; - this.metadata = metadata; - this.next = null; - } -} -class HashTable { - constructor() { - this._elementsCount = 0; - this._currentLengthIndex = 0; - this._currentLength = HashTable._SIZES[this._currentLengthIndex]; - this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0); - this._elements = []; - HashTable._nullOutEntries(this._elements, this._currentLength); - } - static _nullOutEntries(entries, length) { - for (let i = 0; i < length; i++) { - entries[i] = null; - } - } - _hash2(n1, n2) { - return (((n1 << 5) - n1) + n2) | 0; // n1 * 31 + n2, keep as int32 - } - _hashFunc(tokenTypeIndex, tokenModifierSet, languageId) { - return this._hash2(this._hash2(tokenTypeIndex, tokenModifierSet), languageId) % this._currentLength; - } - get(tokenTypeIndex, tokenModifierSet, languageId) { - const hash = this._hashFunc(tokenTypeIndex, tokenModifierSet, languageId); - let p = this._elements[hash]; - while (p) { - if (p.tokenTypeIndex === tokenTypeIndex && p.tokenModifierSet === tokenModifierSet && p.languageId === languageId) { - return p; - } - p = p.next; - } - return null; - } - add(tokenTypeIndex, tokenModifierSet, languageId, metadata) { - this._elementsCount++; - if (this._growCount !== 0 && this._elementsCount >= this._growCount) { - // expand! - const oldElements = this._elements; - this._currentLengthIndex++; - this._currentLength = HashTable._SIZES[this._currentLengthIndex]; - this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0); - this._elements = []; - HashTable._nullOutEntries(this._elements, this._currentLength); - for (const first of oldElements) { - let p = first; - while (p) { - const oldNext = p.next; - p.next = null; - this._add(p); - p = oldNext; - } - } - } - this._add(new HashTableEntry(tokenTypeIndex, tokenModifierSet, languageId, metadata)); - } - _add(element) { - const hash = this._hashFunc(element.tokenTypeIndex, element.tokenModifierSet, element.languageId); - element.next = this._elements[hash]; - this._elements[hash] = element; - } -} -HashTable._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143]; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js": -/*!******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js ***! - \******************************************************************************************************/ -/*! exports provided: ITextResourceConfigurationService, ITextResourcePropertiesService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITextResourceConfigurationService", function() { return ITextResourceConfigurationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITextResourcePropertiesService", function() { return ITextResourcePropertiesService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); - -const ITextResourceConfigurationService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('textResourceConfigurationService'); -const ITextResourcePropertiesService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('textResourcePropertiesService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js ***! - \*******************************************************************************/ -/*! exports provided: createWebWorker */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createWebWorker", function() { return createWebWorker; }); -/* harmony import */ var _editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editorWorkerServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/** - * Create a new web worker that has model syncing capabilities built in. - * Specify an AMD module to load that will `create` an object that will be proxied. - */ -function createWebWorker(modelService, opts) { - return new MonacoWebWorkerImpl(modelService, opts); -} -class MonacoWebWorkerImpl extends _editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_0__["EditorWorkerClient"] { - constructor(modelService, opts) { - super(modelService, opts.keepIdleModels || false, opts.label); - this._foreignModuleId = opts.moduleId; - this._foreignModuleCreateData = opts.createData || null; - this._foreignModuleHost = opts.host || null; - this._foreignProxy = null; - } - // foreign host request - fhr(method, args) { - if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') { - return Promise.reject(new Error('Missing method ' + method + ' or missing main thread foreign host.')); - } - try { - return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost, args)); - } - catch (e) { - return Promise.reject(e); - } - } - _getForeignProxy() { - if (!this._foreignProxy) { - this._foreignProxy = this._getProxy().then((proxy) => { - const foreignHostMethods = this._foreignModuleHost ? _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["getAllMethodNames"](this._foreignModuleHost) : []; - return proxy.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, foreignHostMethods).then((foreignMethods) => { - this._foreignModuleCreateData = null; - const proxyMethodRequest = (method, args) => { - return proxy.fmr(method, args); - }; - const createProxyMethod = (method, proxyMethodRequest) => { - return function () { - const args = Array.prototype.slice.call(arguments, 0); - return proxyMethodRequest(method, args); - }; - }; - let foreignProxy = {}; - for (const foreignMethod of foreignMethods) { - foreignProxy[foreignMethod] = createProxyMethod(foreignMethod, proxyMethodRequest); - } - return foreignProxy; - }); - }); - } - return this._foreignProxy; - } - getProxy() { - return this._getForeignProxy(); - } - withSyncedResources(resources) { - return this._withSyncedResources(resources).then(_ => this.getProxy()); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js ***! - \**************************************************************************************/ -/*! exports provided: KeyMod, createMonacoBaseAPI */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyMod", function() { return KeyMod; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMonacoBaseAPI", function() { return createMonacoBaseAPI; }); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _core_token_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/token.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js"); -/* harmony import */ var _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./standaloneEnums.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - -class KeyMod { - static chord(firstPart, secondPart) { - return Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["KeyChord"])(firstPart, secondPart); - } -} -KeyMod.CtrlCmd = 2048 /* CtrlCmd */; -KeyMod.Shift = 1024 /* Shift */; -KeyMod.Alt = 512 /* Alt */; -KeyMod.WinCtrl = 256 /* WinCtrl */; -function createMonacoBaseAPI() { - return { - editor: undefined, - languages: undefined, - CancellationTokenSource: _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationTokenSource"], - Emitter: _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"], - KeyCode: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__["KeyCode"], - KeyMod: KeyMod, - Position: _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"], - Range: _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"], - Selection: _core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"], - SelectionDirection: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__["SelectionDirection"], - MarkerSeverity: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__["MarkerSeverity"], - MarkerTag: _standaloneEnums_js__WEBPACK_IMPORTED_MODULE_8__["MarkerTag"], - Uri: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"], - Token: _core_token_js__WEBPACK_IMPORTED_MODULE_7__["Token"] - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js ***! - \***************************************************************************************/ -/*! exports provided: AccessibilitySupport, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemTag, CompletionTriggerKind, ContentWidgetPositionPreference, CursorChangeReason, DefaultEndOfLine, DocumentHighlightKind, EditorAutoIndentStrategy, EditorOption, EndOfLinePreference, EndOfLineSequence, IndentAction, KeyCode, MarkerSeverity, MarkerTag, MinimapPosition, MouseTargetType, OverlayWidgetPositionPreference, OverviewRulerLane, RenderLineNumbersType, RenderMinimap, ScrollType, ScrollbarVisibility, SelectionDirection, SignatureHelpTriggerKind, SymbolKind, SymbolTag, TextEditorCursorBlinkingStyle, TextEditorCursorStyle, TrackedRangeStickiness, WrappingIndent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccessibilitySupport", function() { return AccessibilitySupport; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemInsertTextRule", function() { return CompletionItemInsertTextRule; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionTriggerKind", function() { return CompletionTriggerKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentWidgetPositionPreference", function() { return ContentWidgetPositionPreference; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorChangeReason", function() { return CursorChangeReason; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultEndOfLine", function() { return DefaultEndOfLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorAutoIndentStrategy", function() { return EditorAutoIndentStrategy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorOption", function() { return EditorOption; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EndOfLinePreference", function() { return EndOfLinePreference; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EndOfLineSequence", function() { return EndOfLineSequence; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentAction", function() { return IndentAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return KeyCode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerSeverity", function() { return MarkerSeverity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerTag", function() { return MarkerTag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapPosition", function() { return MinimapPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseTargetType", function() { return MouseTargetType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayWidgetPositionPreference", function() { return OverlayWidgetPositionPreference; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverviewRulerLane", function() { return OverviewRulerLane; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderLineNumbersType", function() { return RenderLineNumbersType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderMinimap", function() { return RenderMinimap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollType", function() { return ScrollType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarVisibility", function() { return ScrollbarVisibility; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionDirection", function() { return SelectionDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureHelpTriggerKind", function() { return SignatureHelpTriggerKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEditorCursorBlinkingStyle", function() { return TextEditorCursorBlinkingStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEditorCursorStyle", function() { return TextEditorCursorStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrackedRangeStickiness", function() { return TrackedRangeStickiness; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrappingIndent", function() { return WrappingIndent; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. -var AccessibilitySupport; -(function (AccessibilitySupport) { - /** - * This should be the browser case where it is not known if a screen reader is attached or no. - */ - AccessibilitySupport[AccessibilitySupport["Unknown"] = 0] = "Unknown"; - AccessibilitySupport[AccessibilitySupport["Disabled"] = 1] = "Disabled"; - AccessibilitySupport[AccessibilitySupport["Enabled"] = 2] = "Enabled"; -})(AccessibilitySupport || (AccessibilitySupport = {})); -var CompletionItemInsertTextRule; -(function (CompletionItemInsertTextRule) { - /** - * Adjust whitespace/indentation of multiline insert texts to - * match the current line indentation. - */ - CompletionItemInsertTextRule[CompletionItemInsertTextRule["KeepWhitespace"] = 1] = "KeepWhitespace"; - /** - * `insertText` is a snippet. - */ - CompletionItemInsertTextRule[CompletionItemInsertTextRule["InsertAsSnippet"] = 4] = "InsertAsSnippet"; -})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {})); -var CompletionItemKind; -(function (CompletionItemKind) { - CompletionItemKind[CompletionItemKind["Method"] = 0] = "Method"; - CompletionItemKind[CompletionItemKind["Function"] = 1] = "Function"; - CompletionItemKind[CompletionItemKind["Constructor"] = 2] = "Constructor"; - CompletionItemKind[CompletionItemKind["Field"] = 3] = "Field"; - CompletionItemKind[CompletionItemKind["Variable"] = 4] = "Variable"; - CompletionItemKind[CompletionItemKind["Class"] = 5] = "Class"; - CompletionItemKind[CompletionItemKind["Struct"] = 6] = "Struct"; - CompletionItemKind[CompletionItemKind["Interface"] = 7] = "Interface"; - CompletionItemKind[CompletionItemKind["Module"] = 8] = "Module"; - CompletionItemKind[CompletionItemKind["Property"] = 9] = "Property"; - CompletionItemKind[CompletionItemKind["Event"] = 10] = "Event"; - CompletionItemKind[CompletionItemKind["Operator"] = 11] = "Operator"; - CompletionItemKind[CompletionItemKind["Unit"] = 12] = "Unit"; - CompletionItemKind[CompletionItemKind["Value"] = 13] = "Value"; - CompletionItemKind[CompletionItemKind["Constant"] = 14] = "Constant"; - CompletionItemKind[CompletionItemKind["Enum"] = 15] = "Enum"; - CompletionItemKind[CompletionItemKind["EnumMember"] = 16] = "EnumMember"; - CompletionItemKind[CompletionItemKind["Keyword"] = 17] = "Keyword"; - CompletionItemKind[CompletionItemKind["Text"] = 18] = "Text"; - CompletionItemKind[CompletionItemKind["Color"] = 19] = "Color"; - CompletionItemKind[CompletionItemKind["File"] = 20] = "File"; - CompletionItemKind[CompletionItemKind["Reference"] = 21] = "Reference"; - CompletionItemKind[CompletionItemKind["Customcolor"] = 22] = "Customcolor"; - CompletionItemKind[CompletionItemKind["Folder"] = 23] = "Folder"; - CompletionItemKind[CompletionItemKind["TypeParameter"] = 24] = "TypeParameter"; - CompletionItemKind[CompletionItemKind["User"] = 25] = "User"; - CompletionItemKind[CompletionItemKind["Issue"] = 26] = "Issue"; - CompletionItemKind[CompletionItemKind["Snippet"] = 27] = "Snippet"; -})(CompletionItemKind || (CompletionItemKind = {})); -var CompletionItemTag; -(function (CompletionItemTag) { - CompletionItemTag[CompletionItemTag["Deprecated"] = 1] = "Deprecated"; -})(CompletionItemTag || (CompletionItemTag = {})); -/** - * How a suggest provider was triggered. - */ -var CompletionTriggerKind; -(function (CompletionTriggerKind) { - CompletionTriggerKind[CompletionTriggerKind["Invoke"] = 0] = "Invoke"; - CompletionTriggerKind[CompletionTriggerKind["TriggerCharacter"] = 1] = "TriggerCharacter"; - CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions"; -})(CompletionTriggerKind || (CompletionTriggerKind = {})); -/** - * A positioning preference for rendering content widgets. - */ -var ContentWidgetPositionPreference; -(function (ContentWidgetPositionPreference) { - /** - * Place the content widget exactly at a position - */ - ContentWidgetPositionPreference[ContentWidgetPositionPreference["EXACT"] = 0] = "EXACT"; - /** - * Place the content widget above a position - */ - ContentWidgetPositionPreference[ContentWidgetPositionPreference["ABOVE"] = 1] = "ABOVE"; - /** - * Place the content widget below a position - */ - ContentWidgetPositionPreference[ContentWidgetPositionPreference["BELOW"] = 2] = "BELOW"; -})(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {})); -/** - * Describes the reason the cursor has changed its position. - */ -var CursorChangeReason; -(function (CursorChangeReason) { - /** - * Unknown or not set. - */ - CursorChangeReason[CursorChangeReason["NotSet"] = 0] = "NotSet"; - /** - * A `model.setValue()` was called. - */ - CursorChangeReason[CursorChangeReason["ContentFlush"] = 1] = "ContentFlush"; - /** - * The `model` has been changed outside of this cursor and the cursor recovers its position from associated markers. - */ - CursorChangeReason[CursorChangeReason["RecoverFromMarkers"] = 2] = "RecoverFromMarkers"; - /** - * There was an explicit user gesture. - */ - CursorChangeReason[CursorChangeReason["Explicit"] = 3] = "Explicit"; - /** - * There was a Paste. - */ - CursorChangeReason[CursorChangeReason["Paste"] = 4] = "Paste"; - /** - * There was an Undo. - */ - CursorChangeReason[CursorChangeReason["Undo"] = 5] = "Undo"; - /** - * There was a Redo. - */ - CursorChangeReason[CursorChangeReason["Redo"] = 6] = "Redo"; -})(CursorChangeReason || (CursorChangeReason = {})); -/** - * The default end of line to use when instantiating models. - */ -var DefaultEndOfLine; -(function (DefaultEndOfLine) { - /** - * Use line feed (\n) as the end of line character. - */ - DefaultEndOfLine[DefaultEndOfLine["LF"] = 1] = "LF"; - /** - * Use carriage return and line feed (\r\n) as the end of line character. - */ - DefaultEndOfLine[DefaultEndOfLine["CRLF"] = 2] = "CRLF"; -})(DefaultEndOfLine || (DefaultEndOfLine = {})); -/** - * A document highlight kind. - */ -var DocumentHighlightKind; -(function (DocumentHighlightKind) { - /** - * A textual occurrence. - */ - DocumentHighlightKind[DocumentHighlightKind["Text"] = 0] = "Text"; - /** - * Read-access of a symbol, like reading a variable. - */ - DocumentHighlightKind[DocumentHighlightKind["Read"] = 1] = "Read"; - /** - * Write-access of a symbol, like writing to a variable. - */ - DocumentHighlightKind[DocumentHighlightKind["Write"] = 2] = "Write"; -})(DocumentHighlightKind || (DocumentHighlightKind = {})); -/** - * Configuration options for auto indentation in the editor - */ -var EditorAutoIndentStrategy; -(function (EditorAutoIndentStrategy) { - EditorAutoIndentStrategy[EditorAutoIndentStrategy["None"] = 0] = "None"; - EditorAutoIndentStrategy[EditorAutoIndentStrategy["Keep"] = 1] = "Keep"; - EditorAutoIndentStrategy[EditorAutoIndentStrategy["Brackets"] = 2] = "Brackets"; - EditorAutoIndentStrategy[EditorAutoIndentStrategy["Advanced"] = 3] = "Advanced"; - EditorAutoIndentStrategy[EditorAutoIndentStrategy["Full"] = 4] = "Full"; -})(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {})); -var EditorOption; -(function (EditorOption) { - EditorOption[EditorOption["acceptSuggestionOnCommitCharacter"] = 0] = "acceptSuggestionOnCommitCharacter"; - EditorOption[EditorOption["acceptSuggestionOnEnter"] = 1] = "acceptSuggestionOnEnter"; - EditorOption[EditorOption["accessibilitySupport"] = 2] = "accessibilitySupport"; - EditorOption[EditorOption["accessibilityPageSize"] = 3] = "accessibilityPageSize"; - EditorOption[EditorOption["ariaLabel"] = 4] = "ariaLabel"; - EditorOption[EditorOption["autoClosingBrackets"] = 5] = "autoClosingBrackets"; - EditorOption[EditorOption["autoClosingOvertype"] = 6] = "autoClosingOvertype"; - EditorOption[EditorOption["autoClosingQuotes"] = 7] = "autoClosingQuotes"; - EditorOption[EditorOption["autoIndent"] = 8] = "autoIndent"; - EditorOption[EditorOption["automaticLayout"] = 9] = "automaticLayout"; - EditorOption[EditorOption["autoSurround"] = 10] = "autoSurround"; - EditorOption[EditorOption["codeLens"] = 11] = "codeLens"; - EditorOption[EditorOption["colorDecorators"] = 12] = "colorDecorators"; - EditorOption[EditorOption["columnSelection"] = 13] = "columnSelection"; - EditorOption[EditorOption["comments"] = 14] = "comments"; - EditorOption[EditorOption["contextmenu"] = 15] = "contextmenu"; - EditorOption[EditorOption["copyWithSyntaxHighlighting"] = 16] = "copyWithSyntaxHighlighting"; - EditorOption[EditorOption["cursorBlinking"] = 17] = "cursorBlinking"; - EditorOption[EditorOption["cursorSmoothCaretAnimation"] = 18] = "cursorSmoothCaretAnimation"; - EditorOption[EditorOption["cursorStyle"] = 19] = "cursorStyle"; - EditorOption[EditorOption["cursorSurroundingLines"] = 20] = "cursorSurroundingLines"; - EditorOption[EditorOption["cursorSurroundingLinesStyle"] = 21] = "cursorSurroundingLinesStyle"; - EditorOption[EditorOption["cursorWidth"] = 22] = "cursorWidth"; - EditorOption[EditorOption["disableLayerHinting"] = 23] = "disableLayerHinting"; - EditorOption[EditorOption["disableMonospaceOptimizations"] = 24] = "disableMonospaceOptimizations"; - EditorOption[EditorOption["dragAndDrop"] = 25] = "dragAndDrop"; - EditorOption[EditorOption["emptySelectionClipboard"] = 26] = "emptySelectionClipboard"; - EditorOption[EditorOption["extraEditorClassName"] = 27] = "extraEditorClassName"; - EditorOption[EditorOption["fastScrollSensitivity"] = 28] = "fastScrollSensitivity"; - EditorOption[EditorOption["find"] = 29] = "find"; - EditorOption[EditorOption["fixedOverflowWidgets"] = 30] = "fixedOverflowWidgets"; - EditorOption[EditorOption["folding"] = 31] = "folding"; - EditorOption[EditorOption["foldingStrategy"] = 32] = "foldingStrategy"; - EditorOption[EditorOption["foldingHighlight"] = 33] = "foldingHighlight"; - EditorOption[EditorOption["unfoldOnClickAfterEndOfLine"] = 34] = "unfoldOnClickAfterEndOfLine"; - EditorOption[EditorOption["fontFamily"] = 35] = "fontFamily"; - EditorOption[EditorOption["fontInfo"] = 36] = "fontInfo"; - EditorOption[EditorOption["fontLigatures"] = 37] = "fontLigatures"; - EditorOption[EditorOption["fontSize"] = 38] = "fontSize"; - EditorOption[EditorOption["fontWeight"] = 39] = "fontWeight"; - EditorOption[EditorOption["formatOnPaste"] = 40] = "formatOnPaste"; - EditorOption[EditorOption["formatOnType"] = 41] = "formatOnType"; - EditorOption[EditorOption["glyphMargin"] = 42] = "glyphMargin"; - EditorOption[EditorOption["gotoLocation"] = 43] = "gotoLocation"; - EditorOption[EditorOption["hideCursorInOverviewRuler"] = 44] = "hideCursorInOverviewRuler"; - EditorOption[EditorOption["highlightActiveIndentGuide"] = 45] = "highlightActiveIndentGuide"; - EditorOption[EditorOption["hover"] = 46] = "hover"; - EditorOption[EditorOption["inDiffEditor"] = 47] = "inDiffEditor"; - EditorOption[EditorOption["letterSpacing"] = 48] = "letterSpacing"; - EditorOption[EditorOption["lightbulb"] = 49] = "lightbulb"; - EditorOption[EditorOption["lineDecorationsWidth"] = 50] = "lineDecorationsWidth"; - EditorOption[EditorOption["lineHeight"] = 51] = "lineHeight"; - EditorOption[EditorOption["lineNumbers"] = 52] = "lineNumbers"; - EditorOption[EditorOption["lineNumbersMinChars"] = 53] = "lineNumbersMinChars"; - EditorOption[EditorOption["links"] = 54] = "links"; - EditorOption[EditorOption["matchBrackets"] = 55] = "matchBrackets"; - EditorOption[EditorOption["minimap"] = 56] = "minimap"; - EditorOption[EditorOption["mouseStyle"] = 57] = "mouseStyle"; - EditorOption[EditorOption["mouseWheelScrollSensitivity"] = 58] = "mouseWheelScrollSensitivity"; - EditorOption[EditorOption["mouseWheelZoom"] = 59] = "mouseWheelZoom"; - EditorOption[EditorOption["multiCursorMergeOverlapping"] = 60] = "multiCursorMergeOverlapping"; - EditorOption[EditorOption["multiCursorModifier"] = 61] = "multiCursorModifier"; - EditorOption[EditorOption["multiCursorPaste"] = 62] = "multiCursorPaste"; - EditorOption[EditorOption["occurrencesHighlight"] = 63] = "occurrencesHighlight"; - EditorOption[EditorOption["overviewRulerBorder"] = 64] = "overviewRulerBorder"; - EditorOption[EditorOption["overviewRulerLanes"] = 65] = "overviewRulerLanes"; - EditorOption[EditorOption["padding"] = 66] = "padding"; - EditorOption[EditorOption["parameterHints"] = 67] = "parameterHints"; - EditorOption[EditorOption["peekWidgetDefaultFocus"] = 68] = "peekWidgetDefaultFocus"; - EditorOption[EditorOption["definitionLinkOpensInPeek"] = 69] = "definitionLinkOpensInPeek"; - EditorOption[EditorOption["quickSuggestions"] = 70] = "quickSuggestions"; - EditorOption[EditorOption["quickSuggestionsDelay"] = 71] = "quickSuggestionsDelay"; - EditorOption[EditorOption["readOnly"] = 72] = "readOnly"; - EditorOption[EditorOption["renameOnType"] = 73] = "renameOnType"; - EditorOption[EditorOption["renderControlCharacters"] = 74] = "renderControlCharacters"; - EditorOption[EditorOption["renderIndentGuides"] = 75] = "renderIndentGuides"; - EditorOption[EditorOption["renderFinalNewline"] = 76] = "renderFinalNewline"; - EditorOption[EditorOption["renderLineHighlight"] = 77] = "renderLineHighlight"; - EditorOption[EditorOption["renderLineHighlightOnlyWhenFocus"] = 78] = "renderLineHighlightOnlyWhenFocus"; - EditorOption[EditorOption["renderValidationDecorations"] = 79] = "renderValidationDecorations"; - EditorOption[EditorOption["renderWhitespace"] = 80] = "renderWhitespace"; - EditorOption[EditorOption["revealHorizontalRightPadding"] = 81] = "revealHorizontalRightPadding"; - EditorOption[EditorOption["roundedSelection"] = 82] = "roundedSelection"; - EditorOption[EditorOption["rulers"] = 83] = "rulers"; - EditorOption[EditorOption["scrollbar"] = 84] = "scrollbar"; - EditorOption[EditorOption["scrollBeyondLastColumn"] = 85] = "scrollBeyondLastColumn"; - EditorOption[EditorOption["scrollBeyondLastLine"] = 86] = "scrollBeyondLastLine"; - EditorOption[EditorOption["scrollPredominantAxis"] = 87] = "scrollPredominantAxis"; - EditorOption[EditorOption["selectionClipboard"] = 88] = "selectionClipboard"; - EditorOption[EditorOption["selectionHighlight"] = 89] = "selectionHighlight"; - EditorOption[EditorOption["selectOnLineNumbers"] = 90] = "selectOnLineNumbers"; - EditorOption[EditorOption["showFoldingControls"] = 91] = "showFoldingControls"; - EditorOption[EditorOption["showUnused"] = 92] = "showUnused"; - EditorOption[EditorOption["snippetSuggestions"] = 93] = "snippetSuggestions"; - EditorOption[EditorOption["smoothScrolling"] = 94] = "smoothScrolling"; - EditorOption[EditorOption["stopRenderingLineAfter"] = 95] = "stopRenderingLineAfter"; - EditorOption[EditorOption["suggest"] = 96] = "suggest"; - EditorOption[EditorOption["suggestFontSize"] = 97] = "suggestFontSize"; - EditorOption[EditorOption["suggestLineHeight"] = 98] = "suggestLineHeight"; - EditorOption[EditorOption["suggestOnTriggerCharacters"] = 99] = "suggestOnTriggerCharacters"; - EditorOption[EditorOption["suggestSelection"] = 100] = "suggestSelection"; - EditorOption[EditorOption["tabCompletion"] = 101] = "tabCompletion"; - EditorOption[EditorOption["tabIndex"] = 102] = "tabIndex"; - EditorOption[EditorOption["unusualLineTerminators"] = 103] = "unusualLineTerminators"; - EditorOption[EditorOption["useTabStops"] = 104] = "useTabStops"; - EditorOption[EditorOption["wordSeparators"] = 105] = "wordSeparators"; - EditorOption[EditorOption["wordWrap"] = 106] = "wordWrap"; - EditorOption[EditorOption["wordWrapBreakAfterCharacters"] = 107] = "wordWrapBreakAfterCharacters"; - EditorOption[EditorOption["wordWrapBreakBeforeCharacters"] = 108] = "wordWrapBreakBeforeCharacters"; - EditorOption[EditorOption["wordWrapColumn"] = 109] = "wordWrapColumn"; - EditorOption[EditorOption["wordWrapMinified"] = 110] = "wordWrapMinified"; - EditorOption[EditorOption["wrappingIndent"] = 111] = "wrappingIndent"; - EditorOption[EditorOption["wrappingStrategy"] = 112] = "wrappingStrategy"; - EditorOption[EditorOption["showDeprecated"] = 113] = "showDeprecated"; - EditorOption[EditorOption["editorClassName"] = 114] = "editorClassName"; - EditorOption[EditorOption["pixelRatio"] = 115] = "pixelRatio"; - EditorOption[EditorOption["tabFocusMode"] = 116] = "tabFocusMode"; - EditorOption[EditorOption["layoutInfo"] = 117] = "layoutInfo"; - EditorOption[EditorOption["wrappingInfo"] = 118] = "wrappingInfo"; -})(EditorOption || (EditorOption = {})); -/** - * End of line character preference. - */ -var EndOfLinePreference; -(function (EndOfLinePreference) { - /** - * Use the end of line character identified in the text buffer. - */ - EndOfLinePreference[EndOfLinePreference["TextDefined"] = 0] = "TextDefined"; - /** - * Use line feed (\n) as the end of line character. - */ - EndOfLinePreference[EndOfLinePreference["LF"] = 1] = "LF"; - /** - * Use carriage return and line feed (\r\n) as the end of line character. - */ - EndOfLinePreference[EndOfLinePreference["CRLF"] = 2] = "CRLF"; -})(EndOfLinePreference || (EndOfLinePreference = {})); -/** - * End of line character preference. - */ -var EndOfLineSequence; -(function (EndOfLineSequence) { - /** - * Use line feed (\n) as the end of line character. - */ - EndOfLineSequence[EndOfLineSequence["LF"] = 0] = "LF"; - /** - * Use carriage return and line feed (\r\n) as the end of line character. - */ - EndOfLineSequence[EndOfLineSequence["CRLF"] = 1] = "CRLF"; -})(EndOfLineSequence || (EndOfLineSequence = {})); -/** - * Describes what to do with the indentation when pressing Enter. - */ -var IndentAction; -(function (IndentAction) { - /** - * Insert new line and copy the previous line's indentation. - */ - IndentAction[IndentAction["None"] = 0] = "None"; - /** - * Insert new line and indent once (relative to the previous line's indentation). - */ - IndentAction[IndentAction["Indent"] = 1] = "Indent"; - /** - * Insert two new lines: - * - the first one indented which will hold the cursor - * - the second one at the same indentation level - */ - IndentAction[IndentAction["IndentOutdent"] = 2] = "IndentOutdent"; - /** - * Insert new line and outdent once (relative to the previous line's indentation). - */ - IndentAction[IndentAction["Outdent"] = 3] = "Outdent"; -})(IndentAction || (IndentAction = {})); -/** - * Virtual Key Codes, the value does not hold any inherent meaning. - * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx - * But these are "more general", as they should work across browsers & OS`s. - */ -var KeyCode; -(function (KeyCode) { - /** - * Placed first to cover the 0 value of the enum. - */ - KeyCode[KeyCode["Unknown"] = 0] = "Unknown"; - KeyCode[KeyCode["Backspace"] = 1] = "Backspace"; - KeyCode[KeyCode["Tab"] = 2] = "Tab"; - KeyCode[KeyCode["Enter"] = 3] = "Enter"; - KeyCode[KeyCode["Shift"] = 4] = "Shift"; - KeyCode[KeyCode["Ctrl"] = 5] = "Ctrl"; - KeyCode[KeyCode["Alt"] = 6] = "Alt"; - KeyCode[KeyCode["PauseBreak"] = 7] = "PauseBreak"; - KeyCode[KeyCode["CapsLock"] = 8] = "CapsLock"; - KeyCode[KeyCode["Escape"] = 9] = "Escape"; - KeyCode[KeyCode["Space"] = 10] = "Space"; - KeyCode[KeyCode["PageUp"] = 11] = "PageUp"; - KeyCode[KeyCode["PageDown"] = 12] = "PageDown"; - KeyCode[KeyCode["End"] = 13] = "End"; - KeyCode[KeyCode["Home"] = 14] = "Home"; - KeyCode[KeyCode["LeftArrow"] = 15] = "LeftArrow"; - KeyCode[KeyCode["UpArrow"] = 16] = "UpArrow"; - KeyCode[KeyCode["RightArrow"] = 17] = "RightArrow"; - KeyCode[KeyCode["DownArrow"] = 18] = "DownArrow"; - KeyCode[KeyCode["Insert"] = 19] = "Insert"; - KeyCode[KeyCode["Delete"] = 20] = "Delete"; - KeyCode[KeyCode["KEY_0"] = 21] = "KEY_0"; - KeyCode[KeyCode["KEY_1"] = 22] = "KEY_1"; - KeyCode[KeyCode["KEY_2"] = 23] = "KEY_2"; - KeyCode[KeyCode["KEY_3"] = 24] = "KEY_3"; - KeyCode[KeyCode["KEY_4"] = 25] = "KEY_4"; - KeyCode[KeyCode["KEY_5"] = 26] = "KEY_5"; - KeyCode[KeyCode["KEY_6"] = 27] = "KEY_6"; - KeyCode[KeyCode["KEY_7"] = 28] = "KEY_7"; - KeyCode[KeyCode["KEY_8"] = 29] = "KEY_8"; - KeyCode[KeyCode["KEY_9"] = 30] = "KEY_9"; - KeyCode[KeyCode["KEY_A"] = 31] = "KEY_A"; - KeyCode[KeyCode["KEY_B"] = 32] = "KEY_B"; - KeyCode[KeyCode["KEY_C"] = 33] = "KEY_C"; - KeyCode[KeyCode["KEY_D"] = 34] = "KEY_D"; - KeyCode[KeyCode["KEY_E"] = 35] = "KEY_E"; - KeyCode[KeyCode["KEY_F"] = 36] = "KEY_F"; - KeyCode[KeyCode["KEY_G"] = 37] = "KEY_G"; - KeyCode[KeyCode["KEY_H"] = 38] = "KEY_H"; - KeyCode[KeyCode["KEY_I"] = 39] = "KEY_I"; - KeyCode[KeyCode["KEY_J"] = 40] = "KEY_J"; - KeyCode[KeyCode["KEY_K"] = 41] = "KEY_K"; - KeyCode[KeyCode["KEY_L"] = 42] = "KEY_L"; - KeyCode[KeyCode["KEY_M"] = 43] = "KEY_M"; - KeyCode[KeyCode["KEY_N"] = 44] = "KEY_N"; - KeyCode[KeyCode["KEY_O"] = 45] = "KEY_O"; - KeyCode[KeyCode["KEY_P"] = 46] = "KEY_P"; - KeyCode[KeyCode["KEY_Q"] = 47] = "KEY_Q"; - KeyCode[KeyCode["KEY_R"] = 48] = "KEY_R"; - KeyCode[KeyCode["KEY_S"] = 49] = "KEY_S"; - KeyCode[KeyCode["KEY_T"] = 50] = "KEY_T"; - KeyCode[KeyCode["KEY_U"] = 51] = "KEY_U"; - KeyCode[KeyCode["KEY_V"] = 52] = "KEY_V"; - KeyCode[KeyCode["KEY_W"] = 53] = "KEY_W"; - KeyCode[KeyCode["KEY_X"] = 54] = "KEY_X"; - KeyCode[KeyCode["KEY_Y"] = 55] = "KEY_Y"; - KeyCode[KeyCode["KEY_Z"] = 56] = "KEY_Z"; - KeyCode[KeyCode["Meta"] = 57] = "Meta"; - KeyCode[KeyCode["ContextMenu"] = 58] = "ContextMenu"; - KeyCode[KeyCode["F1"] = 59] = "F1"; - KeyCode[KeyCode["F2"] = 60] = "F2"; - KeyCode[KeyCode["F3"] = 61] = "F3"; - KeyCode[KeyCode["F4"] = 62] = "F4"; - KeyCode[KeyCode["F5"] = 63] = "F5"; - KeyCode[KeyCode["F6"] = 64] = "F6"; - KeyCode[KeyCode["F7"] = 65] = "F7"; - KeyCode[KeyCode["F8"] = 66] = "F8"; - KeyCode[KeyCode["F9"] = 67] = "F9"; - KeyCode[KeyCode["F10"] = 68] = "F10"; - KeyCode[KeyCode["F11"] = 69] = "F11"; - KeyCode[KeyCode["F12"] = 70] = "F12"; - KeyCode[KeyCode["F13"] = 71] = "F13"; - KeyCode[KeyCode["F14"] = 72] = "F14"; - KeyCode[KeyCode["F15"] = 73] = "F15"; - KeyCode[KeyCode["F16"] = 74] = "F16"; - KeyCode[KeyCode["F17"] = 75] = "F17"; - KeyCode[KeyCode["F18"] = 76] = "F18"; - KeyCode[KeyCode["F19"] = 77] = "F19"; - KeyCode[KeyCode["NumLock"] = 78] = "NumLock"; - KeyCode[KeyCode["ScrollLock"] = 79] = "ScrollLock"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the ';:' key - */ - KeyCode[KeyCode["US_SEMICOLON"] = 80] = "US_SEMICOLON"; - /** - * For any country/region, the '+' key - * For the US standard keyboard, the '=+' key - */ - KeyCode[KeyCode["US_EQUAL"] = 81] = "US_EQUAL"; - /** - * For any country/region, the ',' key - * For the US standard keyboard, the ',<' key - */ - KeyCode[KeyCode["US_COMMA"] = 82] = "US_COMMA"; - /** - * For any country/region, the '-' key - * For the US standard keyboard, the '-_' key - */ - KeyCode[KeyCode["US_MINUS"] = 83] = "US_MINUS"; - /** - * For any country/region, the '.' key - * For the US standard keyboard, the '.>' key - */ - KeyCode[KeyCode["US_DOT"] = 84] = "US_DOT"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the '/?' key - */ - KeyCode[KeyCode["US_SLASH"] = 85] = "US_SLASH"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the '`~' key - */ - KeyCode[KeyCode["US_BACKTICK"] = 86] = "US_BACKTICK"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the '[{' key - */ - KeyCode[KeyCode["US_OPEN_SQUARE_BRACKET"] = 87] = "US_OPEN_SQUARE_BRACKET"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the '\|' key - */ - KeyCode[KeyCode["US_BACKSLASH"] = 88] = "US_BACKSLASH"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the ']}' key - */ - KeyCode[KeyCode["US_CLOSE_SQUARE_BRACKET"] = 89] = "US_CLOSE_SQUARE_BRACKET"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - * For the US standard keyboard, the ''"' key - */ - KeyCode[KeyCode["US_QUOTE"] = 90] = "US_QUOTE"; - /** - * Used for miscellaneous characters; it can vary by keyboard. - */ - KeyCode[KeyCode["OEM_8"] = 91] = "OEM_8"; - /** - * Either the angle bracket key or the backslash key on the RT 102-key keyboard. - */ - KeyCode[KeyCode["OEM_102"] = 92] = "OEM_102"; - KeyCode[KeyCode["NUMPAD_0"] = 93] = "NUMPAD_0"; - KeyCode[KeyCode["NUMPAD_1"] = 94] = "NUMPAD_1"; - KeyCode[KeyCode["NUMPAD_2"] = 95] = "NUMPAD_2"; - KeyCode[KeyCode["NUMPAD_3"] = 96] = "NUMPAD_3"; - KeyCode[KeyCode["NUMPAD_4"] = 97] = "NUMPAD_4"; - KeyCode[KeyCode["NUMPAD_5"] = 98] = "NUMPAD_5"; - KeyCode[KeyCode["NUMPAD_6"] = 99] = "NUMPAD_6"; - KeyCode[KeyCode["NUMPAD_7"] = 100] = "NUMPAD_7"; - KeyCode[KeyCode["NUMPAD_8"] = 101] = "NUMPAD_8"; - KeyCode[KeyCode["NUMPAD_9"] = 102] = "NUMPAD_9"; - KeyCode[KeyCode["NUMPAD_MULTIPLY"] = 103] = "NUMPAD_MULTIPLY"; - KeyCode[KeyCode["NUMPAD_ADD"] = 104] = "NUMPAD_ADD"; - KeyCode[KeyCode["NUMPAD_SEPARATOR"] = 105] = "NUMPAD_SEPARATOR"; - KeyCode[KeyCode["NUMPAD_SUBTRACT"] = 106] = "NUMPAD_SUBTRACT"; - KeyCode[KeyCode["NUMPAD_DECIMAL"] = 107] = "NUMPAD_DECIMAL"; - KeyCode[KeyCode["NUMPAD_DIVIDE"] = 108] = "NUMPAD_DIVIDE"; - /** - * Cover all key codes when IME is processing input. - */ - KeyCode[KeyCode["KEY_IN_COMPOSITION"] = 109] = "KEY_IN_COMPOSITION"; - KeyCode[KeyCode["ABNT_C1"] = 110] = "ABNT_C1"; - KeyCode[KeyCode["ABNT_C2"] = 111] = "ABNT_C2"; - /** - * Placed last to cover the length of the enum. - * Please do not depend on this value! - */ - KeyCode[KeyCode["MAX_VALUE"] = 112] = "MAX_VALUE"; -})(KeyCode || (KeyCode = {})); -var MarkerSeverity; -(function (MarkerSeverity) { - MarkerSeverity[MarkerSeverity["Hint"] = 1] = "Hint"; - MarkerSeverity[MarkerSeverity["Info"] = 2] = "Info"; - MarkerSeverity[MarkerSeverity["Warning"] = 4] = "Warning"; - MarkerSeverity[MarkerSeverity["Error"] = 8] = "Error"; -})(MarkerSeverity || (MarkerSeverity = {})); -var MarkerTag; -(function (MarkerTag) { - MarkerTag[MarkerTag["Unnecessary"] = 1] = "Unnecessary"; - MarkerTag[MarkerTag["Deprecated"] = 2] = "Deprecated"; -})(MarkerTag || (MarkerTag = {})); -/** - * Position in the minimap to render the decoration. - */ -var MinimapPosition; -(function (MinimapPosition) { - MinimapPosition[MinimapPosition["Inline"] = 1] = "Inline"; - MinimapPosition[MinimapPosition["Gutter"] = 2] = "Gutter"; -})(MinimapPosition || (MinimapPosition = {})); -/** - * Type of hit element with the mouse in the editor. - */ -var MouseTargetType; -(function (MouseTargetType) { - /** - * Mouse is on top of an unknown element. - */ - MouseTargetType[MouseTargetType["UNKNOWN"] = 0] = "UNKNOWN"; - /** - * Mouse is on top of the textarea used for input. - */ - MouseTargetType[MouseTargetType["TEXTAREA"] = 1] = "TEXTAREA"; - /** - * Mouse is on top of the glyph margin - */ - MouseTargetType[MouseTargetType["GUTTER_GLYPH_MARGIN"] = 2] = "GUTTER_GLYPH_MARGIN"; - /** - * Mouse is on top of the line numbers - */ - MouseTargetType[MouseTargetType["GUTTER_LINE_NUMBERS"] = 3] = "GUTTER_LINE_NUMBERS"; - /** - * Mouse is on top of the line decorations - */ - MouseTargetType[MouseTargetType["GUTTER_LINE_DECORATIONS"] = 4] = "GUTTER_LINE_DECORATIONS"; - /** - * Mouse is on top of the whitespace left in the gutter by a view zone. - */ - MouseTargetType[MouseTargetType["GUTTER_VIEW_ZONE"] = 5] = "GUTTER_VIEW_ZONE"; - /** - * Mouse is on top of text in the content. - */ - MouseTargetType[MouseTargetType["CONTENT_TEXT"] = 6] = "CONTENT_TEXT"; - /** - * Mouse is on top of empty space in the content (e.g. after line text or below last line) - */ - MouseTargetType[MouseTargetType["CONTENT_EMPTY"] = 7] = "CONTENT_EMPTY"; - /** - * Mouse is on top of a view zone in the content. - */ - MouseTargetType[MouseTargetType["CONTENT_VIEW_ZONE"] = 8] = "CONTENT_VIEW_ZONE"; - /** - * Mouse is on top of a content widget. - */ - MouseTargetType[MouseTargetType["CONTENT_WIDGET"] = 9] = "CONTENT_WIDGET"; - /** - * Mouse is on top of the decorations overview ruler. - */ - MouseTargetType[MouseTargetType["OVERVIEW_RULER"] = 10] = "OVERVIEW_RULER"; - /** - * Mouse is on top of a scrollbar. - */ - MouseTargetType[MouseTargetType["SCROLLBAR"] = 11] = "SCROLLBAR"; - /** - * Mouse is on top of an overlay widget. - */ - MouseTargetType[MouseTargetType["OVERLAY_WIDGET"] = 12] = "OVERLAY_WIDGET"; - /** - * Mouse is outside of the editor. - */ - MouseTargetType[MouseTargetType["OUTSIDE_EDITOR"] = 13] = "OUTSIDE_EDITOR"; -})(MouseTargetType || (MouseTargetType = {})); -/** - * A positioning preference for rendering overlay widgets. - */ -var OverlayWidgetPositionPreference; -(function (OverlayWidgetPositionPreference) { - /** - * Position the overlay widget in the top right corner - */ - OverlayWidgetPositionPreference[OverlayWidgetPositionPreference["TOP_RIGHT_CORNER"] = 0] = "TOP_RIGHT_CORNER"; - /** - * Position the overlay widget in the bottom right corner - */ - OverlayWidgetPositionPreference[OverlayWidgetPositionPreference["BOTTOM_RIGHT_CORNER"] = 1] = "BOTTOM_RIGHT_CORNER"; - /** - * Position the overlay widget in the top center - */ - OverlayWidgetPositionPreference[OverlayWidgetPositionPreference["TOP_CENTER"] = 2] = "TOP_CENTER"; -})(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {})); -/** - * Vertical Lane in the overview ruler of the editor. - */ -var OverviewRulerLane; -(function (OverviewRulerLane) { - OverviewRulerLane[OverviewRulerLane["Left"] = 1] = "Left"; - OverviewRulerLane[OverviewRulerLane["Center"] = 2] = "Center"; - OverviewRulerLane[OverviewRulerLane["Right"] = 4] = "Right"; - OverviewRulerLane[OverviewRulerLane["Full"] = 7] = "Full"; -})(OverviewRulerLane || (OverviewRulerLane = {})); -var RenderLineNumbersType; -(function (RenderLineNumbersType) { - RenderLineNumbersType[RenderLineNumbersType["Off"] = 0] = "Off"; - RenderLineNumbersType[RenderLineNumbersType["On"] = 1] = "On"; - RenderLineNumbersType[RenderLineNumbersType["Relative"] = 2] = "Relative"; - RenderLineNumbersType[RenderLineNumbersType["Interval"] = 3] = "Interval"; - RenderLineNumbersType[RenderLineNumbersType["Custom"] = 4] = "Custom"; -})(RenderLineNumbersType || (RenderLineNumbersType = {})); -var RenderMinimap; -(function (RenderMinimap) { - RenderMinimap[RenderMinimap["None"] = 0] = "None"; - RenderMinimap[RenderMinimap["Text"] = 1] = "Text"; - RenderMinimap[RenderMinimap["Blocks"] = 2] = "Blocks"; -})(RenderMinimap || (RenderMinimap = {})); -var ScrollType; -(function (ScrollType) { - ScrollType[ScrollType["Smooth"] = 0] = "Smooth"; - ScrollType[ScrollType["Immediate"] = 1] = "Immediate"; -})(ScrollType || (ScrollType = {})); -var ScrollbarVisibility; -(function (ScrollbarVisibility) { - ScrollbarVisibility[ScrollbarVisibility["Auto"] = 1] = "Auto"; - ScrollbarVisibility[ScrollbarVisibility["Hidden"] = 2] = "Hidden"; - ScrollbarVisibility[ScrollbarVisibility["Visible"] = 3] = "Visible"; -})(ScrollbarVisibility || (ScrollbarVisibility = {})); -/** - * The direction of a selection. - */ -var SelectionDirection; -(function (SelectionDirection) { - /** - * The selection starts above where it ends. - */ - SelectionDirection[SelectionDirection["LTR"] = 0] = "LTR"; - /** - * The selection starts below where it ends. - */ - SelectionDirection[SelectionDirection["RTL"] = 1] = "RTL"; -})(SelectionDirection || (SelectionDirection = {})); -var SignatureHelpTriggerKind; -(function (SignatureHelpTriggerKind) { - SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange"; -})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); -/** - * A symbol kind. - */ -var SymbolKind; -(function (SymbolKind) { - SymbolKind[SymbolKind["File"] = 0] = "File"; - SymbolKind[SymbolKind["Module"] = 1] = "Module"; - SymbolKind[SymbolKind["Namespace"] = 2] = "Namespace"; - SymbolKind[SymbolKind["Package"] = 3] = "Package"; - SymbolKind[SymbolKind["Class"] = 4] = "Class"; - SymbolKind[SymbolKind["Method"] = 5] = "Method"; - SymbolKind[SymbolKind["Property"] = 6] = "Property"; - SymbolKind[SymbolKind["Field"] = 7] = "Field"; - SymbolKind[SymbolKind["Constructor"] = 8] = "Constructor"; - SymbolKind[SymbolKind["Enum"] = 9] = "Enum"; - SymbolKind[SymbolKind["Interface"] = 10] = "Interface"; - SymbolKind[SymbolKind["Function"] = 11] = "Function"; - SymbolKind[SymbolKind["Variable"] = 12] = "Variable"; - SymbolKind[SymbolKind["Constant"] = 13] = "Constant"; - SymbolKind[SymbolKind["String"] = 14] = "String"; - SymbolKind[SymbolKind["Number"] = 15] = "Number"; - SymbolKind[SymbolKind["Boolean"] = 16] = "Boolean"; - SymbolKind[SymbolKind["Array"] = 17] = "Array"; - SymbolKind[SymbolKind["Object"] = 18] = "Object"; - SymbolKind[SymbolKind["Key"] = 19] = "Key"; - SymbolKind[SymbolKind["Null"] = 20] = "Null"; - SymbolKind[SymbolKind["EnumMember"] = 21] = "EnumMember"; - SymbolKind[SymbolKind["Struct"] = 22] = "Struct"; - SymbolKind[SymbolKind["Event"] = 23] = "Event"; - SymbolKind[SymbolKind["Operator"] = 24] = "Operator"; - SymbolKind[SymbolKind["TypeParameter"] = 25] = "TypeParameter"; -})(SymbolKind || (SymbolKind = {})); -var SymbolTag; -(function (SymbolTag) { - SymbolTag[SymbolTag["Deprecated"] = 1] = "Deprecated"; -})(SymbolTag || (SymbolTag = {})); -/** - * The kind of animation in which the editor's cursor should be rendered. - */ -var TextEditorCursorBlinkingStyle; -(function (TextEditorCursorBlinkingStyle) { - /** - * Hidden - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Hidden"] = 0] = "Hidden"; - /** - * Blinking - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Blink"] = 1] = "Blink"; - /** - * Blinking with smooth fading - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Smooth"] = 2] = "Smooth"; - /** - * Blinking with prolonged filled state and smooth fading - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Phase"] = 3] = "Phase"; - /** - * Expand collapse animation on the y axis - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Expand"] = 4] = "Expand"; - /** - * No-Blinking - */ - TextEditorCursorBlinkingStyle[TextEditorCursorBlinkingStyle["Solid"] = 5] = "Solid"; -})(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {})); -/** - * The style in which the editor's cursor should be rendered. - */ -var TextEditorCursorStyle; -(function (TextEditorCursorStyle) { - /** - * As a vertical line (sitting between two characters). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Line"] = 1] = "Line"; - /** - * As a block (sitting on top of a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Block"] = 2] = "Block"; - /** - * As a horizontal line (sitting under a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["Underline"] = 3] = "Underline"; - /** - * As a thin vertical line (sitting between two characters). - */ - TextEditorCursorStyle[TextEditorCursorStyle["LineThin"] = 4] = "LineThin"; - /** - * As an outlined block (sitting on top of a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["BlockOutline"] = 5] = "BlockOutline"; - /** - * As a thin horizontal line (sitting under a character). - */ - TextEditorCursorStyle[TextEditorCursorStyle["UnderlineThin"] = 6] = "UnderlineThin"; -})(TextEditorCursorStyle || (TextEditorCursorStyle = {})); -/** - * Describes the behavior of decorations when typing/editing near their edges. - * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior` - */ -var TrackedRangeStickiness; -(function (TrackedRangeStickiness) { - TrackedRangeStickiness[TrackedRangeStickiness["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges"; - TrackedRangeStickiness[TrackedRangeStickiness["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges"; - TrackedRangeStickiness[TrackedRangeStickiness["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore"; - TrackedRangeStickiness[TrackedRangeStickiness["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter"; -})(TrackedRangeStickiness || (TrackedRangeStickiness = {})); -/** - * Describes how to indent wrapped lines. - */ -var WrappingIndent; -(function (WrappingIndent) { - /** - * No indentation => wrapped lines begin at column 1. - */ - WrappingIndent[WrappingIndent["None"] = 0] = "None"; - /** - * Same => wrapped lines get the same indentation as the parent. - */ - WrappingIndent[WrappingIndent["Same"] = 1] = "Same"; - /** - * Indent => wrapped lines get +1 indentation toward the parent. - */ - WrappingIndent[WrappingIndent["Indent"] = 2] = "Indent"; - /** - * DeepIndent => wrapped lines get +2 indentation toward the parent. - */ - WrappingIndent[WrappingIndent["DeepIndent"] = 3] = "DeepIndent"; -})(WrappingIndent || (WrappingIndent = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js ***! - \******************************************************************************/ -/*! exports provided: AccessibilityHelpNLS, InspectTokensNLS, GoToLineNLS, QuickHelpNLS, QuickCommandNLS, QuickOutlineNLS, StandaloneCodeEditorNLS, ToggleHighContrastNLS, SimpleServicesNLS */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccessibilityHelpNLS", function() { return AccessibilityHelpNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InspectTokensNLS", function() { return InspectTokensNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GoToLineNLS", function() { return GoToLineNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickHelpNLS", function() { return QuickHelpNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickCommandNLS", function() { return QuickCommandNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickOutlineNLS", function() { return QuickOutlineNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneCodeEditorNLS", function() { return StandaloneCodeEditorNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleHighContrastNLS", function() { return ToggleHighContrastNLS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleServicesNLS", function() { return SimpleServicesNLS; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var AccessibilityHelpNLS; -(function (AccessibilityHelpNLS) { - AccessibilityHelpNLS.noSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("noSelection", "No selection"); - AccessibilityHelpNLS.singleSelectionRange = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("singleSelectionRange", "Line {0}, Column {1} ({2} selected)"); - AccessibilityHelpNLS.singleSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("singleSelection", "Line {0}, Column {1}"); - AccessibilityHelpNLS.multiSelectionRange = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("multiSelectionRange", "{0} selections ({1} characters selected)"); - AccessibilityHelpNLS.multiSelection = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("multiSelection", "{0} selections"); - AccessibilityHelpNLS.emergencyConfOn = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("emergencyConfOn", "Now changing the setting `accessibilitySupport` to 'on'."); - AccessibilityHelpNLS.openingDocs = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("openingDocs", "Now opening the Editor Accessibility documentation page."); - AccessibilityHelpNLS.readonlyDiffEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("readonlyDiffEditor", " in a read-only pane of a diff editor."); - AccessibilityHelpNLS.editableDiffEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("editableDiffEditor", " in a pane of a diff editor."); - AccessibilityHelpNLS.readonlyEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("readonlyEditor", " in a read-only code editor"); - AccessibilityHelpNLS.editableEditor = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("editableEditor", " in a code editor"); - AccessibilityHelpNLS.changeConfigToOnMac = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("changeConfigToOnMac", "To configure the editor to be optimized for usage with a Screen Reader press Command+E now."); - AccessibilityHelpNLS.changeConfigToOnWinLinux = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("changeConfigToOnWinLinux", "To configure the editor to be optimized for usage with a Screen Reader press Control+E now."); - AccessibilityHelpNLS.auto_on = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("auto_on", "The editor is configured to be optimized for usage with a Screen Reader."); - AccessibilityHelpNLS.auto_off = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("auto_off", "The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."); - AccessibilityHelpNLS.tabFocusModeOnMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("tabFocusModeOnMsg", "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."); - AccessibilityHelpNLS.tabFocusModeOnMsgNoKb = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("tabFocusModeOnMsgNoKb", "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."); - AccessibilityHelpNLS.tabFocusModeOffMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("tabFocusModeOffMsg", "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."); - AccessibilityHelpNLS.tabFocusModeOffMsgNoKb = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("tabFocusModeOffMsgNoKb", "Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."); - AccessibilityHelpNLS.openDocMac = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("openDocMac", "Press Command+H now to open a browser window with more information related to editor accessibility."); - AccessibilityHelpNLS.openDocWinLinux = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("openDocWinLinux", "Press Control+H now to open a browser window with more information related to editor accessibility."); - AccessibilityHelpNLS.outroMsg = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("outroMsg", "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."); - AccessibilityHelpNLS.showAccessibilityHelpAction = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]("showAccessibilityHelpAction", "Show Accessibility Help"); -})(AccessibilityHelpNLS || (AccessibilityHelpNLS = {})); -var InspectTokensNLS; -(function (InspectTokensNLS) { - InspectTokensNLS.inspectTokensAction = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('inspectTokens', "Developer: Inspect Tokens"); -})(InspectTokensNLS || (InspectTokensNLS = {})); -var GoToLineNLS; -(function (GoToLineNLS) { - GoToLineNLS.gotoLineActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('gotoLineActionLabel', "Go to Line/Column..."); -})(GoToLineNLS || (GoToLineNLS = {})); -var QuickHelpNLS; -(function (QuickHelpNLS) { - QuickHelpNLS.helpQuickAccessActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('helpQuickAccess', "Show all Quick Access Providers"); -})(QuickHelpNLS || (QuickHelpNLS = {})); -var QuickCommandNLS; -(function (QuickCommandNLS) { - QuickCommandNLS.quickCommandActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickCommandActionLabel', "Command Palette"); - QuickCommandNLS.quickCommandHelp = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickCommandActionHelp', "Show And Run Commands"); -})(QuickCommandNLS || (QuickCommandNLS = {})); -var QuickOutlineNLS; -(function (QuickOutlineNLS) { - QuickOutlineNLS.quickOutlineActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickOutlineActionLabel', "Go to Symbol..."); - QuickOutlineNLS.quickOutlineByCategoryActionLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quickOutlineByCategoryActionLabel', "Go to Symbol by Category..."); -})(QuickOutlineNLS || (QuickOutlineNLS = {})); -var StandaloneCodeEditorNLS; -(function (StandaloneCodeEditorNLS) { - StandaloneCodeEditorNLS.editorViewAccessibleLabel = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorViewAccessibleLabel', "Editor content"); - StandaloneCodeEditorNLS.accessibilityHelpMessage = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('accessibilityHelpMessage', "Press Alt+F1 for Accessibility Options."); -})(StandaloneCodeEditorNLS || (StandaloneCodeEditorNLS = {})); -var ToggleHighContrastNLS; -(function (ToggleHighContrastNLS) { - ToggleHighContrastNLS.toggleHighContrast = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('toggleHighContrast', "Toggle High Contrast Theme"); -})(ToggleHighContrastNLS || (ToggleHighContrastNLS = {})); -var SimpleServicesNLS; -(function (SimpleServicesNLS) { - SimpleServicesNLS.bulkEditServiceSummary = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('bulkEditServiceSummary', "Made {0} edits in {1} files"); -})(SimpleServicesNLS || (SimpleServicesNLS = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js ***! - \*************************************************************************************/ -/*! exports provided: editorLineHighlight, editorLineHighlightBorder, editorRangeHighlight, editorRangeHighlightBorder, editorSymbolHighlight, editorSymbolHighlightBorder, editorCursorForeground, editorCursorBackground, editorWhitespaces, editorIndentGuides, editorActiveIndentGuides, editorLineNumbers, editorActiveLineNumber, editorRuler, editorCodeLensForeground, editorBracketMatchBackground, editorBracketMatchBorder, editorOverviewRulerBorder, editorOverviewRulerBackground, editorGutter, editorUnnecessaryCodeBorder, editorUnnecessaryCodeOpacity, overviewRulerRangeHighlight, overviewRulerError, overviewRulerWarning, overviewRulerInfo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorLineHighlight", function() { return editorLineHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorLineHighlightBorder", function() { return editorLineHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorRangeHighlight", function() { return editorRangeHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorRangeHighlightBorder", function() { return editorRangeHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSymbolHighlight", function() { return editorSymbolHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSymbolHighlightBorder", function() { return editorSymbolHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorCursorForeground", function() { return editorCursorForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorCursorBackground", function() { return editorCursorBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWhitespaces", function() { return editorWhitespaces; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorIndentGuides", function() { return editorIndentGuides; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorActiveIndentGuides", function() { return editorActiveIndentGuides; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorLineNumbers", function() { return editorLineNumbers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorActiveLineNumber", function() { return editorActiveLineNumber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorRuler", function() { return editorRuler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorCodeLensForeground", function() { return editorCodeLensForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorBracketMatchBackground", function() { return editorBracketMatchBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorBracketMatchBorder", function() { return editorBracketMatchBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorOverviewRulerBorder", function() { return editorOverviewRulerBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorOverviewRulerBackground", function() { return editorOverviewRulerBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorGutter", function() { return editorGutter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorUnnecessaryCodeBorder", function() { return editorUnnecessaryCodeBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorUnnecessaryCodeOpacity", function() { return editorUnnecessaryCodeOpacity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerRangeHighlight", function() { return overviewRulerRangeHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerError", function() { return overviewRulerError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerWarning", function() { return overviewRulerWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerInfo", function() { return overviewRulerInfo; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -/** - * Definition of the editor colors - */ -const editorLineHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineHighlight', 'Background color for the highlight of line at the cursor position.')); -const editorLineHighlightBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); -const editorRangeHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorRangeHighlightBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.rangeHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rangeHighlightBorder', 'Background color of the border around highlighted ranges.'), true); -const editorSymbolHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.symbolHighlightBackground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorFindMatchHighlight"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorFindMatchHighlight"], hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('symbolHighlight', 'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorSymbolHighlightBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editor.symbolHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('symbolHighlightBorder', 'Background color of the border around highlighted symbols.'), true); -const editorCursorForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorCursor.foreground', { dark: '#AEAFAD', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('caret', 'Color of the editor cursor.')); -const editorCursorBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorCursor.background', null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorCursorBackground', 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.')); -const editorWhitespaces = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorWhitespaces', 'Color of whitespace characters in the editor.')); -const editorIndentGuides = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorIndentGuides', 'Color of the editor indentation guides.')); -const editorActiveIndentGuides = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorIndentGuide.activeBackground', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorActiveIndentGuide', 'Color of the active editor indentation guides.')); -const editorLineNumbers = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorLineNumbers', 'Color of editor line numbers.')); -const deprecatedEditorActiveLineNumber = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorActiveLineNumber', 'Color of editor active line number'), false, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('deprecatedEditorActiveLineNumber', 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.')); -const editorActiveLineNumber = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorLineNumber.activeForeground', { dark: deprecatedEditorActiveLineNumber, light: deprecatedEditorActiveLineNumber, hc: deprecatedEditorActiveLineNumber }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorActiveLineNumber', 'Color of editor active line number')); -const editorRuler = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorRuler.foreground', { dark: '#5A5A5A', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].lightgrey, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorRuler', 'Color of the editor rulers.')); -const editorCodeLensForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorCodeLensForeground', 'Foreground color of editor CodeLens')); -const editorBracketMatchBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorBracketMatchBackground', 'Background color behind matching brackets')); -const editorBracketMatchBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["contrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorBracketMatchBorder', 'Color for matching brackets boxes')); -const editorOverviewRulerBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorOverviewRulerBorder', 'Color of the overview ruler border.')); -const editorOverviewRulerBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.background', null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorOverviewRulerBackground', 'Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.')); -const editorGutter = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorGutter.background', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorBackground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorBackground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorBackground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.')); -const editorUnnecessaryCodeBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorUnnecessaryCode.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#fff').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unnecessaryCodeBorder', 'Border color of unnecessary (unused) source code in the editor.')); -const editorUnnecessaryCodeOpacity = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorUnnecessaryCode.opacity', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#000a'), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#0007'), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unnecessaryCodeOpacity', 'Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.')); -const rulerRangeDefault = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](0, 122, 204, 0.6)); -const overviewRulerRangeHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.rangeHighlightForeground', { dark: rulerRangeDefault, light: rulerRangeDefault, hc: rulerRangeDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRulerRangeHighlight', 'Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.'), true); -const overviewRulerError = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.errorForeground', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 18, 18, 0.7)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 18, 18, 0.7)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 50, 50, 1)) }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRuleError', 'Overview ruler marker color for errors.')); -const overviewRulerWarning = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.warningForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorWarningForeground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorWarningForeground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorWarningBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRuleWarning', 'Overview ruler marker color for warnings.')); -const overviewRulerInfo = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["registerColor"])('editorOverviewRuler.infoForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorInfoForeground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorInfoForeground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorInfoBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRuleInfo', 'Overview ruler marker color for infos.')); -// contains all color rules that used to defined in editor/browser/widget/editor.css -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["registerThemingParticipant"])((theme, collector) => { - const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorBackground"]); - if (background) { - collector.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); - } - const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["editorForeground"]); - if (foreground) { - collector.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${foreground}; }`); - } - const gutter = theme.getColor(editorGutter); - if (gutter) { - collector.addRule(`.monaco-editor .margin { background-color: ${gutter}; }`); - } - const rangeHighlight = theme.getColor(editorRangeHighlight); - if (rangeHighlight) { - collector.addRule(`.monaco-editor .rangeHighlight { background-color: ${rangeHighlight}; }`); - } - const rangeHighlightBorder = theme.getColor(editorRangeHighlightBorder); - if (rangeHighlightBorder) { - collector.addRule(`.monaco-editor .rangeHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${rangeHighlightBorder}; }`); - } - const symbolHighlight = theme.getColor(editorSymbolHighlight); - if (symbolHighlight) { - collector.addRule(`.monaco-editor .symbolHighlight { background-color: ${symbolHighlight}; }`); - } - const symbolHighlightBorder = theme.getColor(editorSymbolHighlightBorder); - if (symbolHighlightBorder) { - collector.addRule(`.monaco-editor .symbolHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${symbolHighlightBorder}; }`); - } - const invisibles = theme.getColor(editorWhitespaces); - if (invisibles) { - collector.addRule(`.monaco-editor .mtkw { color: ${invisibles} !important; }`); - collector.addRule(`.monaco-editor .mtkz { color: ${invisibles} !important; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/view/overviewZoneManager.js ***! - \*************************************************************************************/ -/*! exports provided: ColorZone, OverviewRulerZone, OverviewZoneManager */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorZone", function() { return ColorZone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverviewRulerZone", function() { return OverviewRulerZone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverviewZoneManager", function() { return OverviewZoneManager; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class ColorZone { - constructor(from, to, colorId) { - this.from = from | 0; - this.to = to | 0; - this.colorId = colorId | 0; - } - static compare(a, b) { - if (a.colorId === b.colorId) { - if (a.from === b.from) { - return a.to - b.to; - } - return a.from - b.from; - } - return a.colorId - b.colorId; - } -} -/** - * A zone in the overview ruler - */ -class OverviewRulerZone { - constructor(startLineNumber, endLineNumber, color) { - this.startLineNumber = startLineNumber; - this.endLineNumber = endLineNumber; - this.color = color; - this._colorZone = null; - } - static compare(a, b) { - if (a.color === b.color) { - if (a.startLineNumber === b.startLineNumber) { - return a.endLineNumber - b.endLineNumber; - } - return a.startLineNumber - b.startLineNumber; - } - return a.color < b.color ? -1 : 1; - } - setColorZone(colorZone) { - this._colorZone = colorZone; - } - getColorZones() { - return this._colorZone; - } -} -class OverviewZoneManager { - constructor(getVerticalOffsetForLine) { - this._getVerticalOffsetForLine = getVerticalOffsetForLine; - this._zones = []; - this._colorZonesInvalid = false; - this._lineHeight = 0; - this._domWidth = 0; - this._domHeight = 0; - this._outerHeight = 0; - this._pixelRatio = 1; - this._lastAssignedId = 0; - this._color2Id = Object.create(null); - this._id2Color = []; - } - getId2Color() { - return this._id2Color; - } - setZones(newZones) { - this._zones = newZones; - this._zones.sort(OverviewRulerZone.compare); - } - setLineHeight(lineHeight) { - if (this._lineHeight === lineHeight) { - return false; - } - this._lineHeight = lineHeight; - this._colorZonesInvalid = true; - return true; - } - setPixelRatio(pixelRatio) { - this._pixelRatio = pixelRatio; - this._colorZonesInvalid = true; - } - getDOMWidth() { - return this._domWidth; - } - getCanvasWidth() { - return this._domWidth * this._pixelRatio; - } - setDOMWidth(width) { - if (this._domWidth === width) { - return false; - } - this._domWidth = width; - this._colorZonesInvalid = true; - return true; - } - getDOMHeight() { - return this._domHeight; - } - getCanvasHeight() { - return this._domHeight * this._pixelRatio; - } - setDOMHeight(height) { - if (this._domHeight === height) { - return false; - } - this._domHeight = height; - this._colorZonesInvalid = true; - return true; - } - getOuterHeight() { - return this._outerHeight; - } - setOuterHeight(outerHeight) { - if (this._outerHeight === outerHeight) { - return false; - } - this._outerHeight = outerHeight; - this._colorZonesInvalid = true; - return true; - } - resolveColorZones() { - const colorZonesInvalid = this._colorZonesInvalid; - const lineHeight = Math.floor(this._lineHeight); // @perf - const totalHeight = Math.floor(this.getCanvasHeight()); // @perf - const outerHeight = Math.floor(this._outerHeight); // @perf - const heightRatio = totalHeight / outerHeight; - const halfMinimumHeight = Math.floor(4 /* MINIMUM_HEIGHT */ * this._pixelRatio / 2); - let allColorZones = []; - for (let i = 0, len = this._zones.length; i < len; i++) { - const zone = this._zones[i]; - if (!colorZonesInvalid) { - const colorZone = zone.getColorZones(); - if (colorZone) { - allColorZones.push(colorZone); - continue; - } - } - const y1 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.startLineNumber))); - const y2 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.endLineNumber) + lineHeight)); - let ycenter = Math.floor((y1 + y2) / 2); - let halfHeight = (y2 - ycenter); - if (halfHeight < halfMinimumHeight) { - halfHeight = halfMinimumHeight; - } - if (ycenter - halfHeight < 0) { - ycenter = halfHeight; - } - if (ycenter + halfHeight > totalHeight) { - ycenter = totalHeight - halfHeight; - } - const color = zone.color; - let colorId = this._color2Id[color]; - if (!colorId) { - colorId = (++this._lastAssignedId); - this._color2Id[color] = colorId; - this._id2Color[colorId] = color; - } - const colorZone = new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId); - zone.setColorZone(colorZone); - allColorZones.push(colorZone); - } - this._colorZonesInvalid = false; - allColorZones.sort(ColorZone.compare); - return allColorZones; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/view/renderingContext.js ***! - \**********************************************************************************/ -/*! exports provided: RestrictedRenderingContext, RenderingContext, LineVisibleRanges, HorizontalRange, HorizontalPosition, VisibleRanges */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RestrictedRenderingContext", function() { return RestrictedRenderingContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderingContext", function() { return RenderingContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineVisibleRanges", function() { return LineVisibleRanges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalRange", function() { return HorizontalRange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalPosition", function() { return HorizontalPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VisibleRanges", function() { return VisibleRanges; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class RestrictedRenderingContext { - constructor(viewLayout, viewportData) { - this._viewLayout = viewLayout; - this.viewportData = viewportData; - this.scrollWidth = this._viewLayout.getScrollWidth(); - this.scrollHeight = this._viewLayout.getScrollHeight(); - this.visibleRange = this.viewportData.visibleRange; - this.bigNumbersDelta = this.viewportData.bigNumbersDelta; - const vInfo = this._viewLayout.getCurrentViewport(); - this.scrollTop = vInfo.top; - this.scrollLeft = vInfo.left; - this.viewportWidth = vInfo.width; - this.viewportHeight = vInfo.height; - } - getScrolledTopFromAbsoluteTop(absoluteTop) { - return absoluteTop - this.scrollTop; - } - getVerticalOffsetForLineNumber(lineNumber) { - return this._viewLayout.getVerticalOffsetForLineNumber(lineNumber); - } - getDecorationsInViewport() { - return this.viewportData.getDecorationsInViewport(); - } -} -class RenderingContext extends RestrictedRenderingContext { - constructor(viewLayout, viewportData, viewLines) { - super(viewLayout, viewportData); - this._viewLines = viewLines; - } - linesVisibleRangesForRange(range, includeNewLines) { - return this._viewLines.linesVisibleRangesForRange(range, includeNewLines); - } - visibleRangeForPosition(position) { - return this._viewLines.visibleRangeForPosition(position); - } -} -class LineVisibleRanges { - constructor(outsideRenderedLine, lineNumber, ranges) { - this.outsideRenderedLine = outsideRenderedLine; - this.lineNumber = lineNumber; - this.ranges = ranges; - } -} -class HorizontalRange { - constructor(left, width) { - this.left = Math.round(left); - this.width = Math.round(width); - } - toString() { - return `[${this.left},${this.width}]`; - } -} -class HorizontalPosition { - constructor(outsideRenderedLine, left) { - this.outsideRenderedLine = outsideRenderedLine; - this.left = Math.round(left); - } -} -class VisibleRanges { - constructor(outsideRenderedLine, ranges) { - this.outsideRenderedLine = outsideRenderedLine; - this.ranges = ranges; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/view/viewContext.js ***! - \*****************************************************************************/ -/*! exports provided: EditorTheme, ViewContext */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorTheme", function() { return EditorTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContext", function() { return ViewContext; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class EditorTheme { - constructor(theme) { - this._theme = theme; - } - get type() { - return this._theme.type; - } - update(theme) { - this._theme = theme; - } - getColor(color) { - return this._theme.getColor(color); - } -} -class ViewContext { - constructor(configuration, theme, model) { - this.configuration = configuration; - this.theme = new EditorTheme(theme); - this.model = model; - this.viewLayout = model.viewLayout; - } - addEventHandler(eventHandler) { - this.model.addViewEventHandler(eventHandler); - } - removeEventHandler(eventHandler) { - this.model.removeViewEventHandler(eventHandler); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js ***! - \****************************************************************************/ -/*! exports provided: ViewConfigurationChangedEvent, ViewCursorStateChangedEvent, ViewDecorationsChangedEvent, ViewFlushedEvent, ViewFocusChangedEvent, ViewLanguageConfigurationEvent, ViewLineMappingChangedEvent, ViewLinesChangedEvent, ViewLinesDeletedEvent, ViewLinesInsertedEvent, ViewRevealRangeRequestEvent, ViewScrollChangedEvent, ViewThemeChangedEvent, ViewTokensChangedEvent, ViewTokensColorsChangedEvent, ViewZonesChangedEvent */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewConfigurationChangedEvent", function() { return ViewConfigurationChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewCursorStateChangedEvent", function() { return ViewCursorStateChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewDecorationsChangedEvent", function() { return ViewDecorationsChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewFlushedEvent", function() { return ViewFlushedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewFocusChangedEvent", function() { return ViewFocusChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLanguageConfigurationEvent", function() { return ViewLanguageConfigurationEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLineMappingChangedEvent", function() { return ViewLineMappingChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLinesChangedEvent", function() { return ViewLinesChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLinesDeletedEvent", function() { return ViewLinesDeletedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLinesInsertedEvent", function() { return ViewLinesInsertedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewRevealRangeRequestEvent", function() { return ViewRevealRangeRequestEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewScrollChangedEvent", function() { return ViewScrollChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewThemeChangedEvent", function() { return ViewThemeChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewTokensChangedEvent", function() { return ViewTokensChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewTokensColorsChangedEvent", function() { return ViewTokensColorsChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewZonesChangedEvent", function() { return ViewZonesChangedEvent; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class ViewConfigurationChangedEvent { - constructor(source) { - this.type = 0 /* ViewConfigurationChanged */; - this._source = source; - } - hasChanged(id) { - return this._source.hasChanged(id); - } -} -class ViewCursorStateChangedEvent { - constructor(selections, modelSelections) { - this.type = 1 /* ViewCursorStateChanged */; - this.selections = selections; - this.modelSelections = modelSelections; - } -} -class ViewDecorationsChangedEvent { - constructor(source) { - this.type = 2 /* ViewDecorationsChanged */; - if (source) { - this.affectsMinimap = source.affectsMinimap; - this.affectsOverviewRuler = source.affectsOverviewRuler; - } - else { - this.affectsMinimap = true; - this.affectsOverviewRuler = true; - } - } -} -class ViewFlushedEvent { - constructor() { - this.type = 3 /* ViewFlushed */; - // Nothing to do - } -} -class ViewFocusChangedEvent { - constructor(isFocused) { - this.type = 4 /* ViewFocusChanged */; - this.isFocused = isFocused; - } -} -class ViewLanguageConfigurationEvent { - constructor() { - this.type = 5 /* ViewLanguageConfigurationChanged */; - } -} -class ViewLineMappingChangedEvent { - constructor() { - this.type = 6 /* ViewLineMappingChanged */; - // Nothing to do - } -} -class ViewLinesChangedEvent { - constructor(fromLineNumber, toLineNumber) { - this.type = 7 /* ViewLinesChanged */; - this.fromLineNumber = fromLineNumber; - this.toLineNumber = toLineNumber; - } -} -class ViewLinesDeletedEvent { - constructor(fromLineNumber, toLineNumber) { - this.type = 8 /* ViewLinesDeleted */; - this.fromLineNumber = fromLineNumber; - this.toLineNumber = toLineNumber; - } -} -class ViewLinesInsertedEvent { - constructor(fromLineNumber, toLineNumber) { - this.type = 9 /* ViewLinesInserted */; - this.fromLineNumber = fromLineNumber; - this.toLineNumber = toLineNumber; - } -} -class ViewRevealRangeRequestEvent { - constructor(source, range, selections, verticalType, revealHorizontal, scrollType) { - this.type = 10 /* ViewRevealRangeRequest */; - this.source = source; - this.range = range; - this.selections = selections; - this.verticalType = verticalType; - this.revealHorizontal = revealHorizontal; - this.scrollType = scrollType; - } -} -class ViewScrollChangedEvent { - constructor(source) { - this.type = 11 /* ViewScrollChanged */; - this.scrollWidth = source.scrollWidth; - this.scrollLeft = source.scrollLeft; - this.scrollHeight = source.scrollHeight; - this.scrollTop = source.scrollTop; - this.scrollWidthChanged = source.scrollWidthChanged; - this.scrollLeftChanged = source.scrollLeftChanged; - this.scrollHeightChanged = source.scrollHeightChanged; - this.scrollTopChanged = source.scrollTopChanged; - } -} -class ViewThemeChangedEvent { - constructor() { - this.type = 12 /* ViewThemeChanged */; - } -} -class ViewTokensChangedEvent { - constructor(ranges) { - this.type = 13 /* ViewTokensChanged */; - this.ranges = ranges; - } -} -class ViewTokensColorsChangedEvent { - constructor() { - this.type = 14 /* ViewTokensColorsChanged */; - // Nothing to do - } -} -class ViewZonesChangedEvent { - constructor() { - this.type = 15 /* ViewZonesChanged */; - // Nothing to do - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js ***! - \***************************************************************************************/ -/*! exports provided: LineDecoration, DecorationSegment, LineDecorationsNormalizer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineDecoration", function() { return LineDecoration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecorationSegment", function() { return DecorationSegment; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineDecorationsNormalizer", function() { return LineDecorationsNormalizer; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class LineDecoration { - constructor(startColumn, endColumn, className, type) { - this.startColumn = startColumn; - this.endColumn = endColumn; - this.className = className; - this.type = type; - } - static _equals(a, b) { - return (a.startColumn === b.startColumn - && a.endColumn === b.endColumn - && a.className === b.className - && a.type === b.type); - } - static equalsArr(a, b) { - const aLen = a.length; - const bLen = b.length; - if (aLen !== bLen) { - return false; - } - for (let i = 0; i < aLen; i++) { - if (!LineDecoration._equals(a[i], b[i])) { - return false; - } - } - return true; - } - static filter(lineDecorations, lineNumber, minLineColumn, maxLineColumn) { - if (lineDecorations.length === 0) { - return []; - } - let result = [], resultLen = 0; - for (let i = 0, len = lineDecorations.length; i < len; i++) { - const d = lineDecorations[i]; - const range = d.range; - if (range.endLineNumber < lineNumber || range.startLineNumber > lineNumber) { - // Ignore decorations that sit outside this line - continue; - } - if (range.isEmpty() && (d.type === 0 /* Regular */ || d.type === 3 /* RegularAffectingLetterSpacing */)) { - // Ignore empty range decorations - continue; - } - const startColumn = (range.startLineNumber === lineNumber ? range.startColumn : minLineColumn); - const endColumn = (range.endLineNumber === lineNumber ? range.endColumn : maxLineColumn); - result[resultLen++] = new LineDecoration(startColumn, endColumn, d.inlineClassName, d.type); - } - return result; - } - static _typeCompare(a, b) { - const ORDER = [2, 0, 1, 3]; - return ORDER[a] - ORDER[b]; - } - static compare(a, b) { - if (a.startColumn === b.startColumn) { - if (a.endColumn === b.endColumn) { - const typeCmp = LineDecoration._typeCompare(a.type, b.type); - if (typeCmp === 0) { - if (a.className < b.className) { - return -1; - } - if (a.className > b.className) { - return 1; - } - return 0; - } - return typeCmp; - } - return a.endColumn - b.endColumn; - } - return a.startColumn - b.startColumn; - } -} -class DecorationSegment { - constructor(startOffset, endOffset, className, metadata) { - this.startOffset = startOffset; - this.endOffset = endOffset; - this.className = className; - this.metadata = metadata; - } -} -class Stack { - constructor() { - this.stopOffsets = []; - this.classNames = []; - this.metadata = []; - this.count = 0; - } - static _metadata(metadata) { - let result = 0; - for (let i = 0, len = metadata.length; i < len; i++) { - result |= metadata[i]; - } - return result; - } - consumeLowerThan(maxStopOffset, nextStartOffset, result) { - while (this.count > 0 && this.stopOffsets[0] < maxStopOffset) { - let i = 0; - // Take all equal stopping offsets - while (i + 1 < this.count && this.stopOffsets[i] === this.stopOffsets[i + 1]) { - i++; - } - // Basically we are consuming the first i + 1 elements of the stack - result.push(new DecorationSegment(nextStartOffset, this.stopOffsets[i], this.classNames.join(' '), Stack._metadata(this.metadata))); - nextStartOffset = this.stopOffsets[i] + 1; - // Consume them - this.stopOffsets.splice(0, i + 1); - this.classNames.splice(0, i + 1); - this.metadata.splice(0, i + 1); - this.count -= (i + 1); - } - if (this.count > 0 && nextStartOffset < maxStopOffset) { - result.push(new DecorationSegment(nextStartOffset, maxStopOffset - 1, this.classNames.join(' '), Stack._metadata(this.metadata))); - nextStartOffset = maxStopOffset; - } - return nextStartOffset; - } - insert(stopOffset, className, metadata) { - if (this.count === 0 || this.stopOffsets[this.count - 1] <= stopOffset) { - // Insert at the end - this.stopOffsets.push(stopOffset); - this.classNames.push(className); - this.metadata.push(metadata); - } - else { - // Find the insertion position for `stopOffset` - for (let i = 0; i < this.count; i++) { - if (this.stopOffsets[i] >= stopOffset) { - this.stopOffsets.splice(i, 0, stopOffset); - this.classNames.splice(i, 0, className); - this.metadata.splice(i, 0, metadata); - break; - } - } - } - this.count++; - return; - } -} -class LineDecorationsNormalizer { - /** - * Normalize line decorations. Overlapping decorations will generate multiple segments - */ - static normalize(lineContent, lineDecorations) { - if (lineDecorations.length === 0) { - return []; - } - let result = []; - const stack = new Stack(); - let nextStartOffset = 0; - for (let i = 0, len = lineDecorations.length; i < len; i++) { - const d = lineDecorations[i]; - let startColumn = d.startColumn; - let endColumn = d.endColumn; - const className = d.className; - const metadata = (d.type === 1 /* Before */ - ? 2 /* PSEUDO_BEFORE */ - : d.type === 2 /* After */ - ? 4 /* PSEUDO_AFTER */ - : 0); - // If the position would end up in the middle of a high-low surrogate pair, we move it to before the pair - if (startColumn > 1) { - const charCodeBefore = lineContent.charCodeAt(startColumn - 2); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCodeBefore)) { - startColumn--; - } - } - if (endColumn > 1) { - const charCodeBefore = lineContent.charCodeAt(endColumn - 2); - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCodeBefore)) { - endColumn--; - } - } - const currentStartOffset = startColumn - 1; - const currentEndOffset = endColumn - 2; - nextStartOffset = stack.consumeLowerThan(currentStartOffset, nextStartOffset, result); - if (stack.count === 0) { - nextStartOffset = currentStartOffset; - } - stack.insert(currentEndOffset, className, metadata); - } - stack.consumeLowerThan(1073741824 /* MAX_SAFE_SMALL_INTEGER */, nextStartOffset, result); - return result; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js ***! - \***********************************************************************************/ -/*! exports provided: EditorWhitespace, LinesLayout */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorWhitespace", function() { return EditorWhitespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinesLayout", function() { return LinesLayout; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class PendingChanges { - constructor() { - this._hasPending = false; - this._inserts = []; - this._changes = []; - this._removes = []; - } - insert(x) { - this._hasPending = true; - this._inserts.push(x); - } - change(x) { - this._hasPending = true; - this._changes.push(x); - } - remove(x) { - this._hasPending = true; - this._removes.push(x); - } - mustCommit() { - return this._hasPending; - } - commit(linesLayout) { - if (!this._hasPending) { - return; - } - const inserts = this._inserts; - const changes = this._changes; - const removes = this._removes; - this._hasPending = false; - this._inserts = []; - this._changes = []; - this._removes = []; - linesLayout._commitPendingChanges(inserts, changes, removes); - } -} -class EditorWhitespace { - constructor(id, afterLineNumber, ordinal, height, minWidth) { - this.id = id; - this.afterLineNumber = afterLineNumber; - this.ordinal = ordinal; - this.height = height; - this.minWidth = minWidth; - this.prefixSum = 0; - } -} -/** - * Layouting of objects that take vertical space (by having a height) and push down other objects. - * - * These objects are basically either text (lines) or spaces between those lines (whitespaces). - * This provides commodity operations for working with lines that contain whitespace that pushes lines lower (vertically). - */ -class LinesLayout { - constructor(lineCount, lineHeight, paddingTop, paddingBottom) { - this._instanceId = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["singleLetterHash"](++LinesLayout.INSTANCE_COUNT); - this._pendingChanges = new PendingChanges(); - this._lastWhitespaceId = 0; - this._arr = []; - this._prefixSumValidIndex = -1; - this._minWidth = -1; /* marker for not being computed */ - this._lineCount = lineCount; - this._lineHeight = lineHeight; - this._paddingTop = paddingTop; - this._paddingBottom = paddingBottom; - } - /** - * Find the insertion index for a new value inside a sorted array of values. - * If the value is already present in the sorted array, the insertion index will be after the already existing value. - */ - static findInsertionIndex(arr, afterLineNumber, ordinal) { - let low = 0; - let high = arr.length; - while (low < high) { - const mid = ((low + high) >>> 1); - if (afterLineNumber === arr[mid].afterLineNumber) { - if (ordinal < arr[mid].ordinal) { - high = mid; - } - else { - low = mid + 1; - } - } - else if (afterLineNumber < arr[mid].afterLineNumber) { - high = mid; - } - else { - low = mid + 1; - } - } - return low; - } - /** - * Change the height of a line in pixels. - */ - setLineHeight(lineHeight) { - this._checkPendingChanges(); - this._lineHeight = lineHeight; - } - /** - * Changes the padding used to calculate vertical offsets. - */ - setPadding(paddingTop, paddingBottom) { - this._paddingTop = paddingTop; - this._paddingBottom = paddingBottom; - } - /** - * Set the number of lines. - * - * @param lineCount New number of lines. - */ - onFlushed(lineCount) { - this._checkPendingChanges(); - this._lineCount = lineCount; - } - changeWhitespace(callback) { - let hadAChange = false; - try { - const accessor = { - insertWhitespace: (afterLineNumber, ordinal, heightInPx, minWidth) => { - hadAChange = true; - afterLineNumber = afterLineNumber | 0; - ordinal = ordinal | 0; - heightInPx = heightInPx | 0; - minWidth = minWidth | 0; - const id = this._instanceId + (++this._lastWhitespaceId); - this._pendingChanges.insert(new EditorWhitespace(id, afterLineNumber, ordinal, heightInPx, minWidth)); - return id; - }, - changeOneWhitespace: (id, newAfterLineNumber, newHeight) => { - hadAChange = true; - newAfterLineNumber = newAfterLineNumber | 0; - newHeight = newHeight | 0; - this._pendingChanges.change({ id, newAfterLineNumber, newHeight }); - }, - removeWhitespace: (id) => { - hadAChange = true; - this._pendingChanges.remove({ id }); - } - }; - callback(accessor); - } - finally { - this._pendingChanges.commit(this); - } - return hadAChange; - } - _commitPendingChanges(inserts, changes, removes) { - if (inserts.length > 0 || removes.length > 0) { - this._minWidth = -1; /* marker for not being computed */ - } - if (inserts.length + changes.length + removes.length <= 1) { - // when only one thing happened, handle it "delicately" - for (const insert of inserts) { - this._insertWhitespace(insert); - } - for (const change of changes) { - this._changeOneWhitespace(change.id, change.newAfterLineNumber, change.newHeight); - } - for (const remove of removes) { - const index = this._findWhitespaceIndex(remove.id); - if (index === -1) { - continue; - } - this._removeWhitespace(index); - } - return; - } - // simply rebuild the entire datastructure - const toRemove = new Set(); - for (const remove of removes) { - toRemove.add(remove.id); - } - const toChange = new Map(); - for (const change of changes) { - toChange.set(change.id, change); - } - const applyRemoveAndChange = (whitespaces) => { - let result = []; - for (const whitespace of whitespaces) { - if (toRemove.has(whitespace.id)) { - continue; - } - if (toChange.has(whitespace.id)) { - const change = toChange.get(whitespace.id); - whitespace.afterLineNumber = change.newAfterLineNumber; - whitespace.height = change.newHeight; - } - result.push(whitespace); - } - return result; - }; - const result = applyRemoveAndChange(this._arr).concat(applyRemoveAndChange(inserts)); - result.sort((a, b) => { - if (a.afterLineNumber === b.afterLineNumber) { - return a.ordinal - b.ordinal; - } - return a.afterLineNumber - b.afterLineNumber; - }); - this._arr = result; - this._prefixSumValidIndex = -1; - } - _checkPendingChanges() { - if (this._pendingChanges.mustCommit()) { - this._pendingChanges.commit(this); - } - } - _insertWhitespace(whitespace) { - const insertIndex = LinesLayout.findInsertionIndex(this._arr, whitespace.afterLineNumber, whitespace.ordinal); - this._arr.splice(insertIndex, 0, whitespace); - this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, insertIndex - 1); - } - _findWhitespaceIndex(id) { - const arr = this._arr; - for (let i = 0, len = arr.length; i < len; i++) { - if (arr[i].id === id) { - return i; - } - } - return -1; - } - _changeOneWhitespace(id, newAfterLineNumber, newHeight) { - const index = this._findWhitespaceIndex(id); - if (index === -1) { - return; - } - if (this._arr[index].height !== newHeight) { - this._arr[index].height = newHeight; - this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, index - 1); - } - if (this._arr[index].afterLineNumber !== newAfterLineNumber) { - // `afterLineNumber` changed for this whitespace - // Record old whitespace - const whitespace = this._arr[index]; - // Since changing `afterLineNumber` can trigger a reordering, we're gonna remove this whitespace - this._removeWhitespace(index); - whitespace.afterLineNumber = newAfterLineNumber; - // And add it again - this._insertWhitespace(whitespace); - } - } - _removeWhitespace(removeIndex) { - this._arr.splice(removeIndex, 1); - this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, removeIndex - 1); - } - /** - * Notify the layouter that lines have been deleted (a continuous zone of lines). - * - * @param fromLineNumber The line number at which the deletion started, inclusive - * @param toLineNumber The line number at which the deletion ended, inclusive - */ - onLinesDeleted(fromLineNumber, toLineNumber) { - this._checkPendingChanges(); - fromLineNumber = fromLineNumber | 0; - toLineNumber = toLineNumber | 0; - this._lineCount -= (toLineNumber - fromLineNumber + 1); - for (let i = 0, len = this._arr.length; i < len; i++) { - const afterLineNumber = this._arr[i].afterLineNumber; - if (fromLineNumber <= afterLineNumber && afterLineNumber <= toLineNumber) { - // The line this whitespace was after has been deleted - // => move whitespace to before first deleted line - this._arr[i].afterLineNumber = fromLineNumber - 1; - } - else if (afterLineNumber > toLineNumber) { - // The line this whitespace was after has been moved up - // => move whitespace up - this._arr[i].afterLineNumber -= (toLineNumber - fromLineNumber + 1); - } - } - } - /** - * Notify the layouter that lines have been inserted (a continuous zone of lines). - * - * @param fromLineNumber The line number at which the insertion started, inclusive - * @param toLineNumber The line number at which the insertion ended, inclusive. - */ - onLinesInserted(fromLineNumber, toLineNumber) { - this._checkPendingChanges(); - fromLineNumber = fromLineNumber | 0; - toLineNumber = toLineNumber | 0; - this._lineCount += (toLineNumber - fromLineNumber + 1); - for (let i = 0, len = this._arr.length; i < len; i++) { - const afterLineNumber = this._arr[i].afterLineNumber; - if (fromLineNumber <= afterLineNumber) { - this._arr[i].afterLineNumber += (toLineNumber - fromLineNumber + 1); - } - } - } - /** - * Get the sum of all the whitespaces. - */ - getWhitespacesTotalHeight() { - this._checkPendingChanges(); - if (this._arr.length === 0) { - return 0; - } - return this.getWhitespacesAccumulatedHeight(this._arr.length - 1); - } - /** - * Return the sum of the heights of the whitespaces at [0..index]. - * This includes the whitespace at `index`. - * - * @param index The index of the whitespace. - * @return The sum of the heights of all whitespaces before the one at `index`, including the one at `index`. - */ - getWhitespacesAccumulatedHeight(index) { - this._checkPendingChanges(); - index = index | 0; - let startIndex = Math.max(0, this._prefixSumValidIndex + 1); - if (startIndex === 0) { - this._arr[0].prefixSum = this._arr[0].height; - startIndex++; - } - for (let i = startIndex; i <= index; i++) { - this._arr[i].prefixSum = this._arr[i - 1].prefixSum + this._arr[i].height; - } - this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, index); - return this._arr[index].prefixSum; - } - /** - * Get the sum of heights for all objects. - * - * @return The sum of heights for all objects. - */ - getLinesTotalHeight() { - this._checkPendingChanges(); - const linesHeight = this._lineHeight * this._lineCount; - const whitespacesHeight = this.getWhitespacesTotalHeight(); - return linesHeight + whitespacesHeight + this._paddingTop + this._paddingBottom; - } - /** - * Returns the accumulated height of whitespaces before the given line number. - * - * @param lineNumber The line number - */ - getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber) { - this._checkPendingChanges(); - lineNumber = lineNumber | 0; - const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber); - if (lastWhitespaceBeforeLineNumber === -1) { - return 0; - } - return this.getWhitespacesAccumulatedHeight(lastWhitespaceBeforeLineNumber); - } - _findLastWhitespaceBeforeLineNumber(lineNumber) { - lineNumber = lineNumber | 0; - // Find the whitespace before line number - const arr = this._arr; - let low = 0; - let high = arr.length - 1; - while (low <= high) { - const delta = (high - low) | 0; - const halfDelta = (delta / 2) | 0; - const mid = (low + halfDelta) | 0; - if (arr[mid].afterLineNumber < lineNumber) { - if (mid + 1 >= arr.length || arr[mid + 1].afterLineNumber >= lineNumber) { - return mid; - } - else { - low = (mid + 1) | 0; - } - } - else { - high = (mid - 1) | 0; - } - } - return -1; - } - _findFirstWhitespaceAfterLineNumber(lineNumber) { - lineNumber = lineNumber | 0; - const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber); - const firstWhitespaceAfterLineNumber = lastWhitespaceBeforeLineNumber + 1; - if (firstWhitespaceAfterLineNumber < this._arr.length) { - return firstWhitespaceAfterLineNumber; - } - return -1; - } - /** - * Find the index of the first whitespace which has `afterLineNumber` >= `lineNumber`. - * @return The index of the first whitespace with `afterLineNumber` >= `lineNumber` or -1 if no whitespace is found. - */ - getFirstWhitespaceIndexAfterLineNumber(lineNumber) { - this._checkPendingChanges(); - lineNumber = lineNumber | 0; - return this._findFirstWhitespaceAfterLineNumber(lineNumber); - } - /** - * Get the vertical offset (the sum of heights for all objects above) a certain line number. - * - * @param lineNumber The line number - * @return The sum of heights for all objects above `lineNumber`. - */ - getVerticalOffsetForLineNumber(lineNumber) { - this._checkPendingChanges(); - lineNumber = lineNumber | 0; - let previousLinesHeight; - if (lineNumber > 1) { - previousLinesHeight = this._lineHeight * (lineNumber - 1); - } - else { - previousLinesHeight = 0; - } - const previousWhitespacesHeight = this.getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber); - return previousLinesHeight + previousWhitespacesHeight + this._paddingTop; - } - /** - * The maximum min width for all whitespaces. - */ - getWhitespaceMinWidth() { - this._checkPendingChanges(); - if (this._minWidth === -1) { - let minWidth = 0; - for (let i = 0, len = this._arr.length; i < len; i++) { - minWidth = Math.max(minWidth, this._arr[i].minWidth); - } - this._minWidth = minWidth; - } - return this._minWidth; - } - /** - * Check if `verticalOffset` is below all lines. - */ - isAfterLines(verticalOffset) { - this._checkPendingChanges(); - const totalHeight = this.getLinesTotalHeight(); - return verticalOffset > totalHeight; - } - /** - * Find the first line number that is at or after vertical offset `verticalOffset`. - * i.e. if getVerticalOffsetForLine(line) is x and getVerticalOffsetForLine(line + 1) is y, then - * getLineNumberAtOrAfterVerticalOffset(i) = line, x <= i < y. - * - * @param verticalOffset The vertical offset to search at. - * @return The line number at or after vertical offset `verticalOffset`. - */ - getLineNumberAtOrAfterVerticalOffset(verticalOffset) { - this._checkPendingChanges(); - verticalOffset = verticalOffset | 0; - if (verticalOffset < 0) { - return 1; - } - const linesCount = this._lineCount | 0; - const lineHeight = this._lineHeight; - let minLineNumber = 1; - let maxLineNumber = linesCount; - while (minLineNumber < maxLineNumber) { - const midLineNumber = ((minLineNumber + maxLineNumber) / 2) | 0; - const midLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(midLineNumber) | 0; - if (verticalOffset >= midLineNumberVerticalOffset + lineHeight) { - // vertical offset is after mid line number - minLineNumber = midLineNumber + 1; - } - else if (verticalOffset >= midLineNumberVerticalOffset) { - // Hit - return midLineNumber; - } - else { - // vertical offset is before mid line number, but mid line number could still be what we're searching for - maxLineNumber = midLineNumber; - } - } - if (minLineNumber > linesCount) { - return linesCount; - } - return minLineNumber; - } - /** - * Get all the lines and their relative vertical offsets that are positioned between `verticalOffset1` and `verticalOffset2`. - * - * @param verticalOffset1 The beginning of the viewport. - * @param verticalOffset2 The end of the viewport. - * @return A structure describing the lines positioned between `verticalOffset1` and `verticalOffset2`. - */ - getLinesViewportData(verticalOffset1, verticalOffset2) { - this._checkPendingChanges(); - verticalOffset1 = verticalOffset1 | 0; - verticalOffset2 = verticalOffset2 | 0; - const lineHeight = this._lineHeight; - // Find first line number - // We don't live in a perfect world, so the line number might start before or after verticalOffset1 - const startLineNumber = this.getLineNumberAtOrAfterVerticalOffset(verticalOffset1) | 0; - const startLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(startLineNumber) | 0; - let endLineNumber = this._lineCount | 0; - // Also keep track of what whitespace we've got - let whitespaceIndex = this.getFirstWhitespaceIndexAfterLineNumber(startLineNumber) | 0; - const whitespaceCount = this.getWhitespacesCount() | 0; - let currentWhitespaceHeight; - let currentWhitespaceAfterLineNumber; - if (whitespaceIndex === -1) { - whitespaceIndex = whitespaceCount; - currentWhitespaceAfterLineNumber = endLineNumber + 1; - currentWhitespaceHeight = 0; - } - else { - currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0; - currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0; - } - let currentVerticalOffset = startLineNumberVerticalOffset; - let currentLineRelativeOffset = currentVerticalOffset; - // IE (all versions) cannot handle units above about 1,533,908 px, so every 500k pixels bring numbers down - const STEP_SIZE = 500000; - let bigNumbersDelta = 0; - if (startLineNumberVerticalOffset >= STEP_SIZE) { - // Compute a delta that guarantees that lines are positioned at `lineHeight` increments - bigNumbersDelta = Math.floor(startLineNumberVerticalOffset / STEP_SIZE) * STEP_SIZE; - bigNumbersDelta = Math.floor(bigNumbersDelta / lineHeight) * lineHeight; - currentLineRelativeOffset -= bigNumbersDelta; - } - const linesOffsets = []; - const verticalCenter = verticalOffset1 + (verticalOffset2 - verticalOffset1) / 2; - let centeredLineNumber = -1; - // Figure out how far the lines go - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - if (centeredLineNumber === -1) { - const currentLineTop = currentVerticalOffset; - const currentLineBottom = currentVerticalOffset + lineHeight; - if ((currentLineTop <= verticalCenter && verticalCenter < currentLineBottom) || currentLineTop > verticalCenter) { - centeredLineNumber = lineNumber; - } - } - // Count current line height in the vertical offsets - currentVerticalOffset += lineHeight; - linesOffsets[lineNumber - startLineNumber] = currentLineRelativeOffset; - // Next line starts immediately after this one - currentLineRelativeOffset += lineHeight; - while (currentWhitespaceAfterLineNumber === lineNumber) { - // Push down next line with the height of the current whitespace - currentLineRelativeOffset += currentWhitespaceHeight; - // Count current whitespace in the vertical offsets - currentVerticalOffset += currentWhitespaceHeight; - whitespaceIndex++; - if (whitespaceIndex >= whitespaceCount) { - currentWhitespaceAfterLineNumber = endLineNumber + 1; - } - else { - currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0; - currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0; - } - } - if (currentVerticalOffset >= verticalOffset2) { - // We have covered the entire viewport area, time to stop - endLineNumber = lineNumber; - break; - } - } - if (centeredLineNumber === -1) { - centeredLineNumber = endLineNumber; - } - const endLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(endLineNumber) | 0; - let completelyVisibleStartLineNumber = startLineNumber; - let completelyVisibleEndLineNumber = endLineNumber; - if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) { - if (startLineNumberVerticalOffset < verticalOffset1) { - completelyVisibleStartLineNumber++; - } - } - if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) { - if (endLineNumberVerticalOffset + lineHeight > verticalOffset2) { - completelyVisibleEndLineNumber--; - } - } - return { - bigNumbersDelta: bigNumbersDelta, - startLineNumber: startLineNumber, - endLineNumber: endLineNumber, - relativeVerticalOffset: linesOffsets, - centeredLineNumber: centeredLineNumber, - completelyVisibleStartLineNumber: completelyVisibleStartLineNumber, - completelyVisibleEndLineNumber: completelyVisibleEndLineNumber - }; - } - getVerticalOffsetForWhitespaceIndex(whitespaceIndex) { - this._checkPendingChanges(); - whitespaceIndex = whitespaceIndex | 0; - const afterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex); - let previousLinesHeight; - if (afterLineNumber >= 1) { - previousLinesHeight = this._lineHeight * afterLineNumber; - } - else { - previousLinesHeight = 0; - } - let previousWhitespacesHeight; - if (whitespaceIndex > 0) { - previousWhitespacesHeight = this.getWhitespacesAccumulatedHeight(whitespaceIndex - 1); - } - else { - previousWhitespacesHeight = 0; - } - return previousLinesHeight + previousWhitespacesHeight + this._paddingTop; - } - getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset) { - this._checkPendingChanges(); - verticalOffset = verticalOffset | 0; - let minWhitespaceIndex = 0; - let maxWhitespaceIndex = this.getWhitespacesCount() - 1; - if (maxWhitespaceIndex < 0) { - return -1; - } - // Special case: nothing to be found - const maxWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(maxWhitespaceIndex); - const maxWhitespaceHeight = this.getHeightForWhitespaceIndex(maxWhitespaceIndex); - if (verticalOffset >= maxWhitespaceVerticalOffset + maxWhitespaceHeight) { - return -1; - } - while (minWhitespaceIndex < maxWhitespaceIndex) { - const midWhitespaceIndex = Math.floor((minWhitespaceIndex + maxWhitespaceIndex) / 2); - const midWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(midWhitespaceIndex); - const midWhitespaceHeight = this.getHeightForWhitespaceIndex(midWhitespaceIndex); - if (verticalOffset >= midWhitespaceVerticalOffset + midWhitespaceHeight) { - // vertical offset is after whitespace - minWhitespaceIndex = midWhitespaceIndex + 1; - } - else if (verticalOffset >= midWhitespaceVerticalOffset) { - // Hit - return midWhitespaceIndex; - } - else { - // vertical offset is before whitespace, but midWhitespaceIndex might still be what we're searching for - maxWhitespaceIndex = midWhitespaceIndex; - } - } - return minWhitespaceIndex; - } - /** - * Get exactly the whitespace that is layouted at `verticalOffset`. - * - * @param verticalOffset The vertical offset. - * @return Precisely the whitespace that is layouted at `verticaloffset` or null. - */ - getWhitespaceAtVerticalOffset(verticalOffset) { - this._checkPendingChanges(); - verticalOffset = verticalOffset | 0; - const candidateIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset); - if (candidateIndex < 0) { - return null; - } - if (candidateIndex >= this.getWhitespacesCount()) { - return null; - } - const candidateTop = this.getVerticalOffsetForWhitespaceIndex(candidateIndex); - if (candidateTop > verticalOffset) { - return null; - } - const candidateHeight = this.getHeightForWhitespaceIndex(candidateIndex); - const candidateId = this.getIdForWhitespaceIndex(candidateIndex); - const candidateAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(candidateIndex); - return { - id: candidateId, - afterLineNumber: candidateAfterLineNumber, - verticalOffset: candidateTop, - height: candidateHeight - }; - } - /** - * Get a list of whitespaces that are positioned between `verticalOffset1` and `verticalOffset2`. - * - * @param verticalOffset1 The beginning of the viewport. - * @param verticalOffset2 The end of the viewport. - * @return An array with all the whitespaces in the viewport. If no whitespace is in viewport, the array is empty. - */ - getWhitespaceViewportData(verticalOffset1, verticalOffset2) { - this._checkPendingChanges(); - verticalOffset1 = verticalOffset1 | 0; - verticalOffset2 = verticalOffset2 | 0; - const startIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset1); - const endIndex = this.getWhitespacesCount() - 1; - if (startIndex < 0) { - return []; - } - let result = []; - for (let i = startIndex; i <= endIndex; i++) { - const top = this.getVerticalOffsetForWhitespaceIndex(i); - const height = this.getHeightForWhitespaceIndex(i); - if (top >= verticalOffset2) { - break; - } - result.push({ - id: this.getIdForWhitespaceIndex(i), - afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i), - verticalOffset: top, - height: height - }); - } - return result; - } - /** - * Get all whitespaces. - */ - getWhitespaces() { - this._checkPendingChanges(); - return this._arr.slice(0); - } - /** - * The number of whitespaces. - */ - getWhitespacesCount() { - this._checkPendingChanges(); - return this._arr.length; - } - /** - * Get the `id` for whitespace at index `index`. - * - * @param index The index of the whitespace. - * @return `id` of whitespace at `index`. - */ - getIdForWhitespaceIndex(index) { - this._checkPendingChanges(); - index = index | 0; - return this._arr[index].id; - } - /** - * Get the `afterLineNumber` for whitespace at index `index`. - * - * @param index The index of the whitespace. - * @return `afterLineNumber` of whitespace at `index`. - */ - getAfterLineNumberForWhitespaceIndex(index) { - this._checkPendingChanges(); - index = index | 0; - return this._arr[index].afterLineNumber; - } - /** - * Get the `height` for whitespace at index `index`. - * - * @param index The index of the whitespace. - * @return `height` of whitespace at `index`. - */ - getHeightForWhitespaceIndex(index) { - this._checkPendingChanges(); - index = index | 0; - return this._arr[index].height; - } -} -LinesLayout.INSTANCE_COUNT = 0; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js ***! - \**********************************************************************************/ -/*! exports provided: ViewLayout */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLayout", function() { return ViewLayout; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_scrollable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/scrollable.js */ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js"); -/* harmony import */ var _linesLayout_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linesLayout.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js"); -/* harmony import */ var _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../viewModel/viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../viewModel/viewModelEventDispatcher.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -const SMOOTH_SCROLLING_TIME = 125; -class EditorScrollDimensions { - constructor(width, contentWidth, height, contentHeight) { - width = width | 0; - contentWidth = contentWidth | 0; - height = height | 0; - contentHeight = contentHeight | 0; - if (width < 0) { - width = 0; - } - if (contentWidth < 0) { - contentWidth = 0; - } - if (height < 0) { - height = 0; - } - if (contentHeight < 0) { - contentHeight = 0; - } - this.width = width; - this.contentWidth = contentWidth; - this.scrollWidth = Math.max(width, contentWidth); - this.height = height; - this.contentHeight = contentHeight; - this.scrollHeight = Math.max(height, contentHeight); - } - equals(other) { - return (this.width === other.width - && this.contentWidth === other.contentWidth - && this.height === other.height - && this.contentHeight === other.contentHeight); - } -} -class EditorScrollable extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(smoothScrollDuration, scheduleAtNextAnimationFrame) { - super(); - this._onDidContentSizeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onDidContentSizeChange = this._onDidContentSizeChange.event; - this._dimensions = new EditorScrollDimensions(0, 0, 0, 0); - this._scrollable = this._register(new _base_common_scrollable_js__WEBPACK_IMPORTED_MODULE_2__["Scrollable"](smoothScrollDuration, scheduleAtNextAnimationFrame)); - this.onDidScroll = this._scrollable.onScroll; - } - getScrollable() { - return this._scrollable; - } - setSmoothScrollDuration(smoothScrollDuration) { - this._scrollable.setSmoothScrollDuration(smoothScrollDuration); - } - validateScrollPosition(scrollPosition) { - return this._scrollable.validateScrollPosition(scrollPosition); - } - getScrollDimensions() { - return this._dimensions; - } - setScrollDimensions(dimensions) { - if (this._dimensions.equals(dimensions)) { - return; - } - const oldDimensions = this._dimensions; - this._dimensions = dimensions; - this._scrollable.setScrollDimensions({ - width: dimensions.width, - scrollWidth: dimensions.scrollWidth, - height: dimensions.height, - scrollHeight: dimensions.scrollHeight - }, true); - const contentWidthChanged = (oldDimensions.contentWidth !== dimensions.contentWidth); - const contentHeightChanged = (oldDimensions.contentHeight !== dimensions.contentHeight); - if (contentWidthChanged || contentHeightChanged) { - this._onDidContentSizeChange.fire(new _viewModel_viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_5__["ContentSizeChangedEvent"](oldDimensions.contentWidth, oldDimensions.contentHeight, dimensions.contentWidth, dimensions.contentHeight)); - } - } - getFutureScrollPosition() { - return this._scrollable.getFutureScrollPosition(); - } - getCurrentScrollPosition() { - return this._scrollable.getCurrentScrollPosition(); - } - setScrollPositionNow(update) { - this._scrollable.setScrollPositionNow(update); - } - setScrollPositionSmooth(update) { - this._scrollable.setScrollPositionSmooth(update); - } -} -class ViewLayout extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(configuration, lineCount, scheduleAtNextAnimationFrame) { - super(); - this._configuration = configuration; - const options = this._configuration.options; - const layoutInfo = options.get(117 /* layoutInfo */); - const padding = options.get(66 /* padding */); - this._linesLayout = new _linesLayout_js__WEBPACK_IMPORTED_MODULE_3__["LinesLayout"](lineCount, options.get(51 /* lineHeight */), padding.top, padding.bottom); - this._scrollable = this._register(new EditorScrollable(0, scheduleAtNextAnimationFrame)); - this._configureSmoothScrollDuration(); - this._scrollable.setScrollDimensions(new EditorScrollDimensions(layoutInfo.contentWidth, 0, layoutInfo.height, 0)); - this.onDidScroll = this._scrollable.onDidScroll; - this.onDidContentSizeChange = this._scrollable.onDidContentSizeChange; - this._updateHeight(); - } - dispose() { - super.dispose(); - } - getScrollable() { - return this._scrollable.getScrollable(); - } - onHeightMaybeChanged() { - this._updateHeight(); - } - _configureSmoothScrollDuration() { - this._scrollable.setSmoothScrollDuration(this._configuration.options.get(94 /* smoothScrolling */) ? SMOOTH_SCROLLING_TIME : 0); - } - // ---- begin view event handlers - onConfigurationChanged(e) { - const options = this._configuration.options; - if (e.hasChanged(51 /* lineHeight */)) { - this._linesLayout.setLineHeight(options.get(51 /* lineHeight */)); - } - if (e.hasChanged(66 /* padding */)) { - const padding = options.get(66 /* padding */); - this._linesLayout.setPadding(padding.top, padding.bottom); - } - if (e.hasChanged(117 /* layoutInfo */)) { - const layoutInfo = options.get(117 /* layoutInfo */); - const width = layoutInfo.contentWidth; - const height = layoutInfo.height; - const scrollDimensions = this._scrollable.getScrollDimensions(); - const contentWidth = scrollDimensions.contentWidth; - this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth))); - } - else { - this._updateHeight(); - } - if (e.hasChanged(94 /* smoothScrolling */)) { - this._configureSmoothScrollDuration(); - } - } - onFlushed(lineCount) { - this._linesLayout.onFlushed(lineCount); - } - onLinesDeleted(fromLineNumber, toLineNumber) { - this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber); - } - onLinesInserted(fromLineNumber, toLineNumber) { - this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber); - } - // ---- end view event handlers - _getHorizontalScrollbarHeight(width, scrollWidth) { - const options = this._configuration.options; - const scrollbar = options.get(84 /* scrollbar */); - if (scrollbar.horizontal === 2 /* Hidden */) { - // horizontal scrollbar not visible - return 0; - } - if (width >= scrollWidth) { - // horizontal scrollbar not visible - return 0; - } - return scrollbar.horizontalScrollbarSize; - } - _getContentHeight(width, height, contentWidth) { - const options = this._configuration.options; - let result = this._linesLayout.getLinesTotalHeight(); - if (options.get(86 /* scrollBeyondLastLine */)) { - result += height - options.get(51 /* lineHeight */); - } - else { - result += this._getHorizontalScrollbarHeight(width, contentWidth); - } - return result; - } - _updateHeight() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - const width = scrollDimensions.width; - const height = scrollDimensions.height; - const contentWidth = scrollDimensions.contentWidth; - this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth))); - } - // ---- Layouting logic - getCurrentViewport() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - const currentScrollPosition = this._scrollable.getCurrentScrollPosition(); - return new _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__["Viewport"](currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height); - } - getFutureViewport() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - const currentScrollPosition = this._scrollable.getFutureScrollPosition(); - return new _viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_4__["Viewport"](currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height); - } - _computeContentWidth(maxLineWidth) { - const options = this._configuration.options; - const wrappingInfo = options.get(118 /* wrappingInfo */); - const fontInfo = options.get(36 /* fontInfo */); - if (wrappingInfo.isViewportWrapping) { - const layoutInfo = options.get(117 /* layoutInfo */); - const minimap = options.get(56 /* minimap */); - if (maxLineWidth > layoutInfo.contentWidth + fontInfo.typicalHalfwidthCharacterWidth) { - // This is a case where viewport wrapping is on, but the line extends above the viewport - if (minimap.enabled && minimap.side === 'right') { - // We need to accomodate the scrollbar width - return maxLineWidth + layoutInfo.verticalScrollbarWidth; - } - } - return maxLineWidth; - } - else { - const extraHorizontalSpace = options.get(85 /* scrollBeyondLastColumn */) * fontInfo.typicalHalfwidthCharacterWidth; - const whitespaceMinWidth = this._linesLayout.getWhitespaceMinWidth(); - return Math.max(maxLineWidth + extraHorizontalSpace, whitespaceMinWidth); - } - } - setMaxLineWidth(maxLineWidth) { - const scrollDimensions = this._scrollable.getScrollDimensions(); - // const newScrollWidth = ; - this._scrollable.setScrollDimensions(new EditorScrollDimensions(scrollDimensions.width, this._computeContentWidth(maxLineWidth), scrollDimensions.height, scrollDimensions.contentHeight)); - // The height might depend on the fact that there is a horizontal scrollbar or not - this._updateHeight(); - } - // ---- view state - saveState() { - const currentScrollPosition = this._scrollable.getFutureScrollPosition(); - let scrollTop = currentScrollPosition.scrollTop; - let firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop); - let whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport); - return { - scrollTop: scrollTop, - scrollTopWithoutViewZones: scrollTop - whitespaceAboveFirstLine, - scrollLeft: currentScrollPosition.scrollLeft - }; - } - // ---- IVerticalLayoutProvider - changeWhitespace(callback) { - const hadAChange = this._linesLayout.changeWhitespace(callback); - if (hadAChange) { - this.onHeightMaybeChanged(); - } - return hadAChange; - } - getVerticalOffsetForLineNumber(lineNumber) { - return this._linesLayout.getVerticalOffsetForLineNumber(lineNumber); - } - isAfterLines(verticalOffset) { - return this._linesLayout.isAfterLines(verticalOffset); - } - getLineNumberAtVerticalOffset(verticalOffset) { - return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(verticalOffset); - } - getWhitespaceAtVerticalOffset(verticalOffset) { - return this._linesLayout.getWhitespaceAtVerticalOffset(verticalOffset); - } - getLinesViewportData() { - const visibleBox = this.getCurrentViewport(); - return this._linesLayout.getLinesViewportData(visibleBox.top, visibleBox.top + visibleBox.height); - } - getLinesViewportDataAtScrollTop(scrollTop) { - // do some minimal validations on scrollTop - const scrollDimensions = this._scrollable.getScrollDimensions(); - if (scrollTop + scrollDimensions.height > scrollDimensions.scrollHeight) { - scrollTop = scrollDimensions.scrollHeight - scrollDimensions.height; - } - if (scrollTop < 0) { - scrollTop = 0; - } - return this._linesLayout.getLinesViewportData(scrollTop, scrollTop + scrollDimensions.height); - } - getWhitespaceViewportData() { - const visibleBox = this.getCurrentViewport(); - return this._linesLayout.getWhitespaceViewportData(visibleBox.top, visibleBox.top + visibleBox.height); - } - getWhitespaces() { - return this._linesLayout.getWhitespaces(); - } - // ---- IScrollingProvider - getContentWidth() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - return scrollDimensions.contentWidth; - } - getScrollWidth() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - return scrollDimensions.scrollWidth; - } - getContentHeight() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - return scrollDimensions.contentHeight; - } - getScrollHeight() { - const scrollDimensions = this._scrollable.getScrollDimensions(); - return scrollDimensions.scrollHeight; - } - getCurrentScrollLeft() { - const currentScrollPosition = this._scrollable.getCurrentScrollPosition(); - return currentScrollPosition.scrollLeft; - } - getCurrentScrollTop() { - const currentScrollPosition = this._scrollable.getCurrentScrollPosition(); - return currentScrollPosition.scrollTop; - } - validateScrollPosition(scrollPosition) { - return this._scrollable.validateScrollPosition(scrollPosition); - } - setScrollPosition(position, type) { - if (type === 1 /* Immediate */) { - this._scrollable.setScrollPositionNow(position); - } - else { - this._scrollable.setScrollPositionSmooth(position); - } - } - deltaScrollNow(deltaScrollLeft, deltaScrollTop) { - const currentScrollPosition = this._scrollable.getCurrentScrollPosition(); - this._scrollable.setScrollPositionNow({ - scrollLeft: currentScrollPosition.scrollLeft + deltaScrollLeft, - scrollTop: currentScrollPosition.scrollTop + deltaScrollTop - }); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js ***! - \****************************************************************************************/ -/*! exports provided: LineRange, RenderLineInput, CharacterMapping, RenderLineOutput, renderViewLine, RenderLineOutput2, renderViewLine2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineRange", function() { return LineRange; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderLineInput", function() { return RenderLineInput; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharacterMapping", function() { return CharacterMapping; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderLineOutput", function() { return RenderLineOutput; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderViewLine", function() { return renderViewLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderLineOutput2", function() { return RenderLineOutput2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderViewLine2", function() { return renderViewLine2; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/stringBuilder.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js"); -/* harmony import */ var _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class LinePart { - constructor(endIndex, type, metadata) { - this.endIndex = endIndex; - this.type = type; - this.metadata = metadata; - } - isWhitespace() { - return (this.metadata & 1 /* IS_WHITESPACE_MASK */ ? true : false); - } -} -class LineRange { - constructor(startIndex, endIndex) { - this.startOffset = startIndex; - this.endOffset = endIndex; - } - equals(otherLineRange) { - return this.startOffset === otherLineRange.startOffset - && this.endOffset === otherLineRange.endOffset; - } -} -class RenderLineInput { - constructor(useMonospaceOptimizations, canUseHalfwidthRightwardsArrow, lineContent, continuesWithWrappedLine, isBasicASCII, containsRTL, fauxIndentLength, lineTokens, lineDecorations, tabSize, startVisibleColumn, spaceWidth, middotWidth, wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, selectionsOnLine) { - this.useMonospaceOptimizations = useMonospaceOptimizations; - this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow; - this.lineContent = lineContent; - this.continuesWithWrappedLine = continuesWithWrappedLine; - this.isBasicASCII = isBasicASCII; - this.containsRTL = containsRTL; - this.fauxIndentLength = fauxIndentLength; - this.lineTokens = lineTokens; - this.lineDecorations = lineDecorations; - this.tabSize = tabSize; - this.startVisibleColumn = startVisibleColumn; - this.spaceWidth = spaceWidth; - this.stopRenderingLineAfter = stopRenderingLineAfter; - this.renderWhitespace = (renderWhitespace === 'all' - ? 4 /* All */ - : renderWhitespace === 'boundary' - ? 1 /* Boundary */ - : renderWhitespace === 'selection' - ? 2 /* Selection */ - : renderWhitespace === 'trailing' - ? 3 /* Trailing */ - : 0 /* None */); - this.renderControlCharacters = renderControlCharacters; - this.fontLigatures = fontLigatures; - this.selectionsOnLine = selectionsOnLine && selectionsOnLine.sort((a, b) => a.startOffset < b.startOffset ? -1 : 1); - const wsmiddotDiff = Math.abs(wsmiddotWidth - spaceWidth); - const middotDiff = Math.abs(middotWidth - spaceWidth); - if (wsmiddotDiff < middotDiff) { - this.renderSpaceWidth = wsmiddotWidth; - this.renderSpaceCharCode = 0x2E31; // U+2E31 - WORD SEPARATOR MIDDLE DOT - } - else { - this.renderSpaceWidth = middotWidth; - this.renderSpaceCharCode = 0xB7; // U+00B7 - MIDDLE DOT - } - } - sameSelection(otherSelections) { - if (this.selectionsOnLine === null) { - return otherSelections === null; - } - if (otherSelections === null) { - return false; - } - if (otherSelections.length !== this.selectionsOnLine.length) { - return false; - } - for (let i = 0; i < this.selectionsOnLine.length; i++) { - if (!this.selectionsOnLine[i].equals(otherSelections[i])) { - return false; - } - } - return true; - } - equals(other) { - return (this.useMonospaceOptimizations === other.useMonospaceOptimizations - && this.canUseHalfwidthRightwardsArrow === other.canUseHalfwidthRightwardsArrow - && this.lineContent === other.lineContent - && this.continuesWithWrappedLine === other.continuesWithWrappedLine - && this.isBasicASCII === other.isBasicASCII - && this.containsRTL === other.containsRTL - && this.fauxIndentLength === other.fauxIndentLength - && this.tabSize === other.tabSize - && this.startVisibleColumn === other.startVisibleColumn - && this.spaceWidth === other.spaceWidth - && this.renderSpaceWidth === other.renderSpaceWidth - && this.renderSpaceCharCode === other.renderSpaceCharCode - && this.stopRenderingLineAfter === other.stopRenderingLineAfter - && this.renderWhitespace === other.renderWhitespace - && this.renderControlCharacters === other.renderControlCharacters - && this.fontLigatures === other.fontLigatures - && _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__["LineDecoration"].equalsArr(this.lineDecorations, other.lineDecorations) - && this.lineTokens.equals(other.lineTokens) - && this.sameSelection(other.selectionsOnLine)); - } -} -/** - * Provides a both direction mapping between a line's character and its rendered position. - */ -class CharacterMapping { - constructor(length, partCount) { - this.length = length; - this._data = new Uint32Array(this.length); - this._absoluteOffsets = new Uint32Array(this.length); - } - static getPartIndex(partData) { - return (partData & 4294901760 /* PART_INDEX_MASK */) >>> 16 /* PART_INDEX_OFFSET */; - } - static getCharIndex(partData) { - return (partData & 65535 /* CHAR_INDEX_MASK */) >>> 0 /* CHAR_INDEX_OFFSET */; - } - setPartData(charOffset, partIndex, charIndex, partAbsoluteOffset) { - let partData = ((partIndex << 16 /* PART_INDEX_OFFSET */) - | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0; - this._data[charOffset] = partData; - this._absoluteOffsets[charOffset] = partAbsoluteOffset + charIndex; - } - getAbsoluteOffsets() { - return this._absoluteOffsets; - } - charOffsetToPartData(charOffset) { - if (this.length === 0) { - return 0; - } - if (charOffset < 0) { - return this._data[0]; - } - if (charOffset >= this.length) { - return this._data[this.length - 1]; - } - return this._data[charOffset]; - } - partDataToCharOffset(partIndex, partLength, charIndex) { - if (this.length === 0) { - return 0; - } - let searchEntry = ((partIndex << 16 /* PART_INDEX_OFFSET */) - | (charIndex << 0 /* CHAR_INDEX_OFFSET */)) >>> 0; - let min = 0; - let max = this.length - 1; - while (min + 1 < max) { - let mid = ((min + max) >>> 1); - let midEntry = this._data[mid]; - if (midEntry === searchEntry) { - return mid; - } - else if (midEntry > searchEntry) { - max = mid; - } - else { - min = mid; - } - } - if (min === max) { - return min; - } - let minEntry = this._data[min]; - let maxEntry = this._data[max]; - if (minEntry === searchEntry) { - return min; - } - if (maxEntry === searchEntry) { - return max; - } - let minPartIndex = CharacterMapping.getPartIndex(minEntry); - let minCharIndex = CharacterMapping.getCharIndex(minEntry); - let maxPartIndex = CharacterMapping.getPartIndex(maxEntry); - let maxCharIndex; - if (minPartIndex !== maxPartIndex) { - // sitting between parts - maxCharIndex = partLength; - } - else { - maxCharIndex = CharacterMapping.getCharIndex(maxEntry); - } - let minEntryDistance = charIndex - minCharIndex; - let maxEntryDistance = maxCharIndex - charIndex; - if (minEntryDistance <= maxEntryDistance) { - return min; - } - return max; - } -} -class RenderLineOutput { - constructor(characterMapping, containsRTL, containsForeignElements) { - this.characterMapping = characterMapping; - this.containsRTL = containsRTL; - this.containsForeignElements = containsForeignElements; - } -} -function renderViewLine(input, sb) { - if (input.lineContent.length === 0) { - let containsForeignElements = 0 /* None */; - let content = ''; - if (input.lineDecorations.length > 0) { - // This line is empty, but it contains inline decorations - const beforeClassNames = []; - const afterClassNames = []; - for (let i = 0, len = input.lineDecorations.length; i < len; i++) { - const lineDecoration = input.lineDecorations[i]; - if (lineDecoration.type === 1 /* Before */) { - beforeClassNames.push(input.lineDecorations[i].className); - containsForeignElements |= 1 /* Before */; - } - if (lineDecoration.type === 2 /* After */) { - afterClassNames.push(input.lineDecorations[i].className); - containsForeignElements |= 2 /* After */; - } - } - if (containsForeignElements !== 0 /* None */) { - const beforeSpan = (beforeClassNames.length > 0 ? `` : ``); - const afterSpan = (afterClassNames.length > 0 ? `` : ``); - content = `${beforeSpan}${afterSpan}`; - } - } - sb.appendASCIIString(content); - return new RenderLineOutput(new CharacterMapping(0, 0), false, containsForeignElements); - } - return _renderLine(resolveRenderLineInput(input), sb); -} -class RenderLineOutput2 { - constructor(characterMapping, html, containsRTL, containsForeignElements) { - this.characterMapping = characterMapping; - this.html = html; - this.containsRTL = containsRTL; - this.containsForeignElements = containsForeignElements; - } -} -function renderViewLine2(input) { - let sb = Object(_core_stringBuilder_js__WEBPACK_IMPORTED_MODULE_1__["createStringBuilder"])(10000); - let out = renderViewLine(input, sb); - return new RenderLineOutput2(out.characterMapping, sb.build(), out.containsRTL, out.containsForeignElements); -} -class ResolvedRenderLineInput { - constructor(fontIsMonospace, canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, parts, containsForeignElements, fauxIndentLength, tabSize, startVisibleColumn, containsRTL, spaceWidth, renderSpaceCharCode, renderWhitespace, renderControlCharacters) { - this.fontIsMonospace = fontIsMonospace; - this.canUseHalfwidthRightwardsArrow = canUseHalfwidthRightwardsArrow; - this.lineContent = lineContent; - this.len = len; - this.isOverflowing = isOverflowing; - this.parts = parts; - this.containsForeignElements = containsForeignElements; - this.fauxIndentLength = fauxIndentLength; - this.tabSize = tabSize; - this.startVisibleColumn = startVisibleColumn; - this.containsRTL = containsRTL; - this.spaceWidth = spaceWidth; - this.renderSpaceCharCode = renderSpaceCharCode; - this.renderWhitespace = renderWhitespace; - this.renderControlCharacters = renderControlCharacters; - // - } -} -function resolveRenderLineInput(input) { - const lineContent = input.lineContent; - let isOverflowing; - let len; - if (input.stopRenderingLineAfter !== -1 && input.stopRenderingLineAfter < lineContent.length) { - isOverflowing = true; - len = input.stopRenderingLineAfter; - } - else { - isOverflowing = false; - len = lineContent.length; - } - let tokens = transformAndRemoveOverflowing(input.lineTokens, input.fauxIndentLength, len); - if (input.renderWhitespace === 4 /* All */ || - input.renderWhitespace === 1 /* Boundary */ || - (input.renderWhitespace === 2 /* Selection */ && !!input.selectionsOnLine) || - input.renderWhitespace === 3 /* Trailing */) { - tokens = _applyRenderWhitespace(input, lineContent, len, tokens); - } - let containsForeignElements = 0 /* None */; - if (input.lineDecorations.length > 0) { - for (let i = 0, len = input.lineDecorations.length; i < len; i++) { - const lineDecoration = input.lineDecorations[i]; - if (lineDecoration.type === 3 /* RegularAffectingLetterSpacing */) { - // Pretend there are foreign elements... although not 100% accurate. - containsForeignElements |= 1 /* Before */; - } - else if (lineDecoration.type === 1 /* Before */) { - containsForeignElements |= 1 /* Before */; - } - else if (lineDecoration.type === 2 /* After */) { - containsForeignElements |= 2 /* After */; - } - } - tokens = _applyInlineDecorations(lineContent, len, tokens, input.lineDecorations); - } - if (!input.containsRTL) { - // We can never split RTL text, as it ruins the rendering - tokens = splitLargeTokens(lineContent, tokens, !input.isBasicASCII || input.fontLigatures); - } - return new ResolvedRenderLineInput(input.useMonospaceOptimizations, input.canUseHalfwidthRightwardsArrow, lineContent, len, isOverflowing, tokens, containsForeignElements, input.fauxIndentLength, input.tabSize, input.startVisibleColumn, input.containsRTL, input.spaceWidth, input.renderSpaceCharCode, input.renderWhitespace, input.renderControlCharacters); -} -/** - * In the rendering phase, characters are always looped until token.endIndex. - * Ensure that all tokens end before `len` and the last one ends precisely at `len`. - */ -function transformAndRemoveOverflowing(tokens, fauxIndentLength, len) { - let result = [], resultLen = 0; - // The faux indent part of the line should have no token type - if (fauxIndentLength > 0) { - result[resultLen++] = new LinePart(fauxIndentLength, '', 0); - } - for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) { - const endIndex = tokens.getEndOffset(tokenIndex); - if (endIndex <= fauxIndentLength) { - // The faux indent part of the line should have no token type - continue; - } - const type = tokens.getClassName(tokenIndex); - if (endIndex >= len) { - result[resultLen++] = new LinePart(len, type, 0); - break; - } - result[resultLen++] = new LinePart(endIndex, type, 0); - } - return result; -} -/** - * See https://github.com/Microsoft/vscode/issues/6885. - * It appears that having very large spans causes very slow reading of character positions. - * So here we try to avoid that. - */ -function splitLargeTokens(lineContent, tokens, onlyAtSpaces) { - let lastTokenEndIndex = 0; - let result = [], resultLen = 0; - if (onlyAtSpaces) { - // Split only at spaces => we need to walk each character - for (let i = 0, len = tokens.length; i < len; i++) { - const token = tokens[i]; - const tokenEndIndex = token.endIndex; - if (lastTokenEndIndex + 50 /* LongToken */ < tokenEndIndex) { - const tokenType = token.type; - const tokenMetadata = token.metadata; - let lastSpaceOffset = -1; - let currTokenStart = lastTokenEndIndex; - for (let j = lastTokenEndIndex; j < tokenEndIndex; j++) { - if (lineContent.charCodeAt(j) === 32 /* Space */) { - lastSpaceOffset = j; - } - if (lastSpaceOffset !== -1 && j - currTokenStart >= 50 /* LongToken */) { - // Split at `lastSpaceOffset` + 1 - result[resultLen++] = new LinePart(lastSpaceOffset + 1, tokenType, tokenMetadata); - currTokenStart = lastSpaceOffset + 1; - lastSpaceOffset = -1; - } - } - if (currTokenStart !== tokenEndIndex) { - result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata); - } - } - else { - result[resultLen++] = token; - } - lastTokenEndIndex = tokenEndIndex; - } - } - else { - // Split anywhere => we don't need to walk each character - for (let i = 0, len = tokens.length; i < len; i++) { - const token = tokens[i]; - const tokenEndIndex = token.endIndex; - let diff = (tokenEndIndex - lastTokenEndIndex); - if (diff > 50 /* LongToken */) { - const tokenType = token.type; - const tokenMetadata = token.metadata; - const piecesCount = Math.ceil(diff / 50 /* LongToken */); - for (let j = 1; j < piecesCount; j++) { - let pieceEndIndex = lastTokenEndIndex + (j * 50 /* LongToken */); - result[resultLen++] = new LinePart(pieceEndIndex, tokenType, tokenMetadata); - } - result[resultLen++] = new LinePart(tokenEndIndex, tokenType, tokenMetadata); - } - else { - result[resultLen++] = token; - } - lastTokenEndIndex = tokenEndIndex; - } - } - return result; -} -/** - * Whitespace is rendered by "replacing" tokens with a special-purpose `mtkw` type that is later recognized in the rendering phase. - * Moreover, a token is created for every visual indent because on some fonts the glyphs used for rendering whitespace (→ or ·) do not have the same width as  . - * The rendering phase will generate `style="width:..."` for these tokens. - */ -function _applyRenderWhitespace(input, lineContent, len, tokens) { - const continuesWithWrappedLine = input.continuesWithWrappedLine; - const fauxIndentLength = input.fauxIndentLength; - const tabSize = input.tabSize; - const startVisibleColumn = input.startVisibleColumn; - const useMonospaceOptimizations = input.useMonospaceOptimizations; - const selections = input.selectionsOnLine; - const onlyBoundary = (input.renderWhitespace === 1 /* Boundary */); - const onlyTrailing = (input.renderWhitespace === 3 /* Trailing */); - const generateLinePartForEachWhitespace = (input.renderSpaceWidth !== input.spaceWidth); - let result = [], resultLen = 0; - let tokenIndex = 0; - let tokenType = tokens[tokenIndex].type; - let tokenEndIndex = tokens[tokenIndex].endIndex; - const tokensLength = tokens.length; - let lineIsEmptyOrWhitespace = false; - let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineContent); - let lastNonWhitespaceIndex; - if (firstNonWhitespaceIndex === -1) { - lineIsEmptyOrWhitespace = true; - firstNonWhitespaceIndex = len; - lastNonWhitespaceIndex = len; - } - else { - lastNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["lastNonWhitespaceIndex"](lineContent); - } - let wasInWhitespace = false; - let currentSelectionIndex = 0; - let currentSelection = selections && selections[currentSelectionIndex]; - let tmpIndent = startVisibleColumn % tabSize; - for (let charIndex = fauxIndentLength; charIndex < len; charIndex++) { - const chCode = lineContent.charCodeAt(charIndex); - if (currentSelection && charIndex >= currentSelection.endOffset) { - currentSelectionIndex++; - currentSelection = selections && selections[currentSelectionIndex]; - } - let isInWhitespace; - if (charIndex < firstNonWhitespaceIndex || charIndex > lastNonWhitespaceIndex) { - // in leading or trailing whitespace - isInWhitespace = true; - } - else if (chCode === 9 /* Tab */) { - // a tab character is rendered both in all and boundary cases - isInWhitespace = true; - } - else if (chCode === 32 /* Space */) { - // hit a space character - if (onlyBoundary) { - // rendering only boundary whitespace - if (wasInWhitespace) { - isInWhitespace = true; - } - else { - const nextChCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */); - isInWhitespace = (nextChCode === 32 /* Space */ || nextChCode === 9 /* Tab */); - } - } - else { - isInWhitespace = true; - } - } - else { - isInWhitespace = false; - } - // If rendering whitespace on selection, check that the charIndex falls within a selection - if (isInWhitespace && selections) { - isInWhitespace = !!currentSelection && currentSelection.startOffset <= charIndex && currentSelection.endOffset > charIndex; - } - // If rendering only trailing whitespace, check that the charIndex points to trailing whitespace. - if (isInWhitespace && onlyTrailing) { - isInWhitespace = lineIsEmptyOrWhitespace || charIndex > lastNonWhitespaceIndex; - } - if (wasInWhitespace) { - // was in whitespace token - if (!isInWhitespace || (!useMonospaceOptimizations && tmpIndent >= tabSize)) { - // leaving whitespace token or entering a new indent - if (generateLinePartForEachWhitespace) { - const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength); - for (let i = lastEndIndex + 1; i <= charIndex; i++) { - result[resultLen++] = new LinePart(i, 'mtkw', 1 /* IS_WHITESPACE */); - } - } - else { - result[resultLen++] = new LinePart(charIndex, 'mtkw', 1 /* IS_WHITESPACE */); - } - tmpIndent = tmpIndent % tabSize; - } - } - else { - // was in regular token - if (charIndex === tokenEndIndex || (isInWhitespace && charIndex > fauxIndentLength)) { - result[resultLen++] = new LinePart(charIndex, tokenType, 0); - tmpIndent = tmpIndent % tabSize; - } - } - if (chCode === 9 /* Tab */) { - tmpIndent = tabSize; - } - else if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isFullWidthCharacter"](chCode)) { - tmpIndent += 2; - } - else { - tmpIndent++; - } - wasInWhitespace = isInWhitespace; - while (charIndex === tokenEndIndex) { - tokenIndex++; - if (tokenIndex < tokensLength) { - tokenType = tokens[tokenIndex].type; - tokenEndIndex = tokens[tokenIndex].endIndex; - } - } - } - let generateWhitespace = false; - if (wasInWhitespace) { - // was in whitespace token - if (continuesWithWrappedLine && onlyBoundary) { - let lastCharCode = (len > 0 ? lineContent.charCodeAt(len - 1) : 0 /* Null */); - let prevCharCode = (len > 1 ? lineContent.charCodeAt(len - 2) : 0 /* Null */); - let isSingleTrailingSpace = (lastCharCode === 32 /* Space */ && (prevCharCode !== 32 /* Space */ && prevCharCode !== 9 /* Tab */)); - if (!isSingleTrailingSpace) { - generateWhitespace = true; - } - } - else { - generateWhitespace = true; - } - } - if (generateWhitespace) { - if (generateLinePartForEachWhitespace) { - const lastEndIndex = (resultLen > 0 ? result[resultLen - 1].endIndex : fauxIndentLength); - for (let i = lastEndIndex + 1; i <= len; i++) { - result[resultLen++] = new LinePart(i, 'mtkw', 1 /* IS_WHITESPACE */); - } - } - else { - result[resultLen++] = new LinePart(len, 'mtkw', 1 /* IS_WHITESPACE */); - } - } - else { - result[resultLen++] = new LinePart(len, tokenType, 0); - } - return result; -} -/** - * Inline decorations are "merged" on top of tokens. - * Special care must be taken when multiple inline decorations are at play and they overlap. - */ -function _applyInlineDecorations(lineContent, len, tokens, _lineDecorations) { - _lineDecorations.sort(_lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__["LineDecoration"].compare); - const lineDecorations = _lineDecorations_js__WEBPACK_IMPORTED_MODULE_2__["LineDecorationsNormalizer"].normalize(lineContent, _lineDecorations); - const lineDecorationsLen = lineDecorations.length; - let lineDecorationIndex = 0; - let result = [], resultLen = 0, lastResultEndIndex = 0; - for (let tokenIndex = 0, len = tokens.length; tokenIndex < len; tokenIndex++) { - const token = tokens[tokenIndex]; - const tokenEndIndex = token.endIndex; - const tokenType = token.type; - const tokenMetadata = token.metadata; - while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset < tokenEndIndex) { - const lineDecoration = lineDecorations[lineDecorationIndex]; - if (lineDecoration.startOffset > lastResultEndIndex) { - lastResultEndIndex = lineDecoration.startOffset; - result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata); - } - if (lineDecoration.endOffset + 1 <= tokenEndIndex) { - // This line decoration ends before this token ends - lastResultEndIndex = lineDecoration.endOffset + 1; - result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata); - lineDecorationIndex++; - } - else { - // This line decoration continues on to the next token - lastResultEndIndex = tokenEndIndex; - result[resultLen++] = new LinePart(lastResultEndIndex, tokenType + ' ' + lineDecoration.className, tokenMetadata | lineDecoration.metadata); - break; - } - } - if (tokenEndIndex > lastResultEndIndex) { - lastResultEndIndex = tokenEndIndex; - result[resultLen++] = new LinePart(lastResultEndIndex, tokenType, tokenMetadata); - } - } - const lastTokenEndIndex = tokens[tokens.length - 1].endIndex; - if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) { - let classNames = []; - let metadata = 0; - while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) { - classNames.push(lineDecorations[lineDecorationIndex].className); - metadata |= lineDecorations[lineDecorationIndex].metadata; - lineDecorationIndex++; - } - result[resultLen++] = new LinePart(lastResultEndIndex, classNames.join(' '), metadata); - } - return result; -} -/** - * This function is on purpose not split up into multiple functions to allow runtime type inference (i.e. performance reasons). - * Notice how all the needed data is fully resolved and passed in (i.e. no other calls). - */ -function _renderLine(input, sb) { - const fontIsMonospace = input.fontIsMonospace; - const canUseHalfwidthRightwardsArrow = input.canUseHalfwidthRightwardsArrow; - const containsForeignElements = input.containsForeignElements; - const lineContent = input.lineContent; - const len = input.len; - const isOverflowing = input.isOverflowing; - const parts = input.parts; - const fauxIndentLength = input.fauxIndentLength; - const tabSize = input.tabSize; - const startVisibleColumn = input.startVisibleColumn; - const containsRTL = input.containsRTL; - const spaceWidth = input.spaceWidth; - const renderSpaceCharCode = input.renderSpaceCharCode; - const renderWhitespace = input.renderWhitespace; - const renderControlCharacters = input.renderControlCharacters; - const characterMapping = new CharacterMapping(len + 1, parts.length); - let charIndex = 0; - let visibleColumn = startVisibleColumn; - let charOffsetInPart = 0; - let partDisplacement = 0; - let prevPartContentCnt = 0; - let partAbsoluteOffset = 0; - if (containsRTL) { - sb.appendASCIIString(''); - } - else { - sb.appendASCIIString(''); - } - for (let partIndex = 0, tokensLen = parts.length; partIndex < tokensLen; partIndex++) { - partAbsoluteOffset += prevPartContentCnt; - const part = parts[partIndex]; - const partEndIndex = part.endIndex; - const partType = part.type; - const partRendersWhitespace = (renderWhitespace !== 0 /* None */ && part.isWhitespace()); - const partRendersWhitespaceWithWidth = partRendersWhitespace && !fontIsMonospace && (partType === 'mtkw' /*only whitespace*/ || !containsForeignElements); - const partIsEmptyAndHasPseudoAfter = (charIndex === partEndIndex && part.metadata === 4 /* PSEUDO_AFTER */); - charOffsetInPart = 0; - sb.appendASCIIString(' 1) { - sb.write1(0x2192); // RIGHTWARDS ARROW - } - else { - sb.write1(0xFFEB); // HALFWIDTH RIGHTWARDS ARROW - } - for (let space = 2; space <= charWidth; space++) { - sb.write1(0xA0); //   - } - } - else { // must be CharCode.Space - charWidth = 1; - sb.write1(renderSpaceCharCode); // · or word separator middle dot - } - charOffsetInPart += charWidth; - if (charIndex >= fauxIndentLength) { - visibleColumn += charWidth; - } - } - prevPartContentCnt = partContentCnt; - } - else { - let partContentCnt = 0; - sb.appendASCII(62 /* GreaterThan */); - for (; charIndex < partEndIndex; charIndex++) { - characterMapping.setPartData(charIndex, partIndex - partDisplacement, charOffsetInPart, partAbsoluteOffset); - partDisplacement = 0; - const charCode = lineContent.charCodeAt(charIndex); - let producedCharacters = 1; - let charWidth = 1; - switch (charCode) { - case 9 /* Tab */: - producedCharacters = (tabSize - (visibleColumn % tabSize)); - charWidth = producedCharacters; - for (let space = 1; space <= producedCharacters; space++) { - sb.write1(0xA0); //   - } - break; - case 32 /* Space */: - sb.write1(0xA0); //   - break; - case 60 /* LessThan */: - sb.appendASCIIString('<'); - break; - case 62 /* GreaterThan */: - sb.appendASCIIString('>'); - break; - case 38 /* Ampersand */: - sb.appendASCIIString('&'); - break; - case 0 /* Null */: - sb.appendASCIIString('�'); - break; - case 65279 /* UTF8_BOM */: - case 8232 /* LINE_SEPARATOR */: - case 8233 /* PARAGRAPH_SEPARATOR */: - case 133 /* NEXT_LINE */: - sb.write1(0xFFFD); - break; - default: - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isFullWidthCharacter"](charCode)) { - charWidth++; - } - if (renderControlCharacters && charCode < 32) { - sb.write1(9216 + charCode); - } - else { - sb.write1(charCode); - } - } - charOffsetInPart += producedCharacters; - partContentCnt += producedCharacters; - if (charIndex >= fauxIndentLength) { - visibleColumn += charWidth; - } - } - prevPartContentCnt = partContentCnt; - } - if (partIsEmptyAndHasPseudoAfter) { - partDisplacement++; - } - else { - partDisplacement = 0; - } - sb.appendASCIIString(''); - } - // When getting client rects for the last character, we will position the - // text range at the end of the span, insteaf of at the beginning of next span - characterMapping.setPartData(len, parts.length - 1, charOffsetInPart, partAbsoluteOffset); - if (isOverflowing) { - sb.appendASCIIString(''); - } - sb.appendASCIIString(''); - return new RenderLineOutput(characterMapping, containsRTL, containsForeignElements); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js ***! - \*********************************************************************************************/ -/*! exports provided: ViewportData */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportData", function() { return ViewportData; }); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/** - * Contains all data needed to render at a specific viewport. - */ -class ViewportData { - constructor(selections, partialData, whitespaceViewportData, model) { - this.selections = selections; - this.startLineNumber = partialData.startLineNumber | 0; - this.endLineNumber = partialData.endLineNumber | 0; - this.relativeVerticalOffset = partialData.relativeVerticalOffset; - this.bigNumbersDelta = partialData.bigNumbersDelta | 0; - this.whitespaceViewportData = whitespaceViewportData; - this._model = model; - this.visibleRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](partialData.startLineNumber, this._model.getLineMinColumn(partialData.startLineNumber), partialData.endLineNumber, this._model.getLineMaxColumn(partialData.endLineNumber)); - } - getViewLineRenderingData(lineNumber) { - return this._model.getViewLineRenderingData(this.visibleRange, lineNumber); - } - getDecorationsInViewport() { - return this._model.getDecorationsInViewport(this.visibleRange); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js ***! - \************************************************************************************************/ -/*! exports provided: MinimapTokensColorTracker */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapTokensColorTracker", function() { return MinimapTokensColorTracker; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _core_rgba_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/rgba.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class MinimapTokensColorTracker { - constructor() { - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._updateColorMap(); - _modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].onDidChange(e => { - if (e.changedColorMap) { - this._updateColorMap(); - } - }); - } - static getInstance() { - if (!this._INSTANCE) { - this._INSTANCE = new MinimapTokensColorTracker(); - } - return this._INSTANCE; - } - _updateColorMap() { - const colorMap = _modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].getColorMap(); - if (!colorMap) { - this._colors = [_core_rgba_js__WEBPACK_IMPORTED_MODULE_1__["RGBA8"].Empty]; - this._backgroundIsLight = true; - return; - } - this._colors = [_core_rgba_js__WEBPACK_IMPORTED_MODULE_1__["RGBA8"].Empty]; - for (let colorId = 1; colorId < colorMap.length; colorId++) { - const source = colorMap[colorId].rgba; - // Use a VM friendly data-type - this._colors[colorId] = new _core_rgba_js__WEBPACK_IMPORTED_MODULE_1__["RGBA8"](source.r, source.g, source.b, Math.round(source.a * 255)); - } - let backgroundLuminosity = colorMap[2 /* DefaultBackground */].getRelativeLuminance(); - this._backgroundIsLight = backgroundLuminosity >= 0.5; - this._onDidChange.fire(undefined); - } - getColor(colorId) { - if (colorId < 1 || colorId >= this._colors.length) { - // background color (basically invisible) - colorId = 2 /* DefaultBackground */; - } - return this._colors[colorId]; - } - backgroundIsLight() { - return this._backgroundIsLight; - } -} -MinimapTokensColorTracker._INSTANCE = null; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js ***! - \**************************************************************************************************/ -/*! exports provided: MonospaceLineBreaksComputerFactory */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MonospaceLineBreaksComputerFactory", function() { return MonospaceLineBreaksComputerFactory; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); -/* harmony import */ var _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./splitLinesCollection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class WrappingCharacterClassifier extends _core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_1__["CharacterClassifier"] { - constructor(BREAK_BEFORE, BREAK_AFTER) { - super(0 /* NONE */); - for (let i = 0; i < BREAK_BEFORE.length; i++) { - this.set(BREAK_BEFORE.charCodeAt(i), 1 /* BREAK_BEFORE */); - } - for (let i = 0; i < BREAK_AFTER.length; i++) { - this.set(BREAK_AFTER.charCodeAt(i), 2 /* BREAK_AFTER */); - } - } - get(charCode) { - if (charCode >= 0 && charCode < 256) { - return this._asciiMap[charCode]; - } - else { - // Initialize CharacterClass.BREAK_IDEOGRAPHIC for these Unicode ranges: - // 1. CJK Unified Ideographs (0x4E00 -- 0x9FFF) - // 2. CJK Unified Ideographs Extension A (0x3400 -- 0x4DBF) - // 3. Hiragana and Katakana (0x3040 -- 0x30FF) - if ((charCode >= 0x3040 && charCode <= 0x30FF) - || (charCode >= 0x3400 && charCode <= 0x4DBF) - || (charCode >= 0x4E00 && charCode <= 0x9FFF)) { - return 3 /* BREAK_IDEOGRAPHIC */; - } - return (this._map.get(charCode) || this._defaultValue); - } - } -} -let arrPool1 = []; -let arrPool2 = []; -class MonospaceLineBreaksComputerFactory { - constructor(breakBeforeChars, breakAfterChars) { - this.classifier = new WrappingCharacterClassifier(breakBeforeChars, breakAfterChars); - } - static create(options) { - return new MonospaceLineBreaksComputerFactory(options.get(108 /* wordWrapBreakBeforeCharacters */), options.get(107 /* wordWrapBreakAfterCharacters */)); - } - createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) { - tabSize = tabSize | 0; //@perf - wrappingColumn = +wrappingColumn; //@perf - let requests = []; - let previousBreakingData = []; - return { - addRequest: (lineText, previousLineBreakData) => { - requests.push(lineText); - previousBreakingData.push(previousLineBreakData); - }, - finalize: () => { - const columnsForFullWidthChar = fontInfo.typicalFullwidthCharacterWidth / fontInfo.typicalHalfwidthCharacterWidth; //@perf - let result = []; - for (let i = 0, len = requests.length; i < len; i++) { - const previousLineBreakData = previousBreakingData[i]; - if (previousLineBreakData) { - result[i] = createLineBreaksFromPreviousLineBreaks(this.classifier, previousLineBreakData, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); - } - else { - result[i] = createLineBreaks(this.classifier, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); - } - } - arrPool1.length = 0; - arrPool2.length = 0; - return result; - } - }; - } -} -function createLineBreaksFromPreviousLineBreaks(classifier, previousBreakingData, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) { - if (firstLineBreakColumn === -1) { - return null; - } - const len = lineText.length; - if (len <= 1) { - return null; - } - const prevBreakingOffsets = previousBreakingData.breakOffsets; - const prevBreakingOffsetsVisibleColumn = previousBreakingData.breakOffsetsVisibleColumn; - const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent); - const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength; - let breakingOffsets = arrPool1; - let breakingOffsetsVisibleColumn = arrPool2; - let breakingOffsetsCount = 0; - let lastBreakingOffset = 0; - let lastBreakingOffsetVisibleColumn = 0; - let breakingColumn = firstLineBreakColumn; - const prevLen = prevBreakingOffsets.length; - let prevIndex = 0; - if (prevIndex >= 0) { - let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn); - while (prevIndex + 1 < prevLen) { - const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn); - if (distance >= bestDistance) { - break; - } - bestDistance = distance; - prevIndex++; - } - } - while (prevIndex < prevLen) { - // Allow for prevIndex to be -1 (for the case where we hit a tab when walking backwards from the first break) - let prevBreakOffset = prevIndex < 0 ? 0 : prevBreakingOffsets[prevIndex]; - let prevBreakOffsetVisibleColumn = prevIndex < 0 ? 0 : prevBreakingOffsetsVisibleColumn[prevIndex]; - if (lastBreakingOffset > prevBreakOffset) { - prevBreakOffset = lastBreakingOffset; - prevBreakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn; - } - let breakOffset = 0; - let breakOffsetVisibleColumn = 0; - let forcedBreakOffset = 0; - let forcedBreakOffsetVisibleColumn = 0; - // initially, we search as much as possible to the right (if it fits) - if (prevBreakOffsetVisibleColumn <= breakingColumn) { - let visibleColumn = prevBreakOffsetVisibleColumn; - let prevCharCode = prevBreakOffset === 0 ? 0 /* Null */ : lineText.charCodeAt(prevBreakOffset - 1); - let prevCharCodeClass = prevBreakOffset === 0 ? 0 /* NONE */ : classifier.get(prevCharCode); - let entireLineFits = true; - for (let i = prevBreakOffset; i < len; i++) { - const charStartOffset = i; - const charCode = lineText.charCodeAt(i); - let charCodeClass; - let charWidth; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCode)) { - // A surrogate pair must always be considered as a single unit, so it is never to be broken - i++; - charCodeClass = 0 /* NONE */; - charWidth = 2; - } - else { - charCodeClass = classifier.get(charCode); - charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar); - } - if (charStartOffset > lastBreakingOffset && canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) { - breakOffset = charStartOffset; - breakOffsetVisibleColumn = visibleColumn; - } - visibleColumn += charWidth; - // check if adding character at `i` will go over the breaking column - if (visibleColumn > breakingColumn) { - // We need to break at least before character at `i`: - if (charStartOffset > lastBreakingOffset) { - forcedBreakOffset = charStartOffset; - forcedBreakOffsetVisibleColumn = visibleColumn - charWidth; - } - else { - // we need to advance at least by one character - forcedBreakOffset = i + 1; - forcedBreakOffsetVisibleColumn = visibleColumn; - } - if (visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) { - // Cannot break at `breakOffset` => reset it if it was set - breakOffset = 0; - } - entireLineFits = false; - break; - } - prevCharCode = charCode; - prevCharCodeClass = charCodeClass; - } - if (entireLineFits) { - // there is no more need to break => stop the outer loop! - if (breakingOffsetsCount > 0) { - // Add last segment, no need to assign to `lastBreakingOffset` and `lastBreakingOffsetVisibleColumn` - breakingOffsets[breakingOffsetsCount] = prevBreakingOffsets[prevBreakingOffsets.length - 1]; - breakingOffsetsVisibleColumn[breakingOffsetsCount] = prevBreakingOffsetsVisibleColumn[prevBreakingOffsets.length - 1]; - breakingOffsetsCount++; - } - break; - } - } - if (breakOffset === 0) { - // must search left - let visibleColumn = prevBreakOffsetVisibleColumn; - let charCode = lineText.charCodeAt(prevBreakOffset); - let charCodeClass = classifier.get(charCode); - let hitATabCharacter = false; - for (let i = prevBreakOffset - 1; i >= lastBreakingOffset; i--) { - const charStartOffset = i + 1; - const prevCharCode = lineText.charCodeAt(i); - if (prevCharCode === 9 /* Tab */) { - // cannot determine the width of a tab when going backwards, so we must go forwards - hitATabCharacter = true; - break; - } - let prevCharCodeClass; - let prevCharWidth; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isLowSurrogate"](prevCharCode)) { - // A surrogate pair must always be considered as a single unit, so it is never to be broken - i--; - prevCharCodeClass = 0 /* NONE */; - prevCharWidth = 2; - } - else { - prevCharCodeClass = classifier.get(prevCharCode); - prevCharWidth = (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isFullWidthCharacter"](prevCharCode) ? columnsForFullWidthChar : 1); - } - if (visibleColumn <= breakingColumn) { - if (forcedBreakOffset === 0) { - forcedBreakOffset = charStartOffset; - forcedBreakOffsetVisibleColumn = visibleColumn; - } - if (visibleColumn <= breakingColumn - wrappedLineBreakColumn) { - // went too far! - break; - } - if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) { - breakOffset = charStartOffset; - breakOffsetVisibleColumn = visibleColumn; - break; - } - } - visibleColumn -= prevCharWidth; - charCode = prevCharCode; - charCodeClass = prevCharCodeClass; - } - if (breakOffset !== 0) { - const remainingWidthOfNextLine = wrappedLineBreakColumn - (forcedBreakOffsetVisibleColumn - breakOffsetVisibleColumn); - if (remainingWidthOfNextLine <= tabSize) { - const charCodeAtForcedBreakOffset = lineText.charCodeAt(forcedBreakOffset); - let charWidth; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCodeAtForcedBreakOffset)) { - // A surrogate pair must always be considered as a single unit, so it is never to be broken - charWidth = 2; - } - else { - charWidth = computeCharWidth(charCodeAtForcedBreakOffset, forcedBreakOffsetVisibleColumn, tabSize, columnsForFullWidthChar); - } - if (remainingWidthOfNextLine - charWidth < 0) { - // it is not worth it to break at breakOffset, it just introduces an extra needless line! - breakOffset = 0; - } - } - } - if (hitATabCharacter) { - // cannot determine the width of a tab when going backwards, so we must go forwards from the previous break - prevIndex--; - continue; - } - } - if (breakOffset === 0) { - // Could not find a good breaking point - breakOffset = forcedBreakOffset; - breakOffsetVisibleColumn = forcedBreakOffsetVisibleColumn; - } - lastBreakingOffset = breakOffset; - breakingOffsets[breakingOffsetsCount] = breakOffset; - lastBreakingOffsetVisibleColumn = breakOffsetVisibleColumn; - breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn; - breakingOffsetsCount++; - breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn; - while (prevIndex < 0 || (prevIndex < prevLen && prevBreakingOffsetsVisibleColumn[prevIndex] < breakOffsetVisibleColumn)) { - prevIndex++; - } - let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn); - while (prevIndex + 1 < prevLen) { - const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn); - if (distance >= bestDistance) { - break; - } - bestDistance = distance; - prevIndex++; - } - } - if (breakingOffsetsCount === 0) { - return null; - } - // Doing here some object reuse which ends up helping a huge deal with GC pauses! - breakingOffsets.length = breakingOffsetsCount; - breakingOffsetsVisibleColumn.length = breakingOffsetsCount; - arrPool1 = previousBreakingData.breakOffsets; - arrPool2 = previousBreakingData.breakOffsetsVisibleColumn; - previousBreakingData.breakOffsets = breakingOffsets; - previousBreakingData.breakOffsetsVisibleColumn = breakingOffsetsVisibleColumn; - previousBreakingData.wrappedTextIndentLength = wrappedTextIndentLength; - return previousBreakingData; -} -function createLineBreaks(classifier, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) { - if (firstLineBreakColumn === -1) { - return null; - } - const len = lineText.length; - if (len <= 1) { - return null; - } - const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent); - const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength; - let breakingOffsets = []; - let breakingOffsetsVisibleColumn = []; - let breakingOffsetsCount = 0; - let breakOffset = 0; - let breakOffsetVisibleColumn = 0; - let breakingColumn = firstLineBreakColumn; - let prevCharCode = lineText.charCodeAt(0); - let prevCharCodeClass = classifier.get(prevCharCode); - let visibleColumn = computeCharWidth(prevCharCode, 0, tabSize, columnsForFullWidthChar); - let startOffset = 1; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](prevCharCode)) { - // A surrogate pair must always be considered as a single unit, so it is never to be broken - visibleColumn += 1; - prevCharCode = lineText.charCodeAt(1); - prevCharCodeClass = classifier.get(prevCharCode); - startOffset++; - } - for (let i = startOffset; i < len; i++) { - const charStartOffset = i; - const charCode = lineText.charCodeAt(i); - let charCodeClass; - let charWidth; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isHighSurrogate"](charCode)) { - // A surrogate pair must always be considered as a single unit, so it is never to be broken - i++; - charCodeClass = 0 /* NONE */; - charWidth = 2; - } - else { - charCodeClass = classifier.get(charCode); - charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar); - } - if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) { - breakOffset = charStartOffset; - breakOffsetVisibleColumn = visibleColumn; - } - visibleColumn += charWidth; - // check if adding character at `i` will go over the breaking column - if (visibleColumn > breakingColumn) { - // We need to break at least before character at `i`: - if (breakOffset === 0 || visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) { - // Cannot break at `breakOffset`, must break at `i` - breakOffset = charStartOffset; - breakOffsetVisibleColumn = visibleColumn - charWidth; - } - breakingOffsets[breakingOffsetsCount] = breakOffset; - breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn; - breakingOffsetsCount++; - breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn; - breakOffset = 0; - } - prevCharCode = charCode; - prevCharCodeClass = charCodeClass; - } - if (breakingOffsetsCount === 0) { - return null; - } - // Add last segment - breakingOffsets[breakingOffsetsCount] = len; - breakingOffsetsVisibleColumn[breakingOffsetsCount] = visibleColumn; - return new _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_2__["LineBreakData"](breakingOffsets, breakingOffsetsVisibleColumn, wrappedTextIndentLength); -} -function computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar) { - if (charCode === 9 /* Tab */) { - return (tabSize - (visibleColumn % tabSize)); - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isFullWidthCharacter"](charCode)) { - return columnsForFullWidthChar; - } - return 1; -} -function tabCharacterWidth(visibleColumn, tabSize) { - return (tabSize - (visibleColumn % tabSize)); -} -/** - * Kinsoku Shori : Don't break after a leading character, like an open bracket - * Kinsoku Shori : Don't break before a trailing character, like a period - */ -function canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass) { - return (charCode !== 32 /* Space */ - && ((prevCharCodeClass === 2 /* BREAK_AFTER */) - || (prevCharCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && charCodeClass !== 2 /* BREAK_AFTER */) - || (charCodeClass === 1 /* BREAK_BEFORE */) - || (charCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && prevCharCodeClass !== 1 /* BREAK_BEFORE */))); -} -function computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) { - let wrappedTextIndentLength = 0; - if (wrappingIndent !== 0 /* None */) { - const firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineText); - if (firstNonWhitespaceIndex !== -1) { - // Track existing indent - for (let i = 0; i < firstNonWhitespaceIndex; i++) { - const charWidth = (lineText.charCodeAt(i) === 9 /* Tab */ ? tabCharacterWidth(wrappedTextIndentLength, tabSize) : 1); - wrappedTextIndentLength += charWidth; - } - // Increase indent of continuation lines, if desired - const numberOfAdditionalTabs = (wrappingIndent === 3 /* DeepIndent */ ? 2 : wrappingIndent === 2 /* Indent */ ? 1 : 0); - for (let i = 0; i < numberOfAdditionalTabs; i++) { - const charWidth = tabCharacterWidth(wrappedTextIndentLength, tabSize); - wrappedTextIndentLength += charWidth; - } - // Force sticking to beginning of line if no character would fit except for the indentation - if (wrappedTextIndentLength + columnsForFullWidthChar > firstLineBreakColumn) { - wrappedTextIndentLength = 0; - } - } - } - return wrappedTextIndentLength; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js ***! - \****************************************************************************************/ -/*! exports provided: PrefixSumIndexOfResult, PrefixSumComputer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PrefixSumIndexOfResult", function() { return PrefixSumIndexOfResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PrefixSumComputer", function() { return PrefixSumComputer; }); -/* harmony import */ var _base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uint.js */ "./node_modules/monaco-editor/esm/vs/base/common/uint.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class PrefixSumIndexOfResult { - constructor(index, remainder) { - this.index = index; - this.remainder = remainder; - } -} -class PrefixSumComputer { - constructor(values) { - this.values = values; - this.prefixSum = new Uint32Array(values.length); - this.prefixSumValidIndex = new Int32Array(1); - this.prefixSumValidIndex[0] = -1; - } - insertValues(insertIndex, insertValues) { - insertIndex = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(insertIndex); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - const insertValuesLen = insertValues.length; - if (insertValuesLen === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length + insertValuesLen); - this.values.set(oldValues.subarray(0, insertIndex), 0); - this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen); - this.values.set(insertValues, insertIndex); - if (insertIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = insertIndex - 1; - } - this.prefixSum = new Uint32Array(this.values.length); - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; - } - changeValue(index, value) { - index = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(index); - value = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(value); - if (this.values[index] === value) { - return false; - } - this.values[index] = value; - if (index - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = index - 1; - } - return true; - } - removeValues(startIndex, cnt) { - startIndex = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(startIndex); - cnt = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(cnt); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - if (startIndex >= oldValues.length) { - return false; - } - let maxCnt = oldValues.length - startIndex; - if (cnt >= maxCnt) { - cnt = maxCnt; - } - if (cnt === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length - cnt); - this.values.set(oldValues.subarray(0, startIndex), 0); - this.values.set(oldValues.subarray(startIndex + cnt), startIndex); - this.prefixSum = new Uint32Array(this.values.length); - if (startIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = startIndex - 1; - } - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; - } - getTotalValue() { - if (this.values.length === 0) { - return 0; - } - return this._getAccumulatedValue(this.values.length - 1); - } - getAccumulatedValue(index) { - if (index < 0) { - return 0; - } - index = Object(_base_common_uint_js__WEBPACK_IMPORTED_MODULE_0__["toUint32"])(index); - return this._getAccumulatedValue(index); - } - _getAccumulatedValue(index) { - if (index <= this.prefixSumValidIndex[0]) { - return this.prefixSum[index]; - } - let startIndex = this.prefixSumValidIndex[0] + 1; - if (startIndex === 0) { - this.prefixSum[0] = this.values[0]; - startIndex++; - } - if (index >= this.values.length) { - index = this.values.length - 1; - } - for (let i = startIndex; i <= index; i++) { - this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i]; - } - this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index); - return this.prefixSum[index]; - } - getIndexOf(accumulatedValue) { - accumulatedValue = Math.floor(accumulatedValue); //@perf - // Compute all sums (to get a fully valid prefixSum) - this.getTotalValue(); - let low = 0; - let high = this.values.length - 1; - let mid = 0; - let midStop = 0; - let midStart = 0; - while (low <= high) { - mid = low + ((high - low) / 2) | 0; - midStop = this.prefixSum[mid]; - midStart = midStop - this.values[mid]; - if (accumulatedValue < midStart) { - high = mid - 1; - } - else if (accumulatedValue >= midStop) { - low = mid + 1; - } - else { - break; - } - } - return new PrefixSumIndexOfResult(mid, accumulatedValue - midStart); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js ***! - \*******************************************************************************************/ -/*! exports provided: OutputPosition, LineBreakData, CoordinatesConverter, SplitLinesCollection, SplitLine, IdentityCoordinatesConverter, IdentityLinesCollection */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutputPosition", function() { return OutputPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineBreakData", function() { return LineBreakData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoordinatesConverter", function() { return CoordinatesConverter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitLinesCollection", function() { return SplitLinesCollection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitLine", function() { return SplitLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdentityCoordinatesConverter", function() { return IdentityCoordinatesConverter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdentityLinesCollection", function() { return IdentityLinesCollection; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _model_textModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../view/viewEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js"); -/* harmony import */ var _prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./prefixSumComputer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/prefixSumComputer.js"); -/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -class OutputPosition { - constructor(outputLineIndex, outputOffset) { - this.outputLineIndex = outputLineIndex; - this.outputOffset = outputOffset; - } -} -class LineBreakData { - constructor(breakOffsets, breakOffsetsVisibleColumn, wrappedTextIndentLength) { - this.breakOffsets = breakOffsets; - this.breakOffsetsVisibleColumn = breakOffsetsVisibleColumn; - this.wrappedTextIndentLength = wrappedTextIndentLength; - } - static getInputOffsetOfOutputPosition(breakOffsets, outputLineIndex, outputOffset) { - if (outputLineIndex === 0) { - return outputOffset; - } - else { - return breakOffsets[outputLineIndex - 1] + outputOffset; - } - } - static getOutputPositionOfInputOffset(breakOffsets, inputOffset) { - let low = 0; - let high = breakOffsets.length - 1; - let mid = 0; - let midStart = 0; - while (low <= high) { - mid = low + ((high - low) / 2) | 0; - const midStop = breakOffsets[mid]; - midStart = mid > 0 ? breakOffsets[mid - 1] : 0; - if (inputOffset < midStart) { - high = mid - 1; - } - else if (inputOffset >= midStop) { - low = mid + 1; - } - else { - break; - } - } - return new OutputPosition(mid, inputOffset - midStart); - } -} -class CoordinatesConverter { - constructor(lines) { - this._lines = lines; - } - // View -> Model conversion and related methods - convertViewPositionToModelPosition(viewPosition) { - return this._lines.convertViewPositionToModelPosition(viewPosition.lineNumber, viewPosition.column); - } - convertViewRangeToModelRange(viewRange) { - return this._lines.convertViewRangeToModelRange(viewRange); - } - validateViewPosition(viewPosition, expectedModelPosition) { - return this._lines.validateViewPosition(viewPosition.lineNumber, viewPosition.column, expectedModelPosition); - } - validateViewRange(viewRange, expectedModelRange) { - return this._lines.validateViewRange(viewRange, expectedModelRange); - } - // Model -> View conversion and related methods - convertModelPositionToViewPosition(modelPosition) { - return this._lines.convertModelPositionToViewPosition(modelPosition.lineNumber, modelPosition.column); - } - convertModelRangeToViewRange(modelRange) { - return this._lines.convertModelRangeToViewRange(modelRange); - } - modelPositionIsVisible(modelPosition) { - return this._lines.modelPositionIsVisible(modelPosition.lineNumber, modelPosition.column); - } -} -class LineNumberMapper { - constructor(viewLineCounts) { - this._counts = viewLineCounts; - this._isValid = false; - this._validEndIndex = -1; - this._modelToView = []; - this._viewToModel = []; - } - _invalidate(index) { - this._isValid = false; - this._validEndIndex = Math.min(this._validEndIndex, index - 1); - } - _ensureValid() { - if (this._isValid) { - return; - } - for (let i = this._validEndIndex + 1, len = this._counts.length; i < len; i++) { - const viewLineCount = this._counts[i]; - const viewLinesAbove = (i > 0 ? this._modelToView[i - 1] : 0); - this._modelToView[i] = viewLinesAbove + viewLineCount; - for (let j = 0; j < viewLineCount; j++) { - this._viewToModel[viewLinesAbove + j] = i; - } - } - // trim things - this._modelToView.length = this._counts.length; - this._viewToModel.length = this._modelToView[this._modelToView.length - 1]; - // mark as valid - this._isValid = true; - this._validEndIndex = this._counts.length - 1; - } - changeValue(index, value) { - if (this._counts[index] === value) { - // no change - return; - } - this._counts[index] = value; - this._invalidate(index); - } - removeValues(start, deleteCount) { - this._counts.splice(start, deleteCount); - this._invalidate(start); - } - insertValues(insertIndex, insertArr) { - this._counts = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["arrayInsert"](this._counts, insertIndex, insertArr); - this._invalidate(insertIndex); - } - getTotalValue() { - this._ensureValid(); - return this._viewToModel.length; - } - getAccumulatedValue(index) { - this._ensureValid(); - return this._modelToView[index]; - } - getIndexOf(accumulatedValue) { - this._ensureValid(); - const modelLineIndex = this._viewToModel[accumulatedValue]; - const viewLinesAbove = (modelLineIndex > 0 ? this._modelToView[modelLineIndex - 1] : 0); - return new _prefixSumComputer_js__WEBPACK_IMPORTED_MODULE_5__["PrefixSumIndexOfResult"](modelLineIndex, accumulatedValue - viewLinesAbove); - } -} -class SplitLinesCollection { - constructor(model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, tabSize, wrappingStrategy, wrappingColumn, wrappingIndent) { - this.model = model; - this._validModelVersionId = -1; - this._domLineBreaksComputerFactory = domLineBreaksComputerFactory; - this._monospaceLineBreaksComputerFactory = monospaceLineBreaksComputerFactory; - this.fontInfo = fontInfo; - this.tabSize = tabSize; - this.wrappingStrategy = wrappingStrategy; - this.wrappingColumn = wrappingColumn; - this.wrappingIndent = wrappingIndent; - this._constructLines(/*resetHiddenAreas*/ true, null); - } - dispose() { - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []); - } - createCoordinatesConverter() { - return new CoordinatesConverter(this); - } - _constructLines(resetHiddenAreas, previousLineBreaks) { - this.lines = []; - if (resetHiddenAreas) { - this.hiddenAreasIds = []; - } - let linesContent = this.model.getLinesContent(); - const lineCount = linesContent.length; - const lineBreaksComputer = this.createLineBreaksComputer(); - for (let i = 0; i < lineCount; i++) { - lineBreaksComputer.addRequest(linesContent[i], previousLineBreaks ? previousLineBreaks[i] : null); - } - const linesBreaks = lineBreaksComputer.finalize(); - let values = []; - let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingStarts); - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - for (let i = 0; i < lineCount; i++) { - let lineNumber = i + 1; - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - } - let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd); - let line = createSplitLine(linesBreaks[i], !isInHiddenArea); - values[i] = line.getViewLineCount(); - this.lines[i] = line; - } - this._validModelVersionId = this.model.getVersionId(); - this.prefixSumComputer = new LineNumberMapper(values); - } - getHiddenAreas() { - return this.hiddenAreasIds.map((decId) => { - return this.model.getDecorationRange(decId); - }); - } - _reduceRanges(_ranges) { - if (_ranges.length === 0) { - return []; - } - let ranges = _ranges.map(r => this.model.validateRange(r)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingStarts); - let result = []; - let currentRangeStart = ranges[0].startLineNumber; - let currentRangeEnd = ranges[0].endLineNumber; - for (let i = 1, len = ranges.length; i < len; i++) { - let range = ranges[i]; - if (range.startLineNumber > currentRangeEnd + 1) { - result.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](currentRangeStart, 1, currentRangeEnd, 1)); - currentRangeStart = range.startLineNumber; - currentRangeEnd = range.endLineNumber; - } - else if (range.endLineNumber > currentRangeEnd) { - currentRangeEnd = range.endLineNumber; - } - } - result.push(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](currentRangeStart, 1, currentRangeEnd, 1)); - return result; - } - setHiddenAreas(_ranges) { - let newRanges = this._reduceRanges(_ranges); - // BEGIN TODO@Martin: Please stop calling this method on each model change! - let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingStarts); - if (newRanges.length === oldRanges.length) { - let hasDifference = false; - for (let i = 0; i < newRanges.length; i++) { - if (!newRanges[i].equalsRange(oldRanges[i])) { - hasDifference = true; - break; - } - } - if (!hasDifference) { - return false; - } - } - // END TODO@Martin: Please stop calling this method on each model change! - let newDecorations = []; - for (const newRange of newRanges) { - newDecorations.push({ - range: newRange, - options: _model_textModel_js__WEBPACK_IMPORTED_MODULE_3__["ModelDecorationOptions"].EMPTY - }); - } - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations); - let hiddenAreas = newRanges; - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - let hasVisibleLine = false; - for (let i = 0; i < this.lines.length; i++) { - let lineNumber = i + 1; - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - } - let lineChanged = false; - if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) { - // Line should be hidden - if (this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(false); - lineChanged = true; - } - } - else { - hasVisibleLine = true; - // Line should be visible - if (!this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(true); - lineChanged = true; - } - } - if (lineChanged) { - let newOutputLineCount = this.lines[i].getViewLineCount(); - this.prefixSumComputer.changeValue(i, newOutputLineCount); - } - } - if (!hasVisibleLine) { - // Cannot have everything be hidden => reveal everything! - this.setHiddenAreas([]); - } - return true; - } - modelPositionIsVisible(modelLineNumber, _modelColumn) { - if (modelLineNumber < 1 || modelLineNumber > this.lines.length) { - // invalid arguments - return false; - } - return this.lines[modelLineNumber - 1].isVisible(); - } - setTabSize(newTabSize) { - if (this.tabSize === newTabSize) { - return false; - } - this.tabSize = newTabSize; - this._constructLines(/*resetHiddenAreas*/ false, null); - return true; - } - setWrappingSettings(fontInfo, wrappingStrategy, wrappingColumn, wrappingIndent) { - const equalFontInfo = this.fontInfo.equals(fontInfo); - const equalWrappingStrategy = (this.wrappingStrategy === wrappingStrategy); - const equalWrappingColumn = (this.wrappingColumn === wrappingColumn); - const equalWrappingIndent = (this.wrappingIndent === wrappingIndent); - if (equalFontInfo && equalWrappingStrategy && equalWrappingColumn && equalWrappingIndent) { - return false; - } - const onlyWrappingColumnChanged = (equalFontInfo && equalWrappingStrategy && !equalWrappingColumn && equalWrappingIndent); - this.fontInfo = fontInfo; - this.wrappingStrategy = wrappingStrategy; - this.wrappingColumn = wrappingColumn; - this.wrappingIndent = wrappingIndent; - let previousLineBreaks = null; - if (onlyWrappingColumnChanged) { - previousLineBreaks = []; - for (let i = 0, len = this.lines.length; i < len; i++) { - previousLineBreaks[i] = this.lines[i].getLineBreakData(); - } - } - this._constructLines(/*resetHiddenAreas*/ false, previousLineBreaks); - return true; - } - createLineBreaksComputer() { - const lineBreaksComputerFactory = (this.wrappingStrategy === 'advanced' - ? this._domLineBreaksComputerFactory - : this._monospaceLineBreaksComputerFactory); - return lineBreaksComputerFactory.createLineBreaksComputer(this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent); - } - onModelFlushed() { - this._constructLines(/*resetHiddenAreas*/ true, null); - } - onModelLinesDeleted(versionId, fromLineNumber, toLineNumber) { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. - return null; - } - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); - this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesDeletedEvent"](outputFromLineNumber, outputToLineNumber); - } - onModelLinesInserted(versionId, fromLineNumber, _toLineNumber, lineBreaks) { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. - return null; - } - let hiddenAreas = this.getHiddenAreas(); - let isInHiddenArea = false; - let testPosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](fromLineNumber, 1); - for (const hiddenArea of hiddenAreas) { - if (hiddenArea.containsPosition(testPosition)) { - isInHiddenArea = true; - break; - } - } - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - let totalOutputLineCount = 0; - let insertLines = []; - let insertPrefixSumValues = []; - for (let i = 0, len = lineBreaks.length; i < len; i++) { - let line = createSplitLine(lineBreaks[i], !isInHiddenArea); - insertLines.push(line); - let outputLineCount = line.getViewLineCount(); - totalOutputLineCount += outputLineCount; - insertPrefixSumValues[i] = outputLineCount; - } - // TODO@Alex: use arrays.arrayInsert - this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1)); - this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); - return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesInsertedEvent"](outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1); - } - onModelLineChanged(versionId, lineNumber, lineBreakData) { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. - return [false, null, null, null]; - } - let lineIndex = lineNumber - 1; - let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); - let isVisible = this.lines[lineIndex].isVisible(); - let line = createSplitLine(lineBreakData, isVisible); - this.lines[lineIndex] = line; - let newOutputLineCount = this.lines[lineIndex].getViewLineCount(); - let lineMappingChanged = false; - let changeFrom = 0; - let changeTo = -1; - let insertFrom = 0; - let insertTo = -1; - let deleteFrom = 0; - let deleteTo = -1; - if (oldOutputLineCount > newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - deleteFrom = changeTo + 1; - deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1; - lineMappingChanged = true; - } - else if (oldOutputLineCount < newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + oldOutputLineCount - 1; - insertFrom = changeTo + 1; - insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1; - lineMappingChanged = true; - } - else { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - } - this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); - const viewLinesChangedEvent = (changeFrom <= changeTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesChangedEvent"](changeFrom, changeTo) : null); - const viewLinesInsertedEvent = (insertFrom <= insertTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesInsertedEvent"](insertFrom, insertTo) : null); - const viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesDeletedEvent"](deleteFrom, deleteTo) : null); - return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent]; - } - acceptVersionId(versionId) { - this._validModelVersionId = versionId; - if (this.lines.length === 1 && !this.lines[0].isVisible()) { - // At least one line must be visible => reset hidden areas - this.setHiddenAreas([]); - } - } - getViewLineCount() { - return this.prefixSumComputer.getTotalValue(); - } - _toValidViewLineNumber(viewLineNumber) { - if (viewLineNumber < 1) { - return 1; - } - const viewLineCount = this.getViewLineCount(); - if (viewLineNumber > viewLineCount) { - return viewLineCount; - } - return viewLineNumber | 0; - } - getActiveIndentGuide(viewLineNumber, minLineNumber, maxLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - minLineNumber = this._toValidViewLineNumber(minLineNumber); - maxLineNumber = this._toValidViewLineNumber(maxLineNumber); - const modelPosition = this.convertViewPositionToModelPosition(viewLineNumber, this.getViewLineMinColumn(viewLineNumber)); - const modelMinPosition = this.convertViewPositionToModelPosition(minLineNumber, this.getViewLineMinColumn(minLineNumber)); - const modelMaxPosition = this.convertViewPositionToModelPosition(maxLineNumber, this.getViewLineMinColumn(maxLineNumber)); - const result = this.model.getActiveIndentGuide(modelPosition.lineNumber, modelMinPosition.lineNumber, modelMaxPosition.lineNumber); - const viewStartPosition = this.convertModelPositionToViewPosition(result.startLineNumber, 1); - const viewEndPosition = this.convertModelPositionToViewPosition(result.endLineNumber, this.model.getLineMaxColumn(result.endLineNumber)); - return { - startLineNumber: viewStartPosition.lineNumber, - endLineNumber: viewEndPosition.lineNumber, - indent: result.indent - }; - } - getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) { - viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); - viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); - const modelStart = this.convertViewPositionToModelPosition(viewStartLineNumber, this.getViewLineMinColumn(viewStartLineNumber)); - const modelEnd = this.convertViewPositionToModelPosition(viewEndLineNumber, this.getViewLineMaxColumn(viewEndLineNumber)); - let result = []; - let resultRepeatCount = []; - let resultRepeatOption = []; - const modelStartLineIndex = modelStart.lineNumber - 1; - const modelEndLineIndex = modelEnd.lineNumber - 1; - let reqStart = null; - for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) { - const line = this.lines[modelLineIndex]; - if (line.isVisible()) { - let viewLineStartIndex = line.getViewLineNumberOfModelPosition(0, modelLineIndex === modelStartLineIndex ? modelStart.column : 1); - let viewLineEndIndex = line.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(modelLineIndex + 1)); - let count = viewLineEndIndex - viewLineStartIndex + 1; - let option = 0 /* BlockNone */; - if (count > 1 && line.getViewLineMinColumn(this.model, modelLineIndex + 1, viewLineEndIndex) === 1) { - // wrapped lines should block indent guides - option = (viewLineStartIndex === 0 ? 1 /* BlockSubsequent */ : 2 /* BlockAll */); - } - resultRepeatCount.push(count); - resultRepeatOption.push(option); - // merge into previous request - if (reqStart === null) { - reqStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](modelLineIndex + 1, 0); - } - } - else { - // hit invisible line => flush request - if (reqStart !== null) { - result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelLineIndex)); - reqStart = null; - } - } - } - if (reqStart !== null) { - result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelEnd.lineNumber)); - reqStart = null; - } - const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1; - let viewIndents = new Array(viewLineCount); - let currIndex = 0; - for (let i = 0, len = result.length; i < len; i++) { - let value = result[i]; - let count = Math.min(viewLineCount - currIndex, resultRepeatCount[i]); - let option = resultRepeatOption[i]; - let blockAtIndex; - if (option === 2 /* BlockAll */) { - blockAtIndex = 0; - } - else if (option === 1 /* BlockSubsequent */) { - blockAtIndex = 1; - } - else { - blockAtIndex = count; - } - for (let j = 0; j < count; j++) { - if (j === blockAtIndex) { - value = 0; - } - viewIndents[currIndex++] = value; - } - } - return viewIndents; - } - getViewLineContent(viewLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder); - } - getViewLineLength(viewLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - return this.lines[lineIndex].getViewLineLength(this.model, lineIndex + 1, remainder); - } - getViewLineMinColumn(viewLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder); - } - getViewLineMaxColumn(viewLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder); - } - getViewLineData(viewLineNumber) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder); - } - getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) { - viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); - viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); - let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1); - let viewLineNumber = viewStartLineNumber; - let startModelLineIndex = start.index; - let startRemainder = start.remainder; - let result = []; - for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) { - let line = this.lines[modelLineIndex]; - if (!line.isVisible()) { - continue; - } - let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0); - let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex; - let lastLine = false; - if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) { - lastLine = true; - remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1; - } - let toViewLineIndex = fromViewLineIndex + remainingViewLineCount; - line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result); - viewLineNumber += remainingViewLineCount; - if (lastLine) { - break; - } - } - return result; - } - validateViewPosition(viewLineNumber, viewColumn, expectedModelPosition) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - let line = this.lines[lineIndex]; - let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder); - let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder); - if (viewColumn < minColumn) { - viewColumn = minColumn; - } - if (viewColumn > maxColumn) { - viewColumn = maxColumn; - } - let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn); - let computedModelPosition = this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineIndex + 1, computedModelColumn)); - if (computedModelPosition.equals(expectedModelPosition)) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](viewLineNumber, viewColumn); - } - return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column); - } - validateViewRange(viewRange, expectedModelRange) { - const validViewStart = this.validateViewPosition(viewRange.startLineNumber, viewRange.startColumn, expectedModelRange.getStartPosition()); - const validViewEnd = this.validateViewPosition(viewRange.endLineNumber, viewRange.endColumn, expectedModelRange.getEndPosition()); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](validViewStart.lineNumber, validViewStart.column, validViewEnd.lineNumber, validViewEnd.column); - } - convertViewPositionToModelPosition(viewLineNumber, viewColumn) { - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn); - // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn); - return this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](lineIndex + 1, inputColumn)); - } - convertViewRangeToModelRange(viewRange) { - const start = this.convertViewPositionToModelPosition(viewRange.startLineNumber, viewRange.startColumn); - const end = this.convertViewPositionToModelPosition(viewRange.endLineNumber, viewRange.endColumn); - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](start.lineNumber, start.column, end.lineNumber, end.column); - } - convertModelPositionToViewPosition(_modelLineNumber, _modelColumn) { - const validPosition = this.model.validatePosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](_modelLineNumber, _modelColumn)); - const inputLineNumber = validPosition.lineNumber; - const inputColumn = validPosition.column; - let lineIndex = inputLineNumber - 1, lineIndexChanged = false; - while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { - lineIndex--; - lineIndexChanged = true; - } - if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { - // Could not reach a real line - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1); - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](1, 1); - } - const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); - let r; - if (lineIndexChanged) { - r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); - } - else { - r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn); - } - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r); - return r; - } - convertModelRangeToViewRange(modelRange) { - let start = this.convertModelPositionToViewPosition(modelRange.startLineNumber, modelRange.startColumn); - let end = this.convertModelPositionToViewPosition(modelRange.endLineNumber, modelRange.endColumn); - if (modelRange.startLineNumber === modelRange.endLineNumber && start.lineNumber !== end.lineNumber) { - // This is a single line range that ends up taking more lines due to wrapping - if (end.column === this.getViewLineMinColumn(end.lineNumber)) { - // the end column lands on the first column of the next line - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](start.lineNumber, start.column, end.lineNumber - 1, this.getViewLineMaxColumn(end.lineNumber - 1)); - } - } - return new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](start.lineNumber, start.column, end.lineNumber, end.column); - } - _getViewLineNumberForModelPosition(inputLineNumber, inputColumn) { - let lineIndex = inputLineNumber - 1; - if (this.lines[lineIndex].isVisible()) { - // this model line is visible - const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); - return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn); - } - // this model line is not visible - while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { - lineIndex--; - } - if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { - // Could not reach a real line - return 1; - } - const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); - return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); - } - getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) { - const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation); - const result = new OverviewRulerDecorations(); - for (const decoration of decorations) { - const opts = decoration.options.overviewRuler; - const lane = opts ? opts.position : 0; - if (lane === 0) { - continue; - } - const color = opts.getColor(theme); - const viewStartLineNumber = this._getViewLineNumberForModelPosition(decoration.range.startLineNumber, decoration.range.startColumn); - const viewEndLineNumber = this._getViewLineNumberForModelPosition(decoration.range.endLineNumber, decoration.range.endColumn); - result.accept(color, viewStartLineNumber, viewEndLineNumber, lane); - } - return result.result; - } - getDecorationsInRange(range, ownerId, filterOutValidation) { - const modelStart = this.convertViewPositionToModelPosition(range.startLineNumber, range.startColumn); - const modelEnd = this.convertViewPositionToModelPosition(range.endLineNumber, range.endColumn); - if (modelEnd.lineNumber - modelStart.lineNumber <= range.endLineNumber - range.startLineNumber) { - // most likely there are no hidden lines => fast path - // fetch decorations from column 1 to cover the case of wrapped lines that have whole line decorations at column 1 - return this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](modelStart.lineNumber, 1, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation); - } - let result = []; - const modelStartLineIndex = modelStart.lineNumber - 1; - const modelEndLineIndex = modelEnd.lineNumber - 1; - let reqStart = null; - for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) { - const line = this.lines[modelLineIndex]; - if (line.isVisible()) { - // merge into previous request - if (reqStart === null) { - reqStart = new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](modelLineIndex + 1, modelLineIndex === modelStartLineIndex ? modelStart.column : 1); - } - } - else { - // hit invisible line => flush request - if (reqStart !== null) { - const maxLineColumn = this.model.getLineMaxColumn(modelLineIndex); - result = result.concat(this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](reqStart.lineNumber, reqStart.column, modelLineIndex, maxLineColumn), ownerId, filterOutValidation)); - reqStart = null; - } - } - } - if (reqStart !== null) { - result = result.concat(this.model.getDecorationsInRange(new _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](reqStart.lineNumber, reqStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation)); - reqStart = null; - } - result.sort((a, b) => { - const res = _core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].compareRangesUsingStarts(a.range, b.range); - if (res === 0) { - if (a.id < b.id) { - return -1; - } - if (a.id > b.id) { - return 1; - } - return 0; - } - return res; - }); - // Eliminate duplicate decorations that might have intersected our visible ranges multiple times - let finalResult = [], finalResultLen = 0; - let prevDecId = null; - for (const dec of result) { - const decId = dec.id; - if (prevDecId === decId) { - // skip - continue; - } - prevDecId = decId; - finalResult[finalResultLen++] = dec; - } - return finalResult; - } -} -class VisibleIdentitySplitLine { - constructor() { } - isVisible() { - return true; - } - setVisible(isVisible) { - if (isVisible) { - return this; - } - return InvisibleIdentitySplitLine.INSTANCE; - } - getLineBreakData() { - return null; - } - getViewLineCount() { - return 1; - } - getViewLineContent(model, modelLineNumber, _outputLineIndex) { - return model.getLineContent(modelLineNumber); - } - getViewLineLength(model, modelLineNumber, _outputLineIndex) { - return model.getLineLength(modelLineNumber); - } - getViewLineMinColumn(model, modelLineNumber, _outputLineIndex) { - return model.getLineMinColumn(modelLineNumber); - } - getViewLineMaxColumn(model, modelLineNumber, _outputLineIndex) { - return model.getLineMaxColumn(modelLineNumber); - } - getViewLineData(model, modelLineNumber, _outputLineIndex) { - let lineTokens = model.getLineTokens(modelLineNumber); - let lineContent = lineTokens.getLineContent(); - return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__["ViewLineData"](lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate()); - } - getViewLinesData(model, modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, globalStartIndex, needed, result) { - if (!needed[globalStartIndex]) { - result[globalStartIndex] = null; - return; - } - result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0); - } - getModelColumnOfViewPosition(_outputLineIndex, outputColumn) { - return outputColumn; - } - getViewPositionOfModelPosition(deltaLineNumber, inputColumn) { - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](deltaLineNumber, inputColumn); - } - getViewLineNumberOfModelPosition(deltaLineNumber, _inputColumn) { - return deltaLineNumber; - } -} -VisibleIdentitySplitLine.INSTANCE = new VisibleIdentitySplitLine(); -class InvisibleIdentitySplitLine { - constructor() { } - isVisible() { - return false; - } - setVisible(isVisible) { - if (!isVisible) { - return this; - } - return VisibleIdentitySplitLine.INSTANCE; - } - getLineBreakData() { - return null; - } - getViewLineCount() { - return 0; - } - getViewLineContent(_model, _modelLineNumber, _outputLineIndex) { - throw new Error('Not supported'); - } - getViewLineLength(_model, _modelLineNumber, _outputLineIndex) { - throw new Error('Not supported'); - } - getViewLineMinColumn(_model, _modelLineNumber, _outputLineIndex) { - throw new Error('Not supported'); - } - getViewLineMaxColumn(_model, _modelLineNumber, _outputLineIndex) { - throw new Error('Not supported'); - } - getViewLineData(_model, _modelLineNumber, _outputLineIndex) { - throw new Error('Not supported'); - } - getViewLinesData(_model, _modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, _globalStartIndex, _needed, _result) { - throw new Error('Not supported'); - } - getModelColumnOfViewPosition(_outputLineIndex, _outputColumn) { - throw new Error('Not supported'); - } - getViewPositionOfModelPosition(_deltaLineNumber, _inputColumn) { - throw new Error('Not supported'); - } - getViewLineNumberOfModelPosition(_deltaLineNumber, _inputColumn) { - throw new Error('Not supported'); - } -} -InvisibleIdentitySplitLine.INSTANCE = new InvisibleIdentitySplitLine(); -class SplitLine { - constructor(lineBreakData, isVisible) { - this._lineBreakData = lineBreakData; - this._isVisible = isVisible; - } - isVisible() { - return this._isVisible; - } - setVisible(isVisible) { - this._isVisible = isVisible; - return this; - } - getLineBreakData() { - return this._lineBreakData; - } - getViewLineCount() { - if (!this._isVisible) { - return 0; - } - return this._lineBreakData.breakOffsets.length; - } - getInputStartOffsetOfOutputLineIndex(outputLineIndex) { - return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, 0); - } - getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex) { - if (outputLineIndex + 1 === this._lineBreakData.breakOffsets.length) { - return model.getLineMaxColumn(modelLineNumber) - 1; - } - return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex + 1, 0); - } - getViewLineContent(model, modelLineNumber, outputLineIndex) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let r = model.getValueInRange({ - startLineNumber: modelLineNumber, - startColumn: startOffset + 1, - endLineNumber: modelLineNumber, - endColumn: endOffset + 1 - }); - if (outputLineIndex > 0) { - r = spaces(this._lineBreakData.wrappedTextIndentLength) + r; - } - return r; - } - getViewLineLength(model, modelLineNumber, outputLineIndex) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let r = endOffset - startOffset; - if (outputLineIndex > 0) { - r = this._lineBreakData.wrappedTextIndentLength + r; - } - return r; - } - getViewLineMinColumn(_model, _modelLineNumber, outputLineIndex) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - if (outputLineIndex > 0) { - return this._lineBreakData.wrappedTextIndentLength + 1; - } - return 1; - } - getViewLineMaxColumn(model, modelLineNumber, outputLineIndex) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1; - } - getViewLineData(model, modelLineNumber, outputLineIndex) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let lineContent = model.getValueInRange({ - startLineNumber: modelLineNumber, - startColumn: startOffset + 1, - endLineNumber: modelLineNumber, - endColumn: endOffset + 1 - }); - if (outputLineIndex > 0) { - lineContent = spaces(this._lineBreakData.wrappedTextIndentLength) + lineContent; - } - let minColumn = (outputLineIndex > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1); - let maxColumn = lineContent.length + 1; - let continuesWithWrappedLine = (outputLineIndex + 1 < this.getViewLineCount()); - let deltaStartIndex = 0; - if (outputLineIndex > 0) { - deltaStartIndex = this._lineBreakData.wrappedTextIndentLength; - } - let lineTokens = model.getLineTokens(modelLineNumber); - const startVisibleColumn = (outputLineIndex === 0 ? 0 : this._lineBreakData.breakOffsetsVisibleColumn[outputLineIndex - 1]); - return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__["ViewLineData"](lineContent, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex)); - } - getViewLinesData(model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) { - let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex; - if (!needed[globalIndex]) { - result[globalIndex] = null; - continue; - } - result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex); - } - } - getModelColumnOfViewPosition(outputLineIndex, outputColumn) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let adjustedColumn = outputColumn - 1; - if (outputLineIndex > 0) { - if (adjustedColumn < this._lineBreakData.wrappedTextIndentLength) { - adjustedColumn = 0; - } - else { - adjustedColumn -= this._lineBreakData.wrappedTextIndentLength; - } - } - return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, adjustedColumn) + 1; - } - getViewPositionOfModelPosition(deltaLineNumber, inputColumn) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let r = LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1); - let outputLineIndex = r.outputLineIndex; - let outputColumn = r.outputOffset + 1; - if (outputLineIndex > 0) { - outputColumn += this._lineBreakData.wrappedTextIndentLength; - } - // console.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn); - return new _core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](deltaLineNumber + outputLineIndex, outputColumn); - } - getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn) { - if (!this._isVisible) { - throw new Error('Not supported'); - } - const r = LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1); - return (deltaLineNumber + r.outputLineIndex); - } -} -let _spaces = ['']; -function spaces(count) { - if (count >= _spaces.length) { - for (let i = 1; i <= count; i++) { - _spaces[i] = _makeSpaces(i); - } - } - return _spaces[count]; -} -function _makeSpaces(count) { - return new Array(count + 1).join(' '); -} -function createSplitLine(lineBreakData, isVisible) { - if (lineBreakData === null) { - // No mapping needed - if (isVisible) { - return VisibleIdentitySplitLine.INSTANCE; - } - return InvisibleIdentitySplitLine.INSTANCE; - } - else { - return new SplitLine(lineBreakData, isVisible); - } -} -class IdentityCoordinatesConverter { - constructor(lines) { - this._lines = lines; - } - _validPosition(pos) { - return this._lines.model.validatePosition(pos); - } - _validRange(range) { - return this._lines.model.validateRange(range); - } - // View -> Model conversion and related methods - convertViewPositionToModelPosition(viewPosition) { - return this._validPosition(viewPosition); - } - convertViewRangeToModelRange(viewRange) { - return this._validRange(viewRange); - } - validateViewPosition(_viewPosition, expectedModelPosition) { - return this._validPosition(expectedModelPosition); - } - validateViewRange(_viewRange, expectedModelRange) { - return this._validRange(expectedModelRange); - } - // Model -> View conversion and related methods - convertModelPositionToViewPosition(modelPosition) { - return this._validPosition(modelPosition); - } - convertModelRangeToViewRange(modelRange) { - return this._validRange(modelRange); - } - modelPositionIsVisible(modelPosition) { - const lineCount = this._lines.model.getLineCount(); - if (modelPosition.lineNumber < 1 || modelPosition.lineNumber > lineCount) { - // invalid arguments - return false; - } - return true; - } -} -class IdentityLinesCollection { - constructor(model) { - this.model = model; - } - dispose() { - } - createCoordinatesConverter() { - return new IdentityCoordinatesConverter(this); - } - getHiddenAreas() { - return []; - } - setHiddenAreas(_ranges) { - return false; - } - setTabSize(_newTabSize) { - return false; - } - setWrappingSettings(_fontInfo, _wrappingStrategy, _wrappingColumn, _wrappingIndent) { - return false; - } - createLineBreaksComputer() { - let result = []; - return { - addRequest: (lineText, previousLineBreakData) => { - result.push(null); - }, - finalize: () => { - return result; - } - }; - } - onModelFlushed() { - } - onModelLinesDeleted(_versionId, fromLineNumber, toLineNumber) { - return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesDeletedEvent"](fromLineNumber, toLineNumber); - } - onModelLinesInserted(_versionId, fromLineNumber, toLineNumber, lineBreaks) { - return new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesInsertedEvent"](fromLineNumber, toLineNumber); - } - onModelLineChanged(_versionId, lineNumber, lineBreakData) { - return [false, new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_4__["ViewLinesChangedEvent"](lineNumber, lineNumber), null, null]; - } - acceptVersionId(_versionId) { - } - getViewLineCount() { - return this.model.getLineCount(); - } - getActiveIndentGuide(viewLineNumber, _minLineNumber, _maxLineNumber) { - return { - startLineNumber: viewLineNumber, - endLineNumber: viewLineNumber, - indent: 0 - }; - } - getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) { - const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1; - let result = new Array(viewLineCount); - for (let i = 0; i < viewLineCount; i++) { - result[i] = 0; - } - return result; - } - getViewLineContent(viewLineNumber) { - return this.model.getLineContent(viewLineNumber); - } - getViewLineLength(viewLineNumber) { - return this.model.getLineLength(viewLineNumber); - } - getViewLineMinColumn(viewLineNumber) { - return this.model.getLineMinColumn(viewLineNumber); - } - getViewLineMaxColumn(viewLineNumber) { - return this.model.getLineMaxColumn(viewLineNumber); - } - getViewLineData(viewLineNumber) { - let lineTokens = this.model.getLineTokens(viewLineNumber); - let lineContent = lineTokens.getLineContent(); - return new _viewModel_js__WEBPACK_IMPORTED_MODULE_6__["ViewLineData"](lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate()); - } - getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) { - const lineCount = this.model.getLineCount(); - viewStartLineNumber = Math.min(Math.max(1, viewStartLineNumber), lineCount); - viewEndLineNumber = Math.min(Math.max(1, viewEndLineNumber), lineCount); - let result = []; - for (let lineNumber = viewStartLineNumber; lineNumber <= viewEndLineNumber; lineNumber++) { - let idx = lineNumber - viewStartLineNumber; - if (!needed[idx]) { - result[idx] = null; - } - result[idx] = this.getViewLineData(lineNumber); - } - return result; - } - getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) { - const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation); - const result = new OverviewRulerDecorations(); - for (const decoration of decorations) { - const opts = decoration.options.overviewRuler; - const lane = opts ? opts.position : 0; - if (lane === 0) { - continue; - } - const color = opts.getColor(theme); - const viewStartLineNumber = decoration.range.startLineNumber; - const viewEndLineNumber = decoration.range.endLineNumber; - result.accept(color, viewStartLineNumber, viewEndLineNumber, lane); - } - return result.result; - } - getDecorationsInRange(range, ownerId, filterOutValidation) { - return this.model.getDecorationsInRange(range, ownerId, filterOutValidation); - } -} -class OverviewRulerDecorations { - constructor() { - this.result = Object.create(null); - } - accept(color, startLineNumber, endLineNumber, lane) { - let prev = this.result[color]; - if (prev) { - const prevLane = prev[prev.length - 3]; - const prevEndLineNumber = prev[prev.length - 1]; - if (prevLane === lane && prevEndLineNumber + 1 >= startLineNumber) { - // merge into prev - if (endLineNumber > prevEndLineNumber) { - prev[prev.length - 1] = endLineNumber; - } - return; - } - // push - prev.push(lane, startLineNumber, endLineNumber); - } - else { - this.result[color] = [lane, startLineNumber, endLineNumber]; + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } else if (typeof edges.defaultInterpolate !== 'undefined') { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } else { + edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]); + } + + if (typeof edge.text === 'undefined') { + if (typeof edge.style !== 'undefined') { + edgeData.arrowheadStyle = 'fill: #333'; + } + } else { + edgeData.arrowheadStyle = 'fill: #333'; + edgeData.labelpos = 'c'; + + if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) { + edgeData.labelType = 'html'; + edgeData.label = "").concat(edge.text.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) { + return ""); + }), ""); + } else { + edgeData.labelType = 'text'; + edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__["default"].lineBreakRegex, '\n'); + + if (typeof edge.style === 'undefined') { + edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none'; } + + edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); + } } -} + edgeData.id = linkId; + edgeData.class = linkNameStart + ' ' + linkNameEnd; + edgeData.minlen = edge.length || 1; // Add the edge to the graph -/***/ }), + g.setEdge(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(edge.start), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(edge.end), edgeData, cnt); + }); +}; +/** + * Returns the all the styles from classDef statements in the graph definition. + * @returns {object} classDef styles + */ -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewEventHandler.js ***! - \***************************************************************************************/ -/*! exports provided: ViewEventHandler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var getClasses = function getClasses(text) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Extracting classes'); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewEventHandler", function() { return ViewEventHandler; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + try { + var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition -class ViewEventHandler extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor() { - super(); - this._shouldRender = true; - } - shouldRender() { - return this._shouldRender; - } - forceShouldRender() { - this._shouldRender = true; - } - setShouldRender() { - this._shouldRender = true; - } - onDidRender() { - this._shouldRender = false; - } - // --- begin event handlers - onConfigurationChanged(e) { - return false; - } - onCursorStateChanged(e) { - return false; - } - onDecorationsChanged(e) { - return false; - } - onFlushed(e) { - return false; - } - onFocusChanged(e) { - return false; - } - onLanguageConfigurationChanged(e) { - return false; - } - onLineMappingChanged(e) { - return false; - } - onLinesChanged(e) { - return false; - } - onLinesDeleted(e) { - return false; - } - onLinesInserted(e) { - return false; - } - onRevealRangeRequest(e) { - return false; - } - onScrollChanged(e) { - return false; - } - onThemeChanged(e) { - return false; - } - onTokensChanged(e) { - return false; - } - onTokensColorsChanged(e) { - return false; - } - onZonesChanged(e) { - return false; - } - // --- end event handlers - handleEvents(events) { - let shouldRender = false; - for (let i = 0, len = events.length; i < len; i++) { - let e = events[i]; - switch (e.type) { - case 0 /* ViewConfigurationChanged */: - if (this.onConfigurationChanged(e)) { - shouldRender = true; - } - break; - case 1 /* ViewCursorStateChanged */: - if (this.onCursorStateChanged(e)) { - shouldRender = true; - } - break; - case 2 /* ViewDecorationsChanged */: - if (this.onDecorationsChanged(e)) { - shouldRender = true; - } - break; - case 3 /* ViewFlushed */: - if (this.onFlushed(e)) { - shouldRender = true; - } - break; - case 4 /* ViewFocusChanged */: - if (this.onFocusChanged(e)) { - shouldRender = true; - } - break; - case 5 /* ViewLanguageConfigurationChanged */: - if (this.onLanguageConfigurationChanged(e)) { - shouldRender = true; - } - break; - case 6 /* ViewLineMappingChanged */: - if (this.onLineMappingChanged(e)) { - shouldRender = true; - } - break; - case 7 /* ViewLinesChanged */: - if (this.onLinesChanged(e)) { - shouldRender = true; - } - break; - case 8 /* ViewLinesDeleted */: - if (this.onLinesDeleted(e)) { - shouldRender = true; - } - break; - case 9 /* ViewLinesInserted */: - if (this.onLinesInserted(e)) { - shouldRender = true; - } - break; - case 10 /* ViewRevealRangeRequest */: - if (this.onRevealRangeRequest(e)) { - shouldRender = true; - } - break; - case 11 /* ViewScrollChanged */: - if (this.onScrollChanged(e)) { - shouldRender = true; - } - break; - case 13 /* ViewTokensChanged */: - if (this.onTokensChanged(e)) { - shouldRender = true; - } - break; - case 12 /* ViewThemeChanged */: - if (this.onThemeChanged(e)) { - shouldRender = true; - } - break; - case 14 /* ViewTokensColorsChanged */: - if (this.onTokensColorsChanged(e)) { - shouldRender = true; - } - break; - case 15 /* ViewZonesChanged */: - if (this.onZonesChanged(e)) { - shouldRender = true; - } - break; - default: - console.info('View received unknown event: '); - console.info(e); - } - } - if (shouldRender) { - this._shouldRender = true; - } - } -} + parser.parse(text); + return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); + } catch (e) { + return; + } +}; +/** + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ +var draw = function draw(text, id) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].info('Drawing flowchart'); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].setGen('gen-1'); + var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition + // try { -/***/ }), + parser.parse(text); // } catch (err) { + // log.debug('Parsing failed'); + // } + // Fetch the default direction, use TD if none was found -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js ***! - \********************************************************************************/ -/*! exports provided: Viewport, MinimapLinesRenderingData, ViewLineData, ViewLineRenderingData, InlineDecoration, ViewModelDecoration */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Viewport", function() { return Viewport; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MinimapLinesRenderingData", function() { return MinimapLinesRenderingData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLineData", function() { return ViewLineData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewLineRenderingData", function() { return ViewLineRenderingData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InlineDecoration", function() { return InlineDecoration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewModelDecoration", function() { return ViewModelDecoration; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + if (typeof dir === 'undefined') { + dir = 'TD'; + } -class Viewport { - constructor(top, left, width, height) { - this.top = top | 0; - this.left = left | 0; - this.width = width | 0; - this.height = height | 0; - } -} -class MinimapLinesRenderingData { - constructor(tabSize, data) { - this.tabSize = tabSize; - this.data = data; - } -} -class ViewLineData { - constructor(content, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, tokens) { - this.content = content; - this.continuesWithWrappedLine = continuesWithWrappedLine; - this.minColumn = minColumn; - this.maxColumn = maxColumn; - this.startVisibleColumn = startVisibleColumn; - this.tokens = tokens; - } -} -class ViewLineRenderingData { - constructor(minColumn, maxColumn, content, continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, tokens, inlineDecorations, tabSize, startVisibleColumn) { - this.minColumn = minColumn; - this.maxColumn = maxColumn; - this.content = content; - this.continuesWithWrappedLine = continuesWithWrappedLine; - this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII); - this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL); - this.tokens = tokens; - this.inlineDecorations = inlineDecorations; - this.tabSize = tabSize; - this.startVisibleColumn = startVisibleColumn; - } - static isBasicASCII(lineContent, mightContainNonBasicASCII) { - if (mightContainNonBasicASCII) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isBasicASCII"](lineContent); - } - return true; - } - static containsRTL(lineContent, isBasicASCII, mightContainRTL) { - if (!isBasicASCII && mightContainRTL) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["containsRTL"](lineContent); - } - return false; - } -} -class InlineDecoration { - constructor(range, inlineClassName, type) { - this.range = range; - this.inlineClassName = inlineClassName; - this.type = type; - } -} -class ViewModelDecoration { - constructor(range, options) { - this.range = range; - this.options = options; + var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart; + var nodeSpacing = conf.nodeSpacing || 50; + var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph + + var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function () { + return {}; + }); + var subG; + var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs(); + + for (var _i = subGraphs.length - 1; _i >= 0; _i--) { + subG = subGraphs[_i]; + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes); + } // Fetch the verices/nodes and edges/links from the parsed graph definition + + + var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices(); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Get vertices', vert); + var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges(); + var i = 0; + + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + Object(d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"])('cluster').append('text'); + + for (var j = 0; j < subG.nodes.length; j++) { + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn('Setting subgraph', subG.nodes[j], _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id)); + g.setParent(_flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id)); } -} + } + addVertices(vert, g, id); + addEdges(edges, g); // Create the renderer -/***/ }), + var Render = dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.render; + var render = new Render(); // Add custom shapes -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js ***! - \*******************************************************************************************/ -/*! exports provided: ViewModelDecorations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__["default"].addToRender(render); // Add our custom arrow - an empty arrowhead -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewModelDecorations", function() { return ViewModelDecorations; }); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + render.arrows().none = function normal(parent, id, edge, type) { + var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto'); + var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z'); + dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']); + }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling. + render.arrows().normal = function normal(parent, id) { + var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto'); + marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0'); + }; // Set up an SVG group so that we can translate the final graph. + + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); + svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].warn(g); // Run the renderer. This is what draws the final graph. -class ViewModelDecorations { - constructor(editorId, model, configuration, linesCollection, coordinatesConverter) { - this.editorId = editorId; - this.model = model; - this.configuration = configuration; - this._linesCollection = linesCollection; - this._coordinatesConverter = coordinatesConverter; - this._decorationsCache = Object.create(null); - this._cachedModelDecorationsResolver = null; - this._cachedModelDecorationsResolverViewRange = null; - } - _clearCachedModelDecorationsResolver() { - this._cachedModelDecorationsResolver = null; - this._cachedModelDecorationsResolverViewRange = null; + var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); + render(element, g); + element.selectAll('g.node').attr('title', function () { + return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id); + }); + var padding = conf.diagramPadding; + var svgBounds = svg.node().getBBox(); + var width = svgBounds.width + padding * 2; + var height = svgBounds.height + padding * 2; + Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(svg, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding + + var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); + _logger__WEBPACK_IMPORTED_MODULE_7__["log"].debug("viewBox ".concat(vBox)); + svg.attr('viewBox', vBox); // Index nodes + + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels + + for (i = 0; i < subGraphs.length; i++) { + subG = subGraphs[i]; + + if (subG.title !== 'undefined') { + var clusterRects = document.querySelectorAll('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id) + '"] rect'); + var clusterEl = document.querySelectorAll('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(subG.id) + '"]'); + var xPos = clusterRects[0].x.baseVal.value; + var yPos = clusterRects[0].y.baseVal.value; + var _width = clusterRects[0].width.baseVal.value; + var cluster = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])(clusterEl[0]); + var te = cluster.select('.label'); + te.attr('transform', "translate(".concat(xPos + _width / 2, ", ").concat(yPos + 14, ")")); + te.attr('id', id + 'Text'); + + for (var _j = 0; _j < subG.classes.length; _j++) { + clusterEl[0].classList.add(subG.classes[_j]); + } } - dispose() { - this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); + } // Add label rects for non html labels + + + if (!conf.htmlLabels || true) { + // eslint-disable-line + var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + + for (var k = 0; k < labels.length; k++) { + var label = labels[k]; // Get dimensions of label + + var dim = label.getBBox(); + var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); + rect.setAttribute('rx', 0); + rect.setAttribute('ry', 0); + rect.setAttribute('width', dim.width); + rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;'); + + label.insertBefore(rect, label.firstChild); } - reset() { - this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); - } - onModelDecorationsChanged() { - this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); - } - onLineMappingChanged() { - this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); - } - _getOrCreateViewModelDecoration(modelDecoration) { - const id = modelDecoration.id; - let r = this._decorationsCache[id]; - if (!r) { - const modelRange = modelDecoration.range; - const options = modelDecoration.options; - let viewRange; - if (options.isWholeLine) { - const start = this._coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](modelRange.startLineNumber, 1)); - const end = this._coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](modelRange.endLineNumber, this.model.getLineMaxColumn(modelRange.endLineNumber))); - viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](start.lineNumber, start.column, end.lineNumber, end.column); - } - else { - viewRange = this._coordinatesConverter.convertModelRangeToViewRange(modelRange); - } - r = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__["ViewModelDecoration"](viewRange, options); - this._decorationsCache[id] = r; - } - return r; - } - getDecorationsViewportData(viewRange) { - let cacheIsValid = (this._cachedModelDecorationsResolver !== null); - cacheIsValid = cacheIsValid && (viewRange.equalsRange(this._cachedModelDecorationsResolverViewRange)); - if (!cacheIsValid) { - this._cachedModelDecorationsResolver = this._getDecorationsViewportData(viewRange); - this._cachedModelDecorationsResolverViewRange = viewRange; - } - return this._cachedModelDecorationsResolver; - } - _getDecorationsViewportData(viewportRange) { - const modelDecorations = this._linesCollection.getDecorationsInRange(viewportRange, this.editorId, Object(_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__["filterValidationDecorations"])(this.configuration.options)); - const startLineNumber = viewportRange.startLineNumber; - const endLineNumber = viewportRange.endLineNumber; - let decorationsInViewport = [], decorationsInViewportLen = 0; - let inlineDecorations = []; - for (let j = startLineNumber; j <= endLineNumber; j++) { - inlineDecorations[j - startLineNumber] = []; - } - for (let i = 0, len = modelDecorations.length; i < len; i++) { - let modelDecoration = modelDecorations[i]; - let decorationOptions = modelDecoration.options; - let viewModelDecoration = this._getOrCreateViewModelDecoration(modelDecoration); - let viewRange = viewModelDecoration.range; - decorationsInViewport[decorationsInViewportLen++] = viewModelDecoration; - if (decorationOptions.inlineClassName) { - let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__["InlineDecoration"](viewRange, decorationOptions.inlineClassName, decorationOptions.inlineClassNameAffectsLetterSpacing ? 3 /* RegularAffectingLetterSpacing */ : 0 /* Regular */); - let intersectedStartLineNumber = Math.max(startLineNumber, viewRange.startLineNumber); - let intersectedEndLineNumber = Math.min(endLineNumber, viewRange.endLineNumber); - for (let j = intersectedStartLineNumber; j <= intersectedEndLineNumber; j++) { - inlineDecorations[j - startLineNumber].push(inlineDecoration); - } - } - if (decorationOptions.beforeContentClassName) { - if (startLineNumber <= viewRange.startLineNumber && viewRange.startLineNumber <= endLineNumber) { - let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__["InlineDecoration"](new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](viewRange.startLineNumber, viewRange.startColumn, viewRange.startLineNumber, viewRange.startColumn), decorationOptions.beforeContentClassName, 1 /* Before */); - inlineDecorations[viewRange.startLineNumber - startLineNumber].push(inlineDecoration); - } - } - if (decorationOptions.afterContentClassName) { - if (startLineNumber <= viewRange.endLineNumber && viewRange.endLineNumber <= endLineNumber) { - let inlineDecoration = new _viewModel_js__WEBPACK_IMPORTED_MODULE_2__["InlineDecoration"](new _core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](viewRange.endLineNumber, viewRange.endColumn, viewRange.endLineNumber, viewRange.endColumn), decorationOptions.afterContentClassName, 2 /* After */); - inlineDecorations[viewRange.endLineNumber - startLineNumber].push(inlineDecoration); - } - } + } // If node has a link, wrap it in an anchor SVG object. + + + var keys = Object.keys(vert); + keys.forEach(function (key) { + var vertex = vert[key]; + + if (vertex.link) { + var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' [id="' + _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].lookUpDomId(key) + '"]'); + + if (node) { + var link = document.createElementNS('http://www.w3.org/2000/svg', 'a'); + link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' ')); + link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link); + link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener'); + + if (vertex.linkTarget) { + link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget); } - return { - decorations: decorationsInViewport, - inlineDecorations: inlineDecorations - }; + + var linkNode = node.insert(function () { + return link; + }, ':first-child'); + var shape = node.select('.label-container'); + + if (shape) { + linkNode.append(function () { + return shape.node(); + }); + } + + var _label = node.select('.label'); + + if (_label) { + linkNode.append(function () { + return _label.node(); + }); + } + } } -} + }); +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + addVertices: addVertices, + addEdges: addEdges, + getClasses: getClasses, + draw: draw +}); + +/***/ }), + +/***/ "./src/diagrams/flowchart/parser/flow.jison": +/*!**************************************************!*\ + !*** ./src/diagrams/flowchart/parser/flow.jison ***! + \**************************************************/ +/*! no static exports found */function(e,t,n){(function(e,i){var r=function(){var e=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},t=[1,9],n=[1,7],i=[1,6],r=[1,8],o=[1,20,21,22,23,38,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],s=[2,10],a=[1,20],l=[1,21],c=[1,22],d=[1,23],u=[1,30],h=[1,54],f=[1,32],g=[1,33],p=[1,34],m=[1,35],_=[1,36],b=[1,48],v=[1,43],y=[1,45],w=[1,40],C=[1,44],S=[1,47],k=[1,51],x=[1,52],L=[1,53],M=[1,42],D=[1,46],E=[1,49],T=[1,50],O=[1,41],N=[1,57],I=[1,62],A=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],R=[1,66],P=[1,65],j=[1,67],F=[20,21,23,69,70],B=[1,88],W=[1,93],H=[1,90],Y=[1,95],V=[1,98],z=[1,96],U=[1,97],$=[1,91],q=[1,103],K=[1,102],G=[1,92],Z=[1,94],J=[1,99],X=[1,100],Q=[1,101],ee=[1,104],te=[20,21,22,23,69,70],ne=[20,21,22,23,47,69,70],ie=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],re=[20,21,23],oe=[20,21,23,46,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],se=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ae=[46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],le=[1,136],ce=[1,144],de=[1,145],ue=[1,146],he=[1,147],fe=[1,131],ge=[1,132],pe=[1,128],me=[1,139],_e=[1,140],be=[1,141],ve=[1,142],ye=[1,143],we=[1,148],Ce=[1,149],Se=[1,134],ke=[1,137],xe=[1,133],Le=[1,130],Me=[20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],De=[1,152],Ee=[20,21,22,23,26,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],Te=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,94,95,98,99,100,102,103,104,105,109,110,111,112,113,114],Oe=[12,21,22,24],Ne=[22,95],Ie=[1,233],Ae=[1,237],Re=[1,234],Pe=[1,231],je=[1,228],Fe=[1,229],Be=[1,230],We=[1,232],He=[1,235],Ye=[1,236],Ve=[1,238],ze=[1,255],Ue=[20,21,23,95],$e=[20,21,22,23,75,91,94,95,98,99,100,101,102,103,104],qe={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,CALLBACKNAME:87,CALLBACKARGS:88,HREF:89,LINK_TARGET:90,HEX:91,numList:92,INTERPOLATE:93,NUM:94,COMMA:95,style:96,styleComponent:97,ALPHA:98,COLON:99,MINUS:100,UNIT:101,BRKT:102,DOT:103,PCT:104,TAGSTART:105,alphaNumToken:106,idStringToken:107,alphaNumStatement:108,PUNCTUATION:109,UNICODE_TEXT:110,PLUS:111,EQUALS:112,MULT:113,UNDERSCORE:114,graphCodeTokens:115,ARROW_CROSS:116,ARROW_POINT:117,ARROW_CIRCLE:118,ARROW_OPEN:119,QUOTE:120,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"CALLBACKNAME",88:"CALLBACKARGS",89:"HREF",90:"LINK_TARGET",91:"HEX",93:"INTERPOLATE",94:"NUM",95:"COMMA",98:"ALPHA",99:"COLON",100:"MINUS",101:"UNIT",102:"BRKT",103:"DOT",104:"PCT",105:"TAGSTART",109:"PUNCTUATION",110:"UNICODE_TEXT",111:"PLUS",112:"EQUALS",113:"MULT",114:"UNDERSCORE",116:"ARROW_CROSS",117:"ARROW_POINT",118:"ARROW_CIRCLE",119:"ARROW_OPEN",120:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[92,1],[92,3],[85,1],[85,3],[96,1],[96,2],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[108,1],[108,1],[108,1],[108,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]],performAction:function(e,t,n,i,r,o,s){var a=o.length-1;switch(r){case 5:i.parseDirective("%%{","open_directive");break;case 6:i.parseDirective(o[a],"type_directive");break;case 7:o[a]=o[a].trim().replace(/'/g,'"'),i.parseDirective(o[a],"arg_directive");break;case 8:i.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:o[a]!==[]&&o[a-1].push(o[a]),this.$=o[a-1];break;case 12:case 76:case 78:case 90:case 146:case 148:case 149:this.$=o[a];break;case 19:i.setDirection("TB"),this.$="TB";break;case 20:i.setDirection(o[a-1]),this.$=o[a-1];break;case 35:this.$=o[a-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=i.addSubGraph(o[a-6],o[a-1],o[a-4]);break;case 42:this.$=i.addSubGraph(o[a-3],o[a-1],o[a-3]);break;case 43:this.$=i.addSubGraph(void 0,o[a-1],void 0);break;case 47:i.addLink(o[a-2].stmt,o[a],o[a-1]),this.$={stmt:o[a],nodes:o[a].concat(o[a-2].nodes)};break;case 48:i.addLink(o[a-3].stmt,o[a-1],o[a-2]),this.$={stmt:o[a-1],nodes:o[a-1].concat(o[a-3].nodes)};break;case 49:this.$={stmt:o[a-1],nodes:o[a-1]};break;case 50:this.$={stmt:o[a],nodes:o[a]};break;case 51:this.$=[o[a]];break;case 52:this.$=o[a-4].concat(o[a]);break;case 53:this.$=[o[a-2]],i.setClass(o[a-2],o[a]);break;case 54:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"square");break;case 55:this.$=o[a-5],i.addVertex(o[a-5],o[a-2],"circle");break;case 56:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"ellipse");break;case 57:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"stadium");break;case 58:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"subroutine");break;case 59:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"cylinder");break;case 60:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"round");break;case 61:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"diamond");break;case 62:this.$=o[a-5],i.addVertex(o[a-5],o[a-2],"hexagon");break;case 63:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"odd");break;case 64:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"trapezoid");break;case 65:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"inv_trapezoid");break;case 66:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"lean_right");break;case 67:this.$=o[a-3],i.addVertex(o[a-3],o[a-1],"lean_left");break;case 68:this.$=o[a],i.addVertex(o[a]);break;case 69:o[a-1].text=o[a],this.$=o[a-1];break;case 70:case 71:o[a-2].text=o[a-1],this.$=o[a-2];break;case 72:this.$=o[a];break;case 73:var l=i.destructLink(o[a],o[a-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:o[a-1]};break;case 74:l=i.destructLink(o[a]),this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 75:this.$=o[a-1];break;case 77:case 91:case 147:this.$=o[a-1]+""+o[a];break;case 92:case 93:this.$=o[a-4],i.addClass(o[a-2],o[a]);break;case 94:this.$=o[a-4],i.setClass(o[a-2],o[a]);break;case 95:case 103:this.$=o[a-1],i.setClickEvent(o[a-1],o[a]);break;case 96:case 104:this.$=o[a-3],i.setClickEvent(o[a-3],o[a-2]),i.setTooltip(o[a-3],o[a]);break;case 97:this.$=o[a-2],i.setClickEvent(o[a-2],o[a-1],o[a]);break;case 98:this.$=o[a-4],i.setClickEvent(o[a-4],o[a-3],o[a-2]),i.setTooltip(o[a-4],o[a]);break;case 99:case 105:this.$=o[a-1],i.setLink(o[a-1],o[a]);break;case 100:case 106:this.$=o[a-3],i.setLink(o[a-3],o[a-2]),i.setTooltip(o[a-3],o[a]);break;case 101:case 107:this.$=o[a-3],i.setLink(o[a-3],o[a-2],o[a]);break;case 102:case 108:this.$=o[a-5],i.setLink(o[a-5],o[a-4],o[a]),i.setTooltip(o[a-5],o[a-2]);break;case 109:this.$=o[a-4],i.addVertex(o[a-2],void 0,void 0,o[a]);break;case 110:case 112:this.$=o[a-4],i.updateLink(o[a-2],o[a]);break;case 111:this.$=o[a-4],i.updateLink([o[a-2]],o[a]);break;case 113:this.$=o[a-8],i.updateLinkInterpolate([o[a-6]],o[a-2]),i.updateLink([o[a-6]],o[a]);break;case 114:this.$=o[a-8],i.updateLinkInterpolate(o[a-6],o[a-2]),i.updateLink(o[a-6],o[a]);break;case 115:this.$=o[a-6],i.updateLinkInterpolate([o[a-4]],o[a]);break;case 116:this.$=o[a-6],i.updateLinkInterpolate(o[a-4],o[a]);break;case 117:case 119:this.$=[o[a]];break;case 118:case 120:o[a-2].push(o[a]),this.$=o[a-2];break;case 122:this.$=o[a-1]+o[a];break;case 144:this.$=o[a];break;case 145:this.$=o[a-1]+""+o[a];break;case 150:this.$="v";break;case 151:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:t,16:4,21:n,22:i,24:r},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:t,16:4,21:n,22:i,24:r},e(o,s,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:i,24:r},{16:15,21:n,22:i,24:r},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:a,21:l,22:c,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:u,44:31,45:37,46:h,48:38,75:f,76:g,77:p,78:m,79:_,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},{8:55,10:[1,56],15:N},e([10,15],[2,6]),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),{20:[1,59],21:[1,60],22:I,27:58,30:61},e(A,[2,11]),e(A,[2,12]),e(A,[2,13]),e(A,[2,14]),e(A,[2,15]),e(A,[2,16]),{9:63,20:R,21:P,23:j,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:R,21:P,23:j},{9:72,20:R,21:P,23:j},{9:73,20:R,21:P,23:j},{9:74,20:R,21:P,23:j},{9:75,20:R,21:P,23:j},{9:77,20:R,21:P,22:[1,76],23:j},e(F,[2,50],{30:78,22:I}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{26:B,46:W,73:[1,86],80:H,86:85,87:[1,83],89:[1,84],94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(te,[2,51],{47:[1,105]}),e(ne,[2,68],{107:116,40:[1,106],46:h,49:[1,107],51:[1,108],53:[1,109],55:[1,110],57:[1,111],59:[1,112],61:[1,113],62:[1,114],64:[1,115],80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,109:L,110:M,111:D,112:E,113:T,114:O}),e(ie,[2,144]),e(ie,[2,165]),e(ie,[2,166]),e(ie,[2,167]),e(ie,[2,168]),e(ie,[2,169]),e(ie,[2,170]),e(ie,[2,171]),e(ie,[2,172]),e(ie,[2,173]),e(ie,[2,174]),e(ie,[2,175]),e(ie,[2,176]),e(ie,[2,177]),e(ie,[2,178]),e(ie,[2,179]),{9:117,20:R,21:P,23:j},{11:118,14:[1,119]},e(re,[2,8]),e(o,[2,20]),e(o,[2,26]),e(o,[2,27]),{21:[1,120]},e(oe,[2,34],{30:121,22:I}),e(A,[2,35]),{44:122,45:37,46:h,48:38,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},e(se,[2,44]),e(se,[2,45]),e(se,[2,46]),e(ae,[2,72],{67:123,68:[1,124],71:[1,125]}),{22:le,24:ce,26:de,38:ue,39:126,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e([46,68,71,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,74]),e(A,[2,36]),e(A,[2,37]),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),{22:le,24:ce,26:de,38:ue,39:150,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(Me,s,{17:151}),e(F,[2,49],{46:De}),{26:B,46:W,80:H,86:153,91:[1,154],94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},{84:[1,155],92:156,94:[1,157]},{26:B,46:W,80:H,84:[1,158],86:159,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},{26:B,46:W,80:H,86:160,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(re,[2,95],{22:[1,161],88:[1,162]}),e(re,[2,99],{22:[1,163]}),e(re,[2,103],{106:89,108:165,22:[1,164],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,109:G,110:Z,111:J,112:X,113:Q,114:ee}),e(re,[2,105],{22:[1,166]}),e(Ee,[2,146]),e(Ee,[2,148]),e(Ee,[2,149]),e(Ee,[2,150]),e(Ee,[2,151]),e(Te,[2,152]),e(Te,[2,153]),e(Te,[2,154]),e(Te,[2,155]),e(Te,[2,156]),e(Te,[2,157]),e(Te,[2,158]),e(Te,[2,159]),e(Te,[2,160]),e(Te,[2,161]),e(Te,[2,162]),e(Te,[2,163]),e(Te,[2,164]),{46:h,48:167,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},{22:le,24:ce,26:de,38:ue,39:168,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:170,42:he,46:W,49:[1,169],61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:171,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:172,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:173,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:174,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:175,42:he,46:W,59:[1,176],61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:177,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:178,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:179,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(ie,[2,145]),e(Oe,[2,3]),{8:180,15:N},{15:[2,7]},e(o,[2,28]),e(oe,[2,33]),e(F,[2,47],{30:181,22:I}),e(ae,[2,69],{22:[1,182]}),{22:[1,183]},{22:le,24:ce,26:de,38:ue,39:184,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,61:fe,69:ge,70:[1,185],72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(Te,[2,76]),e(Te,[2,78]),e(Te,[2,134]),e(Te,[2,135]),e(Te,[2,136]),e(Te,[2,137]),e(Te,[2,138]),e(Te,[2,139]),e(Te,[2,140]),e(Te,[2,141]),e(Te,[2,142]),e(Te,[2,143]),e(Te,[2,79]),e(Te,[2,80]),e(Te,[2,81]),e(Te,[2,82]),e(Te,[2,83]),e(Te,[2,84]),e(Te,[2,85]),e(Te,[2,86]),e(Te,[2,87]),e(Te,[2,88]),e(Te,[2,89]),{9:188,20:R,21:P,22:le,23:j,24:ce,26:de,38:ue,40:[1,187],42:he,46:W,61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{18:18,19:19,20:a,21:l,22:c,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:u,42:[1,189],44:31,45:37,46:h,48:38,75:f,76:g,77:p,78:m,79:_,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},{22:I,30:190},{22:[1,191],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:165,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:[1,192]},{22:[1,193]},{22:[1,194],95:[1,195]},e(Ne,[2,117]),{22:[1,196]},{22:[1,197],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:165,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:[1,198],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:165,109:G,110:Z,111:J,112:X,113:Q,114:ee},{73:[1,199]},e(re,[2,97],{22:[1,200]}),{73:[1,201],90:[1,202]},{73:[1,203]},e(Ee,[2,147]),{73:[1,204],90:[1,205]},e(te,[2,53],{107:116,46:h,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,109:L,110:M,111:D,112:E,113:T,114:O}),{22:le,24:ce,26:de,38:ue,41:[1,206],42:he,46:W,61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:207,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,50:[1,208],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,52:[1,209],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,54:[1,210],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,56:[1,211],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,58:[1,212],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,60:[1,213],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,39:214,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,41:[1,215],42:he,46:W,61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,61:fe,63:[1,216],65:[1,217],69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{22:le,24:ce,26:de,38:ue,42:he,46:W,61:fe,63:[1,219],65:[1,218],69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{9:220,20:R,21:P,23:j},e(F,[2,48],{46:De}),e(ae,[2,71]),e(ae,[2,70]),{22:le,24:ce,26:de,38:ue,42:he,46:W,61:fe,69:ge,71:[1,221],72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(ae,[2,73]),e(Te,[2,77]),{22:le,24:ce,26:de,38:ue,39:222,42:he,46:W,61:fe,69:ge,72:127,73:pe,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(Me,s,{17:223}),e(A,[2,43]),{45:224,46:h,48:38,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},{22:Ie,75:Ae,85:225,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{22:Ie,75:Ae,85:239,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{22:Ie,75:Ae,85:240,91:Re,93:[1,241],94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{22:Ie,75:Ae,85:242,91:Re,93:[1,243],94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{94:[1,244]},{22:Ie,75:Ae,85:245,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{22:Ie,75:Ae,85:246,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{26:B,46:W,80:H,86:247,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(re,[2,96]),{73:[1,248]},e(re,[2,100],{22:[1,249]}),e(re,[2,101]),e(re,[2,104]),e(re,[2,106],{22:[1,250]}),e(re,[2,107]),e(ne,[2,54]),{22:le,24:ce,26:de,38:ue,42:he,46:W,50:[1,251],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(ne,[2,60]),e(ne,[2,56]),e(ne,[2,57]),e(ne,[2,58]),e(ne,[2,59]),e(ne,[2,61]),{22:le,24:ce,26:de,38:ue,42:he,46:W,60:[1,252],61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(ne,[2,63]),e(ne,[2,64]),e(ne,[2,66]),e(ne,[2,65]),e(ne,[2,67]),e(Oe,[2,4]),e([22,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,75]),{22:le,24:ce,26:de,38:ue,41:[1,253],42:he,46:W,61:fe,69:ge,72:186,74:138,75:me,76:_e,77:be,78:ve,79:ye,80:we,81:Ce,83:129,84:Se,94:Y,95:V,98:z,99:U,100:ke,102:q,103:K,104:xe,105:Le,106:135,109:G,110:Z,111:J,112:X,113:Q,114:ee},{18:18,19:19,20:a,21:l,22:c,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:u,42:[1,254],44:31,45:37,46:h,48:38,75:f,76:g,77:p,78:m,79:_,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},e(te,[2,52]),e(re,[2,109],{95:ze}),e(Ue,[2,119],{97:256,22:Ie,75:Ae,91:Re,94:Pe,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve}),e($e,[2,121]),e($e,[2,123]),e($e,[2,124]),e($e,[2,125]),e($e,[2,126]),e($e,[2,127]),e($e,[2,128]),e($e,[2,129]),e($e,[2,130]),e($e,[2,131]),e($e,[2,132]),e($e,[2,133]),e(re,[2,110],{95:ze}),e(re,[2,111],{95:ze}),{22:[1,257]},e(re,[2,112],{95:ze}),{22:[1,258]},e(Ne,[2,118]),e(re,[2,92],{95:ze}),e(re,[2,93],{95:ze}),e(re,[2,94],{106:89,108:165,26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,109:G,110:Z,111:J,112:X,113:Q,114:ee}),e(re,[2,98]),{90:[1,259]},{90:[1,260]},{50:[1,261]},{60:[1,262]},{9:263,20:R,21:P,23:j},e(A,[2,42]),{22:Ie,75:Ae,91:Re,94:Pe,96:264,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},e($e,[2,122]),{26:B,46:W,80:H,86:265,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},{26:B,46:W,80:H,86:266,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,106:89,108:87,109:G,110:Z,111:J,112:X,113:Q,114:ee},e(re,[2,102]),e(re,[2,108]),e(ne,[2,55]),e(ne,[2,62]),e(Me,s,{17:267}),e(Ue,[2,120],{97:256,22:Ie,75:Ae,91:Re,94:Pe,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve}),e(re,[2,115],{106:89,108:165,22:[1,268],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,109:G,110:Z,111:J,112:X,113:Q,114:ee}),e(re,[2,116],{106:89,108:165,22:[1,269],26:B,46:W,80:H,94:Y,95:V,98:z,99:U,100:$,102:q,103:K,109:G,110:Z,111:J,112:X,113:Q,114:ee}),{18:18,19:19,20:a,21:l,22:c,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:u,42:[1,270],44:31,45:37,46:h,48:38,75:f,76:g,77:p,78:m,79:_,80:b,94:v,95:y,98:w,99:C,100:S,102:k,103:x,107:39,109:L,110:M,111:D,112:E,113:T,114:O},{22:Ie,75:Ae,85:271,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},{22:Ie,75:Ae,85:272,91:Re,94:Pe,96:226,97:227,98:je,99:Fe,100:Be,101:We,102:He,103:Ye,104:Ve},e(A,[2,41]),e(re,[2,113],{95:ze}),e(re,[2,114],{95:ze})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],119:[2,7]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],i=[],r=[null],o=[],s=this.table,a="",l=0,c=0,d=0,u=2,h=1,f=o.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(p.yy[m]=this.yy[m]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var _=g.yylloc;o.push(_);var b=g.options&&g.options.ranges;function v(){var e;return"number"!=typeof(e=i.pop()||g.lex()||h)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,w,C,S,k,x,L,M,D,E={};;){if(C=n[n.length-1],this.defaultActions[C]?S=this.defaultActions[C]:(null==y&&(y=v()),S=s[C]&&s[C][y]),void 0===S||!S.length||!S[0]){var T="";for(x in D=[],s[C])this.terminals_[x]&&x>u&&D.push("'"+this.terminals_[x]+"'");T=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:_,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+y);switch(S[0]){case 1:n.push(y),r.push(g.yytext),o.push(g.yylloc),n.push(S[1]),y=null,w?(y=w,w=null):(c=g.yyleng,a=g.yytext,l=g.yylineno,_=g.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[S[1]][1],E.$=r[r.length-L],E._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},b&&(E._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[a,c,l,p.yy,S[1],r,o].concat(f))))return k;L&&(n=n.slice(0,-1*L*2),r=r.slice(0,-1*L),o=o.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),r.push(E.$),o.push(E._$),M=s[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},Ke={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;ot[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,r[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,i){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 93;case 14:return 77;case 15:return 78;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 89;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 87;case 23:this.popState();break;case 24:return 88;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 79;case 28:case 29:return e.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 90;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 94;case 48:return 102;case 49:return 47;case 50:return 99;case 51:return 46;case 52:return 20;case 53:return 95;case 54:return 113;case 55:case 56:case 57:return 70;case 58:case 59:case 60:return 69;case 61:return 51;case 62:return 52;case 63:return 53;case 64:return 54;case 65:return 55;case 66:return 56;case 67:return 57;case 68:return 58;case 69:return 100;case 70:return 103;case 71:return 114;case 72:return 111;case 73:return 104;case 74:case 75:return 112;case 76:return 105;case 77:return 61;case 78:return 81;case 79:return"SEP";case 80:return 80;case 81:return 98;case 82:return 63;case 83:return 62;case 84:return 65;case 85:return 64;case 86:return 109;case 87:return 110;case 88:return 71;case 89:return 49;case 90:return 50;case 91:return 40;case 92:return 41;case 93:return 59;case 94:return 60;case 95:return 120;case 96:return 21;case 97:return 22;case 98:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};function Ge(){this.yy={}}return qe.lexer=Ke,Ge.prototype=qe,qe.Parser=Ge,new Ge}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)},t.main=function(i){i[1]||(console.log("Usage: "+i[0]+" FILE"),e.exit(1));var r=n(/*! fs */"./node_modules/node-libs-browser/mock/empty.js").readFileSync(n(/*! path */"./node_modules/path-browserify/index.js").normalize(i[1]),"utf8");return t.parser.parse(r)},n.c[n.s]===i&&t.main(e.argv.slice(1))}).call(this,n(/*! ./../../../../node_modules/process/browser.js */"./node_modules/process/browser.js"),n(/*! ./../../../../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./src/diagrams/flowchart/styles.js": +/*!******************************************!*\ + !*** ./src/diagrams/flowchart/styles.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var getStyles = function getStyles(options) { + return ".label {\n font-family: ".concat(options.fontFamily, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n .cluster-label text {\n fill: ").concat(options.titleColor, ";\n }\n .cluster-label span {\n color: ").concat(options.titleColor, ";\n }\n\n .label text,span {\n fill: ").concat(options.nodeTextColor || options.textColor, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n background-color: ").concat(options.edgeLabelBackground, ";\n fill: ").concat(options.edgeLabelBackground, ";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.clusterBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n .cluster span {\n color: ").concat(options.titleColor, ";\n }\n // .cluster div {\n // color: ").concat(options.titleColor, ";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(options.fontFamily, ";\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n"); +}; +/* harmony default export */ __webpack_exports__["default"] = (getStyles); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js ***! - \***********************************************************************************************/ -/*! exports provided: ViewModelEventDispatcher, ViewModelEventsCollector, ContentSizeChangedEvent, FocusChangedEvent, ScrollChangedEvent, ViewZonesChangedEvent, CursorStateChangedEvent, ReadOnlyEditAttemptEvent */ +/***/ "./src/diagrams/gantt/ganttDb.js": +/*!***************************************!*\ + !*** ./src/diagrams/gantt/ganttDb.js ***! + \***************************************/ +/*! exports provided: parseDirective, clear, setAxisFormat, getAxisFormat, setTodayMarker, getTodayMarker, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, enableTopAxis, topAxisEnabled, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */function(e,t,n){"use strict";n.r(t),n.d(t,"parseDirective",(function(){return L})),n.d(t,"clear",(function(){return M})),n.d(t,"setAxisFormat",(function(){return D})),n.d(t,"getAxisFormat",(function(){return E})),n.d(t,"setTodayMarker",(function(){return T})),n.d(t,"getTodayMarker",(function(){return O})),n.d(t,"setDateFormat",(function(){return N})),n.d(t,"enableInclusiveEndDates",(function(){return I})),n.d(t,"endDatesAreInclusive",(function(){return A})),n.d(t,"enableTopAxis",(function(){return R})),n.d(t,"topAxisEnabled",(function(){return P})),n.d(t,"getDateFormat",(function(){return j})),n.d(t,"setExcludes",(function(){return F})),n.d(t,"getExcludes",(function(){return B})),n.d(t,"setTitle",(function(){return W})),n.d(t,"getTitle",(function(){return H})),n.d(t,"addSection",(function(){return Y})),n.d(t,"getSections",(function(){return V})),n.d(t,"getTasks",(function(){return z})),n.d(t,"addTask",(function(){return te})),n.d(t,"findTaskById",(function(){return ne})),n.d(t,"addTaskOrg",(function(){return ie})),n.d(t,"setLink",(function(){return oe})),n.d(t,"setClass",(function(){return se})),n.d(t,"setClickEvent",(function(){return le})),n.d(t,"bindFunctions",(function(){return ce}));var i=n(/*! moment-mini */"moment-mini"),r=n.n(i),o=n(/*! @braintree/sanitize-url */"@braintree/sanitize-url"),s=n(/*! ../../logger */"./src/logger.js"),a=n(/*! ../../config */"./src/config.js"),l=n(/*! ../../utils */"./src/utils.js"),c=n(/*! ../../mermaidAPI */"./src/mermaidAPI.js");function d(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=6&&n.indexOf("weekends")>=0||n.indexOf(e.format("dddd").toLowerCase())>=0||n.indexOf(e.format(t.trim()))>=0},$=function(e,t,n){if(n.length&&!e.manualEndTime){var i=r()(e.startTime,t,!0);i.add(1,"d");var o=r()(e.endTime,t,!0),s=q(i,o,t,n);e.endTime=o.toDate(),e.renderEndTime=s}},q=function(e,t,n,i){for(var r=!1,o=null;e<=t;)r||(o=t.toDate()),(r=U(e,n,i))&&t.add(1,"d"),e.add(1,"d");return o},K=function(e,t,n){n=n.trim();var i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){var o=null;if(i[1].split(" ").forEach((function(e){var t=ne(e);void 0!==t&&(o?t.endTime>o.endTime&&(o=t):o=t)})),o)return o.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var l=r()(n,t.trim(),!0);return l.isValid()?l.toDate():(s.log.debug("Invalid date:"+n),s.log.debug("With date format:"+t.trim()),new Date)},G=function(e,t){if(null!==e)switch(e[2]){case"s":t.add(e[1],"seconds");break;case"m":t.add(e[1],"minutes");break;case"h":t.add(e[1],"hours");break;case"d":t.add(e[1],"days");break;case"w":t.add(e[1],"weeks")}return t.toDate()},Z=function(e,t,n,i){i=i||!1,n=n.trim();var o=r()(n,t.trim(),!0);return o.isValid()?(i&&o.add(1,"d"),o.toDate()):G(/^([\d]+)([wdhms])/.exec(n.trim()),r()(e))},J=0,X=function(e){return void 0===e?"task"+(J+=1):e},Q=[],ee={},te=function(e,t){var n={section:y,type:y,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},i=function(e,t){var n=(":"===t.substr(0,1)?t.substr(1,t.length):t).split(","),i={};de(n,i,w);for(var r=0;ri?r=1:n0&&(t=e.classes.join(" "));for(var i=0,r=0;ri-t?i+s+1.5*n.leftPadding>a?t+r-5:i+r+5:(i-t)/2+t+r})).attr("y",(function(e,r){return e.order*t+n.barHeight/2+(n.fontSize/2-2)+i})).attr("text-height",o).attr("class",(function(e){var t=g(e.startTime),i=g(e.endTime);e.milestone&&(i=t+o);var r=this.getBBox().width,s="";e.classes.length>0&&(s=e.classes.join(" "));for(var l=0,c=0;ci-t?i+r+1.5*n.leftPadding>a?s+" taskTextOutsideLeft taskTextOutside"+l+" "+d:s+" taskTextOutsideRight taskTextOutside"+l+" "+d+" width-"+r:s+" taskText taskText"+l+" "+d+" width-"+r}))}(_,w,C,S,y,0,b),function(e,t){for(var i=[],r=0,s=0;s0&&s.setAttribute("dy","1em"),s.textContent=t[r],i.appendChild(s)}return i})).attr("x",10).attr("y",(function(n,o){if(!(o>0))return n[1]*e/2+t;for(var s=0;su&&D.push("'"+this.terminals_[x]+"'");T=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:_,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+y);switch(S[0]){case 1:n.push(y),r.push(g.yytext),o.push(g.yylloc),n.push(S[1]),y=null,w?(y=w,w=null):(c=g.yyleng,a=g.yytext,l=g.yylineno,_=g.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[S[1]][1],E.$=r[r.length-L],E._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},b&&(E._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[a,c,l,p.yy,S[1],r,o].concat(f))))return k;L&&(n=n.slice(0,-1*L*2),r=r.slice(0,-1*L),o=o.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),r.push(E.$),o.push(E._$),M=s[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;ot[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,r[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,i){switch(n){case 0:return this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function b(){this.yy={}}return m.lexer=_,b.prototype=m,m.Parser=b,new b}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)},t.main=function(i){i[1]||(console.log("Usage: "+i[0]+" FILE"),e.exit(1));var r=n(/*! fs */"./node_modules/node-libs-browser/mock/empty.js").readFileSync(n(/*! path */"./node_modules/path-browserify/index.js").normalize(i[1]),"utf8");return t.parser.parse(r)},n.c[n.s]===i&&t.main(e.argv.slice(1))}).call(this,n(/*! ./../../../../node_modules/process/browser.js */"./node_modules/process/browser.js"),n(/*! ./../../../../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./src/diagrams/gantt/styles.js": +/*!**************************************!*\ + !*** ./src/diagrams/gantt/styles.js ***! + \**************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(e){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(e.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(e.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(e.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(e.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(e.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(e.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(e.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(e.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(e.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(e.fontFamily,";\n fill: ").concat(e.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(e.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(e.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(e.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(e.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(e.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(e.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(e.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(e.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(e.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(e.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(e.taskBkgColor,";\n stroke: ").concat(e.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(e.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(e.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(e.activeTaskBkgColor,";\n stroke: ").concat(e.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(e.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(e.doneTaskBorderColor,";\n fill: ").concat(e.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(e.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(e.critBorderColor,";\n fill: ").concat(e.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(e.critBorderColor,";\n fill: ").concat(e.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(e.critBorderColor,";\n fill: ").concat(e.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(e.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(e.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(e.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")}},"./src/diagrams/git/gitGraphAst.js": +/*!*****************************************!*\ + !*** ./src/diagrams/git/gitGraphAst.js ***! + \*****************************************/ +/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewModelEventDispatcher", function() { return ViewModelEventDispatcher; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewModelEventsCollector", function() { return ViewModelEventsCollector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentSizeChangedEvent", function() { return ContentSizeChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FocusChangedEvent", function() { return FocusChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollChangedEvent", function() { return ScrollChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewZonesChangedEvent", function() { return ViewZonesChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorStateChangedEvent", function() { return CursorStateChangedEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReadOnlyEditAttemptEvent", function() { return ReadOnlyEditAttemptEvent; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -class ViewModelEventDispatcher extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(); - this._onEvent = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onEvent = this._onEvent.event; - this._eventHandlers = []; - this._viewEventQueue = null; - this._isConsumingViewEventQueue = false; - this._collector = null; - this._collectorCnt = 0; - this._outgoingEvents = []; - } - emitOutgoingEvent(e) { - this._addOutgoingEvent(e); - this._emitOugoingEvents(); - } - _addOutgoingEvent(e) { - for (let i = 0, len = this._outgoingEvents.length; i < len; i++) { - if (this._outgoingEvents[i].kind === e.kind) { - this._outgoingEvents[i] = this._outgoingEvents[i].merge(e); - return; - } - } - // not merged - this._outgoingEvents.push(e); - } - _emitOugoingEvents() { - while (this._outgoingEvents.length > 0) { - if (this._collector || this._isConsumingViewEventQueue) { - // right now collecting or emitting view events, so let's postpone emitting - return; - } - const event = this._outgoingEvents.shift(); - if (event.isNoOp()) { - continue; - } - this._onEvent.fire(event); - } - } - addViewEventHandler(eventHandler) { - for (let i = 0, len = this._eventHandlers.length; i < len; i++) { - if (this._eventHandlers[i] === eventHandler) { - console.warn('Detected duplicate listener in ViewEventDispatcher', eventHandler); - } - } - this._eventHandlers.push(eventHandler); - } - removeViewEventHandler(eventHandler) { - for (let i = 0; i < this._eventHandlers.length; i++) { - if (this._eventHandlers[i] === eventHandler) { - this._eventHandlers.splice(i, 1); - break; - } - } - } - beginEmitViewEvents() { - this._collectorCnt++; - if (this._collectorCnt === 1) { - this._collector = new ViewModelEventsCollector(); - } - return this._collector; - } - endEmitViewEvents() { - this._collectorCnt--; - if (this._collectorCnt === 0) { - const outgoingEvents = this._collector.outgoingEvents; - const viewEvents = this._collector.viewEvents; - this._collector = null; - for (const outgoingEvent of outgoingEvents) { - this._addOutgoingEvent(outgoingEvent); - } - if (viewEvents.length > 0) { - this._emitMany(viewEvents); - } - } - this._emitOugoingEvents(); - } - emitSingleViewEvent(event) { - try { - const eventsCollector = this.beginEmitViewEvents(); - eventsCollector.emitViewEvent(event); - } - finally { - this.endEmitViewEvents(); - } - } - _emitMany(events) { - if (this._viewEventQueue) { - this._viewEventQueue = this._viewEventQueue.concat(events); - } - else { - this._viewEventQueue = events; - } - if (!this._isConsumingViewEventQueue) { - this._consumeViewEventQueue(); - } - } - _consumeViewEventQueue() { - try { - this._isConsumingViewEventQueue = true; - this._doConsumeQueue(); - } - finally { - this._isConsumingViewEventQueue = false; - } - } - _doConsumeQueue() { - while (this._viewEventQueue) { - // Empty event queue, as events might come in while sending these off - const events = this._viewEventQueue; - this._viewEventQueue = null; - // Use a clone of the event handlers list, as they might remove themselves - const eventHandlers = this._eventHandlers.slice(0); - for (const eventHandler of eventHandlers) { - eventHandler.handleEvents(events); - } - } - } -} -class ViewModelEventsCollector { - constructor() { - this.viewEvents = []; - this.outgoingEvents = []; - } - emitViewEvent(event) { - this.viewEvents.push(event); - } - emitOutgoingEvent(e) { - this.outgoingEvents.push(e); - } -} -class ContentSizeChangedEvent { - constructor(oldContentWidth, oldContentHeight, contentWidth, contentHeight) { - this.kind = 0 /* ContentSizeChanged */; - this._oldContentWidth = oldContentWidth; - this._oldContentHeight = oldContentHeight; - this.contentWidth = contentWidth; - this.contentHeight = contentHeight; - this.contentWidthChanged = (this._oldContentWidth !== this.contentWidth); - this.contentHeightChanged = (this._oldContentHeight !== this.contentHeight); - } - isNoOp() { - return (!this.contentWidthChanged && !this.contentHeightChanged); - } - merge(other) { - if (other.kind !== 0 /* ContentSizeChanged */) { - return this; - } - return new ContentSizeChangedEvent(this._oldContentWidth, this._oldContentHeight, other.contentWidth, other.contentHeight); - } -} -class FocusChangedEvent { - constructor(oldHasFocus, hasFocus) { - this.kind = 1 /* FocusChanged */; - this.oldHasFocus = oldHasFocus; - this.hasFocus = hasFocus; - } - isNoOp() { - return (this.oldHasFocus === this.hasFocus); - } - merge(other) { - if (other.kind !== 1 /* FocusChanged */) { - return this; - } - return new FocusChangedEvent(this.oldHasFocus, other.hasFocus); - } +var commits = {}; +var head = null; +var branches = { + master: head +}; +var curBranch = 'master'; +var direction = 'LR'; +var seq = 0; + +function getId() { + return Object(_utils__WEBPACK_IMPORTED_MODULE_1__["random"])({ + length: 7 + }); } -class ScrollChangedEvent { - constructor(oldScrollWidth, oldScrollLeft, oldScrollHeight, oldScrollTop, scrollWidth, scrollLeft, scrollHeight, scrollTop) { - this.kind = 2 /* ScrollChanged */; - this._oldScrollWidth = oldScrollWidth; - this._oldScrollLeft = oldScrollLeft; - this._oldScrollHeight = oldScrollHeight; - this._oldScrollTop = oldScrollTop; - this.scrollWidth = scrollWidth; - this.scrollLeft = scrollLeft; - this.scrollHeight = scrollHeight; - this.scrollTop = scrollTop; - this.scrollWidthChanged = (this._oldScrollWidth !== this.scrollWidth); - this.scrollLeftChanged = (this._oldScrollLeft !== this.scrollLeft); - this.scrollHeightChanged = (this._oldScrollHeight !== this.scrollHeight); - this.scrollTopChanged = (this._oldScrollTop !== this.scrollTop); - } - isNoOp() { - return (!this.scrollWidthChanged && !this.scrollLeftChanged && !this.scrollHeightChanged && !this.scrollTopChanged); - } - merge(other) { - if (other.kind !== 2 /* ScrollChanged */) { - return this; - } - return new ScrollChangedEvent(this._oldScrollWidth, this._oldScrollLeft, this._oldScrollHeight, this._oldScrollTop, other.scrollWidth, other.scrollLeft, other.scrollHeight, other.scrollTop); + +function isfastforwardable(currentCommit, otherCommit) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id); + + while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) { + // only if other branch has more commits + if (otherCommit.parent == null) break; + + if (Array.isArray(otherCommit.parent)) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('In merge commit:', otherCommit.parent); + return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]); + } else { + otherCommit = commits[otherCommit.parent]; } + } + + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(currentCommit.id, otherCommit.id); + return currentCommit.id === otherCommit.id; } -class ViewZonesChangedEvent { - constructor() { - this.kind = 3 /* ViewZonesChanged */; - } - isNoOp() { - return false; - } - merge(other) { - return this; - } + +function isReachableFrom(currentCommit, otherCommit) { + var currentSeq = currentCommit.seq; + var otherSeq = otherCommit.seq; + if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit); + return false; } -class CursorStateChangedEvent { - constructor(oldSelections, selections, oldModelVersionId, modelVersionId, source, reason, reachedMaxCursorCount) { - this.kind = 5 /* CursorStateChanged */; - this.oldSelections = oldSelections; - this.selections = selections; - this.oldModelVersionId = oldModelVersionId; - this.modelVersionId = modelVersionId; - this.source = source; - this.reason = reason; - this.reachedMaxCursorCount = reachedMaxCursorCount; - } - static _selectionsAreEqual(a, b) { - if (!a && !b) { - return true; - } - if (!a || !b) { - return false; - } - const aLen = a.length; - const bLen = b.length; - if (aLen !== bLen) { - return false; - } - for (let i = 0; i < aLen; i++) { - if (!a[i].equalsSelection(b[i])) { - return false; - } - } - return true; - } - isNoOp() { - return (CursorStateChangedEvent._selectionsAreEqual(this.oldSelections, this.selections) - && this.oldModelVersionId === this.modelVersionId); - } - merge(other) { - if (other.kind !== 5 /* CursorStateChanged */) { - return this; - } - return new CursorStateChangedEvent(this.oldSelections, other.selections, this.oldModelVersionId, other.modelVersionId, other.source, other.reason, this.reachedMaxCursorCount || other.reachedMaxCursorCount); + +function uniqBy(list, fn) { + var recordMap = Object.create(null); + return list.reduce(function (out, item) { + var key = fn(item); + + if (!recordMap[key]) { + recordMap[key] = true; + out.push(item); } + + return out; + }, []); } -class ReadOnlyEditAttemptEvent { - constructor() { - this.kind = 4 /* ReadOnlyEditAttempt */; - } - isNoOp() { - return false; - } - merge(other) { - return this; + +var setDirection = function setDirection(dir) { + direction = dir; +}; +var options = {}; +var setOptions = function setOptions(rawOptString) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('options str', rawOptString); + rawOptString = rawOptString && rawOptString.trim(); + rawOptString = rawOptString || '{}'; + + try { + options = JSON.parse(rawOptString); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error('error while parsing gitGraph options', e.message); + } +}; +var getOptions = function getOptions() { + return options; +}; +var commit = function commit(msg) { + var commit = { + id: getId(), + message: msg, + seq: seq++, + parent: head == null ? null : head.id + }; + head = commit; + commits[commit.id] = commit; + branches[curBranch] = commit.id; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in pushCommit ' + commit.id); +}; +var branch = function branch(name) { + branches[name] = head != null ? head.id : null; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in createBranch'); +}; +var merge = function merge(otherBranch) { + var currentCommit = commits[branches[curBranch]]; + var otherCommit = commits[branches[otherBranch]]; + + if (isReachableFrom(currentCommit, otherCommit)) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Already merged'); + return; + } + + if (isfastforwardable(currentCommit, otherCommit)) { + branches[curBranch] = branches[otherBranch]; + head = commits[branches[curBranch]]; + } else { + // create merge commit + var _commit = { + id: getId(), + message: 'merged branch ' + otherBranch + ' into ' + curBranch, + seq: seq++, + parent: [head == null ? null : head.id, branches[otherBranch]] + }; + head = _commit; + commits[_commit.id] = _commit; + branches[curBranch] = _commit.id; + } + + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(branches); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in mergeBranch'); +}; +var checkout = function checkout(branch) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in checkout'); + curBranch = branch; + var id = branches[curBranch]; + head = commits[id]; +}; +var reset = function reset(commitRef) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('in reset', commitRef); + var ref = commitRef.split(':')[0]; + var parentCount = parseInt(commitRef.split(':')[1]); + var commit = ref === 'HEAD' ? head : commits[branches[ref]]; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(commit, parentCount); + + while (parentCount > 0) { + commit = commits[commit.parent]; + parentCount--; + + if (!commit) { + var err = 'Critical error - unique parent commit not found during reset'; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].error(err); + throw err; } + } + + head = commit; + branches[curBranch] = commit.id; +}; + +function upsert(arr, key, newval) { + var index = arr.indexOf(key); + + if (index === -1) { + arr.push(newval); + } else { + arr.splice(index, 1, newval); + } } +function prettyPrintCommitHistory(commitArr) { + var commit = commitArr.reduce(function (out, commit) { + if (out.seq > commit.seq) return out; + return commit; + }, commitArr[0]); + var line = ''; + commitArr.forEach(function (c) { + if (c === commit) { + line += '\t*'; + } else { + line += '\t|'; + } + }); + var label = [line, commit.id, commit.seq]; -/***/ }), + for (var _branch in branches) { + if (branches[_branch] === commit.id) label.push(_branch); + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js ***! - \************************************************************************************/ -/*! exports provided: ViewModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewModel", function() { return ViewModel; }); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modes/textToHtmlTokenizer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js"); -/* harmony import */ var _minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./minimapTokensColorTracker.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js"); -/* harmony import */ var _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../view/viewEvents.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/viewEvents.js"); -/* harmony import */ var _viewLayout_viewLayout_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../viewLayout/viewLayout.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js"); -/* harmony import */ var _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./splitLinesCollection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/splitLinesCollection.js"); -/* harmony import */ var _viewModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _viewModelDecorations_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./viewModelDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _controller_cursor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../controller/cursor.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursor.js"); -/* harmony import */ var _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./viewModelEventDispatcher.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelEventDispatcher.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(label.join(' ')); + if (Array.isArray(commit.parent)) { + var newCommit = commits[commit.parent[0]]; + upsert(commitArr, commit, newCommit); + commitArr.push(commits[commit.parent[1]]); + } else if (commit.parent == null) { + return; + } else { + var nextCommit = commits[commit.parent]; + upsert(commitArr, commit, nextCommit); + } + commitArr = uniqBy(commitArr, function (c) { + return c.id; + }); + prettyPrintCommitHistory(commitArr); +} +var prettyPrint = function prettyPrint() { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(commits); + var node = getCommitsArray()[0]; + prettyPrintCommitHistory([node]); +}; +var clear = function clear() { + commits = {}; + head = null; + branches = { + master: head + }; + curBranch = 'master'; + seq = 0; +}; +var getBranchesAsObjArray = function getBranchesAsObjArray() { + var branchArr = []; + for (var _branch2 in branches) { + branchArr.push({ + name: _branch2, + commit: commits[branches[_branch2]] + }); + } + return branchArr; +}; +var getBranches = function getBranches() { + return branches; +}; +var getCommits = function getCommits() { + return commits; +}; +var getCommitsArray = function getCommitsArray() { + var commitArr = Object.keys(commits).map(function (key) { + return commits[key]; + }); + commitArr.forEach(function (o) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug(o.id); + }); + commitArr.sort(function (a, b) { + return b.seq - a.seq; + }); + return commitArr; +}; +var getCurrentBranch = function getCurrentBranch() { + return curBranch; +}; +var getDirection = function getDirection() { + return direction; +}; +var getHead = function getHead() { + return head; +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setDirection: setDirection, + setOptions: setOptions, + getOptions: getOptions, + commit: commit, + branch: branch, + merge: merge, + checkout: checkout, + reset: reset, + prettyPrint: prettyPrint, + clear: clear, + getBranchesAsObjArray: getBranchesAsObjArray, + getBranches: getBranches, + getCommits: getCommits, + getCommitsArray: getCommitsArray, + getCurrentBranch: getCurrentBranch, + getDirection: getDirection, + getHead: getHead +}); +/***/ }), +/***/ "./src/diagrams/git/gitGraphRenderer.js": +/*!**********************************************!*\ + !*** ./src/diagrams/git/gitGraphRenderer.js ***! + \**********************************************/ +/*! exports provided: setConf, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js"); +/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison"); +/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +var allCommitsDict = {}; +var branchNum; +var config = { + nodeSpacing: 150, + nodeFillColor: 'yellow', + nodeStrokeWidth: 2, + nodeStrokeColor: 'grey', + lineStrokeWidth: 4, + branchOffset: 50, + lineColor: 'grey', + leftMargin: 50, + branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'], + nodeRadius: 10, + nodeLabel: { + width: 75, + height: 100, + x: -25, + y: 0 + } +}; +var apiConfig = {}; +var setConf = function setConf(c) { + apiConfig = c; +}; +function svgCreateDefs(svg) { + svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0); + svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html(''); +} +function svgDrawLine(svg, points, colorIdx, interpolate) { + var curve = Object(_utils__WEBPACK_IMPORTED_MODULE_4__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); + var color = config.branchColors[colorIdx % config.branchColors.length]; + var lineGen = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { + return Math.round(d.x); + }).y(function (d) { + return Math.round(d.y); + }).curve(curve); + svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none'); +} // Pass in the element and its pre-transform coords +function getElementCoords(element, coords) { + coords = coords || element.node().getBBox(); + var ctm = element.node().getCTM(); + var xn = ctm.e + coords.x * ctm.a; + var yn = ctm.f + coords.y * ctm.d; + return { + left: xn, + top: yn, + width: coords.width, + height: coords.height + }; +} +function svgDrawLineForCommits(svg, fromId, toId, direction, color) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('svgDrawLineForCommits: ', fromId, toId); + var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle')); + var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle')); -const USE_IDENTITY_LINES_COLLECTION = true; -class ViewModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editorId, configuration, model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, scheduleAtNextAnimationFrame) { - super(); - this._editorId = editorId; - this._configuration = configuration; - this.model = model; - this._eventDispatcher = new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__["ViewModelEventDispatcher"](); - this.onEvent = this._eventDispatcher.onEvent; - this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"](this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration); - this._tokenizeViewportSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__["RunOnceScheduler"](() => this.tokenizeViewport(), 50)); - this._updateConfigurationViewLineCount = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_14__["RunOnceScheduler"](() => this._updateConfigurationViewLineCountNow(), 0)); - this._hasFocus = false; - this._viewportStartLine = -1; - this._viewportStartLineTrackedRange = null; - this._viewportStartLineDelta = 0; - if (USE_IDENTITY_LINES_COLLECTION && this.model.isTooLargeForTokenization()) { - this._lines = new _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__["IdentityLinesCollection"](this.model); - } - else { - const options = this._configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - const wrappingStrategy = options.get(112 /* wrappingStrategy */); - const wrappingInfo = options.get(118 /* wrappingInfo */); - const wrappingIndent = options.get(111 /* wrappingIndent */); - this._lines = new _splitLinesCollection_js__WEBPACK_IMPORTED_MODULE_11__["SplitLinesCollection"](this.model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, this.model.getOptions().tabSize, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent); - } - this.coordinatesConverter = this._lines.createCoordinatesConverter(); - this._cursor = this._register(new _controller_cursor_js__WEBPACK_IMPORTED_MODULE_16__["Cursor"](model, this, this.coordinatesConverter, this.cursorConfig)); - this.viewLayout = this._register(new _viewLayout_viewLayout_js__WEBPACK_IMPORTED_MODULE_10__["ViewLayout"](this._configuration, this.getLineCount(), scheduleAtNextAnimationFrame)); - this._register(this.viewLayout.onDidScroll((e) => { - if (e.scrollTopChanged) { - this._tokenizeViewportSoon.schedule(); - } - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewScrollChangedEvent"](e)); - this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__["ScrollChangedEvent"](e.oldScrollWidth, e.oldScrollLeft, e.oldScrollHeight, e.oldScrollTop, e.scrollWidth, e.scrollLeft, e.scrollHeight, e.scrollTop)); - })); - this._register(this.viewLayout.onDidContentSizeChange((e) => { - this._eventDispatcher.emitOutgoingEvent(e); - })); - this._decorations = new _viewModelDecorations_js__WEBPACK_IMPORTED_MODULE_13__["ViewModelDecorations"](this._editorId, this.model, this._configuration, this._lines, this.coordinatesConverter); - this._registerModelEvents(); - this._register(this._configuration.onDidChangeFast((e) => { - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - this._onConfigurationChanged(eventsCollector, e); - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - })); - this._register(_minimapTokensColorTracker_js__WEBPACK_IMPORTED_MODULE_8__["MinimapTokensColorTracker"].getInstance().onDidChange(() => { - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewTokensColorsChangedEvent"]()); - })); - this._updateConfigurationViewLineCountNow(); - } - dispose() { - // First remove listeners, as disposing the lines might end up sending - // model decoration changed events ... and we no longer care about them ... - super.dispose(); - this._decorations.dispose(); - this._lines.dispose(); - this.invalidateMinimapColorCache(); - this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, null, 1 /* NeverGrowsWhenTypingAtEdges */); - this._eventDispatcher.dispose(); - } - addViewEventHandler(eventHandler) { - this._eventDispatcher.addViewEventHandler(eventHandler); - } - removeViewEventHandler(eventHandler) { - this._eventDispatcher.removeViewEventHandler(eventHandler); - } - _updateConfigurationViewLineCountNow() { - this._configuration.setViewLineCount(this._lines.getViewLineCount()); - } - tokenizeViewport() { - const linesViewportData = this.viewLayout.getLinesViewportData(); - const startPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](linesViewportData.startLineNumber, 1)); - const endPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](linesViewportData.endLineNumber, 1)); - this.model.tokenizeViewport(startPosition.lineNumber, endPosition.lineNumber); - } - setHasFocus(hasFocus) { - this._hasFocus = hasFocus; - this._cursor.setHasFocus(hasFocus); - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewFocusChangedEvent"](hasFocus)); - this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__["FocusChangedEvent"](!hasFocus, hasFocus)); - } - onDidColorThemeChange() { - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewThemeChangedEvent"]()); - } - _onConfigurationChanged(eventsCollector, e) { - // We might need to restore the current centered view range, so save it (if available) - let previousViewportStartModelPosition = null; - if (this._viewportStartLine !== -1) { - let previousViewportStartViewPosition = new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](this._viewportStartLine, this.getLineMinColumn(this._viewportStartLine)); - previousViewportStartModelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(previousViewportStartViewPosition); - } - let restorePreviousViewportStart = false; - const options = this._configuration.options; - const fontInfo = options.get(36 /* fontInfo */); - const wrappingStrategy = options.get(112 /* wrappingStrategy */); - const wrappingInfo = options.get(118 /* wrappingInfo */); - const wrappingIndent = options.get(111 /* wrappingIndent */); - if (this._lines.setWrappingSettings(fontInfo, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent)) { - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewFlushedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewLineMappingChangedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](null)); - this._cursor.onLineMappingChanged(eventsCollector); - this._decorations.onLineMappingChanged(); - this.viewLayout.onFlushed(this.getLineCount()); - if (this.viewLayout.getCurrentScrollTop() !== 0) { - // Never change the scroll position from 0 to something else... - restorePreviousViewportStart = true; - } - this._updateConfigurationViewLineCount.schedule(); - } - if (e.hasChanged(72 /* readOnly */)) { - // Must read again all decorations due to readOnly filtering - this._decorations.reset(); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](null)); - } - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewConfigurationChangedEvent"](e)); - this.viewLayout.onConfigurationChanged(e); - if (restorePreviousViewportStart && previousViewportStartModelPosition) { - const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(previousViewportStartModelPosition); - const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber); - this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */); - } - if (_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"].shouldRecreate(e)) { - this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"](this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration); - this._cursor.updateConfiguration(this.cursorConfig); - } - } - _registerModelEvents() { - this._register(this.model.onDidChangeRawContentFast((e) => { - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - let hadOtherModelChange = false; - let hadModelLineChangeThatChangedLineMapping = false; - const changes = e.changes; - const versionId = e.versionId; - // Do a first pass to compute line mappings, and a second pass to actually interpret them - const lineBreaksComputer = this._lines.createLineBreaksComputer(); - for (const change of changes) { - switch (change.changeType) { - case 4 /* LinesInserted */: { - for (const line of change.detail) { - lineBreaksComputer.addRequest(line, null); - } - break; - } - case 2 /* LineChanged */: { - lineBreaksComputer.addRequest(change.detail, null); - break; - } - } - } - const lineBreaks = lineBreaksComputer.finalize(); - let lineBreaksOffset = 0; - for (const change of changes) { - switch (change.changeType) { - case 1 /* Flush */: { - this._lines.onModelFlushed(); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewFlushedEvent"]()); - this._decorations.reset(); - this.viewLayout.onFlushed(this.getLineCount()); - hadOtherModelChange = true; - break; - } - case 3 /* LinesDeleted */: { - const linesDeletedEvent = this._lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber); - if (linesDeletedEvent !== null) { - eventsCollector.emitViewEvent(linesDeletedEvent); - this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); - } - hadOtherModelChange = true; - break; - } - case 4 /* LinesInserted */: { - const insertedLineBreaks = lineBreaks.slice(lineBreaksOffset, lineBreaksOffset + change.detail.length); - lineBreaksOffset += change.detail.length; - const linesInsertedEvent = this._lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, insertedLineBreaks); - if (linesInsertedEvent !== null) { - eventsCollector.emitViewEvent(linesInsertedEvent); - this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); - } - hadOtherModelChange = true; - break; - } - case 2 /* LineChanged */: { - const changedLineBreakData = lineBreaks[lineBreaksOffset]; - lineBreaksOffset++; - const [lineMappingChanged, linesChangedEvent, linesInsertedEvent, linesDeletedEvent] = this._lines.onModelLineChanged(versionId, change.lineNumber, changedLineBreakData); - hadModelLineChangeThatChangedLineMapping = lineMappingChanged; - if (linesChangedEvent) { - eventsCollector.emitViewEvent(linesChangedEvent); - } - if (linesInsertedEvent) { - eventsCollector.emitViewEvent(linesInsertedEvent); - this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); - } - if (linesDeletedEvent) { - eventsCollector.emitViewEvent(linesDeletedEvent); - this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); - } - break; - } - case 5 /* EOLChanged */: { - // Nothing to do. The new version will be accepted below - break; - } - } - } - this._lines.acceptVersionId(versionId); - this.viewLayout.onHeightMaybeChanged(); - if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) { - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewLineMappingChangedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](null)); - this._cursor.onLineMappingChanged(eventsCollector); - this._decorations.onLineMappingChanged(); - } - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - // Update the configuration and reset the centered view line - this._viewportStartLine = -1; - this._configuration.setMaxLineNumber(this.model.getLineCount()); - this._updateConfigurationViewLineCountNow(); - // Recover viewport - if (!this._hasFocus && this.model.getAttachedEditorCount() >= 2 && this._viewportStartLineTrackedRange) { - const modelRange = this.model._getTrackedRange(this._viewportStartLineTrackedRange); - if (modelRange) { - const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelRange.getStartPosition()); - const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber); - this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */); - } - } - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - this._cursor.onModelContentChanged(eventsCollector, e); - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - })); - this._register(this.model.onDidChangeTokens((e) => { - let viewRanges = []; - for (let j = 0, lenJ = e.ranges.length; j < lenJ; j++) { - const modelRange = e.ranges[j]; - const viewStartLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](modelRange.fromLineNumber, 1)).lineNumber; - const viewEndLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](modelRange.toLineNumber, this.model.getLineMaxColumn(modelRange.toLineNumber))).lineNumber; - viewRanges[j] = { - fromLineNumber: viewStartLineNumber, - toLineNumber: viewEndLineNumber - }; - } - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewTokensChangedEvent"](viewRanges)); - if (e.tokenizationSupportChanged) { - this._tokenizeViewportSoon.schedule(); - } - })); - this._register(this.model.onDidChangeLanguageConfiguration((e) => { - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewLanguageConfigurationEvent"]()); - this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"](this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration); - this._cursor.updateConfiguration(this.cursorConfig); - })); - this._register(this.model.onDidChangeLanguage((e) => { - this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"](this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration); - this._cursor.updateConfiguration(this.cursorConfig); - })); - this._register(this.model.onDidChangeOptions((e) => { - // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here - if (this._lines.setTabSize(this.model.getOptions().tabSize)) { - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewFlushedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewLineMappingChangedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](null)); - this._cursor.onLineMappingChanged(eventsCollector); - this._decorations.onLineMappingChanged(); - this.viewLayout.onFlushed(this.getLineCount()); - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - this._updateConfigurationViewLineCount.schedule(); - } - this.cursorConfig = new _controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_17__["CursorConfiguration"](this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration); - this._cursor.updateConfiguration(this.cursorConfig); - })); - this._register(this.model.onDidChangeDecorations((e) => { - this._decorations.onModelDecorationsChanged(); - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](e)); - })); - } - setHiddenAreas(ranges) { - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - let lineMappingChanged = this._lines.setHiddenAreas(ranges); - if (lineMappingChanged) { - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewFlushedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewLineMappingChangedEvent"]()); - eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewDecorationsChangedEvent"](null)); - this._cursor.onLineMappingChanged(eventsCollector); - this._decorations.onLineMappingChanged(); - this.viewLayout.onFlushed(this.getLineCount()); - this.viewLayout.onHeightMaybeChanged(); - } - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - this._updateConfigurationViewLineCount.schedule(); - } - getVisibleRangesPlusViewportAboveBelow() { - const layoutInfo = this._configuration.options.get(117 /* layoutInfo */); - const lineHeight = this._configuration.options.get(51 /* lineHeight */); - const linesAround = Math.max(20, Math.round(layoutInfo.height / lineHeight)); - const partialData = this.viewLayout.getLinesViewportData(); - const startViewLineNumber = Math.max(1, partialData.completelyVisibleStartLineNumber - linesAround); - const endViewLineNumber = Math.min(this.getLineCount(), partialData.completelyVisibleEndLineNumber + linesAround); - return this._toModelVisibleRanges(new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber))); - } - getVisibleRanges() { - const visibleViewRange = this.getCompletelyVisibleViewRange(); - return this._toModelVisibleRanges(visibleViewRange); - } - _toModelVisibleRanges(visibleViewRange) { - const visibleRange = this.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange); - const hiddenAreas = this._lines.getHiddenAreas(); - if (hiddenAreas.length === 0) { - return [visibleRange]; - } - let result = [], resultLen = 0; - let startLineNumber = visibleRange.startLineNumber; - let startColumn = visibleRange.startColumn; - let endLineNumber = visibleRange.endLineNumber; - let endColumn = visibleRange.endColumn; - for (let i = 0, len = hiddenAreas.length; i < len; i++) { - const hiddenStartLineNumber = hiddenAreas[i].startLineNumber; - const hiddenEndLineNumber = hiddenAreas[i].endLineNumber; - if (hiddenEndLineNumber < startLineNumber) { - continue; - } - if (hiddenStartLineNumber > endLineNumber) { - continue; - } - if (startLineNumber < hiddenStartLineNumber) { - result[resultLen++] = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startLineNumber, startColumn, hiddenStartLineNumber - 1, this.model.getLineMaxColumn(hiddenStartLineNumber - 1)); - } - startLineNumber = hiddenEndLineNumber + 1; - startColumn = 1; - } - if (startLineNumber < endLineNumber || (startLineNumber === endLineNumber && startColumn < endColumn)) { - result[resultLen++] = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - } - return result; - } - getCompletelyVisibleViewRange() { - const partialData = this.viewLayout.getLinesViewportData(); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber)); - } - getCompletelyVisibleViewRangeAtScrollTop(scrollTop) { - const partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - return new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber)); - } - saveState() { - const compatViewState = this.viewLayout.saveState(); - const scrollTop = compatViewState.scrollTop; - const firstViewLineNumber = this.viewLayout.getLineNumberAtVerticalOffset(scrollTop); - const firstPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](firstViewLineNumber, this.getLineMinColumn(firstViewLineNumber))); - const firstPositionDeltaTop = this.viewLayout.getVerticalOffsetForLineNumber(firstViewLineNumber) - scrollTop; - return { - scrollLeft: compatViewState.scrollLeft, - firstPosition: firstPosition, - firstPositionDeltaTop: firstPositionDeltaTop - }; - } - reduceRestoreState(state) { - if (typeof state.firstPosition === 'undefined') { - // This is a view state serialized by an older version - return this._reduceRestoreStateCompatibility(state); - } - const modelPosition = this.model.validatePosition(state.firstPosition); - const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - const scrollTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber) - state.firstPositionDeltaTop; - return { - scrollLeft: state.scrollLeft, - scrollTop: scrollTop + switch (direction) { + case 'LR': + // (toBbox) + // +-------- + // + (fromBbox) + if (fromBbox.left - toBbox.left > config.nodeSpacing) { + var lineStart = { + x: fromBbox.left - config.nodeSpacing, + y: toBbox.top + toBbox.height / 2 }; - } - _reduceRestoreStateCompatibility(state) { - return { - scrollLeft: state.scrollLeft, - scrollTop: state.scrollTopWithoutViewZones + var lineEnd = { + x: toBbox.left + toBbox.width, + y: toBbox.top + toBbox.height / 2 }; - } - getTabSize() { - return this.model.getOptions().tabSize; - } - getTextModelOptions() { - return this.model.getOptions(); - } - getLineCount() { - return this._lines.getViewLineCount(); - } - /** - * Gives a hint that a lot of requests are about to come in for these line numbers. - */ - setViewport(startLineNumber, endLineNumber, centeredLineNumber) { - this._viewportStartLine = startLineNumber; - let position = this.coordinatesConverter.convertViewPositionToModelPosition(new _core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](startLineNumber, this.getLineMinColumn(startLineNumber))); - this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber, position.column, position.lineNumber, position.column), 1 /* NeverGrowsWhenTypingAtEdges */); - const viewportStartLineTop = this.viewLayout.getVerticalOffsetForLineNumber(startLineNumber); - const scrollTop = this.viewLayout.getCurrentScrollTop(); - this._viewportStartLineDelta = scrollTop - viewportStartLineTop; - } - getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber) { - return this._lines.getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber); - } - getLinesIndentGuides(startLineNumber, endLineNumber) { - return this._lines.getViewLinesIndentGuides(startLineNumber, endLineNumber); - } - getLineContent(lineNumber) { - return this._lines.getViewLineContent(lineNumber); - } - getLineLength(lineNumber) { - return this._lines.getViewLineLength(lineNumber); - } - getLineMinColumn(lineNumber) { - return this._lines.getViewLineMinColumn(lineNumber); - } - getLineMaxColumn(lineNumber) { - return this._lines.getViewLineMaxColumn(lineNumber); - } - getLineFirstNonWhitespaceColumn(lineNumber) { - const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["firstNonWhitespaceIndex"](this.getLineContent(lineNumber)); - if (result === -1) { - return 0; - } - return result + 1; - } - getLineLastNonWhitespaceColumn(lineNumber) { - const result = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["lastNonWhitespaceIndex"](this.getLineContent(lineNumber)); - if (result === -1) { - return 0; - } - return result + 2; - } - getDecorationsInViewport(visibleRange) { - return this._decorations.getDecorationsViewportData(visibleRange).decorations; - } - getViewLineRenderingData(visibleRange, lineNumber) { - let mightContainRTL = this.model.mightContainRTL(); - let mightContainNonBasicASCII = this.model.mightContainNonBasicASCII(); - let tabSize = this.getTabSize(); - let lineData = this._lines.getViewLineData(lineNumber); - let allInlineDecorations = this._decorations.getDecorationsViewportData(visibleRange).inlineDecorations; - let inlineDecorations = allInlineDecorations[lineNumber - visibleRange.startLineNumber]; - return new _viewModel_js__WEBPACK_IMPORTED_MODULE_12__["ViewLineRenderingData"](lineData.minColumn, lineData.maxColumn, lineData.content, lineData.continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, lineData.tokens, inlineDecorations, tabSize, lineData.startVisibleColumn); - } - getViewLineData(lineNumber) { - return this._lines.getViewLineData(lineNumber); - } - getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) { - let result = this._lines.getViewLinesData(startLineNumber, endLineNumber, needed); - return new _viewModel_js__WEBPACK_IMPORTED_MODULE_12__["MinimapLinesRenderingData"](this.getTabSize(), result); - } - getAllOverviewRulerDecorations(theme) { - return this._lines.getAllOverviewRulerDecorations(this._editorId, Object(_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__["filterValidationDecorations"])(this._configuration.options), theme); - } - invalidateOverviewRulerColorCache() { - const decorations = this.model.getOverviewRulerDecorations(); - for (const decoration of decorations) { - const opts = decoration.options.overviewRuler; - if (opts) { - opts.invalidateCachedColor(); - } - } - } - invalidateMinimapColorCache() { - const decorations = this.model.getAllDecorations(); - for (const decoration of decorations) { - const opts = decoration.options.minimap; - if (opts) { - opts.invalidateCachedColor(); - } - } - } - getValueInRange(range, eol) { - const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range); - return this.model.getValueInRange(modelRange, eol); - } - getModelLineMaxColumn(modelLineNumber) { - return this.model.getLineMaxColumn(modelLineNumber); - } - validateModelPosition(position) { - return this.model.validatePosition(position); - } - validateModelRange(range) { - return this.model.validateRange(range); - } - deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt) { - const modelAnchor = this.coordinatesConverter.convertViewPositionToModelPosition(viewAnchorPosition); - if (this.model.getEOL().length === 2) { - // This model uses CRLF, so the delta must take that into account - if (deltaOffset < 0) { - deltaOffset -= lineFeedCnt; - } - else { - deltaOffset += lineFeedCnt; - } - } - const modelAnchorOffset = this.model.getOffsetAt(modelAnchor); - const resultOffset = modelAnchorOffset + deltaOffset; - return this.model.getPositionAt(resultOffset); - } - getEOL() { - return this.model.getEOL(); - } - getPlainTextToCopy(modelRanges, emptySelectionClipboard, forceCRLF) { - const newLineCharacter = forceCRLF ? '\r\n' : this.model.getEOL(); - modelRanges = modelRanges.slice(0); - modelRanges.sort(_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts); - let hasEmptyRange = false; - let hasNonEmptyRange = false; - for (const range of modelRanges) { - if (range.isEmpty()) { - hasEmptyRange = true; - } - else { - hasNonEmptyRange = true; - } - } - if (!hasNonEmptyRange) { - // all ranges are empty - if (!emptySelectionClipboard) { - return ''; - } - const modelLineNumbers = modelRanges.map((r) => r.startLineNumber); - let result = ''; - for (let i = 0; i < modelLineNumbers.length; i++) { - if (i > 0 && modelLineNumbers[i - 1] === modelLineNumbers[i]) { - continue; - } - result += this.model.getLineContent(modelLineNumbers[i]) + newLineCharacter; - } - return result; - } - if (hasEmptyRange && emptySelectionClipboard) { - // mixed empty selections and non-empty selections - let result = []; - let prevModelLineNumber = 0; - for (const modelRange of modelRanges) { - const modelLineNumber = modelRange.startLineNumber; - if (modelRange.isEmpty()) { - if (modelLineNumber !== prevModelLineNumber) { - result.push(this.model.getLineContent(modelLineNumber)); - } - } - else { - result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */)); - } - prevModelLineNumber = modelLineNumber; - } - return result.length === 1 ? result[0] : result; - } - let result = []; - for (const modelRange of modelRanges) { - if (!modelRange.isEmpty()) { - result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */)); - } - } - return result.length === 1 ? result[0] : result; - } - getRichTextToCopy(modelRanges, emptySelectionClipboard) { - const languageId = this.model.getLanguageIdentifier(); - if (languageId.id === 1 /* PlainText */) { - return null; - } - if (modelRanges.length !== 1) { - // no multiple selection support at this time - return null; - } - let range = modelRanges[0]; - if (range.isEmpty()) { - if (!emptySelectionClipboard) { - // nothing to copy - return null; - } - const lineNumber = range.startLineNumber; - range = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](lineNumber, this.model.getLineMinColumn(lineNumber), lineNumber, this.model.getLineMaxColumn(lineNumber)); - } - const fontInfo = this._configuration.options.get(36 /* fontInfo */); - const colorMap = this._getColorMap(); - const fontFamily = fontInfo.fontFamily === _config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__["EDITOR_FONT_DEFAULTS"].fontFamily ? fontInfo.fontFamily : `'${fontInfo.fontFamily}', ${_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_3__["EDITOR_FONT_DEFAULTS"].fontFamily}`; - return { - mode: languageId.language, - html: (`
    ` - + this._getHTMLToCopy(range, colorMap) - + '
    ') + svgDrawLine(svg, [lineStart, lineEnd], color, 'linear'); + svgDrawLine(svg, [{ + x: fromBbox.left, + y: fromBbox.top + fromBbox.height / 2 + }, { + x: fromBbox.left - config.nodeSpacing / 2, + y: fromBbox.top + fromBbox.height / 2 + }, { + x: fromBbox.left - config.nodeSpacing / 2, + y: lineStart.y + }, lineStart], color); + } else { + svgDrawLine(svg, [{ + x: fromBbox.left, + y: fromBbox.top + fromBbox.height / 2 + }, { + x: fromBbox.left - config.nodeSpacing / 2, + y: fromBbox.top + fromBbox.height / 2 + }, { + x: fromBbox.left - config.nodeSpacing / 2, + y: toBbox.top + toBbox.height / 2 + }, { + x: toBbox.left + toBbox.width, + y: toBbox.top + toBbox.height / 2 + }], color); + } + + break; + + case 'BT': + // + (fromBbox) + // | + // | + // + (toBbox) + if (toBbox.top - fromBbox.top > config.nodeSpacing) { + var _lineStart = { + x: toBbox.left + toBbox.width / 2, + y: fromBbox.top + fromBbox.height + config.nodeSpacing }; - } - _getHTMLToCopy(modelRange, colorMap) { - const startLineNumber = modelRange.startLineNumber; - const startColumn = modelRange.startColumn; - const endLineNumber = modelRange.endLineNumber; - const endColumn = modelRange.endColumn; - const tabSize = this.getTabSize(); - let result = ''; - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - const lineTokens = this.model.getLineTokens(lineNumber); - const lineContent = lineTokens.getLineContent(); - const startOffset = (lineNumber === startLineNumber ? startColumn - 1 : 0); - const endOffset = (lineNumber === endLineNumber ? endColumn - 1 : lineContent.length); - if (lineContent === '') { - result += '
    '; - } - else { - result += Object(_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_7__["tokenizeLineToHTML"])(lineContent, lineTokens.inflate(), colorMap, startOffset, endOffset, tabSize, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_15__["isWindows"]); - } - } - return result; - } - _getColorMap() { - let colorMap = _modes_js__WEBPACK_IMPORTED_MODULE_6__["TokenizationRegistry"].getColorMap(); - let result = ['#000000']; - if (colorMap) { - for (let i = 1, len = colorMap.length; i < len; i++) { - result[i] = _base_common_color_js__WEBPACK_IMPORTED_MODULE_0__["Color"].Format.CSS.formatHex(colorMap[i]); - } - } - return result; - } - //#region model - pushStackElement() { - this.model.pushStackElement(); - } - //#endregion - //#region cursor operations - getPrimaryCursorState() { - return this._cursor.getPrimaryCursorState(); - } - getLastAddedCursorIndex() { - return this._cursor.getLastAddedCursorIndex(); - } - getCursorStates() { - return this._cursor.getCursorStates(); - } - setCursorStates(source, reason, states) { - this._withViewEventsCollector(eventsCollector => this._cursor.setStates(eventsCollector, source, reason, states)); - } - getCursorColumnSelectData() { - return this._cursor.getCursorColumnSelectData(); - } - setCursorColumnSelectData(columnSelectData) { - this._cursor.setCursorColumnSelectData(columnSelectData); - } - getPrevEditOperationType() { - return this._cursor.getPrevEditOperationType(); - } - setPrevEditOperationType(type) { - this._cursor.setPrevEditOperationType(type); - } - getSelection() { - return this._cursor.getSelection(); - } - getSelections() { - return this._cursor.getSelections(); - } - getPosition() { - return this._cursor.getPrimaryCursorState().modelState.position; - } - setSelections(source, selections) { - this._withViewEventsCollector(eventsCollector => this._cursor.setSelections(eventsCollector, source, selections)); - } - saveCursorState() { - return this._cursor.saveState(); - } - restoreCursorState(states) { - this._withViewEventsCollector(eventsCollector => this._cursor.restoreState(eventsCollector, states)); - } - _executeCursorEdit(callback) { - if (this._cursor.context.cursorConfig.readOnly) { - // we cannot edit when read only... - this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__["ReadOnlyEditAttemptEvent"]()); - return; - } - this._withViewEventsCollector(callback); - } - executeEdits(source, edits, cursorStateComputer) { - this._executeCursorEdit(eventsCollector => this._cursor.executeEdits(eventsCollector, source, edits, cursorStateComputer)); - } - startComposition() { - this._cursor.setIsDoingComposition(true); - this._executeCursorEdit(eventsCollector => this._cursor.startComposition(eventsCollector)); - } - endComposition(source) { - this._cursor.setIsDoingComposition(false); - this._executeCursorEdit(eventsCollector => this._cursor.endComposition(eventsCollector, source)); - } - type(text, source) { - this._executeCursorEdit(eventsCollector => this._cursor.type(eventsCollector, text, source)); - } - replacePreviousChar(text, replaceCharCnt, source) { - this._executeCursorEdit(eventsCollector => this._cursor.replacePreviousChar(eventsCollector, text, replaceCharCnt, source)); - } - paste(text, pasteOnNewLine, multicursorText, source) { - this._executeCursorEdit(eventsCollector => this._cursor.paste(eventsCollector, text, pasteOnNewLine, multicursorText, source)); - } - cut(source) { - this._executeCursorEdit(eventsCollector => this._cursor.cut(eventsCollector, source)); - } - executeCommand(command, source) { - this._executeCursorEdit(eventsCollector => this._cursor.executeCommand(eventsCollector, command, source)); - } - executeCommands(commands, source) { - this._executeCursorEdit(eventsCollector => this._cursor.executeCommands(eventsCollector, commands, source)); - } - revealPrimaryCursor(source, revealHorizontal) { - this._withViewEventsCollector(eventsCollector => this._cursor.revealPrimary(eventsCollector, source, revealHorizontal, 0 /* Smooth */)); - } - revealTopMostCursor(source) { - const viewPosition = this._cursor.getTopMostViewPosition(); - const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewRevealRangeRequestEvent"](source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */))); - } - revealBottomMostCursor(source) { - const viewPosition = this._cursor.getBottomMostViewPosition(); - const viewRange = new _core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewRevealRangeRequestEvent"](source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */))); - } - revealRange(source, revealHorizontal, viewRange, verticalType, scrollType) { - this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewRevealRangeRequestEvent"](source, viewRange, null, verticalType, revealHorizontal, scrollType))); - } - //#endregion - //#region viewLayout - getVerticalOffsetForLineNumber(viewLineNumber) { - return this.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); - } - getScrollTop() { - return this.viewLayout.getCurrentScrollTop(); - } - setScrollTop(newScrollTop, scrollType) { - this.viewLayout.setScrollPosition({ scrollTop: newScrollTop }, scrollType); - } - setScrollPosition(position, type) { - this.viewLayout.setScrollPosition(position, type); - } - deltaScrollNow(deltaScrollLeft, deltaScrollTop) { - this.viewLayout.deltaScrollNow(deltaScrollLeft, deltaScrollTop); - } - changeWhitespace(callback) { - const hadAChange = this.viewLayout.changeWhitespace(callback); - if (hadAChange) { - this._eventDispatcher.emitSingleViewEvent(new _view_viewEvents_js__WEBPACK_IMPORTED_MODULE_9__["ViewZonesChangedEvent"]()); - this._eventDispatcher.emitOutgoingEvent(new _viewModelEventDispatcher_js__WEBPACK_IMPORTED_MODULE_18__["ViewZonesChangedEvent"]()); - } - } - setMaxLineWidth(maxLineWidth) { - this.viewLayout.setMaxLineWidth(maxLineWidth); - } - //#endregion - _withViewEventsCollector(callback) { - try { - const eventsCollector = this._eventDispatcher.beginEmitViewEvents(); - callback(eventsCollector); - } - finally { - this._eventDispatcher.endEmitViewEvents(); - } - } + var _lineEnd = { + x: toBbox.left + toBbox.width / 2, + y: toBbox.top + }; + svgDrawLine(svg, [_lineStart, _lineEnd], color, 'linear'); + svgDrawLine(svg, [{ + x: fromBbox.left + fromBbox.width / 2, + y: fromBbox.top + fromBbox.height + }, { + x: fromBbox.left + fromBbox.width / 2, + y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2 + }, { + x: toBbox.left + toBbox.width / 2, + y: _lineStart.y - config.nodeSpacing / 2 + }, _lineStart], color); + } else { + svgDrawLine(svg, [{ + x: fromBbox.left + fromBbox.width / 2, + y: fromBbox.top + fromBbox.height + }, { + x: fromBbox.left + fromBbox.width / 2, + y: fromBbox.top + config.nodeSpacing / 2 + }, { + x: toBbox.left + toBbox.width / 2, + y: toBbox.top - config.nodeSpacing / 2 + }, { + x: toBbox.left + toBbox.width / 2, + y: toBbox.top + }], color); + } + + break; + } } +function cloneNode(svg, selector) { + return svg.select(selector).node().cloneNode(true); +} -/***/ }), +function renderCommitHistory(svg, commitid, branches, direction) { + var commit; + var numCommits = Object.keys(allCommitsDict).length; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (typeof commitid === 'string') { + do { + commit = allCommitsDict[commitid]; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('in renderCommitHistory', commit.id, commit.seq); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./anchorSelect.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css"); + if (svg.select('#node-' + commitid).size() > 0) { + return; + } - + svg.append(function () { + return cloneNode(svg, '#def-commit'); + }).attr('class', 'commit').attr('id', function () { + return 'node-' + commit.id; + }).attr('transform', function () { + switch (direction) { + case 'LR': + return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')'; -var options = {}; + case 'BT': + return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')'; + } + }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth); + var branch = void 0; -options.insert = "head"; -options.singleton = false; + for (var branchName in branches) { + if (branches[branchName].commit === commit) { + branch = branches[branchName]; + break; + } + } -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + if (branch) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('found branch ', branch.name); + svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', '); + } + svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id); + if (commit.message !== '' && direction === 'BT') { + svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message); + } -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_anchorSelect_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + commitid = commit.parent; + } while (commitid && allCommitsDict[commitid]); + } -/***/ }), + if (Array.isArray(commitid)) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('found merge commmit', commitid); + renderCommitHistory(svg, commitid[0], branches, direction); + branchNum++; + renderCommitHistory(svg, commitid[1], branches, direction); + branchNum--; + } +} -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js ***! - \***************************************************************************************/ -/*! exports provided: SelectionAnchorSet */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function renderLines(svg, commit, direction, branchColor) { + branchColor = branchColor || 0; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionAnchorSet", function() { return SelectionAnchorSet; }); -/* harmony import */ var _anchorSelect_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./anchorSelect.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + while (commit.seq > 0 && !commit.lineDrawn) { + if (typeof commit.parent === 'string') { + svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor); + commit.lineDrawn = true; + commit = allCommitsDict[commit.parent]; + } else if (Array.isArray(commit.parent)) { + svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor); + svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1); + renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1); + commit.lineDrawn = true; + commit = allCommitsDict[commit.parent[0]]; + } + } +} + +var draw = function draw(txt, id, ver) { + try { + var parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default.a.parser; + parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"]; + parser.yy.clear(); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('in gitgraph renderer', txt + '\n', 'id:', id, ver); // Parse the graph definition + + parser.parse(txt + '\n'); + config = Object.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getOptions()); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('effective options', config); + var direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getDirection(); + allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getCommits(); + var branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__["default"].getBranchesAsObjArray(); + + if (direction === 'BT') { + config.nodeLabel.x = branches.length * config.branchOffset; + config.nodeLabel.width = '100%'; + config.nodeLabel.y = -1 * 2 * config.nodeRadius; + } + + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); + svgCreateDefs(svg); + branchNum = 1; + + for (var branch in branches) { + var v = branches[branch]; + renderCommitHistory(svg, v.commit.id, branches, direction); + renderLines(svg, v.commit, direction); + branchNum++; + } + + svg.attr('height', function () { + if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing; + return (branches.length + 1) * config.branchOffset; }); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering gitgraph'); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e.message); + } }; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); +/***/ }), +/***/ "./src/diagrams/git/parser/gitGraph.jison": +/*!************************************************!*\ + !*** ./src/diagrams/git/parser/gitGraph.jison ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ +/* + Returns a Parser object of the following structure: + Parser: { + yy: {} + } + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, - -const SelectionAnchorSet = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["RawContextKey"]('selectionAnchorSet', false); -let SelectionAnchorController = class SelectionAnchorController { - constructor(editor, contextKeyService) { - this.editor = editor; - this.selectionAnchorSetContextKey = SelectionAnchorSet.bindTo(contextKeyService); - this.modelChangeListener = editor.onDidChangeModel(() => this.selectionAnchorSetContextKey.reset()); + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, } - static get(editor) { - return editor.getContribution(SelectionAnchorController.ID); + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"GG":4,":":5,"document":6,"EOF":7,"DIR":8,"options":9,"body":10,"OPT":11,"NL":12,"line":13,"statement":14,"COMMIT":15,"commit_arg":16,"BRANCH":17,"ID":18,"CHECKOUT":19,"MERGE":20,"RESET":21,"reset_arg":22,"STR":23,"HEAD":24,"reset_parents":25,"CARET":26,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"}, +productions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1: + return $$[$0-1]; +break; +case 2: +yy.setDirection($$[$0-3]); return $$[$0-1]; +break; +case 4: + yy.setOptions($$[$0-1]); this.$ = $$[$0] +break; +case 5: +$$[$0-1] +=$$[$0]; this.$=$$[$0-1] +break; +case 7: +this.$ = [] +break; +case 8: +$$[$0-1].push($$[$0]); this.$=$$[$0-1]; +break; +case 9: +this.$ =$$[$0-1] +break; +case 11: +yy.commit($$[$0]) +break; +case 12: +yy.branch($$[$0]) +break; +case 13: +yy.checkout($$[$0]) +break; +case 14: +yy.merge($$[$0]) +break; +case 15: +yy.reset($$[$0]) +break; +case 16: +this.$ = "" +break; +case 17: +this.$=$$[$0] +break; +case 18: +this.$ = $$[$0-1]+ ":" + $$[$0] +break; +case 19: +this.$ = $$[$0-1]+ ":" + yy.count; yy.count = 0 +break; +case 20: +yy.count = 0 +break; +case 21: + yy.count += 1 +break; +} +}, +table: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}], +defaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - setSelectionAnchor() { - if (this.editor.hasModel()) { - const position = this.editor.getPosition(); - const previousDecorations = this.decorationId ? [this.decorationId] : []; - const newDecorationId = this.editor.deltaDecorations(previousDecorations, [{ - range: _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__["Selection"].fromPositions(position, position), - options: { - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - hoverMessage: new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_7__["MarkdownString"]().appendText(Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('selectionAnchor', "Selection Anchor")), - className: 'selection-anchor' - } - }]); - this.decorationId = newDecorationId[0]; - this.selectionAnchorSetContextKey.set(!!this.decorationId); - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_8__["alert"])(Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('anchorSet', "Anchor set at {0}:{1}", position.lineNumber, position.column)); +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } } - goToSelectionAnchor() { - if (this.editor.hasModel() && this.decorationId) { - const anchorPosition = this.editor.getModel().getDecorationRange(this.decorationId); - if (anchorPosition) { - this.editor.setPosition(anchorPosition.getStartPosition()); + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; } + return token; } - } - selectFromAnchorToCursor() { - if (this.editor.hasModel() && this.decorationId) { - const start = this.editor.getModel().getDecorationRange(this.decorationId); - if (start) { - const end = this.editor.getPosition(); - this.editor.setSelection(_common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__["Selection"].fromPositions(start.getStartPosition(), end)); - this.cancelSelectionAnchor(); + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } + action = table[state] && table[state][symbol]; } - } - cancelSelectionAnchor() { - if (this.decorationId) { - this.editor.deltaDecorations([this.decorationId], []); - this.decorationId = undefined; - this.selectionAnchorSetContextKey.set(false); + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); } - } - dispose() { - this.cancelSelectionAnchor(); - this.modelChangeListener.dispose(); - } -}; -SelectionAnchorController.ID = 'editor.contrib.selectionAnchorController'; -SelectionAnchorController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["IContextKeyService"]) -], SelectionAnchorController); -class SetSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.setSelectionAnchor', - label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('setSelectionAnchor', "Set Selection Anchor"), - alias: 'Set Selection Anchor', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 32 /* KEY_B */), - weight: 100 /* EditorContrib */ + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; } - }); - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - const controller = SelectionAnchorController.get(editor); - controller.setSelectionAnchor(); - }); - } -} -class GoToSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.goToSelectionAnchor', - label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('goToSelectionAnchor', "Go to Selection Anchor"), - alias: 'Go to Selection Anchor', - precondition: SelectionAnchorSet, - }); - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - const controller = SelectionAnchorController.get(editor); - controller.goToSelectionAnchor(); - }); - } -} -class SelectFromAnchorToCursor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.selectFromAnchorToCursor', - label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('selectFromAnchorToCursor', "Select from Anchor to Cursor"), - alias: 'Select from Anchor to Cursor', - precondition: SelectionAnchorSet, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 41 /* KEY_K */), - weight: 100 /* EditorContrib */ + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; } - }); - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - const controller = SelectionAnchorController.get(editor); - controller.selectFromAnchorToCursor(); - }); - } -} -class CancelSelectionAnchor extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.cancelSelectionAnchor', - label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('cancelSelectionAnchor', "Cancel Selection Anchor"), - alias: 'Cancel Selection Anchor', - precondition: SelectionAnchorSet, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 9 /* Escape */, - weight: 100 /* EditorContrib */ + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } - }); - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - const controller = SelectionAnchorController.get(editor); - controller.cancelSelectionAnchor(); - }); + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorContribution"])(SelectionAnchorController.ID, SelectionAnchorController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(SetSelectionAnchor); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(GoToSelectionAnchor); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(SelectFromAnchorToCursor); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(CancelSelectionAnchor); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./bracketMatching.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ +EOF:1, -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_bracketMatching_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, -/***/ }), +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js ***! - \*********************************************************************************************/ -/*! exports provided: BracketMatchingController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BracketMatchingController", function() { return BracketMatchingController; }); -/* harmony import */ var _bracketMatching_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bracketMatching.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; -const overviewRulerBracketMatchForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_12__["registerColor"])('editorOverviewRuler.bracketMatchForeground', { dark: '#A0A0A0', light: '#A0A0A0', hc: '#A0A0A0' }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('overviewRulerBracketMatchForeground', 'Overview ruler marker color for matching brackets.')); -class JumpToBracketAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.jumpToBracket', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('smartSelect.jumpBracket', "Go to Bracket"), - alias: 'Go to Bracket', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 88 /* US_BACKSLASH */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - let controller = BracketMatchingController.get(editor); - if (!controller) { - return; - } - controller.jumpToBracket(); - } -} -class SelectToBracketAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.selectToBracket', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('smartSelect.selectToBracket', "Select to Bracket"), - alias: 'Select to Bracket', - precondition: undefined, - description: { - description: `Select to Bracket`, - args: [{ - name: 'args', - schema: { - type: 'object', - properties: { - 'selectBrackets': { - type: 'boolean', - default: true - } - }, - } - }] + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); } - }); - } - run(accessor, editor, args) { - const controller = BracketMatchingController.get(editor); - if (!controller) { - return; } - let selectBrackets = true; - if (args && args.selectBrackets === false) { - selectBrackets = false; + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; } - controller.selectToBracket(selectBrackets); - } -} -class BracketsData { - constructor(position, brackets, options) { - this.position = position; - this.brackets = brackets; - this.options = options; - } -} -class BracketMatchingController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor) { - super(); - this._editor = editor; - this._lastBracketsData = []; - this._lastVersionId = 0; - this._decorations = []; - this._updateBracketsSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["RunOnceScheduler"](() => this._updateBrackets(), 50)); - this._matchBrackets = this._editor.getOption(55 /* matchBrackets */); - this._updateBracketsSoon.schedule(); - this._register(editor.onDidChangeCursorPosition((e) => { - if (this._matchBrackets === 'never') { - // Early exit if nothing needs to be done! - // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) - return; - } - this._updateBracketsSoon.schedule(); - })); - this._register(editor.onDidChangeModelContent((e) => { - this._updateBracketsSoon.schedule(); - })); - this._register(editor.onDidChangeModel((e) => { - this._lastBracketsData = []; - this._decorations = []; - this._updateBracketsSoon.schedule(); - })); - this._register(editor.onDidChangeModelLanguageConfiguration((e) => { - this._lastBracketsData = []; - this._updateBracketsSoon.schedule(); - })); - this._register(editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(55 /* matchBrackets */)) { - this._matchBrackets = this._editor.getOption(55 /* matchBrackets */); - this._decorations = this._editor.deltaDecorations(this._decorations, []); - this._lastBracketsData = []; - this._lastVersionId = 0; - this._updateBracketsSoon.schedule(); - } - })); - } - static get(editor) { - return editor.getContribution(BracketMatchingController.ID); - } - jumpToBracket() { - if (!this._editor.hasModel()) { - return; + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; } - const model = this._editor.getModel(); - const newSelections = this._editor.getSelections().map(selection => { - const position = selection.getStartPosition(); - // find matching brackets if position is on a bracket - const brackets = model.matchBracket(position); - let newCursorPosition = null; - if (brackets) { - if (brackets[0].containsPosition(position)) { - newCursorPosition = brackets[1].getStartPosition(); - } - else if (brackets[1].containsPosition(position)) { - newCursorPosition = brackets[0].getStartPosition(); - } - } - else { - // find the enclosing brackets if the position isn't on a matching bracket - const enclosingBrackets = model.findEnclosingBrackets(position); - if (enclosingBrackets) { - newCursorPosition = enclosingBrackets[0].getStartPosition(); - } - else { - // no enclosing brackets, try the very first next bracket - const nextBracket = model.findNextBracket(position); - if (nextBracket && nextBracket.range) { - newCursorPosition = nextBracket.range.getStartPosition(); - } - } - } - if (newCursorPosition) { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column); - } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](position.lineNumber, position.column, position.lineNumber, position.column); - }); - this._editor.setSelections(newSelections); - this._editor.revealRange(newSelections[0]); - } - selectToBracket(selectBrackets) { - if (!this._editor.hasModel()) { - return; + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; } - const model = this._editor.getModel(); - const newSelections = []; - this._editor.getSelections().forEach(selection => { - const position = selection.getStartPosition(); - let brackets = model.matchBracket(position); - if (!brackets) { - brackets = model.findEnclosingBrackets(position); - if (!brackets) { - const nextBracket = model.findNextBracket(position); - if (nextBracket && nextBracket.range) { - brackets = model.matchBracket(nextBracket.range.getStartPosition()); - } - } - } - let selectFrom = null; - let selectTo = null; - if (brackets) { - brackets.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts); - const [open, close] = brackets; - selectFrom = selectBrackets ? open.getStartPosition() : open.getEndPosition(); - selectTo = selectBrackets ? close.getEndPosition() : close.getStartPosition(); - } - if (selectFrom && selectTo) { - newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](selectFrom.lineNumber, selectFrom.column, selectTo.lineNumber, selectTo.column)); + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; } - }); - if (newSelections.length > 0) { - this._editor.setSelections(newSelections); - this._editor.revealRange(newSelections[0]); + return false; // rule action called reject() implying the next rule should be tested instead. } - } - _updateBrackets() { - if (this._matchBrackets === 'never') { - return; + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; } - this._recomputeBrackets(); - let newDecorations = [], newDecorationsLen = 0; - for (const bracketData of this._lastBracketsData) { - let brackets = bracketData.brackets; - if (brackets) { - newDecorations[newDecorationsLen++] = { range: brackets[0], options: bracketData.options }; - newDecorations[newDecorationsLen++] = { range: brackets[1], options: bracketData.options }; - } + if (!this._input) { + this.done = true; } - this._decorations = this._editor.deltaDecorations(this._decorations, newDecorations); - } - _recomputeBrackets() { - if (!this._editor.hasModel()) { - // no model => no brackets! - this._lastBracketsData = []; - this._lastVersionId = 0; - return; + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; } - const selections = this._editor.getSelections(); - if (selections.length > 100) { - // no bracket matching for high numbers of selections - this._lastBracketsData = []; - this._lastVersionId = 0; - return; + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } } - const model = this._editor.getModel(); - const versionId = model.getVersionId(); - let previousData = []; - if (this._lastVersionId === versionId) { - // use the previous data only if the model is at the same version id - previousData = this._lastBracketsData; - } - let positions = [], positionsLen = 0; - for (let i = 0, len = selections.length; i < len; i++) { - let selection = selections[i]; - if (selection.isEmpty()) { - // will bracket match a cursor only if the selection is collapsed - positions[positionsLen++] = selection.getStartPosition(); + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - // sort positions for `previousData` cache hits - if (positions.length > 1) { - positions.sort(_common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"].compare); + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); } - let newData = [], newDataLen = 0; - let previousIndex = 0, previousLen = previousData.length; - for (let i = 0, len = positions.length; i < len; i++) { - let position = positions[i]; - while (previousIndex < previousLen && previousData[previousIndex].position.isBefore(position)) { - previousIndex++; - } - if (previousIndex < previousLen && previousData[previousIndex].position.equals(position)) { - newData[newDataLen++] = previousData[previousIndex]; - } - else { - let brackets = model.matchBracket(position); - let options = BracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER; - if (!brackets && this._matchBrackets === 'always') { - brackets = model.findEnclosingBrackets(position, 20 /* give at most 20ms to compute */); - options = BracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER; - } - newData[newDataLen++] = new BracketsData(position, brackets, options); - } + }, + +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); } - this._lastBracketsData = newData; - this._lastVersionId = versionId; - } -} -BracketMatchingController.ID = 'editor.contrib.bracketMatchingController'; -BracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'bracket-match', - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["themeColorFromId"])(overviewRulerBracketMatchForeground), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center - } -}); -BracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'bracket-match' -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(BracketMatchingController.ID, BracketMatchingController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(SelectToBracketAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(JumpToBracketAction); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["registerThemingParticipant"])((theme, collector) => { - const bracketMatchBackground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__["editorBracketMatchBackground"]); - if (bracketMatchBackground) { - collector.addRule(`.monaco-editor .bracket-match { background-color: ${bracketMatchBackground}; }`); - } - const bracketMatchBorder = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_11__["editorBracketMatchBorder"]); - if (bracketMatchBorder) { - collector.addRule(`.monaco-editor .bracket-match { border: 1px solid ${bracketMatchBorder}; }`); - } -}); -// Go to menu -_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__["MenuRegistry"].appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__["MenuId"].MenubarGoMenu, { - group: '5_infile_nav', - command: { - id: 'editor.action.jumpToBracket', - title: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]({ key: 'miGoToBracket', comment: ['&& denotes a mnemonic'] }, "Go to &&Bracket") }, - order: 2 -}); +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, -/***/ }), +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js ***! - \*********************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _moveCaretCommand_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./moveCaretCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0:return 12; +break; +case 1:/* skip all whitespace */ +break; +case 2:/* skip comments */ +break; +case 3:/* skip comments */ +break; +case 4:return 4; +break; +case 5:return 15; +break; +case 6:return 17; +break; +case 7:return 20; +break; +case 8:return 21; +break; +case 9:return 19; +break; +case 10:return 8; +break; +case 11:return 8; +break; +case 12:return 5; +break; +case 13:return 26 +break; +case 14:this.begin("options"); +break; +case 15:this.popState(); +break; +case 16:return 11; +break; +case 17:this.begin("string"); +break; +case 18:this.popState(); +break; +case 19:return 23; +break; +case 20:return 18; +break; +case 21:return 7; +break; +} +}, +rules: [/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i], +conditions: {"options":{"rules":[15,16],"inclusive":false},"string":{"rules":[18,19],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); -class MoveCaretAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor(left, opts) { - super(opts); - this.left = left; - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - let commands = []; - let selections = editor.getSelections(); - for (const selection of selections) { - commands.push(new _moveCaretCommand_js__WEBPACK_IMPORTED_MODULE_3__["MoveCaretCommand"](selection, this.left)); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -class MoveCaretLeftAction extends MoveCaretAction { - constructor() { - super(true, { - id: 'editor.action.moveCarretLeftAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('caret.moveLeft', "Move Selected Text Left"), - alias: 'Move Selected Text Left', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__["EditorContextKeys"].writable - }); +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -class MoveCaretRightAction extends MoveCaretAction { - constructor() { - super(false, { - id: 'editor.action.moveCarretRightAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('caret.moveRight', "Move Selected Text Right"), - alias: 'Move Selected Text Right', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_2__["EditorContextKeys"].writable - }); - } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(MoveCaretLeftAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(MoveCaretRightAction); - +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/moveCaretCommand.js ***! - \**********************************************************************************************/ -/*! exports provided: MoveCaretCommand */ +/***/ "./src/diagrams/git/styles.js": +/*!************************************!*\ + !*** ./src/diagrams/git/styles.js ***! + \************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveCaretCommand", function() { return MoveCaretCommand; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class MoveCaretCommand { - constructor(selection, isMovingLeft) { - this._selection = selection; - this._isMovingLeft = isMovingLeft; - } - getEditOperations(model, builder) { - if (this._selection.startLineNumber !== this._selection.endLineNumber || this._selection.isEmpty()) { - return; - } - const lineNumber = this._selection.startLineNumber; - const startColumn = this._selection.startColumn; - const endColumn = this._selection.endColumn; - if (this._isMovingLeft && startColumn === 1) { - return; - } - if (!this._isMovingLeft && endColumn === model.getLineMaxColumn(lineNumber)) { - return; - } - if (this._isMovingLeft) { - const rangeBefore = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](lineNumber, startColumn - 1, lineNumber, startColumn); - const charBefore = model.getValueInRange(rangeBefore); - builder.addEditOperation(rangeBefore, null); - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](lineNumber, endColumn, lineNumber, endColumn), charBefore); - } - else { - const rangeAfter = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](lineNumber, endColumn, lineNumber, endColumn + 1); - const charAfter = model.getValueInRange(rangeAfter); - builder.addEditOperation(rangeAfter, null); - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](lineNumber, startColumn, lineNumber, startColumn), charAfter); - } - } - computeCursorState(model, helper) { - if (this._isMovingLeft) { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._selection.startLineNumber, this._selection.startColumn - 1, this._selection.endLineNumber, this._selection.endColumn - 1); - } - else { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._selection.startLineNumber, this._selection.startColumn + 1, this._selection.endLineNumber, this._selection.endColumn + 1); - } - } -} +var getStyles = function getStyles() { + return "\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"; +}; +/* harmony default export */ __webpack_exports__["default"] = (getStyles); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js ***! - \***************************************************************************************/ -/*! no exports provided */ +/***/ "./src/diagrams/info/infoDb.js": +/*!*************************************!*\ + !*** ./src/diagrams/info/infoDb.js ***! + \*************************************/ +/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorMoveOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveOperations.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/** + * Created by knut on 15-01-14. + */ +var message = ''; +var info = false; +var setMessage = function setMessage(txt) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Setting message to: ' + txt); + message = txt; +}; +var getMessage = function getMessage() { + return message; +}; +var setInfo = function setInfo(inf) { + info = inf; +}; +var getInfo = function getInfo() { + return info; +}; // export const parseError = (err, hash) => { +// global.mermaidAPI.parseError(err, hash) +// } -class TransposeLettersAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.transposeLetters', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('transposeLetters.label', "Transpose Letters"), - alias: 'Transpose Letters', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { - primary: 256 /* WinCtrl */ | 50 /* KEY_T */ - }, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - let model = editor.getModel(); - let commands = []; - let selections = editor.getSelections(); - for (let selection of selections) { - if (!selection.isEmpty()) { - continue; - } - let lineNumber = selection.startLineNumber; - let column = selection.startColumn; - let lastColumn = model.getLineMaxColumn(lineNumber); - if (lineNumber === 1 && (column === 1 || (column === 2 && lastColumn === 2))) { - // at beginning of file, nothing to do - continue; - } - // handle special case: when at end of line, transpose left two chars - // otherwise, transpose left and right chars - let endPosition = (column === lastColumn) ? - selection.getPosition() : - _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__["MoveOperations"].rightPosition(model, selection.getPosition().lineNumber, selection.getPosition().column); - let middlePosition = _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__["MoveOperations"].leftPosition(model, endPosition.lineNumber, endPosition.column); - let beginPosition = _common_controller_cursorMoveOperations_js__WEBPACK_IMPORTED_MODULE_5__["MoveOperations"].leftPosition(model, middlePosition.lineNumber, middlePosition.column); - let leftChar = model.getValueInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].fromPositions(beginPosition, middlePosition)); - let rightChar = model.getValueInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].fromPositions(middlePosition, endPosition)); - let replaceRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].fromPositions(beginPosition, endPosition); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](replaceRange, rightChar + leftChar)); - } - if (commands.length > 0) { - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(TransposeLettersAction); +/* harmony default export */ __webpack_exports__["default"] = ({ + setMessage: setMessage, + getMessage: getMessage, + setInfo: setInfo, + getInfo: getInfo // parseError +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js ***! - \*********************************************************************************/ -/*! exports provided: CutAction, CopyAction, PasteAction */ +/***/ "./src/diagrams/info/infoRenderer.js": +/*!*******************************************!*\ + !*** ./src/diagrams/info/infoRenderer.js ***! + \*******************************************/ +/*! exports provided: setConf, draw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CutAction", function() { return CutAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CopyAction", function() { return CopyAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PasteAction", function() { return PasteAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/controller/textAreaInput.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js"); +/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info */ "./src/diagrams/info/parser/info.jison"); +/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/** + * Created by knut on 14-12-11. + */ -const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste'; -const supportsCut = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"] || document.queryCommandSupported('cut')); -const supportsCopy = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"] || document.queryCommandSupported('copy')); -// IE and Edge have trouble with setting html content in clipboard -const supportsCopyWithSyntaxHighlighting = (supportsCopy && !_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__["isEdge"]); -// Firefox only supports navigator.clipboard.readText() in browser extensions. -// See https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#Browser_compatibility -const supportsPaste = (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__["isFirefox"] ? document.queryCommandSupported('paste') : true); -function registerCommand(command) { - command.register(); - return command; -} -const CutAction = supportsCut ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["MultiCommand"]({ - id: 'editor.action.clipboardCutAction', - precondition: undefined, - kbOpts: ( - // Do not bind cut keybindings in the browser, - // since browsers do that for us and it avoids security prompts - _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"] ? { - primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */, - win: { primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */, secondary: [1024 /* Shift */ | 20 /* Delete */] }, - weight: 100 /* EditorContrib */ - } : undefined), - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarEditMenu, - group: '2_ccp', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miCut', comment: ['&& denotes a mnemonic'] }, "Cu&&t"), - order: 1 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].EditorContext, - group: CLIPBOARD_CONTEXT_MENU_GROUP, - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.cutLabel', "Cut"), - when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].writable, - order: 1, - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.cutLabel', "Cut"), - order: 1 - }] -})) : undefined; -const CopyAction = supportsCopy ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["MultiCommand"]({ - id: 'editor.action.clipboardCopyAction', - precondition: undefined, - kbOpts: ( - // Do not bind copy keybindings in the browser, - // since browsers do that for us and it avoids security prompts - _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"] ? { - primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */, - win: { primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */, secondary: [2048 /* CtrlCmd */ | 19 /* Insert */] }, - weight: 100 /* EditorContrib */ - } : undefined), - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarEditMenu, - group: '2_ccp', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miCopy', comment: ['&& denotes a mnemonic'] }, "&&Copy"), - order: 2 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].EditorContext, - group: CLIPBOARD_CONTEXT_MENU_GROUP, - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.copyLabel', "Copy"), - order: 2, - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.copyLabel', "Copy"), - order: 1 - }] -})) : undefined; -const PasteAction = supportsPaste ? registerCommand(new _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["MultiCommand"]({ - id: 'editor.action.clipboardPasteAction', - precondition: undefined, - kbOpts: ( - // Do not bind paste keybindings in the browser, - // since browsers do that for us and it avoids security prompts - _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isNative"] ? { - primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, - win: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] }, - linux: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] }, - weight: 100 /* EditorContrib */ - } : undefined), - menuOpts: [{ - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].MenubarEditMenu, - group: '2_ccp', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miPaste', comment: ['&& denotes a mnemonic'] }, "&&Paste"), - order: 3 - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].EditorContext, - group: CLIPBOARD_CONTEXT_MENU_GROUP, - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.pasteLabel', "Paste"), - when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].writable, - order: 3, - }, { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_7__["MenuId"].CommandPalette, - group: '', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.pasteLabel', "Paste"), - order: 1 - }] -})) : undefined; -class ExecCommandCopyWithSyntaxHighlightingAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('actions.clipboard.copyWithSyntaxHighlightingLabel', "Copy With Syntax Highlighting"), - alias: 'Copy With Syntax Highlighting', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].textInputFocus, - primary: 0, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const emptySelectionClipboard = editor.getOption(26 /* emptySelectionClipboard */); - if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { - return; - } - _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__["CopyOptions"].forceCopyWithSyntaxHighlighting = true; - editor.focus(); - document.execCommand('copy'); - _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__["CopyOptions"].forceCopyWithSyntaxHighlighting = false; - } -} -function registerExecCommandImpl(target, browserCommand) { - if (!target) { - return; - } - // 1. handle case when focus is in editor. - target.addImplementation(10000, (accessor, args) => { - // Only if editor text focus (i.e. not if editor has widget focus). - const focusedEditor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__["ICodeEditorService"]).getFocusedCodeEditor(); - if (focusedEditor && focusedEditor.hasTextFocus()) { - // Do not execute if there is no selection and empty selection clipboard is off - const emptySelectionClipboard = focusedEditor.getOption(26 /* emptySelectionClipboard */); - const selection = focusedEditor.getSelection(); - if (selection && selection.isEmpty() && !emptySelectionClipboard) { - return true; - } - document.execCommand(browserCommand); - return true; - } - return false; - }); - // 2. (default) handle case when focus is somewhere else. - target.addImplementation(0, (accessor, args) => { - document.execCommand(browserCommand); - return true; - }); -} -registerExecCommandImpl(CutAction, 'cut'); -registerExecCommandImpl(CopyAction, 'copy'); -if (PasteAction) { - // 1. Paste: handle case when focus is in editor. - PasteAction.addImplementation(10000, (accessor, args) => { - const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__["ICodeEditorService"]); - const clipboardService = accessor.get(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_8__["IClipboardService"]); - // Only if editor text focus (i.e. not if editor has widget focus). - const focusedEditor = codeEditorService.getFocusedCodeEditor(); - if (focusedEditor && focusedEditor.hasTextFocus()) { - const result = document.execCommand('paste'); - // Use the clipboard service if document.execCommand('paste') was not successful - if (!result && _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWeb"]) { - (() => __awaiter(void 0, void 0, void 0, function* () { - const clipboardText = yield clipboardService.readText(); - if (clipboardText !== '') { - const metadata = _browser_controller_textAreaInput_js__WEBPACK_IMPORTED_MODULE_3__["InMemoryClipboardMetadataManager"].INSTANCE.get(clipboardText); - let pasteOnNewLine = false; - let multicursorText = null; - let mode = null; - if (metadata) { - pasteOnNewLine = (focusedEditor.getOption(26 /* emptySelectionClipboard */) && !!metadata.isFromEmptySelection); - multicursorText = (typeof metadata.multicursorText !== 'undefined' ? metadata.multicursorText : null); - mode = metadata.mode; - } - focusedEditor.trigger('keyboard', "paste" /* Paste */, { - text: clipboardText, - pasteOnNewLine, - multicursorText, - mode - }); - } - }))(); - return true; - } - return true; - } - return false; - }); - // 2. Paste: (default) handle case when focus is somewhere else. - PasteAction.addImplementation(0, (accessor, args) => { - document.execCommand('paste'); - return true; - }); -} -if (supportsCopyWithSyntaxHighlighting) { - Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(ExecCommandCopyWithSyntaxHighlightingAction); -} +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); + keys.forEach(function (key) { + conf[key] = cnf[key]; + }); +}; +/** + * Draws a an info picture in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ +var draw = function draw(txt, id, ver) { + try { + var parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser; + parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"]; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Renering info diagram\n' + txt); // Parse the graph definition -/***/ }), + parser.parse(txt); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js ***! - \***********************************************************************************/ -/*! exports provided: codeActionCommandId, refactorCommandId, sourceActionCommandId, organizeImportsCommandId, fixAllCommandId, getCodeActions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "codeActionCommandId", function() { return codeActionCommandId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refactorCommandId", function() { return refactorCommandId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sourceActionCommandId", function() { return sourceActionCommandId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "organizeImportsCommandId", function() { return organizeImportsCommandId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixAllCommandId", function() { return fixAllCommandId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCodeActions", function() { return getCodeActions; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./types.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); + var g = svg.append('g'); + g.append('text') // text label for the x axis + .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver); + svg.attr('height', 100); + svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150'); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering info diagram'); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e.message); + } }; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); +/***/ }), +/***/ "./src/diagrams/info/parser/info.jison": +/*!*********************************************!*\ + !*** ./src/diagrams/info/parser/info.jison ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ +/* + Returns a Parser object of the following structure: + Parser: { + yy: {} + } + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"info":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"showInfo":10,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"}, +productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ -const codeActionCommandId = 'editor.action.codeAction'; -const refactorCommandId = 'editor.action.refactor'; -const sourceActionCommandId = 'editor.action.sourceAction'; -const organizeImportsCommandId = 'editor.action.organizeImports'; -const fixAllCommandId = 'editor.action.fixAll'; -class ManagedCodeActionSet extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(actions, documentation, disposables) { - super(); - this.documentation = documentation; - this._register(disposables); - this.allActions = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["mergeSort"])([...actions], ManagedCodeActionSet.codeActionsComparator); - this.validActions = this.allActions.filter(action => !action.disabled); +var $0 = $$.length - 1; +switch (yystate) { +case 1: + return yy; +break; +case 4: + +break; +case 6: + yy.setInfo(true); +break; +} +}, +table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])], +defaultActions: {4:[2,1]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - static codeActionsComparator(a, b) { - if (a.isPreferred && !b.isPreferred) { - return -1; - } - else if (!a.isPreferred && b.isPreferred) { - return 1; - } - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"])(a.diagnostics)) { - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"])(b.diagnostics)) { - return a.diagnostics[0].message.localeCompare(b.diagnostics[0].message); - } - else { - return -1; - } - } - else if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"])(b.diagnostics)) { - return 1; - } - else { - return 0; // both have no diagnostics +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } } - get hasAutoFix() { - return this.validActions.some(fix => !!fix.kind && _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"].QuickFix.contains(new _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"](fix.kind)) && !!fix.isPreferred); + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; } -} -const emptyCodeActionsResponse = { actions: [], documentation: undefined }; -function getCodeActions(model, rangeOrSelection, trigger, progress, token) { - var _a; - const filter = trigger.filter || {}; - const codeActionContext = { - only: (_a = filter.include) === null || _a === void 0 ? void 0 : _a.value, - trigger: trigger.type, - }; - const cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["TextModelCancellationTokenSource"](model, token); - const providers = getCodeActionProviders(model, filter); - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - const promises = providers.map((provider) => __awaiter(this, void 0, void 0, function* () { - try { - progress.report(provider); - const providedCodeActions = yield provider.provideCodeActions(model, rangeOrSelection, codeActionContext, cts.token); - if (providedCodeActions) { - disposables.add(providedCodeActions); - } - if (cts.token.isCancellationRequested) { - return emptyCodeActionsResponse; + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; } - const filteredActions = ((providedCodeActions === null || providedCodeActions === void 0 ? void 0 : providedCodeActions.actions) || []).filter(action => action && Object(_types_js__WEBPACK_IMPORTED_MODULE_11__["filtersAction"])(filter, action)); - const documentation = getDocumentation(provider, filteredActions, filter.include); - return { actions: filteredActions, documentation }; + return token; } - catch (err) { - if (Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["isPromiseCanceledError"])(err)) { - throw err; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedExternalError"])(err); - return emptyCodeActionsResponse; - } - })); - const listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_9__["CodeActionProviderRegistry"].onDidChange(() => { - const newProviders = _common_modes_js__WEBPACK_IMPORTED_MODULE_9__["CodeActionProviderRegistry"].all(model); - if (!Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["equals"])(newProviders, providers)) { - cts.cancel(); - } - }); - return Promise.all(promises).then(actions => { - const allActions = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["flatten"])(actions.map(x => x.actions)); - const allDocumentation = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["coalesce"])(actions.map(x => x.documentation)); - return new ManagedCodeActionSet(allActions, allDocumentation, disposables); - }) - .finally(() => { - listener.dispose(); - cts.dispose(); - }); -} -function getCodeActionProviders(model, filter) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_9__["CodeActionProviderRegistry"].all(model) - // Don't include providers that we know will not return code actions of interest - .filter(provider => { - if (!provider.providedCodeActionKinds) { - // We don't know what type of actions this provider will return. - return true; + action = table[state] && table[state][symbol]; } - return provider.providedCodeActionKinds.some(kind => Object(_types_js__WEBPACK_IMPORTED_MODULE_11__["mayIncludeActionsOfKind"])(filter, new _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"](kind))); - }); -} -function getDocumentation(provider, providedCodeActions, only) { - if (!provider.documentation) { - return undefined; - } - const documentation = provider.documentation.map(entry => ({ kind: new _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"](entry.kind), command: entry.command })); - if (only) { - let currentBest; - for (const entry of documentation) { - if (entry.kind.contains(only)) { - if (!currentBest) { - currentBest = entry; - } - else { - // Take best match - if (currentBest.kind.contains(entry.kind)) { - currentBest = entry; - } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); } } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); } - if (currentBest) { - return currentBest === null || currentBest === void 0 ? void 0 : currentBest.command; - } - } - // Otherwise, check to see if any of the provided actions match. - for (const action of providedCodeActions) { - if (!action.kind) { - continue; + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); } - for (const entry of documentation) { - if (entry.kind.contains(new _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"](action.kind))) { - return entry.command; + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } } - return undefined; -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerLanguageCommand"])('_executeCodeActionProvider', function (accessor, args) { - return __awaiter(this, void 0, void 0, function* () { - const { resource, rangeOrSelection, kind } = args; - if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"])) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])(); - } - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_10__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])(); - } - const validatedRangeOrSelection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__["Selection"].isISelection(rangeOrSelection) - ? _common_core_selection_js__WEBPACK_IMPORTED_MODULE_8__["Selection"].liftSelection(rangeOrSelection) - : _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].isIRange(rangeOrSelection) - ? model.validateRange(rangeOrSelection) - : undefined; - if (!validatedRangeOrSelection) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])(); - } - const codeActionSet = yield getCodeActions(model, validatedRangeOrSelection, { type: 2 /* Manual */, filter: { includeSourceActions: true, include: kind && kind.value ? new _types_js__WEBPACK_IMPORTED_MODULE_11__["CodeActionKind"](kind.value) : undefined } }, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_12__["Progress"].None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None); - setTimeout(() => codeActionSet.dispose(), 100); - return codeActionSet.validActions; - }); -}); - + return true; +}}; -/***/ }), +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js ***! - \*******************************************************************************************/ -/*! exports provided: QuickFixController, applyCodeAction, QuickFixAction, CodeActionCommand, RefactorAction, SourceAction, OrganizeImportsAction, FixAllAction, AutoFixAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickFixController", function() { return QuickFixController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyCodeAction", function() { return applyCodeAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickFixAction", function() { return QuickFixAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionCommand", function() { return CodeActionCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RefactorAction", function() { return RefactorAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SourceAction", function() { return SourceAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OrganizeImportsAction", function() { return OrganizeImportsAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixAllAction", function() { return FixAllAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoFixAction", function() { return AutoFixAction; }); -/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lazy.js */ "./node_modules/monaco-editor/esm/vs/base/common/lazy.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./codeAction.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js"); -/* harmony import */ var _codeActionUi_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codeActionUi.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js"); -/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../message/messageController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _codeActionModel_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./codeActionModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./types.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +EOF:1, +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } -function contextKeyForSupportedActions(kind) { - return _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].regex(_codeActionModel_js__WEBPACK_IMPORTED_MODULE_17__["SUPPORTED_CODE_ACTIONS"].keys()[0], new RegExp('(\\s|^)' + Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escapeRegExpCharacters"])(kind.value) + '\\b')); -} -const argsSchema = { - type: 'object', - defaultSnippets: [{ body: { kind: '' } }], - properties: { - 'kind': { - type: 'string', - description: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.kind', "Kind of the code action to run."), - }, - 'apply': { - type: 'string', - description: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.apply', "Controls when the returned actions are applied."), - default: "ifSingle" /* IfSingle */, - enum: ["first" /* First */, "ifSingle" /* IfSingle */, "never" /* Never */], - enumDescriptions: [ - _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.apply.first', "Always apply the first returned code action."), - _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.apply.ifSingle', "Apply the first returned code action if it is the only one."), - _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.apply.never', "Do not apply the returned code actions."), - ] - }, - 'preferred': { - type: 'boolean', - default: false, - description: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('args.schema.preferred', "Controls if only preferred code actions should be returned."), + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; } - } -}; -let QuickFixController = class QuickFixController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editor, markerService, contextKeyService, progressService, _instantiationService) { - super(); - this._instantiationService = _instantiationService; - this._editor = editor; - this._model = this._register(new _codeActionModel_js__WEBPACK_IMPORTED_MODULE_17__["CodeActionModel"](this._editor, markerService, contextKeyService, progressService)); - this._register(this._model.onDidChangeState(newState => this.update(newState))); - this._ui = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_0__["Lazy"](() => this._register(new _codeActionUi_js__WEBPACK_IMPORTED_MODULE_7__["CodeActionUi"](editor, QuickFixAction.Id, AutoFixAction.Id, { - applyCodeAction: (action, retrigger) => __awaiter(this, void 0, void 0, function* () { - try { - yield this._applyCodeAction(action); - } - finally { - if (retrigger) { - this._trigger({ type: 1 /* Auto */, filter: {} }); - } - } - }) - }, this._instantiationService))); - } - static get(editor) { - return editor.getContribution(QuickFixController.ID); - } - update(newState) { - this._ui.getValue().update(newState); - } - showCodeActions(trigger, actions, at) { - return this._ui.getValue().showCodeActionList(trigger, actions, at, { includeDisabledActions: false }); - } - manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply) { - if (!this._editor.hasModel()) { - return; + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; } - _message_messageController_js__WEBPACK_IMPORTED_MODULE_8__["MessageController"].get(this._editor).closeMessage(); - const triggerPosition = this._editor.getPosition(); - this._trigger({ type: 2 /* Manual */, filter, autoApply, context: { notAvailableMessage, position: triggerPosition } }); - } - _trigger(trigger) { - return this._model.trigger(trigger); - } - _applyCodeAction(action) { - return this._instantiationService.invokeFunction(applyCodeAction, action, this._editor); - } -}; -QuickFixController.ID = 'editor.contrib.quickFixController'; -QuickFixController = __decorate([ - __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_13__["IMarkerService"]), - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["IContextKeyService"]), - __param(3, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_15__["IEditorProgressService"]), - __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__["IInstantiationService"]) -], QuickFixController); - -function applyCodeAction(accessor, action, editor) { - return __awaiter(this, void 0, void 0, function* () { - const bulkEditService = accessor.get(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_4__["IBulkEditService"]); - const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__["ICommandService"]); - const telemetryService = accessor.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_16__["ITelemetryService"]); - const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_14__["INotificationService"]); - telemetryService.publicLog2('codeAction.applyCodeAction', { - codeActionTitle: action.title, - codeActionKind: action.kind, - codeActionIsPreferred: !!action.isPreferred, - }); - if (action.edit) { - yield bulkEditService.apply(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_4__["ResourceEdit"].convert(action.edit), { editor, label: action.title }); + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; } - if (action.command) { - try { - yield commandService.executeCommand(action.command.id, ...(action.command.arguments || [])); - } - catch (err) { - const message = asMessage(err); - notificationService.error(typeof message === 'string' - ? message - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('applyCodeActionFailed', "An unknown error occurred while applying the code action")); + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; } + return false; // rule action called reject() implying the next rule should be tested instead. } - }); -} -function asMessage(err) { - if (typeof err === 'string') { - return err; - } - else if (err instanceof Error && typeof err.message === 'string') { - return err.message; - } - else { - return undefined; - } -} -function triggerCodeActionsForEditorSelection(editor, notAvailableMessage, filter, autoApply) { - if (editor.hasModel()) { - const controller = QuickFixController.get(editor); - if (controller) { - controller.manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply); + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; } - } -} -class QuickFixAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: QuickFixAction.Id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('quickfix.trigger.label', "Quick Fix..."), - alias: 'Quick Fix...', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hasCodeActionsProvider), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 84 /* US_DOT */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.quickFix.noneMessage', "No code actions available"), undefined, undefined); - } -} -QuickFixAction.Id = 'editor.action.quickFix'; -class CodeActionCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorCommand"] { - constructor() { - super({ - id: _codeAction_js__WEBPACK_IMPORTED_MODULE_6__["codeActionCommandId"], - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hasCodeActionsProvider), - description: { - description: 'Trigger a code action', - args: [{ name: 'args', schema: argsSchema, }] - } - }); - } - runEditorCommand(_accessor, editor, userArgs) { - const args = _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionCommandArgs"].fromUser(userArgs, { - kind: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Empty, - apply: "ifSingle" /* IfSingle */, - }); - return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string' - ? args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.codeAction.noneMessage.preferred.kind', "No preferred code actions for '{0}' available", userArgs.kind) - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.codeAction.noneMessage.kind', "No code actions for '{0}' available", userArgs.kind) - : args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.codeAction.noneMessage.preferred', "No preferred code actions available") - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.codeAction.noneMessage', "No code actions available"), { - include: args.kind, - includeSourceActions: true, - onlyIncludePreferredActions: args.preferred, - }, args.apply); - } -} -class RefactorAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: _codeAction_js__WEBPACK_IMPORTED_MODULE_6__["refactorCommandId"], - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('refactor.label', "Refactor..."), - alias: 'Refactor...', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hasCodeActionsProvider), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 48 /* KEY_R */, - mac: { - primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 48 /* KEY_R */ - }, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: '1_modification', - order: 2, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Refactor)), - }, - description: { - description: 'Refactor...', - args: [{ name: 'args', schema: argsSchema }] - } - }); - } - run(_accessor, editor, userArgs) { - const args = _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionCommandArgs"].fromUser(userArgs, { - kind: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Refactor, - apply: "never" /* Never */ - }); - return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string' - ? args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.refactor.noneMessage.preferred.kind', "No preferred refactorings for '{0}' available", userArgs.kind) - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.refactor.noneMessage.kind', "No refactorings for '{0}' available", userArgs.kind) - : args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.refactor.noneMessage.preferred', "No preferred refactorings available") - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.refactor.noneMessage', "No refactorings available"), { - include: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Refactor.contains(args.kind) ? args.kind : _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].None, - onlyIncludePreferredActions: args.preferred, - }, args.apply); - } -} -class SourceAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: _codeAction_js__WEBPACK_IMPORTED_MODULE_6__["sourceActionCommandId"], - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('source.label', "Source Action..."), - alias: 'Source Action...', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hasCodeActionsProvider), - contextMenuOpts: { - group: '1_modification', - order: 2.1, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Source)), - }, - description: { - description: 'Source Action...', - args: [{ name: 'args', schema: argsSchema }] + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } } - }); - } - run(_accessor, editor, userArgs) { - const args = _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionCommandArgs"].fromUser(userArgs, { - kind: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Source, - apply: "never" /* Never */ - }); - return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string' - ? args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.source.noneMessage.preferred.kind', "No preferred source actions for '{0}' available", userArgs.kind) - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.source.noneMessage.kind', "No source actions for '{0}' available", userArgs.kind) - : args.preferred - ? _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.source.noneMessage.preferred', "No preferred source actions available") - : _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.source.noneMessage', "No source actions available"), { - include: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].Source.contains(args.kind) ? args.kind : _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].None, - includeSourceActions: true, - onlyIncludePreferredActions: args.preferred, - }, args.apply); - } -} -class OrganizeImportsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: _codeAction_js__WEBPACK_IMPORTED_MODULE_6__["organizeImportsCommandId"], - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('organizeImports.label', "Organize Imports"), - alias: 'Organize Imports', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].SourceOrganizeImports)), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 45 /* KEY_O */, - weight: 100 /* EditorContrib */ - }, - }); - } - run(_accessor, editor) { - return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.organize.noneMessage', "No organize imports action available"), { include: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].SourceOrganizeImports, includeSourceActions: true }, "ifSingle" /* IfSingle */); - } -} -class FixAllAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: _codeAction_js__WEBPACK_IMPORTED_MODULE_6__["fixAllCommandId"], - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('fixAll.label', "Fix All"), - alias: 'Fix All', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].SourceFixAll)) - }); - } - run(_accessor, editor) { - return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('fixAll.noneMessage', "No fix all action available"), { include: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].SourceFixAll, includeSourceActions: true }, "ifSingle" /* IfSingle */); - } -} -class AutoFixAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: AutoFixAction.Id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('autoFix.label', "Auto Fix..."), - alias: 'Auto Fix...', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, contextKeyForSupportedActions(_types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].QuickFix)), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 1024 /* Shift */ | 84 /* US_DOT */, - mac: { - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 84 /* US_DOT */ - }, - weight: 100 /* EditorContrib */ + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; } - }); - } - run(_accessor, editor) { - return triggerCodeActionsForEditorSelection(editor, _nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"]('editor.action.autoFix.noneMessage', "No auto fixes available"), { - include: _types_js__WEBPACK_IMPORTED_MODULE_18__["CodeActionKind"].QuickFix, - onlyIncludePreferredActions: true - }, "ifSingle" /* IfSingle */); - } -} -AutoFixAction.Id = 'editor.action.autoFix'; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js ***! - \************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codeActionCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorContribution"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["QuickFixController"].ID, _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["QuickFixController"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["QuickFixAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["RefactorAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["SourceAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["OrganizeImportsAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["AutoFixAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["FixAllAction"]); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new _codeActionCommands_js__WEBPACK_IMPORTED_MODULE_1__["CodeActionCommand"]()); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js ***! - \***************************************************************************************/ -/*! exports provided: CodeActionMenu, CodeActionKeybindingResolver */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionMenu", function() { return CodeActionMenu; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKeybindingResolver", function() { return CodeActionKeybindingResolver; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lazy.js */ "./node_modules/monaco-editor/esm/vs/base/common/lazy.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codeAction.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./types.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { + // Pre-lexer code can go here +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0:return 4 ; +break; +case 1:return 9 ; +break; +case 2:return 'space'; +break; +case 3:return 10; +break; +case 4:return 6 ; +break; +case 5:return 'TXT' ; +break; +} +}, +rules: [/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i], +conditions: {"INITIAL":{"rules":[0,1,2,3,4,5],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); -class CodeActionAction extends _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__["Action"] { - constructor(action, callback) { - super(action.command ? action.command.id : action.title, action.title, undefined, !action.disabled, callback); - this.action = action; - } -} -let CodeActionMenu = class CodeActionMenu extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(_editor, _delegate, _contextMenuService, keybindingService) { - super(); - this._editor = _editor; - this._delegate = _delegate; - this._contextMenuService = _contextMenuService; - this._visible = false; - this._showingActions = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["MutableDisposable"]()); - this._keybindingResolver = new CodeActionKeybindingResolver({ - getKeybindings: () => keybindingService.getKeybindings() - }); - } - get isVisible() { - return this._visible; - } - show(trigger, codeActions, at, options) { - return __awaiter(this, void 0, void 0, function* () { - const actionsToShow = options.includeDisabledActions ? codeActions.allActions : codeActions.validActions; - if (!actionsToShow.length) { - this._visible = false; - return; - } - if (!this._editor.getDomNode()) { - // cancel when editor went off-dom - this._visible = false; - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["canceled"])(); - } - this._visible = true; - this._showingActions.value = codeActions; - const menuActions = this.getMenuActions(trigger, actionsToShow, codeActions.documentation); - const anchor = _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"].isIPosition(at) ? this._toCoords(at) : at || { x: 0, y: 0 }; - const resolver = this._keybindingResolver.getResolver(); - this._contextMenuService.showContextMenu({ - domForShadowRoot: this._editor.getDomNode(), - getAnchor: () => anchor, - getActions: () => menuActions, - onHide: () => { - this._visible = false; - this._editor.focus(); - }, - autoSelectFirstItem: true, - getKeyBinding: action => action instanceof CodeActionAction ? resolver(action.action) : undefined, - }); - }); - } - getMenuActions(trigger, actionsToShow, documentation) { - var _a, _b; - const toCodeActionAction = (action) => new CodeActionAction(action, () => this._delegate.onSelectCodeAction(action)); - const result = actionsToShow - .map(toCodeActionAction); - const allDocumentation = [...documentation]; - const model = this._editor.getModel(); - if (model && result.length) { - for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_6__["CodeActionProviderRegistry"].all(model)) { - if (provider._getAdditionalMenuItems) { - allDocumentation.push(...provider._getAdditionalMenuItems({ trigger: trigger.type, only: (_b = (_a = trigger.filter) === null || _a === void 0 ? void 0 : _a.include) === null || _b === void 0 ? void 0 : _b.value }, actionsToShow)); - } - } - } - if (allDocumentation.length) { - result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__["Separator"](), ...allDocumentation.map(command => toCodeActionAction({ - title: command.title, - command: command, - }))); - } - return result; - } - _toCoords(position) { - if (!this._editor.hasModel()) { - return { x: 0, y: 0 }; - } - this._editor.revealPosition(position, 1 /* Immediate */); - this._editor.render(); - // Translate to absolute editor position - const cursorCoords = this._editor.getScrolledVisiblePosition(position); - const editorCoords = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"])(this._editor.getDomNode()); - const x = editorCoords.left + cursorCoords.left; - const y = editorCoords.top + cursorCoords.top + cursorCoords.height; - return { x, y }; - } -}; -CodeActionMenu = __decorate([ - __param(2, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__["IContextMenuService"]), - __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]) -], CodeActionMenu); - -class CodeActionKeybindingResolver { - constructor(_keybindingProvider) { - this._keybindingProvider = _keybindingProvider; - } - getResolver() { - // Lazy since we may not actually ever read the value - const allCodeActionBindings = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_3__["Lazy"](() => this._keybindingProvider.getKeybindings() - .filter(item => CodeActionKeybindingResolver.codeActionCommands.indexOf(item.command) >= 0) - .filter(item => item.resolvedKeybinding) - .map((item) => { - // Special case these commands since they come built-in with VS Code and don't use 'commandArgs' - let commandArgs = item.commandArgs; - if (item.command === _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["organizeImportsCommandId"]) { - commandArgs = { kind: _types_js__WEBPACK_IMPORTED_MODULE_8__["CodeActionKind"].SourceOrganizeImports.value }; - } - else if (item.command === _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["fixAllCommandId"]) { - commandArgs = { kind: _types_js__WEBPACK_IMPORTED_MODULE_8__["CodeActionKind"].SourceFixAll.value }; - } - return Object.assign({ resolvedKeybinding: item.resolvedKeybinding }, _types_js__WEBPACK_IMPORTED_MODULE_8__["CodeActionCommandArgs"].fromUser(commandArgs, { - kind: _types_js__WEBPACK_IMPORTED_MODULE_8__["CodeActionKind"].None, - apply: "never" /* Never */ - })); - })); - return (action) => { - if (action.kind) { - const binding = this.bestKeybindingForCodeAction(action, allCodeActionBindings.getValue()); - return binding === null || binding === void 0 ? void 0 : binding.resolvedKeybinding; - } - return undefined; - }; - } - bestKeybindingForCodeAction(action, candidates) { - if (!action.kind) { - return undefined; - } - const kind = new _types_js__WEBPACK_IMPORTED_MODULE_8__["CodeActionKind"](action.kind); - return candidates - .filter(candidate => candidate.kind.contains(kind)) - .filter(candidate => { - if (candidate.preferred) { - // If the candidate keybinding only applies to preferred actions, the this action must also be preferred - return action.isPreferred; - } - return true; - }) - .reduceRight((currentBest, candidate) => { - if (!currentBest) { - return candidate; - } - // Select the more specific binding - return currentBest.kind.contains(candidate.kind) ? candidate : currentBest; - }, undefined); +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -CodeActionKeybindingResolver.codeActionCommands = [ - _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["refactorCommandId"], - _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["codeActionCommandId"], - _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["sourceActionCommandId"], - _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["organizeImportsCommandId"], - _codeAction_js__WEBPACK_IMPORTED_MODULE_7__["fixAllCommandId"] -]; - +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionModel.js ***! - \****************************************************************************************/ -/*! exports provided: SUPPORTED_CODE_ACTIONS, CodeActionsState, CodeActionModel */ +/***/ "./src/diagrams/info/styles.js": +/*!*************************************!*\ + !*** ./src/diagrams/info/styles.js ***! + \*************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUPPORTED_CODE_ACTIONS", function() { return SUPPORTED_CODE_ACTIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionsState", function() { return CodeActionsState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionModel", function() { return CodeActionModel; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _codeAction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codeAction.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var getStyles = function getStyles() { + return ""; +}; +/* harmony default export */ __webpack_exports__["default"] = (getStyles); +/***/ }), +/***/ "./src/diagrams/pie/parser/pie.jison": +/*!*******************************************!*\ + !*** ./src/diagrams/pie/parser/pie.jison ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ +/* + Returns a Parser object of the following structure: + Parser: { + yy: {} + } + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, -const SUPPORTED_CODE_ACTIONS = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["RawContextKey"]('supportedCodeAction', ''); -class CodeActionOracle extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(_editor, _markerService, _signalChange, _delay = 250) { - super(); - this._editor = _editor; - this._markerService = _markerService; - this._signalChange = _signalChange; - this._delay = _delay; - this._autoTriggerTimer = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"]()); - this._register(this._markerService.onMarkerChanged(e => this._onMarkerChanges(e))); - this._register(this._editor.onDidChangeCursorPosition(() => this._onCursorChange())); - } - trigger(trigger) { - const selection = this._getRangeOfSelectionUnlessWhitespaceEnclosed(trigger); - return this._createEventAndSignalChange(trigger, selection); - } - _onMarkerChanges(resources) { - const model = this._editor.getModel(); - if (!model) { - return; - } - if (resources.some(resource => Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_8__["isEqual"])(resource, model.uri))) { - this._autoTriggerTimer.cancelAndSet(() => { - this.trigger({ type: 1 /* Auto */ }); - }, this._delay); - } - } - _onCursorChange() { - this._autoTriggerTimer.cancelAndSet(() => { - this.trigger({ type: 1 /* Auto */ }); - }, this._delay); + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, } - _getRangeOfMarker(selection) { - const model = this._editor.getModel(); - if (!model) { - return undefined; - } - for (const marker of this._markerService.read({ resource: model.uri })) { - const markerRange = model.validateRange(marker); - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].intersectRanges(markerRange, selection)) { - return _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].lift(markerRange); - } - } - return undefined; + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,5],$V2=[1,6],$V3=[1,7],$V4=[1,9],$V5=[1,10,12,19,20,21,22],$V6=[1,6,10,12,19,20,21,22],$V7=[19,20,21],$V8=[1,22],$V9=[6,19,20,21,22]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"eol":4,"directive":5,"PIE":6,"document":7,"line":8,"statement":9,"txt":10,"value":11,"title":12,"title_value":13,"openDirective":14,"typeDirective":15,"closeDirective":16,":":17,"argDirective":18,"NEWLINE":19,";":20,"EOF":21,"open_directive":22,"type_directive":23,"arg_directive":24,"close_directive":25,"$accept":0,"$end":1}, +terminals_: {2:"error",6:"PIE",10:"txt",11:"value",12:"title",13:"title_value",17:":",19:"NEWLINE",20:";",21:"EOF",22:"open_directive",23:"type_directive",24:"arg_directive",25:"close_directive"}, +productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,2],[9,1],[5,3],[5,5],[4,1],[4,1],[4,1],[14,1],[15,1],[18,1],[16,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 6: + this.$ = $$[$0-1] +break; +case 8: + yy.addSection($$[$0-1],yy.cleanupValue($$[$0])); +break; +case 9: + this.$=$$[$0].trim();yy.setTitle(this.$); +break; +case 16: + yy.parseDirective('%%{', 'open_directive'); +break; +case 17: + yy.parseDirective($$[$0], 'type_directive'); +break; +case 18: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); +break; +case 19: + yy.parseDirective('}%%', 'close_directive', 'pie'); +break; +} +}, +table: [{3:1,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},{1:[3]},{3:10,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},{3:11,4:2,5:3,6:$V0,14:8,19:$V1,20:$V2,21:$V3,22:$V4},o($V5,[2,4],{7:12}),o($V6,[2,13]),o($V6,[2,14]),o($V6,[2,15]),{15:13,23:[1,14]},{23:[2,16]},{1:[2,1]},{1:[2,2]},o($V7,[2,7],{14:8,8:15,9:16,5:19,1:[2,3],10:[1,17],12:[1,18],22:$V4}),{16:20,17:[1,21],25:$V8},o([17,25],[2,17]),o($V5,[2,5]),{4:23,19:$V1,20:$V2,21:$V3},{11:[1,24]},{13:[1,25]},o($V7,[2,10]),o($V9,[2,11]),{18:26,24:[1,27]},o($V9,[2,19]),o($V5,[2,6]),o($V7,[2,8]),o($V7,[2,9]),{16:28,25:$V8},{25:[2,18]},o($V9,[2,12])], +defaultActions: {9:[2,16],10:[2,1],11:[2,2],27:[2,18]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - _getRangeOfSelectionUnlessWhitespaceEnclosed(trigger) { - if (!this._editor.hasModel()) { - return undefined; - } - const model = this._editor.getModel(); - const selection = this._editor.getSelection(); - if (selection.isEmpty() && trigger.type === 1 /* Auto */) { - const { lineNumber, column } = selection.getPosition(); - const line = model.getLineContent(lineNumber); - if (line.length === 0) { - // empty line - return undefined; - } - else if (column === 1) { - // look only right - if (/\s/.test(line[0])) { - return undefined; - } - } - else if (column === model.getLineMaxColumn(lineNumber)) { - // look only left - if (/\s/.test(line[line.length - 1])) { - return undefined; - } - } - else { - // look left and right - if (/\s/.test(line[column - 2]) && /\s/.test(line[column - 1])) { - return undefined; - } - } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } - return selection; } - _createEventAndSignalChange(trigger, selection) { - const model = this._editor.getModel(); - if (!selection || !model) { - // cancel - this._signalChange(undefined); - return undefined; - } - const markerRange = this._getRangeOfMarker(selection); - const position = markerRange ? markerRange.getStartPosition() : selection.getStartPosition(); - const e = { - trigger, - selection, - position - }; - this._signalChange(e); - return e; + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; } -} -var CodeActionsState; -(function (CodeActionsState) { - CodeActionsState.Empty = { type: 0 /* Empty */ }; - class Triggered { - constructor(trigger, rangeOrSelection, position, actions) { - this.trigger = trigger; - this.rangeOrSelection = rangeOrSelection; - this.position = position; - this.actions = actions; - this.type = 1 /* Triggered */; - } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; } - CodeActionsState.Triggered = Triggered; -})(CodeActionsState || (CodeActionsState = {})); -class CodeActionModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(_editor, _markerService, contextKeyService, _progressService) { - super(); - this._editor = _editor; - this._markerService = _markerService; - this._progressService = _progressService; - this._codeActionOracle = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["MutableDisposable"]()); - this._state = CodeActionsState.Empty; - this._onDidChangeState = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onDidChangeState = this._onDidChangeState.event; - this._supportedCodeActions = SUPPORTED_CODE_ACTIONS.bindTo(contextKeyService); - this._register(this._editor.onDidChangeModel(() => this._update())); - this._register(this._editor.onDidChangeModelLanguage(() => this._update())); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_4__["CodeActionProviderRegistry"].onDidChange(() => this._update())); - this._update(); + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; } - dispose() { - super.dispose(); - this.setState(CodeActionsState.Empty, true); - } - _update() { - this._codeActionOracle.value = undefined; - this.setState(CodeActionsState.Empty); - const model = this._editor.getModel(); - if (model - && _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["CodeActionProviderRegistry"].has(model) - && !this._editor.getOption(72 /* readOnly */)) { - const supportedActions = []; - for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["CodeActionProviderRegistry"].all(model)) { - if (Array.isArray(provider.providedCodeActionKinds)) { - supportedActions.push(...provider.providedCodeActionKinds); + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); } + token = self.symbols_[token] || token; } - this._supportedCodeActions.set(supportedActions.join(' ')); - this._codeActionOracle.value = new CodeActionOracle(this._editor, this._markerService, trigger => { - var _a; - if (!trigger) { - this.setState(CodeActionsState.Empty); - return; - } - const actions = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => Object(_codeAction_js__WEBPACK_IMPORTED_MODULE_7__["getCodeActions"])(model, trigger.selection, trigger.trigger, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_6__["Progress"].None, token)); - if (trigger.trigger.type === 2 /* Manual */) { - (_a = this._progressService) === null || _a === void 0 ? void 0 : _a.showWhile(actions, 250); - } - this.setState(new CodeActionsState.Triggered(trigger.trigger, trigger.selection, trigger.position, actions)); - }, undefined); - this._codeActionOracle.value.trigger({ type: 1 /* Auto */ }); - } - else { - this._supportedCodeActions.reset(); - } - } - trigger(trigger) { - if (this._codeActionOracle.value) { - this._codeActionOracle.value.trigger(trigger); + return token; } - } - setState(newState, skipNotify) { - if (newState === this._state) { - return; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; } - // Cancel old request - if (this._state.type === 1 /* Triggered */) { - this._state.actions.cancel(); + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); } - this._state = newState; - if (!skipNotify) { - this._onDidChangeState.fire(newState); + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionUi.js ***! - \*************************************************************************************/ -/*! exports provided: CodeActionUi */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionUi", function() { return CodeActionUi; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lazy.js */ "./node_modules/monaco-editor/esm/vs/base/common/lazy.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../message/messageController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _codeActionMenu_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./codeActionMenu.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionMenu.js"); -/* harmony import */ var _lightBulbWidget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lightBulbWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -let CodeActionUi = class CodeActionUi extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(_editor, quickFixActionId, preferredFixActionId, delegate, instantiationService) { - super(); - this._editor = _editor; - this.delegate = delegate; - this._activeCodeActions = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["MutableDisposable"]()); - this._codeActionWidget = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__["Lazy"](() => { - return this._register(instantiationService.createInstance(_codeActionMenu_js__WEBPACK_IMPORTED_MODULE_5__["CodeActionMenu"], this._editor, { - onSelectCodeAction: (action) => __awaiter(this, void 0, void 0, function* () { - this.delegate.applyCodeAction(action, /* retrigger */ true); - }) - })); - }); - this._lightBulbWidget = new _base_common_lazy_js__WEBPACK_IMPORTED_MODULE_1__["Lazy"](() => { - const widget = this._register(instantiationService.createInstance(_lightBulbWidget_js__WEBPACK_IMPORTED_MODULE_6__["LightBulbWidget"], this._editor, quickFixActionId, preferredFixActionId)); - this._register(widget.onClick(e => this.showCodeActionList(e.trigger, e.actions, e, { includeDisabledActions: false }))); - return widget; - }); - } - update(newState) { - var _a, _b, _c; - return __awaiter(this, void 0, void 0, function* () { - if (newState.type !== 1 /* Triggered */) { - (_a = this._lightBulbWidget.rawValue) === null || _a === void 0 ? void 0 : _a.hide(); - return; - } - let actions; - try { - actions = yield newState.actions; + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; } - catch (e) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedError"])(e); - return; + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; } - this._lightBulbWidget.getValue().update(actions, newState.trigger, newState.position); - if (newState.trigger.type === 2 /* Manual */) { - if ((_b = newState.trigger.filter) === null || _b === void 0 ? void 0 : _b.include) { // Triggered for specific scope - // Check to see if we want to auto apply. - const validActionToApply = this.tryGetValidActionToApply(newState.trigger, actions); - if (validActionToApply) { - try { - yield this.delegate.applyCodeAction(validActionToApply, false); - } - finally { - actions.dispose(); - } - return; - } - // Check to see if there is an action that we would have applied were it not invalid - if (newState.trigger.context) { - const invalidAction = this.getInvalidActionThatWouldHaveBeenApplied(newState.trigger, actions); - if (invalidAction && invalidAction.disabled) { - _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__["MessageController"].get(this._editor).showMessage(invalidAction.disabled, newState.trigger.context.position); - actions.dispose(); - return; - } - } - } - const includeDisabledActions = !!((_c = newState.trigger.filter) === null || _c === void 0 ? void 0 : _c.include); - if (newState.trigger.context) { - if (!actions.allActions.length || !includeDisabledActions && !actions.validActions.length) { - _message_messageController_js__WEBPACK_IMPORTED_MODULE_3__["MessageController"].get(this._editor).showMessage(newState.trigger.context.notAvailableMessage, newState.trigger.context.position); - this._activeCodeActions.value = actions; - actions.dispose(); - return; - } - } - this._activeCodeActions.value = actions; - this._codeActionWidget.getValue().show(newState.trigger, actions, newState.position, { includeDisabledActions }); + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; } - else { - // auto magically triggered - if (this._codeActionWidget.getValue().isVisible) { - // TODO: Figure out if we should update the showing menu? - actions.dispose(); - } - else { - this._activeCodeActions.value = actions; - } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } - }); - } - getInvalidActionThatWouldHaveBeenApplied(trigger, actions) { - if (!actions.allActions.length) { - return undefined; - } - if ((trigger.autoApply === "first" /* First */ && actions.validActions.length === 0) - || (trigger.autoApply === "ifSingle" /* IfSingle */ && actions.allActions.length === 1)) { - return actions.allActions.find(action => action.disabled); - } - return undefined; - } - tryGetValidActionToApply(trigger, actions) { - if (!actions.validActions.length) { - return undefined; - } - if ((trigger.autoApply === "first" /* First */ && actions.validActions.length > 0) - || (trigger.autoApply === "ifSingle" /* IfSingle */ && actions.validActions.length === 1)) { - return actions.validActions[0]; + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } - return undefined; - } - showCodeActionList(trigger, actions, at, options) { - return __awaiter(this, void 0, void 0, function* () { - this._codeActionWidget.getValue().show(trigger, actions, at, options); - }); } -}; -CodeActionUi = __decorate([ - __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__["IInstantiationService"]) -], CodeActionUi); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css ***! - \*****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./lightBulbWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css"); - - + return true; +}}; -var options = {}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ -options.insert = "head"; -options.singleton = false; +EOF:1, -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + this._input = this._input.slice(1); + return ch; + }, -/***/ }), +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.js ***! - \****************************************************************************************/ -/*! exports provided: LightBulbWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LightBulbWidget", function() { return LightBulbWidget; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _lightBulbWidget_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lightBulbWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } -var LightBulbState; -(function (LightBulbState) { - LightBulbState.Hidden = { type: 0 /* Hidden */ }; - class Showing { - constructor(actions, trigger, editorPosition, widgetPosition) { - this.actions = actions; - this.trigger = trigger; - this.editorPosition = editorPosition; - this.widgetPosition = widgetPosition; - this.type = 1 /* Showing */; + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; } - } - LightBulbState.Showing = Showing; -})(LightBulbState || (LightBulbState = {})); -let LightBulbWidget = class LightBulbWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(_editor, _quickFixActionId, _preferredFixActionId, _keybindingService) { - super(); - this._editor = _editor; - this._quickFixActionId = _quickFixActionId; - this._preferredFixActionId = _preferredFixActionId; - this._keybindingService = _keybindingService; - this._onClick = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this.onClick = this._onClick.event; - this._state = LightBulbState.Hidden; - this._domNode = document.createElement('div'); - this._domNode.className = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightBulb.classNames; - this._editor.addContentWidget(this); - this._register(this._editor.onDidChangeModelContent(_ => { - // cancel when the line in question has been removed - const editorModel = this._editor.getModel(); - if (this.state.type !== 1 /* Showing */ || !editorModel || this.state.editorPosition.lineNumber >= editorModel.getLineCount()) { - this.hide(); - } - })); - _base_browser_touch_js__WEBPACK_IMPORTED_MODULE_10__["Gesture"].ignoreTarget(this._domNode); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addStandardDisposableGenericMouseDownListner"](this._domNode, e => { - if (this.state.type !== 1 /* Showing */) { - return; - } - // Make sure that focus / cursor location is not lost when clicking widget icon - this._editor.focus(); - e.preventDefault(); - // a bit of extra work to make sure the menu - // doesn't cover the line-text - const { top, height } = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"](this._domNode); - const lineHeight = this._editor.getOption(51 /* lineHeight */); - let pad = Math.floor(lineHeight / 3); - if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) { - pad += lineHeight; - } - this._onClick.fire({ - x: e.posx, - y: top + height + pad, - actions: this.state.actions, - trigger: this.state.trigger, - }); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this._domNode, 'mouseenter', (e) => { - if ((e.buttons & 1) !== 1) { - return; - } - // mouse enters lightbulb while the primary/left button - // is being pressed -> hide the lightbulb and block future - // showings until mouse is released - this.hide(); - const monitor = new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__["GlobalMouseMoveMonitor"](); - monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_1__["standardMouseMoveMerger"], () => { }, () => { - monitor.dispose(); - }); - })); - this._register(this._editor.onDidChangeConfiguration(e => { - // hide when told to do so - if (e.hasChanged(49 /* lightbulb */) && !this._editor.getOption(49 /* lightbulb */).enabled) { - this.hide(); - } - })); - this._updateLightBulbTitleAndIcon(); - this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon, this)); - } - dispose() { - super.dispose(); - this._editor.removeContentWidget(this); - } - getId() { - return 'LightBulbWidget'; - } - getDomNode() { - return this._domNode; - } - getPosition() { - return this._state.type === 1 /* Showing */ ? this._state.widgetPosition : null; - } - update(actions, trigger, atPosition) { - if (actions.validActions.length <= 0) { - return this.hide(); - } - const options = this._editor.getOptions(); - if (!options.get(49 /* lightbulb */).enabled) { - return this.hide(); - } - const model = this._editor.getModel(); - if (!model) { - return this.hide(); - } - const { lineNumber, column } = model.validatePosition(atPosition); - const tabSize = model.getOptions().tabSize; - const fontInfo = options.get(36 /* fontInfo */); - const lineContent = model.getLineContent(lineNumber); - const indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_5__["TextModel"].computeIndentLevel(lineContent, tabSize); - const lineHasSpace = fontInfo.spaceWidth * indent > 22; - const isFolded = (lineNumber) => { - return lineNumber > 2 && this._editor.getTopForLineNumber(lineNumber) === this._editor.getTopForLineNumber(lineNumber - 1); + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length }; - let effectiveLineNumber = lineNumber; - if (!lineHasSpace) { - if (lineNumber > 1 && !isFolded(lineNumber - 1)) { - effectiveLineNumber -= 1; - } - else if (!isFolded(lineNumber + 1)) { - effectiveLineNumber += 1; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; } - else if (column * fontInfo.spaceWidth < 22) { - // cannot show lightbulb above/below and showing - // it inline would overlay the cursor... - return this.hide(); + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } } } - this.state = new LightBulbState.Showing(actions, trigger, atPosition, { - position: { lineNumber: effectiveLineNumber, column: 1 }, - preference: LightBulbWidget._posPref - }); - this._editor.layoutContentWidget(this); - } - hide() { - this.state = LightBulbState.Hidden; - this._editor.layoutContentWidget(this); - } - get state() { return this._state; } - set state(value) { - this._state = value; - this._updateLightBulbTitleAndIcon(); - } - _updateLightBulbTitleAndIcon() { - if (this.state.type === 1 /* Showing */ && this.state.actions.hasAutoFix) { - // update icon - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClasses"](this._domNode, _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightBulb.classNames); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClasses"](this._domNode, _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightbulbAutofix.classNames); - const preferredKb = this._keybindingService.lookupKeybinding(this._preferredFixActionId); - if (preferredKb) { - this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__["localize"]('prefferedQuickFixWithKb', "Show Fixes. Preferred Fix Available ({0})", preferredKb.getLabel()); - return; + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - // update icon - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClasses"](this._domNode, _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightbulbAutofix.classNames); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClasses"](this._domNode, _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightBulb.classNames); - const kb = this._keybindingService.lookupKeybinding(this._quickFixActionId); - if (kb) { - this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__["localize"]('quickFixWithKb', "Show Fixes ({0})", kb.getLabel()); + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); } - else { - this.title = _nls_js__WEBPACK_IMPORTED_MODULE_6__["localize"]('quickFix', "Show Fixes"); + }, + +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); } - } - set title(value) { - this._domNode.title = value; - } -}; -LightBulbWidget._posPref = [0 /* EXACT */]; -LightBulbWidget = __decorate([ - __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__["IKeybindingService"]) -], LightBulbWidget); + }, -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__["registerThemingParticipant"])((theme, collector) => { - // Lightbulb Icon - const editorLightBulbForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorLightBulbForeground"]); - if (editorLightBulbForegroundColor) { - collector.addRule(` - .monaco-editor .contentWidgets ${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightBulb.cssSelector} { - color: ${editorLightBulbForegroundColor}; - }`); - } - // Lightbulb Auto Fix Icon - const editorLightBulbAutoFixForegroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorLightBulbAutoFixForeground"]); - if (editorLightBulbAutoFixForegroundColor) { - collector.addRule(` - .monaco-editor .contentWidgets ${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].lightbulbAutofix.cssSelector} { - color: ${editorLightBulbAutoFixForegroundColor}; - }`); - } -}); +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, -/***/ }), +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js ***! - \******************************************************************************/ -/*! exports provided: CodeActionKind, mayIncludeActionsOfKind, filtersAction, CodeActionCommandArgs */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mayIncludeActionsOfKind", function() { return mayIncludeActionsOfKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filtersAction", function() { return filtersAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionCommandArgs", function() { return CodeActionCommandArgs; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, -class CodeActionKind { - constructor(value) { - this.value = value; - } - equals(other) { - return this.value === other.value; - } - contains(other) { - return this.equals(other) || this.value === '' || Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["startsWith"])(other.value, this.value + CodeActionKind.sep); - } - intersects(other) { - return this.contains(other) || other.contains(this); - } - append(part) { - return new CodeActionKind(this.value + CodeActionKind.sep + part); - } -} -CodeActionKind.sep = '.'; -CodeActionKind.None = new CodeActionKind('@@none@@'); // Special code action that contains nothing -CodeActionKind.Empty = new CodeActionKind(''); -CodeActionKind.QuickFix = new CodeActionKind('quickfix'); -CodeActionKind.Refactor = new CodeActionKind('refactor'); -CodeActionKind.Source = new CodeActionKind('source'); -CodeActionKind.SourceOrganizeImports = CodeActionKind.Source.append('organizeImports'); -CodeActionKind.SourceFixAll = CodeActionKind.Source.append('fixAll'); -function mayIncludeActionsOfKind(filter, providedKind) { - // A provided kind may be a subset or superset of our filtered kind. - if (filter.include && !filter.include.intersects(providedKind)) { - return false; - } - if (filter.excludes) { - if (filter.excludes.some(exclude => excludesAction(providedKind, exclude, filter.include))) { - return false; - } - } - // Don't return source actions unless they are explicitly requested - if (!filter.includeSourceActions && CodeActionKind.Source.contains(providedKind)) { - return false; - } - return true; +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0: this.begin('open_directive'); return 22; +break; +case 1: this.begin('type_directive'); return 23; +break; +case 2: this.popState(); this.begin('arg_directive'); return 17; +break; +case 3: this.popState(); this.popState(); return 25; +break; +case 4:return 24; +break; +case 5:/* skip comments */ +break; +case 6:/* skip comments */{ /*console.log('');*/ } +break; +case 7:return 19; +break; +case 8:/* do nothing */ +break; +case 9:/* ignore */ +break; +case 10: this.begin("title");return 12; +break; +case 11: this.popState(); return "title_value"; +break; +case 12: this.begin("string"); +break; +case 13: this.popState(); +break; +case 14: return "txt"; +break; +case 15:return 6; +break; +case 16:return "value"; +break; +case 17:return 21; +break; } -function filtersAction(filter, action) { - const actionKind = action.kind ? new CodeActionKind(action.kind) : undefined; - // Filter out actions by kind - if (filter.include) { - if (!actionKind || !filter.include.contains(actionKind)) { - return false; - } - } - if (filter.excludes) { - if (actionKind && filter.excludes.some(exclude => excludesAction(actionKind, exclude, filter.include))) { - return false; - } - } - // Don't return source actions unless they are explicitly requested - if (!filter.includeSourceActions) { - if (actionKind && CodeActionKind.Source.contains(actionKind)) { - return false; - } - } - if (filter.onlyIncludePreferredActions) { - if (!action.isPreferred) { - return false; - } - } - return true; +}, +rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i], +conditions: {"close_directive":{"rules":[],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"title":{"rules":[11],"inclusive":false},"string":{"rules":[13,14],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,12,15,16,17],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; } -function excludesAction(providedKind, exclude, include) { - if (!exclude.contains(providedKind)) { - return false; - } - if (include && exclude.contains(include)) { - // The include is more specific, don't filter out - return false; +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } - return true; + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -class CodeActionCommandArgs { - constructor(kind, apply, preferred) { - this.kind = kind; - this.apply = apply; - this.preferred = preferred; - } - static fromUser(arg, defaults) { - if (!arg || typeof arg !== 'object') { - return new CodeActionCommandArgs(defaults.kind, defaults.apply, false); - } - return new CodeActionCommandArgs(CodeActionCommandArgs.getKindFromUser(arg, defaults.kind), CodeActionCommandArgs.getApplyFromUser(arg, defaults.apply), CodeActionCommandArgs.getPreferredUser(arg)); - } - static getApplyFromUser(arg, defaultAutoApply) { - switch (typeof arg.apply === 'string' ? arg.apply.toLowerCase() : '') { - case 'first': return "first" /* First */; - case 'never': return "never" /* Never */; - case 'ifsingle': return "ifSingle" /* IfSingle */; - default: return defaultAutoApply; - } - } - static getKindFromUser(arg, defaultKind) { - return typeof arg.kind === 'string' - ? new CodeActionKind(arg.kind) - : defaultKind; - } - static getPreferredUser(arg) { - return typeof arg.preferred === 'boolean' - ? arg.preferred - : false; - } } - +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js ***! - \************************************************************************************/ -/*! exports provided: ICodeLensCache, CodeLensCache */ +/***/ "./src/diagrams/pie/pieDb.js": +/*!***********************************!*\ + !*** ./src/diagrams/pie/pieDb.js ***! + \***********************************/ +/*! exports provided: parseDirective, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ICodeLensCache", function() { return ICodeLensCache; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensCache", function() { return CodeLensCache; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _codelens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codelens.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/** + * + */ -const ICodeLensCache = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('ICodeLensCache'); -class CacheItem { - constructor(lineCount, data) { - this.lineCount = lineCount; - this.data = data; - } -} -let CodeLensCache = class CodeLensCache { - constructor(storageService) { - this._fakeProvider = new class { - provideCodeLenses() { - throw new Error('not supported'); - } - }; - this._cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__["LRUCache"](20, 0.75); - // remove old data - const oldkey = 'codelens/cache'; - Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_6__["runWhenIdle"])(() => storageService.remove(oldkey, 1 /* WORKSPACE */)); - // restore lens data on start - const key = 'codelens/cache2'; - const raw = storageService.get(key, 1 /* WORKSPACE */, '{}'); - this._deserialize(raw); - // store lens data on shutdown - Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_7__["once"])(storageService.onWillSaveState)(e => { - if (e.reason === _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__["WillSaveStateReason"].SHUTDOWN) { - storageService.store(key, this._serialize(), 1 /* WORKSPACE */); - } - }); - } - put(model, data) { - // create a copy of the model that is without command-ids - // but with comand-labels - const copyItems = data.lenses.map(item => { - var _a; - return { - range: item.symbol.range, - command: item.symbol.command && { id: '', title: (_a = item.symbol.command) === null || _a === void 0 ? void 0 : _a.title }, - }; - }); - const copyModel = new _codelens_js__WEBPACK_IMPORTED_MODULE_2__["CodeLensModel"](); - copyModel.add({ lenses: copyItems, dispose: () => { } }, this._fakeProvider); - const item = new CacheItem(model.getLineCount(), copyModel); - this._cache.set(model.uri.toString(), item); - } - get(model) { - const item = this._cache.get(model.uri.toString()); - return item && item.lineCount === model.getLineCount() ? item.data : undefined; - } - delete(model) { - this._cache.delete(model.uri.toString()); - } - // --- persistence - _serialize() { - const data = Object.create(null); - for (const [key, value] of this._cache) { - const lines = new Set(); - for (const d of value.data.lenses) { - lines.add(d.symbol.range.startLineNumber); - } - data[key] = { - lineCount: value.lineCount, - lines: [...lines.values()] - }; - } - return JSON.stringify(data); - } - _deserialize(raw) { - try { - const data = JSON.parse(raw); - for (const key in data) { - const element = data[key]; - const lenses = []; - for (const line of element.lines) { - lenses.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](line, 1, line, 11) }); - } - const model = new _codelens_js__WEBPACK_IMPORTED_MODULE_2__["CodeLensModel"](); - model.add({ lenses, dispose() { } }, this._fakeProvider); - this._cache.set(key, new CacheItem(element.lineCount, model)); - } - } - catch (_a) { - // ignore... - } - } +var sections = {}; +var title = ''; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parseDirective(this, statement, context, type); }; -CodeLensCache = __decorate([ - __param(0, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_4__["IStorageService"]) -], CodeLensCache); - -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_1__["registerSingleton"])(ICodeLensCache, CodeLensCache); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js ***! - \*******************************************************************************/ -/*! exports provided: CodeLensModel, getCodeLensData */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensModel", function() { return CodeLensModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCodeLensData", function() { return getCodeLensData; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var addSection = function addSection(id, value) { + if (typeof sections[id] === 'undefined') { + sections[id] = value; + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].debug('Added new section :', id); + } +}; +var getSections = function getSections() { + return sections; +}; +var setTitle = function setTitle(txt) { + title = txt; +}; +var getTitle = function getTitle() { + return title; +}; +var cleanupValue = function cleanupValue(value) { + if (value.substring(0, 1) === ':') { + value = value.substring(1).trim(); + return Number(value.trim()); + } else { + return Number(value.trim()); + } +}; +var clear = function clear() { + sections = {}; + title = ''; +}; // export const parseError = (err, hash) => { +// global.mermaidAPI.parseError(err, hash) +// } +/* harmony default export */ __webpack_exports__["default"] = ({ + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_2__["getConfig"]().pie; + }, + addSection: addSection, + getSections: getSections, + cleanupValue: cleanupValue, + clear: clear, + setTitle: setTitle, + getTitle: getTitle // parseError -class CodeLensModel { - constructor() { - this.lenses = []; - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"](); - } - dispose() { - this._disposables.dispose(); - } - add(list, provider) { - this._disposables.add(list); - for (const symbol of list.lenses) { - this.lenses.push({ symbol, provider }); - } - } -} -function getCodeLensData(model, token) { - const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CodeLensProviderRegistry"].ordered(model); - const providerRanks = new Map(); - const result = new CodeLensModel(); - const promises = provider.map((provider, i) => { - providerRanks.set(provider, i); - return Promise.resolve(provider.provideCodeLenses(model, token)) - .then(list => list && result.add(list, provider)) - .catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedExternalError"]); - }); - return Promise.all(promises).then(() => { - result.lenses = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["mergeSort"])(result.lenses, (a, b) => { - // sort by lineNumber, provider-rank, and column - if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { - return -1; - } - else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) { - return 1; - } - else if (providerRanks.get(a.provider) < providerRanks.get(b.provider)) { - return -1; - } - else if (providerRanks.get(a.provider) > providerRanks.get(b.provider)) { - return 1; - } - else if (a.symbol.range.startColumn < b.symbol.range.startColumn) { - return -1; - } - else if (a.symbol.range.startColumn > b.symbol.range.startColumn) { - return 1; - } - else { - return 0; - } - }); - return result; - }); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerLanguageCommand"])('_executeCodeLensProvider', function (accessor, args) { - let { resource, itemResolveCount } = args; - if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_3__["URI"])) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])(); - } - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["illegalArgument"])(); - } - const result = []; - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"](); - return getCodeLensData(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None).then(value => { - disposables.add(value); - let resolve = []; - for (const item of value.lenses) { - if (typeof itemResolveCount === 'undefined' || Boolean(item.symbol.command)) { - result.push(item.symbol); - } - else if (itemResolveCount-- > 0 && item.provider.resolveCodeLens) { - resolve.push(Promise.resolve(item.provider.resolveCodeLens(model, item.symbol, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None)).then(symbol => result.push(symbol || item.symbol))); - } - } - return Promise.all(resolve); - }).then(() => { - return result; - }).finally(() => { - // make sure to return results, then (on next tick) - // dispose the results - setTimeout(() => disposables.dispose(), 100); - }); }); - /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js ***! - \*****************************************************************************************/ -/*! exports provided: CodeLensContribution */ +/***/ "./src/diagrams/pie/pieRenderer.js": +/*!*****************************************!*\ + !*** ./src/diagrams/pie/pieRenderer.js ***! + \*****************************************/ +/*! exports provided: setConf, draw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensContribution", function() { return CodeLensContribution; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _codelens_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./codelens.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelens.js"); -/* harmony import */ var _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./codelensWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _codeLensCache_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./codeLensCache.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codeLensCache.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/hash.js */ "./node_modules/monaco-editor/esm/vs/base/common/hash.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieDb */ "./src/diagrams/pie/pieDb.js"); +/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/pie */ "./src/diagrams/pie/parser/pie.jison"); +/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/** + * Created by AshishJ on 11-09-2019. + */ +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); + keys.forEach(function (key) { + conf[key] = cnf[key]; + }); +}; +/** + * Draws a Pie Chart with the data given in text. + * @param text + * @param id + */ +var width; +var height = 450; +var draw = function draw(txt, id) { + try { + var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser; + parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"]; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering info diagram\n' + txt); // Parse the Pie Chart definition + parser.yy.clear(); + parser.parse(txt); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Parsed info diagram'); + var elem = document.getElementById(id); + width = elem.parentElement.offsetWidth; + if (typeof width === 'undefined') { + width = 1200; + } + if (typeof conf.useWidth !== 'undefined') { + width = conf.useWidth; + } + var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); + Object(_utils__WEBPACK_IMPORTED_MODULE_4__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); // Set viewBox + elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height); // Fetch the default direction, use TD if none was found + var margin = 40; + var legendRectSize = 18; + var legendSpacing = 4; + var radius = Math.min(width, height) / 2 - margin; + var svg = diagram.append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')'); + var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"].getSections(); + var sum = 0; + Object.keys(data).forEach(function (key) { + sum += data[key]; + }); // Set the color scale + var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"])().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]); // Compute the position of each group on the pie: + var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__["pie"])().value(function (d) { + return d.value; + }); + var dataReady = pie(Object(d3__WEBPACK_IMPORTED_MODULE_0__["entries"])(data)); // Shape helper to build arcs: + var arcGenerator = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().innerRadius(0).outerRadius(radius); // Build the pie chart: each part of the pie is a path that we build using the arc function. -let CodeLensContribution = class CodeLensContribution { - constructor(_editor, _commandService, _notificationService, _codeLensCache) { - this._editor = _editor; - this._commandService = _commandService; - this._notificationService = _notificationService; - this._codeLensCache = _codeLensCache; - this._globalToDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - this._localToDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - this._lenses = []; - this._oldCodeLensModels = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - this._modelChangeCounter = 0; - this._isEnabled = this._editor.getOption(11 /* codeLens */); - this._globalToDispose.add(this._editor.onDidChangeModel(() => this._onModelChange())); - this._globalToDispose.add(this._editor.onDidChangeModelLanguage(() => this._onModelChange())); - this._globalToDispose.add(this._editor.onDidChangeConfiguration(() => { - const prevIsEnabled = this._isEnabled; - this._isEnabled = this._editor.getOption(11 /* codeLens */); - if (prevIsEnabled !== this._isEnabled) { - this._onModelChange(); - } - })); - this._globalToDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CodeLensProviderRegistry"].onDidChange(this._onModelChange, this)); - this._globalToDispose.add(this._editor.onDidChangeConfiguration(e => { - if (e.hasChanged(36 /* fontInfo */)) { - this._updateLensStyle(); - } - })); - this._onModelChange(); - this._styleClassName = '_' + Object(_base_common_hash_js__WEBPACK_IMPORTED_MODULE_12__["hash"])(this._editor.getId()).toString(16); - this._styleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__["createStyleSheet"](_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_11__["isInShadowDOM"](this._editor.getContainerDomNode()) - ? this._editor.getContainerDomNode() - : undefined); - this._updateLensStyle(); - } - dispose() { - this._localDispose(); - this._globalToDispose.dispose(); - this._oldCodeLensModels.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._currentCodeLensModel); - } - _updateLensStyle() { - const options = this._editor.getOptions(); - const fontInfo = options.get(36 /* fontInfo */); - const lineHeight = options.get(51 /* lineHeight */); - const height = Math.round(lineHeight * 1.1); - const fontSize = Math.round(fontInfo.fontSize * 0.9); - const newStyle = ` - .monaco-editor .codelens-decoration.${this._styleClassName} { height: ${height}px; line-height: ${lineHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontInfo.fontSize * 0.45)}px;} - .monaco-editor .codelens-decoration.${this._styleClassName} > a > .codicon { line-height: ${lineHeight}px; font-size: ${fontSize}px; } - `; - this._styleElement.textContent = newStyle; - } - _localDispose() { - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - this._currentFindCodeLensSymbolsPromise = undefined; - this._modelChangeCounter++; - } - if (this._currentResolveCodeLensSymbolsPromise) { - this._currentResolveCodeLensSymbolsPromise.cancel(); - this._currentResolveCodeLensSymbolsPromise = undefined; - } - this._localToDispose.clear(); - this._oldCodeLensModels.clear(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._currentCodeLensModel); - } - _onModelChange() { - this._localDispose(); - const model = this._editor.getModel(); - if (!model) { - return; - } - if (!this._isEnabled) { - return; - } - const cachedLenses = this._codeLensCache.get(model); - if (cachedLenses) { - this._renderCodeLensSymbols(cachedLenses); - } - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CodeLensProviderRegistry"].has(model)) { - // no provider -> return but check with - // cached lenses. they expire after 30 seconds - if (cachedLenses) { - this._localToDispose.add(Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["disposableTimeout"])(() => { - const cachedLensesNow = this._codeLensCache.get(model); - if (cachedLenses === cachedLensesNow) { - this._codeLensCache.delete(model); - this._onModelChange(); - } - }, 30 * 1000)); - } - return; - } - for (const provider of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CodeLensProviderRegistry"].all(model)) { - if (typeof provider.onDidChange === 'function') { - let registration = provider.onDidChange(() => scheduler.schedule()); - this._localToDispose.add(registration); - } - } - const detectVisibleLenses = this._detectVisibleLenses = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this._onViewportChanged(), 250); - const scheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => { - const counterValue = ++this._modelChangeCounter; - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - } - this._currentFindCodeLensSymbolsPromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => Object(_codelens_js__WEBPACK_IMPORTED_MODULE_6__["getCodeLensData"])(model, token)); - this._currentFindCodeLensSymbolsPromise.then(result => { - if (counterValue === this._modelChangeCounter) { // only the last one wins - if (this._currentCodeLensModel) { - this._oldCodeLensModels.add(this._currentCodeLensModel); - } - this._currentCodeLensModel = result; - // cache model to reduce flicker - this._codeLensCache.put(model, result); - // render lenses - this._renderCodeLensSymbols(result); - detectVisibleLenses.schedule(); - } - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"]); - }, 250); - this._localToDispose.add(scheduler); - this._localToDispose.add(detectVisibleLenses); - this._localToDispose.add(this._editor.onDidChangeModelContent(() => { - this._editor.changeDecorations(decorationsAccessor => { - this._editor.changeViewZones(viewZonesAccessor => { - let toDispose = []; - let lastLensLineNumber = -1; - this._lenses.forEach((lens) => { - if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) { - // invalid -> lens collapsed, attach range doesn't exist anymore - // line_number -> lenses should never be on the same line - toDispose.push(lens); - } - else { - lens.update(viewZonesAccessor); - lastLensLineNumber = lens.getLineNumber(); - } - }); - let helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__["CodeLensHelper"](); - toDispose.forEach((l) => { - l.dispose(helper, viewZonesAccessor); - this._lenses.splice(this._lenses.indexOf(l), 1); - }); - helper.commit(decorationsAccessor); - }); - }); - // Compute new `visible` code lenses - detectVisibleLenses.schedule(); - // Ask for all references again - scheduler.schedule(); - })); - this._localToDispose.add(this._editor.onDidScrollChange(e => { - if (e.scrollTopChanged && this._lenses.length > 0) { - detectVisibleLenses.schedule(); - } - })); - this._localToDispose.add(this._editor.onDidLayoutChange(() => { - detectVisibleLenses.schedule(); - })); - this._localToDispose.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["toDisposable"])(() => { - if (this._editor.getModel()) { - const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__["StableEditorScrollState"].capture(this._editor); - this._editor.changeDecorations(decorationsAccessor => { - this._editor.changeViewZones(viewZonesAccessor => { - this._disposeAllLenses(decorationsAccessor, viewZonesAccessor); - }); - }); - scrollState.restore(this._editor); - } - else { - // No accessors available - this._disposeAllLenses(undefined, undefined); - } - })); - this._localToDispose.add(this._editor.onMouseUp(e => { - if (e.target.type !== 9 /* CONTENT_WIDGET */) { - return; - } - let target = e.target.element; - if ((target === null || target === void 0 ? void 0 : target.tagName) === 'SPAN') { - target = target.parentElement; - } - if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') { - for (const lens of this._lenses) { - let command = lens.getCommand(target); - if (command) { - this._commandService.executeCommand(command.id, ...(command.arguments || [])).catch(err => this._notificationService.error(err)); - break; - } - } - } - })); - scheduler.schedule(); - } - _disposeAllLenses(decChangeAccessor, viewZoneChangeAccessor) { - const helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__["CodeLensHelper"](); - for (const lens of this._lenses) { - lens.dispose(helper, viewZoneChangeAccessor); - } - if (decChangeAccessor) { - helper.commit(decChangeAccessor); - } - this._lenses = []; - } - _renderCodeLensSymbols(symbols) { - if (!this._editor.hasModel()) { - return; - } - let maxLineNumber = this._editor.getModel().getLineCount(); - let groups = []; - let lastGroup; - for (let symbol of symbols.lenses) { - let line = symbol.symbol.range.startLineNumber; - if (line < 1 || line > maxLineNumber) { - // invalid code lens - continue; - } - else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) { - // on same line as previous - lastGroup.push(symbol); - } - else { - // on later line as previous - lastGroup = [symbol]; - groups.push(lastGroup); - } - } - const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_3__["StableEditorScrollState"].capture(this._editor); - this._editor.changeDecorations(decorationsAccessor => { - this._editor.changeViewZones(viewZoneAccessor => { - const helper = new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__["CodeLensHelper"](); - let codeLensIndex = 0; - let groupsIndex = 0; - while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) { - let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber; - let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber(); - if (codeLensLineNumber < symbolsLineNumber) { - this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor); - this._lenses.splice(codeLensIndex, 1); - } - else if (codeLensLineNumber === symbolsLineNumber) { - this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper); - groupsIndex++; - codeLensIndex++; - } - else { - this._lenses.splice(codeLensIndex, 0, new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__["CodeLensWidget"](groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, () => this._detectVisibleLenses && this._detectVisibleLenses.schedule())); - codeLensIndex++; - groupsIndex++; - } - } - // Delete extra code lenses - while (codeLensIndex < this._lenses.length) { - this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor); - this._lenses.splice(codeLensIndex, 1); - } - // Create extra symbols - while (groupsIndex < groups.length) { - this._lenses.push(new _codelensWidget_js__WEBPACK_IMPORTED_MODULE_7__["CodeLensWidget"](groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, () => this._detectVisibleLenses && this._detectVisibleLenses.schedule())); - groupsIndex++; - } - helper.commit(decorationsAccessor); - }); - }); - scrollState.restore(this._editor); - } - _onViewportChanged() { - if (this._currentResolveCodeLensSymbolsPromise) { - this._currentResolveCodeLensSymbolsPromise.cancel(); - this._currentResolveCodeLensSymbolsPromise = undefined; - } - const model = this._editor.getModel(); - if (!model) { - return; - } - const toResolve = []; - const lenses = []; - this._lenses.forEach((lens) => { - const request = lens.computeIfNecessary(model); - if (request) { - toResolve.push(request); - lenses.push(lens); - } - }); - if (toResolve.length === 0) { - return; - } - const resolvePromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => { - const promises = toResolve.map((request, i) => { - const resolvedSymbols = new Array(request.length); - const promises = request.map((request, i) => { - if (!request.symbol.command && typeof request.provider.resolveCodeLens === 'function') { - return Promise.resolve(request.provider.resolveCodeLens(model, request.symbol, token)).then(symbol => { - resolvedSymbols[i] = symbol; - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedExternalError"]); - } - else { - resolvedSymbols[i] = request.symbol; - return Promise.resolve(undefined); - } - }); - return Promise.all(promises).then(() => { - if (!token.isCancellationRequested && !lenses[i].isDisposed()) { - lenses[i].updateCommands(resolvedSymbols); - } - }); - }); - return Promise.all(promises); - }); - this._currentResolveCodeLensSymbolsPromise = resolvePromise; - this._currentResolveCodeLensSymbolsPromise.then(() => { - if (this._currentCodeLensModel) { // update the cached state with new resolved items - this._codeLensCache.put(model, this._currentCodeLensModel); - } - this._oldCodeLensModels.clear(); // dispose old models once we have updated the UI with the current model - if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) { - this._currentResolveCodeLensSymbolsPromise = undefined; - } - }, err => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(err); // can also be cancellation! - if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) { - this._currentResolveCodeLensSymbolsPromise = undefined; - } - }); - } - getLenses() { - return this._lenses; - } -}; -CodeLensContribution.ID = 'css.editor.codeLens'; -CodeLensContribution = __decorate([ - __param(1, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["ICommandService"]), - __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__["INotificationService"]), - __param(3, _codeLensCache_js__WEBPACK_IMPORTED_MODULE_10__["ICodeLensCache"]) -], CodeLensContribution); + svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) { + return color(d.data.key); + }).attr('stroke', 'black').style('stroke-width', '2px').style('opacity', 0.7); // Now add the percentage. + // Use the centroid method to get the best coordinates. -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(CodeLensContribution.ID, CodeLensContribution); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(class ShowLensesInCurrentLine extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'codelens.showLensesInCurrentLine', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_15__["EditorContextKeys"].hasCodeLensProvider, - label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_14__["localize"])('showLensOnLine', "Show CodeLens Commands For Current Line"), - alias: 'Show CodeLens Commands For Current Line', - }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (!editor.hasModel()) { - return; - } - const quickInputService = accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__["IQuickInputService"]); - const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["ICommandService"]); - const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_9__["INotificationService"]); - const lineNumber = editor.getSelection().positionLineNumber; - const codelensController = editor.getContribution(CodeLensContribution.ID); - const items = []; - for (let lens of codelensController.getLenses()) { - if (lens.getLineNumber() === lineNumber) { - for (let item of lens.getItems()) { - const { command } = item.symbol; - if (command) { - items.push({ - label: command.title, - command: command - }); - } - } - } - } - if (items.length === 0) { - // We dont want an empty picker - return; - } - const item = yield quickInputService.pick(items, { canPickMany: false }); - if (!item) { - // Nothing picked - return; - } - try { - yield commandService.executeCommand(item.command.id, ...(item.command.arguments || [])); - } - catch (err) { - notificationService.error(err); - } - }); - } -}); + svg.selectAll('mySlices').data(dataReady.filter(function (value) { + return value.data.value !== 0; + })).enter().append('text').text(function (d) { + return (d.data.value / sum * 100).toFixed(0) + '%'; + }).attr('transform', function (d) { + return 'translate(' + arcGenerator.centroid(d) + ')'; + }).style('text-anchor', 'middle').attr('class', 'slice').style('font-size', 17); + svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(height - 50) / 2).attr('class', 'pieTitleText'); // Add the legends/annotations for each section + var legend = svg.selectAll('.legend').data(color.domain()).enter().append('g').attr('class', 'legend').attr('transform', function (d, i) { + var height = legendRectSize + legendSpacing; + var offset = height * color.domain().length / 2; + var horz = 12 * legendRectSize; + var vert = i * height - offset; + return 'translate(' + horz + ',' + vert + ')'; + }); + legend.append('rect').attr('width', legendRectSize).attr('height', legendRectSize).style('fill', color).style('stroke', color); + legend.append('text').attr('x', legendRectSize + legendSpacing).attr('y', legendRectSize - legendSpacing).text(function (d) { + return d; + }); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error('Error while rendering info diagram'); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].error(e); + } +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./codelensWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css"); +/***/ "./src/diagrams/pie/styles.js": +/*!************************************!*\ + !*** ./src/diagrams/pie/styles.js ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(e){return".pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ".concat(e.taskTextDarkColor,";\n font-family: ").concat(e.fontFamily,";\n }\n .slice {\n font-family: ").concat(e.fontFamily,";\n fill: ").concat(e.textColor,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(e.taskTextDarkColor,";\n font-family: ").concat(e.fontFamily,";\n font-size: 17px;\n }\n")}},"./src/diagrams/requirement/parser/requirementDiagram.jison": +/*!******************************************************************!*\ + !*** ./src/diagrams/requirement/parser/requirementDiagram.jison ***! + \******************************************************************/ +/*! no static exports found */function(e,t,n){(function(e,i){var r=function(){var e=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},t=[1,3],n=[1,5],i=[1,14],r=[2,9],o=[1,18],s=[1,19],a=[1,20],l=[1,21],c=[1,22],d=[1,23],u=[1,16],h=[1,24],f=[1,25],g=[1,28],p=[66,67],m=[6,8,35,36,37,38,39,40,48,55,57,66,67],_=[5,14],b=[1,47],v=[1,48],y=[1,49],w=[1,50],C=[1,51],S=[1,52],k=[1,53],x=[57,58],L=[1,65],M=[1,61],D=[1,62],E=[1,63],T=[1,64],O=[1,66],N=[1,70],I=[1,71],A=[1,68],R=[1,69],P=[6,8,35,36,37,38,39,40,48,66,67],j={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,RD:5,NEWLINE:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"RD",6:"NEWLINE",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(e,t,n,i,r,o,s){var a=o.length-1;switch(r){case 5:i.parseDirective("%%{","open_directive");break;case 6:i.parseDirective(o[a],"type_directive");break;case 7:o[a]=o[a].trim().replace(/'/g,'"'),i.parseDirective(o[a],"arg_directive");break;case 8:i.parseDirective("}%%","close_directive","pie");break;case 9:this.$=[];break;case 14:i.addRequirement(o[a-3],o[a-4]);break;case 15:i.setNewReqId(o[a-2]);break;case 16:i.setNewReqText(o[a-2]);break;case 17:i.setNewReqRisk(o[a-2]);break;case 18:i.setNewReqVerifyMethod(o[a-2]);break;case 21:this.$=i.RequirementType.REQUIREMENT;break;case 22:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 23:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 24:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 25:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 26:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 27:this.$=i.RiskLevel.LOW_RISK;break;case 28:this.$=i.RiskLevel.MED_RISK;break;case 29:this.$=i.RiskLevel.HIGH_RISK;break;case 30:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 31:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 32:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 33:this.$=i.VerifyType.VERIFY_TEST;break;case 34:i.addElement(o[a-3]);break;case 35:i.setNewElementType(o[a-2]);break;case 36:i.setNewElementDocRef(o[a-2]);break;case 39:i.addRelationship(o[a-2],o[a],o[a-4]);break;case 40:i.addRelationship(o[a-2],o[a-4],o[a]);break;case 41:this.$=i.Relationships.CONTAINS;break;case 42:this.$=i.Relationships.COPIES;break;case 43:this.$=i.Relationships.DERIVES;break;case 44:this.$=i.Relationships.SATISFIES;break;case 45:this.$=i.Relationships.VERIFIES;break;case 46:this.$=i.Relationships.REFINES;break;case 47:this.$=i.Relationships.TRACES}},table:[{3:1,4:2,5:t,9:4,14:n},{1:[3]},{3:6,4:2,5:t,9:4,14:n},{6:[1,7]},{10:8,15:[1,9]},{15:[2,5]},{1:[2,1]},{6:i,7:10,8:r,18:11,19:12,20:13,21:15,27:17,35:o,36:s,37:a,38:l,39:c,40:d,48:u,66:h,67:f},{11:26,12:[1,27],17:g},e([12,17],[2,6]),{8:[1,29]},{6:i,7:30,8:r,18:11,19:12,20:13,21:15,27:17,35:o,36:s,37:a,38:l,39:c,40:d,48:u,66:h,67:f},{6:i,7:31,8:r,18:11,19:12,20:13,21:15,27:17,35:o,36:s,37:a,38:l,39:c,40:d,48:u,66:h,67:f},{6:i,7:32,8:r,18:11,19:12,20:13,21:15,27:17,35:o,36:s,37:a,38:l,39:c,40:d,48:u,66:h,67:f},{6:i,7:33,8:r,18:11,19:12,20:13,21:15,27:17,35:o,36:s,37:a,38:l,39:c,40:d,48:u,66:h,67:f},{22:34,66:[1,35],67:[1,36]},{49:37,66:[1,38],67:[1,39]},{55:[1,40],57:[1,41]},e(p,[2,21]),e(p,[2,22]),e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(m,[2,50]),e(m,[2,51]),e(_,[2,3]),{13:42,16:[1,43]},e(_,[2,8]),{1:[2,2]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{23:[1,44]},{23:[2,48]},{23:[2,49]},{23:[1,45]},{23:[2,54]},{23:[2,55]},{56:46,59:b,60:v,61:y,62:w,63:C,64:S,65:k},{56:54,59:b,60:v,61:y,62:w,63:C,64:S,65:k},{11:55,17:g},{17:[2,7]},{6:[1,56]},{6:[1,57]},{57:[1,58]},e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),e(x,[2,47]),{58:[1,59]},e(_,[2,4]),{6:L,24:60,25:M,28:D,30:E,32:T,34:O},{6:N,34:I,50:67,51:A,53:R},{27:72,66:h,67:f},{27:73,66:h,67:f},e(P,[2,14]),{26:[1,74]},{26:[1,75]},{26:[1,76]},{26:[1,77]},{6:L,24:78,25:M,28:D,30:E,32:T,34:O},e(P,[2,20]),e(P,[2,34]),{26:[1,79]},{26:[1,80]},{6:N,34:I,50:81,51:A,53:R},e(P,[2,38]),e(P,[2,39]),e(P,[2,40]),{27:82,66:h,67:f},{29:83,66:[1,84],67:[1,85]},{31:86,41:[1,87],42:[1,88],43:[1,89]},{33:90,44:[1,91],45:[1,92],46:[1,93],47:[1,94]},e(P,[2,19]),{52:95,66:[1,96],67:[1,97]},{54:98,66:[1,99],67:[1,100]},e(P,[2,37]),{6:[1,101]},{6:[1,102]},{6:[2,52]},{6:[2,53]},{6:[1,103]},{6:[2,27]},{6:[2,28]},{6:[2,29]},{6:[1,104]},{6:[2,30]},{6:[2,31]},{6:[2,32]},{6:[2,33]},{6:[1,105]},{6:[2,56]},{6:[2,57]},{6:[1,106]},{6:[2,58]},{6:[2,59]},{6:L,24:107,25:M,28:D,30:E,32:T,34:O},{6:L,24:108,25:M,28:D,30:E,32:T,34:O},{6:L,24:109,25:M,28:D,30:E,32:T,34:O},{6:L,24:110,25:M,28:D,30:E,32:T,34:O},{6:N,34:I,50:111,51:A,53:R},{6:N,34:I,50:112,51:A,53:R},e(P,[2,15]),e(P,[2,16]),e(P,[2,17]),e(P,[2,18]),e(P,[2,35]),e(P,[2,36])],defaultActions:{5:[2,5],6:[2,1],29:[2,2],30:[2,10],31:[2,11],32:[2,12],33:[2,13],35:[2,48],36:[2,49],38:[2,54],39:[2,55],43:[2,7],84:[2,52],85:[2,53],87:[2,27],88:[2,28],89:[2,29],91:[2,30],92:[2,31],93:[2,32],94:[2,33],96:[2,56],97:[2,57],99:[2,58],100:[2,59]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],i=[],r=[null],o=[],s=this.table,a="",l=0,c=0,d=0,u=2,h=1,f=o.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(p.yy[m]=this.yy[m]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var _=g.yylloc;o.push(_);var b=g.options&&g.options.ranges;function v(){var e;return"number"!=typeof(e=i.pop()||g.lex()||h)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,w,C,S,k,x,L,M,D,E={};;){if(C=n[n.length-1],this.defaultActions[C]?S=this.defaultActions[C]:(null==y&&(y=v()),S=s[C]&&s[C][y]),void 0===S||!S.length||!S[0]){var T="";for(x in D=[],s[C])this.terminals_[x]&&x>u&&D.push("'"+this.terminals_[x]+"'");T=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[y]||y,line:g.yylineno,loc:_,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+y);switch(S[0]){case 1:n.push(y),r.push(g.yytext),o.push(g.yylloc),n.push(S[1]),y=null,w?(y=w,w=null):(c=g.yyleng,a=g.yytext,l=g.yylineno,_=g.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[S[1]][1],E.$=r[r.length-L],E._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},b&&(E._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[a,c,l,p.yy,S[1],r,o].concat(f))))return k;L&&(n=n.slice(0,-1*L*2),r=r.slice(0,-1*L),o=o.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),r.push(E.$),o.push(E._$),M=s[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},F={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;ot[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,r[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,i){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 6;case 6:case 7:case 8:break;case 9:return 8;case 10:return 5;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return t.yytext=t.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function B(){this.yy={}}return j.lexer=F,B.prototype=j,j.Parser=B,new B}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)},t.main=function(i){i[1]||(console.log("Usage: "+i[0]+" FILE"),e.exit(1));var r=n(/*! fs */"./node_modules/node-libs-browser/mock/empty.js").readFileSync(n(/*! path */"./node_modules/path-browserify/index.js").normalize(i[1]),"utf8");return t.parser.parse(r)},n.c[n.s]===i&&t.main(e.argv.slice(1))}).call(this,n(/*! ./../../../../node_modules/process/browser.js */"./node_modules/process/browser.js"),n(/*! ./../../../../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./src/diagrams/requirement/requirementDb.js": +/*!***************************************************!*\ + !*** ./src/diagrams/requirement/requirementDb.js ***! + \***************************************************/ +/*! exports provided: parseDirective, default */function(e,t,n){"use strict";n.r(t),n.d(t,"parseDirective",(function(){return u}));var i=n(/*! ../../config */"./src/config.js"),r=n(/*! ../../logger */"./src/logger.js"),o=n(/*! ../../mermaidAPI */"./src/mermaidAPI.js"),s=[],a={},l={},c={},d={},u=function(e,t,n){o.default.parseDirective(this,e,t,n)};t.default={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:u,getConfig:function(){return i.getConfig().req},addRequirement:function(e,t){return void 0===l[e]&&(l[e]={name:e,type:t,id:a.id,text:a.text,risk:a.risk,verifyMethod:a.verifyMethod}),a={},l[e]},getRequirements:function(){return l},setNewReqId:function(e){void 0!==a&&(a.id=e)},setNewReqText:function(e){void 0!==a&&(a.text=e)},setNewReqRisk:function(e){void 0!==a&&(a.risk=e)},setNewReqVerifyMethod:function(e){void 0!==a&&(a.verifyMethod=e)},addElement:function(e){return void 0===d[e]&&(d[e]={name:e,type:c.type,docRef:c.docRef},r.log.info("Added new requirement: ",e)),c={},d[e]},getElements:function(){return d},setNewElementType:function(e){void 0!==c&&(c.type=e)},setNewElementDocRef:function(e){void 0!==c&&(c.docRef=e)},addRelationship:function(e,t,n){s.push({type:e,src:t,dst:n})},getRelationships:function(){return s},clear:function(){s=[],a={},l={},c={},d={}}}},"./src/diagrams/requirement/requirementMarkers.js": +/*!********************************************************!*\ + !*** ./src/diagrams/requirement/requirementMarkers.js ***! + \********************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var i={CONTAINS:"contains",ARROW:"arrow"};t.default={ReqMarkers:i,insertLineEndings:function(e,t){var n=e.append("defs").append("marker").attr("id",i.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("stroke",t.rect_border_color).attr("stroke-width",1).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke",t.rect_border_color).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke",t.rect_border_color).attr("stroke-width",1),e.append("defs").append("marker").attr("id",i.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d","M0,0 \n L".concat(t.line_height,",").concat(t.line_height/2," \n M").concat(t.line_height,",").concat(t.line_height/2," \n L0,").concat(t.line_height)).attr("stroke-width",1).attr("stroke",t.rect_border_color)}}},"./src/diagrams/requirement/requirementRenderer.js": +/*!*********************************************************!*\ + !*** ./src/diagrams/requirement/requirementRenderer.js ***! + \*********************************************************/ +/*! exports provided: setConf, drawReqs, drawElements, draw, default */function(e,t,n){"use strict";n.r(t),n.d(t,"setConf",(function(){return _})),n.d(t,"drawReqs",(function(){return C})),n.d(t,"drawElements",(function(){return S})),n.d(t,"draw",(function(){return x}));var i=n(/*! d3 */"d3"),r=n(/*! dagre */"dagre"),o=n.n(r),s=n(/*! graphlib */"graphlib"),a=n.n(s),l=n(/*! ../../config */"./src/config.js"),c=n(/*! ../../logger */"./src/logger.js"),d=n(/*! ../../utils */"./src/utils.js"),u=n(/*! ../common/common */"./src/diagrams/common/common.js"),h=n(/*! ./parser/requirementDiagram */"./src/diagrams/requirement/parser/requirementDiagram.jison"),f=n(/*! ./requirementDb */"./src/diagrams/requirement/requirementDb.js"),g=n(/*! ./requirementMarkers */"./src/diagrams/requirement/requirementMarkers.js"),p={},m=0,_=function(e){if(void 0!==e)for(var t=Object.keys(e),n=0;n30&&o<3;){var n=e.substring(0,30);t=(e=e.substring(30,e.length)).length,s[s.length]=n,o++}if(3==o){var i=s[s.length-1];s[s.length-1]=i.substring(0,i.length-4)+"..."}else s[s.length]=e;o=0})),s.forEach((function(e){r.append("tspan").attr("x",p.rect_padding).attr("dy",p.line_height).text(e)})),r},w=function(e,t,n,r){var o=n.edge(k(t.src),k(t.dst)),s=Object(i.line)().x((function(e){return e.x})).y((function(e){return e.y})),a=e.insert("path","#"+r).attr("class","er relationshipLine").attr("d",s(o.points)).attr("stroke",p.rect_border_color).attr("fill","none");t.type==f.default.Relationships.CONTAINS?a.attr("marker-start","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(a.attr("stroke-dasharray","10,7"),a.attr("marker-end","url("+u.default.getUrl(p.arrowMarkerAbsolute)+"#"+g.default.ReqMarkers.ARROW+"_line_ending)")),function(e,t,n,i){var r=t.node().getTotalLength(),o=t.node().getPointAtLength(.5*r),s="rel"+m;m++;var a=e.append("text").attr("class","er relationshipLabel").attr("id",s).attr("x",o.x).attr("y",o.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+n.fontFamily+"; font-size: "+n.fontSize+"px").text(i).node().getBBox();e.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",o.x-a.width/2).attr("y",o.y-a.height/2).attr("width",a.width).attr("height",a.height).attr("fill","white").attr("fill-opacity","85%")}(e,a,p,"<<".concat(t.type,">>"))},C=function(e,t,n){Object.keys(e).forEach((function(i){var r=e[i];i=k(i),console.log("reqName: ",i),c.log.info("Added new requirement: ",i);var o=n.append("g").attr("id",i),s=b(o,"req-"+i),a=[],l=v(o,i+"_title",["<<".concat(r.type,">>"),"".concat(r.name)]);a.push(l.titleNode);var d=y(o,i+"_body",["Id: ".concat(r.id),"Text: ".concat(r.text),"Risk: ".concat(r.risk),"Verification: ".concat(r.verifyMethod)],l.y);a.push(d);var u=s.node().getBBox();t.setNode(i,{width:u.width,height:u.height,shape:"rect",id:i})}))},S=function(e,t,n){Object.keys(e).forEach((function(i){var r=e[i],o=k(i),s=n.append("g").attr("id",o),a="element-"+o,l=b(s,a),c=[],d=v(s,a+"_title",["<>","".concat(i)]);c.push(d.titleNode);var u=y(s,a+"_body",["Type: ".concat(r.type||"Not Specified"),"Doc Ref: ".concat(r.docref||"None")],d.y);c.push(u);var h=l.node().getBBox();t.setNode(o,{width:h.width,height:h.height,shape:"rect",id:o})}))},k=function(e){return e.replace(/\s/g,"").replace(/\./g,"_")},x=function(e,t){h.parser.yy=f.default,h.parser.parse(e);var n=Object(i.select)("[id='".concat(t,"']"));g.default.insertLineEndings(n,p);var r,s,l=new a.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:p.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),c=f.default.getRequirements(),u=f.default.getElements(),m=f.default.getRelationships();C(c,l,n),S(u,l,n),function(e,t){e.forEach((function(e){var n=k(e.src),i=k(e.dst);t.setEdge(n,i,{relationship:e})}))}(m,l),o.a.layout(l),r=n,(s=l).nodes().forEach((function(e){void 0!==e&&void 0!==s.node(e)&&(r.select("#"+e),r.select("#"+e).attr("transform","translate("+(s.node(e).x-s.node(e).width/2)+","+(s.node(e).y-s.node(e).height/2)+" )"))})),m.forEach((function(e){w(n,e,l,t)}));var _=p.rect_padding,b=n.node().getBBox(),v=b.width+2*_,y=b.height+2*_;Object(d.configureSvgSize)(n,y,v,p.useMaxWidth),n.attr("viewBox","".concat(b.x-_," ").concat(b.y-_," ").concat(v," ").concat(y))};t.default={setConf:_,draw:x}},"./src/diagrams/requirement/styles.js": +/*!********************************************!*\ + !*** ./src/diagrams/requirement/styles.js ***! + \********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(){return""}},"./src/diagrams/sequence/parser/sequenceDiagram.jison": +/*!************************************************************!*\ + !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ +/* + Returns a Parser object of the following structure: -var options = {}; + Parser: { + yy: {} + } -options.insert = "head"; -options.singleton = false; + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codelensWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); -/***/ }), + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.js ***! - \*************************************************************************************/ -/*! exports provided: CodeLensHelper, CodeLensWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensHelper", function() { return CodeLensHelper; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLensWidget", function() { return CodeLensWidget; }); -/* harmony import */ var _codelensWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codelensWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,18],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,32],$Vi=[1,33],$Vj=[1,36],$Vk=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],$Vl=[1,44],$Vm=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],$Vn=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],$Vo=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],$Vp=[46,47,48],$Vq=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"SPACE":4,"NEWLINE":5,"directive":6,"SD":7,"document":8,"line":9,"statement":10,"openDirective":11,"typeDirective":12,"closeDirective":13,":":14,"argDirective":15,"participant":16,"actor":17,"AS":18,"restOfLine":19,"signal":20,"autonumber":21,"activate":22,"deactivate":23,"note_statement":24,"title":25,"text2":26,"loop":27,"end":28,"rect":29,"opt":30,"alt":31,"else_sections":32,"par":33,"par_sections":34,"and":35,"else":36,"note":37,"placement":38,"over":39,"actor_pair":40,"spaceList":41,",":42,"left_of":43,"right_of":44,"signaltype":45,"+":46,"-":47,"ACTOR":48,"SOLID_OPEN_ARROW":49,"DOTTED_OPEN_ARROW":50,"SOLID_ARROW":51,"DOTTED_ARROW":52,"SOLID_CROSS":53,"DOTTED_CROSS":54,"SOLID_POINT":55,"DOTTED_POINT":56,"TXT":57,"open_directive":58,"type_directive":59,"arg_directive":60,"close_directive":61,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ +var $0 = $$.length - 1; +switch (yystate) { +case 4: + yy.apply($$[$0]);return $$[$0]; +break; +case 5: + this.$ = [] +break; +case 6: +$$[$0-1].push($$[$0]);this.$ = $$[$0-1] +break; +case 7: case 8: + this.$ = $$[$0] +break; +case 9: + this.$=[]; +break; +case 12: +$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3]; +break; +case 13: +this.$=$$[$0-1]; +break; +case 15: +yy.enableSequenceNumbers() +break; +case 16: +this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}; +break; +case 17: +this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]}; +break; +case 19: +this.$=[{type:'setTitle', text:$$[$0-1]}] +break; +case 20: + $$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START}); + $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END}); + this.$=$$[$0-1]; +break; +case 21: + $$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END }); + this.$=$$[$0-1]; +break; +case 22: + $$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START}); + $$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END}); + this.$=$$[$0-1]; +break; +case 23: + // Alt start + $$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START}); + // Content in alt is already in $$[$0-1] + // End + $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END}); + this.$=$$[$0-1]; +break; +case 24: + // Parallel start + $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START}); + // Content in par is already in $$[$0-1] + // End + $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); + this.$=$$[$0-1]; +break; +case 27: + this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); +break; +case 29: + this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); +break; +case 30: + this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}]; +break; +case 31: -class CodeLensViewZone { - constructor(afterLineNumber, onHeight) { - this.afterLineNumber = afterLineNumber; - this._onHeight = onHeight; - this.heightInLines = 1; - this.suppressMouseDown = true; - this.domNode = document.createElement('div'); - } - onComputedHeight(height) { - if (this._lastHeight === undefined) { - this._lastHeight = height; - } - else if (this._lastHeight !== height) { - this._lastHeight = height; - this._onHeight(); - } - } -} -class CodeLensContentWidget { - constructor(editor, className, line) { - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = false; - this.suppressMouseDown = true; - this._commands = new Map(); - this._isEmpty = true; - this._editor = editor; - this._id = `codelens.widget-${(CodeLensContentWidget._idPool++)}`; - this.updatePosition(line); - this._domNode = document.createElement('span'); - this._domNode.className = `codelens-decoration ${className}`; - } - withCommands(lenses, animate) { - this._commands.clear(); - let innerHtml = ''; - let hasSymbol = false; - for (let i = 0; i < lenses.length; i++) { - const lens = lenses[i]; - if (!lens) { - continue; - } - hasSymbol = true; - if (lens.command) { - const title = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(lens.command.title)); - if (lens.command.id) { - innerHtml += `
    ${title}`; - this._commands.set(String(i), lens.command); - } - else { - innerHtml += `${title}`; - } - if (i + 1 < lenses.length) { - innerHtml += ' | '; - } - } - } - if (!hasSymbol) { - // symbols but no commands - this._domNode.innerHTML = 'no commands'; - } - else { - // symbols and commands - if (!innerHtml) { - innerHtml = '\u00a0'; - } - this._domNode.innerHTML = innerHtml; - if (this._isEmpty && animate) { - this._domNode.classList.add('fadein'); - } - this._isEmpty = false; - } - } - getCommand(link) { - return link.parentElement === this._domNode - ? this._commands.get(link.id) - : undefined; - } - getId() { - return this._id; - } - getDomNode() { - return this._domNode; - } - updatePosition(line) { - const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(line); - this._widgetPosition = { - position: { lineNumber: line, column: column }, - preference: [1 /* ABOVE */] - }; - } - getPosition() { - return this._widgetPosition || null; - } -} -CodeLensContentWidget._idPool = 0; -class CodeLensHelper { - constructor() { - this._removeDecorations = []; - this._addDecorations = []; - this._addDecorationsCallbacks = []; - } - addDecoration(decoration, callback) { - this._addDecorations.push(decoration); - this._addDecorationsCallbacks.push(callback); - } - removeDecoration(decorationId) { - this._removeDecorations.push(decorationId); - } - commit(changeAccessor) { - let resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); - for (let i = 0, len = resultingDecorations.length; i < len; i++) { - this._addDecorationsCallbacks[i](resultingDecorations[i]); - } - } + // Coerce actor_pair into a [to, from, ...] array + $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2); + $$[$0-2][0] = $$[$0-2][0].actor; + $$[$0-2][1] = $$[$0-2][1].actor; + this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}]; +break; +case 34: + this.$ = [$$[$0-2], $$[$0]]; +break; +case 35: + this.$ = $$[$0]; +break; +case 36: + this.$ = yy.PLACEMENT.LEFTOF; +break; +case 37: + this.$ = yy.PLACEMENT.RIGHTOF; +break; +case 38: + this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, + {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]} + ] +break; +case 39: + this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, + {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]} + ] +break; +case 40: + this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}] +break; +case 41: +this.$={type: 'addActor', actor:$$[$0]} +break; +case 42: + this.$ = yy.LINETYPE.SOLID_OPEN; +break; +case 43: + this.$ = yy.LINETYPE.DOTTED_OPEN; +break; +case 44: + this.$ = yy.LINETYPE.SOLID; +break; +case 45: + this.$ = yy.LINETYPE.DOTTED; +break; +case 46: + this.$ = yy.LINETYPE.SOLID_CROSS; +break; +case 47: + this.$ = yy.LINETYPE.DOTTED_CROSS; +break; +case 48: + this.$ = yy.LINETYPE.SOLID_POINT; +break; +case 49: + this.$ = yy.LINETYPE.DOTTED_POINT; +break; +case 50: +this.$ = yy.parseMessage($$[$0].trim().substring(1)) +break; +case 51: + yy.parseDirective('%%{', 'open_directive'); +break; +case 52: + yy.parseDirective($$[$0], 'type_directive'); +break; +case 53: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); +break; +case 54: + yy.parseDirective('}%%', 'close_directive', 'sequence'); +break; } -class CodeLensWidget { - constructor(data, editor, className, helper, viewZoneChangeAccessor, updateCallback) { - this._isDisposed = false; - this._editor = editor; - this._className = className; - this._data = data; - // create combined range, track all ranges with decorations, - // check if there is already something to render - this._decorationIds = []; - let range; - let lenses = []; - this._data.forEach((codeLensData, i) => { - if (codeLensData.symbol.command) { - lenses.push(codeLensData.symbol); - } - helper.addDecoration({ - range: codeLensData.symbol.range, - options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_4__["ModelDecorationOptions"].EMPTY - }, id => this._decorationIds[i] = id); - // the range contains all lenses on this line - if (!range) { - range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].lift(codeLensData.symbol.range); - } - else { - range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].plusRange(range, codeLensData.symbol.range); - } - }); - this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallback); - this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); - if (lenses.length > 0) { - this._createContentWidgetIfNecessary(); - this._contentWidget.withCommands(lenses, false); - } - } - _createContentWidgetIfNecessary() { - if (!this._contentWidget) { - this._contentWidget = new CodeLensContentWidget(this._editor, this._className, this._viewZone.afterLineNumber + 1); - this._editor.addContentWidget(this._contentWidget); - } - } - dispose(helper, viewZoneChangeAccessor) { - this._decorationIds.forEach(helper.removeDecoration, helper); - this._decorationIds = []; - if (viewZoneChangeAccessor) { - viewZoneChangeAccessor.removeZone(this._viewZoneId); - } - if (this._contentWidget) { - this._editor.removeContentWidget(this._contentWidget); - this._contentWidget = undefined; - } - this._isDisposed = true; - } - isDisposed() { - return this._isDisposed; - } - isValid() { - return this._decorationIds.some((id, i) => { - const range = this._editor.getModel().getDecorationRange(id); - const symbol = this._data[i].symbol; - return !!(range && _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].isEmpty(symbol.range) === range.isEmpty()); - }); - } - updateCodeLensSymbols(data, helper) { - this._decorationIds.forEach(helper.removeDecoration, helper); - this._decorationIds = []; - this._data = data; - this._data.forEach((codeLensData, i) => { - helper.addDecoration({ - range: codeLensData.symbol.range, - options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_4__["ModelDecorationOptions"].EMPTY - }, id => this._decorationIds[i] = id); - }); +}, +table: [{3:1,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,11:6,58:$V3},o([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],$V4,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{13:34,14:[1,35],61:$Vj},o([14,61],[2,52]),o($Vk,[2,6]),{6:30,10:37,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},o($Vk,[2,8]),o($Vk,[2,9]),{17:38,48:$Vi},{5:[1,39]},o($Vk,[2,15]),{17:40,48:$Vi},{17:41,48:$Vi},{5:[1,42]},{26:43,57:$Vl},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},o($Vk,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},o([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},o($Vk,[2,7]),{5:[1,67],18:[1,66]},o($Vk,[2,14]),{5:[1,68]},{5:[1,69]},o($Vk,[2,18]),{5:[1,70]},{5:[2,50]},o($Vm,$V4,{8:71}),o($Vm,$V4,{8:72}),o($Vm,$V4,{8:73}),o($Vn,$V4,{32:74,8:75}),o($Vo,$V4,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:$Vi},o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vp,[2,49]),{17:81,48:$Vi},{17:83,40:82,48:$Vi},{48:[2,36]},{48:[2,37]},o($Vq,[2,10]),{13:84,61:$Vj},{61:[2,53]},{19:[1,85]},o($Vk,[2,13]),o($Vk,[2,16]),o($Vk,[2,17]),o($Vk,[2,19]),{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,86],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,87],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[1,88],29:$Vd,30:$Ve,31:$Vf,33:$Vg,37:$Vh,48:$Vi,58:$V3},{28:[1,89]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,28],29:$Vd,30:$Ve,31:$Vf,33:$Vg,36:[1,90],37:$Vh,48:$Vi,58:$V3},{28:[1,91]},{4:$V5,5:$V6,6:30,9:14,10:16,11:6,16:$V7,17:31,20:19,21:$V8,22:$V9,23:$Va,24:23,25:$Vb,27:$Vc,28:[2,26],29:$Vd,30:$Ve,31:$Vf,33:$Vg,35:[1,92],37:$Vh,48:$Vi,58:$V3},{17:93,48:$Vi},{17:94,48:$Vi},{26:95,57:$Vl},{26:96,57:$Vl},{26:97,57:$Vl},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},o($Vk,[2,20]),o($Vk,[2,21]),o($Vk,[2,22]),o($Vk,[2,23]),{19:[1,101]},o($Vk,[2,24]),{19:[1,102]},{26:103,57:$Vl},{26:104,57:$Vl},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:$Vi},o($Vq,[2,11]),o($Vk,[2,12]),o($Vn,$V4,{8:75,32:106}),o($Vo,$V4,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}], +defaultActions: {7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - computeIfNecessary(model) { - if (!this._viewZone.domNode.hasAttribute('monaco-visible-view-zone')) { - return null; - } - // Read editor current state - for (let i = 0; i < this._decorationIds.length; i++) { - const range = model.getDecorationRange(this._decorationIds[i]); - if (range) { - this._data[i].symbol.range = range; - } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } - return this._data; } - updateCommands(symbols) { - this._createContentWidgetIfNecessary(); - this._contentWidget.withCommands(symbols, true); - for (let i = 0; i < this._data.length; i++) { - const resolved = symbols[i]; - if (resolved) { - const { symbol } = this._data[i]; - symbol.command = resolved.command || symbol.command; - } - } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; } - getCommand(link) { - var _a; - return (_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.getCommand(link); + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; } - getLineNumber() { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - if (range) { - return range.startLineNumber; - } - return -1; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; } - update(viewZoneChangeAccessor) { - if (this.isValid()) { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - if (range) { - this._viewZone.afterLineNumber = range.startLineNumber - 1; - viewZoneChangeAccessor.layoutZone(this._viewZoneId); - if (this._contentWidget) { - this._contentWidget.updatePosition(range.startLineNumber); - this._editor.layoutContentWidget(this._contentWidget); + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); } + token = self.symbols_[token] || token; } + return token; } - } - getItems() { - return this._data; - } -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["registerThemingParticipant"])((theme, collector) => { - const codeLensForeground = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorCodeLensForeground"]); - if (codeLensForeground) { - collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); - collector.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${codeLensForeground}; }`); - } - const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorActiveLinkForeground"]); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); - collector.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${activeLinkForeground} !important; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js ***! - \*******************************************************************************/ -/*! exports provided: getColors, getColorPresentations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColors", function() { return getColors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColorPresentations", function() { return getColorPresentations; }); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -function getColors(model, token) { - const colors = []; - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["ColorProviderRegistry"].ordered(model).reverse(); - const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, token)).then(result => { - if (Array.isArray(result)) { - for (let colorInfo of result) { - colors.push({ colorInfo, provider }); - } - } - })); - return Promise.all(promises).then(() => colors); -} -function getColorPresentations(model, colorInfo, provider, token) { - return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token)); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerLanguageCommand"])('_executeDocumentColorProvider', function (accessor, args) { - const { resource } = args; - if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"])) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])(); - } - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])(); - } - const rawCIs = []; - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["ColorProviderRegistry"].ordered(model).reverse(); - const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)).then(result => { - if (Array.isArray(result)) { - for (let ci of result) { - rawCIs.push({ range: ci.range, color: [ci.color.red, ci.color.green, ci.color.blue, ci.color.alpha] }); + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } + action = table[state] && table[state][symbol]; } - })); - return Promise.all(promises).then(() => rawCIs); -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerLanguageCommand"])('_executeColorPresentationProvider', function (accessor, args) { - const { resource, color, range } = args; - if (!(resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"]) || !Array.isArray(color) || color.length !== 4 || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].isIRange(range)) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])(); - } - const [red, green, blue, alpha] = color; - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_6__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["illegalArgument"])(); - } - const colorInfo = { - range, - color: { red, green, blue, alpha } - }; - const presentations = []; - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["ColorProviderRegistry"].ordered(model).reverse(); - const promises = providers.map(provider => Promise.resolve(provider.provideColorPresentations(model, colorInfo, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)).then(result => { - if (Array.isArray(result)) { - presentations.push(...result); - } - })); - return Promise.all(promises).then(() => presentations); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js ***! - \***************************************************************************************/ -/*! exports provided: ColorDetector */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorDetector", function() { return ColorDetector; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_hash_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/hash.js */ "./node_modules/monaco-editor/esm/vs/base/common/hash.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./color.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - -const MAX_DECORATORS = 500; -let ColorDetector = class ColorDetector extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(_editor, _codeEditorService, _configurationService) { - super(); - this._editor = _editor; - this._codeEditorService = _codeEditorService; - this._configurationService = _configurationService; - this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"]()); - this._decorationsIds = []; - this._colorDatas = new Map(); - this._colorDecoratorIds = []; - this._decorationsTypes = new Set(); - this._register(_editor.onDidChangeModel((e) => { - this._isEnabled = this.isEnabled(); - this.onModelChanged(); - })); - this._register(_editor.onDidChangeModelLanguage((e) => this.onModelChanged())); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["ColorProviderRegistry"].onDidChange((e) => this.onModelChanged())); - this._register(_editor.onDidChangeConfiguration((e) => { - let prevIsEnabled = this._isEnabled; - this._isEnabled = this.isEnabled(); - if (prevIsEnabled !== this._isEnabled) { - if (this._isEnabled) { - this.onModelChanged(); - } - else { - this.removeAllDecorations(); + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); } } - })); - this._timeoutTimer = null; - this._computePromise = null; - this._isEnabled = this.isEnabled(); - this.onModelChanged(); - } - isEnabled() { - const model = this._editor.getModel(); - if (!model) { - return false; - } - const languageId = model.getLanguageIdentifier(); - // handle deprecated settings. [languageId].colorDecorators.enable - const deprecatedConfig = this._configurationService.getValue(languageId.language); - if (deprecatedConfig) { - const colorDecorators = deprecatedConfig['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable'); - if (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) { - return colorDecorators['enable']; + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); } - return this._editor.getOption(12 /* colorDecorators */); - } - static get(editor) { - return editor.getContribution(this.ID); - } - dispose() { - this.stop(); - this.removeAllDecorations(); - super.dispose(); - } - onModelChanged() { - this.stop(); - if (!this._isEnabled) { - return; - } - const model = this._editor.getModel(); - if (!model || !_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["ColorProviderRegistry"].has(model)) { - return; + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); } - this._localToDispose.add(this._editor.onDidChangeModelContent((e) => { - if (!this._timeoutTimer) { - this._timeoutTimer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"](); - this._timeoutTimer.cancelAndSet(() => { - this._timeoutTimer = null; - this.beginCompute(); - }, ColorDetector.RECOMPUTE_TIME); + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; } - })); - this.beginCompute(); - } - beginCompute() { - this._computePromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => { - const model = this._editor.getModel(); - if (!model) { - return Promise.resolve([]); + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; } - return Object(_color_js__WEBPACK_IMPORTED_MODULE_10__["getColors"])(model, token); - }); - this._computePromise.then((colorInfos) => { - this.updateDecorations(colorInfos); - this.updateColorDecorators(colorInfos); - this._computePromise = null; - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedError"]); - } - stop() { - if (this._timeoutTimer) { - this._timeoutTimer.cancel(); - this._timeoutTimer = null; - } - if (this._computePromise) { - this._computePromise.cancel(); - this._computePromise = null; - } - this._localToDispose.clear(); - } - updateDecorations(colorDatas) { - const decorations = colorDatas.map(c => ({ - range: { - startLineNumber: c.colorInfo.range.startLineNumber, - startColumn: c.colorInfo.range.startColumn, - endLineNumber: c.colorInfo.range.endLineNumber, - endColumn: c.colorInfo.range.endColumn - }, - options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__["ModelDecorationOptions"].EMPTY - })); - this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, decorations); - this._colorDatas = new Map(); - this._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i])); - } - updateColorDecorators(colorData) { - let decorations = []; - let newDecorationsTypes = {}; - for (let i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) { - const { red, green, blue, alpha } = colorData[i].colorInfo.color; - const rgba = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha); - let subKey = Object(_base_common_hash_js__WEBPACK_IMPORTED_MODULE_3__["hash"])(`rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`).toString(16); - let color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`; - let key = 'colorBox-' + subKey; - if (!this._decorationsTypes.has(key) && !newDecorationsTypes[key]) { - this._codeEditorService.registerDecorationType(key, { - before: { - contentText: ' ', - border: 'solid 0.1em #000', - margin: '0.1em 0.2em 0 0.2em', - width: '0.8em', - height: '0.8em', - backgroundColor: color - }, - dark: { - before: { - border: 'solid 0.1em #eee' - } - } - }, undefined, this._editor); + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; } - newDecorationsTypes[key] = true; - decorations.push({ - range: { - startLineNumber: colorData[i].colorInfo.range.startLineNumber, - startColumn: colorData[i].colorInfo.range.startColumn, - endLineNumber: colorData[i].colorInfo.range.endLineNumber, - endColumn: colorData[i].colorInfo.range.endColumn - }, - options: this._codeEditorService.resolveDecorationOptions(key, true) - }); - } - this._decorationsTypes.forEach(subType => { - if (!newDecorationsTypes[subType]) { - this._codeEditorService.removeDecorationType(subType); + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } - }); - this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, decorations); - } - removeAllDecorations() { - this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []); - this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []); - this._decorationsTypes.forEach(subType => { - this._codeEditorService.removeDecorationType(subType); - }); - } - getColorData(position) { - const model = this._editor.getModel(); - if (!model) { - return null; - } - const decorations = model - .getDecorationsInRange(_common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].fromPositions(position, position)) - .filter(d => this._colorDatas.has(d.id)); - if (decorations.length === 0) { - return null; + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } - return this._colorDatas.get(decorations[0].id); } -}; -ColorDetector.ID = 'editor.contrib.colorDetector'; -ColorDetector.RECOMPUTE_TIME = 1000; // ms -ColorDetector = __decorate([ - __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]), - __param(2, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__["IConfigurationService"]) -], ColorDetector); - -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorContribution"])(ColorDetector.ID, ColorDetector); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css ***! - \**************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./colorPicker.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_colorPicker_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + return true; +}}; -/***/ }), +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js ***! - \******************************************************************************************/ -/*! exports provided: ColorPickerModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +EOF:1, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPickerModel", function() { return ColorPickerModel; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, -class ColorPickerModel { - constructor(color, availableColorPresentations, presentationIndex) { - this.presentationIndex = presentationIndex; - this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onColorFlushed = this._onColorFlushed.event; - this._onDidChangeColor = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChangeColor = this._onDidChangeColor.event; - this._onDidChangePresentation = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChangePresentation = this._onDidChangePresentation.event; - this.originalColor = color; - this._color = color; - this._colorPresentations = availableColorPresentations; - } - get color() { - return this._color; - } - set color(color) { - if (this._color.equals(color)) { - return; +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; } - this._color = color; - this._onDidChangeColor.fire(color); - } - get presentation() { return this.colorPresentations[this.presentationIndex]; } - get colorPresentations() { - return this._colorPresentations; - } - set colorPresentations(colorPresentations) { - this._colorPresentations = colorPresentations; - if (this.presentationIndex > colorPresentations.length - 1) { - this.presentationIndex = 0; + this.offset = 0; + return this; + }, + +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; } - this._onDidChangePresentation.fire(this.presentation); - } - selectNextColorPresentation() { - this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length; - this.flushColor(); - this._onDidChangePresentation.fire(this.presentation); - } - guessColorPresentation(color, originalText) { - for (let i = 0; i < this.colorPresentations.length; i++) { - if (originalText.toLowerCase() === this.colorPresentations[i].label) { - this.presentationIndex = i; - this._onDidChangePresentation.fire(this.presentation); - break; - } + if (this.options.ranges) { + this.yylloc.range[1]++; } - } - flushColor() { - this._onColorFlushed.fire(this._color); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js ***! - \*******************************************************************************************/ -/*! exports provided: ColorPickerHeader, ColorPickerBody, ColorPickerWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPickerHeader", function() { return ColorPickerHeader; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPickerBody", function() { return ColorPickerBody; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPickerWidget", function() { return ColorPickerWidget; }); -/* harmony import */ var _colorPicker_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorPicker.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); -/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - + this._input = this._input.slice(1); + return ch; + }, +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; -const $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]; -class ColorPickerHeader extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(container, model, themeService) { - super(); - this.model = model; - this.domNode = $('.colorpicker-header'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, this.domNode); - this.pickedColorNode = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, $('.picked-color')); - const colorBox = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, $('.original-color')); - colorBox.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].Format.CSS.format(this.model.originalColor) || ''; - this.backgroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__["editorHoverBackground"]) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].white; - this._register(Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_9__["registerThemingParticipant"])((theme, collector) => { - this.backgroundColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_8__["editorHoverBackground"]) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].white; - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](this.pickedColorNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].CLICK, () => this.model.selectNextColorPresentation())); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](colorBox, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].CLICK, () => { - this.model.color = this.model.originalColor; - this.model.flushColor(); - })); - this._register(model.onDidChangeColor(this.onDidChangeColor, this)); - this._register(model.onDidChangePresentation(this.onDidChangePresentation, this)); - this.pickedColorNode.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].Format.CSS.format(model.color) || ''; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this.pickedColorNode, 'light', model.color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : model.color.isLighter()); - } - onDidChangeColor(color) { - this.pickedColorNode.style.backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].Format.CSS.format(color) || ''; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this.pickedColorNode, 'light', color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : color.isLighter()); - this.onDidChangePresentation(); - } - onDidChangePresentation() { - this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : ''; - } -} -class ColorPickerBody extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(container, model, pixelRatio) { - super(); - this.model = model; - this.pixelRatio = pixelRatio; - this.domNode = $('.colorpicker-body'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, this.domNode); - this.saturationBox = new SaturationBox(this.domNode, this.model, this.pixelRatio); - this._register(this.saturationBox); - this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange, this)); - this._register(this.saturationBox.onColorFlushed(this.flushColor, this)); - this.opacityStrip = new OpacityStrip(this.domNode, this.model); - this._register(this.opacityStrip); - this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange, this)); - this._register(this.opacityStrip.onColorFlushed(this.flushColor, this)); - this.hueStrip = new HueStrip(this.domNode, this.model); - this._register(this.hueStrip); - this._register(this.hueStrip.onDidChange(this.onDidHueChange, this)); - this._register(this.hueStrip.onColorFlushed(this.flushColor, this)); - } - flushColor() { - this.model.flushColor(); - } - onDidSaturationValueChange({ s, v }) { - const hsva = this.model.color.hsva; - this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["HSVA"](hsva.h, s, v, hsva.a)); - } - onDidOpacityChange(a) { - const hsva = this.model.color.hsva; - this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["HSVA"](hsva.h, hsva.s, hsva.v, a)); - } - onDidHueChange(value) { - const hsva = this.model.color.hsva; - const h = (1 - value) * 360; - this.model.color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["HSVA"](h === 360 ? 0 : h, hsva.s, hsva.v, hsva.a)); - } - layout() { - this.saturationBox.layout(); - this.opacityStrip.layout(); - this.hueStrip.layout(); - } -} -class SaturationBox extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(container, model, pixelRatio) { - super(); - this.model = model; - this.pixelRatio = pixelRatio; - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); - this.onColorFlushed = this._onColorFlushed.event; - this.domNode = $('.saturation-wrap'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, this.domNode); - // Create canvas, draw selected color - this.canvas = document.createElement('canvas'); - this.canvas.className = 'saturation-box'; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, this.canvas); - // Add selection circle - this.selection = $('.saturation-selection'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, this.selection); - this.layout(); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableGenericMouseDownListner"](this.domNode, e => this.onMouseDown(e))); - this._register(this.model.onDidChangeColor(this.onDidChangeColor, this)); - this.monitor = null; - } - onMouseDown(e) { - this.monitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["GlobalMouseMoveMonitor"]()); - const origin = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getDomNodePagePosition"](this.domNode); - if (e.target !== this.selection) { - this.onDidChangePosition(e.offsetX, e.offsetY); - } - this.monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["standardMouseMoveMerger"], event => this.onDidChangePosition(event.posx - origin.left, event.posy - origin.top), () => null); - const mouseUpListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableGenericMouseUpListner"](document, () => { - this._onColorFlushed.fire(); - mouseUpListener.dispose(); - if (this.monitor) { - this.monitor.stopMonitoring(true); - this.monitor = null; - } - }, true); - } - onDidChangePosition(left, top) { - const s = Math.max(0, Math.min(1, left / this.width)); - const v = Math.max(0, Math.min(1, 1 - (top / this.height))); - this.paintSelection(s, v); - this._onDidChange.fire({ s, v }); - } - layout() { - this.width = this.domNode.offsetWidth; - this.height = this.domNode.offsetHeight; - this.canvas.width = this.width * this.pixelRatio; - this.canvas.height = this.height * this.pixelRatio; - this.paint(); - const hsva = this.model.color.hsva; - this.paintSelection(hsva.s, hsva.v); - } - paint() { - const hsva = this.model.color.hsva; - const saturatedColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["HSVA"](hsva.h, 1, 1, 1)); - const ctx = this.canvas.getContext('2d'); - const whiteGradient = ctx.createLinearGradient(0, 0, this.canvas.width, 0); - whiteGradient.addColorStop(0, 'rgba(255, 255, 255, 1)'); - whiteGradient.addColorStop(0.5, 'rgba(255, 255, 255, 0.5)'); - whiteGradient.addColorStop(1, 'rgba(255, 255, 255, 0)'); - const blackGradient = ctx.createLinearGradient(0, 0, 0, this.canvas.height); - blackGradient.addColorStop(0, 'rgba(0, 0, 0, 0)'); - blackGradient.addColorStop(1, 'rgba(0, 0, 0, 1)'); - ctx.rect(0, 0, this.canvas.width, this.canvas.height); - ctx.fillStyle = _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"].Format.CSS.format(saturatedColor); - ctx.fill(); - ctx.fillStyle = whiteGradient; - ctx.fill(); - ctx.fillStyle = blackGradient; - ctx.fill(); - } - paintSelection(s, v) { - this.selection.style.left = `${s * this.width}px`; - this.selection.style.top = `${this.height - v * this.height}px`; - } - onDidChangeColor() { - if (this.monitor && this.monitor.isMonitoring()) { - return; - } - this.paint(); - } -} -class Strip extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(container, model) { - super(); - this.model = model; - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._onColorFlushed = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); - this.onColorFlushed = this._onColorFlushed.event; - this.domNode = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.strip')); - this.overlay = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, $('.overlay')); - this.slider = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.domNode, $('.slider')); - this.slider.style.top = `0px`; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableGenericMouseDownListner"](this.domNode, e => this.onMouseDown(e))); - this.layout(); - } - layout() { - this.height = this.domNode.offsetHeight - this.slider.offsetHeight; - const value = this.getValue(this.model.color); - this.updateSliderPosition(value); - } - onMouseDown(e) { - const monitor = this._register(new _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["GlobalMouseMoveMonitor"]()); - const origin = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getDomNodePagePosition"](this.domNode); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'grabbing'); - if (e.target !== this.slider) { - this.onDidChangeTop(e.offsetY); + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; } - monitor.startMonitoring(e.target, e.buttons, _base_browser_globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_3__["standardMouseMoveMerger"], event => this.onDidChangeTop(event.posy - origin.top), () => null); - const mouseUpListener = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableGenericMouseUpListner"](document, () => { - this._onColorFlushed.fire(); - mouseUpListener.dispose(); - monitor.stopMonitoring(true); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'grabbing'); - }, true); - } - onDidChangeTop(top) { - const value = Math.max(0, Math.min(1, 1 - (top / this.height))); - this.updateSliderPosition(value); - this._onDidChange.fire(value); - } - updateSliderPosition(value) { - this.slider.style.top = `${(1 - value) * this.height}px`; - } -} -class OpacityStrip extends Strip { - constructor(container, model) { - super(container, model); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'opacity-strip'); - this._register(model.onDidChangeColor(this.onDidChangeColor, this)); - this.onDidChangeColor(this.model.color); - } - onDidChangeColor(color) { - const { r, g, b } = color.rgba; - const opaque = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["RGBA"](r, g, b, 1)); - const transparent = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_5__["RGBA"](r, g, b, 0)); - this.overlay.style.background = `linear-gradient(to bottom, ${opaque} 0%, ${transparent} 100%)`; - } - getValue(color) { - return color.hsva.a; - } -} -class HueStrip extends Strip { - constructor(container, model) { - super(container, model); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'hue-strip'); - } - getValue(color) { - return 1 - (color.hsva.h / 360); - } -} -class ColorPickerWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_4__["Widget"] { - constructor(container, model, pixelRatio, themeService) { - super(); - this.model = model; - this.pixelRatio = pixelRatio; - this._register(Object(_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__["onDidChangeZoomLevel"])(() => this.layout())); - const element = $('.colorpicker-widget'); - container.appendChild(element); - const header = new ColorPickerHeader(element, this.model, themeService); - this.body = new ColorPickerBody(element, this.model, this.pixelRatio); - this._register(header); - this._register(this.body); - } - layout() { - this.body.layout(); - } -} + this.yyleng = this.yytext.length; + return this; + }, +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, -/***/ }), +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js ***! - \*****************************************************************************************/ -/*! exports provided: BlockCommentCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + } + return this; + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BlockCommentCommand", function() { return BlockCommentCommand; }); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; -class BlockCommentCommand { - constructor(selection, insertSpace) { - this._selection = selection; - this._insertSpace = insertSpace; - this._usedEndToken = null; - } - static _haystackHasNeedleAtOffset(haystack, needle, offset) { - if (offset < 0) { - return false; - } - const needleLength = needle.length; - const haystackLength = haystack.length; - if (offset + needleLength > haystackLength) { - return false; - } - for (let i = 0; i < needleLength; i++) { - const codeA = haystack.charCodeAt(offset + i); - const codeB = needle.charCodeAt(i); - if (codeA === codeB) { - continue; - } - if (codeA >= 65 /* A */ && codeA <= 90 /* Z */ && codeA + 32 === codeB) { - // codeA is upper-case variant of codeB - continue; - } - if (codeB >= 65 /* A */ && codeB <= 90 /* Z */ && codeB + 32 === codeA) { - // codeB is upper-case variant of codeA - continue; + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); } - return false; } - return true; - } - _createOperationsForBlockComment(selection, startToken, endToken, insertSpace, model, builder) { - const startLineNumber = selection.startLineNumber; - const startColumn = selection.startColumn; - const endLineNumber = selection.endLineNumber; - const endColumn = selection.endColumn; - const startLineText = model.getLineContent(startLineNumber); - const endLineText = model.getLineContent(endLineNumber); - let startTokenIndex = startLineText.lastIndexOf(startToken, startColumn - 1 + startToken.length); - let endTokenIndex = endLineText.indexOf(endToken, endColumn - 1 - endToken.length); - if (startTokenIndex !== -1 && endTokenIndex !== -1) { - if (startLineNumber === endLineNumber) { - const lineBetweenTokens = startLineText.substring(startTokenIndex + startToken.length, endTokenIndex); - if (lineBetweenTokens.indexOf(endToken) >= 0) { - // force to add a block comment - startTokenIndex = -1; - endTokenIndex = -1; - } - } - else { - const startLineAfterStartToken = startLineText.substring(startTokenIndex + startToken.length); - const endLineBeforeEndToken = endLineText.substring(0, endTokenIndex); - if (startLineAfterStartToken.indexOf(endToken) >= 0 || endLineBeforeEndToken.indexOf(endToken) >= 0) { - // force to add a block comment - startTokenIndex = -1; - endTokenIndex = -1; - } - } + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; } - let ops; - if (startTokenIndex !== -1 && endTokenIndex !== -1) { - // Consider spaces as part of the comment tokens - if (insertSpace && startTokenIndex + startToken.length < startLineText.length && startLineText.charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) { - // Pretend the start token contains a trailing space - startToken = startToken + ' '; - } - if (insertSpace && endTokenIndex > 0 && endLineText.charCodeAt(endTokenIndex - 1) === 32 /* Space */) { - // Pretend the end token contains a leading space - endToken = ' ' + endToken; - endTokenIndex -= 1; - } - ops = BlockCommentCommand._createRemoveBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken); + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; } - else { - ops = BlockCommentCommand._createAddBlockCommentOperations(selection, startToken, endToken, this._insertSpace); - this._usedEndToken = ops.length === 1 ? endToken : null; + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; } - for (const op of ops) { - builder.addTrackedEditOperation(op.range, op.text); + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. } - } - static _createRemoveBlockCommentOperations(r, startToken, endToken) { - let res = []; - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].isEmpty(r)) { - // Remove block comment start - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](r.startLineNumber, r.startColumn - startToken.length, r.startLineNumber, r.startColumn))); - // Remove block comment end - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](r.endLineNumber, r.endColumn, r.endLineNumber, r.endColumn + endToken.length))); + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; } - else { - // Remove both continuously - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](r.startLineNumber, r.startColumn - startToken.length, r.endLineNumber, r.endColumn + endToken.length))); + if (!this._input) { + this.done = true; } - return res; - } - static _createAddBlockCommentOperations(r, startToken, endToken, insertSpace) { - let res = []; - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].isEmpty(r)) { - // Insert block comment start - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](r.startLineNumber, r.startColumn), startToken + (insertSpace ? ' ' : ''))); - // Insert block comment end - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_1__["Position"](r.endLineNumber, r.endColumn), (insertSpace ? ' ' : '') + endToken)); + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; } - else { - // Insert both continuously - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].replace(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn), startToken + ' ' + endToken)); - } - return res; - } - getEditOperations(model, builder) { - const startLineNumber = this._selection.startLineNumber; - const startColumn = this._selection.startColumn; - model.tokenizeIfCheap(startLineNumber); - const languageId = model.getLanguageIdAtPosition(startLineNumber, startColumn); - const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__["LanguageConfigurationRegistry"].getComments(languageId); - if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) { - // Mode does not support block comments - return; + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } } - this._createOperationsForBlockComment(this._selection, config.blockCommentStartToken, config.blockCommentEndToken, this._insertSpace, model, builder); - } - computeCursorState(model, helper) { - const inverseEditOperations = helper.getInverseEditOperations(); - if (inverseEditOperations.length === 2) { - const startTokenEditOperation = inverseEditOperations[0]; - const endTokenEditOperation = inverseEditOperations[1]; - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](startTokenEditOperation.range.endLineNumber, startTokenEditOperation.range.endColumn, endTokenEditOperation.range.startLineNumber, endTokenEditOperation.range.startColumn); + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - else { - const srcRange = inverseEditOperations[0].range; - const deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](srcRange.endLineNumber, srcRange.endColumn + deltaColumn, srcRange.endLineNumber, srcRange.endColumn + deltaColumn); + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); } - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js ***! - \*****************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./blockCommentCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js"); -/* harmony import */ var _lineCommentCommand_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineCommentCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + }, +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, -class CommentLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor(type, opts) { - super(opts); - this._type = type; - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const model = editor.getModel(); - const commands = []; - const selections = editor.getSelections(); - const modelOptions = model.getOptions(); - const commentsOptions = editor.getOption(14 /* comments */); - for (const selection of selections) { - commands.push(new _lineCommentCommand_js__WEBPACK_IMPORTED_MODULE_5__["LineCommentCommand"](selection, modelOptions.tabSize, this._type, commentsOptions.insertSpace, commentsOptions.ignoreEmptyLines)); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -class ToggleCommentLineAction extends CommentLineAction { - constructor() { - super(0 /* Toggle */, { - id: 'editor.action.commentLine', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comment.line', "Toggle Line Comment"), - alias: 'Toggle Line Comment', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["MenuId"].MenubarEditMenu, - group: '5_insert', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miToggleLineComment', comment: ['&& denotes a mnemonic'] }, "&&Toggle Line Comment"), - order: 1 - } - }); - } +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0: this.begin('open_directive'); return 58; +break; +case 1: this.begin('type_directive'); return 59; +break; +case 2: this.popState(); this.begin('arg_directive'); return 14; +break; +case 3: this.popState(); this.popState(); return 61; +break; +case 4:return 60; +break; +case 5:return 5; +break; +case 6:/* skip all whitespace */ +break; +case 7:/* skip same-line whitespace */ +break; +case 8:/* skip comments */ +break; +case 9:/* skip comments */ +break; +case 10:/* skip comments */ +break; +case 11: this.begin('ID'); return 16; +break; +case 12: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 48; +break; +case 13: this.popState(); this.popState(); this.begin('LINE'); return 18; +break; +case 14: this.popState(); this.popState(); return 5; +break; +case 15: this.begin('LINE'); return 27; +break; +case 16: this.begin('LINE'); return 29; +break; +case 17: this.begin('LINE'); return 30; +break; +case 18: this.begin('LINE'); return 31; +break; +case 19: this.begin('LINE'); return 36; +break; +case 20: this.begin('LINE'); return 33; +break; +case 21: this.begin('LINE'); return 35; +break; +case 22: this.popState(); return 19; +break; +case 23:return 28; +break; +case 24:return 43; +break; +case 25:return 44; +break; +case 26:return 39; +break; +case 27:return 37; +break; +case 28: this.begin('ID'); return 22; +break; +case 29: this.begin('ID'); return 23; +break; +case 30:return 25; +break; +case 31:return 7; +break; +case 32:return 21; +break; +case 33:return 42; +break; +case 34:return 5; +break; +case 35: yy_.yytext = yy_.yytext.trim(); return 48; +break; +case 36:return 51; +break; +case 37:return 52; +break; +case 38:return 49; +break; +case 39:return 50; +break; +case 40:return 53; +break; +case 41:return 54; +break; +case 42:return 55; +break; +case 43:return 56; +break; +case 44:return 57; +break; +case 45:return 46; +break; +case 46:return 47; +break; +case 47:return 5; +break; +case 48:return 'INVALID'; +break; } -class AddLineCommentAction extends CommentLineAction { - constructor() { - super(1 /* ForceAdd */, { - id: 'editor.action.addCommentLine', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comment.line.add', "Add Line Comment"), - alias: 'Add Line Comment', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 33 /* KEY_C */), - weight: 100 /* EditorContrib */ - } - }); - } +}, +rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i], +conditions: {"open_directive":{"rules":[1,8],"inclusive":false},"type_directive":{"rules":[2,3,8],"inclusive":false},"arg_directive":{"rules":[3,4,8],"inclusive":false},"ID":{"rules":[7,8,12],"inclusive":false},"ALIAS":{"rules":[7,8,13,14],"inclusive":false},"LINE":{"rules":[7,8,22],"inclusive":false},"INITIAL":{"rules":[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; } -class RemoveLineCommentAction extends CommentLineAction { - constructor() { - super(2 /* ForceRemove */, { - id: 'editor.action.removeCommentLine', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comment.line.remove', "Remove Line Comment"), - alias: 'Remove Line Comment', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 51 /* KEY_U */), - weight: 100 /* EditorContrib */ - } - }); +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -class BlockCommentAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.blockComment', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('comment.block', "Toggle Block Comment"), - alias: 'Toggle Block Comment', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 31 /* KEY_A */, - linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 31 /* KEY_A */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["MenuId"].MenubarEditMenu, - group: '5_insert', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miToggleBlockComment', comment: ['&& denotes a mnemonic'] }, "Toggle &&Block Comment"), - order: 2 - } - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const commentsOptions = editor.getOption(14 /* comments */); - const commands = []; - const selections = editor.getSelections(); - for (const selection of selections) { - commands.push(new _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_4__["BlockCommentCommand"](selection, commentsOptions.insertSpace)); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(ToggleCommentLineAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(AddLineCommentAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(RemoveLineCommentAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(BlockCommentAction); - +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/comment/lineCommentCommand.js ***! - \****************************************************************************************/ -/*! exports provided: LineCommentCommand */ +/***/ "./src/diagrams/sequence/sequenceDb.js": +/*!*********************************************!*\ + !*** ./src/diagrams/sequence/sequenceDb.js ***! + \*********************************************/ +/*! exports provided: parseDirective, addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, getTitleWrapped, enableSequenceNumbers, showSequenceNumbers, setWrap, autoWrap, clear, parseMessage, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineCommentCommand", function() { return LineCommentCommand; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blockCommentCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/blockCommentCommand.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitleWrapped", function() { return getTitleWrapped; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableSequenceNumbers", function() { return enableSequenceNumbers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSequenceNumbers", function() { return showSequenceNumbers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWrap", function() { return setWrap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autoWrap", function() { return autoWrap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMessage", function() { return parseMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; }); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +var prevActor = undefined; +var actors = {}; +var messages = []; +var notes = []; +var title = ''; +var titleWrapped = false; +var sequenceNumbersEnabled = false; +var wrapEnabled = false; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__["default"].parseDirective(this, statement, context, type); +}; +var addActor = function addActor(id, name, description) { + // Don't allow description nulling + var old = actors[id]; + if (old && name === old.name && description == null) return; // Don't allow null descriptions, either + if (description == null || description.text == null) { + description = { + text: name, + wrap: null + }; + } + actors[id] = { + name: name, + description: description.text, + wrap: description.wrap === undefined && autoWrap() || !!description.wrap, + prevActor: prevActor + }; + if (prevActor && actors[prevActor]) { + actors[prevActor].nextActor = id; + } -class LineCommentCommand { - constructor(selection, tabSize, type, insertSpace, ignoreEmptyLines) { - this._selection = selection; - this._tabSize = tabSize; - this._type = type; - this._insertSpace = insertSpace; - this._selectionId = null; - this._deltaColumn = 0; - this._moveEndPositionDown = false; - this._ignoreEmptyLines = ignoreEmptyLines; - } - /** - * Do an initial pass over the lines and gather info about the line comment string. - * Returns null if any of the lines doesn't support a line comment string. - */ - static _gatherPreflightCommentStrings(model, startLineNumber, endLineNumber) { - model.tokenizeIfCheap(startLineNumber); - const languageId = model.getLanguageIdAtPosition(startLineNumber, 1); - const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getComments(languageId); - const commentStr = (config ? config.lineCommentToken : null); - if (!commentStr) { - // Mode does not support line comments - return null; - } - let lines = []; - for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) { - lines[i] = { - ignore: false, - commentStr: commentStr, - commentStrOffset: 0, - commentStrLength: commentStr.length - }; - } - return lines; - } - /** - * Analyze lines and decide which lines are relevant and what the toggle should do. - * Also, build up several offsets and lengths useful in the generation of editor operations. - */ - static _analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines) { - let onlyWhitespaceLines = true; - let shouldRemoveComments; - if (type === 0 /* Toggle */) { - shouldRemoveComments = true; - } - else if (type === 1 /* ForceAdd */) { - shouldRemoveComments = false; - } - else { - shouldRemoveComments = true; - } - for (let i = 0, lineCount = lines.length; i < lineCount; i++) { - const lineData = lines[i]; - const lineNumber = startLineNumber + i; - const lineContent = model.getLineContent(lineNumber); - const lineContentStartOffset = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineContent); - if (lineContentStartOffset === -1) { - // Empty or whitespace only line - lineData.ignore = ignoreEmptyLines; - lineData.commentStrOffset = lineContent.length; - continue; - } - onlyWhitespaceLines = false; - lineData.ignore = false; - lineData.commentStrOffset = lineContentStartOffset; - if (shouldRemoveComments && !_blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__["BlockCommentCommand"]._haystackHasNeedleAtOffset(lineContent, lineData.commentStr, lineContentStartOffset)) { - if (type === 0 /* Toggle */) { - // Every line so far has been a line comment, but this one is not - shouldRemoveComments = false; - } - else if (type === 1 /* ForceAdd */) { - // Will not happen - } - else { - lineData.ignore = true; - } - } - if (shouldRemoveComments && insertSpace) { - // Remove a following space if present - const commentStrEndOffset = lineContentStartOffset + lineData.commentStrLength; - if (commentStrEndOffset < lineContent.length && lineContent.charCodeAt(commentStrEndOffset) === 32 /* Space */) { - lineData.commentStrLength += 1; - } - } - } - if (type === 0 /* Toggle */ && onlyWhitespaceLines) { - // For only whitespace lines, we insert comments - shouldRemoveComments = false; - // Also, no longer ignore them - for (let i = 0, lineCount = lines.length; i < lineCount; i++) { - lines[i].ignore = false; - } - } - return { - supported: true, - shouldRemoveComments: shouldRemoveComments, - lines: lines - }; - } - /** - * Analyze all lines and decide exactly what to do => not supported | insert line comments | remove line comments - */ - static _gatherPreflightData(type, insertSpace, model, startLineNumber, endLineNumber, ignoreEmptyLines) { - const lines = LineCommentCommand._gatherPreflightCommentStrings(model, startLineNumber, endLineNumber); - if (lines === null) { - return { - supported: false - }; - } - return LineCommentCommand._analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines); - } - /** - * Given a successful analysis, execute either insert line comments, either remove line comments - */ - _executeLineComments(model, builder, data, s) { - let ops; - if (data.shouldRemoveComments) { - ops = LineCommentCommand._createRemoveLineCommentsOperations(data.lines, s.startLineNumber); - } - else { - LineCommentCommand._normalizeInsertionPoint(model, data.lines, s.startLineNumber, this._tabSize); - ops = this._createAddLineCommentsOperations(data.lines, s.startLineNumber); - } - const cursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](s.positionLineNumber, s.positionColumn); - for (let i = 0, len = ops.length; i < len; i++) { - builder.addEditOperation(ops[i].range, ops[i].text); - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].isEmpty(ops[i].range) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].getStartPosition(ops[i].range).equals(cursorPosition)) { - const lineContent = model.getLineContent(cursorPosition.lineNumber); - if (lineContent.length + 1 === cursorPosition.column) { - this._deltaColumn = (ops[i].text || '').length; - } - } - } - this._selectionId = builder.trackSelection(s); - } - _attemptRemoveBlockComment(model, s, startToken, endToken) { - let startLineNumber = s.startLineNumber; - let endLineNumber = s.endLineNumber; - let startTokenAllowedBeforeColumn = endToken.length + Math.max(model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.startColumn); - let startTokenIndex = model.getLineContent(startLineNumber).lastIndexOf(startToken, startTokenAllowedBeforeColumn - 1); - let endTokenIndex = model.getLineContent(endLineNumber).indexOf(endToken, s.endColumn - 1 - startToken.length); - if (startTokenIndex !== -1 && endTokenIndex === -1) { - endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length); - endLineNumber = startLineNumber; - } - if (startTokenIndex === -1 && endTokenIndex !== -1) { - startTokenIndex = model.getLineContent(endLineNumber).lastIndexOf(startToken, endTokenIndex); - startLineNumber = endLineNumber; - } - if (s.isEmpty() && (startTokenIndex === -1 || endTokenIndex === -1)) { - startTokenIndex = model.getLineContent(startLineNumber).indexOf(startToken); - if (startTokenIndex !== -1) { - endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length); - } - } - // We have to adjust to possible inner white space. - // For Space after startToken, add Space to startToken - range math will work out. - if (startTokenIndex !== -1 && model.getLineContent(startLineNumber).charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) { - startToken += ' '; - } - // For Space before endToken, add Space before endToken and shift index one left. - if (endTokenIndex !== -1 && model.getLineContent(endLineNumber).charCodeAt(endTokenIndex - 1) === 32 /* Space */) { - endToken = ' ' + endToken; - endTokenIndex -= 1; - } - if (startTokenIndex !== -1 && endTokenIndex !== -1) { - return _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__["BlockCommentCommand"]._createRemoveBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken); - } - return null; - } - /** - * Given an unsuccessful analysis, delegate to the block comment command - */ - _executeBlockComment(model, builder, s) { - model.tokenizeIfCheap(s.startLineNumber); - let languageId = model.getLanguageIdAtPosition(s.startLineNumber, 1); - let config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getComments(languageId); - if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) { - // Mode does not support block comments - return; - } - const startToken = config.blockCommentStartToken; - const endToken = config.blockCommentEndToken; - let ops = this._attemptRemoveBlockComment(model, s, startToken, endToken); - if (!ops) { - if (s.isEmpty()) { - const lineContent = model.getLineContent(s.startLineNumber); - let firstNonWhitespaceIndex = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["firstNonWhitespaceIndex"](lineContent); - if (firstNonWhitespaceIndex === -1) { - // Line is empty or contains only whitespace - firstNonWhitespaceIndex = lineContent.length; - } - ops = _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__["BlockCommentCommand"]._createAddBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](s.startLineNumber, firstNonWhitespaceIndex + 1, s.startLineNumber, lineContent.length + 1), startToken, endToken, this._insertSpace); - } - else { - ops = _blockCommentCommand_js__WEBPACK_IMPORTED_MODULE_6__["BlockCommentCommand"]._createAddBlockCommentOperations(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](s.startLineNumber, model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), startToken, endToken, this._insertSpace); - } - if (ops.length === 1) { - // Leave cursor after token and Space - this._deltaColumn = startToken.length + 1; - } - } - this._selectionId = builder.trackSelection(s); - for (const op of ops) { - builder.addEditOperation(op.range, op.text); - } - } - getEditOperations(model, builder) { - let s = this._selection; - this._moveEndPositionDown = false; - if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { - this._moveEndPositionDown = true; - s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1)); - } - const data = LineCommentCommand._gatherPreflightData(this._type, this._insertSpace, model, s.startLineNumber, s.endLineNumber, this._ignoreEmptyLines); - if (data.supported) { - return this._executeLineComments(model, builder, data, s); - } - return this._executeBlockComment(model, builder, s); - } - computeCursorState(model, helper) { - let result = helper.getTrackedSelection(this._selectionId); - if (this._moveEndPositionDown) { - result = result.setEndPosition(result.endLineNumber + 1, 1); - } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__["Selection"](result.selectionStartLineNumber, result.selectionStartColumn + this._deltaColumn, result.positionLineNumber, result.positionColumn + this._deltaColumn); - } - /** - * Generate edit operations in the remove line comment case - */ - static _createRemoveLineCommentsOperations(lines, startLineNumber) { - let res = []; - for (let i = 0, len = lines.length; i < len; i++) { - const lineData = lines[i]; - if (lineData.ignore) { - continue; - } - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__["EditOperation"].delete(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"](startLineNumber + i, lineData.commentStrOffset + 1, startLineNumber + i, lineData.commentStrOffset + lineData.commentStrLength + 1))); - } - return res; - } - /** - * Generate edit operations in the add line comment case - */ - _createAddLineCommentsOperations(lines, startLineNumber) { - let res = []; - const afterCommentStr = this._insertSpace ? ' ' : ''; - for (let i = 0, len = lines.length; i < len; i++) { - const lineData = lines[i]; - if (lineData.ignore) { - continue; - } - res.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_1__["EditOperation"].insert(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](startLineNumber + i, lineData.commentStrOffset + 1), lineData.commentStr + afterCommentStr)); - } - return res; - } - static nextVisibleColumn(currentVisibleColumn, tabSize, isTab, columnSize) { - if (isTab) { - return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize)); - } - return currentVisibleColumn + columnSize; + prevActor = id; +}; + +var activationCount = function activationCount(part) { + var i; + var count = 0; + + for (i = 0; i < messages.length; i++) { + if (messages[i].type === LINETYPE.ACTIVE_START) { + if (messages[i].from.actor === part) { + count++; + } } - /** - * Adjust insertion points to have them vertically aligned in the add line comment case - */ - static _normalizeInsertionPoint(model, lines, startLineNumber, tabSize) { - let minVisibleColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - let j; - let lenJ; - for (let i = 0, len = lines.length; i < len; i++) { - if (lines[i].ignore) { - continue; - } - const lineContent = model.getLineContent(startLineNumber + i); - let currentVisibleColumn = 0; - for (let j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) { - currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1); - } - if (currentVisibleColumn < minVisibleColumn) { - minVisibleColumn = currentVisibleColumn; - } - } - minVisibleColumn = Math.floor(minVisibleColumn / tabSize) * tabSize; - for (let i = 0, len = lines.length; i < len; i++) { - if (lines[i].ignore) { - continue; - } - const lineContent = model.getLineContent(startLineNumber + i); - let currentVisibleColumn = 0; - for (j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) { - currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1); - } - if (currentVisibleColumn > minVisibleColumn) { - lines[i].commentStrOffset = j - 1; - } - else { - lines[i].commentStrOffset = j; - } - } + + if (messages[i].type === LINETYPE.ACTIVE_END) { + if (messages[i].from.actor === part) { + count--; + } } -} + } + return count; +}; -/***/ }), +var addMessage = function addMessage(idFrom, idTo, message, answer) { + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === undefined && autoWrap() || !!message.wrap, + answer: answer + }); +}; +var addSignal = function addSignal(idFrom, idTo) { + var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { + text: undefined, + wrap: undefined + }; + var messageType = arguments.length > 3 ? arguments[3] : undefined; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js ***! - \*************************************************************************************/ -/*! exports provided: ContextMenuController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (messageType === LINETYPE.ACTIVE_END) { + var cnt = activationCount(idFrom.actor); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextMenuController", function() { return ContextMenuController; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; + if (cnt < 1) { + // Bail out as there is an activation signal from an inactive participant + var error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')'); + error.hash = { + text: '->>-', + token: '->>-', + line: '1', + loc: { + first_line: 1, + last_line: 1, + first_column: 1, + last_column: 1 + }, + expected: ["'ACTIVE_PARTICIPANT'"] + }; + throw error; + } + } + + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === undefined && autoWrap() || !!message.wrap, + type: messageType + }); + return true; +}; +var getMessages = function getMessages() { + return messages; }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } +var getActors = function getActors() { + return actors; }; +var getActor = function getActor(id) { + return actors[id]; +}; +var getActorKeys = function getActorKeys() { + return Object.keys(actors); +}; +var getTitle = function getTitle() { + return title; +}; +var getTitleWrapped = function getTitleWrapped() { + return titleWrapped; +}; +var enableSequenceNumbers = function enableSequenceNumbers() { + sequenceNumbersEnabled = true; +}; +var showSequenceNumbers = function showSequenceNumbers() { + return sequenceNumbersEnabled; +}; +var setWrap = function setWrap(wrapSetting) { + wrapEnabled = wrapSetting; +}; +var autoWrap = function autoWrap() { + return wrapEnabled; +}; +var clear = function clear() { + actors = {}; + messages = []; +}; +var parseMessage = function parseMessage(str) { + var _str = str.trim(); + var message = { + text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(), + wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined + }; + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('parseMessage:', message); + return message; +}; +var LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 +}; +var ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +var PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +var addNote = function addNote(actor, placement, message) { + var note = { + actor: actor, + placement: placement, + message: message.text, + wrap: message.wrap === undefined && autoWrap() || !!message.wrap + }; // Coerce actor into a [to, from, ...] array + var actors = [].concat(actor, actor); + notes.push(note); + messages.push({ + from: actors[0], + to: actors[1], + message: message.text, + wrap: message.wrap === undefined && autoWrap() || !!message.wrap, + type: LINETYPE.NOTE, + placement: placement + }); +}; +var setTitle = function setTitle(titleWrap) { + title = titleWrap.text; + titleWrapped = titleWrap.wrap === undefined && autoWrap() || !!titleWrap.wrap; +}; +var apply = function apply(param) { + if (param instanceof Array) { + param.forEach(function (item) { + apply(item); + }); + } else { + switch (param.type) { + case 'addActor': + addActor(param.actor, param.actor, param.description); + break; + case 'activeStart': + addSignal(param.actor, undefined, undefined, param.signalType); + break; + case 'activeEnd': + addSignal(param.actor, undefined, undefined, param.signalType); + break; + case 'addNote': + addNote(param.actor, param.placement, param.text); + break; + case 'addMessage': + addSignal(param.from, param.to, param.msg, param.signalType); + break; + case 'loopStart': + addSignal(undefined, undefined, param.loopText, param.signalType); + break; + case 'loopEnd': + addSignal(undefined, undefined, undefined, param.signalType); + break; + case 'rectStart': + addSignal(undefined, undefined, param.color, param.signalType); + break; + case 'rectEnd': + addSignal(undefined, undefined, undefined, param.signalType); + break; -let ContextMenuController = class ContextMenuController { - constructor(editor, _contextMenuService, _contextViewService, _contextKeyService, _keybindingService, _menuService) { - this._contextMenuService = _contextMenuService; - this._contextViewService = _contextViewService; - this._contextKeyService = _contextKeyService; - this._keybindingService = _keybindingService; - this._menuService = _menuService; - this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._contextMenuIsBeingShownCount = 0; - this._editor = editor; - this._toDispose.add(this._editor.onContextMenu((e) => this._onContextMenu(e))); - this._toDispose.add(this._editor.onMouseWheel((e) => { - if (this._contextMenuIsBeingShownCount > 0) { - const view = this._contextViewService.getContextViewElement(); - const target = e.srcElement; - // Event triggers on shadow root host first - // Check if the context view is under this host before hiding it #103169 - if (!(target.shadowRoot && _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getShadowRoot"](view) === target.shadowRoot)) { - this._contextViewService.hideContextView(); - } - } - })); - this._toDispose.add(this._editor.onKeyDown((e) => { - if (e.keyCode === 58 /* ContextMenu */) { - // Chrome is funny like that - e.preventDefault(); - e.stopPropagation(); - this.showContextMenu(); - } - })); - } - static get(editor) { - return editor.getContribution(ContextMenuController.ID); - } - _onContextMenu(e) { - if (!this._editor.hasModel()) { - return; - } - if (!this._editor.getOption(15 /* contextmenu */)) { - this._editor.focus(); - // Ensure the cursor is at the position of the mouse click - if (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) { - this._editor.setPosition(e.target.position); - } - return; // Context menu is turned off through configuration - } - if (e.target.type === 12 /* OVERLAY_WIDGET */) { - return; // allow native menu on widgets to support right click on input field for example in find - } - e.event.preventDefault(); - if (e.target.type !== 6 /* CONTENT_TEXT */ && e.target.type !== 7 /* CONTENT_EMPTY */ && e.target.type !== 1 /* TEXTAREA */) { - return; // only support mouse click into text or native context menu key for now - } - // Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions - this._editor.focus(); - // Ensure the cursor is at the position of the mouse click - if (e.target.position) { - let hasSelectionAtPosition = false; - for (const selection of this._editor.getSelections()) { - if (selection.containsPosition(e.target.position)) { - hasSelectionAtPosition = true; - break; - } - } - if (!hasSelectionAtPosition) { - this._editor.setPosition(e.target.position); - } - } - // Unless the user triggerd the context menu through Shift+F10, use the mouse position as menu position - let anchor = null; - if (e.target.type !== 1 /* TEXTAREA */) { - anchor = { x: e.event.posx - 1, width: 2, y: e.event.posy - 1, height: 2 }; - } - // Show the context menu - this.showContextMenu(anchor); - } - showContextMenu(anchor) { - if (!this._editor.getOption(15 /* contextmenu */)) { - return; // Context menu is turned off through configuration - } - if (!this._editor.hasModel()) { - return; - } - if (!this._contextMenuService) { - this._editor.focus(); - return; // We need the context menu service to function - } - // Find actions available for menu - const menuActions = this._getMenuActions(this._editor.getModel(), _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["MenuId"].EditorContext); - // Show menu if we have actions to show - if (menuActions.length > 0) { - this._doShowContextMenu(menuActions, anchor); - } - } - _getMenuActions(model, menuId) { - const result = []; - // get menu groups - const menu = this._menuService.createMenu(menuId, this._contextKeyService); - const groups = menu.getActions({ arg: model.uri }); - menu.dispose(); - // translate them into other actions - for (let group of groups) { - const [, actions] = group; - let addedItems = 0; - for (const action of actions) { - if (action instanceof _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["SubmenuItemAction"]) { - const subActions = this._getMenuActions(model, action.item.submenu); - if (subActions.length > 0) { - result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["SubmenuAction"](action.id, action.label, subActions)); - addedItems++; - } - } - else { - result.push(action); - addedItems++; - } - } - if (addedItems) { - result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"]()); - } - } - if (result.length) { - result.pop(); // remove last separator - } - return result; - } - _doShowContextMenu(actions, anchor = null) { - if (!this._editor.hasModel()) { - return; - } - // Disable hover - const oldHoverSetting = this._editor.getOption(46 /* hover */); - this._editor.updateOptions({ - hover: { - enabled: false - } - }); - if (!anchor) { - // Ensure selection is visible - this._editor.revealPosition(this._editor.getPosition(), 1 /* Immediate */); - this._editor.render(); - const cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition()); - // Translate to absolute editor position - const editorCoords = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this._editor.getDomNode()); - const posx = editorCoords.left + cursorCoords.left; - const posy = editorCoords.top + cursorCoords.top + cursorCoords.height; - anchor = { x: posx, y: posy }; - } - // Show menu - this._contextMenuIsBeingShownCount++; - this._contextMenuService.showContextMenu({ - domForShadowRoot: this._editor.getDomNode(), - getAnchor: () => anchor, - getActions: () => actions, - getActionViewItem: (action) => { - const keybinding = this._keybindingFor(action); - if (keybinding) { - return new _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__["ActionViewItem"](action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true }); - } - const customActionViewItem = action; - if (typeof customActionViewItem.getActionViewItem === 'function') { - return customActionViewItem.getActionViewItem(); - } - return new _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_10__["ActionViewItem"](action, action, { icon: true, label: true, isMenu: true }); - }, - getKeyBinding: (action) => { - return this._keybindingFor(action); - }, - onHide: (wasCancelled) => { - this._contextMenuIsBeingShownCount--; - this._editor.focus(); - this._editor.updateOptions({ - hover: oldHoverSetting - }); - } - }); - } - _keybindingFor(action) { - return this._keybindingService.lookupKeybinding(action.id); - } - dispose() { - if (this._contextMenuIsBeingShownCount > 0) { - this._contextViewService.hideContextView(); - } - this._toDispose.dispose(); - } -}; -ContextMenuController.ID = 'editor.contrib.contextmenu'; -ContextMenuController = __decorate([ - __param(1, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__["IContextMenuService"]), - __param(2, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_8__["IContextViewService"]), - __param(3, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__["IContextKeyService"]), - __param(4, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__["IKeybindingService"]), - __param(5, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_6__["IMenuService"]) -], ContextMenuController); - -class ShowContextMenu extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.showContextMenu', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('action.showContextMenu.label', "Show Editor Context Menu"), - alias: 'Show Editor Context Menu', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 68 /* F10 */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - let contribution = ContextMenuController.get(editor); - contribution.showContextMenu(); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(ContextMenuController.ID, ContextMenuController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(ShowContextMenu); + case 'optStart': + addSignal(undefined, undefined, param.optText, param.signalType); + break; + case 'optEnd': + addSignal(undefined, undefined, undefined, param.signalType); + break; -/***/ }), + case 'altStart': + addSignal(undefined, undefined, param.altText, param.signalType); + break; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js ***! - \***********************************************************************************/ -/*! exports provided: CursorUndoRedoController, CursorUndo, CursorRedo */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case 'else': + addSignal(undefined, undefined, param.altText, param.signalType); + break; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorUndoRedoController", function() { return CursorUndoRedoController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorUndo", function() { return CursorUndo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorRedo", function() { return CursorRedo; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + case 'altEnd': + addSignal(undefined, undefined, undefined, param.signalType); + break; + case 'setTitle': + setTitle(param.text); + break; + case 'parStart': + addSignal(undefined, undefined, param.parText, param.signalType); + break; + case 'and': + addSignal(undefined, undefined, param.parText, param.signalType); + break; -class CursorState { - constructor(selections) { - this.selections = selections; - } - equals(other) { - const thisLen = this.selections.length; - const otherLen = other.selections.length; - if (thisLen !== otherLen) { - return false; - } - for (let i = 0; i < thisLen; i++) { - if (!this.selections[i].equalsSelection(other.selections[i])) { - return false; - } - } - return true; - } -} -class StackElement { - constructor(cursorState, scrollTop, scrollLeft) { - this.cursorState = cursorState; - this.scrollTop = scrollTop; - this.scrollLeft = scrollLeft; - } -} -class CursorUndoRedoController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editor) { - super(); - this._editor = editor; - this._isCursorUndoRedo = false; - this._undoStack = []; - this._redoStack = []; - this._register(editor.onDidChangeModel((e) => { - this._undoStack = []; - this._redoStack = []; - })); - this._register(editor.onDidChangeModelContent((e) => { - this._undoStack = []; - this._redoStack = []; - })); - this._register(editor.onDidChangeCursorSelection((e) => { - if (this._isCursorUndoRedo) { - return; - } - if (!e.oldSelections) { - return; - } - if (e.oldModelVersionId !== e.modelVersionId) { - return; - } - const prevState = new CursorState(e.oldSelections); - const isEqualToLastUndoStack = (this._undoStack.length > 0 && this._undoStack[this._undoStack.length - 1].cursorState.equals(prevState)); - if (!isEqualToLastUndoStack) { - this._undoStack.push(new StackElement(prevState, editor.getScrollTop(), editor.getScrollLeft())); - this._redoStack = []; - if (this._undoStack.length > 50) { - // keep the cursor undo stack bounded - this._undoStack.shift(); - } - } - })); - } - static get(editor) { - return editor.getContribution(CursorUndoRedoController.ID); - } - cursorUndo() { - if (!this._editor.hasModel() || this._undoStack.length === 0) { - return; - } - this._redoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())); - this._applyState(this._undoStack.pop()); - } - cursorRedo() { - if (!this._editor.hasModel() || this._redoStack.length === 0) { - return; - } - this._undoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft())); - this._applyState(this._redoStack.pop()); - } - _applyState(stackElement) { - this._isCursorUndoRedo = true; - this._editor.setSelections(stackElement.cursorState.selections); - this._editor.setScrollPosition({ - scrollTop: stackElement.scrollTop, - scrollLeft: stackElement.scrollLeft - }); - this._isCursorUndoRedo = false; - } -} -CursorUndoRedoController.ID = 'editor.contrib.cursorUndoRedoController'; -class CursorUndo extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor() { - super({ - id: 'cursorUndo', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursor.undo', "Cursor Undo"), - alias: 'Cursor Undo', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 51 /* KEY_U */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor, args) { - CursorUndoRedoController.get(editor).cursorUndo(); - } -} -class CursorRedo extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor() { - super({ - id: 'cursorRedo', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cursor.redo', "Cursor Redo"), - alias: 'Cursor Redo', - precondition: undefined - }); - } - run(accessor, editor, args) { - CursorUndoRedoController.get(editor).cursorRedo(); + case 'parEnd': + addSignal(undefined, undefined, undefined, param.signalType); + break; } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorContribution"])(CursorUndoRedoController.ID, CursorUndoRedoController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(CursorUndo); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(CursorRedo); - + } +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + addActor: addActor, + addMessage: addMessage, + addSignal: addSignal, + autoWrap: autoWrap, + setWrap: setWrap, + enableSequenceNumbers: enableSequenceNumbers, + showSequenceNumbers: showSequenceNumbers, + getMessages: getMessages, + getActors: getActors, + getActor: getActor, + getActorKeys: getActorKeys, + getTitle: getTitle, + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_1__["getConfig"]().sequence; + }, + getTitleWrapped: getTitleWrapped, + clear: clear, + parseMessage: parseMessage, + LINETYPE: LINETYPE, + ARROWTYPE: ARROWTYPE, + PLACEMENT: PLACEMENT, + addNote: addNote, + setTitle: setTitle, + apply: apply +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css ***! - \**********************************************************************/ -/*! exports provided: default */ +/***/ "./src/diagrams/sequence/sequenceRenderer.js": +/*!***************************************************!*\ + !*** ./src/diagrams/sequence/sequenceRenderer.js ***! + \***************************************************/ +/*! exports provided: bounds, drawActors, setConf, draw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./dnd.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison"); +/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); - -var options = {}; -options.insert = "head"; -options.singleton = false; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_dnd_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); -/***/ }), +_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_5__["default"]; +var conf = {}; +var bounds = { + data: { + startx: undefined, + stopx: undefined, + starty: undefined, + stopy: undefined + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function getHeight() { + return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map(function (actor) { + return actor.height || 0; + })) + (this.loops.length === 0 ? 0 : this.loops.map(function (it) { + return it.height || 0; + }).reduce(function (acc, h) { + return acc + h; + })) + (this.messages.length === 0 ? 0 : this.messages.map(function (it) { + return it.height || 0; + }).reduce(function (acc, h) { + return acc + h; + })) + (this.notes.length === 0 ? 0 : this.notes.map(function (it) { + return it.height || 0; + }).reduce(function (acc, h) { + return acc + h; + })); + }, + clear: function clear() { + this.actors = []; + this.loops = []; + this.messages = []; + this.notes = []; + }, + addActor: function addActor(actorModel) { + this.actors.push(actorModel); + }, + addLoop: function addLoop(loopModel) { + this.loops.push(loopModel); + }, + addMessage: function addMessage(msgModel) { + this.messages.push(msgModel); + }, + addNote: function addNote(noteModel) { + this.notes.push(noteModel); + }, + lastActor: function lastActor() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function lastLoop() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function lastMessage() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function lastNote() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + loops: [], + messages: [], + notes: [] + }, + init: function init() { + this.sequenceItems = []; + this.activations = []; + this.models.clear(); + this.data = { + startx: undefined, + stopx: undefined, + starty: undefined, + stopy: undefined + }; + this.verticalPos = 0; + setConf(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getConfig()); + }, + updateVal: function updateVal(obj, key, val, fun) { + if (typeof obj[key] === 'undefined') { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function updateBounds(startx, starty, stopx, stopy) { + var _self = this; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js": -/*!*********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js ***! - \*********************************************************************/ -/*! exports provided: DragAndDropController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var cnt = 0; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragAndDropController", function() { return DragAndDropController; }); -/* harmony import */ var _dnd_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dnd.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _dragAndDropCommand_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./dragAndDropCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems + var n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min); + _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max); + if (!(type === 'activation')) { + _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min); + _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min); -function hasTriggerModifier(e) { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - return e.altKey; - } - else { - return e.ctrlKey; - } -} -class DragAndDropController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editor) { - super(); - this._editor = editor; - this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(e))); - this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(e))); - this._register(this._editor.onMouseDrag((e) => this._onEditorMouseDrag(e))); - this._register(this._editor.onMouseDrop((e) => this._onEditorMouseDrop(e))); - this._register(this._editor.onKeyDown((e) => this.onEditorKeyDown(e))); - this._register(this._editor.onKeyUp((e) => this.onEditorKeyUp(e))); - this._register(this._editor.onDidBlurEditorWidget(() => this.onEditorBlur())); - this._register(this._editor.onDidBlurEditorText(() => this.onEditorBlur())); - this._dndDecorationIds = []; - this._mouseDown = false; - this._modifierPressed = false; - this._dragSelection = null; - } - onEditorBlur() { - this._removeDecoration(); - this._dragSelection = null; - this._mouseDown = false; - this._modifierPressed = false; - } - onEditorKeyDown(e) { - if (!this._editor.getOption(25 /* dragAndDrop */) || this._editor.getOption(13 /* columnSelection */)) { - return; - } - if (hasTriggerModifier(e)) { - this._modifierPressed = true; - } - if (this._mouseDown && hasTriggerModifier(e)) { - this._editor.updateOptions({ - mouseStyle: 'copy' - }); - } - } - onEditorKeyUp(e) { - if (!this._editor.getOption(25 /* dragAndDrop */) || this._editor.getOption(13 /* columnSelection */)) { - return; - } - if (hasTriggerModifier(e)) { - this._modifierPressed = false; - } - if (this._mouseDown && e.keyCode === DragAndDropController.TRIGGER_KEY_VALUE) { - this._editor.updateOptions({ - mouseStyle: 'default' - }); - } - } - _onEditorMouseDown(mouseEvent) { - this._mouseDown = true; - } - _onEditorMouseUp(mouseEvent) { - this._mouseDown = false; - // Whenever users release the mouse, the drag and drop operation should finish and the cursor should revert to text. - this._editor.updateOptions({ - mouseStyle: 'text' - }); - } - _onEditorMouseDrag(mouseEvent) { - let target = mouseEvent.target; - if (this._dragSelection === null) { - const selections = this._editor.getSelections() || []; - let possibleSelections = selections.filter(selection => target.position && selection.containsPosition(target.position)); - if (possibleSelections.length === 1) { - this._dragSelection = possibleSelections[0]; - } - else { - return; - } - } - if (hasTriggerModifier(mouseEvent.event)) { - this._editor.updateOptions({ - mouseStyle: 'copy' - }); - } - else { - this._editor.updateOptions({ - mouseStyle: 'default' - }); - } - if (target.position) { - if (this._dragSelection.containsPosition(target.position)) { - this._removeDecoration(); - } - else { - this.showAt(target.position); - } - } - } - _onEditorMouseDrop(mouseEvent) { - if (mouseEvent.target && (this._hitContent(mouseEvent.target) || this._hitMargin(mouseEvent.target)) && mouseEvent.target.position) { - let newCursorPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_4__["Position"](mouseEvent.target.position.lineNumber, mouseEvent.target.position.column); - if (this._dragSelection === null) { - let newSelections = null; - if (mouseEvent.event.shiftKey) { - let primarySelection = this._editor.getSelection(); - if (primarySelection) { - const { selectionStartLineNumber, selectionStartColumn } = primarySelection; - newSelections = [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"](selectionStartLineNumber, selectionStartColumn, newCursorPosition.lineNumber, newCursorPosition.column)]; - } - } - else { - newSelections = (this._editor.getSelections() || []).map(selection => { - if (selection.containsPosition(newCursorPosition)) { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"](newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column); - } - else { - return selection; - } - }); - } - // Use `mouse` as the source instead of `api`. - this._editor.setSelections(newSelections || [], 'mouse'); - } - else if (!this._dragSelection.containsPosition(newCursorPosition) || - ((hasTriggerModifier(mouseEvent.event) || - this._modifierPressed) && (this._dragSelection.getEndPosition().equals(newCursorPosition) || this._dragSelection.getStartPosition().equals(newCursorPosition)) // we allow users to paste content beside the selection - )) { - this._editor.pushUndoStop(); - this._editor.executeCommand(DragAndDropController.ID, new _dragAndDropCommand_js__WEBPACK_IMPORTED_MODULE_7__["DragAndDropCommand"](this._dragSelection, newCursorPosition, hasTriggerModifier(mouseEvent.event) || this._modifierPressed)); - this._editor.pushUndoStop(); - } + _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max); } - this._editor.updateOptions({ - mouseStyle: 'text' - }); - this._removeDecoration(); - this._dragSelection = null; - this._mouseDown = false; - } - showAt(position) { - let newDecorations = [{ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber, position.column, position.lineNumber, position.column), - options: DragAndDropController._DECORATION_OPTIONS - }]; - this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, newDecorations); - this._editor.revealPosition(position, 1 /* Immediate */); - } - _removeDecoration() { - this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, []); - } - _hitContent(target) { - return target.type === 6 /* CONTENT_TEXT */ || - target.type === 7 /* CONTENT_EMPTY */; - } - _hitMargin(target) { - return target.type === 2 /* GUTTER_GLYPH_MARGIN */ || - target.type === 3 /* GUTTER_LINE_NUMBERS */ || - target.type === 4 /* GUTTER_LINE_DECORATIONS */; - } - dispose() { - this._removeDecoration(); - this._dragSelection = null; - this._mouseDown = false; - this._modifierPressed = false; - super.dispose(); + }; } -} -DragAndDropController.ID = 'editor.contrib.dragAndDrop'; -DragAndDropController.TRIGGER_KEY_VALUE = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 6 /* Alt */ : 5 /* Ctrl */; -DragAndDropController._DECORATION_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__["ModelDecorationOptions"].register({ - className: 'dnd-target' -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorContribution"])(DragAndDropController.ID, DragAndDropController); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dragAndDropCommand.js ***! - \************************************************************************************/ -/*! exports provided: DragAndDropCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragAndDropCommand", function() { return DragAndDropCommand; }); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + this.sequenceItems.forEach(updateFn()); + this.activations.forEach(updateFn('activation')); + }, + insert: function insert(startx, starty, stopx, stopy) { + var _startx = Math.min(startx, stopx); -class DragAndDropCommand { - constructor(selection, targetPosition, copy) { - this.selection = selection; - this.targetPosition = targetPosition; - this.copy = copy; - this.targetSelection = null; - } - getEditOperations(model, builder) { - let text = model.getValueInRange(this.selection); - if (!this.copy) { - builder.addEditOperation(this.selection, null); - } - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), text); - if (this.selection.containsPosition(this.targetPosition) && !(this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) // we allow users to paste content beside the selection - )) { - this.targetSelection = this.selection; - return; - } - if (this.copy) { - this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? - this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : - this.selection.endColumn); - return; - } - if (this.targetPosition.lineNumber > this.selection.endLineNumber) { - // Drag the selection downwards - this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? - this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : - this.selection.endColumn); - return; - } - if (this.targetPosition.lineNumber < this.selection.endLineNumber) { - // Drag the selection upwards - this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? - this.targetPosition.column + this.selection.endColumn - this.selection.startColumn : - this.selection.endColumn); - return; - } - // The target position is at the same line as the selection's end position. - if (this.selection.endColumn <= this.targetPosition.column) { - // The target position is after the selection's end position - this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? - this.targetPosition.column - this.selection.endColumn + this.selection.startColumn : - this.targetPosition.column - this.selection.endColumn + this.selection.startColumn, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ? - this.targetPosition.column : - this.selection.endColumn); - } - else { - // The target position is before the selection's end position. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection. - this.targetSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn); - } - } - computeCursorState(model, helper) { - return this.targetSelection; - } -} - + var _stopx = Math.max(startx, stopx); -/***/ }), + var _starty = Math.min(starty, stopy); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css ***! - \************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _stopy = Math.max(starty, stopy); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_outlineTree_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./outlineTree.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css"); + this.updateVal(bounds.data, 'startx', _startx, Math.min); + this.updateVal(bounds.data, 'starty', _starty, Math.min); + this.updateVal(bounds.data, 'stopx', _stopx, Math.max); + this.updateVal(bounds.data, 'stopy', _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + newActivation: function newActivation(message, diagram, actors) { + var actorRect = actors[message.from.actor]; + var stackedSize = actorActivations(message.from.actor).length || 0; + var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + this.activations.push({ + startx: x, + starty: this.verticalPos + 2, + stopx: x + conf.activationWidth, + stopy: undefined, + actor: message.from.actor, + anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram) + }); + }, + endActivation: function endActivation(message) { + // find most recent activation for given actor + var lastActorActivationIdx = this.activations.map(function (activation) { + return activation.actor; + }).lastIndexOf(message.from.actor); + return this.activations.splice(lastActorActivationIdx, 1)[0]; + }, + createLoop: function createLoop() { + var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + message: undefined, + wrap: false, + width: undefined + }; + var fill = arguments.length > 1 ? arguments[1] : undefined; + return { + startx: undefined, + starty: this.verticalPos, + stopx: undefined, + stopy: undefined, + title: title.message, + wrap: title.wrap, + width: title.width, + height: 0, + fill: fill + }; + }, + newLoop: function newLoop() { + var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + message: undefined, + wrap: false, + width: undefined + }; + var fill = arguments.length > 1 ? arguments[1] : undefined; + this.sequenceItems.push(this.createLoop(title, fill)); + }, + endLoop: function endLoop() { + return this.sequenceItems.pop(); + }, + addSectionToLoop: function addSectionToLoop(message) { + var loop = this.sequenceItems.pop(); + loop.sections = loop.sections || []; + loop.sectionTitles = loop.sectionTitles || []; + loop.sections.push({ + y: bounds.getVerticalPos(), + height: 0 + }); + loop.sectionTitles.push(message); + this.sequenceItems.push(loop); + }, + bumpVerticalPos: function bumpVerticalPos(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = this.verticalPos; + }, + getVerticalPos: function getVerticalPos() { + return this.verticalPos; + }, + getBounds: function getBounds() { + return { + bounds: this.data, + models: this.models + }; + } +}; +/** + * Draws an note in the diagram with the attached line + * @param elem - The diagram to draw to. + * @param noteModel:{x: number, y: number, message: string, width: number} - startx: x axis start position, verticalPos: y axis position, messsage: the message to be shown, width: Set this with a custom width to override the default configured width. + */ - +var drawNote = function drawNote(elem, noteModel) { + bounds.bumpVerticalPos(conf.boxMargin); + noteModel.height = conf.boxMargin; + noteModel.starty = bounds.getVerticalPos(); + var rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect(); + rect.x = noteModel.startx; + rect.y = noteModel.starty; + rect.width = noteModel.width || conf.width; + rect.class = 'note'; + var g = elem.append('g'); + var rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect); + var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj(); + textObj.x = noteModel.startx; + textObj.y = noteModel.starty; + textObj.width = rect.width; + textObj.dy = '1em'; + textObj.text = noteModel.message; + textObj.class = 'noteText'; + textObj.fontFamily = conf.noteFontFamily; + textObj.fontSize = conf.noteFontSize; + textObj.fontWeight = conf.noteFontWeight; + textObj.anchor = conf.noteAlign; + textObj.textMargin = conf.noteMargin; + textObj.valign = conf.noteAlign; + var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj); + var textHeight = Math.round(textElem.map(function (te) { + return (te._groups || te)[0][0].getBBox().height; + }).reduce(function (acc, curr) { + return acc + curr; + })); + rectElem.attr('height', textHeight + 2 * conf.noteMargin); + noteModel.height += textHeight + 2 * conf.noteMargin; + bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); + noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; + noteModel.stopx = noteModel.startx + rect.width; + bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); + bounds.models.addNote(noteModel); +}; -var options = {}; +var messageFont = function messageFont(cnf) { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; -options.insert = "head"; -options.singleton = false; +var noteFont = function noteFont(cnf) { + return { + fontFamily: cnf.noteFontFamily, + fontSize: cnf.noteFontSize, + fontWeight: cnf.noteFontWeight + }; +}; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_outlineTree_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +var actorFont = function actorFont(cnf) { + return { + fontFamily: cnf.actorFontFamily, + fontSize: cnf.actorFontSize, + fontWeight: cnf.actorFontWeight + }; +}; +/** + * Draws a message + * @param g - the parent of the message element + * @param msgModel - the model containing fields describing a message + */ +var drawMessage = function drawMessage(g, msgModel) { + bounds.bumpVerticalPos(10); + var startx = msgModel.startx, + stopx = msgModel.stopx, + starty = msgModel.starty, + message = msgModel.message, + type = msgModel.type, + sequenceIndex = msgModel.sequenceIndex; + var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].splitBreaks(message).length; + var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(message, messageFont(conf)); + var lineHeight = textDims.height / lines; + msgModel.height += lineHeight; + bounds.bumpVerticalPos(lineHeight); + var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj(); + textObj.x = startx; + textObj.y = starty + 10; + textObj.width = stopx - startx; + textObj.class = 'messageText'; + textObj.dy = '1em'; + textObj.text = message; + textObj.fontFamily = conf.messageFontFamily; + textObj.fontSize = conf.messageFontSize; + textObj.fontWeight = conf.messageFontWeight; + textObj.anchor = conf.messageAlign; + textObj.valign = conf.messageAlign; + textObj.textMargin = conf.wrapPadding; + textObj.tspan = false; + Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj); + var totalOffset = textDims.height - 10; + var textWidth = textDims.width; + var line, lineStarty; -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_outlineTree_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + if (startx === stopx) { + lineStarty = bounds.getVerticalPos() + totalOffset; -/***/ }), + if (conf.rightAngles) { + line = g.append('path').attr('d', "M ".concat(startx, ",").concat(lineStarty, " H ").concat(startx + Math.max(conf.width / 2, textWidth / 2), " V ").concat(lineStarty + 25, " H ").concat(startx)); + } else { + totalOffset += conf.boxMargin; + lineStarty = bounds.getVerticalPos() + totalOffset; + line = g.append('path').attr('d', 'M ' + startx + ',' + lineStarty + ' C ' + (startx + 60) + ',' + (lineStarty - 10) + ' ' + (startx + 60) + ',' + (lineStarty + 30) + ' ' + startx + ',' + (lineStarty + 20)); + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css ***! - \*************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + totalOffset += 30; + var dx = Math.max(textWidth / 2, conf.width / 2); + bounds.insert(startx - dx, bounds.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds.getVerticalPos() + 30 + totalOffset); + } else { + totalOffset += conf.boxMargin; + lineStarty = bounds.getVerticalPos() + totalOffset; + line = g.append('line'); + line.attr('x1', startx); + line.attr('y1', lineStarty); + line.attr('x2', stopx); + line.attr('y2', lineStarty); + bounds.insert(startx, lineStarty - 10, stopx, lineStarty); + } // Make an SVG Container + // Draw the line -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_symbol_icons_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./symbol-icons.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css"); - + if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) { + line.style('stroke-dasharray', '3, 3'); + line.attr('class', 'messageLine1'); + } else { + line.attr('class', 'messageLine0'); + } -var options = {}; + var url = ''; -options.insert = "head"; -options.singleton = false; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, '\\('); + url = url.replace(/\)/g, '\\)'); + } -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_symbol_icons_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + line.attr('stroke-width', 2); + line.attr('stroke', 'none'); // handled by theme/css anyway + line.style('fill', 'none'); // remove any fill colour + if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) { + line.attr('marker-end', 'url(' + url + '#arrowhead)'); + } -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_symbol_icons_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT) { + line.attr('marker-end', 'url(' + url + '#filled-head)'); + } -/***/ }), + if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) { + line.attr('marker-end', 'url(' + url + '#crosshead)'); + } // add node number -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js ***! - \******************************************************************************************/ -/*! exports provided: TreeElement, OutlineElement, OutlineGroup, OutlineModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeElement", function() { return TreeElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutlineElement", function() { return OutlineElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutlineGroup", function() { return OutlineGroup; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutlineModel", function() { return OutlineModel; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _base_common_numbers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + if (_sequenceDb__WEBPACK_IMPORTED_MODULE_5__["default"].showSequenceNumbers() || conf.showSequenceNumbers) { + line.attr('marker-start', 'url(' + url + '#sequencenumber)'); + g.append('text').attr('x', startx).attr('y', lineStarty + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex); + } + bounds.bumpVerticalPos(totalOffset); + msgModel.height += totalOffset; + msgModel.stopy = msgModel.starty + msgModel.height; + bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); +}; +var drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) { + // Draw the actors + var prevWidth = 0; + var prevMargin = 0; + for (var i = 0; i < actorKeys.length; i++) { + var actor = actors[actorKeys[i]]; // Add some rendering data to the object + actor.width = actor.width || conf.width; + actor.height = Math.max(actor.height || conf.height, conf.height); + actor.margin = actor.margin || conf.actorMargin; + actor.x = prevWidth + prevMargin; + actor.y = verticalPos; // Draw the box with the attached line + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actor, conf); + bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); + prevWidth += actor.width; + prevMargin += actor.margin; + bounds.models.addActor(actor); + } // Add a margin between the actor boxes and the first arrow -class TreeElement { - remove() { - if (this.parent) { - this.parent.children.delete(this.id); - } - } - static findId(candidate, container) { - // complex id-computation which contains the origin/extension, - // the parent path, and some dedupe logic when names collide - let candidateId; - if (typeof candidate === 'string') { - candidateId = `${container.id}/${candidate}`; - } - else { - candidateId = `${container.id}/${candidate.name}`; - if (container.children.get(candidateId) !== undefined) { - candidateId = `${container.id}/${candidate.name}_${candidate.range.startLineNumber}_${candidate.range.startColumn}`; - } - } - let id = candidateId; - for (let i = 0; container.children.get(id) !== undefined; i++) { - id = `${candidateId}_${i}`; - } - return id; - } - static empty(element) { - return element.children.size === 0; - } -} -class OutlineElement extends TreeElement { - constructor(id, parent, symbol) { - super(); - this.id = id; - this.parent = parent; - this.symbol = symbol; - this.children = new Map(); - } -} -class OutlineGroup extends TreeElement { - constructor(id, parent, label, order) { - super(); - this.id = id; - this.parent = parent; - this.label = label; - this.order = order; - this.children = new Map(); - } -} -class OutlineModel extends TreeElement { - constructor(uri) { - super(); - this.uri = uri; - this.id = 'root'; - this.parent = undefined; - this._groups = new Map(); - this.children = new Map(); - this.id = 'root'; - this.parent = undefined; - } - static create(textModel, token) { - let key = this._keys.for(textModel, true); - let data = OutlineModel._requests.get(key); - if (!data) { - let source = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationTokenSource"](); - data = { - promiseCnt: 0, - source, - promise: OutlineModel._create(textModel, source.token), - model: undefined, - }; - OutlineModel._requests.set(key, data); - // keep moving average of request durations - const now = Date.now(); - data.promise.then(() => { - let key = this._keys.for(textModel, false); - let avg = this._requestDurations.get(key); - if (!avg) { - avg = new _base_common_numbers_js__WEBPACK_IMPORTED_MODULE_6__["MovingAverage"](); - this._requestDurations.set(key, avg); - } - avg.update(Date.now() - now); - }); - } - if (data.model) { - // resolved -> return data - return Promise.resolve(data.model); - } - // increase usage counter - data.promiseCnt += 1; - token.onCancellationRequested(() => { - // last -> cancel provider request, remove cached promise - if (--data.promiseCnt === 0) { - data.source.cancel(); - OutlineModel._requests.delete(key); - } - }); - return new Promise((resolve, reject) => { - data.promise.then(model => { - data.model = model; - resolve(model); - }, err => { - OutlineModel._requests.delete(key); - reject(err); - }); - }); - } - static _create(textModel, token) { - const cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationTokenSource"](token); - const result = new OutlineModel(textModel.uri); - const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["DocumentSymbolProviderRegistry"].ordered(textModel); - const promises = provider.map((provider, index) => { - var _a; - let id = TreeElement.findId(`provider_${index}`, result); - let group = new OutlineGroup(id, result, (_a = provider.displayName) !== null && _a !== void 0 ? _a : 'Unknown Outline Provider', index); - return Promise.resolve(provider.provideDocumentSymbols(textModel, cts.token)).then(result => { - for (const info of result || []) { - OutlineModel._makeOutlineElement(info, group); - } - return group; - }, err => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedExternalError"])(err); - return group; - }).then(group => { - if (!TreeElement.empty(group)) { - result._groups.set(id, group); - } - else { - group.remove(); - } - }); - }); - const listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["DocumentSymbolProviderRegistry"].onDidChange(() => { - const newProvider = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["DocumentSymbolProviderRegistry"].ordered(textModel); - if (!Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["equals"])(newProvider, provider)) { - cts.cancel(); - } - }); - return Promise.all(promises).then(() => { - if (cts.token.isCancellationRequested && !token.isCancellationRequested) { - return OutlineModel._create(textModel, token); - } - else { - return result._compact(); - } - }).finally(() => { - listener.dispose(); - }); - } - static _makeOutlineElement(info, container) { - let id = TreeElement.findId(info, container); - let res = new OutlineElement(id, container, info); - if (info.children) { - for (const childInfo of info.children) { - OutlineModel._makeOutlineElement(childInfo, res); - } - } - container.children.set(res.id, res); - } - _compact() { - let count = 0; - for (const [key, group] of this._groups) { - if (group.children.size === 0) { // empty - this._groups.delete(key); - } - else { - count += 1; - } - } - if (count !== 1) { - // - this.children = this._groups; - } - else { - // adopt all elements of the first group - let group = _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__["Iterable"].first(this._groups.values()); - for (let [, child] of group.children) { - child.parent = this; - this.children.set(child.id, child); - } - } - return this; - } -} -OutlineModel._requestDurations = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__["LRUCache"](50, 0.7); -OutlineModel._requests = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__["LRUCache"](9, 0.75); -OutlineModel._keys = new class { - constructor() { - this._counter = 1; - this._data = new WeakMap(); - } - for(textModel, version) { - return `${textModel.id}/${version ? textModel.getVersionId() : ''}/${this._hash(_common_modes_js__WEBPACK_IMPORTED_MODULE_4__["DocumentSymbolProviderRegistry"].all(textModel))}`; - } - _hash(providers) { - let result = ''; - for (const provider of providers) { - let n = this._data.get(provider); - if (typeof n === 'undefined') { - n = this._counter++; - this._data.set(provider, n); - } - result += n; - } - return result; - } + bounds.bumpVerticalPos(conf.height); }; +var setConf = function setConf(cnf) { + Object(_utils__WEBPACK_IMPORTED_MODULE_7__["assignWithDepth"])(conf, cnf); + if (cnf.fontFamily) { + conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; + } -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineTree.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineTree.js ***! - \*****************************************************************************************/ -/*! exports provided: SYMBOL_ICON_ARRAY_FOREGROUND, SYMBOL_ICON_BOOLEAN_FOREGROUND, SYMBOL_ICON_CLASS_FOREGROUND, SYMBOL_ICON_COLOR_FOREGROUND, SYMBOL_ICON_CONSTANT_FOREGROUND, SYMBOL_ICON_CONSTRUCTOR_FOREGROUND, SYMBOL_ICON_ENUMERATOR_FOREGROUND, SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND, SYMBOL_ICON_EVENT_FOREGROUND, SYMBOL_ICON_FIELD_FOREGROUND, SYMBOL_ICON_FILE_FOREGROUND, SYMBOL_ICON_FOLDER_FOREGROUND, SYMBOL_ICON_FUNCTION_FOREGROUND, SYMBOL_ICON_INTERFACE_FOREGROUND, SYMBOL_ICON_KEY_FOREGROUND, SYMBOL_ICON_KEYWORD_FOREGROUND, SYMBOL_ICON_METHOD_FOREGROUND, SYMBOL_ICON_MODULE_FOREGROUND, SYMBOL_ICON_NAMESPACE_FOREGROUND, SYMBOL_ICON_NULL_FOREGROUND, SYMBOL_ICON_NUMBER_FOREGROUND, SYMBOL_ICON_OBJECT_FOREGROUND, SYMBOL_ICON_OPERATOR_FOREGROUND, SYMBOL_ICON_PACKAGE_FOREGROUND, SYMBOL_ICON_PROPERTY_FOREGROUND, SYMBOL_ICON_REFERENCE_FOREGROUND, SYMBOL_ICON_SNIPPET_FOREGROUND, SYMBOL_ICON_STRING_FOREGROUND, SYMBOL_ICON_STRUCT_FOREGROUND, SYMBOL_ICON_TEXT_FOREGROUND, SYMBOL_ICON_TYPEPARAMETER_FOREGROUND, SYMBOL_ICON_UNIT_FOREGROUND, SYMBOL_ICON_VARIABLE_FOREGROUND */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_ARRAY_FOREGROUND", function() { return SYMBOL_ICON_ARRAY_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_BOOLEAN_FOREGROUND", function() { return SYMBOL_ICON_BOOLEAN_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_CLASS_FOREGROUND", function() { return SYMBOL_ICON_CLASS_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_COLOR_FOREGROUND", function() { return SYMBOL_ICON_COLOR_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_CONSTANT_FOREGROUND", function() { return SYMBOL_ICON_CONSTANT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_CONSTRUCTOR_FOREGROUND", function() { return SYMBOL_ICON_CONSTRUCTOR_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_ENUMERATOR_FOREGROUND", function() { return SYMBOL_ICON_ENUMERATOR_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND", function() { return SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_EVENT_FOREGROUND", function() { return SYMBOL_ICON_EVENT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_FIELD_FOREGROUND", function() { return SYMBOL_ICON_FIELD_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_FILE_FOREGROUND", function() { return SYMBOL_ICON_FILE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_FOLDER_FOREGROUND", function() { return SYMBOL_ICON_FOLDER_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_FUNCTION_FOREGROUND", function() { return SYMBOL_ICON_FUNCTION_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_INTERFACE_FOREGROUND", function() { return SYMBOL_ICON_INTERFACE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_KEY_FOREGROUND", function() { return SYMBOL_ICON_KEY_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_KEYWORD_FOREGROUND", function() { return SYMBOL_ICON_KEYWORD_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_METHOD_FOREGROUND", function() { return SYMBOL_ICON_METHOD_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_MODULE_FOREGROUND", function() { return SYMBOL_ICON_MODULE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_NAMESPACE_FOREGROUND", function() { return SYMBOL_ICON_NAMESPACE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_NULL_FOREGROUND", function() { return SYMBOL_ICON_NULL_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_NUMBER_FOREGROUND", function() { return SYMBOL_ICON_NUMBER_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_OBJECT_FOREGROUND", function() { return SYMBOL_ICON_OBJECT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_OPERATOR_FOREGROUND", function() { return SYMBOL_ICON_OPERATOR_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_PACKAGE_FOREGROUND", function() { return SYMBOL_ICON_PACKAGE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_PROPERTY_FOREGROUND", function() { return SYMBOL_ICON_PROPERTY_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_REFERENCE_FOREGROUND", function() { return SYMBOL_ICON_REFERENCE_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_SNIPPET_FOREGROUND", function() { return SYMBOL_ICON_SNIPPET_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_STRING_FOREGROUND", function() { return SYMBOL_ICON_STRING_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_STRUCT_FOREGROUND", function() { return SYMBOL_ICON_STRUCT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_TEXT_FOREGROUND", function() { return SYMBOL_ICON_TEXT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_TYPEPARAMETER_FOREGROUND", function() { return SYMBOL_ICON_TYPEPARAMETER_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_UNIT_FOREGROUND", function() { return SYMBOL_ICON_UNIT_FOREGROUND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYMBOL_ICON_VARIABLE_FOREGROUND", function() { return SYMBOL_ICON_VARIABLE_FOREGROUND; }); -/* harmony import */ var _media_outlineTree_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/outlineTree.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css"); -/* harmony import */ var _media_symbol_icons_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./media/symbol-icons.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); - - - - - - -const SYMBOL_ICON_ARRAY_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.arrayForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.arrayForeground', 'The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_BOOLEAN_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.booleanForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.booleanForeground', 'The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_CLASS_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.classForeground', { - dark: '#EE9D28', - light: '#D67E00', - hc: '#EE9D28' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.classForeground', 'The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_COLOR_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.colorForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.colorForeground', 'The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_CONSTANT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.constantForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.constantForeground', 'The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_CONSTRUCTOR_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.constructorForeground', { - dark: '#B180D7', - light: '#652D90', - hc: '#B180D7' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.constructorForeground', 'The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_ENUMERATOR_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.enumeratorForeground', { - dark: '#EE9D28', - light: '#D67E00', - hc: '#EE9D28' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.enumeratorForeground', 'The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.enumeratorMemberForeground', { - dark: '#75BEFF', - light: '#007ACC', - hc: '#75BEFF' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.enumeratorMemberForeground', 'The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_EVENT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.eventForeground', { - dark: '#EE9D28', - light: '#D67E00', - hc: '#EE9D28' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.eventForeground', 'The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_FIELD_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.fieldForeground', { - dark: '#75BEFF', - light: '#007ACC', - hc: '#75BEFF' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.fieldForeground', 'The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_FILE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.fileForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.fileForeground', 'The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_FOLDER_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.folderForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.folderForeground', 'The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_FUNCTION_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.functionForeground', { - dark: '#B180D7', - light: '#652D90', - hc: '#B180D7' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.functionForeground', 'The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_INTERFACE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.interfaceForeground', { - dark: '#75BEFF', - light: '#007ACC', - hc: '#75BEFF' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.interfaceForeground', 'The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_KEY_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.keyForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.keyForeground', 'The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_KEYWORD_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.keywordForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.keywordForeground', 'The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_METHOD_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.methodForeground', { - dark: '#B180D7', - light: '#652D90', - hc: '#B180D7' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.methodForeground', 'The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_MODULE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.moduleForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.moduleForeground', 'The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_NAMESPACE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.namespaceForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.namespaceForeground', 'The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_NULL_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.nullForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.nullForeground', 'The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_NUMBER_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.numberForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.numberForeground', 'The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_OBJECT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.objectForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.objectForeground', 'The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_OPERATOR_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.operatorForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.operatorForeground', 'The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_PACKAGE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.packageForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.packageForeground', 'The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_PROPERTY_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.propertyForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.propertyForeground', 'The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_REFERENCE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.referenceForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.referenceForeground', 'The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_SNIPPET_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.snippetForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.snippetForeground', 'The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_STRING_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.stringForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.stringForeground', 'The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_STRUCT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.structForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.structForeground', 'The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_TEXT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.textForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.textForeground', 'The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_TYPEPARAMETER_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.typeParameterForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.typeParameterForeground', 'The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_UNIT_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.unitForeground', { - dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"], - hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["foreground"] -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.unitForeground', 'The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -const SYMBOL_ICON_VARIABLE_FOREGROUND = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_4__["registerColor"])('symbolIcon.variableForeground', { - dark: '#75BEFF', - light: '#007ACC', - hc: '#75BEFF' -}, Object(_nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"])('symbolIcon.variableForeground', 'The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.')); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_3__["registerThemingParticipant"])((theme, collector) => { - const symbolIconArrayColor = theme.getColor(SYMBOL_ICON_ARRAY_FOREGROUND); - if (symbolIconArrayColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolArray.cssSelector} { color: ${symbolIconArrayColor}; }`); - } - const symbolIconBooleanColor = theme.getColor(SYMBOL_ICON_BOOLEAN_FOREGROUND); - if (symbolIconBooleanColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolBoolean.cssSelector} { color: ${symbolIconBooleanColor}; }`); - } - const symbolIconClassColor = theme.getColor(SYMBOL_ICON_CLASS_FOREGROUND); - if (symbolIconClassColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolClass.cssSelector} { color: ${symbolIconClassColor}; }`); - } - const symbolIconMethodColor = theme.getColor(SYMBOL_ICON_METHOD_FOREGROUND); - if (symbolIconMethodColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolMethod.cssSelector} { color: ${symbolIconMethodColor}; }`); - } - const symbolIconColorColor = theme.getColor(SYMBOL_ICON_COLOR_FOREGROUND); - if (symbolIconColorColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolColor.cssSelector} { color: ${symbolIconColorColor}; }`); - } - const symbolIconConstantColor = theme.getColor(SYMBOL_ICON_CONSTANT_FOREGROUND); - if (symbolIconConstantColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolConstant.cssSelector} { color: ${symbolIconConstantColor}; }`); - } - const symbolIconConstructorColor = theme.getColor(SYMBOL_ICON_CONSTRUCTOR_FOREGROUND); - if (symbolIconConstructorColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolConstructor.cssSelector} { color: ${symbolIconConstructorColor}; }`); - } - const symbolIconEnumeratorColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_FOREGROUND); - if (symbolIconEnumeratorColor) { - collector.addRule(` - ${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolValue.cssSelector},${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolEnum.cssSelector} { color: ${symbolIconEnumeratorColor}; }`); - } - const symbolIconEnumeratorMemberColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND); - if (symbolIconEnumeratorMemberColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolEnumMember.cssSelector} { color: ${symbolIconEnumeratorMemberColor}; }`); - } - const symbolIconEventColor = theme.getColor(SYMBOL_ICON_EVENT_FOREGROUND); - if (symbolIconEventColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolEvent.cssSelector} { color: ${symbolIconEventColor}; }`); - } - const symbolIconFieldColor = theme.getColor(SYMBOL_ICON_FIELD_FOREGROUND); - if (symbolIconFieldColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolField.cssSelector} { color: ${symbolIconFieldColor}; }`); - } - const symbolIconFileColor = theme.getColor(SYMBOL_ICON_FILE_FOREGROUND); - if (symbolIconFileColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolFile.cssSelector} { color: ${symbolIconFileColor}; }`); - } - const symbolIconFolderColor = theme.getColor(SYMBOL_ICON_FOLDER_FOREGROUND); - if (symbolIconFolderColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolFolder.cssSelector} { color: ${symbolIconFolderColor}; }`); - } - const symbolIconFunctionColor = theme.getColor(SYMBOL_ICON_FUNCTION_FOREGROUND); - if (symbolIconFunctionColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolFunction.cssSelector} { color: ${symbolIconFunctionColor}; }`); - } - const symbolIconInterfaceColor = theme.getColor(SYMBOL_ICON_INTERFACE_FOREGROUND); - if (symbolIconInterfaceColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolInterface.cssSelector} { color: ${symbolIconInterfaceColor}; }`); - } - const symbolIconKeyColor = theme.getColor(SYMBOL_ICON_KEY_FOREGROUND); - if (symbolIconKeyColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolKey.cssSelector} { color: ${symbolIconKeyColor}; }`); - } - const symbolIconKeywordColor = theme.getColor(SYMBOL_ICON_KEYWORD_FOREGROUND); - if (symbolIconKeywordColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolKeyword.cssSelector} { color: ${symbolIconKeywordColor}; }`); - } - const symbolIconModuleColor = theme.getColor(SYMBOL_ICON_MODULE_FOREGROUND); - if (symbolIconModuleColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolModule.cssSelector} { color: ${symbolIconModuleColor}; }`); - } - const outlineNamespaceColor = theme.getColor(SYMBOL_ICON_NAMESPACE_FOREGROUND); - if (outlineNamespaceColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolNamespace.cssSelector} { color: ${outlineNamespaceColor}; }`); - } - const symbolIconNullColor = theme.getColor(SYMBOL_ICON_NULL_FOREGROUND); - if (symbolIconNullColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolNull.cssSelector} { color: ${symbolIconNullColor}; }`); - } - const symbolIconNumberColor = theme.getColor(SYMBOL_ICON_NUMBER_FOREGROUND); - if (symbolIconNumberColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolNumber.cssSelector} { color: ${symbolIconNumberColor}; }`); - } - const symbolIconObjectColor = theme.getColor(SYMBOL_ICON_OBJECT_FOREGROUND); - if (symbolIconObjectColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolObject.cssSelector} { color: ${symbolIconObjectColor}; }`); - } - const symbolIconOperatorColor = theme.getColor(SYMBOL_ICON_OPERATOR_FOREGROUND); - if (symbolIconOperatorColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolOperator.cssSelector} { color: ${symbolIconOperatorColor}; }`); - } - const symbolIconPackageColor = theme.getColor(SYMBOL_ICON_PACKAGE_FOREGROUND); - if (symbolIconPackageColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolPackage.cssSelector} { color: ${symbolIconPackageColor}; }`); - } - const symbolIconPropertyColor = theme.getColor(SYMBOL_ICON_PROPERTY_FOREGROUND); - if (symbolIconPropertyColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolProperty.cssSelector} { color: ${symbolIconPropertyColor}; }`); - } - const symbolIconReferenceColor = theme.getColor(SYMBOL_ICON_REFERENCE_FOREGROUND); - if (symbolIconReferenceColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolReference.cssSelector} { color: ${symbolIconReferenceColor}; }`); - } - const symbolIconSnippetColor = theme.getColor(SYMBOL_ICON_SNIPPET_FOREGROUND); - if (symbolIconSnippetColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolSnippet.cssSelector} { color: ${symbolIconSnippetColor}; }`); - } - const symbolIconStringColor = theme.getColor(SYMBOL_ICON_STRING_FOREGROUND); - if (symbolIconStringColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolString.cssSelector} { color: ${symbolIconStringColor}; }`); - } - const symbolIconStructColor = theme.getColor(SYMBOL_ICON_STRUCT_FOREGROUND); - if (symbolIconStructColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolStruct.cssSelector} { color: ${symbolIconStructColor}; }`); - } - const symbolIconTextColor = theme.getColor(SYMBOL_ICON_TEXT_FOREGROUND); - if (symbolIconTextColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolText.cssSelector} { color: ${symbolIconTextColor}; }`); - } - const symbolIconTypeParameterColor = theme.getColor(SYMBOL_ICON_TYPEPARAMETER_FOREGROUND); - if (symbolIconTypeParameterColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolTypeParameter.cssSelector} { color: ${symbolIconTypeParameterColor}; }`); - } - const symbolIconUnitColor = theme.getColor(SYMBOL_ICON_UNIT_FOREGROUND); - if (symbolIconUnitColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolUnit.cssSelector} { color: ${symbolIconUnitColor}; }`); - } - const symbolIconVariableColor = theme.getColor(SYMBOL_ICON_VARIABLE_FOREGROUND); - if (symbolIconVariableColor) { - collector.addRule(`${_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_5__["Codicon"].symbolVariable.cssSelector} { color: ${symbolIconVariableColor}; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js ***! - \*********************************************************************************/ -/*! exports provided: getSelectionSearchString, CommonFindController, FindController, StartFindAction, StartFindWithSelectionAction, MatchFindAction, NextMatchFindAction, NextMatchFindAction2, PreviousMatchFindAction, PreviousMatchFindAction2, SelectionMatchFindAction, NextSelectionMatchFindAction, PreviousSelectionMatchFindAction, StartFindReplaceAction, EditorStartFindAction, EditorStartFindReplaceAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionSearchString", function() { return getSelectionSearchString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonFindController", function() { return CommonFindController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindController", function() { return FindController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StartFindAction", function() { return StartFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StartFindWithSelectionAction", function() { return StartFindWithSelectionAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MatchFindAction", function() { return MatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextMatchFindAction", function() { return NextMatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextMatchFindAction2", function() { return NextMatchFindAction2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreviousMatchFindAction", function() { return PreviousMatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreviousMatchFindAction2", function() { return PreviousMatchFindAction2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionMatchFindAction", function() { return SelectionMatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextSelectionMatchFindAction", function() { return NextSelectionMatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreviousSelectionMatchFindAction", function() { return PreviousSelectionMatchFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StartFindReplaceAction", function() { return StartFindReplaceAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorStartFindAction", function() { return EditorStartFindAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorStartFindReplaceAction", function() { return EditorStartFindReplaceAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./findModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js"); -/* harmony import */ var _findOptionsWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./findOptionsWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js"); -/* harmony import */ var _findState_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./findState.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js"); -/* harmony import */ var _findWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./findWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/userDataSync/common/storageKeys.js */ "./node_modules/monaco-editor/esm/vs/platform/userDataSync/common/storageKeys.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + if (cnf.fontSize) { + conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; + } + + if (cnf.fontWeight) { + conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; + } }; +var actorActivations = function actorActivations(actor) { + return bounds.activations.filter(function (activation) { + return activation.actor === actor; + }); +}; +var activationBounds = function activationBounds(actor, actors) { + // handle multiple stacked activations for same actor + var actorObj = actors[actor]; + var activations = actorActivations(actor); + var left = activations.reduce(function (acc, activation) { + return Math.min(acc, activation.startx); + }, actorObj.x + actorObj.width / 2); + var right = activations.reduce(function (acc, activation) { + return Math.max(acc, activation.stopx); + }, actorObj.x + actorObj.width / 2); + return [left, right]; +}; +function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { + bounds.bumpVerticalPos(preMargin); + var heightAdjust = postMargin; + if (msg.id && msg.message && loopWidths[msg.id]) { + var loopWidth = loopWidths[msg.id].width; + var textConf = messageFont(conf); + msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel("[".concat(msg.message, "]"), loopWidth - 2 * conf.wrapPadding, textConf); + msg.width = loopWidth; + msg.wrap = true; // const lines = common.splitBreaks(msg.message).length; + var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, textConf); + var totalOffset = Math.max(textDims.height, conf.labelBoxHeight); + heightAdjust = postMargin + totalOffset; + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("".concat(totalOffset, " - ").concat(msg.message)); + } + addLoopFn(msg); + bounds.bumpVerticalPos(heightAdjust); +} +/** + * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ +var draw = function draw(text, id) { + conf = _config__WEBPACK_IMPORTED_MODULE_6__["getConfig"]().sequence; + _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear(); + _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.setWrap(conf.wrap); + _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n'); + bounds.init(); + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("C:".concat(JSON.stringify(conf, null, 2))); + var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id=\"".concat(id, "\"]")); // Fetch data from the parsing + var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors(); + var actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys(); + var messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages(); + var title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle(); + var maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages); + conf.height = calculateActorMargins(actors, maxMessageWidthPerActor); + drawActors(diagram, actors, actorKeys, 0); + var loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor); // The arrow head definition is attached to the svg once + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowFilledHead(diagram); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram); + function activeEnd(msg, verticalPos) { + var activationData = bounds.endActivation(msg); + if (activationData.starty + 18 > verticalPos) { + activationData.starty = verticalPos - 6; + verticalPos += 12; + } + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length); + bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); + } // Draw the messages/signals + var sequenceIndex = 1; + messages.forEach(function (msg) { + var loopModel, noteModel, msgModel; + switch (msg.type) { + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE: + noteModel = msg.noteModel; + drawNote(diagram, noteModel); + break; + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START: + bounds.newActivation(msg, diagram, actors); + break; + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END: + activeEnd(msg, bounds.getVerticalPos()); + break; -const SEARCH_STRING_MAX_LENGTH = 524288; -function getSelectionSearchString(editor) { - if (!editor.hasModel()) { - return null; - } - const selection = editor.getSelection(); - // if selection spans multiple lines, default search string to empty - if (selection.startLineNumber === selection.endLineNumber) { - if (selection.isEmpty()) { - const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition()); - if (wordAtPosition) { - return wordAtPosition.word; - } - } - else { - if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) { - return editor.getModel().getValueInRange(selection); - } - } - } - return null; -} -let CommonFindController = class CommonFindController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(editor, contextKeyService, storageService, clipboardService) { - super(); - this._editor = editor; - this._findWidgetVisible = _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"].bindTo(contextKeyService); - this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._clipboardService = clipboardService; - this._updateHistoryDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__["Delayer"](500); - this._state = this._register(new _findState_js__WEBPACK_IMPORTED_MODULE_8__["FindReplaceState"]()); - this.loadQueryState(); - this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); - this._model = null; - this._register(this._editor.onDidChangeModel(() => { - let shouldRestartFind = (this._editor.getModel() && this._state.isRevealed); - this.disposeModel(); - this._state.change({ - searchScope: null, - matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, false), - wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, false), - isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, false), - preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, false) - }, false); - if (shouldRestartFind) { - this._start({ - forceRevealReplace: false, - seedSearchStringFromSelection: false && false, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: 0 /* NoFocusChange */, - shouldAnimate: false, - updateSearchScope: false, - loop: this._editor.getOption(29 /* find */).loop - }); - } - })); - } - static get(editor) { - return editor.getContribution(CommonFindController.ID); - } - dispose() { - this.disposeModel(); - super.dispose(); - } - disposeModel() { - if (this._model) { - this._model.dispose(); - this._model = null; - } - } - _onStateChanged(e) { - this.saveQueryState(e); - if (e.isRevealed) { - if (this._state.isRevealed) { - this._findWidgetVisible.set(true); - } - else { - this._findWidgetVisible.reset(); - this.disposeModel(); - } - } - if (e.searchString) { - this.setGlobalBufferTerm(this._state.searchString); - } - } - saveQueryState(e) { - if (e.isRegex) { - this._storageService.store('editor.isRegex', this._state.actualIsRegex, 1 /* WORKSPACE */); - } - if (e.wholeWord) { - this._storageService.store('editor.wholeWord', this._state.actualWholeWord, 1 /* WORKSPACE */); - } - if (e.matchCase) { - this._storageService.store('editor.matchCase', this._state.actualMatchCase, 1 /* WORKSPACE */); - } - if (e.preserveCase) { - this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, 1 /* WORKSPACE */); - } - } - loadQueryState() { - this._state.change({ - matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, this._state.matchCase), - wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, this._state.wholeWord), - isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, this._state.isRegex), - preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, this._state.preserveCase) - }, false); - } - isFindInputFocused() { - return !!_findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_INPUT_FOCUSED"].getValue(this._contextKeyService); - } - getState() { - return this._state; - } - closeFindWidget() { - this._state.change({ - isRevealed: false, - searchScope: null - }, false); - this._editor.focus(); - } - toggleCaseSensitive() { - this._state.change({ matchCase: !this._state.matchCase }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - toggleWholeWords() { - this._state.change({ wholeWord: !this._state.wholeWord }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - toggleRegex() { - this._state.change({ isRegex: !this._state.isRegex }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - toggleSearchScope() { - if (this._state.searchScope) { - this._state.change({ searchScope: null }, true); - } - else { - if (this._editor.hasModel()) { - let selections = this._editor.getSelections(); - selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition(selection.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(selection.endLineNumber - 1)); - } - if (!selection.isEmpty()) { - return selection; - } - return null; - }).filter(element => !!element); - if (selections.length) { - this._state.change({ searchScope: selections }, true); - } - } - } - } - setSearchString(searchString) { - if (this._state.isRegex) { - searchString = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["escapeRegExpCharacters"](searchString); - } - this._state.change({ searchString: searchString }, false); - } - highlightFindOptions() { - // overwritten in subclass - } - _start(opts) { - return __awaiter(this, void 0, void 0, function* () { - this.disposeModel(); - if (!this._editor.hasModel()) { - // cannot do anything with an editor that doesn't have a model... - return; - } - let stateChanges = { - isRevealed: true - }; - if (opts.seedSearchStringFromSelection) { - let selectionSearchString = getSelectionSearchString(this._editor); - if (selectionSearchString) { - if (this._state.isRegex) { - stateChanges.searchString = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["escapeRegExpCharacters"](selectionSearchString); - } - else { - stateChanges.searchString = selectionSearchString; - } - } - } - if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) { - let selectionSearchString = yield this.getGlobalBufferTerm(); - if (!this._editor.hasModel()) { - // the editor has lost its model in the meantime - return; - } - if (selectionSearchString) { - stateChanges.searchString = selectionSearchString; - } - } - // Overwrite isReplaceRevealed - if (opts.forceRevealReplace) { - stateChanges.isReplaceRevealed = true; - } - else if (!this._findWidgetVisible.get()) { - stateChanges.isReplaceRevealed = false; - } - if (opts.updateSearchScope) { - let currentSelections = this._editor.getSelections(); - if (currentSelections.some(selection => !selection.isEmpty())) { - stateChanges.searchScope = currentSelections; - } - } - stateChanges.loop = opts.loop; - this._state.change(stateChanges, false); - if (!this._model) { - this._model = new _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FindModelBoundToEditorModel"](this._editor, this._state); - } - }); - } - start(opts) { - return this._start(opts); - } - moveToNextMatch() { - if (this._model) { - this._model.moveToNextMatch(); - return true; - } - return false; - } - moveToPrevMatch() { - if (this._model) { - this._model.moveToPrevMatch(); - return true; - } - return false; - } - replace() { - if (this._model) { - this._model.replace(); - return true; - } - return false; - } - replaceAll() { - if (this._model) { - this._model.replaceAll(); - return true; - } - return false; - } - selectAllMatches() { - if (this._model) { - this._model.selectAllMatches(); - this._editor.focus(); - return true; - } - return false; - } - getGlobalBufferTerm() { - return __awaiter(this, void 0, void 0, function* () { - if (this._editor.getOption(29 /* find */).globalFindClipboard - && this._editor.hasModel() - && !this._editor.getModel().isTooLargeForSyncing()) { - return this._clipboardService.readFindText(); - } - return ''; - }); - } - setGlobalBufferTerm(text) { - if (this._editor.getOption(29 /* find */).globalFindClipboard - && this._editor.hasModel() - && !this._editor.getModel().isTooLargeForSyncing()) { - // intentionally not awaited - this._clipboardService.writeFindText(text); - } - } -}; -CommonFindController.ID = 'editor.contrib.findController'; -CommonFindController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]), - __param(2, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__["IStorageService"]), - __param(3, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__["IClipboardService"]) -], CommonFindController); - -let FindController = class FindController extends CommonFindController { - constructor(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, _notificationService, _storageService, _storageKeysSyncRegistryService, clipboardService) { - super(editor, _contextKeyService, _storageService, clipboardService); - this._contextViewService = _contextViewService; - this._keybindingService = _keybindingService; - this._themeService = _themeService; - this._notificationService = _notificationService; - this._storageKeysSyncRegistryService = _storageKeysSyncRegistryService; - this._widget = null; - this._findOptionsWidget = null; - } - _start(opts) { - const _super = Object.create(null, { - _start: { get: () => super._start } - }); - return __awaiter(this, void 0, void 0, function* () { - if (!this._widget) { - this._createFindWidget(); - } - const selection = this._editor.getSelection(); - let updateSearchScope = false; - switch (this._editor.getOption(29 /* find */).autoFindInSelection) { - case 'always': - updateSearchScope = true; - break; - case 'never': - updateSearchScope = false; - break; - case 'multiline': - const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; - updateSearchScope = isSelectionMultipleLine; - break; - default: - break; - } - opts.updateSearchScope = updateSearchScope; - yield _super._start.call(this, opts); - if (this._widget) { - if (opts.shouldFocus === 2 /* FocusReplaceInput */) { - this._widget.focusReplaceInput(); - } - else if (opts.shouldFocus === 1 /* FocusFindInput */) { - this._widget.focusFindInput(); - } - } + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { + return bounds.newLoop(message); }); - } - highlightFindOptions() { - if (!this._widget) { - this._createFindWidget(); - } - if (this._state.isRevealed) { - this._widget.highlightFindOptions(); - } - else { - this._findOptionsWidget.highlightFindOptions(); - } - } - _createFindWidget() { - this._widget = this._register(new _findWidget_js__WEBPACK_IMPORTED_MODULE_9__["FindWidget"](this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._storageKeysSyncRegistryService)); - this._findOptionsWidget = this._register(new _findOptionsWidget_js__WEBPACK_IMPORTED_MODULE_7__["FindOptionsWidget"](this._editor, this._state, this._keybindingService, this._themeService)); - } -}; -FindController = __decorate([ - __param(1, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__["IContextViewService"]), - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]), - __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_14__["IKeybindingService"]), - __param(4, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__["IThemeService"]), - __param(5, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_17__["INotificationService"]), - __param(6, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_15__["IStorageService"]), - __param(7, _platform_userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_18__["IStorageKeysSyncRegistryService"]), - __param(8, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_11__["IClipboardService"]) -], FindController); + break; -class StartFindAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["MultiEditorAction"] { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].StartFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('startFindAction', "Find"), - alias: 'Find', - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 2048 /* CtrlCmd */ | 36 /* KEY_F */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__["MenuId"].MenubarEditMenu, - group: '3_find', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"), - order: 1 - } - }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - let controller = CommonFindController.get(editor); - if (controller) { - yield controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: editor.getOption(29 /* find */).seedSearchStringFromSelection, - seedSearchStringFromGlobalClipboard: editor.getOption(29 /* find */).globalFindClipboard, - shouldFocus: 1 /* FocusFindInput */, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(29 /* find */).loop - }); - } - }); - } -} -class StartFindWithSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].StartFindWithSelection, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('startFindWithSelectionAction', "Find With Selection"), - alias: 'Find With Selection', - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 0, - mac: { - primary: 2048 /* CtrlCmd */ | 35 /* KEY_E */, - }, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - let controller = CommonFindController.get(editor); - if (controller) { - yield controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: true, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: 0 /* NoFocusChange */, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(29 /* find */).loop - }); - controller.setGlobalBufferTerm(controller.getState().searchString); - } - }); - } -} -class MatchFindAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - let controller = CommonFindController.get(editor); - if (controller && !this._run(controller)) { - yield controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(29 /* find */).seedSearchStringFromSelection, - seedSearchStringFromGlobalClipboard: true, - shouldFocus: 0 /* NoFocusChange */, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(29 /* find */).loop - }); - this._run(controller); - } - }); - } -} -class NextMatchFindAction extends MatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].NextMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('findNextMatchAction', "Find Next"), - alias: 'Find Next', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 61 /* F3 */, - mac: { primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */, secondary: [61 /* F3 */] }, - weight: 100 /* EditorContrib */ - } - }); - } - _run(controller) { - return controller.moveToNextMatch(); - } -} -class NextMatchFindAction2 extends MatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].NextMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('findNextMatchAction', "Find Next"), - alias: 'Find Next', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_INPUT_FOCUSED"]), - primary: 3 /* Enter */, - weight: 100 /* EditorContrib */ - } - }); - } - _run(controller) { - return controller.moveToNextMatch(); - } -} -class PreviousMatchFindAction extends MatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].PreviousMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('findPreviousMatchAction', "Find Previous"), - alias: 'Find Previous', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 1024 /* Shift */ | 61 /* F3 */, - mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 37 /* KEY_G */, secondary: [1024 /* Shift */ | 61 /* F3 */] }, - weight: 100 /* EditorContrib */ - } - }); - } - _run(controller) { - return controller.moveToPrevMatch(); - } -} -class PreviousMatchFindAction2 extends MatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].PreviousMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('findPreviousMatchAction', "Find Previous"), - alias: 'Find Previous', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_INPUT_FOCUSED"]), - primary: 1024 /* Shift */ | 3 /* Enter */, - weight: 100 /* EditorContrib */ - } - }); - } - _run(controller) { - return controller.moveToPrevMatch(); - } -} -class SelectionMatchFindAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - let controller = CommonFindController.get(editor); - if (!controller) { - return; - } - let selectionSearchString = getSelectionSearchString(editor); - if (selectionSearchString) { - controller.setSearchString(selectionSearchString); - } - if (!this._run(controller)) { - yield controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: editor.getOption(29 /* find */).seedSearchStringFromSelection, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: 0 /* NoFocusChange */, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(29 /* find */).loop - }); - this._run(controller); - } - }); - } -} -class NextSelectionMatchFindAction extends SelectionMatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].NextSelectionMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('nextSelectionMatchFindAction', "Find Next Selection"), - alias: 'Find Next Selection', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 61 /* F3 */, - weight: 100 /* EditorContrib */ - } - }); - } - _run(controller) { - return controller.moveToNextMatch(); - } -} -class PreviousSelectionMatchFindAction extends SelectionMatchFindAction { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].PreviousSelectionMatchFindAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('previousSelectionMatchFindAction', "Find Previous Selection"), - alias: 'Find Previous Selection', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 61 /* F3 */, - weight: 100 /* EditorContrib */ - } + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END: + loopModel = bounds.endLoop(); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'loop', conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_START: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, function (message) { + return bounds.newLoop(undefined, message.message); }); - } - _run(controller) { - return controller.moveToPrevMatch(); - } -} -class StartFindReplaceAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["MultiEditorAction"] { - constructor() { - super({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].StartFindReplaceAction, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('startReplace', "Replace"), - alias: 'Replace', - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 2048 /* CtrlCmd */ | 38 /* KEY_H */, - mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 36 /* KEY_F */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_10__["MenuId"].MenubarEditMenu, - group: '3_find', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"), - order: 2 - } + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_END: + loopModel = bounds.endLoop(); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawBackgroundRect(diagram, loopModel); + bounds.models.addLoop(loopModel); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { + return bounds.newLoop(message); }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (!editor.hasModel() || editor.getOption(72 /* readOnly */)) { - return; - } - let controller = CommonFindController.get(editor); - let currentSelection = editor.getSelection(); - let findInputFocused = controller.isFindInputFocused(); - // we only seed search string from selection when the current selection is single line and not empty, - // + the find input is not focused - let seedSearchStringFromSelection = !currentSelection.isEmpty() - && currentSelection.startLineNumber === currentSelection.endLineNumber && editor.getOption(29 /* find */).seedSearchStringFromSelection - && !findInputFocused; - /* - * if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input is still empty, so we should focus the Find Input instead of Replace Input. - - * findInputFocused true -> seedSearchStringFromSelection false, FocusReplaceInput - * findInputFocused false, seedSearchStringFromSelection true FocusReplaceInput - * findInputFocused false seedSearchStringFromSelection false FocusFindInput - */ - let shouldFocus = (findInputFocused || seedSearchStringFromSelection) ? - 2 /* FocusReplaceInput */ : 1 /* FocusFindInput */; - if (controller) { - yield controller.start({ - forceRevealReplace: true, - seedSearchStringFromSelection: seedSearchStringFromSelection, - seedSearchStringFromGlobalClipboard: editor.getOption(29 /* find */).seedSearchStringFromSelection, - shouldFocus: shouldFocus, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(29 /* find */).loop - }); - } + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END: + loopModel = bounds.endLoop(); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'opt', conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { + return bounds.newLoop(message); }); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(CommonFindController.ID, FindController); -const EditorStartFindAction = new StartFindAction(); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerMultiEditorAction"])(EditorStartFindAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(StartFindWithSelectionAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(NextMatchFindAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(NextMatchFindAction2); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(PreviousMatchFindAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(PreviousMatchFindAction2); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(NextSelectionMatchFindAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(PreviousSelectionMatchFindAction); -const EditorStartFindReplaceAction = new StartFindReplaceAction(); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerMultiEditorAction"])(EditorStartFindReplaceAction); -const FindCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorCommand"].bindToContribution(CommonFindController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].CloseFindWidgetCommand, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.closeFindWidget(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ToggleCaseSensitiveCommand, - precondition: undefined, - handler: x => x.toggleCaseSensitive(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleCaseSensitiveKeybinding"].primary, - mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleCaseSensitiveKeybinding"].mac, - win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleCaseSensitiveKeybinding"].win, - linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleCaseSensitiveKeybinding"].linux - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ToggleWholeWordCommand, - precondition: undefined, - handler: x => x.toggleWholeWords(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleWholeWordKeybinding"].primary, - mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleWholeWordKeybinding"].mac, - win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleWholeWordKeybinding"].win, - linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleWholeWordKeybinding"].linux - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ToggleRegexCommand, - precondition: undefined, - handler: x => x.toggleRegex(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleRegexKeybinding"].primary, - mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleRegexKeybinding"].mac, - win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleRegexKeybinding"].win, - linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleRegexKeybinding"].linux - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ToggleSearchScopeCommand, - precondition: undefined, - handler: x => x.toggleSearchScope(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleSearchScopeKeybinding"].primary, - mac: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleSearchScopeKeybinding"].mac, - win: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleSearchScopeKeybinding"].win, - linux: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["ToggleSearchScopeKeybinding"].linux - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ReplaceOneAction, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.replace(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 22 /* KEY_1 */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ReplaceOneAction, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.replace(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_REPLACE_INPUT_FOCUSED"]), - primary: 3 /* Enter */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ReplaceAllAction, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.replaceAll(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 3 /* Enter */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].ReplaceAllAction, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.replaceAll(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_REPLACE_INPUT_FOCUSED"]), - primary: undefined, - mac: { - primary: 2048 /* CtrlCmd */ | 3 /* Enter */, - } - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new FindCommand({ - id: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["FIND_IDS"].SelectAllMatchesAction, - precondition: _findModel_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_FIND_WIDGET_VISIBLE"], - handler: x => x.selectAllMatches(), - kbOpts: { - weight: 100 /* EditorContrib */ + 5, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 512 /* Alt */ | 3 /* Enter */ - } -})); + break; + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) { + return bounds.addSectionToLoop(message); + }); + break; -/***/ }), + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END: + loopModel = bounds.endLoop(); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'alt', conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js ***! - \**********************************************************************************/ -/*! exports provided: FindDecorations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) { + return bounds.newLoop(message); + }); + break; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindDecorations", function() { return FindDecorations; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND: + adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) { + return bounds.addSectionToLoop(message); + }); + break; + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END: + loopModel = bounds.endLoop(); + _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopModel, 'par', conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + default: + try { + // lastMsg = msg + msgModel = msg.msgModel; + msgModel.starty = bounds.getVerticalPos(); + msgModel.sequenceIndex = sequenceIndex; + drawMessage(diagram, msgModel); + bounds.models.addMessage(msgModel); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].error('error while drawing message', e); + } + } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc) -class FindDecorations { - constructor(editor) { - this._editor = editor; - this._decorations = []; - this._overviewRulerApproximateDecorations = []; - this._findScopeDecorationIds = []; - this._rangeHighlightDecorationId = null; - this._highlightedDecorationId = null; - this._startPosition = this._editor.getPosition(); - } - dispose() { - this._editor.deltaDecorations(this._allDecorations(), []); - this._decorations = []; - this._overviewRulerApproximateDecorations = []; - this._findScopeDecorationIds = []; - this._rangeHighlightDecorationId = null; - this._highlightedDecorationId = null; - } - reset() { - this._decorations = []; - this._overviewRulerApproximateDecorations = []; - this._findScopeDecorationIds = []; - this._rangeHighlightDecorationId = null; - this._highlightedDecorationId = null; - } - getCount() { - return this._decorations.length; - } - /** @deprecated use getFindScopes to support multiple selections */ - getFindScope() { - if (this._findScopeDecorationIds[0]) { - return this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]); - } - return null; - } - getFindScopes() { - if (this._findScopeDecorationIds.length) { - const scopes = this._findScopeDecorationIds.map(findScopeDecorationId => this._editor.getModel().getDecorationRange(findScopeDecorationId)).filter(element => !!element); - if (scopes.length) { - return scopes; - } - } - return null; - } - getStartPosition() { - return this._startPosition; - } - setStartPosition(newStartPosition) { - this._startPosition = newStartPosition; - this.setCurrentFindMatch(null); - } - _getDecorationIndex(decorationId) { - const index = this._decorations.indexOf(decorationId); - if (index >= 0) { - return index + 1; - } - return 1; - } - getCurrentMatchesPosition(desiredRange) { - let candidates = this._editor.getModel().getDecorationsInRange(desiredRange); - for (const candidate of candidates) { - const candidateOpts = candidate.options; - if (candidateOpts === FindDecorations._FIND_MATCH_DECORATION || candidateOpts === FindDecorations._CURRENT_FIND_MATCH_DECORATION) { - return this._getDecorationIndex(candidate.id); - } - } - // We don't know the current match position, so returns zero to show '?' in find widget - return 0; - } - setCurrentFindMatch(nextMatch) { - let newCurrentDecorationId = null; - let matchPosition = 0; - if (nextMatch) { - for (let i = 0, len = this._decorations.length; i < len; i++) { - let range = this._editor.getModel().getDecorationRange(this._decorations[i]); - if (nextMatch.equalsRange(range)) { - newCurrentDecorationId = this._decorations[i]; - matchPosition = (i + 1); - break; - } - } - } - if (this._highlightedDecorationId !== null || newCurrentDecorationId !== null) { - this._editor.changeDecorations((changeAccessor) => { - if (this._highlightedDecorationId !== null) { - changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._FIND_MATCH_DECORATION); - this._highlightedDecorationId = null; - } - if (newCurrentDecorationId !== null) { - this._highlightedDecorationId = newCurrentDecorationId; - changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._CURRENT_FIND_MATCH_DECORATION); - } - if (this._rangeHighlightDecorationId !== null) { - changeAccessor.removeDecoration(this._rangeHighlightDecorationId); - this._rangeHighlightDecorationId = null; - } - if (newCurrentDecorationId !== null) { - let rng = this._editor.getModel().getDecorationRange(newCurrentDecorationId); - if (rng.startLineNumber !== rng.endLineNumber && rng.endColumn === 1) { - let lineBeforeEnd = rng.endLineNumber - 1; - let lineBeforeEndMaxColumn = this._editor.getModel().getLineMaxColumn(lineBeforeEnd); - rng = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](rng.startLineNumber, rng.startColumn, lineBeforeEnd, lineBeforeEndMaxColumn); - } - this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION); - } - }); - } - return matchPosition; - } - set(findMatches, findScopes) { - this._editor.changeDecorations((accessor) => { - let findMatchesOptions = FindDecorations._FIND_MATCH_DECORATION; - let newOverviewRulerApproximateDecorations = []; - if (findMatches.length > 1000) { - // we go into a mode where the overview ruler gets "approximate" decorations - // the reason is that the overview ruler paints all the decorations in the file and we don't want to cause freezes - findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION; - // approximate a distance in lines where matches should be merged - const lineCount = this._editor.getModel().getLineCount(); - const height = this._editor.getLayoutInfo().height; - const approxPixelsPerLine = height / lineCount; - const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine)); - // merge decorations as much as possible - let prevStartLineNumber = findMatches[0].range.startLineNumber; - let prevEndLineNumber = findMatches[0].range.endLineNumber; - for (let i = 1, len = findMatches.length; i < len; i++) { - const range = findMatches[i].range; - if (prevEndLineNumber + mergeLinesDelta >= range.startLineNumber) { - if (range.endLineNumber > prevEndLineNumber) { - prevEndLineNumber = range.endLineNumber; - } - } - else { - newOverviewRulerApproximateDecorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](prevStartLineNumber, 1, prevEndLineNumber, 1), - options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION - }); - prevStartLineNumber = range.startLineNumber; - prevEndLineNumber = range.endLineNumber; - } - } - newOverviewRulerApproximateDecorations.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](prevStartLineNumber, 1, prevEndLineNumber, 1), - options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION - }); - } - // Find matches - let newFindMatchesDecorations = new Array(findMatches.length); - for (let i = 0, len = findMatches.length; i < len; i++) { - newFindMatchesDecorations[i] = { - range: findMatches[i].range, - options: findMatchesOptions - }; - } - this._decorations = accessor.deltaDecorations(this._decorations, newFindMatchesDecorations); - // Overview ruler approximate decorations - this._overviewRulerApproximateDecorations = accessor.deltaDecorations(this._overviewRulerApproximateDecorations, newOverviewRulerApproximateDecorations); - // Range highlight - if (this._rangeHighlightDecorationId) { - accessor.removeDecoration(this._rangeHighlightDecorationId); - this._rangeHighlightDecorationId = null; - } - // Find scope - if (this._findScopeDecorationIds.length) { - this._findScopeDecorationIds.forEach(findScopeDecorationId => accessor.removeDecoration(findScopeDecorationId)); - this._findScopeDecorationIds = []; - } - if (findScopes === null || findScopes === void 0 ? void 0 : findScopes.length) { - this._findScopeDecorationIds = findScopes.map(findScope => accessor.addDecoration(findScope, FindDecorations._FIND_SCOPE_DECORATION)); - } - }); - } - matchBeforePosition(position) { - if (this._decorations.length === 0) { - return null; - } - for (let i = this._decorations.length - 1; i >= 0; i--) { - let decorationId = this._decorations[i]; - let r = this._editor.getModel().getDecorationRange(decorationId); - if (!r || r.endLineNumber > position.lineNumber) { - continue; - } - if (r.endLineNumber < position.lineNumber) { - return r; - } - if (r.endColumn > position.column) { - continue; - } - return r; - } - return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1]); - } - matchAfterPosition(position) { - if (this._decorations.length === 0) { - return null; - } - for (let i = 0, len = this._decorations.length; i < len; i++) { - let decorationId = this._decorations[i]; - let r = this._editor.getModel().getDecorationRange(decorationId); - if (!r || r.startLineNumber < position.lineNumber) { - continue; - } - if (r.startLineNumber > position.lineNumber) { - return r; - } - if (r.startColumn < position.column) { - continue; - } - return r; - } - return this._editor.getModel().getDecorationRange(this._decorations[0]); - } - _allDecorations() { - let result = []; - result = result.concat(this._decorations); - result = result.concat(this._overviewRulerApproximateDecorations); - if (this._findScopeDecorationIds.length) { - result.push(...this._findScopeDecorationIds); - } - if (this._rangeHighlightDecorationId) { - result.push(this._rangeHighlightDecorationId); - } - return result; - } -} -FindDecorations._CURRENT_FIND_MATCH_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - zIndex: 13, - className: 'currentFindMatch', - showIfCollapsed: true, - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["overviewRulerFindMatchForeground"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__["OverviewRulerLane"].Center - }, - minimap: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["minimapFindMatch"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__["MinimapPosition"].Inline - } -}); -FindDecorations._FIND_MATCH_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'findMatch', - showIfCollapsed: true, - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["overviewRulerFindMatchForeground"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__["OverviewRulerLane"].Center - }, - minimap: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["minimapFindMatch"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__["MinimapPosition"].Inline - } -}); -FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'findMatch', - showIfCollapsed: true -}); -FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_4__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["overviewRulerFindMatchForeground"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_1__["OverviewRulerLane"].Center + if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) { + sequenceIndex++; } -}); -FindDecorations._RANGE_HIGHLIGHT_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'rangeHighlight', - isWholeLine: true -}); -FindDecorations._FIND_SCOPE_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_2__["ModelDecorationOptions"].register({ - className: 'findScope', - isWholeLine: true -}); - + }); -/***/ }), + if (conf.mirrorActors) { + // Draw actors below diagram + bounds.bumpVerticalPos(conf.boxMargin * 2); + drawActors(diagram, actors, actorKeys, bounds.getVerticalPos()); + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js ***! - \****************************************************************************/ -/*! exports provided: CONTEXT_FIND_WIDGET_VISIBLE, CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED, ToggleCaseSensitiveKeybinding, ToggleWholeWordKeybinding, ToggleRegexKeybinding, ToggleSearchScopeKeybinding, FIND_IDS, MATCHES_LIMIT, FindModelBoundToEditorModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_FIND_WIDGET_VISIBLE", function() { return CONTEXT_FIND_WIDGET_VISIBLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_FIND_INPUT_FOCUSED", function() { return CONTEXT_FIND_INPUT_FOCUSED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_REPLACE_INPUT_FOCUSED", function() { return CONTEXT_REPLACE_INPUT_FOCUSED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleCaseSensitiveKeybinding", function() { return ToggleCaseSensitiveKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleWholeWordKeybinding", function() { return ToggleWholeWordKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleRegexKeybinding", function() { return ToggleRegexKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleSearchScopeKeybinding", function() { return ToggleSearchScopeKeybinding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIND_IDS", function() { return FIND_IDS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MATCHES_LIMIT", function() { return MATCHES_LIMIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindModelBoundToEditorModel", function() { return FindModelBoundToEditorModel; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_model_textModelSearch_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/model/textModelSearch.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js"); -/* harmony import */ var _findDecorations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./findDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findDecorations.js"); -/* harmony import */ var _replaceAllCommand_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./replaceAllCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js"); -/* harmony import */ var _replacePattern_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./replacePattern.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + var _bounds$getBounds = bounds.getBounds(), + box = _bounds$getBounds.bounds; // Adjust line height of actor lines now that the height of the diagram is known + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('For line height fix Querying: #' + id + ' .actor-line'); + var actorLines = Object(d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('#' + id + ' .actor-line'); + actorLines.attr('y2', box.stopy); + var height = box.stopy - box.starty + 2 * conf.diagramMarginY; + if (conf.mirrorActors) { + height = height - conf.boxMargin + conf.bottomMarginAdj; + } + var width = box.stopx - box.startx + 2 * conf.diagramMarginX; + if (title) { + diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25); + } + Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(diagram, height, width, conf.useMaxWidth); + var extraVertForTitle = title ? 40 : 0; + diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle)); + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("models:", bounds.models); +}; +/** + * Retrieves the max message width of each actor, supports signals (messages, loops) + * and notes. + * + * It will enumerate each given message, and will determine its text width, in relation + * to the actor it originates from, and destined to. + * + * @param actors - The actors map + * @param messages - A list of message objects to iterate + */ +var getMaxMessageWidthPerActor = function getMaxMessageWidthPerActor(actors, messages) { + var maxMessageWidthPerActor = {}; + messages.forEach(function (msg) { + if (actors[msg.to] && actors[msg.from]) { + var actor = actors[msg.to]; // If this is the first actor, and the message is left of it, no need to calculate the margin + if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF && !actor.prevActor) { + return; + } // If this is the last actor, and the message is right of it, no need to calculate the margin + if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF && !actor.nextActor) { + return; + } + var isNote = msg.placement !== undefined; + var isMessage = !isNote; + var textFont = isNote ? noteFont(conf) : messageFont(conf); + var wrappedMessage = msg.wrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; + var messageDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(wrappedMessage, textFont); + var messageWidth = messageDimensions.width + 2 * conf.wrapPadding; + /* + * The following scenarios should be supported: + * + * - There's a message (non-note) between fromActor and toActor + * - If fromActor is on the right and toActor is on the left, we should + * define the toActor's margin + * - If fromActor is on the left and toActor is on the right, we should + * define the fromActor's margin + * - There's a note, in which case fromActor == toActor + * - If the note is to the left of the actor, we should define the previous actor + * margin + * - If the note is on the actor, we should define both the previous and next actor + * margins, each being the half of the note size + * - If the note is on the right of the actor, we should define the current actor + * margin + */ -const CONTEXT_FIND_WIDGET_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["RawContextKey"]('findWidgetVisible', false); -// Keep ContextKey use of 'Focussed' to not break when clauses -const CONTEXT_FIND_INPUT_FOCUSED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["RawContextKey"]('findInputFocussed', false); -const CONTEXT_REPLACE_INPUT_FOCUSED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["RawContextKey"]('replaceInputFocussed', false); -const ToggleCaseSensitiveKeybinding = { - primary: 512 /* Alt */ | 33 /* KEY_C */, - mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 33 /* KEY_C */ } -}; -const ToggleWholeWordKeybinding = { - primary: 512 /* Alt */ | 53 /* KEY_W */, - mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 53 /* KEY_W */ } -}; -const ToggleRegexKeybinding = { - primary: 512 /* Alt */ | 48 /* KEY_R */, - mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 48 /* KEY_R */ } -}; -const ToggleSearchScopeKeybinding = { - primary: 512 /* Alt */ | 42 /* KEY_L */, - mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 42 /* KEY_L */ } -}; -const FIND_IDS = { - StartFindAction: 'actions.find', - StartFindWithSelection: 'actions.findWithSelection', - NextMatchFindAction: 'editor.action.nextMatchFindAction', - PreviousMatchFindAction: 'editor.action.previousMatchFindAction', - NextSelectionMatchFindAction: 'editor.action.nextSelectionMatchFindAction', - PreviousSelectionMatchFindAction: 'editor.action.previousSelectionMatchFindAction', - StartFindReplaceAction: 'editor.action.startFindReplaceAction', - CloseFindWidgetCommand: 'closeFindWidget', - ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive', - ToggleWholeWordCommand: 'toggleFindWholeWord', - ToggleRegexCommand: 'toggleFindRegex', - ToggleSearchScopeCommand: 'toggleFindInSelection', - TogglePreserveCaseCommand: 'togglePreserveCase', - ReplaceOneAction: 'editor.action.replaceOne', - ReplaceAllAction: 'editor.action.replaceAll', - SelectAllMatchesAction: 'editor.action.selectAllMatches' -}; -const MATCHES_LIMIT = 19999; -const RESEARCH_DELAY = 240; -class FindModelBoundToEditorModel { - constructor(editor, state) { - this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._editor = editor; - this._state = state; - this._isDisposed = false; - this._startSearchingTimer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"](); - this._decorations = new _findDecorations_js__WEBPACK_IMPORTED_MODULE_7__["FindDecorations"](editor); - this._toDispose.add(this._decorations); - this._updateDecorationsScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this.research(false), 100); - this._toDispose.add(this._updateDecorationsScheduler); - this._toDispose.add(this._editor.onDidChangeCursorPosition((e) => { - if (e.reason === 3 /* Explicit */ - || e.reason === 5 /* Undo */ - || e.reason === 6 /* Redo */) { - this._decorations.setStartPosition(this._editor.getPosition()); - } - })); - this._ignoreModelContentChanged = false; - this._toDispose.add(this._editor.onDidChangeModelContent((e) => { - if (this._ignoreModelContentChanged) { - return; - } - if (e.isFlush) { - // a model.setValue() was called - this._decorations.reset(); - } - this._decorations.setStartPosition(this._editor.getPosition()); - this._updateDecorationsScheduler.schedule(); - })); - this._toDispose.add(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); - this.research(false, this._state.searchScope); - } - dispose() { - this._isDisposed = true; - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._startSearchingTimer); - this._toDispose.dispose(); - } - _onStateChanged(e) { - if (this._isDisposed) { - // The find model is disposed during a find state changed event - return; - } - if (!this._editor.hasModel()) { - // The find model will be disposed momentarily - return; - } - if (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) { - let model = this._editor.getModel(); - if (model.isTooLargeForSyncing()) { - this._startSearchingTimer.cancel(); - this._startSearchingTimer.setIfNotSet(() => { - if (e.searchScope) { - this.research(e.moveCursor, this._state.searchScope); - } - else { - this.research(e.moveCursor); - } - }, RESEARCH_DELAY); - } - else { - if (e.searchScope) { - this.research(e.moveCursor, this._state.searchScope); - } - else { - this.research(e.moveCursor); - } - } - } - } - static _getSearchRange(model, findScope) { - // If we have set now or before a find scope, use it for computing the search range - if (findScope) { - return findScope; - } - return model.getFullModelRange(); - } - research(moveCursor, newFindScope) { - let findScopes = null; - if (typeof newFindScope !== 'undefined') { - if (newFindScope !== null) { - if (!Array.isArray(newFindScope)) { - findScopes = [newFindScope]; - } - else { - findScopes = newFindScope; - } - } - } - else { - findScopes = this._decorations.getFindScopes(); - } - if (findScopes !== null) { - findScopes = findScopes.map(findScope => { - if (findScope.startLineNumber !== findScope.endLineNumber) { - let endLineNumber = findScope.endLineNumber; - if (findScope.endColumn === 1) { - endLineNumber = endLineNumber - 1; - } - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](findScope.startLineNumber, 1, endLineNumber, this._editor.getModel().getLineMaxColumn(endLineNumber)); - } - return findScope; - }); - } - let findMatches = this._findMatches(findScopes, false, MATCHES_LIMIT); - this._decorations.set(findMatches, findScopes); - const editorSelection = this._editor.getSelection(); - let currentMatchesPosition = this._decorations.getCurrentMatchesPosition(editorSelection); - if (currentMatchesPosition === 0 && findMatches.length > 0) { - // current selection is not on top of a match - // try to find its nearest result from the top of the document - const matchAfterSelection = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__["findFirstInSorted"])(findMatches.map(match => match.range), range => _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].compareRangesUsingStarts(range, editorSelection) >= 0); - currentMatchesPosition = matchAfterSelection > 0 ? matchAfterSelection - 1 + 1 /** match position is one based */ : currentMatchesPosition; - } - this._state.changeMatchInfo(currentMatchesPosition, this._decorations.getCount(), undefined); - if (moveCursor && this._editor.getOption(29 /* find */).cursorMoveOnType) { - this._moveToNextMatch(this._decorations.getStartPosition()); - } - } - _hasMatches() { - return (this._state.matchesCount > 0); - } - _cannotFind() { - if (!this._hasMatches()) { - let findScope = this._decorations.getFindScope(); - if (findScope) { - // Reveal the selection so user is reminded that 'selection find' is on. - this._editor.revealRangeInCenterIfOutsideViewport(findScope, 0 /* Smooth */); - } - return true; - } - return false; - } - _setCurrentFindMatch(match) { - let matchesPosition = this._decorations.setCurrentFindMatch(match); - this._state.changeMatchInfo(matchesPosition, this._decorations.getCount(), match); - this._editor.setSelection(match); - this._editor.revealRangeInCenterIfOutsideViewport(match, 0 /* Smooth */); - } - _prevSearchPosition(before) { - let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0 - || this._state.searchString.indexOf('$') >= 0); - let { lineNumber, column } = before; - let model = this._editor.getModel(); - if (isUsingLineStops || column === 1) { - if (lineNumber === 1) { - lineNumber = model.getLineCount(); - } - else { - lineNumber--; - } - column = model.getLineMaxColumn(lineNumber); - } - else { - column--; - } - return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - _moveToPrevMatch(before, isRecursed = false) { - if (!this._state.canNavigateBack()) { - // we are beyond the first matched find result - // instead of doing nothing, we should refocus the first item - const nextMatchRange = this._decorations.matchAfterPosition(before); - if (nextMatchRange) { - this._setCurrentFindMatch(nextMatchRange); - } - return; - } - if (this._decorations.getCount() < MATCHES_LIMIT) { - let prevMatchRange = this._decorations.matchBeforePosition(before); - if (prevMatchRange && prevMatchRange.isEmpty() && prevMatchRange.getStartPosition().equals(before)) { - before = this._prevSearchPosition(before); - prevMatchRange = this._decorations.matchBeforePosition(before); - } - if (prevMatchRange) { - this._setCurrentFindMatch(prevMatchRange); - } - return; - } - if (this._cannotFind()) { - return; - } - let findScope = this._decorations.getFindScope(); - let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope); - // ...(----)...|... - if (searchRange.getEndPosition().isBefore(before)) { - before = searchRange.getEndPosition(); - } - // ...|...(----)... - if (before.isBefore(searchRange.getStartPosition())) { - before = searchRange.getEndPosition(); - } - let { lineNumber, column } = before; - let model = this._editor.getModel(); - let position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false); - if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) { - // Looks like we're stuck at this position, unacceptable! - position = this._prevSearchPosition(position); - prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false); - } - if (!prevMatch) { - // there is precisely one match and selection is on top of it - return; - } - if (!isRecursed && !searchRange.containsRange(prevMatch.range)) { - return this._moveToPrevMatch(prevMatch.range.getStartPosition(), true); - } - this._setCurrentFindMatch(prevMatch.range); - } - moveToPrevMatch() { - this._moveToPrevMatch(this._editor.getSelection().getStartPosition()); - } - _nextSearchPosition(after) { - let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0 - || this._state.searchString.indexOf('$') >= 0); - let { lineNumber, column } = after; - let model = this._editor.getModel(); - if (isUsingLineStops || column === model.getLineMaxColumn(lineNumber)) { - if (lineNumber === model.getLineCount()) { - lineNumber = 1; - } - else { - lineNumber++; - } - column = 1; - } - else { - column++; - } - return new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - } - _moveToNextMatch(after) { - if (!this._state.canNavigateForward()) { - // we are beyond the last matched find result - // instead of doing nothing, we should refocus the last item - const prevMatchRange = this._decorations.matchBeforePosition(after); - if (prevMatchRange) { - this._setCurrentFindMatch(prevMatchRange); - } - return; - } - if (this._decorations.getCount() < MATCHES_LIMIT) { - let nextMatchRange = this._decorations.matchAfterPosition(after); - if (nextMatchRange && nextMatchRange.isEmpty() && nextMatchRange.getStartPosition().equals(after)) { - // Looks like we're stuck at this position, unacceptable! - after = this._nextSearchPosition(after); - nextMatchRange = this._decorations.matchAfterPosition(after); - } - if (nextMatchRange) { - this._setCurrentFindMatch(nextMatchRange); - } - return; - } - let nextMatch = this._getNextMatch(after, false, true); - if (nextMatch) { - this._setCurrentFindMatch(nextMatch.range); - } - } - _getNextMatch(after, captureMatches, forceMove, isRecursed = false) { - if (this._cannotFind()) { - return null; - } - let findScope = this._decorations.getFindScope(); - let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope); - // ...(----)...|... - if (searchRange.getEndPosition().isBefore(after)) { - after = searchRange.getStartPosition(); - } - // ...|...(----)... - if (after.isBefore(searchRange.getStartPosition())) { - after = searchRange.getStartPosition(); - } - let { lineNumber, column } = after; - let model = this._editor.getModel(); - let position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](lineNumber, column); - let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, captureMatches); - if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { - // Looks like we're stuck at this position, unacceptable! - position = this._nextSearchPosition(position); - nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, captureMatches); - } - if (!nextMatch) { - // there is precisely one match and selection is on top of it - return null; - } - if (!isRecursed && !searchRange.containsRange(nextMatch.range)) { - return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true); - } - return nextMatch; - } - moveToNextMatch() { - this._moveToNextMatch(this._editor.getSelection().getEndPosition()); - } - _getReplacePattern() { - if (this._state.isRegex) { - return Object(_replacePattern_js__WEBPACK_IMPORTED_MODULE_9__["parseReplaceString"])(this._state.replaceString); - } - return _replacePattern_js__WEBPACK_IMPORTED_MODULE_9__["ReplacePattern"].fromStaticValue(this._state.replaceString); - } - replace() { - if (!this._hasMatches()) { - return; - } - let replacePattern = this._getReplacePattern(); - let selection = this._editor.getSelection(); - let nextMatch = this._getNextMatch(selection.getStartPosition(), true, false); - if (nextMatch) { - if (selection.equalsRange(nextMatch.range)) { - // selection sits on a find match => replace it! - let replaceString = replacePattern.buildReplaceString(nextMatch.matches, this._state.preserveCase); - let command = new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommand"](selection, replaceString); - this._executeEditorCommand('replace', command); - this._decorations.setStartPosition(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](selection.startLineNumber, selection.startColumn + replaceString.length)); - this.research(true); - } - else { - this._decorations.setStartPosition(this._editor.getPosition()); - this._setCurrentFindMatch(nextMatch.range); - } - } - } - _findMatches(findScopes, captureMatches, limitResultCount) { - const searchRanges = (findScopes || [null]).map((scope) => FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), scope)); - return this._editor.getModel().findMatches(this._state.searchString, searchRanges, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, captureMatches, limitResultCount); - } - replaceAll() { - if (!this._hasMatches()) { - return; - } - const findScopes = this._decorations.getFindScopes(); - if (findScopes === null && this._state.matchesCount >= MATCHES_LIMIT) { - // Doing a replace on the entire file that is over ${MATCHES_LIMIT} matches - this._largeReplaceAll(); - } - else { - this._regularReplaceAll(findScopes); - } - this.research(false); - } - _largeReplaceAll() { - const searchParams = new _common_model_textModelSearch_js__WEBPACK_IMPORTED_MODULE_6__["SearchParams"](this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null); - const searchData = searchParams.parseSearchRequest(); - if (!searchData) { - return; - } - let searchRegex = searchData.regex; - if (!searchRegex.multiline) { - let mod = 'mu'; - if (searchRegex.ignoreCase) { - mod += 'i'; - } - if (searchRegex.global) { - mod += 'g'; - } - searchRegex = new RegExp(searchRegex.source, mod); - } - const model = this._editor.getModel(); - const modelText = model.getValue(1 /* LF */); - const fullModelRange = model.getFullModelRange(); - const replacePattern = this._getReplacePattern(); - let resultText; - const preserveCase = this._state.preserveCase; - if (replacePattern.hasReplacementPatterns || preserveCase) { - resultText = modelText.replace(searchRegex, function () { - return replacePattern.buildReplaceString(arguments, preserveCase); - }); - } - else { - resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null, preserveCase)); - } - let command = new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_2__["ReplaceCommandThatPreservesSelection"](fullModelRange, resultText, this._editor.getSelection()); - this._executeEditorCommand('replaceAll', command); - } - _regularReplaceAll(findScopes) { - const replacePattern = this._getReplacePattern(); - // Get all the ranges (even more than the highlighted ones) - let matches = this._findMatches(findScopes, replacePattern.hasReplacementPatterns || this._state.preserveCase, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - let replaceStrings = []; - for (let i = 0, len = matches.length; i < len; i++) { - replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches, this._state.preserveCase); - } - let command = new _replaceAllCommand_js__WEBPACK_IMPORTED_MODULE_8__["ReplaceAllCommand"](this._editor.getSelection(), matches.map(m => m.range), replaceStrings); - this._executeEditorCommand('replaceAll', command); - } - selectAllMatches() { - if (!this._hasMatches()) { - return; + if (isMessage && msg.from === actor.nextActor) { + maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth); + } else if (isMessage && msg.from === actor.prevActor) { + maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); + } else if (isMessage && msg.from === msg.to) { + maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); + maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth / 2); + } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) { + maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); + } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) { + maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth); + } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.OVER) { + if (actor.prevActor) { + maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth / 2); } - let findScopes = this._decorations.getFindScopes(); - // Get all the ranges (even more than the highlighted ones) - let matches = this._findMatches(findScopes, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - let selections = matches.map(m => new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__["Selection"](m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn)); - // If one of the ranges is the editor selection, then maintain it as primary - let editorSelection = this._editor.getSelection(); - for (let i = 0, len = selections.length; i < len; i++) { - let sel = selections[i]; - if (sel.equalsRange(editorSelection)) { - selections = [editorSelection].concat(selections.slice(0, i)).concat(selections.slice(i + 1)); - break; - } + + if (actor.nextActor) { + maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); } - this._editor.setSelections(selections); + } } - _executeEditorCommand(source, command) { - try { - this._ignoreModelContentChanged = true; - this._editor.pushUndoStop(); - this._editor.executeCommand(source, command); - this._editor.pushUndoStop(); - } - finally { - this._ignoreModelContentChanged = false; - } + }); + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('maxMessageWidthPerActor:', maxMessageWidthPerActor); + return maxMessageWidthPerActor; +}; +/** + * This will calculate the optimal margin for each given actor, for a given + * actor->messageWidth map. + * + * An actor's margin is determined by the width of the actor, the width of the + * largest message that originates from it, and the configured conf.actorMargin. + * + * @param actors - The actors map to calculate margins for + * @param actorToMessageWidth - A map of actor key -> max message width it holds + */ + + +var calculateActorMargins = function calculateActorMargins(actors, actorToMessageWidth) { + var maxHeight = 0; + Object.keys(actors).forEach(function (prop) { + var actor = actors[prop]; + + if (actor.wrap) { + actor.description = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(actor.description, conf.width - 2 * conf.wrapPadding, actorFont(conf)); } -} + var actDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(actor.description, actorFont(conf)); + actor.width = actor.wrap ? conf.width : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding); + actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height; + maxHeight = Math.max(maxHeight, actor.height); + }); -/***/ }), + for (var actorKey in actorToMessageWidth) { + var actor = actors[actorKey]; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findOptionsWidget.js ***! - \************************************************************************************/ -/*! exports provided: FindOptionsWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!actor) { + continue; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindOptionsWidget", function() { return FindOptionsWidget; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/findinput/findInputCheckboxes.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js"); -/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./findModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + var nextActor = actors[actor.nextActor]; // No need to space out an actor that doesn't have a next link + if (!nextActor) { + continue; + } + + var messageWidth = actorToMessageWidth[actorKey]; + var actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; + actor.margin = Math.max(actorWidth, conf.actorMargin); + } + return Math.max(maxHeight, conf.height); +}; +var buildNoteModel = function buildNoteModel(msg, actors) { + var startx = actors[msg.from].x; + var stopx = actors[msg.to].x; + var shouldWrap = msg.wrap && msg.message; + var textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, noteFont(conf)); + var noteModel = { + width: shouldWrap ? conf.width : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin), + height: 0, + startx: actors[msg.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: msg.message + }; + if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) { + noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin); + noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2; + } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) { + noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin); + noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2; + } else if (msg.to === msg.from) { + textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(conf.width, actors[msg.from].width), noteFont(conf)) : msg.message, noteFont(conf)); + noteModel.width = shouldWrap ? Math.max(conf.width, actors[msg.from].width) : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin); + noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2; + } else { + noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin; + noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2; + } + if (shouldWrap) { + noteModel.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, noteModel.width - 2 * conf.wrapPadding, noteFont(conf)); + } + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug("NM:[".concat(noteModel.startx, ",").concat(noteModel.stopx, ",").concat(noteModel.starty, ",").concat(noteModel.stopy, ":").concat(noteModel.width, ",").concat(noteModel.height, "=").concat(msg.message, "]")); + return noteModel; +}; -class FindOptionsWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_2__["Widget"] { - constructor(editor, state, keybindingService, themeService) { - super(); - this._hideSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_3__["RunOnceScheduler"](() => this._hide(), 2000)); - this._isVisible = false; - this._editor = editor; - this._state = state; - this._keybindingService = keybindingService; - this._domNode = document.createElement('div'); - this._domNode.className = 'findOptionsWidget'; - this._domNode.style.display = 'none'; - this._domNode.style.top = '10px'; - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); - const inputActiveOptionBorderColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionBorder"]); - const inputActiveOptionForegroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionForeground"]); - const inputActiveOptionBackgroundColor = themeService.getColorTheme().getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionBackground"]); - this.caseSensitive = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__["CaseSensitiveCheckbox"]({ - appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__["FIND_IDS"].ToggleCaseSensitiveCommand), - isChecked: this._state.matchCase, - inputActiveOptionBorder: inputActiveOptionBorderColor, - inputActiveOptionForeground: inputActiveOptionForegroundColor, - inputActiveOptionBackground: inputActiveOptionBackgroundColor - })); - this._domNode.appendChild(this.caseSensitive.domNode); - this._register(this.caseSensitive.onChange(() => { - this._state.change({ - matchCase: this.caseSensitive.checked - }, false); - })); - this.wholeWords = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__["WholeWordsCheckbox"]({ - appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__["FIND_IDS"].ToggleWholeWordCommand), - isChecked: this._state.wholeWord, - inputActiveOptionBorder: inputActiveOptionBorderColor, - inputActiveOptionForeground: inputActiveOptionForegroundColor, - inputActiveOptionBackground: inputActiveOptionBackgroundColor - })); - this._domNode.appendChild(this.wholeWords.domNode); - this._register(this.wholeWords.onChange(() => { - this._state.change({ - wholeWord: this.wholeWords.checked - }, false); - })); - this.regex = this._register(new _base_browser_ui_findinput_findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_1__["RegexCheckbox"]({ - appendTitle: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_4__["FIND_IDS"].ToggleRegexCommand), - isChecked: this._state.isRegex, - inputActiveOptionBorder: inputActiveOptionBorderColor, - inputActiveOptionForeground: inputActiveOptionForegroundColor, - inputActiveOptionBackground: inputActiveOptionBackgroundColor - })); - this._domNode.appendChild(this.regex.domNode); - this._register(this.regex.onChange(() => { - this._state.change({ - isRegex: this.regex.checked - }, false); - })); - this._editor.addOverlayWidget(this); - this._register(this._state.onFindReplaceStateChange((e) => { - let somethingChanged = false; - if (e.isRegex) { - this.regex.checked = this._state.isRegex; - somethingChanged = true; - } - if (e.wholeWord) { - this.wholeWords.checked = this._state.wholeWord; - somethingChanged = true; - } - if (e.matchCase) { - this.caseSensitive.checked = this._state.matchCase; - somethingChanged = true; - } - if (!this._state.isRevealed && somethingChanged) { - this._revealTemporarily(); - } - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableNonBubblingMouseOutListener"](this._domNode, (e) => this._onMouseOut())); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](this._domNode, 'mouseover', (e) => this._onMouseOver())); - this._applyTheme(themeService.getColorTheme()); - this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this))); - } - _keybindingLabelFor(actionId) { - let kb = this._keybindingService.lookupKeybinding(actionId); - if (!kb) { - return ''; - } - return ` (${kb.getLabel()})`; - } - dispose() { - this._editor.removeOverlayWidget(this); - super.dispose(); - } - // ----- IOverlayWidget API - getId() { - return FindOptionsWidget.ID; - } - getDomNode() { - return this._domNode; - } - getPosition() { - return { - preference: 0 /* TOP_RIGHT_CORNER */ - }; - } - highlightFindOptions() { - this._revealTemporarily(); - } - _revealTemporarily() { - this._show(); - this._hideSoon.schedule(); - } - _onMouseOut() { - this._hideSoon.schedule(); - } - _onMouseOver() { - this._hideSoon.cancel(); - } - _show() { - if (this._isVisible) { - return; - } - this._isVisible = true; - this._domNode.style.display = 'block'; - } - _hide() { - if (!this._isVisible) { - return; - } - this._isVisible = false; - this._domNode.style.display = 'none'; - } - _applyTheme(theme) { - let inputStyles = { - inputActiveOptionBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionBorder"]), - inputActiveOptionForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionForeground"]), - inputActiveOptionBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputActiveOptionBackground"]) - }; - this.caseSensitive.style(inputStyles); - this.wholeWords.style(inputStyles); - this.regex.style(inputStyles); - } -} -FindOptionsWidget.ID = 'editor.contrib.findOptionsWidget'; -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__["registerThemingParticipant"])((theme, collector) => { - const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorWidgetBackground"]); - if (widgetBackground) { - collector.addRule(`.monaco-editor .findOptionsWidget { background-color: ${widgetBackground}; }`); - } - const widgetForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorWidgetForeground"]); - if (widgetForeground) { - collector.addRule(`.monaco-editor .findOptionsWidget { color: ${widgetForeground}; }`); - } - const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["widgetShadow"]); - if (widgetShadowColor) { - collector.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); - } - const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["contrastBorder"]); - if (hcBorder) { - collector.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${hcBorder}; }`); - } -}); +var buildMessageModel = function buildMessageModel(msg, actors) { + var process = false; + if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) { + process = true; + } -/***/ }), + if (!process) { + return {}; + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findState.js ***! - \****************************************************************************/ -/*! exports provided: FindReplaceState */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var fromBounds = activationBounds(msg.from, actors); + var toBounds = activationBounds(msg.to, actors); + var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0; + var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1; + var allBounds = fromBounds.concat(toBounds); + var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindReplaceState", function() { return FindReplaceState; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./findModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + if (msg.wrap && msg.message) { + msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf)); + } + var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf)); + return { + width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width), + height: 0, + startx: fromBounds[fromIdx], + stopx: toBounds[toIdx], + starty: 0, + stopy: 0, + message: msg.message, + type: msg.type, + wrap: msg.wrap, + fromBounds: Math.min.apply(null, allBounds), + toBounds: Math.max.apply(null, allBounds) + }; +}; +var calculateLoopBounds = function calculateLoopBounds(messages, actors) { + var loops = {}; + var stack = []; + var current, noteModel, msgModel; + messages.forEach(function (msg) { + msg.id = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].random({ + length: 10 + }); + switch (msg.type) { + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START: + stack.push({ + id: msg.id, + msg: msg.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; -function effectiveOptionValue(override, value) { - if (override === 1 /* True */) { - return true; - } - if (override === 2 /* False */) { - return false; - } - return value; -} -class FindReplaceState extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(); - this._onFindReplaceStateChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this.onFindReplaceStateChange = this._onFindReplaceStateChange.event; - this._searchString = ''; - this._replaceString = ''; - this._isRevealed = false; - this._isReplaceRevealed = false; - this._isRegex = false; - this._isRegexOverride = 0 /* NotSet */; - this._wholeWord = false; - this._wholeWordOverride = 0 /* NotSet */; - this._matchCase = false; - this._matchCaseOverride = 0 /* NotSet */; - this._preserveCase = false; - this._preserveCaseOverride = 0 /* NotSet */; - this._searchScope = null; - this._matchesPosition = 0; - this._matchesCount = 0; - this._currentMatch = null; - this._loop = true; - } - get searchString() { return this._searchString; } - get replaceString() { return this._replaceString; } - get isRevealed() { return this._isRevealed; } - get isReplaceRevealed() { return this._isReplaceRevealed; } - get isRegex() { return effectiveOptionValue(this._isRegexOverride, this._isRegex); } - get wholeWord() { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); } - get matchCase() { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); } - get preserveCase() { return effectiveOptionValue(this._preserveCaseOverride, this._preserveCase); } - get actualIsRegex() { return this._isRegex; } - get actualWholeWord() { return this._wholeWord; } - get actualMatchCase() { return this._matchCase; } - get actualPreserveCase() { return this._preserveCase; } - get searchScope() { return this._searchScope; } - get matchesPosition() { return this._matchesPosition; } - get matchesCount() { return this._matchesCount; } - get currentMatch() { return this._currentMatch; } - changeMatchInfo(matchesPosition, matchesCount, currentMatch) { - let changeEvent = { - moveCursor: false, - updateHistory: false, - searchString: false, - replaceString: false, - isRevealed: false, - isReplaceRevealed: false, - isRegex: false, - wholeWord: false, - matchCase: false, - preserveCase: false, - searchScope: false, - matchesPosition: false, - matchesCount: false, - currentMatch: false, - loop: false - }; - let somethingChanged = false; - if (matchesCount === 0) { - matchesPosition = 0; - } - if (matchesPosition > matchesCount) { - matchesPosition = matchesCount; - } - if (this._matchesPosition !== matchesPosition) { - this._matchesPosition = matchesPosition; - changeEvent.matchesPosition = true; - somethingChanged = true; - } - if (this._matchesCount !== matchesCount) { - this._matchesCount = matchesCount; - changeEvent.matchesCount = true; - somethingChanged = true; - } - if (typeof currentMatch !== 'undefined') { - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].equalsRange(this._currentMatch, currentMatch)) { - this._currentMatch = currentMatch; - changeEvent.currentMatch = true; - somethingChanged = true; - } - } - if (somethingChanged) { - this._onFindReplaceStateChange.fire(changeEvent); - } - } - change(newState, moveCursor, updateHistory = true) { - var _a; - let changeEvent = { - moveCursor: moveCursor, - updateHistory: updateHistory, - searchString: false, - replaceString: false, - isRevealed: false, - isReplaceRevealed: false, - isRegex: false, - wholeWord: false, - matchCase: false, - preserveCase: false, - searchScope: false, - matchesPosition: false, - matchesCount: false, - currentMatch: false, - loop: false - }; - let somethingChanged = false; - const oldEffectiveIsRegex = this.isRegex; - const oldEffectiveWholeWords = this.wholeWord; - const oldEffectiveMatchCase = this.matchCase; - const oldEffectivePreserveCase = this.preserveCase; - if (typeof newState.searchString !== 'undefined') { - if (this._searchString !== newState.searchString) { - this._searchString = newState.searchString; - changeEvent.searchString = true; - somethingChanged = true; - } - } - if (typeof newState.replaceString !== 'undefined') { - if (this._replaceString !== newState.replaceString) { - this._replaceString = newState.replaceString; - changeEvent.replaceString = true; - somethingChanged = true; - } - } - if (typeof newState.isRevealed !== 'undefined') { - if (this._isRevealed !== newState.isRevealed) { - this._isRevealed = newState.isRevealed; - changeEvent.isRevealed = true; - somethingChanged = true; - } - } - if (typeof newState.isReplaceRevealed !== 'undefined') { - if (this._isReplaceRevealed !== newState.isReplaceRevealed) { - this._isReplaceRevealed = newState.isReplaceRevealed; - changeEvent.isReplaceRevealed = true; - somethingChanged = true; - } - } - if (typeof newState.isRegex !== 'undefined') { - this._isRegex = newState.isRegex; - } - if (typeof newState.wholeWord !== 'undefined') { - this._wholeWord = newState.wholeWord; - } - if (typeof newState.matchCase !== 'undefined') { - this._matchCase = newState.matchCase; - } - if (typeof newState.preserveCase !== 'undefined') { - this._preserveCase = newState.preserveCase; - } - if (typeof newState.searchScope !== 'undefined') { - if (!((_a = newState.searchScope) === null || _a === void 0 ? void 0 : _a.every((newSearchScope) => { - var _a; - return (_a = this._searchScope) === null || _a === void 0 ? void 0 : _a.some(existingSearchScope => { - return !_common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].equalsRange(existingSearchScope, newSearchScope); - }); - }))) { - this._searchScope = newState.searchScope; - changeEvent.searchScope = true; - somethingChanged = true; - } - } - if (typeof newState.loop !== 'undefined') { - if (this._loop !== newState.loop) { - this._loop = newState.loop; - changeEvent.loop = true; - somethingChanged = true; - } - } - // Overrides get set when they explicitly come in and get reset anytime something else changes - this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : 0 /* NotSet */); - this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : 0 /* NotSet */); - this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : 0 /* NotSet */); - this._preserveCaseOverride = (typeof newState.preserveCaseOverride !== 'undefined' ? newState.preserveCaseOverride : 0 /* NotSet */); - if (oldEffectiveIsRegex !== this.isRegex) { - somethingChanged = true; - changeEvent.isRegex = true; - } - if (oldEffectiveWholeWords !== this.wholeWord) { - somethingChanged = true; - changeEvent.wholeWord = true; - } - if (oldEffectiveMatchCase !== this.matchCase) { - somethingChanged = true; - changeEvent.matchCase = true; + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND: + if (msg.message) { + current = stack.pop(); + loops[current.id] = current; + loops[msg.id] = current; + stack.push(current); } - if (oldEffectivePreserveCase !== this.preserveCase) { - somethingChanged = true; - changeEvent.preserveCase = true; + + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END: + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END: + current = stack.pop(); + loops[current.id] = current; + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START: + { + var actorRect = actors[msg.from ? msg.from.actor : msg.to.actor]; + var stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; + var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + var toAdd = { + startx: x, + stopx: x + conf.activationWidth, + actor: msg.from.actor, + enabled: true + }; + bounds.activations.push(toAdd); } - if (somethingChanged) { - this._onFindReplaceStateChange.fire(changeEvent); + break; + + case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END: + { + var lastActorActivationIdx = bounds.activations.map(function (a) { + return a.actor; + }).lastIndexOf(msg.from.actor); + delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; } + break; } - canNavigateBack() { - return this.canNavigateInLoop() || (this.matchesPosition !== 1); - } - canNavigateForward() { - return this.canNavigateInLoop() || (this.matchesPosition < this.matchesCount); - } - canNavigateInLoop() { - return this._loop || (this.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_3__["MATCHES_LIMIT"]); + + var isNote = msg.placement !== undefined; + + if (isNote) { + noteModel = buildNoteModel(msg, actors); + msg.noteModel = noteModel; + stack.forEach(function (stk) { + current = stk; + current.from = Math.min(current.from, noteModel.startx); + current.to = Math.max(current.to, noteModel.startx + noteModel.width); + current.width = Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; + }); + } else { + msgModel = buildMessageModel(msg, actors); + msg.msgModel = msgModel; + + if (msgModel.startx && msgModel.stopx && stack.length > 0) { + stack.forEach(function (stk) { + current = stk; + + if (msgModel.startx === msgModel.stopx) { + var from = actors[msg.from]; + var to = actors[msg.to]; + current.from = Math.min(from.x - msgModel.width / 2, from.x - from.width / 2, current.from); + current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to); + current.width = Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; + } else { + current.from = Math.min(msgModel.startx, current.from); + current.to = Math.max(msgModel.stopx, current.to); + current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth; + } + }); + } } -} + }); + bounds.activations = []; + _logger__WEBPACK_IMPORTED_MODULE_2__["log"].debug('Loop type widths:', loops); + return loops; +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + bounds: bounds, + drawActors: drawActors, + setConf: setConf, + draw: draw +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css ***! - \******************************************************************************/ +/***/ "./src/diagrams/sequence/styles.js": +/*!*****************************************!*\ + !*** ./src/diagrams/sequence/styles.js ***! + \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./findWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - +var getStyles = function getStyles(options) { + return ".actor {\n stroke: ".concat(options.actorBorder, ";\n fill: ").concat(options.actorBkg, ";\n }\n\n text.actor > tspan {\n fill: ").concat(options.actorTextColor, ";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(options.actorLineColor, ";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.signalColor, ";\n }\n\n #arrowhead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .sequenceNumber {\n fill: ").concat(options.sequenceNumberColor, ";\n }\n\n #sequencenumber {\n fill: ").concat(options.signalColor, ";\n }\n\n #crosshead path {\n fill: ").concat(options.signalColor, ";\n stroke: ").concat(options.signalColor, ";\n }\n\n .messageText {\n fill: ").concat(options.signalTextColor, ";\n stroke: ").concat(options.signalTextColor, ";\n }\n\n .labelBox {\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBkgColor, ";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(options.labelTextColor, ";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(options.loopTextColor, ";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(options.labelBoxBorderColor, ";\n fill: ").concat(options.labelBoxBorderColor, ";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(options.noteTextColor, ";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation1 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n\n .activation2 {\n fill: ").concat(options.activationBkgColor, ";\n stroke: ").concat(options.activationBorderColor, ";\n }\n"); +}; -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_findWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = (getStyles); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.js ***! - \*****************************************************************************/ -/*! exports provided: findCloseIcon, findReplaceIcon, findReplaceAllIcon, findPreviousMatchIcon, findNextMatchIcon, FindWidgetViewZone, FindWidget, SimpleButton */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findCloseIcon", function() { return findCloseIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findReplaceIcon", function() { return findReplaceIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findReplaceAllIcon", function() { return findReplaceAllIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findPreviousMatchIcon", function() { return findPreviousMatchIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findNextMatchIcon", function() { return findNextMatchIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindWidgetViewZone", function() { return FindWidgetViewZone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindWidget", function() { return FindWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleButton", function() { return SimpleButton; }); -/* harmony import */ var _findWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_browser_ui_checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/checkbox/checkbox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js"); -/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"); -/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _findModel_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./findModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findModel.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/browser/contextScopedHistoryWidget.js */ "./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/***/ "./src/diagrams/sequence/svgDraw.js": +/*!******************************************!*\ + !*** ./src/diagrams/sequence/svgDraw.js ***! + \******************************************/ +/*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertArrowHead, insertArrowFilledHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowFilledHead", function() { return insertArrowFilledHead; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; }); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +var drawRect = function drawRect(elem, rectData) { + var rectElem = elem.append('rect'); + rectElem.attr('x', rectData.x); + rectElem.attr('y', rectData.y); + rectElem.attr('fill', rectData.fill); + rectElem.attr('stroke', rectData.stroke); + rectElem.attr('width', rectData.width); + rectElem.attr('height', rectData.height); + rectElem.attr('rx', rectData.rx); + rectElem.attr('ry', rectData.ry); + if (typeof rectData.class !== 'undefined') { + rectElem.attr('class', rectData.class); + } + return rectElem; +}; +var drawText = function drawText(elem, textData) { + var prevTextHeight = 0, + textHeight = 0; + var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex); + var textElems = []; + var dy = 0; + var yfunc = function yfunc() { + return textData.y; + }; + if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) { + switch (textData.valign) { + case 'top': + case 'start': + yfunc = function yfunc() { + return Math.round(textData.y + textData.textMargin); + }; + break; + case 'middle': + case 'center': + yfunc = function yfunc() { + return Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); + }; + break; + case 'bottom': + case 'end': + yfunc = function yfunc() { + return Math.round(textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin); + }; + break; + } + } + if (typeof textData.anchor !== 'undefined' && typeof textData.textMargin !== 'undefined' && typeof textData.width !== 'undefined') { + switch (textData.anchor) { + case 'left': + case 'start': + textData.x = Math.round(textData.x + textData.textMargin); + textData.anchor = 'start'; + textData.dominantBaseline = 'text-after-edge'; + textData.alignmentBaseline = 'middle'; + break; + case 'middle': + case 'center': + textData.x = Math.round(textData.x + textData.width / 2); + textData.anchor = 'middle'; + textData.dominantBaseline = 'middle'; + textData.alignmentBaseline = 'middle'; + break; + case 'right': + case 'end': + textData.x = Math.round(textData.x + textData.width - textData.textMargin); + textData.anchor = 'end'; + textData.dominantBaseline = 'text-before-edge'; + textData.alignmentBaseline = 'middle'; + break; + } + } + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (typeof textData.textMargin !== 'undefined' && textData.textMargin === 0 && typeof textData.fontSize !== 'undefined') { + dy = i * textData.fontSize; + } + var textElem = elem.append('text'); + textElem.attr('x', textData.x); + textElem.attr('y', yfunc()); -const findSelectionIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-selection', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].selection); -const findCollapsedIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-collapsed', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].chevronRight); -const findExpandedIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-expanded', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].chevronDown); -const findCloseIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-close', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].close); -const findReplaceIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-replace', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].replace); -const findReplaceAllIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-replace-all', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].replaceAll); -const findPreviousMatchIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-previous-match', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].arrowUp); -const findNextMatchIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('find-next-match', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].arrowDown); -const NLS_FIND_INPUT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.find', "Find"); -const NLS_FIND_INPUT_PLACEHOLDER = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('placeholder.find', "Find"); -const NLS_PREVIOUS_MATCH_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.previousMatchButton', "Previous match"); -const NLS_NEXT_MATCH_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.nextMatchButton', "Next match"); -const NLS_TOGGLE_SELECTION_FIND_TITLE = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.toggleSelectionFind', "Find in selection"); -const NLS_CLOSE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.closeButton', "Close"); -const NLS_REPLACE_INPUT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.replace', "Replace"); -const NLS_REPLACE_INPUT_PLACEHOLDER = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('placeholder.replace', "Replace"); -const NLS_REPLACE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.replaceButton', "Replace"); -const NLS_REPLACE_ALL_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.replaceAllButton', "Replace All"); -const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.toggleReplaceButton', "Toggle Replace mode"); -const NLS_MATCHES_COUNT_LIMIT_TITLE = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('title.matchesCountLimit', "Only the first {0} results are highlighted, but all find operations work on the entire text.", _findModel_js__WEBPACK_IMPORTED_MODULE_13__["MATCHES_LIMIT"]); -const NLS_MATCHES_LOCATION = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.matchesLocation', "{0} of {1}"); -const NLS_NO_RESULTS = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.noResults', "No results"); -const FIND_WIDGET_INITIAL_WIDTH = 419; -const PART_WIDTH = 275; -const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; -let MAX_MATCHES_COUNT_WIDTH = 69; -// let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; -const FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible. -const ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask'; -const ctrlKeyMod = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"] ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */); -class FindWidgetViewZone { - constructor(afterLineNumber) { - this.afterLineNumber = afterLineNumber; - this.heightInPx = FIND_INPUT_AREA_HEIGHT; - this.suppressMouseDown = false; - this.domNode = document.createElement('div'); - this.domNode.className = 'dock-find-viewzone'; - } -} -function stopPropagationForMultiLineUpwards(event, value, textarea) { - const isMultiline = !!value.match(/\n/); - if (textarea && isMultiline && textarea.selectionStart > 0) { - event.stopPropagation(); - return; - } -} -function stopPropagationForMultiLineDownwards(event, value, textarea) { - const isMultiline = !!value.match(/\n/); - if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) { - event.stopPropagation(); - return; - } -} -class FindWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__["Widget"] { - constructor(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService, storageService, notificationService, storageKeysSyncRegistryService) { - super(); - this._cachedHeight = null; - this._codeEditor = codeEditor; - this._controller = controller; - this._state = state; - this._contextViewProvider = contextViewProvider; - this._keybindingService = keybindingService; - this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._notificationService = notificationService; - storageKeysSyncRegistryService.registerStorageKey({ key: ctrlEnterReplaceAllWarningPromptedKey, version: 1 }); - this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, 0 /* GLOBAL */); - this._isVisible = false; - this._isReplaceVisible = false; - this._ignoreChangeEvent = false; - this._updateHistoryDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_7__["Delayer"](500); - this._register(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["toDisposable"])(() => this._updateHistoryDelayer.cancel())); - this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); - this._buildDomNode(); - this._updateButtons(); - this._tryUpdateWidgetWidth(); - this._findInput.inputBox.layout(); - this._register(this._codeEditor.onDidChangeConfiguration((e) => { - if (e.hasChanged(72 /* readOnly */)) { - if (this._codeEditor.getOption(72 /* readOnly */)) { - // Hide replace part if editor becomes read only - this._state.change({ isReplaceRevealed: false }, false); - } - this._updateButtons(); - } - if (e.hasChanged(117 /* layoutInfo */)) { - this._tryUpdateWidgetWidth(); - } - if (e.hasChanged(2 /* accessibilitySupport */)) { - this.updateAccessibilitySupport(); - } - if (e.hasChanged(29 /* find */)) { - const addExtraSpaceOnTop = this._codeEditor.getOption(29 /* find */).addExtraSpaceOnTop; - if (addExtraSpaceOnTop && !this._viewZone) { - this._viewZone = new FindWidgetViewZone(0); - this._showViewZone(); - } - if (!addExtraSpaceOnTop && this._viewZone) { - this._removeViewZone(); - } - } - })); - this.updateAccessibilitySupport(); - this._register(this._codeEditor.onDidChangeCursorSelection(() => { - if (this._isVisible) { - this._updateToggleSelectionFindButton(); - } - })); - this._register(this._codeEditor.onDidFocusEditorWidget(() => __awaiter(this, void 0, void 0, function* () { - if (this._isVisible) { - let globalBufferTerm = yield this._controller.getGlobalBufferTerm(); - if (globalBufferTerm && globalBufferTerm !== this._state.searchString) { - this._state.change({ searchString: globalBufferTerm }, true); - this._findInput.select(); - } - } - }))); - this._findInputFocused = _findModel_js__WEBPACK_IMPORTED_MODULE_13__["CONTEXT_FIND_INPUT_FOCUSED"].bindTo(contextKeyService); - this._findFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["trackFocus"](this._findInput.inputBox.inputElement)); - this._register(this._findFocusTracker.onDidFocus(() => { - this._findInputFocused.set(true); - this._updateSearchScope(); - })); - this._register(this._findFocusTracker.onDidBlur(() => { - this._findInputFocused.set(false); - })); - this._replaceInputFocused = _findModel_js__WEBPACK_IMPORTED_MODULE_13__["CONTEXT_REPLACE_INPUT_FOCUSED"].bindTo(contextKeyService); - this._replaceFocusTracker = this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["trackFocus"](this._replaceInput.inputBox.inputElement)); - this._register(this._replaceFocusTracker.onDidFocus(() => { - this._replaceInputFocused.set(true); - this._updateSearchScope(); - })); - this._register(this._replaceFocusTracker.onDidBlur(() => { - this._replaceInputFocused.set(false); - })); - this._codeEditor.addOverlayWidget(this); - if (this._codeEditor.getOption(29 /* find */).addExtraSpaceOnTop) { - this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line. - } - this._applyTheme(themeService.getColorTheme()); - this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this))); - this._register(this._codeEditor.onDidChangeModel(() => { - if (!this._isVisible) { - return; - } - this._viewZoneId = undefined; - })); - this._register(this._codeEditor.onDidScrollChange((e) => { - if (e.scrollTopChanged) { - this._layoutViewZone(); - return; - } - // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. - setTimeout(() => { - this._layoutViewZone(); - }, 0); - })); - } - // ----- IOverlayWidget API - getId() { - return FindWidget.ID; - } - getDomNode() { - return this._domNode; - } - getPosition() { - if (this._isVisible) { - return { - preference: 0 /* TOP_RIGHT_CORNER */ - }; - } - return null; - } - // ----- React to state changes - _onStateChanged(e) { - if (e.searchString) { - try { - this._ignoreChangeEvent = true; - this._findInput.setValue(this._state.searchString); - } - finally { - this._ignoreChangeEvent = false; - } - this._updateButtons(); - } - if (e.replaceString) { - this._replaceInput.inputBox.value = this._state.replaceString; - } - if (e.isRevealed) { - if (this._state.isRevealed) { - this._reveal(); - } - else { - this._hide(true); - } - } - if (e.isReplaceRevealed) { - if (this._state.isReplaceRevealed) { - if (!this._codeEditor.getOption(72 /* readOnly */) && !this._isReplaceVisible) { - this._isReplaceVisible = true; - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - this._updateButtons(); - this._replaceInput.inputBox.layout(); - } - } - else { - if (this._isReplaceVisible) { - this._isReplaceVisible = false; - this._updateButtons(); - } - } - } - if ((e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed)) { - if (this._tryUpdateHeight()) { - this._showViewZone(); - } - } - if (e.isRegex) { - this._findInput.setRegex(this._state.isRegex); - } - if (e.wholeWord) { - this._findInput.setWholeWords(this._state.wholeWord); - } - if (e.matchCase) { - this._findInput.setCaseSensitive(this._state.matchCase); - } - if (e.searchScope) { - if (this._state.searchScope) { - this._toggleSelectionFind.checked = true; - } - else { - this._toggleSelectionFind.checked = false; - } - this._updateToggleSelectionFindButton(); - } - if (e.searchString || e.matchesCount || e.matchesPosition) { - let showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'no-results', showRedOutline); - this._updateMatchesCount(); - this._updateButtons(); - } - if (e.searchString || e.currentMatch) { - this._layoutViewZone(); - } - if (e.updateHistory) { - this._delayedUpdateHistory(); - } - if (e.loop) { - this._updateButtons(); - } - } - _delayedUpdateHistory() { - this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)); - } - _updateHistory() { - if (this._state.searchString) { - this._findInput.inputBox.addToHistory(); - } - if (this._state.replaceString) { - this._replaceInput.inputBox.addToHistory(); - } - } - _updateMatchesCount() { - this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px'; - if (this._state.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_13__["MATCHES_LIMIT"]) { - this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE; - } - else { - this._matchesCount.title = ''; - } - // remove previous content - if (this._matchesCount.firstChild) { - this._matchesCount.removeChild(this._matchesCount.firstChild); - } - let label; - if (this._state.matchesCount > 0) { - let matchesCount = String(this._state.matchesCount); - if (this._state.matchesCount >= _findModel_js__WEBPACK_IMPORTED_MODULE_13__["MATCHES_LIMIT"]) { - matchesCount += '+'; - } - let matchesPosition = String(this._state.matchesPosition); - if (matchesPosition === '0') { - matchesPosition = '?'; - } - label = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__["format"](NLS_MATCHES_LOCATION, matchesPosition, matchesCount); - } - else { - label = NLS_NO_RESULTS; - } - this._matchesCount.appendChild(document.createTextNode(label)); - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_3__["alert"])(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString)); - MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth); - } - // ----- actions - _getAriaLabel(label, currentMatch, searchString) { - if (label === NLS_NO_RESULTS) { - return searchString === '' - ? _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('ariaSearchNoResultEmpty', "{0} found", label) - : _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('ariaSearchNoResult', "{0} found for '{1}'", label, searchString); - } - if (currentMatch) { - const ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('ariaSearchNoResultWithLineNum', "{0} found for '{1}', at {2}", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn); - const model = this._codeEditor.getModel(); - if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) { - const lineContent = model.getLineContent(currentMatch.startLineNumber); - return `${lineContent}, ${ariaLabel}`; - } - return ariaLabel; - } - return _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('ariaSearchNoResultWithLineNumNoCurrentMatch', "{0} found for '{1}'", label, searchString); - } - /** - * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find'). - * If 'selection find' is OFF we enable the button only if there is a selection. - */ - _updateToggleSelectionFindButton() { - let selection = this._codeEditor.getSelection(); - let isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false; - let isChecked = this._toggleSelectionFind.checked; - if (this._isVisible && (isChecked || isSelection)) { - this._toggleSelectionFind.enable(); - } - else { - this._toggleSelectionFind.disable(); - } - } - _updateButtons() { - this._findInput.setEnabled(this._isVisible); - this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible); - this._updateToggleSelectionFindButton(); - this._closeBtn.setEnabled(this._isVisible); - let findInputIsNonEmpty = (this._state.searchString.length > 0); - let matchesCount = this._state.matchesCount ? true : false; - this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateBack()); - this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateForward()); - this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); - this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'replaceToggled', this._isReplaceVisible); - this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); - let canReplace = !this._codeEditor.getOption(72 /* readOnly */); - this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace); - } - _reveal() { - if (!this._isVisible) { - this._isVisible = true; - const selection = this._codeEditor.getSelection(); - switch (this._codeEditor.getOption(29 /* find */).autoFindInSelection) { - case 'always': - this._toggleSelectionFind.checked = true; - break; - case 'never': - this._toggleSelectionFind.checked = false; - break; - case 'multiline': - const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; - this._toggleSelectionFind.checked = isSelectionMultipleLine; - break; - default: - break; - } - this._tryUpdateWidgetWidth(); - this._updateButtons(); - setTimeout(() => { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this._domNode, 'visible'); - this._domNode.setAttribute('aria-hidden', 'false'); - }, 0); - // validate query again as it's being dismissed when we hide the find widget. - setTimeout(() => { - this._findInput.validate(); - }, 200); - this._codeEditor.layoutOverlayWidget(this); - let adjustEditorScrollTop = true; - if (this._codeEditor.getOption(29 /* find */).seedSearchStringFromSelection && selection) { - const domNode = this._codeEditor.getDomNode(); - if (domNode) { - const editorCoords = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getDomNodePagePosition"](domNode); - const startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition()); - const startLeft = editorCoords.left + (startCoords ? startCoords.left : 0); - const startTop = startCoords ? startCoords.top : 0; - if (this._viewZone && startTop < this._viewZone.heightInPx) { - if (selection.endLineNumber > selection.startLineNumber) { - adjustEditorScrollTop = false; - } - const leftOfFindWidget = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTopLeftOffset"](this._domNode).left; - if (startLeft > leftOfFindWidget) { - adjustEditorScrollTop = false; - } - const endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition()); - const endLeft = editorCoords.left + (endCoords ? endCoords.left : 0); - if (endLeft > leftOfFindWidget) { - adjustEditorScrollTop = false; - } - } - } - } - this._showViewZone(adjustEditorScrollTop); - } - } - _hide(focusTheEditor) { - if (this._isVisible) { - this._isVisible = false; - this._updateButtons(); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this._domNode, 'visible'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._findInput.clearMessage(); - if (focusTheEditor) { - this._codeEditor.focus(); - } - this._codeEditor.layoutOverlayWidget(this); - this._removeViewZone(); - } - } - _layoutViewZone() { - const addExtraSpaceOnTop = this._codeEditor.getOption(29 /* find */).addExtraSpaceOnTop; - if (!addExtraSpaceOnTop) { - this._removeViewZone(); - return; - } - if (!this._isVisible) { - return; - } - const viewZone = this._viewZone; - if (this._viewZoneId !== undefined || !viewZone) { - return; - } - this._codeEditor.changeViewZones((accessor) => { - viewZone.heightInPx = this._getHeight(); - this._viewZoneId = accessor.addZone(viewZone); - // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning. - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + viewZone.heightInPx); - }); - } - _showViewZone(adjustScroll = true) { - if (!this._isVisible) { - return; - } - const addExtraSpaceOnTop = this._codeEditor.getOption(29 /* find */).addExtraSpaceOnTop; - if (!addExtraSpaceOnTop) { - return; - } - if (this._viewZone === undefined) { - this._viewZone = new FindWidgetViewZone(0); - } - const viewZone = this._viewZone; - this._codeEditor.changeViewZones((accessor) => { - if (this._viewZoneId !== undefined) { - // the view zone already exists, we need to update the height - const newHeight = this._getHeight(); - if (newHeight === viewZone.heightInPx) { - return; - } - let scrollAdjustment = newHeight - viewZone.heightInPx; - viewZone.heightInPx = newHeight; - accessor.layoutZone(this._viewZoneId); - if (adjustScroll) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); - } - return; - } - else { - let scrollAdjustment = this._getHeight(); - // if the editor has top padding, factor that into the zone height - scrollAdjustment -= this._codeEditor.getOption(66 /* padding */).top; - if (scrollAdjustment <= 0) { - return; - } - viewZone.heightInPx = scrollAdjustment; - this._viewZoneId = accessor.addZone(viewZone); - if (adjustScroll) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); - } - } - }); - } - _removeViewZone() { - this._codeEditor.changeViewZones((accessor) => { - if (this._viewZoneId !== undefined) { - accessor.removeZone(this._viewZoneId); - this._viewZoneId = undefined; - if (this._viewZone) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx); - this._viewZone = undefined; - } - } - }); - } - _applyTheme(theme) { - let inputStyles = { - inputActiveOptionBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputActiveOptionBorder"]), - inputActiveOptionBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputActiveOptionBackground"]), - inputActiveOptionForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputActiveOptionForeground"]), - inputBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputBackground"]), - inputForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputForeground"]), - inputBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputBorder"]), - inputValidationInfoBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationInfoBackground"]), - inputValidationInfoForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationInfoForeground"]), - inputValidationInfoBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationInfoBorder"]), - inputValidationWarningBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationWarningBackground"]), - inputValidationWarningForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationWarningForeground"]), - inputValidationWarningBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationWarningBorder"]), - inputValidationErrorBackground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationErrorBackground"]), - inputValidationErrorForeground: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationErrorForeground"]), - inputValidationErrorBorder: theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["inputValidationErrorBorder"]), - }; - this._findInput.style(inputStyles); - this._replaceInput.style(inputStyles); - this._toggleSelectionFind.style(inputStyles); - } - _tryUpdateWidgetWidth() { - if (!this._isVisible) { - return; - } - if (!_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["isInDOM"](this._domNode)) { - // the widget is not in the DOM - return; - } - const layoutInfo = this._codeEditor.getLayoutInfo(); - const editorContentWidth = layoutInfo.contentWidth; - if (editorContentWidth <= 0) { - // for example, diff view original editor - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this._domNode, 'hiddenEditor'); - return; - } - else if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["hasClass"](this._domNode, 'hiddenEditor')) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this._domNode, 'hiddenEditor'); - } - const editorWidth = layoutInfo.width; - const minimapWidth = layoutInfo.minimap.minimapWidth; - let collapsedFindWidget = false; - let reducedFindWidget = false; - let narrowFindWidget = false; - if (this._resized) { - let widgetWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._domNode); - if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { - // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - return; - } - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { - reducedFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { - narrowFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { - collapsedFindWidget = true; - } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'collapsed-find-widget', collapsedFindWidget); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'narrow-find-widget', narrowFindWidget); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'reduced-find-widget', reducedFindWidget); - if (!narrowFindWidget && !collapsedFindWidget) { - // the minimal left offset of findwidget is 15px. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - } - if (this._resized) { - this._findInput.inputBox.layout(); - let findInputWidth = this._findInput.inputBox.element.clientWidth; - if (findInputWidth > 0) { - this._replaceInput.width = findInputWidth; - } - } - else if (this._isReplaceVisible) { - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - } - } - _getHeight() { - let totalheight = 0; - // find input margin top - totalheight += 4; - // find input height - totalheight += this._findInput.inputBox.height + 2 /** input box border */; - if (this._isReplaceVisible) { - // replace input margin - totalheight += 4; - totalheight += this._replaceInput.inputBox.height + 2 /** input box border */; - } - // margin bottom - totalheight += 4; - return totalheight; - } - _tryUpdateHeight() { - const totalHeight = this._getHeight(); - if (this._cachedHeight !== null && this._cachedHeight === totalHeight) { - return false; - } - this._cachedHeight = totalHeight; - this._domNode.style.height = `${totalHeight}px`; - return true; - } - // ----- Public - focusFindInput() { - this._findInput.select(); - // Edge browser requires focus() in addition to select() - this._findInput.focus(); - } - focusReplaceInput() { - this._replaceInput.select(); - // Edge browser requires focus() in addition to select() - this._replaceInput.focus(); - } - highlightFindOptions() { - this._findInput.highlightFindOptions(); - } - _updateSearchScope() { - if (!this._codeEditor.hasModel()) { - return; - } - if (this._toggleSelectionFind.checked) { - let selections = this._codeEditor.getSelections(); - selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1)); - } - const currentMatch = this._state.currentMatch; - if (selection.startLineNumber !== selection.endLineNumber) { - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_12__["Range"].equalsRange(selection, currentMatch)) { - return selection; - } - } - return null; - }).filter(element => !!element); - if (selections.length) { - this._state.change({ searchScope: selections }, true); - } - } - } - _onFindInputMouseDown(e) { - // on linux, middle key does pasting. - if (e.middleButton) { - e.stopPropagation(); - } - } - _onFindInputKeyDown(e) { - if (e.equals(ctrlKeyMod | 3 /* Enter */)) { - this._findInput.inputBox.insertAtCursor('\n'); - e.preventDefault(); - return; - } - if (e.equals(2 /* Tab */)) { - if (this._isReplaceVisible) { - this._replaceInput.focus(); - } - else { - this._findInput.focusOnCaseSensitive(); - } - e.preventDefault(); - return; - } - if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) { - this._codeEditor.focus(); - e.preventDefault(); - return; - } - if (e.equals(16 /* UpArrow */)) { - return stopPropagationForMultiLineUpwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); - } - if (e.equals(18 /* DownArrow */)) { - return stopPropagationForMultiLineDownwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); - } - } - _onReplaceInputKeyDown(e) { - if (e.equals(ctrlKeyMod | 3 /* Enter */)) { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isWindows"] && _base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isNative"] && !this._ctrlEnterReplaceAllWarningPrompted) { - // this is the first time when users press Ctrl + Enter to replace all - this._notificationService.info(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('ctrlEnter.keybindingChanged', 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.')); - this._ctrlEnterReplaceAllWarningPrompted = true; - this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, 0 /* GLOBAL */); - } - this._replaceInput.inputBox.insertAtCursor('\n'); - e.preventDefault(); - return; - } - if (e.equals(2 /* Tab */)) { - this._findInput.focusOnCaseSensitive(); - e.preventDefault(); - return; - } - if (e.equals(1024 /* Shift */ | 2 /* Tab */)) { - this._findInput.focus(); - e.preventDefault(); - return; - } - if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) { - this._codeEditor.focus(); - e.preventDefault(); - return; - } - if (e.equals(16 /* UpArrow */)) { - return stopPropagationForMultiLineUpwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); - } - if (e.equals(18 /* DownArrow */)) { - return stopPropagationForMultiLineDownwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); - } - } - // ----- sash - getVerticalSashLeft(_sash) { - return 0; - } - // ----- initialization - _keybindingLabelFor(actionId) { - let kb = this._keybindingService.lookupKeybinding(actionId); - if (!kb) { - return ''; - } - return ` (${kb.getLabel()})`; - } - _buildDomNode() { - const flexibleHeight = true; - const flexibleWidth = true; - // Find input - this._findInput = this._register(new _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__["ContextScopedFindInput"](null, this._contextViewProvider, { - width: FIND_INPUT_AREA_WIDTH, - label: NLS_FIND_INPUT_LABEL, - placeholder: NLS_FIND_INPUT_PLACEHOLDER, - appendCaseSensitiveLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ToggleCaseSensitiveCommand), - appendWholeWordsLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ToggleWholeWordCommand), - appendRegexLabel: this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ToggleRegexCommand), - validation: (value) => { - if (value.length === 0 || !this._findInput.getRegex()) { - return null; - } - try { - // use `g` and `u` which are also used by the TextModel search - new RegExp(value, 'gu'); - return null; - } - catch (e) { - return { content: e.message }; - } - }, - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118 - }, this._contextKeyService, true)); - this._findInput.setRegex(!!this._state.isRegex); - this._findInput.setCaseSensitive(!!this._state.matchCase); - this._findInput.setWholeWords(!!this._state.wholeWord); - this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))); - this._register(this._findInput.inputBox.onDidChange(() => { - if (this._ignoreChangeEvent) { - return; - } - this._state.change({ searchString: this._findInput.getValue() }, true); - })); - this._register(this._findInput.onDidOptionChange(() => { - this._state.change({ - isRegex: this._findInput.getRegex(), - wholeWord: this._findInput.getWholeWords(), - matchCase: this._findInput.getCaseSensitive() - }, true); - })); - this._register(this._findInput.onCaseSensitiveKeyDown((e) => { - if (e.equals(1024 /* Shift */ | 2 /* Tab */)) { - if (this._isReplaceVisible) { - this._replaceInput.focus(); - e.preventDefault(); - } - } - })); - this._register(this._findInput.onRegexKeyDown((e) => { - if (e.equals(2 /* Tab */)) { - if (this._isReplaceVisible) { - this._replaceInput.focusOnPreserve(); - e.preventDefault(); - } - } - })); - this._register(this._findInput.inputBox.onDidHeightChange((e) => { - if (this._tryUpdateHeight()) { - this._showViewZone(); - } - })); - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"]) { - this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); - } - this._matchesCount = document.createElement('div'); - this._matchesCount.className = 'matchesCount'; - this._updateMatchesCount(); - // Previous button - this._prevBtn = this._register(new SimpleButton({ - label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].PreviousMatchFindAction), - className: findPreviousMatchIcon.classNames, - onTrigger: () => { - this._codeEditor.getAction(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].PreviousMatchFindAction).run().then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"]); - } - })); - // Next button - this._nextBtn = this._register(new SimpleButton({ - label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].NextMatchFindAction), - className: findNextMatchIcon.classNames, - onTrigger: () => { - this._codeEditor.getAction(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].NextMatchFindAction).run().then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"]); - } - })); - let findPart = document.createElement('div'); - findPart.className = 'find-part'; - findPart.appendChild(this._findInput.domNode); - const actionsContainer = document.createElement('div'); - actionsContainer.className = 'find-actions'; - findPart.appendChild(actionsContainer); - actionsContainer.appendChild(this._matchesCount); - actionsContainer.appendChild(this._prevBtn.domNode); - actionsContainer.appendChild(this._nextBtn.domNode); - // Toggle selection button - this._toggleSelectionFind = this._register(new _base_browser_ui_checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_4__["Checkbox"]({ - icon: findSelectionIcon, - title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ToggleSearchScopeCommand), - isChecked: false - })); - this._register(this._toggleSelectionFind.onChange(() => { - if (this._toggleSelectionFind.checked) { - if (this._codeEditor.hasModel()) { - let selections = this._codeEditor.getSelections(); - selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1)); - } - if (!selection.isEmpty()) { - return selection; - } - return null; - }).filter(element => !!element); - if (selections.length) { - this._state.change({ searchScope: selections }, true); - } - } - } - else { - this._state.change({ searchScope: null }, true); - } - })); - actionsContainer.appendChild(this._toggleSelectionFind.domNode); - // Close button - this._closeBtn = this._register(new SimpleButton({ - label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].CloseFindWidgetCommand), - className: findCloseIcon.classNames, - onTrigger: () => { - this._state.change({ isRevealed: false, searchScope: null }, false); - }, - onKeyDown: (e) => { - if (e.equals(2 /* Tab */)) { - if (this._isReplaceVisible) { - if (this._replaceBtn.isEnabled()) { - this._replaceBtn.focus(); - } - else { - this._codeEditor.focus(); - } - e.preventDefault(); - } - } - } - })); - actionsContainer.appendChild(this._closeBtn.domNode); - // Replace input - this._replaceInput = this._register(new _platform_browser_contextScopedHistoryWidget_js__WEBPACK_IMPORTED_MODULE_16__["ContextScopedReplaceInput"](null, undefined, { - label: NLS_REPLACE_INPUT_LABEL, - placeholder: NLS_REPLACE_INPUT_PLACEHOLDER, - history: [], - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118 - }, this._contextKeyService, true)); - this._replaceInput.setPreserveCase(!!this._state.preserveCase); - this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e))); - this._register(this._replaceInput.inputBox.onDidChange(() => { - this._state.change({ replaceString: this._replaceInput.inputBox.value }, false); - })); - this._register(this._replaceInput.inputBox.onDidHeightChange((e) => { - if (this._isReplaceVisible && this._tryUpdateHeight()) { - this._showViewZone(); - } - })); - this._register(this._replaceInput.onDidOptionChange(() => { - this._state.change({ - preserveCase: this._replaceInput.getPreserveCase() - }, true); - })); - this._register(this._replaceInput.onPreserveCaseKeyDown((e) => { - if (e.equals(2 /* Tab */)) { - if (this._prevBtn.isEnabled()) { - this._prevBtn.focus(); - } - else if (this._nextBtn.isEnabled()) { - this._nextBtn.focus(); - } - else if (this._toggleSelectionFind.enabled) { - this._toggleSelectionFind.focus(); - } - else if (this._closeBtn.isEnabled()) { - this._closeBtn.focus(); - } - e.preventDefault(); - } - })); - // Replace one button - this._replaceBtn = this._register(new SimpleButton({ - label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ReplaceOneAction), - className: findReplaceIcon.classNames, - onTrigger: () => { - this._controller.replace(); - }, - onKeyDown: (e) => { - if (e.equals(1024 /* Shift */ | 2 /* Tab */)) { - this._closeBtn.focus(); - e.preventDefault(); - } - } - })); - // Replace all button - this._replaceAllBtn = this._register(new SimpleButton({ - label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(_findModel_js__WEBPACK_IMPORTED_MODULE_13__["FIND_IDS"].ReplaceAllAction), - className: findReplaceAllIcon.classNames, - onTrigger: () => { - this._controller.replaceAll(); - } - })); - let replacePart = document.createElement('div'); - replacePart.className = 'replace-part'; - replacePart.appendChild(this._replaceInput.domNode); - const replaceActionsContainer = document.createElement('div'); - replaceActionsContainer.className = 'replace-actions'; - replacePart.appendChild(replaceActionsContainer); - replaceActionsContainer.appendChild(this._replaceBtn.domNode); - replaceActionsContainer.appendChild(this._replaceAllBtn.domNode); - // Toggle replace button - this._toggleReplaceBtn = this._register(new SimpleButton({ - label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL, - className: 'codicon toggle left', - onTrigger: () => { - this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); - if (this._isReplaceVisible) { - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - this._replaceInput.inputBox.layout(); - } - this._showViewZone(); - } - })); - this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); - // Widget - this._domNode = document.createElement('div'); - this._domNode.className = 'editor-widget find-widget'; - this._domNode.setAttribute('aria-hidden', 'true'); - // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work. - this._domNode.style.width = `${FIND_WIDGET_INITIAL_WIDTH}px`; - this._domNode.appendChild(this._toggleReplaceBtn.domNode); - this._domNode.appendChild(findPart); - this._domNode.appendChild(replacePart); - this._resizeSash = new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_5__["Sash"](this._domNode, this, { orientation: 0 /* VERTICAL */, size: 2 }); - this._resized = false; - let originalWidth = FIND_WIDGET_INITIAL_WIDTH; - this._register(this._resizeSash.onDidStart(() => { - originalWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._domNode); - })); - this._register(this._resizeSash.onDidChange((evt) => { - this._resized = true; - let width = originalWidth + evt.startX - evt.currentX; - if (width < FIND_WIDGET_INITIAL_WIDTH) { - // narrow down the find widget should be handled by CSS. - return; - } - const maxWidth = parseFloat(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getComputedStyle"](this._domNode).maxWidth) || 0; - if (width > maxWidth) { - return; - } - this._domNode.style.width = `${width}px`; - if (this._isReplaceVisible) { - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - } - this._findInput.inputBox.layout(); - this._tryUpdateHeight(); - })); - this._register(this._resizeSash.onDidReset(() => { - // users double click on the sash - const currentWidth = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._domNode); - if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) { - // The editor is narrow and the width of the find widget is controlled fully by CSS. - return; - } - let width = FIND_WIDGET_INITIAL_WIDTH; - if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) { - // 1. never resized before, double click should maximizes it - // 2. users resized it already but its width is the same as default - const layoutInfo = this._codeEditor.getLayoutInfo(); - width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15; - this._resized = true; - } - else { - /** - * no op, the find widget should be shrinked to its default size. - */ - } - this._domNode.style.width = `${width}px`; - if (this._isReplaceVisible) { - this._replaceInput.width = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this._findInput.domNode); - } - this._findInput.inputBox.layout(); - })); - } - updateAccessibilitySupport() { - const value = this._codeEditor.getOption(2 /* accessibilitySupport */); - this._findInput.setFocusInputOnOptionClick(value !== 2 /* Enabled */); - } -} -FindWidget.ID = 'editor.contrib.findWidget'; -class SimpleButton extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_6__["Widget"] { - constructor(opts) { - super(); - this._opts = opts; - this._domNode = document.createElement('div'); - this._domNode.title = this._opts.label; - this._domNode.tabIndex = 0; - this._domNode.className = 'button ' + this._opts.className; - this._domNode.setAttribute('role', 'button'); - this._domNode.setAttribute('aria-label', this._opts.label); - this.onclick(this._domNode, (e) => { - this._opts.onTrigger(); - e.preventDefault(); - }); - this.onkeydown(this._domNode, (e) => { - if (e.equals(10 /* Space */) || e.equals(3 /* Enter */)) { - this._opts.onTrigger(); - e.preventDefault(); - return; - } - if (this._opts.onKeyDown) { - this._opts.onKeyDown(e); - } - }); + if (typeof textData.anchor !== 'undefined') { + textElem.attr('text-anchor', textData.anchor).attr('dominant-baseline', textData.dominantBaseline).attr('alignment-baseline', textData.alignmentBaseline); } - get domNode() { - return this._domNode; + + if (typeof textData.fontFamily !== 'undefined') { + textElem.style('font-family', textData.fontFamily); } - isEnabled() { - return (this._domNode.tabIndex >= 0); + + if (typeof textData.fontSize !== 'undefined') { + textElem.style('font-size', textData.fontSize); } - focus() { - this._domNode.focus(); + + if (typeof textData.fontWeight !== 'undefined') { + textElem.style('font-weight', textData.fontWeight); } - setEnabled(enabled) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["toggleClass"](this._domNode, 'disabled', !enabled); - this._domNode.setAttribute('aria-disabled', String(!enabled)); - this._domNode.tabIndex = enabled ? 0 : -1; + + if (typeof textData.fill !== 'undefined') { + textElem.attr('fill', textData.fill); } - setExpanded(expanded) { - this._domNode.setAttribute('aria-expanded', String(!!expanded)); - if (expanded) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClasses"](this._domNode, findCollapsedIcon.classNames); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClasses"](this._domNode, findExpandedIcon.classNames); - } - else { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClasses"](this._domNode, findExpandedIcon.classNames); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClasses"](this._domNode, findCollapsedIcon.classNames); - } + + if (typeof textData.class !== 'undefined') { + textElem.attr('class', textData.class); } -} -// theming -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__["registerThemingParticipant"])((theme, collector) => { - const addBackgroundColorRule = (selector, color) => { - if (color) { - collector.addRule(`.monaco-editor ${selector} { background-color: ${color}; }`); - } - }; - addBackgroundColorRule('.findMatch', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindMatchHighlight"])); - addBackgroundColorRule('.currentFindMatch', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindMatch"])); - addBackgroundColorRule('.findScope', theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindRangeHighlight"])); - const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorWidgetBackground"]); - addBackgroundColorRule('.find-widget', widgetBackground); - const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["widgetShadow"]); - if (widgetShadowColor) { - collector.addRule(`.monaco-editor .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); - } - const findMatchHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindMatchHighlightBorder"]); - if (findMatchHighlightBorder) { - collector.addRule(`.monaco-editor .findMatch { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`); - } - const findMatchBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindMatchBorder"]); - if (findMatchBorder) { - collector.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${findMatchBorder}; padding: 1px; box-sizing: border-box; }`); - } - const findRangeHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorFindRangeHighlightBorder"]); - if (findRangeHighlightBorder) { - collector.addRule(`.monaco-editor .findScope { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${findRangeHighlightBorder}; }`); - } - const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["contrastBorder"]); - if (hcBorder) { - collector.addRule(`.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`); - } - const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorWidgetForeground"]); - if (foreground) { - collector.addRule(`.monaco-editor .find-widget { color: ${foreground}; }`); - } - const error = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["errorForeground"]); - if (error) { - collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`); - } - const resizeBorderBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorWidgetResizeBorder"]); - if (resizeBorderBackground) { - collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${resizeBorderBackground}; }`); + + if (typeof textData.dy !== 'undefined') { + textElem.attr('dy', textData.dy); + } else if (dy !== 0) { + textElem.attr('dy', dy); } - else { - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["editorWidgetBorder"]); - if (border) { - collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; }`); - } + + if (textData.tspan) { + var span = textElem.append('tspan'); + span.attr('x', textData.x); + + if (typeof textData.fill !== 'undefined') { + span.attr('fill', textData.fill); + } + + span.text(line); + } else { + textElem.text(line); } - // This rule is used to override the outline color for synthetic-focus find input. - const focusOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["focusBorder"]); - if (focusOutline) { - collector.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${focusOutline}; }`); + + if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) { + textHeight += (textElem._groups || textElem)[0][0].getBBox().height; + prevTextHeight = textHeight; } -}); + textElems.push(textElem); + } -/***/ }), + return textElems; +}; +var drawLabel = function drawLabel(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height); + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/replaceAllCommand.js ***! - \************************************************************************************/ -/*! exports provided: ReplaceAllCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var polygon = elem.append('polygon'); + polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); + polygon.attr('class', 'labelBox'); + txtObject.y = txtObject.y + txtObject.height / 2; + drawText(elem, txtObject); + return polygon; +}; +var actorCnt = -1; +/** + * Draws an actor in the diagram with the attached line + * @param elem - The diagram we'll draw to. + * @param actor - The actor to draw. + * @param conf - drawText implementation discriminator object + */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceAllCommand", function() { return ReplaceAllCommand; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var drawActor = function drawActor(elem, actor, conf) { + var center = actor.x + actor.width / 2; + var g = elem.append('g'); -class ReplaceAllCommand { - constructor(editorSelection, ranges, replaceStrings) { - this._editorSelection = editorSelection; - this._ranges = ranges; - this._replaceStrings = replaceStrings; - this._trackedEditorSelectionId = null; - } - getEditOperations(model, builder) { - if (this._ranges.length > 0) { - // Collect all edit operations - let ops = []; - for (let i = 0; i < this._ranges.length; i++) { - ops.push({ - range: this._ranges[i], - text: this._replaceStrings[i] - }); - } - // Sort them in ascending order by range starts - ops.sort((o1, o2) => { - return _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].compareRangesUsingStarts(o1.range, o2.range); - }); - // Merge operations that touch each other - let resultOps = []; - let previousOp = ops[0]; - for (let i = 1; i < ops.length; i++) { - if (previousOp.range.endLineNumber === ops[i].range.startLineNumber && previousOp.range.endColumn === ops[i].range.startColumn) { - // These operations are one after another and can be merged - previousOp.range = previousOp.range.plusRange(ops[i].range); - previousOp.text = previousOp.text + ops[i].text; - } - else { - resultOps.push(previousOp); - previousOp = ops[i]; - } - } - resultOps.push(previousOp); - for (const op of resultOps) { - builder.addEditOperation(op.range, op.text); - } - } - this._trackedEditorSelectionId = builder.trackSelection(this._editorSelection); - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this._trackedEditorSelectionId); - } -} + if (actor.y === 0) { + actorCnt++; + g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999'); + } + + var rect = getNoteRect(); + rect.x = actor.x; + rect.y = actor.y; + rect.fill = '#eaeaea'; + rect.width = actor.width; + rect.height = actor.height; + rect.class = 'actor'; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf)(actor.description, g, rect.x, rect.y, rect.width, rect.height, { + class: 'actor' + }, conf); +}; +var anchorElement = function anchorElement(elem) { + return elem.append('g'); +}; +/** + * Draws an activation in the diagram + * @param elem - element to append activation rect. + * @param bounds - activation box bounds. + * @param verticalPos - precise y cooridnate of bottom activation box edge. + * @param conf - sequence diagram config object. + * @param actorActivations - number of activations on the actor. + */ -/***/ }), +var drawActivation = function drawActivation(elem, bounds, verticalPos, conf, actorActivations) { + var rect = getNoteRect(); + var g = bounds.anchored; + rect.x = bounds.startx; + rect.y = bounds.starty; + rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2 -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/find/replacePattern.js ***! - \*********************************************************************************/ -/*! exports provided: ReplacePattern, ReplacePiece, parseReplaceString */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + rect.width = bounds.stopx - bounds.startx; + rect.height = verticalPos - bounds.starty; + drawRect(g, rect); +}; +/** + * Draws a loop in the diagram + * @param elem - elemenet to append the loop to. + * @param loopModel - loopModel of the given loop. + * @param labelText - Text within the loop. + * @param conf - diagrom configuration + */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplacePattern", function() { return ReplacePattern; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplacePiece", function() { return ReplacePiece; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseReplaceString", function() { return parseReplaceString; }); -/* harmony import */ var _base_common_search_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/search.js */ "./node_modules/monaco-editor/esm/vs/base/common/search.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var drawLoop = function drawLoop(elem, loopModel, labelText, conf) { + var boxMargin = conf.boxMargin, + boxTextMargin = conf.boxTextMargin, + labelBoxHeight = conf.labelBoxHeight, + labelBoxWidth = conf.labelBoxWidth, + fontFamily = conf.messageFontFamily, + fontSize = conf.messageFontSize, + fontWeight = conf.messageFontWeight; + var g = elem.append('g'); + + var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) { + return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine'); + }; + + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); + drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); + + if (typeof loopModel.sections !== 'undefined') { + loopModel.sections.forEach(function (item) { + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style('stroke-dasharray', '3, 3'); + }); + } + + var txt = getTextObj(); + txt.text = labelText; + txt.x = loopModel.startx; + txt.y = loopModel.starty; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.anchor = 'middle'; + txt.valign = 'middle'; + txt.tspan = false; + txt.width = labelBoxWidth || 50; + txt.height = labelBoxHeight || 20; + txt.textMargin = boxTextMargin; + txt.class = 'labelText'; + drawLabel(g, txt); + txt = getTextObj(); + txt.text = loopModel.title; + txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.starty + boxMargin + boxTextMargin; + txt.anchor = 'middle'; + txt.valign = 'middle'; + txt.textMargin = boxTextMargin; + txt.class = 'loopText'; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = true; + var textElem = drawText(g, txt); + + if (typeof loopModel.sectionTitles !== 'undefined') { + loopModel.sectionTitles.forEach(function (item, idx) { + if (item.message) { + txt.text = item.message; + txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; + txt.class = 'loopText'; + txt.anchor = 'middle'; + txt.valign = 'middle'; + txt.tspan = false; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = loopModel.wrap; + textElem = drawText(g, txt); + var sectionHeight = Math.round(textElem.map(function (te) { + return (te._groups || te)[0][0].getBBox().height; + }).reduce(function (acc, curr) { + return acc + curr; + })); + loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); + } + }); + } + loopModel.height = Math.round(loopModel.stopy - loopModel.starty); + return g; +}; /** - * Assigned when the replace pattern is entirely static. + * Draws a background rectangle + * @param elem diagram (reference for bounds) + * @param bounds shape of the rectangle */ -class StaticValueReplacePattern { - constructor(staticValue) { - this.staticValue = staticValue; - this.kind = 0 /* StaticValue */; - } -} + +var drawBackgroundRect = function drawBackgroundRect(elem, bounds) { + var rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: 'rect' + }); + rectElem.lower(); +}; /** - * Assigned when the replace pattern has replacement patterns. + * Setup arrow head and define the marker. The result is appended to the svg. */ -class DynamicPiecesReplacePattern { - constructor(pieces) { - this.pieces = pieces; - this.kind = 1 /* DynamicPieces */; - } -} -class ReplacePattern { - constructor(pieces) { - if (!pieces || pieces.length === 0) { - this._state = new StaticValueReplacePattern(''); - } - else if (pieces.length === 1 && pieces[0].staticValue !== null) { - this._state = new StaticValueReplacePattern(pieces[0].staticValue); - } - else { - this._state = new DynamicPiecesReplacePattern(pieces); - } - } - static fromStaticValue(value) { - return new ReplacePattern([ReplacePiece.staticValue(value)]); - } - get hasReplacementPatterns() { - return (this._state.kind === 1 /* DynamicPieces */); - } - buildReplaceString(matches, preserveCase) { - if (this._state.kind === 0 /* StaticValue */) { - if (preserveCase) { - return Object(_base_common_search_js__WEBPACK_IMPORTED_MODULE_0__["buildReplaceStringWithCasePreserved"])(matches, this._state.staticValue); - } - else { - return this._state.staticValue; - } - } - let result = ''; - for (let i = 0, len = this._state.pieces.length; i < len; i++) { - let piece = this._state.pieces[i]; - if (piece.staticValue !== null) { - // static value ReplacePiece - result += piece.staticValue; - continue; - } - // match index ReplacePiece - let match = ReplacePattern._substitute(piece.matchIndex, matches); - if (piece.caseOps !== null && piece.caseOps.length > 0) { - let repl = []; - let lenOps = piece.caseOps.length; - let opIdx = 0; - for (let idx = 0, len = match.length; idx < len; idx++) { - if (opIdx >= lenOps) { - repl.push(match.slice(idx)); - break; - } - switch (piece.caseOps[opIdx]) { - case 'U': - repl.push(match[idx].toUpperCase()); - break; - case 'u': - repl.push(match[idx].toUpperCase()); - opIdx++; - break; - case 'L': - repl.push(match[idx].toLowerCase()); - break; - case 'l': - repl.push(match[idx].toLowerCase()); - opIdx++; - break; - default: - repl.push(match[idx]); - } - } - match = repl.join(''); - } - result += match; - } - return result; - } - static _substitute(matchIndex, matches) { - if (matches === null) { - return ''; - } - if (matchIndex === 0) { - return matches[0]; - } - let remainder = ''; - while (matchIndex > 0) { - if (matchIndex < matches.length) { - // A match can be undefined - let match = (matches[matchIndex] || ''); - return match + remainder; - } - remainder = String(matchIndex % 10) + remainder; - matchIndex = Math.floor(matchIndex / 10); - } - return '$' + remainder; - } -} + +var insertArrowHead = function insertArrowHead(elem) { + elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead +}; /** - * A replace piece can either be a static string or an index to a specific match. + * Setup arrow head and define the marker. The result is appended to the svg. */ -class ReplacePiece { - constructor(staticValue, matchIndex, caseOps) { - this.staticValue = staticValue; - this.matchIndex = matchIndex; - if (!caseOps || caseOps.length === 0) { - this.caseOps = null; - } - else { - this.caseOps = caseOps.slice(0); - } - } - static staticValue(value) { - return new ReplacePiece(value, -1, null); - } - static caseOps(index, caseOps) { - return new ReplacePiece(null, index, caseOps); - } -} -class ReplacePieceBuilder { - constructor(source) { - this._source = source; - this._lastCharIndex = 0; - this._result = []; - this._resultLen = 0; - this._currentStaticPiece = ''; - } - emitUnchanged(toCharIndex) { - this._emitStatic(this._source.substring(this._lastCharIndex, toCharIndex)); - this._lastCharIndex = toCharIndex; - } - emitStatic(value, toCharIndex) { - this._emitStatic(value); - this._lastCharIndex = toCharIndex; - } - _emitStatic(value) { - if (value.length === 0) { - return; - } - this._currentStaticPiece += value; - } - emitMatchIndex(index, toCharIndex, caseOps) { - if (this._currentStaticPiece.length !== 0) { - this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece); - this._currentStaticPiece = ''; - } - this._result[this._resultLen++] = ReplacePiece.caseOps(index, caseOps); - this._lastCharIndex = toCharIndex; - } - finalize() { - this.emitUnchanged(this._source.length); - if (this._currentStaticPiece.length !== 0) { - this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece); - this._currentStaticPiece = ''; - } - return new ReplacePattern(this._result); - } -} + +var insertArrowFilledHead = function insertArrowFilledHead(elem) { + elem.append('defs').append('marker').attr('id', 'filled-head').attr('refX', 18).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); +}; /** - * \n => inserts a LF - * \t => inserts a TAB - * \\ => inserts a "\". - * \u => upper-cases one character in a match. - * \U => upper-cases ALL remaining characters in a match. - * \l => lower-cases one character in a match. - * \L => lower-cases ALL remaining characters in a match. - * $$ => inserts a "$". - * $& and $0 => inserts the matched substring. - * $n => Where n is a non-negative integer lesser than 100, inserts the nth parenthesized submatch string - * everything else stays untouched - * - * Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter + * Setup node number. The result is appended to the svg. */ -function parseReplaceString(replaceString) { - if (!replaceString || replaceString.length === 0) { - return new ReplacePattern(null); - } - let caseOps = []; - let result = new ReplacePieceBuilder(replaceString); - for (let i = 0, len = replaceString.length; i < len; i++) { - let chCode = replaceString.charCodeAt(i); - if (chCode === 92 /* Backslash */) { - // move to next char - i++; - if (i >= len) { - // string ends with a \ - break; - } - let nextChCode = replaceString.charCodeAt(i); - // let replaceWithCharacter: string | null = null; - switch (nextChCode) { - case 92 /* Backslash */: - // \\ => inserts a "\" - result.emitUnchanged(i - 1); - result.emitStatic('\\', i + 1); - break; - case 110 /* n */: - // \n => inserts a LF - result.emitUnchanged(i - 1); - result.emitStatic('\n', i + 1); - break; - case 116 /* t */: - // \t => inserts a TAB - result.emitUnchanged(i - 1); - result.emitStatic('\t', i + 1); - break; - // Case modification of string replacements, patterned after Boost, but only applied - // to the replacement text, not subsequent content. - case 117 /* u */: - // \u => upper-cases one character. - case 85 /* U */: - // \U => upper-cases ALL following characters. - case 108 /* l */: - // \l => lower-cases one character. - case 76 /* L */: - // \L => lower-cases ALL following characters. - result.emitUnchanged(i - 1); - result.emitStatic('', i + 1); - caseOps.push(String.fromCharCode(nextChCode)); - break; - } - continue; - } - if (chCode === 36 /* DollarSign */) { - // move to next char - i++; - if (i >= len) { - // string ends with a $ - break; - } - let nextChCode = replaceString.charCodeAt(i); - if (nextChCode === 36 /* DollarSign */) { - // $$ => inserts a "$" - result.emitUnchanged(i - 1); - result.emitStatic('$', i + 1); - continue; - } - if (nextChCode === 48 /* Digit0 */ || nextChCode === 38 /* Ampersand */) { - // $& and $0 => inserts the matched substring. - result.emitUnchanged(i - 1); - result.emitMatchIndex(0, i + 1, caseOps); - caseOps.length = 0; - continue; - } - if (49 /* Digit1 */ <= nextChCode && nextChCode <= 57 /* Digit9 */) { - // $n - let matchIndex = nextChCode - 48 /* Digit0 */; - // peek next char to probe for $nn - if (i + 1 < len) { - let nextNextChCode = replaceString.charCodeAt(i + 1); - if (48 /* Digit0 */ <= nextNextChCode && nextNextChCode <= 57 /* Digit9 */) { - // $nn - // move to next char - i++; - matchIndex = matchIndex * 10 + (nextNextChCode - 48 /* Digit0 */); - result.emitUnchanged(i - 2); - result.emitMatchIndex(matchIndex, i + 1, caseOps); - caseOps.length = 0; - continue; - } - } - result.emitUnchanged(i - 1); - result.emitMatchIndex(matchIndex, i + 1, caseOps); - caseOps.length = 0; - continue; - } - } - } - return result.finalize(); -} +var insertSequenceNumber = function insertSequenceNumber(elem) { + elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style("fill", '#f00'); +}; +/** + * Setup arrow head and define the marker. The result is appended to the svg. + */ -/***/ }), +var insertArrowCrossHead = function insertArrowCrossHead(elem) { + var defs = elem.append('defs'); + var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css ***! - \******************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./folding.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css"); + marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead +}; +var getTextObj = function getTextObj() { + return { + x: 0, + y: 0, + fill: undefined, + anchor: undefined, + style: '#666', + width: undefined, + height: undefined, + textMargin: 0, + rx: 0, + ry: 0, + tspan: true, + valign: undefined + }; +}; +var getNoteRect = function getNoteRect() { + return { + x: 0, + y: 0, + fill: '#EDF2AE', + stroke: '#666', + width: 100, + anchor: 'start', + height: 100, + rx: 0, + ry: 0 + }; +}; - +var _drawTextCandidateFunc = function () { + function byText(content, g, x, y, width, height, textAttrs) { + var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content); -var options = {}; + _setTextAttrs(text, textAttrs); + } -options.insert = "head"; -options.singleton = false; + function byTspan(content, g, x, y, width, height, textAttrs, conf) { + var actorFontSize = conf.actorFontSize, + actorFontFamily = conf.actorFontFamily, + actorFontWeight = conf.actorFontWeight; + var lines = content.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex); + + for (var i = 0; i < lines.length; i++) { + var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; + var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-weight', actorFontWeight).style('font-family', actorFontFamily); + text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]); + text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central'); + + _setTextAttrs(text, textAttrs); + } + } + + function byFo(content, g, x, y, width, height, textAttrs, conf) { + var s = g.append('switch'); + var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height); + var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%'); + text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf); -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (var key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + // eslint-disable-line + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function (conf) { + return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan; + }; +}(); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_folding_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = ({ + drawRect: drawRect, + drawText: drawText, + drawLabel: drawLabel, + drawActor: drawActor, + anchorElement: anchorElement, + drawActivation: drawActivation, + drawLoop: drawLoop, + drawBackgroundRect: drawBackgroundRect, + insertArrowHead: insertArrowHead, + insertArrowFilledHead: insertArrowFilledHead, + insertSequenceNumber: insertSequenceNumber, + insertArrowCrossHead: insertArrowCrossHead, + getTextObj: getTextObj, + getNoteRect: getNoteRect +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js ***! - \*****************************************************************************/ -/*! exports provided: FoldingController, foldBackgroundBackground, editorFoldForeground */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingController", function() { return FoldingController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "foldBackgroundBackground", function() { return foldBackgroundBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFoldForeground", function() { return editorFoldForeground; }); -/* harmony import */ var _folding_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./folding.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _foldingModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./foldingModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js"); -/* harmony import */ var _foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./foldingDecorations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _hiddenRangeModel_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hiddenRangeModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _indentRangeProvider_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./indentRangeProvider.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./syntaxRangeProvider.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js"); -/* harmony import */ var _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./intializingRangeProvider.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; +/***/ "./src/diagrams/state/id-cache.js": +/*!****************************************!*\ + !*** ./src/diagrams/state/id-cache.js ***! + \****************************************/ +/*! exports provided: set, get, keys, size, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "size", function() { return size; }); +var idCache = {}; +var set = function set(key, val) { + idCache[key] = val; +}; +var get = function get(k) { + return idCache[k]; +}; +var keys = function keys() { + return Object.keys(idCache); }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } +var size = function size() { + return keys().length; }; +/* harmony default export */ __webpack_exports__["default"] = ({ + get: get, + set: set, + keys: keys, + size: size +}); + +/***/ }), + +/***/ "./src/diagrams/state/parser/stateDiagram.jison": +/*!******************************************************!*\ + !*** ./src/diagrams/state/parser/stateDiagram.jison ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,5],$V3=[1,7],$V4=[2,5],$V5=[1,15],$V6=[1,17],$V7=[1,19],$V8=[1,20],$V9=[1,21],$Va=[1,22],$Vb=[1,28],$Vc=[1,23],$Vd=[1,24],$Ve=[1,25],$Vf=[1,26],$Vg=[1,29],$Vh=[1,32],$Vi=[1,4,5,14,15,17,19,20,22,23,24,25,26,36,39],$Vj=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,36,39],$Vk=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,36,39],$Vl=[4,5,14,15,17,19,20,22,23,24,25,26,36,39]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"directive":6,"SD":7,"document":8,"line":9,"statement":10,"idStatement":11,"DESCR":12,"-->":13,"HIDE_EMPTY":14,"scale":15,"WIDTH":16,"COMPOSIT_STATE":17,"STRUCT_START":18,"STRUCT_STOP":19,"STATE_DESCR":20,"AS":21,"ID":22,"FORK":23,"JOIN":24,"CONCURRENT":25,"note":26,"notePosition":27,"NOTE_TEXT":28,"openDirective":29,"typeDirective":30,"closeDirective":31,":":32,"argDirective":33,"eol":34,";":35,"EDGE_STATE":36,"left_of":37,"right_of":38,"open_directive":39,"type_directive":40,"arg_directive":41,"close_directive":42,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"-->",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CONCURRENT",26:"note",28:"NOTE_TEXT",32:":",35:";",36:"EDGE_STATE",37:"left_of",38:"right_of",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"}, +productions_: [0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[6,3],[6,5],[34,1],[34,1],[11,1],[11,1],[27,1],[27,1],[29,1],[30,1],[33,1],[31,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ +var $0 = $$.length - 1; +switch (yystate) { +case 4: + /*console.warn('Root document', $$[$0]);*/ yy.setRootDoc($$[$0]);return $$[$0]; +break; +case 5: + this.$ = [] +break; +case 6: + if($$[$0]!='nl'){ + $$[$0-1].push($$[$0]);this.$ = $$[$0-1] + } + // console.warn('Got document',$$[$0-1], $$[$0]); + +break; +case 7: case 8: + this.$ = $$[$0] +break; +case 9: + this.$='nl'; +break; +case 10: + /*console.warn('got id and descr', $$[$0]);*/this.$={ stmt: 'state', id: $$[$0], type: 'default', description: ''}; +break; +case 11: + /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: yy.trimColon($$[$0])}; +break; +case 12: + /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/ + this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}}; + +break; +case 13: + /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/ + this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()}; + +break; +case 17: + /* console.warn('Adding document for state without id ', $$[$0-3]);*/ + this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] } + +break; +case 18: + var id=$$[$0]; + var description = $$[$0-2].trim(); + if($$[$0].match(':')){ + var parts = $$[$0].split(':'); + id=parts[0]; + description = [description, parts[1]]; + } + this.$={stmt: 'state', id: id, type: 'default', description: description}; + +break; +case 19: + //console.warn('Adding document for state with id ', $$[$0-3], $$[$0-2]); yy.addDocument($$[$0-3]); + this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] } + +break; +case 20: + this.$={ stmt: 'state', id: $$[$0], type: 'fork' } + +break; +case 21: + this.$={ stmt: 'state', id: $$[$0], type: 'join' } + +break; +case 22: + this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' } + +break; +case 23: -const CONTEXT_FOLDING_ENABLED = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__["RawContextKey"]('foldingEnabled', false); -let FoldingController = class FoldingController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["Disposable"] { - constructor(editor, contextKeyService) { - super(); - this.contextKeyService = contextKeyService; - this.localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["DisposableStore"]()); - this.editor = editor; - const options = this.editor.getOptions(); - this._isEnabled = options.get(31 /* folding */); - this._useFoldingProviders = options.get(32 /* foldingStrategy */) !== 'indentation'; - this._unfoldOnClickAfterEndOfLine = options.get(34 /* unfoldOnClickAfterEndOfLine */); - this.foldingModel = null; - this.hiddenRangeModel = null; - this.rangeProvider = null; - this.foldingRegionPromise = null; - this.foldingStateMemento = null; - this.foldingModelPromise = null; - this.updateScheduler = null; - this.cursorChangedScheduler = null; - this.mouseDownInfo = null; - this.foldingDecorationProvider = new _foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__["FoldingDecorationProvider"](editor); - this.foldingDecorationProvider.autoHideFoldingControls = options.get(91 /* showFoldingControls */) === 'mouseover'; - this.foldingDecorationProvider.showFoldingHighlights = options.get(33 /* foldingHighlight */); - this.foldingEnabled = CONTEXT_FOLDING_ENABLED.bindTo(this.contextKeyService); - this.foldingEnabled.set(this._isEnabled); - this._register(this.editor.onDidChangeModel(() => this.onModelChanged())); - this._register(this.editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(31 /* folding */)) { - this._isEnabled = this.editor.getOptions().get(31 /* folding */); - this.foldingEnabled.set(this._isEnabled); - this.onModelChanged(); - } - if (e.hasChanged(91 /* showFoldingControls */) || e.hasChanged(33 /* foldingHighlight */)) { - const options = this.editor.getOptions(); - this.foldingDecorationProvider.autoHideFoldingControls = options.get(91 /* showFoldingControls */) === 'mouseover'; - this.foldingDecorationProvider.showFoldingHighlights = options.get(33 /* foldingHighlight */); - this.onModelContentChanged(); - } - if (e.hasChanged(32 /* foldingStrategy */)) { - this._useFoldingProviders = this.editor.getOptions().get(32 /* foldingStrategy */) !== 'indentation'; - this.onFoldingStrategyChanged(); - } - if (e.hasChanged(34 /* unfoldOnClickAfterEndOfLine */)) { - this._unfoldOnClickAfterEndOfLine = this.editor.getOptions().get(34 /* unfoldOnClickAfterEndOfLine */); - } - })); - this.onModelChanged(); - } - static get(editor) { - return editor.getContribution(FoldingController.ID); - } - /** - * Store view state. - */ - saveViewState() { - let model = this.editor.getModel(); - if (!model || !this._isEnabled || model.isTooLargeForTokenization()) { - return {}; - } - if (this.foldingModel) { // disposed ? - let collapsedRegions = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento(); - let provider = this.rangeProvider ? this.rangeProvider.id : undefined; - return { collapsedRegions, lineCount: model.getLineCount(), provider }; - } - return undefined; + /*console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/ + this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}}; + +break; +case 30: case 31: +this.$=$$[$0]; +break; +case 34: + yy.parseDirective('%%{', 'open_directive'); +break; +case 35: + yy.parseDirective($$[$0], 'type_directive'); +break; +case 36: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); +break; +case 37: + yy.parseDirective('}%%', 'close_directive', 'state'); +break; +} +}, +table: [{3:1,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{1:[3]},{3:8,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{3:9,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},{3:10,4:$V0,5:$V1,6:4,7:$V2,29:6,39:$V3},o([1,4,5,14,15,17,20,22,23,24,25,26,36,39],$V4,{8:11}),{30:12,40:[1,13]},{40:[2,34]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},{31:30,32:[1,31],42:$Vh},o([32,42],[2,35]),o($Vi,[2,6]),{6:27,10:33,11:18,14:$V7,15:$V8,17:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,8]),o($Vi,[2,9]),o($Vi,[2,10],{12:[1,34],13:[1,35]}),o($Vi,[2,14]),{16:[1,36]},o($Vi,[2,16],{18:[1,37]}),{21:[1,38]},o($Vi,[2,20]),o($Vi,[2,21]),o($Vi,[2,22]),{27:39,28:[1,40],37:[1,41],38:[1,42]},o($Vi,[2,25]),o($Vj,[2,30]),o($Vj,[2,31]),o($Vk,[2,26]),{33:43,41:[1,44]},o($Vk,[2,37]),o($Vi,[2,7]),o($Vi,[2,11]),{11:45,22:$Vb,36:$Vg},o($Vi,[2,15]),o($Vl,$V4,{8:46}),{22:[1,47]},{22:[1,48]},{21:[1,49]},{22:[2,32]},{22:[2,33]},{31:50,42:$Vh},{42:[2,36]},o($Vi,[2,12],{12:[1,51]}),{4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,52],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,18],{18:[1,53]}),{28:[1,54]},{22:[1,55]},o($Vk,[2,27]),o($Vi,[2,13]),o($Vi,[2,17]),o($Vl,$V4,{8:56}),o($Vi,[2,23]),o($Vi,[2,24]),{4:$V5,5:$V6,6:27,9:14,10:16,11:18,14:$V7,15:$V8,17:$V9,19:[1,57],20:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,26:$Vf,29:6,36:$Vg,39:$V3},o($Vi,[2,19])], +defaultActions: {7:[2,34],8:[2,1],9:[2,2],10:[2,3],41:[2,32],42:[2,33],44:[2,36]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - /** - * Restore view state. - */ - restoreViewState(state) { - let model = this.editor.getModel(); - if (!model || !this._isEnabled || model.isTooLargeForTokenization() || !this.hiddenRangeModel) { - return; - } - if (!state || !state.collapsedRegions || state.lineCount !== model.getLineCount()) { - return; - } - if (state.provider === _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__["ID_SYNTAX_PROVIDER"] || state.provider === _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__["ID_INIT_PROVIDER"]) { - this.foldingStateMemento = state; - } - const collapsedRegions = state.collapsedRegions; - // set the hidden ranges right away, before waiting for the folding model. - if (this.hiddenRangeModel.applyMemento(collapsedRegions)) { - const foldingModel = this.getFoldingModel(); - if (foldingModel) { - foldingModel.then(foldingModel => { - if (foldingModel) { - foldingModel.applyMemento(collapsedRegions); - } - }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__["onUnexpectedError"]); - } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } } - onModelChanged() { - this.localToDispose.clear(); - let model = this.editor.getModel(); - if (!this._isEnabled || !model || model.isTooLargeForTokenization()) { - // huge files get no view model, so they cannot support hidden areas - return; - } - this.foldingModel = new _foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["FoldingModel"](model, this.foldingDecorationProvider); - this.localToDispose.add(this.foldingModel); - this.hiddenRangeModel = new _hiddenRangeModel_js__WEBPACK_IMPORTED_MODULE_11__["HiddenRangeModel"](this.foldingModel); - this.localToDispose.add(this.hiddenRangeModel); - this.localToDispose.add(this.hiddenRangeModel.onDidChange(hr => this.onHiddenRangesChanges(hr))); - this.updateScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__["Delayer"](200); - this.cursorChangedScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__["RunOnceScheduler"](() => this.revealCursor(), 200); - this.localToDispose.add(this.cursorChangedScheduler); - this.localToDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeProviderRegistry"].onDidChange(() => this.onFoldingStrategyChanged())); - this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(() => this.onFoldingStrategyChanged())); // covers model language changes as well - this.localToDispose.add(this.editor.onDidChangeModelContent(() => this.onModelContentChanged())); - this.localToDispose.add(this.editor.onDidChangeCursorPosition(() => this.onCursorPositionChanged())); - this.localToDispose.add(this.editor.onMouseDown(e => this.onEditorMouseDown(e))); - this.localToDispose.add(this.editor.onMouseUp(e => this.onEditorMouseUp(e))); - this.localToDispose.add({ - dispose: () => { - if (this.foldingRegionPromise) { - this.foldingRegionPromise.cancel(); - this.foldingRegionPromise = null; - } - if (this.updateScheduler) { - this.updateScheduler.cancel(); - } - this.updateScheduler = null; - this.foldingModel = null; - this.foldingModelPromise = null; - this.hiddenRangeModel = null; - this.cursorChangedScheduler = null; - this.foldingStateMemento = null; - if (this.rangeProvider) { - this.rangeProvider.dispose(); - } - this.rangeProvider = null; - } - }); - this.onModelContentChanged(); - } - onFoldingStrategyChanged() { - if (this.rangeProvider) { - this.rangeProvider.dispose(); - } - this.rangeProvider = null; - this.onModelContentChanged(); - } - getRangeProvider(editorModel) { - if (this.rangeProvider) { - return this.rangeProvider; - } - this.rangeProvider = new _indentRangeProvider_js__WEBPACK_IMPORTED_MODULE_13__["IndentRangeProvider"](editorModel); // fallback - if (this._useFoldingProviders && this.foldingModel) { - let foldingProviders = _common_modes_js__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeProviderRegistry"].ordered(this.foldingModel.textModel); - if (foldingProviders.length === 0 && this.foldingStateMemento && this.foldingStateMemento.collapsedRegions) { - const rangeProvider = this.rangeProvider = new _intializingRangeProvider_js__WEBPACK_IMPORTED_MODULE_16__["InitializingRangeProvider"](editorModel, this.foldingStateMemento.collapsedRegions, () => { - // if after 30 the InitializingRangeProvider is still not replaced, force a refresh - this.foldingStateMemento = null; - this.onFoldingStrategyChanged(); - }, 30000); - return rangeProvider; // keep memento in case there are still no foldingProviders on the next request. - } - else if (foldingProviders.length > 0) { - this.rangeProvider = new _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_15__["SyntaxRangeProvider"](editorModel, foldingProviders); - } - } - this.foldingStateMemento = null; - return this.rangeProvider; + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; } - getFoldingModel() { - return this.foldingModelPromise; + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; } - onModelContentChanged() { - if (this.updateScheduler) { - if (this.foldingRegionPromise) { - this.foldingRegionPromise.cancel(); - this.foldingRegionPromise = null; - } - this.foldingModelPromise = this.updateScheduler.trigger(() => { - const foldingModel = this.foldingModel; - if (!foldingModel) { // null if editor has been disposed, or folding turned off - return null; - } - let foldingRegionPromise = this.foldingRegionPromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_4__["createCancelablePromise"])(token => this.getRangeProvider(foldingModel.textModel).compute(token)); - return foldingRegionPromise.then(foldingRanges => { - if (foldingRanges && foldingRegionPromise === this.foldingRegionPromise) { // new request or cancelled in the meantime? - // some cursors might have moved into hidden regions, make sure they are in expanded regions - let selections = this.editor.getSelections(); - let selectionLineNumbers = selections ? selections.map(s => s.startLineNumber) : []; - foldingModel.update(foldingRanges, selectionLineNumbers); - } - return foldingModel; - }); - }).then(undefined, (err) => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__["onUnexpectedError"])(err); - return null; - }); - } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; } - onHiddenRangesChanges(hiddenRanges) { - if (this.hiddenRangeModel && hiddenRanges.length) { - let selections = this.editor.getSelections(); - if (selections) { - if (this.hiddenRangeModel.adjustSelections(selections)) { - this.editor.setSelections(selections); + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); } + token = self.symbols_[token] || token; } + return token; } - this.editor.setHiddenAreas(hiddenRanges); - } - onCursorPositionChanged() { - if (this.hiddenRangeModel && this.hiddenRangeModel.hasRanges()) { - this.cursorChangedScheduler.schedule(); - } - } - revealCursor() { - const foldingModel = this.getFoldingModel(); - if (!foldingModel) { - return; - } - foldingModel.then(foldingModel => { - if (foldingModel) { - let selections = this.editor.getSelections(); - if (selections && selections.length > 0) { - let toToggle = []; - for (let selection of selections) { - let lineNumber = selection.selectionStartLineNumber; - if (this.hiddenRangeModel && this.hiddenRangeModel.isHidden(lineNumber)) { - toToggle.push(...foldingModel.getAllRegionsAtLine(lineNumber, r => r.isCollapsed && lineNumber > r.startLineNumber)); - } - } - if (toToggle.length) { - foldingModel.toggleCollapseState(toToggle); - this.reveal(selections[0].getPosition()); - } - } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } - }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__["onUnexpectedError"]); - } - onEditorMouseDown(e) { - this.mouseDownInfo = null; - if (!this.hiddenRangeModel || !e.target || !e.target.range) { - return; - } - if (!e.event.leftButton && !e.event.middleButton) { - return; + action = table[state] && table[state][symbol]; } - const range = e.target.range; - let iconClicked = false; - switch (e.target.type) { - case 4 /* GUTTER_LINE_DECORATIONS */: - const data = e.target.detail; - const offsetLeftInGutter = e.target.element.offsetLeft; - const gutterOffsetX = data.offsetX - offsetLeftInGutter; - // const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft; - // TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff - if (gutterOffsetX < 5) { // the whitespace between the border and the real folding icon border is 5px - return; - } - iconClicked = true; - break; - case 7 /* CONTENT_EMPTY */: { - if (this._unfoldOnClickAfterEndOfLine && this.hiddenRangeModel.hasRanges()) { - const data = e.target.detail; - if (!data.isAfterLines) { - break; - } - } - return; - } - case 6 /* CONTENT_TEXT */: { - if (this.hiddenRangeModel.hasRanges()) { - let model = this.editor.getModel(); - if (model && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { - break; - } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); } - return; - } - default: - return; - } - this.mouseDownInfo = { lineNumber: range.startLineNumber, iconClicked }; - } - onEditorMouseUp(e) { - const foldingModel = this.getFoldingModel(); - if (!foldingModel || !this.mouseDownInfo || !e.target) { - return; - } - let lineNumber = this.mouseDownInfo.lineNumber; - let iconClicked = this.mouseDownInfo.iconClicked; - let range = e.target.range; - if (!range || range.startLineNumber !== lineNumber) { - return; - } - if (iconClicked) { - if (e.target.type !== 4 /* GUTTER_LINE_DECORATIONS */) { - return; - } - } - else { - let model = this.editor.getModel(); - if (!model || range.startColumn !== model.getLineMaxColumn(lineNumber)) { - return; } - } - foldingModel.then(foldingModel => { - if (foldingModel) { - let region = foldingModel.getRegionAtLine(lineNumber); - if (region && region.startLineNumber === lineNumber) { - let isCollapsed = region.isCollapsed; - if (iconClicked || isCollapsed) { - let toToggle = []; - let recursive = e.event.middleButton || e.event.shiftKey; - if (recursive) { - for (const r of foldingModel.getRegionsInside(region)) { - if (r.isCollapsed === isCollapsed) { - toToggle.push(r); - } - } - } - // when recursive, first only collapse all children. If all are already folded or there are no children, also fold parent. - if (isCollapsed || !recursive || toToggle.length === 0) { - toToggle.push(region); - } - foldingModel.toggleCollapseState(toToggle); - this.reveal({ lineNumber, column: 1 }); - } - } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); } - }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__["onUnexpectedError"]); - } - reveal(position) { - this.editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */); - } -}; -FoldingController.ID = 'editor.contrib.folding'; -FoldingController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__["IContextKeyService"]) -], FoldingController); - -class FoldingAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["EditorAction"] { - runEditorCommand(accessor, editor, args) { - let foldingController = FoldingController.get(editor); - if (!foldingController) { - return; - } - let foldingModelPromise = foldingController.getFoldingModel(); - if (foldingModelPromise) { - this.reportTelemetry(accessor, editor); - return foldingModelPromise.then(foldingModel => { - if (foldingModel) { - this.invoke(foldingController, foldingModel, editor, args); - const selection = editor.getSelection(); - if (selection) { - foldingController.reveal(selection.getStartPosition()); - } - } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected }); } - } - getSelectedLines(editor) { - let selections = editor.getSelections(); - return selections ? selections.map(s => s.startLineNumber) : []; - } - getLineNumbers(args, editor) { - if (args && args.selectionLines) { - return args.selectionLines.map(l => l + 1); // to 0-bases line numbers - } - return this.getSelectedLines(editor); - } - run(_accessor, _editor) { - } -} -function foldingArgumentsConstraint(args) { - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isUndefined"](args)) { - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"](args)) { - return false; - } - const foldingArgs = args; - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isUndefined"](foldingArgs.levels) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isNumber"](foldingArgs.levels)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isUndefined"](foldingArgs.direction) && !_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isString"](foldingArgs.direction)) { - return false; - } - if (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isUndefined"](foldingArgs.selectionLines) && (!_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isArray"](foldingArgs.selectionLines) || !foldingArgs.selectionLines.every(_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isNumber"]))) { - return false; - } - } - return true; -} -class UnfoldAction extends FoldingAction { - constructor() { - super({ - id: 'editor.unfold', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('unfoldAction.label', "Unfold"), - alias: 'Unfold', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 89 /* US_CLOSE_SQUARE_BRACKET */, - mac: { - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 89 /* US_CLOSE_SQUARE_BRACKET */ - }, - weight: 100 /* EditorContrib */ - }, - description: { - description: 'Unfold the content in the editor', - args: [ - { - name: 'Unfold editor argument', - description: `Property-value pairs that can be passed through this argument: - * 'levels': Number of levels to unfold. If not set, defaults to 1. - * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. - * 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. - `, - constraint: foldingArgumentsConstraint, - schema: { - 'type': 'object', - 'properties': { - 'levels': { - 'type': 'number', - 'default': 1 - }, - 'direction': { - 'type': 'string', - 'enum': ['up', 'down'], - 'default': 'down' - }, - 'selectionLines': { - 'type': 'array', - 'items': { - 'type': 'number' - } - } - } - } - } - ] - } - }); - } - invoke(_foldingController, foldingModel, editor, args) { - let levels = args && args.levels || 1; - let lineNumbers = this.getLineNumbers(args, editor); - if (args && args.direction === 'up') { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsUp"])(foldingModel, false, levels, lineNumbers); - } - else { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, false, levels, lineNumbers); - } - } -} -class UnFoldRecursivelyAction extends FoldingAction { - constructor() { - super({ - id: 'editor.unfoldRecursively', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('unFoldRecursivelyAction.label', "Unfold Recursively"), - alias: 'Unfold Recursively', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, editor, _args) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, false, Number.MAX_VALUE, this.getSelectedLines(editor)); - } -} -class FoldAction extends FoldingAction { - constructor() { - super({ - id: 'editor.fold', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldAction.label', "Fold"), - alias: 'Fold', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 87 /* US_OPEN_SQUARE_BRACKET */, - mac: { - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 87 /* US_OPEN_SQUARE_BRACKET */ - }, - weight: 100 /* EditorContrib */ - }, - description: { - description: 'Fold the content in the editor', - args: [ - { - name: 'Fold editor argument', - description: `Property-value pairs that can be passed through this argument: - * 'levels': Number of levels to fold. - * 'direction': If 'up', folds given number of levels up otherwise folds down. - * 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. - If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `, - constraint: foldingArgumentsConstraint, - schema: { - 'type': 'object', - 'properties': { - 'levels': { - 'type': 'number', - }, - 'direction': { - 'type': 'string', - 'enum': ['up', 'down'], - }, - 'selectionLines': { - 'type': 'array', - 'items': { - 'type': 'number' - } - } - } - } - } - ] - } - }); - } - invoke(_foldingController, foldingModel, editor, args) { - let lineNumbers = this.getLineNumbers(args, editor); - const levels = args && args.levels; - const direction = args && args.direction; - if (typeof levels !== 'number' && typeof direction !== 'string') { - // fold the region at the location or if already collapsed, the first uncollapsed parent instead. - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateUp"])(foldingModel, true, lineNumbers); - } - else { - if (direction === 'up') { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsUp"])(foldingModel, true, levels || 1, lineNumbers); - } - else { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, true, levels || 1, lineNumbers); - } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); } - } -} -class ToggleFoldAction extends FoldingAction { - constructor() { - super({ - id: 'editor.toggleFold', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('toggleFoldAction.label', "Toggle Fold"), - alias: 'Toggle Fold', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 42 /* KEY_L */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, editor) { - let selectedLines = this.getSelectedLines(editor); - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["toggleCollapseState"])(foldingModel, 1, selectedLines); - } -} -class FoldRecursivelyAction extends FoldingAction { - constructor() { - super({ - id: 'editor.foldRecursively', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldRecursivelyAction.label', "Fold Recursively"), - alias: 'Fold Recursively', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */), - weight: 100 /* EditorContrib */ + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; } - }); - } - invoke(_foldingController, foldingModel, editor) { - let selectedLines = this.getSelectedLines(editor); - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, true, Number.MAX_VALUE, selectedLines); - } -} -class FoldAllBlockCommentsAction extends FoldingAction { - constructor() { - super({ - id: 'editor.foldAllBlockComments', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldAllBlockComments.label', "Fold All Block Comments"), - alias: 'Fold All Block Comments', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 85 /* US_SLASH */), - weight: 100 /* EditorContrib */ + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; } - }); - } - invoke(_foldingController, foldingModel, editor) { - if (foldingModel.regions.hasTypes()) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForType"])(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeKind"].Comment.value, true); - } - else { - const editorModel = editor.getModel(); - if (!editorModel) { - return; + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; } - let comments = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__["LanguageConfigurationRegistry"].getComments(editorModel.getLanguageIdentifier().id); - if (comments && comments.blockCommentStartToken) { - let regExp = new RegExp('^\\s*' + Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["escapeRegExpCharacters"])(comments.blockCommentStartToken)); - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForMatchingLines"])(foldingModel, regExp, true); + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } } -} -class FoldAllRegionsAction extends FoldingAction { - constructor() { - super({ - id: 'editor.foldAllMarkerRegions', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldAllMarkerRegions.label', "Fold All Regions"), - alias: 'Fold All Regions', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 29 /* KEY_8 */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, editor) { - if (foldingModel.regions.hasTypes()) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForType"])(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeKind"].Region.value, true); - } - else { - const editorModel = editor.getModel(); - if (!editorModel) { - return; - } - let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__["LanguageConfigurationRegistry"].getFoldingRules(editorModel.getLanguageIdentifier().id); - if (foldingRules && foldingRules.markers && foldingRules.markers.start) { - let regExp = new RegExp(foldingRules.markers.start); - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForMatchingLines"])(foldingModel, regExp, true); - } + return true; +}}; + +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ + +EOF:1, + +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); } - } -} -class UnfoldAllRegionsAction extends FoldingAction { - constructor() { - super({ - id: 'editor.unfoldAllMarkerRegions', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('unfoldAllMarkerRegions.label', "Unfold All Regions"), - alias: 'Unfold All Regions', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 30 /* KEY_9 */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, editor) { - if (foldingModel.regions.hasTypes()) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForType"])(foldingModel, _common_modes_js__WEBPACK_IMPORTED_MODULE_14__["FoldingRangeKind"].Region.value, false); + }, + +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; } - else { - const editorModel = editor.getModel(); - if (!editorModel) { - return; - } - let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_12__["LanguageConfigurationRegistry"].getFoldingRules(editorModel.getLanguageIdentifier().id); - if (foldingRules && foldingRules.markers && foldingRules.markers.start) { - let regExp = new RegExp(foldingRules.markers.start); - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateForMatchingLines"])(foldingModel, regExp, false); - } + this.offset = 0; + return this; + }, + +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; } - } -} -class FoldAllAction extends FoldingAction { - constructor() { - super({ - id: 'editor.foldAll', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldAllAction.label', "Fold All"), - alias: 'Fold All', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 21 /* KEY_0 */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, _editor) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, true); - } -} -class UnfoldAllAction extends FoldingAction { - constructor() { - super({ - id: 'editor.unfoldAll', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('unfoldAllAction.label', "Unfold All"), - alias: 'Unfold All', - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 40 /* KEY_J */), - weight: 100 /* EditorContrib */ - } - }); - } - invoke(_foldingController, foldingModel, _editor) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateLevelsDown"])(foldingModel, false); - } -} -class FoldLevelAction extends FoldingAction { - getFoldingLevel() { - return parseInt(this.id.substr(FoldLevelAction.ID_PREFIX.length)); - } - invoke(_foldingController, foldingModel, editor) { - Object(_foldingModel_js__WEBPACK_IMPORTED_MODULE_8__["setCollapseStateAtLevel"])(foldingModel, this.getFoldingLevel(), true, this.getSelectedLines(editor)); - } -} -FoldLevelAction.ID_PREFIX = 'editor.foldLevel'; -FoldLevelAction.ID = (level) => FoldLevelAction.ID_PREFIX + level; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorContribution"])(FoldingController.ID, FoldingController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(UnfoldAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(UnFoldRecursivelyAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(FoldAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(FoldRecursivelyAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(FoldAllAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(UnfoldAllAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(FoldAllBlockCommentsAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(FoldAllRegionsAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(UnfoldAllRegionsAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(ToggleFoldAction); -for (let i = 1; i <= 7; i++) { - Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerInstantiatedEditorAction"])(new FoldLevelAction({ - id: FoldLevelAction.ID(i), - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldLevelAction.label', "Fold Level {0}", i), - alias: `Fold Level ${i}`, - precondition: CONTEXT_FOLDING_ENABLED, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_10__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_5__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | (21 /* KEY_0 */ + i)), - weight: 100 /* EditorContrib */ + if (this.options.ranges) { + this.yylloc.range[1]++; } - })); -} -const foldBackgroundBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["registerColor"])('editor.foldBackground', { light: Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["transparent"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["editorSelectionBackground"], 0.3), dark: Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["transparent"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["editorSelectionBackground"], 0.3), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('foldBackgroundBackground', "Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."), true); -const editorFoldForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["registerColor"])('editorGutter.foldingControlForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["iconForeground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["iconForeground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_20__["iconForeground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.')); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_19__["registerThemingParticipant"])((theme, collector) => { - const foldBackground = theme.getColor(foldBackgroundBackground); - if (foldBackground) { - collector.addRule(`.monaco-editor .folded-background { background-color: ${foldBackground}; }`); - } - const editorFoldColor = theme.getColor(editorFoldForeground); - if (editorFoldColor) { - collector.addRule(` - .monaco-editor .cldr${_foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__["foldingExpandedIcon"].cssSelector}, - .monaco-editor .cldr${_foldingDecorations_js__WEBPACK_IMPORTED_MODULE_9__["foldingCollapsedIcon"].cssSelector} { - color: ${editorFoldColor} !important; - } - `); - } -}); + this._input = this._input.slice(1); + return ch; + }, + +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; -/***/ }), + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingDecorations.js ***! - \****************************************************************************************/ -/*! exports provided: foldingExpandedIcon, foldingCollapsedIcon, FoldingDecorationProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "foldingExpandedIcon", function() { return foldingExpandedIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "foldingCollapsedIcon", function() { return foldingCollapsedIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingDecorationProvider", function() { return FoldingDecorationProvider; }); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); -const foldingExpandedIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["registerIcon"])('folding-expanded', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["Codicon"].chevronDown); -const foldingCollapsedIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["registerIcon"])('folding-collapsed', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["Codicon"].chevronRight); -class FoldingDecorationProvider { - constructor(editor) { - this.editor = editor; - this.autoHideFoldingControls = true; - this.showFoldingHighlights = true; - } - getDecorationOption(isCollapsed, isHidden) { - if (isHidden) { - return FoldingDecorationProvider.HIDDEN_RANGE_DECORATION; - } - if (isCollapsed) { - return this.showFoldingHighlights ? FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION; - } - else if (this.autoHideFoldingControls) { - return FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION; - } - else { - return FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION; } - } - deltaDecorations(oldDecorations, newDecorations) { - return this.editor.deltaDecorations(oldDecorations, newDecorations); - } - changeDecorations(callback) { - return this.editor.changeDecorations(callback); - } -} -FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - afterContentClassName: 'inline-folded', - isWholeLine: true, - firstLineDecorationClassName: foldingCollapsedIcon.classNames -}); -FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - afterContentClassName: 'inline-folded', - className: 'folded-background', - isWholeLine: true, - firstLineDecorationClassName: foldingCollapsedIcon.classNames -}); -FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - isWholeLine: true, - firstLineDecorationClassName: foldingExpandedIcon.classNames -}); -FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - isWholeLine: true, - firstLineDecorationClassName: 'alwaysShowFoldIcons ' + foldingExpandedIcon.classNames -}); -FoldingDecorationProvider.HIDDEN_RANGE_DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_0__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ -}); + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, -/***/ }), +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingModel.js ***! - \**********************************************************************************/ -/*! exports provided: FoldingModel, toggleCollapseState, setCollapseStateLevelsDown, setCollapseStateLevelsUp, setCollapseStateUp, setCollapseStateAtLevel, setCollapseStateForMatchingLines, setCollapseStateForType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingModel", function() { return FoldingModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleCollapseState", function() { return toggleCollapseState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateLevelsDown", function() { return setCollapseStateLevelsDown; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateLevelsUp", function() { return setCollapseStateLevelsUp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateUp", function() { return setCollapseStateUp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateAtLevel", function() { return setCollapseStateAtLevel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateForMatchingLines", function() { return setCollapseStateForMatchingLines; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCollapseStateForType", function() { return setCollapseStateForType; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foldingRanges.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; -class FoldingModel { - constructor(textModel, decorationProvider) { - this._updateEventEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this.onDidChange = this._updateEventEmitter.event; - this._textModel = textModel; - this._decorationProvider = decorationProvider; - this._regions = new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__["FoldingRegions"](new Uint32Array(0), new Uint32Array(0)); - this._editorDecorationIds = []; - this._isInitialized = false; - } - get regions() { return this._regions; } - get textModel() { return this._textModel; } - get isInitialized() { return this._isInitialized; } - toggleCollapseState(toggledRegions) { - if (!toggledRegions.length) { - return; - } - toggledRegions = toggledRegions.sort((r1, r2) => r1.regionIndex - r2.regionIndex); - const processed = {}; - this._decorationProvider.changeDecorations(accessor => { - let k = 0; // index from [0 ... this.regions.length] - let dirtyRegionEndLine = -1; // end of the range where decorations need to be updated - let lastHiddenLine = -1; // the end of the last hidden lines - const updateDecorationsUntil = (index) => { - while (k < index) { - const endLineNumber = this._regions.getEndLineNumber(k); - const isCollapsed = this._regions.isCollapsed(k); - if (endLineNumber <= dirtyRegionEndLine) { - accessor.changeDecorationOptions(this._editorDecorationIds[k], this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine)); - } - if (isCollapsed && endLineNumber > lastHiddenLine) { - lastHiddenLine = endLineNumber; - } - k++; - } - }; - for (let region of toggledRegions) { - let index = region.regionIndex; - let editorDecorationId = this._editorDecorationIds[index]; - if (editorDecorationId && !processed[editorDecorationId]) { - processed[editorDecorationId] = true; - updateDecorationsUntil(index); // update all decorations up to current index using the old dirtyRegionEndLine - let newCollapseState = !this._regions.isCollapsed(index); - this._regions.setCollapsed(index, newCollapseState); - dirtyRegionEndLine = Math.max(dirtyRegionEndLine, this._regions.getEndLineNumber(index)); - } - } - updateDecorationsUntil(this._regions.length); - }); - this._updateEventEmitter.fire({ model: this, collapseStateChanged: toggledRegions }); - } - update(newRegions, blockedLineNumers = []) { - let newEditorDecorations = []; - let isBlocked = (startLineNumber, endLineNumber) => { - for (let blockedLineNumber of blockedLineNumers) { - if (startLineNumber < blockedLineNumber && blockedLineNumber <= endLineNumber) { // first line is visible - return true; - } - } - return false; - }; - let lastHiddenLine = -1; - let initRange = (index, isCollapsed) => { - const startLineNumber = newRegions.getStartLineNumber(index); - const endLineNumber = newRegions.getEndLineNumber(index); - if (isCollapsed && isBlocked(startLineNumber, endLineNumber)) { - isCollapsed = false; - } - newRegions.setCollapsed(index, isCollapsed); - const maxColumn = this._textModel.getLineMaxColumn(startLineNumber); - const decorationRange = { - startLineNumber: startLineNumber, - startColumn: maxColumn, - endLineNumber: startLineNumber, - endColumn: maxColumn + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done }; - newEditorDecorations.push({ range: decorationRange, options: this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine) }); - if (isCollapsed && endLineNumber > lastHiddenLine) { - lastHiddenLine = endLineNumber; - } - }; - let i = 0; - let nextCollapsed = () => { - while (i < this._regions.length) { - let isCollapsed = this._regions.isCollapsed(i); - i++; - if (isCollapsed) { - return i - 1; - } - } - return -1; - }; - let k = 0; - let collapsedIndex = nextCollapsed(); - while (collapsedIndex !== -1 && k < newRegions.length) { - // get the latest range - let decRange = this._textModel.getDecorationRange(this._editorDecorationIds[collapsedIndex]); - if (decRange) { - let collapsedStartLineNumber = decRange.startLineNumber; - if (this._textModel.getLineMaxColumn(collapsedStartLineNumber) === decRange.startColumn) { // test that the decoration is still at the end otherwise it got deleted - while (k < newRegions.length) { - let startLineNumber = newRegions.getStartLineNumber(k); - if (collapsedStartLineNumber >= startLineNumber) { - initRange(k, collapsedStartLineNumber === startLineNumber); - k++; - } - else { - break; - } - } - } + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); } - collapsedIndex = nextCollapsed(); - } - while (k < newRegions.length) { - initRange(k, false); - k++; } - this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, newEditorDecorations); - this._regions = newRegions; - this._isInitialized = true; - this._updateEventEmitter.fire({ model: this }); - } - /** - * Collapse state memento, for persistence only - */ - getMemento() { - let collapsedRanges = []; - for (let i = 0; i < this._regions.length; i++) { - if (this._regions.isCollapsed(i)) { - let range = this._textModel.getDecorationRange(this._editorDecorationIds[i]); - if (range) { - let startLineNumber = range.startLineNumber; - let endLineNumber = range.endLineNumber + this._regions.getEndLineNumber(i) - this._regions.getStartLineNumber(i); - collapsedRanges.push({ startLineNumber, endLineNumber }); - } - } + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; } - if (collapsedRanges.length > 0) { - return collapsedRanges; + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; } - return undefined; - } - /** - * Apply persisted state, for persistence only - */ - applyMemento(state) { - if (!Array.isArray(state)) { - return; + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; } - let toToogle = []; - for (let range of state) { - let region = this.getRegionAtLine(range.startLineNumber); - if (region && !region.isCollapsed) { - toToogle.push(region); + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; } + return false; // rule action called reject() implying the next rule should be tested instead. } - this.toggleCollapseState(toToogle); - } - dispose() { - this._decorationProvider.deltaDecorations(this._editorDecorationIds, []); - } - getAllRegionsAtLine(lineNumber, filter) { - let result = []; - if (this._regions) { - let index = this._regions.findRange(lineNumber); - let level = 1; - while (index >= 0) { - let current = this._regions.toRegion(index); - if (!filter || filter(current, level)) { - result.push(current); - } - level++; - index = current.parentIndex; - } + return false; + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; } - return result; - } - getRegionAtLine(lineNumber) { - if (this._regions) { - let index = this._regions.findRange(lineNumber); - if (index >= 0) { - return this._regions.toRegion(index); - } + if (!this._input) { + this.done = true; } - return null; - } - getRegionsInside(region, filter) { - let result = []; - let index = region ? region.regionIndex + 1 : 0; - let endLineNumber = region ? region.endLineNumber : Number.MAX_VALUE; - if (filter && filter.length === 2) { - const levelStack = []; - for (let i = index, len = this._regions.length; i < len; i++) { - let current = this._regions.toRegion(i); - if (this._regions.getStartLineNumber(i) < endLineNumber) { - while (levelStack.length > 0 && !current.containedBy(levelStack[levelStack.length - 1])) { - levelStack.pop(); - } - levelStack.push(current); - if (filter(current, levelStack.length)) { - result.push(current); - } - } - else { - break; - } - } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; } - else { - for (let i = index, len = this._regions.length; i < len; i++) { - let current = this._regions.toRegion(i); - if (this._regions.getStartLineNumber(i) < endLineNumber) { - if (!filter || filter(current)) { - result.push(current); + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - } - else { + } else if (!this.options.flex) { break; } } } - return result; - } -} -/** - * Collapse or expand the regions at the given locations - * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels. - * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model. - */ -function toggleCollapseState(foldingModel, levels, lineNumbers) { - let toToggle = []; - for (let lineNumber of lineNumbers) { - let region = foldingModel.getRegionAtLine(lineNumber); - if (region) { - const doCollapse = !region.isCollapsed; - toToggle.push(region); - if (levels > 1) { - let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels); - toToggle.push(...regionsInside); - } - } - } - foldingModel.toggleCollapseState(toToggle); -} -/** - * Collapse or expand the regions at the given locations including all children. - * @param doCollapse Wheter to collase or expand - * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels. - * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model. - */ -function setCollapseStateLevelsDown(foldingModel, doCollapse, levels = Number.MAX_VALUE, lineNumbers) { - let toToggle = []; - if (lineNumbers && lineNumbers.length > 0) { - for (let lineNumber of lineNumbers) { - let region = foldingModel.getRegionAtLine(lineNumber); - if (region) { - if (region.isCollapsed !== doCollapse) { - toToggle.push(region); - } - if (levels > 1) { - let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels); - toToggle.push(...regionsInside); - } - } - } - } - else { - let regionsInside = foldingModel.getRegionsInside(null, (r, level) => r.isCollapsed !== doCollapse && level < levels); - toToggle.push(...regionsInside); - } - foldingModel.toggleCollapseState(toToggle); -} -/** - * Collapse or expand the regions at the given locations including all parents. - * @param doCollapse Wheter to collase or expand - * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels. - * @param lineNumbers the location of the regions to collapse or expand. - */ -function setCollapseStateLevelsUp(foldingModel, doCollapse, levels, lineNumbers) { - let toToggle = []; - for (let lineNumber of lineNumbers) { - let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region, level) => region.isCollapsed !== doCollapse && level <= levels); - toToggle.push(...regions); - } - foldingModel.toggleCollapseState(toToggle); -} -/** - * Collapse or expand a region at the given locations. If the inner most region is already collapsed/expanded, uses the first parent instead. - * @param doCollapse Wheter to collase or expand - * @param lineNumbers the location of the regions to collapse or expand. - */ -function setCollapseStateUp(foldingModel, doCollapse, lineNumbers) { - let toToggle = []; - for (let lineNumber of lineNumbers) { - let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region) => region.isCollapsed !== doCollapse); - if (regions.length > 0) { - toToggle.push(regions[0]); - } - } - foldingModel.toggleCollapseState(toToggle); -} -/** - * Folds or unfolds all regions that have a given level, except if they contain one of the blocked lines. - * @param foldLevel level. Level == 1 is the top level - * @param doCollapse Wheter to collase or expand -*/ -function setCollapseStateAtLevel(foldingModel, foldLevel, doCollapse, blockedLineNumbers) { - let filter = (region, level) => level === foldLevel && region.isCollapsed !== doCollapse && !blockedLineNumbers.some(line => region.containsLine(line)); - let toToggle = foldingModel.getRegionsInside(null, filter); - foldingModel.toggleCollapseState(toToggle); -} -/** - * Folds all regions for which the lines start with a given regex - * @param foldingModel the folding model - */ -function setCollapseStateForMatchingLines(foldingModel, regExp, doCollapse) { - let editorModel = foldingModel.textModel; - let regions = foldingModel.regions; - let toToggle = []; - for (let i = regions.length - 1; i >= 0; i--) { - if (doCollapse !== regions.isCollapsed(i)) { - let startLineNumber = regions.getStartLineNumber(i); - if (regExp.test(editorModel.getLineContent(startLineNumber))) { - toToggle.push(regions.toRegion(i)); + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - } - foldingModel.toggleCollapseState(toToggle); -} -/** - * Folds all regions of the given type - * @param foldingModel the folding model - */ -function setCollapseStateForType(foldingModel, type, doCollapse) { - let regions = foldingModel.regions; - let toToggle = []; - for (let i = regions.length - 1; i >= 0; i--) { - if (doCollapse !== regions.isCollapsed(i) && type === regions.getType(i)) { - toToggle.push(regions.toRegion(i)); + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); } - } - foldingModel.toggleCollapseState(toToggle); -} - + }, -/***/ }), +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js ***! - \***********************************************************************************/ -/*! exports provided: MAX_FOLDING_REGIONS, MAX_LINE_NUMBER, FoldingRegions, FoldingRegion */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_FOLDING_REGIONS", function() { return MAX_FOLDING_REGIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_LINE_NUMBER", function() { return MAX_LINE_NUMBER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRegions", function() { return FoldingRegions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRegion", function() { return FoldingRegion; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const MAX_FOLDING_REGIONS = 0xFFFF; -const MAX_LINE_NUMBER = 0xFFFFFF; -const MASK_INDENT = 0xFF000000; -class FoldingRegions { - constructor(startIndexes, endIndexes, types) { - if (startIndexes.length !== endIndexes.length || startIndexes.length > MAX_FOLDING_REGIONS) { - throw new Error('invalid startIndexes or endIndexes size'); - } - this._startIndexes = startIndexes; - this._endIndexes = endIndexes; - this._collapseStates = new Uint32Array(Math.ceil(startIndexes.length / 32)); - this._types = types; - this._parentsComputed = false; - } - ensureParentIndices() { - if (!this._parentsComputed) { - this._parentsComputed = true; - let parentIndexes = []; - let isInsideLast = (startLineNumber, endLineNumber) => { - let index = parentIndexes[parentIndexes.length - 1]; - return this.getStartLineNumber(index) <= startLineNumber && this.getEndLineNumber(index) >= endLineNumber; - }; - for (let i = 0, len = this._startIndexes.length; i < len; i++) { - let startLineNumber = this._startIndexes[i]; - let endLineNumber = this._endIndexes[i]; - if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) { - throw new Error('startLineNumber or endLineNumber must not exceed ' + MAX_LINE_NUMBER); - } - while (parentIndexes.length > 0 && !isInsideLast(startLineNumber, endLineNumber)) { - parentIndexes.pop(); - } - let parentIndex = parentIndexes.length > 0 ? parentIndexes[parentIndexes.length - 1] : -1; - parentIndexes.push(i); - this._startIndexes[i] = startLineNumber + ((parentIndex & 0xFF) << 24); - this._endIndexes[i] = endLineNumber + ((parentIndex & 0xFF00) << 16); - } - } - } - get length() { - return this._startIndexes.length; - } - getStartLineNumber(index) { - return this._startIndexes[index] & MAX_LINE_NUMBER; - } - getEndLineNumber(index) { - return this._endIndexes[index] & MAX_LINE_NUMBER; - } - getType(index) { - return this._types ? this._types[index] : undefined; - } - hasTypes() { - return !!this._types; - } - isCollapsed(index) { - let arrayIndex = (index / 32) | 0; - let bit = index % 32; - return (this._collapseStates[arrayIndex] & (1 << bit)) !== 0; - } - setCollapsed(index, newState) { - let arrayIndex = (index / 32) | 0; - let bit = index % 32; - let value = this._collapseStates[arrayIndex]; - if (newState) { - this._collapseStates[arrayIndex] = value | (1 << bit); - } - else { - this._collapseStates[arrayIndex] = value & ~(1 << bit); - } - } - toRegion(index) { - return new FoldingRegion(this, index); - } - getParentIndex(index) { - this.ensureParentIndices(); - let parent = ((this._startIndexes[index] & MASK_INDENT) >>> 24) + ((this._endIndexes[index] & MASK_INDENT) >>> 16); - if (parent === MAX_FOLDING_REGIONS) { - return -1; - } - return parent; - } - contains(index, line) { - return this.getStartLineNumber(index) <= line && this.getEndLineNumber(index) >= line; - } - findIndex(line) { - let low = 0, high = this._startIndexes.length; - if (high === 0) { - return -1; // no children - } - while (low < high) { - let mid = Math.floor((low + high) / 2); - if (line < this.getStartLineNumber(mid)) { - high = mid; - } - else { - low = mid + 1; - } - } - return low - 1; - } - findRange(line) { - let index = this.findIndex(line); - if (index >= 0) { - let endLineNumber = this.getEndLineNumber(index); - if (endLineNumber >= line) { - return index; - } - index = this.getParentIndex(index); - while (index !== -1) { - if (this.contains(index, line)) { - return index; - } - index = this.getParentIndex(index); - } - } - return -1; - } - toString() { - let res = []; - for (let i = 0; i < this.length; i++) { - res[i] = `[${this.isCollapsed(i) ? '+' : '-'}] ${this.getStartLineNumber(i)}/${this.getEndLineNumber(i)}`; +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; } - return res.join(', '); - } -} -class FoldingRegion { - constructor(ranges, index) { - this.ranges = ranges; - this.index = index; - } - get startLineNumber() { - return this.ranges.getStartLineNumber(this.index); - } - get endLineNumber() { - return this.ranges.getEndLineNumber(this.index); - } - get regionIndex() { - return this.index; - } - get parentIndex() { - return this.ranges.getParentIndex(this.index); - } - get isCollapsed() { - return this.ranges.isCollapsed(this.index); - } - containedBy(range) { - return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber; - } - containsLine(lineNumber) { - return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber; - } -} - + }, -/***/ }), +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/hiddenRangeModel.js ***! - \**************************************************************************************/ -/*! exports provided: HiddenRangeModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiddenRangeModel", function() { return HiddenRangeModel; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0: this.begin('open_directive'); return 39; +break; +case 1: this.begin('type_directive'); return 40; +break; +case 2: this.popState(); this.begin('arg_directive'); return 32; +break; +case 3: this.popState(); this.popState(); return 42; +break; +case 4:return 41; +break; +case 5:/* skip comments */ +break; +case 6:/* skip comments */{ console.log('Crap after close'); } +break; +case 7:return 5; +break; +case 8:/* skip all whitespace */ +break; +case 9:/* skip same-line whitespace */ +break; +case 10:/* skip comments */ +break; +case 11:/* skip comments */ +break; +case 12: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 15; +break; +case 13:return 16; +break; +case 14:this.popState(); +break; +case 15: this.pushState('STATE'); +break; +case 16:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 23; +break; +case 17:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24; +break; +case 18:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 23; +break; +case 19:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 24; +break; +case 20:this.begin("STATE_STRING"); +break; +case 21:this.popState();this.pushState('STATE_ID');return "AS"; +break; +case 22:this.popState();/* console.log('STATE_ID', yy_.yytext);*/return "ID"; +break; +case 23:this.popState(); +break; +case 24: /*console.log('Long description:', yy_.yytext);*/return "STATE_DESCR"; +break; +case 25:/*console.log('COMPOSIT_STATE', yy_.yytext);*/return 17; +break; +case 26:this.popState(); +break; +case 27:this.popState();this.pushState('struct'); /*console.log('begin struct', yy_.yytext);*/return 18; +break; +case 28: /*console.log('Ending struct');*/ this.popState(); return 19; +break; +case 29:/* nothing */ +break; +case 30: this.begin('NOTE'); return 26; +break; +case 31: this.popState();this.pushState('NOTE_ID');return 37; +break; +case 32: this.popState();this.pushState('NOTE_ID');return 38; +break; +case 33: this.popState();this.pushState('FLOATING_NOTE'); +break; +case 34:this.popState();this.pushState('FLOATING_NOTE_ID');return "AS"; +break; +case 35:/**/ +break; +case 36: /*console.log('Floating note text: ', yy_.yytext);*/return "NOTE_TEXT"; +break; +case 37:this.popState();/*console.log('Floating note ID', yy_.yytext);*/return "ID"; +break; +case 38: this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yy_.yytext);*/return 22; +break; +case 39: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim();return 28; +break; +case 40: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim();return 28; +break; +case 41: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; +break; +case 42: /*console.log('Got state diagram', yy_.yytext,'#');*/return 7; +break; +case 43: /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/return 14; +break; +case 44: /*console.log('EDGE_STATE=',yy_.yytext);*/ return 36; +break; +case 45: /*console.log('=>ID=',yy_.yytext);*/ return 22; +break; +case 46: yy_.yytext = yy_.yytext.trim(); /*console.log('Descr = ', yy_.yytext);*/ return 12; +break; +case 47:return 13; +break; +case 48:return 25; +break; +case 49:return 5; +break; +case 50:return 'INVALID'; +break; +} +}, +rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i], +conditions: {"LINE":{"rules":[9,10],"inclusive":false},"close_directive":{"rules":[9,10],"inclusive":false},"arg_directive":{"rules":[3,4,9,10],"inclusive":false},"type_directive":{"rules":[2,3,9,10],"inclusive":false},"open_directive":{"rules":[1,9,10],"inclusive":false},"struct":{"rules":[9,10,15,28,29,30,44,45,46,47,48],"inclusive":false},"FLOATING_NOTE_ID":{"rules":[37],"inclusive":false},"FLOATING_NOTE":{"rules":[34,35,36],"inclusive":false},"NOTE_TEXT":{"rules":[39,40],"inclusive":false},"NOTE_ID":{"rules":[38],"inclusive":false},"NOTE":{"rules":[31,32,33],"inclusive":false},"SCALE":{"rules":[13,14],"inclusive":false},"ALIAS":{"rules":[],"inclusive":false},"STATE_ID":{"rules":[22],"inclusive":false},"STATE_STRING":{"rules":[23,24],"inclusive":false},"FORK_STATE":{"rules":[],"inclusive":false},"STATE":{"rules":[9,10,16,17,18,19,20,21,25,26,27],"inclusive":false},"ID":{"rules":[9,10],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,10,11,12,15,27,30,41,42,43,44,45,46,47,49,50],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); -class HiddenRangeModel { - constructor(model) { - this._updateEventEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this._foldingModel = model; - this._foldingModelListener = model.onDidChange(_ => this.updateHiddenRanges()); - this._hiddenRanges = []; - if (model.regions.length) { - this.updateHiddenRanges(); - } - } - get onDidChange() { return this._updateEventEmitter.event; } - get hiddenRanges() { return this._hiddenRanges; } - updateHiddenRanges() { - let updateHiddenAreas = false; - let newHiddenAreas = []; - let i = 0; // index into hidden - let k = 0; - let lastCollapsedStart = Number.MAX_VALUE; - let lastCollapsedEnd = -1; - let ranges = this._foldingModel.regions; - for (; i < ranges.length; i++) { - if (!ranges.isCollapsed(i)) { - continue; - } - let startLineNumber = ranges.getStartLineNumber(i) + 1; // the first line is not hidden - let endLineNumber = ranges.getEndLineNumber(i); - if (lastCollapsedStart <= startLineNumber && endLineNumber <= lastCollapsedEnd) { - // ignore ranges contained in collapsed regions - continue; - } - if (!updateHiddenAreas && k < this._hiddenRanges.length && this._hiddenRanges[k].startLineNumber === startLineNumber && this._hiddenRanges[k].endLineNumber === endLineNumber) { - // reuse the old ranges - newHiddenAreas.push(this._hiddenRanges[k]); - k++; - } - else { - updateHiddenAreas = true; - newHiddenAreas.push(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](startLineNumber, 1, endLineNumber, 1)); - } - lastCollapsedStart = startLineNumber; - lastCollapsedEnd = endLineNumber; - } - if (updateHiddenAreas || k < this._hiddenRanges.length) { - this.applyHiddenRanges(newHiddenAreas); - } - } - applyMemento(state) { - if (!Array.isArray(state) || state.length === 0) { - return false; - } - let hiddenRanges = []; - for (let r of state) { - if (!r.startLineNumber || !r.endLineNumber) { - return false; - } - hiddenRanges.push(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](r.startLineNumber + 1, 1, r.endLineNumber, 1)); - } - this.applyHiddenRanges(hiddenRanges); - return true; - } - /** - * Collapse state memento, for persistence only, only used if folding model is not yet initialized - */ - getMemento() { - return this._hiddenRanges.map(r => ({ startLineNumber: r.startLineNumber - 1, endLineNumber: r.endLineNumber })); - } - applyHiddenRanges(newHiddenAreas) { - this._hiddenRanges = newHiddenAreas; - this._updateEventEmitter.fire(newHiddenAreas); - } - hasRanges() { - return this._hiddenRanges.length > 0; - } - isHidden(line) { - return findRange(this._hiddenRanges, line) !== null; - } - adjustSelections(selections) { - let hasChanges = false; - let editorModel = this._foldingModel.textModel; - let lastRange = null; - let adjustLine = (line) => { - if (!lastRange || !isInside(line, lastRange)) { - lastRange = findRange(this._hiddenRanges, line); - } - if (lastRange) { - return lastRange.startLineNumber - 1; - } - return null; - }; - for (let i = 0, len = selections.length; i < len; i++) { - let selection = selections[i]; - let adjustedStartLine = adjustLine(selection.startLineNumber); - if (adjustedStartLine) { - selection = selection.setStartPosition(adjustedStartLine, editorModel.getLineMaxColumn(adjustedStartLine)); - hasChanges = true; - } - let adjustedEndLine = adjustLine(selection.endLineNumber); - if (adjustedEndLine) { - selection = selection.setEndPosition(adjustedEndLine, editorModel.getLineMaxColumn(adjustedEndLine)); - hasChanges = true; - } - selections[i] = selection; - } - return hasChanges; - } - dispose() { - if (this.hiddenRanges.length > 0) { - this._hiddenRanges = []; - this._updateEventEmitter.fire(this._hiddenRanges); - } - if (this._foldingModelListener) { - this._foldingModelListener.dispose(); - this._foldingModelListener = null; - } +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -function isInside(line, range) { - return line >= range.startLineNumber && line <= range.endLineNumber; -} -function findRange(ranges, line) { - let i = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__["findFirstInSorted"])(ranges, r => line < r.startLineNumber) - 1; - if (i >= 0 && ranges[i].endLineNumber >= line) { - return ranges[i]; - } - return null; } - +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/indentRangeProvider.js ***! - \*****************************************************************************************/ -/*! exports provided: ID_INDENT_PROVIDER, IndentRangeProvider, RangesCollector, computeRanges */ +/***/ "./src/diagrams/state/shapes.js": +/*!**************************************!*\ + !*** ./src/diagrams/state/shapes.js ***! + \**************************************/ +/*! exports provided: drawStartState, drawDivider, drawSimpleState, drawDescrState, addTitleAndBox, drawText, drawNote, drawState, drawEdge */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ID_INDENT_PROVIDER", function() { return ID_INDENT_PROVIDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentRangeProvider", function() { return IndentRangeProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangesCollector", function() { return RangesCollector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeRanges", function() { return computeRanges; }); -/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foldingRanges.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawStartState", function() { return drawStartState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDivider", function() { return drawDivider; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSimpleState", function() { return drawSimpleState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDescrState", function() { return drawDescrState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTitleAndBox", function() { return addTitleAndBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawNote", function() { return drawNote; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawState", function() { return drawState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawEdge", function() { return drawEdge; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _id_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./id-cache.js */ "./src/diagrams/state/id-cache.js"); +/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); -const MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT = 5000; -const ID_INDENT_PROVIDER = 'indent'; -class IndentRangeProvider { - constructor(editorModel) { - this.editorModel = editorModel; - this.id = ID_INDENT_PROVIDER; - } - dispose() { - } - compute(cancelationToken) { - let foldingRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__["LanguageConfigurationRegistry"].getFoldingRules(this.editorModel.getLanguageIdentifier().id); - let offSide = foldingRules && !!foldingRules.offSide; - let markers = foldingRules && foldingRules.markers; - return Promise.resolve(computeRanges(this.editorModel, offSide, markers)); - } -} -// public only for testing -class RangesCollector { - constructor(foldingRangesLimit) { - this._startIndexes = []; - this._endIndexes = []; - this._indentOccurrences = []; - this._length = 0; - this._foldingRangesLimit = foldingRangesLimit; - } - insertFirst(startLineNumber, endLineNumber, indent) { - if (startLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__["MAX_LINE_NUMBER"] || endLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__["MAX_LINE_NUMBER"]) { - return; - } - let index = this._length; - this._startIndexes[index] = startLineNumber; - this._endIndexes[index] = endLineNumber; - this._length++; - if (indent < 1000) { - this._indentOccurrences[indent] = (this._indentOccurrences[indent] || 0) + 1; - } - } - toIndentRanges(model) { - if (this._length <= this._foldingRangesLimit) { - // reverse and create arrays of the exact length - let startIndexes = new Uint32Array(this._length); - let endIndexes = new Uint32Array(this._length); - for (let i = this._length - 1, k = 0; i >= 0; i--, k++) { - startIndexes[k] = this._startIndexes[i]; - endIndexes[k] = this._endIndexes[i]; - } - return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__["FoldingRegions"](startIndexes, endIndexes); - } - else { - let entries = 0; - let maxIndent = this._indentOccurrences.length; - for (let i = 0; i < this._indentOccurrences.length; i++) { - let n = this._indentOccurrences[i]; - if (n) { - if (n + entries > this._foldingRangesLimit) { - maxIndent = i; - break; - } - entries += n; - } - } - const tabSize = model.getOptions().tabSize; - // reverse and create arrays of the exact length - let startIndexes = new Uint32Array(this._foldingRangesLimit); - let endIndexes = new Uint32Array(this._foldingRangesLimit); - for (let i = this._length - 1, k = 0; i >= 0; i--) { - let startIndex = this._startIndexes[i]; - let lineContent = model.getLineContent(startIndex); - let indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__["TextModel"].computeIndentLevel(lineContent, tabSize); - if (indent < maxIndent || (indent === maxIndent && entries++ < this._foldingRangesLimit)) { - startIndexes[k] = startIndex; - endIndexes[k] = this._endIndexes[i]; - k++; - } - } - return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_0__["FoldingRegions"](startIndexes, endIndexes); - } - } -} -function computeRanges(model, offSide, markers, foldingRangesLimit = MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT) { - const tabSize = model.getOptions().tabSize; - let result = new RangesCollector(foldingRangesLimit); - let pattern = undefined; - if (markers) { - pattern = new RegExp(`(${markers.start.source})|(?:${markers.end.source})`); - } - let previousRegions = []; - let line = model.getLineCount() + 1; - previousRegions.push({ indent: -1, endAbove: line, line }); // sentinel, to make sure there's at least one entry - for (let line = model.getLineCount(); line > 0; line--) { - let lineContent = model.getLineContent(line); - let indent = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_1__["TextModel"].computeIndentLevel(lineContent, tabSize); - let previous = previousRegions[previousRegions.length - 1]; - if (indent === -1) { - if (offSide) { - // for offSide languages, empty lines are associated to the previous block - // note: the next block is already written to the results, so this only - // impacts the end position of the block before - previous.endAbove = line; - } - continue; // only whitespace - } - let m; - if (pattern && (m = lineContent.match(pattern))) { - // folding pattern match - if (m[1]) { // start pattern match - // discard all regions until the folding pattern - let i = previousRegions.length - 1; - while (i > 0 && previousRegions[i].indent !== -2) { - i--; - } - if (i > 0) { - previousRegions.length = i + 1; - previous = previousRegions[i]; - // new folding range from pattern, includes the end line - result.insertFirst(line, previous.line, indent); - previous.line = line; - previous.indent = indent; - previous.endAbove = line; - continue; - } - else { - // no end marker found, treat line as a regular line - } - } - else { // end pattern match - previousRegions.push({ indent: -2, endAbove: line, line }); - continue; - } - } - if (previous.indent > indent) { - // discard all regions with larger indent - do { - previousRegions.pop(); - previous = previousRegions[previousRegions.length - 1]; - } while (previous.indent > indent); - // new folding range - let endLineNumber = previous.endAbove - 1; - if (endLineNumber - line >= 1) { // needs at east size 1 - result.insertFirst(line, endLineNumber, indent); - } - } - if (previous.indent === indent) { - previous.endAbove = line; - } - else { // previous.indent < indent - // new region with a bigger indent - previousRegions.push({ indent, endAbove: line, line }); - } - } - return result.toIndentRanges(model); -} -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/intializingRangeProvider.js ***! - \**********************************************************************************************/ -/*! exports provided: ID_INIT_PROVIDER, InitializingRangeProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ID_INIT_PROVIDER", function() { return ID_INIT_PROVIDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InitializingRangeProvider", function() { return InitializingRangeProvider; }); -/* harmony import */ var _syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./syntaxRangeProvider.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const ID_INIT_PROVIDER = 'init'; -class InitializingRangeProvider { - constructor(editorModel, initialRanges, onTimeout, timeoutTime) { - this.editorModel = editorModel; - this.id = ID_INIT_PROVIDER; - if (initialRanges.length) { - let toDecorationRange = (range) => { - return { - range: { - startLineNumber: range.startLineNumber, - startColumn: 0, - endLineNumber: range.endLineNumber, - endColumn: editorModel.getLineLength(range.endLineNumber) - }, - options: { - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ - } - }; - }; - this.decorationIds = editorModel.deltaDecorations([], initialRanges.map(toDecorationRange)); - this.timeout = setTimeout(onTimeout, timeoutTime); - } - } - dispose() { - if (this.decorationIds) { - this.editorModel.deltaDecorations(this.decorationIds, []); - this.decorationIds = undefined; - } - if (typeof this.timeout === 'number') { - clearTimeout(this.timeout); - this.timeout = undefined; - } - } - compute(cancelationToken) { - let foldingRangeData = []; - if (this.decorationIds) { - for (let id of this.decorationIds) { - let range = this.editorModel.getDecorationRange(id); - if (range) { - foldingRangeData.push({ start: range.startLineNumber, end: range.endLineNumber, rank: 1 }); - } - } - } - return Promise.resolve(Object(_syntaxRangeProvider_js__WEBPACK_IMPORTED_MODULE_0__["sanitizeRanges"])(foldingRangeData, Number.MAX_VALUE)); - } -} + // let conf; +/** + * Draws a start state as a black circle + */ -/***/ }), +var drawStartState = function drawStartState(g) { + return g.append('circle') // .style('stroke', 'black') + // .style('fill', 'black') + .attr('class', 'start-state').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit); +}; +/** + * Draws a start state as a black circle + */ -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/syntaxRangeProvider.js ***! - \*****************************************************************************************/ -/*! exports provided: ID_SYNTAX_PROVIDER, SyntaxRangeProvider, RangesCollector, sanitizeRanges */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var drawDivider = function drawDivider(g) { + return g.append('line').style('stroke', 'grey').style('stroke-dasharray', '3').attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('class', 'divider').attr('x2', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight * 2).attr('y1', 0).attr('y2', 0); +}; +/** + * Draws a an end state as a black circle + */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ID_SYNTAX_PROVIDER", function() { return ID_SYNTAX_PROVIDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyntaxRangeProvider", function() { return SyntaxRangeProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangesCollector", function() { return RangesCollector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeRanges", function() { return sanitizeRanges; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foldingRanges.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/foldingRanges.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var drawSimpleState = function drawSimpleState(g, stateDef) { + var state = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id); + var classBox = state.node().getBBox(); + g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', classBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', classBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); + return state; +}; +/** + * Draws a state with descriptions + * @param {*} g + * @param {*} stateDef + */ +var drawDescrState = function drawDescrState(g, stateDef) { + var addTspan = function addTspan(textEl, txt, isFirst) { + var tSpan = textEl.append('tspan').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).text(txt); -const MAX_FOLDING_REGIONS = 5000; -const foldingContext = {}; -const ID_SYNTAX_PROVIDER = 'syntax'; -class SyntaxRangeProvider { - constructor(editorModel, providers, limit = MAX_FOLDING_REGIONS) { - this.editorModel = editorModel; - this.providers = providers; - this.limit = limit; - this.id = ID_SYNTAX_PROVIDER; - } - compute(cancellationToken) { - return collectSyntaxRanges(this.providers, this.editorModel, cancellationToken).then(ranges => { - if (ranges) { - let res = sanitizeRanges(ranges, this.limit); - return res; - } - return null; - }); - } - dispose() { - } -} -function collectSyntaxRanges(providers, model, cancellationToken) { - let rangeData = null; - let promises = providers.map((provider, i) => { - return Promise.resolve(provider.provideFoldingRanges(model, foldingContext, cancellationToken)).then(ranges => { - if (cancellationToken.isCancellationRequested) { - return; - } - if (Array.isArray(ranges)) { - if (!Array.isArray(rangeData)) { - rangeData = []; - } - let nLines = model.getLineCount(); - for (let r of ranges) { - if (r.start > 0 && r.end > r.start && r.end <= nLines) { - rangeData.push({ start: r.start, end: r.end, rank: i, kind: r.kind }); - } - } - } - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedExternalError"]); - }); - return Promise.all(promises).then(_ => { - return rangeData; - }); -} -class RangesCollector { - constructor(foldingRangesLimit) { - this._startIndexes = []; - this._endIndexes = []; - this._nestingLevels = []; - this._nestingLevelCounts = []; - this._types = []; - this._length = 0; - this._foldingRangesLimit = foldingRangesLimit; - } - add(startLineNumber, endLineNumber, type, nestingLevel) { - if (startLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__["MAX_LINE_NUMBER"] || endLineNumber > _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__["MAX_LINE_NUMBER"]) { - return; - } - let index = this._length; - this._startIndexes[index] = startLineNumber; - this._endIndexes[index] = endLineNumber; - this._nestingLevels[index] = nestingLevel; - this._types[index] = type; - this._length++; - if (nestingLevel < 30) { - this._nestingLevelCounts[nestingLevel] = (this._nestingLevelCounts[nestingLevel] || 0) + 1; - } - } - toIndentRanges() { - if (this._length <= this._foldingRangesLimit) { - let startIndexes = new Uint32Array(this._length); - let endIndexes = new Uint32Array(this._length); - for (let i = 0; i < this._length; i++) { - startIndexes[i] = this._startIndexes[i]; - endIndexes[i] = this._endIndexes[i]; - } - return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__["FoldingRegions"](startIndexes, endIndexes, this._types); - } - else { - let entries = 0; - let maxLevel = this._nestingLevelCounts.length; - for (let i = 0; i < this._nestingLevelCounts.length; i++) { - let n = this._nestingLevelCounts[i]; - if (n) { - if (n + entries > this._foldingRangesLimit) { - maxLevel = i; - break; - } - entries += n; - } - } - let startIndexes = new Uint32Array(this._foldingRangesLimit); - let endIndexes = new Uint32Array(this._foldingRangesLimit); - let types = []; - for (let i = 0, k = 0; i < this._length; i++) { - let level = this._nestingLevels[i]; - if (level < maxLevel || (level === maxLevel && entries++ < this._foldingRangesLimit)) { - startIndexes[k] = this._startIndexes[i]; - endIndexes[k] = this._endIndexes[i]; - types[k] = this._types[i]; - k++; - } - } - return new _foldingRanges_js__WEBPACK_IMPORTED_MODULE_1__["FoldingRegions"](startIndexes, endIndexes, types); - } - } -} -function sanitizeRanges(rangeData, limit) { - let sorted = rangeData.sort((d1, d2) => { - let diff = d1.start - d2.start; - if (diff === 0) { - diff = d1.rank - d2.rank; - } - return diff; - }); - let collector = new RangesCollector(limit); - let top = undefined; - let previous = []; - for (let entry of sorted) { - if (!top) { - top = entry; - collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length); - } - else { - if (entry.start > top.start) { - if (entry.end <= top.end) { - previous.push(top); - top = entry; - collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length); - } - else { - if (entry.start > top.end) { - do { - top = previous.pop(); - } while (top && entry.start > top.end); - if (top) { - previous.push(top); - } - top = entry; - } - collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length); - } - } - } + if (!isFirst) { + tSpan.attr('dy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight); } - return collector.toIndentRanges(); -} - - -/***/ }), + }; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js ***! - \*******************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var title = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + 1.3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.descriptions[0]); + var titleBox = title.node().getBBox(); + var titleHeight = titleBox.height; + var description = g.append('text') // text label for the x axis + .attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding * 0.4 + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('class', 'state-description'); + var isFirst = true; + var isSecond = true; + stateDef.descriptions.forEach(function (descr) { + if (!isFirst) { + addTspan(description, descr, isSecond); + isSecond = false; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/config/editorZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorZoom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + isFirst = false; + }); + var descrLine = g.append('line') // text label for the x axis + .attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y1', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin / 2).attr('y2', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.dividerMargin / 2).attr('class', 'descr-divider'); + var descrBox = description.node().getBBox(); + var width = Math.max(descrBox.width, titleBox.width); + descrLine.attr('x2', width + 3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); // const classBox = title.node().getBBox(); + g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', descrBox.height + titleHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); + return g; +}; +/** + * Adds the creates a box around the existing content and adds a + * panel for the id on top of the content. + */ +/** + * Function that creates an title row and a frame around a substate for a composit state diagram. + * The function returns a new d3 svg object with updated width and height properties; + * @param {*} g The d3 svg object for the substate to framed + * @param {*} stateDef The info about the + */ -class EditorFontZoomIn extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.fontZoomIn', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('EditorFontZoomIn.label', "Editor Font Zoom In"), - alias: 'Editor Font Zoom In', - precondition: undefined - }); - } - run(accessor, editor) { - _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__["EditorZoom"].setZoomLevel(_common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__["EditorZoom"].getZoomLevel() + 1); - } -} -class EditorFontZoomOut extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.fontZoomOut', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('EditorFontZoomOut.label', "Editor Font Zoom Out"), - alias: 'Editor Font Zoom Out', - precondition: undefined - }); - } - run(accessor, editor) { - _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__["EditorZoom"].setZoomLevel(_common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__["EditorZoom"].getZoomLevel() - 1); - } -} -class EditorFontZoomReset extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.fontZoomReset', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('EditorFontZoomReset.label', "Editor Font Zoom Reset"), - alias: 'Editor Font Zoom Reset', - precondition: undefined - }); - } - run(accessor, editor) { - _common_config_editorZoom_js__WEBPACK_IMPORTED_MODULE_2__["EditorZoom"].setZoomLevel(0); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(EditorFontZoomIn); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(EditorFontZoomOut); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(EditorFontZoomReset); +var addTitleAndBox = function addTitleAndBox(g, stateDef, altBkg) { + var pad = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; + var dblPad = 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; + var orgBox = g.node().getBBox(); + var orgWidth = orgBox.width; + var orgX = orgBox.x; + var title = g.append('text').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id); + var titleBox = title.node().getBBox(); + var titleWidth = titleBox.width + dblPad; + var width = Math.max(titleWidth, orgWidth); // + dblPad; + if (width === orgWidth) { + width = width + dblPad; + } -/***/ }), + var startX; // const lineY = 1 - getConfig().state.textHeight; + // const descrLine = g + // .append('line') // text label for the x axis + // .attr('x1', 0) + // .attr('y1', lineY) + // .attr('y2', lineY) + // .attr('class', 'descr-divider'); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js ***! - \***************************************************************************/ -/*! exports provided: alertFormattingEdits, getRealAndSyntheticDocumentFormattersOrdered, FormattingConflicts, formatDocumentRangesWithSelectedProvider, formatDocumentRangesWithProvider, formatDocumentWithSelectedProvider, formatDocumentWithProvider, getDocumentRangeFormattingEditsUntilResult, getDocumentFormattingEditsUntilResult, getOnTypeFormattingEdits */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alertFormattingEdits", function() { return alertFormattingEdits; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRealAndSyntheticDocumentFormattersOrdered", function() { return getRealAndSyntheticDocumentFormattersOrdered; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingConflicts", function() { return FormattingConflicts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDocumentRangesWithSelectedProvider", function() { return formatDocumentRangesWithSelectedProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDocumentRangesWithProvider", function() { return formatDocumentRangesWithProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDocumentWithSelectedProvider", function() { return formatDocumentWithSelectedProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDocumentWithProvider", function() { return formatDocumentWithProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDocumentRangeFormattingEditsUntilResult", function() { return getDocumentRangeFormattingEditsUntilResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDocumentFormattingEditsUntilResult", function() { return getDocumentFormattingEditsUntilResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOnTypeFormattingEdits", function() { return getOnTypeFormattingEdits; }); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./formattingEdit.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/extensions/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + var graphBox = g.node().getBBox(); // descrLine.attr('x2', graphBox.width + getConfig().state.padding); + if (stateDef.doc) {// cnsole.warn( + // stateDef.id, + // 'orgX: ', + // orgX, + // 'width: ', + // width, + // 'titleWidth: ', + // titleWidth, + // 'orgWidth: ', + // orgWidth, + // 'width', + // width + // ); + } + startX = orgX - pad; + if (titleWidth > orgWidth) { + startX = (orgWidth - width) / 2 + pad; + } + if (Math.abs(orgX - graphBox.x) < pad) { + if (titleWidth > orgWidth) { + startX = orgX - (titleWidth - orgWidth) / 2; + } + } + var lineY = 1 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight; // White color + g.insert('rect', ':first-child').attr('x', startX).attr('y', lineY).attr('class', altBkg ? 'alt-composit' : 'composit').attr('width', width).attr('height', graphBox.height + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift + 1).attr('rx', '0'); + title.attr('x', startX + pad); + if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); // Title background + g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width) // Just needs to be higher then the descr line, will be clipped by the white color box + .attr('height', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight * 3).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); // Full background + g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('width', width).attr('height', graphBox.height + 3 + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.textHeight).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.radius); + return g; +}; +var drawEndState = function drawEndState(g) { + g.append('circle') // .style('stroke', 'black') + // .style('fill', 'white') + .attr('class', 'end-state-outer').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.miniPadding); + return g.append('circle') // .style('stroke', 'black') + // .style('fill', 'black') + .attr('class', 'end-state-inner').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + 2).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.sizeUnit + 2); +}; +var drawForkJoinState = function drawForkJoinState(g, stateDef) { + var width = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.forkWidth; + var height = Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.forkHeight; + if (stateDef.parentId) { + var tmp = width; + width = height; + height = tmp; + } + return g.append('rect').style('stroke', 'black').style('fill', 'black').attr('width', width).attr('height', height).attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); +}; +var drawText = function drawText(elem, textData) { + // Remove and ignore br:s + var nText = textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_4__["default"].lineBreakRegex, ' '); + var textElem = elem.append('text'); + textElem.attr('x', textData.x); + textElem.attr('y', textData.y); + textElem.style('text-anchor', textData.anchor); + textElem.attr('fill', textData.fill); + if (typeof textData.class !== 'undefined') { + textElem.attr('class', textData.class); + } + var span = textElem.append('tspan'); + span.attr('x', textData.x + textData.textMargin * 2); + span.attr('fill', textData.fill); + span.text(nText); + return textElem; +}; +var _drawLongText = function _drawLongText(_text, x, y, g) { + var textHeight = 0; + var textElem = g.append('text'); + textElem.style('text-anchor', 'start'); + textElem.attr('class', 'noteText'); + var text = _text.replace(/\r\n/g, '
    '); + text = text.replace(/\n/g, '
    '); + var lines = text.split(_common_common__WEBPACK_IMPORTED_MODULE_4__["default"].lineBreakRegex); + var tHeight = 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + try { + for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _line = _step.value; + var txt = _line.trim(); -function alertFormattingEdits(edits) { - edits = edits.filter(edit => edit.range); - if (!edits.length) { - return; - } - let { range } = edits[0]; - for (let i = 1; i < edits.length; i++) { - range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].plusRange(range, edits[i].range); - } - const { startLineNumber, endLineNumber } = range; - if (startLineNumber === endLineNumber) { - if (edits.length === 1) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_14__["localize"]('hint11', "Made 1 formatting edit on line {0}", startLineNumber)); - } - else { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_14__["localize"]('hintn1', "Made {0} formatting edits on line {1}", edits.length, startLineNumber)); - } - } - else { - if (edits.length === 1) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_14__["localize"]('hint1n', "Made 1 formatting edit between lines {0} and {1}", startLineNumber, endLineNumber)); - } - else { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_14__["localize"]('hintnn', "Made {0} formatting edits between lines {1} and {2}", edits.length, startLineNumber, endLineNumber)); - } - } -} -function getRealAndSyntheticDocumentFormattersOrdered(model) { - const result = []; - const seen = new Set(); - // (1) add all document formatter - const docFormatter = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__["DocumentFormattingEditProviderRegistry"].ordered(model); - for (const formatter of docFormatter) { - result.push(formatter); - if (formatter.extensionId) { - seen.add(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__["ExtensionIdentifier"].toKey(formatter.extensionId)); - } - } - // (2) add all range formatter as document formatter (unless the same extension already did that) - const rangeFormatter = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__["DocumentRangeFormattingEditProviderRegistry"].ordered(model); - for (const formatter of rangeFormatter) { - if (formatter.extensionId) { - if (seen.has(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__["ExtensionIdentifier"].toKey(formatter.extensionId))) { - continue; - } - seen.add(_platform_extensions_common_extensions_js__WEBPACK_IMPORTED_MODULE_15__["ExtensionIdentifier"].toKey(formatter.extensionId)); - } - result.push({ - displayName: formatter.displayName, - extensionId: formatter.extensionId, - provideDocumentFormattingEdits(model, options, token) { - return formatter.provideDocumentRangeFormattingEdits(model, model.getFullModelRange(), options, token); - } - }); - } - return result; -} -class FormattingConflicts { - static select(formatter, document, mode) { - return __awaiter(this, void 0, void 0, function* () { - if (formatter.length === 0) { - return undefined; - } - const selector = _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_20__["Iterable"].first(FormattingConflicts._selectors); - if (selector) { - return yield selector(formatter, document, mode); - } - return formatter[0]; - }); - } -} -FormattingConflicts._selectors = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_17__["LinkedList"](); -function formatDocumentRangesWithSelectedProvider(accessor, editorOrModel, rangeOrRanges, mode, progress, token) { - return __awaiter(this, void 0, void 0, function* () { - const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]); - const model = Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel) ? editorOrModel.getModel() : editorOrModel; - const provider = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__["DocumentRangeFormattingEditProviderRegistry"].ordered(model); - const selected = yield FormattingConflicts.select(provider, model, mode); - if (selected) { - progress.report(selected); - yield instaService.invokeFunction(formatDocumentRangesWithProvider, selected, editorOrModel, rangeOrRanges, token); - } - }); -} -function formatDocumentRangesWithProvider(accessor, provider, editorOrModel, rangeOrRanges, token) { - return __awaiter(this, void 0, void 0, function* () { - const workerService = accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__["IEditorWorkerService"]); - let model; - let cts; - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel)) { - model = editorOrModel.getModel(); - cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["EditorStateCancellationTokenSource"](editorOrModel, 1 /* Value */ | 4 /* Position */, undefined, token); - } - else { - model = editorOrModel; - cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["TextModelCancellationTokenSource"](editorOrModel, token); - } - // make sure that ranges don't overlap nor touch each other - let ranges = []; - let len = 0; - for (let range of Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["asArray"])(rangeOrRanges).sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].compareRangesUsingStarts)) { - if (len > 0 && _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].areIntersectingOrTouching(ranges[len - 1], range)) { - ranges[len - 1] = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].fromPositions(ranges[len - 1].getStartPosition(), range.getEndPosition()); - } - else { - len = ranges.push(range); - } - } - const allEdits = []; - for (let range of ranges) { - try { - const rawEdits = yield provider.provideDocumentRangeFormattingEdits(model, range, model.getFormattingOptions(), cts.token); - const minEdits = yield workerService.computeMoreMinimalEdits(model.uri, rawEdits); - if (minEdits) { - allEdits.push(...minEdits); - } - if (cts.token.isCancellationRequested) { - return true; - } - } - finally { - cts.dispose(); - } - } - if (allEdits.length === 0) { - return false; - } - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel)) { - // use editor to apply edits - _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__["FormattingEdit"].execute(editorOrModel, allEdits, true); - alertFormattingEdits(allEdits); - editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* Immediate */); - } - else { - // use model to apply edits - const [{ range }] = allEdits; - const initialSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - model.pushEditOperations([initialSelection], allEdits.map(edit => { - return { - text: edit.text, - range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(edit.range), - forceMoveMarkers: true - }; - }), undoEdits => { - for (const { range } of undoEdits) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].areIntersectingOrTouching(range, initialSelection)) { - return [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)]; - } - } - return null; - }); - } - return true; - }); -} -function formatDocumentWithSelectedProvider(accessor, editorOrModel, mode, progress, token) { - return __awaiter(this, void 0, void 0, function* () { - const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]); - const model = Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel) ? editorOrModel.getModel() : editorOrModel; - const provider = getRealAndSyntheticDocumentFormattersOrdered(model); - const selected = yield FormattingConflicts.select(provider, model, mode); - if (selected) { - progress.report(selected); - yield instaService.invokeFunction(formatDocumentWithProvider, selected, editorOrModel, mode, token); - } - }); -} -function formatDocumentWithProvider(accessor, provider, editorOrModel, mode, token) { - return __awaiter(this, void 0, void 0, function* () { - const workerService = accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__["IEditorWorkerService"]); - let model; - let cts; - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel)) { - model = editorOrModel.getModel(); - cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["EditorStateCancellationTokenSource"](editorOrModel, 1 /* Value */ | 4 /* Position */, undefined, token); - } - else { - model = editorOrModel; - cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["TextModelCancellationTokenSource"](editorOrModel, token); - } - let edits; - try { - const rawEdits = yield provider.provideDocumentFormattingEdits(model, model.getFormattingOptions(), cts.token); - edits = yield workerService.computeMoreMinimalEdits(model.uri, rawEdits); - if (cts.token.isCancellationRequested) { - return true; - } - } - finally { - cts.dispose(); - } - if (!edits || edits.length === 0) { - return false; - } - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_6__["isCodeEditor"])(editorOrModel)) { - // use editor to apply edits - _formattingEdit_js__WEBPACK_IMPORTED_MODULE_13__["FormattingEdit"].execute(editorOrModel, edits, mode !== 2 /* Silent */); - if (mode !== 2 /* Silent */) { - alertFormattingEdits(edits); - editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(), 1 /* Immediate */); - } - } - else { - // use model to apply edits - const [{ range }] = edits; - const initialSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - model.pushEditOperations([initialSelection], edits.map(edit => { - return { - text: edit.text, - range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(edit.range), - forceMoveMarkers: true - }; - }), undoEdits => { - for (const { range } of undoEdits) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].areIntersectingOrTouching(range, initialSelection)) { - return [new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_9__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)]; - } - } - return null; - }); - } - return true; - }); -} -function getDocumentRangeFormattingEditsUntilResult(workerService, model, range, options, token) { - return __awaiter(this, void 0, void 0, function* () { - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__["DocumentRangeFormattingEditProviderRegistry"].ordered(model); - for (const provider of providers) { - let rawEdits = yield Promise.resolve(provider.provideDocumentRangeFormattingEdits(model, range, options, token)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedExternalError"]); - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["isNonEmptyArray"])(rawEdits)) { - return yield workerService.computeMoreMinimalEdits(model.uri, rawEdits); - } - } - return undefined; - }); -} -function getDocumentFormattingEditsUntilResult(workerService, model, options, token) { - return __awaiter(this, void 0, void 0, function* () { - const providers = getRealAndSyntheticDocumentFormattersOrdered(model); - for (const provider of providers) { - let rawEdits = yield Promise.resolve(provider.provideDocumentFormattingEdits(model, options, token)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedExternalError"]); - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["isNonEmptyArray"])(rawEdits)) { - return yield workerService.computeMoreMinimalEdits(model.uri, rawEdits); - } + if (txt.length > 0) { + var span = textElem.append('tspan'); + span.text(txt); + + if (tHeight === 0) { + var textBounds = span.node().getBBox(); + tHeight += textBounds.height; } - return undefined; - }); -} -function getOnTypeFormattingEdits(workerService, model, position, ch, options) { - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_10__["OnTypeFormattingEditProviderRegistry"].ordered(model); - if (providers.length === 0) { - return Promise.resolve(undefined); - } - if (providers[0].autoFormatTriggerCharacters.indexOf(ch) < 0) { - return Promise.resolve(undefined); + + textHeight += tHeight; + span.attr('x', x + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); + span.attr('y', y + textHeight + 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); + } } - return Promise.resolve(providers[0].provideOnTypeFormattingEdits(model, position, ch, options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationToken"].None)).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedExternalError"]).then(edits => { - return workerService.computeMoreMinimalEdits(model.uri, edits); - }); -} -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommand('_executeFormatRangeProvider', function (accessor, ...args) { - const [resource, range, options] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"].isUri(resource)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].isIRange(range)); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["illegalArgument"])('resource'); + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } - return getDocumentRangeFormattingEditsUntilResult(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__["IEditorWorkerService"]), model, _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(range), options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationToken"].None); -}); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommand('_executeFormatDocumentProvider', function (accessor, ...args) { - const [resource, options] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"].isUri(resource)); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["illegalArgument"])('resource'); - } - return getDocumentFormattingEditsUntilResult(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__["IEditorWorkerService"]), model, options, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationToken"].None); -}); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommand('_executeFormatOnTypeProvider', function (accessor, ...args) { - const [resource, position, ch, options] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"].isUri(resource)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].isIPosition(position)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_19__["assertType"])(typeof ch === 'string'); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_12__["IModelService"]).getModel(resource); - if (!model) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["illegalArgument"])('resource'); - } - return getOnTypeFormattingEdits(accessor.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_11__["IEditorWorkerService"]), model, _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].lift(position), ch, options); -}); + } + return { + textWidth: textElem.node().getBBox().width, + textHeight: textHeight + }; +}; +/** + * Draws a note to the diagram + * @param text - The text of the given note. + * @param g - The element the note is attached to. + */ -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js ***! - \**********************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var drawNote = function drawNote(text, g) { + g.attr('class', 'state-note'); + var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); + var rectElem = g.append('g'); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _format_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./format.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/format.js"); -/* harmony import */ var _formattingEdit_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./formattingEdit.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + var _drawLongText2 = _drawLongText(text, 0, 0, rectElem), + textWidth = _drawLongText2.textWidth, + textHeight = _drawLongText2.textHeight; + note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin); + note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.noteMargin * 2); + return note; +}; +/** + * Starting point for drawing a state. The function finds out the specifics + * about the state and renders with approprtiate function. + * @param {*} elem + * @param {*} stateDef + */ +var drawState = function drawState(elem, stateDef) { + var id = stateDef.id; + var stateInfo = { + id: id, + label: stateDef.id, + width: 0, + height: 0 + }; + var g = elem.append('g').attr('id', id).attr('class', 'stateGroup'); + if (stateDef.type === 'start') drawStartState(g); + if (stateDef.type === 'end') drawEndState(g); + if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef); + if (stateDef.type === 'note') drawNote(stateDef.note.text, g); + if (stateDef.type === 'divider') drawDivider(g); + if (stateDef.type === 'default' && stateDef.descriptions.length === 0) drawSimpleState(g, stateDef); + if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef); + var stateBox = g.node().getBBox(); + stateInfo.width = stateBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; + stateInfo.height = stateBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding; + _id_cache_js__WEBPACK_IMPORTED_MODULE_1__["default"].set(id, stateInfo); // stateCnt++; + return stateInfo; +}; +var edgeCount = 0; +var drawEdge = function drawEdge(elem, path, relation) { + var getRelationType = function getRelationType(type) { + switch (type) { + case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.AGGREGATION: + return 'aggregation'; + case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.EXTENSION: + return 'extension'; + case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.COMPOSITION: + return 'composition'; + case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY: + return 'dependency'; + } + }; + path.points = path.points.filter(function (p) { + return !Number.isNaN(p.y); + }); // The data for our line + var lineData = path.points; // This is the accessor function we talked about above + var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__["line"])().x(function (d) { + return d.x; + }).y(function (d) { + return d.y; + }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]); + var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'transition'); + var url = ''; + if (Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.arrowMarkerAbsolute) { + url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, '\\('); + url = url.replace(/\)/g, '\\)'); + } + svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY) + 'End' + ')'); + if (typeof relation.title !== 'undefined') { + var label = elem.append('g').attr('class', 'stateLabel'); + var _utils$calcLabelPosit = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].calcLabelPosition(path.points), + x = _utils$calcLabelPosit.x, + y = _utils$calcLabelPosit.y; + var rows = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].getRows(relation.title); + var titleHeight = 0; + var titleRows = []; + var maxWidth = 0; + var minX = 0; + for (var i = 0; i <= rows.length; i++) { + var title = label.append('text').attr('text-anchor', 'middle').text(rows[i]).attr('x', x).attr('y', y + titleHeight); + var boundstmp = title.node().getBBox(); + maxWidth = Math.max(maxWidth, boundstmp.width); + minX = Math.min(minX, boundstmp.x); + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(boundstmp.x, x, y + titleHeight); + if (titleHeight === 0) { + var titleBox = title.node().getBBox(); + titleHeight = titleBox.height; + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Title height', titleHeight, y); + } + titleRows.push(title); + } + var boxHeight = titleHeight * rows.length; -let FormatOnType = class FormatOnType { - constructor(editor, _workerService) { - this._workerService = _workerService; - this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._editor = editor; - this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update())); - this._callOnDispose.add(editor.onDidChangeModel(() => this._update())); - this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update())); - this._callOnDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["OnTypeFormattingEditProviderRegistry"].onDidChange(this._update, this)); - } - dispose() { - this._callOnDispose.dispose(); - this._callOnModel.dispose(); - } - _update() { - // clean up - this._callOnModel.clear(); - // we are disabled - if (!this._editor.getOption(41 /* formatOnType */)) { - return; - } - // no model - if (!this._editor.hasModel()) { - return; - } - const model = this._editor.getModel(); - // no support - const [support] = _common_modes_js__WEBPACK_IMPORTED_MODULE_9__["OnTypeFormattingEditProviderRegistry"].ordered(model); - if (!support || !support.autoFormatTriggerCharacters) { - return; - } - // register typing listeners that will trigger the format - let triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_6__["CharacterSet"](); - for (let ch of support.autoFormatTriggerCharacters) { - triggerChars.add(ch.charCodeAt(0)); - } - this._callOnModel.add(this._editor.onDidType((text) => { - let lastCharCode = text.charCodeAt(text.length - 1); - if (triggerChars.has(lastCharCode)) { - this._trigger(String.fromCharCode(lastCharCode)); - } - })); - } - _trigger(ch) { - if (!this._editor.hasModel()) { - return; - } - if (this._editor.getSelections().length > 1) { - return; - } - const model = this._editor.getModel(); - const position = this._editor.getPosition(); - let canceled = false; - // install a listener that checks if edits happens before the - // position on which we format right now. If so, we won't - // apply the format edits - const unbind = this._editor.onDidChangeModelContent((e) => { - if (e.isFlush) { - // a model.setValue() was called - // cancel only once - canceled = true; - unbind.dispose(); - return; - } - for (let i = 0, len = e.changes.length; i < len; i++) { - const change = e.changes[i]; - if (change.range.endLineNumber <= position.lineNumber) { - // cancel only once - canceled = true; - unbind.dispose(); - return; - } - } - }); - Object(_format_js__WEBPACK_IMPORTED_MODULE_11__["getOnTypeFormattingEdits"])(this._workerService, model, position, ch, model.getFormattingOptions()).then(edits => { - unbind.dispose(); - if (canceled) { - return; - } - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"])(edits)) { - _formattingEdit_js__WEBPACK_IMPORTED_MODULE_12__["FormattingEdit"].execute(this._editor, edits, true); - Object(_format_js__WEBPACK_IMPORTED_MODULE_11__["alertFormattingEdits"])(edits); - } - }, (err) => { - unbind.dispose(); - throw err; - }); - } -}; -FormatOnType.ID = 'editor.contrib.autoFormat'; -FormatOnType = __decorate([ - __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__["IEditorWorkerService"]) -], FormatOnType); -let FormatOnPaste = class FormatOnPaste { - constructor(editor, _instantiationService) { - this.editor = editor; - this._instantiationService = _instantiationService; - this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update())); - this._callOnDispose.add(editor.onDidChangeModel(() => this._update())); - this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update())); - this._callOnDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["DocumentRangeFormattingEditProviderRegistry"].onDidChange(this._update, this)); - } - dispose() { - this._callOnDispose.dispose(); - this._callOnModel.dispose(); - } - _update() { - // clean up - this._callOnModel.clear(); - // we are disabled - if (!this.editor.getOption(40 /* formatOnPaste */)) { - return; - } - // no model - if (!this.editor.hasModel()) { - return; - } - // no formatter - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["DocumentRangeFormattingEditProviderRegistry"].has(this.editor.getModel())) { - return; - } - this._callOnModel.add(this.editor.onDidPaste(({ range }) => this._trigger(range))); - } - _trigger(range) { - if (!this.editor.hasModel()) { - return; - } - if (this.editor.getSelections().length > 1) { - return; - } - this._instantiationService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__["formatDocumentRangesWithSelectedProvider"], this.editor, range, 2 /* Silent */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__["Progress"].None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_17__["onUnexpectedError"]); - } -}; -FormatOnPaste.ID = 'editor.contrib.formatOnPaste'; -FormatOnPaste = __decorate([ - __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]) -], FormatOnPaste); -class FormatDocumentAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.formatDocument', - label: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('formatDocument.label', "Format Document"), - alias: 'Format Document', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].notInCompositeEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentFormattingProvider), - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentFormattingProvider), - primary: 1024 /* Shift */ | 512 /* Alt */ | 36 /* KEY_F */, - linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 39 /* KEY_I */ }, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - when: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentFormattingProvider, - group: '1_modification', - order: 1.3 - } - }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (editor.hasModel()) { - const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]); - const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__["IEditorProgressService"]); - yield progressService.showWhile(instaService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__["formatDocumentWithSelectedProvider"], editor, 1 /* Explicit */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__["Progress"].None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None), 250); - } - }); - } -} -class FormatSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.formatSelection', - label: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('formatSelection.label', "Format Selection"), - alias: 'Format Selection', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentSelectionFormattingProvider), - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentSelectionFormattingProvider), - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 36 /* KEY_F */), - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentSelectionFormattingProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasNonEmptySelection), - group: '1_modification', - order: 1.31 - } - }); - } - run(accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (!editor.hasModel()) { - return; - } - const instaService = accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]); - const model = editor.getModel(); - const ranges = editor.getSelections().map(range => { - return range.isEmpty() - ? new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](range.startLineNumber, 1, range.startLineNumber, model.getLineMaxColumn(range.startLineNumber)) - : range; - }); - const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__["IEditorProgressService"]); - yield progressService.showWhile(instaService.invokeFunction(_format_js__WEBPACK_IMPORTED_MODULE_11__["formatDocumentRangesWithSelectedProvider"], editor, ranges, 1 /* Explicit */, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_18__["Progress"].None, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None), 250); - }); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(FormatOnType.ID, FormatOnType); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(FormatOnPaste.ID, FormatOnPaste); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(FormatDocumentAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(FormatSelectionAction); -// this is the old format action that does both (format document OR format selection) -// and we keep it here such that existing keybinding configurations etc will still work -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__["CommandsRegistry"].registerCommand('editor.action.format', (accessor) => __awaiter(void 0, void 0, void 0, function* () { - const editor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__["ICodeEditorService"]).getFocusedCodeEditor(); - if (!editor || !editor.hasModel()) { - return; - } - const commandService = accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__["ICommandService"]); - if (editor.getSelection().isEmpty()) { - yield commandService.executeCommand('editor.action.formatDocument'); - } - else { - yield commandService.executeCommand('editor.action.formatSelection'); + if (rows.length > 1) { + var heightAdj = (rows.length - 1) * titleHeight * 0.5; + titleRows.forEach(function (title, i) { + return title.attr('y', y + i * titleHeight - heightAdj); + }); + boxHeight = titleHeight * rows.length; } -})); + var bounds = label.node().getBBox(); + label.insert('rect', ':first-child').attr('class', 'box').attr('x', x - maxWidth / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding / 2).attr('y', y - boxHeight / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding / 2 - 3.5).attr('width', maxWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding).attr('height', boxHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__["getConfig"])().state.padding); + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(bounds); //label.attr('transform', '0 -' + (bounds.y / 2)); + // Debug points + // path.points.forEach(point => { + // g.append('circle') + // .style('stroke', 'red') + // .style('fill', 'red') + // .attr('r', 1) + // .attr('cx', point.x) + // .attr('cy', point.y); + // }); + // g.append('circle') + // .style('stroke', 'blue') + // .style('fill', 'blue') + // .attr('r', 1) + // .attr('cx', x) + // .attr('cy', y); + } + + edgeCount++; +}; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formattingEdit.js ***! - \***********************************************************************************/ -/*! exports provided: FormattingEdit */ +/***/ "./src/diagrams/state/stateDb.js": +/*!***************************************!*\ + !*** ./src/diagrams/state/stateDb.js ***! + \***************************************/ +/*! exports provided: parseDirective, addState, clear, getState, getStates, logDocuments, getRelations, addRelation, cleanupLabel, lineType, relationType, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingEdit", function() { return FormattingEdit; }); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addState", function() { return addState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getState", function() { return getState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStates", function() { return getStates; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logDocuments", function() { return logDocuments; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; }); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -class FormattingEdit { - static _handleEolEdits(editor, edits) { - let newEol = undefined; - let singleEdits = []; - for (let edit of edits) { - if (typeof edit.eol === 'number') { - newEol = edit.eol; - } - if (edit.range && typeof edit.text === 'string') { - singleEdits.push(edit); - } - } - if (typeof newEol === 'number') { - if (editor.hasModel()) { - editor.getModel().pushEOL(newEol); - } - } - return singleEdits; - } - static _isFullModelReplaceEdit(editor, edit) { - if (!editor.hasModel()) { - return false; - } - const model = editor.getModel(); - const editRange = model.validateRange(edit.range); - const fullModelRange = model.getFullModelRange(); - return fullModelRange.equalsRange(editRange); - } - static execute(editor, _edits, addUndoStops) { - if (addUndoStops) { - editor.pushUndoStop(); - } - const edits = FormattingEdit._handleEolEdits(editor, _edits); - if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) { - // We use replace semantics and hope that markers stay put... - editor.executeEdits('formatEditsCommand', edits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].lift(edit.range), edit.text))); - } - else { - editor.executeEdits('formatEditsCommand', edits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].replaceMove(_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].lift(edit.range), edit.text))); - } - if (addUndoStops) { - editor.pushUndoStop(); - } - } -} -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js ***! - \*********************************************************************************/ -/*! exports provided: MarkerController, NextMarkerAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerController", function() { return MarkerController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextMarkerAction", function() { return NextMarkerAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./gotoErrorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _markerNavigationService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./markerNavigationService.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; + +var clone = function clone(o) { + return JSON.parse(JSON.stringify(o)); }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } + +var rootDoc = []; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].parseDirective(this, statement, context, type); }; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + +var setRootDoc = function setRootDoc(o) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Setting root doc', o); // rootDoc = { id: 'root', doc: o }; + + rootDoc = o; }; +var getRootDoc = function getRootDoc() { + return rootDoc; +}; +var docTranslator = function docTranslator(parent, node, first) { + if (node.stmt === 'relation') { + docTranslator(parent, node.state1, true); + docTranslator(parent, node.state2, false); + } else { + if (node.stmt === 'state') { + if (node.id === '[*]') { + node.id = first ? parent.id + '_start' : parent.id + '_end'; + node.start = first; + } + } + if (node.doc) { + var doc = []; // Check for concurrency + var i = 0; + var currentDoc = []; + for (i = 0; i < node.doc.length; i++) { + if (node.doc[i].type === 'divider') { + // debugger; + var newNode = clone(node.doc[i]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node.doc[i]); + } + } // If any divider was encountered + if (doc.length > 0 && currentDoc.length > 0) { + var _newNode = { + stmt: 'state', + id: Object(_utils__WEBPACK_IMPORTED_MODULE_1__["generateId"])(), + type: 'divider', + doc: clone(currentDoc) + }; + doc.push(clone(_newNode)); + node.doc = doc; + } + node.doc.forEach(function (docNode) { + return docTranslator(node, docNode, true); + }); + } + } +}; +var getRootDocV2 = function getRootDocV2() { + docTranslator({ + id: 'root' + }, { + id: 'root', + doc: rootDoc + }, true); + return { + id: 'root', + doc: rootDoc + }; +}; +var extract = function extract(_doc) { + // const res = { states: [], relations: [] }; + var doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } // let doc = root.doc; + // if (!doc) { + // doc = root; + // } -let MarkerController = class MarkerController { - constructor(editor, _markerNavigationService, _contextKeyService, _editorService, _instantiationService) { - this._markerNavigationService = _markerNavigationService; - this._contextKeyService = _contextKeyService; - this._editorService = _editorService; - this._instantiationService = _instantiationService; - this._sessionDispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._editor = editor; - this._widgetVisible = CONTEXT_MARKERS_NAVIGATION_VISIBLE.bindTo(this._contextKeyService); - } - static get(editor) { - return editor.getContribution(MarkerController.ID); - } - dispose() { - this._cleanUp(); - this._sessionDispoables.dispose(); - } - _cleanUp() { - this._widgetVisible.reset(); - this._sessionDispoables.clear(); - this._widget = undefined; - this._model = undefined; - } - _getOrCreateModel(uri) { - if (this._model && this._model.matches(uri)) { - return this._model; - } - let reusePosition = false; - if (this._model) { - reusePosition = true; - this._cleanUp(); - } - this._model = this._markerNavigationService.getMarkerList(uri); - if (reusePosition) { - this._model.move(true, this._editor.getModel(), this._editor.getPosition()); - } - this._widget = this._instantiationService.createInstance(_gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__["MarkerNavigationWidget"], this._editor); - this._widget.onDidClose(() => this.close(), this, this._sessionDispoables); - this._widgetVisible.set(true); - this._sessionDispoables.add(this._model); - this._sessionDispoables.add(this._widget); - // follow cursor - this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e => { - var _a, _b, _c; - if (!((_a = this._model) === null || _a === void 0 ? void 0 : _a.selected) || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].containsPosition((_b = this._model) === null || _b === void 0 ? void 0 : _b.selected.marker, e.position)) { - (_c = this._model) === null || _c === void 0 ? void 0 : _c.resetIndex(); - } - })); - // update markers - this._sessionDispoables.add(this._model.onDidChange(() => { - if (!this._widget || !this._widget.position || !this._model) { - return; - } - const info = this._model.find(this._editor.getModel().uri, this._widget.position); - if (info) { - this._widget.updateMarker(info.marker); - } - else { - this._widget.showStale(); - } - })); - // open related - this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(related => { - this._editorService.openCodeEditor({ - resource: related.resource, - options: { pinned: true, revealIfOpened: true, selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].lift(related).collapseToStart() } - }, this._editor); - this.close(false); - })); - this._sessionDispoables.add(this._editor.onDidChangeModel(() => this._cleanUp())); - return this._model; - } - close(focusEditor = true) { - this._cleanUp(); - if (focusEditor) { - this._editor.focus(); - } - } - showAtMarker(marker) { - if (this._editor.hasModel()) { - const model = this._getOrCreateModel(this._editor.getModel().uri); - model.resetIndex(); - model.move(true, this._editor.getModel(), new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](marker.startLineNumber, marker.startColumn)); - if (model.selected) { - this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total); - } - } + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info(doc); + clear(); + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Extract', doc); + doc.forEach(function (item) { + if (item.stmt === 'state') { + addState(item.id, item.type, item.doc, item.description, item.note); } - nagivate(next, multiFile) { - return __awaiter(this, void 0, void 0, function* () { - if (this._editor.hasModel()) { - const model = this._getOrCreateModel(multiFile ? undefined : this._editor.getModel().uri); - model.move(next, this._editor.getModel(), this._editor.getPosition()); - if (!model.selected) { - return; - } - if (model.selected.marker.resource.toString() !== this._editor.getModel().uri.toString()) { - // show in different editor - this._cleanUp(); - const otherEditor = yield this._editorService.openCodeEditor({ - resource: model.selected.marker.resource, - options: { pinned: false, revealIfOpened: true, selectionRevealType: 2 /* NearTop */, selection: model.selected.marker } - }, this._editor); - if (otherEditor) { - MarkerController.get(otherEditor).close(); - MarkerController.get(otherEditor).nagivate(next, multiFile); - } - } - else { - // show in this editor - this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total); - } - } - }); + + if (item.stmt === 'relation') { + addRelation(item.state1.id, item.state2.id, item.description); } + }); }; -MarkerController.ID = 'editor.contrib.markerController'; -MarkerController = __decorate([ - __param(1, _markerNavigationService_js__WEBPACK_IMPORTED_MODULE_12__["IMarkerNavigationService"]), - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["IContextKeyService"]), - __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__["ICodeEditorService"]), - __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_11__["IInstantiationService"]) -], MarkerController); -class MarkerNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["EditorAction"] { - constructor(_next, _multiFile, opts) { - super(opts); - this._next = _next; - this._multiFile = _multiFile; - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (editor.hasModel()) { - MarkerController.get(editor).nagivate(this._next, this._multiFile); - } - }); - } -} -class NextMarkerAction extends MarkerNavigationAction { - constructor() { - super(true, false, { - id: NextMarkerAction.ID, - label: NextMarkerAction.LABEL, - alias: 'Go to Next Problem (Error, Warning, Info)', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].focus, - primary: 512 /* Alt */ | 66 /* F8 */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__["MarkerNavigationWidget"].TitleMenu, - title: NextMarkerAction.LABEL, - icon: Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["registerIcon"])('marker-navigation-next', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["Codicon"].chevronDown), - group: 'navigation', - order: 1 - } - }); - } -} -NextMarkerAction.ID = 'editor.action.marker.next'; -NextMarkerAction.LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('markerAction.next.label', "Go to Next Problem (Error, Warning, Info)"); -class PrevMarkerAction extends MarkerNavigationAction { - constructor() { - super(false, false, { - id: PrevMarkerAction.ID, - label: PrevMarkerAction.LABEL, - alias: 'Go to Previous Problem (Error, Warning, Info)', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].focus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 66 /* F8 */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _gotoErrorWidget_js__WEBPACK_IMPORTED_MODULE_7__["MarkerNavigationWidget"].TitleMenu, - title: NextMarkerAction.LABEL, - icon: Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["registerIcon"])('marker-navigation-previous', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["Codicon"].chevronUp), - group: 'navigation', - order: 2 - } - }); - } -} -PrevMarkerAction.ID = 'editor.action.marker.prev'; -PrevMarkerAction.LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('markerAction.previous.label', "Go to Previous Problem (Error, Warning, Info)"); -class NextMarkerInFilesAction extends MarkerNavigationAction { - constructor() { - super(true, true, { - id: 'editor.action.marker.nextInFiles', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('markerAction.nextInFiles.label', "Go to Next Problem in Files (Error, Warning, Info)"), - alias: 'Go to Next Problem in Files (Error, Warning, Info)', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].focus, - primary: 66 /* F8 */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"].MenubarGoMenu, - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miGotoNextProblem', comment: ['&& denotes a mnemonic'] }, "Next &&Problem"), - group: '6_problem_nav', - order: 1 - } - }); - } -} -class PrevMarkerInFilesAction extends MarkerNavigationAction { - constructor() { - super(false, true, { - id: 'editor.action.marker.prevInFiles', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('markerAction.previousInFiles.label', "Go to Previous Problem in Files (Error, Warning, Info)"), - alias: 'Go to Previous Problem in Files (Error, Warning, Info)', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].focus, - primary: 1024 /* Shift */ | 66 /* F8 */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"].MenubarGoMenu, - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miGotoPreviousProblem', comment: ['&& denotes a mnemonic'] }, "Previous &&Problem"), - group: '6_problem_nav', - order: 2 - } - }); +var newDoc = function newDoc() { + return { + relations: [], + states: {}, + documents: {} + }; +}; + +var documents = { + root: newDoc() +}; +var currentDocument = documents.root; +var startCnt = 0; +var endCnt = 0; // eslint-disable-line +// let stateCnt = 0; + +/** + * Function called by parser when a node definition has been found. + * @param id + * @param text + * @param type + * @param style + */ + +var addState = function addState(id, type, doc, descr, note) { + if (typeof currentDocument.states[id] === 'undefined') { + currentDocument.states[id] = { + id: id, + descriptions: [], + type: type, + doc: doc, + note: note + }; + } else { + if (!currentDocument.states[id].doc) { + currentDocument.states[id].doc = doc; } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorContribution"])(MarkerController.ID, MarkerController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(NextMarkerAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(PrevMarkerAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(NextMarkerInFilesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(PrevMarkerInFilesAction); -const CONTEXT_MARKERS_NAVIGATION_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["RawContextKey"]('markersNavigationVisible', false); -const MarkerCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["EditorCommand"].bindToContribution(MarkerController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorCommand"])(new MarkerCommand({ - id: 'closeMarkersNavigation', - precondition: CONTEXT_MARKERS_NAVIGATION_VISIBLE, - handler: x => x.close(), - kbOpts: { - weight: 100 /* EditorContrib */ + 50, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].focus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] + + if (!currentDocument.states[id].type) { + currentDocument.states[id].type = type; } -})); + } + if (descr) { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Adding state ', id, descr); + if (typeof descr === 'string') addDescription(id, descr.trim()); -/***/ }), + if (_typeof(descr) === 'object') { + descr.forEach(function (des) { + return addDescription(id, des.trim()); + }); + } + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoErrorWidget.js ***! - \***************************************************************************************/ -/*! exports provided: MarkerNavigationWidget, editorMarkerNavigationError, editorMarkerNavigationWarning, editorMarkerNavigationInfo, editorMarkerNavigationBackground */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerNavigationWidget", function() { return MarkerNavigationWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorMarkerNavigationError", function() { return editorMarkerNavigationError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorMarkerNavigationWarning", function() { return editorMarkerNavigationWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorMarkerNavigationInfo", function() { return editorMarkerNavigationInfo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorMarkerNavigationBackground", function() { return editorMarkerNavigationBackground; }); -/* harmony import */ var _media_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/gotoErrorWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/labels.js */ "./node_modules/monaco-editor/esm/vs/base/common/labels.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../peekView/peekView.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _platform_severityIcon_common_severityIcon_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/severityIcon/common/severityIcon.js */ "./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/actions/browser/menuEntryActionViewItem.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; + if (note) currentDocument.states[id].note = note; +}; +var clear = function clear() { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + currentDocument = documents.root; + startCnt = 0; + endCnt = 0; // eslint-disable-line + + classes = []; +}; +var getState = function getState(id) { + return currentDocument.states[id]; +}; +var getStates = function getStates() { + return currentDocument.states; +}; +var logDocuments = function logDocuments() { + _logger__WEBPACK_IMPORTED_MODULE_0__["log"].info('Documents = ', documents); }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } +var getRelations = function getRelations() { + return currentDocument.relations; }; +var addRelation = function addRelation(_id1, _id2, title) { + var id1 = _id1; + var id2 = _id2; + var type1 = 'default'; + var type2 = 'default'; + + if (_id1 === '[*]') { + startCnt++; + id1 = 'start' + startCnt; + type1 = 'start'; + } + if (_id2 === '[*]') { + endCnt++; + id2 = 'end' + startCnt; + type2 = 'end'; + } + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1: id1, + id2: id2, + title: title + }); +}; +var addDescription = function addDescription(id, _descr) { + var theState = currentDocument.states[id]; + var descr = _descr; + if (descr[0] === ':') { + descr = descr.substr(1).trim(); + } + theState.descriptions.push(descr); +}; +var cleanupLabel = function cleanupLabel(label) { + if (label.substring(0, 1) === ':') { + return label.substr(2).trim(); + } else { + return label.trim(); + } +}; +var lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +var dividerCnt = 0; +var getDividerId = function getDividerId() { + dividerCnt++; + return 'divider-id-' + dividerCnt; +}; +var classes = []; +var getClasses = function getClasses() { + return classes; +}; +var getDirection = function getDirection() { + return 'TB'; +}; +var relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; +var trimColon = function trimColon(str) { + return str && str[0] === ':' ? str.substr(1).trim() : str.trim(); +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]().state; + }, + addState: addState, + clear: clear, + getState: getState, + getStates: getStates, + getRelations: getRelations, + getClasses: getClasses, + getDirection: getDirection, + addRelation: addRelation, + getDividerId: getDividerId, + // addDescription, + cleanupLabel: cleanupLabel, + lineType: lineType, + relationType: relationType, + logDocuments: logDocuments, + getRootDoc: getRootDoc, + setRootDoc: setRootDoc, + getRootDocV2: getRootDocV2, + extract: extract, + trimColon: trimColon +}); +/***/ }), +/***/ "./src/diagrams/state/stateRenderer-v2.js": +/*!************************************************!*\ + !*** ./src/diagrams/state/stateRenderer-v2.js ***! + \************************************************/ +/*! exports provided: setConf, getClasses, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); +/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison"); +/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dagre-wrapper/index.js */ "./src/dagre-wrapper/index.js"); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); -class MessageWidget { - constructor(parent, editor, onRelatedInformation, _openerService) { - this._openerService = _openerService; - this._lines = 0; - this._longestLineLength = 0; - this._relatedDiagnostics = new WeakMap(); - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._editor = editor; - const domNode = document.createElement('div'); - domNode.className = 'descriptioncontainer'; - this._messageBlock = document.createElement('div'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this._messageBlock, 'message'); - this._messageBlock.setAttribute('aria-live', 'assertive'); - this._messageBlock.setAttribute('role', 'alert'); - domNode.appendChild(this._messageBlock); - this._relatedBlock = document.createElement('div'); - domNode.appendChild(this._relatedBlock); - this._disposables.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addStandardDisposableListener"](this._relatedBlock, 'click', event => { - event.preventDefault(); - const related = this._relatedDiagnostics.get(event.target); - if (related) { - onRelatedInformation(related); - } - })); - this._scrollable = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_9__["ScrollableElement"](domNode, { - horizontal: 1 /* Auto */, - vertical: 1 /* Auto */, - useShadows: false, - horizontalScrollbarSize: 3, - verticalScrollbarSize: 3 - }); - parent.appendChild(this._scrollable.getDomNode()); - this._disposables.add(this._scrollable.onScroll(e => { - domNode.style.left = `-${e.scrollLeft}px`; - domNode.style.top = `-${e.scrollTop}px`; - })); - this._disposables.add(this._scrollable); - } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this._disposables); - } - update(marker) { - const { source, message, relatedInformation, code } = marker; - let sourceAndCodeLength = ((source === null || source === void 0 ? void 0 : source.length) || 0) + '()'.length; - if (code) { - if (typeof code === 'string') { - sourceAndCodeLength += code.length; - } - else { - sourceAndCodeLength += code.value.length; - } - } - const lines = message.split(/\r\n|\r|\n/g); - this._lines = lines.length; - this._longestLineLength = 0; - for (const line of lines) { - this._longestLineLength = Math.max(line.length + sourceAndCodeLength, this._longestLineLength); - } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](this._messageBlock); - this._messageBlock.setAttribute('aria-label', this.getAriaLabel(marker)); - this._editor.applyFontInfo(this._messageBlock); - let lastLineElement = this._messageBlock; - for (const line of lines) { - lastLineElement = document.createElement('div'); - lastLineElement.innerText = line; - if (line === '') { - lastLineElement.style.height = this._messageBlock.style.lineHeight; - } - this._messageBlock.appendChild(lastLineElement); - } - if (source || code) { - const detailsElement = document.createElement('span'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](detailsElement, 'details'); - lastLineElement.appendChild(detailsElement); - if (source) { - const sourceElement = document.createElement('span'); - sourceElement.innerText = source; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](sourceElement, 'source'); - detailsElement.appendChild(sourceElement); - } - if (code) { - if (typeof code === 'string') { - const codeElement = document.createElement('span'); - codeElement.innerText = `(${code})`; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](codeElement, 'code'); - detailsElement.appendChild(codeElement); - } - else { - this._codeLink = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]('a.code-link'); - this._codeLink.setAttribute('href', `${code.target.toString()}`); - this._codeLink.onclick = (e) => { - this._openerService.open(code.target); - e.preventDefault(); - e.stopPropagation(); - }; - const codeElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this._codeLink, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]('span')); - codeElement.innerText = code.value; - detailsElement.appendChild(this._codeLink); - } - } - } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](this._relatedBlock); - this._editor.applyFontInfo(this._relatedBlock); - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_11__["isNonEmptyArray"])(relatedInformation)) { - const relatedInformationNode = this._relatedBlock.appendChild(document.createElement('div')); - relatedInformationNode.style.paddingTop = `${Math.floor(this._editor.getOption(51 /* lineHeight */) * 0.66)}px`; - this._lines += 1; - for (const related of relatedInformation) { - let container = document.createElement('div'); - let relatedResource = document.createElement('a'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](relatedResource, 'filename'); - relatedResource.innerText = `${Object(_base_common_labels_js__WEBPACK_IMPORTED_MODULE_10__["getBaseLabel"])(related.resource)}(${related.startLineNumber}, ${related.startColumn}): `; - relatedResource.title = Object(_base_common_labels_js__WEBPACK_IMPORTED_MODULE_10__["getPathLabel"])(related.resource, undefined); - this._relatedDiagnostics.set(relatedResource, related); - let relatedMessage = document.createElement('span'); - relatedMessage.innerText = related.message; - container.appendChild(relatedResource); - container.appendChild(relatedMessage); - this._lines += 1; - relatedInformationNode.appendChild(container); - } - } - const fontInfo = this._editor.getOption(36 /* fontInfo */); - const scrollWidth = Math.ceil(fontInfo.typicalFullwidthCharacterWidth * this._longestLineLength * 0.75); - const scrollHeight = fontInfo.lineHeight * this._lines; - this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight }); - } - layout(height, width) { - this._scrollable.getDomNode().style.height = `${height}px`; - this._scrollable.getDomNode().style.width = `${width}px`; - this._scrollable.setScrollDimensions({ width, height }); - } - getHeightInLines() { - return Math.min(17, this._lines); - } - getAriaLabel(marker) { - let severityLabel = ''; - switch (marker.severity) { - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Error: - severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('Error', "Error"); - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Warning: - severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('Warning', "Warning"); - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Info: - severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('Info', "Info"); - break; - case _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Hint: - severityLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('Hint', "Hint"); - break; - } - let ariaLabel = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('marker aria', "{0} at {1}. ", severityLabel, marker.startLineNumber + ':' + marker.startColumn); - const model = this._editor.getModel(); - if (model && (marker.startLineNumber <= model.getLineCount()) && (marker.startLineNumber >= 1)) { - const lineContent = model.getLineContent(marker.startLineNumber); - ariaLabel = `${lineContent}, ${ariaLabel}`; - } - return ariaLabel; - } -} -let MarkerNavigationWidget = class MarkerNavigationWidget extends _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__["PeekViewWidget"] { - constructor(editor, _themeService, _openerService, _menuService, instantiationService, _contextKeyService) { - super(editor, { showArrow: true, showFrame: true, isAccessible: true }, instantiationService); - this._themeService = _themeService; - this._openerService = _openerService; - this._menuService = _menuService; - this._contextKeyService = _contextKeyService; - this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._onDidSelectRelatedInformation = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_12__["Emitter"](); - this.onDidSelectRelatedInformation = this._onDidSelectRelatedInformation.event; - this._severity = _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Warning; - this._backgroundColor = _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].white; - this._applyTheme(_themeService.getColorTheme()); - this._callOnDispose.add(_themeService.onDidColorThemeChange(this._applyTheme.bind(this))); - this.create(); - } - _applyTheme(theme) { - this._backgroundColor = theme.getColor(editorMarkerNavigationBackground); - let colorId = editorMarkerNavigationError; - if (this._severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Warning) { - colorId = editorMarkerNavigationWarning; - } - else if (this._severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Info) { - colorId = editorMarkerNavigationInfo; - } - const frameColor = theme.getColor(colorId); - this.style({ - arrowColor: frameColor, - frameColor: frameColor, - headerBackgroundColor: this._backgroundColor, - primaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__["peekViewTitleForeground"]), - secondaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_13__["peekViewTitleInfoForeground"]) - }); // style() will trigger _applyStyles - } - _applyStyles() { - if (this._parentContainer) { - this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : ''; - } - super._applyStyles(); - } - dispose() { - this._callOnDispose.dispose(); - super.dispose(); - } - _fillHead(container) { - super._fillHead(container); - this._disposables.add(this._actionbarWidget.actionRunner.onDidBeforeRun(e => this.editor.focus())); - const actions = []; - const menu = this._menuService.createMenu(MarkerNavigationWidget.TitleMenu, this._contextKeyService); - Object(_platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_19__["createAndFillInActionBarActions"])(menu, undefined, actions); - this._actionbarWidget.push(actions, { label: false, icon: true, index: 0 }); - menu.dispose(); - } - _fillTitleIcon(container) { - this._icon = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]('')); - } - _getActionBarOptions() { - return Object.assign(Object.assign({}, super._getActionBarOptions()), { orientation: 0 /* HORIZONTAL */ }); - } - _fillBody(container) { - this._parentContainer = container; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](container, 'marker-widget'); - this._parentContainer.tabIndex = 0; - this._parentContainer.setAttribute('role', 'tooltip'); - this._container = document.createElement('div'); - container.appendChild(this._container); - this._message = new MessageWidget(this._container, this.editor, related => this._onDidSelectRelatedInformation.fire(related), this._openerService); - this._disposables.add(this._message); - } - show() { - throw new Error('call showAtMarker'); - } - showAtMarker(marker, markerIdx, markerCount) { - // update: - // * title - // * message - this._container.classList.remove('stale'); - this._message.update(marker); - // update frame color (only applied on 'show') - this._severity = marker.severity; - this._applyTheme(this._themeService.getColorTheme()); - // show - let range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].lift(marker); - const editorPosition = this.editor.getPosition(); - let position = editorPosition && range.containsPosition(editorPosition) ? editorPosition : range.getStartPosition(); - super.show(position, this.computeRequiredHeight()); - const model = this.editor.getModel(); - if (model) { - const detail = markerCount > 1 - ? _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('problems', "{0} of {1} problems", markerIdx, markerCount) - : _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('change', "{0} of {1} problem", markerIdx, markerCount); - this.setTitle(Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_14__["basename"])(model.uri), detail); - } - this._icon.className = `codicon ${_platform_severityIcon_common_severityIcon_js__WEBPACK_IMPORTED_MODULE_15__["SeverityIcon"].className(_platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].toSeverity(this._severity))}`; - this.editor.revealPositionNearTop(position, 0 /* Smooth */); - this.editor.focus(); - } - updateMarker(marker) { - this._container.classList.remove('stale'); - this._message.update(marker); - } - showStale() { - this._container.classList.add('stale'); - this._relayout(); - } - _doLayoutBody(heightInPixel, widthInPixel) { - super._doLayoutBody(heightInPixel, widthInPixel); - this._heightInPixel = heightInPixel; - this._message.layout(heightInPixel, widthInPixel); - this._container.style.height = `${heightInPixel}px`; - } - _onWidth(widthInPixel) { - this._message.layout(this._heightInPixel, widthInPixel); - } - _relayout() { - super._relayout(this.computeRequiredHeight()); - } - computeRequiredHeight() { - return 3 + this._message.getHeightInLines(); - } -}; -MarkerNavigationWidget.TitleMenu = new _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__["MenuId"]('gotoErrorTitleMenu'); -MarkerNavigationWidget = __decorate([ - __param(1, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["IThemeService"]), - __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__["IOpenerService"]), - __param(3, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__["IMenuService"]), - __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_20__["IInstantiationService"]), - __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__["IContextKeyService"]) -], MarkerNavigationWidget); - -// theming -let errorDefault = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["oneOf"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorErrorForeground"], _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorErrorBorder"]); -let warningDefault = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["oneOf"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorWarningForeground"], _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorWarningBorder"]); -let infoDefault = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["oneOf"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorInfoForeground"], _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["editorInfoBorder"]); -const editorMarkerNavigationError = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["registerColor"])('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); -const editorMarkerNavigationWarning = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["registerColor"])('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); -const editorMarkerNavigationInfo = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["registerColor"])('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hc: infoDefault }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorMarkerNavigationInfo', 'Editor marker navigation widget info color.')); -const editorMarkerNavigationBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["registerColor"])('editorMarkerNavigation.background', { dark: '#2D2D30', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].white, hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_7__["registerThemingParticipant"])((theme, collector) => { - const linkFg = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_6__["textLinkForeground"]); - if (linkFg) { - collector.addRule(`.monaco-editor .marker-widget a { color: ${linkFg}; }`); - collector.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${linkFg}; }`); - } -}); -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/markerNavigationService.js ***! - \***********************************************************************************************/ -/*! exports provided: MarkerCoordinate, MarkerList, IMarkerNavigationService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerCoordinate", function() { return MarkerCoordinate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerList", function() { return MarkerList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IMarkerNavigationService", function() { return IMarkerNavigationService; }); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } + for (var i = 0; i < keys.length; i++) { + conf[keys[i]] = cnf[keys[i]]; + } }; +var nodeDb = {}; +/** + * Returns the all the styles from classDef statements in the graph definition. + * @returns {object} classDef styles + */ +var getClasses = function getClasses(text) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].trace('Extracting classes'); + _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition + parser.parse(text); + return _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses(); +}; +var setupNode = function setupNode(g, parent, node, altFlag) { + // Add the node + if (node.id !== 'root') { + var shape = 'rect'; + if (node.start === true) { + shape = 'start'; + } + if (node.start === false) { + shape = 'end'; + } + if (node.type !== 'default') { + shape = node.type; + } + if (!nodeDb[node.id]) { + nodeDb[node.id] = { + id: node.id, + shape: shape, + description: node.id, + classes: 'statediagram-state' + }; + } // Build of the array of description strings accordinging + if (node.description) { + if (Array.isArray(nodeDb[node.id].description)) { + // There already is an array of strings,add to it + nodeDb[node.id].shape = 'rectWithTitle'; + nodeDb[node.id].description.push(node.description); + } else { + if (nodeDb[node.id].description.length > 0) { + // if there is a description already transformit to an array + nodeDb[node.id].shape = 'rectWithTitle'; -class MarkerCoordinate { - constructor(marker, index, total) { - this.marker = marker; - this.index = index; - this.total = total; - } -} -let MarkerList = class MarkerList { - constructor(resourceFilter, _markerService) { - this._markerService = _markerService; - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._dispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._markers = []; - this._nextIdx = -1; - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__["URI"].isUri(resourceFilter)) { - this._resourceFilter = uri => uri.toString() === resourceFilter.toString(); - } - else if (resourceFilter) { - this._resourceFilter = resourceFilter; - } - const updateMarker = () => { - this._markers = this._markerService.read({ - resource: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_1__["URI"].isUri(resourceFilter) ? resourceFilter : undefined, - severities: _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Error | _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Warning | _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].Info - }); - if (typeof resourceFilter === 'function') { - this._markers = this._markers.filter(m => this._resourceFilter(m.resource)); - } - this._markers.sort(MarkerList._compareMarker); - }; - updateMarker(); - this._dispoables.add(_markerService.onMarkerChanged(uris => { - if (!this._resourceFilter || uris.some(uri => this._resourceFilter(uri))) { - updateMarker(); - this._nextIdx = -1; - this._onDidChange.fire(); - } - })); - } - dispose() { - this._dispoables.dispose(); - this._onDidChange.dispose(); - } - matches(uri) { - if (!this._resourceFilter && !uri) { - return true; - } - if (!this._resourceFilter || !uri) { - return false; - } - return this._resourceFilter(uri); - } - get selected() { - const marker = this._markers[this._nextIdx]; - return marker && new MarkerCoordinate(marker, this._nextIdx + 1, this._markers.length); - } - _initIdx(model, position, fwd) { - let found = false; - let idx = this._markers.findIndex(marker => marker.resource.toString() === model.uri.toString()); - if (idx < 0) { - idx = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["binarySearch"])(this._markers, { resource: model.uri }, (a, b) => Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["compare"])(a.resource.toString(), b.resource.toString())); - if (idx < 0) { - idx = ~idx; - } - } - for (let i = idx; i < this._markers.length; i++) { - let range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].lift(this._markers[i]); - if (range.isEmpty()) { - const word = model.getWordAtPosition(range.getStartPosition()); - if (word) { - range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](range.startLineNumber, word.startColumn, range.startLineNumber, word.endColumn); - } - } - if (position && (range.containsPosition(position) || position.isBeforeOrEqual(range.getStartPosition()))) { - this._nextIdx = i; - found = true; - break; - } - if (this._markers[i].resource.toString() !== model.uri.toString()) { - break; - } - } - if (!found) { - // after the last change - this._nextIdx = fwd ? 0 : this._markers.length - 1; - } - if (this._nextIdx < 0) { - this._nextIdx = this._markers.length - 1; - } - } - resetIndex() { - this._nextIdx = -1; - } - move(fwd, model, position) { - if (this._markers.length === 0) { - return false; - } - let oldIdx = this._nextIdx; - if (this._nextIdx === -1) { - this._initIdx(model, position, fwd); - } - else if (fwd) { - this._nextIdx = (this._nextIdx + 1) % this._markers.length; - } - else if (!fwd) { - this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length; - } - if (oldIdx !== this._nextIdx) { - return true; - } - return false; - } - find(uri, position) { - let idx = this._markers.findIndex(marker => marker.resource.toString() === uri.toString()); - if (idx < 0) { - return undefined; - } - for (; idx < this._markers.length; idx++) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].containsPosition(this._markers[idx], position)) { - return new MarkerCoordinate(this._markers[idx], idx + 1, this._markers.length); - } - } - return undefined; - } - static _compareMarker(a, b) { - let res = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["compare"])(a.resource.toString(), b.resource.toString()); - if (res === 0) { - res = _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["MarkerSeverity"].compare(a.severity, b.severity); - } - if (res === 0) { - res = _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].compareRangesUsingStarts(a, b); + if (nodeDb[node.id].description === node.id) { + // If the previous description was the is, remove it + nodeDb[node.id].description = [node.description]; + } else { + nodeDb[node.id].description = [nodeDb[node.id].description, node.description]; + } + } else { + nodeDb[node.id].shape = 'rect'; + nodeDb[node.id].description = node.description; } - return res; - } -}; -MarkerList = __decorate([ - __param(1, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["IMarkerService"]) -], MarkerList); + } + } // Save data for description and group so that for instance a statement without description overwrites + // one with description + // group -const IMarkerNavigationService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_7__["createDecorator"])('IMarkerNavigationService'); -let MarkerNavigationService = class MarkerNavigationService { - constructor(_markerService) { - this._markerService = _markerService; - this._provider = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_9__["LinkedList"](); - } - getMarkerList(resource) { - for (let provider of this._provider) { - const result = provider.getMarkerList(resource); - if (result) { - return result; - } - } - // default - return new MarkerList(resource, this._markerService); + + if (!nodeDb[node.id].type && node.doc) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Setting cluser for ', node.id); + nodeDb[node.id].type = 'group'; + nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle'; + nodeDb[node.id].classes = nodeDb[node.id].classes + ' ' + (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster'); } -}; -MarkerNavigationService = __decorate([ - __param(0, _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_0__["IMarkerService"]) -], MarkerNavigationService); -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_8__["registerSingleton"])(IMarkerNavigationService, MarkerNavigationService, true); + var nodeData = { + labelStyle: '', + shape: nodeDb[node.id].shape, + labelText: nodeDb[node.id].description, + classes: nodeDb[node.id].classes, + //classStr, + style: '', + //styles.style, + id: node.id, + domId: 'state-' + node.id + '-' + cnt, + type: nodeDb[node.id].type, + padding: 15 //getConfig().flowchart.padding -/***/ }), + }; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css ***! - \**********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (node.note) { + // Todo: set random id + var noteData = { + labelStyle: '', + shape: 'note', + labelText: node.note.text, + classes: 'statediagram-note', + //classStr, + style: '', + //styles.style, + id: node.id + '----note', + domId: 'state-' + node.id + '----note-' + cnt, + type: nodeDb[node.id].type, + padding: 15 //getConfig().flowchart.padding -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./gotoErrorWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css"); + }; + var groupData = { + labelStyle: '', + shape: 'noteGroup', + labelText: node.note.text, + classes: nodeDb[node.id].classes, + //classStr, + style: '', + //styles.style, + id: node.id + '----parent', + domId: 'state-' + node.id + '----parent-' + cnt, + type: 'group', + padding: 0 //getConfig().flowchart.padding - + }; + cnt++; + g.setNode(node.id + '----parent', groupData); + g.setNode(noteData.id, noteData); + g.setNode(node.id, nodeData); + g.setParent(node.id, node.id + '----parent'); + g.setParent(noteData.id, node.id + '----parent'); + var from = node.id; + var to = noteData.id; -var options = {}; + if (node.note.position === 'left of') { + from = noteData.id; + to = node.id; + } -options.insert = "head"; -options.singleton = false; + g.setEdge(from, to, { + arrowhead: 'none', + arrowType: '', + style: 'fill:none', + labelStyle: '', + classes: 'transition note-edge', + arrowheadStyle: 'fill: #333', + labelpos: 'c', + labelType: 'text', + thickness: 'normal' + }); + } else { + g.setNode(node.id, nodeData); + } + } + + if (parent) { + if (parent.id !== 'root') { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Setting node ', node.id, ' to be child of its parent ', parent.id); + g.setParent(node.id, parent.id); + } + } + + if (node.doc) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Adding nodes children '); + setupDoc(g, node, node.doc, !altFlag); + } +}; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +var cnt = 0; +var setupDoc = function setupDoc(g, parent, doc, altFlag) { + cnt = 0; + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].trace('items', doc); + doc.forEach(function (item) { + if (item.stmt === 'state' || item.stmt === 'default') { + setupNode(g, parent, item, altFlag); + } else if (item.stmt === 'relation') { + setupNode(g, parent, item.state1, altFlag); + setupNode(g, parent, item.state2, altFlag); + var edgeData = { + id: 'edge' + cnt, + arrowhead: 'normal', + arrowTypeEnd: 'arrow_barb', + style: 'fill:none', + labelStyle: '', + label: item.description, + arrowheadStyle: 'fill: #333', + labelpos: 'c', + labelType: 'text', + thickness: 'normal', + classes: 'transition' + }; + var startId = item.state1.id; + var endId = item.state2.id; + g.setEdge(startId, endId, edgeData, cnt); + cnt++; + } + }); +}; +/** + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_gotoErrorWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +var draw = function draw(text, id) { + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info('Drawing state diagram (v2)', id); + _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear(); + nodeDb = {}; + var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser; + parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition -/***/ }), + parser.parse(text); // Fetch the default direction, use TD if none was found -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/documentSymbols.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/documentSymbols.js ***! - \****************************************************************************************/ -/*! exports provided: getDocumentSymbols */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var dir = _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection(); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDocumentSymbols", function() { return getDocumentSymbols; }); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../documentSymbols/outlineModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + if (typeof dir === 'undefined') { + dir = 'LR'; + } + var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state; + var nodeSpacing = conf.nodeSpacing || 50; + var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph + var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: 'TB', + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function () { + return {}; + }); + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); + _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].extract(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2()); + setupNode(g, undefined, _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].getRootDocV2(), true); // Set up an SVG group so that we can translate the final graph. + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])("[id=\"".concat(id, "\"]")); // Run the renderer. This is what draws the final graph. + var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__["select"])('#' + id + ' g'); + Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__["render"])(element, g, ['barb'], 'statediagram', id); + var padding = 8; + var bounds = svg.node().getBBox(); + var width = bounds.width + padding * 2; + var height = bounds.height + padding * 2; // Zoom in a bit + svg.attr('class', 'statediagram'); + var svgBounds = svg.node().getBBox(); + Object(_utils__WEBPACK_IMPORTED_MODULE_7__["configureSvgSize"])(svg, height, width * 1.75, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding + var vBox = "".concat(svgBounds.x - padding, " ").concat(svgBounds.y - padding, " ").concat(width, " ").concat(height); + _logger__WEBPACK_IMPORTED_MODULE_6__["log"].debug("viewBox ".concat(vBox)); + svg.attr('viewBox', vBox); // Add label rects for non html labels + if (!conf.htmlLabels) { + var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (var k = 0; k < labels.length; k++) { + var label = labels[k]; // Get dimensions of label -function getDocumentSymbols(document, flat, token) { - return __awaiter(this, void 0, void 0, function* () { - const model = yield _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_5__["OutlineModel"].create(document, token); - const roots = []; - for (const child of model.children.values()) { - if (child instanceof _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_5__["OutlineElement"]) { - roots.push(child.symbol); - } - else { - roots.push(..._base_common_iterator_js__WEBPACK_IMPORTED_MODULE_8__["Iterable"].map(child.children.values(), child => child.symbol)); - } - } - let flatEntries = []; - if (token.isCancellationRequested) { - return flatEntries; - } - if (flat) { - flatten(flatEntries, roots, ''); - } - else { - flatEntries = roots; - } - return flatEntries.sort(compareEntriesUsingStart); - }); -} -function compareEntriesUsingStart(a, b) { - return _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].compareRangesUsingStarts(a.range, b.range); -} -function flatten(bucket, entries, overrideContainerLabel) { - for (let entry of entries) { - bucket.push({ - kind: entry.kind, - tags: entry.tags, - name: entry.name, - detail: entry.detail, - containerName: entry.containerName || overrideContainerLabel, - range: entry.range, - selectionRange: entry.selectionRange, - children: undefined, - }); - if (entry.children) { - flatten(bucket, entry.children, entry.name); - } + var dim = label.getBBox(); + var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); + rect.setAttribute('rx', 0); + rect.setAttribute('ry', 0); + rect.setAttribute('width', dim.width); + rect.setAttribute('height', dim.height); + label.insertBefore(rect, label.firstChild); } -} -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__["CommandsRegistry"].registerCommand('_executeDocumentSymbolProvider', function (accessor, ...args) { - return __awaiter(this, void 0, void 0, function* () { - const [resource] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_7__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].isUri(resource)); - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_2__["IModelService"]).getModel(resource); - if (model) { - return getDocumentSymbols(model, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None); - } - const reference = yield accessor.get(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_4__["ITextModelService"]).createModelReference(resource); - try { - return yield getDocumentSymbols(reference.object.textEditorModel, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None); - } - finally { - reference.dispose(); - } - }); + } +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + getClasses: getClasses, + draw: draw }); - /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js ***! - \*************************************************************************************/ -/*! exports provided: DefinitionAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefinitionAction", function() { return DefinitionAction; }); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../message/messageController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js"); -/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../peekView/peekView.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js"); -/* harmony import */ var _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./peek/referencesController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js"); -/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./referencesModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./goToSymbol.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _symbolNavigation_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./symbolNavigation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../browser/widget/embeddedCodeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var _a, _b, _c, _d, _e, _f, _g, _h; - - - - - +/***/ "./src/diagrams/state/stateRenderer.js": +/*!*********************************************!*\ + !*** ./src/diagrams/state/stateRenderer.js ***! + \*********************************************/ +/*! exports provided: setConf, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "dagre"); +/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "graphlib"); +/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js"); +/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js"); +/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js"); +/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison"); +/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shapes */ "./src/diagrams/state/shapes.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils */ "./src/utils.js"); + // import idCache from './id-cache'; +_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"]; // TODO Move conf object to main conf in mermaidAPI +var conf; +var transformationLog = {}; +var setConf = function setConf() {}; // Todo optimize +/** + * Setup arrow head and define the marker. The result is appended to the svg. + */ +var insertMarkers = function insertMarkers(elem) { + elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); +}; +/** + * Draws a flowchart in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ +var draw = function draw(text, id) { + conf = Object(_config__WEBPACK_IMPORTED_MODULE_8__["getConfig"])().state; + _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy.clear(); + _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].parse(text); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found + var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])("[id='".concat(id, "']")); + insertMarkers(diagram); // Layout graph, Create a new directed graph + var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ + multigraph: true, + compound: true, + // acyclicer: 'greedy', + rankdir: 'RL' // ranksep: '20' + }); // Default to assigning a new object as a label for each new edge. + graph.setDefaultEdgeLabel(function () { + return {}; + }); + var rootDoc = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRootDoc(); + renderDoc(rootDoc, diagram, undefined, false); + var padding = conf.padding; + var bounds = diagram.node().getBBox(); + var width = bounds.width + padding * 2; + var height = bounds.height + padding * 2; // zoom in a bit + var svgWidth = width * 1.75; + Object(_utils__WEBPACK_IMPORTED_MODULE_9__["configureSvgSize"])(diagram, height, svgWidth, conf.useMaxWidth); + diagram.attr('viewBox', "".concat(bounds.x - conf.padding, " ").concat(bounds.y - conf.padding, " ") + width + ' ' + height); +}; +var getLabelWidth = function getLabelWidth(text) { + return text ? text.length * conf.fontSizeFactor : 1; +}; +var renderDoc = function renderDoc(doc, diagram, parentId, altBkg) { + // // Layout graph, Create a new directed graph + var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({ + compound: true, + multigraph: true + }); + var i; + var edgeFreeDoc = true; -_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuRegistry"].appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContext, { - submenu: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('peek.submenu', "Peek"), - group: 'navigation', - order: 100 -}); -class SymbolNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["EditorAction"] { - constructor(configuration, opts) { - super(opts); - this._configuration = configuration; - } - run(accessor, editor) { - if (!editor.hasModel()) { - return Promise.resolve(undefined); - } - const notificationService = accessor.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_18__["INotificationService"]); - const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]); - const progressService = accessor.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_19__["IEditorProgressService"]); - const symbolNavService = accessor.get(_symbolNavigation_js__WEBPACK_IMPORTED_MODULE_23__["ISymbolNavigationService"]); - const model = editor.getModel(); - const pos = editor.getPosition(); - const cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_22__["EditorStateCancellationTokenSource"](editor, 1 /* Value */ | 4 /* Position */); - const promise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__["raceCancellation"])(this._getLocationModel(model, pos, cts.token), cts.token).then((references) => __awaiter(this, void 0, void 0, function* () { - if (!references || cts.token.isCancellationRequested) { - return; - } - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(references.ariaMessage); - let altAction; - if (references.referenceAt(model.uri, pos)) { - const altActionId = this._getAlternativeCommand(editor); - if (altActionId !== this.id) { - altAction = editor.getAction(altActionId); - } - } - const referenceCount = references.references.length; - if (referenceCount === 0) { - // no result -> show message - if (!this._configuration.muteMessage) { - const info = model.getWordAtPosition(pos); - _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__["MessageController"].get(editor).showMessage(this._getNoResultFoundMessage(info), pos); - } - } - else if (referenceCount === 1 && altAction) { - // already at the only result, run alternative - altAction.run(); - } - else { - // normal results handling - return this._onResult(editorService, symbolNavService, editor, references); - } - }), (err) => { - // report an error - notificationService.error(err); - }).finally(() => { - cts.dispose(); - }); - progressService.showWhile(promise, 250); - return promise; - } - _onResult(editorService, symbolNavService, editor, model) { - return __awaiter(this, void 0, void 0, function* () { - const gotoLocation = this._getGoToPreference(editor); - if (!(editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_28__["EmbeddedCodeEditorWidget"]) && (this._configuration.openInPeek || (gotoLocation === 'peek' && model.references.length > 1))) { - this._openInPeek(editor, model); - } - else { - const next = model.firstReference(); - const peek = model.references.length > 1 && gotoLocation === 'gotoAndPeek'; - const targetEditor = yield this._openReference(editor, editorService, next, this._configuration.openToSide, !peek); - if (peek && targetEditor) { - this._openInPeek(targetEditor, model); - } - else { - model.dispose(); - } - // keep remaining locations around when using - // 'goto'-mode - if (gotoLocation === 'goto') { - symbolNavService.put(next); - } - } - }); - } - _openReference(editor, editorService, reference, sideBySide, highlight) { - return __awaiter(this, void 0, void 0, function* () { - // range is the target-selection-range when we have one - // and the fallback is the 'full' range - let range = undefined; - if (Object(_common_modes_js__WEBPACK_IMPORTED_MODULE_10__["isLocationLink"])(reference)) { - range = reference.targetSelectionRange; - } - if (!range) { - range = reference.range; - } - const targetEditor = yield editorService.openCodeEditor({ - resource: reference.uri, - options: { - selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].collapseToStart(range), - selectionRevealType: 3 /* NearTopIfOutsideViewport */ - } - }, editor, sideBySide); - if (!targetEditor) { - return undefined; - } - if (highlight) { - const modelNow = targetEditor.getModel(); - const ids = targetEditor.deltaDecorations([], [{ range, options: { className: 'symbolHighlight' } }]); - setTimeout(() => { - if (targetEditor.getModel() === modelNow) { - targetEditor.deltaDecorations(ids, []); - } - }, 350); - } - return targetEditor; - }); - } - _openInPeek(target, model) { - let controller = _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__["ReferencesController"].get(target); - if (controller && target.hasModel()) { - controller.toggleWidget(target.getSelection(), Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__["createCancelablePromise"])(_ => Promise.resolve(model)), this._configuration.openInPeek); - } - else { - model.dispose(); - } - } -} -//#region --- DEFINITION -class DefinitionAction extends SymbolNavigationAction { - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getDefinitionsAtPosition"])(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('def.title', 'Definitions')); - }); - } - _getNoResultFoundMessage(info) { - return info && info.word - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('noResultWord', "No definition found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('generic.noResults', "No definition found"); - } - _getAlternativeCommand(editor) { - return editor.getOption(43 /* gotoLocation */).alternativeDefinitionCommand; - } - _getGoToPreference(editor) { - return editor.getOption(43 /* gotoLocation */).multipleDefinitions; - } -} -const goToDefinitionKb = _base_common_platform_js__WEBPACK_IMPORTED_MODULE_3__["isWeb"] && !_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_24__["isStandalone"] - ? 2048 /* CtrlCmd */ | 70 /* F12 */ - : 70 /* F12 */; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_a = class GoToDefinitionAction extends DefinitionAction { - constructor() { - super({ - openToSide: false, - openInPeek: false, - muteMessage: false - }, { - id: GoToDefinitionAction.id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.goToDecl.label', "Go to Definition"), - alias: 'Go to Definition', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: goToDefinitionKb, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: 'navigation', - order: 1.1 - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].MenubarGoMenu, - group: '4_symbol_nav', - order: 2, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Definition") - } - }); - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommandAlias('editor.action.goToDeclaration', GoToDefinitionAction.id); - } - }, - _a.id = 'editor.action.revealDefinition', - _a)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_b = class OpenDefinitionToSideAction extends DefinitionAction { - constructor() { - super({ - openToSide: true, - openInPeek: false, - muteMessage: false - }, { - id: OpenDefinitionToSideAction.id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.goToDeclToSide.label', "Open Definition to the Side"), - alias: 'Open Definition to the Side', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, goToDefinitionKb), - weight: 100 /* EditorContrib */ - } - }); - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommandAlias('editor.action.openDeclarationToTheSide', OpenDefinitionToSideAction.id); - } - }, - _b.id = 'editor.action.revealDefinitionAside', - _b)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_c = class PeekDefinitionAction extends DefinitionAction { - constructor() { - super({ - openToSide: false, - openInPeek: true, - muteMessage: false - }, { - id: PeekDefinitionAction.id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.previewDecl.label', "Peek Definition"), - alias: 'Peek Definition', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasDefinitionProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 70 /* F12 */, - linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 68 /* F10 */ }, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - group: 'peek', - order: 2 - } - }); - _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommandAlias('editor.action.previewDeclaration', PeekDefinitionAction.id); - } - }, - _c.id = 'editor.action.peekDefinition', - _c)); -//#endregion -//#region --- DECLARATION -class DeclarationAction extends SymbolNavigationAction { - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getDeclarationsAtPosition"])(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('decl.title', 'Declarations')); - }); - } - _getNoResultFoundMessage(info) { - return info && info.word - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('decl.noResultWord', "No declaration found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('decl.generic.noResults', "No declaration found"); - } - _getAlternativeCommand(editor) { - return editor.getOption(43 /* gotoLocation */).alternativeDeclarationCommand; - } - _getGoToPreference(editor) { - return editor.getOption(43 /* gotoLocation */).multipleDeclarations; - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_d = class GoToDeclarationAction extends DeclarationAction { - constructor() { - super({ - openToSide: false, - openInPeek: false, - muteMessage: false - }, { - id: GoToDeclarationAction.id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.goToDeclaration.label', "Go to Declaration"), - alias: 'Go to Declaration', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasDeclarationProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - contextMenuOpts: { - group: 'navigation', - order: 1.3 - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].MenubarGoMenu, - group: '4_symbol_nav', - order: 3, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]({ key: 'miGotoDeclaration', comment: ['&& denotes a mnemonic'] }, "Go to &&Declaration") - }, - }); - } - _getNoResultFoundMessage(info) { - return info && info.word - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('decl.noResultWord', "No declaration found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('decl.generic.noResults', "No declaration found"); - } - }, - _d.id = 'editor.action.revealDeclaration', - _d)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(class PeekDeclarationAction extends DeclarationAction { - constructor() { - super({ - openToSide: false, - openInPeek: true, - muteMessage: false - }, { - id: 'editor.action.peekDeclaration', - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.peekDecl.label', "Peek Declaration"), - alias: 'Peek Declaration', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasDeclarationProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - contextMenuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - group: 'peek', - order: 3 - } - }); - } -}); -//#endregion -//#region --- TYPE DEFINITION -class TypeDefinitionAction extends SymbolNavigationAction { - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getTypeDefinitionsAtPosition"])(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('typedef.title', 'Type Definitions')); - }); - } - _getNoResultFoundMessage(info) { - return info && info.word - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('goToTypeDefinition.noResultWord', "No type definition found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('goToTypeDefinition.generic.noResults', "No type definition found"); - } - _getAlternativeCommand(editor) { - return editor.getOption(43 /* gotoLocation */).alternativeTypeDefinitionCommand; - } - _getGoToPreference(editor) { - return editor.getOption(43 /* gotoLocation */).multipleTypeDefinitions; - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_e = class GoToTypeDefinitionAction extends TypeDefinitionAction { - constructor() { - super({ - openToSide: false, - openInPeek: false, - muteMessage: false - }, { - id: GoToTypeDefinitionAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.goToTypeDefinition.label', "Go to Type Definition"), - alias: 'Go to Type Definition', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasTypeDefinitionProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: 0, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: 'navigation', - order: 1.4 - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].MenubarGoMenu, - group: '4_symbol_nav', - order: 3, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Type Definition") - } - }); - } - }, - _e.ID = 'editor.action.goToTypeDefinition', - _e)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_f = class PeekTypeDefinitionAction extends TypeDefinitionAction { - constructor() { - super({ - openToSide: false, - openInPeek: true, - muteMessage: false - }, { - id: PeekTypeDefinitionAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.peekTypeDefinition.label', "Peek Type Definition"), - alias: 'Peek Type Definition', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasTypeDefinitionProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - contextMenuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - group: 'peek', - order: 4 - } - }); - } - }, - _f.ID = 'editor.action.peekTypeDefinition', - _f)); -//#endregion -//#region --- IMPLEMENTATION -class ImplementationAction extends SymbolNavigationAction { - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getImplementationsAtPosition"])(model, position, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('impl.title', 'Implementations')); - }); - } - _getNoResultFoundMessage(info) { - return info && info.word - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('goToImplementation.noResultWord', "No implementation found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('goToImplementation.generic.noResults', "No implementation found"); - } - _getAlternativeCommand(editor) { - return editor.getOption(43 /* gotoLocation */).alternativeImplementationCommand; - } - _getGoToPreference(editor) { - return editor.getOption(43 /* gotoLocation */).multipleImplementations; - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_g = class GoToImplementationAction extends ImplementationAction { - constructor() { - super({ - openToSide: false, - openInPeek: false, - muteMessage: false - }, { - id: GoToImplementationAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.goToImplementation.label', "Go to Implementations"), - alias: 'Go to Implementations', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasImplementationProvider, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 70 /* F12 */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].MenubarGoMenu, - group: '4_symbol_nav', - order: 4, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, "Go to &&Implementations") - }, - contextMenuOpts: { - group: 'navigation', - order: 1.45 - } - }); - } - }, - _g.ID = 'editor.action.goToImplementation', - _g)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])((_h = class PeekImplementationAction extends ImplementationAction { - constructor() { - super({ - openToSide: false, - openInPeek: true, - muteMessage: false - }, { - id: PeekImplementationAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('actions.peekImplementation.label', "Peek Implementations"), - alias: 'Peek Implementations', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasImplementationProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 70 /* F12 */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - group: 'peek', - order: 5 - } - }); - } - }, - _h.ID = 'editor.action.peekImplementation', - _h)); -//#endregion -//#region --- REFERENCES -class ReferencesAction extends SymbolNavigationAction { - _getNoResultFoundMessage(info) { - return info - ? _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('references.no', "No references found for '{0}'", info.word) - : _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('references.noGeneric', "No references found"); - } - _getAlternativeCommand(editor) { - return editor.getOption(43 /* gotoLocation */).alternativeReferenceCommand; - } - _getGoToPreference(editor) { - return editor.getOption(43 /* gotoLocation */).multipleReferences; - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(class GoToReferencesAction extends ReferencesAction { - constructor() { - super({ - openToSide: false, - openInPeek: false, - muteMessage: false - }, { - id: 'editor.action.goToReferences', - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('goToReferences.label', "Go to References"), - alias: 'Go to References', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasReferenceProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 70 /* F12 */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: 'navigation', - order: 1.45 - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].MenubarGoMenu, - group: '4_symbol_nav', - order: 5, - title: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]({ key: 'miGotoReference', comment: ['&& denotes a mnemonic'] }, "Go to &&References") - }, - }); - } - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getReferencesAtPosition"])(model, position, true, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('ref.title', 'References')); - }); - } -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(class PeekReferencesAction extends ReferencesAction { - constructor() { - super({ - openToSide: false, - openInPeek: true, - muteMessage: false - }, { - id: 'editor.action.referenceSearch.trigger', - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('references.action.label', "Peek References"), - alias: 'Peek References', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasReferenceProvider, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - contextMenuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_16__["MenuId"].EditorContextPeek, - group: 'peek', - order: 6 - } - }); - } - _getLocationModel(model, position, token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](yield Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getReferencesAtPosition"])(model, position, false, token), _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('ref.title', 'References')); - }); - } -}); -//#endregion -//#region --- GENERIC goto symbols command -class GenericGoToLocationAction extends SymbolNavigationAction { - constructor(config, _references, _gotoMultipleBehaviour) { - super(config, { - id: 'editor.action.goToLocation', - label: _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('label.generic', "Go To Any Symbol"), - alias: 'Go To Any Symbol', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyExpr"].and(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_12__["PeekContext"].notInPeekEditor, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].isInWalkThroughSnippet.toNegated()), - }); - this._references = _references; - this._gotoMultipleBehaviour = _gotoMultipleBehaviour; - } - _getLocationModel(_model, _position, _token) { - return __awaiter(this, void 0, void 0, function* () { - return new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](this._references, _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('generic.title', 'Locations')); - }); - } - _getNoResultFoundMessage(info) { - return info && _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('generic.noResult', "No results for '{0}'", info.word) || ''; - } - _getGoToPreference(editor) { - var _a; - return (_a = this._gotoMultipleBehaviour) !== null && _a !== void 0 ? _a : editor.getOption(43 /* gotoLocation */).multipleReferences; - } - _getAlternativeCommand() { return ''; } -} -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommand({ - id: 'editor.action.goToLocations', - description: { - description: 'Go to locations from a position in a file', - args: [ - { name: 'uri', description: 'The text document in which to start', constraint: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__["URI"] }, - { name: 'position', description: 'The position at which to start', constraint: _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].isIPosition }, - { name: 'locations', description: 'An array of locations.', constraint: Array }, - { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' }, - { name: 'noResultsMessage', description: 'Human readable message that shows when locations is empty.' }, - ] - }, - handler: (accessor, resource, position, references, multiple, noResultsMessage, openInPeek) => __awaiter(void 0, void 0, void 0, function* () { - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__["URI"].isUri(resource)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].isIPosition(position)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(Array.isArray(references)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(typeof multiple === 'undefined' || typeof multiple === 'string'); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(typeof openInPeek === 'undefined' || typeof openInPeek === 'boolean'); - const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]); - const editor = yield editorService.openCodeEditor({ resource }, editorService.getFocusedCodeEditor()); - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__["isCodeEditor"])(editor)) { - editor.setPosition(position); - editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */); - return editor.invokeWithinContext(accessor => { - const command = new class extends GenericGoToLocationAction { - _getNoResultFoundMessage(info) { - return noResultsMessage || super._getNoResultFoundMessage(info); - } - }({ - muteMessage: !Boolean(noResultsMessage), - openInPeek: Boolean(openInPeek), - openToSide: false - }, references, multiple); - accessor.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_26__["IInstantiationService"]).invokeFunction(command.run.bind(command), editor); - }); - } - }) -}); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommand({ - id: 'editor.action.peekLocations', - description: { - description: 'Peek locations from a position in a file', - args: [ - { name: 'uri', description: 'The text document in which to start', constraint: _base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__["URI"] }, - { name: 'position', description: 'The position at which to start', constraint: _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].isIPosition }, - { name: 'locations', description: 'An array of locations.', constraint: Array }, - { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' }, - ] - }, - handler: (accessor, resource, position, references, multiple) => __awaiter(void 0, void 0, void 0, function* () { - accessor.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["ICommandService"]).executeCommand('editor.action.goToLocations', resource, position, references, multiple, undefined, true); - }) -}); -//#endregion -//#region --- REFERENCE search special commands -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommand({ - id: 'editor.action.findReferences', - handler: (accessor, resource, position) => { - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_25__["URI"].isUri(resource)); - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_27__["assertType"])(_common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].isIPosition(position)); - const codeEditorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_6__["ICodeEditorService"]); - return codeEditorService.openCodeEditor({ resource }, codeEditorService.getFocusedCodeEditor()).then(control => { - if (!Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__["isCodeEditor"])(control) || !control.hasModel()) { - return undefined; - } - const controller = _peek_referencesController_js__WEBPACK_IMPORTED_MODULE_13__["ReferencesController"].get(control); - if (!controller) { - return undefined; - } - const references = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_1__["createCancelablePromise"])(token => Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_20__["getReferencesAtPosition"])(control.getModel(), _common_core_position_js__WEBPACK_IMPORTED_MODULE_7__["Position"].lift(position), false, token).then(references => new _referencesModel_js__WEBPACK_IMPORTED_MODULE_14__["ReferencesModel"](references, _nls_js__WEBPACK_IMPORTED_MODULE_15__["localize"]('ref.title', 'References')))); - const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"](position.lineNumber, position.column, position.lineNumber, position.column); - return Promise.resolve(controller.toggleWidget(range, references, false)); - }); + for (i = 0; i < doc.length; i++) { + if (doc[i].stmt === 'relation') { + edgeFreeDoc = false; + break; } -}); -// use NEW command -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_21__["CommandsRegistry"].registerCommandAlias('editor.action.showReferences', 'editor.action.peekLocations'); -//#endregion - + } // Set an object for the graph label -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js ***! - \***********************************************************************************/ -/*! exports provided: getDefinitionsAtPosition, getDeclarationsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition, getReferencesAtPosition */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (parentId) graph.setGraph({ + rankdir: 'LR', + multigraph: true, + compound: true, + // acyclicer: 'greedy', + ranker: 'tight-tree', + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + isMultiGraph: true // ranksep: 5, + // nodesep: 1 -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefinitionsAtPosition", function() { return getDefinitionsAtPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDeclarationsAtPosition", function() { return getDeclarationsAtPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getImplementationsAtPosition", function() { return getImplementationsAtPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTypeDefinitionsAtPosition", function() { return getTypeDefinitionsAtPosition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getReferencesAtPosition", function() { return getReferencesAtPosition; }); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + });else { + graph.setGraph({ + rankdir: 'TB', + multigraph: true, + compound: true, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + ranker: 'tight-tree', + // ranker: 'network-simplex' + isMultiGraph: true }); -}; + } // Default to assigning a new object as a label for each new edge. + graph.setDefaultEdgeLabel(function () { + return {}; + }); + _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].extract(doc); + var states = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getStates(); + var relations = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations(); + var keys = Object.keys(states); + var first = true; + for (var _i = 0; _i < keys.length; _i++) { + var stateDef = states[keys[_i]]; + if (parentId) { + stateDef.parentId = parentId; + } -function getLocationLinks(model, position, registry, provide) { - const provider = registry.ordered(model); - // get results - const promises = provider.map((provider) => { - return Promise.resolve(provide(provider, model, position)).then(undefined, err => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedExternalError"])(err); - return undefined; - }); - }); - return Promise.all(promises).then(values => { - const result = []; - for (let value of values) { - if (Array.isArray(value)) { - result.push(...value); - } - else if (value) { - result.push(value); - } - } - return result; - }); -} -function getDefinitionsAtPosition(model, position, token) { - return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["DefinitionProviderRegistry"], (provider, model, position) => { - return provider.provideDefinition(model, position, token); - }); -} -function getDeclarationsAtPosition(model, position, token) { - return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["DeclarationProviderRegistry"], (provider, model, position) => { - return provider.provideDeclaration(model, position, token); - }); -} -function getImplementationsAtPosition(model, position, token) { - return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["ImplementationProviderRegistry"], (provider, model, position) => { - return provider.provideImplementation(model, position, token); - }); -} -function getTypeDefinitionsAtPosition(model, position, token) { - return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TypeDefinitionProviderRegistry"], (provider, model, position) => { - return provider.provideTypeDefinition(model, position, token); - }); -} -function getReferencesAtPosition(model, position, compact, token) { - return getLocationLinks(model, position, _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["ReferenceProviderRegistry"], (provider, model, position) => __awaiter(this, void 0, void 0, function* () { - const result = yield provider.provideReferences(model, position, { includeDeclaration: true }, token); - if (!compact || !result || result.length !== 2) { - return result; - } - const resultWithoutDeclaration = yield provider.provideReferences(model, position, { includeDeclaration: false }, token); - if (resultWithoutDeclaration && resultWithoutDeclaration.length === 1) { - return resultWithoutDeclaration; - } - return result; - })); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeDefinitionProvider', (model, position) => getDefinitionsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeDeclarationProvider', (model, position) => getDeclarationsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeImplementationProvider', (model, position) => getImplementationsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeTypeDefinitionProvider', (model, position) => getTypeDefinitionsAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeReferenceProvider', (model, position) => getReferencesAtPosition(model, position, false, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None)); + var node = void 0; + if (stateDef.doc) { + var sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup'); + node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg); -/***/ }), + if (first) { + // first = false; + sub = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["addTitleAndBox"])(sub, stateDef, altBkg); + var boxBounds = sub.node().getBBox(); + node.width = boxBounds.width; + node.height = boxBounds.height + conf.padding / 2; + transformationLog[stateDef.id] = { + y: conf.compositTitleSize + }; + } else { + // sub = addIdAndBox(sub, stateDef); + var _boxBounds = sub.node().getBBox(); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js ***! - \**********************************************************************************************/ -/*! exports provided: ClickLinkMouseEvent, ClickLinkKeyboardEvent, ClickLinkOptions, ClickLinkGesture */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + node.width = _boxBounds.width; + node.height = _boxBounds.height; // transformationLog[stateDef.id] = { y: conf.compositTitleSize }; + } + } else { + node = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawState"])(diagram, stateDef, graph); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickLinkMouseEvent", function() { return ClickLinkMouseEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickLinkKeyboardEvent", function() { return ClickLinkKeyboardEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickLinkOptions", function() { return ClickLinkOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickLinkGesture", function() { return ClickLinkGesture; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + if (stateDef.note) { + // Draw note note + var noteDef = { + descriptions: [], + id: stateDef.id + '-note', + note: stateDef.note, + type: 'note' + }; + var note = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawState"])(diagram, noteDef, graph); // graph.setNode(node.id, node); + if (stateDef.note.position === 'left of') { + graph.setNode(node.id + '-note', note); + graph.setNode(node.id, node); + } else { + graph.setNode(node.id, node); + graph.setNode(node.id + '-note', note); + } // graph.setNode(node.id); -function hasModifier(e, modifier) { - return !!e[modifier]; -} -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class ClickLinkMouseEvent { - constructor(source, opts) { - this.target = source.target; - this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier); - this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier); - this.isNoneOrSingleMouseDown = (source.event.detail <= 1); - } -} -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class ClickLinkKeyboardEvent { - constructor(source, opts) { - this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); - this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); - this.hasTriggerModifier = hasModifier(source, opts.triggerModifier); - } -} -class ClickLinkOptions { - constructor(triggerKey, triggerModifier, triggerSideBySideKey, triggerSideBySideModifier) { - this.triggerKey = triggerKey; - this.triggerModifier = triggerModifier; - this.triggerSideBySideKey = triggerSideBySideKey; - this.triggerSideBySideModifier = triggerSideBySideModifier; - } - equals(other) { - return (this.triggerKey === other.triggerKey - && this.triggerModifier === other.triggerModifier - && this.triggerSideBySideKey === other.triggerSideBySideKey - && this.triggerSideBySideModifier === other.triggerSideBySideModifier); - } -} -function createOptions(multiCursorModifier) { - if (multiCursorModifier === 'altKey') { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - return new ClickLinkOptions(57 /* Meta */, 'metaKey', 6 /* Alt */, 'altKey'); - } - return new ClickLinkOptions(5 /* Ctrl */, 'ctrlKey', 6 /* Alt */, 'altKey'); - } - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { - return new ClickLinkOptions(6 /* Alt */, 'altKey', 57 /* Meta */, 'metaKey'); - } - return new ClickLinkOptions(6 /* Alt */, 'altKey', 5 /* Ctrl */, 'ctrlKey'); -} -class ClickLinkGesture extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor(editor) { - super(); - this._onMouseMoveOrRelevantKeyDown = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown.event; - this._onExecute = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onExecute = this._onExecute.event; - this._onCancel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onCancel = this._onCancel.event; - this._editor = editor; - this._opts = createOptions(this._editor.getOption(61 /* multiCursorModifier */)); - this._lastMouseMoveEvent = null; - this._hasTriggerKeyOnMouseDown = false; - this._lineNumberOnMouseDown = 0; - this._register(this._editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(61 /* multiCursorModifier */)) { - const newOpts = createOptions(this._editor.getOption(61 /* multiCursorModifier */)); - if (this._opts.equals(newOpts)) { - return; - } - this._opts = newOpts; - this._lastMouseMoveEvent = null; - this._hasTriggerKeyOnMouseDown = false; - this._lineNumberOnMouseDown = 0; - this._onCancel.fire(); - } - })); - this._register(this._editor.onMouseMove((e) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); - this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); - this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); - this._register(this._editor.onKeyDown((e) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts)))); - this._register(this._editor.onKeyUp((e) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts)))); - this._register(this._editor.onMouseDrag(() => this._resetHandler())); - this._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e))); - this._register(this._editor.onDidChangeModel((e) => this._resetHandler())); - this._register(this._editor.onDidChangeModelContent(() => this._resetHandler())); - this._register(this._editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this._resetHandler(); - } - })); - } - _onDidChangeCursorSelection(e) { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } - } - _onEditorMouseMove(mouseEvent) { - this._lastMouseMoveEvent = mouseEvent; - this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); - } - _onEditorMouseDown(mouseEvent) { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; - this._lineNumberOnMouseDown = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0; - } - _onEditorMouseUp(mouseEvent) { - const currentLineNumber = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0; - if (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) { - this._onExecute.fire(mouseEvent); - } - } - _onEditorKeyDown(e) { - if (this._lastMouseMoveEvent - && (e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - )) { - this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]); - } - else if (e.hasTriggerModifier) { - this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } + graph.setParent(node.id, node.id + '-group'); + graph.setParent(node.id + '-note', node.id + '-group'); + } else { + // Add nodes to the graph. The first argument is the node id. The second is + // metadata about the node. In this case we're going to add labels to each of + // our nodes. + graph.setNode(node.id, node); } - _onEditorKeyUp(e) { - if (e.keyCodeIsTriggerKey) { - this._onCancel.fire(); + } + + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Count=', graph.nodeCount(), graph); + var cnt = 0; + relations.forEach(function (relation) { + cnt++; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Setting edge', relation); + graph.setEdge(relation.id1, relation.id2, { + relation: relation, + width: getLabelWidth(relation.title), + height: conf.labelHeight * _common_common__WEBPACK_IMPORTED_MODULE_5__["default"].getRows(relation.title).length, + labelpos: 'c' + }, 'id' + cnt); + }); + dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(graph); + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Graph after layout', graph.nodes()); + var svgElem = diagram.node(); + graph.nodes().forEach(function (v) { + if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].warn('Node ' + v + ': ' + JSON.stringify(graph.node(v))); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + svgElem.id + ' #' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + ' )'); + Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + svgElem.id + ' #' + v).attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2); + var dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider'); + dividers.forEach(function (divider) { + var parent = divider.parentElement; + var pWidth = 0; + var pShift = 0; + + if (parent) { + if (parent.parentElement) pWidth = parent.parentElement.getBBox().width; + pShift = parseInt(parent.getAttribute('data-x-shift'), 10); + + if (Number.isNaN(pShift)) { + pShift = 0; + } } + + divider.setAttribute('x1', 0 - pShift + 8); + divider.setAttribute('x2', pWidth - pShift - 8); + }); + } else { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v))); } - _resetHandler() { - this._lastMouseMoveEvent = null; - this._hasTriggerKeyOnMouseDown = false; - this._onCancel.fire(); + }); + var stateBox = svgElem.getBBox(); + graph.edges().forEach(function (e) { + if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e))); + Object(_shapes__WEBPACK_IMPORTED_MODULE_7__["drawEdge"])(diagram, graph.edge(e), graph.edge(e).relation); } -} + }); + stateBox = svgElem.getBBox(); + var stateInfo = { + id: parentId ? parentId : 'root', + label: parentId ? parentId : 'root', + width: 0, + height: 0 + }; + stateInfo.width = stateBox.width + 2 * conf.padding; + stateInfo.height = stateBox.height + 2 * conf.padding; + _logger__WEBPACK_IMPORTED_MODULE_3__["log"].debug('Doc rendered', stateInfo, graph); + return stateInfo; +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css": -/*!*******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css ***! - \*******************************************************************************************************/ +/***/ "./src/diagrams/state/styles.js": +/*!**************************************!*\ + !*** ./src/diagrams/state/styles.js ***! + \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./goToDefinitionAtPosition.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - +var getStyles = function getStyles(options) { + return "g.stateGroup text {\n fill: ".concat(options.nodeBorder, ";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(options.textColor, ";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(options.labelColor, ";\n}\n\ng.stateGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.stateGroup line {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(options.background, ";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(options.noteBorderColor, ";\n fill: ").concat(options.noteBkgColor, ";\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(options.tertiaryColor, ";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(options.tertiaryTextColor, ";\n}\n.label div .edgeLabel {\n color: ").concat(options.tertiaryTextColor, ";\n}\n\n.stateLabel text {\n fill: ").concat(options.labelColor, ";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(options.lineColor, ";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(options.primaryBorderColor, ";\n stroke: ").concat(options.background, ";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(options.background, ";\n // stroke: ").concat(options.background, ";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(options.lineColor, ";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(options.textColor, ";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(options.nodeBorder, ";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(options.background, ";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(options.altBackground ? options.altBackground : '#efefef', ";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(options.noteBkgColor, ";\n stroke: ").concat(options.noteBorderColor, ";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(options.noteTextColor, ";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(options.noteTextColor, ";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(options.lineColor, ";\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n}\n"); +}; -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = (getStyles); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js": -/*!******************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js ***! - \******************************************************************************************************/ -/*! exports provided: GotoDefinitionAtPositionEditorContribution */ +/***/ "./src/diagrams/user-journey/journeyDb.js": +/*!************************************************!*\ + !*** ./src/diagrams/user-journey/journeyDb.js ***! + \************************************************/ +/*! exports provided: parseDirective, clear, setTitle, getTitle, addSection, getSections, getTasks, addTask, addTaskOrg, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GotoDefinitionAtPositionEditorContribution", function() { return GotoDefinitionAtPositionEditorContribution; }); -/* harmony import */ var _goToDefinitionAtPosition_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./goToDefinitionAtPosition.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _goToSymbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../goToSymbol.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _goToCommands_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../goToCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js"); -/* harmony import */ var _clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./clickLinkGesture.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../peekView/peekView.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDirective", function() { return parseDirective; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; }); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js"); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } +var title = ''; +var currentSection = ''; +var sections = []; +var tasks = []; +var rawTasks = []; +var parseDirective = function parseDirective(statement, context, type) { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__["default"].parseDirective(this, statement, context, type); +}; +var clear = function clear() { + sections.length = 0; + tasks.length = 0; + currentSection = ''; + title = ''; + rawTasks.length = 0; +}; +var setTitle = function setTitle(txt) { + title = txt; +}; +var getTitle = function getTitle() { + return title; +}; +var addSection = function addSection(txt) { + currentSection = txt; + sections.push(txt); +}; +var getSections = function getSections() { + return sections; +}; +var getTasks = function getTasks() { + var allItemsProcessed = compileTasks(); + var maxDepth = 100; + var iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } -let GotoDefinitionAtPositionEditorContribution = class GotoDefinitionAtPositionEditorContribution { - constructor(editor, textModelResolverService, modeService) { - this.textModelResolverService = textModelResolverService; - this.modeService = modeService; - this.toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__["DisposableStore"](); - this.toUnhookForKeyboard = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__["DisposableStore"](); - this.linkDecorations = []; - this.currentWordAtPosition = null; - this.previousPromise = null; - this.editor = editor; - let linkGesture = new _clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_16__["ClickLinkGesture"](editor); - this.toUnhook.add(linkGesture); - this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { - this.startFindDefinitionFromMouse(mouseEvent, Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__["withNullAsUndefined"])(keyboardEvent)); - })); - this.toUnhook.add(linkGesture.onExecute((mouseEvent) => { - if (this.isEnabled(mouseEvent)) { - this.gotoDefinition(mouseEvent.target.position, mouseEvent.hasSideBySideModifier).then(() => { - this.removeLinkDecorations(); - }, (error) => { - this.removeLinkDecorations(); - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"])(error); - }); - } - })); - this.toUnhook.add(linkGesture.onCancel(() => { - this.removeLinkDecorations(); - this.currentWordAtPosition = null; - })); - } - static get(editor) { - return editor.getContribution(GotoDefinitionAtPositionEditorContribution.ID); - } - startFindDefinitionFromCursor(position) { - // For issue: https://github.com/microsoft/vscode/issues/46257 - // equivalent to mouse move with meta/ctrl key - // First find the definition and add decorations - // to the editor to be shown with the content hover widget - return this.startFindDefinition(position).then(() => { - // Add listeners for editor cursor move and key down events - // Dismiss the "extended" editor decorations when the user hides - // the hover widget. There is no event for the widget itself so these - // serve as a best effort. After removing the link decorations, the hover - // widget is clean and will only show declarations per next request. - this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - this.toUnhookForKeyboard.clear(); - })); - this.toUnhookForKeyboard.add(this.editor.onKeyDown((e) => { - if (e) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - this.toUnhookForKeyboard.clear(); - } - })); - }); - } - startFindDefinitionFromMouse(mouseEvent, withKey) { - // check if we are active and on a content widget - if (mouseEvent.target.type === 9 /* CONTENT_WIDGET */ && this.linkDecorations.length > 0) { - return; - } - if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return; - } - const position = mouseEvent.target.position; - this.startFindDefinition(position); - } - startFindDefinition(position) { - var _a; - // Dispose listeners for updating decorations when using keyboard to show definition hover - this.toUnhookForKeyboard.clear(); - // Find word at mouse position - const word = position ? (_a = this.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getWordAtPosition(position) : null; - if (!word) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return Promise.resolve(0); - } - // Return early if word at position is still the same - if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) { - return Promise.resolve(0); - } - this.currentWordAtPosition = word; - // Find definition and decorate word if found - let state = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_14__["EditorState"](this.editor, 4 /* Position */ | 1 /* Value */ | 2 /* Selection */ | 8 /* Scroll */); - if (this.previousPromise) { - this.previousPromise.cancel(); - this.previousPromise = null; - } - this.previousPromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["createCancelablePromise"])(token => this.findDefinition(position, token)); - return this.previousPromise.then(results => { - if (!results || !results.length || !state.validate(this.editor)) { - this.removeLinkDecorations(); - return; - } - // Multiple results - if (results.length > 1) { - this.addDecoration(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["MarkdownString"]().appendText(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('multipleResults', "Click to show {0} definitions.", results.length))); - } - // Single result - else { - let result = results[0]; - if (!result.uri) { - return; - } - this.textModelResolverService.createModelReference(result.uri).then(ref => { - if (!ref.object || !ref.object.textEditorModel) { - ref.dispose(); - return; - } - const { object: { textEditorModel } } = ref; - const { startLineNumber } = result.range; - if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) { - // invalid range - ref.dispose(); - return; - } - const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result); - let wordRange; - if (result.originSelectionRange) { - wordRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].lift(result.originSelectionRange); - } - else { - wordRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); - } - const modeId = this.modeService.getModeIdByFilepathOrFirstLine(textEditorModel.uri); - this.addDecoration(wordRange, new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["MarkdownString"]().appendCodeblock(modeId ? modeId : '', previewValue)); - ref.dispose(); - }); - } - }).then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"]); - } - getPreviewValue(textEditorModel, startLineNumber, result) { - let rangeToUse = result.targetSelectionRange ? result.range : this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber); - const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber; - if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) { - rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber); - } - const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse); - return previewValue; - } - stripIndentationFromPreviewRange(textEditorModel, startLineNumber, previewRange) { - const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - let minIndent = startIndent; - for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) { - const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - minIndent = Math.min(minIndent, endIndent); - } - const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\s{${minIndent - 1}}`, 'gm'), '').trim(); - return previewValue; - } - getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber) { - const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES); - let endLineNumber = startLineNumber + 1; - for (; endLineNumber < maxLineNumber; endLineNumber++) { - let endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - if (startIndent === endIndent) { - break; - } - } - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, 1, endLineNumber + 1, 1); - } - getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber) { - const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES); - const brackets = []; - let ignoreFirstEmpty = true; - let currentBracket = textEditorModel.findNextBracket(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__["Position"](startLineNumber, 1)); - while (currentBracket !== null) { - if (brackets.length === 0) { - brackets.push(currentBracket); - } - else { - const lastBracket = brackets[brackets.length - 1]; - if (lastBracket.open[0] === currentBracket.open[0] && lastBracket.isOpen && !currentBracket.isOpen) { - brackets.pop(); - } - else { - brackets.push(currentBracket); - } - if (brackets.length === 0) { - if (ignoreFirstEmpty) { - ignoreFirstEmpty = false; - } - else { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, 1, currentBracket.range.endLineNumber + 1, 1); - } - } - } - const maxColumn = textEditorModel.getLineMaxColumn(startLineNumber); - let nextLineNumber = currentBracket.range.endLineNumber; - let nextColumn = currentBracket.range.endColumn; - if (maxColumn === currentBracket.range.endColumn) { - nextLineNumber++; - nextColumn = 1; - } - if (nextLineNumber > maxLineNumber) { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, 1, maxLineNumber + 1, 1); - } - currentBracket = textEditorModel.findNextBracket(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_17__["Position"](nextLineNumber, nextColumn)); - } - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, 1, maxLineNumber + 1, 1); - } - addDecoration(range, hoverMessage) { - const newDecorations = { - range: range, - options: { - inlineClassName: 'goto-definition-link', - hoverMessage - } - }; - this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [newDecorations]); - } - removeLinkDecorations() { - if (this.linkDecorations.length > 0) { - this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, []); - } - } - isEnabled(mouseEvent, withKey) { - return this.editor.hasModel() && - mouseEvent.isNoneOrSingleMouseDown && - (mouseEvent.target.type === 6 /* CONTENT_TEXT */) && - (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false)) && - _common_modes_js__WEBPACK_IMPORTED_MODULE_7__["DefinitionProviderRegistry"].has(this.editor.getModel()); - } - findDefinition(position, token) { - const model = this.editor.getModel(); - if (!model) { - return Promise.resolve(null); - } - return Object(_goToSymbol_js__WEBPACK_IMPORTED_MODULE_9__["getDefinitionsAtPosition"])(model, position, token); - } - gotoDefinition(position, openToSide) { - this.editor.setPosition(position); - return this.editor.invokeWithinContext((accessor) => { - const canPeek = !openToSide && this.editor.getOption(69 /* definitionLinkOpensInPeek */) && !this.isInPeekEditor(accessor); - const action = new _goToCommands_js__WEBPACK_IMPORTED_MODULE_15__["DefinitionAction"]({ openToSide, openInPeek: canPeek, muteMessage: true }, { alias: '', label: '', id: '', precondition: undefined }); - return action.run(accessor, this.editor); - }); - } - isInPeekEditor(accessor) { - const contextKeyService = accessor.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_20__["IContextKeyService"]); - return _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_19__["PeekContext"].inPeekEditor.getValue(contextKeyService); - } - dispose() { - this.toUnhook.dispose(); - } + tasks.push.apply(tasks, rawTasks); + return tasks; }; -GotoDefinitionAtPositionEditorContribution.ID = 'editor.contrib.gotodefinitionatposition'; -GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES = 8; -GotoDefinitionAtPositionEditorContribution = __decorate([ - __param(1, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__["ITextModelService"]), - __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__["IModeService"]) -], GotoDefinitionAtPositionEditorContribution); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["registerEditorContribution"])(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["registerThemingParticipant"])((theme, collector) => { - const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorActiveLinkForeground"]); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor .goto-definition-link { color: ${activeLinkForeground} !important; }`); +var updateActors = function updateActors() { + var tempActors = []; + tasks.forEach(function (task) { + if (task.people) { + tempActors.push.apply(tempActors, _toConsumableArray(task.people)); } -}); - + }); + var unique = new Set(tempActors); + return _toConsumableArray(unique).sort(); +}; -/***/ }), +var addTask = function addTask(descr, taskData) { + var pieces = taskData.substr(1).split(':'); + var score = 0; + var peeps = []; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js ***! - \**************************************************************************************************/ -/*! exports provided: ctxReferenceSearchVisible, ReferencesController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (pieces.length === 1) { + score = Number(pieces[0]); + peeps = []; + } else { + score = Number(pieces[0]); + peeps = pieces[1].split(','); + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ctxReferenceSearchVisible", function() { return ctxReferenceSearchVisible; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferencesController", function() { return ReferencesController; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../referencesModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js"); -/* harmony import */ var _referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./referencesWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../peekView/peekView.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js"); -/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/list/browser/listService.js */ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } + var peopleList = peeps.map(function (s) { + return s.trim(); + }); + var rawTask = { + section: currentSection, + type: currentSection, + people: peopleList, + task: descr, + score: score + }; + rawTasks.push(rawTask); }; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +var addTaskOrg = function addTaskOrg(descr) { + var newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); }; +var compileTasks = function compileTasks() { + var compileTask = function compileTask(pos) { + return rawTasks[pos].processed; + }; + var allProcessed = true; + for (var i = 0; i < rawTasks.length; i++) { + compileTask(i); + allProcessed = allProcessed && rawTasks[i].processed; + } + return allProcessed; +}; +var getActors = function getActors() { + return updateActors(); +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + parseDirective: parseDirective, + getConfig: function getConfig() { + return _config__WEBPACK_IMPORTED_MODULE_1__["getConfig"]().journey; + }, + clear: clear, + setTitle: setTitle, + getTitle: getTitle, + addSection: addSection, + getSections: getSections, + getTasks: getTasks, + addTask: addTask, + addTaskOrg: addTaskOrg, + getActors: getActors +}); +/***/ }), +/***/ "./src/diagrams/user-journey/journeyRenderer.js": +/*!******************************************************!*\ + !*** ./src/diagrams/user-journey/journeyRenderer.js ***! + \******************************************************/ +/*! exports provided: setConf, draw, bounds, drawTasks, default */function(e,t,n){"use strict";n.r(t),n.d(t,"setConf",(function(){return c})),n.d(t,"draw",(function(){return f})),n.d(t,"bounds",(function(){return g})),n.d(t,"drawTasks",(function(){return _}));var i=n(/*! d3 */"d3"),r=n(/*! ./parser/journey */"./src/diagrams/user-journey/parser/journey.jison"),o=n(/*! ./journeyDb */"./src/diagrams/user-journey/journeyDb.js"),s=n(/*! ./svgDraw */"./src/diagrams/user-journey/svgDraw.js"),a=n(/*! ../../config */"./src/config.js"),l=n(/*! ../../utils */"./src/utils.js");r.parser.yy=o.default;var c=function(e){Object.keys(e).forEach((function(t){u[t]=e[t]}))},d={},u=Object(a.getConfig)().journey,h=Object(a.getConfig)().journey.leftMargin,f=function(e,t){var n=Object(a.getConfig)().journey;r.parser.yy.clear(),r.parser.parse(e+"\n"),g.init();var o=Object(i.select)("#"+t);o.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),s.default.initGraphics(o);var c=r.parser.yy.getTasks(),u=r.parser.yy.getTitle(),f=r.parser.yy.getActors();for(var p in d)delete d[p];var m=0;f.forEach((function(e){d[e]=n.actorColours[m%n.actorColours.length],m++})),function(e){var t=Object(a.getConfig)().journey,n=60;Object.keys(d).forEach((function(i){var r=d[i],o={cx:20,cy:n,r:7,fill:r,stroke:"#000"};s.default.drawCircle(e,o);var a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|t.boxTextMargin};s.default.drawText(e,a),n+=20}))}(o),g.insert(0,0,h,50*Object.keys(d).length),console.log(g),_(o,c,0);var b=g.getBounds();u&&o.append("text").text(u).attr("x",h).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var v=b.stopy-b.starty+2*n.diagramMarginY,y=h+b.stopx+2*n.diagramMarginX;Object(l.configureSvgSize)(o,v,y,n.useMaxWidth),o.append("line").attr("x1",h).attr("y1",4*n.height).attr("x2",y-h-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var w=u?70:0;o.attr("viewBox","".concat(b.startx," -25 ").concat(y," ").concat(v+w)),o.attr("preserveAspectRatio","xMinYMin meet"),o.attr("height",v+w+25)},g={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(e,t,n,i){void 0===e[t]?e[t]=n:e[t]=i(n,e[t])},updateBounds:function(e,t,n,i){var r,o=Object(a.getConfig)().journey,s=this,l=0;this.sequenceItems.forEach((function(a){l++;var c=s.sequenceItems.length-l+1;s.updateVal(a,"starty",t-c*o.boxMargin,Math.min),s.updateVal(a,"stopy",i+c*o.boxMargin,Math.max),s.updateVal(g.data,"startx",e-c*o.boxMargin,Math.min),s.updateVal(g.data,"stopx",n+c*o.boxMargin,Math.max),"activation"!==r&&(s.updateVal(a,"startx",e-c*o.boxMargin,Math.min),s.updateVal(a,"stopx",n+c*o.boxMargin,Math.max),s.updateVal(g.data,"starty",t-c*o.boxMargin,Math.min),s.updateVal(g.data,"stopy",i+c*o.boxMargin,Math.max))}))},insert:function(e,t,n,i){var r=Math.min(e,n),o=Math.max(e,n),s=Math.min(t,i),a=Math.max(t,i);this.updateVal(g.data,"startx",r,Math.min),this.updateVal(g.data,"starty",s,Math.min),this.updateVal(g.data,"stopx",o,Math.max),this.updateVal(g.data,"stopy",a,Math.max),this.updateBounds(r,s,o,a)},bumpVerticalPos:function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},p=u.sectionFills,m=u.sectionColours,_=function(e,t,n){for(var i=Object(a.getConfig)().journey,r="",o=n+(2*i.height+i.diagramMarginY),l=0,c="#CCC",u="black",f=0,_=0;_ number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,5],$V2=[6,9,11,17,18,19,21],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[1,21],$V7=[4,6,9,11,17,18,19,21]; +var parser = {trace: function trace () { }, +yy: {}, +symbols_: {"error":2,"start":3,"journey":4,"document":5,"EOF":6,"directive":7,"line":8,"SPACE":9,"statement":10,"NEWLINE":11,"openDirective":12,"typeDirective":13,"closeDirective":14,":":15,"argDirective":16,"title":17,"section":18,"taskName":19,"taskData":20,"open_directive":21,"type_directive":22,"arg_directive":23,"close_directive":24,"$accept":0,"$end":1}, +terminals_: {2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"}, +productions_: [0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ -const ctxReferenceSearchVisible = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["RawContextKey"]('referenceSearchVisible', false); -let ReferencesController = class ReferencesController { - constructor(_defaultTreeKeyboardSupport, _editor, contextKeyService, _editorService, _notificationService, _instantiationService, _storageService, _configurationService) { - this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport; - this._editor = _editor; - this._editorService = _editorService; - this._notificationService = _notificationService; - this._instantiationService = _instantiationService; - this._storageService = _storageService; - this._configurationService = _configurationService; - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - this._requestIdPool = 0; - this._ignoreModelChangeEvent = false; - this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService); - } - static get(editor) { - return editor.getContribution(ReferencesController.ID); +var $0 = $$.length - 1; +switch (yystate) { +case 1: + return $$[$0-1]; +break; +case 3: + this.$ = [] +break; +case 4: +$$[$0-1].push($$[$0]);this.$ = $$[$0-1] +break; +case 5: case 6: + this.$ = $$[$0] +break; +case 7: case 8: + this.$=[]; +break; +case 11: +yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6); +break; +case 12: +yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8); +break; +case 13: +yy.addTask($$[$0-1], $$[$0]);this.$='task'; +break; +case 15: + yy.parseDirective('%%{', 'open_directive'); +break; +case 16: + yy.parseDirective($$[$0], 'type_directive'); +break; +case 17: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); +break; +case 18: + yy.parseDirective('}%%', 'close_directive', 'journey'); +break; +} +}, +table: [{3:1,4:$V0,7:3,12:4,21:$V1},{1:[3]},o($V2,[2,3],{5:6}),{3:7,4:$V0,7:3,12:4,21:$V1},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:$V3,18:$V4,19:$V5,21:$V1},{1:[2,2]},{14:19,15:[1,20],24:$V6},o([15,24],[2,16]),o($V2,[2,8],{1:[2,1]}),o($V2,[2,4]),{7:18,10:22,12:4,17:$V3,18:$V4,19:$V5,21:$V1},o($V2,[2,6]),o($V2,[2,7]),o($V2,[2,11]),o($V2,[2,12]),{20:[1,23]},o($V2,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},o($V2,[2,5]),o($V2,[2,13]),o($V7,[2,9]),{14:27,24:$V6},{24:[2,17]},{11:[1,28]},o($V7,[2,10])], +defaultActions: {5:[2,15],7:[2,2],21:[2,18],26:[2,17]}, +parseError: function parseError (str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; } - dispose() { - this._referenceSearchVisible.reset(); - this._disposables.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._widget); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._model); - this._widget = undefined; - this._model = undefined; - } - toggleWidget(range, modelPromise, peekMode) { - // close current widget and return early is position didn't change - let widgetPosition; - if (this._widget) { - widgetPosition = this._widget.position; - } - this.closeWidget(); - if (!!widgetPosition && range.containsPosition(widgetPosition)) { - return; +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } - this._peekMode = peekMode; - this._referenceSearchVisible.set(true); - // close the widget on model/mode changes - this._disposables.add(this._editor.onDidChangeModelLanguage(() => { this.closeWidget(); })); - this._disposables.add(this._editor.onDidChangeModel(() => { - if (!this._ignoreModelChangeEvent) { - this.closeWidget(); - } - })); - const storageKey = 'peekViewLayout'; - const data = _referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__["LayoutData"].fromJSON(this._storageService.get(storageKey, 0 /* GLOBAL */, '{}')); - this._widget = this._instantiationService.createInstance(_referencesWidget_js__WEBPACK_IMPORTED_MODULE_9__["ReferenceWidget"], this._editor, this._defaultTreeKeyboardSupport, data); - this._widget.setTitle(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('labelLoading', "Loading...")); - this._widget.show(range); - this._disposables.add(this._widget.onDidClose(() => { - modelPromise.cancel(); - if (this._widget) { - this._storageService.store(storageKey, JSON.stringify(this._widget.layoutData), 0 /* GLOBAL */); - this._widget = undefined; - } - this.closeWidget(); - })); - this._disposables.add(this._widget.onDidSelectReference(event => { - let { element, kind } = event; - if (!element) { - return; - } - switch (kind) { - case 'open': - if (event.source !== 'editor' || !this._configurationService.getValue('editor.stablePeek')) { - // when stable peek is configured we don't close - // the peek window on selecting the editor - this.openReference(element, false); - } - break; - case 'side': - this.openReference(element, true); - break; - case 'goto': - if (peekMode) { - this._gotoReference(element); - } - else { - this.openReference(element, false); - } - break; - } - })); - const requestId = ++this._requestIdPool; - modelPromise.then(model => { - // still current request? widget still open? - if (requestId !== this._requestIdPool || !this._widget) { - return undefined; - } - if (this._model) { - this._model.dispose(); - } - this._model = model; - // show widget - return this._widget.setModel(this._model).then(() => { - if (this._widget && this._model && this._editor.hasModel()) { // might have been closed - // set title - if (!this._model.isEmpty) { - this._widget.setMetaTitle(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('metaTitle.N', "{0} ({1})", this._model.title, this._model.references.length)); - } - else { - this._widget.setMetaTitle(''); - } - // set 'best' selection - let uri = this._editor.getModel().uri; - let pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_11__["Position"](range.startLineNumber, range.startColumn); - let selection = this._model.nearestReference(uri, pos); - if (selection) { - return this._widget.setSelection(selection).then(() => { - if (this._widget && this._editor.getOption(68 /* peekWidgetDefaultFocus */) === 'editor') { - this._widget.focusOnPreviewEditor(); - } - }); - } - } - return undefined; - }); - }, error => { - this._notificationService.error(error); - }); } - changeFocusBetweenPreviewAndReferences() { - if (!this._widget) { - // can be called while still resolving... - return; - } - if (this._widget.isPreviewEditorFocused()) { - this._widget.focusOnReferenceTree(); - } - else { - this._widget.focusOnPreviewEditor(); - } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; } - goToNextOrPreviousReference(fwd) { - return __awaiter(this, void 0, void 0, function* () { - if (!this._editor.hasModel() || !this._model || !this._widget) { - // can be called while still resolving... - return; - } - const currentPosition = this._widget.position; - if (!currentPosition) { - return; + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = tstack.pop() || lexer.lex() || EOF; + if (typeof token !== 'number') { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; } - const source = this._model.nearestReference(this._editor.getModel().uri, currentPosition); - if (!source) { - return; + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } - const target = this._model.nextOrPreviousReference(source, fwd); - const editorFocus = this._editor.hasTextFocus(); - const previewEditorFocus = this._widget.isPreviewEditorFocused(); - yield this._widget.setSelection(target); - yield this._gotoReference(target); - if (editorFocus) { - this._editor.focus(); + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } } - else if (this._widget && previewEditorFocus) { - this._widget.focusOnPreviewEditor(); + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); } - }); - } - revealReference(reference) { - return __awaiter(this, void 0, void 0, function* () { - if (!this._editor.hasModel() || !this._model || !this._widget) { - // can be called while still resolving... - return; + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; } - yield this._widget.revealReference(reference); - }); - } - closeWidget(focusEditor = true) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._widget); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["dispose"])(this._model); - this._referenceSearchVisible.reset(); - this._disposables.clear(); - this._widget = undefined; - this._model = undefined; - if (focusEditor) { - this._editor.focus(); - } - this._requestIdPool += 1; // Cancel pending requests - } - _gotoReference(ref) { - if (this._widget) { - this._widget.hide(); - } - this._ignoreModelChangeEvent = true; - const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"].lift(ref.range).collapseToStart(); - return this._editorService.openCodeEditor({ - resource: ref.uri, - options: { selection: range } - }, this._editor).then(openedEditor => { - var _a; - this._ignoreModelChangeEvent = false; - if (!openedEditor || !this._widget) { - // something went wrong... - this.closeWidget(); - return; + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; } - if (this._editor === openedEditor) { - // - this._widget.show(range); - this._widget.focusOnReferenceTree(); + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; } - else { - // we opened a different editor instance which means a different controller instance. - // therefore we stop with this controller and continue with the other - const other = ReferencesController.get(openedEditor); - const model = this._model.clone(); - this.closeWidget(); - openedEditor.focus(); - other.toggleWidget(range, Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_13__["createCancelablePromise"])(_ => Promise.resolve(model)), (_a = this._peekMode) !== null && _a !== void 0 ? _a : false); + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); } - }, (err) => { - this._ignoreModelChangeEvent = false; - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(err); - }); - } - openReference(ref, sideBySide) { - // clear stage - if (!sideBySide) { - this.closeWidget(); - } - const { uri, range } = ref; - this._editorService.openCodeEditor({ - resource: uri, - options: { selection: range } - }, this._editor, sideBySide); - } -}; -ReferencesController.ID = 'editor.contrib.referencesController'; -ReferencesController = __decorate([ - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["IContextKeyService"]), - __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]), - __param(4, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_12__["INotificationService"]), - __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__["IInstantiationService"]), - __param(6, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__["IStorageService"]), - __param(7, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]) -], ReferencesController); - -function withController(accessor, fn) { - const outerEditor = Object(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__["getOuterEditor"])(accessor); - if (!outerEditor) { - return; - } - let controller = ReferencesController.get(outerEditor); - if (controller) { - fn(controller); - } -} -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'togglePeekWidgetFocus', - weight: 100 /* EditorContrib */, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_17__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 60 /* F2 */), - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__["PeekContext"].inPeekEditor), - handler(accessor) { - withController(accessor, controller => { - controller.changeFocusBetweenPreviewAndReferences(); - }); - } -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'goToNextReference', - weight: 100 /* EditorContrib */ - 10, - primary: 62 /* F4 */, - secondary: [70 /* F12 */], - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__["PeekContext"].inPeekEditor), - handler(accessor) { - withController(accessor, controller => { - controller.goToNextOrPreviousReference(true); - }); - } -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'goToPreviousReference', - weight: 100 /* EditorContrib */ - 10, - primary: 1024 /* Shift */ | 62 /* F4 */, - secondary: [1024 /* Shift */ | 70 /* F12 */], - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].or(ctxReferenceSearchVisible, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__["PeekContext"].inPeekEditor), - handler(accessor) { - withController(accessor, controller => { - controller.goToNextOrPreviousReference(false); - }); - } -}); -// commands that aren't needed anymore because there is now ContextKeyExpr.OR -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference'); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference'); -// close -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch'); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommand('closeReferenceSearch', accessor => withController(accessor, controller => controller.closeWidget())); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerKeybindingRule({ - id: 'closeReferenceSearch', - weight: 100 /* EditorContrib */ - 101, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */], - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].and(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_14__["PeekContext"].inPeekEditor, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].not('config.editor.stablePeek')) -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerKeybindingRule({ - id: 'closeReferenceSearch', - weight: 200 /* WorkbenchContrib */ + 50, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */], - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].and(ctxReferenceSearchVisible, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].not('config.editor.stablePeek')) -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'revealReference', - weight: 200 /* WorkbenchContrib */, - primary: 3 /* Enter */, - mac: { - primary: 3 /* Enter */, - secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */] - }, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].and(ctxReferenceSearchVisible, _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["WorkbenchListFocusContextKey"]), - handler(accessor) { - var _a; - const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["IListService"]); - const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus(); - if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__["OneReference"]) { - withController(accessor, controller => controller.revealReference(focus[0])); - } - } -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_16__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'openReferenceToSide', - weight: 100 /* EditorContrib */, - primary: 2048 /* CtrlCmd */ | 3 /* Enter */, - mac: { - primary: 256 /* WinCtrl */ | 3 /* Enter */ - }, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["ContextKeyExpr"].and(ctxReferenceSearchVisible, _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["WorkbenchListFocusContextKey"]), - handler(accessor) { - var _a; - const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["IListService"]); - const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus(); - if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__["OneReference"]) { - withController(accessor, controller => controller.openReference(focus[0], true)); + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } } -}); -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_18__["CommandsRegistry"].registerCommand('openReference', (accessor) => { - var _a; - const listService = accessor.get(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["IListService"]); - const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus(); - if (Array.isArray(focus) && focus[0] instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_8__["OneReference"]) { - withController(accessor, controller => controller.openReference(focus[0], false)); - } -}); + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ -/***/ }), +EOF:1, -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js ***! - \********************************************************************************************/ -/*! exports provided: DataSource, Delegate, StringRepresentationProvider, IdentityProvider, FileReferencesRenderer, OneReferenceRenderer, AccessibilityProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataSource", function() { return DataSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Delegate", function() { return Delegate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringRepresentationProvider", function() { return StringRepresentationProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdentityProvider", function() { return IdentityProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileReferencesRenderer", function() { return FileReferencesRenderer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneReferenceRenderer", function() { return OneReferenceRenderer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccessibilityProvider", function() { return AccessibilityProvider; }); -/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../referencesModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/ui/iconLabel/iconLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js"); -/* harmony import */ var _base_browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/ui/countBadge/countBadge.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js"); -/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/label/common/label.js */ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/theme/common/styler.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../base/common/labels.js */ "./node_modules/monaco-editor/esm/vs/base/common/labels.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../base/common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _base_browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../base/browser/ui/highlightedlabel/highlightedLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function(match, indexed_rule) { + var token, + lines, + backup; -let DataSource = class DataSource { - constructor(_resolverService) { - this._resolverService = _resolverService; - } - hasChildren(element) { - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["ReferencesModel"]) { - return true; + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } } - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["FileReferences"]) { - return true; + + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. } return false; - } - getChildren(element) { - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["ReferencesModel"]) { - return element.groups; - } - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["FileReferences"]) { - return element.resolve(this._resolverService).then(val => { - // if (element.failure) { - // // refresh the element on failure so that - // // we can update its rendering - // return tree.refresh(element).then(() => val.children); - // } - return val.children; - }); + }, + +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; } - throw new Error('bad tree'); - } -}; -DataSource = __decorate([ - __param(0, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_1__["ITextModelService"]) -], DataSource); -//#endregion -class Delegate { - getHeight() { - return 23; - } - getTemplateId(element) { - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["FileReferences"]) { - return FileReferencesRenderer.id; + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; } - else { - return OneReferenceRenderer.id; + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } } - } -} -let StringRepresentationProvider = class StringRepresentationProvider { - constructor(_keybindingService) { - this._keybindingService = _keybindingService; - } - getKeyboardNavigationLabel(element) { - var _a; - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["OneReference"]) { - const parts = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range); - if (parts) { - return parts.value; + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; } - // FileReferences or unresolved OneReference - return Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__["basename"])(element.uri); - } -}; -StringRepresentationProvider = __decorate([ - __param(0, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__["IKeybindingService"]) -], StringRepresentationProvider); + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, -class IdentityProvider { - getId(element) { - return element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_0__["OneReference"] ? element.id : element.uri; - } -} -//#region render: File -let FileReferencesTemplate = class FileReferencesTemplate extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_11__["Disposable"] { - constructor(container, _uriLabel, themeService) { - super(); - this._uriLabel = _uriLabel; - const parent = document.createElement('div'); - parent.classList.add('reference-file'); - this.file = this._register(new _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_2__["IconLabel"](parent, { supportHighlights: true })); - this.badge = new _base_browser_ui_countBadge_countBadge_js__WEBPACK_IMPORTED_MODULE_3__["CountBadge"](_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__["append"](parent, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_7__["$"]('.count'))); - this._register(Object(_platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_6__["attachBadgeStyler"])(this.badge, themeService)); - container.appendChild(parent); - } - set(element, matches) { - let parent = Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__["dirname"])(element.uri); - this.file.setLabel(Object(_base_common_labels_js__WEBPACK_IMPORTED_MODULE_9__["getBaseLabel"])(element.uri), this._uriLabel.getUriLabel(parent, { relative: true }), { title: this._uriLabel.getUriLabel(element.uri), matches }); - const len = element.children.length; - this.badge.setCount(len); - if (len > 1) { - this.badge.setTitleFormat(Object(_nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"])('referencesCount', "{0} references", len)); +// return next match that has a token +lex:function lex () { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); } - else { - this.badge.setTitleFormat(Object(_nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"])('referenceCount', "{0} reference", len)); + }, + +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin (condition) { + this.conditionStack.push(condition); + }, + +// pop the previously active lexer condition state off the condition stack +popState:function popState () { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; } - } -}; -FileReferencesTemplate = __decorate([ - __param(1, _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_4__["ILabelService"]), - __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__["IThemeService"]) -], FileReferencesTemplate); -let FileReferencesRenderer = class FileReferencesRenderer { - constructor(_instantiationService) { - this._instantiationService = _instantiationService; - this.templateId = FileReferencesRenderer.id; - } - renderTemplate(container) { - return this._instantiationService.createInstance(FileReferencesTemplate, container); - } - renderElement(node, index, template) { - template.set(node.element, Object(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__["createMatches"])(node.filterData)); - } - disposeTemplate(templateData) { - templateData.dispose(); - } -}; -FileReferencesRenderer.id = 'FileReferencesRenderer'; -FileReferencesRenderer = __decorate([ - __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__["IInstantiationService"]) -], FileReferencesRenderer); + }, -//#endregion -//#region render: Reference -class OneReferenceTemplate { - constructor(container) { - this.label = new _base_browser_ui_highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_15__["HighlightedLabel"](container, false); - } - set(element, score) { - var _a; - const preview = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range); - if (!preview || !preview.value) { - // this means we FAILED to resolve the document or the value is the empty string - this.label.set(`${Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_10__["basename"])(element.uri)}:${element.range.startLineNumber + 1}:${element.range.startColumn + 1}`); +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules () { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; } - else { - // render search match as highlight unless - // we have score, then render the score - const { value, highlight } = preview; - if (score && !_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__["FuzzyScore"].isDefault(score)) { - this.label.element.classList.toggle('referenceMatch', false); - this.label.set(value, Object(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_14__["createMatches"])(score)); - } - else { - this.label.element.classList.toggle('referenceMatch', true); - this.label.set(value, [highlight]); - } + }, + +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState (n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; } - } + }, + +// alias for begin(condition) +pushState:function pushState (condition) { + this.begin(condition); + }, + +// return the number of states currently on the stack +stateStackSize:function stateStackSize() { + return this.conditionStack.length; + }, +options: {"case-insensitive":true}, +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { +var YYSTATE=YY_START; +switch($avoiding_name_collisions) { +case 0: this.begin('open_directive'); return 21; +break; +case 1: this.begin('type_directive'); return 22; +break; +case 2: this.popState(); this.begin('arg_directive'); return 15; +break; +case 3: this.popState(); this.popState(); return 24; +break; +case 4:return 23; +break; +case 5:/* skip comments */ +break; +case 6:/* skip comments */ +break; +case 7:return 11; +break; +case 8:/* skip whitespace */ +break; +case 9:/* skip comments */ +break; +case 10:return 4; +break; +case 11:return 17; +break; +case 12:return 18; +break; +case 13:return 19; +break; +case 14:return 20; +break; +case 15:return 15; +break; +case 16:return 6; +break; +case 17:return 'INVALID'; +break; } -class OneReferenceRenderer { - constructor() { - this.templateId = OneReferenceRenderer.id; - } - renderTemplate(container) { - return new OneReferenceTemplate(container); - } - renderElement(node, index, templateData) { - templateData.set(node.element, node.filterData); - } - disposeTemplate() { +}, +rules: [/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i], +conditions: {"open_directive":{"rules":[1],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"arg_directive":{"rules":[3,4],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (true) { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain (args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); } + var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if ( true && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); } -OneReferenceRenderer.id = 'OneReferenceRenderer'; -//#endregion -class AccessibilityProvider { - getWidgetAriaLabel() { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"])('treeAriaLabel', "References"); - } - getAriaLabel(element) { - return element.ariaMessage; - } } - +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css ***! - \***********************************************************************************************/ +/***/ "./src/diagrams/user-journey/styles.js": +/*!*********************************************!*\ + !*** ./src/diagrams/user-journey/styles.js ***! + \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./referencesWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_referencesWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.js ***! - \**********************************************************************************************/ -/*! exports provided: LayoutData, ReferenceWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LayoutData", function() { return LayoutData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceWidget", function() { return ReferenceWidget; }); -/* harmony import */ var _referencesWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./referencesWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/widget/embeddedCodeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./referencesTree.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesTree.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/label/common/label.js */ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js"); -/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/list/browser/listService.js */ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../peekView/peekView.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js"); -/* harmony import */ var _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../referencesModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js"); -/* harmony import */ var _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../base/browser/ui/splitview/splitview.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js"); -/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../../platform/undoRedo/common/undoRedo.js */ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +var getStyles = function getStyles(options) { + return ".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(options.textColor, ";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(options.textColor, "\n }\n\n .legend {\n fill: ").concat(options.textColor, ";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(options.textColor, "\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType0) : '', ";\n }\n .task-type-1, .section-type-1 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType1) : '', ";\n }\n .task-type-2, .section-type-2 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType2) : '', ";\n }\n .task-type-3, .section-type-3 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType3) : '', ";\n }\n .task-type-4, .section-type-4 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType4) : '', ";\n }\n .task-type-5, .section-type-5 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType5) : '', ";\n }\n .task-type-6, .section-type-6 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType6) : '', ";\n }\n .task-type-7, .section-type-7 {\n ").concat(options.fillType0 ? "fill: ".concat(options.fillType7) : '', ";\n }\n"); }; +/* harmony default export */ __webpack_exports__["default"] = (getStyles); +/***/ }), +/***/ "./src/diagrams/user-journey/svgDraw.js": +/*!**********************************************!*\ + !*** ./src/diagrams/user-journey/svgDraw.js ***! + \**********************************************/ +/*! exports provided: drawRect, drawFace, drawCircle, drawText, drawLabel, drawSection, drawTask, drawBackgroundRect, getTextObj, getNoteRect, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawFace", function() { return drawFace; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawCircle", function() { return drawCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSection", function() { return drawSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawTask", function() { return drawTask; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +var drawRect = function drawRect(elem, rectData) { + var rectElem = elem.append('rect'); + rectElem.attr('x', rectData.x); + rectElem.attr('y', rectData.y); + rectElem.attr('fill', rectData.fill); + rectElem.attr('stroke', rectData.stroke); + rectElem.attr('width', rectData.width); + rectElem.attr('height', rectData.height); + rectElem.attr('rx', rectData.rx); + rectElem.attr('ry', rectData.ry); + if (typeof rectData.class !== 'undefined') { + rectElem.attr('class', rectData.class); + } + return rectElem; +}; +var drawFace = function drawFace(element, faceData) { + var radius = 15; + var circleElement = element.append('circle').attr('cx', faceData.cx).attr('cy', faceData.cy).attr('class', 'face').attr('r', radius).attr('stroke-width', 2).attr('overflow', 'visible'); + var face = element.append('g'); //left eye + face.append('circle').attr('cx', faceData.cx - radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); //right eye + face.append('circle').attr('cx', faceData.cx + radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); + function smile(face) { + var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth + face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')'); + } + function sad(face) { + var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__["arc"])().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth + face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')'); + } + function ambivalent(face) { + face.append('line').attr('class', 'mouth').attr('stroke', 2).attr('x1', faceData.cx - 5).attr('y1', faceData.cy + 7).attr('x2', faceData.cx + 5).attr('y2', faceData.cy + 7).attr('class', 'mouth').attr('stroke-width', '1px').attr('stroke', '#666'); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +var drawCircle = function drawCircle(element, circleData) { + var circleElement = element.append('circle'); + circleElement.attr('cx', circleData.cx); + circleElement.attr('cy', circleData.cy); + circleElement.attr('fill', circleData.fill); + circleElement.attr('stroke', circleData.stroke); + circleElement.attr('r', circleData.r); + if (typeof circleElement.class !== 'undefined') { + circleElement.attr('class', circleElement.class); + } + if (typeof circleData.title !== 'undefined') { + circleElement.append('title').text(circleData.title); + } + return circleElement; +}; +var drawText = function drawText(elem, textData) { + // Remove and ignore br:s + var nText = textData.text.replace(//gi, ' '); + var textElem = elem.append('text'); + textElem.attr('x', textData.x); + textElem.attr('y', textData.y); + textElem.attr('class', 'legend'); + textElem.style('text-anchor', textData.anchor); + if (typeof textData.class !== 'undefined') { + textElem.attr('class', textData.class); + } + var span = textElem.append('tspan'); + span.attr('x', textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +var drawLabel = function drawLabel(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height); + } + var polygon = elem.append('polygon'); + polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr('class', 'labelBox'); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +var drawSection = function drawSection(elem, section, conf) { + var g = elem.append('g'); + var rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = 'journey-section section-type-' + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); -class DecorationsManager { - constructor(_editor, _model) { - this._editor = _editor; - this._model = _model; - this._decorations = new Map(); - this._decorationIgnoreSet = new Set(); - this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this._callOnModelChange = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this._callOnDispose.add(this._editor.onDidChangeModel(() => this._onModelChanged())); - this._onModelChanged(); - } - dispose() { - this._callOnModelChange.dispose(); - this._callOnDispose.dispose(); - this.removeDecorations(); - } - _onModelChanged() { - this._callOnModelChange.clear(); - const model = this._editor.getModel(); - if (!model) { - return; - } - for (let ref of this._model.references) { - if (ref.uri.toString() === model.uri.toString()) { - this._addDecorations(ref.parent); - return; - } - } - } - _addDecorations(reference) { - if (!this._editor.hasModel()) { - return; - } - this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(() => this._onDecorationChanged())); - const newDecorations = []; - const newDecorationsActualIndex = []; - for (let i = 0, len = reference.children.length; i < len; i++) { - let oneReference = reference.children[i]; - if (this._decorationIgnoreSet.has(oneReference.id)) { - continue; - } - if (oneReference.uri.toString() !== this._editor.getModel().uri.toString()) { - continue; - } - newDecorations.push({ - range: oneReference.range, - options: DecorationsManager.DecorationOptions - }); - newDecorationsActualIndex.push(i); - } - const decorations = this._editor.deltaDecorations([], newDecorations); - for (let i = 0; i < decorations.length; i++) { - this._decorations.set(decorations[i], reference.children[newDecorationsActualIndex[i]]); - } - } - _onDecorationChanged() { - const toRemove = []; - const model = this._editor.getModel(); - if (!model) { - return; - } - for (let [decorationId, reference] of this._decorations) { - const newRange = model.getDecorationRange(decorationId); - if (!newRange) { - continue; - } - let ignore = false; - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].equalsRange(newRange, reference.range)) { - continue; - } - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].spansMultipleLines(newRange)) { - ignore = true; - } - else { - const lineLength = reference.range.endColumn - reference.range.startColumn; - const newLineLength = newRange.endColumn - newRange.startColumn; - if (lineLength !== newLineLength) { - ignore = true; - } - } - if (ignore) { - this._decorationIgnoreSet.add(reference.id); - toRemove.push(decorationId); - } - else { - reference.range = newRange; - } - } - for (let i = 0, len = toRemove.length; i < len; i++) { - this._decorations.delete(toRemove[i]); - } - this._editor.deltaDecorations(toRemove, []); - } - removeDecorations() { - this._editor.deltaDecorations([...this._decorations.keys()], []); - this._decorations.clear(); - } -} -DecorationsManager.DecorationOptions = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'reference-decoration' -}); -class LayoutData { - constructor() { - this.ratio = 0.7; - this.heightInLines = 18; - } - static fromJSON(raw) { - let ratio; - let heightInLines; - try { - const data = JSON.parse(raw); - ratio = data.ratio; - heightInLines = data.heightInLines; - } - catch (_a) { - // - } - return { - ratio: ratio || 0.7, - heightInLines: heightInLines || 18 - }; - } -} -class ReferencesTree extends _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_15__["WorkbenchAsyncDataTree"] { -} + _drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, { + class: 'journey-section section-type-' + section.num + }, conf, section.colour); +}; +var taskCount = -1; /** - * ZoneWidget that is shown inside the editor + * Draws an actor in the diagram with the attaced line + * @param elem The HTML element + * @param task The task to render + * @param conf The global configuration */ -let ReferenceWidget = class ReferenceWidget extends _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["PeekViewWidget"] { - constructor(editor, _defaultTreeKeyboardSupport, layoutData, themeService, _textModelResolverService, _instantiationService, _peekViewService, _uriLabel, _undoRedoService, _keybindingService) { - super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService); - this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport; - this.layoutData = layoutData; - this._textModelResolverService = _textModelResolverService; - this._instantiationService = _instantiationService; - this._peekViewService = _peekViewService; - this._uriLabel = _uriLabel; - this._undoRedoService = _undoRedoService; - this._keybindingService = _keybindingService; - this._disposeOnNewModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this._callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this._onDidSelectReference = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.onDidSelectReference = this._onDidSelectReference.event; - this._dim = { height: 0, width: 0 }; - this._applyTheme(themeService.getColorTheme()); - this._callOnDispose.add(themeService.onDidColorThemeChange(this._applyTheme.bind(this))); - this._peekViewService.addExclusiveWidget(editor, this); - this.create(); - } - dispose() { - this.setModel(undefined); - this._callOnDispose.dispose(); - this._disposeOnNewModel.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this._preview); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this._previewNotAvailableMessage); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this._tree); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this._previewModelReference); - this._splitView.dispose(); - super.dispose(); - } - _applyTheme(theme) { - const borderColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewBorder"]) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].transparent; - this.style({ - arrowColor: borderColor, - frameColor: borderColor, - headerBackgroundColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewTitleBackground"]) || _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].transparent, - primaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewTitleForeground"]), - secondaryHeadingColor: theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewTitleInfoForeground"]) - }); - } - show(where) { - this.editor.revealRangeInCenterIfOutsideViewport(where, 0 /* Smooth */); - super.show(where, this.layoutData.heightInLines || 18); - } - focusOnReferenceTree() { - this._tree.domFocus(); - } - focusOnPreviewEditor() { - this._preview.focus(); - } - isPreviewEditorFocused() { - return this._preview.hasTextFocus(); - } - _onTitleClick(e) { - if (this._preview && this._preview.getModel()) { - this._onDidSelectReference.fire({ - element: this._getFocusedReference(), - kind: e.ctrlKey || e.metaKey || e.altKey ? 'side' : 'open', - source: 'title' - }); - } - } - _fillBody(containerElement) { - this.setCssClass('reference-zone-widget'); - // message pane - this._messageContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('div.messages')); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this._messageContainer); - this._splitView = new _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__["SplitView"](containerElement, { orientation: 1 /* HORIZONTAL */ }); - // editor - this._previewContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('div.preview.inline')); - let options = { - scrollBeyondLastLine: false, - scrollbar: { - verticalScrollbarSize: 14, - horizontal: 'auto', - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false, - alwaysConsumeMouseWheel: false - }, - overviewRulerLanes: 2, - fixedOverflowWidgets: true, - minimap: { - enabled: false - } - }; - this._preview = this._instantiationService.createInstance(_browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_7__["EmbeddedCodeEditorWidget"], this._previewContainer, options, this.editor); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this._previewContainer); - this._previewNotAvailableMessage = new _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["TextModel"](_nls_js__WEBPACK_IMPORTED_MODULE_12__["localize"]('missingPreviewMessage', "no preview available"), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["TextModel"].DEFAULT_CREATION_OPTIONS, null, null, this._undoRedoService); - // tree - this._treeContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](containerElement, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('div.ref-tree.inline')); - const treeOptions = { - keyboardSupport: this._defaultTreeKeyboardSupport, - accessibilityProvider: new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["AccessibilityProvider"](), - keyboardNavigationLabelProvider: this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["StringRepresentationProvider"]), - identityProvider: new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["IdentityProvider"](), - openOnSingleClick: true, - openOnFocus: true, - overrideStyles: { - listBackground: _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsBackground"] - } - }; - if (this._defaultTreeKeyboardSupport) { - // the tree will consume `Escape` and prevent the widget from closing - this._callOnDispose.add(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._treeContainer, 'keydown', (e) => { - if (e.equals(9 /* Escape */)) { - this._keybindingService.dispatchEvent(e, e.target); - e.stopPropagation(); - } - }, true)); - } - this._tree = this._instantiationService.createInstance(ReferencesTree, 'ReferencesWidget', this._treeContainer, new _referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["Delegate"](), [ - this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["FileReferencesRenderer"]), - this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["OneReferenceRenderer"]), - ], this._instantiationService.createInstance(_referencesTree_js__WEBPACK_IMPORTED_MODULE_11__["DataSource"]), treeOptions); - // split stuff - this._splitView.addView({ - onDidChange: _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].None, - element: this._previewContainer, - minimumSize: 200, - maximumSize: Number.MAX_VALUE, - layout: (width) => { - this._preview.layout({ height: this._dim.height, width }); - } - }, _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__["Sizing"].Distribute); - this._splitView.addView({ - onDidChange: _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].None, - element: this._treeContainer, - minimumSize: 100, - maximumSize: Number.MAX_VALUE, - layout: (width) => { - this._treeContainer.style.height = `${this._dim.height}px`; - this._treeContainer.style.width = `${width}px`; - this._tree.layout(this._dim.height, width); - } - }, _base_browser_ui_splitview_splitview_js__WEBPACK_IMPORTED_MODULE_20__["Sizing"].Distribute); - this._disposables.add(this._splitView.onDidSashChange(() => { - if (this._dim.width) { - this.layoutData.ratio = this._splitView.getViewSize(0) / this._dim.width; - } - }, undefined)); - // listen on selection and focus - let onEvent = (element, kind) => { - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__["OneReference"]) { - if (kind === 'show') { - this._revealReference(element, false); - } - this._onDidSelectReference.fire({ element, kind, source: 'tree' }); - } - }; - this._tree.onDidOpen(e => { - if (e.sideBySide) { - onEvent(e.element, 'side'); - } - else if (e.editorOptions.pinned) { - onEvent(e.element, 'goto'); - } - else { - onEvent(e.element, 'show'); - } - }); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this._treeContainer); - } - _onWidth(width) { - if (this._dim) { - this._doLayoutBody(this._dim.height, width); - } - } - _doLayoutBody(heightInPixel, widthInPixel) { - super._doLayoutBody(heightInPixel, widthInPixel); - this._dim = { height: heightInPixel, width: widthInPixel }; - this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines; - this._splitView.layout(widthInPixel); - this._splitView.resizeView(0, widthInPixel * this.layoutData.ratio); - } - setSelection(selection) { - return this._revealReference(selection, true).then(() => { - if (!this._model) { - // disposed - return; - } - // show in tree - this._tree.setSelection([selection]); - this._tree.setFocus([selection]); - }); - } - setModel(newModel) { - // clean up - this._disposeOnNewModel.clear(); - this._model = newModel; - if (this._model) { - return this._onNewModel(); - } - return Promise.resolve(); - } - _onNewModel() { - if (!this._model) { - return Promise.resolve(undefined); - } - if (this._model.isEmpty) { - this.setTitle(''); - this._messageContainer.innerText = _nls_js__WEBPACK_IMPORTED_MODULE_12__["localize"]('noResults', "No results"); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this._messageContainer); - return Promise.resolve(undefined); - } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this._messageContainer); - this._decorationsManager = new DecorationsManager(this._preview, this._model); - this._disposeOnNewModel.add(this._decorationsManager); - // listen on model changes - this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(reference => this._tree.rerender(reference))); - // listen on editor - this._disposeOnNewModel.add(this._preview.onMouseDown(e => { - const { event, target } = e; - if (event.detail !== 2) { - return; - } - const element = this._getFocusedReference(); - if (!element) { - return; - } - this._onDidSelectReference.fire({ - element: { uri: element.uri, range: target.range }, - kind: (event.ctrlKey || event.metaKey || event.altKey) ? 'side' : 'open', - source: 'editor' - }); - })); - // make sure things are rendered - this.container.classList.add('results-loaded'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this._treeContainer); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this._previewContainer); - this._splitView.layout(this._dim.width); - this.focusOnReferenceTree(); - // pick input and a reference to begin with - return this._tree.setInput(this._model.groups.length === 1 ? this._model.groups[0] : this._model); - } - _getFocusedReference() { - const [element] = this._tree.getFocus(); - if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__["OneReference"]) { - return element; - } - else if (element instanceof _referencesModel_js__WEBPACK_IMPORTED_MODULE_19__["FileReferences"]) { - if (element.children.length > 0) { - return element.children[0]; - } - } - return undefined; - } - revealReference(reference) { - return __awaiter(this, void 0, void 0, function* () { - yield this._revealReference(reference, false); - this._onDidSelectReference.fire({ element: reference, kind: 'goto', source: 'tree' }); - }); - } - _revealReference(reference, revealParent) { - return __awaiter(this, void 0, void 0, function* () { - // check if there is anything to do... - if (this._revealedReference === reference) { - return; - } - this._revealedReference = reference; - // Update widget header - if (reference.uri.scheme !== _base_common_network_js__WEBPACK_IMPORTED_MODULE_5__["Schemas"].inMemory) { - this.setTitle(Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__["basenameOrAuthority"])(reference.uri), this._uriLabel.getUriLabel(Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_6__["dirname"])(reference.uri))); - } - else { - this.setTitle(_nls_js__WEBPACK_IMPORTED_MODULE_12__["localize"]('peekView.alternateTitle', "References")); - } - const promise = this._textModelResolverService.createModelReference(reference.uri); - if (this._tree.getInput() === reference.parent) { - this._tree.reveal(reference); - } - else { - if (revealParent) { - this._tree.reveal(reference.parent); - } - yield this._tree.expand(reference.parent); - this._tree.reveal(reference); - } - const ref = yield promise; - if (!this._model) { - // disposed - ref.dispose(); - return; - } - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this._previewModelReference); - // show in editor - const model = ref.object; - if (model) { - const scrollType = this._preview.getModel() === model.textEditorModel ? 0 /* Smooth */ : 1 /* Immediate */; - const sel = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(reference.range).collapseToStart(); - this._previewModelReference = ref; - this._preview.setModel(model.textEditorModel); - this._preview.setSelection(sel); - this._preview.revealRangeInCenter(sel, scrollType); - } - else { - this._preview.setModel(this._previewNotAvailableMessage); - ref.dispose(); - } - }); - } -}; -ReferenceWidget = __decorate([ - __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__["IThemeService"]), - __param(4, _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_10__["ITextModelService"]), - __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_13__["IInstantiationService"]), - __param(6, _peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["IPeekViewService"]), - __param(7, _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__["ILabelService"]), - __param(8, _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_21__["IUndoRedoService"]), - __param(9, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_22__["IKeybindingService"]) -], ReferenceWidget); - -// theming -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__["registerThemingParticipant"])((theme, collector) => { - const findMatchHighlightColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsMatchHighlight"]); - if (findMatchHighlightColor) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${findMatchHighlightColor}; }`); - } - const referenceHighlightColor = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewEditorMatchHighlight"]); - if (referenceHighlightColor) { - collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`); - } - const referenceHighlightBorder = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewEditorMatchHighlightBorder"]); - if (referenceHighlightBorder) { - collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${referenceHighlightBorder}; box-sizing: border-box; }`); - } - const hcOutline = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_16__["activeContrastBorder"]); - if (hcOutline) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - } - const resultsBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsBackground"]); - if (resultsBackground) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`); - } - const resultsMatchForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsMatchForeground"]); - if (resultsMatchForeground) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`); - } - const resultsFileForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsFileForeground"]); - if (resultsFileForeground) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`); - } - const resultsSelectedBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsSelectionBackground"]); - if (resultsSelectedBackground) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); - } - const resultsSelectedForeground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewResultsSelectionForeground"]); - if (resultsSelectedForeground) { - collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); - } - const editorBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewEditorBackground"]); - if (editorBackground) { - collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,` + - `.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {` + - ` background-color: ${editorBackground};` + - `}`); - } - const editorGutterBackground = theme.getColor(_peekView_peekView_js__WEBPACK_IMPORTED_MODULE_18__["peekViewEditorGutterBackground"]); - if (editorGutterBackground) { - collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {` + - ` background-color: ${editorGutterBackground};` + - `}`); - } -}); +var drawTask = function drawTask(elem, task, conf) { + var center = task.x + conf.width / 2; + var g = elem.append('g'); + taskCount++; + var maxHeight = 300 + 5 * 30; + g.append('line').attr('id', 'task' + taskCount).attr('x1', center).attr('y1', task.y).attr('x2', center).attr('y2', maxHeight).attr('class', 'task-line').attr('stroke-width', '1px').attr('stroke-dasharray', '4 2').attr('stroke', '#666'); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + var rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = 'task task-type-' + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + var xPos = task.x + 14; + task.people.forEach(function (person) { + var colour = task.actors[person]; + var circle = { + cx: xPos, + cy: task.y, + r: 7, + fill: colour, + stroke: '#000', + title: person + }; + drawCircle(g, circle); + xPos += 10; + }); -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js ***! - \****************************************************************************************/ -/*! exports provided: OneReference, FilePreview, FileReferences, ReferencesModel */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneReference", function() { return OneReference; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilePreview", function() { return FilePreview; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileReferences", function() { return FileReferences; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferencesModel", function() { return ReferencesModel; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + _drawTextCandidateFunc(conf)(task.task, g, rect.x, rect.y, rect.width, rect.height, { + class: 'task' + }, conf, task.colour); }; +/** + * Draws a background rectangle + * @param elem The html element + * @param bounds The bounds of the drawing + */ - - - - - - - - -class OneReference { - constructor(isProviderFirst, parent, uri, _range, _rangeCallback) { - this.isProviderFirst = isProviderFirst; - this.parent = parent; - this.uri = uri; - this._range = _range; - this._rangeCallback = _rangeCallback; - this.id = _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_5__["defaultGenerator"].nextId(); - } - get range() { - return this._range; - } - set range(value) { - this._range = value; - this._rangeCallback(this); - } - get ariaMessage() { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.oneReference', "symbol in {0} on line {1} at column {2}", Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["basename"])(this.uri), this.range.startLineNumber, this.range.startColumn); - } -} -class FilePreview { - constructor(_modelReference) { - this._modelReference = _modelReference; - } - dispose() { - this._modelReference.dispose(); - } - preview(range, n = 8) { - const model = this._modelReference.object.textEditorModel; - if (!model) { - return undefined; - } - const { startLineNumber, startColumn, endLineNumber, endColumn } = range; - const word = model.getWordUntilPosition({ lineNumber: startLineNumber, column: startColumn - n }); - const beforeRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, word.startColumn, startLineNumber, startColumn); - const afterRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](endLineNumber, endColumn, endLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - const before = model.getValueInRange(beforeRange).replace(/^\s+/, ''); - const inside = model.getValueInRange(range); - const after = model.getValueInRange(afterRange).replace(/\s+$/, ''); - return { - value: before + inside + after, - highlight: { start: before.length, end: before.length + inside.length } - }; - } -} -class FileReferences { - constructor(parent, uri) { - this.parent = parent; - this.uri = uri; - this.children = []; - this._previews = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_7__["ResourceMap"](); - } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this._previews.values()); - this._previews.clear(); - } - getPreview(child) { - return this._previews.get(child.uri); - } - get ariaMessage() { - const len = this.children.length; - if (len === 1) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.fileReferences.1', "1 symbol in {0}, full path {1}", Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["basename"])(this.uri), this.uri.fsPath); - } - else { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.fileReferences.N', "{0} symbols in {1}, full path {2}", len, Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["basename"])(this.uri), this.uri.fsPath); - } - } - resolve(textModelResolverService) { - return __awaiter(this, void 0, void 0, function* () { - if (this._previews.size !== 0) { - return this; - } - for (let child of this.children) { - if (this._previews.has(child.uri)) { - continue; - } - try { - const ref = yield textModelResolverService.createModelReference(child.uri); - this._previews.set(child.uri, new FilePreview(ref)); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"])(err); - } - } - return this; - }); - } -} -class ReferencesModel { - constructor(links, title) { - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this.groups = []; - this.references = []; - this._onDidChangeReferenceRange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event; - this._links = links; - this._title = title; - // grouping and sorting - const [providersFirst] = links; - links.sort(ReferencesModel._compareReferences); - let current; - for (let link of links) { - if (!current || !_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["extUri"].isEqual(current.uri, link.uri, true)) { - // new group - current = new FileReferences(this, link.uri); - this.groups.push(current); - } - // append, check for equality first! - if (current.children.length === 0 || ReferencesModel._compareReferences(link, current.children[current.children.length - 1]) !== 0) { - const oneRef = new OneReference(providersFirst === link, current, link.uri, link.targetSelectionRange || link.range, ref => this._onDidChangeReferenceRange.fire(ref)); - this.references.push(oneRef); - current.children.push(oneRef); - } - } - } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this.groups); - this._disposables.dispose(); - this._onDidChangeReferenceRange.dispose(); - this.groups.length = 0; - } - clone() { - return new ReferencesModel(this._links, this._title); - } - get title() { - return this._title; - } - get isEmpty() { - return this.groups.length === 0; - } - get ariaMessage() { - if (this.isEmpty) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.result.0', "No results found"); - } - else if (this.references.length === 1) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.result.1', "Found 1 symbol in {0}", this.references[0].uri.fsPath); - } - else if (this.groups.length === 1) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.result.n1', "Found {0} symbols in {1}", this.references.length, this.groups[0].uri.fsPath); - } - else { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('aria.result.nm', "Found {0} symbols in {1} files", this.references.length, this.groups.length); - } - } - nextOrPreviousReference(reference, next) { - let { parent } = reference; - let idx = parent.children.indexOf(reference); - let childCount = parent.children.length; - let groupCount = parent.parent.groups.length; - if (groupCount === 1 || next && idx + 1 < childCount || !next && idx > 0) { - // cycling within one file - if (next) { - idx = (idx + 1) % childCount; - } - else { - idx = (idx + childCount - 1) % childCount; - } - return parent.children[idx]; - } - idx = parent.parent.groups.indexOf(parent); - if (next) { - idx = (idx + 1) % groupCount; - return parent.parent.groups[idx].children[0]; - } - else { - idx = (idx + groupCount - 1) % groupCount; - return parent.parent.groups[idx].children[parent.parent.groups[idx].children.length - 1]; - } - } - nearestReference(resource, position) { - const nearest = this.references.map((ref, idx) => { - return { - idx, - prefixLen: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_4__["commonPrefixLength"](ref.uri.toString(), resource.toString()), - offsetDist: Math.abs(ref.range.startLineNumber - position.lineNumber) * 100 + Math.abs(ref.range.startColumn - position.column) - }; - }).sort((a, b) => { - if (a.prefixLen > b.prefixLen) { - return -1; - } - else if (a.prefixLen < b.prefixLen) { - return 1; - } - else if (a.offsetDist < b.offsetDist) { - return -1; - } - else if (a.offsetDist > b.offsetDist) { - return 1; - } - else { - return 0; - } - })[0]; - if (nearest) { - return this.references[nearest.idx]; - } - return undefined; - } - referenceAt(resource, position) { - for (const ref of this.references) { - if (ref.uri.toString() === resource.toString()) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].containsPosition(ref.range, position)) { - return ref; - } - } - } - return undefined; - } - firstReference() { - for (const ref of this.references) { - if (ref.isProviderFirst) { - return ref; - } - } - return this.references[0]; - } - static _compareReferences(a, b) { - return _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["extUri"].compare(a.uri, b.uri) || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts(a.range, b.range); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/symbolNavigation.js ***! - \*****************************************************************************************/ -/*! exports provided: ctxHasSymbols, ISymbolNavigationService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ctxHasSymbols", function() { return ctxHasSymbols; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ISymbolNavigationService", function() { return ISymbolNavigationService; }); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; +var drawBackgroundRect = function drawBackgroundRect(elem, bounds) { + var rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: 'rect' + }); + rectElem.lower(); +}; +var getTextObj = function getTextObj() { + return { + x: 0, + y: 0, + fill: undefined, + 'text-anchor': 'start', + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } +var getNoteRect = function getNoteRect() { + return { + x: 0, + y: 0, + width: 100, + anchor: 'start', + height: 100, + rx: 0, + ry: 0 + }; }; +var _drawTextCandidateFunc = function () { + function byText(content, g, x, y, width, height, textAttrs, colour) { + var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('font-color', colour).style('text-anchor', 'middle').text(content); + + _setTextAttrs(text, textAttrs); + } + + function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { + var taskFontSize = conf.taskFontSize, + taskFontFamily = conf.taskFontFamily; + var lines = content.split(//gi); + + for (var i = 0; i < lines.length; i++) { + var dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + var text = g.append('text').attr('x', x + width / 2).attr('y', y).attr('fill', colour).style('text-anchor', 'middle').style('font-size', taskFontSize).style('font-family', taskFontFamily); + text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]); + text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central'); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf) { + var body = g.append('switch'); + var f = body.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height).attr('position', 'fixed'); + var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%'); + text.append('div').attr('class', 'label').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle') // .style('color', colour) + .text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (var key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + // eslint-disable-line + // noinspection JSUnfilteredForInLoop + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function (conf) { + return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan; + }; +}(); +var initGraphics = function initGraphics(graphics) { + graphics.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + drawRect: drawRect, + drawCircle: drawCircle, + drawSection: drawSection, + drawText: drawText, + drawLabel: drawLabel, + drawTask: drawTask, + drawBackgroundRect: drawBackgroundRect, + getTextObj: getTextObj, + getNoteRect: getNoteRect, + initGraphics: initGraphics +}); +/***/ }), +/***/ "./src/errorRenderer.js": +/*!******************************!*\ + !*** ./src/errorRenderer.js ***! + \******************************/ +/*! exports provided: setConf, draw, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); +/** + * Created by knut on 14-12-11. + */ -const ctxHasSymbols = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('hasSymbols', false); -const ISymbolNavigationService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('ISymbolNavigationService'); -let SymbolNavigationService = class SymbolNavigationService { - constructor(contextKeyService, _editorService, _notificationService, _keybindingService) { - this._editorService = _editorService; - this._notificationService = _notificationService; - this._keybindingService = _keybindingService; - this._currentModel = undefined; - this._currentIdx = -1; - this._ignoreEditorChange = false; - this._ctxHasSymbols = ctxHasSymbols.bindTo(contextKeyService); - } - reset() { - this._ctxHasSymbols.reset(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["dispose"])(this._currentState); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["dispose"])(this._currentMessage); - this._currentModel = undefined; - this._currentIdx = -1; - } - put(anchor) { - const refModel = anchor.parent.parent; - if (refModel.references.length <= 1) { - this.reset(); - return; - } - this._currentModel = refModel; - this._currentIdx = refModel.references.indexOf(anchor); - this._ctxHasSymbols.set(true); - this._showMessage(); - const editorState = new EditorState(this._editorService); - const listener = editorState.onDidChange(_ => { - if (this._ignoreEditorChange) { - return; - } - const editor = this._editorService.getActiveCodeEditor(); - if (!editor) { - return; - } - const model = editor.getModel(); - const position = editor.getPosition(); - if (!model || !position) { - return; - } - let seenUri = false; - let seenPosition = false; - for (const reference of refModel.references) { - if (Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_12__["isEqual"])(reference.uri, model.uri)) { - seenUri = true; - seenPosition = seenPosition || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].containsPosition(reference.range, position); - } - else if (seenUri) { - break; - } - } - if (!seenUri || !seenPosition) { - this.reset(); - } - }); - this._currentState = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["combinedDisposable"])(editorState, listener); - } - revealNext(source) { - if (!this._currentModel) { - return Promise.resolve(); - } - // get next result and advance - this._currentIdx += 1; - this._currentIdx %= this._currentModel.references.length; - const reference = this._currentModel.references[this._currentIdx]; - // status - this._showMessage(); - // open editor, ignore events while that happens - this._ignoreEditorChange = true; - return this._editorService.openCodeEditor({ - resource: reference.uri, - options: { - selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].collapseToStart(reference.range), - selectionRevealType: 3 /* NearTopIfOutsideViewport */ - } - }, source).finally(() => { - this._ignoreEditorChange = false; - }); - } - _showMessage() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["dispose"])(this._currentMessage); - const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult'); - const message = kb - ? Object(_nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"])('location.kb', "Symbol {0} of {1}, {2} for next", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel()) - : Object(_nls_js__WEBPACK_IMPORTED_MODULE_9__["localize"])('location', "Symbol {0} of {1}", this._currentIdx + 1, this._currentModel.references.length); - this._currentMessage = this._notificationService.status(message); - } -}; -SymbolNavigationService = __decorate([ - __param(0, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]), - __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__["ICodeEditorService"]), - __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__["INotificationService"]), - __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]) -], SymbolNavigationService); -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_2__["registerSingleton"])(ISymbolNavigationService, SymbolNavigationService, true); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new class extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorCommand"] { - constructor() { - super({ - id: 'editor.gotoNextSymbolFromResult', - precondition: ctxHasSymbols, - kbOpts: { - weight: 100 /* EditorContrib */, - primary: 70 /* F12 */ - } - }); - } - runEditorCommand(accessor, editor) { - return accessor.get(ISymbolNavigationService).revealNext(editor); - } -}); -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_3__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'editor.gotoNextSymbolFromResult.cancel', - weight: 100 /* EditorContrib */, - when: ctxHasSymbols, - primary: 9 /* Escape */, - handler(accessor) { - accessor.get(ISymbolNavigationService).reset(); - } -}); -// -let EditorState = class EditorState { - constructor(editorService) { - this._listener = new Map(); - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"](); - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"](); - this.onDidChange = this._onDidChange.event; - this._disposables.add(editorService.onCodeEditorRemove(this._onDidRemoveEditor, this)); - this._disposables.add(editorService.onCodeEditorAdd(this._onDidAddEditor, this)); - editorService.listCodeEditors().forEach(this._onDidAddEditor, this); - } - dispose() { - this._disposables.dispose(); - this._onDidChange.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["dispose"])(this._listener.values()); - } - _onDidAddEditor(editor) { - this._listener.set(editor, Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["combinedDisposable"])(editor.onDidChangeCursorPosition(_ => this._onDidChange.fire({ editor })), editor.onDidChangeModelContent(_ => this._onDidChange.fire({ editor })))); - } - _onDidRemoveEditor(editor) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["dispose"])(this._listener.get(editor)); - this._listener.delete(editor); - } +var conf = {}; +var setConf = function setConf(cnf) { + var keys = Object.keys(cnf); + keys.forEach(function (key) { + conf[key] = cnf[key]; + }); }; -EditorState = __decorate([ - __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_5__["ICodeEditorService"]) -], EditorState); +/** + * Draws a an info picture in the tag with id: id based on the graph definition in text. + * @param text + * @param id + */ +var draw = function draw(id, ver) { + try { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Renering svg for syntax error\n'); + var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + id); + var g = svg.append('g'); + g.append('path').attr('class', 'error-icon').attr('d', 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'); + g.append('path').attr('class', 'error-icon').attr('d', 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'); + g.append('path').attr('class', 'error-icon').attr('d', 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'); + g.append('path').attr('class', 'error-icon').attr('d', 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'); + g.append('path').attr('class', 'error-icon').attr('d', 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'); + g.append('path').attr('class', 'error-icon').attr('d', 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'); + g.append('text') // text label for the x axis + .attr('class', 'error-text').attr('x', 1240).attr('y', 250).attr('font-size', '150px').style('text-anchor', 'middle').text('Syntax error in graph'); + g.append('text') // text label for the x axis + .attr('class', 'error-text').attr('x', 1050).attr('y', 400).attr('font-size', '100px').style('text-anchor', 'middle').text('mermaid version ' + ver); + svg.attr('height', 100); + svg.attr('width', 400); + svg.attr('viewBox', '768 0 512 512'); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].error('Error while rendering info diagram'); + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].error(e.message); + } +}; +/* harmony default export */ __webpack_exports__["default"] = ({ + setConf: setConf, + draw: draw +}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js ***! - \****************************************************************************/ -/*! exports provided: getHover */ +/***/ "./src/logger.js": +/*!***********************!*\ + !*** ./src/logger.js ***! + \***********************/ +/*! exports provided: LEVELS, log, setLogLevel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHover", function() { return getHover; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; }); +/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini"); +/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__); +var LEVELS = { + debug: 1, + info: 2, + warn: 3, + error: 4, + fatal: 5 +}; +var log = { + debug: function debug() {}, + info: function info() {}, + warn: function warn() {}, + error: function error() {}, + fatal: function fatal() {} +}; +var setLogLevel = function setLogLevel() { + var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fatal'; + if (isNaN(level)) { + level = level.toLowerCase(); + if (LEVELS[level] !== undefined) { + level = LEVELS[level]; + } + } + log.trace = function () {}; -function getHover(model, position, token) { - const supports = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["HoverProviderRegistry"].ordered(model); - const promises = supports.map(support => { - return Promise.resolve(support.provideHover(model, position, token)).then(hover => { - return hover && isValid(hover) ? hover : undefined; - }, err => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedExternalError"])(err); - return undefined; - }); - }); - return Promise.all(promises).then(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["coalesce"]); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerModelAndPositionCommand"])('_executeHoverProvider', (model, position) => getHover(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None)); -function isValid(result) { - const hasRange = (typeof result.range !== 'undefined'); - const hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0; - return hasRange && hasHtmlContent; -} + log.debug = function () {}; + log.info = function () {}; -/***/ }), + log.warn = function () {}; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js ***! - \*************************************************************************/ -/*! exports provided: ModesHoverController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModesHoverController", function() { return ModesHoverController; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modesContentHover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js"); -/* harmony import */ var _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modesGlyphHover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/services/markersDecorationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../gotoSymbol/link/goToDefinitionAtPosition.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; + log.error = function () {}; + log.fatal = function () {}; + if (level <= LEVELS.fatal) { + log.fatal = console.error ? console.error.bind(console, format('FATAL'), 'color: orange') : console.log.bind(console, '\x1b[35m', format('FATAL')); + } + if (level <= LEVELS.error) { + log.error = console.error ? console.error.bind(console, format('ERROR'), 'color: orange') : console.log.bind(console, '\x1b[31m', format('ERROR')); + } + if (level <= LEVELS.warn) { + log.warn = console.warn ? console.warn.bind(console, format('WARN'), 'color: orange') : console.log.bind(console, "\x1B[33m", format('WARN')); + } + if (level <= LEVELS.info) { + log.info = console.info // ? console.info.bind(console, '\x1b[34m', format('INFO'), 'color: blue') + ? console.info.bind(console, format('INFO'), 'color: lightblue') : console.log.bind(console, '\x1b[34m', format('INFO')); + } + if (level <= LEVELS.debug) { + log.debug = console.debug ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') : console.log.bind(console, '\x1b[32m', format('DEBUG')); + } +}; +var format = function format(level) { + var time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('ss.SSS'); + return "%c".concat(time, " : ").concat(level, " : "); +}; +/***/ }), +/***/ "./src/mermaid.js": +/*!************************!*\ + !*** ./src/mermaid.js ***! + \************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! entity-decode/browser */ "entity-decode/browser"); +/* harmony import */ var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js"); +/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mermaidAPI */ "./src/mermaidAPI.js"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils.js"); +/** + * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render + * the diagrams to svg code. + */ +// import { decode } from 'he'; +/** + * ## init + * Function that goes through the document to find the chart definitions in there and render them. + * + * The function tags the processed attributes with the attribute data-processed and ignores found elements with the + * attribute already set. This way the init function can be triggered several times. + * + * Optionally, `init` can accept in the second argument one of the following: + * - a DOM Node + * - an array of DOM nodes (as would come from a jQuery selector) + * - a W3C selector, a la `.mermaid` + * + * ```mermaid + * graph LR; + * a(Find elements)-->b{Processed} + * b-->|Yes|c(Leave element) + * b-->|No |d(Transform) + * ``` + * Renders the mermaid diagrams + * @param nodes a css selector or an array of nodes + */ +var init = function init() { + var _this = this; -let ModesHoverController = class ModesHoverController { - constructor(_editor, _openerService, _modeService, _markerDecorationsService, _keybindingService, _themeService, _contextKeyService) { - this._editor = _editor; - this._openerService = _openerService; - this._modeService = _modeService; - this._markerDecorationsService = _markerDecorationsService; - this._keybindingService = _keybindingService; - this._themeService = _themeService; - this._toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - this._contentWidget = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["MutableDisposable"](); - this._glyphWidget = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["MutableDisposable"](); - this._isMouseDown = false; - this._hoverClicked = false; - this._hookEvents(); - this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(46 /* hover */)) { - this._hideWidgets(); - this._unhookEvents(); - this._hookEvents(); - } - }); - this._hoverVisibleKey = _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hoverVisible.bindTo(_contextKeyService); - } - get contentWidget() { - if (!this._contentWidget.value) { - this._createHoverWidgets(); - } - return this._contentWidget.value; - } - get glyphWidget() { - if (!this._glyphWidget.value) { - this._createHoverWidgets(); - } - return this._glyphWidget.value; - } - static get(editor) { - return editor.getContribution(ModesHoverController.ID); - } - _hookEvents() { - const hideWidgetsEventHandler = () => this._hideWidgets(); - const hoverOpts = this._editor.getOption(46 /* hover */); - this._isHoverEnabled = hoverOpts.enabled; - this._isHoverSticky = hoverOpts.sticky; - if (this._isHoverEnabled) { - this._toUnhook.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e))); - this._toUnhook.add(this._editor.onMouseUp((e) => this._onEditorMouseUp(e))); - this._toUnhook.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e))); - this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e))); - this._toUnhook.add(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged())); - } - else { - this._toUnhook.add(this._editor.onMouseMove(hideWidgetsEventHandler)); - this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e))); - } - this._toUnhook.add(this._editor.onMouseLeave(hideWidgetsEventHandler)); - this._toUnhook.add(this._editor.onDidChangeModel(hideWidgetsEventHandler)); - this._toUnhook.add(this._editor.onDidScrollChange((e) => this._onEditorScrollChanged(e))); - } - _unhookEvents() { - this._toUnhook.clear(); - } - _onModelDecorationsChanged() { - this.contentWidget.onModelDecorationsChanged(); - this.glyphWidget.onModelDecorationsChanged(); - } - _onEditorScrollChanged(e) { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this._hideWidgets(); - } - } - _onEditorMouseDown(mouseEvent) { - this._isMouseDown = true; - const targetType = mouseEvent.target.type; - if (targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__["ModesContentHoverWidget"].ID) { - this._hoverClicked = true; - // mouse down on top of content hover widget - return; - } - if (targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__["ModesGlyphHoverWidget"].ID) { - // mouse down on top of overlay hover widget - return; - } - if (targetType !== 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail !== _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__["ModesGlyphHoverWidget"].ID) { - this._hoverClicked = false; - } - this._hideWidgets(); - } - _onEditorMouseUp(mouseEvent) { - this._isMouseDown = false; - } - _onEditorMouseMove(mouseEvent) { - let targetType = mouseEvent.target.type; - if (this._isMouseDown && this._hoverClicked && this.contentWidget.isColorPickerVisible()) { - return; - } - if (this._isHoverSticky && targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__["ModesContentHoverWidget"].ID) { - // mouse moved on top of content hover widget - return; - } - if (this._isHoverSticky && targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__["ModesGlyphHoverWidget"].ID) { - // mouse moved on top of overlay hover widget - return; - } - if (targetType === 7 /* CONTENT_EMPTY */) { - const epsilon = this._editor.getOption(36 /* fontInfo */).typicalHalfwidthCharacterWidth / 2; - const data = mouseEvent.target.detail; - if (data && !data.isAfterLines && typeof data.horizontalDistanceToText === 'number' && data.horizontalDistanceToText < epsilon) { - // Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough - targetType = 6 /* CONTENT_TEXT */; - } - } - if (targetType === 6 /* CONTENT_TEXT */) { - this.glyphWidget.hide(); - if (this._isHoverEnabled && mouseEvent.target.range) { - this.contentWidget.startShowingAt(mouseEvent.target.range, 0 /* Delayed */, false); - } - } - else if (targetType === 2 /* GUTTER_GLYPH_MARGIN */) { - this.contentWidget.hide(); - if (this._isHoverEnabled && mouseEvent.target.position) { - this.glyphWidget.startShowingAt(mouseEvent.target.position.lineNumber); - } - } - else { - this._hideWidgets(); - } - } - _onKeyDown(e) { - if (e.keyCode !== 5 /* Ctrl */ && e.keyCode !== 6 /* Alt */ && e.keyCode !== 57 /* Meta */ && e.keyCode !== 4 /* Shift */) { - // Do not hide hover when a modifier key is pressed - this._hideWidgets(); - } - } - _hideWidgets() { - if (!this._glyphWidget.value || !this._contentWidget.value || (this._isMouseDown && this._hoverClicked && this._contentWidget.value.isColorPickerVisible())) { - return; - } - this._glyphWidget.value.hide(); - this._contentWidget.value.hide(); - } - _createHoverWidgets() { - this._contentWidget.value = new _modesContentHover_js__WEBPACK_IMPORTED_MODULE_7__["ModesContentHoverWidget"](this._editor, this._hoverVisibleKey, this._markerDecorationsService, this._keybindingService, this._themeService, this._modeService, this._openerService); - this._glyphWidget.value = new _modesGlyphHover_js__WEBPACK_IMPORTED_MODULE_8__["ModesGlyphHoverWidget"](this._editor, this._modeService, this._openerService); - } - showContentHover(range, mode, focus) { - this.contentWidget.startShowingAt(range, mode, focus); - } - dispose() { - this._unhookEvents(); - this._toUnhook.dispose(); - this._didChangeConfigurationHandler.dispose(); - this._glyphWidget.dispose(); - this._contentWidget.dispose(); - } -}; -ModesHoverController.ID = 'editor.contrib.hover'; -ModesHoverController = __decorate([ - __param(1, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_9__["IOpenerService"]), - __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_6__["IModeService"]), - __param(3, _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_12__["IMarkerDecorationsService"]), - __param(4, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__["IKeybindingService"]), - __param(5, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__["IThemeService"]), - __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["IContextKeyService"]) -], ModesHoverController); - -class ShowHoverAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.showHover', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'showHover', - comment: [ - 'Label for action that will trigger the showing of a hover in the editor.', - 'This allows for users to show the hover without using the mouse.' - ] - }, "Show Hover"), - alias: 'Show Hover', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 39 /* KEY_I */), - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - let controller = ModesHoverController.get(editor); - if (!controller) { - return; - } - const position = editor.getPosition(); - const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, position.column, position.lineNumber, position.column); - const focus = editor.getOption(2 /* accessibilitySupport */) === 2 /* Enabled */; - controller.showContentHover(range, 1 /* Immediate */, focus); - } -} -class ShowDefinitionPreviewHoverAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.showDefinitionPreviewHover', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ - key: 'showDefinitionPreviewHover', - comment: [ - 'Label for action that will trigger the showing of definition preview hover in the editor.', - 'This allows for users to show the definition preview hover without using the mouse.' - ] - }, "Show Definition Preview Hover"), - alias: 'Show Definition Preview Hover', - precondition: undefined - }); - } - run(accessor, editor) { - let controller = ModesHoverController.get(editor); - if (!controller) { - return; - } - const position = editor.getPosition(); - if (!position) { - return; - } - const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](position.lineNumber, position.column, position.lineNumber, position.column); - const goto = _gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_14__["GotoDefinitionAtPositionEditorContribution"].get(editor); - const promise = goto.startFindDefinitionFromCursor(position); - if (promise) { - promise.then(() => { - controller.showContentHover(range, 1 /* Immediate */, true); - }); - } - else { - controller.showContentHover(range, 1 /* Immediate */, true); - } - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorContribution"])(ModesHoverController.ID, ModesHoverController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(ShowHoverAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(ShowDefinitionPreviewHoverAction); -// theming -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_11__["registerThemingParticipant"])((theme, collector) => { - const editorHoverHighlightColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["editorHoverHighlight"]); - if (editorHoverHighlightColor) { - collector.addRule(`.monaco-editor .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); - } - const hoverBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["editorHoverBackground"]); - if (hoverBackground) { - collector.addRule(`.monaco-editor .monaco-hover { background-color: ${hoverBackground}; }`); - } - const hoverBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["editorHoverBorder"]); - if (hoverBorder) { - collector.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${hoverBorder}; }`); - collector.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); - collector.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); - collector.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${hoverBorder.transparent(0.5)}; }`); - } - const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["textLinkForeground"]); - if (link) { - collector.addRule(`.monaco-editor .monaco-hover a { color: ${link}; }`); - } - const hoverForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["editorHoverForeground"]); - if (hoverForeground) { - collector.addRule(`.monaco-editor .monaco-hover { color: ${hoverForeground}; }`); - } - const actionsBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["editorHoverStatusBarBackground"]); - if (actionsBackground) { - collector.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${actionsBackground}; }`); - } - const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_10__["textCodeBlockBackground"]); - if (codeBackground) { - collector.addRule(`.monaco-editor .monaco-hover code { background-color: ${codeBackground}; }`); - } -}); + var conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); // console.log('Starting rendering diagrams (init) - mermaid.init', conf); + var nodes; -/***/ }), + if (arguments.length >= 2) { + /*! sequence config was passed as #1 */ + if (typeof arguments[0] !== 'undefined') { + mermaid.sequenceConfig = arguments[0]; + } -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js ***! - \**********************************************************************************/ -/*! exports provided: HoverOperation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + nodes = arguments[1]; + } else { + nodes = arguments[0]; + } // if last argument is a function this is the callback function -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverOperation", function() { return HoverOperation; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + var callback; -class HoverOperation { - constructor(computer, success, error, progress, hoverTime) { - this._computer = computer; - this._state = 0 /* IDLE */; - this._hoverTime = hoverTime; - this._firstWaitScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this._triggerAsyncComputation(), 0); - this._secondWaitScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this._triggerSyncComputation(), 0); - this._loadingMessageScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this._showLoadingMessage(), 0); - this._asyncComputationPromise = null; - this._asyncComputationPromiseDone = false; - this._completeCallback = success; - this._errorCallback = error; - this._progressCallback = progress; - } - setHoverTime(hoverTime) { - this._hoverTime = hoverTime; - } - _firstWaitTime() { - return this._hoverTime / 2; - } - _secondWaitTime() { - return this._hoverTime / 2; - } - _loadingMessageTime() { - return 3 * this._hoverTime; - } - _triggerAsyncComputation() { - this._state = 2 /* SECOND_WAIT */; - this._secondWaitScheduler.schedule(this._secondWaitTime()); - if (this._computer.computeAsync) { - this._asyncComputationPromiseDone = false; - this._asyncComputationPromise = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => this._computer.computeAsync(token)); - this._asyncComputationPromise.then((asyncResult) => { - this._asyncComputationPromiseDone = true; - this._withAsyncResult(asyncResult); - }, (e) => this._onError(e)); - } - else { - this._asyncComputationPromiseDone = true; - } - } - _triggerSyncComputation() { - if (this._computer.computeSync) { - this._computer.onResult(this._computer.computeSync(), true); - } - if (this._asyncComputationPromiseDone) { - this._state = 0 /* IDLE */; - this._onComplete(this._computer.getResult()); - } - else { - this._state = 3 /* WAITING_FOR_ASYNC_COMPUTATION */; - this._onProgress(this._computer.getResult()); - } - } - _showLoadingMessage() { - if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) { - this._onProgress(this._computer.getResultWithLoadingMessage()); - } - } - _withAsyncResult(asyncResult) { - if (asyncResult) { - this._computer.onResult(asyncResult, false); - } - if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) { - this._state = 0 /* IDLE */; - this._onComplete(this._computer.getResult()); - } - } - _onComplete(value) { - this._completeCallback(value); - } - _onError(error) { - if (this._errorCallback) { - this._errorCallback(error); - } - else { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(error); - } - } - _onProgress(value) { - this._progressCallback(value); - } - start(mode) { - if (mode === 0 /* Delayed */) { - if (this._state === 0 /* IDLE */) { - this._state = 1 /* FIRST_WAIT */; - this._firstWaitScheduler.schedule(this._firstWaitTime()); - this._loadingMessageScheduler.schedule(this._loadingMessageTime()); - } - } - else { - switch (this._state) { - case 0 /* IDLE */: - this._triggerAsyncComputation(); - this._secondWaitScheduler.cancel(); - this._triggerSyncComputation(); - break; - case 2 /* SECOND_WAIT */: - this._secondWaitScheduler.cancel(); - this._triggerSyncComputation(); - break; - } - } - } - cancel() { - this._loadingMessageScheduler.cancel(); - if (this._state === 1 /* FIRST_WAIT */) { - this._firstWaitScheduler.cancel(); - } - if (this._state === 2 /* SECOND_WAIT */) { - this._secondWaitScheduler.cancel(); - if (this._asyncComputationPromise) { - this._asyncComputationPromise.cancel(); - this._asyncComputationPromise = null; - } - } - if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) { - if (this._asyncComputationPromise) { - this._asyncComputationPromise.cancel(); - this._asyncComputationPromise = null; - } - } - this._state = 0 /* IDLE */; + if (typeof arguments[arguments.length - 1] === 'function') { + callback = arguments[arguments.length - 1]; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Callback function found'); + } else { + if (typeof conf.mermaid !== 'undefined') { + if (typeof conf.mermaid.callback === 'function') { + callback = conf.mermaid.callback; + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Callback function found'); + } else { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('No Callback function found'); + } } -} - + } -/***/ }), + nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js ***! - \********************************************************************************/ -/*! exports provided: ContentHoverWidget, GlyphHoverWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Start On Load before: ' + mermaid.startOnLoad); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentHoverWidget", function() { return ContentHoverWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlyphHoverWidget", function() { return GlyphHoverWidget; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/hover/hoverWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + if (typeof mermaid.startOnLoad !== 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Start On Load inner: ' + mermaid.startOnLoad); + _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].updateSiteConfig({ + startOnLoad: mermaid.startOnLoad + }); + } + if (typeof mermaid.ganttConfig !== 'undefined') { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].updateSiteConfig({ + gantt: mermaid.ganttConfig + }); + } + var nextId = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed).next; + var txt; -class ContentHoverWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_1__["Widget"] { - constructor(id, editor, _hoverVisibleKey, _keybindingService) { - super(); - this._hoverVisibleKey = _hoverVisibleKey; - this._keybindingService = _keybindingService; - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = true; - this._hover = this._register(new _base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_2__["HoverWidget"]()); - this._id = id; - this._editor = editor; - this._isVisible = false; - this._stoleFocus = false; - this.onkeydown(this._hover.containerDomNode, (e) => { - if (e.equals(9 /* Escape */)) { - this.hide(); - } - }); - this._register(this._editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(36 /* fontInfo */)) { - this.updateFont(); - } - })); - this._editor.onDidLayoutChange(e => this.layout()); - this.layout(); - this._editor.addContentWidget(this); - this._showAtPosition = null; - this._showAtRange = null; - this._stoleFocus = false; - } - get isVisible() { - return this._isVisible; - } - set isVisible(value) { - this._isVisible = value; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this._hover.containerDomNode, 'hidden', !this._isVisible); - } - getId() { - return this._id; - } - getDomNode() { - return this._hover.containerDomNode; - } - showAt(position, range, focus) { - // Position has changed - this._showAtPosition = position; - this._showAtRange = range; - this._hoverVisibleKey.set(true); - this.isVisible = true; - this._editor.layoutContentWidget(this); - // Simply force a synchronous render on the editor - // such that the widget does not really render with left = '0px' - this._editor.render(); - this._stoleFocus = focus; - if (focus) { - this._hover.containerDomNode.focus(); - } - } - hide() { - if (!this.isVisible) { - return; - } - setTimeout(() => { - // Give commands a chance to see the key - if (!this.isVisible) { - this._hoverVisibleKey.set(false); - } - }, 0); - this.isVisible = false; - this._editor.layoutContentWidget(this); - if (this._stoleFocus) { - this._editor.focus(); - } - } - getPosition() { - if (this.isVisible) { - return { - position: this._showAtPosition, - range: this._showAtRange, - preference: [ - 1 /* ABOVE */, - 2 /* BELOW */ - ] - }; - } - return null; - } - dispose() { - this._editor.removeContentWidget(this); - super.dispose(); - } - updateFont() { - const codeClasses = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code')); - codeClasses.forEach(node => this._editor.applyFontInfo(node)); - } - updateContents(node) { - this._hover.contentsDomNode.textContent = ''; - this._hover.contentsDomNode.appendChild(node); - this.updateFont(); - this._editor.layoutContentWidget(this); - this._hover.onContentsChanged(); - } - _renderAction(parent, actionOptions) { - const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId); - const keybindingLabel = keybinding ? keybinding.getLabel() : null; - return Object(_base_browser_ui_hover_hoverWidget_js__WEBPACK_IMPORTED_MODULE_2__["renderHoverAction"])(parent, actionOptions, keybindingLabel); - } - layout() { - const height = Math.max(this._editor.getLayoutInfo().height / 4, 250); - const { fontSize, lineHeight } = this._editor.getOption(36 /* fontInfo */); - this._hover.contentsDomNode.style.fontSize = `${fontSize}px`; - this._hover.contentsDomNode.style.lineHeight = `${lineHeight}px`; - this._hover.contentsDomNode.style.maxHeight = `${height}px`; - this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`; - } -} -class GlyphHoverWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_1__["Widget"] { - constructor(id, editor) { - super(); - this._id = id; - this._editor = editor; - this._isVisible = false; - this._domNode = document.createElement('div'); - this._domNode.className = 'monaco-hover hidden'; - this._domNode.setAttribute('aria-hidden', 'true'); - this._domNode.setAttribute('role', 'tooltip'); - this._showAtLineNumber = -1; - this._register(this._editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(36 /* fontInfo */)) { - this.updateFont(); - } - })); - this._editor.addOverlayWidget(this); - } - get isVisible() { - return this._isVisible; - } - set isVisible(value) { - this._isVisible = value; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this._domNode, 'hidden', !this._isVisible); - } - getId() { - return this._id; - } - getDomNode() { - return this._domNode; - } - showAt(lineNumber) { - this._showAtLineNumber = lineNumber; - if (!this.isVisible) { - this.isVisible = true; - } - const editorLayout = this._editor.getLayoutInfo(); - const topForLineNumber = this._editor.getTopForLineNumber(this._showAtLineNumber); - const editorScrollTop = this._editor.getScrollTop(); - const lineHeight = this._editor.getOption(51 /* lineHeight */); - const nodeHeight = this._domNode.clientHeight; - const top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2); - this._domNode.style.left = `${editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth}px`; - this._domNode.style.top = `${Math.max(Math.round(top), 0)}px`; - } - hide() { - if (!this.isVisible) { - return; - } - this.isVisible = false; - } - getPosition() { - return null; - } - dispose() { - this._editor.removeOverlayWidget(this); - super.dispose(); + var _loop = function _loop(i) { + var element = nodes[i]; + /*! Check if previously processed */ + + if (!element.getAttribute('data-processed')) { + element.setAttribute('data-processed', true); + } else { + return "continue"; } - updateFont() { - const codeTags = Array.prototype.slice.call(this._domNode.getElementsByTagName('code')); - const codeClasses = Array.prototype.slice.call(this._domNode.getElementsByClassName('code')); - [...codeTags, ...codeClasses].forEach(node => this._editor.applyFontInfo(node)); + + var id = "mermaid-".concat(nextId()); // Fetch the graph definition including tags + + txt = element.innerHTML; // transforms the html to pure text + + txt = entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default()(txt).trim().replace(//gi, '
    '); + var init = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].detectInit(txt); + + if (init) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('Detected early reinit: ', init); } - updateContents(node) { - this._domNode.textContent = ''; - this._domNode.appendChild(node); - this.updateFont(); + + try { + _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].render(id, txt, function (svgCode, bindFunctions) { + element.innerHTML = svgCode; + + if (typeof callback !== 'undefined') { + callback(id); + } + + if (bindFunctions) bindFunctions(element); + }, element); + } catch (e) { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn('Syntax Error rendering'); + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].warn(e); + + if (_this.parseError) { + _this.parseError(e); + } } -} + }; + for (var i = 0; i < nodes.length; i++) { + var _ret = _loop(i); -/***/ }), + if (_ret === "continue") continue; + } +}; -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesContentHover.js ***! - \*************************************************************************************/ -/*! exports provided: ModesContentHoverWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModesContentHoverWidget", function() { return ModesContentHoverWidget; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _colorPicker_color_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../colorPicker/color.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/color.js"); -/* harmony import */ var _colorPicker_colorDetector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../colorPicker/colorDetector.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js"); -/* harmony import */ var _colorPicker_colorPickerModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../colorPicker/colorPickerModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerModel.js"); -/* harmony import */ var _colorPicker_colorPickerWidget_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../colorPicker/colorPickerWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPickerWidget.js"); -/* harmony import */ var _getHover_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./getHover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/getHover.js"); -/* harmony import */ var _hoverOperation_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hoverOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js"); -/* harmony import */ var _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./hoverWidgets.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js"); -/* harmony import */ var _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../markdown/markdownRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../gotoError/gotoError.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _codeAction_codeAction_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../codeAction/codeAction.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js"); -/* harmony import */ var _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../codeAction/codeActionCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionCommands.js"); -/* harmony import */ var _codeAction_types_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../codeAction/types.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var initialize = function initialize(config) { + // mermaidAPI.reset(); + if (typeof config.mermaid !== 'undefined') { + if (typeof config.mermaid.startOnLoad !== 'undefined') { + mermaid.startOnLoad = config.mermaid.startOnLoad; + } + if (typeof config.mermaid.htmlLabels !== 'undefined') { + mermaid.htmlLabels = config.mermaid.htmlLabels; + } + } + _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].initialize(config); // mermaidAPI.reset(); +}; +/** + * ##contentLoaded + * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and + * calls init for rendering the mermaid diagrams on the page. + */ +var contentLoaded = function contentLoaded() { + var config; + if (mermaid.startOnLoad) { + // No config found, do check API config + config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); + if (config.startOnLoad) { + mermaid.init(); + } + } else { + if (typeof mermaid.startOnLoad === 'undefined') { + _logger__WEBPACK_IMPORTED_MODULE_1__["log"].debug('In start, no config'); + config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__["default"].getConfig(); + if (config.startOnLoad) { + mermaid.init(); + } + } + } +}; +if (typeof document !== 'undefined') { + /*! + * Wait for document loaded before starting the execution + */ +window.addEventListener("load",(function(){l()}),!1);var c={startOnLoad:!0,htmlLabels:!0,mermaidAPI:s.default,parse:s.default.parse,render:s.default.render,init:function(){var e,t,n=this,i=s.default.getConfig();arguments.length>=2?( +/*! sequence config was passed as #1 */ +void 0!==arguments[0]&&(c.sequenceConfig=arguments[0]),e=arguments[1]):e=arguments[0],"function"==typeof arguments[arguments.length-1]?(t=arguments[arguments.length-1],o.log.debug("Callback function found")):void 0!==i.mermaid&&("function"==typeof i.mermaid.callback?(t=i.mermaid.callback,o.log.debug("Callback function found")):o.log.debug("No Callback function found")),e=void 0===e?document.querySelectorAll(".mermaid"):"string"==typeof e?document.querySelectorAll(e):e instanceof window.Node?[e]:e,o.log.debug("Start On Load before: "+c.startOnLoad),void 0!==c.startOnLoad&&(o.log.debug("Start On Load inner: "+c.startOnLoad),s.default.updateSiteConfig({startOnLoad:c.startOnLoad})),void 0!==c.ganttConfig&&s.default.updateSiteConfig({gantt:c.ganttConfig});for(var l,d=new a.default.initIdGeneratior(i.deterministicIds,i.deterministicIDSeed),u=function(i){var c=e[i]; +/*! Check if previously processed */if(c.getAttribute("data-processed"))return"continue";c.setAttribute("data-processed",!0);var u="mermaid-".concat(d.next());l=c.innerHTML,l=r()(l).trim().replace(//gi,"
    ");var h=a.default.detectInit(l);h&&o.log.debug("Detected early reinit: ",h);try{s.default.render(u,l,(function(e,n){c.innerHTML=e,void 0!==t&&t(u),n&&n(c)}),c)}catch(e){o.log.warn("Syntax Error rendering"),o.log.warn(e),n.parseError&&n.parseError(e)}},h=0;hf.maxTextSize&&(u="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(i.select)(r).append("div").attr("id","d"+e).attr("style","font-family: "+f.fontFamily).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var p=document.getElementById(e);p&&p.remove();var m=document.querySelector("#d"+e);m&&m.remove(),Object(i.select)("body").append("div").attr("id","d"+e).append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=u,u=ae(u);var y=Object(i.select)("#d"+e).node(),w=oe.default.detectType(u),k=y.firstChild,x=k.firstChild,L="";if(void 0!==f.themeCSS&&(L+="\n".concat(f.themeCSS)),void 0!==f.fontFamily&&(L+="\n:root { --mermaid-font-family: ".concat(f.fontFamily,"}")),void 0!==f.altFontFamily&&(L+="\n:root { --mermaid-alt-font-family: ".concat(f.altFontFamily,"}")),"flowchart"===w||"flowchart-v2"===w||"graph"===w){var D=b.default.getClasses(u);for(var E in D)f.htmlLabels||f.flowchart.htmlLabels?(L+="\n.".concat(E," > * { ").concat(D[E].styles.join(" !important; ")," !important; }"),L+="\n.".concat(E," span { ").concat(D[E].styles.join(" !important; ")," !important; }")):(L+="\n.".concat(E," path { ").concat(D[E].styles.join(" !important; ")," !important; }"),L+="\n.".concat(E," rect { ").concat(D[E].styles.join(" !important; ")," !important; }"),L+="\n.".concat(E," polygon { ").concat(D[E].styles.join(" !important; ")," !important; }"),L+="\n.".concat(E," ellipse { ").concat(D[E].styles.join(" !important; ")," !important; }"),L+="\n.".concat(E," circle { ").concat(D[E].styles.join(" !important; ")," !important; }"),D[E].textStyles&&(L+="\n.".concat(E," tspan { ").concat(D[E].textStyles.join(" !important; ")," !important; }")))}var T=(new o.a)("#".concat(e),Object(ie.default)(w,L,f.themeVariables)),N=document.createElement("style");N.innerHTML=T,k.insertBefore(N,x);try{switch(w){case"git":f.flowchart.arrowMarkerAbsolute=f.arrowMarkerAbsolute,M.default.setConf(f.git),M.default.draw(u,e,!1);break;case"flowchart":f.flowchart.arrowMarkerAbsolute=f.arrowMarkerAbsolute,b.default.setConf(f.flowchart),b.default.draw(u,e,!1);break;case"flowchart-v2":f.flowchart.arrowMarkerAbsolute=f.arrowMarkerAbsolute,v.default.setConf(f.flowchart),v.default.draw(u,e,!1);break;case"sequence":f.sequence.arrowMarkerAbsolute=f.arrowMarkerAbsolute,f.sequenceDiagram?(U.default.setConf(Object.assign(f.sequence,f.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):U.default.setConf(f.sequence),U.default.draw(u,e);break;case"gantt":f.gantt.arrowMarkerAbsolute=f.arrowMarkerAbsolute,S.default.setConf(f.gantt),S.default.draw(u,e);break;case"class":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,c.default.setConf(f.class),c.default.draw(u,e);break;case"classDiagram":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,d.default.setConf(f.class),d.default.draw(u,e);break;case"state":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,G.default.setConf(f.state),G.default.draw(u,e);break;case"stateDiagram":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,Z.default.setConf(f.state),Z.default.draw(u,e);break;case"info":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,O.default.setConf(f.class),O.default.draw(u,e,s.version);break;case"pie":f.class.arrowMarkerAbsolute=f.arrowMarkerAbsolute,j.default.setConf(f.pie),j.default.draw(u,e,s.version);break;case"er":g.default.setConf(f.er),g.default.draw(u,e,s.version);break;case"journey":X.default.setConf(f.journey),X.default.draw(u,e,s.version);break;case"requirement":H.default.setConf(f.requirement),H.default.draw(u,e,s.version)}}catch(t){throw te.default.draw(e,s.version),t}Object(i.select)('[id="'.concat(e,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var I=Object(i.select)("#d"+e).node().innerHTML;if(ne.log.debug("cnf.arrowMarkerAbsolute",f.arrowMarkerAbsolute),f.arrowMarkerAbsolute&&"false"!==f.arrowMarkerAbsolute||(I=I.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),I=(I=le(I)).replace(/
    /g,"
    "),void 0!==n)switch(w){case"flowchart":case"flowchart-v2":n(I,_.default.bindFunctions);break;case"gantt":n(I,C.default.bindFunctions);break;case"class":case"classDiagram":n(I,l.default.bindFunctions);break;default:n(I)}else ne.log.debug("CB = undefined!");var A=Object(i.select)("#d"+e).node();return null!==A&&"function"==typeof A.remove&&Object(i.select)("#d"+e).node().remove(),I},parse:function(e){var t=oe.default.detectInit(e);t&&ne.log.debug("reinit ",t);var n,i=oe.default.detectType(e);switch(ne.log.debug("Type "+i),i){case"git":(n=E.a).parser.yy=L.default;break;case"flowchart":case"flowchart-v2":_.default.clear(),(n=w.a).parser.yy=_.default;break;case"sequence":(n=V.a).parser.yy=z.default;break;case"gantt":(n=x.a).parser.yy=C.default;break;case"class":case"classDiagram":(n=h.a).parser.yy=l.default;break;case"state":case"stateDiagram":(n=q.a).parser.yy=K.default;break;case"info":ne.log.debug("info info info"),(n=I.a).parser.yy=T.default;break;case"pie":ne.log.debug("pie"),(n=R.a).parser.yy=P.default;break;case"er":ne.log.debug("er"),(n=m.a).parser.yy=f.default;break;case"journey":ne.log.debug("Journey"),(n=ee.a).parser.yy=J.default;break;case"requirement":case"requirementDiagram":console.log("RequirementDiagram"),ne.log.debug("RequirementDiagram"),(n=B.a).parser.yy=W.default}return n.parser.yy.graphType=i,n.parser.yy.parseError=function(e,t){throw{str:e,hash:t}},n.parse(e),n},parseDirective:function(e,t,n,i){try{if(void 0!==t)switch(t=t.trim(),n){case"open_directive":ce={};break;case"type_directive":ce.type=t.toLowerCase();break;case"arg_directive":ce.args=JSON.parse(t);break;case"close_directive":de(e,ce,i),ce=null}}catch(e){ne.log.error("Error while rendering sequenceDiagram directive: ".concat(t," jison context: ").concat(n)),ne.log.error(e.message)}},initialize:function(e){e&&e.fontFamily&&(e.themeVariables&&e.themeVariables.fontFamily||(e.themeVariables={fontFamily:e.fontFamily})),a.saveConfigFromInitilize(e),e&&e.theme&&re.default[e.theme]?e.themeVariables=re.default[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=re.default.default.getThemeVariables(e.themeVariables));var t="object"===se(e)?a.setSiteConfig(e):a.getSiteConfig();ue(t),Object(ne.setLogLevel)(t.logLevel)},reinitialize:he,getConfig:a.getConfig,setConfig:a.setConfig,getSiteConfig:a.getSiteConfig,updateSiteConfig:a.updateSiteConfig,reset:function(){a.reset()},globalReset:function(){a.reset(a.defaultConfig),ue(a.getConfig())},defaultConfig:a.defaultConfig});Object(ne.setLogLevel)(a.getConfig().logLevel),a.reset(a.getConfig()),t.default=fe},"./src/styles.js": +/*!***********************!*\ + !*** ./src/styles.js ***! + \***********************/ +/*! exports provided: calcThemeVariables, default */function(e,t,n){"use strict";n.r(t),n.d(t,"calcThemeVariables",(function(){return p}));var i=n(/*! ./diagrams/class/styles */"./src/diagrams/class/styles.js"),r=n(/*! ./diagrams/er/styles */"./src/diagrams/er/styles.js"),o=n(/*! ./diagrams/flowchart/styles */"./src/diagrams/flowchart/styles.js"),s=n(/*! ./diagrams/gantt/styles */"./src/diagrams/gantt/styles.js"),a=n(/*! ./diagrams/git/styles */"./src/diagrams/git/styles.js"),l=n(/*! ./diagrams/info/styles */"./src/diagrams/info/styles.js"),c=n(/*! ./diagrams/pie/styles */"./src/diagrams/pie/styles.js"),d=n(/*! ./diagrams/requirement/styles */"./src/diagrams/requirement/styles.js"),u=n(/*! ./diagrams/sequence/styles */"./src/diagrams/sequence/styles.js"),h=n(/*! ./diagrams/state/styles */"./src/diagrams/state/styles.js"),f=n(/*! ./diagrams/user-journey/styles */"./src/diagrams/user-journey/styles.js"),g={flowchart:o.default,"flowchart-v2":o.default,sequence:u.default,gantt:s.default,classDiagram:i.default,"classDiagram-v2":i.default,class:i.default,stateDiagram:h.default,state:h.default,git:a.default,info:l.default,pie:c.default,er:r.default,journey:f.default,requirement:d.default},p=function(e,t){return e.calcColors(t)};t.default=function(e,t,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(g[e](n),"\n\n ").concat(t,"\n\n ").concat(e," { fill: apa;}\n")}},"./src/themes/index.js": +/*!*****************************!*\ + !*** ./src/themes/index.js ***! + \*****************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _theme_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./theme-base */ "./src/themes/theme-base.js"); +/* harmony import */ var _theme_dark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-dark */ "./src/themes/theme-dark.js"); +/* harmony import */ var _theme_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-default */ "./src/themes/theme-default.js"); +/* harmony import */ var _theme_forest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-forest */ "./src/themes/theme-forest.js"); +/* harmony import */ var _theme_neutral__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./theme-neutral */ "./src/themes/theme-neutral.js"); +/* harmony default export */ __webpack_exports__["default"] = ({ + base: { + getThemeVariables: _theme_base__WEBPACK_IMPORTED_MODULE_0__["getThemeVariables"] + }, + dark: { + getThemeVariables: _theme_dark__WEBPACK_IMPORTED_MODULE_1__["getThemeVariables"] + }, + default: { + getThemeVariables: _theme_default__WEBPACK_IMPORTED_MODULE_2__["getThemeVariables"] + }, + forest: { + getThemeVariables: _theme_forest__WEBPACK_IMPORTED_MODULE_3__["getThemeVariables"] + }, + neutral: { + getThemeVariables: _theme_neutral__WEBPACK_IMPORTED_MODULE_4__["getThemeVariables"] + } +}); +/***/ }), +/***/ "./src/themes/theme-base.js": +/*!**********************************!*\ + !*** ./src/themes/theme-base.js ***! + \**********************************/ +/*! exports provided: getThemeVariables */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +var Theme = +/*#__PURE__*/ +function () { + function Theme() { + _classCallCheck(this, Theme); + /** # Base variables */ + /** * background - used to know what the background color is of the diagram. This is used for deducing colors for istance line color. Defaulr value is #f4f4f4. */ + this.background = '#f4f4f4'; + this.darkMode = false; // this.background = '#0c0c0c'; + // this.darkMode = true; + this.primaryColor = '#fff4dd'; // this.background = '#0c0c0c'; + // this.primaryColor = '#1f1f00'; + this.noteBkgColor = '#fff5ad'; + this.noteTextColor = '#333'; // dark + // this.primaryColor = '#034694'; + // this.primaryColor = '#f2ee7e'; + // this.primaryColor = '#9f33be'; + // this.primaryColor = '#f0fff0'; + // this.primaryColor = '#fa255e'; + // this.primaryColor = '#ECECFF'; + // this.secondaryColor = '#c39ea0'; + // this.tertiaryColor = '#f8e5e5'; + // this.secondaryColor = '#dfdfde'; + // this.tertiaryColor = '#CCCCFF'; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = '16px'; // this.updateColors(); + } + _createClass(Theme, [{ + key: "updateColors", + value: function updateColors() { + // The || is to make sure that if the variable has been defiend by a user override that value is to be used -const $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]; -class ColorHover { - constructor(range, color, provider) { - this.range = range; - this.color = color; - this.provider = provider; - } -} -class MarkerHover { - constructor(range, marker) { - this.range = range; - this.marker = marker; - } -} -class ModesContentComputer { - constructor(editor, _markerDecorationsService) { - this._markerDecorationsService = _markerDecorationsService; - this._editor = editor; - this._result = []; - } - setRange(range) { - this._range = range; - this._result = []; - } - clearResult() { - this._result = []; - } - computeAsync(token) { - if (!this._editor.hasModel() || !this._range) { - return Promise.resolve([]); - } - const model = this._editor.getModel(); - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["HoverProviderRegistry"].has(model)) { - return Promise.resolve([]); - } - return Object(_getHover_js__WEBPACK_IMPORTED_MODULE_14__["getHover"])(model, new _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](this._range.startLineNumber, this._range.startColumn), token); - } - computeSync() { - if (!this._editor.hasModel() || !this._range) { - return []; - } - const model = this._editor.getModel(); - const lineNumber = this._range.startLineNumber; - if (lineNumber > this._editor.getModel().getLineCount()) { - // Illegal line number => no results - return []; - } - const colorDetector = _colorPicker_colorDetector_js__WEBPACK_IMPORTED_MODULE_11__["ColorDetector"].get(this._editor); - const maxColumn = model.getLineMaxColumn(lineNumber); - const lineDecorations = this._editor.getLineDecorations(lineNumber); - let didFindColor = false; - const hoverRange = this._range; - const result = lineDecorations.map((d) => { - const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1; - const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn; - if (startColumn > hoverRange.startColumn || hoverRange.endColumn > endColumn) { - return null; - } - const range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](hoverRange.startLineNumber, startColumn, hoverRange.startLineNumber, endColumn); - const marker = this._markerDecorationsService.getMarker(model, d); - if (marker) { - return new MarkerHover(range, marker); - } - const colorData = colorDetector.getColorData(d.range.getStartPosition()); - if (!didFindColor && colorData) { - didFindColor = true; - const { color, range } = colorData.colorInfo; - return new ColorHover(range, color, colorData.provider); - } - else { - if (Object(_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["isEmptyMarkdownString"])(d.options.hoverMessage)) { - return null; - } - const contents = d.options.hoverMessage ? Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_19__["asArray"])(d.options.hoverMessage) : []; - return { contents, range }; - } - }); - return Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_19__["coalesce"])(result); - } - onResult(result, isFromSynchronousComputation) { - // Always put synchronous messages before asynchronous ones - if (isFromSynchronousComputation) { - this._result = result.concat(this._result.sort((a, b) => { - if (a instanceof ColorHover) { // sort picker messages at to the top - return -1; - } - else if (b instanceof ColorHover) { - return 1; - } - return 0; - })); - } - else { - this._result = this._result.concat(result); - } - } - getResult() { - return this._result.slice(0); - } - getResultWithLoadingMessage() { - return this._result.slice(0).concat([this._getLoadingMessage()]); - } - _getLoadingMessage() { - return { - range: this._range, - contents: [new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["MarkdownString"]().appendText(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('modesContentHover.loading', "Loading..."))] - }; - } -} -const markerCodeActionTrigger = { - type: 2 /* Manual */, - filter: { include: _codeAction_types_js__WEBPACK_IMPORTED_MODULE_28__["CodeActionKind"].QuickFix } -}; -class ModesContentHoverWidget extends _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_16__["ContentHoverWidget"] { - constructor(editor, _hoverVisibleKey, markerDecorationsService, keybindingService, _themeService, _modeService, _openerService = _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_23__["NullOpenerService"]) { - super(ModesContentHoverWidget.ID, editor, _hoverVisibleKey, keybindingService); - this._themeService = _themeService; - this._modeService = _modeService; - this._openerService = _openerService; - this.renderDisposable = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["MutableDisposable"]()); - this._messages = []; - this._lastRange = null; - this._computer = new ModesContentComputer(this._editor, markerDecorationsService); - this._highlightDecorations = []; - this._isChangingDecorations = false; - this._shouldFocus = false; - this._colorPicker = null; - this._hoverOperation = new _hoverOperation_js__WEBPACK_IMPORTED_MODULE_15__["HoverOperation"](this._computer, result => this._withResult(result, true), null, result => this._withResult(result, false), this._editor.getOption(46 /* hover */).delay); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.getDomNode(), _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].FOCUS, () => { - if (this._colorPicker) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.getDomNode(), 'colorpicker-hover'); - } - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.getDomNode(), _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].BLUR, () => { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this.getDomNode(), 'colorpicker-hover'); - })); - this._register(editor.onDidChangeConfiguration((e) => { - this._hoverOperation.setHoverTime(this._editor.getOption(46 /* hover */).delay); - })); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_9__["TokenizationRegistry"].onDidChange((e) => { - if (this.isVisible && this._lastRange && this._messages.length > 0) { - this._hover.contentsDomNode.textContent = ''; - this._renderMessages(this._lastRange, this._messages); - } - })); - } - dispose() { - this._hoverOperation.cancel(); - super.dispose(); - } - onModelDecorationsChanged() { - if (this._isChangingDecorations) { - return; - } - if (this.isVisible) { - // The decorations have changed and the hover is visible, - // we need to recompute the displayed text - this._hoverOperation.cancel(); - this._computer.clearResult(); - if (!this._colorPicker) { // TODO@Michel ensure that displayed text for other decorations is computed even if color picker is in place - this._hoverOperation.start(0 /* Delayed */); - } - } - } - startShowingAt(range, mode, focus) { - if (this._lastRange && this._lastRange.equalsRange(range)) { - // We have to show the widget at the exact same range as before, so no work is needed - return; - } - this._hoverOperation.cancel(); - if (this.isVisible) { - // The range might have changed, but the hover is visible - // Instead of hiding it completely, filter out messages that are still in the new range and - // kick off a new computation - if (!this._showAtPosition || this._showAtPosition.lineNumber !== range.startLineNumber) { - this.hide(); - } - else { - let filteredMessages = []; - for (let i = 0, len = this._messages.length; i < len; i++) { - const msg = this._messages[i]; - const rng = msg.range; - if (rng && rng.startColumn <= range.startColumn && rng.endColumn >= range.endColumn) { - filteredMessages.push(msg); - } - } - if (filteredMessages.length > 0) { - if (hoverContentsEquals(filteredMessages, this._messages)) { - return; - } - this._renderMessages(range, filteredMessages); - } - else { - this.hide(); - } - } - } - this._lastRange = range; - this._computer.setRange(range); - this._shouldFocus = focus; - this._hoverOperation.start(mode); - } - hide() { - this._lastRange = null; - this._hoverOperation.cancel(); - super.hide(); - this._isChangingDecorations = true; - this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []); - this._isChangingDecorations = false; - this.renderDisposable.clear(); - this._colorPicker = null; - } - isColorPickerVisible() { - if (this._colorPicker) { - return true; - } - return false; - } - _withResult(result, complete) { - this._messages = result; - if (this._lastRange && this._messages.length > 0) { - this._renderMessages(this._lastRange, this._messages); - } - else if (complete) { - this.hide(); - } - } - _renderMessages(renderRange, messages) { - this.renderDisposable.dispose(); - this._colorPicker = null; - // update column from which to show - let renderColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; - let highlightRange = messages[0].range ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].lift(messages[0].range) : null; - let fragment = document.createDocumentFragment(); - let isEmptyHoverContent = true; - let containColorPicker = false; - const markdownDisposeables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - const markerMessages = []; - messages.forEach((msg) => { - if (!msg.range) { - return; - } - renderColumn = Math.min(renderColumn, msg.range.startColumn); - highlightRange = highlightRange ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].plusRange(highlightRange, msg.range) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].lift(msg.range); - if (msg instanceof ColorHover) { - containColorPicker = true; - const { red, green, blue, alpha } = msg.color; - const rgba = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__["RGBA"](Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha); - const color = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"](rgba); - if (!this._editor.hasModel()) { - return; - } - const editorModel = this._editor.getModel(); - let range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](msg.range.startLineNumber, msg.range.startColumn, msg.range.endLineNumber, msg.range.endColumn); - let colorInfo = { range: msg.range, color: msg.color }; - // create blank olor picker model and widget first to ensure it's positioned correctly. - const model = new _colorPicker_colorPickerModel_js__WEBPACK_IMPORTED_MODULE_12__["ColorPickerModel"](color, [], 0); - const widget = new _colorPicker_colorPickerWidget_js__WEBPACK_IMPORTED_MODULE_13__["ColorPickerWidget"](fragment, model, this._editor.getOption(115 /* pixelRatio */), this._themeService); - Object(_colorPicker_color_js__WEBPACK_IMPORTED_MODULE_10__["getColorPresentations"])(editorModel, colorInfo, msg.provider, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationToken"].None).then(colorPresentations => { - model.colorPresentations = colorPresentations || []; - if (!this._editor.hasModel()) { - // gone... - return; - } - const originalText = this._editor.getModel().getValueInRange(msg.range); - model.guessColorPresentation(color, originalText); - const updateEditorModel = () => { - let textEdits; - let newRange; - if (model.presentation.textEdit) { - textEdits = [model.presentation.textEdit]; - newRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](model.presentation.textEdit.range.startLineNumber, model.presentation.textEdit.range.startColumn, model.presentation.textEdit.range.endLineNumber, model.presentation.textEdit.range.endColumn); - newRange = newRange.setEndPosition(newRange.endLineNumber, newRange.startColumn + model.presentation.textEdit.text.length); - } - else { - textEdits = [{ identifier: null, range, text: model.presentation.label, forceMoveMarkers: false }]; - newRange = range.setEndPosition(range.endLineNumber, range.startColumn + model.presentation.label.length); - } - this._editor.pushUndoStop(); - this._editor.executeEdits('colorpicker', textEdits); - if (model.presentation.additionalTextEdits) { - textEdits = [...model.presentation.additionalTextEdits]; - this._editor.executeEdits('colorpicker', textEdits); - this.hide(); - } - this._editor.pushUndoStop(); - range = newRange; - }; - const updateColorPresentations = (color) => { - return Object(_colorPicker_color_js__WEBPACK_IMPORTED_MODULE_10__["getColorPresentations"])(editorModel, { - range: range, - color: { - red: color.rgba.r / 255, - green: color.rgba.g / 255, - blue: color.rgba.b / 255, - alpha: color.rgba.a - } - }, msg.provider, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_2__["CancellationToken"].None).then((colorPresentations) => { - model.colorPresentations = colorPresentations || []; - }); - }; - const colorListener = model.onColorFlushed((color) => { - updateColorPresentations(color).then(updateEditorModel); - }); - const colorChangeListener = model.onDidChangeColor(updateColorPresentations); - this._colorPicker = widget; - this.showAt(range.getStartPosition(), range, this._shouldFocus); - this.updateContents(fragment); - this._colorPicker.layout(); - this.renderDisposable.value = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["combinedDisposable"])(colorListener, colorChangeListener, widget, markdownDisposeables); - }); - } - else { - if (msg instanceof MarkerHover) { - markerMessages.push(msg); - isEmptyHoverContent = false; - } - else { - msg.contents - .filter(contents => !Object(_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["isEmptyMarkdownString"])(contents)) - .forEach(contents => { - const markdownHoverElement = $('div.hover-row.markdown-hover'); - const hoverContentsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](markdownHoverElement, $('div.hover-contents')); - const renderer = markdownDisposeables.add(new _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_17__["MarkdownRenderer"](this._editor, this._modeService, this._openerService)); - markdownDisposeables.add(renderer.onDidRenderCodeBlock(() => { - hoverContentsElement.className = 'hover-contents code-hover-contents'; - this._hover.onContentsChanged(); - })); - const renderedContents = markdownDisposeables.add(renderer.render(contents)); - hoverContentsElement.appendChild(renderedContents.element); - fragment.appendChild(markdownHoverElement); - isEmptyHoverContent = false; - }); - } - } - }); - if (markerMessages.length) { - markerMessages.forEach(msg => fragment.appendChild(this.renderMarkerHover(msg))); - const markerHoverForStatusbar = markerMessages.length === 1 ? markerMessages[0] : markerMessages.sort((a, b) => _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["MarkerSeverity"].compare(a.marker.severity, b.marker.severity))[0]; - fragment.appendChild(this.renderMarkerStatusbar(markerHoverForStatusbar)); - } - // show - if (!containColorPicker && !isEmptyHoverContent) { - this.showAt(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_6__["Position"](renderRange.startLineNumber, renderColumn), highlightRange, this._shouldFocus); - this.updateContents(fragment); - } - this._isChangingDecorations = true; - this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, highlightRange ? [{ - range: highlightRange, - options: ModesContentHoverWidget._DECORATION_OPTIONS - }] : []); - this._isChangingDecorations = false; - } - renderMarkerHover(markerHover) { - const hoverElement = $('div.hover-row'); - const markerElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](hoverElement, $('div.marker.hover-contents')); - const { source, message, code, relatedInformation } = markerHover.marker; - this._editor.applyFontInfo(markerElement); - const messageElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](markerElement, $('span')); - messageElement.style.whiteSpace = 'pre-wrap'; - messageElement.innerText = message; - if (source || code) { - // Code has link - if (code && typeof code !== 'string') { - const sourceAndCodeElement = $('span'); - if (source) { - const sourceElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](sourceAndCodeElement, $('span')); - sourceElement.innerText = source; - } - this._codeLink = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](sourceAndCodeElement, $('a.code-link')); - this._codeLink.setAttribute('href', code.target.toString()); - this._codeLink.onclick = (e) => { - this._openerService.open(code.target); - e.preventDefault(); - e.stopPropagation(); - }; - const codeElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this._codeLink, $('span')); - codeElement.innerText = code.value; - const detailsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](markerElement, sourceAndCodeElement); - detailsElement.style.opacity = '0.6'; - detailsElement.style.paddingLeft = '6px'; - } - else { - const detailsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](markerElement, $('span')); - detailsElement.style.opacity = '0.6'; - detailsElement.style.paddingLeft = '6px'; - detailsElement.innerText = source && code ? `${source}(${code})` : source ? source : `(${code})`; - } - } - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_19__["isNonEmptyArray"])(relatedInformation)) { - for (const { message, resource, startLineNumber, startColumn } of relatedInformation) { - const relatedInfoContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](markerElement, $('div')); - relatedInfoContainer.style.marginTop = '8px'; - const a = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](relatedInfoContainer, $('a')); - a.innerText = `${Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_21__["basename"])(resource)}(${startLineNumber}, ${startColumn}): `; - a.style.cursor = 'pointer'; - a.onclick = e => { - e.stopPropagation(); - e.preventDefault(); - if (this._openerService) { - this._openerService.open(resource.with({ fragment: `${startLineNumber},${startColumn}` }), { fromUserGesture: true }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_22__["onUnexpectedError"]); - } - }; - const messageElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](relatedInfoContainer, $('span')); - messageElement.innerText = message; - this._editor.applyFontInfo(messageElement); - } - } - return hoverElement; - } - renderMarkerStatusbar(markerHover) { - const hoverElement = $('div.hover-row.status-bar'); - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - const actionsElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](hoverElement, $('div.actions')); - if (markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["MarkerSeverity"].Error || markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["MarkerSeverity"].Warning || markerHover.marker.severity === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["MarkerSeverity"].Info) { - disposables.add(this._renderAction(actionsElement, { - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('peek problem', "Peek Problem"), - commandId: _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_24__["NextMarkerAction"].ID, - run: () => { - this.hide(); - _gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_24__["MarkerController"].get(this._editor).showAtMarker(markerHover.marker); - this._editor.focus(); - } - })); - } - if (!this._editor.getOption(72 /* readOnly */)) { - const quickfixPlaceholderElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](actionsElement, $('div')); - quickfixPlaceholderElement.style.opacity = '0'; - quickfixPlaceholderElement.style.transition = 'opacity 0.2s'; - setTimeout(() => quickfixPlaceholderElement.style.opacity = '1', 200); - quickfixPlaceholderElement.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('checkingForQuickFixes', "Checking for quick fixes..."); - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => quickfixPlaceholderElement.remove())); - const codeActionsPromise = this.getCodeActions(markerHover.marker); - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => codeActionsPromise.cancel())); - codeActionsPromise.then(actions => { - quickfixPlaceholderElement.style.transition = ''; - quickfixPlaceholderElement.style.opacity = '1'; - if (!actions.validActions.length) { - actions.dispose(); - quickfixPlaceholderElement.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('noQuickFixes', "No quick fixes available"); - return; - } - quickfixPlaceholderElement.remove(); - let showing = false; - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => { - if (!showing) { - actions.dispose(); - } - })); - disposables.add(this._renderAction(actionsElement, { - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quick fixes', "Quick Fix..."), - commandId: _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_27__["QuickFixAction"].Id, - run: (target) => { - showing = true; - const controller = _codeAction_codeActionCommands_js__WEBPACK_IMPORTED_MODULE_27__["QuickFixController"].get(this._editor); - const elementPosition = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](target); - // Hide the hover pre-emptively, otherwise the editor can close the code actions - // context menu as well when using keyboard navigation - this.hide(); - controller.showCodeActions(markerCodeActionTrigger, actions, { - x: elementPosition.left + 6, - y: elementPosition.top + elementPosition.height + 6 - }); - } - })); - }); - } - this.renderDisposable.value = disposables; - return hoverElement; - } - getCodeActions(marker) { - return Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_25__["createCancelablePromise"])(cancellationToken => { - return Object(_codeAction_codeAction_js__WEBPACK_IMPORTED_MODULE_26__["getCodeActions"])(this._editor.getModel(), new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn), markerCodeActionTrigger, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_30__["Progress"].None, cancellationToken); - }); - } -} -ModesContentHoverWidget.ID = 'editor.contrib.modesContentHoverWidget'; -ModesContentHoverWidget._DECORATION_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__["ModelDecorationOptions"].register({ - className: 'hoverHighlight' -}); -function hoverContentsEquals(first, second) { - if ((!first && second) || (first && !second) || first.length !== second.length) { - return false; - } - for (let i = 0; i < first.length; i++) { - const firstElement = first[i]; - const secondElement = second[i]; - if (firstElement instanceof MarkerHover && secondElement instanceof MarkerHover) { - return _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["IMarkerData"].makeKey(firstElement.marker) === _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_20__["IMarkerData"].makeKey(secondElement.marker); - } - if (firstElement instanceof ColorHover || secondElement instanceof ColorHover) { - return false; - } - if (firstElement instanceof MarkerHover || secondElement instanceof MarkerHover) { - return false; - } - if (!Object(_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_4__["markedStringsEquals"])(firstElement.contents, secondElement.contents)) { - return false; - } - } - return true; -} -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["registerThemingParticipant"])((theme, collector) => { - const linkFg = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_29__["textLinkForeground"]); - if (linkFg) { - collector.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${linkFg}; }`); - } -}); + /* Main */ + this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#ddd' : '#333'); // invert(this.primaryColor); + this.secondaryColor = this.secondaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: -120 + }); + this.tertiaryColor = this.tertiaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 180, + l: 5 + }); + this.primaryBorderColor = this.primaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); + this.secondaryBorderColor = this.secondaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = this.tertiaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); + this.noteBorderColor = this.noteBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.noteBkgColor, this.darkMode); + this.secondaryTextColor = this.secondaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); + this.tertiaryTextColor = this.tertiaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); + this.lineColor = this.lineColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); + this.textColor = this.textColor || this.primaryTextColor; + /* Flowchart variables */ -/***/ }), + this.nodeBkg = this.nodeBkg || this.primaryColor; + this.mainBkg = this.mainBkg || this.primaryColor; + this.nodeBorder = this.nodeBorder || this.primaryBorderColor; + this.clusterBkg = this.clusterBkg || this.tertiaryColor; + this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor; + this.defaultLinkColor = this.defaultLinkColor || this.lineColor; + this.titleColor = this.titleColor || this.tertiaryTextColor; + this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.secondaryColor, 30) : this.secondaryColor); + this.nodeTextColor = this.nodeTextColor || this.primaryTextColor; + /* Sequence Diagram variables */ + // this.actorBorder = lighten(this.border1, 0.5); -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/modesGlyphHover.js ***! - \***********************************************************************************/ -/*! exports provided: ModesGlyphHoverWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this.actorBorder = this.actorBorder || this.primaryBorderColor; + this.actorBkg = this.actorBkg || this.mainBkg; + this.actorTextColor = this.actorTextColor || this.primaryTextColor; + this.actorLineColor = this.actorLineColor || 'grey'; + this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg; + this.signalColor = this.signalColor || this.textColor; + this.signalTextColor = this.signalTextColor || this.textColor; + this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder; + this.labelTextColor = this.labelTextColor || this.actorTextColor; + this.loopTextColor = this.loopTextColor || this.actorTextColor; + this.activationBorderColor = this.activationBorderColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.secondaryColor, 10); + this.activationBkgColor = this.activationBkgColor || this.secondaryColor; + this.sequenceNumberColor = this.sequenceNumberColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.lineColor); + /* Gantt chart variables */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModesGlyphHoverWidget", function() { return ModesGlyphHoverWidget; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _hoverOperation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hoverOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverOperation.js"); -/* harmony import */ var _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hoverWidgets.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hoverWidgets.js"); -/* harmony import */ var _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../markdown/markdownRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor; + this.altSectionBkgColor = this.altSectionBkgColor || 'white'; + this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor; + this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor; + this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor; + this.taskBkgColor = this.taskBkgColor || this.primaryColor; + this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor; + this.activeTaskBkgColor = this.activeTaskBkgColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.primaryColor, 23); + this.gridColor = this.gridColor || 'lightgrey'; + this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey'; + this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey'; + this.critBorderColor = this.critBorderColor || '#ff8888'; + this.critBkgColor = this.critBkgColor || 'red'; + this.todayLineColor = this.todayLineColor || 'red'; + this.taskTextColor = this.taskTextColor || this.textColor; + this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor; + this.taskTextLightColor = this.taskTextLightColor || this.textColor; + this.taskTextColor = this.taskTextColor || this.primaryTextColor; + this.taskTextDarkColor = this.taskTextDarkColor || this.textColor; + this.taskTextClickableColor = this.taskTextClickableColor || '#003163'; + /* state colors */ + this.labelColor = this.labelColor || this.primaryTextColor; + this.altBackground = this.altBackground || this.tertiaryColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + /* class */ + this.classText = this.classText || this.textColor; + /* user-journey */ + this.fillType0 = this.fillType0 || this.primaryColor; + this.fillType1 = this.fillType1 || this.secondaryColor; + this.fillType2 = this.fillType2 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 64 + }); + this.fillType3 = this.fillType3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 64 + }); + this.fillType4 = this.fillType4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: -64 + }); + this.fillType5 = this.fillType5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: -64 + }); + this.fillType6 = this.fillType6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 128 + }); + this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 128 + }); + } + }, { + key: "calculate", + value: function calculate(overrides) { + var _this = this; + if (_typeof(overrides) !== 'object') { + // Calculate colors form base colors + this.updateColors(); + return; + } + var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); // Calculate colors form base colors + this.updateColors(); // Copy values from overrides again in case of an override of derived value -class MarginComputer { - constructor(editor) { - this._editor = editor; - this._lineNumber = -1; - this._result = []; - } - setLineNumber(lineNumber) { - this._lineNumber = lineNumber; - this._result = []; - } - clearResult() { - this._result = []; - } - computeSync() { - const toHoverMessage = (contents) => { - return { - value: contents - }; - }; - const lineDecorations = this._editor.getLineDecorations(this._lineNumber); - const result = []; - if (!lineDecorations) { - return result; - } - for (const d of lineDecorations) { - if (!d.options.glyphMarginClassName) { - continue; - } - const hoverMessage = d.options.glyphMarginHoverMessage; - if (!hoverMessage || Object(_base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_1__["isEmptyMarkdownString"])(hoverMessage)) { - continue; - } - result.push(...Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_7__["asArray"])(hoverMessage).map(toHoverMessage)); - } - return result; - } - onResult(result, isFromSynchronousComputation) { - this._result = this._result.concat(result); - } - getResult() { - return this._result; - } - getResultWithLoadingMessage() { - return this.getResult(); - } -} -class ModesGlyphHoverWidget extends _hoverWidgets_js__WEBPACK_IMPORTED_MODULE_4__["GlyphHoverWidget"] { - constructor(editor, modeService, openerService = _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_6__["NullOpenerService"]) { - super(ModesGlyphHoverWidget.ID, editor); - this._renderDisposeables = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"]()); - this._messages = []; - this._lastLineNumber = -1; - this._markdownRenderer = this._register(new _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_5__["MarkdownRenderer"](this._editor, modeService, openerService)); - this._computer = new MarginComputer(this._editor); - this._hoverOperation = new _hoverOperation_js__WEBPACK_IMPORTED_MODULE_3__["HoverOperation"](this._computer, (result) => this._withResult(result), undefined, (result) => this._withResult(result), 300); - } - dispose() { - this._hoverOperation.cancel(); - super.dispose(); - } - onModelDecorationsChanged() { - if (this.isVisible) { - // The decorations have changed and the hover is visible, - // we need to recompute the displayed text - this._hoverOperation.cancel(); - this._computer.clearResult(); - this._hoverOperation.start(0 /* Delayed */); - } - } - startShowingAt(lineNumber) { - if (this._lastLineNumber === lineNumber) { - // We have to show the widget at the exact same line number as before, so no work is needed - return; - } - this._hoverOperation.cancel(); - this.hide(); - this._lastLineNumber = lineNumber; - this._computer.setLineNumber(lineNumber); - this._hoverOperation.start(0 /* Delayed */); - } - hide() { - this._lastLineNumber = -1; - this._hoverOperation.cancel(); - super.hide(); - } - _withResult(result) { - this._messages = result; - if (this._messages.length > 0) { - this._renderMessages(this._lastLineNumber, this._messages); - } - else { - this.hide(); - } - } - _renderMessages(lineNumber, messages) { - this._renderDisposeables.clear(); - const fragment = document.createDocumentFragment(); - for (const msg of messages) { - const renderedContents = this._markdownRenderer.render(msg.value); - this._renderDisposeables.add(renderedContents); - fragment.appendChild(Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["$"])('div.hover-row', undefined, renderedContents.element)); - } - this.updateContents(fragment); - this.showAt(lineNumber); + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); } -} -ModesGlyphHoverWidget.ID = 'editor.contrib.modesGlyphHoverWidget'; + }]); + + return Theme; +}(); +var getThemeVariables = function getThemeVariables(userOverrides) { + var theme = new Theme(); + theme.calculate(userOverrides); + return theme; +}; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js ***! - \*******************************************************************************************/ -/*! no exports provided */ +/***/ "./src/themes/theme-dark.js": +/*!**********************************!*\ + !*** ./src/themes/theme-dark.js ***! + \**********************************/ +/*! exports provided: getThemeVariables */function(e,t,n){"use strict";n.r(t),n.d(t,"getThemeVariables",(function(){return l}));var i=n(/*! khroma */"khroma"),r=n(/*! ./theme-helpers */"./src/themes/theme-helpers.js");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + +var Theme = +/*#__PURE__*/ +function () { + function Theme() { + _classCallCheck(this, Theme); + + /* Base variables */ + this.background = '#f4f4f4'; + this.primaryColor = '#ECECFF'; + this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 120 + }); + this.secondaryColor = '#ffffde'; + this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: -160 + }); + this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); + this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode); + + this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); + this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); + this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.tertiaryColor); + this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); + this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); + this.background = 'white'; + this.mainBkg = '#ECECFF'; + this.secondBkg = '#ffffde'; + this.lineColor = '#333333'; + this.border1 = '#9370DB'; + this.border2 = '#aaaa33'; + this.arrowheadColor = '#333333'; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = '16px'; + this.labelBackground = '#e8e8e8'; + this.textColor = '#333'; + /* Flowchart variables */ + this.nodeBkg = 'calculated'; + this.nodeBorder = 'calculated'; + this.clusterBkg = 'calculated'; + this.clusterBorder = 'calculated'; + this.defaultLinkColor = 'calculated'; + this.titleColor = 'calculated'; + this.edgeLabelBackground = 'calculated'; + /* Sequence Diagram variables */ + this.actorBorder = 'calculated'; + this.actorBkg = 'calculated'; + this.actorTextColor = 'black'; + this.actorLineColor = 'grey'; + this.signalColor = 'calculated'; + this.signalTextColor = 'calculated'; + this.labelBoxBkgColor = 'calculated'; + this.labelBoxBorderColor = 'calculated'; + this.labelTextColor = 'calculated'; + this.loopTextColor = 'calculated'; + this.noteBorderColor = 'calculated'; + this.noteBkgColor = '#fff5ad'; + this.noteTextColor = 'calculated'; + this.activationBorderColor = '#666'; + this.activationBkgColor = '#f4f4f4'; + this.sequenceNumberColor = 'white'; + /* Gantt chart variables */ + this.sectionBkgColor = 'calculated'; + this.altSectionBkgColor = 'calculated'; + this.sectionBkgColor2 = 'calculated'; + this.taskBorderColor = 'calculated'; + this.taskBkgColor = 'calculated'; + this.taskTextLightColor = 'calculated'; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = 'calculated'; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.taskTextClickableColor = 'calculated'; + this.activeTaskBorderColor = 'calculated'; + this.activeTaskBkgColor = 'calculated'; + this.gridColor = 'calculated'; + this.doneTaskBkgColor = 'calculated'; + this.doneTaskBorderColor = 'calculated'; + this.critBorderColor = 'calculated'; + this.critBkgColor = 'calculated'; + this.todayLineColor = 'calculated'; + this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["rgba"])(102, 102, 255, 0.49); + this.altSectionBkgColor = 'white'; + this.sectionBkgColor2 = '#fff400'; + this.taskBorderColor = '#534fbc'; + this.taskBkgColor = '#8a90dd'; + this.taskTextLightColor = 'white'; + this.taskTextColor = 'calculated'; + this.taskTextDarkColor = 'black'; + this.taskTextOutsideColor = 'calculated'; + this.taskTextClickableColor = '#003163'; + this.activeTaskBorderColor = '#534fbc'; + this.activeTaskBkgColor = '#bfc7ff'; + this.gridColor = 'lightgrey'; + this.doneTaskBkgColor = 'lightgrey'; + this.doneTaskBorderColor = 'grey'; + this.critBorderColor = '#ff8888'; + this.critBkgColor = 'red'; + this.todayLineColor = 'red'; + /* state colors */ + this.labelColor = 'black'; + this.errorBkgColor = '#552222'; + this.errorTextColor = '#552222'; + this.updateColors(); + } + _createClass(Theme, [{ + key: "updateColors", + value: function updateColors() { + /* Flowchart variables */ + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; // border 1 + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.textColor; + this.edgeLabelBackground = this.labelBackground; + /* Sequence Diagram variables */ + // this.actorBorder = lighten(this.border1, 0.5); + this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])(this.border1, 23); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.signalColor = this.textColor; + this.signalTextColor = this.textColor; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + /* Gantt chart variables */ + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + /* state colors */ + /* class */ + this.classText = this.primaryTextColor; + /* journey */ -let InPlaceReplaceController = class InPlaceReplaceController { - constructor(editor, editorWorkerService) { - this.decorationIds = []; - this.editor = editor; - this.editorWorkerService = editorWorkerService; - } - static get(editor) { - return editor.getContribution(InPlaceReplaceController.ID); - } - dispose() { - } - run(source, up) { - // cancel any pending request - if (this.currentRequest) { - this.currentRequest.cancel(); - } - const editorSelection = this.editor.getSelection(); - const model = this.editor.getModel(); - if (!model || !editorSelection) { - return undefined; - } - let selection = editorSelection; - if (selection.startLineNumber !== selection.endLineNumber) { - // Can't accept multiline selection - return undefined; - } - const state = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_7__["EditorState"](this.editor, 1 /* Value */ | 4 /* Position */); - const modelURI = model.uri; - if (!this.editorWorkerService.canNavigateValueSet(modelURI)) { - return Promise.resolve(undefined); - } - this.currentRequest = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_11__["createCancelablePromise"])(token => this.editorWorkerService.navigateValueSet(modelURI, selection, up)); - return this.currentRequest.then(result => { - if (!result || !result.range || !result.value) { - // No proper result - return; - } - if (!state.validate(this.editor)) { - // state has changed - return; - } - // Selection - let editRange = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].lift(result.range); - let highlightRange = result.range; - let diff = result.value.length - (selection.endColumn - selection.startColumn); - // highlight - highlightRange = { - startLineNumber: highlightRange.startLineNumber, - startColumn: highlightRange.startColumn, - endLineNumber: highlightRange.endLineNumber, - endColumn: highlightRange.startColumn + result.value.length - }; - if (diff > 1) { - selection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_2__["Selection"](selection.startLineNumber, selection.startColumn, selection.endLineNumber, selection.endColumn + diff - 1); - } - // Insert new text - const command = new _inPlaceReplaceCommand_js__WEBPACK_IMPORTED_MODULE_6__["InPlaceReplaceCommand"](editRange, selection, result.value); - this.editor.pushUndoStop(); - this.editor.executeCommand(source, command); - this.editor.pushUndoStop(); - // add decoration - this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [{ - range: highlightRange, - options: InPlaceReplaceController.DECORATION - }]); - // remove decoration after delay - if (this.decorationRemover) { - this.decorationRemover.cancel(); - } - this.decorationRemover = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_11__["timeout"])(350); - this.decorationRemover.then(() => this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [])).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__["onUnexpectedError"]); - }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__["onUnexpectedError"]); - } -}; -InPlaceReplaceController.ID = 'editor.contrib.inPlaceReplaceController'; -InPlaceReplaceController.DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - className: 'valueSetReplacement' -}); -InPlaceReplaceController = __decorate([ - __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_5__["IEditorWorkerService"]) -], InPlaceReplaceController); -class InPlaceReplaceUp extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.inPlaceReplace.up', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('InPlaceReplaceAction.previous.label', "Replace with Previous Value"), - alias: 'Replace with Previous Value', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 82 /* US_COMMA */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - const controller = InPlaceReplaceController.get(editor); - if (!controller) { - return Promise.resolve(undefined); - } - return controller.run(this.id, true); - } -} -class InPlaceReplaceDown extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.inPlaceReplace.down', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('InPlaceReplaceAction.next.label', "Replace with Next Value"), - alias: 'Replace with Next Value', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 84 /* US_DOT */, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor) { - const controller = InPlaceReplaceController.get(editor); - if (!controller) { - return Promise.resolve(undefined); - } - return controller.run(this.id, false); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(InPlaceReplaceController.ID, InPlaceReplaceController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InPlaceReplaceUp); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InPlaceReplaceDown); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__["registerThemingParticipant"])((theme, collector) => { - const border = theme.getColor(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorBracketMatchBorder"]); - if (border) { - collector.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${border}; }`); + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 64 + }); + this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 64 + }); + this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: -64 + }); + this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: -64 + }); + this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 128 + }); + this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 128 + }); } -}); + }, { + key: "calculate", + value: function calculate(overrides) { + var _this = this; + if (_typeof(overrides) !== 'object') { + // Calculate colors form base colors + this.updateColors(); + return; + } -/***/ }), + var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js ***! - \**************************************************************************************************/ -/*! exports provided: InPlaceReplaceCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); // Calculate colors form base colors -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InPlaceReplaceCommand", function() { return InPlaceReplaceCommand; }); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ + this.updateColors(); // Copy values from overrides again in case of an override of derived value -class InPlaceReplaceCommand { - constructor(editRange, originalSelection, text) { - this._editRange = editRange; - this._originalSelection = originalSelection; - this._text = text; - } - getEditOperations(model, builder) { - builder.addTrackedEditOperation(this._editRange, this._text); - } - computeCursorState(model, helper) { - const inverseEditOperations = helper.getInverseEditOperations(); - const srcRange = inverseEditOperations[0].range; - if (!this._originalSelection.isEmpty()) { - // Preserve selection and extends to typed text - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.endLineNumber, srcRange.endColumn - this._text.length, srcRange.endLineNumber, srcRange.endColumn); - } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn), srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn)); + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); } -} + }]); + + return Theme; +}(); +var getThemeVariables = function getThemeVariables(userOverrides) { + var theme = new Theme(); + theme.calculate(userOverrides); + return theme; +}; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js ***! - \*************************************************************************************/ -/*! exports provided: getSpaceCnt, generateIndent */ +/***/ "./src/themes/theme-forest.js": +/*!************************************!*\ + !*** ./src/themes/theme-forest.js ***! + \************************************/ +/*! exports provided: getThemeVariables */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSpaceCnt", function() { return getSpaceCnt; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateIndent", function() { return generateIndent; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function getSpaceCnt(str, tabSize) { - let spacesCnt = 0; - for (let i = 0; i < str.length; i++) { - if (str.charAt(i) === '\t') { - spacesCnt += tabSize; - } - else { - spacesCnt++; - } - } - return spacesCnt; -} -function generateIndent(spacesCnt, tabSize, insertSpaces) { - spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; - let result = ''; - if (!insertSpaces) { - let tabsCnt = Math.floor(spacesCnt / tabSize); - spacesCnt = spacesCnt % tabSize; - for (let i = 0; i < tabsCnt; i++) { - result += '\t'; - } - } - for (let i = 0; i < spacesCnt; i++) { - result += ' '; - } - return result; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js ***! - \*************************************************************************************/ -/*! exports provided: getReindentEditOperations, IndentationToSpacesAction, IndentationToTabsAction, ChangeIndentationSizeAction, IndentUsingTabs, IndentUsingSpaces, DetectIndentation, ReindentLinesAction, ReindentSelectedLinesAction, AutoIndentOnPasteCommand, AutoIndentOnPaste, IndentationToSpacesCommand, IndentationToTabsCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getReindentEditOperations", function() { return getReindentEditOperations; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentationToSpacesAction", function() { return IndentationToSpacesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentationToTabsAction", function() { return IndentationToTabsAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeIndentationSizeAction", function() { return ChangeIndentationSizeAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentUsingTabs", function() { return IndentUsingTabs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentUsingSpaces", function() { return IndentUsingSpaces; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DetectIndentation", function() { return DetectIndentation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReindentLinesAction", function() { return ReindentLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReindentSelectedLinesAction", function() { return ReindentSelectedLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoIndentOnPasteCommand", function() { return AutoIndentOnPasteCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutoIndentOnPaste", function() { return AutoIndentOnPaste; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentationToSpacesCommand", function() { return IndentationToSpacesCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentationToTabsCommand", function() { return IndentationToTabsCommand; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/commands/shiftCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./indentUtils.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeVariables", function() { return getThemeVariables; }); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./theme-helpers */ "./src/themes/theme-helpers.js"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +var Theme = +/*#__PURE__*/ +function () { + function Theme() { + _classCallCheck(this, Theme); + /* Base vales */ + this.background = '#f4f4f4'; + this.primaryColor = '#cde498'; + this.secondaryColor = '#cdffb2'; + this.background = 'white'; + this.mainBkg = '#cde498'; + this.secondBkg = '#cdffb2'; + this.lineColor = 'green'; + this.border1 = '#13540c'; + this.border2 = '#6eaa49'; + this.arrowheadColor = 'green'; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = '16px'; + this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["lighten"])('#cde498', 10); + this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.primaryColor, this.darkMode); + this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__["mkBorder"])(this.tertiaryColor, this.darkMode); + this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); + this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.secondaryColor); + this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.primaryColor); + this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); + this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["invert"])(this.background); + /* Flowchart variables */ + this.nodeBkg = 'calculated'; + this.nodeBorder = 'calculated'; + this.clusterBkg = 'calculated'; + this.clusterBorder = 'calculated'; + this.defaultLinkColor = 'calculated'; + this.titleColor = '#333'; + this.edgeLabelBackground = '#e8e8e8'; + /* Sequence Diagram variables */ + this.actorBorder = 'calculated'; + this.actorBkg = 'calculated'; + this.actorTextColor = 'black'; + this.actorLineColor = 'grey'; + this.signalColor = '#333'; + this.signalTextColor = '#333'; + this.labelBoxBkgColor = 'calculated'; + this.labelBoxBorderColor = '#326932'; + this.labelTextColor = 'calculated'; + this.loopTextColor = 'calculated'; + this.noteBorderColor = 'calculated'; + this.noteBkgColor = '#fff5ad'; + this.noteTextColor = 'calculated'; + this.activationBorderColor = '#666'; + this.activationBkgColor = '#f4f4f4'; + this.sequenceNumberColor = 'white'; + /* Gantt chart variables */ + this.sectionBkgColor = '#6eaa49'; + this.altSectionBkgColor = 'white'; + this.sectionBkgColor2 = '#6eaa49'; + this.taskBorderColor = 'calculated'; + this.taskBkgColor = '#487e3a'; + this.taskTextLightColor = 'white'; + this.taskTextColor = 'calculated'; + this.taskTextDarkColor = 'black'; + this.taskTextOutsideColor = 'calculated'; + this.taskTextClickableColor = '#003163'; + this.activeTaskBorderColor = 'calculated'; + this.activeTaskBkgColor = 'calculated'; + this.gridColor = 'lightgrey'; + this.doneTaskBkgColor = 'lightgrey'; + this.doneTaskBorderColor = 'grey'; + this.critBorderColor = '#ff8888'; + this.critBkgColor = 'red'; + this.todayLineColor = 'red'; + /* state colors */ -function getReindentEditOperations(model, startLineNumber, endLineNumber, inheritedIndent) { - if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { - // Model is empty - return []; - } - let indentationRules = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getIndentationRules(model.getLanguageIdentifier().id); - if (!indentationRules) { - return []; - } - endLineNumber = Math.min(endLineNumber, model.getLineCount()); - // Skip `unIndentedLinePattern` lines - while (startLineNumber <= endLineNumber) { - if (!indentationRules.unIndentedLinePattern) { - break; - } - let text = model.getLineContent(startLineNumber); - if (!indentationRules.unIndentedLinePattern.test(text)) { - break; - } - startLineNumber++; - } - if (startLineNumber > endLineNumber - 1) { - return []; - } - const { tabSize, indentSize, insertSpaces } = model.getOptions(); - const shiftIndent = (indentation, count) => { - count = count || 1; - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__["ShiftCommand"].shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces); - }; - const unshiftIndent = (indentation, count) => { - count = count || 1; - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__["ShiftCommand"].unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces); - }; - let indentEdits = []; - // indentation being passed to lines below - let globalIndent; - // Calculate indentation for the first line - // If there is no passed-in indentation, we use the indentation of the first line as base. - let currentLineText = model.getLineContent(startLineNumber); - let adjustedLineContent = currentLineText; - if (inheritedIndent !== undefined && inheritedIndent !== null) { - globalIndent = inheritedIndent; - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](currentLineText); - adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length); - if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) { - globalIndent = unshiftIndent(globalIndent); - adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length); - } - if (currentLineText !== adjustedLineContent) { - indentEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__["EditOperation"].replace(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](startLineNumber, 1, startLineNumber, oldIndentation.length + 1), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["TextModel"].normalizeIndentation(globalIndent, indentSize, insertSpaces))); - } - } - else { - globalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](currentLineText); - } - // idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`. - let idealIndentForNextLine = globalIndent; - if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) { - idealIndentForNextLine = shiftIndent(idealIndentForNextLine); - globalIndent = shiftIndent(globalIndent); - } - else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) { - idealIndentForNextLine = shiftIndent(idealIndentForNextLine); - } - startLineNumber++; - // Calculate indentation adjustment for all following lines - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - let text = model.getLineContent(lineNumber); - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](text); - let adjustedLineContent = idealIndentForNextLine + text.substring(oldIndentation.length); - if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) { - idealIndentForNextLine = unshiftIndent(idealIndentForNextLine); - globalIndent = unshiftIndent(globalIndent); - } - if (oldIndentation !== idealIndentForNextLine) { - indentEdits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_5__["EditOperation"].replace(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](lineNumber, 1, lineNumber, oldIndentation.length + 1), _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["TextModel"].normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces))); - } - // calculate idealIndentForNextLine - if (indentationRules.unIndentedLinePattern && indentationRules.unIndentedLinePattern.test(text)) { - // In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines - // but don't change globalIndent and idealIndentForNextLine. - continue; - } - else if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) { - globalIndent = shiftIndent(globalIndent); - idealIndentForNextLine = globalIndent; - } - else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) { - idealIndentForNextLine = shiftIndent(idealIndentForNextLine); - } - else { - idealIndentForNextLine = globalIndent; - } - } - return indentEdits; -} -class IndentationToSpacesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: IndentationToSpacesAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('indentationToSpaces', "Convert Indentation to Spaces"), - alias: 'Convert Indentation to Spaces', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); - } - run(accessor, editor) { - let model = editor.getModel(); - if (!model) { - return; - } - let modelOpts = model.getOptions(); - let selection = editor.getSelection(); - if (!selection) { - return; - } - const command = new IndentationToSpacesCommand(selection, modelOpts.tabSize); - editor.pushUndoStop(); - editor.executeCommands(this.id, [command]); - editor.pushUndoStop(); - model.updateOptions({ - insertSpaces: true - }); - } -} -IndentationToSpacesAction.ID = 'editor.action.indentationToSpaces'; -class IndentationToTabsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: IndentationToTabsAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('indentationToTabs', "Convert Indentation to Tabs"), - alias: 'Convert Indentation to Tabs', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); - } - run(accessor, editor) { - let model = editor.getModel(); - if (!model) { - return; - } - let modelOpts = model.getOptions(); - let selection = editor.getSelection(); - if (!selection) { - return; - } - const command = new IndentationToTabsCommand(selection, modelOpts.tabSize); - editor.pushUndoStop(); - editor.executeCommands(this.id, [command]); - editor.pushUndoStop(); - model.updateOptions({ - insertSpaces: false - }); - } -} -IndentationToTabsAction.ID = 'editor.action.indentationToTabs'; -class ChangeIndentationSizeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor(insertSpaces, opts) { - super(opts); - this.insertSpaces = insertSpaces; - } - run(accessor, editor) { - const quickInputService = accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__["IQuickInputService"]); - const modelService = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__["IModelService"]); - let model = editor.getModel(); - if (!model) { - return; - } - let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget); - const picks = [1, 2, 3, 4, 5, 6, 7, 8].map(n => ({ - id: n.toString(), - label: n.toString(), - // add description for tabSize value set in the configuration - description: n === creationOpts.tabSize ? _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('configuredTabSize', "Configured Tab Size") : undefined - })); - // auto focus the tabSize set for the current editor - const autoFocusIndex = Math.min(model.getOptions().tabSize - 1, 7); - setTimeout(() => { - quickInputService.pick(picks, { placeHolder: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'selectTabWidth', comment: ['Tab corresponds to the tab key'] }, "Select Tab Size for Current File"), activeItem: picks[autoFocusIndex] }).then(pick => { - if (pick) { - if (model && !model.isDisposed()) { - model.updateOptions({ - tabSize: parseInt(pick.label, 10), - insertSpaces: this.insertSpaces - }); - } - } - }); - }, 50 /* quick input is sensitive to being opened so soon after another */); - } -} -class IndentUsingTabs extends ChangeIndentationSizeAction { - constructor() { - super(false, { - id: IndentUsingTabs.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('indentUsingTabs', "Indent Using Tabs"), - alias: 'Indent Using Tabs', - precondition: undefined - }); - } -} -IndentUsingTabs.ID = 'editor.action.indentUsingTabs'; -class IndentUsingSpaces extends ChangeIndentationSizeAction { - constructor() { - super(true, { - id: IndentUsingSpaces.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('indentUsingSpaces', "Indent Using Spaces"), - alias: 'Indent Using Spaces', - precondition: undefined - }); - } -} -IndentUsingSpaces.ID = 'editor.action.indentUsingSpaces'; -class DetectIndentation extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: DetectIndentation.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('detectIndentation', "Detect Indentation from Content"), - alias: 'Detect Indentation from Content', - precondition: undefined - }); - } - run(accessor, editor) { - const modelService = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_11__["IModelService"]); - let model = editor.getModel(); - if (!model) { - return; - } - let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget); - model.detectIndentation(creationOpts.insertSpaces, creationOpts.tabSize); - } -} -DetectIndentation.ID = 'editor.action.detectIndentation'; -class ReindentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.reindentlines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.reindentlines', "Reindent Lines"), - alias: 'Reindent Lines', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); - } - run(accessor, editor) { - let model = editor.getModel(); - if (!model) { - return; - } - let edits = getReindentEditOperations(model, 1, model.getLineCount()); - if (edits.length > 0) { - editor.pushUndoStop(); - editor.executeEdits(this.id, edits); - editor.pushUndoStop(); - } - } -} -class ReindentSelectedLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.reindentselectedlines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.reindentselectedlines', "Reindent Selected Lines"), - alias: 'Reindent Selected Lines', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); - } - run(accessor, editor) { - let model = editor.getModel(); - if (!model) { - return; - } - let selections = editor.getSelections(); - if (selections === null) { - return; - } - let edits = []; - for (let selection of selections) { - let startLineNumber = selection.startLineNumber; - let endLineNumber = selection.endLineNumber; - if (startLineNumber !== endLineNumber && selection.endColumn === 1) { - endLineNumber--; - } - if (startLineNumber === 1) { - if (startLineNumber === endLineNumber) { - continue; - } - } - else { - startLineNumber--; - } - let editOperations = getReindentEditOperations(model, startLineNumber, endLineNumber); - edits.push(...editOperations); - } - if (edits.length > 0) { - editor.pushUndoStop(); - editor.executeEdits(this.id, edits); - editor.pushUndoStop(); - } - } -} -class AutoIndentOnPasteCommand { - constructor(edits, initialSelection) { - this._initialSelection = initialSelection; - this._edits = []; - this._selectionId = null; - for (let edit of edits) { - if (edit.range && typeof edit.text === 'string') { - this._edits.push(edit); - } - } - } - getEditOperations(model, builder) { - for (let edit of this._edits) { - builder.addEditOperation(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].lift(edit.range), edit.text); - } - let selectionIsSet = false; - if (Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty()) { - if (this._edits[0].range.startColumn === this._initialSelection.endColumn && - this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber) { - selectionIsSet = true; - this._selectionId = builder.trackSelection(this._initialSelection, true); - } - else if (this._edits[0].range.endColumn === this._initialSelection.startColumn && - this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber) { - selectionIsSet = true; - this._selectionId = builder.trackSelection(this._initialSelection, false); - } - } - if (!selectionIsSet) { - this._selectionId = builder.trackSelection(this._initialSelection); - } - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this._selectionId); - } -} -class AutoIndentOnPaste { - constructor(editor) { - this.callOnDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.callOnModel = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.editor = editor; - this.callOnDispose.add(editor.onDidChangeConfiguration(() => this.update())); - this.callOnDispose.add(editor.onDidChangeModel(() => this.update())); - this.callOnDispose.add(editor.onDidChangeModelLanguage(() => this.update())); - } - update() { - // clean up - this.callOnModel.clear(); - // we are disabled - if (this.editor.getOption(8 /* autoIndent */) < 4 /* Full */ || this.editor.getOption(40 /* formatOnPaste */)) { - return; - } - // no model - if (!this.editor.hasModel()) { - return; - } - this.callOnModel.add(this.editor.onDidPaste(({ range }) => { - this.trigger(range); - })); - } - trigger(range) { - let selections = this.editor.getSelections(); - if (selections === null || selections.length > 1) { - return; - } - const model = this.editor.getModel(); - if (!model) { - return; - } - if (!model.isCheapToTokenize(range.getStartPosition().lineNumber)) { - return; - } - const autoIndent = this.editor.getOption(8 /* autoIndent */); - const { tabSize, indentSize, insertSpaces } = model.getOptions(); - this.editor.pushUndoStop(); - let textEdits = []; - let indentConverter = { - shiftIndent: (indentation) => { - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__["ShiftCommand"].shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces); - }, - unshiftIndent: (indentation) => { - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_4__["ShiftCommand"].unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces); - } - }; - let startLineNumber = range.startLineNumber; - while (startLineNumber <= range.endLineNumber) { - if (this.shouldIgnoreLine(model, startLineNumber)) { - startLineNumber++; - continue; - } - break; - } - if (startLineNumber > range.endLineNumber) { - return; - } - let firstLineText = model.getLineContent(startLineNumber); - if (!/\S/.test(firstLineText.substring(0, range.startColumn - 1))) { - let indentOfFirstLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getGoodIndentForLine(autoIndent, model, model.getLanguageIdentifier().id, startLineNumber, indentConverter); - if (indentOfFirstLine !== null) { - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](firstLineText); - let newSpaceCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["getSpaceCnt"](indentOfFirstLine, tabSize); - let oldSpaceCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["getSpaceCnt"](oldIndentation, tabSize); - if (newSpaceCnt !== oldSpaceCnt) { - let newIndent = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["generateIndent"](newSpaceCnt, tabSize, insertSpaces); - textEdits.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](startLineNumber, 1, startLineNumber, oldIndentation.length + 1), - text: newIndent - }); - firstLineText = newIndent + firstLineText.substr(oldIndentation.length); - } - else { - let indentMetadata = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getIndentMetadata(model, startLineNumber); - if (indentMetadata === 0 || indentMetadata === 8 /* UNINDENT_MASK */) { - // we paste content into a line where only contains whitespaces - // after pasting, the indentation of the first line is already correct - // the first line doesn't match any indentation rule - // then no-op. - return; - } - } - } - } - const firstLineNumber = startLineNumber; - // ignore empty or ignored lines - while (startLineNumber < range.endLineNumber) { - if (!/\S/.test(model.getLineContent(startLineNumber + 1))) { - startLineNumber++; - continue; - } - break; - } - if (startLineNumber !== range.endLineNumber) { - let virtualModel = { - getLineTokens: (lineNumber) => { - return model.getLineTokens(lineNumber); - }, - getLanguageIdentifier: () => { - return model.getLanguageIdentifier(); - }, - getLanguageIdAtPosition: (lineNumber, column) => { - return model.getLanguageIdAtPosition(lineNumber, column); - }, - getLineContent: (lineNumber) => { - if (lineNumber === firstLineNumber) { - return firstLineText; - } - else { - return model.getLineContent(lineNumber); - } - } - }; - let indentOfSecondLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_10__["LanguageConfigurationRegistry"].getGoodIndentForLine(autoIndent, virtualModel, model.getLanguageIdentifier().id, startLineNumber + 1, indentConverter); - if (indentOfSecondLine !== null) { - let newSpaceCntOfSecondLine = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["getSpaceCnt"](indentOfSecondLine, tabSize); - let oldSpaceCntOfSecondLine = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["getSpaceCnt"](_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](model.getLineContent(startLineNumber + 1)), tabSize); - if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) { - let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine; - for (let i = startLineNumber + 1; i <= range.endLineNumber; i++) { - let lineContent = model.getLineContent(i); - let originalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"](lineContent); - let originalSpacesCnt = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["getSpaceCnt"](originalIndent, tabSize); - let newSpacesCnt = originalSpacesCnt + spaceCntOffset; - let newIndent = _indentUtils_js__WEBPACK_IMPORTED_MODULE_12__["generateIndent"](newSpacesCnt, tabSize, insertSpaces); - if (newIndent !== originalIndent) { - textEdits.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](i, 1, i, originalIndent.length + 1), - text: newIndent - }); - } - } - } - } - } - let cmd = new AutoIndentOnPasteCommand(textEdits, this.editor.getSelection()); - this.editor.executeCommand('autoIndentOnPaste', cmd); - this.editor.pushUndoStop(); - } - shouldIgnoreLine(model, lineNumber) { - model.forceTokenization(lineNumber); - let nonWhitespaceColumn = model.getLineFirstNonWhitespaceColumn(lineNumber); - if (nonWhitespaceColumn === 0) { - return true; - } - let tokens = model.getLineTokens(lineNumber); - if (tokens.getCount() > 0) { - let firstNonWhitespaceTokenIndex = tokens.findTokenIndexAtOffset(nonWhitespaceColumn); - if (firstNonWhitespaceTokenIndex >= 0 && tokens.getStandardTokenType(firstNonWhitespaceTokenIndex) === 1 /* Comment */) { - return true; - } - } - return false; - } - dispose() { - this.callOnDispose.dispose(); - this.callOnModel.dispose(); + this.labelColor = 'black'; + this.errorBkgColor = '#552222'; + this.errorTextColor = '#552222'; + } + + _createClass(Theme, [{ + key: "updateColors", + value: function updateColors() { + /* Flowchart variables */ + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + /* Sequence Diagram variables */ + + this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["darken"])(this.mainBkg, 20); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + /* Gantt chart variables */ + + this.taskBorderColor = this.border1; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + /* state colors */ + + /* class */ + + this.classText = this.primaryTextColor; + /* journey */ + + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 64 + }); + this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 64 + }); + this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: -64 + }); + this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: -64 + }); + this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.primaryColor, { + h: 128 + }); + this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(this.secondaryColor, { + h: 128 + }); } -} -AutoIndentOnPaste.ID = 'editor.contrib.autoIndentOnPaste'; -function getIndentationEditOperations(model, builder, tabSize, tabsToSpaces) { - if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { - // Model is empty + }, { + key: "calculate", + value: function calculate(overrides) { + var _this = this; + + if (_typeof(overrides) !== 'object') { + // Calculate colors form base colors + this.updateColors(); return; + } + + var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors + + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); // Calculate colors form base colors + + this.updateColors(); // Copy values from overrides again in case of an override of derived value + + keys.forEach(function (k) { + _this[k] = overrides[k]; + }); } - let spaces = ''; - for (let i = 0; i < tabSize; i++) { - spaces += ' '; - } - let spacesRegExp = new RegExp(spaces, 'gi'); - for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) { - let lastIndentationColumn = model.getLineFirstNonWhitespaceColumn(lineNumber); - if (lastIndentationColumn === 0) { - lastIndentationColumn = model.getLineMaxColumn(lineNumber); - } - if (lastIndentationColumn === 1) { - continue; - } - const originalIndentationRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](lineNumber, 1, lineNumber, lastIndentationColumn); - const originalIndentation = model.getValueInRange(originalIndentationRange); - const newIndentation = (tabsToSpaces - ? originalIndentation.replace(/\t/ig, spaces) - : originalIndentation.replace(spacesRegExp, '\t')); - builder.addEditOperation(originalIndentationRange, newIndentation); - } -} -class IndentationToSpacesCommand { - constructor(selection, tabSize) { - this.selection = selection; - this.tabSize = tabSize; - this.selectionId = null; - } - getEditOperations(model, builder) { - this.selectionId = builder.trackSelection(this.selection); - getIndentationEditOperations(model, builder, this.tabSize, true); - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this.selectionId); - } -} -class IndentationToTabsCommand { - constructor(selection, tabSize) { - this.selection = selection; - this.tabSize = tabSize; - this.selectionId = null; - } - getEditOperations(model, builder) { - this.selectionId = builder.trackSelection(this.selection); - getIndentationEditOperations(model, builder, this.tabSize, false); - } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this.selectionId); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorContribution"])(AutoIndentOnPaste.ID, AutoIndentOnPaste); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(IndentationToSpacesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(IndentationToTabsAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(IndentUsingTabs); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(IndentUsingSpaces); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(DetectIndentation); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(ReindentLinesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(ReindentSelectedLinesAction); + }]); + + return Theme; +}(); +var getThemeVariables = function getThemeVariables(userOverrides) { + var theme = new Theme(); + theme.calculate(userOverrides); + return theme; +}; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js ***! - \**********************************************************************************************/ -/*! exports provided: CopyLinesCommand */ +/***/ "./src/themes/theme-helpers.js": +/*!*************************************!*\ + !*** ./src/themes/theme-helpers.js ***! + \*************************************/ +/*! exports provided: mkBorder */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CopyLinesCommand", function() { return CopyLinesCommand; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mkBorder", function() { return mkBorder; }); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! khroma */ "khroma"); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__); +var mkBorder = function mkBorder(col, darkMode) { + return darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(col, { + s: -40, + l: 10 + }) : Object(khroma__WEBPACK_IMPORTED_MODULE_0__["adjust"])(col, { + s: -40, + l: -10 + }); +}; -class CopyLinesCommand { - constructor(selection, isCopyingDown) { - this._selection = selection; - this._isCopyingDown = isCopyingDown; - this._selectionDirection = 0 /* LTR */; - this._selectionId = null; - this._startLineNumberDelta = 0; - this._endLineNumberDelta = 0; - } - getEditOperations(model, builder) { - let s = this._selection; - this._startLineNumberDelta = 0; - this._endLineNumberDelta = 0; - if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { - this._endLineNumberDelta = 1; - s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1)); - } - let sourceLines = []; - for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { - sourceLines.push(model.getLineContent(i)); - } - const sourceText = sourceLines.join('\n'); - if (sourceText === '') { - // Duplicating empty line - if (this._isCopyingDown) { - this._startLineNumberDelta++; - this._endLineNumberDelta++; - } - } - if (!this._isCopyingDown) { - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\n' + sourceText); - } - else { - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](s.startLineNumber, 1, s.startLineNumber, 1), sourceText + '\n'); - } - this._selectionId = builder.trackSelection(s); - this._selectionDirection = this._selection.getDirection(); - } - computeCursorState(model, helper) { - let result = helper.getTrackedSelection(this._selectionId); - if (this._startLineNumberDelta !== 0 || this._endLineNumberDelta !== 0) { - let startLineNumber = result.startLineNumber; - let startColumn = result.startColumn; - let endLineNumber = result.endLineNumber; - let endColumn = result.endColumn; - if (this._startLineNumberDelta !== 0) { - startLineNumber = startLineNumber + this._startLineNumberDelta; - startColumn = 1; - } - if (this._endLineNumberDelta !== 0) { - endLineNumber = endLineNumber + this._endLineNumberDelta; - endColumn = 1; - } - result = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_1__["Selection"].createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, this._selectionDirection); - } - return result; - } -} +/***/ }), + +/***/ "./src/themes/theme-neutral.js": +/*!*************************************!*\ + !*** ./src/themes/theme-neutral.js ***! + \*************************************/ +/*! exports provided: getThemeVariables */function(e,t,n){"use strict";n.r(t),n.d(t,"getThemeVariables",(function(){return l}));var i=n(/*! khroma */"khroma"),r=n(/*! ./theme-helpers */"./src/themes/theme-helpers.js");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(h.source,")(?=[}][%]{2}).*\n"),"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),s.log.debug("Detecting diagram directive".concat(null!==t?" type:"+t:""," based on the text:").concat(e));for(var i,r=[];null!==(i=u.exec(e));)if(i.index===u.lastIndex&&u.lastIndex++,i&&!t||t&&i[1]&&i[1].match(t)||t&&i[2]&&i[2].match(t)){var o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;r.push({type:o,args:a})}return 0===r.length&&r.push({type:e,args:null}),1===r.length?r[0]:r}catch(n){return s.log.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==t?" type:"+t:""," based on the text:").concat(e)),{type:null,args:null}}},m=function(e){return e=e.replace(u,"").replace(f,"\n"),s.log.debug("Detecting diagram type based on the text "+e),e.match(/^\s*sequenceDiagram/)?"sequence":e.match(/^\s*gantt/)?"gantt":e.match(/^\s*classDiagram-v2/)?"classDiagram":e.match(/^\s*classDiagram/)?"class":e.match(/^\s*stateDiagram-v2/)?"stateDiagram":e.match(/^\s*stateDiagram/)?"state":e.match(/^\s*gitGraph/)?"git":e.match(/^\s*flowchart/)?"flowchart-v2":e.match(/^\s*info/)?"info":e.match(/^\s*pie/)?"pie":e.match(/^\s*erDiagram/)?"er":e.match(/^\s*journey/)?"journey":e.match(/^\s*requirement/)||e.match(/^\s*requirementDiagram/)?"requirement":"flowchart"},_=function(e,t){var n={};return function(){for(var i=arguments.length,r=new Array(i),o=0;o1?a-1:0),c=1;c"},n),o.default.lineBreakRegex.test(e))return e;var i=e.split(" "),r=[],s="";return i.forEach((function(e,o){var a=I("".concat(e," "),n),l=I(s,n);if(a>t){var d=O(e,t,"-",n),u=d.hyphenatedStrings,h=d.remainingWord;r.push.apply(r,[s].concat(c(u))),s=h}else l+a>=t?(r.push(s),s=e):s=[s,e].filter(Boolean).join(" ");o+1===i.length&&r.push(s)})),r.filter((function(e){return""!==e})).join(n.joinWith)}),(function(e,t,n){return"".concat(e,"-").concat(t,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),O=_((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",i=arguments.length>3?arguments[3]:void 0;i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);var r=e.split(""),o=[],s="";return r.forEach((function(e,a){var l="".concat(s).concat(e);if(I(l,i)>=t){var c=a+1,d=r.length===c,u="".concat(l).concat(n);o.push(d?l:u),s=""}else s=l})),{hyphenatedStrings:o,remainingWord:s}}),(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",i=arguments.length>3?arguments[3]:void 0;return"".concat(e,"-").concat(t,"-").concat(n,"-").concat(i.fontSize,"-").concat(i.fontWeight,"-").concat(i.fontFamily)})),N=function(e,t){return t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},t),A(e,t).height},I=function(e,t){return t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},t),A(e,t).width},A=_((function(e,t){var n=t=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},t),i=n.fontSize,s=n.fontFamily,a=n.fontWeight;if(!e)return{width:0,height:0};var l=["sans-serif",s],c=e.split(o.default.lineBreakRegex),d=[],u=Object(r.select)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var h=u.append("svg"),f=0,g=l;fd[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1]}),(function(e,t){return"".concat(e,"-").concat(t.fontSize,"-").concat(t.fontWeight,"-").concat(t.fontFamily)})),R=function(e,t,n){var i=new Map;return i.set("height",e),n?(i.set("width","100%"),i.set("style","max-width: ".concat(t,"px;"))):i.set("width",t),i},P=function(e,t,n,i){!function(e,t){var n=!0,i=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;e.attr(a[0],a[1])}}catch(e){i=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw r}}}(e,R(t,n,i))},j=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.deterministic=t,this.seed=n,this.count=n?n.length:0}var t,n,i;return t=e,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&a(t.prototype,n),i&&a(t,i),e}();t.default={assignWithDepth:M,wrapLabel:T,calculateTextHeight:N,calculateTextWidth:I,calculateTextDimensions:A,calculateSvgSizeAttrs:R,configureSvgSize:P,detectInit:g,detectDirective:p,detectType:m,isSubstringInArray:b,interpolateToCurve:v,calcLabelPosition:function(e){return function(e){var t,n=0;e.forEach((function(e){n+=C(e,t),t=e}));var i=n/2,r=void 0;return t=void 0,e.forEach((function(e){if(t&&!r){var n=C(e,t);if(n=1&&(r={x:e.x,y:e.y}),o>0&&o<1&&(r={x:(1-o)*t.x+o*e.x,y:(1-o)*t.y+o*e.y})}}t=e})),r}(e)},calcCardinalityPosition:function(e,t,n){var i;s.log.info("our points",t),t[0]!==n&&(t=t.reverse()),t.forEach((function(e){C(e,i),i=e}));var r,o=25;i=void 0,t.forEach((function(e){if(i&&!r){var t=C(e,i);if(t=1&&(r={x:e.x,y:e.y}),n>0&&n<1&&(r={x:(1-n)*i.x+n*e.x,y:(1-n)*i.y+n*e.y})}}i=e}));var a=e?10:5,l=Math.atan2(t[0].y-r.y,t[0].x-r.x),c={x:0,y:0};return c.x=Math.sin(l)*a+(t[0].x+r.x)/2,c.y=-Math.cos(l)*a+(t[0].y+r.y)/2,c},calcTerminalLabelPosition:function(e,t,n){var i,r=JSON.parse(JSON.stringify(n));s.log.info("our points",r),"start_left"!==t&&"start_right"!==t&&(r=r.reverse()),r.forEach((function(e){C(e,i),i=e}));var o,a=25;i=void 0,r.forEach((function(e){if(i&&!o){var t=C(e,i);if(t=1&&(o={x:e.x,y:e.y}),n>0&&n<1&&(o={x:(1-n)*i.x+n*e.x,y:(1-n)*i.y+n*e.y})}}i=e}));var l=10,c=Math.atan2(r[0].y-o.y,r[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(c)*l+(r[0].x+o.x)/2,d.y=-Math.cos(c)*l+(r[0].y+o.y)/2,"start_left"===t&&(d.x=Math.sin(c+Math.PI)*l+(r[0].x+o.x)/2,d.y=-Math.cos(c+Math.PI)*l+(r[0].y+o.y)/2),"end_right"===t&&(d.x=Math.sin(c-Math.PI)*l+(r[0].x+o.x)/2-5,d.y=-Math.cos(c-Math.PI)*l+(r[0].y+o.y)/2-5),"end_left"===t&&(d.x=Math.sin(c)*l+(r[0].x+o.x)/2-5,d.y=-Math.cos(c)*l+(r[0].y+o.y)/2-5),d},formatUrl:y,getStylesFromArray:S,generateId:x,random:L,memoize:_,runFunc:w,initIdGeneratior:j}},"@braintree/sanitize-url": +/*!******************************************!*\ + !*** external "@braintree/sanitize-url" ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! @braintree/sanitize-url */ "./node_modules/@braintree/sanitize-url/index.js"); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js ***! - \*********************************************************************************************/ -/*! exports provided: DuplicateSelectionAction, AbstractSortLinesAction, SortLinesAscendingAction, SortLinesDescendingAction, TrimTrailingWhitespaceAction, DeleteLinesAction, IndentLinesAction, InsertLineBeforeAction, InsertLineAfterAction, AbstractDeleteAllToBoundaryAction, DeleteAllLeftAction, DeleteAllRightAction, JoinLinesAction, TransposeAction, AbstractCaseAction, UpperCaseAction, LowerCaseAction, TitleCaseAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DuplicateSelectionAction", function() { return DuplicateSelectionAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractSortLinesAction", function() { return AbstractSortLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortLinesAscendingAction", function() { return SortLinesAscendingAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortLinesDescendingAction", function() { return SortLinesDescendingAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrimTrailingWhitespaceAction", function() { return TrimTrailingWhitespaceAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteLinesAction", function() { return DeleteLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IndentLinesAction", function() { return IndentLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertLineBeforeAction", function() { return InsertLineBeforeAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertLineAfterAction", function() { return InsertLineAfterAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractDeleteAllToBoundaryAction", function() { return AbstractDeleteAllToBoundaryAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteAllLeftAction", function() { return DeleteAllLeftAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteAllRightAction", function() { return DeleteAllRightAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JoinLinesAction", function() { return JoinLinesAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransposeAction", function() { return TransposeAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractCaseAction", function() { return AbstractCaseAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpperCaseAction", function() { return UpperCaseAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LowerCaseAction", function() { return LowerCaseAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleCaseAction", function() { return TitleCaseAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/controller/coreCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _common_commands_trimTrailingWhitespaceCommand_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/commands/trimTrailingWhitespaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/trimTrailingWhitespaceCommand.js"); -/* harmony import */ var _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/controller/cursorTypeOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./copyLinesCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/copyLinesCommand.js"); -/* harmony import */ var _moveLinesCommand_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./moveLinesCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js"); -/* harmony import */ var _sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sortLinesCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/***/ "d3": +/*!*********************!*\ + !*** external "d3" ***! + \*********************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js"); +/***/ }), +/***/ "dagre": +/*!************************!*\ + !*** external "dagre" ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! dagre */ "./node_modules/dagre/index.js"); +/***/ }), +/***/ "dagre-d3": +/*!***************************!*\ + !*** external "dagre-d3" ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! dagre-d3 */ "./node_modules/dagre-d3/index.js"); +/***/ }), +/***/ "dagre-d3/lib/label/add-html-label.js": +/*!*******************************************************!*\ + !*** external "dagre-d3/lib/label/add-html-label.js" ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "./node_modules/dagre-d3/lib/label/add-html-label.js"); +/***/ }), +/***/ "entity-decode/browser": +/*!****************************************!*\ + !*** external "entity-decode/browser" ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __webpack_require__(/*! entity-decode/browser */ "./node_modules/entity-decode/browser.js"); +/***/ }), +/***/ "graphlib": +/*!***************************!*\ + !*** external "graphlib" ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports) { -// copy lines -class AbstractCopyLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor(down, opts) { - super(opts); - this.down = down; - } - run(_accessor, editor) { - if (!editor.hasModel()) { - return; - } - const selections = editor.getSelections().map((selection, index) => ({ selection, index, ignore: false })); - selections.sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].compareRangesUsingStarts(a.selection, b.selection)); - // Remove selections that would result in copying the same line - let prev = selections[0]; - for (let i = 1; i < selections.length; i++) { - const curr = selections[i]; - if (prev.selection.endLineNumber === curr.selection.startLineNumber) { - // these two selections would copy the same line - if (prev.index < curr.index) { - // prev wins - curr.ignore = true; - } - else { - // curr wins - prev.ignore = true; - prev = curr; - } - } - } - const commands = []; - for (const selection of selections) { - if (selection.ignore) { - continue; - } - commands.push(new _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__["CopyLinesCommand"](selection.selection, this.down)); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -class CopyLinesUpAction extends AbstractCopyLinesAction { - constructor() { - super(false, { - id: 'editor.action.copyLinesUpAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.copyUp', "Copy Line Up"), - alias: 'Copy Line Up', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */, - linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__["MenuId"].MenubarSelectionMenu, - group: '2_line', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miCopyLinesUp', comment: ['&& denotes a mnemonic'] }, "&&Copy Line Up"), - order: 1 - } - }); - } -} -class CopyLinesDownAction extends AbstractCopyLinesAction { - constructor() { - super(true, { - id: 'editor.action.copyLinesDownAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.copyDown', "Copy Line Down"), - alias: 'Copy Line Down', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */, - linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__["MenuId"].MenubarSelectionMenu, - group: '2_line', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miCopyLinesDown', comment: ['&& denotes a mnemonic'] }, "Co&&py Line Down"), - order: 2 - } - }); - } -} -class DuplicateSelectionAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.duplicateSelection', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('duplicateSelection', "Duplicate Selection"), - alias: 'Duplicate Selection', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__["MenuId"].MenubarSelectionMenu, - group: '2_line', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miDuplicateSelection', comment: ['&& denotes a mnemonic'] }, "&&Duplicate Selection"), - order: 5 - } - }); - } - run(accessor, editor, args) { - if (!editor.hasModel()) { - return; - } - const commands = []; - const selections = editor.getSelections(); - const model = editor.getModel(); - for (const selection of selections) { - if (selection.isEmpty()) { - commands.push(new _copyLinesCommand_js__WEBPACK_IMPORTED_MODULE_12__["CopyLinesCommand"](selection, true)); - } - else { - const insertSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__["ReplaceCommandThatSelectsText"](insertSelection, model.getValueInRange(selection))); - } - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -// move lines -class AbstractMoveLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor(down, opts) { - super(opts); - this.down = down; - } - run(_accessor, editor) { - let commands = []; - let selections = editor.getSelections() || []; - const autoIndent = editor.getOption(8 /* autoIndent */); - for (const selection of selections) { - commands.push(new _moveLinesCommand_js__WEBPACK_IMPORTED_MODULE_13__["MoveLinesCommand"](selection, this.down, autoIndent)); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -class MoveLinesUpAction extends AbstractMoveLinesAction { - constructor() { - super(false, { - id: 'editor.action.moveLinesUpAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.moveUp', "Move Line Up"), - alias: 'Move Line Up', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 16 /* UpArrow */, - linux: { primary: 512 /* Alt */ | 16 /* UpArrow */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__["MenuId"].MenubarSelectionMenu, - group: '2_line', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miMoveLinesUp', comment: ['&& denotes a mnemonic'] }, "Mo&&ve Line Up"), - order: 3 - } - }); - } -} -class MoveLinesDownAction extends AbstractMoveLinesAction { - constructor() { - super(true, { - id: 'editor.action.moveLinesDownAction', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.moveDown', "Move Line Down"), - alias: 'Move Line Down', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 512 /* Alt */ | 18 /* DownArrow */, - linux: { primary: 512 /* Alt */ | 18 /* DownArrow */ }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_15__["MenuId"].MenubarSelectionMenu, - group: '2_line', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miMoveLinesDown', comment: ['&& denotes a mnemonic'] }, "Move &&Line Down"), - order: 4 - } - }); - } -} -class AbstractSortLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor(descending, opts) { - super(opts); - this.descending = descending; - } - run(_accessor, editor) { - const selections = editor.getSelections() || []; - for (const selection of selections) { - if (!_sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__["SortLinesCommand"].canRun(editor.getModel(), selection, this.descending)) { - return; - } - } - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - commands[i] = new _sortLinesCommand_js__WEBPACK_IMPORTED_MODULE_14__["SortLinesCommand"](selections[i], this.descending); - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } -} -class SortLinesAscendingAction extends AbstractSortLinesAction { - constructor() { - super(false, { - id: 'editor.action.sortLinesAscending', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.sortAscending', "Sort Lines Ascending"), - alias: 'Sort Lines Ascending', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); - } -} -class SortLinesDescendingAction extends AbstractSortLinesAction { - constructor() { - super(true, { - id: 'editor.action.sortLinesDescending', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.sortDescending', "Sort Lines Descending"), - alias: 'Sort Lines Descending', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); - } -} -class TrimTrailingWhitespaceAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: TrimTrailingWhitespaceAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.trimTrailingWhitespace', "Trim Trailing Whitespace"), - alias: 'Trim Trailing Whitespace', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 54 /* KEY_X */), - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor, args) { - let cursors = []; - if (args.reason === 'auto-save') { - // See https://github.com/editorconfig/editorconfig-vscode/issues/47 - // It is very convenient for the editor config extension to invoke this action. - // So, if we get a reason:'auto-save' passed in, let's preserve cursor positions. - cursors = (editor.getSelections() || []).map(s => new _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"](s.positionLineNumber, s.positionColumn)); - } - let selection = editor.getSelection(); - if (selection === null) { - return; - } - let command = new _common_commands_trimTrailingWhitespaceCommand_js__WEBPACK_IMPORTED_MODULE_5__["TrimTrailingWhitespaceCommand"](selection, cursors); - editor.pushUndoStop(); - editor.executeCommands(this.id, [command]); - editor.pushUndoStop(); - } -} -TrimTrailingWhitespaceAction.ID = 'editor.action.trimTrailingWhitespace'; -class DeleteLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.deleteLines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.delete', "Delete Line"), - alias: 'Delete Line', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 41 /* KEY_K */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - if (!editor.hasModel()) { - return; - } - let ops = this._getLinesToRemove(editor); - let model = editor.getModel(); - if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { - // Model is empty - return; - } - let linesDeleted = 0; - let edits = []; - let cursorState = []; - for (let i = 0, len = ops.length; i < len; i++) { - const op = ops[i]; - let startLineNumber = op.startLineNumber; - let endLineNumber = op.endLineNumber; - let startColumn = 1; - let endColumn = model.getLineMaxColumn(endLineNumber); - if (endLineNumber < model.getLineCount()) { - endLineNumber += 1; - endColumn = 1; - } - else if (startLineNumber > 1) { - startLineNumber -= 1; - startColumn = model.getLineMaxColumn(startLineNumber); - } - edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](startLineNumber, startColumn, endLineNumber, endColumn), '')); - cursorState.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](startLineNumber - linesDeleted, op.positionColumn, startLineNumber - linesDeleted, op.positionColumn)); - linesDeleted += (op.endLineNumber - op.startLineNumber + 1); - } - editor.pushUndoStop(); - editor.executeEdits(this.id, edits, cursorState); - editor.pushUndoStop(); - } - _getLinesToRemove(editor) { - // Construct delete operations - let operations = editor.getSelections().map((s) => { - let endLineNumber = s.endLineNumber; - if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { - endLineNumber -= 1; - } - return { - startLineNumber: s.startLineNumber, - selectionStartColumn: s.selectionStartColumn, - endLineNumber: endLineNumber, - positionColumn: s.positionColumn - }; - }); - // Sort delete operations - operations.sort((a, b) => { - if (a.startLineNumber === b.startLineNumber) { - return a.endLineNumber - b.endLineNumber; - } - return a.startLineNumber - b.startLineNumber; - }); - // Merge delete operations which are adjacent or overlapping - let mergedOperations = []; - let previousOperation = operations[0]; - for (let i = 1; i < operations.length; i++) { - if (previousOperation.endLineNumber + 1 >= operations[i].startLineNumber) { - // Merge current operations into the previous one - previousOperation.endLineNumber = operations[i].endLineNumber; - } - else { - // Push previous operation - mergedOperations.push(previousOperation); - previousOperation = operations[i]; - } - } - // Push the last operation - mergedOperations.push(previousOperation); - return mergedOperations; - } -} -class IndentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.indentLines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.indent', "Indent Line"), - alias: 'Indent Line', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - return; - } - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__["TypeOperations"].indent(viewModel.cursorConfig, editor.getModel(), editor.getSelections())); - editor.pushUndoStop(); - } -} -class OutdentLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.outdentLines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.outdent', "Outdent Line"), - alias: 'Outdent Line', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_2__["CoreEditingCommands"].Outdent.runEditorCommand(_accessor, editor, null); - } -} -class InsertLineBeforeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.insertLineBefore', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.insertBefore', "Insert Line Above"), - alias: 'Insert Line Above', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 3 /* Enter */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - return; - } - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__["TypeOperations"].lineInsertBefore(viewModel.cursorConfig, editor.getModel(), editor.getSelections())); - } -} -class InsertLineAfterAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.insertLineAfter', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.insertAfter', "Insert Line Below"), - alias: 'Insert Line Below', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 3 /* Enter */, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - const viewModel = editor._getViewModel(); - if (!viewModel) { - return; - } - editor.pushUndoStop(); - editor.executeCommands(this.id, _common_controller_cursorTypeOperations_js__WEBPACK_IMPORTED_MODULE_6__["TypeOperations"].lineInsertAfter(viewModel.cursorConfig, editor.getModel(), editor.getSelections())); - } -} -class AbstractDeleteAllToBoundaryAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - run(_accessor, editor) { - if (!editor.hasModel()) { - return; - } - const primaryCursor = editor.getSelection(); - let rangesToDelete = this._getRangesToDelete(editor); - // merge overlapping selections - let effectiveRanges = []; - for (let i = 0, count = rangesToDelete.length - 1; i < count; i++) { - let range = rangesToDelete[i]; - let nextRange = rangesToDelete[i + 1]; - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].intersectRanges(range, nextRange) === null) { - effectiveRanges.push(range); - } - else { - rangesToDelete[i + 1] = _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].plusRange(range, nextRange); - } - } - effectiveRanges.push(rangesToDelete[rangesToDelete.length - 1]); - let endCursorState = this._getEndCursorState(primaryCursor, effectiveRanges); - let edits = effectiveRanges.map(range => { - return _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(range, ''); - }); - editor.pushUndoStop(); - editor.executeEdits(this.id, edits, endCursorState); - editor.pushUndoStop(); - } -} -class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction { - constructor() { - super({ - id: 'deleteAllLeft', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.deleteAllLeft', "Delete All Left"), - alias: 'Delete All Left', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 2048 /* CtrlCmd */ | 1 /* Backspace */ }, - weight: 100 /* EditorContrib */ - } - }); - } - _getEndCursorState(primaryCursor, rangesToDelete) { - let endPrimaryCursor = null; - let endCursorState = []; - let deletedLines = 0; - rangesToDelete.forEach(range => { - let endCursor; - if (range.endColumn === 1 && deletedLines > 0) { - let newStartLine = range.startLineNumber - deletedLines; - endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](newStartLine, range.startColumn, newStartLine, range.startColumn); - } - else { - endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); - } - deletedLines += range.endLineNumber - range.startLineNumber; - if (range.intersectRanges(primaryCursor)) { - endPrimaryCursor = endCursor; - } - else { - endCursorState.push(endCursor); - } - }); - if (endPrimaryCursor) { - endCursorState.unshift(endPrimaryCursor); - } - return endCursorState; - } - _getRangesToDelete(editor) { - let selections = editor.getSelections(); - if (selections === null) { - return []; - } - let rangesToDelete = selections; - let model = editor.getModel(); - if (model === null) { - return []; - } - rangesToDelete.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].compareRangesUsingStarts); - rangesToDelete = rangesToDelete.map(selection => { - if (selection.isEmpty()) { - if (selection.startColumn === 1) { - let deleteFromLine = Math.max(1, selection.startLineNumber - 1); - let deleteFromColumn = selection.startLineNumber === 1 ? 1 : model.getLineContent(deleteFromLine).length + 1; - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](deleteFromLine, deleteFromColumn, selection.startLineNumber, 1); - } - else { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](selection.startLineNumber, 1, selection.startLineNumber, selection.startColumn); - } - } - else { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](selection.startLineNumber, 1, selection.endLineNumber, selection.endColumn); - } - }); - return rangesToDelete; - } -} -class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction { - constructor() { - super({ - id: 'deleteAllRight', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.deleteAllRight', "Delete All Right"), - alias: 'Delete All Right', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 41 /* KEY_K */, secondary: [2048 /* CtrlCmd */ | 20 /* Delete */] }, - weight: 100 /* EditorContrib */ - } - }); - } - _getEndCursorState(primaryCursor, rangesToDelete) { - let endPrimaryCursor = null; - let endCursorState = []; - for (let i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) { - let range = rangesToDelete[i]; - let endCursor = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn); - if (range.intersectRanges(primaryCursor)) { - endPrimaryCursor = endCursor; - } - else { - endCursorState.push(endCursor); - } - } - if (endPrimaryCursor) { - endCursorState.unshift(endPrimaryCursor); - } - return endCursorState; - } - _getRangesToDelete(editor) { - let model = editor.getModel(); - if (model === null) { - return []; - } - let selections = editor.getSelections(); - if (selections === null) { - return []; - } - let rangesToDelete = selections.map((sel) => { - if (sel.isEmpty()) { - const maxColumn = model.getLineMaxColumn(sel.startLineNumber); - if (sel.startColumn === maxColumn) { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](sel.startLineNumber, sel.startColumn, sel.startLineNumber + 1, 1); - } - else { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](sel.startLineNumber, sel.startColumn, sel.startLineNumber, maxColumn); - } - } - return sel; - }); - rangesToDelete.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].compareRangesUsingStarts); - return rangesToDelete; - } -} -class JoinLinesAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.joinLines', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('lines.joinLines', "Join Lines"), - alias: 'Join Lines', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].editorTextFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 40 /* KEY_J */ }, - weight: 100 /* EditorContrib */ - } - }); - } - run(_accessor, editor) { - let selections = editor.getSelections(); - if (selections === null) { - return; - } - let primaryCursor = editor.getSelection(); - if (primaryCursor === null) { - return; - } - selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].compareRangesUsingStarts); - let reducedSelections = []; - let lastSelection = selections.reduce((previousValue, currentValue) => { - if (previousValue.isEmpty()) { - if (previousValue.endLineNumber === currentValue.startLineNumber) { - if (primaryCursor.equalsSelection(previousValue)) { - primaryCursor = currentValue; - } - return currentValue; - } - if (currentValue.startLineNumber > previousValue.endLineNumber + 1) { - reducedSelections.push(previousValue); - return currentValue; - } - else { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn); - } - } - else { - if (currentValue.startLineNumber > previousValue.endLineNumber) { - reducedSelections.push(previousValue); - return currentValue; - } - else { - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn); - } - } - }); - reducedSelections.push(lastSelection); - let model = editor.getModel(); - if (model === null) { - return; - } - let edits = []; - let endCursorState = []; - let endPrimaryCursor = primaryCursor; - let lineOffset = 0; - for (let i = 0, len = reducedSelections.length; i < len; i++) { - let selection = reducedSelections[i]; - let startLineNumber = selection.startLineNumber; - let startColumn = 1; - let columnDeltaOffset = 0; - let endLineNumber, endColumn; - let selectionEndPositionOffset = model.getLineContent(selection.endLineNumber).length - selection.endColumn; - if (selection.isEmpty() || selection.startLineNumber === selection.endLineNumber) { - let position = selection.getStartPosition(); - if (position.lineNumber < model.getLineCount()) { - endLineNumber = startLineNumber + 1; - endColumn = model.getLineMaxColumn(endLineNumber); - } - else { - endLineNumber = position.lineNumber; - endColumn = model.getLineMaxColumn(position.lineNumber); - } - } - else { - endLineNumber = selection.endLineNumber; - endColumn = model.getLineMaxColumn(endLineNumber); - } - let trimmedLinesContent = model.getLineContent(startLineNumber); - for (let i = startLineNumber + 1; i <= endLineNumber; i++) { - let lineText = model.getLineContent(i); - let firstNonWhitespaceIdx = model.getLineFirstNonWhitespaceColumn(i); - if (firstNonWhitespaceIdx >= 1) { - let insertSpace = true; - if (trimmedLinesContent === '') { - insertSpace = false; - } - if (insertSpace && (trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === ' ' || - trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === '\t')) { - insertSpace = false; - trimmedLinesContent = trimmedLinesContent.replace(/[\s\uFEFF\xA0]+$/g, ' '); - } - let lineTextWithoutIndent = lineText.substr(firstNonWhitespaceIdx - 1); - trimmedLinesContent += (insertSpace ? ' ' : '') + lineTextWithoutIndent; - if (insertSpace) { - columnDeltaOffset = lineTextWithoutIndent.length + 1; - } - else { - columnDeltaOffset = lineTextWithoutIndent.length; - } - } - else { - columnDeltaOffset = 0; - } - } - let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](startLineNumber, startColumn, endLineNumber, endColumn); - if (!deleteSelection.isEmpty()) { - let resultSelection; - if (selection.isEmpty()) { - edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(deleteSelection, trimmedLinesContent)); - resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](deleteSelection.startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1, startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1); - } - else { - if (selection.startLineNumber === selection.endLineNumber) { - edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(deleteSelection, trimmedLinesContent)); - resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](selection.startLineNumber - lineOffset, selection.startColumn, selection.endLineNumber - lineOffset, selection.endColumn); - } - else { - edits.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(deleteSelection, trimmedLinesContent)); - resultSelection = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](selection.startLineNumber - lineOffset, selection.startColumn, selection.startLineNumber - lineOffset, trimmedLinesContent.length - selectionEndPositionOffset); - } - } - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"].intersectRanges(deleteSelection, primaryCursor) !== null) { - endPrimaryCursor = resultSelection; - } - else { - endCursorState.push(resultSelection); - } - } - lineOffset += deleteSelection.endLineNumber - deleteSelection.startLineNumber; - } - endCursorState.unshift(endPrimaryCursor); - editor.pushUndoStop(); - editor.executeEdits(this.id, edits, endCursorState); - editor.pushUndoStop(); - } -} -class TransposeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.transpose', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.transpose', "Transpose characters around the cursor"), - alias: 'Transpose characters around the cursor', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); - } - run(_accessor, editor) { - let selections = editor.getSelections(); - if (selections === null) { - return; - } - let model = editor.getModel(); - if (model === null) { - return; - } - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - let selection = selections[i]; - if (!selection.isEmpty()) { - continue; - } - let cursor = selection.getStartPosition(); - let maxColumn = model.getLineMaxColumn(cursor.lineNumber); - if (cursor.column >= maxColumn) { - if (cursor.lineNumber === model.getLineCount()) { - continue; - } - // The cursor is at the end of current line and current line is not empty - // then we transpose the character before the cursor and the line break if there is any following line. - let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1); - let chars = model.getValueInRange(deleteSelection).split('').reverse().join(''); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__["ReplaceCommand"](new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1), chars)); - } - else { - let deleteSelection = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber, cursor.column + 1); - let chars = model.getValueInRange(deleteSelection).split('').reverse().join(''); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__["ReplaceCommandThatPreservesSelection"](deleteSelection, chars, new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](cursor.lineNumber, cursor.column + 1, cursor.lineNumber, cursor.column + 1))); - } - } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); - } +module.exports = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js"); + +/***/ }), + +/***/ "khroma": +/*!*************************!*\ + !*** external "khroma" ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __webpack_require__(/*! khroma */ "./node_modules/khroma/dist/index.js"); + +/***/ }), + +/***/ "moment-mini": +/*!******************************!*\ + !*** external "moment-mini" ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __webpack_require__(/*! moment-mini */ "./node_modules/moment-mini/moment.min.js"); + +/***/ }), + +/***/ "stylis": +/*!*************************!*\ + !*** external "stylis" ***! + \*************************/ +/*! no static exports found */function(e,t){e.exports=n(889)}}).default},e.exports=i()},function(e,t,n){"use strict";var i=n(0),r=n(15),o=n(2),s=n(33),a=n(17),l=n(9),c=n(43),d=n(87),u=n(72),h=(n(607),n(1)),f=n(13),g=n(6),p=n(35),m=n(42),_=n(186),b=n(3),v=n(29),y=n(110),w=n(202),C=n(232),S=n(169),k=n(18),x=n(82),L=n(174),M=n(41),D=n(61),E=n(164),T=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},O=function(e,t){return function(n,i){t(n,i,e)}};let N=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof u.c||e instanceof u.a}getChildren(e){if(e instanceof u.c)return e.groups;if(e instanceof u.a)return e.resolve(this._resolverService).then(e=>e.children);throw new Error("bad tree")}};N=T([O(0,y.a)],N);class I{getHeight(){return 23}getTemplateId(e){return e instanceof u.a?j.id:B.id}}let A=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof u.b){const n=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(n)return n.value}return Object(m.b)(e.uri)}};A=T([O(0,M.a)],A);class R{getId(e){return e instanceof u.b?e.id:e.uri}}let P=class extends o.a{constructor(e,t,n){super(),this._uriLabel=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new w.a(i,{supportHighlights:!0})),this.badge=new C.a(h.p(i,h.a(".count"))),this._register(Object(x.a)(this.badge,n)),e.appendChild(i)}set(e,t){let n=Object(m.d)(e.uri);this.file.setLabel(Object(L.a)(e.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(Object(i.a)("referencesCount","{0} references",r)):this.badge.setTitleFormat(Object(i.a)("referenceCount","{0} reference",r))}};P=T([O(1,S.a),O(2,k.c)],P);let j=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(P,e)}renderElement(e,t,n){n.set(e.element,Object(D.c)(e.filterData))}disposeTemplate(e){e.dispose()}};j.id="FileReferencesRenderer",j=T([O(0,a.a)],j);class F{constructor(e){this.label=new E.a(e,!1)}set(e,t){var n;const i=null===(n=e.parent.getPreview(e))||void 0===n?void 0:n.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!D.a.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,Object(D.c)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${Object(m.b)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class B{constructor(){this.templateId=B.id}renderTemplate(e){return new F(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}B.id="OneReferenceRenderer";class W{getWidgetAriaLabel(){return Object(i.a)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var H=n(129),Y=n(5),V=n(53),z=(n(611),n(20)),U=n(106),$=n(14),q=n(160),K=n(34);const G={separatorBorder:f.a.transparent};class Z{constructor(e,t,n,i){this.container=e,this.view=t,this.disposable=i,this._cachedVisibleSize=void 0,"number"==typeof n?(this._size=n,this._cachedVisibleSize=void 0,h.e(e,"visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=Object(U.b)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),h.ab(this.container,"visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class J extends Z{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class X extends Z{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var Q,ee;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(Q||(Q={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(ee||(ee={}));class te extends o.a{constructor(e,t={}){super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Q.Idle,this._onDidSashChange=this._register(new g.a),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new g.a),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=z.k(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!z.k(t.proportionalLayout)||!!t.proportionalLayout,this.el=document.createElement("div"),h.e(this.el,"monaco-split-view2"),h.e(this.el,0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=h.p(this.el,h.a(".sash-container")),this.viewContainer=h.p(this.el,h.a(".split-view-container")),this.style(t.styles||G),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((e,t)=>{const n=z.k(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},i=e.view;this.doAddView(i,n,t,!0)}),this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(h.Q(this.el,"separator-border"),this.el.style.removeProperty("--separator-border")):(h.e(this.el,"separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,i){this.doAddView(e,t,n,i)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority),r=t.filter(e=>2===this.viewItems[e].priority);this.resize(this.viewItems.length-1,e-n,void 0,i,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:n}){for(const e of this.viewItems)e.enabled=!1;const i=Object($.j)(this.sashItems,t=>t.sash===e),r=Object(o.e)(Object(K.a)(document.body,"keydown")(e=>s(this.sashDragState.current,e.altKey)),Object(K.a)(document.body,"keyup")(()=>s(this.sashDragState.current,!1))),s=(e,t)=>{const n=this.viewItems.map(e=>e.size);let o,s,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){if(i===this.sashItems.length-1){const e=this.viewItems[i];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[i+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=Object($.s)(i,-1),t=Object($.s)(i+1,this.viewItems.length),r=e.reduce((e,t)=>e+(this.viewItems[t].minimumSize-n[t]),0),a=e.reduce((e,t)=>e+(this.viewItems[t].viewMaximumSize-n[t]),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce((e,t)=>e+(n[t]-this.viewItems[t].minimumSize),0),c=0===t.length?Number.NEGATIVE_INFINITY:t.reduce((e,t)=>e+(n[t]-this.viewItems[t].viewMaximumSize),0),d=Math.max(r,c),u=Math.min(l,a),h=this.findFirstSnapIndex(e),f=this.findFirstSnapIndex(t);if("number"==typeof h){const e=this.viewItems[h],t=Math.floor(e.viewMinimumSize/2);o={index:h,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof f){const e=this.viewItems[f],t=Math.floor(e.viewMinimumSize/2);s={index:f,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:i,sizes:n,minDelta:a,maxDelta:l,alt:t,snapBefore:o,snapAfter:s,disposable:r}};s(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:i,alt:r,minDelta:o,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-n,d=this.resize(t,c,i,void 0,void 0,o,s,a,l);if(r){const e=t===this.sashItems.length-1,n=this.viewItems.map(e=>e.size),i=e?t:t+1,r=this.viewItems[i],o=r.size-r.maximumSize,s=r.size-r.minimumSize,a=e?t-1:t+1;this.resize(a,-d,n,void 0,void 0,o,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=Object(U.b)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(this.state!==Q.Idle)throw new Error("Cant modify splitview");if(this.state=Q.Busy,e<0||e>=this.viewItems.length)return;const n=Object($.s)(this.viewItems.length).filter(t=>t!==e),i=[...n.filter(e=>1===this.viewItems[e].priority),e],r=n.filter(e=>2===this.viewItems[e].priority),o=this.viewItems[e];t=Math.round(t),t=Object(U.b)(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(i,r),this.state=Q.Idle}distributeViewSizes(){const e=[];let t=0;for(const n of this.viewItems)n.maximumSize-n.minimumSize>0&&(e.push(n),t+=n.size);const n=Math.floor(t/e.length);for(const t of e)t.size=Object(U.b)(n,t.minimumSize,t.maximumSize);const i=Object($.s)(this.viewItems.length),r=i.filter(e=>1===this.viewItems[e].priority),o=i.filter(e=>2===this.viewItems[e].priority);this.relayout(r,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,i){if(this.state!==Q.Idle)throw new Error("Cant modify splitview");this.state=Q.Busy;const r=h.a(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));const s=e.onDidChange(e=>this.onViewChange(d,e)),a=Object(o.h)(()=>this.viewContainer.removeChild(r)),l=Object(o.e)(s,a);let c;c="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const d=0===this.orientation?new J(r,e,c,l):new X(r,e,c,l);if(this.viewItems.splice(n,0,d),this.viewItems.length>1){const e=0===this.orientation?new q.a(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e)},{orientation:1,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}):new q.a(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e)},{orientation:0,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),t=0===this.orientation?t=>({sash:e,start:t.startY,current:t.currentY,alt:t.altKey}):t=>({sash:e,start:t.startX,current:t.currentX,alt:t.altKey}),i=g.b.map(e.onDidStart,t)(this.onSashStart,this),r=g.b.map(e.onDidChange,t)(this.onSashChange,this),s=g.b.map(e.onDidEnd,()=>Object($.j)(this.sashItems,t=>t.sash===e))(this.onSashEnd,this),a=e.onDidReset(()=>{const t=Object($.j)(this.sashItems,t=>t.sash===e),n=Object($.s)(t,-1),i=Object($.s)(t+1,this.viewItems.length),r=this.findFirstSnapIndex(n),o=this.findFirstSnapIndex(i);("number"!=typeof r||this.viewItems[r].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(t)}),l=Object(o.e)(i,r,s,a,e),c={sash:e,disposable:l};this.sashItems.splice(n-1,0,c)}let u;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(u=[t.index]),i||this.relayout([n],u),this.state=Q.Idle,i||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce((e,t)=>e+t.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(e=>e.size),i,r,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const c=Object($.s)(e,-1),d=Object($.s)(e+1,this.viewItems.length);if(r)for(const e of r)Object($.r)(c,e),Object($.r)(d,e);if(i)for(const e of i)Object($.q)(c,e),Object($.q)(d,e);const u=c.map(e=>this.viewItems[e]),h=c.map(e=>n[e]),f=d.map(e=>this.viewItems[e]),g=d.map(e=>n[e]),p=c.reduce((e,t)=>e+(this.viewItems[t].minimumSize-n[t]),0),m=c.reduce((e,t)=>e+(this.viewItems[t].maximumSize-n[t]),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce((e,t)=>e+(n[t]-this.viewItems[t].minimumSize),0),b=0===d.length?Number.NEGATIVE_INFINITY:d.reduce((e,t)=>e+(n[t]-this.viewItems[t].maximumSize),0),v=Math.max(p,b,o),y=Math.min(_,m,s);let w=!1;if(a){const e=this.viewItems[a.index],n=t>=a.limitDelta;w=n!==e.visible,e.setVisible(n,a.size)}if(!w&&l){const e=this.viewItems[l.index],n=te+t.size,0);let n=this.size-t;const i=Object($.s)(this.viewItems.length-1,-1),r=i.filter(e=>1===this.viewItems[e].priority),o=i.filter(e=>2===this.viewItems[e].priority);for(const e of o)Object($.r)(i,e);for(const e of r)Object($.q)(i,e);"number"==typeof e&&Object($.q)(i,e);for(let e=0;0!==n&&ee+t.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(e=>e.sash.layout()),this.updateSashEnablement()}updateSashEnablement(){let e=!1;const t=this.viewItems.map(t=>e=t.size-t.minimumSize>0||e);e=!1;const n=this.viewItems.map(t=>e=t.maximumSize-t.size>0||e),i=[...this.viewItems].reverse();e=!1;const r=i.map(t=>e=t.size-t.minimumSize>0||e).reverse();e=!1;const o=i.map(t=>e=t.maximumSize-t.size>0||e).reverse();let s=0;for(let e=0;e0||this.startSnappingEnabled)?i.state=1:d&&t[e]&&(s0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}var ne=n(154),ie=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},re=function(e,t){return function(n,i){t(n,i,e)}},oe=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class se{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new o.b,this._callOnModelChange=new o.b,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(ae,"ReferencesWidget",this._treeContainer,new I,[this._instantiationService.createInstance(j),this._instantiationService.createInstance(B)],this._instantiationService.createInstance(N),t),this._splitView.addView({onDidChange:g.b.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},ee.Distribute),this._splitView.addView({onDidChange:g.b.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},ee.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(e,t)=>{e instanceof u.b&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen(e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")}),h.K(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim={height:e,width:t},this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=i.a("noResults","No results"),h.Z(this._messageContainer),Promise.resolve(void 0)):(h.K(this._messageContainer),this._decorationsManager=new se(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(2!==t.detail)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),h.Z(this._treeContainer),h.Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof u.b?e:e instanceof u.a&&e.children.length>0?e.children[0]:void 0}revealReference(e){return oe(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return oe(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==p.b.inMemory?this.setTitle(Object(m.c)(e.uri),this._uriLabel.getUriLabel(Object(m.d)(e.uri))):this.setTitle(i.a("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const r=yield n;if(!this._model)return void r.dispose();Object(o.f)(this._previewModelReference);const s=r.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,n=b.a.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(s.textEditorModel),this._preview.setSelection(n),this._preview.revealRangeInCenter(n,t)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()}))}};le=ie([re(3,k.c),re(4,y.a),re(5,a.a),re(6,V.a),re(7,S.a),re(8,ne.a),re(9,M.a)],le),Object(k.g)((e,t)=>{const n=e.getColor(V.m);n&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${n}; }`);const i=e.getColor(V.h);i&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${i}; }`);const r=e.getColor(V.i);r&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${r}; box-sizing: border-box; }`);const o=e.getColor(Y.b);o&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${o}; box-sizing: border-box; }`);const s=e.getColor(V.j);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${s}; }`);const a=e.getColor(V.l);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor(V.k);l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=e.getColor(V.n);c&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const d=e.getColor(V.o);d&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${d} !important; }`);const u=e.getColor(V.f);u&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {"+`\tbackground-color: ${u};`+"}");const h=e.getColor(V.g);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {"+`\tbackground-color: ${h};`+"}")});var ce=n(10),de=n(40),ue=n(19),he=n(80),fe=n(39),ge=n(28);n.d(t,"a",(function(){return ve}));var pe=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},me=function(e,t){return function(n,i){t(n,i,e)}},_e=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const be=new l.c("referenceSearchVisible",!1);let ve=class e{constructor(e,t,n,i,r,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new o.b,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=be.bindTo(n)}static get(t){return t.getContribution(e.ID)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),Object(o.f)(this._widget),Object(o.f)(this._model),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const o=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,n;try{const i=JSON.parse(e);t=i.ratio,n=i.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:n||18}}}.fromJSON(this._storageService.get("peekViewLayout",0,"{}"));this._widget=this._instantiationService.createInstance(le,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(i.a("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store("peekViewLayout",JSON.stringify(this._widget.layoutData),0),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(e=>{let{element:t,kind:i}=e;if(t)switch(i){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1);break;case"side":this.openReference(t,!0);break;case"goto":n?this._gotoReference(t):this.openReference(t,!1)}}));const s=++this._requestIdPool;t.then(t=>{if(s===this._requestIdPool&&this._widget)return this._model&&this._model.dispose(),this._model=t,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(i.a("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,n=new ce.a(e.startLineNumber,e.startColumn),r=this._model.nearestReference(t,n);if(r)return this._widget.setSelection(r).then(()=>{this._widget&&"editor"===this._editor.getOption(68)&&this._widget.focusOnPreviewEditor()})}})},e=>{this._notificationService.error(e)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return _e(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i),r?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return _e(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){Object(o.f)(this._widget),Object(o.f)(this._model),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const n=b.a.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:n}},this._editor).then(t=>{var i;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(n),this._widget.focusOnReferenceTree();else{const r=e.get(t),o=this._model.clone();this.closeWidget(),t.focus(),r.toggleWidget(n,Object(ue.f)(e=>Promise.resolve(o)),null!==(i=this._peekMode)&&void 0!==i&&i)}else this.closeWidget()},e=>{this._ignoreModelChangeEvent=!1,Object(r.e)(e)})}openReference(e,t){t||this.closeWidget();const{uri:n,range:i}=e;this._editorService.openCodeEditor({resource:n,options:{selection:i}},this._editor,t)}};function ye(e,t){const n=Object(V.d)(e);if(!n)return;let i=ve.get(n);i&&t(i)}ve.ID="editor.contrib.referencesController",ve=pe([me(2,l.b),me(3,s.a),me(4,de.a),me(5,a.a),me(6,d.a),me(7,c.a)],ve),he.a.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Object(fe.a)(2089,60),when:l.a.or(be,V.b.inPeekEditor),handler(e){ye(e,e=>{e.changeFocusBetweenPreviewAndReferences()})}}),he.a.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:l.a.or(be,V.b.inPeekEditor),handler(e){ye(e,e=>{e.goToNextOrPreviousReference(!0)})}}),he.a.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:l.a.or(be,V.b.inPeekEditor),handler(e){ye(e,e=>{e.goToNextOrPreviousReference(!1)})}}),ge.a.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),ge.a.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),ge.a.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),ge.a.registerCommand("closeReferenceSearch",e=>ye(e,e=>e.closeWidget())),he.a.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:l.a.and(V.b.inPeekEditor,l.a.not("config.editor.stablePeek"))}),he.a.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:l.a.and(be,l.a.not("config.editor.stablePeek"))}),he.a.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:l.a.and(be,H.e),handler(e){var t;const n=null===(t=e.get(H.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof u.b&&ye(e,e=>e.revealReference(n[0]))}}),he.a.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:l.a.and(be,H.e),handler(e){var t;const n=null===(t=e.get(H.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof u.b&&ye(e,e=>e.openReference(n[0],!0))}}),ge.a.registerCommand("openReference",e=>{var t;const n=null===(t=e.get(H.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof u.b&&ye(e,e=>e.openReference(n[0],!1))})},function(e,t,n){"use strict";var i=n(86);n.o(i,"languages")&&n.d(t,"languages",(function(){return i.languages}))},function(e,t,n){var i=n(245),r=n(246);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},m=function(e,t){return function(n,i){t(n,i,e)}};let _=class e extends a.a{constructor(e,t,n){super(),this._editor=e,this._codeEditorService=t,this._configurationService=n,this._localToDispose=this._register(new a.b),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel(e=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(h.c.onDidChange(e=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(e=>{let t=this._isEnabled;this._isEnabled=this.isEnabled(),t!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),n=this._configurationService.getValue(t.language);if(n){const e=n.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(12)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&h.c.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent(t=>{this._timeoutTimer||(this._timeoutTimer=new i.e,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},e.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=Object(i.f)(e=>{const t=this._editor.getModel();return t?Object(f.b)(t,e):Promise.resolve([])}),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},o.e)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:u.a.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((t,n)=>this._colorDatas.set(t,e[n]))}updateColorDecorators(e){let t=[],n={};for(let i=0;i{n[e]||this._codeEditorService.removeDecorationType(e)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(e=>{this._codeEditorService.removeDecorationType(e)})}getColorData(e){const t=this._editor.getModel();if(!t)return null;const n=t.getDecorationsInRange(d.a.fromPositions(e,e)).filter(e=>this._colorDatas.has(e.id));return 0===n.length?null:this._colorDatas.get(n[0].id)}};_.ID="editor.contrib.colorDetector",_.RECOMPUTE_TIME=1e3,_=p([m(1,c.a),m(2,g.a)],_),Object(l.m)(_.ID,_)},function(e,t,n){"use strict";n.r(t),n.d(t,"GotoDefinitionAtPositionEditorContribution",(function(){return x}));n(612);var i=n(0),r=n(19),o=n(15),s=n(81),a=n(98),l=n(3),c=n(11),d=n(4),u=n(156),h=n(2),f=n(110),g=n(18),p=n(5),m=n(76),_=n(225),b=n(272),v=n(10),y=n(20),w=n(53),C=n(9),S=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}};let x=class e{constructor(e,t,n){this.textModelResolverService=t,this.modeService=n,this.toUnhook=new h.b,this.toUnhookForKeyboard=new h.b,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let i=new b.a(e);this.toUnhook.add(i),this.toUnhook.add(i.onMouseMoveOrRelevantKeyDown(([e,t])=>{this.startFindDefinitionFromMouse(e,Object(y.n)(t))})),this.toUnhook.add(i.onExecute(e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},e=>{this.removeLinkDecorations(),Object(o.e)(e)})})),this.toUnhook.add(i.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const n=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!n)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return Promise.resolve(0);this.currentWordAtPosition=n;let a=new m.a(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Object(r.f)(t=>this.findDefinition(e,t)),this.previousPromise.then(t=>{if(t&&t.length&&a.validate(this.editor))if(t.length>1)this.addDecoration(new l.a(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn),(new s.a).appendText(i.a("multipleResults","Click to show {0} definitions.",t.length)));else{let i=t[0];if(!i.uri)return;this.textModelResolverService.createModelReference(i.uri).then(t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:r}}=t,{startLineNumber:o}=i.range;if(o<1||o>r.getLineCount())return void t.dispose();const a=this.getPreviewValue(r,o,i);let c;c=i.originSelectionRange?l.a.lift(i.originSelectionRange):new l.a(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);const d=this.modeService.getModeIdByFilepathOrFirstLine(r.uri);this.addDecoration(c,(new s.a).appendCodeblock(d||"",a)),t.dispose()})}else this.removeLinkDecorations()}).then(void 0,o.e)}getPreviewValue(t,n,i){let r=i.targetSelectionRange?i.range:this.getPreviewRangeBasedOnBrackets(t,n);return r.endLineNumber-r.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,r)}stripIndentationFromPreviewRange(e,t,n){let i=e.getLineFirstNonWhitespaceColumn(t);for(let r=t+1;ri)return new l.a(n,1,i+1,1);s=t.findNextBracket(new v.a(a,c))}return new l.a(n,1,i+1,1)}addDecoration(e,t){const n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[n])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&c.f.has(this.editor.getModel())}findDefinition(e,t){const n=this.editor.getModel();return n?Object(u.b)(n,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(e=>{const n=!t&&this.editor.getOption(69)&&!this.isInPeekEditor(e);return new _.DefinitionAction({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)})}isInPeekEditor(e){const t=e.get(C.b);return w.b.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};x.ID="editor.contrib.gotodefinitionatposition",x.MAX_SOURCE_PREVIEW_LINES=8,x=S([k(1,f.a),k(2,a.a)],x),Object(d.m)(x.ID,x),Object(g.g)((e,t)=>{const n=e.getColor(p.r);n&&t.addRule(`.monaco-editor .goto-definition-link { color: ${n} !important; }`)})},function(e,t,n){"use strict";var i=n(86);n.o(i,"Emitter")&&n.d(t,"Emitter",(function(){return i.Emitter})),n.o(i,"MarkerSeverity")&&n.d(t,"MarkerSeverity",(function(){return i.MarkerSeverity})),n.o(i,"Range")&&n.d(t,"Range",(function(){return i.Range})),n.o(i,"Uri")&&n.d(t,"Uri",(function(){return i.Uri})),n.o(i,"editor")&&n.d(t,"editor",(function(){return i.editor})),n.o(i,"languages")&&n.d(t,"languages",(function(){return i.languages}))},function(e,t,n){"use strict";n.r(t);var i=n(55),r=n(19),o=n(39),s=n(12),a=n(100),l=n(4),c=n(33),d=n(10),u=n(3),h=n(7),f=n(11),g=n(152),p=n(53),m=n(211),_=n(72),b=n(0),v=n(25),y=n(9),w=n(40),C=n(70),S=n(156),k=n(28),x=n(76),L=n(17),M=n(103),D=n(80),E=n(2),T=n(6),O=n(41),N=n(42),I=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},A=function(e,t){return function(n,i){t(n,i,e)}};const R=new y.c("hasSymbols",!1),P=Object(L.c)("ISymbolNavigationService");let j=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=R.bindTo(e)}reset(){this._ctxHasSymbols.reset(),Object(E.f)(this._currentState),Object(E.f)(this._currentMessage),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new F(this._editorService),i=n.onDidChange(e=>{if(this._ignoreEditorChange)return;const n=this._editorService.getActiveCodeEditor();if(!n)return;const i=n.getModel(),r=n.getPosition();if(!i||!r)return;let o=!1,s=!1;for(const e of t.references)if(Object(N.f)(e.uri,i.uri))o=!0,s=s||u.a.containsPosition(e.range,r);else if(o)break;o&&s||this.reset()});this._currentState=Object(E.e)(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:u.a.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){Object(E.f)(this._currentMessage);const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?Object(b.a)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):Object(b.a)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};j=I([A(0,y.b),A(1,c.a),A(2,w.a),A(3,O.a)],j),Object(M.b)(P,j,!0),Object(l.l)(new class extends l.c{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:R,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(P).revealNext(t)}}),D.a.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:R,primary:9,handler(e){e.get(P).reset()}});let F=class{constructor(e){this._listener=new Map,this._disposables=new E.b,this._onDidChange=new T.a,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Object(E.f)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Object(E.e)(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){Object(E.f)(this._listener.get(e)),this._listener.delete(e)}};F=I([A(0,c.a)],F);var B=n(30),W=n(24),H=n(20),Y=n(186);n.d(t,"DefinitionAction",(function(){return Q}));var V,z,U,$,q,K,G,Z,J=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};v.d.appendMenuItem(v.b.EditorContext,{submenu:v.b.EditorContextPeek,title:b.a("peek.submenu","Peek"),group:"navigation",order:100});class X extends l.b{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(w.a),o=e.get(c.a),s=e.get(C.a),a=e.get(P),l=t.getModel(),d=t.getPosition(),u=new x.b(t,5),h=Object(r.j)(this._getLocationModel(l,d,u.token),u.token).then(e=>J(this,void 0,void 0,(function*(){if(!e||u.token.isCancellationRequested)return;let n;if(Object(i.a)(e.ariaMessage),e.referenceAt(l.uri,d)){const e=this._getAlternativeCommand(t);e!==this.id&&(n=t.getAction(e))}const r=e.references.length;if(0===r){if(!this._configuration.muteMessage){const e=l.getWordAtPosition(d);g.a.get(t).showMessage(this._getNoResultFoundMessage(e),d)}}else{if(1!==r||!n)return this._onResult(o,a,t,e);n.run()}})),e=>{n.error(e)}).finally(()=>{u.dispose()});return s.showWhile(h,250),h}_onResult(e,t,n,i){return J(this,void 0,void 0,(function*(){const r=this._getGoToPreference(n);if(n instanceof Y.a||!(this._configuration.openInPeek||"peek"===r&&i.references.length>1)){const o=i.firstReference(),s=i.references.length>1&&"gotoAndPeek"===r,a=yield this._openReference(n,e,o,this._configuration.openToSide,!s);s&&a?this._openInPeek(a,i):i.dispose(),"goto"===r&&t.put(o)}else this._openInPeek(n,i)}))}_openReference(e,t,n,i,r){return J(this,void 0,void 0,(function*(){let o=void 0;Object(f.G)(n)&&(o=n.targetSelectionRange),o||(o=n.range);const s=yield t.openCodeEditor({resource:n.uri,options:{selection:u.a.collapseToStart(o),selectionRevealType:3}},e,i);if(s){if(r){const e=s.getModel(),t=s.deltaDecorations([],[{range:o,options:{className:"symbolHighlight"}}]);setTimeout(()=>{s.getModel()===e&&s.deltaDecorations(t,[])},350)}return s}}))}_openInPeek(e,t){let n=m.a.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Object(r.f)(e=>Promise.resolve(t)),this._configuration.openInPeek):t.dispose()}}class Q extends X{_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.b)(e,t,n),b.a("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.a("noResultWord","No definition found for '{0}'",e.word):b.a("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(43).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(43).multipleDefinitions}}const ee=s.h&&!B.k?2118:70;Object(l.k)(((V=class e extends Q{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:y.a.and(h.a.hasDefinitionProvider,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:ee,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:v.b.MenubarGoMenu,group:"4_symbol_nav",order:2,title:b.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),k.a.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",V)),Object(l.k)(((z=class e extends Q{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:y.a.and(h.a.hasDefinitionProvider,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:Object(o.a)(2089,ee),weight:100}}),k.a.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",z)),Object(l.k)(((U=class e extends Q{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:b.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:y.a.and(h.a.hasDefinitionProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:v.b.EditorContextPeek,group:"peek",order:2}}),k.a.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",U));class te extends X{_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.a)(e,t,n),b.a("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(43).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(43).multipleDeclarations}}Object(l.k)((($=class e extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:b.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:y.a.and(h.a.hasDeclarationProvider,h.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:v.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}_getNoResultFoundMessage(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",$)),Object(l.k)(class extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:b.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:y.a.and(h.a.hasDeclarationProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.b.EditorContextPeek,group:"peek",order:3}})}});class ne extends X{_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.e)(e,t,n),b.a("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b.a("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(43).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(43).multipleTypeDefinitions}}Object(l.k)(((q=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:y.a.and(h.a.hasTypeDefinitionProvider,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:v.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}}).ID="editor.action.goToTypeDefinition",q)),Object(l.k)(((K=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:y.a.and(h.a.hasTypeDefinitionProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.b.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",K));class ie extends X{_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.c)(e,t,n),b.a("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?b.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b.a("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(43).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(43).multipleImplementations}}Object(l.k)(((G=class e extends ie{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:b.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:y.a.and(h.a.hasImplementationProvider,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:v.b.MenubarGoMenu,group:"4_symbol_nav",order:4,title:b.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",G)),Object(l.k)(((Z=class e extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:b.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:y.a.and(h.a.hasImplementationProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:v.b.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",Z));class re extends X{_getNoResultFoundMessage(e){return e?b.a("references.no","No references found for '{0}'",e.word):b.a("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(43).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(43).multipleReferences}}Object(l.k)(class extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:b.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:y.a.and(h.a.hasReferenceProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:h.a.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:v.b.MenubarGoMenu,group:"4_symbol_nav",order:5,title:b.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.d)(e,t,!0,n),b.a("ref.title","References"))}))}}),Object(l.k)(class extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:b.a("references.action.label","Peek References"),alias:"Peek References",precondition:y.a.and(h.a.hasReferenceProvider,p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:v.b.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(yield Object(S.d)(e,t,!1,n),b.a("ref.title","References"))}))}});class oe extends X{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",label:b.a("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:y.a.and(p.b.notInPeekEditor,h.a.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n){return J(this,void 0,void 0,(function*(){return new _.c(this._references,b.a("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&b.a("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(43).multipleReferences}_getAlternativeCommand(){return""}}k.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:W.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,n,i,r,o,s)=>J(void 0,void 0,void 0,(function*(){Object(H.b)(W.a.isUri(t)),Object(H.b)(d.a.isIPosition(n)),Object(H.b)(Array.isArray(i)),Object(H.b)(void 0===r||"string"==typeof r),Object(H.b)(void 0===s||"boolean"==typeof s);const l=e.get(c.a),u=yield l.openCodeEditor({resource:t},l.getFocusedCodeEditor());if(Object(a.b)(u))return u.setPosition(n),u.revealPositionInCenterIfOutsideViewport(n,0),u.invokeWithinContext(e=>{const t=new class extends oe{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(s),openToSide:!1},i,r);e.get(L.a).invokeFunction(t.run.bind(t),u)})}))}),k.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:W.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,n,i,r)=>J(void 0,void 0,void 0,(function*(){e.get(k.b).executeCommand("editor.action.goToLocations",t,n,i,r,void 0,!0)}))}),k.a.registerCommand({id:"editor.action.findReferences",handler:(e,t,n)=>{Object(H.b)(W.a.isUri(t)),Object(H.b)(d.a.isIPosition(n));const i=e.get(c.a);return i.openCodeEditor({resource:t},i.getFocusedCodeEditor()).then(e=>{if(!Object(a.b)(e)||!e.hasModel())return;const t=m.a.get(e);if(!t)return;const i=Object(r.f)(t=>Object(S.d)(e.getModel(),d.a.lift(n),!1,t).then(e=>new _.c(e,b.a("ref.title","References")))),o=new u.a(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(o,i,!1))})}}),k.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));let i=!1,r=null;function o(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if("null"!==t.origin&&"null"!==n.origin&&(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port))return i=!0,null}catch(e){return i=!0,null}return e.parent}class s{static getSameOriginWindowChain(){if(!r){r=[];let e,t=window;do{(e=o(t))?r.push({window:t,iframeElement:t.frameElement||null}):r.push({window:t,iframeElement:null}),t=e}while(t)}return r.slice(0)}static hasDifferentOriginAncestor(){return r||this.getSameOriginWindowChain(),i}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,i=0,r=this.getSameOriginWindowChain();for(const e of r){if(n+=e.window.scrollY,i+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let r=e.iframeElement.getBoundingClientRect();n+=r.top,i+=r.left}return{top:n,left:i}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n(62),r=n(125);class o{constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${this.newText}")`:0===this.newText.length?`(delete@${this.oldPosition} "${this.oldText}")`:`(replace@${this.oldPosition} "${this.oldText}" with "${this.newText}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const r=t.length;i.f(e,r,n),n+=4;for(let o=0;oe.length)return!1;if(n){if(!Object(i.T)(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===o&&n--,e.charAt(n)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return u}));var i=n(26),r=n(15),o=n(24),s=n(4),a=n(3),l=n(11),c=n(54);function d(e,t){const n=[],i=l.c.ordered(e).reverse().map(i=>Promise.resolve(i.provideDocumentColors(e,t)).then(e=>{if(Array.isArray(e))for(let t of e)n.push({colorInfo:t,provider:i})}));return Promise.all(i).then(()=>n)}function u(e,t,n,i){return Promise.resolve(n.provideColorPresentations(e,t,i))}Object(s.o)("_executeDocumentColorProvider",(function(e,t){const{resource:n}=t;if(!(n instanceof o.a))throw Object(r.b)();const s=e.get(c.a).getModel(n);if(!s)throw Object(r.b)();const a=[],d=l.c.ordered(s).reverse().map(e=>Promise.resolve(e.provideDocumentColors(s,i.a.None)).then(e=>{if(Array.isArray(e))for(let t of e)a.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}));return Promise.all(d).then(()=>a)})),Object(s.o)("_executeColorPresentationProvider",(function(e,t){const{resource:n,color:s,range:d}=t;if(!(n instanceof o.a&&Array.isArray(s)&&4===s.length&&a.a.isIRange(d)))throw Object(r.b)();const[u,h,f,g]=s,p=e.get(c.a).getModel(n);if(!p)throw Object(r.b)();const m={range:d,color:{red:u,green:h,blue:f,alpha:g}},_=[],b=l.c.ordered(p).reverse().map(e=>Promise.resolve(e.provideColorPresentations(p,m,i.a.None)).then(e=>{Array.isArray(e)&&_.push(...e)}));return Promise.all(b).then(()=>_)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n(8),r=n(51),o=n(23),s=n(68),a=n(3);class l{static deleteRight(e,t,n,i){let o=[],l=3!==e;for(let e=0,c=i.length;e1){let r=n.getLineContent(e.lineNumber),s=i.w(r),l=-1===s?r.length+1:s+1;if(e.column<=l){let i=o.a.visibleColumnFromColumn2(t,n,e),r=o.a.prevIndentTabStop(i,t.indentSize),s=o.a.columnFromVisibleColumn2(t,n,e.lineNumber,r);h=new a.a(e.lineNumber,s,e.lineNumber,e.column)}else h=new a.a(e.lineNumber,e.column-1,e.lineNumber,e.column)}else{let i=s.a.left(t,n,e.lineNumber,e.column);h=new a.a(i.lineNumber,i.column,e.lineNumber,e.column)}}h.isEmpty()?c[e]=null:(h.startLineNumber!==h.endLineNumber&&(d=!0),c[e]=new r.a(h,""))}return[d,c]}static cut(e,t,n){let i=[];for(let o=0,s=n.length;o1?(e=d.lineNumber-1,n=t.getLineMaxColumn(d.lineNumber-1),l=d.lineNumber,c=t.getLineMaxColumn(d.lineNumber)):(e=d.lineNumber,n=1,l=d.lineNumber,c=t.getLineMaxColumn(d.lineNumber));let u=new a.a(e,n,l,c);u.isEmpty()?i[o]=null:i[o]=new r.a(u,"")}else i[o]=null;else i[o]=new r.a(s,"")}return new o.e(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return l}));var i=n(8),r=n(99),o=n(78);const s={getInitialState:()=>o.c,tokenize2:(e,t,n)=>Object(o.e)(0,e,t,n)};function a(e,t=s){return function(e,t){let n='
    ',o=e.split(/\r\n|\r|\n/),s=t.getInitialState();for(let e=0,a=o.length;e0&&(n+="
    ");let l=t.tokenize2(a,s,0);r.a.convertToEndOffset(l.tokens,a.length);let c=new r.a(l.tokens,a).inflate(),d=0;for(let e=0,t=c.getCount();e${i.u(a.substring(d,r))}`,d=r}s=l.endState}return n+="
    "}(e,t||s)}function l(e,t,n,i,r,o,s){let a="
    ",l=i,c=0;for(let d=0,u=t.getCount();d0;)h+=s?" ":" ",e--;break;case 60:h+="<";break;case 62:h+=">";break;case 38:h+="&";break;case 0:h+="�";break;case 65279:case 8232:case 8233:case 133:h+="�";break;case 13:h+="​";break;case 32:h+=s?" ":" ";break;default:h+=String.fromCharCode(t)}}if(a+=`${h}`,u>r||l>=r)break}return a+="
    "}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(609);var i=n(1),r=n(8),o=n(13),s=n(37);const a={badgeBackground:o.a.fromHex("#4D4D4D"),badgeForeground:o.a.fromHex("#FFFFFF")};class l{constructor(e,t){this.count=0,this.options=t||Object.create(null),Object(s.g)(this.options,a,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(i.p)(e,Object(i.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Object(r.x)(this.countFormat,this.count),this.element.title=Object(r.x)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",n=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(62),r=n(24);function o(e){let t=JSON.parse(e);return t=function e(t,n=0){if(!t||n>200)return t;if("object"==typeof t){switch(t.$mid){case 1:return r.a.revive(t);case 2:return new RegExp(t.source,t.flags)}if(t instanceof i.a||t instanceof Uint8Array)return t;if(Array.isArray(t))for(let i=0;i0&&t>=1;e>0&&this._logService.getLevel()===r.c.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const i=this._themeService.getColorTheme().getTokenStyleMetadata(o,a,n.language);if(void 0===i)s=2147483647;else{if(s=0,void 0!==i.italic){s|=1|(i.italic?1:0)<<11}if(void 0!==i.bold){s|=2|(i.bold?2:0)<<11}if(void 0!==i.underline){s|=4|(i.underline?4:0)<<11}if(i.foreground){s|=8|i.foreground<<14}0===s&&(s=2147483647)}}else this._logService.getLevel()===r.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,n.id,s),this._logService.getLevel()===r.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${a.join(" ")}): foreground ${i.B.getForeground(s)}, fontStyle ${i.B.getFontStyle(s).toString(2)}`)}return s}}function a(e,t,n){const i=e.data,r=e.data.length/5|0,s=Math.max(Math.ceil(r/1024),400),a=[];let l=0,c=1,d=0;for(;le&&0===i[5*t];)t--;if(t-1===e){let e=u;for(;e+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=c._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},C=function(e,t){return function(n,i){t(n,i,e)}};function S(e){return e.toString()}class k{constructor(e,t,n){this._modelEventListeners=new r.b,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>n(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const x=o.d||o.f?1:2;let L=class e extends r.a{constructor(e,t,n,r,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=n,this._logService=r,this._undoRedoService=o,this._onModelAdded=this._register(new i.a),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new i.a),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new i.a),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new T(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new E(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let n=a.d.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let i=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let r=a.d.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(r="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let o=x;const s=e.eol;"\r\n"===s?o=2:"\n"===s&&(o=1);let l=a.d.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=a.d.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=a.d.largeFileOptimizations;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:r,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:l,largeFileOptimizations:d}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"auto"!==n?n:3===o.a||2===o.a?"\n":"\r\n"}getCreationOptions(t,n,i){let r=this._modelCreationOptionsByLanguageAndResource[t+n];if(!r){const o=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:n}),s=this._getEOL(n,t);r=e._readModelOptions({editor:o,eol:s},i),this._modelCreationOptionsByLanguageAndResource[t+n]=r}return r}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;iObject(v.b)(e)&&e.matchesResource(n)),i&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=S(o.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new k(o,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[s]=a,a}createModel(e,t,n,i=!1){let r;return t?(r=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(r.model,t)):r=this._createModelData(e,d.b,n,i),this._onModelAdded.fire(r.model),r.model}setMode(e,t){if(!t)return;const n=this._models[S(e.uri)];n&&n.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n{this._watchers[e.uri.toString()]=new N(e,t,this._semanticStyling)},o=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let i of e.getModels()){const e=this._watchers[i.uri.toString()];D(i,t,n)?e||r(i):e&&o(i,e)}};this._register(e.onModelAdded(e=>{D(e,t,n)&&r(e)})),this._register(e.onModelRemoved(e=>{const t=this._watchers[e.uri.toString()];t&&o(e,t)})),this._register(n.onDidChangeConfiguration(e=>{e.affectsConfiguration(M)&&s()})),this._register(t.onDidColorThemeChange(s))}}class T extends r.a{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new y.a(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class O{constructor(e,t,n){this._provider=e,this.resultId=t,this.data=n}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class N extends r.a{constructor(e,t,n){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=n,this._fetchDocumentSemanticTokens=this._register(new f.d(()=>this._fetchDocumentSemanticTokensNow(),300)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}));const i=()=>{Object(r.f)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of c.l.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};i(),this._register(c.l.onDidChange(()=>{i(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=this._getSemanticColoringProvider();if(!e)return;this._currentDocumentRequestCancellationTokenSource=new g.b;const t=[],n=this._model.onDidChangeContent(e=>{t.push(e)}),i=this._semanticStyling.get(e),r=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null;Promise.resolve(e.provideDocumentSemanticTokens(this._model,r,this._currentDocumentRequestCancellationTokenSource.token)).then(r=>{this._currentDocumentRequestCancellationTokenSource=null,n.dispose(),this._setDocumentSemanticTokens(e,r||null,i,t)},e=>{e&&"string"==typeof e.message&&-1!==e.message.indexOf("busy")||s.e(e),this._currentDocumentRequestCancellationTokenSource=null,n.dispose(),t.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _isSemanticTokens(e){return e&&!!e.data}static _isSemanticTokensEdits(e){return e&&Array.isArray(e.edits)}static _copy(e,t,n,i,r){for(let o=0;o=0;e--){const r=t.edits[e],a=o-(r.start+r.deleteCount);a>0&&(N._copy(n,o-a,i,s-a,a),s-=a),r.data&&(N._copy(r.data,0,i,s-r.data.length,r.data.length),s-=r.data.length),o=r.start}o>0&&N._copy(n,0,i,0,o),t={resultId:t.resultId,data:i}}}if(N._isSemanticTokens(t)){this._currentDocumentResponse=new O(e,t.resultId,t.data);const r=Object(y.b)(t,n,this._model.getLanguageIdentifier());if(i.length>0){for(const e of i)for(const t of r)for(const n of e.changes)t.applyEdit(n.range,n.text);this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}this._model.setSemanticTokens(r,!0)}else this._model.setSemanticTokens(null,!0)}else this._model.setSemanticTokens(null,!0);else this._model.setSemanticTokens(null,!1)}_getSemanticColoringProvider(){const e=c.l.ordered(this._model);return e.length>0?e[0]:null}}},function(e,t,n){"use strict";var i=n(1),r=n(34),o=n(49),s=n(6),a=n(149),l=n(2),c=n(12),d=n(0),u=n(25),h=n(71),f=n(41),g=n(40),p=n(18),m=n(112),_=(n(346),n(50)),b=n(56);class v extends o.b{constructor(e,t){super(),this._onDidChangeVisibility=new s.a,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Object(i.p)(e,Object(i.a)(".monaco-dropdown")),this._label=Object(i.p)(this._element,Object(i.a)(".dropdown-label"));let n=t.labelRenderer;n||(n=e=>(e.textContent=t.label||"",null));for(const e of[i.c.CLICK,i.c.MOUSE_DOWN,_.a.Tap])this._register(Object(i.i)(this.element,e,e=>i.b.stop(e,!0)));for(const e of[i.c.MOUSE_DOWN,_.a.Tap])this._register(Object(i.i)(this._label,e,e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())}));this._register(Object(i.i)(this._label,i.c.KEY_UP,e=>{const t=new b.a(e);(t.equals(3)||t.equals(10))&&(i.b.stop(e,!0),this.visible?this.hide():this.show())}));const r=n(this._label);r&&this._register(r),this._register(_.b.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class y extends v{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),Object(i.e)(this.element,"active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),Object(i.Q)(this.element,"active")}}var w=n(14);class C extends m.b{constructor(e,t,n,i={}){super(null,e,i),this.options=i,this._onDidChangeVisibility=this._register(new s.a),this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){const t={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=Object(i.p)(e,Object(i.a)("a.action-label"));const t=this.options.classNames?Object(w.b)(this.options.classNames):[];return t.find(e=>"icon"===e)||t.push("codicon"),Object(i.f)(this.element,...t),this.element.tabIndex=0,this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild};if(Array.isArray(this.menuActionsOrProvider)?t.actions=this.menuActionsOrProvider:t.actionProvider=this.menuActionsOrProvider,this.dropdownMenu=this._register(new y(e,t)),this._register(this.dropdownMenu.onDidChangeVisibility(e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}}n.d(t,"c",(function(){return L})),n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return T}));var S=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}};class x extends s.a{constructor(e){super(),this._subscriptions=new l.b,this._isPressed=!1,this._suppressAltKeyUp=!1,this._subscriptions.add(Object(r.a)(document.body,"keydown")(e=>{this.isPressed=e.altKey||(c.i||c.d)&&e.shiftKey})),this._subscriptions.add(Object(r.a)(document.body,"keyup")(e=>{this.isPressed&&this._suppressAltKeyUp&&e.preventDefault(),this._suppressAltKeyUp=!1,this.isPressed=!1})),this._subscriptions.add(Object(r.a)(document.body,"mouseleave")(e=>this.isPressed=!1)),this._subscriptions.add(Object(r.a)(document.body,"blur")(e=>this.isPressed=!1)),this._subscriptions.add(e.onDidContextMenu(()=>this.isPressed=!1))}get isPressed(){return this._isPressed}set isPressed(e){this._isPressed=e,this.fire(this._isPressed)}suppressAltKeyUp(){this._suppressAltKeyUp=!0}static getInstance(e){return x.instance||(x.instance=new x(e)),x.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function L(e,t,n,i){const r=e.getActions(t);return function(e,t,n,i=(e=>"navigation"===e)){for(let r of e){let[e,s]=r;if(n&&(s=s.map(e=>e instanceof u.c&&e.alt?e.alt:e)),i(e)){(Array.isArray(t)?t:t.primary).unshift(...s)}else{const e=Array.isArray(t)?t:t.secondary;e.length>0&&e.push(new o.c),e.push(...s)}}}(r,n,!1,i),function(e){const t=new l.b;for(const[,n]of e)for(const e of n)t.add(e);return t}(r)}const M=new a.a("menu-item-action-item-icon-"),D=new Map;let E=class extends m.a{constructor(e,t,n,i){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}),this._action=e,this._keybindingService=t,this._notificationService=n,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new l.d),this._altKey=x.getInstance(i)}get _commandAction(){return this._wantsAltCommand&&this._action.alt||this._action}onClick(e){e.preventDefault(),e.stopPropagation(),this._altKey.isPressed&&this._altKey.suppressAltKeyUp(),this.actionRunner.run(this._commandAction,this._context).then(void 0,e=>this._notificationService.error(e))}render(e){super.render(e),this._updateItemClass(this._action.item);let t=!1,n=this._altKey.isPressed;const i=()=>{const e=t&&n;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._action.alt&&this._register(this._altKey.event(e=>{n=e,i()})),this._register(Object(r.a)(e,"mouseleave")(e=>{t=!1,i()})),this._register(Object(r.a)(e,"mouseenter")(e=>{t=!0,i()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;this.label.title=t?Object(d.a)("titleAndKb","{0} ({1})",n,t):n}}updateClass(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}_updateItemClass(e){var t,n;this._itemClassDispose.value=void 0;const r=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(p.e.isThemeIcon(r)){const e=p.e.asClassName(r);this.label&&e&&(Object(i.f)(this.label,e),this._itemClassDispose.value=Object(l.h)(()=>{this.label&&Object(i.R)(this.label,e)}))}else if(r){let e;if(null===(n=r.dark)||void 0===n?void 0:n.scheme){const t=r.dark.toString();D.has(t)?e=D.get(t):(e=M.nextId(),Object(i.u)(`.icon.${e}`,`background-image: ${Object(i.q)(r.light||r.dark)}`),Object(i.u)(`.vs-dark .icon.${e}, .hc-black .icon.${e}`,`background-image: ${Object(i.q)(r.dark)}`),D.set(t,e)),this.label&&(Object(i.f)(this.label,"icon",e),this._itemClassDispose.value=Object(l.h)(()=>{this.label&&Object(i.R)(this.label,"icon",e)}))}}}};E=S([k(1,f.a),k(2,g.a),k(3,h.a)],E);let T=class extends C{constructor(e,t,n){var r;const o=[];if(e.item.icon)if(p.e.isThemeIcon(e.item.icon))o.push(p.e.asClassName(e.item.icon));else if(null===(r=e.item.icon.dark)||void 0===r?void 0:r.scheme){const t=e.item.icon.dark.toString();if(D.has(t))o.push("icon",D.get(t));else{const n=M.nextId();o.push("icon",n),Object(i.u)(`.icon.${n}`,`background-image: ${Object(i.q)(e.item.icon.light||e.item.icon.dark)}`),Object(i.u)(`.vs-dark .icon.${n}, .hc-black .icon.${n}`,`background-image: ${Object(i.q)(e.item.icon.dark)}`),D.set(t,n)}}super(e,e.actions,n,{classNames:o})}};T=S([k(1,g.a),k(2,h.a)],T)},function(e,t,n){var i;self.MonacoEnvironment=(i={editorWorkerService:"editor.worker.js",json:"json.worker.js"},{getWorkerUrl:function(e,t){var r=n.p,o=(r?r.replace(/\/$/,"")+"/":"")+i[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,a.length)!==a){var l=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return o}}),n(275),n(276),n(277),n(332),n(278),n(279),n(327),n(222),n(330),n(280),n(90),n(281),n(333),n(183),n(324),n(282),n(328),n(200),n(334),n(225),n(223),n(323),n(283),n(335),n(284),n(285),n(325),n(336),n(286),n(287),n(329),n(326),n(337),n(331),n(338),n(339),n(150),n(322),n(288),n(196),n(289),n(290),n(291),n(292),n(170),n(293),e.exports=n(629),n(294)},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,n){},function(e,t,n){var i=n(241),r=n(660),o=n(661),s=n(662),a=n(663),l=n(664);function c(e){var t=this.__data__=new i(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},function(e,t,n){var i=n(655),r=n(656),o=n(657),s=n(658),a=n(659);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};i.a.add(o.JSONContribution,s)},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));const i=Object.prototype.hasOwnProperty;function r(e,t){for(let n in e)if(i.call(e,n)){if(!1===t({key:n,value:e[n]},(function(){delete e[n]})))return}}class o{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var i=n(14),r=n(8),o=n(228),s=n(45),a=n(65),l=n(19);const c="**",d="/",u="[/\\\\]",h="[^/\\\\]",f=/\//g;function g(e){switch(e){case 0:return"";case 1:return`${h}*?`;default:return`(?:${u}|${h}+${u}|${u}${h}+)*?`}}function p(e,t){if(!e)return[];const n=[];let i=!1,r=!1,o="";for(const s of e){switch(s){case t:if(!i&&!r){n.push(o),o="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1}o+=s}return o&&n.push(o),n}const m=/^\*\*\/\*\.[\w\.-]+$/,_=/^\*\*\/([\w\.-]+)\/?$/,b=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,v=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,y=/^\*\*((\/[\w\.-]+)+)\/?$/,w=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,C=new a.a(1e4),S=function(){return!1},k=function(){return null};function x(e,t){if(!e)return k;let n;const o=`${n=(n="string"!=typeof e?e.pattern:e).trim()}_${!!t.trimForExclusions}`;let s,a=C.get(o);if(a)return L(a,e);if(m.test(n)){const e=n.substr(4);a=function(t,i){return"string"==typeof t&&t.endsWith(e)?n:null}}else a=(s=_.exec(M(n,t)))?function(e,t){const n=`/${e}`,i=`\\${e}`,r=function(r,o){return"string"!=typeof r?null:o?o===e?t:null:r===e||r.endsWith(n)||r.endsWith(i)?t:null},o=[e];return r.basenames=o,r.patterns=[t],r.allBasenames=o,r}(s[1],n):(t.trimForExclusions?v:b).test(n)?function(e,t){const n=T(e.slice(1,-1).split(",").map(e=>x(e,t)).filter(e=>e!==k),e),r=n.length;if(!r)return k;if(1===r)return n[0];const o=function(t,i){for(let r=0,o=n.length;r!!e.allBasenames);s&&(o.allBasenames=s.allBasenames);const a=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);a.length&&(o.allPaths=a);return o}(n,t):(s=y.exec(M(n,t)))?D(s[1].substr(1),n,!0):(s=w.exec(M(n,t)))?D(s[1],n,!1):function(e){try{const t=new RegExp(`^${function e(t){if(!t)return"";let n="";const i=p(t,d);if(i.every(e=>e===c))n=".*";else{let t=!1;i.forEach((o,s)=>{if(o===c)return void(t||(n+=g(2),t=!0));let a=!1,l="",f=!1,m="";for(const t of o)if("}"!==t&&a)l+=t;else if(!f||"]"===t&&m)switch(t){case"{":a=!0;continue;case"[":f=!0;continue;case"}":const i=`(?:${p(l,",").map(t=>e(t)).join("|")})`;n+=i,a=!1,l="";break;case"]":n+="["+m+"]",f=!1,m="";break;case"?":n+=h;continue;case"*":n+=g(1);continue;default:n+=r.v(t)}else{let e;m+=e="-"===t?t:"^"!==t&&"!"!==t||m?t===d?"":r.v(t):"^"}s(function(e,t,n){if(!1===t)return k;const i=x(e,n);if(i===k)return k;if("boolean"==typeof t)return i;if(t){const n=t.when;if("string"==typeof n){const t=(t,r,o,s)=>{if(!s||!i(t,r))return null;const a=s(n.replace("$(basename)",o));return Object(l.i)(a)?a.then(t=>t?e:null):a?e:null};return t.requiresSiblings=!0,t}}return i})(n,e[n],t)).filter(e=>e!==k)),r=n.length;if(!r)return k;if(!n.some(e=>!!e.requiresSiblings)){if(1===r)return n[0];const e=function(e,t){for(let i=0,r=n.length;i!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const o=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,i){let r=void 0;for(let o=0,a=n.length;o!!e.allBasenames);a&&(o.allBasenames=a.allBasenames);const c=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);c.length&&(o.allPaths=c);return o}(e,t)}(e)(t,void 0,n)}function T(e,t){const n=e.filter(e=>!!e.basenames);if(n.length<2)return e;const i=n.reduce((e,t)=>{const n=t.basenames;return n?e.concat(n):e},[]);let r;if(t){r=[];for(let e=0,n=i.length;e{const n=t.patterns;return n?e.concat(n):e},[]);const o=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};o.basenames=i,o.patterns=r,o.allBasenames=i;const s=e.filter(e=>!e.basenames);return s.push(o),s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(2);class r extends i.a{constructor(e,t,n){super(),this.referenceDomElement=e,this.changeCallback=n,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!=typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n,i,r,o){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=r,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var i=n(121);class r{constructor(e,t){this.index=e,this.remainder=t}}class o{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Object(i.a)(e);const n=this.values,r=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=Object(i.a)(e),t=Object(i.a)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;let o=n.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=Object(i.a)(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,n=this.values.length-1,i=0,o=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,e<(s=(o=this.prefixSum[i])-this.values[i]))n=i-1;else{if(!(e>=o))break;t=i+1}return new r(i,e-s)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n(48),r=n(18),o=n(47),s=n(2),a=n(100),l=n(20),c=n(126);class d{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;const i=new s.b;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=i.add(new s.d);return r.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),i}doProvide(e,t){const n=new s.b,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){const r=Object(a.a)(i);if(r){let e=Object(l.n)(i.saveViewState());n.add(r.onDidChangeCursorPosition(()=>{e=Object(l.n)(i.saveViewState())})),n.add(Object(c.a)(t.onCancellationRequested)(()=>{e&&i===this.activeTextEditorControl&&i.restoreViewState(e)}))}n.add(Object(s.h)(()=>this.clearDecorations(i))),n.add(this.provideWithTextEditor(i,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation(e,t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return Object(a.c)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(e=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{overviewRuler:{color:Object(r.h)(o.s),position:i.d.Full}}}],[a,l]=e.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:l}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n(2),r=n(6),o=n(12);function s(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}class c{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function d(e){return"altKey"===e?o.f?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):o.f?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class u extends i.a{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new r.a),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new r.a),this.onExecute=this._onExecute.event,this._onCancel=this._register(new r.a),this.onCancel=this._onCancel.event,this._editor=e,this._opts=d(this._editor.getOption(61)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(e=>{if(e.hasChanged(61)){const e=d(this._editor.getOption(61));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(e=>this._onEditorMouseMove(new a(e,this._opts)))),this._register(this._editor.onMouseDown(e=>this._onEditorMouseDown(new a(e,this._opts)))),this._register(this._editor.onMouseUp(e=>this._onEditorMouseUp(new a(e,this._opts)))),this._register(this._editor.onKeyDown(e=>this._onEditorKeyDown(new l(e,this._opts)))),this._register(this._editor.onKeyUp(e=>this._onEditorKeyUp(new l(e,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(e=>this._onDidChangeCursorSelection(e))),this._register(this._editor.onDidChangeModel(e=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(17);const r=Object(i.c)("markerDecorationsService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(10),r=n(3),o=n(84),s=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class a{provideSelectionRanges(e,t){return s(this,void 0,void 0,(function*(){const n=[];for(const i of t){const t=[];n.push(t);const r=new Map;yield new Promise(t=>a._bracketsRightYield(t,0,e,i,r)),yield new Promise(n=>a._bracketsLeftYield(n,0,e,i,r,t))}return n}))}static _bracketsRightYield(e,t,n,i,r){const s=new Map,l=Date.now();for(;;){if(t>=a._maxRounds){e();break}if(!i){e();break}let c=n.findNextBracket(i);if(!c){e();break}if(Date.now()-l>a._maxDuration){setTimeout(()=>a._bracketsRightYield(e,t+1,n,i,r));break}const d=c.close[0];if(c.isOpen){let e=s.has(d)?s.get(d):0;s.set(d,e+1)}else{let e=s.has(d)?s.get(d):0;if(e-=1,s.set(d,Math.max(0,e)),e<0){let e=r.get(d);e||(e=new o.a,r.set(d,e)),e.push(c.range)}}i=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,i,o,s){const l=new Map,c=Date.now();for(;;){if(t>=a._maxRounds&&0===o.size){e();break}if(!i){e();break}let d=n.findPrevBracket(i);if(!d){e();break}if(Date.now()-c>a._maxDuration){setTimeout(()=>a._bracketsLeftYield(e,t+1,n,i,o,s));break}const u=d.close[0];if(d.isOpen){let e=l.has(u)?l.get(u):0;if(e-=1,l.set(u,Math.max(0,e)),e<0){let e=o.get(u);if(e){let t=e.shift();0===e.size&&o.delete(u);const i=r.a.fromPositions(d.range.getEndPosition(),t.getStartPosition()),l=r.a.fromPositions(d.range.getStartPosition(),t.getEndPosition());s.push({range:i}),s.push({range:l}),a._addBracketLeading(n,l,s)}}}else{let e=l.has(u)?l.get(u):0;l.set(u,e+1)}i=d.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;const o=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(o);0!==s&&s!==t.startColumn&&(n.push({range:r.a.fromPositions(new i.a(o,s),t.getEndPosition())}),n.push({range:r.a.fromPositions(new i.a(o,1),t.getEndPosition())}));const a=o-1;if(a>0){const o=e.getLineFirstNonWhitespaceColumn(a);o===t.startColumn&&o!==e.getLineLastNonWhitespaceColumn(a)&&(n.push({range:r.a.fromPositions(new i.a(a,o),t.getEndPosition())}),n.push({range:r.a.fromPositions(new i.a(a,1),t.getEndPosition())}))}}}a._maxDuration=30,a._maxRounds=2},function(e,t,n){"use strict";n.r(t);n(569);var i=n(1),r=n(31),o=n(184),s=n(55),a=n(69),l=n(2),c=n(12),d=n(8),u=n(24),h=n(4),f=n(7),g=n(196),p=n(9),m=n(17),_=n(41),b=n(66),v=n(5),y=n(18),w=n(44),C=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},S=function(e,t){return function(n,i){t(n,i,e)}};const k=new p.c("accessibilityHelpWidgetVisible",!1);let x=class e extends l.a{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(L,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};x.ID="editor.contrib.accessibilityHelpController",x=C([S(1,m.a)],x);let L=class e extends a.a{constructor(e,t,n,o){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=o,this._editor=e,this._isVisibleKey=k.bindTo(this._contextKeyService),this._domNode=Object(r.b)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=Object(r.b)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(i.n(this._contentDomNode.domNode,"keydown",e=>{if(this._isVisible&&(e.equals(2083)&&(Object(s.a)(w.a.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),i.s(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(s.a)(w.a.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(u.a.parse(t)),e.preventDefault(),e.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let i=this._keybindingService.lookupKeybinding(e);return i?d.x(t,i.getAriaLabel()):d.x(n,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let n=0;if(t){const e=this._editor.getModel();e&&t.forEach(t=>{n+=e.getValueLengthInRange(t)})}let i=function(e,t){return e&&0!==e.length?1===e.length?t?d.x(w.a.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):d.x(w.a.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?d.x(w.a.multiSelectionRange,e.length,t):e.length>0?d.x(w.a.multiSelection,e.length):"":w.a.noSelection}(t,n);e.get(47)?e.get(72)?i+=w.a.readonlyDiffEditor:i+=w.a.editableDiffEditor:e.get(72)?i+=w.a.readonlyEditor:i+=w.a.editableEditor;const r=c.f?w.a.changeConfigToOnMac:w.a.changeConfigToOnWinLinux;switch(e.get(2)){case 0:i+="\n\n - "+r;break;case 2:i+="\n\n - "+w.a.auto_on;break;case 1:i+="\n\n - "+w.a.auto_off,i+=" "+r}e.get(116)?i+="\n\n - "+this._descriptionForCommand(g.ToggleTabFocusModeAction.ID,w.a.tabFocusModeOnMsg,w.a.tabFocusModeOnMsgNoKb):i+="\n\n - "+this._descriptionForCommand(g.ToggleTabFocusModeAction.ID,w.a.tabFocusModeOffMsg,w.a.tabFocusModeOffMsgNoKb),i+="\n\n - "+(c.f?w.a.openDocMac:w.a.openDocWinLinux),i+="\n\n"+w.a.outroMsg,this._contentDomNode.domNode.appendChild(Object(o.b)(i)),this._contentDomNode.domNode.setAttribute("aria-label",i)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,i.s(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(e.WIDTH,t.width-40)),i=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);let r=Math.round((t.height-i)/2);this._domNode.setTop(r);let o=Math.round((t.width-n)/2);this._domNode.setLeft(o)}};L.ID="editor.contrib.accessibilityHelpWidget",L.WIDTH=500,L.HEIGHT=300,L=C([S(1,p.b),S(2,_.a),S(3,b.a)],L);class M extends h.b{constructor(){super({id:"editor.action.showAccessibilityHelp",label:w.a.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{kbExpr:f.a.focus,primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=x.get(t);n&&n.show()}}Object(h.m)(x.ID,x),Object(h.k)(M);const D=h.c.bindToContribution(x.get);Object(h.l)(new D({id:"closeAccessibilityHelp",precondition:k,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:f.a.focus,primary:9,secondary:[1033]}})),Object(y.g)((e,t)=>{const n=e.getColor(v.U);n&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${n}; }`);const i=e.getColor(v.W);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const r=e.getColor(v.uc);r&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${r}; }`);const o=e.getColor(v.h);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${o}; }`)})},function(e,t,n){"use strict";n.r(t),n.d(t,"SelectionAnchorSet",(function(){return g}));n(571);var i=n(4),r=n(0),o=n(7),s=n(22),a=n(39),l=n(9),c=n(81),d=n(55),u=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=function(e,t){return function(n,i){t(n,i,e)}},f=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const g=new l.c("selectionAnchorSet",!1);let p=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=g.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:s.a.fromPositions(e,e),options:{stickiness:1,hoverMessage:(new c.a).appendText(Object(r.a)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Object(d.a)(Object(r.a)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(s.a.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};p.ID="editor.contrib.selectionAnchorController",p=u([h(1,l.b)],p);class m extends i.b{constructor(){super({id:"editor.action.setSelectionAnchor",label:Object(r.a)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:o.a.editorTextFocus,primary:Object(a.a)(2089,2080),weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){p.get(t).setSelectionAnchor()}))}}class _ extends i.b{constructor(){super({id:"editor.action.goToSelectionAnchor",label:Object(r.a)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:g})}run(e,t){return f(this,void 0,void 0,(function*(){p.get(t).goToSelectionAnchor()}))}}class b extends i.b{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:Object(r.a)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:g,kbOpts:{kbExpr:o.a.editorTextFocus,primary:Object(a.a)(2089,2089),weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){p.get(t).selectFromAnchorToCursor()}))}}class v extends i.b{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:Object(r.a)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:g,kbOpts:{kbExpr:o.a.editorTextFocus,primary:9,weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){p.get(t).cancelSelectionAnchor()}))}}Object(i.m)(p.ID,p),Object(i.k)(m),Object(i.k)(_),Object(i.k)(b),Object(i.k)(v)},function(e,t,n){"use strict";n.r(t),n.d(t,"BracketMatchingController",(function(){return w}));n(572);var i=n(0),r=n(19),o=n(2),s=n(4),a=n(10),l=n(3),c=n(22),d=n(7),u=n(48),h=n(29),f=n(47),g=n(5),p=n(18),m=n(25);const _=Object(g.gc)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class b extends s.b{constructor(){super({id:"editor.action.jumpToBracket",label:i.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:d.a.editorTextFocus,primary:3160,weight:100}})}run(e,t){let n=w.get(t);n&&n.jumpToBracket()}}class v extends s.b{constructor(){super({id:"editor.action.selectToBracket",label:i.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){const i=w.get(t);if(!i)return;let r=!0;n&&!1===n.selectBrackets&&(r=!1),i.selectToBracket(r)}}class y{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class w extends o.a{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new r.d(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(55),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(e=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(55)&&(this._matchBrackets=this._editor.getOption(55),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))}static get(e){return e.getContribution(w.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(t=>{const n=t.getStartPosition(),i=e.matchBracket(n);let r=null;if(i)i[0].containsPosition(n)?r=i[1].getStartPosition():i[1].containsPosition(n)&&(r=i[0].getStartPosition());else{const t=e.findEnclosingBrackets(n);if(t)r=t[0].getStartPosition();else{const t=e.findNextBracket(n);t&&t.range&&(r=t.range.getStartPosition())}}return r?new c.a(r.lineNumber,r.column,r.lineNumber,r.column):new c.a(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let o=t.matchBracket(r);if(!o&&!(o=t.findEnclosingBrackets(r))){const e=t.findNextBracket(r);e&&e.range&&(o=t.matchBracket(e.range.getStartPosition()))}let s=null,a=null;if(o){o.sort(l.a.compareRangesUsingStarts);const[t,n]=o;s=e?t.getStartPosition():t.getEndPosition(),a=e?n.getEndPosition():n.getStartPosition()}s&&a&&n.push(new c.a(s.lineNumber,s.column,a.lineNumber,a.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const n of this._lastBracketsData){let i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);let r=[],o=0;for(let t=0,n=e.length;t1&&r.sort(a.a.compare);let s=[],l=0,c=0,d=i.length;for(let e=0,n=r.length;e{const n=e.getColor(f.c);n&&t.addRule(`.monaco-editor .bracket-match { background-color: ${n}; }`);const i=e.getColor(f.d);i&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)}),m.d.appendMenuItem(m.b.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:i.a({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},function(e,t,n){"use strict";n.r(t),n.d(t,"CutAction",(function(){return b})),n.d(t,"CopyAction",(function(){return v})),n.d(t,"PasteAction",(function(){return y}));var i=n(0),r=n(30),o=n(12),s=n(187),a=n(4),l=n(33),c=n(7),d=n(25),u=n(109),h=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const f=o.g||document.queryCommandSupported("cut"),g=o.g||document.queryCommandSupported("copy"),p=g&&!r.f,m=!r.h||document.queryCommandSupported("paste");function _(e){return e.register(),e}const b=f?_(new a.e({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.g?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:d.b.MenubarEditMenu,group:"2_ccp",title:i.a({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:d.b.EditorContext,group:"9_cutcopypaste",title:i.a("actions.clipboard.cutLabel","Cut"),when:c.a.writable,order:1},{menuId:d.b.CommandPalette,group:"",title:i.a("actions.clipboard.cutLabel","Cut"),order:1}]})):void 0,v=g?_(new a.e({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.g?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:d.b.MenubarEditMenu,group:"2_ccp",title:i.a({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:d.b.EditorContext,group:"9_cutcopypaste",title:i.a("actions.clipboard.copyLabel","Copy"),order:2},{menuId:d.b.CommandPalette,group:"",title:i.a("actions.clipboard.copyLabel","Copy"),order:1}]})):void 0,y=m?_(new a.e({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.g?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:d.b.MenubarEditMenu,group:"2_ccp",title:i.a({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:3},{menuId:d.b.EditorContext,group:"9_cutcopypaste",title:i.a("actions.clipboard.pasteLabel","Paste"),when:c.a.writable,order:3},{menuId:d.b.CommandPalette,group:"",title:i.a("actions.clipboard.pasteLabel","Paste"),order:1}]})):void 0;class w extends a.b{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:i.a("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.a.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(26)&&t.getSelection().isEmpty()||(s.a.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.a.forceCopyWithSyntaxHighlighting=!1)}}function C(e,t){e&&(e.addImplementation(1e4,(e,n)=>{const i=e.get(l.a).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const e=i.getOption(26),n=i.getSelection();return!(!n||!n.isEmpty()||e)||(document.execCommand(t),!0)}return!1}),e.addImplementation(0,(e,n)=>(document.execCommand(t),!0)))}C(b,"cut"),C(v,"copy"),y&&(y.addImplementation(1e4,(e,t)=>{const n=e.get(l.a),i=e.get(u.a),r=n.getFocusedCodeEditor();if(r&&r.hasTextFocus()){return!(!document.execCommand("paste")&&o.h)||((()=>h(void 0,void 0,void 0,(function*(){const e=yield i.readText();if(""!==e){const t=s.b.INSTANCE.get(e);let n=!1,i=null,o=null;t&&(n=r.getOption(26)&&!!t.isFromEmptySelection,i=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),r.trigger("keyboard","paste",{text:e,pasteOnNewLine:n,multicursorText:i,mode:o})}})))(),!0)}return!1}),y.addImplementation(0,(e,t)=>(document.execCommand("paste"),!0))),p&&Object(a.k)(w)},function(e,t,n){"use strict";n.r(t);var i=n(4),r=n(130);Object(i.m)(r.f.ID,r.f),Object(i.k)(r.e),Object(i.k)(r.g),Object(i.k)(r.h),Object(i.k)(r.d),Object(i.k)(r.a),Object(i.k)(r.c),Object(i.l)(new r.b)},function(e,t,n){"use strict";n.r(t),n.d(t,"ContextMenuController",(function(){return m}));var i=n(0),r=n(1),o=n(49),s=n(2),a=n(4),l=n(7),c=n(25),d=n(9),u=n(71),h=n(41),f=n(112),g=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},p=function(e,t){return function(n,i){t(n,i,e)}};let m=class e{constructor(e,t,n,i,o,a){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=o,this._menuService=a,this._toDispose=new s.b,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(e=>this._onContextMenu(e))),this._toDispose.add(this._editor.onMouseWheel(e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),n=e.srcElement;n.shadowRoot&&r.E(t)===n.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())}))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(15))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(15))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),c.b.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),r=i.getActions({arg:e.uri});i.dispose();for(let t of r){const[,i]=t;let r=0;for(const t of i)if(t instanceof c.e){const i=this._getMenuActions(e,t.item.submenu);i.length>0&&(n.push(new o.d(t.id,t.label,i)),r++)}else n.push(t),r++;r&&n.push(new o.c)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(46);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),n=r.C(this._editor.getDomNode()),i=n.left+e.left,o=n.top+e.top+e.height;t={x:i,y:o}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new f.a(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const n=e;return"function"==typeof n.getActionViewItem?n.getActionViewItem():new f.a(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:n})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};m.ID="editor.contrib.contextmenu",m=g([p(1,u.a),p(2,u.b),p(3,d.b),p(4,h.a),p(5,c.a)],m);class _ extends a.b{constructor(){super({id:"editor.action.showContextMenu",label:i.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:l.a.textInputFocus,primary:1092,weight:100}})}run(e,t){m.get(t).showContextMenu()}}Object(a.m)(m.ID,m),Object(a.k)(_)},function(e,t,n){"use strict";n.r(t),n.d(t,"CursorUndoRedoController",(function(){return c})),n.d(t,"CursorUndo",(function(){return d})),n.d(t,"CursorRedo",(function(){return u}));var i=n(0),r=n(2),o=n(4),s=n(7);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let n=0;n{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(e=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const n=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new l(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(c.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}c.ID="editor.contrib.cursorUndoRedoController";class d extends o.b{constructor(){super({id:"cursorUndo",label:i.a("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.a.textInputFocus,primary:2099,weight:100}})}run(e,t,n){c.get(t).cursorUndo()}}class u extends o.b{constructor(){super({id:"cursorRedo",label:i.a("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){c.get(t).cursorRedo()}}Object(o.m)(c.ID,c),Object(o.k)(d),Object(o.k)(u)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(4),o=n(128);class s extends r.b{constructor(){super({id:"editor.action.fontZoomIn",label:i.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){o.a.setZoomLevel(o.a.getZoomLevel()+1)}}class a extends r.b{constructor(){super({id:"editor.action.fontZoomOut",label:i.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){o.a.setZoomLevel(o.a.getZoomLevel()-1)}}class l extends r.b{constructor(){super({id:"editor.action.fontZoomReset",label:i.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){o.a.setZoomLevel(0)}}Object(r.k)(s),Object(r.k)(a),Object(r.k)(l)},function(e,t,n){"use strict";n.r(t),n.d(t,"IPadShowKeyboard",(function(){return a}));n(615);var i=n(30),r=n(1),o=n(2),s=n(4);class a extends o.a{constructor(e){super(),this.editor=e,this.widget=null,i.i&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(72);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}a.ID="editor.contrib.iPadShowKeyboard";class l extends o.a{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(r.i(this._domNode,"touchstart",e=>{this.editor.focus()})),this._register(r.i(this._domNode,"focus",e=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}l.ID="editor.contrib.ShowKeyboardWidget",Object(s.m)(a.ID,a)},function(e,t,n){"use strict";n.r(t),n.d(t,"getReindentEditOperations",(function(){return _})),n.d(t,"IndentationToSpacesAction",(function(){return b})),n.d(t,"IndentationToTabsAction",(function(){return v})),n.d(t,"ChangeIndentationSizeAction",(function(){return y})),n.d(t,"IndentUsingTabs",(function(){return w})),n.d(t,"IndentUsingSpaces",(function(){return C})),n.d(t,"DetectIndentation",(function(){return S})),n.d(t,"ReindentLinesAction",(function(){return k})),n.d(t,"ReindentSelectedLinesAction",(function(){return x})),n.d(t,"AutoIndentOnPasteCommand",(function(){return L})),n.d(t,"AutoIndentOnPaste",(function(){return M})),n.d(t,"IndentationToSpacesCommand",(function(){return E})),n.d(t,"IndentationToTabsCommand",(function(){return T}));var i=n(0),r=n(2),o=n(8),s=n(4),a=n(124),l=n(60),c=n(3),d=n(22),u=n(7),h=n(29),f=n(32),g=n(54),p=n(83),m=n(97);function _(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let r=f.a.getIndentationRules(e.getLanguageIdentifier().id);if(!r)return[];for(n=Math.min(n,e.getLineCount());t<=n&&r.unIndentedLinePattern;){let n=e.getLineContent(t);if(!r.unIndentedLinePattern.test(n))break;t++}if(t>n-1)return[];const{tabSize:s,indentSize:c,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,a.a.shiftIndent(e,e.length+t,s,c,u)),p=(e,t)=>(t=t||1,a.a.unshiftIndent(e,e.length+t,s,c,u));let m,_=[],b=e.getLineContent(t),v=b;if(null!=i){m=i;let e=o.z(b);v=m+b.substring(e.length),r.decreaseIndentPattern&&r.decreaseIndentPattern.test(v)&&(v=(m=p(m))+b.substring(e.length)),b!==v&&_.push(l.a.replace(new d.a(t,1,t,e.length+1),h.b.normalizeIndentation(m,c,u)))}else m=o.z(b);let y=m;r.increaseIndentPattern&&r.increaseIndentPattern.test(v)?(y=g(y),m=g(m)):r.indentNextLinePattern&&r.indentNextLinePattern.test(v)&&(y=g(y));for(let i=++t;i<=n;i++){let t=e.getLineContent(i),n=o.z(t),s=y+t.substring(n.length);r.decreaseIndentPattern&&r.decreaseIndentPattern.test(s)&&(y=p(y),m=p(m)),n!==y&&_.push(l.a.replace(new d.a(i,1,i,n.length+1),h.b.normalizeIndentation(y,c,u))),r.unIndentedLinePattern&&r.unIndentedLinePattern.test(t)||(y=r.increaseIndentPattern&&r.increaseIndentPattern.test(s)?m=g(m):r.indentNextLinePattern&&r.indentNextLinePattern.test(s)?g(y):m)}return _}class b extends s.b{constructor(){super({id:b.ID,label:i.a("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:u.a.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),r=t.getSelection();if(!r)return;const o=new E(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}b.ID="editor.action.indentationToSpaces";class v extends s.b{constructor(){super({id:v.ID,label:i.a("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:u.a.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),r=t.getSelection();if(!r)return;const o=new T(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}v.ID="editor.action.indentationToTabs";class y extends s.b{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const n=e.get(m.a),r=e.get(g.a);let o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageIdentifier().language,o.uri,o.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map(e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?i.a("configuredTabSize","Configured Tab Size"):void 0})),l=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(a,{placeHolder:i.a({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then(e=>{e&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})})},50)}}class w extends y{constructor(){super(!1,{id:w.ID,label:i.a("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class C extends y{constructor(){super(!0,{id:C.ID,label:i.a("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}C.ID="editor.action.indentUsingSpaces";class S extends s.b{constructor(){super({id:S.ID,label:i.a("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const n=e.get(g.a);let i=t.getModel();if(!i)return;let r=n.getCreationOptions(i.getLanguageIdentifier().language,i.uri,i.isForSimpleWidget);i.detectIndentation(r.insertSpaces,r.tabSize)}}S.ID="editor.action.detectIndentation";class k extends s.b{constructor(){super({id:"editor.action.reindentlines",label:i.a("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:u.a.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=_(n,1,n.getLineCount());i.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,i),t.pushUndoStop())}}class x extends s.b{constructor(){super({id:"editor.action.reindentselectedlines",label:i.a("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:u.a.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=t.getSelections();if(null===i)return;let r=[];for(let e of i){let t=e.startLineNumber,i=e.endLineNumber;if(t!==i&&1===e.endColumn&&i--,1===t){if(t===i)continue}else t--;let o=_(n,t,i);r.push(...o)}r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class L{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(c.a.lift(e.range),e.text);let n=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class M{constructor(e){this.callOnDispose=new r.b,this.callOnModel=new r.b,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),this.editor.getOption(8)<4||this.editor.getOption(40)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const n=this.editor.getModel();if(!n)return;if(!n.isCheapToTokenize(e.getStartPosition().lineNumber))return;const i=this.editor.getOption(8),{tabSize:r,indentSize:s,insertSpaces:l}=n.getOptions();this.editor.pushUndoStop();let d=[],u={shiftIndent:e=>a.a.shiftIndent(e,e.length+1,r,s,l),unshiftIndent:e=>a.a.unshiftIndent(e,e.length+1,r,s,l)},h=e.startLineNumber;for(;h<=e.endLineNumber&&this.shouldIgnoreLine(n,h);)h++;if(h>e.endLineNumber)return;let g=n.getLineContent(h);if(!/\S/.test(g.substring(0,e.startColumn-1))){let e=f.a.getGoodIndentForLine(i,n,n.getLanguageIdentifier().id,h,u);if(null!==e){let t=o.z(g),i=p.b(e,r);if(i!==p.b(t,r)){let e=p.a(i,r,l);d.push({range:new c.a(h,1,h,t.length+1),text:e}),g=e+g.substr(t.length)}else{let e=f.a.getIndentMetadata(n,h);if(0===e||8===e)return}}}const m=h;for(;hn.getLineTokens(e),getLanguageIdentifier:()=>n.getLanguageIdentifier(),getLanguageIdAtPosition:(e,t)=>n.getLanguageIdAtPosition(e,t),getLineContent:e=>e===m?g:n.getLineContent(e)},s=f.a.getGoodIndentForLine(i,t,n.getLanguageIdentifier().id,h+1,u);if(null!==s){let t=p.b(s,r),i=p.b(o.z(n.getLineContent(h+1)),r);if(t!==i){let s=t-i;for(let t=h+1;t<=e.endLineNumber;t++){let e=n.getLineContent(t),i=o.z(e),a=p.b(i,r)+s,u=p.a(a,r,l);u!==i&&d.push({range:new c.a(t,1,t,i.length+1),text:u})}}}}let _=new L(d,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",_),this.editor.pushUndoStop()}shouldIgnoreLine(e,t){e.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(0===n)return!0;let i=e.getLineTokens(t);if(i.getCount()>0){let e=i.findTokenIndexAtOffset(n);if(e>=0&&1===i.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function D(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let r="";for(let e=0;e=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},p=function(e,t){return function(n,i){t(n,i,e)}};let m=class e extends o.a{constructor(e,t,n){super(),this._editor=e,this._modeService=n,this._widget=null,this._register(this._editor.onDidChangeModel(e=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(e=>this.stop())),this._register(a.C.onDidChange(e=>this.stop())),this._register(this._editor.onKeyUp(e=>9===e.keyCode&&this.stop()))}static get(t){return t.getContribution(e.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new b(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};m.ID="editor.contrib.inspectTokens",m=g([p(1,d.a),p(2,c.a)],m);class _ extends s.b{constructor(){super({id:"editor.action.inspectTokens",label:f.c.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=m.get(t);n&&n.launch()}}class b extends o.a{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e){let t=a.C.get(e.language);return t||{getInitialState:()=>l.c,tokenize:(t,n,i)=>Object(l.d)(e.language,t,n,i),tokenize2:(t,n,i)=>Object(l.e)(e.id,t,n,i)}}(this._model.getLanguageIdentifier()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(e=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return b._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let i=t.tokens1.length-1;i>=0;i--){let r=t.tokens1[i];if(e.column-1>=r.offset){n=i;break}}let o=0;for(let n=t.tokens2.length>>>1;n>=0;n--)if(e.column-1>=t.tokens2[n<<1]){o=n;break}let s=this._model.getLineContent(e.lineNumber),a="";if(n{const n=e.getColor(u.F);if(n){let i=e.type===h.b?2:1;t.addRule(`.monaco-editor .tokens-inspect-widget { border: ${i}px solid ${n}; }`),t.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${n}; }`)}const i=e.getColor(u.E);i&&t.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const r=e.getColor(u.G);r&&t.addRule(`.monaco-editor .tokens-inspect-widget { color: ${r}; }`)})},function(e,t,n){"use strict";n.r(t),n.d(t,"InsertCursorAbove",(function(){return y})),n.d(t,"InsertCursorBelow",(function(){return w})),n.d(t,"MultiCursorSessionResult",(function(){return x})),n.d(t,"MultiCursorSession",(function(){return L})),n.d(t,"MultiCursorSelectionController",(function(){return M})),n.d(t,"MultiCursorSelectionControllerAction",(function(){return D})),n.d(t,"AddSelectionToNextFindMatchAction",(function(){return E})),n.d(t,"AddSelectionToPreviousFindMatchAction",(function(){return T})),n.d(t,"MoveSelectionToNextFindMatchAction",(function(){return O})),n.d(t,"MoveSelectionToPreviousFindMatchAction",(function(){return N})),n.d(t,"SelectHighlightsAction",(function(){return I})),n.d(t,"CompatChangeAll",(function(){return A})),n.d(t,"SelectionHighlighter",(function(){return P}));var i=n(0),r=n(19),o=n(39),s=n(2),a=n(4),l=n(73),c=n(3),d=n(22),u=n(7),h=n(48),f=n(29),g=n(11),p=n(183),m=n(25),_=n(5),b=n(18),v=n(9);class y extends a.b{constructor(){super({id:"editor.action.insertCursorAbove",label:i.a("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.a.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;const i=n&&!0===n.logicalLine,r=t._getViewModel();r.cursorConfig.readOnly||(r.pushStackElement(),r.setCursorStates(n.source,3,l.b.addCursorUp(r,r.getCursorStates(),i)),r.revealTopMostCursor(n.source))}}class w extends a.b{constructor(){super({id:"editor.action.insertCursorBelow",label:i.a("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.a.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;const i=n&&!0===n.logicalLine,r=t._getViewModel();r.cursorConfig.readOnly||(r.pushStackElement(),r.setCursorStates(n.source,3,l.b.addCursorDown(r,r.getCursorStates(),i)),r.revealBottomMostCursor(n.source))}}class C extends a.b{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.a("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let i=e.startLineNumber;i1&&n.push(new d.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=t.getSelections();let r=[];i.forEach(e=>this.getCursorsForSelection(e,n,r)),r.length>0&&t.setSelections(r)}}class S extends a.b{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.a("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=t.getModel().getLineCount();let r=[];for(let e=n[0].startLineNumber;e<=i;e++)r.push(new d.a(e,n[0].startColumn,e,n[0].endColumn));r.length>0&&t.setSelections(r)}}class k extends a.b{constructor(){super({id:"editor.action.addCursorsToTop",label:i.a("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections();let i=[];for(let e=n[0].startLineNumber;e>=1;e--)i.push(new d.a(e,n[0].startColumn,e,n[0].endColumn));i.length>0&&t.setSelections(i)}}class x{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}class L{constructor(e,t,n,i,r,o,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=r,this.matchCase=o,this.currentMatch=s}static create(e,t){if(!e.hasModel())return null;const n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new L(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let i,r,o=!1;const s=e.getSelections();1===s.length&&s[0].isEmpty()?(o=!0,i=!0,r=!0):(i=n.wholeWord,r=n.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new d.a(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new L(e,t,o,l,i,r,c)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new x(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1,1073741824)):[]}}class M extends s.a{constructor(e){super(),this._sessionDispose=this._register(new s.b),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(M.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=L.create(this._editor,e);if(!t)return;this._session=t;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(e=>{(e.matchCase||e.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new d.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!j(this._editor.getModel(),t,n)){const e=this._editor.getModel();let n=[];for(let i=0,r=t.length;i0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(105):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(n.searchScope){const e=n.searchScope;let i=[];t.forEach(t=>{e.forEach(e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&i.push(t)})}),t=i}if(t.length>0){const e=this._editor.getSelection();for(let n=0,i=t.length;nnew d.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)))}}}M.ID="editor.contrib.multiCursorController";class D extends a.b{run(e,t){const n=M.get(t);if(!n)return;const i=p.CommonFindController.get(t);i&&this._run(n,i)}}class E extends D{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.a("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:2082,weight:100},menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class T extends D{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.a("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class O extends D{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.a("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:Object(o.a)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class N extends D{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.a("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class I extends D{constructor(){super({id:"editor.action.selectHighlights",label:i.a("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:3114,weight:100},menuOpts:{menuId:m.b.MenubarSelectionMenu,group:"3_multi",title:i.a({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class A extends D{constructor(){super({id:"editor.action.changeAll",label:i.a("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:v.a.and(u.a.writable,u.a.editorTextFocus),kbOpts:{kbExpr:u.a.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class R{constructor(e,t,n,i){this.searchText=e,this.matchCase=t,this.wordSeparators=n,this.modelVersionId=i}static softEquals(e,t){return!e&&!t||!(!e||!t)&&(e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId)}}class P extends s.a{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(89),this.decorations=[],this.updateSoon=this._register(new r.d(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(89)})),this._register(e.onDidChangeCursorSelection(e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(e=>{this._setState(null)})),this._register(e.onDidChangeModelContent(e=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(p.CommonFindController.get(e).getState().onFindReplaceStateChange(e=>{this._update()}))}_update(){this._setState(P._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const n=t.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const i=M.get(t);if(!i)return null;const r=p.CommonFindController.get(t);if(!r)return null;let o=i.getSession(r);if(!o){const e=t.getSelections();if(e.length>1){const n=r.getState().matchCase;if(!j(t.getModel(),e,n))return null}o=L.create(t,r)}if(!o)return null;if(o.currentMatch)return null;if(/^[ \t]+$/.test(o.searchText))return null;if(o.searchText.length>200)return null;const s=r.getState(),a=s.matchCase;if(s.isRevealed){let e=s.searchString;a||(e=e.toLowerCase());let t=o.searchText;if(a||(t=t.toLowerCase()),e===t&&o.matchCase===s.matchCase&&o.wholeWord===s.wholeWord&&!s.isRegex)return null}return new R(o.searchText,o.matchCase,o.wholeWord?t.getOption(105):null,t.getModel().getVersionId())}_setState(e){if(R.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const n=g.i.has(t)&&this.editor.getOption(63);let i=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(e=>e.range);i.sort(c.a.compareRangesUsingStarts);let r=this.editor.getSelections();r.sort(c.a.compareRangesUsingStarts);let o=[];for(let e=0,t=0,n=i.length,s=r.length;e=s)o.push(n),e++;else{const i=c.a.compareRangesUsingStarts(n,r[t]);i<0?(!r[t].isEmpty()&&c.a.areIntersecting(n,r[t])||o.push(n),e++):i>0?t++:(e++,t++)}}const s=o.map(e=>({range:e,options:n?P._SELECTION_HIGHLIGHT:P._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,s)}dispose(){this._setState(null),super.dispose()}}function j(e,t,n){const i=F(e,t[0],!n);for(let r=1,o=t.length;r=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}},x=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const L=new f.c("onTypeRenameInputVisible",!1);let M=class e extends s.a{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new s.b),this._editor=e,this._enabled=!1,this._visibleContextKey=L.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new s.b),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize())),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(73)&&this.reinitialize()})),this._register(d.u.onDidChange(()=>this.reinitialize())),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize())),this.reinitialize()}static get(t){return t.getContribution(e.ID)}reinitialize(){const e=this._editor.getModel(),t=null!==e&&this._editor.getOption(73)&&d.u.has(e);if(t===this._enabled)return;if(this._enabled=t,this.clearRanges(),this._localToDispose.clear(),!t||null===e)return;this._languageWordPattern=C.a.getWordDefinition(e.getLanguageIdentifier().id),this._localToDispose.add(e.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=C.a.getWordDefinition(e.getLanguageIdentifier().id)}));const n=new u.a(this._debounceDuration),i=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration)},r=new u.a(0),o=e=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{i()})),this._localToDispose.add(this._editor.onDidChangeModelContent(t=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const n=e.getDecorationRange(this._currentDecorations[0]);if(n&&t.changes.every(e=>n.intersectRanges(e.range)))return void o(this._currentDecorations)}i()})),this._localToDispose.add({dispose:()=>{n.cancel(),r.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),n=t.getDecorationRange(e[0]);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const i=t.getValueInRange(n);if(this._currentWordPattern){const e=i.match(this._currentWordPattern);if((e?e[0].length:0)!==i.length)return this.clearRanges()}let r=[];for(let n=1,o=e.length;n1)return void this.clearRanges();const i=this._editor.getModel(),r=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(n.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=i.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(n))return}}this._currentRequestPosition=n,this._currentRequestModelVersion=r;const o=Object(u.f)(t=>x(this,void 0,void 0,(function*(){try{const s=yield T(i,n,t);if(o!==this._currentRequest)return;if(this._currentRequest=null,r!==i.getVersionId())return;let a=[];(null==s?void 0:s.ranges)&&(a=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e({range:t,options:e.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(e){Object(_.d)(e)||Object(_.e)(e),this._currentRequest!==o&&this._currentRequest||this.clearRanges()}})));return this._currentRequest=o,o}))}};M.ID="editor.contrib.onTypeRename",M.DECORATION=h.a.register({stickiness:0,className:"on-type-rename-decoration"}),M=S([k(1,f.b)],M);class D extends r.b{constructor(){super({id:"editor.action.onTypeRename",label:i.a("onTypeRename.label","On Type Rename Symbol"),alias:"On Type Rename Symbol",precondition:f.a.and(g.a.writable,g.a.hasRenameProvider),kbOpts:{kbExpr:g.a.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(m.a),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return p.a.isUri(i)&&a.a.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(r),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},_.e):super.runCommand(e,t)}run(e,t){const n=M.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const E=r.c.bindToContribution(M.get);function T(e,t,n){const i=d.u.ordered(e);return Object(u.h)(i.map(i=>()=>Promise.resolve(i.provideOnTypeRenameRanges(e,t,n)).then(e=>{if(e)return{ranges:e.ranges,wordPattern:e.wordPattern||i.wordPattern}},e=>{Object(_.f)(e)})),e=>!!e&&o.o(null==e?void 0:e.ranges))}Object(r.l)(new E({id:"cancelOnTypeRenameInput",precondition:L,handler:e=>e.clearRanges(),kbOpts:{kbExpr:g.a.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const O=Object(v.gc)("editor.onTypeRenameBackground",{dark:w.a.fromHex("#f00").transparent(.3),light:w.a.fromHex("#f00").transparent(.3),hc:w.a.fromHex("#f00").transparent(.3)},i.a("editorOnTypeRenameBackground","Background color when the editor auto renames on type."));Object(y.g)((e,t)=>{const n=e.getColor(O);n&&t.addRule(`.monaco-editor .on-type-rename-decoration { background: ${n}; border-left-color: ${n}; }`)}),Object(r.p)("_executeRenameOnTypeProvider",(e,t)=>T(e,t,l.a.None)),Object(r.m)(M.ID,M),Object(r.k)(D)},function(e,t,n){"use strict";n.r(t);var i=n(4),r=n(137),o=n(44);class s extends i.b{constructor(){super({id:"editor.action.toggleHighContrast",label:o.i.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(r.a);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getColorTheme().themeName,n.setTheme("hc-black"))}}Object(i.k)(s)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(4),o=n(51),s=n(3),a=n(7),l=n(68);class c extends r.b{constructor(){super({id:"editor.action.transposeLetters",label:i.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.a.writable,kbOpts:{kbExpr:a.a.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),i=[],r=t.getSelections();for(let e of r){if(!e.isEmpty())continue;let t=e.startLineNumber,r=e.startColumn,a=n.getLineMaxColumn(t);if(1===t&&(1===r||2===r&&2===a))continue;let c=r===a?e.getPosition():l.a.rightPosition(n,e.getPosition().lineNumber,e.getPosition().column),d=l.a.leftPosition(n,c.lineNumber,c.column),u=l.a.leftPosition(n,d.lineNumber,d.column),h=n.getValueInRange(s.a.fromPositions(u,d)),f=n.getValueInRange(s.a.fromPositions(d,c)),g=s.a.fromPositions(u,c);i.push(new o.a(g,f+h))}i.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}Object(r.k)(c)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(2),o=n(4),s=n(33),a=n(204),l=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=function(e,t){return function(n,i){t(n,i,e)}},d=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const u="ignoreUnusualLineTerminators";let h=class extends r.a{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._config=this._editor.getOption(103),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(103)&&(this._config=this._editor.getOption(103),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return d(this,void 0,void 0,(function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();e.mightContainUnusualLineTerminators()&&!0!==function(e,t){return e.getModelProperty(t.uri,u)}(this._codeEditorService,e)&&(this._editor.getOption(72)||("auto"!==this._config?(yield this._dialogService.confirm({title:i.a("unusualLineTerminators.title","Unusual Line Terminators"),message:i.a("unusualLineTerminators.message","Detected unusual line terminators"),detail:i.a("unusualLineTerminators.detail","This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."),primaryButton:i.a("unusualLineTerminators.fix","Fix this file"),secondaryButton:i.a("unusualLineTerminators.ignore","Ignore problem for this file")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,n){e.setModelProperty(t.uri,u,n)}(this._codeEditorService,e,!0):e.removeUnusualLineTerminators(this._editor.getSelections())))}))}};h.ID="editor.contrib.unusualLineTerminatorsDetector",h=l([c(1,a.a),c(2,s.a)],h),Object(o.m)(h.ID,h)},function(e,t,n){"use strict";n.r(t);var i=n(19),r=n(2),o=n(4),s=n(11),a=n(54),l=n(234),c=n(18),d=n(43),u=n(235),h=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},f=function(e,t){return function(n,i){t(n,i,e)}};let g=class e extends r.a{constructor(e,t,n,r){super(),this._modelService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._tokenizeViewport=new i.d(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(e=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(s.k.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(u.b)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}static _getSemanticColoringProvider(e){const t=s.k.ordered(e);return t.length>0?t[0]:null}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(t,e,n,i)))}_requestRange(e,t,n,r){const o=e.getVersionId(),s=Object(i.f)(i=>Promise.resolve(n.provideDocumentRangeSemanticTokens(e,t,i)));return s.then(n=>{n&&!e.isDisposed()&&e.getVersionId()===o&&e.setPartialSemanticTokens(t,Object(l.b)(n,r,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}};g.ID="editor.contrib.viewportSemanticTokens",g=h([f(1,a.a),f(2,c.c),f(3,d.a)],g),Object(o.m)(g.ID,g)},function(e,t,n){"use strict";n.r(t),n.d(t,"getOccurrencesAtPosition",(function(){return D}));var i=n(0),r=n(14),o=n(19),s=n(26),a=n(15),l=n(2),c=n(4),d=n(3),u=n(7),h=n(48),f=n(29),g=n(11),p=n(9),m=n(5),_=n(18),b=n(55),v=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},y=function(e,t){return function(n,i){t(n,i,e)}};const w=Object(m.gc)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),C=Object(m.gc)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),S=Object(m.gc)("editor.wordHighlightBorder",{light:null,dark:null,hc:m.b},i.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),k=Object(m.gc)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:m.b},i.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),x=Object(m.gc)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),L=Object(m.gc)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),M=new p.c("hasWordHighlights",!1);function D(e,t,n){const i=g.i.ordered(e);return Object(o.h)(i.map(i=>()=>Promise.resolve(i.provideDocumentHighlights(e,t,n)).then(void 0,a.f)),r.o)}class E{constructor(e,t,n){this._wordRange=this._getCurrentWordRange(e,t),this.result=Object(o.f)(i=>this._compute(e,t,n,i))}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new d.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const i=t.startLineNumber,r=t.startColumn,o=t.endColumn,s=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(s));for(let t=0,s=n.length;!a&&t=o&&(a=!0)}return a}cancel(){this.result.cancel()}}class T extends E{_compute(e,t,n,i){return D(e,t.getPosition(),i).then(e=>e||[])}}class O extends E{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,i){return Object(o.l)(250,i).then(()=>{if(!t.isEmpty())return[];const i=e.getWordAtPosition(t.getPosition());return!i||i.word.length>1e3?[]:e.findMatches(i.word,!0,!1,!0,n,!1).map(e=>({range:e.range,kind:g.h.Text}))})}isValid(e,t,n){const i=t.isEmpty();return this._selectionIsEmpty===i&&super.isValid(e,t,n)}}Object(c.p)("_executeDocumentHighlights",(e,t)=>D(e,t,s.a.None));class N{constructor(e,t){this.toUnhook=new l.b,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=M.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(63),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)})),this.toUnhook.add(e.onDidChangeModelContent(e=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(e=>{let t=this.editor.getOption(63);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return r.d(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(d.a.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(r.j(e,e=>e.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const i=this._getWord();if(i){const r=this.editor.getModel().getLineContent(n.startLineNumber);Object(b.a)(`${r}, ${t+1} of ${e.length} for '${i.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(r.j(e,e=>e.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const i=this._getWord();if(i){const r=this.editor.getModel().getLineContent(n.startLineNumber);Object(b.a)(`${r}, ${t+1} of ${e.length} for '${i.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,n=e.endColumn;const i=this._getWord();if(!i||i.startColumn>t||i.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())},a.e)}var o,s,l}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:N._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===g.h.Write?this._WRITE_OPTIONS:e===g.h.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}N._WRITE_OPTIONS=f.a.register({stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Object(_.h)(L),position:h.d.Center}}),N._TEXT_OPTIONS=f.a.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:Object(_.h)(m.Wb),position:h.d.Center}}),N._REGULAR_OPTIONS=f.a.register({stickiness:1,className:"wordHighlight",overviewRuler:{color:Object(_.h)(x),position:h.d.Center}});let I=class e extends l.a{constructor(e,t){super(),this.wordHighlighter=null;const n=()=>{e.hasModel()&&(this.wordHighlighter=new N(e,t))};this._register(e.onDidChangeModel(e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};I.ID="editor.contrib.wordHighlighter",I=v([y(1,p.b)],I);class A extends c.b{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=I.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class R extends c.b{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.a("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:M.toNegated(),kbOpts:{kbExpr:u.a.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const i=I.get(t);i&&i.restoreViewState(!0)}}Object(c.m)(I.ID,I),Object(c.k)(class extends A{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.a("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:M,kbOpts:{kbExpr:u.a.editorTextFocus,primary:65,weight:100}})}}),Object(c.k)(class extends A{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.a("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:M,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1089,weight:100}})}}),Object(c.k)(R),Object(_.g)((e,t)=>{const n=e.getColor(m.Q);n&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${n}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${n.transparent(.5)}; }`));const i=e.getColor(w);i&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const r=e.getColor(C);r&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${r}; }`);const o=e.getColor(m.R);o&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const s=e.getColor(S);s&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; box-sizing: border-box; }`);const a=e.getColor(k);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)})},function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteWordPartLeft",(function(){return c})),n.d(t,"DeleteWordPartRight",(function(){return d})),n.d(t,"WordPartLeftCommand",(function(){return u})),n.d(t,"CursorWordPartLeft",(function(){return h})),n.d(t,"CursorWordPartLeftSelect",(function(){return f})),n.d(t,"WordPartRightCommand",(function(){return g})),n.d(t,"CursorWordPartRight",(function(){return p})),n.d(t,"CursorWordPartRightSelect",(function(){return m}));var i=n(4),r=n(122),o=n(3),s=n(7),a=n(170),l=n(28);class c extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:s.a.writable,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t,n,i,s){let a=r.b.deleteWordPartLeft(e,t,n,i);return a||new o.a(1,1,1,1)}}class d extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:s.a.writable,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t,n,i,s){let a=r.b.deleteWordPartRight(e,t,n,i);if(a)return a;const l=t.getLineCount(),c=t.getLineMaxColumn(l);return new o.a(l,c,l,c)}}class u extends a.MoveWordCommand{_move(e,t,n,i){return r.b.moveWordPartLeft(e,t,n)}}class h extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.a.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class f extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.a.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class g extends a.MoveWordCommand{_move(e,t,n,i){return r.b.moveWordPartRight(e,t,n)}}class p extends g{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class m extends g{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:s.a.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}Object(i.l)(new c),Object(i.l)(new d),Object(i.l)(new h),Object(i.l)(new f),Object(i.l)(new p),Object(i.l)(new m)},function(e,t,n){"use strict";n.r(t),n.d(t,"jsonDefaults",(function(){return r}));n(86);var i=n(224),r=new(function(){function e(e,t,n){this._onDidChange=new i.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}())("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});i.languages.json={jsonDefaults:r},i.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),i.languages.onLanguage("json",(function(){n.e(6).then(n.bind(null,906)).then((function(e){return e.setupMode(r)}))}))},function(e,t,n){"use strict";var i=n(131);e.exports=a;var r="\0",o="\0",s="";function a(e){this._isDirected=!i.has(e,"directed")||e.directed,this._isMultigraph=!!i.has(e,"multigraph")&&e.multigraph,this._isCompound=!!i.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function l(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function d(e,t,n,o){var a=""+t,l=""+n;if(!e&&a>l){var c=a;a=l,l=c}return a+s+l+s+(i.isUndefined(o)?r:o)}function u(e,t,n,i){var r=""+t,o=""+n;if(!e&&r>o){var s=r;r=o,o=s}var a={v:r,w:o};return i&&(a.name=i),a}function h(e,t){return d(e,t.v,t.w,t.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(e){return this._label=e,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultNodeLabelFn=e,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._in[t])}))},a.prototype.sinks=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._out[t])}))},a.prototype.setNodes=function(e,t){var n=arguments,r=this;return i.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},a.prototype.setNode=function(e,t){return i.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},a.prototype.node=function(e){return this._nodes[e]},a.prototype.hasNode=function(e){return i.has(this._nodes,e)},a.prototype.removeNode=function(e){var t=this;if(i.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],i.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),i.each(i.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],i.each(i.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(t))t=o;else{for(var n=t+="";!i.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},a.prototype.children=function(e){if(i.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return i.keys(t)},a.prototype.successors=function(e){var t=this._sucs[e];if(t)return i.keys(t)},a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return i.union(t,this.successors(e))},a.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,i){e(i)&&t.setNode(i,n)})),i.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&i.each(t.nodes(),(function(e){t.setParent(e,function e(i){var o=n.parent(i);return void 0===o||t.hasNode(o)?(r[i]=o,o):o in r?r[o]:e(o)}(e))})),t},a.prototype.setDefaultEdgeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultEdgeLabelFn=e,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(e,t){var n=this,r=arguments;return i.reduce(e,(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i})),this},a.prototype.setEdge=function(){var e,t,n,r,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,t=""+t,i.isUndefined(n)||(n=""+n);var a=d(this._isDirected,e,t,n);if(i.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=r),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?r:this._defaultEdgeLabelFn(e,t,n);var c=u(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[a]=c,l(this._preds[t],e),l(this._sucs[e],t),this._in[t][a]=c,this._out[e][a]=c,this._edgeCount++,this},a.prototype.edge=function(e,t,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return this._edgeLabels[i]},a.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(e,t,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this},a.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.v===t})):r}},a.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.w===t})):r}},a.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var i=n(177)(n(142),"Map");e.exports=i},function(e,t,n){var i=n(671),r=n(678),o=n(680),s=n(681),a=n(682);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=n}},function(e,t,n){(function(e){var i=n(354),r=t&&!t.nodeType&&t,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===r&&i.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(215)(e))},function(e,t,n){var i=n(249),r=n(688),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var i=n(361),r=n(362),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),i(s(e),(function(t){return o.call(e,t)})))}:r;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n0&&o(d)?n>1?e(d,n-1,o,s,a):i(a,d):s||(a[a.length]=d)}return a}},function(e,t,n){var i=n(258),r=n(189),o=n(260),s=n(192),a=Object.prototype,l=a.hasOwnProperty,c=i((function(e,t){e=Object(e);var n=-1,i=t.length,c=i>2?t[2]:void 0;for(c&&o(t[0],t[1],c)&&(i=1);++nl){var c=a;a=l,l=c}return a+s+l+s+(i.isUndefined(o)?r:o)}function u(e,t,n,i){var r=""+t,o=""+n;if(!e&&r>o){var s=r;r=o,o=s}var a={v:r,w:o};return i&&(a.name=i),a}function h(e,t){return d(e,t.v,t.w,t.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(e){return this._label=e,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultNodeLabelFn=e,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._in[t])}))},a.prototype.sinks=function(){var e=this;return i.filter(this.nodes(),(function(t){return i.isEmpty(e._out[t])}))},a.prototype.setNodes=function(e,t){var n=arguments,r=this;return i.each(e,(function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this},a.prototype.setNode=function(e,t){return i.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},a.prototype.node=function(e){return this._nodes[e]},a.prototype.hasNode=function(e){return i.has(this._nodes,e)},a.prototype.removeNode=function(e){var t=this;if(i.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],i.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),i.each(i.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],i.each(i.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(t))t=o;else{for(var n=t+="";!i.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},a.prototype.children=function(e){if(i.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return i.keys(t)},a.prototype.successors=function(e){var t=this._sucs[e];if(t)return i.keys(t)},a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return i.union(t,this.successors(e))},a.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,i){e(i)&&t.setNode(i,n)})),i.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};return this._isCompound&&i.each(t.nodes(),(function(e){t.setParent(e,function e(i){var o=n.parent(i);return void 0===o||t.hasNode(o)?(r[i]=o,o):o in r?r[o]:e(o)}(e))})),t},a.prototype.setDefaultEdgeLabel=function(e){return i.isFunction(e)||(e=i.constant(e)),this._defaultEdgeLabelFn=e,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(e,t){var n=this,r=arguments;return i.reduce(e,(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i})),this},a.prototype.setEdge=function(){var e,t,n,r,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,t=""+t,i.isUndefined(n)||(n=""+n);var a=d(this._isDirected,e,t,n);if(i.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=r),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=o?r:this._defaultEdgeLabelFn(e,t,n);var c=u(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[a]=c,l(this._preds[t],e),l(this._sucs[e],t),this._in[t][a]=c,this._out[e][a]=c,this._edgeCount++,this},a.prototype.edge=function(e,t,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return this._edgeLabels[i]},a.prototype.hasEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(e,t,n){var i=1===arguments.length?h(this._isDirected,arguments[0]):d(this._isDirected,e,t,n),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this},a.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.v===t})):r}},a.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var r=i.values(n);return t?i.filter(r,(function(e){return e.w===t})):r}},a.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t){e.exports=function(e,t,n,i){var r=e.x,o=e.y,s=r-i.x,a=o-i.y,l=Math.sqrt(t*t*a*a+n*n*s*s),c=Math.abs(t*n*s/l);i.x=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}};class x{constructor(e){this.name=e}select(e,t,n){if(0===n.length)return 0;let i=n[0].score[0];for(let e=0;ethis._saveState(),500),this._disposables.add(e.onWillSaveState(e=>{e.reason===m.c.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(t,n){var i,r;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(i=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(n.lineNumber,n.column)))||void 0===i?void 0:i.language,resource:t.uri});if((null===(r=this._strategy)||void 0===r?void 0:r.name)!==o){this._saveState();const t=e._strategyCtors.get(o)||L;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=this._storageService.get(`${e._storagePrefix}/${o}`,t);n&&this._strategy.fromJSON(JSON.parse(n))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,n,t)}}};M._strategyCtors=new Map([["recentlyUsedByPrefix",class extends x{constructor(){super("recentlyUsedByPrefix"),this._trie=p.c.forStrings(),this._seq=0}memorize(e,t,n){const{word:i}=e.getWordUntilPosition(t),r=`${e.getLanguageIdentifier().language}/${i}`;this._trie.set(r,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:i}=e.getWordUntilPosition(t);if(!i)return super.select(e,t,n);let r=`${e.getLanguageIdentifier().language}/${i}`,o=this._trie.get(r);if(o||(o=this._trie.findSubstr(r)),o)for(let e=0;ee.push([n,t])),e.sort((e,t)=>-(e[1].touch-t[1].touch)).forEach((e,t)=>e[1].touch=t),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,n]of e)n.type="number"==typeof n.type?n.type:Object(_.E)(n.type),this._trie.set(t,n)}}}],["recentlyUsed",class extends x{constructor(){super("recentlyUsed"),this._cache=new p.a(300,.66),this._seq=0}memorize(e,t,n){const{label:i}=n.completion,r=`${e.getLanguageIdentifier().language}/${i}`;this._cache.set(r,{touch:this._seq++,type:n.completion.kind,insertText:n.completion.insertText})}select(e,t,n){if(0===n.length)return 0;const i=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(i))return super.select(e,t,n);let r=n[0].score[0],o=-1,s=-1,a=-1;for(let t=0;ta&&r.type===n[t].completion.kind&&r.insertText===n[t].completion.insertText&&(a=r.touch,s=t),n[t].completion.preselect&&-1===o)return t}return-1!==s?s:-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,n]of e)n.touch=0,n.type="number"==typeof n.type?n.type:Object(_.E)(n.type),this._cache.set(t,n);this._seq=this._cache.size}}],["first",L]]),M._storagePrefix="suggest/memories",M=S([k(0,m.a),k(1,C.a),k(2,y.a)],M);const D=Object(v.c)("ISuggestMemories");Object(w.b)(D,M,!0);var E=n(0),T=n(28),O=n(9),N=n(80),I=n(36),A=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},R=function(e,t){return function(n,i){t(n,i,e)}};let P=class e{constructor(t,n){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(n)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),Object(a.f)(this._listener),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:n},i){if(0===t.items.length)return void this.reset();e._moveIndex(!0,t,n)!==n?(this._acceptNext=i,this._model=t,this._index=n,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,n){let i=n;for(;(i=(i+t.items.length+(e?1:-1))%t.items.length)!==n&&t.items[i].completion.additionalTextEdits;);return i}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};P.OtherSuggestions=new O.c("hasOtherSuggestions",!1),P=A([R(1,O.b)],P);var j=n(6),F=n(22),B=n(61),W=n(8);class H{constructor(e,t,n,i,r,o,s){this.clipboardText=s,this._snippetCompareFn=H._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=i,this._options=r,this._refilterKind=1,this._lineContext=n,"top"===o?this._snippetCompareFn=H._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=H._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?B.d:B.e;for(let a=0;a=d)l.score=B.a.Default;else if("string"==typeof l.completion.filterText){let r=s(n,i,e,l.completion.filterText,l.filterTextLow,0,!1);if(!r)continue;0===Object(W.g)(l.completion.filterText,t)?l.score=r:(l.score=Object(B.b)(n,i,e,t,l.labelLow,0),l.score[0]=r[0])}else{let r=s(n,i,e,t,l.labelLow,0,!1);if(!r)continue;l.score=r}}switch(l.idx=a,l.distance=this._wordDistance.distance(l.position,l.completion),o.push(l),this._stats.suggestionCount++,l.completion.kind){case 27:this._stats.snippetCount++;break;case 18:this._stats.textCount++}}this._filteredItems=o.sort(this._snippetCompareFn),this._refilterKind=0}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return H._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return H._compareCompletionItems(e,t)}}var Y=n(26),V=n(274),z=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class U{static create(e,t){return z(this,void 0,void 0,(function*(){if(!t.getOption(96).localityBonus)return U.None;if(!t.hasModel())return U.None;const n=t.getModel(),i=t.getPosition();if(!e.canComputeWordRanges(n.uri))return U.None;const[o]=yield(new V.a).provideSelectionRanges(n,[i]);if(0===o.length)return U.None;const s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return U.None;const a=n.getWordUntilPosition(i);return delete s[a.word],new class extends U{distance(e,n){if(!i.equals(t.getPosition()))return 0;if(17===n.kind)return 2<<20;let a="string"==typeof n.label?n.label:n.label.name,l=s[a];if(Object(r.n)(l))return 2<<20;let c=Object(r.c)(l,u.a.fromPositions(e),u.a.compareRangesUsingStarts),d=c>=0?l[c]:l[Math.max(0,~c-1)],h=o.length;for(const e of o){if(!u.a.containsRange(e.range,d))break;h-=1}return h}}}))}}U.None=new class extends U{distance(){return 0}};var $=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class q{constructor(e,t,n,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n,this.shy=i}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);const i=t.getWordAtPosition(n);return!!i&&(i.endColumn===n.column&&!!isNaN(Number(i.word)))}}class K{constructor(e,t,n){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._toDispose=new a.b,this._quickSuggestDelay=10,this._triggerCharacterListener=new a.b,this._triggerQuickSuggest=new b.e,this._state=0,this._completionDisposables=new a.b,this._onDidCancel=new j.a,this._onDidTrigger=new j.a,this._onDidSuggest=new j.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._currentSelection=this._editor.getSelection()||new F.a(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(_.d.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._onCursorChange(e)}));let i=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{i=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{i=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{i||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){Object(a.f)(this._triggerCharacterListener),Object(a.f)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(71),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(72)||!this._editor.hasModel()||!this._editor.getOption(99))return;const e=new Map;for(const t of _.d.all(this._editor.getModel()))for(const n of t.triggerCharacters||[]){let i=e.get(n);i||((i=new Set).add(Object(I.c)()),e.set(n,i)),i.add(t)}const t=t=>{var n;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";Object(W.G)(t.charCodeAt(t.length-1))?Object(W.F)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const r=e.get(i);if(r){const e=null===(n=this._completionModel)||void 0===n?void 0:n.adopt(r);this.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(this._completionModel),r,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){0!==this._state&&(this._triggerQuickSuggest.cancel(),this._requestToken&&(this._requestToken.cancel(),this._requestToken=void 0),this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&_.d.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(_.d.has(t)&&0===this._state){if(!1===this._editor.getOption(70))return;if(!n.containsRange(this._currentSelection)&&!n.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(96).snippetsPreventQuickSuggestions&&f.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(0!==this._state)return;if(!q.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),n=this._editor.getOption(70);if(!1!==n){if(!0===n);else{e.tokenizeIfCheap(t.lineNumber);const i=e.getLineTokens(t.lineNumber),r=i.getStandardTokenType(i.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(n.other&&0===r||n.comments&&1===r||n.strings&&2===r))return}this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)}}_refilterCompletionItems(){Promise.resolve().then(()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),n=new q(e,t,2===this._state,!1);this._onNewContext(n)})}trigger(e,t=!1,n,i){var s;if(!this._editor.hasModel())return;const l=this._editor.getModel(),c=e.auto,d=new q(l,this._editor.getPosition(),c,e.shy);this.cancel(t),this._state=c?2:1,this._onDidTrigger.fire({auto:c,shy:e.shy,position:this._editor.getPosition()}),this._context=d;let u={triggerKind:null!==(s=e.triggerKind)&&void 0!==s?s:0};e.triggerCharacter&&(u={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Y.b;const h=this._editor.getOption(93);let f=1;switch(h){case"top":f=0;break;case"bottom":f=2}let g=K._createItemKindFilter(this._editor),p=U.create(this._editorWorkerService,this._editor),m=Object(I.e)(l,this._editor.getPosition(),new I.a(f,g,n),u,this._requestToken.token);Promise.all([m,p]).then(([t,n])=>$(this,void 0,void 0,(function*(){if(Object(a.f)(this._requestToken),0===this._state)return;if(!this._editor.hasModel())return;let o;(t.needsClipboard||Object(r.o)(i))&&(o=yield this._clipboardService.readText());const s=this._editor.getModel();let l=t.items;if(Object(r.o)(i)){const e=Object(I.d)(f);l=l.concat(i).sort(e)}const d=new q(s,this._editor.getPosition(),c,e.shy);this._completionModel=new H(l,this._context.column,{leadingLineContent:d.leadingLineContent,characterCountDelta:d.column-this._context.column},n,this._editor.getOption(96),this._editor.getOption(93),o),this._completionDisposables.add(t.dispoables),this._onNewContext(d)}))).catch(o.e)}static _createItemKindFilter(e){const t=new Set;"none"===e.getOption(93)&&t.add(27);const n=e.getOption(96);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),t}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber){if(e.leadingWord.startColumnthis._context.leadingWord.startColumn){const e=new Set(_.d.all(this._editor.getModel()));this._completionModel.allProvider.forEach(t=>e.delete(t));const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,t)}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,t)}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(q.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:n})}}else this.cancel()}}n(622),n(623),n(162),n(627),n(628);var G=n(18),Z=n(5),J=n(16);const X=Object(Z.gc)("symbolIcon.arrayForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Q=Object(Z.gc)("symbolIcon.booleanForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ee=Object(Z.gc)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(E.a)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),te=Object(Z.gc)("symbolIcon.colorForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ne=Object(Z.gc)("symbolIcon.constantForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ie=Object(Z.gc)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(E.a)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),re=Object(Z.gc)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(E.a)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oe=Object(Z.gc)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(E.a)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),se=Object(Z.gc)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(E.a)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ae=Object(Z.gc)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(E.a)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),le=Object(Z.gc)("symbolIcon.fileForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ce=Object(Z.gc)("symbolIcon.folderForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),de=Object(Z.gc)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(E.a)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ue=Object(Z.gc)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(E.a)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),he=Object(Z.gc)("symbolIcon.keyForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fe=Object(Z.gc)("symbolIcon.keywordForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ge=Object(Z.gc)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(E.a)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pe=Object(Z.gc)("symbolIcon.moduleForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),me=Object(Z.gc)("symbolIcon.namespaceForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_e=Object(Z.gc)("symbolIcon.nullForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),be=Object(Z.gc)("symbolIcon.numberForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ve=Object(Z.gc)("symbolIcon.objectForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ye=Object(Z.gc)("symbolIcon.operatorForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),we=Object(Z.gc)("symbolIcon.packageForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ce=Object(Z.gc)("symbolIcon.propertyForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Se=Object(Z.gc)("symbolIcon.referenceForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ke=Object(Z.gc)("symbolIcon.snippetForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xe=Object(Z.gc)("symbolIcon.stringForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Le=Object(Z.gc)("symbolIcon.structForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Me=Object(Z.gc)("symbolIcon.textForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),De=Object(Z.gc)("symbolIcon.typeParameterForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ee=Object(Z.gc)("symbolIcon.unitForeground",{dark:Z.ab,light:Z.ab,hc:Z.ab},Object(E.a)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Te=Object(Z.gc)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(E.a)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(G.g)((e,t)=>{const n=e.getColor(X);n&&t.addRule(`${J.a.symbolArray.cssSelector} { color: ${n}; }`);const i=e.getColor(Q);i&&t.addRule(`${J.a.symbolBoolean.cssSelector} { color: ${i}; }`);const r=e.getColor(ee);r&&t.addRule(`${J.a.symbolClass.cssSelector} { color: ${r}; }`);const o=e.getColor(ge);o&&t.addRule(`${J.a.symbolMethod.cssSelector} { color: ${o}; }`);const s=e.getColor(te);s&&t.addRule(`${J.a.symbolColor.cssSelector} { color: ${s}; }`);const a=e.getColor(ne);a&&t.addRule(`${J.a.symbolConstant.cssSelector} { color: ${a}; }`);const l=e.getColor(ie);l&&t.addRule(`${J.a.symbolConstructor.cssSelector} { color: ${l}; }`);const c=e.getColor(re);c&&t.addRule(`\n\t\t\t${J.a.symbolValue.cssSelector},${J.a.symbolEnum.cssSelector} { color: ${c}; }`);const d=e.getColor(oe);d&&t.addRule(`${J.a.symbolEnumMember.cssSelector} { color: ${d}; }`);const u=e.getColor(se);u&&t.addRule(`${J.a.symbolEvent.cssSelector} { color: ${u}; }`);const h=e.getColor(ae);h&&t.addRule(`${J.a.symbolField.cssSelector} { color: ${h}; }`);const f=e.getColor(le);f&&t.addRule(`${J.a.symbolFile.cssSelector} { color: ${f}; }`);const g=e.getColor(ce);g&&t.addRule(`${J.a.symbolFolder.cssSelector} { color: ${g}; }`);const p=e.getColor(de);p&&t.addRule(`${J.a.symbolFunction.cssSelector} { color: ${p}; }`);const m=e.getColor(ue);m&&t.addRule(`${J.a.symbolInterface.cssSelector} { color: ${m}; }`);const _=e.getColor(he);_&&t.addRule(`${J.a.symbolKey.cssSelector} { color: ${_}; }`);const b=e.getColor(fe);b&&t.addRule(`${J.a.symbolKeyword.cssSelector} { color: ${b}; }`);const v=e.getColor(pe);v&&t.addRule(`${J.a.symbolModule.cssSelector} { color: ${v}; }`);const y=e.getColor(me);y&&t.addRule(`${J.a.symbolNamespace.cssSelector} { color: ${y}; }`);const w=e.getColor(_e);w&&t.addRule(`${J.a.symbolNull.cssSelector} { color: ${w}; }`);const C=e.getColor(be);C&&t.addRule(`${J.a.symbolNumber.cssSelector} { color: ${C}; }`);const S=e.getColor(ve);S&&t.addRule(`${J.a.symbolObject.cssSelector} { color: ${S}; }`);const k=e.getColor(ye);k&&t.addRule(`${J.a.symbolOperator.cssSelector} { color: ${k}; }`);const x=e.getColor(we);x&&t.addRule(`${J.a.symbolPackage.cssSelector} { color: ${x}; }`);const L=e.getColor(Ce);L&&t.addRule(`${J.a.symbolProperty.cssSelector} { color: ${L}; }`);const M=e.getColor(Se);M&&t.addRule(`${J.a.symbolReference.cssSelector} { color: ${M}; }`);const D=e.getColor(ke);D&&t.addRule(`${J.a.symbolSnippet.cssSelector} { color: ${D}; }`);const E=e.getColor(xe);E&&t.addRule(`${J.a.symbolString.cssSelector} { color: ${E}; }`);const T=e.getColor(Le);T&&t.addRule(`${J.a.symbolStruct.cssSelector} { color: ${T}; }`);const O=e.getColor(Me);O&&t.addRule(`${J.a.symbolText.cssSelector} { color: ${O}; }`);const N=e.getColor(De);N&&t.addRule(`${J.a.symbolTypeParameter.cssSelector} { color: ${N}; }`);const I=e.getColor(Ee);I&&t.addRule(`${J.a.symbolUnit.cssSelector} { color: ${I}; }`);const A=e.getColor(Te);A&&t.addRule(`${J.a.symbolVariable.cssSelector} { color: ${A}; }`)});var Oe,Ne=n(1),Ie=n(101),Ae=n(94),Re=n(41),Pe=n(108),je=n(82),Fe=n(171),Be=n(66),We=n(202),He=n(35),Ye=n(42),Ve=n(147);function ze(e,t,n,i){const r=i===Oe.ROOT_FOLDER?["rootfolder-icon"]:i===Oe.FOLDER?["folder-icon"]:["file-icon"];if(n){let o;if(n.scheme===He.b.data){o=Ye.a.parseMetaData(n).get(Ye.a.META_DATA_LABEL)}else o=Ue(Object(Ye.c)(n).toLowerCase());if(i===Oe.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){r.push(`${o}-name-file-icon`);const e=o.split(".");for(let t=1;t=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Qe=function(e,t){return function(n,i){t(n,i,e)}},et=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const tt=Object(J.e)("suggest-more-info",J.a.chevronRight),nt=Object(Z.gc)("editorSuggestWidget.background",{dark:Z.U,light:Z.U,hc:Z.U},E.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),it=Object(Z.gc)("editorSuggestWidget.border",{dark:Z.V,light:Z.V,hc:Z.V},E.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),rt=Object(Z.gc)("editorSuggestWidget.foreground",{dark:Z.B,light:Z.B,hc:Z.B},E.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),ot=Object(Z.gc)("editorSuggestWidget.selectedBackground",{dark:Z.xb,light:Z.xb,hc:Z.xb},E.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),st=Object(Z.gc)("editorSuggestWidget.highlightForeground",{dark:Z.zb,light:Z.zb,hc:Z.zb},E.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),at=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function lt(e){if(!e)return!1;const t=e.completion;return!!t.documentation||t.detail&&t.detail!==t.label}function ct(e){return`suggest-aria-id:${e}`}let dt=class{constructor(e,t,n,i,r,o){this.widget=e,this.editor=t,this.triggerKeybindingLabel=n,this._modelService=i,this._modeService=r,this._themeService=o}get templateId(){return"suggestion"}renderTemplate(e){const t=Object.create(null);t.disposables=new a.b,t.root=e,t.root.classList.add("show-file-icons"),t.icon=Object(Ne.p)(e,Object(Ne.a)(".icon")),t.colorspan=Object(Ne.p)(t.icon,Object(Ne.a)("span.colorspan"));const n=Object(Ne.p)(e,Object(Ne.a)(".contents")),i=Object(Ne.p)(n,Object(Ne.a)(".main"));t.iconContainer=Object(Ne.p)(i,Object(Ne.a)(".icon-label.codicon")),t.left=Object(Ne.p)(i,Object(Ne.a)("span.left")),t.right=Object(Ne.p)(i,Object(Ne.a)("span.right")),t.iconLabel=new We.a(t.left,{supportHighlights:!0,supportCodicons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=Object(Ne.p)(t.left,Object(Ne.a)("span.signature-label")),t.qualifierLabel=Object(Ne.p)(t.left,Object(Ne.a)("span.qualifier-label")),t.detailsLabel=Object(Ne.p)(t.right,Object(Ne.a)("span.details-label")),t.readMore=Object(Ne.p)(t.right,Object(Ne.a)("span.readMore"+tt.cssSelector)),t.readMore.title=E.a("readMore","Read More ({0})",this.triggerKeybindingLabel);const r=()=>{const e=this.editor.getOptions(),n=e.get(36),r=n.fontFamily,o=n.fontFeatureSettings,s=e.get(97)||n.fontSize,a=e.get(98)||n.lineHeight,l=n.fontWeight,c=`${s}px`,d=`${a}px`;t.root.style.fontSize=c,t.root.style.fontWeight=l,i.style.fontFamily=r,i.style.fontFeatureSettings=o,i.style.lineHeight=d,t.icon.style.height=d,t.icon.style.width=d,t.readMore.style.height=d,t.readMore.style.width=d};return r(),t.disposables.add(j.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)||e.hasChanged(97)||e.hasChanged(98)).on(r,null)),t}renderElement(e,t,n){const i=n,o=e.completion,s="string"==typeof o.label?o.label:o.label.name;i.root.id=ct(t),i.colorspan.style.backgroundColor="";const a={labelEscapeNewLines:!0,matches:Object(B.c)(e.score)};let l=[];if(19===o.kind&&function(e,t){const n="string"==typeof e.completion.label?e.completion.label:e.completion.label.name;return n.match(at)?(t[0]=n,!0):!("string"!=typeof e.completion.documentation||!e.completion.documentation.match(at))&&(t[0]=e.completion.documentation,!0)}(e,l))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=l[0];else if(20===o.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const e=ze(this._modelService,this._modeService,qe.a.from({scheme:"fake",path:s}),Oe.FILE),t=ze(this._modelService,this._modeService,qe.a.from({scheme:"fake",path:o.detail}),Oe.FILE);a.extraClasses=e.length>t.length?e:t}else 23===o.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",a.extraClasses=Object(r.l)([ze(this._modelService,this._modeService,qe.a.from({scheme:"fake",path:s}),Oe.FOLDER),ze(this._modelService,this._modeService,qe.a.from({scheme:"fake",path:o.detail}),Oe.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",Object(Ne.f)(i.iconContainer,`suggest-icon ${Object(_.F)(o.kind)}`));o.tags&&o.tags.indexOf(1)>=0&&(a.extraClasses=(a.extraClasses||[]).concat(["deprecated"]),a.matches=[]),i.iconLabel.setLabel(s,void 0,a),"string"==typeof o.label?(i.parametersLabel.textContent="",i.qualifierLabel.textContent="",i.detailsLabel.textContent=(o.detail||"").replace(/\n.*$/m,""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=(o.label.parameters||"").replace(/\n.*$/m,""),i.qualifierLabel.textContent=(o.label.qualifier||"").replace(/\n.*$/m,""),i.detailsLabel.textContent=(o.label.type||"").replace(/\n.*$/m,""),i.root.classList.remove("string-label")),lt(e)?(i.right.classList.add("can-expand-details"),Object(Ne.Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this.widget.toggleDetails()}):(i.right.classList.remove("can-expand-details"),Object(Ne.K)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};dt=Xe([Qe(3,$e.a),Qe(4,C.a),Qe(5,G.c)],dt);class ut{constructor(e,t,n,i,r){this.widget=t,this.editor=n,this.markdownRenderer=i,this.kbToggleDetails=r,this.borderWidth=1,this.disposables=new a.b,this.el=Object(Ne.p)(e,Object(Ne.a)(".details")),this.disposables.add(Object(a.h)(()=>e.removeChild(this.el))),this.body=Object(Ne.a)(".body"),this.scrollbar=new Ae.a(this.body,{}),Object(Ne.p)(this.el,this.scrollbar.getDomNode()),this.disposables.add(this.scrollbar),this.header=Object(Ne.p)(this.body,Object(Ne.a)(".header")),this.close=Object(Ne.p)(this.header,Object(Ne.a)("span"+J.a.close.cssSelector)),this.close.title=E.a("readLess","Read Less ({0})",this.kbToggleDetails),this.type=Object(Ne.p)(this.header,Object(Ne.a)("p.type")),this.docs=Object(Ne.p)(this.body,Object(Ne.a)("p.docs")),this.configureFont(),j.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)).on(this.configureFont,this,this.disposables),i.onDidRenderCodeBlock(()=>this.scrollbar.scanDomNode(),this,this.disposables)}get element(){return this.el}renderLoading(){this.type.textContent=E.a("loading","Loading..."),this.docs.textContent=""}renderItem(e,t){Object(a.f)(this.renderDisposeable),this.renderDisposeable=void 0;let{documentation:n,detail:i}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}${e.word?`, compared '${e.completion.filterText&&e.completion.filterText+" (filterText)"||e.completion.label}' with '${e.word}'`:" (no prefix)"}\n`,t+=`distance: ${e.distance}, see localityBonus-setting\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,n=(new Ke.a).appendCodeblock("empty",t),i=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!lt(e))return this.type.textContent="",this.docs.textContent="",void this.el.classList.add("no-docs");if(this.el.classList.remove("no-docs"),"string"==typeof n)this.docs.classList.remove("markdown-docs"),this.docs.textContent=n;else{this.docs.classList.add("markdown-docs"),this.docs.innerText="";const e=this.markdownRenderer.render(n);this.renderDisposeable=e,this.docs.appendChild(e.element)}i?(this.type.innerText=i.length>1e5?`${i.substr(0,1e5)}…`:i,Object(Ne.Z)(this.type)):(this.type.innerText="",Object(Ne.K)(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.el.style.userSelect="text",this.el.tabIndex=-1,this.close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this.close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode()}scrollDown(e=8){this.body.scrollTop+=e}scrollUp(e=8){this.body.scrollTop-=e}scrollTop(){this.body.scrollTop=0}scrollBottom(){this.body.scrollTop=this.body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}setBorderWidth(e){this.borderWidth=e}configureFont(){const e=this.editor.getOptions(),t=e.get(36),n=t.fontFamily,i=e.get(97)||t.fontSize,r=e.get(98)||t.lineHeight,o=t.fontWeight,s=`${i}px`,a=`${r}px`;this.el.style.fontSize=s,this.el.style.fontWeight=o,this.el.style.fontFeatureSettings=t.fontFeatureSettings,this.type.style.fontFamily=n,this.close.style.height=a,this.close.style.width=a}dispose(){this.disposables.dispose(),Object(a.f)(this.renderDisposeable),this.renderDisposeable=void 0}}let ht=class e{constructor(e,t,n,i,o,s,l,c,d,u){var h,f;this.editor=e,this.telemetryService=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.state=0,this.isAddedAsContentWidget=!1,this.isAuto=!1,this.loadingTimeout=a.a.None,this.currentSuggestionDetails=null,this.ignoreFocusEvents=!1,this.completionModel=null,this.showTimeout=new b.e,this.toDispose=new a.b,this.onDidSelectEmitter=new j.a,this.onDidFocusEmitter=new j.a,this.onDidHideEmitter=new j.a,this.onDidShowEmitter=new j.a,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.firstFocusInCurrentList=!1,this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.explainMode=!1,this._onDetailsKeydown=new j.a,this.onDetailsKeyDown=this._onDetailsKeydown.event;const g=this.toDispose.add(new Fe.a(e,l,c)),p=null!==(f=null===(h=n.lookupKeybinding("toggleSuggestionDetails"))||void 0===h?void 0:h.getLabel())&&void 0!==f?f:"";this.isAuto=!1,this.focusedItem=null,this.storageService=s,this.element=Object(Ne.a)(".editor-widget.suggest-widget"),this.toDispose.add(Object(Ne.i)(this.element,"click",e=>{e.target===this.element&&this.hideWidget()})),this.messageElement=Object(Ne.p)(this.element,Object(Ne.a)(".message")),this.listElement=Object(Ne.p)(this.element,Object(Ne.a)(".tree"));const m=()=>this.element.classList.toggle("with-status-bar",this.editor.getOption(96).statusBar.visible);m(),this.statusBarElement=Object(Ne.p)(this.element,Object(Ne.a)(".suggest-status-bar"));const _=e=>{const t=n.lookupKeybindings(e.id);return new class extends Je.a{constructor(){super(void 0,e,{label:!0,icon:!1})}updateLabel(){if(Object(r.n)(t)||!this.label)return super.updateLabel();const{label:e}=this.getAction();this.label.textContent=/{\d}/.test(e)?W.x(this.getAction().label,t[0].getLabel()):`${this.getAction().label} (${t[0].getLabel()})`}}},v=new Ze.a(this.statusBarElement,{actionViewItemProvider:_}),y=new Ze.a(this.statusBarElement,{actionViewItemProvider:_}),w=d.createMenu(I.g,i);this.toDispose.add(w.onDidChange(()=>(()=>{const e=[],t=[];for(let[n,i]of w.getActions())"left"===n?e.push(...i):t.push(...i);v.clear(),v.push(e),y.clear(),y.push(t)})())),this.toDispose.add(w),this.details=u.createInstance(ut,this.element,this,this.editor,g,p);const C=()=>this.element.classList.toggle("no-icons",!this.editor.getOption(96).showIcons);C();let S=u.createInstance(dt,this,this.editor,p);this.list=new Ie.c("SuggestWidget",this.listElement,this,[S],{useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{const t="string"==typeof e.completion.label?e.completion.label:e.completion.label.name;if(e.isResolved&&this.expandDocsSettingFromStorage()){const{documentation:n,detail:i}=e.completion,r=W.x("{0}{1}",i||"",n?"string"==typeof n?n:n.value:"");return E.a("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,r)}return t},getWidgetAriaLabel:()=>E.a("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this.toDispose.add(Object(je.b)(this.list,o,{listInactiveFocusBackground:ot,listInactiveFocusOutline:Z.b})),this.toDispose.add(o.onDidColorThemeChange(e=>this.onThemeChange(e))),this.toDispose.add(e.onDidLayoutChange(()=>this.onEditorLayoutChange())),this.toDispose.add(this.list.onMouseDown(e=>this.onListMouseDownOrTap(e))),this.toDispose.add(this.list.onTap(e=>this.onListMouseDownOrTap(e))),this.toDispose.add(this.list.onDidChangeSelection(e=>this.onListSelection(e))),this.toDispose.add(this.list.onDidChangeFocus(e=>this.onListFocus(e))),this.toDispose.add(this.editor.onDidChangeCursorSelection(()=>this.onCursorSelectionChanged())),this.toDispose.add(this.editor.onDidChangeConfiguration(e=>{e.hasChanged(96)&&(m(),C())})),this.ctxSuggestWidgetVisible=I.b.Visible.bindTo(i),this.ctxSuggestWidgetDetailsVisible=I.b.DetailsVisible.bindTo(i),this.ctxSuggestWidgetMultipleSuggestions=I.b.MultipleSuggestions.bindTo(i),this.onThemeChange(o.getColorTheme()),this.toDispose.add(Object(Ne.n)(this.details.element,"keydown",e=>{this._onDetailsKeydown.fire(e)})),this.toDispose.add(this.editor.onMouseDown(e=>this.onEditorMouseDown(e)))}onEditorMouseDown(e){this.details.element.contains(e.target.element)?this.details.element.focus():this.element.contains(e.target.element)&&this.editor.focus()}onCursorSelectionChanged(){0!==this.state&&this.editor.layoutContentWidget(this)}onEditorLayoutChange(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()}onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this.select(e.element,e.index))}onListSelection(e){e.elements.length&&this.select(e.elements[0],e.indexes[0])}select(e,t){const n=this.completionModel;n&&(this.onDidSelectEmitter.fire({item:e,index:t,model:n}),this.editor.focus())}onThemeChange(e){const t=e.getColor(nt);t&&(this.listElement.style.backgroundColor=t.toString(),this.statusBarElement.style.backgroundColor=t.toString(),this.details.element.style.backgroundColor=t.toString(),this.messageElement.style.backgroundColor=t.toString());const n=e.getColor(it);n&&(this.listElement.style.borderColor=n.toString(),this.statusBarElement.style.borderColor=n.toString(),this.details.element.style.borderColor=n.toString(),this.messageElement.style.borderColor=n.toString(),this.detailsBorderColor=n.toString());const i=e.getColor(Z.Z);i&&(this.detailsFocusBorderColor=i.toString()),this.details.setBorderWidth("hc"===e.type?2:1)}onListFocus(e){if(this.ignoreFocusEvents)return;if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this.completionModel)return;const t=e.elements[0],n=e.indexes[0];this.firstFocusInCurrentList=!this.focusedItem,t!==this.focusedItem&&(this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.focusedItem=t,this.list.reveal(n),this.currentSuggestionDetails=Object(b.f)(e=>et(this,void 0,void 0,(function*(){const n=Object(b.g)(()=>this.showDetails(!0),250);e.onCancellationRequested(()=>n.dispose());const i=yield t.resolve(e);return n.dispose(),i}))),this.currentSuggestionDetails.then(()=>{n>=this.list.length||t!==this.list.element(n)||(this.ignoreFocusEvents=!0,this.list.splice(n,1,[t]),this.list.setFocus([n]),this.ignoreFocusEvents=!1,this.expandDocsSettingFromStorage()?this.showDetails(!1):this.element.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:ct(n)}))}).catch(o.e)),this.onDidFocusEmitter.fire({item:t,index:n,model:this.completionModel})}setState(t){if(!this.element)return;this.isAddedAsContentWidget||0===t||(this.isAddedAsContentWidget=!0,this.editor.addContentWidget(this));const n=this.state!==t;switch(this.state=t,this.element.classList.toggle("frozen",4===t),t){case 0:Object(Ne.K)(this.messageElement,this.details.element,this.listElement,this.statusBarElement),this.hide(),this.listHeight=0,n&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,Object(Ne.K)(this.listElement,this.details.element,this.statusBarElement),Object(Ne.Z)(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Object(Ne.K)(this.listElement,this.details.element,this.statusBarElement),Object(Ne.Z)(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 3:Object(Ne.K)(this.messageElement),Object(Ne.Z)(this.listElement,this.statusBarElement),this.show();break;case 4:Object(Ne.K)(this.messageElement),Object(Ne.Z)(this.listElement),this.show();break;case 5:Object(Ne.K)(this.messageElement),Object(Ne.Z)(this.details.element,this.listElement,this.statusBarElement),this.show()}}showTriggered(e,t){0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=Object(b.g)(()=>this.setState(1),t)))}showSuggestions(e,t,n,i){if(this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.loadingTimeout.dispose(),this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.completionModel!==e&&(this.completionModel=e),n&&2!==this.state&&0!==this.state)return void this.setState(4);let r=this.completionModel.items.length;const o=0===r;if(this.ctxSuggestWidgetMultipleSuggestions.set(r>1),o)i?this.setState(0):this.setState(2),this.completionModel=null;else{if(3!==this.state){const{stats:e}=this.completionModel;e.wasAutomaticallyTriggered=!!i,this.telemetryService.publicLog("suggestWidget",Object.assign({},e))}this.focusedItem=null,this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,0),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}selectNextPage(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}}selectNext(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}}selectLast(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}}selectPreviousPage(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}}selectPrevious(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}}selectFirst(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}}getFocusedItem(){if(0!==this.state&&2!==this.state&&1!==this.state&&this.completionModel)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}}toggleDetailsFocus(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog2("suggestWidget:toggleDetailsFocus")}toggleDetails(){if(lt(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.ctxSuggestWidgetDetailsVisible.set(!1),this.updateExpandDocsSetting(!1),Object(Ne.K)(this.details.element),this.element.classList.remove("docs-side","doc-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog2("suggestWidget:collapseDetails");else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.ctxSuggestWidgetDetailsVisible.set(!0),this.updateExpandDocsSetting(!0),this.showDetails(!1),this.telemetryService.publicLog2("suggestWidget:expandDetails")}}showDetails(e){e||this.expandSideOrBelow(),Object(Ne.Z)(this.details.element),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",e?this.details.renderLoading():this.details.renderItem(this.list.getFocusedElements()[0],this.explainMode),this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus()}toggleExplainMode(){this.list.getFocusedElements()[0]&&this.expandDocsSettingFromStorage()&&(this.explainMode=!this.explainMode,this.showDetails(!1))}show(){const e=this.updateListHeight();e!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=e),this.ctxSuggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet(()=>{this.element.classList.add("visible"),this.onDidShowEmitter.fire(this)},100)}hide(){this.editor.layoutContentWidget(this),this.ctxSuggestWidgetVisible.reset(),this.ctxSuggestWidgetMultipleSuggestions.reset(),this.element.classList.remove("visible")}hideWidget(){this.loadingTimeout.dispose(),this.setState(0),this.onDidHideEmitter.fire(this)}getPosition(){if(0===this.state)return null;let e=[2,1];return this.preferDocPositionTop&&(e=[1]),{position:this.editor.getPosition(),preference:e}}getDomNode(){return this.element}getId(){return e.ID}isFrozen(){return 4===this.state}updateListHeight(){let e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{const t=this.list.contentHeight/this.unfocusedHeight,{maxVisibleSuggestions:n}=this.editor.getOption(96);e=Math.min(t,n)*this.unfocusedHeight}return this.element.style.lineHeight=`${this.unfocusedHeight}px`,this.listElement.style.height=`${e}px`,this.statusBarElement.style.top=`${e}px`,this.list.layout(e),e}adjustDocsPosition(){if(!this.editor.hasModel())return;const e=this.editor.getOption(51),t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=Object(Ne.C)(this.editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height,o=Object(Ne.C)(this.element),s=o.left,a=o.top;if(this.docsPositionPreviousWidgetY&&this.docsPositionPreviousWidgetYa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=`${this.details.element.offsetHeight-this.listElement.offsetHeight}px`)}expandSideOrBelow(){if(!lt(this.focusedItem)&&this.firstFocusInCurrentList)return void this.element.classList.remove("docs-side","docs-below");let e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1]){const n=e.getColor(st);n&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${n}; }`);const i=e.getColor(rt);i&&t.addRule(`.monaco-editor .suggest-widget { color: ${i}; }`);const r=e.getColor(Z.rc);r&&t.addRule(`.monaco-editor .suggest-widget a { color: ${r}; }`);const o=e.getColor(Z.qc);o&&t.addRule(`.monaco-editor .suggest-widget code { background-color: ${o}; }`)});var ft=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},gt=function(e,t){return function(n,i){t(n,i,e)}};let pt=class e extends a.a{constructor(t,n){super(),this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(n),this._register(this._editor.onDidChangeConfiguration(e=>e.hasChanged(101)&&this._update())),this._update()}dispose(){super.dispose(),Object(a.f)(this._selectionListener),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(101);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),n=e.getWordAtPosition(t.getStartPosition());n?this._ckAtEnd.set(n.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};pt.AtEnd=new O.c("atEndOfWord",!1),pt=ft([gt(1,O.b)],pt);var mt=n(88),_t=n(20),bt=n(111);class vt{constructor(e,t,n){this._disposables=new a.b,this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(i=>{if(this._active&&!t.isFrozen()){const t=i.charCodeAt(i.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!Object(r.o)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new bt.b;for(const n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class yt{constructor(e,t){this._disposables=new a.b,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),n=t.length;let i=!1;for(let e=0;eyt._maxSelectionLength)return;this._lastOvertyped[e]={value:r.getValueInRange(n),multiline:n.startLineNumber!==n.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(e=>{this._empty||(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Mt=function(e,t){return function(n,i){t(n,i,e)}};class Dt{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),i=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:u.a.fromPositions(t,i),options:{stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Et=class e{constructor(e,t,n,i,r,o,l,c){this._memoryService=n,this._commandService=i,this._contextKeyService=r,this._instantiationService=o,this._logService=l,this._lineSuffix=new a.d,this._toDispose=new a.b,this.editor=e,this.model=new K(this.editor,t,c),this.widget=this._toDispose.add(new b.b(()=>{const e=this._instantiationService.createInstance(ht,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect(e=>this._insertSuggestion(e,0),this));const t=new vt(this.editor,e,e=>this._insertSuggestion(e,2));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest(e=>{0===e.completionModel.items.length&&t.reset()}));const n=I.b.MakesTextEdit.bindTo(this._contextKeyService),i=I.b.HasInsertAndReplaceRange.bindTo(this._contextKeyService),r=I.b.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Object(a.h)(()=>{n.reset(),i.reset(),r.reset()})),this._toDispose.add(e.onDidFocus(({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,s=t.column;let a=!0;if(!("smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.command||e.completion.additionalTextEdits||4&e.completion.insertTextRules||s-o!==e.completion.insertText.length)){a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:s})!==e.completion.insertText}n.set(a),i.set(!wt.a.equals(e.editInsertEnd,e.editReplaceEnd)),r.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)})),this._toDispose.add(e.onDetailsKeyDown(e=>{e.toKeybinding().equals(new s.e(!0,!1,!1,!1,33))||Ct.f&&e.toKeybinding().equals(new s.e(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()})),e})),this._overtypingCapturer=this._toDispose.add(new b.b(()=>this._toDispose.add(new yt(this.editor,this.model)))),this._alternatives=this._toDispose.add(new b.b(()=>this._toDispose.add(new P(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(pt,e)),this._toDispose.add(this.model.onDidTrigger(e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new Dt(this.editor.getModel(),e.position)})),this._toDispose.add(this.model.onDidSuggest(e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}})),this._toDispose.add(this.model.onDidCancel(e=>{e.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));let d=I.b.AcceptSuggestionsOnEnter.bindTo(r),u=()=>{const e=this.editor.getOption(1);d.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const n=this.editor.getModel(),i=n.getAlternativeVersionId(),{item:r}=e,s=[],a=new Y.b;1&t||this.editor.pushUndoStop();const c=this.getOverwriteInfo(r,Boolean(8&t));if(this._memoryService.memorize(n,this.editor.getPosition(),r),Array.isArray(r.completion.additionalTextEdits)){const e=l.c.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",r.completion.additionalTextEdits.map(e=>d.a.replace(u.a.lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!r.isResolved){const e=new kt.a(!0);let i;const o=n.onDidChangeContent(e=>{if(e.isFlush)return a.cancel(),void o.dispose();for(let t of e.changes){const e=u.a.getEndPosition(t.range);i&&!wt.a.isBefore(e,i)||(i=e)}});let c=t;t|=2;let h=!1,f=this.editor.onWillType(()=>{f.dispose(),h=!0,2&c||this.editor.pushUndoStop()});s.push(r.resolve(a.token).then(()=>{if(!r.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(i&&r.completion.additionalTextEdits.some(e=>wt.a.isBefore(i,u.a.getStartPosition(e.range))))return!1;h&&this.editor.pushUndoStop();const e=l.c.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",r.completion.additionalTextEdits.map(e=>d.a.replace(u.a.lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!h&&2&c||this.editor.pushUndoStop(),!0}).then(t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),o.dispose(),f.dispose()}))}let{insertText:h}=r.completion;4&r.completion.insertTextRules||(h=g.c.escape(h)),f.SnippetController2.get(this.editor).insert(h,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&r.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),r.completion.command?r.completion.command.id===Tt.id?this.model.trigger({auto:!0,shy:!1},!0):(s.push(this._commandService.executeCommand(r.completion.command.id,...r.completion.command.arguments?[...r.completion.command.arguments]:[]).catch(o.e)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,e=>{for(a.cancel();n.canUndo();){i!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}}),this._alertCompletionItem(r),Promise.all(s).finally(()=>{this.model.clear(),a.dispose()})}getOverwriteInfo(e,t){Object(_t.b)(this.editor.hasModel());let n="replace"===this.editor.getOption(96).insertMode;t&&(n=!n);const i=e.position.column-e.editStart.column,r=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:i+(this.editor.getPosition().column-e.position.column),overwriteAfter:r+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem({completion:e}){const t="string"==typeof e.label?e.label:e.label.name;if(Object(r.o)(e.additionalTextEdits)){let n=E.a("arai.alert.snippet","Accepting '{0}' made {1} additional edits",t,e.additionalTextEdits.length);Object(i.a)(n)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},i=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),n=e.editStart.column,i=t.column;return i-n!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:n,endLineNumber:t.lineNumber,endColumn:i})!==e.completion.insertText};j.b.once(this.model.onDidTrigger)(e=>{let t=[];j.b.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Object(a.f)(t),n()},void 0,t),this.model.onDidSuggest(({completionModel:e})=>{if(Object(a.f)(t),0===e.items.length)return void n();const r=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[r];i(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:r,item:o,model:e},7)):n()},void 0,t)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const n=this.widget.value.getFocusedItem();let i=0;e&&(i|=4),t&&(i|=8),this._insertSuggestion(n,i)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}};Et.ID="editor.contrib.suggestController",Et=Lt([Mt(1,mt.a),Mt(2,D),Mt(3,T.b),Mt(4,O.b),Mt(5,v.a),Mt(6,St.b),Mt(7,xt.a)],Et);class Tt extends c.b{constructor(){super({id:Tt.id,label:E.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:O.a.and(h.a.writable,h.a.hasCompletionItemProvider),kbOpts:{kbExpr:h.a.textInputFocus,primary:2058,mac:{primary:266,secondary:[521]},weight:100}})}run(e,t){const n=Et.get(t);n&&n.triggerSuggest()}}Tt.id="editor.action.triggerSuggest",Object(c.m)(Et.ID,Et),Object(c.k)(Tt);const Ot=c.c.bindToContribution(Et.get);Object(c.l)(new Ot({id:"acceptSelectedSuggestion",precondition:I.b.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),N.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:O.a.and(I.b.Visible,h.a.textInputFocus),primary:2,weight:190}),N.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:O.a.and(I.b.Visible,h.a.textInputFocus,I.b.AcceptSuggestionsOnEnter,I.b.MakesTextEdit),primary:3,weight:190}),Ge.d.appendMenuItem(I.g,{command:{id:"acceptSelectedSuggestion",title:E.a({key:"accept.accept",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")},group:"left",order:1,when:I.b.HasInsertAndReplaceRange.toNegated()}),Ge.d.appendMenuItem(I.g,{command:{id:"acceptSelectedSuggestion",title:E.a({key:"accept.insert",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")},group:"left",order:1,when:O.a.and(I.b.HasInsertAndReplaceRange,O.a.equals("config.editor.suggest.insertMode","insert"))}),Ge.d.appendMenuItem(I.g,{command:{id:"acceptSelectedSuggestion",title:E.a({key:"accept.replace",comment:['{0} will be a keybinding, e.g "Enter to replace"']},"{0} to replace")},group:"left",order:1,when:O.a.and(I.b.HasInsertAndReplaceRange,O.a.equals("config.editor.suggest.insertMode","replace"))}),Object(c.l)(new Ot({id:"acceptAlternativeSelectedSuggestion",precondition:O.a.and(I.b.Visible,h.a.textInputFocus),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I.g,group:"left",order:2,when:O.a.and(I.b.HasInsertAndReplaceRange,O.a.equals("config.editor.suggest.insertMode","insert")),title:E.a({key:"accept.replace",comment:['{0} will be a keybinding, e.g "Enter to replace"']},"{0} to replace")},{menuId:I.g,group:"left",order:2,when:O.a.and(I.b.HasInsertAndReplaceRange,O.a.equals("config.editor.suggest.insertMode","replace")),title:E.a({key:"accept.insert",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")}]})),T.a.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object(c.l)(new Ot({id:"hideSuggestWidget",precondition:I.b.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:9,secondary:[1033]}})),Object(c.l)(new Ot({id:"selectNextSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(c.l)(new Ot({id:"selectNextPageSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:12,secondary:[2060]}})),Object(c.l)(new Ot({id:"selectLastSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),Object(c.l)(new Ot({id:"selectPrevSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(c.l)(new Ot({id:"selectPrevPageSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:11,secondary:[2059]}})),Object(c.l)(new Ot({id:"selectFirstSuggestion",precondition:O.a.and(I.b.Visible,I.b.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),Object(c.l)(new Ot({id:"toggleSuggestionDetails",precondition:I.b.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:I.g,group:"right",order:1,when:O.a.and(I.b.DetailsVisible,I.b.CanResolve),title:E.a("detail.more","show less")},{menuId:I.g,group:"right",order:1,when:O.a.and(I.b.DetailsVisible.toNegated(),I.b.CanResolve),title:E.a("detail.less","show more")}]})),Object(c.l)(new Ot({id:"toggleExplainMode",precondition:I.b.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),Object(c.l)(new Ot({id:"toggleSuggestionFocus",precondition:I.b.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:2570,mac:{primary:778}}})),Object(c.l)(new Ot({id:"insertBestCompletion",precondition:O.a.and(h.a.textInputFocus,O.a.equals("config.editor.tabCompletion","on"),pt.AtEnd,I.b.Visible.toNegated(),P.OtherSuggestions.toNegated(),f.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(Object(_t.i)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:190,primary:2}})),Object(c.l)(new Ot({id:"insertNextSuggestion",precondition:O.a.and(h.a.textInputFocus,O.a.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,I.b.Visible.toNegated(),f.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:2}})),Object(c.l)(new Ot({id:"insertPrevSuggestion",precondition:O.a.and(h.a.textInputFocus,O.a.equals("config.editor.tabCompletion","on"),P.OtherSuggestions,I.b.Visible.toNegated(),f.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:190,kbExpr:h.a.textInputFocus,primary:1026}}))},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(39),o=n(2),s=n(4),a=n(3),l=n(7),c=n(98),d=n(1),u=n(26),h=n(13),f=n(81),g=n(10),p=n(29),m=n(11),_=n(229),b=n(222),v=n(6);class y{constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new v.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new v.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new v.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(k.E)||h.a.white})),this._register(d.i(this.pickedColorNode,d.c.CLICK,()=>this.model.selectNextColorPresentation())),this._register(d.i(i,d.c.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=h.a.Format.CSS.format(t.color)||"",d.ab(this.pickedColorNode,"light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=h.a.Format.CSS.format(e)||"",d.ab(this.pickedColorNode,"light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class D extends o.a{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this.domNode=L(".colorpicker-body"),d.p(e,this.domNode),this.saturationBox=new E(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new O(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new N(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new h.a(new h.b(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new h.a(new h.b(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=360*(1-e);this.model.color=new h.a(new h.b(360===n?0:n,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class E extends o.a{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new v.a,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new v.a,this.onColorFlushed=this._onColorFlushed.event,this.domNode=L(".saturation-wrap"),d.p(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",d.p(this.domNode,this.canvas),this.selection=L(".saturation-selection"),d.p(this.domNode,this.selection),this.layout(),this._register(d.g(this.domNode,e=>this.onMouseDown(e))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new C.a);const t=d.C(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,C.b,e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top),()=>null);const n=d.h(document,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new h.a(new h.b(e.h,1,1,1)),n=this.canvas.getContext("2d"),i=n.createLinearGradient(0,0,this.canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this.canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=h.a.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class T extends o.a{constructor(e,t){super(),this.model=t,this._onDidChange=new v.a,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new v.a,this.onColorFlushed=this._onColorFlushed.event,this.domNode=d.p(e,L(".strip")),this.overlay=d.p(this.domNode,L(".overlay")),this.slider=d.p(this.domNode,L(".slider")),this.slider.style.top="0px",this._register(d.g(this.domNode,e=>this.onMouseDown(e))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new C.a),n=d.C(this.domNode);d.e(this.domNode,"grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,C.b,e=>this.onDidChangeTop(e.posy-n.top),()=>null);const i=d.h(document,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),d.Q(this.domNode,"grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class O extends T{constructor(e,t){super(e,t),d.e(this.domNode,"opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:n,b:i}=e.rgba,r=new h.a(new h.c(t,n,i,1)),o=new h.a(new h.c(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class N extends T{constructor(e,t){super(e,t),d.e(this.domNode,"hue-strip")}getValue(e){return 1-e.hsva.h/360}}class I extends S.a{constructor(e,t,n,i){super(),this.model=t,this.pixelRatio=n,this._register(Object(w.n)(()=>this.layout()));const r=L(".colorpicker-widget");e.appendChild(r);const o=new M(r,this.model,i);this.body=new D(r,this.model,this.pixelRatio),this._register(o),this._register(this.body)}layout(){this.body.layout()}}var A=n(14),R=n(15);function P(e,t,n){const i=m.p.ordered(e).map(i=>Promise.resolve(i.provideHover(e,t,n)).then(e=>e&&function(e){const t=void 0!==e.range,n=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&n}(e)?e:void 0,e=>{Object(R.f)(e)}));return Promise.all(i).then(A.d)}Object(s.p)("_executeHoverProvider",(e,t)=>P(e,t,u.a.None));var j=n(19);class F{constructor(e,t,n,i,r){this._computer=e,this._state=0,this._hoverTime=r,this._firstWaitScheduler=new j.d(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new j.d(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new j.d(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=n,this._progressCallback=i}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(j.f)(e=>this._computer.computeAsync(e)),this._asyncComputationPromise.then(e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)},e=>this._onError(e))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):Object(R.e)(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}n(614);var B=n(94);const W=d.a;class H extends o.a{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new B.a(this.contentsDomNode,{})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class Y extends S.a{constructor(e,t,n,i){super(),this._hoverVisibleKey=n,this._keybindingService=i,this.allowEditorOverflow=!0,this._hover=this._register(new H),this._id=e,this._editor=t,this._isVisible=!1,this._stoleFocus=!1,this.onkeydown(this._hover.containerDomNode,e=>{e.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this.updateFont()})),this._editor.onDidLayoutChange(e=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,d.ab(this._hover.containerDomNode,"hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}showAt(e,t,n){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=n,n&&this._hover.containerDomNode.focus()}hide(){this.isVisible&&(setTimeout(()=>{this.isVisible||this._hoverVisibleKey.set(!1)},0),this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())}getPosition(){return this.isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}dispose(){this._editor.removeContentWidget(this),super.dispose()}updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_renderAction(e,t){const n=this._keybindingService.lookupKeybinding(t.commandId);return function(e,t,n){const i=d.p(e,W("div.action-container")),r=d.p(i,W("a.action"));return r.setAttribute("href","#"),r.setAttribute("role","button"),t.iconClass&&d.p(r,W(`span.icon.${t.iconClass}`)),d.p(r,W("span")).textContent=n?`${t.label} (${n})`:t.label,d.i(i,d.c.CLICK,e=>{e.stopPropagation(),e.preventDefault(),t.run(i)})}(e,t,n?n.getLabel():null)}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(36);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}}class V extends S.a{constructor(e,t){super(),this._id=e,this._editor=t,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this.updateFont()})),this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,d.ab(this._domNode,"hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),r=this._editor.getOption(51),o=n-i-(this._domNode.clientHeight-r)/2;this._domNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(o),0)}px`}hide(){this.isVisible&&(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){[...Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),...Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))].forEach(e=>this._editor.applyFontInfo(e))}updateContents(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}}var z=n(171),U=n(52),$=n(42),q=n(66),K=n(200),G=n(95),Z=n(130),J=n(57),X=n(70);const Q=d.a;class ee{constructor(e,t,n){this.range=e,this.color=t,this.provider=n}}class te{constructor(e,t){this.range=e,this.marker=t}}class ne{constructor(e,t){this._markerDecorationsService=t,this._editor=e,this._result=[]}setRange(e){this._range=e,this._result=[]}clearResult(){this._result=[]}computeAsync(e){if(!this._editor.hasModel()||!this._range)return Promise.resolve([]);const t=this._editor.getModel();return m.p.has(t)?P(t,new g.a(this._range.startLineNumber,this._range.startColumn),e):Promise.resolve([])}computeSync(){if(!this._editor.hasModel()||!this._range)return[];const e=this._editor.getModel(),t=this._range.startLineNumber;if(t>this._editor.getModel().getLineCount())return[];const n=b.ColorDetector.get(this._editor),i=e.getLineMaxColumn(t),r=this._editor.getLineDecorations(t);let o=!1;const s=this._range,l=r.map(r=>{const l=r.range.startLineNumber===t?r.range.startColumn:1,c=r.range.endLineNumber===t?r.range.endColumn:i;if(l>s.startColumn||s.endColumn>c)return null;const d=new a.a(s.startLineNumber,l,s.startLineNumber,c),u=this._markerDecorationsService.getMarker(e,r);if(u)return new te(d,u);const h=n.getColorData(r.range.getStartPosition());if(!o&&h){o=!0;const{color:e,range:t}=h.colorInfo;return new ee(t,e,h.provider)}if(Object(f.b)(r.options.hoverMessage))return null;return{contents:r.options.hoverMessage?Object(A.b)(r.options.hoverMessage):[],range:d}});return Object(A.d)(l)}onResult(e,t){this._result=t?e.concat(this._result.sort((e,t)=>e instanceof ee?-1:t instanceof ee?1:0)):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){return this._result.slice(0).concat([this._getLoadingMessage()])}_getLoadingMessage(){return{range:this._range,contents:[(new f.a).appendText(i.a("modesContentHover.loading","Loading..."))]}}}const ie={type:2,filter:{include:J.b.QuickFix}};class re extends Y{constructor(e,t,n,i,r,s,a=q.b){super(re.ID,e,t,i),this._themeService=r,this._modeService=s,this._openerService=a,this.renderDisposable=this._register(new o.d),this._messages=[],this._lastRange=null,this._computer=new ne(this._editor,n),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new F(this._computer,e=>this._withResult(e,!0),null,e=>this._withResult(e,!1),this._editor.getOption(46).delay),this._register(d.n(this.getDomNode(),d.c.FOCUS,()=>{this._colorPicker&&d.e(this.getDomNode(),"colorpicker-hover")})),this._register(d.n(this.getDomNode(),d.c.BLUR,()=>{d.Q(this.getDomNode(),"colorpicker-hover")})),this._register(e.onDidChangeConfiguration(e=>{this._hoverOperation.setHoverTime(this._editor.getOption(46).delay)})),this._register(m.C.onDidChange(e=>{this.isVisible&&this._lastRange&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastRange,this._messages))}))}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAt(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){let t=[];for(let n=0,i=this._messages.length;n=e.endColumn&&t.push(i)}if(t.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(let n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()}_renderMessages(e,t){this.renderDisposable.dispose(),this._colorPicker=null;let n=1073741824,i=t[0].range?a.a.lift(t[0].range):null,r=document.createDocumentFragment(),s=!0,l=!1;const c=new o.b,p=[];if(t.forEach(e=>{if(e.range)if(n=Math.min(n,e.range.startColumn),i=i?a.a.plusRange(i,e.range):a.a.lift(e.range),e instanceof ee){l=!0;const{red:t,green:n,blue:i,alpha:s}=e.color,d=new h.c(Math.round(255*t),Math.round(255*n),Math.round(255*i),s),f=new h.a(d);if(!this._editor.hasModel())return;const g=this._editor.getModel();let p=new a.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),m={range:e.range,color:e.color};const b=new y(f,[],0),v=new I(r,b,this._editor.getOption(115),this._themeService);Object(_.a)(g,m,e.provider,u.a.None).then(t=>{if(b.colorPresentations=t||[],!this._editor.hasModel())return;const n=this._editor.getModel().getValueInRange(e.range);b.guessColorPresentation(f,n);const i=()=>{let e,t;b.presentation.textEdit?(e=[b.presentation.textEdit],t=(t=new a.a(b.presentation.textEdit.range.startLineNumber,b.presentation.textEdit.range.startColumn,b.presentation.textEdit.range.endLineNumber,b.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+b.presentation.textEdit.text.length)):(e=[{identifier:null,range:p,text:b.presentation.label,forceMoveMarkers:!1}],t=p.setEndPosition(p.endLineNumber,p.startColumn+b.presentation.label.length)),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),b.presentation.additionalTextEdits&&(e=[...b.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this.hide()),this._editor.pushUndoStop(),p=t},s=t=>Object(_.a)(g,{range:p,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},e.provider,u.a.None).then(e=>{b.colorPresentations=e||[]}),l=b.onColorFlushed(e=>{s(e).then(i)}),d=b.onDidChangeColor(s);this._colorPicker=v,this.showAt(p.getStartPosition(),p,this._shouldFocus),this.updateContents(r),this._colorPicker.layout(),this.renderDisposable.value=Object(o.e)(l,d,v,c)})}else e instanceof te?(p.push(e),s=!1):e.contents.filter(e=>!Object(f.b)(e)).forEach(e=>{const t=Q("div.hover-row.markdown-hover"),n=d.p(t,Q("div.hover-contents")),i=c.add(new z.a(this._editor,this._modeService,this._openerService));c.add(i.onDidRenderCodeBlock(()=>{n.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const o=c.add(i.render(e));n.appendChild(o.element),r.appendChild(t),s=!1})}),p.length){p.forEach(e=>r.appendChild(this.renderMarkerHover(e)));const e=1===p.length?p[0]:p.sort((e,t)=>U.c.compare(e.marker.severity,t.marker.severity))[0];r.appendChild(this.renderMarkerStatusbar(e))}l||s||(this.showAt(new g.a(e.startLineNumber,n),i,this._shouldFocus),this.updateContents(r)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,i?[{range:i,options:re._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}renderMarkerHover(e){const t=Q("div.hover-row"),n=d.p(t,Q("div.marker.hover-contents")),{source:i,message:r,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(n);const a=d.p(n,Q("span"));if(a.style.whiteSpace="pre-wrap",a.innerText=r,i||o)if(o&&"string"!=typeof o){const e=Q("span");if(i){d.p(e,Q("span")).innerText=i}this._codeLink=d.p(e,Q("a.code-link")),this._codeLink.setAttribute("href",o.target.toString()),this._codeLink.onclick=e=>{this._openerService.open(o.target),e.preventDefault(),e.stopPropagation()},d.p(this._codeLink,Q("span")).innerText=o.value;const t=d.p(n,e);t.style.opacity="0.6",t.style.paddingLeft="6px"}else{const e=d.p(n,Q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=i&&o?`${i}(${o})`:i||`(${o})`}if(Object(A.o)(s))for(const{message:e,resource:t,startLineNumber:i,startColumn:r}of s){const o=d.p(n,Q("div"));o.style.marginTop="8px";const s=d.p(o,Q("a"));s.innerText=`${Object($.b)(t)}(${i}, ${r}): `,s.style.cursor="pointer",s.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(t.with({fragment:`${i},${r}`}),{fromUserGesture:!0}).catch(R.e)};const a=d.p(o,Q("span"));a.innerText=e,this._editor.applyFontInfo(a)}return t}renderMarkerStatusbar(e){const t=Q("div.hover-row.status-bar"),n=new o.b,r=d.p(t,Q("div.actions"));if(e.marker.severity!==U.c.Error&&e.marker.severity!==U.c.Warning&&e.marker.severity!==U.c.Info||n.add(this._renderAction(r,{label:i.a("peek problem","Peek Problem"),commandId:K.NextMarkerAction.ID,run:()=>{this.hide(),K.MarkerController.get(this._editor).showAtMarker(e.marker),this._editor.focus()}})),!this._editor.getOption(72)){const t=d.p(r,Q("div"));t.style.opacity="0",t.style.transition="opacity 0.2s",setTimeout(()=>t.style.opacity="1",200),t.textContent=i.a("checkingForQuickFixes","Checking for quick fixes..."),n.add(Object(o.h)(()=>t.remove()));const s=this.getCodeActions(e.marker);n.add(Object(o.h)(()=>s.cancel())),s.then(e=>{if(t.style.transition="",t.style.opacity="1",!e.validActions.length)return e.dispose(),void(t.textContent=i.a("noQuickFixes","No quick fixes available"));t.remove();let s=!1;n.add(Object(o.h)(()=>{s||e.dispose()})),n.add(this._renderAction(r,{label:i.a("quick fixes","Quick Fix..."),commandId:Z.e.Id,run:t=>{s=!0;const n=Z.f.get(this._editor),i=d.C(t);this.hide(),n.showCodeActions(ie,e,{x:i.left+6,y:i.top+i.height+6})}}))})}return this.renderDisposable.value=n,t}getCodeActions(e){return Object(j.f)(t=>Object(G.c)(this._editor.getModel(),new a.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),ie,X.b.None,t))}}re.ID="editor.contrib.modesContentHoverWidget",re._DECORATION_OPTIONS=p.a.register({className:"hoverHighlight"}),Object(x.g)((e,t)=>{const n=e.getColor(k.rc);n&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${n}; }`)});class oe{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const t=i.options.glyphMarginHoverMessage;t&&!Object(f.b)(t)&&n.push(...Object(A.b)(t).map(e))}return n}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class se extends V{constructor(e,t,n=q.b){super(se.ID,e),this._renderDisposeables=this._register(new o.b),this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new z.a(this._editor,t,n)),this._computer=new oe(this._editor),this._hoverOperation=new F(this._computer,e=>this._withResult(e),void 0,e=>this._withResult(e),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const e of t){const t=this._markdownRenderer.render(e.value);this._renderDisposeables.add(t),n.appendChild(Object(d.a)("div.hover-row",void 0,t.element))}this.updateContents(n),this.showAt(e)}}se.ID="editor.contrib.modesGlyphHoverWidget";var ae=n(273),le=n(41),ce=n(223),de=n(9);n.d(t,"ModesHoverController",(function(){return fe}));var ue=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},he=function(e,t){return function(n,i){t(n,i,e)}};let fe=class e{constructor(e,t,n,i,r,s,a){this._editor=e,this._openerService=t,this._modeService=n,this._markerDecorationsService=i,this._keybindingService=r,this._themeService=s,this._toUnhook=new o.b,this._contentWidget=new o.d,this._glyphWidget=new o.d,this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(e=>{e.hasChanged(46)&&(this._hideWidgets(),this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=l.a.hoverVisible.bindTo(a)}get contentWidget(){return this._contentWidget.value||this._createHoverWidgets(),this._contentWidget.value}get glyphWidget(){return this._glyphWidget.value||this._createHoverWidgets(),this._glyphWidget.value}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(46);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(e=>this._onEditorMouseDown(e))),this._toUnhook.add(this._editor.onMouseUp(e=>this._onEditorMouseUp(e))),this._toUnhook.add(this._editor.onMouseMove(e=>this._onEditorMouseMove(e))),this._toUnhook.add(this._editor.onKeyDown(e=>this._onKeyDown(e))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(e)),this._toUnhook.add(this._editor.onKeyDown(e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(e=>this._onEditorScrollChanged(e)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==re.ID?12===t&&e.target.detail===se.ID||(12!==t&&e.target.detail!==se.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){let t=e.target.type;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible()||this._isHoverSticky&&9===t&&e.target.detail===re.ID||this._isHoverSticky&&12===t&&e.target.detail===se.ID)){if(7===t){const n=this._editor.getOption(36).typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToText{n.showContentHover(r,1,!0)}):n.showContentHover(r,1,!0)}}Object(s.m)(fe.ID,fe),Object(s.k)(ge),Object(s.k)(pe),Object(x.g)((e,t)=>{const n=e.getColor(k.H);n&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${n}; }`);const i=e.getColor(k.E);i&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const r=e.getColor(k.F);r&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${r}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${r.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${r.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${r.transparent(.5)}; }`));const o=e.getColor(k.rc);o&&t.addRule(`.monaco-editor .monaco-hover a { color: ${o}; }`);const s=e.getColor(k.G);s&&t.addRule(`.monaco-editor .monaco-hover { color: ${s}; }`);const a=e.getColor(k.I);a&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${a}; }`);const l=e.getColor(k.qc);l&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${l}; }`)})},function(e,t,n){"use strict";n.r(t);n(586);var i=n(0),r=n(20),o=n(8),s=n(19),a=n(39),l=n(2),c=n(4),d=n(6);const u=65535,h=16777215,f=4278190080;class g{constructor(e,t,n){if(e.length!==t.length||e.length>u)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,n)=>{let i=e[e.length-1];return this.getStartLineNumber(i)<=t&&this.getEndLineNumber(i)>=n};for(let n=0,i=this._startIndexes.length;nh||r>h)throw new Error("startLineNumber or endLineNumber must not exceed "+h);for(;e.length>0&&!t(i,r);)e.pop();let o=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=i+((255&o)<<24),this._endIndexes[n]=r+((65280&o)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&h}getEndLineNumber(e){return this._endIndexes[e]&h}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,n=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&f)>>>16);return t===u?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class m{constructor(e,t){this._updateEventEmitter=new d.a,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new g(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort((e,t)=>e.regionIndex-t.regionIndex);const t={};this._decorationProvider.changeDecorations(n=>{let i=0,r=-1,o=-1;const s=e=>{for(;io&&(o=e),i++}};for(let n of e){let e=n.regionIndex,i=this._editorDecorationIds[e];if(i&&!t[i]){t[i]=!0,s(e);let n=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,n),r=Math.max(r,this._regions.getEndLineNumber(e))}}s(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let n=[],i=-1,r=(r,o)=>{const s=e.getStartLineNumber(r),a=e.getEndLineNumber(r);o&&((e,n)=>{for(let i of t)if(ei&&(i=a)},o=0,s=()=>{for(;o=t))break;r(a,n===t),a++}}l=s()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let n of e){let e=this.getRegionAtLine(n.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let i=this._regions.findRange(e),r=1;for(;i>=0;){let e=this._regions.toRegion(i);t&&!t(e,r)||n.push(e),r++,i=e.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],i=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=i,s=this._regions.length;o0&&!i.containedBy(e[e.length-1]);)e.pop();e.push(i),t(i,e.length)&&n.push(i)}}else for(let e=i,o=this._regions.length;e0)for(let o of i){let i=e.getRegionAtLine(o);if(i&&(i.isCollapsed!==t&&r.push(i),n>1)){let o=e.getRegionsInside(i,(e,i)=>e.isCollapsed!==t&&ie.isCollapsed!==t&&ie.isCollapsed!==t&&i<=n);r.push(...i)}e.toggleCollapseState(r)}function v(e,t,n){let i=e.textModel,r=e.regions,o=[];for(let e=r.length-1;e>=0;e--)if(n!==r.isCollapsed(e)){let n=r.getStartLineNumber(e);t.test(i.getLineContent(n))&&o.push(r.toRegion(e))}e.toggleCollapseState(o)}function y(e,t,n){let i=e.regions,r=[];for(let e=i.length-1;e>=0;e--)n!==i.isCollapsed(e)&&t===i.getType(e)&&r.push(i.toRegion(e));e.toggleCollapseState(r)}var w=n(29),C=n(16);const S=Object(C.e)("folding-expanded",C.a.chevronDown),k=Object(C.e)("folding-collapsed",C.a.chevronRight);class x{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?x.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?x.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:x.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?x.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:x.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}x.COLLAPSED_VISUAL_DECORATION=w.a.register({stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:k.classNames}),x.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=w.a.register({stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:k.classNames}),x.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=w.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:S.classNames}),x.EXPANDED_VISUAL_DECORATION=w.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+S.classNames}),x.HIDDEN_RANGE_DECORATION=w.a.register({stickiness:1});var L=n(7),M=n(3),D=n(14);class E{constructor(e){this._updateEventEmitter=new d.a,this._foldingModel=e,this._foldingModelListener=e.onDidChange(e=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],n=0,i=0,r=Number.MAX_VALUE,o=-1,s=this._foldingModel.regions;for(;n({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber}))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==T(this._hiddenRanges,e)}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,i=null,r=e=>(i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=T(this._hiddenRanges,e)),i?i.startLineNumber-1:null);for(let i=0,o=e.length;i0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function T(e,t){let n=Object(D.h)(e,e=>t=0&&e[n].endLineNumber>=t?e[n]:null}var O=n(32);const N=5e3,I="indent";class A{constructor(e){this.editorModel=e,this.id=I}dispose(){}compute(e){let t=O.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&!!t.offSide,i=t&&t.markers;return Promise.resolve(function(e,t,n,i=N){const r=e.getOptions().tabSize;let o=new R(i),s=void 0;n&&(s=new RegExp(`(${n.start.source})|(?:${n.end.source})`));let a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let n=e.getLineCount();n>0;n--){let i,l=e.getLineContent(n),c=w.b.computeIndentLevel(l,r),d=a[a.length-1];if(-1!==c){if(s&&(i=l.match(s))){if(!i[1]){a.push({indent:-2,endAbove:n,line:n});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,d=a[e],o.insertFirst(n,d.line,c),d.line=n,d.indent=c,d.endAbove=n;continue}}}if(d.indent>c){do{a.pop(),d=a[a.length-1]}while(d.indent>c);let e=d.endAbove-1;e-n>=1&&o.insertFirst(n,e,c)}d.indent===c?d.endAbove=n:a.push({indent:c,endAbove:n,line:n})}else t&&(d.endAbove=n)}return o.toIndentRanges(e)}(this.editorModel,n,i))}}class R{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>h||t>h)return;let i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let n=this._length-1,i=0;n>=0;n--,i++)e[i]=this._startIndexes[n],t[i]=this._endIndexes[n];return new g(e,t)}{let t=0,n=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){n=e;break}t+=i}}const i=e.getOptions().tabSize;let r=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit);for(let s=this._length-1,a=0;s>=0;s--){let l=this._startIndexes[s],c=e.getLineContent(l),d=w.b.computeIndentLevel(c,i);(dPromise.resolve(e.provideFoldingRanges(t,B,n)).then(e=>{if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(i)||(i=[]);let n=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=n&&i.push({start:t.start,end:t.end,rank:r,kind:t.kind})}},j.f));return Promise.all(r).then(e=>i)}(this.providers,this.editorModel,e).then(e=>{if(e){return V(e,this.limit)}return null})}dispose(){}}class Y{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,i){if(e>h||t>h)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=i,this._types[r]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let n=0;nthis._foldingRangesLimit){t=n;break}e+=i}}let n=new Uint32Array(this._foldingRangesLimit),i=new Uint32Array(this._foldingRangesLimit),r=[];for(let o=0,s=0;o{let n=e.start-t.start;return 0===n&&(n=e.rank-t.rank),n}),i=new Y(t),r=void 0,o=[];for(let e of n)if(r){if(e.start>r.start)if(e.end<=r.end)o.push(r),r=e,i.add(e.start,e.end,e.kind&&e.kind.value,o.length);else{if(e.start>r.end){do{r=o.pop()}while(r&&e.start>r.end);r&&o.push(r),r=e}i.add(e.start,e.end,e.kind&&e.kind.value,o.length)}}else r=e,i.add(e.start,e.end,e.kind&&e.kind.value,o.length);return i.toIndentRanges()}const z="init";class U{constructor(e,t,n,i){if(this.editorModel=e,this.id=z,t.length){let r=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(r)),this.timeout=setTimeout(n,i)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let n=this.editorModel.getDecorationRange(e);n&&t.push({start:n.startLineNumber,end:n.endLineNumber,rank:1})}return Promise.resolve(V(t,Number.MAX_VALUE))}}var $=n(9),q=n(18),K=n(5);n.d(t,"FoldingController",(function(){return X})),n.d(t,"foldBackgroundBackground",(function(){return ne})),n.d(t,"editorFoldForeground",(function(){return ie}));var G=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Z=function(e,t){return function(n,i){t(n,i,e)}};const J=new $.c("foldingEnabled",!1);let X=class e extends l.a{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new l.b),this.editor=e;const n=this.editor.getOptions();this._isEnabled=n.get(31),this._useFoldingProviders="indentation"!==n.get(32),this._unfoldOnClickAfterEndOfLine=n.get(34),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new x(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===n.get(91),this.foldingDecorationProvider.showFoldingHighlights=n.get(33),this.foldingEnabled=J.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(e=>{if(e.hasChanged(31)&&(this._isEnabled=this.editor.getOptions().get(31),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(91)||e.hasChanged(33)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(91),this.foldingDecorationProvider.showFoldingHighlights=e.get(33),this.onModelContentChanged()}e.hasChanged(32)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(32),this.onFoldingStrategyChanged()),e.hasChanged(34)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(34))})),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||!e.collapsedRegions||e.lineCount!==t.getLineCount())return;e.provider!==W&&e.provider!==z||(this.foldingStateMemento=e);const n=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(n)){const e=this.getFoldingModel();e&&e.then(e=>{e&&e.applyMemento(n)}).then(void 0,j.e)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this.foldingModel=new m(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new E(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(e=>this.onHiddenRangesChanges(e))),this.updateScheduler=new s.a(200),this.cursorChangedScheduler=new s.d(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(P.o.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(e=>this.onEditorMouseDown(e))),this.localToDispose.add(this.editor.onMouseUp(e=>this.onEditorMouseUp(e))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new A(e),this._useFoldingProviders&&this.foldingModel){let t=P.o.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions){return this.rangeProvider=new U(e,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4)}t.length>0&&(this.rangeProvider=new H(e,t))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;let t=this.foldingRegionPromise=Object(s.f)(t=>this.getRangeProvider(e.textModel).compute(t));return t.then(n=>{if(n&&t===this.foldingRegionPromise){let t=this.editor.getSelections(),i=t?t.map(e=>e.startLineNumber):[];e.update(n,i)}return e})}).then(void 0,e=>(Object(j.e)(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let n=[];for(let i of t){let t=i.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&n.push(...e.getAllRegionsAtLine(t,e=>e.isCollapsed&&t>e.startLineNumber))}n.length&&(e.toggleCollapseState(n),this.reveal(t[0].getPosition()))}}}).then(void 0,j.e)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let n=!1;switch(e.target.type){case 4:const i=e.target.detail,r=e.target.element.offsetLeft;if(i.offsetX-r<5)return;n=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){if(!e.target.detail.isAfterLines)break}return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,r=e.target.range;if(r&&r.startLineNumber===n){if(i){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||r.startColumn!==e.getLineMaxColumn(n))return}t.then(t=>{if(t){let r=t.getRegionAtLine(n);if(r&&r.startLineNumber===n){let o=r.isCollapsed;if(i||o){let i=[],s=e.event.middleButton||e.event.shiftKey;if(s)for(const e of t.getRegionsInside(r))e.isCollapsed===o&&i.push(e);!o&&s&&0!==i.length||i.push(r),t.toggleCollapseState(i),this.reveal({lineNumber:n,column:1})}}}}).then(void 0,j.e)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};X.ID="editor.contrib.folding",X=G([Z(1,$.b)],X);class Q extends c.b{runEditorCommand(e,t,n){let i=X.get(t);if(!i)return;let r=i.getFoldingModel();return r?(this.reportTelemetry(e,t),r.then(e=>{if(e){this.invoke(i,e,t,n);const r=t.getSelection();r&&i.reveal(r.getStartPosition())}})):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map(e=>e.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(e=>e+1):this.getSelectedLines(t)}run(e,t){}}function ee(e){if(!r.k(e)){if(!r.i(e))return!1;const t=e;if(!r.k(t.levels)&&!r.h(t.levels))return!1;if(!r.k(t.direction)&&!r.j(t.direction))return!1;if(!(r.k(t.selectionLines)||r.e(t.selectionLines)&&t.selectionLines.every(r.h)))return!1}return!0}class te extends Q{getFoldingLevel(){return parseInt(this.id.substr(te.ID_PREFIX.length))}invoke(e,t,n){!function(e,t,n,i){let r=e.getRegionsInside(null,(e,r)=>r===t&&e.isCollapsed!==n&&!i.some(t=>e.containsLine(t)));e.toggleCollapseState(r)}(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}}te.ID_PREFIX="editor.foldLevel",te.ID=e=>te.ID_PREFIX+e,Object(c.m)(X.ID,X),Object(c.k)(class extends Q{constructor(){super({id:"editor.unfold",label:i.a("unfoldAction.label","Unfold"),alias:"Unfold",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:ee,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,i){let r=i&&i.levels||1,o=this.getLineNumbers(i,n);i&&"up"===i.direction?b(t,!1,r,o):_(t,!1,r,o)}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.unfoldRecursively",label:i.a("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2137),weight:100}})}invoke(e,t,n,i){_(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.fold",label:i.a("foldAction.label","Fold"),alias:"Fold",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:ee,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,i){let r=this.getLineNumbers(i,n);const o=i&&i.levels,s=i&&i.direction;"number"!=typeof o&&"string"!=typeof s?function(e,t,n){let i=[];for(let r of n){let n=e.getAllRegionsAtLine(r,e=>e.isCollapsed!==t);n.length>0&&i.push(n[0])}e.toggleCollapseState(i)}(t,!0,r):"up"===s?b(t,!0,o||1,r):_(t,!0,o||1,r)}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.foldRecursively",label:i.a("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2135),weight:100}})}invoke(e,t,n){let i=this.getSelectedLines(n);_(t,!0,Number.MAX_VALUE,i)}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.foldAll",label:i.a("foldAllAction.label","Fold All"),alias:"Fold All",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2069),weight:100}})}invoke(e,t,n){_(t,!0)}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.unfoldAll",label:i.a("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2088),weight:100}})}invoke(e,t,n){_(t,!1)}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.foldAllBlockComments",label:i.a("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2133),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())y(t,P.n.Comment.value,!0);else{const e=n.getModel();if(!e)return;let i=O.a.getComments(e.getLanguageIdentifier().id);if(i&&i.blockCommentStartToken){v(t,new RegExp("^\\s*"+Object(o.v)(i.blockCommentStartToken)),!0)}}}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.foldAllMarkerRegions",label:i.a("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2077),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())y(t,P.n.Region.value,!0);else{const e=n.getModel();if(!e)return;let i=O.a.getFoldingRules(e.getLanguageIdentifier().id);if(i&&i.markers&&i.markers.start){v(t,new RegExp(i.markers.start),!0)}}}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:i.a("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2078),weight:100}})}invoke(e,t,n){if(t.regions.hasTypes())y(t,P.n.Region.value,!1);else{const e=n.getModel();if(!e)return;let i=O.a.getFoldingRules(e.getLanguageIdentifier().id);if(i&&i.markers&&i.markers.start){v(t,new RegExp(i.markers.start),!1)}}}}),Object(c.k)(class extends Q{constructor(){super({id:"editor.toggleFold",label:i.a("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:J,kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(a.a)(2089,2090),weight:100}})}invoke(e,t,n){!function(e,t,n){let i=[];for(let r of n){let n=e.getRegionAtLine(r);if(n){const r=!n.isCollapsed;if(i.push(n),t>1){let o=e.getRegionsInside(n,(e,n)=>e.isCollapsed!==r&&n{const n=e.getColor(ne);n&&t.addRule(`.monaco-editor .folded-background { background-color: ${n}; }`);const i=e.getColor(ie);i&&t.addRule(`\n\t\t.monaco-editor .cldr${S.cssSelector},\n\t\t.monaco-editor .cldr${k.cssSelector} {\n\t\t\tcolor: ${i} !important;\n\t\t}\n\t\t`)})},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(39),o=n(90),s=n(4),a=n(51),l=n(8),c=n(60),d=n(3);class u{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=function(e,t){t.sort((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber);for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let n=[],i=0,r=0,o=t.length;for(let s=1,a=e.getLineCount();s<=a;s++){let a=e.getLineContent(s),u=a.length+1,h=0;if(re.getLineTokens(t),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(t,n)=>e.getLanguageIdAtPosition(t,n),getLineContent:null};if(i.startLineNumber===i.endLineNumber&&1===e.getLineMaxColumn(i.startLineNumber)){let n=i.startLineNumber,r=this._isMovingDown?n+1:n-1;1===e.getLineMaxColumn(r)?t.addEditOperation(new d.a(1,1,1,1),null):(t.addEditOperation(new d.a(n,1,n,1),e.getLineContent(r)),t.addEditOperation(new d.a(r,1,r,e.getLineMaxColumn(r)),null)),i=new g.a(r,1,r,1)}else{let n,o;if(this._isMovingDown){n=i.endLineNumber+1,o=e.getLineContent(n),t.addEditOperation(new d.a(n-1,e.getLineMaxColumn(n-1),n,e.getLineMaxColumn(n)),null);let u=o;if(this.shouldAutoIndent(e,i)){let h=this.matchEnterRule(e,a,r,n,i.startLineNumber-1);if(null!==h){let t=l.z(e.getLineContent(n)),i=h+y.b(t,r),a=y.a(i,r,s);u=a+this.trimLeft(o)}else{c.getLineContent=t=>t===i.startLineNumber?e.getLineContent(n):e.getLineContent(t);let t=v.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n,1),i.startLineNumber,a);if(null!==t){let i=l.z(e.getLineContent(n)),a=y.b(t,r);if(a!==y.b(i,r)){let e=y.a(a,r,s);u=e+this.trimLeft(o)}}}t.addEditOperation(new d.a(i.startLineNumber,1,i.startLineNumber,1),u+"\n");let f=this.matchEnterRule(e,a,r,i.startLineNumber,i.startLineNumber,u);if(null!==f)0!==f&&this.getIndentEditsOfMovingBlock(e,t,i,r,s,f);else{c.getLineContent=t=>t===i.startLineNumber?u:t>=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let o=v.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n,1),i.startLineNumber+1,a);if(null!==o){const n=l.z(e.getLineContent(i.startLineNumber)),a=y.b(o,r),c=y.b(n,r);if(a!==c){const n=a-c;this.getIndentEditsOfMovingBlock(e,t,i,r,s,n)}}}}else t.addEditOperation(new d.a(i.startLineNumber,1,i.startLineNumber,1),u+"\n")}else if(n=i.startLineNumber-1,o=e.getLineContent(n),t.addEditOperation(new d.a(n,1,n+1,1),null),t.addEditOperation(new d.a(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this.shouldAutoIndent(e,i)){c.getLineContent=t=>t===n?e.getLineContent(i.startLineNumber):e.getLineContent(t);let o=this.matchEnterRule(e,a,r,i.startLineNumber,i.startLineNumber-2);if(null!==o)0!==o&&this.getIndentEditsOfMovingBlock(e,t,i,r,s,o);else{let o=v.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(i.startLineNumber,1),n,a);if(null!==o){let n=l.z(e.getLineContent(i.startLineNumber)),a=y.b(o,r),c=y.b(n,r);if(a!==c){let n=a-c;this.getIndentEditsOfMovingBlock(e,t,i,r,s,n)}}}}}this._selectionId=t.trackSelection(i)}buildIndentConverter(e,t,n){return{shiftIndent:i=>_.a.shiftIndent(i,i.length+1,e,t,n),unshiftIndent:i=>_.a.unshiftIndent(i,i.length+1,e,t,n)}}matchEnterRule(e,t,n,i,r,o){let s=r;for(;s>=1;){let t;if(t=s===r&&void 0!==o?o:e.getLineContent(s),l.J(t)>=0)break;s--}if(s<1||i>e.getLineCount())return null;let a=e.getLineMaxColumn(s),c=v.a.getEnterAction(this._autoIndent,e,new d.a(s,a,s,a));if(c){let r=c.indentation;c.indentAction===b.a.None?r=c.indentation+c.appendText:c.indentAction===b.a.Indent?r=c.indentation+c.appendText:c.indentAction===b.a.IndentOutdent?r=c.indentation:c.indentAction===b.a.Outdent&&(r=t.unshiftIndent(c.indentation)+c.appendText);let o=e.getLineContent(i);if(this.trimLeft(o).indexOf(this.trimLeft(r))>=0){let o=l.z(e.getLineContent(i)),s=l.z(r),a=v.a.getIndentMetadata(e,i);return null!==a&&2&a&&(s=t.unshiftIndent(s)),y.b(s,n)-y.b(o,n)}}return null}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==v.a.getIndentRulesSupport(n)}getIndentEditsOfMovingBlock(e,t,n,i,r,o){for(let s=n.startLineNumber;s<=n.endLineNumber;s++){let a=e.getLineContent(s),c=l.z(a),u=y.b(c,i)+o,h=y.a(u,i,r);h!==c&&(t.addEditOperation(new d.a(s,1,s,c.length+1),h),s===n.endLineNumber&&n.endColumn<=c.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=r)return null;let o=[];for(let t=i;t<=r;t++)o.push(e.getLineContent(t));let s=o.slice(0);return s.sort(C.getCollator().compare),!0===n&&(s=s.reverse()),{startLineNumber:i,endLineNumber:r,before:o,after:s}}C._COLLATOR=null;var k=n(25);n.d(t,"DuplicateSelectionAction",(function(){return L})),n.d(t,"AbstractSortLinesAction",(function(){return D})),n.d(t,"SortLinesAscendingAction",(function(){return E})),n.d(t,"SortLinesDescendingAction",(function(){return T})),n.d(t,"TrimTrailingWhitespaceAction",(function(){return O})),n.d(t,"DeleteLinesAction",(function(){return N})),n.d(t,"IndentLinesAction",(function(){return I})),n.d(t,"InsertLineBeforeAction",(function(){return R})),n.d(t,"InsertLineAfterAction",(function(){return P})),n.d(t,"AbstractDeleteAllToBoundaryAction",(function(){return j})),n.d(t,"DeleteAllLeftAction",(function(){return F})),n.d(t,"DeleteAllRightAction",(function(){return B})),n.d(t,"JoinLinesAction",(function(){return W})),n.d(t,"TransposeAction",(function(){return H})),n.d(t,"AbstractCaseAction",(function(){return Y})),n.d(t,"UpperCaseAction",(function(){return V})),n.d(t,"LowerCaseAction",(function(){return z})),n.d(t,"TitleCaseAction",(function(){return U}));class x extends s.b{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const n=t.getSelections().map((e,t)=>({selection:e,index:t,ignore:!1}));n.sort((e,t)=>d.a.compareRangesUsingStarts(e.selection,t.selection));let i=n[0];for(let e=1;enew f.a(e.positionLineNumber,e.positionColumn)));let r=t.getSelection();if(null===r)return;let o=new u(r,i);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}O.ID="editor.action.trimTrailingWhitespace";class N extends s.b{constructor(){super({id:"editor.action.deleteLines",label:i.a("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.a.writable,kbOpts:{kbExpr:p.a.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let r=0,o=[],s=[];for(let e=0,t=n.length;e1&&(a-=1,d=i.getLineMaxColumn(a)),o.push(c.a.replace(new g.a(a,d,l,u),"")),s.push(new g.a(a-r,t.positionColumn,a-r,t.positionColumn)),r+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,s),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let n=[],i=t[0];for(let e=1;e=t[e].startLineNumber?i.endLineNumber=t[e].endLineNumber:(n.push(i),i=t[e]);return n.push(i),n}}class I extends s.b{constructor(){super({id:"editor.action.indentLines",label:i.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:2137,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class A extends s.b{constructor(){super({id:"editor.action.outdentLines",label:i.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:2135,weight:100}})}run(e,t){o.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class R extends s.b{constructor(){super({id:"editor.action.insertLineBefore",label:i.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:3075,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}class P extends s.b{constructor(){super({id:"editor.action.insertLineAfter",label:i.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:2051,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}class j extends s.b{run(e,t){if(!t.hasModel())return;const n=t.getSelection();let i=this._getRangesToDelete(t),r=[];for(let e=0,t=i.length-1;ec.a.replace(e,""));t.pushUndoStop(),t.executeEdits(this.id,s,o),t.pushUndoStop()}}class F extends j{constructor(){super({id:"deleteAllLeft",label:i.a("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.a.writable,kbOpts:{kbExpr:p.a.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,i=[],r=0;return t.forEach(t=>{let o;if(1===t.endColumn&&r>0){let e=t.startLineNumber-r;o=new g.a(e,t.startColumn,e,t.startColumn)}else o=new g.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);r+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=o:i.push(o)}),n&&i.unshift(n),i}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let n=t,i=e.getModel();return null===i?[]:(n.sort(d.a.compareRangesUsingStarts),n=n.map(e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:i.getLineContent(t).length+1;return new d.a(t,n,e.startLineNumber,1)}return new d.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new d.a(e.startLineNumber,1,e.endLineNumber,e.endColumn)}))}}class B extends j{constructor(){super({id:"deleteAllRight",label:i.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.a.writable,kbOpts:{kbExpr:p.a.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,i=[];for(let r=0,o=t.length,s=0;r{if(e.isEmpty()){const n=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===n?new d.a(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new d.a(e.startLineNumber,e.startColumn,e.startLineNumber,n)}return e});return i.sort(d.a.compareRangesUsingStarts),i}}class W extends s.b{constructor(){super({id:"editor.action.joinLines",label:i.a("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(null===n)return;let i=t.getSelection();if(null===i)return;n.sort(d.a.compareRangesUsingStarts);let r=[],o=n.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(i.equalsSelection(e)&&(i=t),t):t.startLineNumber>e.endLineNumber+1?(r.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(r.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));r.push(o);let s=t.getModel();if(null===s)return;let a=[],l=[],u=i,h=0;for(let e=0,t=r.length;e=1){let e=!0;""===b&&(e=!1),!e||" "!==b.charAt(b.length-1)&&"\t"!==b.charAt(b.length-1)||(e=!1,b=b.replace(/[\s\uFEFF\xA0]+$/g," "));let i=t.substr(n-1);b+=(e?" ":"")+i,m=e?i.length+1:i.length}else m=0}let v=new d.a(f,p,t,n);if(!v.isEmpty()){let e;o.isEmpty()?(a.push(c.a.replace(v,b)),e=new g.a(v.startLineNumber-h,b.length-m+1,f-h,b.length-m+1)):o.startLineNumber===o.endLineNumber?(a.push(c.a.replace(v,b)),e=new g.a(o.startLineNumber-h,o.startColumn,o.endLineNumber-h,o.endColumn)):(a.push(c.a.replace(v,b)),e=new g.a(o.startLineNumber-h,o.startColumn,o.startLineNumber-h,b.length-_)),null!==d.a.intersectRanges(v,i)?u=e:l.push(e)}h+=v.endLineNumber-v.startLineNumber}l.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class H extends s.b{constructor(){super({id:"editor.action.transpose",label:i.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:p.a.writable})}run(e,t){let n=t.getSelections();if(null===n)return;let i=t.getModel();if(null===i)return;let r=[];for(let e=0,t=n.length;e=s){if(o.lineNumber===i.getLineCount())continue;let e=new d.a(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=i.getValueInRange(e).split("").reverse().join("");r.push(new a.a(new g.a(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{let e=new d.a(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=i.getValueInRange(e).split("").reverse().join("");r.push(new a.b(e,t,new g.a(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class Y extends s.b{run(e,t){let n=t.getSelections();if(null===n)return;let i=t.getModel();if(null===i)return;let r=t.getOption(105),o=[];for(let e=0,s=n.length;e=0?(r=!0,i+=o):r?(r=!1,i+=o.toLocaleUpperCase()):i+=o.toLocaleLowerCase()}return i}}Object(s.k)(class extends x{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:i.a("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:k.b.MenubarSelectionMenu,group:"2_line",title:i.a({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),Object(s.k)(class extends x{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:i.a("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:k.b.MenubarSelectionMenu,group:"2_line",title:i.a({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),Object(s.k)(L),Object(s.k)(class extends M{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:i.a("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:k.b.MenubarSelectionMenu,group:"2_line",title:i.a({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),Object(s.k)(class extends M{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:i.a("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.a.writable,kbOpts:{kbExpr:p.a.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:k.b.MenubarSelectionMenu,group:"2_line",title:i.a({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),Object(s.k)(E),Object(s.k)(T),Object(s.k)(O),Object(s.k)(N),Object(s.k)(I),Object(s.k)(A),Object(s.k)(R),Object(s.k)(P),Object(s.k)(F),Object(s.k)(B),Object(s.k)(W),Object(s.k)(H),Object(s.k)(V),Object(s.k)(z),Object(s.k)(U)},function(e,t,n){"use strict";n.r(t);var i,r=n(46),o=n(127),s=n(44),a=n(33),l=n(0),c=n(26),d=n(2),u=n(19),h=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function f(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(i||(i={}));class g extends d.a{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var n;const r=new d.b;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=void 0;const s=r.add(new d.d),a=()=>h(this,void 0,void 0,(function*(){const n=s.value=new d.b;null==o||o.dispose(!0),e.busy=!1;const i=(o=new c.b(t)).token,r=e.value.substr(this.prefix.length).trim(),a=this.getPicks(r,n,i),l=(t,n)=>{var i;let o,s=void 0;if(f(t)?(o=t.items,s=t.active):o=t,0===o.length){if(n)return!1;r.length>0&&(null===(i=this.options)||void 0===i?void 0:i.noResultsPick)&&(o=[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0};if(null===a);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(a)){let t=!1,n=!1;yield Promise.all([(()=>h(this,void 0,void 0,(function*(){yield Object(u.l)(g.FAST_PICKS_RACE_DELAY),i.isCancellationRequested||n||(t=l(a.picks,!0))})))(),(()=>h(this,void 0,void 0,(function*(){e.busy=!0;try{const r=yield a.additionalPicks;if(i.isCancellationRequested)return;let o,s,c=void 0;f(a.picks)?(o=a.picks.items,c=a.picks.active):o=a.picks;let d=void 0;if(f(r)?(s=r.items,d=r.active):s=r,s.length>0||!t){let t=void 0;if(!c&&!d){const n=e.activeItems[0];n&&-1!==o.indexOf(n)&&(t=n)}l({items:[...o,...s],active:c||d||t})}}finally{i.isCancellationRequested||(e.busy=!1),n=!0}})))()])}else if(a instanceof Promise){e.busy=!0;try{const t=yield a;if(i.isCancellationRequested)return;l(t)}finally{i.isCancellationRequested||(e.busy=!1)}}else l(a)}));return r.add(e.onDidChangeValue(()=>a())),a(),r.add(e.onDidAccept(t=>{const[n]=e.selectedItems;"function"==typeof(null==n?void 0:n.accept)&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))})),r.add(e.onDidTriggerItemButton(({button:n,item:r})=>h(this,void 0,void 0,(function*(){var o,s;if("function"==typeof r.trigger){const l=null!==(s=null===(o=r.buttons)||void 0===o?void 0:o.indexOf(n))&&void 0!==s?s:-1;if(l>=0){const n=r.trigger(l,e.keyMods),o="number"==typeof n?n:yield n;if(t.isCancellationRequested)return;switch(o){case i.NO_ACTION:break;case i.CLOSE_PICKER:e.hide();break;case i.REFRESH_PICKER:a();break;case i.REMOVE_ITEM:const t=e.items.indexOf(r);if(-1!==t){const n=e.items.slice();n.splice(t,1),e.items=n}}}}})))),r}}g.FAST_PICKS_RACE_DELAY=200;var p=n(61),m=n(20),_=n(65),b=n(87),v=n(43),y=n(17),w=n(41),C=n(28),S=n(108),k=n(15),x=n(40),L=n(14);function M(e,t){return t&&(e.stack||e.stacktrace)?l.a("stackTrace.format","{0}: {1}",E(e),D(e.stack)||D(e.stacktrace)):E(e)}function D(e){return Array.isArray(e)?e.join("\n"):e}function E(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?l.a("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||l.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function T(e=null,t=!1){if(!e)return l.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const n=L.d(e),i=T(n[0],t);return n.length>1?l.a("error.moreErrors","{0} ({1} errors in total)",i,n.length):i}if(m.j(e))return e;if(e.detail){const n=e.detail;if(n.error)return M(n.error,t);if(n.exception)return M(n.exception,t)}return e.stack?M(e,t):e.message?e.message:l.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var O=n(185),N=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},I=function(e,t){return function(n,i){t(n,i,e)}},A=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let R=class e extends g{constructor(t,n,i,r,o,s){super(e.PREFIX,t),this.options=t,this.instantiationService=n,this.keybindingService=i,this.commandService=r,this.telemetryService=o,this.notificationService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(P))}getPicks(t,n,i){return A(this,void 0,void 0,(function*(){const r=yield this.getCommandPicks(n,i);if(i.isCancellationRequested)return[];const o=[];for(const n of r){const i=Object(m.n)(e.WORD_FILTER(t,n.label)),r=n.commandAlias?Object(m.n)(e.WORD_FILTER(t,n.commandAlias)):void 0;i||r?(n.highlights={label:i,detail:this.options.showAlias?r:void 0},o.push(n)):t===n.commandId&&o.push(n)}const s=new Map;for(const e of o){const t=s.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):s.set(e.label,e)}o.sort((e,t)=>{const n=this.commandsHistory.peek(e.commandId),i=this.commandsHistory.peek(t.commandId);return n&&i?n>i?-1:1:n?-1:i?1:e.label.localeCompare(t.label)});const a=[];let c=!1;for(let e=0;eA(this,void 0,void 0,(function*(){this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){Object(k.d)(e)||this.notificationService.error(Object(l.a)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,T(e)))}}))}))}return a}))}};R.PREFIX=">",R.WORD_FILTER=Object(p.j)(p.h,p.i,p.f),R=N([I(1,y.a),I(2,w.a),I(3,C.b),I(4,S.a),I(5,x.a)],R);let P=class e extends d.a{constructor(t,n,i){super(),this.storageService=t,this.configurationService=n,this.configuredCommandsHistoryLength=0,i.registerStorageKey({key:e.PREF_KEY_CACHE,version:1}),i.registerStorageKey({key:e.PREF_KEY_COUNTER,version:1}),this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let n;if(t)try{n=JSON.parse(t)}catch(e){}const i=e.cache=new _.a(this.configuredCommandsHistoryLength,1);if(n){let e;(e=n.usesLRU?n.entries:n.entries.sort((e,t)=>e.value-t.value)).forEach(e=>i.set(e.key,e.value))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var n;return null===(n=e.cache)||void 0===n?void 0:n.peek(t)}static saveState(t){if(!e.cache)return;const n={usesLRU:!0,entries:[]};e.cache.forEach((e,t)=>n.entries.push({key:t,value:e})),t.store(e.PREF_KEY_CACHE,JSON.stringify(n),0),t.store(e.PREF_KEY_COUNTER,e.counter,0)}static getConfiguredCommandHistoryLength(t){var n,i;const r=null===(i=null===(n=t.getValue().workbench)||void 0===n?void 0:n.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof r?r:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};P.DEFAULT_COMMANDS_HISTORY_LENGTH=50,P.PREF_KEY_CACHE="commandPalette.mru.cache",P.PREF_KEY_COUNTER="commandPalette.mru.counter",P.counter=1,P=N([I(0,b.a),I(1,v.a),I(2,O.a)],P);var j=n(16);class F extends R{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:Object(j.h)(n.label)||n.id});return t}}var B=n(4),W=n(7),H=n(97);n.d(t,"StandaloneCommandsQuickAccessProvider",(function(){return z})),n.d(t,"GotoLineAction",(function(){return U}));var Y=function(e,t){return function(n,i){t(n,i,e)}},V=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let z=class extends F{constructor(e,t,n,i,r,o){super({showAlias:!1},e,n,i,r,o),this.codeEditorService=t}get activeTextEditorControl(){return Object(m.n)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return V(this,void 0,void 0,(function*(){return this.getCodeEditorCommandPicks()}))}};z=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Y(0,y.a),Y(1,a.a),Y(2,w.a),Y(3,C.b),Y(4,S.a),Y(5,x.a)],z),r.a.as(o.b.Quickaccess).registerQuickAccessProvider({ctor:z,prefix:z.PREFIX,helpEntries:[{description:s.d.quickCommandHelp,needsEditor:!0}]});class U extends B.b{constructor(){super({id:"editor.action.quickCommand",label:s.d.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.a.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(H.a).quickAccess.show(z.PREFIX)}}Object(B.k)(U)},function(e,t,n){"use strict";n.r(t);var i=n(19),r=n(15),o=n(2),s=n(76),a=n(4),l=n(11),c=n(14),d=n(26),u=n(24),h=n(54);class f{constructor(){this.lenses=[],this._disposables=new o.b}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function g(e,t){const n=l.b.ordered(e),i=new Map,o=new f,s=n.map((n,s)=>(i.set(n,s),Promise.resolve(n.provideCodeLenses(e,t)).then(e=>e&&o.add(e,n)).catch(r.f)));return Promise.all(s).then(()=>(o.lenses=Object(c.p)(o.lenses,(e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0),o))}Object(a.o)("_executeCodeLensProvider",(function(e,t){let{resource:n,itemResolveCount:i}=t;if(!(n instanceof u.a))throw Object(r.b)();const s=e.get(h.a).getModel(n);if(!s)throw Object(r.b)();const a=[],l=new o.b;return g(s,d.a.None).then(e=>{l.add(e);let t=[];for(const n of e.lenses)void 0===i||Boolean(n.symbol.command)?a.push(n.symbol):i-- >0&&n.provider.resolveCodeLens&&t.push(Promise.resolve(n.provider.resolveCodeLens(s,n.symbol,d.a.None)).then(e=>a.push(e||n.symbol)));return Promise.all(t)}).then(()=>a).finally(()=>{setTimeout(()=>l.dispose(),100)})}));n(579);var p=n(16),m=n(8),_=n(3),b=n(29),v=n(47),y=n(5),w=n(18);class C{constructor(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class S{constructor(e,t,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${S._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let n="",i=!1;for(let t=0;t${i}`,this._commands.set(String(t),r.command)):n+=`${i}`,t+1 | ")}}i?(n||(n=" "),this._domNode.innerHTML=n,this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):this._domNode.innerHTML="no commands"}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}S._idPool=0;class k{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let e=0,n=t.length;e{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:b.a.EMPTY},e=>this._decorationIds[t]=e),s=s?_.a.plusRange(s,e.symbol.range):_.a.lift(e.symbol.range)}),this._viewZone=new C(s.startLineNumber-1,o),this._viewZoneId=r.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget||(this._contentWidget=new S(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!(!n||_.a.isEmpty(i.range)!==n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((e,n)=>{t.addDecoration({range:e.symbol.range,options:b.a.EMPTY},e=>this._decorationIds[n]=e)})}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t{const n=e.getColor(v.e);n&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${n}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${n}; }`));const i=e.getColor(y.r);i&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${i} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${i} !important; }`))});var L=n(28),M=n(40),D=n(17),E=n(103),T=n(65),O=n(87),N=n(126),I=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},A=function(e,t){return function(n,i){t(n,i,e)}};const R=Object(D.c)("ICodeLensCache");class P{constructor(e,t){this.lineCount=e,this.data=t}}let j=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new T.a(20,.75);Object(i.k)(()=>e.remove("codelens/cache",1));const t="codelens/cache2",n=e.get(t,1,"{}");this._deserialize(n),Object(N.a)(e.onWillSaveState)(n=>{n.reason===O.c.SHUTDOWN&&e.store(t,this._serialize(),1)})}put(e,t){const n=t.lenses.map(e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}}),i=new f;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new P(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const e of n.data.lenses)i.add(e.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const n=t[e],i=[];for(const e of n.lines)i.push({range:new _.a(e,1,e,11)});const r=new f;r.add({lenses:i,dispose(){}},this._fakeProvider),this._cache.set(e,new P(n.lineCount,r))}}catch(e){}}};j=I([A(0,O.a)],j),Object(E.b)(R,j);var F=n(1),B=n(168),W=n(97),H=n(0),Y=n(7);n.d(t,"CodeLensContribution",(function(){return $}));var V=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},z=function(e,t){return function(n,i){t(n,i,e)}},U=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let $=class{constructor(e,t,n,i){this._editor=e,this._commandService=t,this._notificationService=n,this._codeLensCache=i,this._globalToDispose=new o.b,this._localToDispose=new o.b,this._lenses=[],this._oldCodeLensModels=new o.b,this._modelChangeCounter=0,this._isEnabled=this._editor.getOption(11),this._globalToDispose.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._globalToDispose.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._globalToDispose.add(this._editor.onDidChangeConfiguration(()=>{const e=this._isEnabled;this._isEnabled=this._editor.getOption(11),e!==this._isEnabled&&this._onModelChange()})),this._globalToDispose.add(l.b.onDidChange(this._onModelChange,this)),this._globalToDispose.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this._updateLensStyle()})),this._onModelChange(),this._styleClassName="_"+Object(B.b)(this._editor.getId()).toString(16),this._styleElement=F.v(F.O(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){this._localDispose(),this._globalToDispose.dispose(),this._oldCodeLensModels.dispose(),Object(o.f)(this._currentCodeLensModel)}_updateLensStyle(){const e=this._editor.getOptions(),t=e.get(36),n=e.get(51),i=Math.round(1.1*n),r=Math.round(.9*t.fontSize),o=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { height: ${i}px; line-height: ${n}px; font-size: ${r}px; padding-right: ${Math.round(.45*t.fontSize)}px;}\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} > a > .codicon { line-height: ${n}px; font-size: ${r}px; }\n\t\t`;this._styleElement.textContent=o}_localDispose(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=void 0,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=void 0),this._localToDispose.clear(),this._oldCodeLensModels.clear(),Object(o.f)(this._currentCodeLensModel)}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._isEnabled)return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!l.b.has(e))return void(t&&this._localToDispose.add(Object(i.g)(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},3e4)));for(const t of l.b.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange(()=>a.schedule());this._localToDispose.add(e)}const n=this._detectVisibleLenses=new i.d(()=>this._onViewportChanged(),250),a=new i.d(()=>{const t=++this._modelChangeCounter;this._currentFindCodeLensSymbolsPromise&&this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=Object(i.f)(t=>g(e,t)),this._currentFindCodeLensSymbolsPromise.then(i=>{t===this._modelChangeCounter&&(this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=i,this._codeLensCache.put(e,i),this._renderCodeLensSymbols(i),n.schedule())},r.e)},250);this._localToDispose.add(a),this._localToDispose.add(n),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{let n=[],i=-1;this._lenses.forEach(e=>{e.isValid()&&i!==e.getLineNumber()?(e.update(t),i=e.getLineNumber()):n.push(e)});let r=new k;n.forEach(e=>{e.dispose(r,t),this._lenses.splice(this._lenses.indexOf(e),1)}),r.commit(e)})}),n.schedule(),a.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(e=>{e.scrollTopChanged&&this._lenses.length>0&&n.schedule()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{n.schedule()})),this._localToDispose.add(Object(o.h)(()=>{if(this._editor.getModel()){const e=s.c.capture(this._editor);this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{this._disposeAllLenses(e,t)})}),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseUp(e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let n=e.getCommand(t);if(n){this._commandService.executeCommand(n.id,...n.arguments||[]).catch(e=>this._notificationService.error(e));break}}})),a.schedule()}_disposeAllLenses(e,t){const n=new k;for(const e of this._lenses)e.dispose(n,t);e&&n.commit(e),this._lenses=[]}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,n=this._editor.getModel().getLineCount(),i=[];for(let r of e.lenses){let e=r.symbol.range.startLineNumber;e<1||e>n||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(r):(t=[r],i.push(t)))}const r=s.c.capture(this._editor);this._editor.changeDecorations(e=>{this._editor.changeViewZones(t=>{const n=new k;let r=0,o=0;for(;othis._detectVisibleLenses&&this._detectVisibleLenses.schedule())),r++,o++)}for(;rthis._detectVisibleLenses&&this._detectVisibleLenses.schedule())),o++;n.commit(e)})}),r.restore(this._editor)}_onViewportChanged(){this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=void 0);const e=this._editor.getModel();if(!e)return;const t=[],n=[];if(this._lenses.forEach(i=>{const r=i.computeIfNecessary(e);r&&(t.push(r),n.push(i))}),0===t.length)return;const o=Object(i.f)(i=>{const o=t.map((t,o)=>{const s=new Array(t.length),a=t.map((t,n)=>t.symbol.command||"function"!=typeof t.provider.resolveCodeLens?(s[n]=t.symbol,Promise.resolve(void 0)):Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,i)).then(e=>{s[n]=e},r.f));return Promise.all(a).then(()=>{i.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)})});return Promise.all(o)});this._currentResolveCodeLensSymbolsPromise=o,this._currentResolveCodeLensSymbolsPromise.then(()=>{this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise=void 0)},e=>{Object(r.e)(e),o===this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise=void 0)})}getLenses(){return this._lenses}};$.ID="css.editor.codeLens",$=V([z(1,L.b),z(2,M.a),z(3,R)],$),Object(a.m)($.ID,$),Object(a.k)(class extends a.b{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Y.a.hasCodeLensProvider,label:Object(H.a)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return U(this,void 0,void 0,(function*(){if(!t.hasModel())return;const n=e.get(W.a),i=e.get(L.b),r=e.get(M.a),o=t.getSelection().positionLineNumber,s=t.getContribution($.ID),a=[];for(let e of s.getLenses())if(e.getLineNumber()===o)for(let t of e.getItems()){const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=yield n.pick(a,{canPickMany:!1});if(l)try{yield i.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){r.error(e)}}))}})},function(e,t,n){"use strict";n.r(t);var i=n(14),r=n(26),o=n(39),s=n(2),a=n(4),l=n(33),c=n(111),d=n(3),u=n(7),h=n(11),f=n(88),g=n(55),p=n(15),m=n(24),_=n(76),b=n(100),v=n(10),y=n(22),w=n(54),C=n(60);class S{static _handleEolEdits(e,t){let n=void 0,i=[];for(let e of t)"number"==typeof e.eol&&(n=e.eol),e.range&&"string"==typeof e.text&&i.push(e);return"number"==typeof n&&e.hasModel()&&e.getModel().pushEOL(n),i}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const n=e.getModel(),i=n.validateRange(t.range);return n.getFullModelRange().equalsRange(i)}static execute(e,t,n){n&&e.pushUndoStop();const i=S._handleEolEdits(e,t);1===i.length&&S._isFullModelReplaceEdit(e,i[0])?e.executeEdits("formatEditsCommand",i.map(e=>C.a.replace(d.a.lift(e.range),e.text))):e.executeEdits("formatEditsCommand",i.map(e=>C.a.replaceMove(d.a.lift(e.range),e.text))),n&&e.pushUndoStop()}}var k=n(0);class x{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var L=n(17),M=n(84),D=n(28),E=n(20),T=n(38),O=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function N(e){if(!(e=e.filter(e=>e.range)).length)return;let{range:t}=e[0];for(let n=1;ne.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),n,i)})}return t}class A{static select(e,t,n){return O(this,void 0,void 0,(function*(){if(0===e.length)return;const i=T.a.first(A._selectors);return i?yield i(e,t,n):e[0]}))}}function R(e,t,n,i,r,o){return O(this,void 0,void 0,(function*(){const s=e.get(L.a),a=Object(b.b)(t)?t.getModel():t,l=h.j.ordered(a),c=yield A.select(l,a,i);c&&(r.report(c),yield s.invokeFunction(P,c,t,n,o))}))}function P(e,t,n,r,o){return O(this,void 0,void 0,(function*(){const s=e.get(f.a);let a,l;Object(b.b)(n)?(a=n.getModel(),l=new _.b(n,5,void 0,o)):(a=n,l=new _.d(n,o));let c=[],u=0;for(let e of Object(i.b)(r).sort(d.a.compareRangesUsingStarts))u>0&&d.a.areIntersectingOrTouching(c[u-1],e)?c[u-1]=d.a.fromPositions(c[u-1].getStartPosition(),e.getEndPosition()):u=c.push(e);const h=[];for(let e of c)try{const n=yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),l.token),i=yield s.computeMoreMinimalEdits(a.uri,n);if(i&&h.push(...i),l.token.isCancellationRequested)return!0}finally{l.dispose()}if(0===h.length)return!1;if(Object(b.b)(n))S.execute(n,h,!0),N(h),n.revealPositionInCenterIfOutsideViewport(n.getPosition(),1);else{const[{range:e}]=h,t=new y.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);a.pushEditOperations([t],h.map(e=>({text:e.text,range:d.a.lift(e.range),forceMoveMarkers:!0})),e=>{for(const{range:n}of e)if(d.a.areIntersectingOrTouching(n,t))return[new y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)];return null})}return!0}))}function j(e,t,n,i,r){return O(this,void 0,void 0,(function*(){const o=e.get(L.a),s=Object(b.b)(t)?t.getModel():t,a=I(s),l=yield A.select(a,s,n);l&&(i.report(l),yield o.invokeFunction(F,l,t,n,r))}))}function F(e,t,n,i,r){return O(this,void 0,void 0,(function*(){const o=e.get(f.a);let s,a,l;Object(b.b)(n)?(s=n.getModel(),a=new _.b(n,5,void 0,r)):(s=n,a=new _.d(n,r));try{const e=yield t.provideDocumentFormattingEdits(s,s.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(s.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if(Object(b.b)(n))S.execute(n,l,2!==i),2!==i&&(N(l),n.revealPositionInCenterIfOutsideViewport(n.getPosition(),1));else{const[{range:e}]=l,t=new y.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);s.pushEditOperations([t],l.map(e=>({text:e.text,range:d.a.lift(e.range),forceMoveMarkers:!0})),e=>{for(const{range:n}of e)if(d.a.areIntersectingOrTouching(n,t))return[new y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)];return null})}return!0}))}function B(e,t,n,i,o){const s=h.t.ordered(t);return 0===s.length?Promise.resolve(void 0):s[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(s[0].provideOnTypeFormattingEdits(t,n,i,o,r.a.None)).catch(p.f).then(n=>e.computeMoreMinimalEdits(t.uri,n))}A._selectors=new M.a,D.a.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[n,o,s]=t;Object(E.b)(m.a.isUri(n)),Object(E.b)(d.a.isIRange(o));const a=e.get(w.a).getModel(n);if(!a)throw Object(p.b)("resource");return function(e,t,n,r,o){return O(this,void 0,void 0,(function*(){const s=h.j.ordered(t);for(const a of s){let s=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,r,o)).catch(p.f);if(Object(i.o)(s))return yield e.computeMoreMinimalEdits(t.uri,s)}}))}(e.get(f.a),a,d.a.lift(o),s,r.a.None)})),D.a.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[n,o]=t;Object(E.b)(m.a.isUri(n));const s=e.get(w.a).getModel(n);if(!s)throw Object(p.b)("resource");return function(e,t,n,r){return O(this,void 0,void 0,(function*(){const o=I(t);for(const s of o){let o=yield Promise.resolve(s.provideDocumentFormattingEdits(t,n,r)).catch(p.f);if(Object(i.o)(o))return yield e.computeMoreMinimalEdits(t.uri,o)}}))}(e.get(f.a),s,o,r.a.None)})),D.a.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[n,i,r,o]=t;Object(E.b)(m.a.isUri(n)),Object(E.b)(v.a.isIPosition(i)),Object(E.b)("string"==typeof r);const s=e.get(w.a).getModel(n);if(!s)throw Object(p.b)("resource");return B(e.get(f.a),s,v.a.lift(i),r,o)}));var W=n(9),H=n(70),Y=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},V=function(e,t){return function(n,i){t(n,i,e)}},z=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};let U=class{constructor(e,t){this._workerService=t,this._callOnDispose=new s.b,this._callOnModel=new s.b,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(h.t.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(41))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=h.t.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new c.b;for(let e of t.autoFormatTriggerCharacters)n.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(e=>{let t=e.charCodeAt(e.length-1);n.has(t)&&this._trigger(String.fromCharCode(t))}))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1)return;const t=this._editor.getModel(),n=this._editor.getPosition();let r=!1;const o=this._editor.onDidChangeModelContent(e=>{if(e.isFlush)return r=!0,void o.dispose();for(let t=0,i=e.changes.length;t{o.dispose(),r||Object(i.o)(e)&&(S.execute(this._editor,e,!0),N(e))},e=>{throw o.dispose(),e})}};U.ID="editor.contrib.autoFormat",U=Y([V(1,f.a)],U);let $=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new s.b,this._callOnModel=new s.b,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(h.j.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(40)&&this.editor.hasModel()&&h.j.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(R,this.editor,e,2,H.b.None,r.a.None).catch(p.e))}};$.ID="editor.contrib.formatOnPaste",$=Y([V(1,L.a)],$);class q extends a.b{constructor(){super({id:"editor.action.formatDocument",label:k.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:W.a.and(u.a.notInCompositeEditor,u.a.writable,u.a.hasDocumentFormattingProvider),kbOpts:{kbExpr:W.a.and(u.a.editorTextFocus,u.a.hasDocumentFormattingProvider),primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{when:u.a.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})}run(e,t){return z(this,void 0,void 0,(function*(){if(t.hasModel()){const n=e.get(L.a),i=e.get(H.a);yield i.showWhile(n.invokeFunction(j,t,1,H.b.None,r.a.None),250)}}))}}class K extends a.b{constructor(){super({id:"editor.action.formatSelection",label:k.a("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:W.a.and(u.a.writable,u.a.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:W.a.and(u.a.editorTextFocus,u.a.hasDocumentSelectionFormattingProvider),primary:Object(o.a)(2089,2084),weight:100},contextMenuOpts:{when:W.a.and(u.a.hasDocumentSelectionFormattingProvider,u.a.hasNonEmptySelection),group:"1_modification",order:1.31}})}run(e,t){return z(this,void 0,void 0,(function*(){if(!t.hasModel())return;const n=e.get(L.a),i=t.getModel(),o=t.getSelections().map(e=>e.isEmpty()?new d.a(e.startLineNumber,1,e.startLineNumber,i.getLineMaxColumn(e.startLineNumber)):e),s=e.get(H.a);yield s.showWhile(n.invokeFunction(R,t,o,1,H.b.None,r.a.None),250)}))}}Object(a.m)(U.ID,U),Object(a.m)($.ID,$),Object(a.k)(q),Object(a.k)(K),D.a.registerCommand("editor.action.format",e=>z(void 0,void 0,void 0,(function*(){const t=e.get(l.a).getFocusedCodeEditor();if(!t||!t.hasModel())return;const n=e.get(D.b);t.getSelection().isEmpty()?yield n.executeCommand("editor.action.formatDocument"):yield n.executeCommand("editor.action.formatSelection")})))},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(2),o=n(17),s=n(7),a=n(9),l=n(4),c=n(1),d=n(34),u=n(55),h=n(94),f=n(6),g=(n(619),n(98)),p=n(171),m=n(19),_=n(15),b=n(11),v=n(26),y=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const w={Visible:new a.c("parameterHintsVisible",!1),MultipleSignatures:new a.c("parameterHintsMultipleSignatures",!1)};function C(e,t,n,i){const r=b.y.ordered(e);return Object(m.h)(r.map(r=>()=>Promise.resolve(r.provideSignatureHelp(e,t,i,n)).catch(e=>Object(_.f)(e))))}Object(l.j)("_executeSignatureHelpProvider",(e,t,n)=>y(void 0,void 0,void 0,(function*(){const i=yield C(e,t,{triggerKind:b.z.Invoke,isRetrigger:!1,triggerCharacter:n.triggerCharacter},v.a.None);if(i)return setTimeout(()=>i.dispose(),0),i.value})));var S,k=n(66),x=n(5),L=n(18),M=n(111),D=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};!function(e){e.Default={type:0};e.Pending=class{constructor(e){this.request=e,this.type=2}};e.Active=class{constructor(e){this.hints=e,this.type=1}}}(S||(S={}));class E extends r.a{constructor(e,t=E.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new f.a),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=S.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new r.d),this.triggerChars=new M.b,this.retriggerChars=new M.b,this.triggerId=0,this.editor=e,this.throttledDelayer=new m.a(t),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(e=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(e=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(e=>this.onCursorChange(e))),this._register(this.editor.onDidChangeModelContent(e=>this.onModelContentChange())),this._register(b.y.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(e=>this.onDidType(e))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=S.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!b.y.has(n))return;const i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(i),t).catch(_.e)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e==e-1,i=this.editor.getOption(67).cycle;!(e<2||n)||i?this.updateActiveSignature(n&&i?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=0===t,i=this.editor.getOption(67).cycle;!(e<2||n)||i?this.updateActiveSignature(n&&i?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new S.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return D(this,void 0,void 0,(function*(){const t=1===this.state.type||2===this.state.type,n=1===this.state.type?this.state.hints:void 0;if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const i=this._pendingTriggers.reduce(T);this._pendingTriggers=[];const r={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),s=this.editor.getPosition();this.state=new S.Pending(Object(m.f)(e=>C(o,s,r,e)));try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new S.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=S.Default),Object(_.e)(t),!1}}))}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new M.b,this.retriggerChars=new M.b;const e=this.editor.getModel();if(e)for(const t of b.y.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:b.z.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:b.z.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:b.z.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(67).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function T(e,t){switch(t.triggerKind){case b.z.Invoke:return t;case b.z.ContentChange:return e;case b.z.TriggerCharacter:default:return t}}E.DEFAULT_DELAY=120;var O=n(8),N=n(16),I=n(20),A=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},R=function(e,t){return function(n,i){t(n,i,e)}};const P=c.a,j=Object(N.e)("parameter-hints-next",N.a.chevronDown),F=Object(N.e)("parameter-hints-previous",N.a.chevronUp);let B=class e extends r.a{constructor(e,t,n,i){super(),this.editor=e,this.renderDisposeables=this._register(new r.b),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new p.a(e,i,n)),this.model=this._register(new E(e)),this.keyVisible=w.Visible.bindTo(t),this.keyMultipleSignatures=w.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(e=>{e?(this.show(),this.render(e)):this.hide()}))}createParamaterHintDOMNodes(){const e=P(".editor-widget.parameter-hints-widget"),t=c.p(e,P(".wrapper"));t.tabIndex=-1;const n=c.p(t,P(".controls")),i=c.p(n,P(".button"+F.cssSelector)),r=c.p(n,P(".overloads")),o=c.p(n,P(".button"+j.cssSelector)),s=Object(d.b)(Object(d.a)(i,"click"));this._register(s(this.previous,this));const a=Object(d.b)(Object(d.a)(o,"click"));this._register(a(this.next,this));const l=P(".body"),u=new h.a(l,{});this._register(u),t.appendChild(u.getDomNode());const g=c.p(l,P(".signature")),p=c.p(l,P(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:g,overloads:r,docs:p,scrollbar:u},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(e=>{this.visible&&this.editor.layoutContentWidget(this)}));const m=()=>{if(!this.domNodes)return;const e=this.editor.getOption(36);this.domNodes.element.style.fontSize=`${e.fontSize}px`};m(),this._register(f.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(e=>e.hasChanged(36)).on(m,null)),this._register(this.editor.onDidLayoutChange(e=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&c.e(this.domNodes.element,"visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&c.Q(this.domNodes.element,"visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;c.ab(this.domNodes.element,"multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const r=e.signatures[e.activeSignature];if(!r)return;const o=c.p(this.domNodes.signature,P(".code")),s=this.editor.getOption(36);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const a=r.parameters.length>0,l=null!==(t=r.activeParameter)&&void 0!==t?t:e.activeParameter;if(a)this.renderParameters(o,r,l);else{c.p(o,P("span")).textContent=r.label}const d=r.parameters[l];if(null==d?void 0:d.documentation){const e=P("span.documentation");if("string"==typeof d.documentation)e.textContent=d.documentation;else{const t=this.renderDisposeables.add(this.markdownRenderer.render(d.documentation));c.e(t.element,"markdown-docs"),e.appendChild(t.element)}c.p(this.domNodes.docs,P("p",{},e))}if(void 0===r.documentation);else if("string"==typeof r.documentation)c.p(this.domNodes.docs,P("p",{},r.documentation));else{const e=this.renderDisposeables.add(this.markdownRenderer.render(r.documentation));c.e(e.element,"markdown-docs"),c.p(this.domNodes.docs,e.element)}const h=this.hasDocs(r,d);if(c.ab(this.domNodes.signature,"has-docs",h),c.ab(this.domNodes.docs,"empty",!h),this.domNodes.overloads.textContent=Object(O.M)(e.activeSignature+1,e.signatures.length.toString().length)+"/"+e.signatures.length,d){const e=this.getParameterLabel(r,l);this.announcedLabel!==e&&(u.a(i.a("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&Object(I.a)(t.documentation).length>0)||(!!(t&&"object"==typeof t.documentation&&Object(I.a)(t.documentation).value.length>0)||(!!(e.documentation&&"string"==typeof e.documentation&&Object(I.a)(e.documentation).length>0)||!!(e.documentation&&"object"==typeof e.documentation&&Object(I.a)(e.documentation.value).length>0)))}renderParameters(e,t,n){const[i,r]=this.getParameterLabelOffsets(t,n),o=document.createElement("span");o.textContent=t.label.substring(0,i);const s=document.createElement("span");s.textContent=t.label.substring(i,r),s.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(r),c.p(e,o,s,a)}getParameterLabel(e,t){const n=e.parameters[t];return Array.isArray(n.label)?e.label.substring(n.label[0],n.label[1]):n.label}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;{const t=e.label.lastIndexOf(n.label);return t>=0?[t,t+n.label.length]:[0,0]}}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("wrapper");t.length&&(t[0].style.maxHeight=e)}};B.ID="editor.widget.parameterHintsWidget",B=A([R(1,a.b),R(2,k.a),R(3,g.a)],B),Object(L.g)((e,t)=>{const n=e.getColor(x.F);if(n){const i=e.type===L.b?2:1;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${i}px solid ${n}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${n.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${n.transparent(.5)}; }`)}const i=e.getColor(x.E);i&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const r=e.getColor(x.rc);r&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${r}; }`);const o=e.getColor(x.G);o&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${o}; }`);const s=e.getColor(x.qc);s&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${s}; }`)}),n.d(t,"TriggerParameterHintsAction",(function(){return V}));var W=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},H=function(e,t){return function(n,i){t(n,i,e)}};let Y=class e extends r.a{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance(B,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};Y.ID="editor.controller.parameterHints",Y=W([H(1,o.a)],Y);class V extends l.b{constructor(){super({id:"editor.action.triggerParameterHints",label:i.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.a.hasSignatureHelpProvider,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3082,weight:100}})}run(e,t){const n=Y.get(t);n&&n.trigger({triggerKind:b.z.Invoke})}}Object(l.m)(Y.ID,Y),Object(l.k)(V);const z=l.c.bindToContribution(Y.get);Object(l.l)(new z({id:"closeParameterHints",precondition:w.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:s.a.focus,primary:9,secondary:[1033]}})),Object(l.l)(new z({id:"showPrevParameterHint",precondition:a.a.and(w.Visible,w.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:s.a.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object(l.l)(new z({id:"showNextParameterHint",precondition:a.a.and(w.Visible,w.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:s.a.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(39),o=n(4),s=n(7),a=n(60),l=n(10),c=n(3),d=n(22),u=n(32);class h{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length;if(n+i>e.length)return!1;for(let r=0;r=65&&i<=90&&i+32===o||o>=65&&o<=90&&o+32===i))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,o){const s=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,d=e.endColumn,u=r.getLineContent(s),f=r.getLineContent(l);let g,p=u.lastIndexOf(t,a-1+t.length),m=f.indexOf(n,d-1-n.length);if(-1!==p&&-1!==m)if(s===l){u.substring(p+t.length,m).indexOf(n)>=0&&(p=-1,m=-1)}else{const e=u.substring(p+t.length),i=f.substring(0,m);(e.indexOf(n)>=0||i.indexOf(n)>=0)&&(p=-1,m=-1)}-1!==p&&-1!==m?(i&&p+t.length0&&32===f.charCodeAt(m-1)&&(n=" "+n,m-=1),g=h._createRemoveBlockCommentOperations(new c.a(s,p+t.length+1,l,m+1),t,n)):(g=h._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=1===g.length?n:null);for(const e of g)o.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,n){let i=[];return c.a.isEmpty(e)?i.push(a.a.delete(new c.a(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(a.a.delete(new c.a(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(a.a.delete(new c.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){let r=[];return c.a.isEmpty(e)?r.push(a.a.replace(new c.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(a.a.insert(new l.a(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(a.a.insert(new l.a(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),o=u.a.getComments(r);o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(2===n.length){const e=n[0],t=n[1];return new d.a(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=n[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new d.a(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var f=n(8);class g{constructor(e,t,n,i,r){this._selection=e,this._tabSize=t,this._type=n,this._insertSpace=i,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r}static _gatherPreflightCommentStrings(e,t,n){e.tokenizeIfCheap(t);const i=e.getLanguageIdAtPosition(t,1),r=u.a.getComments(i),o=r?r.lineCommentToken:null;if(!o)return null;let s=[];for(let e=0,i=n-t+1;es?r-1:r}}}var p=n(25);class m extends o.b{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=[],r=t.getSelections(),o=n.getOptions(),s=t.getOption(14);for(const e of r)i.push(new g(e,o.tabSize,this._type,s.insertSpace,s.ignoreEmptyLines));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class _ extends o.b{constructor(){super({id:"editor.action.blockComment",label:i.a("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:p.b.MenubarEditMenu,group:"5_insert",title:i.a({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){if(!t.hasModel())return;const n=t.getOption(14),i=[],r=t.getSelections();for(const e of r)i.push(new h(e,n.insertSpace));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}Object(o.k)(class extends m{constructor(){super(0,{id:"editor.action.commentLine",label:i.a("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:p.b.MenubarEditMenu,group:"5_insert",title:i.a({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}),Object(o.k)(class extends m{constructor(){super(1,{id:"editor.action.addCommentLine",label:i.a("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:Object(r.a)(2089,2081),weight:100}})}}),Object(o.k)(class extends m{constructor(){super(2,{id:"editor.action.removeCommentLine",label:i.a("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:Object(r.a)(2089,2099),weight:100}})}}),Object(o.k)(_)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(26),o=n(2),s=n(3),a=n(271),l=n(11),c=n(209),d=n(8),u=n(61),h=n(45),f=n(12);const g=[void 0,[]];function p(e,t,n=0,i=0){const r=t;return r.values&&r.values.length>1?function(e,t,n,i){let r=0;const o=[];for(const s of t){const[t,a]=m(e,s,n,i);if("number"!=typeof t)return g;r+=t,o.push(...a)}return[r,_(o)]}(e,r.values,n,i):m(e,t,n,i)}function m(e,t,n,i){const r=Object(u.d)(t.original,t.originalLowercase,n,e,e.toLowerCase(),i,!0);return r?[r[0],Object(u.c)(r)]:g}function _(e){const t=e.sort((e,t)=>e.start-t.start),n=[];let i=void 0;for(const e of t)i&&b(i,e)?(i.start=Math.min(i.start,e.start),i.end=Math.max(i.end,e.end)):(i=e,n.push(e));return n}function b(e,t){return!(e.end=0;let s=void 0;const a=e.split(v);if(a.length>1)for(const e of a){const{pathNormalized:t,normalized:n,normalizedLowercase:i}=w(e);n&&(s||(s=[]),s.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:t,normalized:n,normalizedLowercase:i}))}return{original:e,originalLowercase:t,pathNormalized:n,normalized:i,normalizedLowercase:r,values:s,containsPathSeparator:o}}function w(e){let t;t=f.i?e.replace(/\//g,h.h):e.replace(/\\/g,h.h);const n=Object(d.V)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:n,normalizedLowercase:n.toLowerCase()}}function C(e){return Array.isArray(e)?y(e.map(e=>e.original).join(v)):y(e.original)}var S=n(38),k=n(16),x=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class L extends a.a{constructor(e=Object.create(null)){super(e),this.options=e,e.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,Object(i.a)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),o.a.None}provideWithTextEditor(e,t,n){const i=this.getModel(e);return i?l.m.has(i)?this.doProvideWithEditorSymbols(e,i,t,n):this.doProvideWithoutEditorSymbols(e,i,t,n):o.a.None}doProvideWithoutEditorSymbols(e,t,n,r){const s=new o.b;return this.provideLabelPick(n,Object(i.a)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>x(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!r.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,n,r))})))(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return x(this,void 0,void 0,(function*(){if(l.m.has(e))return!0;let n;const i=new Promise(e=>n=e),r=t.add(l.m.onDidChange(()=>{l.m.has(e)&&(r.dispose(),n(!0))}));return t.add(Object(o.h)(()=>n(!1))),i}))}doProvideWithEditorSymbols(e,t,n,s){const a=new o.b;a.add(n.onDidAccept(t=>{const[i]=n.selectedItems;i&&i.range&&(this.gotoLocation(e,{range:i.range.selection,keyMods:n.keyMods,preserveFocus:t.inBackground}),t.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const l=this.getDocumentSymbols(t,!0,s);let c=void 0;const d=()=>x(this,void 0,void 0,(function*(){null==c||c.dispose(!0),n.busy=!1,c=new r.b(s),n.busy=!0;try{const e=y(n.value.substr(L.PREFIX.length).trim()),t=yield this.doGetSymbolPicks(l,e,void 0,c.token);if(s.isCancellationRequested)return;t.length>0?n.items=t:e.original.length>0?this.provideLabelPick(n,Object(i.a)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,Object(i.a)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}}));a.add(n.onDidChangeValue(()=>d())),d();let u=!0;return a.add(n.onDidChangeActive(()=>{const[t]=n.activeItems;if(t&&t.range){if(u)return void(u=!1);e.revealRangeInCenter(t.range.selection,0),this.addDecorations(e,t.range.decoration)}})),a}doGetSymbolPicks(e,t,n,r){return x(this,void 0,void 0,(function*(){const o=yield e;if(r.isCancellationRequested)return[];const a=0===t.original.indexOf(L.SCOPE_PREFIX),c=a?1:0;let u,h;t.values&&t.values.length>1?(u=C(t.values[0]),h=C(t.values.slice(1))):u=t;const f=[];for(let e=0;ec){let e=!1;if(u!==t&&([b,v]=p(g,Object.assign(Object.assign({},t),{values:void 0}),c,m),"number"==typeof b&&(e=!0)),"number"!=typeof b&&([b,v]=p(g,u,c,m),"number"!=typeof b))continue;if(!e&&h){if(_&&h.original.length>0&&([y,w]=p(_,h)),"number"!=typeof y)continue;"number"==typeof b&&(b+=y)}}const C=r.tags&&r.tags.indexOf(1)>=0;f.push({index:e,kind:r.kind,score:b,label:g,ariaLabel:a,description:_,highlights:C?void 0:{label:v,description:w},range:{selection:s.a.collapseToStart(r.selectionRange),decoration:r.range},strikethrough:C,buttons:(()=>{var e,t;const n=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(n)return[{iconClass:"right"===n?k.a.splitHorizontal.classNames:k.a.splitVertical.classNames,tooltip:"right"===n?Object(i.a)("openToSide","Open to the Side"):Object(i.a)("openToBottom","Open to the Bottom")}]})()})}const g=f.sort((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t));let m=[];if(a){let e=void 0,t=void 0,n=0;function _(){t&&"number"==typeof e&&n>0&&(t.label=Object(d.x)(D[e]||M,n))}for(const i of g)e!==i.kind?(_(),e=i.kind,n=1,t={type:"separator"},m.push(t)):n++,m.push(i);_()}else g.length>0&&(m=[{label:Object(i.a)("symbols","symbols ({0})",f.length),type:"separator"},...g]);return m}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const n=D[e.kind]||M,i=D[t.kind]||M,r=n.localeCompare(i);return 0===r?this.compareByScore(e,t):r}getDocumentSymbols(e,t,n){return x(this,void 0,void 0,(function*(){const i=yield c.b.create(e,n);if(n.isCancellationRequested)return[];const r=[];for(const e of i.children.values())e instanceof c.a?r.push(e.symbol):r.push(...S.a.map(e.children.values(),e=>e.symbol));let o=[];return t?this.flattenDocumentSymbols(o,r,""):o=r,o.sort((e,t)=>s.a.compareRangesUsingStarts(e.range,t.range))}))}flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&this.flattenDocumentSymbols(e,i.children,i.name)}}L.PREFIX="@",L.SCOPE_PREFIX=":",L.PREFIX_BY_CATEGORY=`${L.PREFIX}${L.SCOPE_PREFIX}`;const M=Object(i.a)("property","properties ({0})"),D={5:Object(i.a)("method","methods ({0})"),11:Object(i.a)("function","functions ({0})"),8:Object(i.a)("_constructor","constructors ({0})"),12:Object(i.a)("variable","variables ({0})"),4:Object(i.a)("class","classes ({0})"),22:Object(i.a)("struct","structs ({0})"),23:Object(i.a)("event","events ({0})"),24:Object(i.a)("operator","operators ({0})"),10:Object(i.a)("interface","interfaces ({0})"),2:Object(i.a)("namespace","namespaces ({0})"),3:Object(i.a)("package","packages ({0})"),25:Object(i.a)("typeParameter","type parameters ({0})"),1:Object(i.a)("modules","modules ({0})"),6:Object(i.a)("property","properties ({0})"),9:Object(i.a)("enum","enumerations ({0})"),21:Object(i.a)("enumMember","enumeration members ({0})"),14:Object(i.a)("string","strings ({0})"),0:Object(i.a)("file","files ({0})"),17:Object(i.a)("array","arrays ({0})"),15:Object(i.a)("number","numbers ({0})"),16:Object(i.a)("boolean","booleans ({0})"),18:Object(i.a)("object","objects ({0})"),19:Object(i.a)("key","keys ({0})"),7:Object(i.a)("field","fields ({0})"),13:Object(i.a)("constant","constants ({0})")};var E=n(46),T=n(127),O=n(33),N=n(20),I=n(44),A=n(6),R=n(4),P=n(7),j=n(97);n.d(t,"StandaloneGotoSymbolQuickAccessProvider",(function(){return F})),n.d(t,"GotoLineAction",(function(){return B}));let F=class extends L{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=A.b.None}get activeTextEditorControl(){return Object(N.n)(this.editorService.getFocusedCodeEditor())}};F=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(0,O.a)],F),E.a.as(T.b.Quickaccess).registerQuickAccessProvider({ctor:F,prefix:L.PREFIX,helpEntries:[{description:I.f.quickOutlineActionLabel,prefix:L.PREFIX,needsEditor:!0},{description:I.f.quickOutlineByCategoryActionLabel,prefix:L.PREFIX_BY_CATEGORY,needsEditor:!0}]});class B extends R.b{constructor(){super({id:"editor.action.quickOutline",label:I.f.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:P.a.hasDocumentSymbolProvider,kbOpts:{kbExpr:P.a.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(j.a).quickAccess.show(L.PREFIX)}}Object(R.k)(B)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(4),o=n(7),s=n(3),a=n(22);class l{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const n=this._selection.startLineNumber,i=this._selection.startColumn,r=this._selection.endColumn;if((!this._isMovingLeft||1!==i)&&(this._isMovingLeft||r!==e.getLineMaxColumn(n)))if(this._isMovingLeft){const o=new s.a(n,i-1,n,i),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new s.a(n,r,n,r),a)}else{const o=new s.a(n,r,n,r+1),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new s.a(n,i,n,i),a)}}computeCursorState(e,t){return this._isMovingLeft?new a.a(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new a.a(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class c extends r.b{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],i=t.getSelections();for(const e of i)n.push(new l(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}Object(r.k)(class extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:i.a("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:o.a.writable})}}),Object(r.k)(class extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:i.a("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:o.a.writable})}})},function(e,t,n){"use strict";n.r(t);n(580);var i=n(2),r=n(12),o=n(4),s=n(10),a=n(3),l=n(22);class c{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e))),this._register(this._editor.onMouseUp(e=>this._onEditorMouseUp(e))),this._register(this._editor.onMouseDrag(e=>this._onEditorMouseDrag(e))),this._register(this._editor.onMouseDrop(e=>this._onEditorMouseDrop(e))),this._register(this._editor.onKeyDown(e=>this.onEditorKeyDown(e))),this._register(this._editor.onKeyUp(e=>this.onEditorKeyUp(e))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(25)&&!this._editor.getOption(13)&&(u(e)&&(this._modifierPressed=!0),this._mouseDown&&u(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(25)&&!this._editor.getOption(13)&&(u(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===h.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter(e=>t.position&&e.containsPosition(t.position));if(1!==e.length)return;this._dragSelection=e[0]}u(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new s.a(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let n=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:i,selectionStartColumn:r}=e;n=[new l.a(i,r,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(e=>e.containsPosition(t)?new l.a(t.lineNumber,t.column,t.lineNumber,t.column):e);this._editor.setSelections(n||[],"mouse")}else(!this._dragSelection.containsPosition(t)||(u(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(h.ID,new c(this._dragSelection,t,u(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new a.a(e.lineNumber,e.column,e.lineNumber,e.column),options:h._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}h.ID="editor.contrib.dragAndDrop",h.TRIGGER_KEY_VALUE=r.f?6:5,h._DECORATION_OPTIONS=d.a.register({className:"dnd-target"}),Object(o.m)(h.ID,h)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(2),o=n(271),s=n(100);class a extends o.a{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=Object(i.a)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,r.a.None}provideWithTextEditor(e,t,n){const i=new r.b;i.add(t.onDidAccept(n=>{const[i]=t.selectedItems;if(i){if(!this.isValidLineNumber(e,i.lineNumber))return;this.gotoLocation(e,{range:this.toRange(i.lineNumber,i.column),keyMods:t.keyMods,preserveFocus:n.inBackground}),n.inBackground||t.hide()}}));const o=()=>{const n=this.parsePosition(e,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(e,n.lineNumber,n.column);if(t.items=[{lineNumber:n.lineNumber,column:n.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(e,n.lineNumber))return void this.clearDecorations(e);const r=this.toRange(n.lineNumber,n.column);e.revealRangeInCenter(r,0),this.addDecorations(e,r)};o(),i.add(t.onDidChangeValue(()=>o()));const l=Object(s.a)(e);if(l){2===l.getOptions().get(52).renderType&&(l.updateOptions({lineNumbers:"on"}),i.add(Object(r.h)(()=>l.updateOptions({lineNumbers:"relative"}))))}return i}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map(e=>parseInt(e,10)).filter(e=>!isNaN(e)),i=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:i+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?Object(i.a)("gotoLineColumnLabel","Go to line {0} and column {1}.",t,n):Object(i.a)("gotoLineLabel","Go to line {0}.",t);const r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?Object(i.a)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):Object(i.a)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&(t>0&&t<=this.lineCount(e))}isValidColumn(e,t,n){if(!n||"number"!=typeof n)return!1;const i=this.getModel(e);if(!i)return!1;const r={lineNumber:t,column:n};return i.validatePosition(r).equals(r)}lineCount(e){var t,n;return null!==(n=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==n?n:0}}a.PREFIX=":";var l=n(46),c=n(127),d=n(33),u=n(20),h=n(44),f=n(6),g=n(4),p=n(7),m=n(97);n.d(t,"StandaloneGotoLineQuickAccessProvider",(function(){return _})),n.d(t,"GotoLineAction",(function(){return b}));let _=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=f.b.None}get activeTextEditorControl(){return Object(u.n)(this.editorService.getFocusedCodeEditor())}};_=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(0,d.a)],_),l.a.as(c.b.Quickaccess).registerQuickAccessProvider({ctor:_,prefix:_.PREFIX,helpEntries:[{description:h.b.gotoLineActionLabel,needsEditor:!0}]});class b extends g.b{constructor(){super({id:"editor.action.gotoLine",label:h.b.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.a.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(m.a).quickAccess.show(_.PREFIX)}}Object(g.k)(b)},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(3),o=n(22),s=n(7),a=n(4),l=n(88);class c{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new o.a(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new o.a(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var d=n(76),u=n(18),h=n(47),f=n(29),g=n(19),p=n(15),m=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},_=function(e,t){return function(n,i){t(n,i,e)}};let b=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,n){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),s=this.editor.getModel();if(!s||!i)return;let a=i;if(a.startLineNumber!==a.endLineNumber)return;const l=new d.a(this.editor,5),u=s.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=Object(g.f)(e=>this.editorWorkerService.navigateValueSet(u,a,n)),this.currentRequest.then(n=>{if(!n||!n.range||!n.value)return;if(!l.validate(this.editor))return;let i=r.a.lift(n.range),s=n.range,d=n.value.length-(a.endColumn-a.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+n.value.length},d>1&&(a=new o.a(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+d-1));const u=new c(i,a,n.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,u),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:s,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=Object(g.l)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(p.e)}).catch(p.e)):Promise.resolve(void 0)}};b.ID="editor.contrib.inPlaceReplaceController",b.DECORATION=f.a.register({className:"valueSetReplacement"}),b=m([_(1,l.a)],b);class v extends a.b{constructor(){super({id:"editor.action.inPlaceReplace.up",label:i.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3154,weight:100}})}run(e,t){const n=b.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}class y extends a.b{constructor(){super({id:"editor.action.inPlaceReplace.down",label:i.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:s.a.writable,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3156,weight:100}})}run(e,t){const n=b.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}Object(a.m)(b.ID,b),Object(a.k)(v),Object(a.k)(y),Object(u.g)((e,t)=>{const n=e.getColor(h.d);n&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${n}; }`)})},function(e,t,n){"use strict";n.r(t);n(617);var i=n(0),r=n(19),o=n(26),s=n(15),a=n(81),l=n(2),c=n(12),d=n(4),u=n(29),h=n(11),f=n(272),g=n(24),p=n(3),m=n(54),_=n(28),b=n(14),v=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class y{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return v(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}))}}class w extends l.a{constructor(e){super();let t=[];for(const[n,i]of e){const e=n.links.map(e=>new y(e,i));t=w._union(t,e),Object(l.g)(n)&&this._register(n)}this.links=t}static _union(e,t){let n,i,r,o,s=[];for(n=0,r=0,i=e.length,o=t.length;nPromise.resolve(i.provideLinks(e,t)).then(e=>{e&&(n[r]=[e,i])},s.f));return Promise.all(i).then(()=>{const e=new w(Object(b.d)(n));return t.isCancellationRequested?(e.dispose(),new w([])):e})}_.a.registerCommand("_executeLinkProvider",(e,...t)=>v(void 0,void 0,void 0,(function*(){const[n]=t;if(!(n instanceof g.a))return[];const i=e.get(m.a).getModel(n);if(!i)return[];const r=yield C(i,o.a.None);if(!r)return[];const s=r.links.slice(0);return r.dispose(),s})));var S=n(40),k=n(66),x=n(5),L=n(18),M=n(35),D=n(42),E=n(8);n.d(t,"LinkDetector",(function(){return R}));var T=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},O=function(e,t){return function(n,i){t(n,i,e)}},N=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};const I={general:u.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:u.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class A{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:A._getOptions(e,t,!1)}}static _getOptions(e,t,n){const r=Object.assign({},n?I.active:I.general);return r.hoverMessage=function(e,t){const n=e.url&&/^command:/i.test(e.url.toString()),r=e.tooltip?e.tooltip:n?i.a("links.navigate.executeCmd","Execute command"):i.a("links.navigate.follow","Follow link"),o=t?c.f?i.a("links.navigate.kb.meta.mac","cmd + click"):i.a("links.navigate.kb.meta","ctrl + click"):c.f?i.a("links.navigate.kb.alt.mac","option + click"):i.a("links.navigate.kb.alt","alt + click");if(e.url){return new a.a("",!0).appendMarkdown(`[${r}](${e.url.toString()}) (${o})`)}return(new a.a).appendText(`${r} (${o})`)}(e,t),r}activate(e,t){e.changeDecorationOptions(this.decorationId,A._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,A._getOptions(this.link,t,!1))}}let R=class e{constructor(e,t,n){this.listenersToRemove=new l.b,this.editor=e,this.openerService=t,this.notificationService=n;let i=new f.a(e);this.listenersToRemove.add(i),this.listenersToRemove.add(i.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this.listenersToRemove.add(i.onExecute(e=>{this.onEditorMouseUp(e)})),this.listenersToRemove.add(i.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this.enabled=e.getOption(54),this.listenersToRemove.add(e.onDidChangeConfiguration(t=>{const n=e.getOption(54);this.enabled!==n&&(this.enabled=n,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(e.onDidChangeModelContent(e=>this.onChange())),this.listenersToRemove.add(e.onDidChangeModel(e=>this.onModelChanged())),this.listenersToRemove.add(e.onDidChangeModelLanguage(e=>this.onModelModeChanged())),this.listenersToRemove.add(h.s.onDidChange(e=>this.onModelModeChanged())),this.timeout=new r.e,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),e.RECOMPUTE_TIME)}beginCompute(){return N(this,void 0,void 0,(function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(h.s.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=r.f(t=>C(e,t));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){Object(s.e)(e)}finally{this.computePromise=null}}}))}updateDecorations(e){const t="altKey"===this.editor.getOption(61);let n=[],i=Object.keys(this.currentOccurrences);for(let e=0,t=i.length;e{t.activate(e,n),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(61);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:r}=e;r.resolve(o.a.None).then(e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===M.b.file&&E.S(e,"file:")){const n=g.a.parse(e);if(n.scheme===M.b.file){const i=D.i(n);let r=null;E.S(i,"/./")?r=`.${i.substr(1)}`:E.S(i,"//./")&&(r=`.${i.substr(2)}`),r&&(e=D.g(t,r))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:n})},e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(i.a("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):"missing"===t?this.notificationService.warn(i.a("missing.url","Failed to open this link because its target is missing.")):Object(s.e)(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.timeout.cancel(),this.activeLinksList&&this.activeLinksList.dispose(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};R.ID="editor.linkDetector",R.RECOMPUTE_TIME=1e3,R=T([O(1,k.a),O(2,S.a)],R);class P extends d.b{constructor(){super({id:"editor.action.openLink",label:i.a("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=R.get(t);if(!n)return;if(!t.hasModel())return;let i=t.getSelections();for(let e of i){let t=n.getLinkOccurrence(e.getEndPosition());t&&n.openLinkOccurrence(t,!1)}}}Object(d.m)(R.ID,R),Object(d.k)(P),Object(L.g)((e,t)=>{const n=e.getColor(x.r);n&&t.addRule(`.monaco-editor .detected-link-active { color: ${n} !important; }`)})},function(e,t,n){"use strict";n.r(t);var i=n(46),r=n(127),o=n(44),s=n(97),a=n(0),l=n(2),c=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=function(e,t){return function(n,i){t(n,i,e)}};let u=class e{constructor(e){this.quickInputService=e,this.registry=i.a.as(r.b.Quickaccess)}provide(t){const n=new l.b;n.add(t.onDidAccept(()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})})),n.add(t.onDidChangeValue(t=>{const n=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));n&&n.prefix&&n.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})}));const{editorProviders:i,globalProviders:r}=this.getQuickAccessProviders();return t.items=0===i.length||0===r.length?[...0===i.length?r:i]:[{label:Object(a.a)("globalCommands","global commands"),type:"separator"},...r,{label:Object(a.a)("editorCommands","editor commands"),type:"separator"},...i],n}getQuickAccessProviders(){const t=[],n=[];for(const i of this.registry.getQuickAccessProviders().sort((e,t)=>e.prefix.localeCompare(t.prefix)))if(i.prefix!==e.PREFIX)for(const e of i.helpEntries){const r=e.prefix||i.prefix,o=r||"…";(e.needsEditor?n:t).push({prefix:r,label:o,ariaLabel:Object(a.a)("helpPickAriaLabel","{0}, {1}",o,e.description),description:e.description})}return{editorProviders:n,globalProviders:t}}};u.PREFIX="?",u=c([d(0,s.a)],u),i.a.as(r.b.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:"",helpEntries:[{description:o.e.helpQuickAccessActionLabel,needsEditor:!0}]})},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(15),o=n(9),s=n(70),a=n(4),l=n(7),c=(n(620),n(2)),d=n(10),u=n(5),h=n(18),f=n(41),g=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},p=function(e,t){return function(n,i){t(n,i,e)}};const m=new o.c("renameInputVisible",!1);let _=class{constructor(e,t,n,i,r){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=i,this._disposables=new c.b,this.allowEditorOverflow=!0,this._visibleContextKey=m.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(36)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",Object(i.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[n,r]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=Object(i.a)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(n))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(r))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,n,i,r;if(!this._input||!this._domNode)return;const o=e.getColor(u.uc);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(u.U))&&void 0!==t?t:""),this._domNode.style.boxShadow=o?` 0 2px 8px ${o}`:"",this._domNode.style.color=String(null!==(n=e.getColor(u.hb))&&void 0!==n?n:""),this._input.style.backgroundColor=String(null!==(i=e.getColor(u.fb))&&void 0!==i?i:"");const s=e.getColor(u.gb);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=null!==(r=null==s?void 0:s.toString())&&void 0!==r?r:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(36);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${.8*e.fontSize}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,n,i,r,o){this._domNode.classList.toggle("preview",r),this._position=new d.a(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const s=new c.b;return new Promise(e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=n=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:r&&n})):this.cancelInput(!0)},o.onCancellationRequested(()=>this.cancelInput(!0)),s.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{s.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};_=g([p(2,h.c),p(3,f.a),p(4,o.b)],_);var b=n(11),v=n(55),y=n(3),w=n(152),C=n(76),S=n(40),k=n(151),x=n(24),L=n(33),M=n(26),D=n(19),E=n(92),T=n(17),O=n(46),N=n(120),I=n(161),A=n(20);n.d(t,"rename",(function(){return B})),n.d(t,"RenameAction",(function(){return H}));var R=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},P=function(e,t){return function(n,i){t(n,i,e)}},j=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class F{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=b.w.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return j(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:y.a.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return j(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,n,r){return j(this,void 0,void 0,(function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:n.join("\n")};const s=yield o.provideRenameEdits(this.model,this.position,e,r);return s?s.rejectReason?this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r):s:this._provideRenameEdits(e,t+1,n.concat(i.a("no result","No result.")),r)}))}}function B(e,t,n){return j(this,void 0,void 0,(function*(){const i=new F(e,t),r=yield i.resolveRenameLocation(M.a.None);return(null==r?void 0:r.rejectReason)?{edits:[],rejectReason:r.rejectReason}:i.provideRenameEdits(n,M.a.None)}))}let W=class e{constructor(e,t,n,i,r,o,s){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=i,this._progressService=r,this._logService=o,this._configService=s,this._dispoableStore=new c.b,this._cts=new M.b,this._renameInputField=this._dispoableStore.add(new D.b(()=>this._dispoableStore.add(this._instaService.createInstance(_,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return j(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new F(this.editor.getModel(),e);if(!t.hasProvider())return;let n;this._cts=new C.b(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),n=yield e}catch(t){return void w.a.get(this.editor).showMessage(t||i.a("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e)}if(!n)return;if(n.rejectReason)return void w.a.get(this.editor).showMessage(n.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new C.b(this.editor,5,n.range);let r=this.editor.getSelection(),o=0,s=n.text.length;y.a.isEmpty(r)||y.a.spansMultipleLines(r)||!y.a.containsRange(n.range,r)||(o=Math.max(0,r.startColumn-n.range.startColumn),s=Math.min(n.range.endColumn,r.endColumn)-n.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(n.range,n.text,o,s,a,this._cts.token);if("boolean"==typeof l)return void(l&&this.editor.focus());this.editor.focus();const c=Object(D.j)(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(e=>j(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):this._bulkEditService.apply(k.b.convert(e),{editor:this.editor,showPreview:l.wantsPreview,label:i.a("label","Renaming '{0}'",null==n?void 0:n.text),quotableLabel:i.a("quotableLabel","Renaming {0}",null==n?void 0:n.text)}).then(e=>{e.ariaSummary&&Object(v.a)(i.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",n.text,l.newName,e.ariaSummary))}).catch(e=>{this._notificationService.error(i.a("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)}))})),e=>{this._notificationService.error(i.a("rename.failed","Rename failed to compute edits")),this._logService.error(e)});return this._progressService.showWhile(c,250),c}))}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};W.ID="editor.contrib.renameController",W=R([P(1,T.a),P(2,S.a),P(3,k.a),P(4,s.a),P(5,E.b),P(6,I.a)],W);class H extends a.b{constructor(){super({id:"editor.action.rename",label:i.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:o.a.and(l.a.writable,l.a.hasRenameProvider),kbOpts:{kbExpr:l.a.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(L.a),[i,o]=Array.isArray(t)&&t||[void 0,void 0];return x.a.isUri(i)&&d.a.isIPosition(o)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(o),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},r.e):super.runCommand(e,t)}run(e,t){const n=W.get(t);return n?n.run():Promise.resolve()}}Object(a.m)(W.ID,W),Object(a.k)(H);const Y=a.c.bindToContribution(W.get);Object(a.l)(new Y({id:"acceptRenameInput",precondition:m,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:l.a.focus,primary:3}})),Object(a.l)(new Y({id:"acceptRenameInputWithPreview",precondition:o.a.and(m,o.a.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:l.a.focus,primary:1027}})),Object(a.l)(new Y({id:"cancelRenameInput",precondition:m,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:l.a.focus,primary:9,secondary:[1033]}})),Object(a.p)("_executeDocumentRenameProvider",(function(e,t,...n){const[i]=n;return Object(A.b)("string"==typeof i),B(e,t,i)})),O.a.as(N.a.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:i.a("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},function(e,t,n){"use strict";n.r(t);var i=n(14),r=n(26),o=n(4),s=n(10),a=n(3),l=n(22),c=n(7),d=n(11),u=n(0),h=n(25),f=n(2),g=n(8);var p=n(274),m=n(28),_=n(15);n.d(t,"provideSelectionRanges",(function(){return C}));var b=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class v{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new v(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}class y{constructor(e){this._ignoreSelection=!1,this._editor=e}static get(e){return e.getContribution(y.ID)}dispose(){Object(f.f)(this._selectionListener)}run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(!d.x.has(n))return;let o=Promise.resolve(void 0);return this._state||(o=C(n,t.map(e=>e.getPosition()),r.a.None).then(e=>{if(i.o(e)&&e.length===t.length&&this._editor.hasModel()&&i.g(this._editor.getSelections(),t,(e,t)=>e.equalsSelection(t))){for(let n=0;ne.containsPosition(t[n].getStartPosition())&&e.containsPosition(t[n].getEndPosition())),e[n].unshift(t[n]);this._state=e.map(e=>new v(0,e)),Object(f.f)(this._selectionListener),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(Object(f.f)(this._selectionListener),this._state=void 0)})}})),o.then(()=>{if(!this._state)return;this._state=this._state.map(t=>t.mov(e));const t=this._state.map(e=>l.a.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(t)}finally{this._ignoreSelection=!1}})}}y.ID="editor.contrib.smartSelectController";class w extends o.b{constructor(e,t){super(t),this._forward=e}run(e,t){return b(this,void 0,void 0,(function*(){let e=y.get(t);e&&(yield e.run(this._forward))}))}}m.a.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");function C(e,t,n){const r=d.x.all(e);1===r.length&&r.unshift(new p.a);let o=[],l=[];for(const s of r)o.push(Promise.resolve(s.provideSelectionRanges(e,t,n)).then(e=>{if(i.o(e)&&e.length===t.length)for(let n=0;nl.map(t=>{if(0===t.length)return[];t.sort((e,t)=>s.a.isBefore(e.getStartPosition(),t.getStartPosition())?1:s.a.isBefore(t.getStartPosition(),e.getStartPosition())?-1:s.a.isBefore(e.getEndPosition(),t.getEndPosition())?-1:s.a.isBefore(t.getEndPosition(),e.getEndPosition())?1:0);let n,i=[];for(const e of t)(!n||a.a.containsRange(e,n)&&!a.a.equalsRange(e,n))&&(i.push(e),n=e);let r=[i[0]];for(let t=1;t=0;l--){let e=r.charCodeAt(l);if(l!==s&&(95===e||45===e))break;if(Object(g.H)(e)&&Object(g.I)(d))break;d=e}for(l+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new a.a(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}),Object(o.q)("_executeSelectionRangeProvider",(function(e,...t){const[n]=t;return C(e,n,r.a.None)}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(207),r=n(6),o=n(2),s=n(37),a=n(3);const l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class c extends o.a{constructor(e,t={}){super(),this._onDidUpdate=this._register(new r.a),this._editor=e,this._options=s.g(t,l,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new a.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new a.a(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,n=this._editor.getPosition();if(n){for(let i=0,r=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=n.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},function(e,t,n){"use strict";n(631);var i=n(0),r=n(1),o=n(31),s=n(160),a=n(19),l=n(6),c=n(2),d=n(37),u=n(77),h=n(76),f=n(33),g=n(182),p=(n(632),n(104)),m=n(94),_=n(49),b=n(4),v=n(27),y=n(99),w=n(10),C=n(47),S=n(79),k=n(63),x=n(9),L=n(5),M=n(18),D=n(16);const E=3;class T{constructor(e,t,n,i){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=n,this.modifiedLineEnd=i}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class O{constructor(e){this.entries=e}}const N=Object(D.e)("diff-review-insert",D.a.add),I=Object(D.e)("diff-review-remove",D.a.remove),A=Object(D.e)("diff-review-close",D.a.close);class R extends c.a{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Object(o.b)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Object(o.b)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new p.a(this.actionBarContainer.domNode)),this._actionBar.push(new _.a("diffreview.close",i.a("label.close","Close"),"close-diff-review "+A.classNames,!0,()=>(this.hide(),Promise.resolve(null))),{label:!1,icon:!0}),this.domNode=Object(o.b)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Object(o.b)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new m.a(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(r.n(this.domNode.domNode,"click",e=>{e.preventDefault();let t=r.w(e.target,"diff-review-row");t&&this._goToRow(t)})),this._register(r.n(this.domNode.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,n=this._diffs.length;e0){const t=e[o-1];i=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,r=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-E+1,a=n-E+1;if(sa){const e=a-p;p+=e,m+=e}if(m>g){const e=g-m;p+=e,m+=e}h[f++]=new T(i,p,r,m)}i[r++]=new O(h)}let o=i[0].entries,s=[],a=0;for(let e=1,t=i.length;ef)&&(f=i),0!==r&&(0===g||rp)&&(p=o)}let m=document.createElement("div");m.className="diff-review-row";let _=document.createElement("div");_.className="diff-review-cell diff-review-summary";const b=f-h+1,v=p-g+1;_.appendChild(document.createTextNode(`${l+1}/${this._diffs.length}: @@ -${h},${b} +${g},${v} @@`)),m.setAttribute("data-line",String(g));const y=e=>0===e?i.a("no_lines_changed","no lines changed"):1===e?i.a("one_line_changed","1 line changed"):i.a("more_lines_changed","{0} lines changed",e),w=y(b),C=y(v);m.setAttribute("aria-label",i.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",l+1,this._diffs.length,h,w,g,C)),m.appendChild(_),m.setAttribute("role","listitem"),d.appendChild(m);const S=t.get(51);let k=g;for(let i=0,r=c.length;i{const n=e.getColor(C.k);n&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${n}; }`);const i=e.getColor(L.ic);i&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class P extends b.b{constructor(){super({id:"editor.action.diffReview.next",label:i.a("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:x.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const n=F(e);n&&n.diffReviewNext()}}class j extends b.b{constructor(){super({id:"editor.action.diffReview.prev",label:i.a("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:x.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const n=F(e);n&&n.diffReviewPrev()}}function F(e){const t=e.get(f.a),n=t.listDiffEditors(),i=t.getActiveCodeEditor();if(!i)return null;for(let e=0,t=n.length;eo.modifiedStartLineNumber?i.a("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):i.a("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>Z(this,void 0,void 0,(function*(){yield this._clipboardService.writeText(o.originalContent.join(c)+c)}))));let u=0,h=void 0;o.originalEndLineNumber>o.modifiedStartLineNumber&&(h=new _.a("diff.clipboard.copyDeletedLineContent",i.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber),void 0,!0,()=>Z(this,void 0,void 0,(function*(){yield this._clipboardService.writeText(o.originalContent[u])}))),d.push(h)),n.getOption(72)||d.push(new _.a("diff.inline.revertChange",i.a("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Z(this,void 0,void 0,(function*(){if(0===o.modifiedEndLineNumber){const e=n.getModel().getLineMaxColumn(o.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new B.a(o.modifiedStartLineNumber,e,o.modifiedStartLineNumber,e),text:c+o.originalContent.join(c)}])}else{const e=n.getModel().getLineMaxColumn(o.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new B.a(o.modifiedStartLineNumber,1,o.modifiedEndLineNumber,e),text:o.originalContent.join(c)}])}}))));const f=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(h&&(h.label=i.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber+u)),d),autoSelectFirstItem:!0})};this._register(r.n(this._diffActions,"mousedown",e=>{const{top:t,height:n}=r.C(this._diffActions);let i=Math.floor(l/3);e.preventDefault(),f(e.posx,t+n+i)})),this._register(n.onMouseMove(e=>{if(8===e.target.type||5===e.target.type){e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,l)):this.visibility=!1}else this.visibility=!1})),this._register(n.onMouseDown(e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,l),f(e.event.posx,e.event.posy+l))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,n){const{top:i}=r.C(e),o=t-i,s=Math.floor(o/n),a=s*n;return this._diffActions.style.top=`${a}px`,s}}var X=n(109),Q=n(15),ee=n(70),te=n(268),ne=n(146);n.d(t,"a",(function(){return ce}));var ie=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},re=function(e,t){return function(n,i){t(n,i,e)}};class oe{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this.inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(e=>!this._zonesMap[String(e.id)])}clean(e){this._zones.length>0&&e.changeViewZones(e=>{for(let t=0,n=this._zones.length;t{for(let e=0,n=this._zones.length;ethis._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Object(o.b)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(r.n(this._overviewDomElement,"mousedown",e=>{this.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new oe(g,i),this._modifiedEditorState=new oe(g,i),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new te.a(this._containerDomElement,void 0,()=>this._onDidContainerSizeChanged())),n.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null;const m=this._contextKeyService.createScoped(),_=new q.a;_.set(x.b,m);const v=d.createChild(_),y=this._contextKeyService.createScoped(),w=new q.a;w.set(x.b,y);const C=d.createChild(w);this.originalEditor=this._createLeftHandSideEditor(n,v,m),this.modifiedEditor=this._createRightHandSideEditor(n,C,y),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new R(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,void 0!==n.enableSplitViewResizing&&(this._enableSplitViewResizing=n.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new pe(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new _e(this._createDataSource(),this._enableSplitViewResizing)),this._register(h.onDidColorThemeChange(t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)}));const S=b.d.getDiffEditorContributions();for(const e of S)try{this._register(d.createInstance(e.ctor,this))}catch(e){Object(Q.e)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=Object(M.f)(e.type)}_recreateOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this.originalEditor.hasModel()&&(this._originalOverviewRuler=this.originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this.modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers()}_createLeftHandSideEditor(t,n,i){const r=this._createInnerEditor(n,this._originalDomNode,this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens));this._register(r.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(r.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(r.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const o=i.createKey("isInDiffLeftEditor",void 0);return this._register(r.onDidFocusEditorWidget(()=>o.set(!0))),this._register(r.onDidBlurEditorWidget(()=>o.set(!1))),this._register(r.onDidContentSizeChange(t=>{const n=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),r}_createRightHandSideEditor(t,n,i){const r=this._createInnerEditor(n,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens));this._register(r.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(r.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(r.onDidChangeConfiguration(e=>{e.hasChanged(36)&&r.getModel()&&this._onViewZonesChanged()})),this._register(r.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(r.onDidChangeModelOptions(e=>{e.tabSize&&this._updateDecorationsRunner.schedule()}));const o=i.createKey("isInDiffRightEditor",void 0);return this._register(r.onDidFocusEditorWidget(()=>o.set(!0))),this._register(r.onDidBlurEditorWidget(()=>o.set(!1))),this._register(r.onDidContentSizeChange(t=>{const n=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,i=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:n,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),r}_createInnerEditor(e,t,n){return e.createInstance(g.a,t,n,{})}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this.originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this.modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this.id}getEditorType(){return H.a.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this.originalEditor}getModifiedEditor(){return this.modifiedEditor}updateOptions(t){let n=!1;void 0!==t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,n=!0),void 0!==t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let i=!1;void 0!==t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,i=!0),void 0!==t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,i=!0),i&&this._beginUpdateDecorations(),void 0!==t.originalEditable&&(this._originalIsEditable=Boolean(t.originalEditable)),void 0!==t.originalCodeLens&&(this._originalCodeLens=Boolean(t.originalCodeLens)),void 0!==t.modifiedCodeLens&&(this._modifiedCodeLens=Boolean(t.modifiedCodeLens)),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens)),void 0!==t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),n&&(this._renderSideBySide?this._setStrategy(new pe(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new _e(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide))}getModel(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this.modifiedEditor.getPosition()}setPosition(e){this.modifiedEditor.setPosition(e)}revealLine(e,t=0){this.modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this.modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this.modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this.modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this.modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this.modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this.modifiedEditor.getSelection()}getSelections(){return this.modifiedEditor.getSelections()}setSelection(e){this.modifiedEditor.setSelection(e)}setSelections(e){this.modifiedEditor.setSelections(e)}revealLines(e,t,n=0){this.modifiedEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this.modifiedEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this.modifiedEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,i=!0){this.modifiedEditor.revealRange(e,t,n,i)}revealRangeInCenter(e,t=0){this.modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this.modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this.modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this.modifiedEditor.getSupportedActions()}saveViewState(){return{original:this.originalEditor.saveViewState(),modified:this.modifiedEditor.saveViewState()}}restoreViewState(e){if(e.original&&e.modified){let t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this.modifiedEditor.focus()}hasTextFocus(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()}trigger(e,t,n){this.modifiedEditor.trigger(e,t,n)}changeDecorations(e){return this.modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),n=this._getReviewHeight();let i=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this.modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:i+e.ONE_OVERVIEW_WIDTH,height:t-n}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-n}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this.originalEditor.getModel(),n=this.modifiedEditor.getModel();if(!t||!n)return;this._diffComputationToken++;let r=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,n.uri)?this._editorWorkerService.computeDiff(t.uri,n.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then(e=>{r===this._diffComputationToken&&t===this.originalEditor.getModel()&&n===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},e=>{r===this._diffComputationToken&&t===this.originalEditor.getModel()&&n===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(n.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=n.uri,this._notificationService.warn(i.a("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)}_updateDecorations(){if(!(this.originalEditor.getModel()&&this.modifiedEditor.getModel()&&this._originalOverviewRuler&&this._modifiedOverviewRuler))return;const e=this._diffComputationResult?this._diffComputationResult.changes:[];let t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,i.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,i.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){let t=d.c(e||{});return t.inDiffEditor=!0,t.wordWrap="off",t.wordWrapMinified=!1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=!1,t.fixedOverflowWidgets=!0,t.overflowWidgetsDomNode=e.overflowWidgetsDomNode,t.minimap||(t.minimap={}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e,t,n){let i=this._adjustOptionsForSubEditor(e);return n&&(i.codeLens=!0),i.readOnly=!t,i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(t,n){let i=this._adjustOptionsForSubEditor(t);return n&&(i.codeLens=!0),i.revealHorizontalRightPadding=v.g.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),n=this._elementSizeObserver.getHeight(),i=this._getReviewHeight();let r=this._strategy.layout();this._originalDomNode.style.width=r+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-r+"px",this._modifiedDomNode.style.left=r+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=n-i+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:r,height:n-i}),this.modifiedEditor.layout({width:t-r-e.ENTIRE_DIFF_OVERVIEW_WIDTH,height:n-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(n-i,t,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){let e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){let e=this.modifiedEditor.getLayoutInfo();if(!e)return null;let t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),i=Math.max(0,e.height),r=Math.max(0,i-0),o=n>0?r/n:0;return{height:Math.max(0,Math.floor(e.height*o)),top:Math.floor(t*o)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this.originalEditor,getModifiedEditor:()=>this.modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=a?i=o+1:(i=o,r=o)}return n[i]}_getEquivalentLineForOriginalLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.originalStartLineNumber);if(!t)return e;let n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s}_getEquivalentLineForModifiedLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.modifiedStartLineNumber);if(!t)return e;let n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};ce.ONE_OVERVIEW_WIDTH=15,ce.ENTIRE_DIFF_OVERVIEW_WIDTH=30,ce.UPDATE_DIFF_DECORATIONS_DELAY=200,ce=ie([re(2,X.a),re(3,V.a),re(4,x.b),re(5,$.a),re(6,f.a),re(7,M.c),re(8,K.a),re(9,G.a),re(10,ee.a)],ce);class de extends c.a{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){let t=(e.getColor(L.n)||L.j).transparent(2),n=(e.getColor(L.p)||L.k).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i}getEditorsDiffDecorations(e,t,n,i,r,o,s){r=r.sort((e,t)=>e.afterLineNumber-t.afterLineNumber),i=i.sort((e,t)=>e.afterLineNumber-t.afterLineNumber);let a=this._getViewZones(e,i,r,o,s,n),l=this._getOriginalEditorDecorations(e,t,n,o,s),c=this._getModifiedEditorDecorations(e,t,n,o,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.modified}}}}class ue{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,c=(e,t)=>{if(null===t.domNode&&e.length>0){let n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},d=new ue(this.modifiedForeignVZ),u=new ue(this.originalForeignVZ);for(let h=0,f=this.lineChanges.length;h<=f;h++){let g=h0?-1:0),o=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),i=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,n=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,s=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),a=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(s=r+=1e7+i,a=o+=1e7+n);let p=[],m=[];for(;d.current&&d.current.afterLineNumber<=a;){let e;e=d.current.afterLineNumber<=o?r-o+d.current.afterLineNumber:s;let t=null;g&&g.modifiedStartLineNumber<=d.current.afterLineNumber&&d.current.afterLineNumber<=g.modifiedEndLineNumber&&(t=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),p.push({afterLineNumber:e,heightInLines:d.current.height/this.modifiedLineHeight,domNode:null,marginDomNode:t}),d.advance()}for(;u.current&&u.current.afterLineNumber<=s;){let e;e=u.current.afterLineNumber<=r?o-r+u.current.afterLineNumber:a,m.push({afterLineNumber:e,heightInLines:u.current.height/this.originalLineHeight,domNode:null}),u.advance()}if(null!==g&&ve(g)){let e=this._produceOriginalFromDiff(g,i,n);e&&p.push(e)}if(null!==g&&ye(g)){let e=this._produceModifiedFromDiff(g,i,n);e&&m.push(e)}let _=0,b=0;for(p=p.sort(l),m=m.sort(l);_=i.heightInLines?(n.heightInLines-=i.heightInLines,b++):(i.heightInLines-=n.heightInLines,_++)}for(;_(e.domNode||(e.domNode=function(){let e=document.createElement("div");return e.className="diagonal-fill",e}()),e))}}function fe(e,t,n,i,r){return{range:new B.a(e,t,n,i),options:r}}const ge={charDelete:Y.a.register({className:"char-delete"}),charDeleteWholeLine:Y.a.register({className:"char-delete",isWholeLine:!0}),charInsert:Y.a.register({className:"char-insert"}),charInsertWholeLine:Y.a.register({className:"char-insert",isWholeLine:!0}),lineInsert:Y.a.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Y.a.register({className:"line-insert",linesDecorationsClassName:"insert-sign "+ae.classNames,marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Y.a.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Y.a.register({className:"line-delete",linesDecorationsClassName:"delete-sign "+le.classNames,marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Y.a.register({marginClassName:"line-delete"})};class pe extends de{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new s.a(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this.onSashDragStart()),this._sash.onDidChange(e=>this.onSashDrag(e)),this._sash.onDidEnd(()=>this.onSashDragEnd()),this._sash.onDidReset(()=>this.onSashReset())}setEnableSplitViewResizing(e){let t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){let t=this._dataSource.getWidth()-ce.ENTIRE_DIFF_OVERVIEW_WIDTH,n=Math.floor((e||.5)*t),i=Math.floor(.5*t);return n=this._disableSash?i:n||i,t>2*pe.MINIMUM_EDITOR_WIDTH?(nt-pe.MINIMUM_EDITOR_WIDTH&&(n=t-pe.MINIMUM_EDITOR_WIDTH)):n=i,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}onSashDragStart(){this._startSashPosition=this._sashPosition}onSashDrag(e){let t=this._dataSource.getWidth()-ce.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()}onSashDragEnd(){this._sash.layout()}onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,n,i,r){return new me(e,t,i.getOption(51),n,r.getOption(51)).getViewZones()}_getOriginalEditorDecorations(e,t,n,i,r){const o=String(this._removeColor);let s={decorations:[],overviewZones:[]},a=i.getModel();for(let i=0,r=e.length;it?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}_produceModifiedFromDiff(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}class _e extends de{constructor(e,t){super(e),this.decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(t=>{this.decorationsLeft!==t.decorationsLeft&&(this.decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,n,i,r,o){return new be(e,t,n,i,r,o).getViewZones()}_getOriginalEditorDecorations(e,t,n,i,r){const o=String(this._removeColor);let s={decorations:[],overviewZones:[]};for(let t=0,n=e.length;t
    `])}h+=this.modifiedEditorOptions.get(85);let g=document.createElement("div");g.className=`view-lines line-delete ${ne.a}`,g.innerHTML=r.build(),u.a.applyFontInfoSlow(g,a);let p=document.createElement("div");return p.className="inline-deleted-margin-view-zone",p.innerHTML=o.join(""),u.a.applyFontInfoSlow(p,a),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:h*d,domNode:g,marginDomNode:p,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalContent:f}}}_renderOriginalLine(e,t,n,i,r,o,s){const a=t.getLineTokens(r),l=a.getLineContent(),c=n.get(36),d=U.a.filter(o,r,1,l.length+1);s.appendASCIIString('
    ');const u=k.d.isBasicASCII(l,t.mightContainNonBasicASCII()),h=k.d.containsRTL(l,u,t.mightContainRTL()),f=Object(S.d)(new S.c(c.isMonospace&&!n.get(24),c.canUseHalfwidthRightwardsArrow,l,!1,u,h,0,a,d,i,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,n.get(95),n.get(80),n.get(74),n.get(37)!==v.e.OFF,null),s);s.appendASCIIString("
    ");const g=f.characterMapping.getAbsoluteOffsets();return g.length>0?g[g.length-1]:0}}function ve(e){return e.modifiedEndLineNumber>0}function ye(e){return e.originalEndLineNumber>0}Object(M.g)((e,t)=>{const n=e.getColor(L.n);n&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${n}; }`));const i=e.getColor(L.p);i&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${i}; }`));const r=e.getColor(L.o);r&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const o=e.getColor(L.q);o&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const s=e.getColor(L.ic);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor(L.l);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(L.kc);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(L.lc);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const d=e.getColor(L.jc);d&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t`);const u=e.getColor(L.m);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${u} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${u} 50%, ${u} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)})},function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=e[Symbol.iterator]()).next.bind(i)}var i=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),r=(i.defaults,i.getDefaults,i.changeDefaults,/[&<>"']/),o=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function u(e){return e.replace(d,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g,f=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,p={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){p[" "+e]||(m.test(e)?p[" "+e]=e+"/":p[" "+e]=y(e,"/",!0));var n=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}function y(e,t,n){var i=e.length;if(0===i)return"";for(var r=0;r=0&&"\\"===n[r];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var i=t[t.length-1];if(i&&"paragraph"===i.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:N(r,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:I(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var i,r=n.align.length;for(i=0;i ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,i,r,o,s,a,l,c=t[0],d=t[2],u=d.length>1,h=")"===d[d.length-1],f={type:"list",raw:c,ordered:u,start:u?+d.slice(0,-1):"",loose:!1,items:[]},g=t[0].match(this.rules.block.item),p=!1,m=g.length,_=0;_1||this.options.smartLists&&r!==d)&&(o=g.slice(_+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),_=m-1)),s=p||/\n\n(?!\s*$)/.test(n),_!==m-1&&(p="\n"===n.charAt(n.length-1),s||(s=p)),s&&(f.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:a,checked:l,loose:s,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):A(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:I(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var i,r=n.align.length;for(i=0;i/i.test(i[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):A(i[0]):i[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=R(t[2],"()");if(n>-1){var i=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,i).trim(),t[3]=""}var r=t[2],o="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s?(r=s[1],o=s[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return P(t,{href:(r=r.trim().replace(/^<([\s\S]*)>$/,"$1"))?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var i=(n[2]||n[1]).replace(/\s+/g," ");if(!(i=t[i.toLowerCase()])||!i.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return P(n,i,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.strong.start.exec(e);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,o="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(i=o.exec(t));)if(r=this.rules.inline.strong.middle.exec(t.slice(0,i.index+3)))return{type:"strong",raw:e.slice(0,r[0].length),text:e.slice(2,r[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.em.start.exec(e);if(i&&(!i[1]||i[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,o="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(i=o.exec(t));)if(r=this.rules.inline.em.middle.exec(t.slice(0,i.index+2)))return{type:"em",raw:e.slice(0,r[0].length),text:e.slice(1,r[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),i=/[^ ]/.test(n),r=n.startsWith(" ")&&n.endsWith(" ");return i&&r&&(n=n.substring(1,n.length-1)),n=A(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,i,r=this.rules.inline.autolink.exec(e);if(r)return i="@"===r[2]?"mailto:"+(n=A(this.options.mangle?t(r[1]):r[1])):n=A(r[1]),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var i,r;if("@"===n[2])r="mailto:"+(i=A(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);i=A(n[0]),r="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}},t.inlineText=function(e,t,n){var i,r=this.rules.inline.text.exec(e);if(r)return i=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):A(r[0]):r[0]:A(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}},e}(),F=x,B=S,W=L,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:F,table:F,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=B(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=B(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=B(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=B(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=B(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=B(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=W({},H),H.gfm=W({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=B(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=B(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=W({},H.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:B(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};Y.punctuation=B(Y.punctuation).replace(/punctuation/g,Y._punctuation).getRegex(),Y._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Y._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Y._comment=B(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Y.em.start=B(Y.em.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.middle=B(Y.em.middle).replace(/punctuation/g,Y._punctuation).replace(/overlapSkip/g,Y._overlapSkip).getRegex(),Y.em.endAst=B(Y.em.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.endUnd=B(Y.em.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.start=B(Y.strong.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.middle=B(Y.strong.middle).replace(/punctuation/g,Y._punctuation).replace(/blockSkip/g,Y._blockSkip).getRegex(),Y.strong.endAst=B(Y.strong.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.endUnd=B(Y.strong.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.blockSkip=B(Y._blockSkip,"g").getRegex(),Y.overlapSkip=B(Y._overlapSkip,"g").getRegex(),Y._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Y._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Y._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Y.autolink=B(Y.autolink).replace("scheme",Y._scheme).replace("email",Y._email).getRegex(),Y._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Y.tag=B(Y.tag).replace("comment",Y._comment).replace("attribute",Y._attribute).getRegex(),Y._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Y.link=B(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex(),Y.reflink=B(Y.reflink).replace("label",Y._label).getRegex(),Y.reflinkSearch=B(Y.reflinkSearch,"g").replace("reflink",Y.reflink).replace("nolink",Y.nolink).getRegex(),Y.normal=W({},Y),Y.pedantic=W({},Y.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:B(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()}),Y.gfm=W({},Y.normal,{escape:B(Y.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}var G=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||z,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:U.normal,inline:$.normal};this.options.pedantic?(t.block=U.pedantic,t.inline=$.pedantic):this.options.gfm&&(t.block=U.gfm,this.options.breaks?t.inline=$.breaks:t.inline=$.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,i,r,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var i,r,o,s;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),i.type&&t.push(i);else if(i=this.tokenizer.code(e,t))e=e.substring(i.raw.length),i.type?t.push(i):((s=t[t.length-1]).raw+="\n"+i.raw,s.text+="\n"+i.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.nptable(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],n),t.push(i);else if(i=this.tokenizer.list(e)){for(e=e.substring(i.raw.length),o=i.items.length,r=0;r0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,i))e=e.substring(o.raw.length),n=o.inLink,i=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,i)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,i)),t.push(o);else if(o=this.tokenizer.strong(e,a,r))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),t.push(o);else if(o=this.tokenizer.em(e,a,r))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,i),t.push(o);else if(o=this.tokenizer.autolink(e,K))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,K))){if(o=this.tokenizer.inlineText(e,i,q))e=e.substring(o.raw.length),r=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,r=[{key:"rules",get:function(){return{block:U,inline:$}}}],(i=null)&&e(n.prototype,i),r&&e(n,r),t}(),Z=i.defaults,J=k,X=w,Q=function(){function e(e){this.options=e||Z}var t=e.prototype;return t.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,i);null!=r&&r!==e&&(n=!0,e=r)}return i?'
    '+(n?e:X(e,!0))+"
    \n":"
    "+(n?e:X(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,n,i){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do{n=e+"-"+ ++i}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ne=i.defaults,ie=C,re=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,i,r,o,s,a,l,c,d,u,h,f,g,p,m,_,b,v,y="",w=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=v+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=v+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:v}):p+=v),p+=this.parse(m.tokens,g),d+=this.renderer.listitem(p,b,_);y+=this.renderer.list(d,h,f);continue;case"html":y+=this.renderer.html(u.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(d=u.tokens?this.parseInline(u.tokens):u.text;n+1An error occurred:

    "+ae(e.message+"",!0)+"
    ";throw e}}return ue.options=ue.setOptions=function(e){return oe(ue.defaults,e),ce(ue.defaults),ue},ue.getDefaults=le,ue.defaults=de,ue.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=ue.defaults.renderer||new Q,i=function(t){var i=n[t];n[t]=function(){for(var r=arguments.length,o=new Array(r),s=0;s1)for(var n=1;n4?e:void 0}());var t},i.isLegacyOpera=function(){return!!window.opera}},function(e,t,n){var i=n(654);e.exports={Graph:i.Graph,json:n(751),alg:n(752),version:i.version}},function(e,t,n){var i=n(353),r=4;e.exports=function(e){return i(e,r)}},function(e,t,n){var i=n(240),r=n(298),o=n(245),s=n(683),a=n(689),l=n(359),c=n(360),d=n(692),u=n(693),h=n(364),f=n(694),g=n(193),p=n(698),m=n(699),_=n(369),b=n(85),v=n(191),y=n(703),w=n(132),C=n(705),S=n(157),k=1,x=2,L=4,M="[object Arguments]",D="[object Function]",E="[object GeneratorFunction]",T="[object Object]",O={};O[M]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[T]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[D]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,N,I,A,R){var P,j=n&k,F=n&x,B=n&L;if(N&&(P=A?N(t,I,A,R):N(t)),void 0!==P)return P;if(!w(t))return t;var W=b(t);if(W){if(P=p(t),!j)return c(t,P)}else{var H=g(t),Y=H==D||H==E;if(v(t))return l(t,j);if(H==T||H==M||Y&&!A){if(P=F||Y?{}:_(t),!j)return F?u(t,a(P,t)):d(t,s(P,t))}else{if(!O[H])return A?t:{};P=m(t,H,j)}}R||(R=new i);var V=R.get(t);if(V)return V;R.set(t,P),C(t)?t.forEach((function(i){P.add(e(i,n,N,i,t,R))})):y(t)&&t.forEach((function(i,r){P.set(r,e(i,n,N,r,t,R))}));var z=B?F?f:h:F?keysIn:S,U=W?void 0:z(t);return r(U||t,(function(i,r){U&&(i=t[r=i]),o(P,r,e(i,n,N,r,t,R))})),P}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(238))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var i=n(177),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},function(e,t,n){var i=n(684),r=n(214),o=n(85),s=n(191),a=n(247),l=n(216),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&r(e),u=!n&&!d&&s(e),h=!n&&!d&&!u&&l(e),f=n||d||u||h,g=f?i(e.length,String):[],p=g.length;for(var m in e)!t&&!c.call(e,m)||f&&("length"==m||u&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,p))||g.push(m);return g}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){(function(e){var i=n(142),r=t&&!t.nodeType&&t,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}}).call(this,n(215)(e))},function(e,t){e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++nh))return!1;var g=d.get(e);if(g&&d.get(t))return g==t;var p=-1,m=!0,_=n&a?new i:void 0;for(d.set(e,t),d.set(t,e);++p0&&(o=l.removeMin(),(s=a[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(c);return a}(e,String(t),n||o,i||function(t){return e.outEdges(t)})};var o=i.constant(1)},function(e,t,n){var i=n(131);function r(){this._arr=[],this._keyIndices={}}e.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},r.prototype.has=function(e){return i.has(this._keyIndices,e)},r.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!i.has(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},r.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},r.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,r=e;n>1].priority1&&s(e,t[0],t[1])?t=[]:n>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),r(e,i(t,1),[])}));e.exports=a},function(e,t,n){var i=n(245),r=n(781);e.exports=function(e,t){return r(e||[],t||[],i)}},function(e,t,n){"use strict";var i=n(74),r=n(141).Graph,o=n(261).slack;function s(e,t){return i.forEach(e.nodes(),(function n(r){i.forEach(t.nodeEdges(r),(function(i){var s=i.v,a=r===s?i.w:s;e.hasNode(a)||o(t,i)||(e.setNode(a,{}),e.setEdge(r,a,{}),n(a))}))})),e.nodeCount()}function a(e,t){return i.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function l(e,t,n){i.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,i=new r({directed:!1}),c=e.nodes()[0],d=e.nodeCount();i.setNode(c,{});for(;s(i,e)0&&(o=l.removeMin(),(s=a[o]).distance!==Number.POSITIVE_INFINITY);)i(o).forEach(c);return a}(e,String(t),n||o,i||function(t){return e.outEdges(t)})};var o=i.constant(1)},function(e,t,n){var i=n(133);function r(){this._arr=[],this._keyIndices={}}e.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},r.prototype.has=function(e){return i.has(this._keyIndices,e)},r.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!i.has(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},r.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},r.prototype._heapify=function(e){var t=this._arr,n=2*e,i=n+1,r=e;n>1].priority1&&s.sort((function(e,t){var i=e.x-n.x,r=e.y-n.y,o=Math.sqrt(i*i+r*r),s=t.x-n.x,a=t.y-n.y,l=Math.sqrt(s*s+a*a);return oMath.abs(s)*c?(a<0&&(c=-c),n=0===a?0:c*s/a,i=c):(s<0&&(l=-l),n=l,i=0===s?0:l*a/s);return{x:r+n,y:o+i}}},function(e,t,n){var i=n(134);e.exports=function(e,t){var n=e.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":r.insert(o);break;case"object":r.insert((function(){return o}));break;default:r.html(o)}i.applyStyle(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var s=r.node().getBoundingClientRect();return n.attr("width",s.width).attr("height",s.height),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(135),r=n(221),o=n(867),s={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(e){if(35===e.charCodeAt(0)){var t=e.match(s.re);if(t){var n=t[1],i=parseInt(n,16),o=n.length,a=o%4==0,l=o>4,c=l?1:17,d=l?8:4,u=a?0:-1,h=l?255:15;return r.default.set({r:(i>>d*(u+3)&h)*c,g:(i>>d*(u+2)&h)*c,b:(i>>d*(u+1)&h)*c,a:a?(i&h)*c/255:1},e)}}},stringify:function(e){return e.a<1?"#"+o.DEC2HEX[Math.round(e.r)]+o.DEC2HEX[Math.round(e.g)]+o.DEC2HEX[Math.round(e.b)]+i.default.unit.frac2hex(e.a):"#"+o.DEC2HEX[Math.round(e.r)]+o.DEC2HEX[Math.round(e.g)]+o.DEC2HEX[Math.round(e.b)]}};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(135),r=n(221),o=n(144);t.default=function(e,t,n,s){void 0===s&&(s=1);var a=r.default.set({h:i.default.channel.clamp.h(e),s:i.default.channel.clamp.s(t),l:i.default.channel.clamp.l(n),a:i.default.channel.clamp.a(s)});return o.default.stringify(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(166);t.default=function(e){return i.default(e,"a")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(135),r=n(144);t.default=function(e){var t=r.default.parse(e),n=t.r,o=t.g,s=t.b,a=.2126*i.default.channel.toLinear(n)+.7152*i.default.channel.toLinear(o)+.0722*i.default.channel.toLinear(s);return i.default.lang.round(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(430);t.default=function(e){return i.default(e)>=.5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(181);t.default=function(e,t){return i.default(e,"a",t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(181);t.default=function(e,t){return i.default(e,"a",-t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(144),r=n(264);t.default=function(e,t){var n=i.default.parse(e),o={};for(var s in t)t[s]&&(o[s]=n[s]+t[s]);return r.default(e,o)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(144),r=n(263);t.default=function(e,t,n){void 0===n&&(n=50);var o=i.default.parse(e),s=o.r,a=o.g,l=o.b,c=o.a,d=i.default.parse(t),u=d.r,h=d.g,f=d.b,g=d.a,p=n/100,m=2*p-1,_=c-g,b=((m*_==-1?m:(m+_)/(1+m*_))+1)/2,v=1-b,y=s*b+u*v,w=a*b+h*v,C=l*b+f*v,S=c*p+g*(1-p);return r.default(y,w,C,S)}},function(e,t){},function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},o=function(e){return function(t,n,o,s){var a=i(t),l=r[e][i(t)];return 2===a&&(l=l[n?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,r,o,s){var a=n(t),l=i[e][n(t)];return 2===a&&(l=l[r?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i,r;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(i=+e,r={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return i+=1===e?"dan":"dana";case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),i=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function o(e){return e>1&&e<5&&1!=~~(e/10)}function s(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"pár sekund":"pár sekundami";case"ss":return t||i?r+(o(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":i?"minutu":"minutou";case"mm":return t||i?r+(o(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?r+(o(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||i?"den":"dnem";case"dd":return t||i?r+(o(e)?"dny":"dní"):r+"dny";case"M":return t||i?"měsíc":"měsícem";case"MM":return t||i?r+(o(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||i?"rok":"rokem";case"yy":return t||i?r+(o(e)?"roky":"let"):r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,i=this._calendarEl[e],r=t&&t.hours();return((n=i)instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(i=i.apply(t)),i.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[n][2]?r[n][2]:r[n][1]:i?r[n][0]:r[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function i(e,i,r,o){var s="";switch(r){case"s":return o?"muutaman sekunnin":"muutama sekunti";case"ss":return o?"sekunnin":"sekuntia";case"m":return o?"minuutin":"minuutti";case"mm":s=o?"minuutin":"minuuttia";break;case"h":return o?"tunnin":"tunti";case"hh":s=o?"tunnin":"tuntia";break;case"d":return o?"päivän":"päivä";case"dd":s=o?"päivän":"päivää";break;case"M":return o?"kuukauden":"kuukausi";case"MM":s=o?"kuukauden":"kuukautta";break;case"y":return o?"vuoden":"vuosi";case"yy":s=o?"vuoden":"vuotta"}return s=function(e,i){return e<10?i?n[e]:t[e]:e}(e,o)+" "+s}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?r[n][0]:r[n][1]}e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return i+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return i+=1===e?"dan":"dana";case"MM":return i+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return i+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,i){var r=e;switch(n){case"s":return i||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(i||t)?" másodperc":" másodperce";case"m":return"egy"+(i||t?" perc":" perce");case"mm":return r+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" óra":" órája");case"hh":return r+(i||t?" óra":" órája");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return r+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" hónap":" hónapja");case"MM":return r+(i||t?" hónap":" hónapja");case"y":return"egy"+(i||t?" év":" éve");case"yy":return r+(i||t?" év":" éve")}return""}function i(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,i,r){var o=e+" ";switch(i){case"s":return n||r?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?o+(n||r?"sekúndur":"sekúndum"):o+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?o+(n||r?"mínútur":"mínútum"):n?o+"mínúta":o+"mínútu";case"hh":return t(e)?o+(n||r?"klukkustundir":"klukkustundum"):o+"klukkustund";case"d":return n?"dagur":r?"dag":"degi";case"dd":return t(e)?n?o+"dagar":o+(r?"daga":"dögum"):n?o+"dagur":o+(r?"dag":"degi");case"M":return n?"mánuður":r?"mánuð":"mánuði";case"MM":return t(e)?n?o+"mánuðir":o+(r?"mánuði":"mánuðum"):n?o+"mánuður":o+(r?"mánuð":"mánuði");case"y":return n||r?"ár":"ári";case"yy":return t(e)?o+(n||r?"ár":"árum"):o+(n||r?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:i,monthsShort:i,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,i){return t?r(n)[0]:i?r(n)[1]:r(n)[2]}function i(e){return e%10==0||e>10&&e<20}function r(e){return t[e].split("_")}function o(e,t,o,s){var a=e+" ";return 1===e?a+n(0,t,o[0],s):t?a+(i(e)?r(o)[1]:r(o)[0]):s?a+r(o)[1]:a+(i(e)?r(o)[1]:r(o)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,i){return t?"kelios sekundės":i?"kelių sekundžių":"kelias sekundes"},ss:o,m:n,mm:o,h:n,hh:o,d:n,dd:o,M:n,MM:o,y:n,yy:o},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function i(e,i,r){return e+" "+n(t[r],e,i)}function r(e,i,r){return n(t[r],e,i)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:i,m:r,mm:i,h:r,hh:i,d:r,dd:i,M:r,MM:i,y:r,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function i(e,t,n,i){var r="";if(t)switch(n){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे"}else switch(n){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां"}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function r(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,i){return e?""===i?"("+n[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(i)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=" ";return(e%100>=20||e>=100&&e%100==0)&&(i=" de "),e+i+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i,r;return"m"===n?t?"минута":"минуту":e+" "+(i=+e,r={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2])}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function i(e){return e>1&&e<5}function r(e,t,n,r){var o=e+" ";switch(n){case"s":return t||r?"pár sekúnd":"pár sekundami";case"ss":return t||r?o+(i(e)?"sekundy":"sekúnd"):o+"sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?o+(i(e)?"minúty":"minút"):o+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?o+(i(e)?"hodiny":"hodín"):o+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?o+(i(e)?"dni":"dní"):o+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?o+(i(e)?"mesiace":"mesiacov"):o+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?o+(i(e)?"roky":"rokov"):o+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"nekaj sekund":"nekaj sekundami";case"ss":return r+=1===e?t?"sekundo":"sekundi":2===e?t||i?"sekundi":"sekundah":e<5?t||i?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return r+=1===e?t?"minuta":"minuto":2===e?t||i?"minuti":"minutama":e<5?t||i?"minute":"minutami":t||i?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return r+=1===e?t?"ura":"uro":2===e?t||i?"uri":"urama":e<5?t||i?"ure":"urami":t||i?"ur":"urami";case"d":return t||i?"en dan":"enim dnem";case"dd":return r+=1===e?t||i?"dan":"dnem":2===e?t||i?"dni":"dnevoma":t||i?"dni":"dnevi";case"M":return t||i?"en mesec":"enim mesecem";case"MM":return r+=1===e?t||i?"mesec":"mesecem":2===e?t||i?"meseca":"mesecema":e<5?t||i?"mesece":"meseci":t||i?"mesecev":"meseci";case"y":return t||i?"eno leto":"enim letom";case"yy":return r+=1===e?t||i?"leto":"letom":2===e?t||i?"leti":"letoma":e<5?t||i?"leta":"leti":t||i?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,i,r){var o=function(e){var n=Math.floor(e%1e3/100),i=Math.floor(e%100/10),r=e%10,o="";return n>0&&(o+=t[n]+"vatlh"),i>0&&(o+=(""!==o?" ":"")+t[i]+"maH"),r>0&&(o+=(""!==o?" ":"")+t[r]),""===o?"pagh":o}(e);switch(i){case"ss":return o+" lup";case"mm":return o+" tup";case"hh":return o+" rep";case"dd":return o+" jaj";case"MM":return o+" jar";case"yy":return o+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return i?r[n][0]:t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"يېرىم كېچە":i<900?"سەھەر":i<1130?"چۈشتىن بۇرۇن":i<1230?"چۈش":i<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";function t(e,t,n){var i,r;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(i=+e,r={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2])}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(21))},function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(21))},function(e,t,n){"use strict";n.r(t);var i=function(e,t){return et?1:e>=t?0:NaN},r=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return i(t(e),n)}),{left:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;e(t[o],n)>0?r=o:i=o+1}return i}}};var o=r(i),s=o.right,a=o.left,l=s,c=function(e,t){null==t&&(t=d);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);ne?1:t>=e?0:NaN},f=function(e){return null===e?NaN:+e},g=function(e,t){var n,i,r=e.length,o=0,s=-1,a=0,l=0;if(null==t)for(;++s1)return l/(o-1)},p=function(e,t){var n=g(e,t);return n?Math.sqrt(n):n},m=function(e,t){var n,i,r,o=e.length,s=-1;if(null==t){for(;++s=n)for(i=r=n;++sn&&(i=n),r=n)for(i=r=n;++sn&&(i=n),r0)return[e];if((i=t0)for(e=Math.ceil(e/s),t=Math.floor(t/s),o=new Array(r=Math.ceil(t-e+1));++a=0?(o>=S?10:o>=k?5:o>=x?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=S?10:o>=k?5:o>=x?2:1)}function D(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=S?r*=10:o>=k?r*=5:o>=x&&(r*=2),tu;)h.pop(),--f;var g,p=new Array(f+1);for(r=0;r<=f;++r)(g=p[r]=[]).x0=r>0?h[r-1]:d,g.x1=r=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,o=Math.floor(r),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(r-o)}},N=function(e,t,n){return e=v.call(e,f).sort(i),Math.ceil((n-t)/(2*(O(e,.75)-O(e,.25))*Math.pow(e.length,-1/3)))},I=function(e,t,n){return Math.ceil((n-t)/(3.5*p(e)*Math.pow(e.length,-1/3)))},A=function(e,t){var n,i,r=e.length,o=-1;if(null==t){for(;++o=n)for(i=n;++oi&&(i=n)}else for(;++o=n)for(i=n;++oi&&(i=n);return i},R=function(e,t){var n,i=e.length,r=i,o=-1,s=0;if(null==t)for(;++o=0;)for(t=(i=e[r]).length;--t>=0;)n[--s]=i[t];return n},F=function(e,t){var n,i,r=e.length,o=-1;if(null==t){for(;++o=n)for(i=n;++on&&(i=n)}else for(;++o=n)for(i=n;++on&&(i=n);return i},B=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},W=function(e,t){if(n=e.length){var n,r,o=0,s=0,a=e[s];for(null==t&&(t=i);++o=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function fe(e,t){for(var n,i=0,r=e.length;i0)for(var n,i,r=new Array(n),o=0;ot?1:e>=t?0:NaN}var Me="http://www.w3.org/1999/xhtml",De={svg:"http://www.w3.org/2000/svg",xhtml:Me,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ee=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),De.hasOwnProperty(t)?{space:De[t],local:e}:e};function Te(e){return function(){this.removeAttribute(e)}}function Oe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ne(e,t){return function(){this.setAttribute(e,t)}}function Ie(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ae(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Re(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Pe=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function je(e){return function(){this.style.removeProperty(e)}}function Fe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Be(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function We(e,t){return e.style.getPropertyValue(t)||Pe(e).getComputedStyle(e,null).getPropertyValue(t)}function He(e){return function(){delete this[e]}}function Ye(e,t){return function(){this[e]=t}}function Ve(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function ze(e){return e.trim().split(/^|\s+/)}function Ue(e){return e.classList||new $e(e)}function $e(e){this._node=e,this._names=ze(e.getAttribute("class")||"")}function qe(e,t){for(var n=Ue(e),i=-1,r=t.length;++i=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Xe(){this.textContent=""}function Qe(e){return function(){this.textContent=e}}function et(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function tt(){this.innerHTML=""}function nt(e){return function(){this.innerHTML=e}}function it(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function rt(){this.nextSibling&&this.parentNode.appendChild(this)}function ot(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function st(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Me&&t.documentElement.namespaceURI===Me?t.createElement(e):t.createElementNS(n,e)}}function at(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var lt=function(e){var t=Ee(e);return(t.local?at:st)(t)};function ct(){return null}function dt(){var e=this.parentNode;e&&e.removeChild(this)}function ut(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ht(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}var ft={},gt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ft={mouseenter:"mouseover",mouseleave:"mouseout"}));function pt(e,t,n){return e=mt(e,t,n),function(t){var n=t.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||e.call(this,t)}}function mt(e,t,n){return function(i){var r=gt;gt=i;try{e.call(this,this.__data__,t,n)}finally{gt=r}}}function _t(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function bt(e){return function(){var t=this.__on;if(t){for(var n,i=0,r=-1,o=t.length;i=w&&(w=y+1);!(v=_[w])&&++w=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Le);for(var n=this._groups,i=n.length,r=new Array(i),o=0;o1?this.each((null==t?je:"function"==typeof t?Be:Fe)(e,t,null==n?"":n)):We(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?He:"function"==typeof t?Ve:Ye)(e,t)):this.node()[e]},classed:function(e,t){var n=ze(e+"");if(arguments.length<2){for(var i=Ue(this.node()),r=-1,o=n.length;++r>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?new en(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?new en(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Wt.exec(e))?new en(t[1],t[2],t[3],1):(t=Ht.exec(e))?new en(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Yt.exec(e))?Jt(t[1],t[2],t[3],t[4]):(t=Vt.exec(e))?Jt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zt.exec(e))?on(t[1],t[2]/100,t[3]/100,1):(t=Ut.exec(e))?on(t[1],t[2]/100,t[3]/100,t[4]):$t.hasOwnProperty(e)?Zt($t[e]):"transparent"===e?new en(NaN,NaN,NaN,0):null}function Zt(e){return new en(e>>16&255,e>>8&255,255&e,1)}function Jt(e,t,n,i){return i<=0&&(e=t=n=NaN),new en(e,t,n,i)}function Xt(e){return e instanceof Rt||(e=Gt(e)),e?new en((e=e.rgb()).r,e.g,e.b,e.opacity):new en}function Qt(e,t,n,i){return 1===arguments.length?Xt(e):new en(e,t,n,null==i?1:i)}function en(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function tn(){return"#"+rn(this.r)+rn(this.g)+rn(this.b)}function nn(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function rn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function on(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ln(e,t,n,i)}function sn(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof Rt||(e=Gt(e)),!e)return new ln;if(e instanceof ln)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(n-i)/a+6*(n0&&l<1?0:s,new ln(s,a,l,e.opacity)}function an(e,t,n,i){return 1===arguments.length?sn(e):new ln(e,t,n,null==i?1:i)}function ln(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function cn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function dn(e,t,n,i,r){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*i+s*r)/6}It(Rt,Gt,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:qt,formatHex:qt,formatHsl:function(){return sn(this).formatHsl()},formatRgb:Kt,toString:Kt}),It(en,Qt,At(Rt,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tn,formatHex:tn,formatRgb:nn,toString:nn})),It(ln,an,At(Rt,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ln(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new en(cn(e>=240?e-240:e+120,r,i),cn(e,r,i),cn(e<120?e+240:e-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var un=function(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[i],o=e[i+1],s=i>0?e[i-1]:2*r-o,a=i180||n<-180?n-360*Math.round(n/360):n):fn(isNaN(e)?t:e)}function mn(e){return 1==(e=+e)?_n:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):fn(isNaN(t)?n:t)}}function _n(e,t){var n=t-e;return n?gn(e,n):fn(isNaN(e)?t:e)}var bn=function e(t){var n=mn(t);function i(e,t){var i=n((e=Qt(e)).r,(t=Qt(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),s=_n(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function vn(e){return function(t){var n,i,r=t.length,o=new Array(r),s=new Array(r),a=new Array(r);for(n=0;no&&(r=t.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Mn(n,i)})),o=Tn.lastIndex;return o=0&&t._call.call(null,e),t=t._next;--Bn}function Qn(){zn=(Vn=$n.now())+Un,Bn=Wn=0;try{Xn()}finally{Bn=0,function(){var e,t,n=On,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:On=t);Nn=e,ti(i)}(),zn=0}}function ei(){var e=$n.now(),t=e-Vn;t>Yn&&(Un-=t,Vn=e)}function ti(e){Bn||(Wn&&(Wn=clearTimeout(Wn)),e-zn>24?(e<1/0&&(Wn=setTimeout(Qn,e-$n.now()-Un)),Hn&&(Hn=clearInterval(Hn))):(Hn||(Vn=$n.now(),Hn=setInterval(ei,Yn)),Bn=1,qn(Qn)))}Zn.prototype=Jn.prototype={constructor:Zn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Kn():+n)+(null==t?0:+t),this._next||Nn===this||(Nn?Nn._next=this:On=this,Nn=this),this._call=e,this._time=n,ti()},stop:function(){this._call&&(this._call=null,this._time=1/0,ti())}};var ni=function(e,t,n){var i=new Zn;return t=null==t?0:+t,i.restart((function(n){i.stop(),e(n+t)}),t,n),i},ii=pe("start","end","cancel","interrupt"),ri=[],oi=0,si=1,ai=2,li=3,ci=4,di=5,ui=6,hi=function(e,t,n,i,r,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var i,r=e.__transition;function o(l){var c,d,u,h;if(n.state!==si)return a();for(c in r)if((h=r[c]).name===n.name){if(h.state===li)return ni(o);h.state===ci?(h.state=ui,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+coi)throw new Error("too late; already scheduled");return n}function gi(e,t){var n=pi(e,t);if(n.state>li)throw new Error("too late; already running");return n}function pi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var mi,_i,bi,vi,yi=function(e,t){var n,i,r,o=e.__transition,s=!0;if(o){for(r in t=null==t?null:t+"",o)(n=o[r]).name===t?(i=n.state>ai&&n.state180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Mn(e,t)})):t&&n.push(r(n)+"rotate("+t+i)}(o.rotate,s.rotate,a,l),function(e,t,n,o){e!==t?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Mn(e,t)}):t&&n.push(r(n)+"skewX("+t+i)}(o.skewX,s.skewX,a,l),function(e,t,n,i,o,s){if(e!==n||t!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Mn(e,n)},{i:a-2,x:Mn(t,i)})}else 1===n&&1===i||o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,l),o=s=null,function(e){for(var t,n=-1,i=l.length;++n=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?fi:gi;return function(){var s=o(this,e),a=s.on;a!==i&&(r=(i=a).copy()).on(t,n),s.on=r}}var Ui=Mt.prototype.constructor;function $i(e){return function(){this.style.removeProperty(e)}}function qi(e,t,n){var i,r;function o(){var o=t.apply(this,arguments);return o!==r&&(i=(r=o)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,o,n)),i}return o._value=t,o}function Ki(e){var t,n;function i(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}var Gi=0;function Zi(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Ji(e){return Mt().transition(e)}function Xi(){return++Gi}var Qi=Mt.prototype;function er(e){return e*e*e}function tr(e){return--e*e*e+1}function nr(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Zi.prototype=Ji.prototype={constructor:Zi,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=_e(e));for(var i=this._groups,r=i.length,o=new Array(r),s=0;ssi&&n.name===t)return new Zi([[e]],or,t,+i);return null},ar=function(e){return function(){return e}},lr=function(e,t,n){this.target=e,this.type=t,this.selection=n};function cr(){gt.stopImmediatePropagation()}var dr=function(){gt.preventDefault(),gt.stopImmediatePropagation()},ur={name:"drag"},hr={name:"space"},fr={name:"handle"},gr={name:"center"};function pr(e){return[+e[0],+e[1]]}function mr(e){return[pr(e[0]),pr(e[1])]}var _r={name:"x",handles:["w","e"].map(xr),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},br={name:"y",handles:["n","s"].map(xr),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},vr={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(xr),input:function(e){return null==e?null:mr(e)},output:function(e){return e}},yr={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},wr={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Cr={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Sr={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},kr={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function xr(e){return{type:e}}function Lr(){return!gt.ctrlKey&&!gt.button}function Mr(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Dr(){return navigator.maxTouchPoints||"ontouchstart"in this}function Er(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Tr(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function Or(){return Ar(_r)}function Nr(){return Ar(br)}var Ir=function(){return Ar(vr)};function Ar(e){var t,n=Mr,i=Lr,r=Dr,o=!0,s=pe("start","brush","end"),a=6;function l(t){var n=t.property("__brush",p).selectAll(".overlay").data([xr("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yr.overlay).merge(n).each((function(){var e=Er(this).extent;Dt(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([xr("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return yr[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=Dt(this),t=Er(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-a/2:t[0][0]-a/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-a/2:t[0][1]-a/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+a:a})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+a:a}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function d(e,t,n){return!n&&e.__brush.emitter||new u(e,t)}function u(e,t){this.that=e,this.args=t,this.state=e.__brush,this.active=0}function h(){if((!t||gt.touches)&&i.apply(this,arguments)){var n,r,s,a,l,u,h,f,g,p,m,_,b=this,v=gt.target.__data__.type,y="selection"===(o&>.metaKey?v="overlay":v)?ur:o&>.altKey?gr:fr,w=e===br?null:Sr[v],C=e===_r?null:kr[v],S=Er(b),k=S.extent,x=S.selection,L=k[0][0],M=k[0][1],D=k[1][0],E=k[1][1],T=0,O=0,N=w&&C&&o&>.shiftKey,I=gt.touches?(_=gt.changedTouches[0].identifier,function(e){return jn(e,gt.touches,_)}):Fn,A=I(b),R=A,P=d(b,arguments,!0).beforestart();"overlay"===v?(x&&(g=!0),S.selection=x=[[n=e===br?L:A[0],s=e===_r?M:A[1]],[l=e===br?D:n,h=e===_r?E:s]]):(n=x[0][0],s=x[0][1],l=x[1][0],h=x[1][1]),r=n,a=s,u=l,f=h;var j=Dt(b).attr("pointer-events","none"),F=j.selectAll(".overlay").attr("cursor",yr[v]);if(gt.touches)P.moved=W,P.ended=Y;else{var B=Dt(gt.view).on("mousemove.brush",W,!0).on("mouseup.brush",Y,!0);o&&B.on("keydown.brush",(function(){switch(gt.keyCode){case 16:N=w&&C;break;case 18:y===fr&&(w&&(l=u-T*w,n=r+T*w),C&&(h=f-O*C,s=a+O*C),y=gr,H());break;case 32:y!==fr&&y!==gr||(w<0?l=u-T:w>0&&(n=r-T),C<0?h=f-O:C>0&&(s=a-O),y=hr,F.attr("cursor",yr.selection),H());break;default:return}dr()}),!0).on("keyup.brush",(function(){switch(gt.keyCode){case 16:N&&(p=m=N=!1,H());break;case 18:y===gr&&(w<0?l=u:w>0&&(n=r),C<0?h=f:C>0&&(s=a),y=fr,H());break;case 32:y===hr&&(gt.altKey?(w&&(l=u-T*w,n=r+T*w),C&&(h=f-O*C,s=a+O*C),y=gr):(w<0?l=u:w>0&&(n=r),C<0?h=f:C>0&&(s=a),y=fr),F.attr("cursor",yr[v]),H());break;default:return}dr()}),!0),Ot(gt.view)}cr(),yi(b),c.call(b),P.start()}function W(){var e=I(b);!N||p||m||(Math.abs(e[0]-R[0])>Math.abs(e[1]-R[1])?m=!0:p=!0),R=e,g=!0,dr(),H()}function H(){var e;switch(T=R[0]-A[0],O=R[1]-A[1],y){case hr:case ur:w&&(T=Math.max(L-n,Math.min(D-l,T)),r=n+T,u=l+T),C&&(O=Math.max(M-s,Math.min(E-h,O)),a=s+O,f=h+O);break;case fr:w<0?(T=Math.max(L-n,Math.min(D-n,T)),r=n+T,u=l):w>0&&(T=Math.max(L-l,Math.min(D-l,T)),r=n,u=l+T),C<0?(O=Math.max(M-s,Math.min(E-s,O)),a=s+O,f=h):C>0&&(O=Math.max(M-h,Math.min(E-h,O)),a=s,f=h+O);break;case gr:w&&(r=Math.max(L,Math.min(D,n-T*w)),u=Math.max(L,Math.min(D,l+T*w))),C&&(a=Math.max(M,Math.min(E,s-O*C)),f=Math.max(M,Math.min(E,h+O*C)))}u1e-6)if(Math.abs(d*a-l*c)>1e-6&&r){var h=n-o,f=i-s,g=a*a+l*l,p=h*h+f*f,m=Math.sqrt(g),_=Math.sqrt(u),b=r*Math.tan((Ur-Math.acos((g+u-p)/(2*m*_)))/2),v=b/_,y=b/m;Math.abs(v-1)>1e-6&&(this._+="L"+(e+v*c)+","+(t+v*d)),this._+="A"+r+","+r+",0,0,"+ +(d*h>c*f)+","+(this._x1=e+y*a)+","+(this._y1=t+y*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,i,r,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=e+s,c=t+a,d=1^o,u=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%$r+$r),u>qr?this._+="A"+n+","+n+",0,1,"+d+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):u>1e-6&&(this._+="A"+n+","+n+",0,"+ +(u>=Ur)+","+d+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var Zr=Gr;function Jr(e){return e.source}function Xr(e){return e.target}function Qr(e){return e.radius}function eo(e){return e.startAngle}function to(e){return e.endAngle}var no=function(){var e=Jr,t=Xr,n=Qr,i=eo,r=to,o=null;function s(){var s,a=Vr.call(arguments),l=e.apply(this,a),c=t.apply(this,a),d=+n.apply(this,(a[0]=l,a)),u=i.apply(this,a)-Fr,h=r.apply(this,a)-Fr,f=d*Rr(u),g=d*Pr(u),p=+n.apply(this,(a[0]=c,a)),m=i.apply(this,a)-Fr,_=r.apply(this,a)-Fr;if(o||(o=s=Zr()),o.moveTo(f,g),o.arc(0,0,d,u,h),u===m&&h===_||(o.quadraticCurveTo(0,0,p*Rr(m),p*Pr(m)),o.arc(0,0,p,m,_)),o.quadraticCurveTo(0,0,f,g),o.closePath(),s)return o=null,s+""||null}return s.radius=function(e){return arguments.length?(n="function"==typeof e?e:zr(+e),s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:zr(+e),s):i},s.endAngle=function(e){return arguments.length?(r="function"==typeof e?e:zr(+e),s):r},s.source=function(t){return arguments.length?(e=t,s):e},s.target=function(e){return arguments.length?(t=e,s):t},s.context=function(e){return arguments.length?(o=null==e?null:e,s):o},s};function io(){}function ro(e,t){var n=new io;if(e instanceof io)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,r=-1,o=e.length;if(null==t)for(;++r=i.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var l,c,d,u=-1,h=n.length,f=i[r++],g=oo(),p=s();++ui.length)return n;var s,a=r[o-1];return null!=t&&o>=i.length?s=n.entries():(s=[],n.each((function(t,n){s.push({key:n,values:e(t,o)})}))),null!=a?s.sort((function(e,t){return a(e.key,t.key)})):s}(o(e,0,co,uo),0)},key:function(e){return i.push(e),n},sortKeys:function(e){return r[i.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}};function ao(){return{}}function lo(e,t,n){e[t]=n}function co(){return oo()}function uo(e,t,n){e.set(t,n)}function ho(){}var fo=oo.prototype;function go(e,t){var n=new ho;if(e instanceof ho)e.each((function(e){n.add(e)}));else if(e){var i=-1,r=e.length;if(null==t)for(;++iMo?Math.pow(e,1/3):e/Lo+ko}function Io(e){return e>xo?e*e*e:Lo*(e-ko)}function Ao(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ro(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Po(e){if(e instanceof Bo)return new Bo(e.h,e.c,e.l,e.opacity);if(e instanceof Oo||(e=Do(e)),0===e.a&&0===e.b)return new Bo(NaN,0i!=f>i&&n<(h-c)*(i-d)/(f-d)+c&&(r=-r)}return r}function ts(e,t,n){var i,r,o,s;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(r=e[i=+(e[0]===t[0])],o=n[i],s=t[i],r<=o&&o<=s||s<=o&&o<=r)}var ns=function(){},is=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],rs=function(){var e=1,t=1,n=E,i=a;function r(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(Zo);else{var i=m(e),r=i[0],s=i[1];t=D(r,s,t),t=C(Math.floor(r/t)*t,Math.floor(s/t)*t,t)}return t.map((function(t){return o(e,t)}))}function o(n,r){var o=[],a=[];return function(n,i,r){var o,a,l,c,d,u,h=new Array,f=new Array;o=a=-1,c=n[0]>=i,is[c<<1].forEach(g);for(;++o=i,is[l|c<<1].forEach(g);is[c<<0].forEach(g);for(;++a=i,d=n[a*e]>=i,is[c<<1|d<<2].forEach(g);++o=i,u=d,d=n[a*e+o+1]>=i,is[l|c<<1|d<<2|u<<3].forEach(g);is[c|d<<3].forEach(g)}o=-1,d=n[a*e]>=i,is[d<<2].forEach(g);for(;++o=i,is[d<<2|u<<3].forEach(g);function g(e){var t,n,i=[e[0][0]+o,e[0][1]+a],l=[e[1][0]+o,e[1][1]+a],c=s(i),d=s(l);(t=f[c])?(n=h[d])?(delete f[t.end],delete h[n.start],t===n?(t.ring.push(l),r(t.ring)):h[t.start]=f[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete f[t.end],t.ring.push(l),f[t.end=d]=t):(t=h[d])?(n=f[c])?(delete h[t.start],delete f[n.end],t===n?(t.ring.push(l),r(t.ring)):h[n.start]=f[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete h[t.start],t.ring.unshift(i),h[t.start=c]=t):h[c]=f[d]={start:c,end:d,ring:[i,l]}}is[d<<3].forEach(g)}(n,r,(function(e){i(e,n,r),Jo(e)>0?o.push([e]):a.push(e)})),a.forEach((function(e){for(var t,n=0,i=o.length;n0&&s0&&a0&&o>0))throw new Error("invalid size");return e=i,t=o,r},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:Array.isArray(e)?Xo(Go.call(e)):Xo(e),r):n},r.smooth=function(e){return arguments.length?(i=e?a:ns,r):i===a},r};function os(e,t,n){for(var i=e.width,r=e.height,o=1+(n<<1),s=0;s=n&&(a>=o&&(l-=e.data[a-o+s*i]),t.data[a-n+s*i]=l/Math.min(a+1,i-1+o-a,o))}function ss(e,t,n){for(var i=e.width,r=e.height,o=1+(n<<1),s=0;s=n&&(a>=o&&(l-=e.data[s+(a-o)*i]),t.data[s+(a-n)*i]=l/Math.min(a+1,r-1+o-a,o))}function as(e){return e[0]}function ls(e){return e[1]}function cs(){return 1}var ds=function(){var e=as,t=ls,n=cs,i=960,r=500,o=20,s=2,a=3*o,l=i+2*a>>s,c=r+2*a>>s,d=Xo(20);function u(i){var r=new Float32Array(l*c),u=new Float32Array(l*c);i.forEach((function(i,o,d){var u=+e(i,o,d)+a>>s,h=+t(i,o,d)+a>>s,f=+n(i,o,d);u>=0&&u=0&&h>s),ss({width:l,height:c,data:u},{width:l,height:c,data:r},o>>s),os({width:l,height:c,data:r},{width:l,height:c,data:u},o>>s),ss({width:l,height:c,data:u},{width:l,height:c,data:r},o>>s),os({width:l,height:c,data:r},{width:l,height:c,data:u},o>>s),ss({width:l,height:c,data:u},{width:l,height:c,data:r},o>>s);var f=d(r);if(!Array.isArray(f)){var g=A(r);f=D(0,g,f),(f=C(0,Math.floor(g/f)*f,f)).shift()}return rs().thresholds(f).size([l,c])(r).map(h)}function h(e){return e.value*=Math.pow(2,-2*s),e.coordinates.forEach(f),e}function f(e){e.forEach(g)}function g(e){e.forEach(p)}function p(e){e[0]=e[0]*Math.pow(2,s)-a,e[1]=e[1]*Math.pow(2,s)-a}function m(){return l=i+2*(a=3*o)>>s,c=r+2*a>>s,u}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:Xo(+t),u):e},u.y=function(e){return arguments.length?(t="function"==typeof e?e:Xo(+e),u):t},u.weight=function(e){return arguments.length?(n="function"==typeof e?e:Xo(+e),u):n},u.size=function(e){if(!arguments.length)return[i,r];var t=Math.ceil(e[0]),n=Math.ceil(e[1]);if(!(t>=0||t>=0))throw new Error("invalid size");return i=t,r=n,m()},u.cellSize=function(e){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(e)/Math.LN2),m()},u.thresholds=function(e){return arguments.length?(d="function"==typeof e?e:Array.isArray(e)?Xo(Go.call(e)):Xo(e),u):d},u.bandwidth=function(e){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((e=+e)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*e*e+1)-1)/2),m()},u},us=function(e){return function(){return e}};function hs(e,t,n,i,r,o,s,a,l,c){this.target=e,this.type=t,this.subject=n,this.identifier=i,this.active=r,this.x=o,this.y=s,this.dx=a,this.dy=l,this._=c}function fs(){return!gt.ctrlKey&&!gt.button}function gs(){return this.parentNode}function ps(e){return null==e?{x:gt.x,y:gt.y}:e}function ms(){return navigator.maxTouchPoints||"ontouchstart"in this}hs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var _s=function(){var e,t,n,i,r=fs,o=gs,s=ps,a=ms,l={},c=pe("start","drag","end"),d=0,u=0;function h(e){e.on("mousedown.drag",f).filter(a).on("touchstart.drag",m).on("touchmove.drag",_).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){if(!i&&r.apply(this,arguments)){var s=v("mouse",o.apply(this,arguments),Fn,this,arguments);s&&(Dt(gt.view).on("mousemove.drag",g,!0).on("mouseup.drag",p,!0),Ot(gt.view),Et(),n=!1,e=gt.clientX,t=gt.clientY,s("start"))}}function g(){if(Tt(),!n){var i=gt.clientX-e,r=gt.clientY-t;n=i*i+r*r>u}l.mouse("drag")}function p(){Dt(gt.view).on("mousemove.drag mouseup.drag",null),Nt(gt.view,n),Tt(),l.mouse("end")}function m(){if(r.apply(this,arguments)){var e,t,n=gt.changedTouches,i=o.apply(this,arguments),s=n.length;for(e=0;e9999?"+"+xs(t,6):xs(t,4))+"-"+xs(e.getUTCMonth()+1,2)+"-"+xs(e.getUTCDate(),2)+(o?"T"+xs(n,2)+":"+xs(i,2)+":"+xs(r,2)+"."+xs(o,3)+"Z":r?"T"+xs(n,2)+":"+xs(i,2)+":"+xs(r,2)+"Z":i||n?"T"+xs(n,2)+":"+xs(i,2)+"Z":"")}var Ms=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function i(e,t){var i,r=[],o=e.length,s=0,a=0,l=o<=0,c=!1;function d(){if(l)return vs;if(c)return c=!1,bs;var t,i,r=s;if(e.charCodeAt(r)===ys){for(;s++=o?l=!0:(i=e.charCodeAt(s++))===ws?c=!0:i===Cs&&(c=!0,e.charCodeAt(s)===ws&&++s),e.slice(r+1,t-1).replace(/""/g,'"')}for(;s=(o=(p+_)/2))?p=o:_=o,(d=n>=(s=(m+b)/2))?m=s:b=s,r=f,!(f=f[u=d<<1|c]))return r[u]=g,e;if(a=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===a&&n===l)return g.next=f,r?r[u]=g:e._root=g,e;do{r=r?r[u]=new Array(4):e._root=new Array(4),(c=t>=(o=(p+_)/2))?p=o:_=o,(d=n>=(s=(m+b)/2))?m=s:b=s}while((u=d<<1|c)==(h=(l>=s)<<1|a>=o));return r[h]=f,r[u]=g,e}var Ja=function(e,t,n,i,r){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=r};function Xa(e){return e[0]}function Qa(e){return e[1]}function el(e,t,n){var i=new tl(null==t?Xa:t,null==n?Qa:n,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function tl(e,t,n,i,r,o){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function nl(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var il=el.prototype=tl.prototype;function rl(e){return e.x+e.vx}function ol(e){return e.y+e.vy}il.copy=function(){var e,t,n=new tl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=nl(i),n;for(e=[{source:i,target:n._root=new Array(4)}];i=e.pop();)for(var r=0;r<4;++r)(t=i.source[r])&&(t.length?e.push({source:t,target:i.target[r]=new Array(4)}):i.target[r]=nl(t));return n},il.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return Za(this.cover(t,n),t,n,e)},il.addAll=function(e){var t,n,i,r,o=e.length,s=new Array(o),a=new Array(o),l=1/0,c=1/0,d=-1/0,u=-1/0;for(n=0;nd&&(d=i),ru&&(u=r));if(l>d||c>u)return this;for(this.cover(l,c).cover(d,u),n=0;ne||e>=r||i>t||t>=o;)switch(a=(th||(o=l.y0)>f||(s=l.x1)=_)<<1|e>=m)&&(l=g[g.length-1],g[g.length-1]=g[g.length-1-c],g[g.length-1-c]=l)}else{var b=e-+this._x.call(null,p.data),v=t-+this._y.call(null,p.data),y=b*b+v*v;if(y=(a=(g+m)/2))?g=a:m=a,(d=s>=(l=(p+_)/2))?p=l:_=l,t=f,!(f=f[u=d<<1|c]))return this;if(!f.length)break;(t[u+1&3]||t[u+2&3]||t[u+3&3])&&(n=t,h=u)}for(;f.data!==e;)if(i=f,!(f=f.next))return this;return(r=f.next)&&delete f.next,i?(r?i.next=r:delete i.next,this):t?(r?t[u]=r:delete t[u],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[h]=f:this._root=f),this):(this._root=r,this)},il.removeAll=function(e){for(var t=0,n=e.length;tl+f||rc+f||oa.index){var g=l-s.x-s.vx,p=c-s.y-s.vy,m=g*g+p*p;me.r&&(e.r=e[t].r)}function a(){if(t){var i,r,o=t.length;for(n=new Array(o),i=0;i1?(null==n?a.remove(e):a.set(e,f(n)),t):a.get(e)},find:function(t,n,i){var r,o,s,a,l,c=0,d=e.length;for(null==i?i=1/0:i*=i,c=0;c1?(c.on(e,n),t):c.on(e)}}},pl=function(){var e,t,n,i,r=Ka(-30),o=1,s=1/0,a=.81;function l(i){var r,o=e.length,s=el(e,dl,ul).visitAfter(d);for(n=i,r=0;r=s)){(e.data!==t||e.next)&&(0===d&&(f+=(d=Ga())*d),0===u&&(f+=(u=Ga())*u),f1?i[0]+i.slice(2):i,+e.slice(n+1)]},yl=function(e){return(e=vl(Math.abs(e)))?e[1]:NaN},wl=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cl(e){if(!(t=wl.exec(e)))throw new Error("invalid format: "+e);var t;return new Sl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Sl(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}Cl.prototype=Sl.prototype,Sl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var kl,xl,Ll,Ml,Dl=function(e){e:for(var t,n=e.length,i=1,r=-1;i0){if(!+e[i])break e;r=0}}return r>0?e.slice(0,r)+e.slice(t+1):e},El=function(e,t){var n=vl(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},Tl={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return El(100*e,t)},r:El,s:function(e,t){var n=vl(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(kl=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+vl(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Ol=function(e){return e},Nl=Array.prototype.map,Il=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Al=function(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?Ol:(t=Nl.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var r=e.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),r=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?Ol:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Nl.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",d=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=Cl(e)).fill,n=e.align,u=e.sign,h=e.symbol,f=e.zero,g=e.width,p=e.comma,m=e.precision,_=e.trim,b=e.type;"n"===b?(p=!0,b="g"):Tl[b]||(void 0===m&&(m=12),_=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===h?r:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===h?o:/[%p]/.test(b)?l:"",w=Tl[b],C=/[defgprs%]/.test(b);function S(e){var r,o,l,h=v,S=y;if("c"===b)S=w(e)+S,e="";else{var k=(e=+e)<0;if(e=isNaN(e)?d:w(Math.abs(e),m),_&&(e=Dl(e)),k&&0==+e&&(k=!1),h=(k?"("===u?u:c:"-"===u||"("===u?"":u)+h,S=("s"===b?Il[8+kl/3]:"")+S+(k&&"("===u?")":""),C)for(r=-1,o=e.length;++r(l=e.charCodeAt(r))||l>57){S=(46===l?s+e.slice(r+1):e.slice(r))+S,e=e.slice(0,r);break}}p&&!f&&(e=i(e,1/0));var x=h.length+e.length+S.length,L=x>1)+h+e+S+L.slice(x);break;default:e=L+h+e+S}return a(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return e+""},S}return{format:u,formatPrefix:function(e,t){var n=u(((e=Cl(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(yl(t)/3))),r=Math.pow(10,-i),o=Il[8+i/3];return function(e){return n(r*e)+o}}}};function Rl(e){return xl=Al(e),Ll=xl.format,Ml=xl.formatPrefix,xl}Rl({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var Pl=function(e){return Math.max(0,-yl(Math.abs(e)))},jl=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yl(t)/3)))-yl(Math.abs(e)))},Fl=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yl(t)-yl(e))+1},Bl=function(){return new Wl};function Wl(){this.reset()}Wl.prototype={constructor:Wl,reset:function(){this.s=this.t=0},add:function(e){Yl(Hl,e,this.t),Yl(this,Hl.s,this.s),this.s?this.t+=Hl.t:this.s=Hl.t},valueOf:function(){return this.s}};var Hl=new Wl;function Yl(e,t,n){var i=e.s=t+n,r=i-t,o=i-r;e.t=t-o+(n-r)}var Vl=1e-6,zl=1e-12,Ul=Math.PI,$l=Ul/2,ql=Ul/4,Kl=2*Ul,Gl=180/Ul,Zl=Ul/180,Jl=Math.abs,Xl=Math.atan,Ql=Math.atan2,ec=Math.cos,tc=Math.ceil,nc=Math.exp,ic=(Math.floor,Math.log),rc=Math.pow,oc=Math.sin,sc=Math.sign||function(e){return e>0?1:e<0?-1:0},ac=Math.sqrt,lc=Math.tan;function cc(e){return e>1?0:e<-1?Ul:Math.acos(e)}function dc(e){return e>1?$l:e<-1?-$l:Math.asin(e)}function uc(e){return(e=oc(e/2))*e}function hc(){}function fc(e,t){e&&pc.hasOwnProperty(e.type)&&pc[e.type](e,t)}var gc={Feature:function(e,t){fc(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i=0?1:-1,r=i*n,o=ec(t=(t*=Zl)/2+ql),s=oc(t),a=Cc*s,l=wc*o+a*ec(r),c=a*i*oc(r);kc.add(Ql(c,l)),yc=e,wc=o,Cc=s}var Oc=function(e){return xc.reset(),Sc(e,Lc),2*xc};function Nc(e){return[Ql(e[1],e[0]),dc(e[2])]}function Ic(e){var t=e[0],n=e[1],i=ec(n);return[i*ec(t),i*oc(t),oc(n)]}function Ac(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Rc(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Pc(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function jc(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Fc(e){var t=ac(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Bc,Wc,Hc,Yc,Vc,zc,Uc,$c,qc,Kc,Gc=Bl(),Zc={point:Jc,lineStart:Qc,lineEnd:ed,polygonStart:function(){Zc.point=td,Zc.lineStart=nd,Zc.lineEnd=id,Gc.reset(),Lc.polygonStart()},polygonEnd:function(){Lc.polygonEnd(),Zc.point=Jc,Zc.lineStart=Qc,Zc.lineEnd=ed,kc<0?(Bc=-(Hc=180),Wc=-(Yc=90)):Gc>Vl?Yc=90:Gc<-Vl&&(Wc=-90),Kc[0]=Bc,Kc[1]=Hc},sphere:function(){Bc=-(Hc=180),Wc=-(Yc=90)}};function Jc(e,t){qc.push(Kc=[Bc=e,Hc=e]),tYc&&(Yc=t)}function Xc(e,t){var n=Ic([e*Zl,t*Zl]);if($c){var i=Rc($c,n),r=Rc([i[1],-i[0],0],i);Fc(r),r=Nc(r);var o,s=e-Vc,a=s>0?1:-1,l=r[0]*Gl*a,c=Jl(s)>180;c^(a*VcYc&&(Yc=o):c^(a*Vc<(l=(l+360)%360-180)&&lYc&&(Yc=t)),c?erd(Bc,Hc)&&(Hc=e):rd(e,Hc)>rd(Bc,Hc)&&(Bc=e):Hc>=Bc?(eHc&&(Hc=e)):e>Vc?rd(Bc,e)>rd(Bc,Hc)&&(Hc=e):rd(e,Hc)>rd(Bc,Hc)&&(Bc=e)}else qc.push(Kc=[Bc=e,Hc=e]);tYc&&(Yc=t),$c=n,Vc=e}function Qc(){Zc.point=Xc}function ed(){Kc[0]=Bc,Kc[1]=Hc,Zc.point=Jc,$c=null}function td(e,t){if($c){var n=e-Vc;Gc.add(Jl(n)>180?n+(n>0?360:-360):n)}else zc=e,Uc=t;Lc.point(e,t),Xc(e,t)}function nd(){Lc.lineStart()}function id(){td(zc,Uc),Lc.lineEnd(),Jl(Gc)>Vl&&(Bc=-(Hc=180)),Kc[0]=Bc,Kc[1]=Hc,$c=null}function rd(e,t){return(t-=e)<0?t+360:t}function od(e,t){return e[0]-t[0]}function sd(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:trd(i[0],i[1])&&(i[1]=r[1]),rd(r[0],i[1])>rd(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(s=-1/0,t=0,i=o[n=o.length-1];t<=n;i=r,++t)r=o[t],(a=rd(i[1],r[0]))>s&&(s=a,Bc=r[0],Hc=i[1])}return qc=Kc=null,Bc===1/0||Wc===1/0?[[NaN,NaN],[NaN,NaN]]:[[Bc,Wc],[Hc,Yc]]},kd={sphere:hc,point:xd,lineStart:Md,lineEnd:Td,polygonStart:function(){kd.lineStart=Od,kd.lineEnd=Nd},polygonEnd:function(){kd.lineStart=Md,kd.lineEnd=Td}};function xd(e,t){e*=Zl;var n=ec(t*=Zl);Ld(n*ec(e),n*oc(e),oc(t))}function Ld(e,t,n){++ad,cd+=(e-cd)/ad,dd+=(t-dd)/ad,ud+=(n-ud)/ad}function Md(){kd.point=Dd}function Dd(e,t){e*=Zl;var n=ec(t*=Zl);yd=n*ec(e),wd=n*oc(e),Cd=oc(t),kd.point=Ed,Ld(yd,wd,Cd)}function Ed(e,t){e*=Zl;var n=ec(t*=Zl),i=n*ec(e),r=n*oc(e),o=oc(t),s=Ql(ac((s=wd*o-Cd*r)*s+(s=Cd*i-yd*o)*s+(s=yd*r-wd*i)*s),yd*i+wd*r+Cd*o);ld+=s,hd+=s*(yd+(yd=i)),fd+=s*(wd+(wd=r)),gd+=s*(Cd+(Cd=o)),Ld(yd,wd,Cd)}function Td(){kd.point=xd}function Od(){kd.point=Id}function Nd(){Ad(bd,vd),kd.point=xd}function Id(e,t){bd=e,vd=t,e*=Zl,t*=Zl,kd.point=Ad;var n=ec(t);yd=n*ec(e),wd=n*oc(e),Cd=oc(t),Ld(yd,wd,Cd)}function Ad(e,t){e*=Zl;var n=ec(t*=Zl),i=n*ec(e),r=n*oc(e),o=oc(t),s=wd*o-Cd*r,a=Cd*i-yd*o,l=yd*r-wd*i,c=ac(s*s+a*a+l*l),d=dc(c),u=c&&-d/c;pd+=u*s,md+=u*a,_d+=u*l,ld+=d,hd+=d*(yd+(yd=i)),fd+=d*(wd+(wd=r)),gd+=d*(Cd+(Cd=o)),Ld(yd,wd,Cd)}var Rd=function(e){ad=ld=cd=dd=ud=hd=fd=gd=pd=md=_d=0,Sc(e,kd);var t=pd,n=md,i=_d,r=t*t+n*n+i*i;return rUl?e+Math.round(-e/Kl)*Kl:e,t]}function Bd(e,t,n){return(e%=Kl)?t||n?jd(Hd(e),Yd(t,n)):Hd(e):t||n?Yd(t,n):Fd}function Wd(e){return function(t,n){return[(t+=e)>Ul?t-Kl:t<-Ul?t+Kl:t,n]}}function Hd(e){var t=Wd(e);return t.invert=Wd(-e),t}function Yd(e,t){var n=ec(e),i=oc(e),r=ec(t),o=oc(t);function s(e,t){var s=ec(t),a=ec(e)*s,l=oc(e)*s,c=oc(t),d=c*n+a*i;return[Ql(l*r-d*o,a*n-c*i),dc(d*r+l*o)]}return s.invert=function(e,t){var s=ec(t),a=ec(e)*s,l=oc(e)*s,c=oc(t),d=c*r-l*o;return[Ql(l*r+c*o,a*n+d*i),dc(d*n-a*i)]},s}Fd.invert=Fd;var Vd=function(e){function t(t){return(t=e(t[0]*Zl,t[1]*Zl))[0]*=Gl,t[1]*=Gl,t}return e=Bd(e[0]*Zl,e[1]*Zl,e.length>2?e[2]*Zl:0),t.invert=function(t){return(t=e.invert(t[0]*Zl,t[1]*Zl))[0]*=Gl,t[1]*=Gl,t},t};function zd(e,t,n,i,r,o){if(n){var s=ec(t),a=oc(t),l=i*n;null==r?(r=t+i*Kl,o=t-l/2):(r=Ud(s,r),o=Ud(s,o),(i>0?ro)&&(r+=i*Kl));for(var c,d=r;i>0?d>o:d1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},Kd=function(e,t){return Jl(e[0]-t[0])=0;--o)r.point((d=c[o])[0],d[1]);else i(h.x,h.p.x,-1,r);h=h.p}c=(h=h.o).z,f=!f}while(!h.v);r.lineEnd()}}};function Jd(e){if(t=e.length){for(var t,n,i=0,r=e[0];++i=0?1:-1,x=k*S,L=x>Ul,M=p*w;if(Xd.add(Ql(M*k*oc(x),m*C+M*ec(x))),s+=L?S+k*Kl:S,L^f>=n^v>=n){var D=Rc(Ic(h),Ic(b));Fc(D);var E=Rc(o,D);Fc(E);var T=(L^S>=0?-1:1)*dc(E[2]);(i>T||i===T&&(D[0]||D[1]))&&(a+=L^S>=0?1:-1)}}return(s<-Vl||s0){for(u||(r.polygonStart(),u=!0),r.lineStart(),e=0;e1&&2&l&&h.push(h.pop().concat(h.shift())),s.push(h.filter(nu))}return h}};function nu(e){return e.length>1}function iu(e,t){return((e=e.x)[0]<0?e[1]-$l-Vl:$l-e[1])-((t=t.x)[0]<0?t[1]-$l-Vl:$l-t[1])}var ru=tu((function(){return!0}),(function(e){var t,n=NaN,i=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var a=o>0?Ul:-Ul,l=Jl(o-n);Jl(l-Ul)0?$l:-$l),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(a,i),e.point(o,i),t=0):r!==a&&l>=Ul&&(Jl(n-r)Vl?Xl((oc(t)*(o=ec(i))*oc(n)-oc(i)*(r=ec(t))*oc(e))/(r*o*s)):(t+i)/2}(n,i,o,s),e.point(r,i),e.lineEnd(),e.lineStart(),e.point(a,i),t=0),e.point(n=o,i=s),r=a},lineEnd:function(){e.lineEnd(),n=i=NaN},clean:function(){return 2-t}}}),(function(e,t,n,i){var r;if(null==e)r=n*$l,i.point(-Ul,r),i.point(0,r),i.point(Ul,r),i.point(Ul,0),i.point(Ul,-r),i.point(0,-r),i.point(-Ul,-r),i.point(-Ul,0),i.point(-Ul,r);else if(Jl(e[0]-t[0])>Vl){var o=e[0]0,r=Jl(t)>Vl;function o(e,n){return ec(e)*ec(n)>t}function s(e,n,i){var r=[1,0,0],o=Rc(Ic(e),Ic(n)),s=Ac(o,o),a=o[0],l=s-a*a;if(!l)return!i&&e;var c=t*s/l,d=-t*a/l,u=Rc(r,o),h=jc(r,c);Pc(h,jc(o,d));var f=u,g=Ac(h,f),p=Ac(f,f),m=g*g-p*(Ac(h,h)-1);if(!(m<0)){var _=ac(m),b=jc(f,(-g-_)/p);if(Pc(b,h),b=Nc(b),!i)return b;var v,y=e[0],w=n[0],C=e[1],S=n[1];w0^b[1]<(Jl(b[0]-y)Ul^(y<=b[0]&&b[0]<=w)){var L=jc(f,(-g+_)/p);return Pc(L,h),[b,Nc(L)]}}}function a(t,n){var r=i?e:Ul-e,o=0;return t<-r?o|=1:t>r&&(o|=2),n<-r?o|=4:n>r&&(o|=8),o}return tu(o,(function(e){var t,n,l,c,d;return{lineStart:function(){c=l=!1,d=1},point:function(u,h){var f,g=[u,h],p=o(u,h),m=i?p?0:a(u,h):p?a(u+(u<0?Ul:-Ul),h):0;if(!t&&(c=l=p)&&e.lineStart(),p!==l&&(!(f=s(t,g))||Kd(t,f)||Kd(g,f))&&(g[0]+=Vl,g[1]+=Vl,p=o(g[0],g[1])),p!==l)d=0,p?(e.lineStart(),f=s(g,t),e.point(f[0],f[1])):(f=s(t,g),e.point(f[0],f[1]),e.lineEnd()),t=f;else if(r&&t&&i^p){var _;m&n||!(_=s(g,t,!0))||(d=0,i?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1])))}!p||t&&Kd(t,g)||e.point(g[0],g[1]),t=g,l=p,n=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return d|(c&&l)<<1}}}),(function(t,i,r,o){zd(o,e,n,r,t,i)}),i?[0,-e]:[-Ul,e-Ul])},su=function(e,t,n,i,r,o){var s,a=e[0],l=e[1],c=0,d=1,u=t[0]-a,h=t[1]-l;if(s=n-a,u||!(s>0)){if(s/=u,u<0){if(s0){if(s>d)return;s>c&&(c=s)}if(s=r-a,u||!(s<0)){if(s/=u,u<0){if(s>d)return;s>c&&(c=s)}else if(u>0){if(s0)){if(s/=h,h<0){if(s0){if(s>d)return;s>c&&(c=s)}if(s=o-l,h||!(s<0)){if(s/=h,h<0){if(s>d)return;s>c&&(c=s)}else if(h>0){if(s0&&(e[0]=a+c*u,e[1]=l+c*h),d<1&&(t[0]=a+d*u,t[1]=l+d*h),!0}}}}},au=1e9,lu=-au;function cu(e,t,n,i){function r(r,o){return e<=r&&r<=n&&t<=o&&o<=i}function o(r,o,a,c){var d=0,u=0;if(null==r||(d=s(r,a))!==(u=s(o,a))||l(r,o)<0^a>0)do{c.point(0===d||3===d?e:n,d>1?i:t)}while((d=(d+a+4)%4)!==u);else c.point(o[0],o[1])}function s(i,r){return Jl(i[0]-e)0?0:3:Jl(i[0]-n)0?2:1:Jl(i[1]-t)0?1:0:r>0?3:2}function a(e,t){return l(e.x,t.x)}function l(e,t){var n=s(e,1),i=s(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){var l,c,d,u,h,f,g,p,m,_,b,v=s,y=qd(),w={point:C,lineStart:function(){w.point=S,c&&c.push(d=[]);_=!0,m=!1,g=p=NaN},lineEnd:function(){l&&(S(u,h),f&&m&&y.rejoin(),l.push(y.result()));w.point=C,m&&v.lineEnd()},polygonStart:function(){v=y,l=[],c=[],b=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=c.length;ni&&(h-o)*(i-s)>(f-s)*(e-o)&&++t:f<=i&&(h-o)*(i-s)<(f-s)*(e-o)&&--t;return t}(),n=b&&t,r=(l=j(l)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),r&&Zd(l,a,t,o,s),s.polygonEnd());v=s,l=c=d=null}};function C(e,t){r(e,t)&&v.point(e,t)}function S(o,s){var a=r(o,s);if(c&&d.push([o,s]),_)u=o,h=s,f=a,_=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&m)v.point(o,s);else{var l=[g=Math.max(lu,Math.min(au,g)),p=Math.max(lu,Math.min(au,p))],y=[o=Math.max(lu,Math.min(au,o)),s=Math.max(lu,Math.min(au,s))];su(l,y,e,t,n,i)?(m||(v.lineStart(),v.point(l[0],l[1])),v.point(y[0],y[1]),a||v.lineEnd(),b=!1):a&&(v.lineStart(),v.point(o,s),b=!1)}g=o,p=s,m=a}return w}}var du,uu,hu,fu=function(){var e,t,n,i=0,r=0,o=960,s=500;return n={stream:function(n){return e&&t===n?e:e=cu(i,r,o,s)(t=n)},extent:function(a){return arguments.length?(i=+a[0][0],r=+a[0][1],o=+a[1][0],s=+a[1][1],e=t=null,n):[[i,r],[o,s]]}}},gu=Bl(),pu={sphere:hc,point:hc,lineStart:function(){pu.point=_u,pu.lineEnd=mu},lineEnd:hc,polygonStart:hc,polygonEnd:hc};function mu(){pu.point=pu.lineEnd=hc}function _u(e,t){du=e*=Zl,uu=oc(t*=Zl),hu=ec(t),pu.point=bu}function bu(e,t){e*=Zl;var n=oc(t*=Zl),i=ec(t),r=Jl(e-du),o=ec(r),s=i*oc(r),a=hu*n-uu*i*o,l=uu*n+hu*i*o;gu.add(Ql(ac(s*s+a*a),l)),du=e,uu=n,hu=i}var vu=function(e){return gu.reset(),Sc(e,pu),+gu},yu=[null,null],wu={type:"LineString",coordinates:yu},Cu=function(e,t){return yu[0]=e,yu[1]=t,vu(wu)},Su={Feature:function(e,t){return xu(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i0&&(r=Cu(e[o],e[o-1]))>0&&n<=r&&i<=r&&(n+i-r)*(1-Math.pow((n-i)/r,2))Vl})).map(l)).concat(C(tc(o/f)*f,r,f).filter((function(e){return Jl(e%p)>Vl})).map(c))}return _.lines=function(){return b().map((function(e){return{type:"LineString",coordinates:e}}))},_.outline=function(){return{type:"Polygon",coordinates:[d(i).concat(u(s).slice(1),d(n).reverse().slice(1),u(a).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),a>s&&(e=a,a=s,s=e),_.precision(m)):[[i,a],[n,s]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],r=+n[1][1],t>e&&(n=t,t=e,e=n),o>r&&(n=o,o=r,r=n),_.precision(m)):[[t,o],[e,r]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(g=+e[0],p=+e[1],_):[g,p]},_.stepMinor=function(e){return arguments.length?(h=+e[0],f=+e[1],_):[h,f]},_.precision=function(h){return arguments.length?(m=+h,l=Nu(o,r,90),c=Iu(t,e,m),d=Nu(a,s,90),u=Iu(i,n,m),_):m},_.extentMajor([[-180,-90+Vl],[180,90-Vl]]).extentMinor([[-180,-80-Vl],[180,80+Vl]])}function Ru(){return Au()()}var Pu,ju,Fu,Bu,Wu=function(e,t){var n=e[0]*Zl,i=e[1]*Zl,r=t[0]*Zl,o=t[1]*Zl,s=ec(i),a=oc(i),l=ec(o),c=oc(o),d=s*ec(n),u=s*oc(n),h=l*ec(r),f=l*oc(r),g=2*dc(ac(uc(o-i)+s*l*uc(r-n))),p=oc(g),m=g?function(e){var t=oc(e*=g)/p,n=oc(g-e)/p,i=n*d+t*h,r=n*u+t*f,o=n*a+t*c;return[Ql(r,i)*Gl,Ql(o,ac(i*i+r*r))*Gl]}:function(){return[n*Gl,i*Gl]};return m.distance=g,m},Hu=function(e){return e},Yu=Bl(),Vu=Bl(),zu={point:hc,lineStart:hc,lineEnd:hc,polygonStart:function(){zu.lineStart=Uu,zu.lineEnd=Ku},polygonEnd:function(){zu.lineStart=zu.lineEnd=zu.point=hc,Yu.add(Jl(Vu)),Vu.reset()},result:function(){var e=Yu/2;return Yu.reset(),e}};function Uu(){zu.point=$u}function $u(e,t){zu.point=qu,Pu=Fu=e,ju=Bu=t}function qu(e,t){Vu.add(Bu*e-Fu*t),Fu=e,Bu=t}function Ku(){qu(Pu,ju)}var Gu=zu,Zu=1/0,Ju=Zu,Xu=-Zu,Qu=Xu;var eh,th,nh,ih,rh={point:function(e,t){eXu&&(Xu=e);tQu&&(Qu=t)},lineStart:hc,lineEnd:hc,polygonStart:hc,polygonEnd:hc,result:function(){var e=[[Zu,Ju],[Xu,Qu]];return Xu=Qu=-(Ju=Zu=1/0),e}},oh=0,sh=0,ah=0,lh=0,ch=0,dh=0,uh=0,hh=0,fh=0,gh={point:ph,lineStart:mh,lineEnd:vh,polygonStart:function(){gh.lineStart=yh,gh.lineEnd=wh},polygonEnd:function(){gh.point=ph,gh.lineStart=mh,gh.lineEnd=vh},result:function(){var e=fh?[uh/fh,hh/fh]:dh?[lh/dh,ch/dh]:ah?[oh/ah,sh/ah]:[NaN,NaN];return oh=sh=ah=lh=ch=dh=uh=hh=fh=0,e}};function ph(e,t){oh+=e,sh+=t,++ah}function mh(){gh.point=_h}function _h(e,t){gh.point=bh,ph(nh=e,ih=t)}function bh(e,t){var n=e-nh,i=t-ih,r=ac(n*n+i*i);lh+=r*(nh+e)/2,ch+=r*(ih+t)/2,dh+=r,ph(nh=e,ih=t)}function vh(){gh.point=ph}function yh(){gh.point=Ch}function wh(){Sh(eh,th)}function Ch(e,t){gh.point=Sh,ph(eh=nh=e,th=ih=t)}function Sh(e,t){var n=e-nh,i=t-ih,r=ac(n*n+i*i);lh+=r*(nh+e)/2,ch+=r*(ih+t)/2,dh+=r,uh+=(r=ih*e-nh*t)*(nh+e),hh+=r*(ih+t),fh+=3*r,ph(nh=e,ih=t)}var kh=gh;function xh(e){this._context=e}xh.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Kl)}},result:hc};var Lh,Mh,Dh,Eh,Th,Oh=Bl(),Nh={point:hc,lineStart:function(){Nh.point=Ih},lineEnd:function(){Lh&&Ah(Mh,Dh),Nh.point=hc},polygonStart:function(){Lh=!0},polygonEnd:function(){Lh=null},result:function(){var e=+Oh;return Oh.reset(),e}};function Ih(e,t){Nh.point=Ah,Mh=Eh=e,Dh=Th=t}function Ah(e,t){Eh-=e,Th-=t,Oh.add(ac(Eh*Eh+Th*Th)),Eh=e,Th=t}var Rh=Nh;function Ph(){this._string=[]}function jh(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}Ph.prototype={_radius:4.5,_circle:jh(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=jh(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Fh=function(e,t){var n,i,r=4.5;function o(e){return e&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),Sc(e,n(i))),i.result()}return o.area=function(e){return Sc(e,n(Gu)),Gu.result()},o.measure=function(e){return Sc(e,n(Rh)),Rh.result()},o.bounds=function(e){return Sc(e,n(rh)),rh.result()},o.centroid=function(e){return Sc(e,n(kh)),kh.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,Hu):(e=t).stream,o):e},o.context=function(e){return arguments.length?(i=null==e?(t=null,new Ph):new xh(t=e),"function"!=typeof r&&i.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r="function"==typeof e?e:(i.pointRadius(+e),+e),o):r},o.projection(e).context(t)},Bh=function(e){return{stream:Wh(e)}};function Wh(e){return function(t){var n=new Hh;for(var i in e)n[i]=e[i];return n.stream=t,n}}function Hh(){}function Yh(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),Sc(n,e.stream(rh)),t(rh.result()),null!=i&&e.clipExtent(i),e}function Vh(e,t,n){return Yh(e,(function(n){var i=t[1][0]-t[0][0],r=t[1][1]-t[0][1],o=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),s=+t[0][0]+(i-o*(n[1][0]+n[0][0]))/2,a=+t[0][1]+(r-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([s,a])}),n)}function zh(e,t,n){return Vh(e,[[0,0],t],n)}function Uh(e,t,n){return Yh(e,(function(n){var i=+t,r=i/(n[1][0]-n[0][0]),o=(i-r*(n[1][0]+n[0][0]))/2,s=-r*n[0][1];e.scale(150*r).translate([o,s])}),n)}function $h(e,t,n){return Yh(e,(function(n){var i=+t,r=i/(n[1][1]-n[0][1]),o=-r*n[0][0],s=(i-r*(n[1][1]+n[0][1]))/2;e.scale(150*r).translate([o,s])}),n)}Hh.prototype={constructor:Hh,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var qh=16,Kh=ec(30*Zl),Gh=function(e,t){return+t?function(e,t){function n(i,r,o,s,a,l,c,d,u,h,f,g,p,m){var _=c-i,b=d-r,v=_*_+b*b;if(v>4*t&&p--){var y=s+h,w=a+f,C=l+g,S=ac(y*y+w*w+C*C),k=dc(C/=S),x=Jl(Jl(C)-1)t||Jl((_*E+b*T)/v-.5)>.3||s*h+a*f+l*g2?e[2]%360*Zl:0,M()):[m*Gl,_*Gl,b*Gl]},x.angle=function(e){return arguments.length?(v=e%360*Zl,M()):v*Gl},x.precision=function(e){return arguments.length?(s=Gh(a,k=e*e),D()):ac(k)},x.fitExtent=function(e,t){return Vh(x,e,t)},x.fitSize=function(e,t){return zh(x,e,t)},x.fitWidth=function(e,t){return Uh(x,e,t)},x.fitHeight=function(e,t){return $h(x,e,t)},function(){return t=e.apply(this,arguments),x.invert=t.invert&&L,M()}}function tf(e){var t=0,n=Ul/3,i=ef(e),r=i(t,n);return r.parallels=function(e){return arguments.length?i(t=e[0]*Zl,n=e[1]*Zl):[t*Gl,n*Gl]},r}function nf(e,t){var n=oc(e),i=(n+oc(t))/2;if(Jl(i)=.12&&r<.234&&i>=-.425&&i<-.214?a:r>=.166&&r<.234&&i>=-.214&&i<-.115?l:s).invert(e)},d.stream=function(n){return e&&t===n?e:(i=[s.stream(t=n),a.stream(n),l.stream(n)],r=i.length,e={point:function(e,t){for(var n=-1;++n0?t<-$l+Vl&&(t=-$l+Vl):t>$l-Vl&&(t=$l-Vl);var n=r/rc(mf(t),i);return[n*oc(i*e),r-n*ec(i*e)]}return o.invert=function(e,t){var n=r-t,o=sc(i)*ac(e*e+n*n);return[Ql(e,Jl(n))/i*sc(n),2*Xl(rc(r/o,1/i))-$l]},o}var bf=function(){return tf(_f).scale(109.5).parallels([30,30])};function vf(e,t){return[e,t]}vf.invert=vf;var yf=function(){return Qh(vf).scale(152.63)};function wf(e,t){var n=ec(e),i=e===t?oc(e):(n-ec(t))/(t-e),r=n/i+e;if(Jl(i)Vl&&--r>0);return[e/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]};var Rf=function(){return Qh(Af).scale(175.295)};function Pf(e,t){return[ec(t)*oc(e),oc(t)]}Pf.invert=lf(dc);var jf=function(){return Qh(Pf).scale(249.5).clipAngle(90+Vl)};function Ff(e,t){var n=ec(t),i=1+ec(e)*n;return[n*oc(e)/i,oc(t)/i]}Ff.invert=lf((function(e){return 2*Xl(e)}));var Bf=function(){return Qh(Ff).scale(250).clipAngle(142)};function Wf(e,t){return[ic(lc(($l+t)/2)),-e]}Wf.invert=function(e,t){return[-t,2*Xl(nc(e))-$l]};var Hf=function(){var e=pf(Wf),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)};function Yf(e,t){return e.parent===t.parent?1:2}function Vf(e,t){return e+t.x}function zf(e,t){return Math.max(e,t.y)}var Uf=function(){var e=Yf,t=1,n=1,i=!1;function r(r){var o,s=0;r.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(Vf,0)/e.length}(n),t.y=function(e){return 1+e.reduce(zf,0)}(n)):(t.x=o?s+=e(t,o):0,t.y=0,o=t)}));var a=function(e){for(var t;t=e.children;)e=t[0];return e}(r),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(r),c=a.x-e(a,l)/2,d=l.x+e(l,a)/2;return r.eachAfter(i?function(e){e.x=(e.x-r.x)*t,e.y=(r.y-e.y)*n}:function(e){e.x=(e.x-c)/(d-c)*t,e.y=(1-(r.y?e.y/r.y:1))*n})}return r.separation=function(t){return arguments.length?(e=t,r):e},r.size=function(e){return arguments.length?(i=!1,t=+e[0],n=+e[1],r):i?null:[t,n]},r.nodeSize=function(e){return arguments.length?(i=!0,t=+e[0],n=+e[1],r):i?[t,n]:null},r};function $f(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function qf(e,t){var n,i,r,o,s,a=new Jf(e),l=+e.value&&(a.value=e.value),c=[a];for(null==t&&(t=Kf);n=c.pop();)if(l&&(n.value=+n.data.value),(r=t(n.data))&&(s=r.length))for(n.children=new Array(s),o=s-1;o>=0;--o)c.push(i=n.children[o]=new Jf(r[o])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(Zf)}function Kf(e){return e.children}function Gf(e){e.data=e.data.data}function Zf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Jf(e){this.data=e,this.depth=this.height=0,this.parent=null}Jf.prototype=qf.prototype={constructor:Jf,count:function(){return this.eachAfter($f)},each:function(e){var t,n,i,r,o=this,s=[o];do{for(t=s.reverse(),s=[];o=t.pop();)if(e(o),n=o.children)for(i=0,r=n.length;i=0;--n)r.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;e=n.pop(),t=i.pop();for(;e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return qf(this).eachBefore(Gf)}};var Xf=Array.prototype.slice;var Qf=function(e){for(var t,n,i=0,r=(e=function(e){for(var t,n,i=e.length;i;)n=Math.random()*i--|0,t=e[i],e[i]=e[n],e[n]=t;return e}(Xf.call(e))).length,o=[];i0&&n*n>i*i+r*r}function ig(e,t){for(var n=0;n(s*=s)?(i=(c+s-r)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=e.x-i*a-o*l,n.y=e.y-i*l+o*a):(i=(c+r-s)/(2*c),o=Math.sqrt(Math.max(0,r/c-i*i)),n.x=t.x+i*a-o*l,n.y=t.y+i*l+o*a)):(n.x=t.x+n.r,n.y=t.y)}function lg(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function cg(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,o=(t.y*n.r+n.y*t.r)/i;return r*r+o*o}function dg(e){this._=e,this.next=null,this.previous=null}function ug(e){if(!(r=e.length))return 0;var t,n,i,r,o,s,a,l,c,d,u;if((t=e[0]).x=0,t.y=0,!(r>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(r>2))return t.r+n.r;ag(n,t,i=e[2]),t=new dg(t),n=new dg(n),i=new dg(i),t.next=i.previous=n,n.next=t.previous=i,i.next=n.previous=t;e:for(a=3;a0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=gg(t),n):e},n.parentId=function(e){return arguments.length?(t=gg(e),n):t},n};function Og(e,t){return e.parent===t.parent?1:2}function Ng(e){var t=e.children;return t?t[0]:e.t}function Ig(e){var t=e.children;return t?t[t.length-1]:e.t}function Ag(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function Rg(e,t,n){return e.a.parent===t.parent?e.a:n}function Pg(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Pg.prototype=Object.create(Jf.prototype);var jg=function(){var e=Og,t=1,n=1,i=null;function r(r){var l=function(e){for(var t,n,i,r,o,s=new Pg(e,0),a=[s];t=a.pop();)if(i=t._.children)for(t.children=new Array(o=i.length),r=o-1;r>=0;--r)a.push(n=t.children[r]=new Pg(i[r],r)),n.parent=t;return(s.parent=new Pg(null,0)).children=[s],s}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(s),i)r.eachBefore(a);else{var c=r,d=r,u=r;r.eachBefore((function(e){e.xd.x&&(d=e),e.depth>u.depth&&(u=e)}));var h=c===d?1:e(c,d)/2,f=h-c.x,g=t/(d.x+h+f),p=n/(u.depth||1);r.eachBefore((function(e){e.x=(e.x+f)*g,e.y=e.depth*p}))}return r}function o(t){var n=t.children,i=t.parent.children,r=t.i?i[t.i-1]:null;if(n){!function(e){for(var t,n=0,i=0,r=e.children,o=r.length;--o>=0;)(t=r[o]).z+=n,t.m+=n,n+=t.s+(i+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+e(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+e(t._,r._));t.parent.A=function(t,n,i){if(n){for(var r,o=t,s=t,a=n,l=o.parent.children[0],c=o.m,d=s.m,u=a.m,h=l.m;a=Ig(a),o=Ng(o),a&&o;)l=Ng(l),(s=Ig(s)).a=t,(r=a.z+u-o.z-c+e(a._,o._))>0&&(Ag(Rg(a,t,i),t,r),c+=r,d+=r),u+=a.m,c+=o.m,h+=l.m,d+=s.m;a&&!Ig(s)&&(s.t=a,s.m+=u-d),o&&!Ng(l)&&(l.t=o,l.m+=c-h,i=t)}return i}(t,r,t.parent.A||i[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function a(e){e.x*=t,e.y=e.depth*n}return r.separation=function(t){return arguments.length?(e=t,r):e},r.size=function(e){return arguments.length?(i=!1,t=+e[0],n=+e[1],r):i?null:[t,n]},r.nodeSize=function(e){return arguments.length?(i=!0,t=+e[0],n=+e[1],r):i?[t,n]:null},r},Fg=function(e,t,n,i,r){for(var o,s=e.children,a=-1,l=s.length,c=e.value&&(r-n)/e.value;++ah&&(h=a),m=d*d*p,(f=Math.max(h/m,m/u))>g){d-=a;break}g=f}_.push(s={value:d,dice:l1?t:1)},n}(Bg),Yg=function(){var e=Hg,t=!1,n=1,i=1,r=[0],o=pg,s=pg,a=pg,l=pg,c=pg;function d(e){return e.x0=e.y0=0,e.x1=n,e.y1=i,e.eachBefore(u),r=[0],t&&e.eachBefore(Cg),e}function u(t){var n=r[t.depth],i=t.x0+n,d=t.y0+n,u=t.x1-n,h=t.y1-n;u=n-1){var d=a[t];return d.x0=r,d.y0=o,d.x1=s,void(d.y1=l)}var u=c[t],h=i/2+u,f=t+1,g=n-1;for(;f>>1;c[p]l-o){var b=(r*_+s*m)/i;e(t,f,m,r,o,b,l),e(f,n,_,b,o,s,l)}else{var v=(o*_+l*m)/i;e(t,f,m,r,o,s,v),e(f,n,_,r,v,s,l)}}(0,l,e.value,t,n,i,r)},zg=function(e,t,n,i,r){(1&e.depth?Fg:Sg)(e,t,n,i,r)},Ug=function e(t){function n(e,n,i,r,o){if((s=e._squarify)&&s.ratio===t)for(var s,a,l,c,d,u=-1,h=s.length,f=e.value;++u1?t:1)},n}(Bg),$g=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}},qg=function(e,t){var n=pn(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}},Kg=function(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}},Gg=Math.SQRT2;function Zg(e){return((e=Math.exp(e))+1/e)/2}var Jg=function(e,t){var n,i,r=e[0],o=e[1],s=e[2],a=t[0],l=t[1],c=t[2],d=a-r,u=l-o,h=d*d+u*u;if(h<1e-12)i=Math.log(c/s)/Gg,n=function(e){return[r+e*d,o+e*u,s*Math.exp(Gg*e*i)]};else{var f=Math.sqrt(h),g=(c*c-s*s+4*h)/(2*s*2*f),p=(c*c-s*s-4*h)/(2*c*2*f),m=Math.log(Math.sqrt(g*g+1)-g),_=Math.log(Math.sqrt(p*p+1)-p);i=(_-m)/Gg,n=function(e){var t,n=e*i,a=Zg(m),l=s/(2*f)*(a*(t=Gg*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[r+l*d,o+l*u,s*a/Zg(Gg*n+m)]}}return n.duration=1e3*i,n};function Xg(e){return function(t,n){var i=e((t=an(t)).h,(n=an(n)).h),r=_n(t.s,n.s),o=_n(t.l,n.l),s=_n(t.opacity,n.opacity);return function(e){return t.h=i(e),t.s=r(e),t.l=o(e),t.opacity=s(e),t+""}}}var Qg=Xg(pn),ep=Xg(_n);function tp(e,t){var n=_n((e=To(e)).l,(t=To(t)).l),i=_n(e.a,t.a),r=_n(e.b,t.b),o=_n(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=i(t),e.b=r(t),e.opacity=o(t),e+""}}function np(e){return function(t,n){var i=e((t=Fo(t)).h,(n=Fo(n)).h),r=_n(t.c,n.c),o=_n(t.l,n.l),s=_n(t.opacity,n.opacity);return function(e){return t.h=i(e),t.c=r(e),t.l=o(e),t.opacity=s(e),t+""}}}var ip=np(pn),rp=np(_n);function op(e){return function t(n){function i(t,i){var r=e((t=qo(t)).h,(i=qo(i)).h),o=_n(t.s,i.s),s=_n(t.l,i.l),a=_n(t.opacity,i.opacity);return function(e){return t.h=r(e),t.s=o(e),t.l=s(Math.pow(e,n)),t.opacity=a(e),t+""}}return n=+n,i.gamma=t,i}(1)}var sp=op(pn),ap=op(_n);function lp(e,t){for(var n=0,i=t.length-1,r=t[0],o=new Array(i<0?0:i);n1&&hp(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}var pp=function(e){if((n=e.length)<3)return null;var t,n,i=new Array(n),r=new Array(n);for(t=0;t=0;--t)c.push(e[i[o[t]][2]]);for(t=+a;ta!=c>a&&s<(l-n)*(a-i)/(c-i)+n&&(d=!d),l=n,c=i;return d},_p=function(e){for(var t,n,i=-1,r=e.length,o=e[r-1],s=o[0],a=o[1],l=0;++i1);return e+n*o*Math.sqrt(-2*Math.log(r)/r)}}return n.source=e,n}(bp),wp=function e(t){function n(){var e=yp.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return n.source=e,n}(bp),Cp=function e(t){function n(e){return function(){for(var n=0,i=0;ii&&(t=n,n=i,i=t),function(e){return Math.max(n,Math.min(i,e))}}function Wp(e,t,n){var i=e[0],r=e[1],o=t[0],s=t[1];return r2?Hp:Wp,r=o=null,u}function u(t){return isNaN(t=+t)?n:(r||(r=i(s.map(e),a,l)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=i(a,s.map(e),Mn)))(n)))},u.domain=function(e){return arguments.length?(s=Dp.call(e,Rp),c===jp||(c=Bp(s)),d()):s.slice()},u.range=function(e){return arguments.length?(a=Ep.call(e),d()):a.slice()},u.rangeRound=function(e){return a=Ep.call(e),l=Kg,d()},u.clamp=function(e){return arguments.length?(c=e?Bp(s):jp,u):c!==jp},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,i){return e=n,t=i,d()}}function zp(e,t){return Vp()(e,t)}var Up=function(e,t,n,i){var r,o=D(e,t,n);switch((i=Cl(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=jl(o,s))||(i.precision=r),Ml(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=Fl(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=Pl(o))||(i.precision=r-2*("%"===i.type))}return Ll(i)};function $p(e){var t=e.domain;return e.ticks=function(e){var n=t();return L(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return Up(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r=t(),o=0,s=r.length-1,a=r[o],l=r[s];return l0?i=M(a=Math.floor(a/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=M(a=Math.ceil(a*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[o]=Math.floor(a/i)*i,r[s]=Math.ceil(l/i)*i,t(r)):i<0&&(r[o]=Math.ceil(a*i)/i,r[s]=Math.floor(l*i)/i,t(r)),e},e}function qp(){var e=zp(jp,jp);return e.copy=function(){return Yp(e,qp())},xp.apply(e,arguments),$p(e)}function Kp(e){var t;function n(e){return isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Dp.call(t,Rp),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Kp(e).unknown(t)},e=arguments.length?Dp.call(e,Rp):[0,1],$p(n)}var Gp=function(e,t){var n,i=0,r=(e=e.slice()).length-1,o=e[i],s=e[r];return s0){for(;hl)break;p.push(u)}}else for(;h=1;--d)if(!((u=c*d)l)break;p.push(u)}}else p=L(h,f,Math.min(f-h,g)).map(n);return i?p.reverse():p},i.tickFormat=function(e,r){if(null==r&&(r=10===o?".0e":","),"function"!=typeof r&&(r=Ll(r)),e===1/0)return r;null==e&&(e=10);var s=Math.max(1,o*e/i.ticks().length);return function(e){var i=e/n(Math.round(t(e)));return i*o0?r[i-1]:t[0],i=i?[r[i-1],n]:[r[s-1],r[s]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return r.slice()},s.copy=function(){return pm().domain([t,n]).range(o).unknown(e)},xp.apply($p(s),arguments)}function mm(){var e,t=[.5],n=[0,1],i=1;function r(r){return r<=r?n[l(t,r,0,i)]:e}return r.domain=function(e){return arguments.length?(t=Ep.call(e),i=Math.min(t.length,n.length-1),r):t.slice()},r.range=function(e){return arguments.length?(n=Ep.call(e),i=Math.min(t.length,n.length-1),r):n.slice()},r.invertExtent=function(e){var i=n.indexOf(e);return[t[i-1],t[i]]},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return mm().domain(t).range(n).unknown(e)},xp.apply(r,arguments)}var _m=new Date,bm=new Date;function vm(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t0))return a;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,i){return _m.setTime(+t),bm.setTime(+i),e(_m),e(bm),Math.floor(n(_m,bm))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?function(t){return i(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var ym=vm((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));ym.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vm((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var wm=ym,Cm=ym.range,Sm=vm((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),km=Sm,xm=Sm.range,Lm=6e4,Mm=6048e5;function Dm(e){return vm((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Lm)/Mm}))}var Em=Dm(0),Tm=Dm(1),Om=Dm(2),Nm=Dm(3),Im=Dm(4),Am=Dm(5),Rm=Dm(6),Pm=Em.range,jm=Tm.range,Fm=Om.range,Bm=Nm.range,Wm=Im.range,Hm=Am.range,Ym=Rm.range,Vm=vm((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Lm)/864e5}),(function(e){return e.getDate()-1})),zm=Vm,Um=Vm.range,$m=vm((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*Lm)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),qm=$m,Km=$m.range,Gm=vm((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+t*Lm)}),(function(e,t){return(t-e)/Lm}),(function(e){return e.getMinutes()})),Zm=Gm,Jm=Gm.range,Xm=vm((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),Qm=Xm,e_=Xm.range,t_=vm((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));t_.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?vm((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):t_:null};var n_=t_,i_=t_.range;function r_(e){return vm((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Mm}))}var o_=r_(0),s_=r_(1),a_=r_(2),l_=r_(3),c_=r_(4),d_=r_(5),u_=r_(6),h_=o_.range,f_=s_.range,g_=a_.range,p_=l_.range,m_=c_.range,__=d_.range,b_=u_.range,v_=vm((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),y_=v_,w_=v_.range,C_=vm((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));C_.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vm((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var S_=C_,k_=C_.range;function x_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function L_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function M_(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function D_(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,o=e.days,s=e.shortDays,a=e.months,l=e.shortMonths,c=W_(r),d=H_(r),u=W_(o),h=H_(o),f=W_(s),g=H_(s),p=W_(a),m=H_(a),_=W_(l),b=H_(l),v={a:function(e){return s[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return a[e.getMonth()]},c:null,d:lb,e:lb,f:fb,H:cb,I:db,j:ub,L:hb,m:gb,M:pb,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Vb,s:zb,S:mb,u:_b,U:bb,V:vb,w:yb,W:wb,x:null,X:null,y:Cb,Y:Sb,Z:kb,"%":Yb},y={a:function(e){return s[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return a[e.getUTCMonth()]},c:null,d:xb,e:xb,f:Tb,H:Lb,I:Mb,j:Db,L:Eb,m:Ob,M:Nb,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Vb,s:zb,S:Ib,u:Ab,U:Rb,V:Pb,w:jb,W:Fb,x:null,X:null,y:Bb,Y:Wb,Z:Hb,"%":Yb},w={a:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.w=g[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=u.exec(t.slice(n));return i?(e.w=h[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=_.exec(t.slice(n));return i?(e.m=b[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=p.exec(t.slice(n));return i?(e.m=m[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return k(e,t,n,i)},d:X_,e:X_,f:rb,H:eb,I:eb,j:Q_,L:ib,m:J_,M:tb,p:function(e,t,n){var i=c.exec(t.slice(n));return i?(e.p=d[i[0].toLowerCase()],n+i[0].length):-1},q:Z_,Q:sb,s:ab,S:nb,u:V_,U:z_,V:U_,w:Y_,W:$_,x:function(e,t,i){return k(e,n,t,i)},X:function(e,t,n){return k(e,i,t,n)},y:K_,Y:q_,Z:G_,"%":ob};function C(e,t){return function(n){var i,r,o,s=[],a=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=L_(M_(o.y,0,1))).getUTCDay(),i=r>4||0===r?s_.ceil(i):s_(i),i=y_.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=x_(M_(o.y,0,1))).getDay(),i=r>4||0===r?Tm.ceil(i):Tm(i),i=zm.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?L_(M_(o.y,0,1)).getUTCDay():x_(M_(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,L_(o)):x_(o)}}function k(e,t,n,i){for(var r,o,s=0,a=t.length,l=n.length;s=l)return-1;if(37===(r=t.charCodeAt(s++))){if(r=t.charAt(s++),!(o=w[r in A_?t.charAt(s++):r])||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return(v.x=C(n,v),v.X=C(i,v),v.c=C(t,v),y.x=C(n,y),y.X=C(i,y),y.c=C(t,y),{format:function(e){var t=C(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+="",y);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}})}var E_,T_,O_,N_,I_,A_={"-":"",_:" ",0:"0"},R_=/^\s*\d+/,P_=/^%/,j_=/[\\^$*+?|[\]().{}]/g;function F_(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o68?1900:2e3),n+i[0].length):-1}function G_(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Z_(e,t,n){var i=R_.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function J_(e,t,n){var i=R_.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function X_(e,t,n){var i=R_.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Q_(e,t,n){var i=R_.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function eb(e,t,n){var i=R_.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function tb(e,t,n){var i=R_.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function nb(e,t,n){var i=R_.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function ib(e,t,n){var i=R_.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function rb(e,t,n){var i=R_.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function ob(e,t,n){var i=P_.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function sb(e,t,n){var i=R_.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function ab(e,t,n){var i=R_.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function lb(e,t){return F_(e.getDate(),t,2)}function cb(e,t){return F_(e.getHours(),t,2)}function db(e,t){return F_(e.getHours()%12||12,t,2)}function ub(e,t){return F_(1+zm.count(wm(e),e),t,3)}function hb(e,t){return F_(e.getMilliseconds(),t,3)}function fb(e,t){return hb(e,t)+"000"}function gb(e,t){return F_(e.getMonth()+1,t,2)}function pb(e,t){return F_(e.getMinutes(),t,2)}function mb(e,t){return F_(e.getSeconds(),t,2)}function _b(e){var t=e.getDay();return 0===t?7:t}function bb(e,t){return F_(Em.count(wm(e)-1,e),t,2)}function vb(e,t){var n=e.getDay();return e=n>=4||0===n?Im(e):Im.ceil(e),F_(Im.count(wm(e),e)+(4===wm(e).getDay()),t,2)}function yb(e){return e.getDay()}function wb(e,t){return F_(Tm.count(wm(e)-1,e),t,2)}function Cb(e,t){return F_(e.getFullYear()%100,t,2)}function Sb(e,t){return F_(e.getFullYear()%1e4,t,4)}function kb(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+F_(t/60|0,"0",2)+F_(t%60,"0",2)}function xb(e,t){return F_(e.getUTCDate(),t,2)}function Lb(e,t){return F_(e.getUTCHours(),t,2)}function Mb(e,t){return F_(e.getUTCHours()%12||12,t,2)}function Db(e,t){return F_(1+y_.count(S_(e),e),t,3)}function Eb(e,t){return F_(e.getUTCMilliseconds(),t,3)}function Tb(e,t){return Eb(e,t)+"000"}function Ob(e,t){return F_(e.getUTCMonth()+1,t,2)}function Nb(e,t){return F_(e.getUTCMinutes(),t,2)}function Ib(e,t){return F_(e.getUTCSeconds(),t,2)}function Ab(e){var t=e.getUTCDay();return 0===t?7:t}function Rb(e,t){return F_(o_.count(S_(e)-1,e),t,2)}function Pb(e,t){var n=e.getUTCDay();return e=n>=4||0===n?c_(e):c_.ceil(e),F_(c_.count(S_(e),e)+(4===S_(e).getUTCDay()),t,2)}function jb(e){return e.getUTCDay()}function Fb(e,t){return F_(s_.count(S_(e)-1,e),t,2)}function Bb(e,t){return F_(e.getUTCFullYear()%100,t,2)}function Wb(e,t){return F_(e.getUTCFullYear()%1e4,t,4)}function Hb(){return"+0000"}function Yb(){return"%"}function Vb(e){return+e}function zb(e){return Math.floor(+e/1e3)}function Ub(e){return E_=D_(e),T_=E_.format,O_=E_.parse,N_=E_.utcFormat,I_=E_.utcParse,E_}Ub({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var $b=1e3,qb=60*$b,Kb=60*qb,Gb=24*Kb,Zb=7*Gb,Jb=30*Gb,Xb=365*Gb;function Qb(e){return new Date(e)}function ev(e){return e instanceof Date?+e:+new Date(+e)}function tv(e,t,n,i,o,s,a,l,c){var d=zp(jp,jp),u=d.invert,h=d.domain,f=c(".%L"),g=c(":%S"),p=c("%I:%M"),m=c("%I %p"),_=c("%a %d"),b=c("%b %d"),v=c("%B"),y=c("%Y"),w=[[a,1,$b],[a,5,5*$b],[a,15,15*$b],[a,30,30*$b],[s,1,qb],[s,5,5*qb],[s,15,15*qb],[s,30,30*qb],[o,1,Kb],[o,3,3*Kb],[o,6,6*Kb],[o,12,12*Kb],[i,1,Gb],[i,2,2*Gb],[n,1,Zb],[t,1,Jb],[t,3,3*Jb],[e,1,Xb]];function C(r){return(a(r)1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Vy.h=360*e-100,Vy.s=1.5-1.5*t,Vy.l=.8-.9*t,Vy+""},Uy=Qt(),$y=Math.PI/3,qy=2*Math.PI/3,Ky=function(e){var t;return e=(.5-e)*Math.PI,Uy.r=255*(t=Math.sin(e))*t,Uy.g=255*(t=Math.sin(e+$y))*t,Uy.b=255*(t=Math.sin(e+qy))*t,Uy+""},Gy=function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"};function Zy(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var Jy=Zy(Mv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Xy=Zy(Mv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Qy=Zy(Mv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ew=Zy(Mv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),tw=function(e){return Dt(lt(e).call(document.documentElement))},nw=0;function iw(){return new rw}function rw(){this._="@"+(++nw).toString(36)}rw.prototype=iw.prototype={constructor:rw,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var ow=function(e){return"string"==typeof e?new xt([document.querySelectorAll(e)],[document.documentElement]):new xt([null==e?[]:e],kt)},sw=function(e,t){null==t&&(t=Rn().touches);for(var n=0,i=t?t.length:0,r=new Array(i);n=1?_w:e<=-1?-_w:Math.asin(e)}function yw(e){return e.innerRadius}function ww(e){return e.outerRadius}function Cw(e){return e.startAngle}function Sw(e){return e.endAngle}function kw(e){return e&&e.padAngle}function xw(e,t,n,i,r,o,s){var a=e-n,l=t-i,c=(s?o:-o)/gw(a*a+l*l),d=c*l,u=-c*a,h=e+d,f=t+u,g=n+d,p=i+u,m=(h+g)/2,_=(f+p)/2,b=g-h,v=p-f,y=b*b+v*v,w=r-o,C=h*p-g*f,S=(v<0?-1:1)*gw(uw(0,w*w*y-C*C)),k=(C*v-b*S)/y,x=(-C*b-v*S)/y,L=(C*v+b*S)/y,M=(-C*b+v*S)/y,D=k-m,E=x-_,T=L-m,O=M-_;return D*D+E*E>T*T+O*O&&(k=L,x=M),{cx:k,cy:x,x01:-d,y01:-u,x11:k*(r/w-1),y11:x*(r/w-1)}}var Lw=function(){var e=yw,t=ww,n=aw(0),i=null,r=Cw,o=Sw,s=kw,a=null;function l(){var l,c,d,u=+e.apply(this,arguments),h=+t.apply(this,arguments),f=r.apply(this,arguments)-_w,g=o.apply(this,arguments)-_w,p=lw(g-f),m=g>f;if(a||(a=l=Zr()),hpw)if(p>bw-pw)a.moveTo(h*dw(f),h*fw(f)),a.arc(0,0,h,f,g,!m),u>pw&&(a.moveTo(u*dw(g),u*fw(g)),a.arc(0,0,u,g,f,m));else{var _,b,v=f,y=g,w=f,C=g,S=p,k=p,x=s.apply(this,arguments)/2,L=x>pw&&(i?+i.apply(this,arguments):gw(u*u+h*h)),M=hw(lw(h-u)/2,+n.apply(this,arguments)),D=M,E=M;if(L>pw){var T=vw(L/u*fw(x)),O=vw(L/h*fw(x));(S-=2*T)>pw?(w+=T*=m?1:-1,C-=T):(S=0,w=C=(f+g)/2),(k-=2*O)>pw?(v+=O*=m?1:-1,y-=O):(k=0,v=y=(f+g)/2)}var N=h*dw(v),I=h*fw(v),A=u*dw(C),R=u*fw(C);if(M>pw){var P,j=h*dw(y),F=h*fw(y),B=u*dw(w),W=u*fw(w);if(p1?0:d<-1?mw:Math.acos(d))/2),$=gw(P[0]*P[0]+P[1]*P[1]);D=hw(M,(u-$)/(U-1)),E=hw(M,(h-$)/(U+1))}}k>pw?E>pw?(_=xw(B,W,N,I,h,E,m),b=xw(j,F,A,R,h,E,m),a.moveTo(_.cx+_.x01,_.cy+_.y01),Epw&&S>pw?D>pw?(_=xw(A,R,j,F,u,-D,m),b=xw(N,I,B,W,u,-D,m),a.lineTo(_.cx+_.x01,_.cy+_.y01),D=d;--u)a.point(m[u],_[u]);a.lineEnd(),a.areaEnd()}p&&(m[c]=+e(h,c,l),_[c]=+n(h,c,l),a.point(t?+t(h,c,l):m[c],i?+i(h,c,l):_[c]))}if(f)return a=null,f+""||null}function c(){return Ow().defined(r).curve(s).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:aw(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:aw(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:aw(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:aw(+e),i=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:aw(+e),l):n},l.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:aw(+e),l):i},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(i)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(r="function"==typeof e?e:aw(!!e),l):r},l.curve=function(e){return arguments.length?(s=e,null!=o&&(a=s(o)),l):s},l.context=function(e){return arguments.length?(null==e?o=a=null:a=s(o=e),l):o},l},Iw=function(e,t){return te?1:t>=e?0:NaN},Aw=function(e){return e},Rw=function(){var e=Aw,t=Iw,n=null,i=aw(0),r=aw(bw),o=aw(0);function s(s){var a,l,c,d,u,h=s.length,f=0,g=new Array(h),p=new Array(h),m=+i.apply(this,arguments),_=Math.min(bw,Math.max(-bw,r.apply(this,arguments)-m)),b=Math.min(Math.abs(_)/h,o.apply(this,arguments)),v=b*(_<0?-1:1);for(a=0;a0&&(f+=u);for(null!=t?g.sort((function(e,n){return t(p[e],p[n])})):null!=n&&g.sort((function(e,t){return n(s[e],s[t])})),a=0,c=f?(_-h*v)/f:0;a0?u*c:0)+v,p[l]={data:s[l],index:a,value:u,startAngle:m,endAngle:d,padAngle:b};return p}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:aw(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:aw(+e),s):i},s.endAngle=function(e){return arguments.length?(r="function"==typeof e?e:aw(+e),s):r},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:aw(+e),s):o},s},Pw=Fw(Dw);function jw(e){this._curve=e}function Fw(e){function t(t){return new jw(e(t))}return t._curve=e,t}function Bw(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(Fw(e)):t()._curve},e}jw.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var Ww=function(){return Bw(Ow().curve(Pw))},Hw=function(){var e=Nw().curve(Pw),t=e.curve,n=e.lineX0,i=e.lineX1,r=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Bw(n())},delete e.lineX0,e.lineEndAngle=function(){return Bw(i())},delete e.lineX1,e.lineInnerRadius=function(){return Bw(r())},delete e.lineY0,e.lineOuterRadius=function(){return Bw(o())},delete e.lineY1,e.curve=function(e){return arguments.length?t(Fw(e)):t()._curve},e},Yw=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]},Vw=Array.prototype.slice;function zw(e){return e.source}function Uw(e){return e.target}function $w(e){var t=zw,n=Uw,i=Ew,r=Tw,o=null;function s(){var s,a=Vw.call(arguments),l=t.apply(this,a),c=n.apply(this,a);if(o||(o=s=Zr()),e(o,+i.apply(this,(a[0]=l,a)),+r.apply(this,a),+i.apply(this,(a[0]=c,a)),+r.apply(this,a)),s)return o=null,s+""||null}return s.source=function(e){return arguments.length?(t=e,s):t},s.target=function(e){return arguments.length?(n=e,s):n},s.x=function(e){return arguments.length?(i="function"==typeof e?e:aw(+e),s):i},s.y=function(e){return arguments.length?(r="function"==typeof e?e:aw(+e),s):r},s.context=function(e){return arguments.length?(o=null==e?null:e,s):o},s}function qw(e,t,n,i,r){e.moveTo(t,n),e.bezierCurveTo(t=(t+i)/2,n,t,r,i,r)}function Kw(e,t,n,i,r){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+r)/2,i,n,i,r)}function Gw(e,t,n,i,r){var o=Yw(t,n),s=Yw(t,n=(n+r)/2),a=Yw(i,n),l=Yw(i,r);e.moveTo(o[0],o[1]),e.bezierCurveTo(s[0],s[1],a[0],a[1],l[0],l[1])}function Zw(){return $w(qw)}function Jw(){return $w(Kw)}function Xw(){var e=$w(Gw);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var Qw={draw:function(e,t){var n=Math.sqrt(t/mw);e.moveTo(n,0),e.arc(0,0,n,0,bw)}},eC={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},tC=Math.sqrt(1/3),nC=2*tC,iC={draw:function(e,t){var n=Math.sqrt(t/nC),i=n*tC;e.moveTo(0,-n),e.lineTo(i,0),e.lineTo(0,n),e.lineTo(-i,0),e.closePath()}},rC=Math.sin(mw/10)/Math.sin(7*mw/10),oC=Math.sin(bw/10)*rC,sC=-Math.cos(bw/10)*rC,aC={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),i=oC*n,r=sC*n;e.moveTo(0,-n),e.lineTo(i,r);for(var o=1;o<5;++o){var s=bw*o/5,a=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-a*n),e.lineTo(a*i-l*r,l*i+a*r)}e.closePath()}},lC={draw:function(e,t){var n=Math.sqrt(t),i=-n/2;e.rect(i,i,n,n)}},cC=Math.sqrt(3),dC={draw:function(e,t){var n=-Math.sqrt(t/(3*cC));e.moveTo(0,2*n),e.lineTo(-cC*n,-n),e.lineTo(cC*n,-n),e.closePath()}},uC=Math.sqrt(3)/2,hC=1/Math.sqrt(12),fC=3*(hC/2+1),gC={draw:function(e,t){var n=Math.sqrt(t/fC),i=n/2,r=n*hC,o=i,s=n*hC+n,a=-o,l=s;e.moveTo(i,r),e.lineTo(o,s),e.lineTo(a,l),e.lineTo(-.5*i-uC*r,uC*i+-.5*r),e.lineTo(-.5*o-uC*s,uC*o+-.5*s),e.lineTo(-.5*a-uC*l,uC*a+-.5*l),e.lineTo(-.5*i+uC*r,-.5*r-uC*i),e.lineTo(-.5*o+uC*s,-.5*s-uC*o),e.lineTo(-.5*a+uC*l,-.5*l-uC*a),e.closePath()}},pC=[Qw,eC,iC,lC,aC,dC,gC],mC=function(){var e=aw(Qw),t=aw(64),n=null;function i(){var i;if(n||(n=i=Zr()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return i.type=function(t){return arguments.length?(e="function"==typeof t?t:aw(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:aw(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i},_C=function(){};function bC(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function vC(e){this._context=e}vC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var yC=function(e){return new vC(e)};function wC(e){this._context=e}wC.prototype={areaStart:_C,areaEnd:_C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var CC=function(e){return new wC(e)};function SC(e){this._context=e}SC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:bC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var kC=function(e){return new SC(e)};function xC(e,t){this._basis=new vC(e),this._beta=t}xC.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i,r=e[0],o=t[0],s=e[n]-r,a=t[n]-o,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(r+i*s),this._beta*t[l]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var LC=function e(t){function n(e){return 1===t?new vC(e):new xC(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function MC(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function DC(e,t){this._context=e,this._k=(1-t)/6}DC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:MC(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:MC(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var EC=function e(t){function n(e){return new DC(e,t)}return n.tension=function(t){return e(+t)},n}(0);function TC(e,t){this._context=e,this._k=(1-t)/6}TC.prototype={areaStart:_C,areaEnd:_C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:MC(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var OC=function e(t){function n(e){return new TC(e,t)}return n.tension=function(t){return e(+t)},n}(0);function NC(e,t){this._context=e,this._k=(1-t)/6}NC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:MC(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var IC=function e(t){function n(e){return new NC(e,t)}return n.tension=function(t){return e(+t)},n}(0);function AC(e,t,n){var i=e._x1,r=e._y1,o=e._x2,s=e._y2;if(e._l01_a>pw){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>pw){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/d,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(i,r,o,s,e._x2,e._y2)}function RC(e,t){this._context=e,this._alpha=t}RC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:AC(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var PC=function e(t){function n(e){return t?new RC(e,t):new DC(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function jC(e,t){this._context=e,this._alpha=t}jC.prototype={areaStart:_C,areaEnd:_C,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:AC(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var FC=function e(t){function n(e){return t?new jC(e,t):new TC(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function BC(e,t){this._context=e,this._alpha=t}BC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:AC(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var WC=function e(t){function n(e){return t?new BC(e,t):new NC(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function HC(e){this._context=e}HC.prototype={areaStart:_C,areaEnd:_C,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var YC=function(e){return new HC(e)};function VC(e){return e<0?-1:1}function zC(e,t,n){var i=e._x1-e._x0,r=t-e._x1,o=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(VC(o)+VC(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function UC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function $C(e,t,n){var i=e._x0,r=e._y0,o=e._x1,s=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,r+a*t,o-a,s-a*n,o,s)}function qC(e){this._context=e}function KC(e){this._context=new GC(e)}function GC(e){this._context=e}function ZC(e){return new qC(e)}function JC(e){return new KC(e)}function XC(e){this._context=e}function QC(e){var t,n,i=e.length-1,r=new Array(i),o=new Array(i),s=new Array(i);for(r[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)r[t]=(s[t]-r[t+1])/o[t];for(o[i-1]=(e[i]+r[i-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var nS=function(e){return new tS(e,.5)};function iS(e){return new tS(e,0)}function rS(e){return new tS(e,1)}var oS=function(e,t){if((r=e.length)>1)for(var n,i,r,o=1,s=e[t[0]],a=s.length;o=0;)n[t]=t;return n};function aS(e,t){return e[t]}var lS=function(){var e=aw([]),t=sS,n=oS,i=aS;function r(r){var o,s,a=e.apply(this,arguments),l=r.length,c=a.length,d=new Array(c);for(o=0;o0){for(var n,i,r,o=0,s=e[0].length;o0)for(var n,i,r,o,s,a,l=0,c=e[t[0]].length;l0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=s,i[0]=s+=r):(i[0]=0,i[1]=r)},uS=function(e,t){if((n=e.length)>0){for(var n,i=0,r=e[t[0]],o=r.length;i0&&(i=(n=e[t[0]]).length)>0){for(var n,i,r,o=0,s=1;so&&(o=t,i=n);return i}var pS=function(e){var t=e.map(mS);return sS(e).sort((function(e,n){return t[e]-t[n]}))};function mS(e){for(var t,n=0,i=-1,r=e.length;++i0)){if(o/=h,h<0){if(o0){if(o>u)return;o>d&&(d=o)}if(o=i-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>d&&(d=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>u)return;o>d&&(d=o)}if(o=r-c,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>d&&(d=o)}else if(f>0){if(o0||u<1)||(d>0&&(e[0]=[l+d*h,c+d*f]),u<1&&(e[1]=[l+u*h,c+u*f]),!0)}}}}}function PS(e,t,n,i,r){var o=e[1];if(o)return!0;var s,a,l=e[0],c=e.left,d=e.right,u=c[0],h=c[1],f=d[0],g=d[1],p=(u+f)/2,m=(h+g)/2;if(g===h){if(p=i)return;if(u>f){if(l){if(l[1]>=r)return}else l=[p,n];o=[p,r]}else{if(l){if(l[1]1)if(u>f){if(l){if(l[1]>=r)return}else l=[(n-a)/s,n];o=[(r-a)/s,r]}else{if(l){if(l[1]=i)return}else l=[t,s*t+a];o=[i,s*i+a]}else{if(l){if(l[0]=-rk)){var f=l*l+c*c,g=d*d+u*u,p=(u*f-c*g)/h,m=(l*g-d*f)/h,_=HS.pop()||new YS;_.arc=e,_.site=r,_.x=p+s,_.y=(_.cy=m+a)+Math.sqrt(p*p+m*m),e.circle=_;for(var b=null,v=tk._;v;)if(_.yik)a=a.L;else{if(!((r=o-XS(a,s))>ik)){i>-ik?(t=a.P,n=a):r>-ik?(t=a,n=a.N):t=n=a;break}if(!a.R){t=a;break}a=a.R}!function(e){ek[e.index]={site:e,halfedges:[]}}(e);var l=qS(e);if(QS.insert(t,l),t||n){if(t===n)return zS(t),n=qS(t.site),QS.insert(l,n),l.edge=n.edge=NS(t.site,l.site),VS(t),void VS(n);if(n){zS(t),zS(n);var c=t.site,d=c[0],u=c[1],h=e[0]-d,f=e[1]-u,g=n.site,p=g[0]-d,m=g[1]-u,_=2*(h*m-f*p),b=h*h+f*f,v=p*p+m*m,y=[(m*b-f*v)/_+d,(h*v-p*b)/_+u];AS(n.edge,c,g,y),l.edge=NS(c,e,null,y),n.edge=NS(e,g,null,y),VS(t),VS(n)}else l.edge=NS(t.site,l.site)}}function JS(e,t){var n=e.site,i=n[0],r=n[1],o=r-t;if(!o)return i;var s=e.P;if(!s)return-1/0;var a=(n=s.site)[0],l=n[1],c=l-t;if(!c)return a;var d=a-i,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+i:(i+a)/2}function XS(e,t){var n=e.N;if(n)return JS(n,t);var i=e.site;return i[1]===t?i[0]:1/0}var QS,ek,tk,nk,ik=1e-6,rk=1e-12;function ok(e,t){return t[1]-e[1]||t[0]-e[0]}function sk(e,t){var n,i,r,o=e.sort(ok).pop();for(nk=[],ek=new Array(e.length),QS=new OS,tk=new OS;;)if(r=WS,o&&(!r||o[1]ik||Math.abs(r[0][1]-r[1][1])>ik)||delete nk[o]}(s,a,l,c),function(e,t,n,i){var r,o,s,a,l,c,d,u,h,f,g,p,m=ek.length,_=!0;for(r=0;rik||Math.abs(p-h)>ik)&&(l.splice(a,0,nk.push(IS(s,f,Math.abs(g-e)ik?[e,Math.abs(u-e)ik?[Math.abs(h-i)ik?[n,Math.abs(u-n)ik?[Math.abs(h-t)=a)return null;var l=e-r.site[0],c=t-r.site[1],d=l*l+c*c;do{r=o.cells[i=s],s=null,r.halfedges.forEach((function(n){var i=o.edges[n],a=i.left;if(a!==r.site&&a||(a=i.right)){var l=e-a[0],c=t-a[1],u=l*l+c*c;ui?(i+r)/2:Math.min(0,i)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}var wk=function(){var e,t,n=pk,i=mk,r=yk,o=bk,s=vk,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,d=Jg,u=pe("start","zoom","end"),h=500,f=150,g=0;function p(e){e.property("__zoom",_k).on("wheel.zoom",C).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",x).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(a[0],Math.min(a[1],t)))===e.k?e:new dk(t,e.x,e.y)}function _(e,t,n){var i=t[0]-n[0]*e.k,r=t[1]-n[1]*e.k;return i===e.x&&r===e.y?e:new dk(e.k,i,r)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function v(e,t,n){e.on("start.zoom",(function(){y(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){y(this,arguments).end()})).tween("zoom",(function(){var e=this,r=arguments,o=y(e,r),s=i.apply(e,r),a=null==n?b(s):"function"==typeof n?n.apply(e,r):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=e.__zoom,u="function"==typeof t?t.apply(e,r):t,h=d(c.invert(a).concat(l/c.k),u.invert(a).concat(l/u.k));return function(e){if(1===e)e=u;else{var t=h(e),n=l/t[2];e=new dk(n,a[0]-t[0]*n,a[1]-t[1]*n)}o.zoom(null,e)}}))}function y(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,t){this.that=e,this.args=t,this.active=0,this.extent=i.apply(e,t),this.taps=0}function C(){if(n.apply(this,arguments)){var e=y(this,arguments),t=this.__zoom,i=Math.max(a[0],Math.min(a[1],t.k*Math.pow(2,o.apply(this,arguments)))),s=Fn(this);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=t.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(t.k===i)return;e.mouse=[s,t.invert(s)],yi(this),e.start()}gk(),e.wheel=setTimeout((function(){e.wheel=null,e.end()}),f),e.zoom("mouse",r(_(m(t,i),e.mouse[0],e.mouse[1]),e.extent,l))}}function S(){if(!t&&n.apply(this,arguments)){var e=y(this,arguments,!0),i=Dt(gt.view).on("mousemove.zoom",(function(){if(gk(),!e.moved){var t=gt.clientX-s,n=gt.clientY-a;e.moved=t*t+n*n>g}e.zoom("mouse",r(_(e.that.__zoom,e.mouse[0]=Fn(e.that),e.mouse[1]),e.extent,l))}),!0).on("mouseup.zoom",(function(){i.on("mousemove.zoom mouseup.zoom",null),Nt(gt.view,e.moved),gk(),e.end()}),!0),o=Fn(this),s=gt.clientX,a=gt.clientY;Ot(gt.view),fk(),e.mouse=[o,this.__zoom.invert(o)],yi(this),e.start()}}function k(){if(n.apply(this,arguments)){var e=this.__zoom,t=Fn(this),o=e.invert(t),s=e.k*(gt.shiftKey?.5:2),a=r(_(m(e,s),t,o),i.apply(this,arguments),l);gk(),c>0?Dt(this).transition().duration(c).call(v,a,t):Dt(this).call(p.transform,a)}}function x(){if(n.apply(this,arguments)){var t,i,r,o,s=gt.touches,a=s.length,l=y(this,arguments,gt.changedTouches.length===a);for(fk(),i=0;i docs/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^5.0.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},function(e,t,n){e.exports=n(901)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio + * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps" + * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels. + */ +function computeScreenAwareSize(cssPx) { + const screenPx = window.devicePixelRatio * cssPx; + return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio; } -class AbstractCaseAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["EditorAction"] { - run(_accessor, editor) { - let selections = editor.getSelections(); - if (selections === null) { - return; - } - let model = editor.getModel(); - if (model === null) { - return; - } - let wordSeparators = editor.getOption(105 /* wordSeparators */); - let commands = []; - for (let i = 0, len = selections.length; i < len; i++) { - let selection = selections[i]; - if (selection.isEmpty()) { - let cursor = selection.getStartPosition(); - const word = editor.getConfiguredWordAtPosition(cursor); - if (!word) { - continue; - } - let wordRange = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_9__["Range"](cursor.lineNumber, word.startColumn, cursor.lineNumber, word.endColumn); - let text = model.getValueInRange(wordRange); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__["ReplaceCommandThatPreservesSelection"](wordRange, this._modifyText(text, wordSeparators), new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_10__["Selection"](cursor.lineNumber, cursor.column, cursor.lineNumber, cursor.column))); - } - else { - let text = model.getValueInRange(selection); - commands.push(new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_4__["ReplaceCommandThatPreservesSelection"](selection, this._modifyText(text, wordSeparators), selection)); - } +/** + * See https://github.com/Microsoft/monaco-editor/issues/601 + * To protect against malicious code in the linked site, particularly phishing attempts, + * the window.opener should be set to null to prevent the linked site from having access + * to change the location of the current page. + * See https://mathiasbynens.github.io/rel-noopener/ + */ +function windowOpenNoOpener(url) { + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_8__["isNative"] || _browser_js__WEBPACK_IMPORTED_MODULE_0__["isEdgeWebView"]) { + // In VSCode, window.open() always returns null... + // The same is true for a WebView (see https://github.com/Microsoft/monaco-editor/issues/628) + window.open(url); + } + else { + let newTab = window.open(); + if (newTab) { + newTab.opener = null; + newTab.location.href = url; } - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); } } -class UpperCaseAction extends AbstractCaseAction { - constructor() { - super({ - id: 'editor.action.transformToUppercase', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.transformToUppercase', "Transform to Uppercase"), - alias: 'Transform to Uppercase', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); - } - _modifyText(text, wordSeparators) { - return text.toLocaleUpperCase(); - } +function animate(fn) { + const step = () => { + fn(); + stepDisposable = scheduleAtNextAnimationFrame(step); + }; + let stepDisposable = scheduleAtNextAnimationFrame(step); + return Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["toDisposable"])(() => stepDisposable.dispose()); } -class LowerCaseAction extends AbstractCaseAction { - constructor() { - super({ - id: 'editor.action.transformToLowercase', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.transformToLowercase', "Transform to Lowercase"), - alias: 'Transform to Lowercase', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); +_common_network_js__WEBPACK_IMPORTED_MODULE_10__["RemoteAuthorities"].setPreferredWebSchema(/^https:/.test(window.location.href) ? 'https' : 'http'); +function asDomUri(uri) { + if (!uri) { + return uri; } - _modifyText(text, wordSeparators) { - return text.toLocaleLowerCase(); + if (_common_network_js__WEBPACK_IMPORTED_MODULE_10__["Schemas"].vscodeRemote === uri.scheme) { + return _common_network_js__WEBPACK_IMPORTED_MODULE_10__["RemoteAuthorities"].rewrite(uri); } + return uri; } -class TitleCaseAction extends AbstractCaseAction { - constructor() { - super({ - id: 'editor.action.transformToTitlecase', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('editor.transformToTitlecase', "Transform to Title Case"), - alias: 'Transform to Title Case', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].writable - }); - } - _modifyText(text, wordSeparators) { - const separators = '\r\n\t ' + wordSeparators; - const excludedChars = separators.split(''); - let title = ''; - let startUpperCase = true; - for (let i = 0; i < text.length; i++) { - let currentChar = text[i]; - if (excludedChars.indexOf(currentChar) >= 0) { - startUpperCase = true; - title += currentChar; - } - else if (startUpperCase) { - startUpperCase = false; - title += currentChar.toLocaleUpperCase(); - } - else { - title += currentChar.toLocaleLowerCase(); - } - } - return title; +/** + * returns url('...') + */ +function asCSSUrl(uri) { + if (!uri) { + return `url('')`; } + return `url('${asDomUri(uri).toString(true).replace(/'/g, '%27')}')`; } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(CopyLinesUpAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(CopyLinesDownAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(DuplicateSelectionAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(MoveLinesUpAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(MoveLinesDownAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(SortLinesAscendingAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(SortLinesDescendingAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(TrimTrailingWhitespaceAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(DeleteLinesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(IndentLinesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(OutdentLinesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(InsertLineBeforeAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(InsertLineAfterAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(DeleteAllLeftAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(DeleteAllRightAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(JoinLinesAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(TransposeAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(UpperCaseAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(LowerCaseAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_3__["registerEditorAction"])(TitleCaseAction); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/moveLinesCommand.js ***! - \**********************************************************************************************/ -/*! exports provided: MoveLinesCommand */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/event.js": +/*!*****************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/event.js ***! + \*****************************************************************/ +/*! exports provided: domEvent, stop */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveLinesCommand", function() { return MoveLinesCommand; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/commands/shiftCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfiguration.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../indentation/indentUtils.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "domEvent", function() { return domEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stop", function() { return stop; }); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +const domEvent = (element, type, useCapture) => { + const fn = (e) => emitter.fire(e); + const emitter = new _common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]({ + onFirstListenerAdd: () => { + element.addEventListener(type, fn, useCapture); + }, + onLastListenerRemove: () => { + element.removeEventListener(type, fn, useCapture); + } + }); + return emitter.event; +}; +function stop(event) { + return _common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].map(event, e => { + e.preventDefault(); + e.stopPropagation(); + return e; + }); +} +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js": +/*!***********************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js ***! + \***********************************************************************/ +/*! exports provided: FastDomNode, createFastDomNode */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FastDomNode", function() { return FastDomNode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFastDomNode", function() { return createFastDomNode; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ - -class MoveLinesCommand { - constructor(selection, isMovingDown, autoIndent) { - this._selection = selection; - this._isMovingDown = isMovingDown; - this._autoIndent = autoIndent; - this._selectionId = null; - this._moveEndLineSelectionShrink = false; +class FastDomNode { + constructor(domNode) { + this.domNode = domNode; + this._maxWidth = -1; + this._width = -1; + this._height = -1; + this._top = -1; + this._left = -1; + this._bottom = -1; + this._right = -1; + this._fontFamily = ''; + this._fontWeight = ''; + this._fontSize = -1; + this._fontFeatureSettings = ''; + this._lineHeight = -1; + this._letterSpacing = -100; + this._className = ''; + this._display = ''; + this._position = ''; + this._visibility = ''; + this._backgroundColor = ''; + this._layerHint = false; + this._contain = 'none'; + this._boxShadow = ''; } - getEditOperations(model, builder) { - let modelLineCount = model.getLineCount(); - if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) { - this._selectionId = builder.trackSelection(this._selection); + setMaxWidth(maxWidth) { + if (this._maxWidth === maxWidth) { return; } - if (!this._isMovingDown && this._selection.startLineNumber === 1) { - this._selectionId = builder.trackSelection(this._selection); + this._maxWidth = maxWidth; + this.domNode.style.maxWidth = this._maxWidth + 'px'; + } + setWidth(width) { + if (this._width === width) { return; } - this._moveEndPositionDown = false; - let s = this._selection; - if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { - this._moveEndPositionDown = true; - s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1)); - } - const { tabSize, indentSize, insertSpaces } = model.getOptions(); - let indentConverter = this.buildIndentConverter(tabSize, indentSize, insertSpaces); - let virtualModel = { - getLineTokens: (lineNumber) => { - return model.getLineTokens(lineNumber); - }, - getLanguageIdentifier: () => { - return model.getLanguageIdentifier(); - }, - getLanguageIdAtPosition: (lineNumber, column) => { - return model.getLanguageIdAtPosition(lineNumber, column); - }, - getLineContent: null, - }; - if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) { - // Current line is empty - let lineNumber = s.startLineNumber; - let otherLineNumber = (this._isMovingDown ? lineNumber + 1 : lineNumber - 1); - if (model.getLineMaxColumn(otherLineNumber) === 1) { - // Other line number is empty too, so no editing is needed - // Add a no-op to force running by the model - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](1, 1, 1, 1), null); - } - else { - // Type content from other line number on line number - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineNumber, 1, lineNumber, 1), model.getLineContent(otherLineNumber)); - // Remove content from other line number - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](otherLineNumber, 1, otherLineNumber, model.getLineMaxColumn(otherLineNumber)), null); - } - // Track selection at the other line number - s = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"](otherLineNumber, 1, otherLineNumber, 1); - } - else { - let movingLineNumber; - let movingLineText; - if (this._isMovingDown) { - movingLineNumber = s.endLineNumber + 1; - movingLineText = model.getLineContent(movingLineNumber); - // Delete line that needs to be moved - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](movingLineNumber - 1, model.getLineMaxColumn(movingLineNumber - 1), movingLineNumber, model.getLineMaxColumn(movingLineNumber)), null); - let insertingText = movingLineText; - if (this.shouldAutoIndent(model, s)) { - let movingLineMatchResult = this.matchEnterRule(model, indentConverter, tabSize, movingLineNumber, s.startLineNumber - 1); - // if s.startLineNumber - 1 matches onEnter rule, we still honor that. - if (movingLineMatchResult !== null) { - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](model.getLineContent(movingLineNumber)); - let newSpaceCnt = movingLineMatchResult + _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](oldIndentation, tabSize); - let newIndentation = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["generateIndent"](newSpaceCnt, tabSize, insertSpaces); - insertingText = newIndentation + this.trimLeft(movingLineText); - } - else { - // no enter rule matches, let's check indentatin rules then. - virtualModel.getLineContent = (lineNumber) => { - if (lineNumber === s.startLineNumber) { - return model.getLineContent(movingLineNumber); - } - else { - return model.getLineContent(lineNumber); - } - }; - let indentOfMovingLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber, indentConverter); - if (indentOfMovingLine !== null) { - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](model.getLineContent(movingLineNumber)); - let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](indentOfMovingLine, tabSize); - let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](oldIndentation, tabSize); - if (newSpaceCnt !== oldSpaceCnt) { - let newIndentation = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["generateIndent"](newSpaceCnt, tabSize, insertSpaces); - insertingText = newIndentation + this.trimLeft(movingLineText); - } - } - } - // add edit operations for moving line first to make sure it's executed after we make indentation change - // to s.startLineNumber - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); - let ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber, insertingText); - // check if the line being moved before matches onEnter rules, if so let's adjust the indentation by onEnter rules. - if (ret !== null) { - if (ret !== 0) { - this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret); - } - } - else { - // it doesn't match onEnter rules, let's check indentation rules then. - virtualModel.getLineContent = (lineNumber) => { - if (lineNumber === s.startLineNumber) { - return insertingText; - } - else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { - return model.getLineContent(lineNumber - 1); - } - else { - return model.getLineContent(lineNumber); - } - }; - let newIndentatOfMovingBlock = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber + 1, indentConverter); - if (newIndentatOfMovingBlock !== null) { - const oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](model.getLineContent(s.startLineNumber)); - const newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](newIndentatOfMovingBlock, tabSize); - const oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](oldIndentation, tabSize); - if (newSpaceCnt !== oldSpaceCnt) { - const spaceCntOffset = newSpaceCnt - oldSpaceCnt; - this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset); - } - } - } - } - else { - // Insert line that needs to be moved before - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); - } - } - else { - movingLineNumber = s.startLineNumber - 1; - movingLineText = model.getLineContent(movingLineNumber); - // Delete line that needs to be moved - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](movingLineNumber, 1, movingLineNumber + 1, 1), null); - // Insert line that needs to be moved after - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\n' + movingLineText); - if (this.shouldAutoIndent(model, s)) { - virtualModel.getLineContent = (lineNumber) => { - if (lineNumber === movingLineNumber) { - return model.getLineContent(s.startLineNumber); - } - else { - return model.getLineContent(lineNumber); - } - }; - let ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2); - // check if s.startLineNumber - 2 matches onEnter rules, if so adjust the moving block by onEnter rules. - if (ret !== null) { - if (ret !== 0) { - this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret); - } - } - else { - // it doesn't match any onEnter rule, let's check indentation rules then. - let indentOfFirstLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); - if (indentOfFirstLine !== null) { - // adjust the indentation of the moving block - let oldIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](model.getLineContent(s.startLineNumber)); - let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](indentOfFirstLine, tabSize); - let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](oldIndent, tabSize); - if (newSpaceCnt !== oldSpaceCnt) { - let spaceCntOffset = newSpaceCnt - oldSpaceCnt; - this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset); - } - } - } - } - } + this._width = width; + this.domNode.style.width = this._width + 'px'; + } + setHeight(height) { + if (this._height === height) { + return; } - this._selectionId = builder.trackSelection(s); + this._height = height; + this.domNode.style.height = this._height + 'px'; } - buildIndentConverter(tabSize, indentSize, insertSpaces) { - return { - shiftIndent: (indentation) => { - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__["ShiftCommand"].shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces); - }, - unshiftIndent: (indentation) => { - return _common_commands_shiftCommand_js__WEBPACK_IMPORTED_MODULE_1__["ShiftCommand"].unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces); - } - }; + setTop(top) { + if (this._top === top) { + return; + } + this._top = top; + this.domNode.style.top = this._top + 'px'; } - matchEnterRule(model, indentConverter, tabSize, line, oneLineAbove, oneLineAboveText) { - let validPrecedingLine = oneLineAbove; - while (validPrecedingLine >= 1) { - // ship empty lines as empty lines just inherit indentation - let lineContent; - if (validPrecedingLine === oneLineAbove && oneLineAboveText !== undefined) { - lineContent = oneLineAboveText; - } - else { - lineContent = model.getLineContent(validPrecedingLine); - } - let nonWhitespaceIdx = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["lastNonWhitespaceIndex"](lineContent); - if (nonWhitespaceIdx >= 0) { - break; - } - validPrecedingLine--; + unsetTop() { + if (this._top === -1) { + return; } - if (validPrecedingLine < 1 || line > model.getLineCount()) { - return null; + this._top = -1; + this.domNode.style.top = ''; + } + setLeft(left) { + if (this._left === left) { + return; } - let maxColumn = model.getLineMaxColumn(validPrecedingLine); - let enter = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getEnterAction(this._autoIndent, model, new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](validPrecedingLine, maxColumn, validPrecedingLine, maxColumn)); - if (enter) { - let enterPrefix = enter.indentation; - if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].None) { - enterPrefix = enter.indentation + enter.appendText; - } - else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Indent) { - enterPrefix = enter.indentation + enter.appendText; - } - else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].IndentOutdent) { - enterPrefix = enter.indentation; - } - else if (enter.indentAction === _common_modes_languageConfiguration_js__WEBPACK_IMPORTED_MODULE_4__["IndentAction"].Outdent) { - enterPrefix = indentConverter.unshiftIndent(enter.indentation) + enter.appendText; - } - let movingLineText = model.getLineContent(line); - if (this.trimLeft(movingLineText).indexOf(this.trimLeft(enterPrefix)) >= 0) { - let oldIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](model.getLineContent(line)); - let newIndentation = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](enterPrefix); - let indentMetadataOfMovelingLine = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getIndentMetadata(model, line); - if (indentMetadataOfMovelingLine !== null && indentMetadataOfMovelingLine & 2 /* DECREASE_MASK */) { - newIndentation = indentConverter.unshiftIndent(newIndentation); - } - let newSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](newIndentation, tabSize); - let oldSpaceCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](oldIndentation, tabSize); - return newSpaceCnt - oldSpaceCnt; - } + this._left = left; + this.domNode.style.left = this._left + 'px'; + } + setBottom(bottom) { + if (this._bottom === bottom) { + return; } - return null; + this._bottom = bottom; + this.domNode.style.bottom = this._bottom + 'px'; } - trimLeft(str) { - return str.replace(/^\s+/, ''); + setRight(right) { + if (this._right === right) { + return; + } + this._right = right; + this.domNode.style.right = this._right + 'px'; } - shouldAutoIndent(model, selection) { - if (this._autoIndent < 4 /* Full */) { - return false; + setFontFamily(fontFamily) { + if (this._fontFamily === fontFamily) { + return; } - // if it's not easy to tokenize, we stop auto indent. - if (!model.isCheapToTokenize(selection.startLineNumber)) { - return false; + this._fontFamily = fontFamily; + this.domNode.style.fontFamily = this._fontFamily; + } + setFontWeight(fontWeight) { + if (this._fontWeight === fontWeight) { + return; } - let languageAtSelectionStart = model.getLanguageIdAtPosition(selection.startLineNumber, 1); - let languageAtSelectionEnd = model.getLanguageIdAtPosition(selection.endLineNumber, 1); - if (languageAtSelectionStart !== languageAtSelectionEnd) { - return false; + this._fontWeight = fontWeight; + this.domNode.style.fontWeight = this._fontWeight; + } + setFontSize(fontSize) { + if (this._fontSize === fontSize) { + return; } - if (_common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["LanguageConfigurationRegistry"].getIndentRulesSupport(languageAtSelectionStart) === null) { - return false; + this._fontSize = fontSize; + this.domNode.style.fontSize = this._fontSize + 'px'; + } + setFontFeatureSettings(fontFeatureSettings) { + if (this._fontFeatureSettings === fontFeatureSettings) { + return; } - return true; + this._fontFeatureSettings = fontFeatureSettings; + this.domNode.style.fontFeatureSettings = this._fontFeatureSettings; } - getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, offset) { - for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { - let lineContent = model.getLineContent(i); - let originalIndent = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["getLeadingWhitespace"](lineContent); - let originalSpacesCnt = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["getSpaceCnt"](originalIndent, tabSize); - let newSpacesCnt = originalSpacesCnt + offset; - let newIndent = _indentation_indentUtils_js__WEBPACK_IMPORTED_MODULE_6__["generateIndent"](newSpacesCnt, tabSize, insertSpaces); - if (newIndent !== originalIndent) { - builder.addEditOperation(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](i, 1, i, originalIndent.length + 1), newIndent); - if (i === s.endLineNumber && s.endColumn <= originalIndent.length + 1 && newIndent === '') { - // as users select part of the original indent white spaces - // when we adjust the indentation of endLine, we should adjust the cursor position as well. - this._moveEndLineSelectionShrink = true; - } - } + setLineHeight(lineHeight) { + if (this._lineHeight === lineHeight) { + return; } + this._lineHeight = lineHeight; + this.domNode.style.lineHeight = this._lineHeight + 'px'; } - computeCursorState(model, helper) { - let result = helper.getTrackedSelection(this._selectionId); - if (this._moveEndPositionDown) { - result = result.setEndPosition(result.endLineNumber + 1, 1); + setLetterSpacing(letterSpacing) { + if (this._letterSpacing === letterSpacing) { + return; } - if (this._moveEndLineSelectionShrink && result.startLineNumber < result.endLineNumber) { - result = result.setEndPosition(result.endLineNumber, 2); + this._letterSpacing = letterSpacing; + this.domNode.style.letterSpacing = this._letterSpacing + 'px'; + } + setClassName(className) { + if (this._className === className) { + return; } - return result; + this._className = className; + this.domNode.className = this._className; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/sortLinesCommand.js ***! - \**********************************************************************************************/ -/*! exports provided: SortLinesCommand */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SortLinesCommand", function() { return SortLinesCommand; }); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class SortLinesCommand { - constructor(selection, descending) { - this.selection = selection; - this.descending = descending; - this.selectionId = null; + toggleClassName(className, shouldHaveIt) { + _dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this.domNode, className, shouldHaveIt); + this._className = this.domNode.className; } - static getCollator() { - if (!SortLinesCommand._COLLATOR) { - SortLinesCommand._COLLATOR = new Intl.Collator(); + setDisplay(display) { + if (this._display === display) { + return; } - return SortLinesCommand._COLLATOR; + this._display = display; + this.domNode.style.display = this._display; } - getEditOperations(model, builder) { - let op = sortLines(model, this.selection, this.descending); - if (op) { - builder.addEditOperation(op.range, op.text); + setPosition(position) { + if (this._position === position) { + return; } - this.selectionId = builder.trackSelection(this.selection); + this._position = position; + this.domNode.style.position = this._position; } - computeCursorState(model, helper) { - return helper.getTrackedSelection(this.selectionId); + setVisibility(visibility) { + if (this._visibility === visibility) { + return; + } + this._visibility = visibility; + this.domNode.style.visibility = this._visibility; } - static canRun(model, selection, descending) { - if (model === null) { - return false; + setBackgroundColor(backgroundColor) { + if (this._backgroundColor === backgroundColor) { + return; } - let data = getSortData(model, selection, descending); - if (!data) { - return false; + this._backgroundColor = backgroundColor; + this.domNode.style.backgroundColor = this._backgroundColor; + } + setLayerHinting(layerHint) { + if (this._layerHint === layerHint) { + return; } - for (let i = 0, len = data.before.length; i < len; i++) { - if (data.before[i] !== data.after[i]) { - return true; - } + this._layerHint = layerHint; + this.domNode.style.transform = this._layerHint ? 'translate3d(0px, 0px, 0px)' : ''; + } + setBoxShadow(boxShadow) { + if (this._boxShadow === boxShadow) { + return; } - return false; + this._boxShadow = boxShadow; + this.domNode.style.boxShadow = boxShadow; } -} -SortLinesCommand._COLLATOR = null; -function getSortData(model, selection, descending) { - let startLineNumber = selection.startLineNumber; - let endLineNumber = selection.endLineNumber; - if (selection.endColumn === 1) { - endLineNumber--; + setContain(contain) { + if (this._contain === contain) { + return; + } + this._contain = contain; + this.domNode.style.contain = this._contain; } - // Nothing to sort if user didn't select anything. - if (startLineNumber >= endLineNumber) { - return null; + setAttribute(name, value) { + this.domNode.setAttribute(name, value); } - let linesToSort = []; - // Get the contents of the selection to be sorted. - for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { - linesToSort.push(model.getLineContent(lineNumber)); + removeAttribute(name) { + this.domNode.removeAttribute(name); } - let sorted = linesToSort.slice(0); - sorted.sort(SortLinesCommand.getCollator().compare); - // If descending, reverse the order. - if (descending === true) { - sorted = sorted.reverse(); + appendChild(child) { + this.domNode.appendChild(child.domNode); } - return { - startLineNumber: startLineNumber, - endLineNumber: endLineNumber, - before: linesToSort, - after: sorted - }; -} -/** - * Generate commands for sorting lines on a model. - */ -function sortLines(model, selection, descending) { - let data = getSortData(model, selection, descending); - if (!data) { - return null; + removeChild(child) { + this.domNode.removeChild(child.domNode); } - return _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_0__["EditOperation"].replace(new _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"](data.startLineNumber, 1, data.endLineNumber, model.getLineMaxColumn(data.endLineNumber)), data.after.join('\n')); +} +function createFastDomNode(domNode) { + return new FastDomNode(domNode); } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js ***! - \****************************************************************************/ -/*! exports provided: Link, LinksList, getLinks */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js ***! + \*********************************************************************************/ +/*! exports provided: renderText, renderFormattedText, createElement */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return Link; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinksList", function() { return LinksList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLinks", function() { return getLinks; }); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderText", function() { return renderText; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderFormattedText", function() { return renderFormattedText; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return createElement; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - -class Link { - constructor(link, provider) { - this._link = link; - this._provider = provider; +function renderText(text, options = {}) { + const element = createElement(options); + element.textContent = text; + return element; +} +function renderFormattedText(formattedText, options = {}) { + const element = createElement(options); + _renderFormattedText(element, parseFormattedText(formattedText), options.actionHandler); + return element; +} +function createElement(options) { + const tagName = options.inline ? 'span' : 'div'; + const element = document.createElement(tagName); + if (options.className) { + element.className = options.className; } - toJSON() { - return { - range: this.range, - url: this.url, - tooltip: this.tooltip - }; + return element; +} +class StringStream { + constructor(source) { + this.source = source; + this.index = 0; } - get range() { - return this._link.range; + eos() { + return this.index >= this.source.length; } - get url() { - return this._link.url; + next() { + const next = this.peek(); + this.advance(); + return next; } - get tooltip() { - return this._link.tooltip; + peek() { + return this.source[this.index]; } - resolve(token) { - return __awaiter(this, void 0, void 0, function* () { - if (this._link.url) { - return this._link.url; - } - if (typeof this._provider.resolveLink === 'function') { - return Promise.resolve(this._provider.resolveLink(this._link, token)).then(value => { - this._link = value || this._link; - if (this._link.url) { - // recurse - return this.resolve(token); - } - return Promise.reject(new Error('missing')); - }); - } - return Promise.reject(new Error('missing')); + advance() { + this.index++; + } +} +function _renderFormattedText(element, treeNode, actionHandler) { + let child; + if (treeNode.type === 2 /* Text */) { + child = document.createTextNode(treeNode.content || ''); + } + else if (treeNode.type === 3 /* Bold */) { + child = document.createElement('b'); + } + else if (treeNode.type === 4 /* Italics */) { + child = document.createElement('i'); + } + else if (treeNode.type === 5 /* Action */ && actionHandler) { + const a = document.createElement('a'); + a.href = '#'; + actionHandler.disposeables.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addStandardDisposableListener"](a, 'click', (event) => { + actionHandler.callback(String(treeNode.index), event); + })); + child = a; + } + else if (treeNode.type === 7 /* NewLine */) { + child = document.createElement('br'); + } + else if (treeNode.type === 1 /* Root */) { + child = element; + } + if (child && element !== child) { + element.appendChild(child); + } + if (child && Array.isArray(treeNode.children)) { + treeNode.children.forEach((nodeChild) => { + _renderFormattedText(child, nodeChild, actionHandler); }); } } -class LinksList extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(tuples) { - super(); - let links = []; - for (const [list, provider] of tuples) { - // merge all links - const newLinks = list.links.map(link => new Link(link, provider)); - links = LinksList._union(links, newLinks); - // register disposables - if (Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["isDisposable"])(list)) { - this._register(list); +function parseFormattedText(content) { + const root = { + type: 1 /* Root */, + children: [] + }; + let actionViewItemIndex = 0; + let current = root; + const stack = []; + const stream = new StringStream(content); + while (!stream.eos()) { + let next = stream.next(); + const isEscapedFormatType = (next === '\\' && formatTagType(stream.peek()) !== 0 /* Invalid */); + if (isEscapedFormatType) { + next = stream.next(); // unread the backslash if it escapes a format tag type + } + if (!isEscapedFormatType && isFormatTag(next) && next === stream.peek()) { + stream.advance(); + if (current.type === 2 /* Text */) { + current = stack.pop(); + } + const type = formatTagType(next); + if (current.type === type || (current.type === 5 /* Action */ && type === 6 /* ActionClose */)) { + current = stack.pop(); + } + else { + const newCurrent = { + type: type, + children: [] + }; + if (type === 5 /* Action */) { + newCurrent.index = actionViewItemIndex; + actionViewItemIndex++; + } + current.children.push(newCurrent); + stack.push(current); + current = newCurrent; } } - this.links = links; - } - static _union(oldLinks, newLinks) { - // reunite oldLinks with newLinks and remove duplicates - let result = []; - let oldIndex; - let oldLen; - let newIndex; - let newLen; - for (oldIndex = 0, newIndex = 0, oldLen = oldLinks.length, newLen = newLinks.length; oldIndex < oldLen && newIndex < newLen;) { - const oldLink = oldLinks[oldIndex]; - const newLink = newLinks[newIndex]; - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].areIntersectingOrTouching(oldLink.range, newLink.range)) { - // Remove the oldLink - oldIndex++; - continue; + else if (next === '\n') { + if (current.type === 2 /* Text */) { + current = stack.pop(); } - const comparisonResult = _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].compareRangesUsingStarts(oldLink.range, newLink.range); - if (comparisonResult < 0) { - // oldLink is before - result.push(oldLink); - oldIndex++; + current.children.push({ + type: 7 /* NewLine */ + }); + } + else { + if (current.type !== 2 /* Text */) { + const textCurrent = { + type: 2 /* Text */, + content: next + }; + current.children.push(textCurrent); + stack.push(current); + current = textCurrent; } else { - // newLink is before - result.push(newLink); - newIndex++; + current.content += next; } } - for (; oldIndex < oldLen; oldIndex++) { - result.push(oldLinks[oldIndex]); - } - for (; newIndex < newLen; newIndex++) { - result.push(newLinks[newIndex]); - } - return result; } -} -function getLinks(model, token) { - const lists = []; - // ask all providers for links in parallel - const promises = _common_modes_js__WEBPACK_IMPORTED_MODULE_4__["LinkProviderRegistry"].ordered(model).reverse().map((provider, i) => { - return Promise.resolve(provider.provideLinks(model, token)).then(result => { - if (result) { - lists[i] = [result, provider]; - } - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedExternalError"]); - }); - return Promise.all(promises).then(() => { - const result = new LinksList(Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["coalesce"])(lists)); - if (!token.isCancellationRequested) { - return result; - } - result.dispose(); - return new LinksList([]); - }); -} -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_6__["CommandsRegistry"].registerCommand('_executeLinkProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () { - const [uri] = args; - if (!(uri instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"])) { - return []; + if (current.type === 2 /* Text */) { + current = stack.pop(); } - const model = accessor.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_5__["IModelService"]).getModel(uri); - if (!model) { - return []; + if (stack.length) { + // incorrectly formatted string literal } - const list = yield getLinks(model, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationToken"].None); - if (!list) { - return []; + return root; +} +function isFormatTag(char) { + return formatTagType(char) !== 0 /* Invalid */; +} +function formatTagType(char) { + switch (char) { + case '*': + return 3 /* Bold */; + case '_': + return 4 /* Italics */; + case '[': + return 5 /* Action */; + case ']': + return 6 /* ActionClose */; + default: + return 0 /* Invalid */; } - const result = list.links.slice(0); - list.dispose(); - return result; -})); +} /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css ***! - \**************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js ***! + \**********************************************************************************/ +/*! exports provided: standardMouseMoveMerger, GlobalMouseMoveMonitor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./links.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_links_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js": -/*!*************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js ***! - \*************************************************************************/ -/*! exports provided: LinkDetector */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkDetector", function() { return LinkDetector; }); -/* harmony import */ var _links_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./links.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _gotoSymbol_link_clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../gotoSymbol/link/clickLinkGesture.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/clickLinkGesture.js"); -/* harmony import */ var _getLinks_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./getLinks.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/getLinks.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "standardMouseMoveMerger", function() { return standardMouseMoveMerger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalMouseMoveMonitor", function() { return GlobalMouseMoveMonitor; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./iframe.js */ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js"); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - - - -function getHoverMessage(link, useMetaKey) { - const executeCmd = link.url && /^command:/i.test(link.url.toString()); - const label = link.tooltip - ? link.tooltip - : executeCmd - ? _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.executeCmd', 'Execute command') - : _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.follow', 'Follow link'); - const kb = useMetaKey - ? _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__["isMacintosh"] - ? _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.kb.meta.mac', "cmd + click") - : _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.kb.meta', "ctrl + click") - : _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__["isMacintosh"] - ? _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.kb.alt.mac', "option + click") - : _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('links.navigate.kb.alt', "alt + click"); - if (link.url) { - const hoverMessage = new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__["MarkdownString"]('', true).appendMarkdown(`[${label}](${link.url.toString()}) (${kb})`); - return hoverMessage; - } - else { - return new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_5__["MarkdownString"]().appendText(`${label} (${kb})`); - } -} -const decoration = { - general: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link' - }), - active: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_9__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - collapseOnReplaceEdit: true, - inlineClassName: 'detected-link-active' - }) -}; -class LinkOccurrence { - constructor(link, decorationId) { - this.link = link; - this.decorationId = decorationId; - } - static decoration(link, useMetaKey) { - return { - range: link.range, - options: LinkOccurrence._getOptions(link, useMetaKey, false) - }; - } - static _getOptions(link, useMetaKey, isActive) { - const options = Object.assign({}, (isActive ? decoration.active : decoration.general)); - options.hoverMessage = getHoverMessage(link, useMetaKey); - return options; - } - activate(changeAccessor, useMetaKey) { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, true)); - } - deactivate(changeAccessor, useMetaKey) { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, false)); - } +function standardMouseMoveMerger(lastEvent, currentEvent) { + let ev = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](currentEvent); + ev.preventDefault(); + return { + leftButton: ev.leftButton, + buttons: ev.buttons, + posx: ev.posx, + posy: ev.posy + }; } -let LinkDetector = class LinkDetector { - constructor(editor, openerService, notificationService) { - this.listenersToRemove = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["DisposableStore"](); - this.editor = editor; - this.openerService = openerService; - this.notificationService = notificationService; - let clickLinkGesture = new _gotoSymbol_link_clickLinkGesture_js__WEBPACK_IMPORTED_MODULE_11__["ClickLinkGesture"](editor); - this.listenersToRemove.add(clickLinkGesture); - this.listenersToRemove.add(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { - this._onEditorMouseMove(mouseEvent, keyboardEvent); - })); - this.listenersToRemove.add(clickLinkGesture.onExecute((e) => { - this.onEditorMouseUp(e); - })); - this.listenersToRemove.add(clickLinkGesture.onCancel((e) => { - this.cleanUpActiveLinkDecoration(); - })); - this.enabled = editor.getOption(54 /* links */); - this.listenersToRemove.add(editor.onDidChangeConfiguration((e) => { - const enabled = editor.getOption(54 /* links */); - if (this.enabled === enabled) { - // No change in our configuration option - return; - } - this.enabled = enabled; - // Remove any links (for the getting disabled case) - this.updateDecorations([]); - // Stop any computation (for the getting disabled case) - this.stop(); - // Start computing (for the getting enabled case) - this.beginCompute(); - })); - this.listenersToRemove.add(editor.onDidChangeModelContent((e) => this.onChange())); - this.listenersToRemove.add(editor.onDidChangeModel((e) => this.onModelChanged())); - this.listenersToRemove.add(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged())); - this.listenersToRemove.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_10__["LinkProviderRegistry"].onDidChange((e) => this.onModelModeChanged())); - this.timeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"](); - this.computePromise = null; - this.activeLinksList = null; - this.currentOccurrences = {}; - this.activeLinkDecorationId = null; - this.beginCompute(); - } - static get(editor) { - return editor.getContribution(LinkDetector.ID); - } - onModelChanged() { - this.currentOccurrences = {}; - this.activeLinkDecorationId = null; - this.stop(); - this.beginCompute(); - } - onModelModeChanged() { - this.stop(); - this.beginCompute(); - } - onChange() { - this.timeout.setIfNotSet(() => this.beginCompute(), LinkDetector.RECOMPUTE_TIME); - } - beginCompute() { - return __awaiter(this, void 0, void 0, function* () { - if (!this.editor.hasModel() || !this.enabled) { - return; - } - const model = this.editor.getModel(); - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_10__["LinkProviderRegistry"].has(model)) { - return; - } - if (this.activeLinksList) { - this.activeLinksList.dispose(); - this.activeLinksList = null; - } - this.computePromise = _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["createCancelablePromise"](token => Object(_getLinks_js__WEBPACK_IMPORTED_MODULE_12__["getLinks"])(model, token)); - try { - this.activeLinksList = yield this.computePromise; - this.updateDecorations(this.activeLinksList.links); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__["onUnexpectedError"])(err); - } - finally { - this.computePromise = null; - } - }); - } - updateDecorations(links) { - const useMetaKey = (this.editor.getOption(61 /* multiCursorModifier */) === 'altKey'); - let oldDecorations = []; - let keys = Object.keys(this.currentOccurrences); - for (let i = 0, len = keys.length; i < len; i++) { - let decorationId = keys[i]; - let occurance = this.currentOccurrences[decorationId]; - oldDecorations.push(occurance.decorationId); - } - let newDecorations = []; - if (links) { - // Not sure why this is sometimes null - for (const link of links) { - newDecorations.push(LinkOccurrence.decoration(link, useMetaKey)); - } - } - let decorations = this.editor.deltaDecorations(oldDecorations, newDecorations); - this.currentOccurrences = {}; - this.activeLinkDecorationId = null; - for (let i = 0, len = decorations.length; i < len; i++) { - let occurance = new LinkOccurrence(links[i], decorations[i]); - this.currentOccurrences[occurance.decorationId] = occurance; - } - } - _onEditorMouseMove(mouseEvent, withKey) { - const useMetaKey = (this.editor.getOption(61 /* multiCursorModifier */) === 'altKey'); - if (this.isEnabled(mouseEvent, withKey)) { - this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one - const occurrence = this.getLinkOccurrence(mouseEvent.target.position); - if (occurrence) { - this.editor.changeDecorations((changeAccessor) => { - occurrence.activate(changeAccessor, useMetaKey); - this.activeLinkDecorationId = occurrence.decorationId; - }); - } - } - else { - this.cleanUpActiveLinkDecoration(); - } +class GlobalMouseMoveMonitor { + constructor() { + this._hooks = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); + this._mouseMoveEventMerger = null; + this._mouseMoveCallback = null; + this._onStopCallback = null; } - cleanUpActiveLinkDecoration() { - const useMetaKey = (this.editor.getOption(61 /* multiCursorModifier */) === 'altKey'); - if (this.activeLinkDecorationId) { - const occurrence = this.currentOccurrences[this.activeLinkDecorationId]; - if (occurrence) { - this.editor.changeDecorations((changeAccessor) => { - occurrence.deactivate(changeAccessor, useMetaKey); - }); - } - this.activeLinkDecorationId = null; - } + dispose() { + this.stopMonitoring(false); + this._hooks.dispose(); } - onEditorMouseUp(mouseEvent) { - if (!this.isEnabled(mouseEvent)) { + stopMonitoring(invokeStopCallback) { + if (!this.isMonitoring()) { + // Not monitoring return; } - const occurrence = this.getLinkOccurrence(mouseEvent.target.position); - if (!occurrence) { - return; + // Unhook + this._hooks.clear(); + this._mouseMoveEventMerger = null; + this._mouseMoveCallback = null; + const onStopCallback = this._onStopCallback; + this._onStopCallback = null; + if (invokeStopCallback && onStopCallback) { + onStopCallback(); } - this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier, true /* from user gesture */); } - openLinkOccurrence(occurrence, openToSide, fromUserGesture = false) { - if (!this.openerService) { + isMonitoring() { + return !!this._mouseMoveEventMerger; + } + startMonitoring(initialElement, initialButtons, mouseMoveEventMerger, mouseMoveCallback, onStopCallback) { + if (this.isMonitoring()) { + // I am already hooked return; } - const { link } = occurrence; - link.resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None).then(uri => { - // Support for relative file URIs of the shape file://./relativeFile.txt or file:///./relativeFile.txt - if (typeof uri === 'string' && this.editor.hasModel()) { - const modelUri = this.editor.getModel().uri; - if (modelUri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__["Schemas"].file && _base_common_strings_js__WEBPACK_IMPORTED_MODULE_20__["startsWith"](uri, 'file:')) { - const parsedUri = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_17__["URI"].parse(uri); - if (parsedUri.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_18__["Schemas"].file) { - const fsPath = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__["originalFSPath"](parsedUri); - let relativePath = null; - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_20__["startsWith"](fsPath, '/./')) { - relativePath = `.${fsPath.substr(1)}`; - } - else if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_20__["startsWith"](fsPath, '//./')) { - relativePath = `.${fsPath.substr(2)}`; - } - if (relativePath) { - uri = _base_common_resources_js__WEBPACK_IMPORTED_MODULE_19__["joinPath"](modelUri, relativePath); - } - } + this._mouseMoveEventMerger = mouseMoveEventMerger; + this._mouseMoveCallback = mouseMoveCallback; + this._onStopCallback = onStopCallback; + const windowChain = _iframe_js__WEBPACK_IMPORTED_MODULE_2__["IframeUtils"].getSameOriginWindowChain(); + const mouseMove = _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents ? 'pointermove' : 'mousemove'; + const mouseUp = _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents ? 'pointerup' : 'mouseup'; + const listenTo = windowChain.map(element => element.window.document); + const shadowRoot = _dom_js__WEBPACK_IMPORTED_MODULE_0__["getShadowRoot"](initialElement); + if (shadowRoot) { + listenTo.unshift(shadowRoot); + } + for (const element of listenTo) { + this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableThrottledListener"](element, mouseMove, (data) => { + if (data.buttons !== initialButtons) { + // Buttons state has changed in the meantime + this.stopMonitoring(true); + return; } - } - return this.openerService.open(uri, { openToSide, fromUserGesture }); - }, err => { - const messageOrError = err instanceof Error ? err.message : err; - // different error cases - if (messageOrError === 'invalid') { - this.notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('invalid.url', 'Failed to open this link because it is not well-formed: {0}', link.url.toString())); - } - else if (messageOrError === 'missing') { - this.notificationService.warn(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('missing.url', 'Failed to open this link because its target is missing.')); - } - else { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__["onUnexpectedError"])(err); - } - }); - } - getLinkOccurrence(position) { - if (!this.editor.hasModel() || !position) { - return null; + this._mouseMoveCallback(data); + }, (lastEvent, currentEvent) => this._mouseMoveEventMerger(lastEvent, currentEvent))); + this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](element, mouseUp, (e) => this.stopMonitoring(true))); } - const decorations = this.editor.getModel().getDecorationsInRange({ - startLineNumber: position.lineNumber, - startColumn: position.column, - endLineNumber: position.lineNumber, - endColumn: position.column - }, 0, true); - for (const decoration of decorations) { - const currentOccurrence = this.currentOccurrences[decoration.id]; - if (currentOccurrence) { - return currentOccurrence; - } + if (_iframe_js__WEBPACK_IMPORTED_MODULE_2__["IframeUtils"].hasDifferentOriginAncestor()) { + let lastSameOriginAncestor = windowChain[windowChain.length - 1]; + // We might miss a mouse up if it happens outside the iframe + // This one is for Chrome + this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document, 'mouseout', (browserEvent) => { + let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](browserEvent); + if (e.target.tagName.toLowerCase() === 'html') { + this.stopMonitoring(true); + } + })); + // This one is for FF + this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document, 'mouseover', (browserEvent) => { + let e = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardMouseEvent"](browserEvent); + if (e.target.tagName.toLowerCase() === 'html') { + this.stopMonitoring(true); + } + })); + // This one is for IE + this._hooks.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent) => { + this.stopMonitoring(true); + })); } - return null; } - isEnabled(mouseEvent, withKey) { - return Boolean((mouseEvent.target.type === 6 /* CONTENT_TEXT */) - && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey))); +} + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js": +/*!******************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/iframe.js ***! + \******************************************************************/ +/*! exports provided: IframeUtils */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IframeUtils", function() { return IframeUtils; }); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +let hasDifferentOriginAncestorFlag = false; +let sameOriginWindowChainCache = null; +function getParentWindowIfSameOrigin(w) { + if (!w.parent || w.parent === w) { + return null; } - stop() { - this.timeout.cancel(); - if (this.activeLinksList) { - this.activeLinksList.dispose(); - } - if (this.computePromise) { - this.computePromise.cancel(); - this.computePromise = null; + // Cannot really tell if we have access to the parent window unless we try to access something in it + try { + let location = w.location; + let parentLocation = w.parent.location; + if (location.origin !== 'null' && parentLocation.origin !== 'null') { + if (location.protocol !== parentLocation.protocol || location.hostname !== parentLocation.hostname || location.port !== parentLocation.port) { + hasDifferentOriginAncestorFlag = true; + return null; + } } } - dispose() { - this.listenersToRemove.dispose(); - this.stop(); - this.timeout.dispose(); + catch (e) { + hasDifferentOriginAncestorFlag = true; + return null; } -}; -LinkDetector.ID = 'editor.linkDetector'; -LinkDetector.RECOMPUTE_TIME = 1000; // ms -LinkDetector = __decorate([ - __param(1, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_14__["IOpenerService"]), - __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__["INotificationService"]) -], LinkDetector); - -class OpenLinkAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.openLink', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label', "Open Link"), - alias: 'Open Link', - precondition: undefined - }); + return w.parent; +} +class IframeUtils { + /** + * Returns a chain of embedded windows with the same origin (which can be accessed programmatically). + * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin. + * To distinguish if at one point the current execution environment is running inside a window with a different origin, see hasDifferentOriginAncestor() + */ + static getSameOriginWindowChain() { + if (!sameOriginWindowChainCache) { + sameOriginWindowChainCache = []; + let w = window; + let parent; + do { + parent = getParentWindowIfSameOrigin(w); + if (parent) { + sameOriginWindowChainCache.push({ + window: w, + iframeElement: w.frameElement || null + }); + } + else { + sameOriginWindowChainCache.push({ + window: w, + iframeElement: null + }); + } + w = parent; + } while (w); + } + return sameOriginWindowChainCache.slice(0); } - run(accessor, editor) { - let linkDetector = LinkDetector.get(editor); - if (!linkDetector) { - return; + /** + * Returns true if the current execution environment is chained in a list of iframes which at one point ends in a window with a different origin. + * Returns false if the current execution environment is not running inside an iframe or if the entire chain of iframes have the same origin. + */ + static hasDifferentOriginAncestor() { + if (!sameOriginWindowChainCache) { + this.getSameOriginWindowChain(); } - if (!editor.hasModel()) { - return; + return hasDifferentOriginAncestorFlag; + } + /** + * Returns the position of `childWindow` relative to `ancestorWindow` + */ + static getPositionOfChildWindowRelativeToAncestorWindow(childWindow, ancestorWindow) { + if (!ancestorWindow || childWindow === ancestorWindow) { + return { + top: 0, + left: 0 + }; } - let selections = editor.getSelections(); - for (let sel of selections) { - let link = linkDetector.getLinkOccurrence(sel.getEndPosition()); - if (link) { - linkDetector.openLinkOccurrence(link, false); + let top = 0, left = 0; + let windowChain = this.getSameOriginWindowChain(); + for (const windowChainEl of windowChain) { + top += windowChainEl.window.scrollY; + left += windowChainEl.window.scrollX; + if (windowChainEl.window === ancestorWindow) { + break; + } + if (!windowChainEl.iframeElement) { + break; } + let boundingRect = windowChainEl.iframeElement.getBoundingClientRect(); + top += boundingRect.top; + left += boundingRect.left; } + return { + top: top, + left: left + }; } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["registerEditorContribution"])(LinkDetector.ID, LinkDetector); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_8__["registerEditorAction"])(OpenLinkAction); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_16__["registerThemingParticipant"])((theme, collector) => { - const activeLinkForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["editorActiveLinkForeground"]); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor .detected-link-active { color: ${activeLinkForeground} !important; }`); - } -}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js ***! - \***************************************************************************************/ -/*! exports provided: MarkdownRenderer */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js": +/*!*************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js ***! + \*************************************************************************/ +/*! exports provided: StandardKeyboardEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkdownRenderer", function() { return MarkdownRenderer; }); -/* harmony import */ var _base_browser_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/markdownRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/textToHtmlTokenizer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/textToHtmlTokenizer.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardKeyboardEvent", function() { return StandardKeyboardEvent; }); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); +/* harmony import */ var _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - -let MarkdownRenderer = class MarkdownRenderer extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(_editor, _modeService, _openerService = _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_1__["NullOpenerService"]) { - super(); - this._editor = _editor; - this._modeService = _modeService; - this._openerService = _openerService; - this._onDidRenderCodeBlock = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); - this.onDidRenderCodeBlock = this._onDidRenderCodeBlock.event; +let KEY_CODE_MAP = new Array(230); +let INVERSE_KEY_CODE_MAP = new Array(112 /* MAX_VALUE */); +(function () { + for (let i = 0; i < INVERSE_KEY_CODE_MAP.length; i++) { + INVERSE_KEY_CODE_MAP[i] = -1; } - getOptions(disposeables) { - return { - codeBlockRenderer: (languageAlias, value) => { - // In markdown, - // it is possible that we stumble upon language aliases (e.g.js instead of javascript) - // it is possible no alias is given in which case we fall back to the current editor lang - let modeId = null; - if (languageAlias) { - modeId = this._modeService.getModeIdForLanguageName(languageAlias); - } - else { - const model = this._editor.getModel(); - if (model) { - modeId = model.getLanguageIdentifier().language; - } - } - this._modeService.triggerMode(modeId || ''); - return Promise.resolve(true).then(_ => { - const promise = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__["TokenizationRegistry"].getPromise(modeId || ''); - if (promise) { - return promise.then(support => Object(_common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__["tokenizeToString"])(value, support)); - } - return Object(_common_modes_textToHtmlTokenizer_js__WEBPACK_IMPORTED_MODULE_4__["tokenizeToString"])(value, undefined); - }).then(code => { - return `${code}`; - }); - }, - codeBlockRenderCallback: () => this._onDidRenderCodeBlock.fire(), - actionHandler: { - callback: (content) => { - this._openerService.open(content, { fromUserGesture: true }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_3__["onUnexpectedError"]); - }, - disposeables - } - }; + function define(code, keyCode) { + KEY_CODE_MAP[code] = keyCode; + INVERSE_KEY_CODE_MAP[keyCode] = code; + } + define(3, 7 /* PauseBreak */); // VK_CANCEL 0x03 Control-break processing + define(8, 1 /* Backspace */); + define(9, 2 /* Tab */); + define(13, 3 /* Enter */); + define(16, 4 /* Shift */); + define(17, 5 /* Ctrl */); + define(18, 6 /* Alt */); + define(19, 7 /* PauseBreak */); + define(20, 8 /* CapsLock */); + define(27, 9 /* Escape */); + define(32, 10 /* Space */); + define(33, 11 /* PageUp */); + define(34, 12 /* PageDown */); + define(35, 13 /* End */); + define(36, 14 /* Home */); + define(37, 15 /* LeftArrow */); + define(38, 16 /* UpArrow */); + define(39, 17 /* RightArrow */); + define(40, 18 /* DownArrow */); + define(45, 19 /* Insert */); + define(46, 20 /* Delete */); + define(48, 21 /* KEY_0 */); + define(49, 22 /* KEY_1 */); + define(50, 23 /* KEY_2 */); + define(51, 24 /* KEY_3 */); + define(52, 25 /* KEY_4 */); + define(53, 26 /* KEY_5 */); + define(54, 27 /* KEY_6 */); + define(55, 28 /* KEY_7 */); + define(56, 29 /* KEY_8 */); + define(57, 30 /* KEY_9 */); + define(65, 31 /* KEY_A */); + define(66, 32 /* KEY_B */); + define(67, 33 /* KEY_C */); + define(68, 34 /* KEY_D */); + define(69, 35 /* KEY_E */); + define(70, 36 /* KEY_F */); + define(71, 37 /* KEY_G */); + define(72, 38 /* KEY_H */); + define(73, 39 /* KEY_I */); + define(74, 40 /* KEY_J */); + define(75, 41 /* KEY_K */); + define(76, 42 /* KEY_L */); + define(77, 43 /* KEY_M */); + define(78, 44 /* KEY_N */); + define(79, 45 /* KEY_O */); + define(80, 46 /* KEY_P */); + define(81, 47 /* KEY_Q */); + define(82, 48 /* KEY_R */); + define(83, 49 /* KEY_S */); + define(84, 50 /* KEY_T */); + define(85, 51 /* KEY_U */); + define(86, 52 /* KEY_V */); + define(87, 53 /* KEY_W */); + define(88, 54 /* KEY_X */); + define(89, 55 /* KEY_Y */); + define(90, 56 /* KEY_Z */); + define(93, 58 /* ContextMenu */); + define(96, 93 /* NUMPAD_0 */); + define(97, 94 /* NUMPAD_1 */); + define(98, 95 /* NUMPAD_2 */); + define(99, 96 /* NUMPAD_3 */); + define(100, 97 /* NUMPAD_4 */); + define(101, 98 /* NUMPAD_5 */); + define(102, 99 /* NUMPAD_6 */); + define(103, 100 /* NUMPAD_7 */); + define(104, 101 /* NUMPAD_8 */); + define(105, 102 /* NUMPAD_9 */); + define(106, 103 /* NUMPAD_MULTIPLY */); + define(107, 104 /* NUMPAD_ADD */); + define(108, 105 /* NUMPAD_SEPARATOR */); + define(109, 106 /* NUMPAD_SUBTRACT */); + define(110, 107 /* NUMPAD_DECIMAL */); + define(111, 108 /* NUMPAD_DIVIDE */); + define(112, 59 /* F1 */); + define(113, 60 /* F2 */); + define(114, 61 /* F3 */); + define(115, 62 /* F4 */); + define(116, 63 /* F5 */); + define(117, 64 /* F6 */); + define(118, 65 /* F7 */); + define(119, 66 /* F8 */); + define(120, 67 /* F9 */); + define(121, 68 /* F10 */); + define(122, 69 /* F11 */); + define(123, 70 /* F12 */); + define(124, 71 /* F13 */); + define(125, 72 /* F14 */); + define(126, 73 /* F15 */); + define(127, 74 /* F16 */); + define(128, 75 /* F17 */); + define(129, 76 /* F18 */); + define(130, 77 /* F19 */); + define(144, 78 /* NumLock */); + define(145, 79 /* ScrollLock */); + define(186, 80 /* US_SEMICOLON */); + define(187, 81 /* US_EQUAL */); + define(188, 82 /* US_COMMA */); + define(189, 83 /* US_MINUS */); + define(190, 84 /* US_DOT */); + define(191, 85 /* US_SLASH */); + define(192, 86 /* US_BACKTICK */); + define(193, 110 /* ABNT_C1 */); + define(194, 111 /* ABNT_C2 */); + define(219, 87 /* US_OPEN_SQUARE_BRACKET */); + define(220, 88 /* US_BACKSLASH */); + define(221, 89 /* US_CLOSE_SQUARE_BRACKET */); + define(222, 90 /* US_QUOTE */); + define(223, 91 /* OEM_8 */); + define(226, 92 /* OEM_102 */); + /** + * https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html + * If an Input Method Editor is processing key input and the event is keydown, return 229. + */ + define(229, 109 /* KEY_IN_COMPOSITION */); + if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"]) { + define(59, 80 /* US_SEMICOLON */); + define(107, 81 /* US_EQUAL */); + define(109, 83 /* US_MINUS */); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { + define(224, 57 /* Meta */); + } } - render(markdown) { - const disposeables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"](); - let element; - if (!markdown) { - element = document.createElement('span'); + else if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isWebKit"]) { + define(91, 57 /* Meta */); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { + // the two meta keys in the Mac have different key codes (91 and 93) + define(93, 57 /* Meta */); } else { - element = Object(_base_browser_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_0__["renderMarkdown"])(markdown, this.getOptions(disposeables)); + define(92, 57 /* Meta */); } - return { - element, - dispose: () => disposeables.dispose() - }; - } -}; -MarkdownRenderer = __decorate([ - __param(1, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_2__["IModeService"]), - __param(2, Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__["optional"])(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_1__["IOpenerService"])) -], MarkdownRenderer); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css ***! - \****************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./messageController.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_messageController_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js ***! - \***************************************************************************************/ -/*! exports provided: MessageController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MessageController", function() { return MessageController; }); -/* harmony import */ var _messageController_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./messageController.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - -let MessageController = class MessageController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor, contextKeyService) { - super(); - this._messageWidget = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["MutableDisposable"]()); - this._messageListeners = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"]()); - this._editor = editor; - this._visible = MessageController.MESSAGE_VISIBLE.bindTo(contextKeyService); - this._register(this._editor.onDidAttemptReadOnlyEdit(() => this._onDidAttemptReadOnlyEdit())); } - static get(editor) { - return editor.getContribution(MessageController.ID); +})(); +function extractKeyCode(e) { + if (e.charCode) { + // "keypress" events mostly + let char = String.fromCharCode(e.charCode).toUpperCase(); + return _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["KeyCodeUtils"].fromString(char); } - dispose() { - super.dispose(); - this._visible.reset(); - } - showMessage(message, position) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["alert"])(message); - this._visible.set(true); - this._messageWidget.clear(); - this._messageListeners.clear(); - this._messageWidget.value = new MessageWidget(this._editor, position, message); - // close on blur, cursor, model change, dispose - this._messageListeners.add(this._editor.onDidBlurEditorText(() => this.closeMessage())); - this._messageListeners.add(this._editor.onDidChangeCursorPosition(() => this.closeMessage())); - this._messageListeners.add(this._editor.onDidDispose(() => this.closeMessage())); - this._messageListeners.add(this._editor.onDidChangeModel(() => this.closeMessage())); - // 3sec - this._messageListeners.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"](() => this.closeMessage(), 3000)); - // close on mouse move - let bounds; - this._messageListeners.add(this._editor.onMouseMove(e => { - // outside the text area - if (!e.target.position) { - return; - } - if (!bounds) { - // define bounding box around position and first mouse occurance - bounds = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"](position.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1); - } - else if (!bounds.containsPosition(e.target.position)) { - // check if position is still in bounds - this.closeMessage(); - } - })); + return KEY_CODE_MAP[e.keyCode] || 0 /* Unknown */; +} +const ctrlKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */); +const altKeyMod = 512 /* Alt */; +const shiftKeyMod = 1024 /* Shift */; +const metaKeyMod = (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 2048 /* CtrlCmd */ : 256 /* WinCtrl */); +class StandardKeyboardEvent { + constructor(source) { + this._standardKeyboardEventBrand = true; + let e = source; + this.browserEvent = e; + this.target = e.target; + this.ctrlKey = e.ctrlKey; + this.shiftKey = e.shiftKey; + this.altKey = e.altKey; + this.metaKey = e.metaKey; + this.keyCode = extractKeyCode(e); + this.code = e.code; + // console.info(e.type + ": keyCode: " + e.keyCode + ", which: " + e.which + ", charCode: " + e.charCode + ", detail: " + e.detail + " ====> " + this.keyCode + ' -- ' + KeyCode[this.keyCode]); + this.ctrlKey = this.ctrlKey || this.keyCode === 5 /* Ctrl */; + this.altKey = this.altKey || this.keyCode === 6 /* Alt */; + this.shiftKey = this.shiftKey || this.keyCode === 4 /* Shift */; + this.metaKey = this.metaKey || this.keyCode === 57 /* Meta */; + this._asKeybinding = this._computeKeybinding(); + this._asRuntimeKeybinding = this._computeRuntimeKeybinding(); + // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`); } - closeMessage() { - this._visible.reset(); - this._messageListeners.clear(); - if (this._messageWidget.value) { - this._messageListeners.add(MessageWidget.fadeOut(this._messageWidget.value)); + preventDefault() { + if (this.browserEvent && this.browserEvent.preventDefault) { + this.browserEvent.preventDefault(); } } - _onDidAttemptReadOnlyEdit() { - if (this._editor.hasModel()) { - this.showMessage(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editor.readonly', "Cannot edit in read-only editor"), this._editor.getPosition()); + stopPropagation() { + if (this.browserEvent && this.browserEvent.stopPropagation) { + this.browserEvent.stopPropagation(); } } -}; -MessageController.ID = 'editor.contrib.messageController'; -MessageController.MESSAGE_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__["RawContextKey"]('messageVisible', false); -MessageController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_7__["IContextKeyService"]) -], MessageController); - -const MessageCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["EditorCommand"].bindToContribution(MessageController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new MessageCommand({ - id: 'leaveEditorMessage', - precondition: MessageController.MESSAGE_VISIBLE, - handler: c => c.closeMessage(), - kbOpts: { - weight: 100 /* EditorContrib */ + 30, - primary: 9 /* Escape */ - } -})); -class MessageWidget { - constructor(editor, { lineNumber, column }, text) { - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = true; - this.suppressMouseDown = false; - this._editor = editor; - this._editor.revealLinesInCenterIfOutsideViewport(lineNumber, lineNumber, 0 /* Smooth */); - this._position = { lineNumber, column: column - 1 }; - this._domNode = document.createElement('div'); - this._domNode.classList.add('monaco-editor-overlaymessage'); - const message = document.createElement('div'); - message.classList.add('message'); - message.textContent = text; - this._domNode.appendChild(message); - const anchor = document.createElement('div'); - anchor.classList.add('anchor'); - this._domNode.appendChild(anchor); - this._editor.addContentWidget(this); - this._domNode.classList.add('fadeIn'); - } - static fadeOut(messageWidget) { - let handle; - const dispose = () => { - messageWidget.dispose(); - clearTimeout(handle); - messageWidget.getDomNode().removeEventListener('animationend', dispose); - }; - handle = setTimeout(dispose, 110); - messageWidget.getDomNode().addEventListener('animationend', dispose); - messageWidget.getDomNode().classList.add('fadeOut'); - return { dispose }; - } - dispose() { - this._editor.removeContentWidget(this); + toKeybinding() { + return this._asRuntimeKeybinding; } - getId() { - return 'messageoverlay'; + equals(other) { + return this._asKeybinding === other; } - getDomNode() { - return this._domNode; + _computeKeybinding() { + let key = 0 /* Unknown */; + if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { + key = this.keyCode; + } + let result = 0; + if (this.ctrlKey) { + result |= ctrlKeyMod; + } + if (this.altKey) { + result |= altKeyMod; + } + if (this.shiftKey) { + result |= shiftKeyMod; + } + if (this.metaKey) { + result |= metaKeyMod; + } + result |= key; + return result; } - getPosition() { - return { position: this._position, preference: [1 /* ABOVE */, 2 /* BELOW */] }; + _computeRuntimeKeybinding() { + let key = 0 /* Unknown */; + if (this.keyCode !== 5 /* Ctrl */ && this.keyCode !== 4 /* Shift */ && this.keyCode !== 6 /* Alt */ && this.keyCode !== 57 /* Meta */) { + key = this.keyCode; + } + return new _common_keyCodes_js__WEBPACK_IMPORTED_MODULE_1__["SimpleKeybinding"](this.ctrlKey, this.shiftKey, this.altKey, this.metaKey, key); } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorContribution"])(MessageController.ID, MessageController); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__["registerThemingParticipant"])((theme, collector) => { - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["inputValidationInfoBorder"]); - if (border) { - let borderWidth = theme.type === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__["HIGH_CONTRAST"] ? 2 : 1; - collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ${border}; }`); - collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${borderWidth}px solid ${border}; }`); - } - const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["inputValidationInfoBackground"]); - if (background) { - collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`); - } - const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["inputValidationInfoForeground"]); - if (foreground) { - collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${foreground}; }`); - } -}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js ***! - \*************************************************************************************/ -/*! exports provided: InsertCursorAbove, InsertCursorBelow, MultiCursorSessionResult, MultiCursorSession, MultiCursorSelectionController, MultiCursorSelectionControllerAction, AddSelectionToNextFindMatchAction, AddSelectionToPreviousFindMatchAction, MoveSelectionToNextFindMatchAction, MoveSelectionToPreviousFindMatchAction, SelectHighlightsAction, CompatChangeAll, SelectionHighlighter */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertCursorAbove", function() { return InsertCursorAbove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertCursorBelow", function() { return InsertCursorBelow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiCursorSessionResult", function() { return MultiCursorSessionResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiCursorSession", function() { return MultiCursorSession; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiCursorSelectionController", function() { return MultiCursorSelectionController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiCursorSelectionControllerAction", function() { return MultiCursorSelectionControllerAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddSelectionToNextFindMatchAction", function() { return AddSelectionToNextFindMatchAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddSelectionToPreviousFindMatchAction", function() { return AddSelectionToPreviousFindMatchAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveSelectionToNextFindMatchAction", function() { return MoveSelectionToNextFindMatchAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveSelectionToPreviousFindMatchAction", function() { return MoveSelectionToPreviousFindMatchAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectHighlightsAction", function() { return SelectHighlightsAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompatChangeAll", function() { return CompatChangeAll; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionHighlighter", function() { return SelectionHighlighter; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/controller/cursorMoveCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorMoveCommands.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _find_findController_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../find/findController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js": +/*!****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js ***! + \****************************************************************************/ +/*! exports provided: renderMarkdown */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderMarkdown", function() { return renderMarkdown; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formattedTextRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"); +/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); +/* harmony import */ var _common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); +/* harmony import */ var _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); +/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/marked/marked.js */ "./node_modules/monaco-editor/esm/vs/base/common/marked/marked.js"); +/* harmony import */ var _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/insane/insane.js */ "./node_modules/monaco-editor/esm/vs/base/common/insane/insane.js"); +/* harmony import */ var _common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/marshalling.js */ "./node_modules/monaco-editor/esm/vs/base/common/marshalling.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony import */ var _common_uri_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); +/* harmony import */ var _common_network_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); +/* harmony import */ var _common_resources_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -212134,941 +70778,385 @@ __webpack_require__.r(__webpack_exports__); - - -class InsertCursorAbove extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.insertCursorAbove', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mutlicursor.insertAbove', "Add Cursor Above"), - alias: 'Add Cursor Above', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 16 /* UpArrow */, - linux: { - primary: 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */, - secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */] - }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, "&&Add Cursor Above"), - order: 2 - } - }); - } - run(accessor, editor, args) { - if (!editor.hasModel()) { - return; - } - const useLogicalLine = (args && args.logicalLine === true); - const viewModel = editor._getViewModel(); - if (viewModel.cursorConfig.readOnly) { - return; +/** + * Create html nodes for the given content element. + */ +function renderMarkdown(markdown, options = {}, markedOptions = {}) { + var _a; + const element = Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_1__["createElement"])(options); + const _uriMassage = function (part) { + let data; + try { + data = Object(_common_marshalling_js__WEBPACK_IMPORTED_MODULE_7__["parse"])(decodeURIComponent(part)); } - viewModel.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__["CursorMoveCommands"].addCursorUp(viewModel, viewModel.getCursorStates(), useLogicalLine)); - viewModel.revealTopMostCursor(args.source); - } -} -class InsertCursorBelow extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.insertCursorBelow', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mutlicursor.insertBelow', "Add Cursor Below"), - alias: 'Add Cursor Below', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 18 /* DownArrow */, - linux: { - primary: 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */, - secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */] - }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, "A&&dd Cursor Below"), - order: 3 - } - }); - } - run(accessor, editor, args) { - if (!editor.hasModel()) { - return; + catch (e) { + // ignore } - const useLogicalLine = (args && args.logicalLine === true); - const viewModel = editor._getViewModel(); - if (viewModel.cursorConfig.readOnly) { - return; + if (!data) { + return part; } - viewModel.pushStackElement(); - viewModel.setCursorStates(args.source, 3 /* Explicit */, _common_controller_cursorMoveCommands_js__WEBPACK_IMPORTED_MODULE_5__["CursorMoveCommands"].addCursorDown(viewModel, viewModel.getCursorStates(), useLogicalLine)); - viewModel.revealBottomMostCursor(args.source); - } -} -class InsertCursorAtEndOfEachLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.insertCursorAtEndOfEachLineSelected', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mutlicursor.insertAtEndOfEachLineSelected', "Add Cursors to Line Ends"), - alias: 'Add Cursors to Line Ends', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 39 /* KEY_I */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, "Add C&&ursors to Line Ends"), - order: 4 + data = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_8__["cloneAndChange"])(data, value => { + if (markdown.uris && markdown.uris[value]) { + return _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].revive(markdown.uris[value]); + } + else { + return undefined; } }); - } - getCursorsForSelection(selection, model, result) { - if (selection.isEmpty()) { - return; - } - for (let i = selection.startLineNumber; i < selection.endLineNumber; i++) { - let currentLineMaxColumn = model.getLineMaxColumn(i); - result.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](i, currentLineMaxColumn, i, currentLineMaxColumn)); - } - if (selection.endColumn > 1) { - result.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn)); - } - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const model = editor.getModel(); - const selections = editor.getSelections(); - let newSelections = []; - selections.forEach((sel) => this.getCursorsForSelection(sel, model, newSelections)); - if (newSelections.length > 0) { - editor.setSelections(newSelections); - } - } -} -class InsertCursorAtEndOfLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.addCursorsToBottom', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mutlicursor.addCursorsToBottom', "Add Cursors To Bottom"), - alias: 'Add Cursors To Bottom', - precondition: undefined - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const selections = editor.getSelections(); - const lineCount = editor.getModel().getLineCount(); - let newSelections = []; - for (let i = selections[0].startLineNumber; i <= lineCount; i++) { - newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](i, selections[0].startColumn, i, selections[0].endColumn)); - } - if (newSelections.length > 0) { - editor.setSelections(newSelections); - } - } -} -class InsertCursorAtTopOfLineSelected extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.addCursorsToTop', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('mutlicursor.addCursorsToTop', "Add Cursors To Top"), - alias: 'Add Cursors To Top', - precondition: undefined - }); - } - run(accessor, editor) { - if (!editor.hasModel()) { - return; - } - const selections = editor.getSelections(); - let newSelections = []; - for (let i = selections[0].startLineNumber; i >= 1; i--) { - newSelections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](i, selections[0].startColumn, i, selections[0].endColumn)); + return encodeURIComponent(JSON.stringify(data)); + }; + const _href = function (href, isDomUri) { + const data = markdown.uris && markdown.uris[href]; + if (!data) { + return href; // no uri exists } - if (newSelections.length > 0) { - editor.setSelections(newSelections); + let uri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].revive(data); + if (_common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].parse(href).toString() === uri.toString()) { + return href; // no tranformation performed } - } -} -class MultiCursorSessionResult { - constructor(selections, revealRange, revealScrollType) { - this.selections = selections; - this.revealRange = revealRange; - this.revealScrollType = revealScrollType; - } -} -class MultiCursorSession { - constructor(_editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch) { - this._editor = _editor; - this.findController = findController; - this.isDisconnectedFromFindController = isDisconnectedFromFindController; - this.searchText = searchText; - this.wholeWord = wholeWord; - this.matchCase = matchCase; - this.currentMatch = currentMatch; - } - static create(editor, findController) { - if (!editor.hasModel()) { - return null; + if (isDomUri) { + // this URI will end up as "src"-attribute of a dom node + // and because of that special rewriting needs to be done + // so that the URI uses a protocol that's understood by + // browsers (like http or https) + return _dom_js__WEBPACK_IMPORTED_MODULE_0__["asDomUri"](uri).toString(true); } - const findState = findController.getState(); - // Find widget owns entirely what we search for if: - // - focus is not in the editor (i.e. it is in the find widget) - // - and the search widget is visible - // - and the search string is non-empty - if (!editor.hasTextFocus() && findState.isRevealed && findState.searchString.length > 0) { - // Find widget owns what is searched for - return new MultiCursorSession(editor, findController, false, findState.searchString, findState.wholeWord, findState.matchCase, null); - } - // Otherwise, the selection gives the search text, and the find widget gives the search settings - // The exception is the find state disassociation case: when beginning with a single, collapsed selection - let isDisconnectedFromFindController = false; - let wholeWord; - let matchCase; - const selections = editor.getSelections(); - if (selections.length === 1 && selections[0].isEmpty()) { - isDisconnectedFromFindController = true; - wholeWord = true; - matchCase = true; + if (uri.query) { + uri = uri.with({ query: _uriMassage(uri.query) }); } - else { - wholeWord = findState.wholeWord; - matchCase = findState.matchCase; - } - // Selection owns what is searched for - const s = editor.getSelection(); - let searchText; - let currentMatch = null; - if (s.isEmpty()) { - // selection is empty => expand to current word - const word = editor.getConfiguredWordAtPosition(s.getStartPosition()); - if (!word) { - return null; + return uri.toString(); + }; + // signal to code-block render that the + // element has been created + let signalInnerHTML; + const withInnerHTML = new Promise(c => signalInnerHTML = c); + const renderer = new _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__["Renderer"](); + renderer.image = (href, title, text) => { + let dimensions = []; + let attributes = []; + if (href) { + ({ href, dimensions } = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["parseHrefAndDimensions"])(href)); + href = _href(href, true); + try { + const hrefAsUri = _common_uri_js__WEBPACK_IMPORTED_MODULE_10__["URI"].parse(href); + if (options.baseUrl && hrefAsUri.scheme === _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].file) { // absolute or relative local path, or file: uri + href = Object(_common_resources_js__WEBPACK_IMPORTED_MODULE_13__["resolvePath"])(options.baseUrl, href).toString(); + } } - searchText = word.word; - currentMatch = new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](s.startLineNumber, word.startColumn, s.startLineNumber, word.endColumn); - } - else { - searchText = editor.getModel().getValueInRange(s).replace(/\r\n/g, '\n'); - } - return new MultiCursorSession(editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch); - } - addSelectionToNextFindMatch() { - if (!this._editor.hasModel()) { - return null; - } - const nextMatch = this._getNextMatch(); - if (!nextMatch) { - return null; - } - const allSelections = this._editor.getSelections(); - return new MultiCursorSessionResult(allSelections.concat(nextMatch), nextMatch, 0 /* Smooth */); - } - moveSelectionToNextFindMatch() { - if (!this._editor.hasModel()) { - return null; - } - const nextMatch = this._getNextMatch(); - if (!nextMatch) { - return null; - } - const allSelections = this._editor.getSelections(); - return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(nextMatch), nextMatch, 0 /* Smooth */); - } - _getNextMatch() { - if (!this._editor.hasModel()) { - return null; - } - if (this.currentMatch) { - const result = this.currentMatch; - this.currentMatch = null; - return result; - } - this.findController.highlightFindOptions(); - const allSelections = this._editor.getSelections(); - const lastAddedSelection = allSelections[allSelections.length - 1]; - const nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false); - if (!nextMatch) { - return null; - } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](nextMatch.range.startLineNumber, nextMatch.range.startColumn, nextMatch.range.endLineNumber, nextMatch.range.endColumn); - } - addSelectionToPreviousFindMatch() { - if (!this._editor.hasModel()) { - return null; + catch (err) { } + attributes.push(`src="${href}"`); } - const previousMatch = this._getPreviousMatch(); - if (!previousMatch) { - return null; + if (text) { + attributes.push(`alt="${text}"`); } - const allSelections = this._editor.getSelections(); - return new MultiCursorSessionResult(allSelections.concat(previousMatch), previousMatch, 0 /* Smooth */); - } - moveSelectionToPreviousFindMatch() { - if (!this._editor.hasModel()) { - return null; + if (title) { + attributes.push(`title="${title}"`); } - const previousMatch = this._getPreviousMatch(); - if (!previousMatch) { - return null; + if (dimensions.length) { + attributes = attributes.concat(dimensions); } - const allSelections = this._editor.getSelections(); - return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(previousMatch), previousMatch, 0 /* Smooth */); - } - _getPreviousMatch() { - if (!this._editor.hasModel()) { - return null; + return ''; + }; + renderer.link = (href, title, text) => { + // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829 + if (href === text) { // raw link case + text = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(text); } - if (this.currentMatch) { - const result = this.currentMatch; - this.currentMatch = null; - return result; + href = _href(href, false); + if (options.baseUrl) { + const hasScheme = /^\w[\w\d+.-]*:/.test(href); + if (!hasScheme) { + href = Object(_common_resources_js__WEBPACK_IMPORTED_MODULE_13__["resolvePath"])(options.baseUrl, href).toString(); + } } - this.findController.highlightFindOptions(); - const allSelections = this._editor.getSelections(); - const lastAddedSelection = allSelections[allSelections.length - 1]; - const previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false); - if (!previousMatch) { - return null; + title = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(title); + href = Object(_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_3__["removeMarkdownEscapes"])(href); + if (!href + || href.match(/^data:|javascript:/i) + || (href.match(/^command:/i) && !markdown.isTrusted) + || href.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)) { + // drop the link + return text; } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](previousMatch.range.startLineNumber, previousMatch.range.startColumn, previousMatch.range.endLineNumber, previousMatch.range.endColumn); - } - selectAll() { - if (!this._editor.hasModel()) { - return []; + else { + // HTML Encode href + href = href.replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + return `
    ${text}`; } - this.findController.highlightFindOptions(); - return this._editor.getModel().findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - } -} -class MultiCursorSelectionController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor) { - super(); - this._sessionDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"]()); - this._editor = editor; - this._ignoreSelectionChange = false; - this._session = null; - } - static get(editor) { - return editor.getContribution(MultiCursorSelectionController.ID); - } - dispose() { - this._endSession(); - super.dispose(); - } - _beginSessionIfNeeded(findController) { - if (!this._session) { - // Create a new session - const session = MultiCursorSession.create(this._editor, findController); - if (!session) { - return; - } - this._session = session; - const newState = { searchString: this._session.searchText }; - if (this._session.isDisconnectedFromFindController) { - newState.wholeWordOverride = 1 /* True */; - newState.matchCaseOverride = 1 /* True */; - newState.isRegexOverride = 2 /* False */; + }; + renderer.paragraph = (text) => { + return `

    ${markdown.supportThemeIcons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_12__["renderCodicons"])(text) : text}

    `; + }; + if (options.codeBlockRenderer) { + renderer.code = (code, lang) => { + const value = options.codeBlockRenderer(lang, code); + // when code-block rendering is async we return sync + // but update the node with the real result later. + const id = _common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__["defaultGenerator"].nextId(); + const promise = Promise.all([value, withInnerHTML]).then(values => { + const strValue = values[0]; + const span = element.querySelector(`div[data-code="${id}"]`); + if (span) { + span.innerHTML = strValue; + } + }).catch(err => { + // ignore + }); + if (options.codeBlockRenderCallback) { + promise.then(options.codeBlockRenderCallback); } - findController.getState().change(newState, false); - this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e) => { - if (this._ignoreSelectionChange) { + return `
    ${Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_9__["escape"])(code)}
    `; + }; + } + const actionHandler = options.actionHandler; + if (actionHandler) { + [_dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].CLICK, _dom_js__WEBPACK_IMPORTED_MODULE_0__["EventType"].AUXCLICK].forEach(event => { + actionHandler.disposeables.add(_dom_js__WEBPACK_IMPORTED_MODULE_0__["addDisposableListener"](element, event, (e) => { + const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_14__["StandardMouseEvent"](e); + if (!mouseEvent.leftButton && !mouseEvent.middleButton) { return; } - this._endSession(); - })); - this._sessionDispose.add(this._editor.onDidBlurEditorText(() => { - this._endSession(); - })); - this._sessionDispose.add(findController.getState().onFindReplaceStateChange((e) => { - if (e.matchCase || e.wholeWord) { - this._endSession(); - } - })); - } - } - _endSession() { - this._sessionDispose.clear(); - if (this._session && this._session.isDisconnectedFromFindController) { - const newState = { - wholeWordOverride: 0 /* NotSet */, - matchCaseOverride: 0 /* NotSet */, - isRegexOverride: 0 /* NotSet */, - }; - this._session.findController.getState().change(newState, false); - } - this._session = null; - } - _setSelections(selections) { - this._ignoreSelectionChange = true; - this._editor.setSelections(selections); - this._ignoreSelectionChange = false; - } - _expandEmptyToWord(model, selection) { - if (!selection.isEmpty()) { - return selection; - } - const word = this._editor.getConfiguredWordAtPosition(selection.getStartPosition()); - if (!word) { - return selection; - } - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn); - } - _applySessionResult(result) { - if (!result) { - return; - } - this._setSelections(result.selections); - if (result.revealRange) { - this._editor.revealRangeInCenterIfOutsideViewport(result.revealRange, result.revealScrollType); - } - } - getSession(findController) { - return this._session; - } - addSelectionToNextFindMatch(findController) { - if (!this._editor.hasModel()) { - return; - } - if (!this._session) { - // If there are multiple cursors, handle the case where they do not all select the same text. - const allSelections = this._editor.getSelections(); - if (allSelections.length > 1) { - const findState = findController.getState(); - const matchCase = findState.matchCase; - const selectionsContainSameText = modelRangesContainSameText(this._editor.getModel(), allSelections, matchCase); - if (!selectionsContainSameText) { - const model = this._editor.getModel(); - let resultingSelections = []; - for (let i = 0, len = allSelections.length; i < len; i++) { - resultingSelections[i] = this._expandEmptyToWord(model, allSelections[i]); + let target = mouseEvent.target; + if (target.tagName !== 'A') { + target = target.parentElement; + if (!target || target.tagName !== 'A') { + return; } - this._editor.setSelections(resultingSelections); - return; } - } - } - this._beginSessionIfNeeded(findController); - if (this._session) { - this._applySessionResult(this._session.addSelectionToNextFindMatch()); - } - } - addSelectionToPreviousFindMatch(findController) { - this._beginSessionIfNeeded(findController); - if (this._session) { - this._applySessionResult(this._session.addSelectionToPreviousFindMatch()); - } - } - moveSelectionToNextFindMatch(findController) { - this._beginSessionIfNeeded(findController); - if (this._session) { - this._applySessionResult(this._session.moveSelectionToNextFindMatch()); - } - } - moveSelectionToPreviousFindMatch(findController) { - this._beginSessionIfNeeded(findController); - if (this._session) { - this._applySessionResult(this._session.moveSelectionToPreviousFindMatch()); - } - } - selectAll(findController) { - if (!this._editor.hasModel()) { - return; - } - let matches = null; - const findState = findController.getState(); - // Special case: find widget owns entirely what we search for if: - // - focus is not in the editor (i.e. it is in the find widget) - // - and the search widget is visible - // - and the search string is non-empty - // - and we're searching for a regex - if (findState.isRevealed && findState.searchString.length > 0 && findState.isRegex) { - matches = this._editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(105 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */); - } - else { - this._beginSessionIfNeeded(findController); - if (!this._session) { - return; - } - matches = this._session.selectAll(); - } - if (findState.searchScope) { - const states = findState.searchScope; - let inSelection = []; - matches.forEach((match) => { - states.forEach((state) => { - if (match.range.endLineNumber <= state.endLineNumber && match.range.startLineNumber >= state.startLineNumber) { - inSelection.push(match); + try { + const href = target.dataset['href']; + if (href) { + actionHandler.callback(href, mouseEvent); } - }); - }); - matches = inSelection; - } - if (matches.length > 0) { - const editorSelection = this._editor.getSelection(); - // Have the primary cursor remain the one where the action was invoked - for (let i = 0, len = matches.length; i < len; i++) { - const match = matches[i]; - const intersection = match.range.intersectRanges(editorSelection); - if (intersection) { - // bingo! - matches[i] = matches[0]; - matches[0] = match; - break; } - } - this._setSelections(matches.map(m => new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn))); - } - } -} -MultiCursorSelectionController.ID = 'editor.contrib.multiCursorController'; -class MultiCursorSelectionControllerAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - run(accessor, editor) { - const multiCursorController = MultiCursorSelectionController.get(editor); - if (!multiCursorController) { - return; - } - const findController = _find_findController_js__WEBPACK_IMPORTED_MODULE_12__["CommonFindController"].get(editor); - if (!findController) { - return; - } - this._run(multiCursorController, findController); - } -} -class AddSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.addSelectionToNextFindMatch', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('addSelectionToNextFindMatch', "Add Selection To Next Find Match"), - alias: 'Add Selection To Next Find Match', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 34 /* KEY_D */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miAddSelectionToNextFindMatch', comment: ['&& denotes a mnemonic'] }, "Add &&Next Occurrence"), - order: 5 - } - }); - } - _run(multiCursorController, findController) { - multiCursorController.addSelectionToNextFindMatch(findController); - } -} -class AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.addSelectionToPreviousFindMatch', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('addSelectionToPreviousFindMatch', "Add Selection To Previous Find Match"), - alias: 'Add Selection To Previous Find Match', - precondition: undefined, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miAddSelectionToPreviousFindMatch', comment: ['&& denotes a mnemonic'] }, "Add P&&revious Occurrence"), - order: 6 - } - }); - } - _run(multiCursorController, findController) { - multiCursorController.addSelectionToPreviousFindMatch(findController); - } -} -class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.moveSelectionToNextFindMatch', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('moveSelectionToNextFindMatch', "Move Last Selection To Next Find Match"), - alias: 'Move Last Selection To Next Find Match', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].focus, - primary: Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["KeyChord"])(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 34 /* KEY_D */), - weight: 100 /* EditorContrib */ - } + catch (err) { + Object(_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedError"])(err); + } + finally { + mouseEvent.preventDefault(); + } + })); }); } - _run(multiCursorController, findController) { - multiCursorController.moveSelectionToNextFindMatch(findController); - } -} -class MoveSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.moveSelectionToPreviousFindMatch', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('moveSelectionToPreviousFindMatch', "Move Last Selection To Previous Find Match"), - alias: 'Move Last Selection To Previous Find Match', - precondition: undefined - }); + // Use our own sanitizer so that we can let through only spans. + // Otherwise, we'd be letting all html be rendered. + // If we want to allow markdown permitted tags, then we can delete sanitizer and sanitize. + markedOptions.sanitizer = (html) => { + const match = markdown.isTrusted ? html.match(/^()|(<\/\s*span>)$/) : undefined; + return match ? html : ''; + }; + markedOptions.sanitize = true; + markedOptions.renderer = renderer; + const allowedSchemes = [_common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].http, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].https, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].mailto, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].data, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].file, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].vscodeRemote, _common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].vscodeRemoteResource]; + if (markdown.isTrusted) { + allowedSchemes.push(_common_network_js__WEBPACK_IMPORTED_MODULE_11__["Schemas"].command); } - _run(multiCursorController, findController) { - multiCursorController.moveSelectionToPreviousFindMatch(findController); + // values that are too long will freeze the UI + let value = (_a = markdown.value) !== null && _a !== void 0 ? _a : ''; + if (value.length > 100000) { + value = `${value.substr(0, 100000)}…`; } -} -class SelectHighlightsAction extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.selectHighlights', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"), - alias: 'Select All Occurrences of Find Match', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 42 /* KEY_L */, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_13__["MenuId"].MenubarSelectionMenu, - group: '3_multi', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'miSelectHighlights', comment: ['&& denotes a mnemonic'] }, "Select All &&Occurrences"), - order: 7 + const renderedMarkdown = _common_marked_marked_js__WEBPACK_IMPORTED_MODULE_5__["parse"](markdown.supportThemeIcons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_12__["markdownEscapeEscapedCodicons"])(value) : value, markedOptions); + function filter(token) { + if (token.tag === 'span' && markdown.isTrusted && (Object.keys(token.attrs).length === 1)) { + if (token.attrs['style']) { + return !!token.attrs['style'].match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/); } - }); - } - _run(multiCursorController, findController) { - multiCursorController.selectAll(findController); - } -} -class CompatChangeAll extends MultiCursorSelectionControllerAction { - constructor() { - super({ - id: 'editor.action.changeAll', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('changeAll.label', "Change All Occurrences"), - alias: 'Change All Occurrences', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_16__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 60 /* F2 */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: '1_modification', - order: 1.2 + else if (token.attrs['class']) { + // The class should match codicon rendering in src\vs\base\common\codicons.ts + return !!token.attrs['class'].match(/^codicon codicon-[a-z\-]+( codicon-animation-[a-z\-]+)?$/); } - }); - } - _run(multiCursorController, findController) { - multiCursorController.selectAll(findController); + return false; + } + return true; } + element.innerHTML = Object(_common_insane_insane_js__WEBPACK_IMPORTED_MODULE_6__["insane"])(renderedMarkdown, { + allowedSchemes, + // allowedTags should included everything that markdown renders to. + // Since we have our own sanitize function for marked, it's possible we missed some tag so let insane make sure. + // HTML tags that can result from markdown are from reading https://spec.commonmark.org/0.29/ + // HTML table tags that can result from markdown are from https://github.github.com/gfm/#tables-extension- + allowedTags: ['ul', 'li', 'p', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span'], + allowedAttributes: { + 'a': ['href', 'name', 'target', 'data-href'], + 'img': ['src', 'title', 'alt', 'width', 'height'], + 'div': ['class', 'data-code'], + 'span': ['class', 'style'], + // https://github.com/microsoft/vscode/issues/95937 + 'th': ['align'], + 'td': ['align'] + }, + filter + }); + signalInnerHTML(); + return element; } -class SelectionHighlighterState { - constructor(searchText, matchCase, wordSeparators, modelVersionId) { - this.searchText = searchText; - this.matchCase = matchCase; - this.wordSeparators = wordSeparators; - this.modelVersionId = modelVersionId; - } - /** - * Everything equals except for `lastWordUnderCursor` - */ - static softEquals(a, b) { - if (!a && !b) { - return true; + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js": +/*!**********************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js ***! + \**********************************************************************/ +/*! exports provided: StandardMouseEvent, StandardWheelEvent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardMouseEvent", function() { return StandardMouseEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandardWheelEvent", function() { return StandardWheelEvent; }); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); +/* harmony import */ var _iframe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iframe.js */ "./node_modules/monaco-editor/esm/vs/base/browser/iframe.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + +class StandardMouseEvent { + constructor(e) { + this.timestamp = Date.now(); + this.browserEvent = e; + this.leftButton = e.button === 0; + this.middleButton = e.button === 1; + this.rightButton = e.button === 2; + this.buttons = e.buttons; + this.target = e.target; + this.detail = e.detail || 1; + if (e.type === 'dblclick') { + this.detail = 2; } - if (!a || !b) { - return false; + this.ctrlKey = e.ctrlKey; + this.shiftKey = e.shiftKey; + this.altKey = e.altKey; + this.metaKey = e.metaKey; + if (typeof e.pageX === 'number') { + this.posx = e.pageX; + this.posy = e.pageY; + } + else { + // Probably hit by MSGestureEvent + this.posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; + this.posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } - return (a.searchText === b.searchText - && a.matchCase === b.matchCase - && a.wordSeparators === b.wordSeparators - && a.modelVersionId === b.modelVersionId); + // Find the position of the iframe this code is executing in relative to the iframe where the event was captured. + let iframeOffsets = _iframe_js__WEBPACK_IMPORTED_MODULE_1__["IframeUtils"].getPositionOfChildWindowRelativeToAncestorWindow(self, e.view); + this.posx -= iframeOffsets.left; + this.posy -= iframeOffsets.top; + } + preventDefault() { + this.browserEvent.preventDefault(); + } + stopPropagation() { + this.browserEvent.stopPropagation(); } } -class SelectionHighlighter extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor) { - super(); - this.editor = editor; - this._isEnabled = editor.getOption(89 /* selectionHighlight */); - this.decorations = []; - this.updateSoon = this._register(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_1__["RunOnceScheduler"](() => this._update(), 300)); - this.state = null; - this._register(editor.onDidChangeConfiguration((e) => { - this._isEnabled = editor.getOption(89 /* selectionHighlight */); - })); - this._register(editor.onDidChangeCursorSelection((e) => { - if (!this._isEnabled) { - // Early exit if nothing needs to be done! - // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) - return; +class StandardWheelEvent { + constructor(e, deltaX = 0, deltaY = 0) { + this.browserEvent = e || null; + this.target = e ? (e.target || e.targetNode || e.srcElement) : null; + this.deltaY = deltaY; + this.deltaX = deltaX; + if (e) { + // Old (deprecated) wheel events + let e1 = e; + let e2 = e; + // vertical delta scroll + if (typeof e1.wheelDeltaY !== 'undefined') { + this.deltaY = e1.wheelDeltaY / 120; + } + else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) { + this.deltaY = -e2.detail / 3; } - if (e.selection.isEmpty()) { - if (e.reason === 3 /* Explicit */) { - if (this.state) { - // no longer valid - this._setState(null); + else if (e.type === 'wheel') { + // Modern wheel event + // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent + const ev = e; + if (ev.deltaMode === ev.DOM_DELTA_LINE) { + // the deltas are expressed in lines + if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { + this.deltaY = -e.deltaY / 3; + } + else { + this.deltaY = -e.deltaY; } - this.updateSoon.schedule(); } else { - this._setState(null); + this.deltaY = -e.deltaY / 40; } } - else { - this._update(); - } - })); - this._register(editor.onDidChangeModel((e) => { - this._setState(null); - })); - this._register(editor.onDidChangeModelContent((e) => { - if (this._isEnabled) { - this.updateSoon.schedule(); - } - })); - this._register(_find_findController_js__WEBPACK_IMPORTED_MODULE_12__["CommonFindController"].get(editor).getState().onFindReplaceStateChange((e) => { - this._update(); - })); - } - _update() { - this._setState(SelectionHighlighter._createState(this._isEnabled, this.editor)); - } - static _createState(isEnabled, editor) { - if (!isEnabled) { - return null; - } - if (!editor.hasModel()) { - return null; - } - const s = editor.getSelection(); - if (s.startLineNumber !== s.endLineNumber) { - // multiline forbidden for perf reasons - return null; - } - const multiCursorController = MultiCursorSelectionController.get(editor); - if (!multiCursorController) { - return null; - } - const findController = _find_findController_js__WEBPACK_IMPORTED_MODULE_12__["CommonFindController"].get(editor); - if (!findController) { - return null; - } - let r = multiCursorController.getSession(findController); - if (!r) { - const allSelections = editor.getSelections(); - if (allSelections.length > 1) { - const findState = findController.getState(); - const matchCase = findState.matchCase; - const selectionsContainSameText = modelRangesContainSameText(editor.getModel(), allSelections, matchCase); - if (!selectionsContainSameText) { - return null; + // horizontal delta scroll + if (typeof e1.wheelDeltaX !== 'undefined') { + if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isSafari"] && _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWindows"]) { + this.deltaX = -(e1.wheelDeltaX / 120); + } + else { + this.deltaX = e1.wheelDeltaX / 120; } } - r = MultiCursorSession.create(editor, findController); - } - if (!r) { - return null; - } - if (r.currentMatch) { - // This is an empty selection - // Do not interfere with semantic word highlighting in the no selection case - return null; - } - if (/^[ \t]+$/.test(r.searchText)) { - // whitespace only selection - return null; - } - if (r.searchText.length > 200) { - // very long selection - return null; - } - // TODO: better handling of this case - const findState = findController.getState(); - const caseSensitive = findState.matchCase; - // Return early if the find widget shows the exact same matches - if (findState.isRevealed) { - let findStateSearchString = findState.searchString; - if (!caseSensitive) { - findStateSearchString = findStateSearchString.toLowerCase(); - } - let mySearchString = r.searchText; - if (!caseSensitive) { - mySearchString = mySearchString.toLowerCase(); - } - if (findStateSearchString === mySearchString && r.matchCase === findState.matchCase && r.wholeWord === findState.wholeWord && !findState.isRegex) { - return null; - } - } - return new SelectionHighlighterState(r.searchText, r.matchCase, r.wholeWord ? editor.getOption(105 /* wordSeparators */) : null, editor.getModel().getVersionId()); - } - _setState(state) { - if (SelectionHighlighterState.softEquals(this.state, state)) { - this.state = state; - return; - } - this.state = state; - if (!this.state) { - this.decorations = this.editor.deltaDecorations(this.decorations, []); - return; - } - if (!this.editor.hasModel()) { - return; - } - const model = this.editor.getModel(); - if (model.isTooLargeForTokenization()) { - // the file is too large, so searching word under cursor in the whole document takes is blocking the UI. - return; - } - const hasFindOccurrences = _common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightProviderRegistry"].has(model) && this.editor.getOption(63 /* occurrencesHighlight */); - let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range); - allMatches.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts); - let selections = this.editor.getSelections(); - selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts); - // do not overlap with selection (issue #64 and #512) - let matches = []; - for (let i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) { - const match = allMatches[i]; - if (j >= lenJ) { - // finished all editor selections - matches.push(match); - i++; + else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) { + this.deltaX = -e.detail / 3; } - else { - const cmp = _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].compareRangesUsingStarts(match, selections[j]); - if (cmp < 0) { - // match is before sel - if (selections[j].isEmpty() || !_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].areIntersecting(match, selections[j])) { - matches.push(match); + else if (e.type === 'wheel') { + // Modern wheel event + // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent + const ev = e; + if (ev.deltaMode === ev.DOM_DELTA_LINE) { + // the deltas are expressed in lines + if (_browser_js__WEBPACK_IMPORTED_MODULE_0__["isFirefox"] && !_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { + this.deltaX = -e.deltaX / 3; + } + else { + this.deltaX = -e.deltaX; } - i++; - } - else if (cmp > 0) { - // sel is before match - j++; } else { - // sel is equal to match - i++; - j++; + this.deltaX = -e.deltaX / 40; } } + // Assume a vertical scroll if nothing else worked + if (this.deltaY === 0 && this.deltaX === 0 && e.wheelDelta) { + this.deltaY = e.wheelDelta / 120; + } } - const decorations = matches.map(r => { - return { - range: r, - // Show in overviewRuler only if model has no semantic highlighting - options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) - }; - }); - this.decorations = this.editor.deltaDecorations(this.decorations, decorations); - } - dispose() { - this._setState(null); - super.dispose(); - } -} -SelectionHighlighter.ID = 'editor.contrib.selectionHighlighter'; -SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'selectionHighlight', - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_15__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_14__["overviewRulerSelectionHighlightForeground"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center } -}); -SelectionHighlighter._SELECTION_HIGHLIGHT = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'selectionHighlight', -}); -function modelRangesContainSameText(model, ranges, matchCase) { - const selectedText = getValueInRange(model, ranges[0], !matchCase); - for (let i = 1, len = ranges.length; i < len; i++) { - const range = ranges[i]; - if (range.isEmpty()) { - return false; + preventDefault() { + if (this.browserEvent) { + this.browserEvent.preventDefault(); } - const thisSelectedText = getValueInRange(model, range, !matchCase); - if (selectedText !== thisSelectedText) { - return false; + } + stopPropagation() { + if (this.browserEvent) { + this.browserEvent.stopPropagation(); } } - return true; -} -function getValueInRange(model, range, toLowerCase) { - const text = model.getValueInRange(range); - return (toLowerCase ? text.toLowerCase() : text); } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(MultiCursorSelectionController.ID, MultiCursorSelectionController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(SelectionHighlighter.ID, SelectionHighlighter); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InsertCursorAbove); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InsertCursorBelow); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InsertCursorAtEndOfEachLineSelected); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(AddSelectionToNextFindMatchAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(AddSelectionToPreviousFindMatchAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(MoveSelectionToNextFindMatchAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(MoveSelectionToPreviousFindMatchAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(SelectHighlightsAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(CompatChangeAll); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InsertCursorAtEndOfLineSelected); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InsertCursorAtTopOfLineSelected); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css ***! - \********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./parameterHints.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_parameterHints_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js ***! - \*******************************************************************************************/ -/*! exports provided: TriggerParameterHintsAction */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js": +/*!*****************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/touch.js ***! + \*****************************************************************/ +/*! exports provided: EventType, Gesture */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriggerParameterHintsAction", function() { return TriggerParameterHintsAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _parameterHintsWidget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parameterHintsWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js"); -/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./provideSignatureHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventType", function() { return EventType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gesture", function() { return Gesture; }); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -213079,140 +71167,281 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - -let ParameterHintsController = class ParameterHintsController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editor, instantiationService) { +var EventType; +(function (EventType) { + EventType.Tap = '-monaco-gesturetap'; + EventType.Change = '-monaco-gesturechange'; + EventType.Start = '-monaco-gesturestart'; + EventType.End = '-monaco-gesturesend'; + EventType.Contextmenu = '-monaco-gesturecontextmenu'; +})(EventType || (EventType = {})); +class Gesture extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor() { super(); - this.editor = editor; - this.widget = this._register(instantiationService.createInstance(_parameterHintsWidget_js__WEBPACK_IMPORTED_MODULE_6__["ParameterHintsWidget"], this.editor)); + this.dispatched = false; + this.activeTouches = {}; + this.handle = null; + this.targets = []; + this.ignoreTargets = []; + this._lastSetTapCountTime = 0; + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchstart', (e) => this.onTouchStart(e), { passive: false })); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchend', (e) => this.onTouchEnd(e))); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](document, 'touchmove', (e) => this.onTouchMove(e), { passive: false })); } - static get(editor) { - return editor.getContribution(ParameterHintsController.ID); + static addTarget(element) { + if (!Gesture.isTouchDevice()) { + return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + } + if (!Gesture.INSTANCE) { + Gesture.INSTANCE = new Gesture(); + } + Gesture.INSTANCE.targets.push(element); + return { + dispose: () => { + Gesture.INSTANCE.targets = Gesture.INSTANCE.targets.filter(t => t !== element); + } + }; } - cancel() { - this.widget.cancel(); + static ignoreTarget(element) { + if (!Gesture.isTouchDevice()) { + return _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + } + if (!Gesture.INSTANCE) { + Gesture.INSTANCE = new Gesture(); + } + Gesture.INSTANCE.ignoreTargets.push(element); + return { + dispose: () => { + Gesture.INSTANCE.ignoreTargets = Gesture.INSTANCE.ignoreTargets.filter(t => t !== element); + } + }; } - previous() { - this.widget.previous(); + static isTouchDevice() { + // `'ontouchstart' in window` always evaluates to true with typescript's modern typings. This causes `window` to be + // `never` later in `window.navigator`. That's why we need the explicit `window as Window` cast + return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0; } - next() { - this.widget.next(); + dispose() { + if (this.handle) { + this.handle.dispose(); + this.handle = null; + } + super.dispose(); } - trigger(context) { - this.widget.trigger(context); + onTouchStart(e) { + let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. + if (this.handle) { + this.handle.dispose(); + this.handle = null; + } + for (let i = 0, len = e.targetTouches.length; i < len; i++) { + let touch = e.targetTouches.item(i); + this.activeTouches[touch.identifier] = { + id: touch.identifier, + initialTarget: touch.target, + initialTimeStamp: timestamp, + initialPageX: touch.pageX, + initialPageY: touch.pageY, + rollingTimestamps: [timestamp], + rollingPageX: [touch.pageX], + rollingPageY: [touch.pageY] + }; + let evt = this.newGestureEvent(EventType.Start, touch.target); + evt.pageX = touch.pageX; + evt.pageY = touch.pageY; + this.dispatchEvent(evt); + } + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; + } } -}; -ParameterHintsController.ID = 'editor.controller.parameterHints'; -ParameterHintsController = __decorate([ - __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__["IInstantiationService"]) -], ParameterHintsController); -class TriggerParameterHintsAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.triggerParameterHints', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('parameterHints.trigger.label', "Trigger Parameter Hints"), - alias: 'Trigger Parameter Hints', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].hasSignatureHelpProvider, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 10 /* Space */, - weight: 100 /* EditorContrib */ + onTouchEnd(e) { + let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. + let activeTouchCount = Object.keys(this.activeTouches).length; + for (let i = 0, len = e.changedTouches.length; i < len; i++) { + let touch = e.changedTouches.item(i); + if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) { + console.warn('move of an UNKNOWN touch', touch); + continue; } - }); - } - run(accessor, editor) { - const controller = ParameterHintsController.get(editor); - if (controller) { - controller.trigger({ - triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_8__["SignatureHelpTriggerKind"].Invoke - }); + let data = this.activeTouches[touch.identifier], holdTime = Date.now() - data.initialTimeStamp; + if (holdTime < Gesture.HOLD_DELAY + && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX)) < 30 + && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY)) < 30) { + let evt = this.newGestureEvent(EventType.Tap, data.initialTarget); + evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); + evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); + this.dispatchEvent(evt); + } + else if (holdTime >= Gesture.HOLD_DELAY + && Math.abs(data.initialPageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX)) < 30 + && Math.abs(data.initialPageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY)) < 30) { + let evt = this.newGestureEvent(EventType.Contextmenu, data.initialTarget); + evt.pageX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); + evt.pageY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); + this.dispatchEvent(evt); + } + else if (activeTouchCount === 1) { + let finalX = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); + let finalY = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); + let deltaT = _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingTimestamps) - data.rollingTimestamps[0]; + let deltaX = finalX - data.rollingPageX[0]; + let deltaY = finalY - data.rollingPageY[0]; + // We need to get all the dispatch targets on the start of the inertia event + const dispatchTo = this.targets.filter(t => data.initialTarget instanceof Node && t.contains(data.initialTarget)); + this.inertia(dispatchTo, timestamp, // time now + Math.abs(deltaX) / deltaT, // speed + deltaX > 0 ? 1 : -1, // x direction + finalX, // x now + Math.abs(deltaY) / deltaT, // y speed + deltaY > 0 ? 1 : -1, // y direction + finalY // y now + ); + } + this.dispatchEvent(this.newGestureEvent(EventType.End, data.initialTarget)); + // forget about this touch + delete this.activeTouches[touch.identifier]; + } + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; } } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorContribution"])(ParameterHintsController.ID, ParameterHintsController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorAction"])(TriggerParameterHintsAction); -const weight = 100 /* EditorContrib */ + 75; -const ParameterHintsCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["EditorCommand"].bindToContribution(ParameterHintsController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorCommand"])(new ParameterHintsCommand({ - id: 'closeParameterHints', - precondition: _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__["Context"].Visible, - handler: x => x.cancel(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].focus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] + newGestureEvent(type, initialTarget) { + let event = document.createEvent('CustomEvent'); + event.initEvent(type, false, true); + event.initialTarget = initialTarget; + event.tapCount = 0; + return event; } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorCommand"])(new ParameterHintsCommand({ - id: 'showPrevParameterHint', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["ContextKeyExpr"].and(_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__["Context"].Visible, _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__["Context"].MultipleSignatures), - handler: x => x.previous(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].focus, - primary: 16 /* UpArrow */, - secondary: [512 /* Alt */ | 16 /* UpArrow */], - mac: { primary: 16 /* UpArrow */, secondary: [512 /* Alt */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] } + dispatchEvent(event) { + if (event.type === EventType.Tap) { + const currentTime = (new Date()).getTime(); + let setTapCount = 0; + if (currentTime - this._lastSetTapCountTime > Gesture.CLEAR_TAP_COUNT_TIME) { + setTapCount = 1; + } + else { + setTapCount = 2; + } + this._lastSetTapCountTime = currentTime; + event.tapCount = setTapCount; + } + else if (event.type === EventType.Change || event.type === EventType.Contextmenu) { + // tap is canceled by scrolling or context menu + this._lastSetTapCountTime = 0; + } + for (let i = 0; i < this.ignoreTargets.length; i++) { + if (event.initialTarget instanceof Node && this.ignoreTargets[i].contains(event.initialTarget)) { + return; + } + } + this.targets.forEach(target => { + if (event.initialTarget instanceof Node && target.contains(event.initialTarget)) { + target.dispatchEvent(event); + this.dispatched = true; + } + }); } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_5__["registerEditorCommand"])(new ParameterHintsCommand({ - id: 'showNextParameterHint', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["ContextKeyExpr"].and(_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__["Context"].Visible, _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_7__["Context"].MultipleSignatures), - handler: x => x.next(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].focus, - primary: 18 /* DownArrow */, - secondary: [512 /* Alt */ | 18 /* DownArrow */], - mac: { primary: 18 /* DownArrow */, secondary: [512 /* Alt */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] } + inertia(dispatchTo, t1, vX, dirX, x, vY, dirY, y) { + this.handle = _dom_js__WEBPACK_IMPORTED_MODULE_2__["scheduleAtNextAnimationFrame"](() => { + let now = Date.now(); + // velocity: old speed + accel_over_time + let deltaT = now - t1, delta_pos_x = 0, delta_pos_y = 0, stopped = true; + vX += Gesture.SCROLL_FRICTION * deltaT; + vY += Gesture.SCROLL_FRICTION * deltaT; + if (vX > 0) { + stopped = false; + delta_pos_x = dirX * vX * deltaT; + } + if (vY > 0) { + stopped = false; + delta_pos_y = dirY * vY * deltaT; + } + // dispatch translation event + let evt = this.newGestureEvent(EventType.Change); + evt.translationX = delta_pos_x; + evt.translationY = delta_pos_y; + dispatchTo.forEach(d => d.dispatchEvent(evt)); + if (!stopped) { + this.inertia(dispatchTo, now, vX, dirX, x + delta_pos_x, vY, dirY, y + delta_pos_y); + } + }); } -})); + onTouchMove(e) { + let timestamp = Date.now(); // use Date.now() because on FF e.timeStamp is not epoch based. + for (let i = 0, len = e.changedTouches.length; i < len; i++) { + let touch = e.changedTouches.item(i); + if (!this.activeTouches.hasOwnProperty(String(touch.identifier))) { + console.warn('end of an UNKNOWN touch', touch); + continue; + } + let data = this.activeTouches[touch.identifier]; + let evt = this.newGestureEvent(EventType.Change, data.initialTarget); + evt.translationX = touch.pageX - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageX); + evt.translationY = touch.pageY - _common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["tail"](data.rollingPageY); + evt.pageX = touch.pageX; + evt.pageY = touch.pageY; + this.dispatchEvent(evt); + // only keep a few data points, to average the final speed + if (data.rollingPageX.length > 3) { + data.rollingPageX.shift(); + data.rollingPageY.shift(); + data.rollingTimestamps.shift(); + } + data.rollingPageX.push(touch.pageX); + data.rollingPageY.push(touch.pageY); + data.rollingTimestamps.push(timestamp); + } + if (this.dispatched) { + e.preventDefault(); + e.stopPropagation(); + this.dispatched = false; + } + } +} +Gesture.SCROLL_FRICTION = -0.005; +Gesture.HOLD_DELAY = 700; +Gesture.CLEAR_TAP_COUNT_TIME = 400; // ms +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_3__["memoize"] +], Gesture, "isTouchDevice", null); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js ***! - \************************************************************************************************/ -/*! exports provided: ParameterHintsModel */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js ***! + \****************************************************************************************/ +/*! exports provided: BaseActionViewItem, ActionViewItem */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterHintsModel", function() { return ParameterHintsModel; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./provideSignatureHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseActionViewItem", function() { return BaseActionViewItem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionViewItem", function() { return ActionViewItem; }); +/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; @@ -213220,672 +71449,273 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume -var ParameterHintState; -(function (ParameterHintState) { - ParameterHintState.Default = { type: 0 /* Default */ }; - class Pending { - constructor(request) { - this.request = request; - this.type = 2 /* Pending */; - } - } - ParameterHintState.Pending = Pending; - class Active { - constructor(hints) { - this.hints = hints; - this.type = 1 /* Active */; - } - } - ParameterHintState.Active = Active; -})(ParameterHintState || (ParameterHintState = {})); -class ParameterHintsModel extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor, delay = ParameterHintsModel.DEFAULT_DELAY) { + + + +class BaseActionViewItem extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { + constructor(context, action, options = {}) { super(); - this._onChangedHints = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this.onChangedHints = this._onChangedHints.event; - this.triggerOnType = false; - this._state = ParameterHintState.Default; - this._pendingTriggers = []; - this._lastSignatureHelpResult = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["MutableDisposable"]()); - this.triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["CharacterSet"](); - this.retriggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["CharacterSet"](); - this.triggerId = 0; - this.editor = editor; - this.throttledDelayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["Delayer"](delay); - this._register(this.editor.onDidChangeConfiguration(() => this.onEditorConfigurationChange())); - this._register(this.editor.onDidChangeModel(e => this.onModelChanged())); - this._register(this.editor.onDidChangeModelLanguage(_ => this.onModelChanged())); - this._register(this.editor.onDidChangeCursorSelection(e => this.onCursorChange(e))); - this._register(this.editor.onDidChangeModelContent(e => this.onModelContentChange())); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpProviderRegistry"].onDidChange(this.onModelChanged, this)); - this._register(this.editor.onDidType(text => this.onDidType(text))); - this.onEditorConfigurationChange(); - this.onModelChanged(); - } - get state() { return this._state; } - set state(value) { - if (this._state.type === 2 /* Pending */) { - this._state.request.cancel(); - } - this._state = value; - } - cancel(silent = false) { - this.state = ParameterHintState.Default; - this.throttledDelayer.cancel(); - if (!silent) { - this._onChangedHints.fire(undefined); + this.options = options; + this._context = context || this; + this._action = action; + if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["Action"]) { + this._register(action.onDidChange(event => { + if (!this.element) { + // we have not been rendered yet, so there + // is no point in updating the UI + return; + } + this.handleActionChangeEvent(event); + })); } } - trigger(context, delay) { - const model = this.editor.getModel(); - if (!model || !_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpProviderRegistry"].has(model)) { - return; + handleActionChangeEvent(event) { + if (event.enabled !== undefined) { + this.updateEnabled(); } - const triggerId = ++this.triggerId; - this._pendingTriggers.push(context); - this.throttledDelayer.trigger(() => { - return this.doTrigger(triggerId); - }, delay) - .catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"]); - } - next() { - if (this.state.type !== 1 /* Active */) { - return; + if (event.checked !== undefined) { + this.updateChecked(); } - const length = this.state.hints.signatures.length; - const activeSignature = this.state.hints.activeSignature; - const last = (activeSignature % length) === (length - 1); - const cycle = this.editor.getOption(67 /* parameterHints */).cycle; - // If there is only one signature, or we're on last signature of list - if ((length < 2 || last) && !cycle) { - this.cancel(); - return; + if (event.class !== undefined) { + this.updateClass(); } - this.updateActiveSignature(last && cycle ? 0 : activeSignature + 1); - } - previous() { - if (this.state.type !== 1 /* Active */) { - return; + if (event.label !== undefined) { + this.updateLabel(); + this.updateTooltip(); } - const length = this.state.hints.signatures.length; - const activeSignature = this.state.hints.activeSignature; - const first = activeSignature === 0; - const cycle = this.editor.getOption(67 /* parameterHints */).cycle; - // If there is only one signature, or we're on first signature of list - if ((length < 2 || first) && !cycle) { - this.cancel(); - return; + if (event.tooltip !== undefined) { + this.updateTooltip(); } - this.updateActiveSignature(first && cycle ? length - 1 : activeSignature - 1); } - updateActiveSignature(activeSignature) { - if (this.state.type !== 1 /* Active */) { - return; + get actionRunner() { + if (!this._actionRunner) { + this._actionRunner = this._register(new _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["ActionRunner"]()); } - this.state = new ParameterHintState.Active(Object.assign(Object.assign({}, this.state.hints), { activeSignature })); - this._onChangedHints.fire(this.state.hints); + return this._actionRunner; } - doTrigger(triggerId) { - return __awaiter(this, void 0, void 0, function* () { - const isRetrigger = this.state.type === 1 /* Active */ || this.state.type === 2 /* Pending */; - const activeSignatureHelp = this.state.type === 1 /* Active */ ? this.state.hints : undefined; - this.cancel(true); - if (this._pendingTriggers.length === 0) { - return false; + set actionRunner(actionRunner) { + this._actionRunner = actionRunner; + } + getAction() { + return this._action; + } + isEnabled() { + return this._action.enabled; + } + setActionContext(newContext) { + this._context = newContext; + } + render(container) { + const element = this.element = container; + this._register(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(container)); + const enableDragging = this.options && this.options.draggable; + if (enableDragging) { + container.draggable = true; + if (_browser_js__WEBPACK_IMPORTED_MODULE_9__["isFirefox"]) { + // Firefox: requires to set a text data transfer to get going + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](container, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].DRAG_START, e => { var _a; return (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_8__["DataTransfers"].TEXT, this._action.label); })); } - const context = this._pendingTriggers.reduce(mergeTriggerContexts); - this._pendingTriggers = []; - const triggerContext = { - triggerKind: context.triggerKind, - triggerCharacter: context.triggerCharacter, - isRetrigger: isRetrigger, - activeSignatureHelp: activeSignatureHelp - }; - if (!this.editor.hasModel()) { - return false; + } + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _touch_js__WEBPACK_IMPORTED_MODULE_7__["EventType"].Tap, e => this.onClick(e))); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_DOWN, e => { + if (!enableDragging) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); // do not run when dragging is on because that would disable it } - const model = this.editor.getModel(); - const position = this.editor.getPosition(); - this.state = new ParameterHintState.Pending(Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => Object(_provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_6__["provideSignatureHelp"])(model, position, triggerContext, token))); - try { - const result = yield this.state.request; - // Check that we are still resolving the correct signature help - if (triggerId !== this.triggerId) { - result === null || result === void 0 ? void 0 : result.dispose(); - return false; - } - if (!result || !result.value.signatures || result.value.signatures.length === 0) { - result === null || result === void 0 ? void 0 : result.dispose(); - this._lastSignatureHelpResult.clear(); - this.cancel(); - return false; - } - else { - this.state = new ParameterHintState.Active(result.value); - this._lastSignatureHelpResult.value = result; - this._onChangedHints.fire(this.state.hints); - return true; - } + if (this._action.enabled && e.button === 0) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](element, 'active'); } - catch (error) { - if (triggerId === this.triggerId) { - this.state = ParameterHintState.Default; + })); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"]) { + // macOS: allow to trigger the button when holding Ctrl+key and pressing the + // main mouse button. This is for scenarios where e.g. some interaction forces + // the Ctrl+key to be pressed and hold but the user still wants to interact + // with the actions (for example quick access in quick navigation mode). + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].CONTEXT_MENU, e => { + if (e.button === 0 && e.ctrlKey === true) { + this.onClick(e); } - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"])(error); - return false; + })); + } + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].CLICK, e => { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); + // menus do not use the click event + if (!(this.options && this.options.isMenu)) { + _common_platform_js__WEBPACK_IMPORTED_MODULE_1__["setImmediate"](() => this.onClick(e)); } + })); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].DBLCLICK, e => { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e, true); + })); + [_dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_UP, _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventType"].MOUSE_OUT].forEach(event => { + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_5__["addDisposableListener"](element, event, e => { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(e); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](element, 'active'); + })); }); } - get isTriggered() { - return this.state.type === 1 /* Active */ - || this.state.type === 2 /* Pending */ - || this.throttledDelayer.isTriggered(); - } - onModelChanged() { - this.cancel(); - // Update trigger characters - this.triggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["CharacterSet"](); - this.retriggerChars = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["CharacterSet"](); - const model = this.editor.getModel(); - if (!model) { - return; - } - for (const support of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpProviderRegistry"].ordered(model)) { - for (const ch of support.signatureHelpTriggerCharacters || []) { - this.triggerChars.add(ch.charCodeAt(0)); - // All trigger characters are also considered retrigger characters - this.retriggerChars.add(ch.charCodeAt(0)); - } - for (const ch of support.signatureHelpRetriggerCharacters || []) { - this.retriggerChars.add(ch.charCodeAt(0)); - } - } + onClick(event) { + var _a; + _dom_js__WEBPACK_IMPORTED_MODULE_5__["EventHelper"].stop(event, true); + const context = _common_types_js__WEBPACK_IMPORTED_MODULE_6__["isUndefinedOrNull"](this._context) ? ((_a = this.options) === null || _a === void 0 ? void 0 : _a.useEventAsContext) ? event : undefined : this._context; + this.actionRunner.run(this._action, context); } - onDidType(text) { - if (!this.triggerOnType) { - return; - } - const lastCharIndex = text.length - 1; - const triggerCharCode = text.charCodeAt(lastCharIndex); - if (this.triggerChars.has(triggerCharCode) || this.isTriggered && this.retriggerChars.has(triggerCharCode)) { - this.trigger({ - triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].TriggerCharacter, - triggerCharacter: text.charAt(lastCharIndex), - }); + focus() { + if (this.element) { + this.element.focus(); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.element, 'focused'); } } - onCursorChange(e) { - if (e.source === 'mouse') { - this.cancel(); - } - else if (this.isTriggered) { - this.trigger({ triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].ContentChange }); + blur() { + if (this.element) { + this.element.blur(); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.element, 'focused'); } } - onModelContentChange() { - if (this.isTriggered) { - this.trigger({ triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].ContentChange }); - } + updateEnabled() { + // implement in subclass } - onEditorConfigurationChange() { - this.triggerOnType = this.editor.getOption(67 /* parameterHints */).enabled; - if (!this.triggerOnType) { - this.cancel(); - } + updateLabel() { + // implement in subclass + } + updateTooltip() { + // implement in subclass + } + updateClass() { + // implement in subclass + } + updateChecked() { + // implement in subclass } dispose() { - this.cancel(true); + if (this.element) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeNode"](this.element); + this.element = undefined; + } super.dispose(); } } -ParameterHintsModel.DEFAULT_DELAY = 120; // ms -function mergeTriggerContexts(previous, current) { - switch (current.triggerKind) { - case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].Invoke: - // Invoke overrides previous triggers. - return current; - case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].ContentChange: - // Ignore content changes triggers - return previous; - case _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"].TriggerCharacter: - default: - return current; +class ActionViewItem extends BaseActionViewItem { + constructor(context, action, options = {}) { + super(context, action, options); + this.options = options; + this.options.icon = options.icon !== undefined ? options.icon : false; + this.options.label = options.label !== undefined ? options.label : true; + this.cssClass = ''; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsWidget.js ***! - \*************************************************************************************************/ -/*! exports provided: ParameterHintsWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterHintsWidget", function() { return ParameterHintsWidget; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _parameterHints_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parameterHints.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markdown/markdownRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js"); -/* harmony import */ var _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./provideSignatureHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _parameterHintsModel_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./parameterHintsModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHintsModel.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - -const $ = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["$"]; -const parameterHintsNextIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('parameter-hints-next', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].chevronDown); -const parameterHintsPreviousIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["registerIcon"])('parameter-hints-previous', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_17__["Codicon"].chevronUp); -let ParameterHintsWidget = class ParameterHintsWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(editor, contextKeyService, openerService, modeService) { - super(); - this.editor = editor; - this.renderDisposeables = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"]()); - this.visible = false; - this.announcedLabel = null; - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = true; - this.markdownRenderer = this._register(new _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_8__["MarkdownRenderer"](editor, modeService, openerService)); - this.model = this._register(new _parameterHintsModel_js__WEBPACK_IMPORTED_MODULE_15__["ParameterHintsModel"](editor)); - this.keyVisible = _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__["Context"].Visible.bindTo(contextKeyService); - this.keyMultipleSignatures = _provideSignatureHelp_js__WEBPACK_IMPORTED_MODULE_9__["Context"].MultipleSignatures.bindTo(contextKeyService); - this._register(this.model.onChangedHints(newParameterHints => { - if (newParameterHints) { - this.show(); - this.render(newParameterHints); + render(container) { + super.render(container); + if (this.element) { + this.label = _dom_js__WEBPACK_IMPORTED_MODULE_5__["append"](this.element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["$"]('a.action-label')); + } + if (this.label) { + if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_4__["Separator"].ID) { + this.label.setAttribute('role', 'presentation'); // A separator is a presentation item } else { - this.hide(); - } - })); - } - createParamaterHintDOMNodes() { - const element = $('.editor-widget.parameter-hints-widget'); - const wrapper = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](element, $('.wrapper')); - wrapper.tabIndex = -1; - const controls = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](wrapper, $('.controls')); - const previous = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](controls, $('.button' + parameterHintsPreviousIcon.cssSelector)); - const overloads = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](controls, $('.overloads')); - const next = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](controls, $('.button' + parameterHintsNextIcon.cssSelector)); - const onPreviousClick = Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["stop"])(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(previous, 'click')); - this._register(onPreviousClick(this.previous, this)); - const onNextClick = Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["stop"])(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(next, 'click')); - this._register(onNextClick(this.next, this)); - const body = $('.body'); - const scrollbar = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__["DomScrollableElement"](body, {}); - this._register(scrollbar); - wrapper.appendChild(scrollbar.getDomNode()); - const signature = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](body, $('.signature')); - const docs = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](body, $('.docs')); - element.style.userSelect = 'text'; - this.domNodes = { - element, - signature, - overloads, - docs, - scrollbar, - }; - this.editor.addContentWidget(this); - this.hide(); - this._register(this.editor.onDidChangeCursorSelection(e => { - if (this.visible) { - this.editor.layoutContentWidget(this); - } - })); - const updateFont = () => { - if (!this.domNodes) { - return; + if (this.options.isMenu) { + this.label.setAttribute('role', 'menuitem'); + } + else { + this.label.setAttribute('role', 'button'); + } } - const fontInfo = this.editor.getOption(36 /* fontInfo */); - this.domNodes.element.style.fontSize = `${fontInfo.fontSize}px`; - }; - updateFont(); - this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(this.editor.onDidChangeConfiguration.bind(this.editor)) - .filter(e => e.hasChanged(36 /* fontInfo */)) - .on(updateFont, null)); - this._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight())); - this.updateMaxHeight(); - } - show() { - if (this.visible) { - return; } - if (!this.domNodes) { - this.createParamaterHintDOMNodes(); + if (this.options.label && this.options.keybinding && this.element) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["append"](this.element, _dom_js__WEBPACK_IMPORTED_MODULE_5__["$"]('span.keybinding')).textContent = this.options.keybinding; } - this.keyVisible.set(true); - this.visible = true; - setTimeout(() => { - if (this.domNodes) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClass"](this.domNodes.element, 'visible'); - } - }, 100); - this.editor.layoutContentWidget(this); + this.updateClass(); + this.updateLabel(); + this.updateTooltip(); + this.updateEnabled(); + this.updateChecked(); } - hide() { - this.renderDisposeables.clear(); - if (!this.visible) { - return; - } - this.keyVisible.reset(); - this.visible = false; - this.announcedLabel = null; - if (this.domNodes) { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClass"](this.domNodes.element, 'visible'); + focus() { + super.focus(); + if (this.label) { + this.label.focus(); } - this.editor.layoutContentWidget(this); } - getPosition() { - if (this.visible) { - return { - position: this.editor.getPosition(), - preference: [1 /* ABOVE */, 2 /* BELOW */] - }; + updateLabel() { + if (this.options.label && this.label) { + this.label.textContent = this.getAction().label; } - return null; } - render(hints) { - var _a; - this.renderDisposeables.clear(); - if (!this.domNodes) { - return; - } - const multiple = hints.signatures.length > 1; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this.domNodes.element, 'multiple', multiple); - this.keyMultipleSignatures.set(multiple); - this.domNodes.signature.innerText = ''; - this.domNodes.docs.innerText = ''; - const signature = hints.signatures[hints.activeSignature]; - if (!signature) { - return; - } - const code = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](this.domNodes.signature, $('.code')); - const fontInfo = this.editor.getOption(36 /* fontInfo */); - code.style.fontSize = `${fontInfo.fontSize}px`; - code.style.fontFamily = fontInfo.fontFamily; - const hasParameters = signature.parameters.length > 0; - const activeParameterIndex = (_a = signature.activeParameter) !== null && _a !== void 0 ? _a : hints.activeParameter; - if (!hasParameters) { - const label = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](code, $('span')); - label.textContent = signature.label; - } - else { - this.renderParameters(code, signature, activeParameterIndex); + updateTooltip() { + let title = null; + if (this.getAction().tooltip) { + title = this.getAction().tooltip; } - const activeParameter = signature.parameters[activeParameterIndex]; - if (activeParameter === null || activeParameter === void 0 ? void 0 : activeParameter.documentation) { - const documentation = $('span.documentation'); - if (typeof activeParameter.documentation === 'string') { - documentation.textContent = activeParameter.documentation; - } - else { - const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(activeParameter.documentation)); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClass"](renderedContents.element, 'markdown-docs'); - documentation.appendChild(renderedContents.element); + else if (!this.options.label && this.getAction().label && this.options.icon) { + title = this.getAction().label; + if (this.options.keybinding) { + title = _nls_js__WEBPACK_IMPORTED_MODULE_2__["localize"]({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, "{0} ({1})", title, this.options.keybinding); } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](this.domNodes.docs, $('p', {}, documentation)); - } - if (signature.documentation === undefined) { - /** no op */ } - else if (typeof signature.documentation === 'string') { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](this.domNodes.docs, $('p', {}, signature.documentation)); - } - else { - const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(signature.documentation)); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClass"](renderedContents.element, 'markdown-docs'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](this.domNodes.docs, renderedContents.element); - } - const hasDocs = this.hasDocs(signature, activeParameter); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this.domNodes.signature, 'has-docs', hasDocs); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["toggleClass"](this.domNodes.docs, 'empty', !hasDocs); - this.domNodes.overloads.textContent = - Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__["pad"])(hints.activeSignature + 1, hints.signatures.length.toString().length) + '/' + hints.signatures.length; - if (activeParameter) { - const labelToAnnounce = this.getParameterLabel(signature, activeParameterIndex); - // Select method gets called on every user type while parameter hints are visible. - // We do not want to spam the user with same announcements, so we only announce if the current parameter changed. - if (this.announcedLabel !== labelToAnnounce) { - _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_2__["alert"](_nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('hint', "{0}, hint", labelToAnnounce)); - this.announcedLabel = labelToAnnounce; - } + if (title && this.label) { + this.label.title = title; } - this.editor.layoutContentWidget(this); - this.domNodes.scrollbar.scanDomNode(); } - hasDocs(signature, activeParameter) { - if (activeParameter && typeof activeParameter.documentation === 'string' && Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__["assertIsDefined"])(activeParameter.documentation).length > 0) { - return true; - } - if (activeParameter && typeof activeParameter.documentation === 'object' && Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__["assertIsDefined"])(activeParameter.documentation).value.length > 0) { - return true; - } - if (signature.documentation && typeof signature.documentation === 'string' && Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__["assertIsDefined"])(signature.documentation).length > 0) { - return true; - } - if (signature.documentation && typeof signature.documentation === 'object' && Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_18__["assertIsDefined"])(signature.documentation.value).length > 0) { - return true; + updateClass() { + if (this.cssClass && this.label) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClasses"](this.label, this.cssClass); } - return false; - } - renderParameters(parent, signature, activeParameterIndex) { - const [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex); - const beforeSpan = document.createElement('span'); - beforeSpan.textContent = signature.label.substring(0, start); - const paramSpan = document.createElement('span'); - paramSpan.textContent = signature.label.substring(start, end); - paramSpan.className = 'parameter active'; - const afterSpan = document.createElement('span'); - afterSpan.textContent = signature.label.substring(end); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["append"](parent, beforeSpan, paramSpan, afterSpan); - } - getParameterLabel(signature, paramIdx) { - const param = signature.parameters[paramIdx]; - if (Array.isArray(param.label)) { - return signature.label.substring(param.label[0], param.label[1]); + if (this.options.icon) { + this.cssClass = this.getAction().class; + if (this.label) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'codicon'); + if (this.cssClass) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClasses"](this.label, this.cssClass); + } + } + this.updateEnabled(); } else { - return param.label; + if (this.label) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'codicon'); + } } } - getParameterLabelOffsets(signature, paramIdx) { - const param = signature.parameters[paramIdx]; - if (!param) { - return [0, 0]; - } - else if (Array.isArray(param.label)) { - return param.label; + updateEnabled() { + if (this.getAction().enabled) { + if (this.label) { + this.label.removeAttribute('aria-disabled'); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'disabled'); + this.label.tabIndex = 0; + } + if (this.element) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.element, 'disabled'); + } } else { - const idx = signature.label.lastIndexOf(param.label); - return idx >= 0 - ? [idx, idx + param.label.length] - : [0, 0]; - } - } - next() { - this.editor.focus(); - this.model.next(); - } - previous() { - this.editor.focus(); - this.model.previous(); - } - cancel() { - this.model.cancel(); - } - getDomNode() { - if (!this.domNodes) { - this.createParamaterHintDOMNodes(); + if (this.label) { + this.label.setAttribute('aria-disabled', 'true'); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'disabled'); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeTabIndexAndUpdateFocus"](this.label); + } + if (this.element) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.element, 'disabled'); + } } - return this.domNodes.element; - } - getId() { - return ParameterHintsWidget.ID; } - trigger(context) { - this.model.trigger(context, 0); - } - updateMaxHeight() { - if (!this.domNodes) { - return; - } - const height = Math.max(this.editor.getLayoutInfo().height / 4, 250); - const maxHeight = `${height}px`; - this.domNodes.element.style.maxHeight = maxHeight; - const wrapper = this.domNodes.element.getElementsByClassName('wrapper'); - if (wrapper.length) { - wrapper[0].style.maxHeight = maxHeight; + updateChecked() { + if (this.label) { + if (this.getAction().checked) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["addClass"](this.label, 'checked'); + } + else { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](this.label, 'checked'); + } } } -}; -ParameterHintsWidget.ID = 'editor.widget.parameterHintsWidget'; -ParameterHintsWidget = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["IContextKeyService"]), - __param(2, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_12__["IOpenerService"]), - __param(3, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__["IModeService"]) -], ParameterHintsWidget); - -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["registerThemingParticipant"])((theme, collector) => { - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorHoverBorder"]); - if (border) { - const borderWidth = theme.type === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["HIGH_CONTRAST"] ? 2 : 1; - collector.addRule(`.monaco-editor .parameter-hints-widget { border: ${borderWidth}px solid ${border}; }`); - collector.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${border.transparent(0.5)}; }`); - collector.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${border.transparent(0.5)}; }`); - } - const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorHoverBackground"]); - if (background) { - collector.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${background}; }`); - } - const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["textLinkForeground"]); - if (link) { - collector.addRule(`.monaco-editor .parameter-hints-widget a { color: ${link}; }`); - } - const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorHoverForeground"]); - if (foreground) { - collector.addRule(`.monaco-editor .parameter-hints-widget { color: ${foreground}; }`); - } - const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["textCodeBlockBackground"]); - if (codeBackground) { - collector.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${codeBackground}; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/provideSignatureHelp.js ***! - \*************************************************************************************************/ -/*! exports provided: Context, provideSignatureHelp */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideSignatureHelp", function() { return provideSignatureHelp; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -const Context = { - Visible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('parameterHintsVisible', false), - MultipleSignatures: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('parameterHintsMultipleSignatures', false), -}; -function provideSignatureHelp(model, position, context, token) { - const supports = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["SignatureHelpProviderRegistry"].ordered(model); - return Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["first"])(supports.map(support => () => { - return Promise.resolve(support.provideSignatureHelp(model, position, token, context)) - .catch(e => Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedExternalError"])(e)); - })); } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerDefaultLanguageCommand"])('_executeSignatureHelpProvider', (model, position, args) => __awaiter(void 0, void 0, void 0, function* () { - const result = yield provideSignatureHelp(model, position, { - triggerKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["SignatureHelpTriggerKind"].Invoke, - isRetrigger: false, - triggerCharacter: args['triggerCharacter'] - }, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__["CancellationToken"].None); - if (!result) { - return undefined; - } - setTimeout(() => result.dispose(), 0); - return result.value; -})); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css ***! - \********************************************************************************************/ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css": +/*!***********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css ***! + \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -213893,368 +71723,41 @@ Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerDefaul __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./peekViewWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css"); +/* harmony import */ var _css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./actionbar.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); var options = {}; options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js ***! - \*******************************************************************************/ -/*! exports provided: IPeekViewService, PeekContext, getOuterEditor, PeekViewWidget, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground, peekViewBorder, peekViewResultsBackground, peekViewResultsMatchForeground, peekViewResultsFileForeground, peekViewResultsSelectionBackground, peekViewResultsSelectionForeground, peekViewEditorBackground, peekViewEditorGutterBackground, peekViewResultsMatchHighlight, peekViewEditorMatchHighlight, peekViewEditorMatchHighlightBorder */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IPeekViewService", function() { return IPeekViewService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeekContext", function() { return PeekContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOuterEditor", function() { return getOuterEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeekViewWidget", function() { return PeekViewWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewTitleBackground", function() { return peekViewTitleBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewTitleForeground", function() { return peekViewTitleForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewTitleInfoForeground", function() { return peekViewTitleInfoForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewBorder", function() { return peekViewBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsBackground", function() { return peekViewResultsBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsMatchForeground", function() { return peekViewResultsMatchForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsFileForeground", function() { return peekViewResultsFileForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsSelectionBackground", function() { return peekViewResultsSelectionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsSelectionForeground", function() { return peekViewResultsSelectionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewEditorBackground", function() { return peekViewEditorBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewEditorGutterBackground", function() { return peekViewEditorGutterBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewResultsMatchHighlight", function() { return peekViewResultsMatchHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewEditorMatchHighlight", function() { return peekViewEditorMatchHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peekViewEditorMatchHighlightBorder", function() { return peekViewEditorMatchHighlightBorder; }); -/* harmony import */ var _media_peekViewWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/peekViewWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../browser/widget/embeddedCodeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js"); -/* harmony import */ var _zoneWidget_zoneWidget_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../zoneWidget/zoneWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/actions/browser/menuEntryActionViewItem.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - -const IPeekViewService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__["createDecorator"])('IPeekViewService'); -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_13__["registerSingleton"])(IPeekViewService, class { - constructor() { - this._widgets = new Map(); - } - addExclusiveWidget(editor, widget) { - const existing = this._widgets.get(editor); - if (existing) { - existing.listener.dispose(); - existing.widget.dispose(); - } - const remove = () => { - const data = this._widgets.get(editor); - if (data && data.widget === widget) { - data.listener.dispose(); - this._widgets.delete(editor); - } - }; - this._widgets.set(editor, { widget, listener: widget.onDidClose(remove) }); - } -}); -var PeekContext; -(function (PeekContext) { - PeekContext.inPeekEditor = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["RawContextKey"]('inReferenceSearchEditor', true); - PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated(); -})(PeekContext || (PeekContext = {})); -let PeekContextController = class PeekContextController { - constructor(editor, contextKeyService) { - if (editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__["EmbeddedCodeEditorWidget"]) { - PeekContext.inPeekEditor.bindTo(contextKeyService); - } - } - dispose() { } -}; -PeekContextController.ID = 'editor.contrib.referenceController'; -PeekContextController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["IContextKeyService"]) -], PeekContextController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_14__["registerEditorContribution"])(PeekContextController.ID, PeekContextController); -function getOuterEditor(accessor) { - let editor = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_7__["ICodeEditorService"]).getFocusedCodeEditor(); - if (editor instanceof _browser_widget_embeddedCodeEditorWidget_js__WEBPACK_IMPORTED_MODULE_8__["EmbeddedCodeEditorWidget"]) { - return editor.getParentEditor(); - } - return editor; -} -const defaultOptions = { - headerBackgroundColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white, - primaryHeadingColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].fromHex('#333333'), - secondaryHeadingColor: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].fromHex('#6c6c6cb3') -}; -let PeekViewWidget = class PeekViewWidget extends _zoneWidget_zoneWidget_js__WEBPACK_IMPORTED_MODULE_9__["ZoneWidget"] { - constructor(editor, options, instantiationService) { - super(editor, options); - this.instantiationService = instantiationService; - this._onDidClose = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onDidClose = this._onDidClose.event; - _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__["mixin"](this.options, defaultOptions, false); - } - dispose() { - super.dispose(); - this._onDidClose.fire(this); - } - style(styles) { - let options = this.options; - if (styles.headerBackgroundColor) { - options.headerBackgroundColor = styles.headerBackgroundColor; - } - if (styles.primaryHeadingColor) { - options.primaryHeadingColor = styles.primaryHeadingColor; - } - if (styles.secondaryHeadingColor) { - options.secondaryHeadingColor = styles.secondaryHeadingColor; - } - super.style(styles); - } - _applyStyles() { - super._applyStyles(); - let options = this.options; - if (this._headElement && options.headerBackgroundColor) { - this._headElement.style.backgroundColor = options.headerBackgroundColor.toString(); - } - if (this._primaryHeading && options.primaryHeadingColor) { - this._primaryHeading.style.color = options.primaryHeadingColor.toString(); - } - if (this._secondaryHeading && options.secondaryHeadingColor) { - this._secondaryHeading.style.color = options.secondaryHeadingColor.toString(); - } - if (this._bodyElement && options.frameColor) { - this._bodyElement.style.borderColor = options.frameColor.toString(); - } - } - _fillContainer(container) { - this.setCssClass('peekview-widget'); - this._headElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.head'); - this._bodyElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.body'); - this._fillHead(this._headElement); - this._fillBody(this._bodyElement); - container.appendChild(this._headElement); - container.appendChild(this._bodyElement); - } - _fillHead(container, noCloseAction) { - const titleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.peekview-title'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this._headElement, titleElement); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](titleElement, 'click', event => this._onTitleClick(event)); - this._fillTitleIcon(titleElement); - this._primaryHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.filename'); - this._secondaryHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.dirname'); - this._metaHeading = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.meta'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading); - const actionsContainer = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.peekview-actions'); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this._headElement, actionsContainer); - const actionBarOptions = this._getActionBarOptions(); - this._actionbarWidget = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_2__["ActionBar"](actionsContainer, actionBarOptions); - this._disposables.add(this._actionbarWidget); - if (!noCloseAction) { - this._actionbarWidget.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_3__["Action"]('peekview.close', _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('label.close', "Close"), _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_16__["Codicon"].close.classNames, true, () => { - this.dispose(); - return Promise.resolve(); - }), { label: false, icon: true }); - } - } - _fillTitleIcon(container) { - } - _getActionBarOptions() { - return { - actionViewItemProvider: action => { - if (action instanceof _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__["MenuItemAction"]) { - return this.instantiationService.createInstance(_platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_18__["MenuEntryActionViewItem"], action); - } - else if (action instanceof _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_17__["SubmenuItemAction"]) { - return this.instantiationService.createInstance(_platform_actions_browser_menuEntryActionViewItem_js__WEBPACK_IMPORTED_MODULE_18__["SubmenuEntryActionViewItem"], action); - } - return undefined; - } - }; - } - _onTitleClick(event) { - // implement me - } - setTitle(primaryHeading, secondaryHeading) { - if (this._primaryHeading && this._secondaryHeading) { - this._primaryHeading.innerText = primaryHeading; - this._primaryHeading.setAttribute('aria-label', primaryHeading); - if (secondaryHeading) { - this._secondaryHeading.innerText = secondaryHeading; - } - else { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["clearNode"](this._secondaryHeading); - } - } - } - setMetaTitle(value) { - if (this._metaHeading) { - if (value) { - this._metaHeading.innerText = value; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this._metaHeading); - } - else { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this._metaHeading); - } - } - } - _doLayout(heightInPixel, widthInPixel) { - if (!this._isShowing && heightInPixel < 0) { - // Looks like the view zone got folded away! - this.dispose(); - return; - } - const headHeight = Math.ceil(this.editor.getOption(51 /* lineHeight */) * 1.2); - const bodyHeight = Math.round(heightInPixel - (headHeight + 2 /* the border-top/bottom width*/)); - this._doLayoutHead(headHeight, widthInPixel); - this._doLayoutBody(bodyHeight, widthInPixel); - } - _doLayoutHead(heightInPixel, widthInPixel) { - if (this._headElement) { - this._headElement.style.height = `${heightInPixel}px`; - this._headElement.style.lineHeight = this._headElement.style.height; - } - } - _doLayoutBody(heightInPixel, widthInPixel) { - if (this._bodyElement) { - this._bodyElement.style.height = `${heightInPixel}px`; - } - } -}; -PeekViewWidget = __decorate([ - __param(2, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_12__["IInstantiationService"]) -], PeekViewWidget); - -const peekViewTitleBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewTitleBackground', 'Background color of the peek view title area.')); -const peekViewTitleForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewTitleForeground', 'Color of the peek view title.')); -const peekViewTitleInfoForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161e6', hc: '#FFFFFF99' }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewTitleInfoForeground', 'Color of the peek view title info.')); -const peekViewBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekView.border', { dark: '#007acc', light: '#007acc', hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["contrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewBorder', 'Color of the peek view borders and arrow.')); -const peekViewResultsBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsBackground', 'Background color of the peek view result list.')); -const peekViewResultsMatchForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.')); -const peekViewResultsFileForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.fileForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white, light: '#1E1E1E', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.')); -const peekViewResultsSelectionBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); -const peekViewResultsSelectionForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.selectionForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white, light: '#6C6C6C', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); -const peekViewEditorBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_4__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewEditorBackground', 'Background color of the peek view editor.')); -const peekViewEditorGutterBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.')); -const peekViewResultsMatchHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); -const peekViewEditorMatchHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); -const peekViewEditorMatchHighlightBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["registerColor"])('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_15__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_10__["localize"]('peekViewEditorMatchHighlightBorder', 'Match highlight border in the peek view editor.')); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js ***! - \*********************************************************************************************/ -/*! exports provided: AbstractEditorCommandsQuickAccessProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +options.singleton = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractEditorCommandsQuickAccessProvider", function() { return AbstractEditorCommandsQuickAccessProvider; }); -/* harmony import */ var _platform_quickinput_browser_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/quickinput/browser/commandsQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -class AbstractEditorCommandsQuickAccessProvider extends _platform_quickinput_browser_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractCommandsQuickAccessProvider"] { - constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) { - super(options, instantiationService, keybindingService, commandService, telemetryService, notificationService); - } - getCodeEditorCommandPicks() { - const activeTextEditorControl = this.activeTextEditorControl; - if (!activeTextEditorControl) { - return []; - } - const editorCommandPicks = []; - for (const editorAction of activeTextEditorControl.getSupportedActions()) { - editorCommandPicks.push({ - commandId: editorAction.id, - commandAlias: editorAction.alias, - label: Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["stripCodicons"])(editorAction.label) || editorAction.id, - }); - } - return editorCommandPicks; - } -} +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_actionbar_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js": -/*!*****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js ***! - \*****************************************************************************************************/ -/*! exports provided: AbstractEditorNavigationQuickAccessProvider */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js ***! + \**********************************************************************************/ +/*! exports provided: ActionBar */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractEditorNavigationQuickAccessProvider", function() { return AbstractEditorNavigationQuickAccessProvider; }); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBar", function() { return ActionBar; }); +/* harmony import */ var _actionbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actionbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -214266,740 +71769,456 @@ __webpack_require__.r(__webpack_exports__); -/** - * A reusable quick access provider for the editor with support - * for adding decorations for navigating in the currently active file - * (for example "Go to line", "Go to symbol"). - */ -class AbstractEditorNavigationQuickAccessProvider { - constructor(options) { + +class ActionBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor(container, options = {}) { + var _a, _b, _c; + super(); + this._onDidBlur = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidBlur = this._onDidBlur.event; + this._onDidCancel = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidCancel = this._onDidCancel.event; + this._onDidRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidRun = this._onDidRun.event; + this._onDidBeforeRun = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidBeforeRun = this._onDidBeforeRun.event; this.options = options; - //#endregion - //#region Decorations Utils - this.rangeHighlightDecorationId = undefined; - } - //#region Provider methods - provide(picker, token) { - var _a; - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - // Apply options if any - picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground); - // Disable filtering & sorting, we control the results - picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false; - // Provide based on current active editor - const pickerDisposable = disposables.add(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["MutableDisposable"]()); - pickerDisposable.value = this.doProvide(picker, token); - // Re-create whenever the active editor changes - disposables.add(this.onDidActiveTextEditorControlChange(() => { - // Clear old - pickerDisposable.value = undefined; - // Add new - pickerDisposable.value = this.doProvide(picker, token); - })); - return disposables; - } - doProvide(picker, token) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - // With text control - const editor = this.activeTextEditorControl; - if (editor && this.canProvideWithTextEditor(editor)) { - // Restore any view state if this picker was closed - // without actually going to a line - const codeEditor = Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__["getCodeEditor"])(editor); - if (codeEditor) { - // Remember view state and update it when the cursor position - // changes even later because it could be that the user has - // configured quick access to remain open when focus is lost and - // we always want to restore the current location. - let lastKnownEditorViewState = Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__["withNullAsUndefined"])(editor.saveViewState()); - disposables.add(codeEditor.onDidChangeCursorPosition(() => { - lastKnownEditorViewState = Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__["withNullAsUndefined"])(editor.saveViewState()); - })); - disposables.add(Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__["once"])(token.onCancellationRequested)(() => { - if (lastKnownEditorViewState && editor === this.activeTextEditorControl) { - editor.restoreViewState(lastKnownEditorViewState); - } - })); - } - // Clean up decorations on dispose - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["toDisposable"])(() => this.clearDecorations(editor))); - // Ask subclass for entries - disposables.add(this.provideWithTextEditor(editor, picker, token)); + this._context = (_a = options.context) !== null && _a !== void 0 ? _a : null; + this._orientation = (_b = this.options.orientation) !== null && _b !== void 0 ? _b : 0 /* HORIZONTAL */; + this._triggerKeys = (_c = this.options.triggerKeys) !== null && _c !== void 0 ? _c : { + keys: [3 /* Enter */, 10 /* Space */], + keyDown: false + }; + if (this.options.actionRunner) { + this._actionRunner = this.options.actionRunner; } - // Without text control else { - disposables.add(this.provideWithoutTextEditor(picker, token)); + this._actionRunner = new _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["ActionRunner"](); + this._register(this._actionRunner); } - return disposables; - } - /** - * Subclasses to implement if they can operate on the text editor. - */ - canProvideWithTextEditor(editor) { - return true; - } - gotoLocation(editor, options) { - editor.setSelection(options.range); - editor.revealRangeInCenter(options.range, 0 /* Smooth */); - if (!options.preserveFocus) { - editor.focus(); + this._register(this._actionRunner.onDidRun(e => this._onDidRun.fire(e))); + this._register(this._actionRunner.onDidBeforeRun(e => this._onDidBeforeRun.fire(e))); + this.viewItems = []; + this.focusedItem = undefined; + this.domNode = document.createElement('div'); + this.domNode.className = 'monaco-action-bar'; + if (options.animated !== false) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, 'animated'); } - } - getModel(editor) { - var _a; - return Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_4__["isDiffEditor"])(editor) ? (_a = editor.getModel()) === null || _a === void 0 ? void 0 : _a.modified : - editor.getModel(); - } - addDecorations(editor, range) { - editor.changeDecorations(changeAccessor => { - // Reset old decorations if any - const deleteDecorations = []; - if (this.rangeHighlightDecorationId) { - deleteDecorations.push(this.rangeHighlightDecorationId.overviewRulerDecorationId); - deleteDecorations.push(this.rangeHighlightDecorationId.rangeHighlightId); - this.rangeHighlightDecorationId = undefined; + let previousKey; + let nextKey; + switch (this._orientation) { + case 0 /* HORIZONTAL */: + previousKey = 15 /* LeftArrow */; + nextKey = 17 /* RightArrow */; + break; + case 1 /* HORIZONTAL_REVERSE */: + previousKey = 17 /* RightArrow */; + nextKey = 15 /* LeftArrow */; + this.domNode.className += ' reverse'; + break; + case 2 /* VERTICAL */: + previousKey = 16 /* UpArrow */; + nextKey = 18 /* DownArrow */; + this.domNode.className += ' vertical'; + break; + case 3 /* VERTICAL_REVERSE */: + previousKey = 18 /* DownArrow */; + nextKey = 16 /* UpArrow */; + this.domNode.className += ' vertical reverse'; + break; + } + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_DOWN, e => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + let eventHandled = true; + if (event.equals(previousKey)) { + eventHandled = this.focusPrevious(); } - // Add new decorations for the range - const newDecorations = [ - // highlight the entire line on the range - { - range, - options: { - className: 'rangeHighlight', - isWholeLine: true - } - }, - // also add overview ruler highlight - { - range, - options: { - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__["themeColorFromId"])(_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["overviewRulerRangeHighlight"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_0__["OverviewRulerLane"].Full - } - } + else if (event.equals(nextKey)) { + eventHandled = this.focusNext(); + } + else if (event.equals(9 /* Escape */)) { + this._onDidCancel.fire(); + } + else if (this.isTriggerKeyEvent(event)) { + // Staying out of the else branch even if not triggered + if (this._triggerKeys.keyDown) { + this.doTrigger(event); + } + } + else { + eventHandled = false; + } + if (eventHandled) { + event.preventDefault(); + event.stopPropagation(); + } + })); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_UP, e => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + // Run action on Enter/Space + if (this.isTriggerKeyEvent(event)) { + if (!this._triggerKeys.keyDown) { + this.doTrigger(event); } - ]; - const [rangeHighlightId, overviewRulerDecorationId] = changeAccessor.deltaDecorations(deleteDecorations, newDecorations); - this.rangeHighlightDecorationId = { rangeHighlightId, overviewRulerDecorationId }; + event.preventDefault(); + event.stopPropagation(); + } + // Recompute focused item + else if (event.equals(2 /* Tab */) || event.equals(1024 /* Shift */ | 2 /* Tab */)) { + this.updateFocusedItem(); + } + })); + this.focusTracker = this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["trackFocus"](this.domNode)); + this._register(this.focusTracker.onDidBlur(() => { + if (_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"]() === this.domNode || !_dom_js__WEBPACK_IMPORTED_MODULE_3__["isAncestor"](_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"](), this.domNode)) { + this._onDidBlur.fire(); + this.focusedItem = undefined; + } + })); + this._register(this.focusTracker.onDidFocus(() => this.updateFocusedItem())); + this.actionsList = document.createElement('ul'); + this.actionsList.className = 'actions-container'; + this.actionsList.setAttribute('role', 'toolbar'); + if (this.options.ariaLabel) { + this.actionsList.setAttribute('aria-label', this.options.ariaLabel); + } + this.domNode.appendChild(this.actionsList); + container.appendChild(this.domNode); + } + isTriggerKeyEvent(event) { + let ret = false; + this._triggerKeys.keys.forEach(keyCode => { + ret = ret || event.equals(keyCode); }); + return ret; } - clearDecorations(editor) { - const rangeHighlightDecorationId = this.rangeHighlightDecorationId; - if (rangeHighlightDecorationId) { - editor.changeDecorations(changeAccessor => { - changeAccessor.deltaDecorations([ - rangeHighlightDecorationId.overviewRulerDecorationId, - rangeHighlightDecorationId.rangeHighlightId - ], []); - }); - this.rangeHighlightDecorationId = undefined; + updateFocusedItem() { + for (let i = 0; i < this.actionsList.children.length; i++) { + const elem = this.actionsList.children[i]; + if (_dom_js__WEBPACK_IMPORTED_MODULE_3__["isAncestor"](_dom_js__WEBPACK_IMPORTED_MODULE_3__["getActiveElement"](), elem)) { + this.focusedItem = i; + break; + } } } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js ***! - \*********************************************************************************************/ -/*! exports provided: AbstractGotoLineQuickAccessProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractGotoLineQuickAccessProvider", function() { return AbstractGotoLineQuickAccessProvider; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editorNavigationQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js"); -/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class AbstractGotoLineQuickAccessProvider extends _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_2__["AbstractEditorNavigationQuickAccessProvider"] { - constructor() { - super({ canAcceptInBackground: true }); - } - provideWithoutTextEditor(picker) { - const label = Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('cannotRunGotoLine', "Open a text editor first to go to a line."); - picker.items = [{ label }]; - picker.ariaLabel = label; - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - provideWithTextEditor(editor, picker, token) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - // Goto line once picked - disposables.add(picker.onDidAccept(event => { - const [item] = picker.selectedItems; - if (item) { - if (!this.isValidLineNumber(editor, item.lineNumber)) { - return; - } - this.gotoLocation(editor, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground }); - if (!event.inBackground) { - picker.hide(); - } + get context() { + return this._context; + } + set context(context) { + this._context = context; + this.viewItems.forEach(i => i.setActionContext(context)); + } + get actionRunner() { + return this._actionRunner; + } + set actionRunner(actionRunner) { + if (actionRunner) { + this._actionRunner = actionRunner; + this.viewItems.forEach(item => item.actionRunner = actionRunner); + } + } + getContainer() { + return this.domNode; + } + push(arg, options = {}) { + const actions = Array.isArray(arg) ? arg : [arg]; + let index = _common_types_js__WEBPACK_IMPORTED_MODULE_4__["isNumber"](options.index) ? options.index : null; + actions.forEach((action) => { + const actionViewItemElement = document.createElement('li'); + actionViewItemElement.className = 'action-item'; + actionViewItemElement.setAttribute('role', 'presentation'); + // Prevent native context menu on actions + if (!this.options.allowContextMenu) { + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"](actionViewItemElement, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].CONTEXT_MENU, (e) => { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true); + })); } - })); - // React to picker changes - const updatePickerAndEditor = () => { - const position = this.parsePosition(editor, picker.value.trim().substr(AbstractGotoLineQuickAccessProvider.PREFIX.length)); - const label = this.getPickLabel(editor, position.lineNumber, position.column); - // Picker - picker.items = [{ - lineNumber: position.lineNumber, - column: position.column, - label - }]; - // ARIA Label - picker.ariaLabel = label; - // Clear decorations for invalid range - if (!this.isValidLineNumber(editor, position.lineNumber)) { - this.clearDecorations(editor); - return; + let item; + if (this.options.actionViewItemProvider) { + item = this.options.actionViewItemProvider(action); } - // Reveal - const range = this.toRange(position.lineNumber, position.column); - editor.revealRangeInCenter(range, 0 /* Smooth */); - // Decorate - this.addDecorations(editor, range); - }; - updatePickerAndEditor(); - disposables.add(picker.onDidChangeValue(() => updatePickerAndEditor())); - // Adjust line number visibility as needed - const codeEditor = Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_3__["getCodeEditor"])(editor); - if (codeEditor) { - const options = codeEditor.getOptions(); - const lineNumbers = options.get(52 /* lineNumbers */); - if (lineNumbers.renderType === 2 /* Relative */) { - codeEditor.updateOptions({ lineNumbers: 'on' }); - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => codeEditor.updateOptions({ lineNumbers: 'relative' }))); + if (!item) { + item = new _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__["ActionViewItem"](this.context, action, options); + } + item.actionRunner = this._actionRunner; + item.setActionContext(this.context); + item.render(actionViewItemElement); + if (index === null || index < 0 || index >= this.actionsList.children.length) { + this.actionsList.appendChild(actionViewItemElement); + this.viewItems.push(item); + } + else { + this.actionsList.insertBefore(actionViewItemElement, this.actionsList.children[index]); + this.viewItems.splice(index, 0, item); + index++; } + }); + if (this.focusedItem) { + // After a clear actions might be re-added to simply toggle some actions. We should preserve focus #97128 + this.focus(this.focusedItem); } - return disposables; } - toRange(lineNumber = 1, column = 1) { - return { - startLineNumber: lineNumber, - startColumn: column, - endLineNumber: lineNumber, - endColumn: column - }; + clear() { + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.viewItems); + this.viewItems = []; + _dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"](this.actionsList); } - parsePosition(editor, value) { - // Support line-col formats of `line,col`, `line:col`, `line#col` - const numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part)); - const endLine = this.lineCount(editor) + 1; - return { - lineNumber: numbers[0] > 0 ? numbers[0] : endLine + numbers[0], - column: numbers[1] - }; + focus(arg) { + let selectFirst = false; + let index = undefined; + if (arg === undefined) { + selectFirst = true; + } + else if (typeof arg === 'number') { + index = arg; + } + else if (typeof arg === 'boolean') { + selectFirst = arg; + } + if (selectFirst && typeof this.focusedItem === 'undefined') { + // Focus the first enabled item + this.focusedItem = -1; + this.focusNext(); + } + else { + if (index !== undefined) { + this.focusedItem = index; + } + this.updateFocus(); + } } - getPickLabel(editor, lineNumber, column) { - // Location valid: indicate this as picker label - if (this.isValidLineNumber(editor, lineNumber)) { - if (this.isValidColumn(editor, lineNumber, column)) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('gotoLineColumnLabel', "Go to line {0} and column {1}.", lineNumber, column); + focusNext() { + if (typeof this.focusedItem === 'undefined') { + this.focusedItem = this.viewItems.length - 1; + } + const startIndex = this.focusedItem; + let item; + do { + if (this.options.preventLoopNavigation && this.focusedItem + 1 >= this.viewItems.length) { + this.focusedItem = startIndex; + return false; } - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('gotoLineLabel', "Go to line {0}.", lineNumber); + this.focusedItem = (this.focusedItem + 1) % this.viewItems.length; + item = this.viewItems[this.focusedItem]; + } while (this.focusedItem !== startIndex && !item.isEnabled()); + if (this.focusedItem === startIndex && !item.isEnabled()) { + this.focusedItem = undefined; + } + this.updateFocus(); + return true; + } + focusPrevious() { + if (typeof this.focusedItem === 'undefined') { + this.focusedItem = 0; } - // Location invalid: show generic label - const position = editor.getPosition() || { lineNumber: 1, column: 1 }; - const lineCount = this.lineCount(editor); - if (lineCount > 1) { - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('gotoLineLabelEmptyWithLimit', "Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.", position.lineNumber, position.column, lineCount); + const startIndex = this.focusedItem; + let item; + do { + this.focusedItem = this.focusedItem - 1; + if (this.focusedItem < 0) { + if (this.options.preventLoopNavigation) { + this.focusedItem = startIndex; + return false; + } + this.focusedItem = this.viewItems.length - 1; + } + item = this.viewItems[this.focusedItem]; + } while (this.focusedItem !== startIndex && !item.isEnabled()); + if (this.focusedItem === startIndex && !item.isEnabled()) { + this.focusedItem = undefined; } - return Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('gotoLineLabelEmpty', "Current Line: {0}, Character: {1}. Type a line number to navigate to.", position.lineNumber, position.column); + this.updateFocus(true); + return true; } - isValidLineNumber(editor, lineNumber) { - if (!lineNumber || typeof lineNumber !== 'number') { - return false; + updateFocus(fromRight, preventScroll) { + if (typeof this.focusedItem === 'undefined') { + this.actionsList.focus({ preventScroll }); + } + for (let i = 0; i < this.viewItems.length; i++) { + const item = this.viewItems[i]; + const actionViewItem = item; + if (i === this.focusedItem) { + if (_common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.isEnabled)) { + if (actionViewItem.isEnabled() && _common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.focus)) { + actionViewItem.focus(fromRight); + } + else { + this.actionsList.focus({ preventScroll }); + } + } + } + else { + if (_common_types_js__WEBPACK_IMPORTED_MODULE_4__["isFunction"](actionViewItem.blur)) { + actionViewItem.blur(); + } + } } - return lineNumber > 0 && lineNumber <= this.lineCount(editor); } - isValidColumn(editor, lineNumber, column) { - if (!column || typeof column !== 'number') { - return false; + doTrigger(event) { + if (typeof this.focusedItem === 'undefined') { + return; //nothing to focus } - const model = this.getModel(editor); - if (!model) { - return false; + // trigger action + const actionViewItem = this.viewItems[this.focusedItem]; + if (actionViewItem instanceof _actionViewItems_js__WEBPACK_IMPORTED_MODULE_7__["BaseActionViewItem"]) { + const context = (actionViewItem._context === null || actionViewItem._context === undefined) ? event : actionViewItem._context; + this.run(actionViewItem._action, context); } - const positionCandidate = { lineNumber, column }; - return model.validatePosition(positionCandidate).equals(positionCandidate); } - lineCount(editor) { - var _a, _b; - return (_b = (_a = this.getModel(editor)) === null || _a === void 0 ? void 0 : _a.getLineCount()) !== null && _b !== void 0 ? _b : 0; + run(action, context) { + return this._actionRunner.run(action, context); + } + dispose() { + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.viewItems); + this.viewItems = []; + _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeNode"](this.getContainer()); + super.dispose(); } } -AbstractGotoLineQuickAccessProvider.PREFIX = ':'; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js ***! - \***********************************************************************************************/ -/*! exports provided: AbstractGotoSymbolQuickAccessProvider */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css": +/*!*************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css ***! + \*************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractGotoSymbolQuickAccessProvider", function() { return AbstractGotoSymbolQuickAccessProvider; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editorNavigationQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/editorNavigationQuickAccess.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../documentSymbols/outlineModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineModel.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/fuzzyScorer.js */ "./node_modules/monaco-editor/esm/vs/base/common/fuzzyScorer.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./aria.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_aria_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js": +/*!************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js ***! + \************************************************************************/ +/*! exports provided: setARIAContainer, alert, status */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setARIAContainer", function() { return setARIAContainer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alert", function() { return alert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "status", function() { return status; }); +/* harmony import */ var _aria_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aria.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ -class AbstractGotoSymbolQuickAccessProvider extends _editorNavigationQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__["AbstractEditorNavigationQuickAccessProvider"] { - constructor(options = Object.create(null)) { - super(options); - this.options = options; - options.canAcceptInBackground = true; - } - provideWithoutTextEditor(picker) { - this.provideLabelPick(picker, Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('cannotRunGotoSymbolWithoutEditor', "To go to a symbol, first open a text editor with symbol information.")); - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"].None; - } - provideWithTextEditor(editor, picker, token) { - const model = this.getModel(editor); - if (!model) { - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"].None; - } - // Provide symbols from model if available in registry - if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["DocumentSymbolProviderRegistry"].has(model)) { - return this.doProvideWithEditorSymbols(editor, model, picker, token); - } - // Otherwise show an entry for a model without registry - // But give a chance to resolve the symbols at a later - // point if possible - return this.doProvideWithoutEditorSymbols(editor, model, picker, token); - } - doProvideWithoutEditorSymbols(editor, model, picker, token) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - // Generic pick for not having any symbol information - this.provideLabelPick(picker, Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('cannotRunGotoSymbolWithoutSymbolProvider', "The active text editor does not provide symbol information.")); - // Wait for changes to the registry and see if eventually - // we do get symbols. This can happen if the picker is opened - // very early after the model has loaded but before the - // language registry is ready. - // https://github.com/microsoft/vscode/issues/70607 - (() => __awaiter(this, void 0, void 0, function* () { - const result = yield this.waitForLanguageSymbolRegistry(model, disposables); - if (!result || token.isCancellationRequested) { - return; - } - disposables.add(this.doProvideWithEditorSymbols(editor, model, picker, token)); - }))(); - return disposables; - } - provideLabelPick(picker, label) { - picker.items = [{ label, index: 0, kind: 14 /* String */ }]; - picker.ariaLabel = label; - } - waitForLanguageSymbolRegistry(model, disposables) { - return __awaiter(this, void 0, void 0, function* () { - if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["DocumentSymbolProviderRegistry"].has(model)) { - return true; - } - let symbolProviderRegistryPromiseResolve; - const symbolProviderRegistryPromise = new Promise(resolve => symbolProviderRegistryPromiseResolve = resolve); - // Resolve promise when registry knows model - const symbolProviderListener = disposables.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["DocumentSymbolProviderRegistry"].onDidChange(() => { - if (_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["DocumentSymbolProviderRegistry"].has(model)) { - symbolProviderListener.dispose(); - symbolProviderRegistryPromiseResolve(true); - } - })); - // Resolve promise when we get disposed too - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["toDisposable"])(() => symbolProviderRegistryPromiseResolve(false))); - return symbolProviderRegistryPromise; - }); - } - doProvideWithEditorSymbols(editor, model, picker, token) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - // Goto symbol once picked - disposables.add(picker.onDidAccept(event => { - const [item] = picker.selectedItems; - if (item && item.range) { - this.gotoLocation(editor, { range: item.range.selection, keyMods: picker.keyMods, preserveFocus: event.inBackground }); - if (!event.inBackground) { - picker.hide(); - } - } - })); - // Goto symbol side by side if enabled - disposables.add(picker.onDidTriggerItemButton(({ item }) => { - if (item && item.range) { - this.gotoLocation(editor, { range: item.range.selection, keyMods: picker.keyMods, forceSideBySide: true }); - picker.hide(); - } - })); - // Resolve symbols from document once and reuse this - // request for all filtering and typing then on - const symbolsPromise = this.getDocumentSymbols(model, true, token); - // Set initial picks and update on type - let picksCts = undefined; - const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () { - // Cancel any previous ask for picks and busy - picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true); - picker.busy = false; - // Create new cancellation source for this run - picksCts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationTokenSource"](token); - // Collect symbol picks - picker.busy = true; - try { - const query = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["prepareQuery"])(picker.value.substr(AbstractGotoSymbolQuickAccessProvider.PREFIX.length).trim()); - const items = yield this.doGetSymbolPicks(symbolsPromise, query, undefined, picksCts.token); - if (token.isCancellationRequested) { - return; - } - if (items.length > 0) { - picker.items = items; - } - else { - if (query.original.length > 0) { - this.provideLabelPick(picker, Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('noMatchingSymbolResults', "No matching editor symbols")); - } - else { - this.provideLabelPick(picker, Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('noSymbolResults', "No editor symbols")); - } - } - } - finally { - if (!token.isCancellationRequested) { - picker.busy = false; - } - } - }); - disposables.add(picker.onDidChangeValue(() => updatePickerItems())); - updatePickerItems(); - // Reveal and decorate when active item changes - // However, ignore the very first event so that - // opening the picker is not immediately revealing - // and decorating the first entry. - let ignoreFirstActiveEvent = true; - disposables.add(picker.onDidChangeActive(() => { - const [item] = picker.activeItems; - if (item && item.range) { - if (ignoreFirstActiveEvent) { - ignoreFirstActiveEvent = false; - return; - } - // Reveal - editor.revealRangeInCenter(item.range.selection, 0 /* Smooth */); - // Decorate - this.addDecorations(editor, item.range.decoration); - } - })); - return disposables; - } - doGetSymbolPicks(symbolsPromise, query, options, token) { - return __awaiter(this, void 0, void 0, function* () { - const symbols = yield symbolsPromise; - if (token.isCancellationRequested) { - return []; - } - const filterBySymbolKind = query.original.indexOf(AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX) === 0; - const filterPos = filterBySymbolKind ? 1 : 0; - // Split between symbol and container query - let symbolQuery; - let containerQuery; - if (query.values && query.values.length > 1) { - symbolQuery = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["pieceToQuery"])(query.values[0]); // symbol: only match on first part - containerQuery = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["pieceToQuery"])(query.values.slice(1)); // container: match on all but first parts - } - else { - symbolQuery = query; - } - // Convert to symbol picks and apply filtering - const filteredSymbolPicks = []; - for (let index = 0; index < symbols.length; index++) { - const symbol = symbols[index]; - const symbolLabel = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__["trim"])(symbol.name); - const symbolLabelWithIcon = `$(symbol-${_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["SymbolKinds"].toString(symbol.kind) || 'property'}) ${symbolLabel}`; - const symbolLabelIconOffset = symbolLabelWithIcon.length - symbolLabel.length; - let containerLabel = symbol.containerName; - if (options === null || options === void 0 ? void 0 : options.extraContainerLabel) { - if (containerLabel) { - containerLabel = `${options.extraContainerLabel} • ${containerLabel}`; - } - else { - containerLabel = options.extraContainerLabel; - } - } - let symbolScore = undefined; - let symbolMatches = undefined; - let containerScore = undefined; - let containerMatches = undefined; - if (query.original.length > filterPos) { - // First: try to score on the entire query, it is possible that - // the symbol matches perfectly (e.g. searching for "change log" - // can be a match on a markdown symbol "change log"). In that - // case we want to skip the container query altogether. - let skipContainerQuery = false; - if (symbolQuery !== query) { - [symbolScore, symbolMatches] = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["scoreFuzzy2"])(symbolLabelWithIcon, Object.assign(Object.assign({}, query), { values: undefined /* disable multi-query support */ }), filterPos, symbolLabelIconOffset); - if (typeof symbolScore === 'number') { - skipContainerQuery = true; // since we consumed the query, skip any container matching - } - } - // Otherwise: score on the symbol query and match on the container later - if (typeof symbolScore !== 'number') { - [symbolScore, symbolMatches] = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["scoreFuzzy2"])(symbolLabelWithIcon, symbolQuery, filterPos, symbolLabelIconOffset); - if (typeof symbolScore !== 'number') { - continue; - } - } - // Score by container if specified - if (!skipContainerQuery && containerQuery) { - if (containerLabel && containerQuery.original.length > 0) { - [containerScore, containerMatches] = Object(_base_common_fuzzyScorer_js__WEBPACK_IMPORTED_MODULE_8__["scoreFuzzy2"])(containerLabel, containerQuery); - } - if (typeof containerScore !== 'number') { - continue; - } - if (typeof symbolScore === 'number') { - symbolScore += containerScore; // boost symbolScore by containerScore - } - } - } - const deprecated = symbol.tags && symbol.tags.indexOf(1 /* Deprecated */) >= 0; - filteredSymbolPicks.push({ - index, - kind: symbol.kind, - score: symbolScore, - label: symbolLabelWithIcon, - ariaLabel: symbolLabel, - description: containerLabel, - highlights: deprecated ? undefined : { - label: symbolMatches, - description: containerMatches - }, - range: { - selection: _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].collapseToStart(symbol.selectionRange), - decoration: symbol.range - }, - strikethrough: deprecated, - buttons: (() => { - var _a, _b; - const openSideBySideDirection = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.openSideBySideDirection) ? (_b = this.options) === null || _b === void 0 ? void 0 : _b.openSideBySideDirection() : undefined; - if (!openSideBySideDirection) { - return undefined; - } - return [ - { - iconClass: openSideBySideDirection === 'right' ? _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["Codicon"].splitHorizontal.classNames : _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_10__["Codicon"].splitVertical.classNames, - tooltip: openSideBySideDirection === 'right' ? Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('openToSide', "Open to the Side") : Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('openToBottom', "Open to the Bottom") - } - ]; - })() - }); - } - // Sort by score - const sortedFilteredSymbolPicks = filteredSymbolPicks.sort((symbolA, symbolB) => filterBySymbolKind ? - this.compareByKindAndScore(symbolA, symbolB) : - this.compareByScore(symbolA, symbolB)); - // Add separator for types - // - @ only total number of symbols - // - @: grouped by symbol kind - let symbolPicks = []; - if (filterBySymbolKind) { - let lastSymbolKind = undefined; - let lastSeparator = undefined; - let lastSymbolKindCounter = 0; - function updateLastSeparatorLabel() { - if (lastSeparator && typeof lastSymbolKind === 'number' && lastSymbolKindCounter > 0) { - lastSeparator.label = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_7__["format"])(NLS_SYMBOL_KIND_CACHE[lastSymbolKind] || FALLBACK_NLS_SYMBOL_KIND, lastSymbolKindCounter); - } - } - for (const symbolPick of sortedFilteredSymbolPicks) { - // Found new kind - if (lastSymbolKind !== symbolPick.kind) { - // Update last separator with number of symbols we found for kind - updateLastSeparatorLabel(); - lastSymbolKind = symbolPick.kind; - lastSymbolKindCounter = 1; - // Add new separator for new kind - lastSeparator = { type: 'separator' }; - symbolPicks.push(lastSeparator); - } - // Existing kind, keep counting - else { - lastSymbolKindCounter++; - } - // Add to final result - symbolPicks.push(symbolPick); - } - // Update last separator with number of symbols we found for kind - updateLastSeparatorLabel(); - } - else if (sortedFilteredSymbolPicks.length > 0) { - symbolPicks = [ - { label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('symbols', "symbols ({0})", filteredSymbolPicks.length), type: 'separator' }, - ...sortedFilteredSymbolPicks - ]; - } - return symbolPicks; - }); + + +// Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233 +const MAX_MESSAGE_LENGTH = 20000; +let ariaContainer; +let alertContainer; +let alertContainer2; +let statusContainer; +let statusContainer2; +function setARIAContainer(parent) { + ariaContainer = document.createElement('div'); + ariaContainer.className = 'monaco-aria-container'; + const createAlertContainer = () => { + const element = document.createElement('div'); + element.className = 'monaco-alert'; + element.setAttribute('role', 'alert'); + element.setAttribute('aria-atomic', 'true'); + ariaContainer.appendChild(element); + return element; + }; + alertContainer = createAlertContainer(); + alertContainer2 = createAlertContainer(); + const createStatusContainer = () => { + const element = document.createElement('div'); + element.className = 'monaco-status'; + element.setAttribute('role', 'complementary'); + element.setAttribute('aria-live', 'polite'); + element.setAttribute('aria-atomic', 'true'); + ariaContainer.appendChild(element); + return element; + }; + statusContainer = createStatusContainer(); + statusContainer2 = createStatusContainer(); + parent.appendChild(ariaContainer); +} +/** + * Given the provided message, will make sure that it is read as alert to screen readers. + */ +function alert(msg) { + if (!ariaContainer) { + return; } - compareByScore(symbolA, symbolB) { - if (typeof symbolA.score !== 'number' && typeof symbolB.score === 'number') { - return 1; - } - else if (typeof symbolA.score === 'number' && typeof symbolB.score !== 'number') { - return -1; - } - if (typeof symbolA.score === 'number' && typeof symbolB.score === 'number') { - if (symbolA.score > symbolB.score) { - return -1; - } - else if (symbolA.score < symbolB.score) { - return 1; - } - } - if (symbolA.index < symbolB.index) { - return -1; - } - else if (symbolA.index > symbolB.index) { - return 1; - } - return 0; + // Use alternate containers such that duplicated messages get read out by screen readers #99466 + if (alertContainer.textContent !== msg) { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](alertContainer2); + insertMessage(alertContainer, msg); } - compareByKindAndScore(symbolA, symbolB) { - const kindA = NLS_SYMBOL_KIND_CACHE[symbolA.kind] || FALLBACK_NLS_SYMBOL_KIND; - const kindB = NLS_SYMBOL_KIND_CACHE[symbolB.kind] || FALLBACK_NLS_SYMBOL_KIND; - // Sort by type first if scoped search - const result = kindA.localeCompare(kindB); - if (result === 0) { - return this.compareByScore(symbolA, symbolB); - } - return result; + else { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](alertContainer); + insertMessage(alertContainer2, msg); } - getDocumentSymbols(document, flatten, token) { - return __awaiter(this, void 0, void 0, function* () { - const model = yield _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_6__["OutlineModel"].create(document, token); - if (token.isCancellationRequested) { - return []; - } - const roots = []; - for (const child of model.children.values()) { - if (child instanceof _documentSymbols_outlineModel_js__WEBPACK_IMPORTED_MODULE_6__["OutlineElement"]) { - roots.push(child.symbol); - } - else { - roots.push(..._base_common_iterator_js__WEBPACK_IMPORTED_MODULE_9__["Iterable"].map(child.children.values(), child => child.symbol)); - } - } - let flatEntries = []; - if (flatten) { - this.flattenDocumentSymbols(flatEntries, roots, ''); - } - else { - flatEntries = roots; - } - return flatEntries.sort((symbolA, symbolB) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_3__["Range"].compareRangesUsingStarts(symbolA.range, symbolB.range)); - }); +} +/** + * Given the provided message, will make sure that it is read as status to screen readers. + */ +function status(msg) { + if (!ariaContainer) { + return; } - flattenDocumentSymbols(bucket, entries, overrideContainerLabel) { - for (const entry of entries) { - bucket.push({ - kind: entry.kind, - tags: entry.tags, - name: entry.name, - detail: entry.detail, - containerName: entry.containerName || overrideContainerLabel, - range: entry.range, - selectionRange: entry.selectionRange, - children: undefined, - }); - // Recurse over children - if (entry.children) { - this.flattenDocumentSymbols(bucket, entry.children, entry.name); - } + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["isMacintosh"]) { + alert(msg); // VoiceOver does not seem to support status role + } + else { + if (statusContainer.textContent !== msg) { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](statusContainer2); + insertMessage(statusContainer, msg); + } + else { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](statusContainer); + insertMessage(statusContainer2, msg); } } } -AbstractGotoSymbolQuickAccessProvider.PREFIX = '@'; -AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX = ':'; -AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${AbstractGotoSymbolQuickAccessProvider.PREFIX}${AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX}`; -// #region NLS Helpers -const FALLBACK_NLS_SYMBOL_KIND = Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('property', "properties ({0})"); -const NLS_SYMBOL_KIND_CACHE = { - [5 /* Method */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('method', "methods ({0})"), - [11 /* Function */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('function', "functions ({0})"), - [8 /* Constructor */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('_constructor', "constructors ({0})"), - [12 /* Variable */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('variable', "variables ({0})"), - [4 /* Class */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('class', "classes ({0})"), - [22 /* Struct */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('struct', "structs ({0})"), - [23 /* Event */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('event', "events ({0})"), - [24 /* Operator */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('operator', "operators ({0})"), - [10 /* Interface */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('interface', "interfaces ({0})"), - [2 /* Namespace */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('namespace', "namespaces ({0})"), - [3 /* Package */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('package', "packages ({0})"), - [25 /* TypeParameter */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('typeParameter', "type parameters ({0})"), - [1 /* Module */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('modules', "modules ({0})"), - [6 /* Property */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('property', "properties ({0})"), - [9 /* Enum */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('enum', "enumerations ({0})"), - [21 /* EnumMember */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('enumMember', "enumeration members ({0})"), - [14 /* String */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('string', "strings ({0})"), - [0 /* File */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('file', "files ({0})"), - [17 /* Array */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('array', "arrays ({0})"), - [15 /* Number */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('number', "numbers ({0})"), - [16 /* Boolean */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('boolean', "booleans ({0})"), - [18 /* Object */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('object', "objects ({0})"), - [19 /* Key */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('key', "keys ({0})"), - [7 /* Field */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('field', "fields ({0})"), - [13 /* Constant */]: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('constant', "constants ({0})") -}; -//#endregion - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css ***! - \****************************************************************************************/ +function insertMessage(target, msg) { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["clearNode"](target); + if (msg.length > MAX_MESSAGE_LENGTH) { + msg = msg.substr(0, MAX_MESSAGE_LENGTH); + } + target.textContent = msg; + // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/ + target.style.visibility = 'hidden'; + target.style.visibility = 'visible'; +} + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css": +/*!*****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css ***! + \*****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -215007,7 +72226,7 @@ const NLS_SYMBOL_KIND_CACHE = { __webpack_require__.r(__webpack_exports__); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_onTypeRename_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./onTypeRename.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css"); +/* harmony import */ var _css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./button.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"); @@ -215016,80 +72235,37 @@ var options = {}; options.insert = "head"; options.singleton = false; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_onTypeRename_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_onTypeRename_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_button_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/onTypeRename.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/onTypeRename.js ***! - \*********************************************************************************/ -/*! exports provided: CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE, OnTypeRenameContribution, OnTypeRenameAction, getOnTypeRenameRanges, editorOnTypeRenameBackground */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE", function() { return CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnTypeRenameContribution", function() { return OnTypeRenameContribution; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OnTypeRenameAction", function() { return OnTypeRenameAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOnTypeRenameRanges", function() { return getOnTypeRenameRanges; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorOnTypeRenameBackground", function() { return editorOnTypeRenameBackground; }); -/* harmony import */ var _media_onTypeRename_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/onTypeRename.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/media/onTypeRename.css"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js": +/*!****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js ***! + \****************************************************************************/ +/*! exports provided: Button */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); +/* harmony import */ var _button_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _codicons_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../codicons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/codicons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - @@ -215099,732 +72275,318 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume - - - -const CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["RawContextKey"]('onTypeRenameInputVisible', false); -let OnTypeRenameContribution = class OnTypeRenameContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(editor, contextKeyService) { +const defaultOptions = { + buttonBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#0E639C'), + buttonHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#006BB3'), + buttonForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].white +}; +class Button extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["Disposable"] { + constructor(container, options) { super(); - this._debounceDuration = 200; - this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"]()); - this._editor = editor; - this._enabled = false; - this._visibleContextKey = CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(contextKeyService); - this._currentDecorations = []; - this._languageWordPattern = null; - this._currentWordPattern = null; - this._ignoreChangeEvent = false; - this._localToDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"]()); - this._rangeUpdateTriggerPromise = null; - this._rangeSyncTriggerPromise = null; - this._currentRequest = null; - this._currentRequestPosition = null; - this._currentRequestModelVersion = null; - this._register(this._editor.onDidChangeModel(() => this.reinitialize())); - this._register(this._editor.onDidChangeConfiguration(e => { - if (e.hasChanged(73 /* renameOnType */)) { - this.reinitialize(); - } - })); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_8__["OnTypeRenameProviderRegistry"].onDidChange(() => this.reinitialize())); - this._register(this._editor.onDidChangeModelLanguage(() => this.reinitialize())); - this.reinitialize(); - } - static get(editor) { - return editor.getContribution(OnTypeRenameContribution.ID); - } - reinitialize() { - const model = this._editor.getModel(); - const isEnabled = model !== null && this._editor.getOption(73 /* renameOnType */) && _common_modes_js__WEBPACK_IMPORTED_MODULE_8__["OnTypeRenameProviderRegistry"].has(model); - if (isEnabled === this._enabled) { - return; - } - this._enabled = isEnabled; - this.clearRanges(); - this._localToDispose.clear(); - if (!isEnabled || model === null) { - return; - } - this._languageWordPattern = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_20__["LanguageConfigurationRegistry"].getWordDefinition(model.getLanguageIdentifier().id); - this._localToDispose.add(model.onDidChangeLanguageConfiguration(() => { - this._languageWordPattern = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_20__["LanguageConfigurationRegistry"].getWordDefinition(model.getLanguageIdentifier().id); - })); - const rangeUpdateScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_9__["Delayer"](this._debounceDuration); - const triggerRangeUpdate = () => { - this._rangeUpdateTriggerPromise = rangeUpdateScheduler.trigger(() => this.updateRanges(), this._debounceDuration); - }; - const rangeSyncScheduler = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_9__["Delayer"](0); - const triggerRangeSync = (decorations) => { - this._rangeSyncTriggerPromise = rangeSyncScheduler.trigger(() => this._syncRanges(decorations)); - }; - this._localToDispose.add(this._editor.onDidChangeCursorPosition(() => { - triggerRangeUpdate(); - })); - this._localToDispose.add(this._editor.onDidChangeModelContent((e) => { - if (!this._ignoreChangeEvent) { - if (this._currentDecorations.length > 0) { - const referenceRange = model.getDecorationRange(this._currentDecorations[0]); - if (referenceRange && e.changes.every(c => referenceRange.intersectRanges(c.range))) { - triggerRangeSync(this._currentDecorations); - return; - } + this._onDidClick = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.options = options || Object.create(null); + Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_4__["mixin"])(this.options, defaultOptions, false); + this.buttonForeground = this.options.buttonForeground; + this.buttonBackground = this.options.buttonBackground; + this.buttonHoverBackground = this.options.buttonHoverBackground; + this.buttonSecondaryForeground = this.options.buttonSecondaryForeground; + this.buttonSecondaryBackground = this.options.buttonSecondaryBackground; + this.buttonSecondaryHoverBackground = this.options.buttonSecondaryHoverBackground; + this.buttonBorder = this.options.buttonBorder; + this._element = document.createElement('a'); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'monaco-button'); + this._element.tabIndex = 0; + this._element.setAttribute('role', 'button'); + container.appendChild(this._element); + this._register(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(this._element)); + [_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, _touch_js__WEBPACK_IMPORTED_MODULE_7__["EventType"].Tap].forEach(eventType => { + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, eventType, e => { + if (!this.enabled) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventHelper"].stop(e); + return; } - } - triggerRangeUpdate(); - })); - this._localToDispose.add({ - dispose: () => { - rangeUpdateScheduler.cancel(); - rangeSyncScheduler.cancel(); - } + this._onDidClick.fire(e); + })); }); - this.updateRanges(); - } - _syncRanges(decorations) { - // dalayed invocation, make sure we're still on - if (!this._editor.hasModel() || decorations !== this._currentDecorations || decorations.length === 0) { - // nothing to do - return; - } - const model = this._editor.getModel(); - const referenceRange = model.getDecorationRange(decorations[0]); - if (!referenceRange || referenceRange.startLineNumber !== referenceRange.endLineNumber) { - return this.clearRanges(); - } - const referenceValue = model.getValueInRange(referenceRange); - if (this._currentWordPattern) { - const match = referenceValue.match(this._currentWordPattern); - const matchLength = match ? match[0].length : 0; - if (matchLength !== referenceValue.length) { - return this.clearRanges(); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].KEY_DOWN, e => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardKeyboardEvent"](e); + let eventHandled = false; + if (this.enabled && (event.equals(3 /* Enter */) || event.equals(10 /* Space */))) { + this._onDidClick.fire(e); + eventHandled = true; } - } - let edits = []; - for (let i = 1, len = decorations.length; i < len; i++) { - const mirrorRange = model.getDecorationRange(decorations[i]); - if (!mirrorRange) { - continue; + else if (event.equals(9 /* Escape */)) { + this._element.blur(); + eventHandled = true; } - if (mirrorRange.startLineNumber !== mirrorRange.endLineNumber) { - edits.push({ - range: mirrorRange, - text: referenceValue - }); + if (eventHandled) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventHelper"].stop(event, true); } - else { - let oldValue = model.getValueInRange(mirrorRange); - let newValue = referenceValue; - let rangeStartColumn = mirrorRange.startColumn; - let rangeEndColumn = mirrorRange.endColumn; - const commonPrefixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__["commonPrefixLength"](oldValue, newValue); - rangeStartColumn += commonPrefixLength; - oldValue = oldValue.substr(commonPrefixLength); - newValue = newValue.substr(commonPrefixLength); - const commonSuffixLength = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_16__["commonSuffixLength"](oldValue, newValue); - rangeEndColumn -= commonSuffixLength; - oldValue = oldValue.substr(0, oldValue.length - commonSuffixLength); - newValue = newValue.substr(0, newValue.length - commonSuffixLength); - if (rangeStartColumn !== rangeEndColumn || newValue.length !== 0) { - edits.push({ - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](mirrorRange.startLineNumber, rangeStartColumn, mirrorRange.endLineNumber, rangeEndColumn), - text: newValue - }); - } + })); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_OVER, e => { + if (!_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'disabled')) { + this.setHoverBackground(); } + })); + this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_OUT, e => { + this.applyStyles(); // restore standard styles + })); + // Also set hover background when button is focused for feedback + this.focusTracker = this._register(_dom_js__WEBPACK_IMPORTED_MODULE_1__["trackFocus"](this._element)); + this._register(this.focusTracker.onDidFocus(() => this.setHoverBackground())); + this._register(this.focusTracker.onDidBlur(() => this.applyStyles())); // restore standard styles + this.applyStyles(); + } + get onDidClick() { return this._onDidClick.event; } + setHoverBackground() { + let hoverBackground; + if (this.options.secondary) { + hoverBackground = this.buttonSecondaryHoverBackground ? this.buttonSecondaryHoverBackground.toString() : null; } - if (edits.length === 0) { - return; - } - try { - this._ignoreChangeEvent = true; - const prevEditOperationType = this._editor._getViewModel().getPrevEditOperationType(); - this._editor.executeEdits('onTypeRename', edits); - this._editor._getViewModel().setPrevEditOperationType(prevEditOperationType); + else { + hoverBackground = this.buttonHoverBackground ? this.buttonHoverBackground.toString() : null; } - finally { - this._ignoreChangeEvent = false; + if (hoverBackground) { + this._element.style.backgroundColor = hoverBackground; } } - dispose() { - this.clearRanges(); - super.dispose(); - } - clearRanges() { - this._visibleContextKey.set(false); - this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, []); - if (this._currentRequest) { - this._currentRequest.cancel(); - this._currentRequest = null; - this._currentRequestPosition = null; - } + style(styles) { + this.buttonForeground = styles.buttonForeground; + this.buttonBackground = styles.buttonBackground; + this.buttonHoverBackground = styles.buttonHoverBackground; + this.buttonSecondaryForeground = styles.buttonSecondaryForeground; + this.buttonSecondaryBackground = styles.buttonSecondaryBackground; + this.buttonSecondaryHoverBackground = styles.buttonSecondaryHoverBackground; + this.buttonBorder = styles.buttonBorder; + this.applyStyles(); } - updateRanges(force = false) { - return __awaiter(this, void 0, void 0, function* () { - if (!this._editor.hasModel()) { - this.clearRanges(); - return; - } - const position = this._editor.getPosition(); - if (!this._enabled && !force || this._editor.getSelections().length > 1) { - // disabled or multicursor - this.clearRanges(); - return; + applyStyles() { + if (this._element) { + let background, foreground; + if (this.options.secondary) { + foreground = this.buttonSecondaryForeground ? this.buttonSecondaryForeground.toString() : ''; + background = this.buttonSecondaryBackground ? this.buttonSecondaryBackground.toString() : ''; } - const model = this._editor.getModel(); - const modelVersionId = model.getVersionId(); - if (this._currentRequestPosition && this._currentRequestModelVersion === modelVersionId) { - if (position.equals(this._currentRequestPosition)) { - return; // same position - } - if (this._currentDecorations && this._currentDecorations.length > 0) { - const range = model.getDecorationRange(this._currentDecorations[0]); - if (range && range.containsPosition(position)) { - return; // just moving inside the existing primary range - } - } + else { + foreground = this.buttonForeground ? this.buttonForeground.toString() : ''; + background = this.buttonBackground ? this.buttonBackground.toString() : ''; } - this._currentRequestPosition = position; - this._currentRequestModelVersion = modelVersionId; - const request = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_9__["createCancelablePromise"])((token) => __awaiter(this, void 0, void 0, function* () { - try { - const response = yield getOnTypeRenameRanges(model, position, token); - if (request !== this._currentRequest) { - return; - } - this._currentRequest = null; - if (modelVersionId !== model.getVersionId()) { - return; - } - let ranges = []; - if (response === null || response === void 0 ? void 0 : response.ranges) { - ranges = response.ranges; - } - this._currentWordPattern = (response === null || response === void 0 ? void 0 : response.wordPattern) || this._languageWordPattern; - let foundReferenceRange = false; - for (let i = 0, len = ranges.length; i < len; i++) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].containsPosition(ranges[i], position)) { - foundReferenceRange = true; - if (i !== 0) { - const referenceRange = ranges[i]; - ranges.splice(i, 1); - ranges.unshift(referenceRange); - } - break; - } - } - if (!foundReferenceRange) { - // Cannot do on type rename if the ranges are not where the cursor is... - this.clearRanges(); - return; - } - const decorations = ranges.map(range => ({ range: range, options: OnTypeRenameContribution.DECORATION })); - this._visibleContextKey.set(true); - this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, decorations); - } - catch (err) { - if (!Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_15__["isPromiseCanceledError"])(err)) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_15__["onUnexpectedError"])(err); - } - if (this._currentRequest === request || !this._currentRequest) { - // stop if we are still the latest request - this.clearRanges(); - } - } - })); - this._currentRequest = request; - return request; - }); + const border = this.buttonBorder ? this.buttonBorder.toString() : ''; + this._element.style.color = foreground; + this._element.style.backgroundColor = background; + this._element.style.borderWidth = border ? '1px' : ''; + this._element.style.borderStyle = border ? 'solid' : ''; + this._element.style.borderColor = border; + } } -}; -OnTypeRenameContribution.ID = 'editor.contrib.onTypeRename'; -OnTypeRenameContribution.DECORATION = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */, - className: 'on-type-rename-decoration' -}); -OnTypeRenameContribution = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["IContextKeyService"]) -], OnTypeRenameContribution); - -class OnTypeRenameAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.onTypeRename', - label: _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('onTypeRename.label', "On Type Rename Symbol"), - alias: 'On Type Rename Symbol', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_11__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__["EditorContextKeys"].hasRenameProvider), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__["EditorContextKeys"].editorTextFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 60 /* F2 */, - weight: 100 /* EditorContrib */ - } - }); + get element() { + return this._element; } - runCommand(accessor, args) { - const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_14__["ICodeEditorService"]); - const [uri, pos] = Array.isArray(args) && args || [undefined, undefined]; - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_13__["URI"].isUri(uri) && _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"].isIPosition(pos)) { - return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => { - if (!editor) { - return; - } - editor.setPosition(pos); - editor.invokeWithinContext(accessor => { - this.reportTelemetry(accessor, editor); - return this.run(accessor, editor); - }); - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_15__["onUnexpectedError"]); + set label(value) { + if (!_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'monaco-text-button')) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'monaco-text-button'); + } + if (this.options.supportCodicons) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["reset"](this._element, ...Object(_codicons_js__WEBPACK_IMPORTED_MODULE_8__["renderCodiconsAsElement"])(value)); + } + else { + this._element.textContent = value; + } + if (typeof this.options.title === 'string') { + this._element.title = this.options.title; + } + else if (this.options.title) { + this._element.title = value; } - return super.runCommand(accessor, args); } - run(_accessor, editor) { - const controller = OnTypeRenameContribution.get(editor); - if (controller) { - return Promise.resolve(controller.updateRanges(true)); + set enabled(value) { + if (value) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this._element, 'disabled'); + this._element.setAttribute('aria-disabled', String(false)); + this._element.tabIndex = 0; + } + else { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this._element, 'disabled'); + this._element.setAttribute('aria-disabled', String(true)); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeTabIndexAndUpdateFocus"](this._element); } - return Promise.resolve(); } -} -const OnTypeRenameCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorCommand"].bindToContribution(OnTypeRenameContribution.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorCommand"])(new OnTypeRenameCommand({ - id: 'cancelOnTypeRenameInput', - precondition: CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE, - handler: x => x.clearRanges(), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__["EditorContextKeys"].editorTextFocus, - weight: 100 /* EditorContrib */ + 99, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] + get enabled() { + return !_dom_js__WEBPACK_IMPORTED_MODULE_1__["hasClass"](this._element, 'disabled'); } -})); -function getOnTypeRenameRanges(model, position, token) { - const orderedByScore = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__["OnTypeRenameProviderRegistry"].ordered(model); - // in order of score ask the occurrences provider - // until someone response with a good result - // (good = none empty array) - return Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_9__["first"])(orderedByScore.map(provider => () => { - return Promise.resolve(provider.provideOnTypeRenameRanges(model, position, token)).then((res) => { - if (!res) { - return undefined; - } - return { - ranges: res.ranges, - wordPattern: res.wordPattern || provider.wordPattern - }; - }, (err) => { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_15__["onUnexpectedExternalError"])(err); - return undefined; - }); - }), result => !!result && _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["isNonEmptyArray"](result === null || result === void 0 ? void 0 : result.ranges)); } -const editorOnTypeRenameBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__["registerColor"])('editor.onTypeRenameBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_19__["Color"].fromHex('#f00').transparent(0.3), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_19__["Color"].fromHex('#f00').transparent(0.3), hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_19__["Color"].fromHex('#f00').transparent(0.3) }, _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('editorOnTypeRenameBackground', 'Background color when the editor auto renames on type.')); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["registerThemingParticipant"])((theme, collector) => { - const editorOnTypeRenameBackgroundColor = theme.getColor(editorOnTypeRenameBackground); - if (editorOnTypeRenameBackgroundColor) { - collector.addRule(`.monaco-editor .on-type-rename-decoration { background: ${editorOnTypeRenameBackgroundColor}; border-left-color: ${editorOnTypeRenameBackgroundColor}; }`); - } -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelAndPositionCommand"])('_executeRenameOnTypeProvider', (model, position) => getOnTypeRenameRanges(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_6__["CancellationToken"].None)); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorContribution"])(OnTypeRenameContribution.ID, OnTypeRenameContribution); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(OnTypeRenameAction); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js ***! - \***************************************************************************/ -/*! exports provided: rename, RenameAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rename", function() { return rename; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameAction", function() { return RenameAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./renameInputField.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../message/messageController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); -/* harmony import */ var _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../common/services/textResourceConfigurationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css": +/*!*********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css ***! + \*********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./checkbox.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_checkbox_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js": +/*!********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js ***! + \********************************************************************************/ +/*! exports provided: Checkbox */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return Checkbox; }); +/* harmony import */ var _checkbox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkbox.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ -class RenameSkeleton { - constructor(model, position) { - this.model = model; - this.position = position; - this._providerRenameIdx = 0; - this._providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_7__["RenameProviderRegistry"].ordered(model); - } - hasProvider() { - return this._providers.length > 0; - } - resolveRenameLocation(token) { - return __awaiter(this, void 0, void 0, function* () { - const rejects = []; - for (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) { - const provider = this._providers[this._providerRenameIdx]; - if (!provider.resolveRenameLocation) { - break; - } - let res = yield provider.resolveRenameLocation(this.model, this.position, token); - if (!res) { - continue; - } - if (res.rejectReason) { - rejects.push(res.rejectReason); - continue; - } - return res; - } - const word = this.model.getWordAtPosition(this.position); - if (!word) { - return { - range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"].fromPositions(this.position), - text: '', - rejectReason: rejects.length > 0 ? rejects.join('\n') : undefined - }; - } - return { - range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"](this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn), - text: word.word, - rejectReason: rejects.length > 0 ? rejects.join('\n') : undefined - }; - }); - } - provideRenameEdits(newName, token) { - return __awaiter(this, void 0, void 0, function* () { - return this._provideRenameEdits(newName, this._providerRenameIdx, [], token); - }); - } - _provideRenameEdits(newName, i, rejects, token) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this._providers[i]; - if (!provider) { - return { - edits: [], - rejectReason: rejects.join('\n') - }; - } - const result = yield provider.provideRenameEdits(this.model, this.position, newName, token); - if (!result) { - return this._provideRenameEdits(newName, i + 1, rejects.concat(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('no result', "No result.")), token); - } - else if (result.rejectReason) { - return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token); - } - return result; - }); - } -} -function rename(model, position, newName) { - return __awaiter(this, void 0, void 0, function* () { - const skeleton = new RenameSkeleton(model, position); - const loc = yield skeleton.resolveRenameLocation(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__["CancellationToken"].None); - if (loc === null || loc === void 0 ? void 0 : loc.rejectReason) { - return { edits: [], rejectReason: loc.rejectReason }; +const defaultOpts = { + inputActiveOptionBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#007ACC00'), + inputActiveOptionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#FFFFFF'), + inputActiveOptionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#0E639C50') +}; +class Checkbox extends _widget_js__WEBPACK_IMPORTED_MODULE_2__["Widget"] { + constructor(opts) { + super(); + this._onChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); + this.onChange = this._onChange.event; + this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"]()); + this.onKeyDown = this._onKeyDown.event; + this._opts = Object.assign(Object.assign({}, defaultOpts), opts); + this._checked = this._opts.isChecked; + const classes = ['monaco-custom-checkbox']; + if (this._opts.icon) { + classes.push(this._opts.icon.classNames); } - return skeleton.provideRenameEdits(newName, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__["CancellationToken"].None); - }); -} -// --- register actions and commands -let RenameController = class RenameController { - constructor(editor, _instaService, _notificationService, _bulkEditService, _progressService, _logService, _configService) { - this.editor = editor; - this._instaService = _instaService; - this._notificationService = _notificationService; - this._bulkEditService = _bulkEditService; - this._progressService = _progressService; - this._logService = _logService; - this._configService = _configService; - this._dispoableStore = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_18__["DisposableStore"](); - this._cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_17__["CancellationTokenSource"](); - this._renameInputField = this._dispoableStore.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_19__["IdleValue"](() => this._dispoableStore.add(this._instaService.createInstance(_renameInputField_js__WEBPACK_IMPORTED_MODULE_6__["RenameInputField"], this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview'])))); - } - static get(editor) { - return editor.getContribution(RenameController.ID); - } - dispose() { - this._dispoableStore.dispose(); - this._cts.dispose(true); - } - run() { - return __awaiter(this, void 0, void 0, function* () { - this._cts.dispose(true); - if (!this.editor.hasModel()) { - return undefined; - } - const position = this.editor.getPosition(); - const skeleton = new RenameSkeleton(this.editor.getModel(), position); - if (!skeleton.hasProvider()) { - return undefined; - } - this._cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__["EditorStateCancellationTokenSource"](this.editor, 4 /* Position */ | 1 /* Value */); - // resolve rename location - let loc; - try { - const resolveLocationOperation = skeleton.resolveRenameLocation(this._cts.token); - this._progressService.showWhile(resolveLocationOperation, 250); - loc = yield resolveLocationOperation; - } - catch (e) { - _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__["MessageController"].get(this.editor).showMessage(e || _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('resolveRenameLocationFailed', "An unknown error occurred while resolving rename location"), position); - return undefined; - } - if (!loc) { - return undefined; - } - if (loc.rejectReason) { - _message_messageController_js__WEBPACK_IMPORTED_MODULE_11__["MessageController"].get(this.editor).showMessage(loc.rejectReason, position); - return undefined; - } - if (this._cts.token.isCancellationRequested) { - return undefined; - } - this._cts.dispose(); - this._cts = new _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_12__["EditorStateCancellationTokenSource"](this.editor, 4 /* Position */ | 1 /* Value */, loc.range); - // do rename at location - let selection = this.editor.getSelection(); - let selectionStart = 0; - let selectionEnd = loc.text.length; - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"].isEmpty(selection) && !_common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"].spansMultipleLines(selection) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_10__["Range"].containsRange(loc.range, selection)) { - selectionStart = Math.max(0, selection.startColumn - loc.range.startColumn); - selectionEnd = Math.min(loc.range.endColumn, selection.endColumn) - loc.range.startColumn; - } - const supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, 'editor.rename.enablePreview'); - const inputFieldResult = yield this._renameInputField.value.getInput(loc.range, loc.text, selectionStart, selectionEnd, supportPreview, this._cts.token); - // no result, only hint to focus the editor or not - if (typeof inputFieldResult === 'boolean') { - if (inputFieldResult) { - this.editor.focus(); - } - return undefined; + else { + classes.push('codicon'); // todo@aeschli: remove once codicon fully adopted + } + if (this._opts.actionClassName) { + classes.push(this._opts.actionClassName); + } + classes.push(this._checked ? 'checked' : 'unchecked'); + this.domNode = document.createElement('div'); + this.domNode.title = this._opts.title; + this.domNode.className = classes.join(' '); + this.domNode.tabIndex = 0; + this.domNode.setAttribute('role', 'checkbox'); + this.domNode.setAttribute('aria-checked', String(this._checked)); + this.domNode.setAttribute('aria-label', this._opts.title); + this.applyStyles(); + this.onclick(this.domNode, (ev) => { + this.checked = !this._checked; + this._onChange.fire(false); + ev.preventDefault(); + }); + this.ignoreGesture(this.domNode); + this.onkeydown(this.domNode, (keyboardEvent) => { + if (keyboardEvent.keyCode === 10 /* Space */ || keyboardEvent.keyCode === 3 /* Enter */) { + this.checked = !this._checked; + this._onChange.fire(true); + keyboardEvent.preventDefault(); + return; } - this.editor.focus(); - const renameOperation = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_19__["raceCancellation"])(skeleton.provideRenameEdits(inputFieldResult.newName, this._cts.token), this._cts.token).then((renameResult) => __awaiter(this, void 0, void 0, function* () { - if (!renameResult || !this.editor.hasModel()) { - return; - } - if (renameResult.rejectReason) { - this._notificationService.info(renameResult.rejectReason); - return; - } - this._bulkEditService.apply(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__["ResourceEdit"].convert(renameResult), { - editor: this.editor, - showPreview: inputFieldResult.wantsPreview, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('label', "Renaming '{0}'", loc === null || loc === void 0 ? void 0 : loc.text), - quotableLabel: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('quotableLabel', "Renaming {0}", loc === null || loc === void 0 ? void 0 : loc.text), - }).then(result => { - if (result.ariaSummary) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_9__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('aria', "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary)); - } - }).catch(err => { - this._notificationService.error(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rename.failedApply', "Rename failed to apply edits")); - this._logService.error(err); - }); - }), err => { - this._notificationService.error(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rename.failed', "Rename failed to compute edits")); - this._logService.error(err); - }); - this._progressService.showWhile(renameOperation, 250); - return renameOperation; + this._onKeyDown.fire(keyboardEvent); }); } - acceptRenameInput(wantsPreview) { - this._renameInputField.value.acceptInput(wantsPreview); - } - cancelRenameInput() { - this._renameInputField.value.cancelInput(true); + get enabled() { + return this.domNode.getAttribute('aria-disabled') !== 'true'; } -}; -RenameController.ID = 'editor.contrib.renameController'; -RenameController = __decorate([ - __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_21__["IInstantiationService"]), - __param(2, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__["INotificationService"]), - __param(3, _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_14__["IBulkEditService"]), - __param(4, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_3__["IEditorProgressService"]), - __param(5, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_20__["ILogService"]), - __param(6, _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_24__["ITextResourceConfigurationService"]) -], RenameController); -// ---- action implementation -class RenameAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.rename', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('rename.label', "Rename Symbol"), - alias: 'Rename Symbol', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].hasRenameProvider), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].editorTextFocus, - primary: 60 /* F2 */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: '1_modification', - order: 1.1 - } - }); + focus() { + this.domNode.focus(); } - runCommand(accessor, args) { - const editorService = accessor.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_16__["ICodeEditorService"]); - const [uri, pos] = Array.isArray(args) && args || [undefined, undefined]; - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_15__["URI"].isUri(uri) && _common_core_position_js__WEBPACK_IMPORTED_MODULE_8__["Position"].isIPosition(pos)) { - return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => { - if (!editor) { - return; - } - editor.setPosition(pos); - editor.invokeWithinContext(accessor => { - this.reportTelemetry(accessor, editor); - return this.run(accessor, editor); - }); - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"]); - } - return super.runCommand(accessor, args); + get checked() { + return this._checked; } - run(accessor, editor) { - const controller = RenameController.get(editor); - if (controller) { - return controller.run(); + set checked(newIsChecked) { + this._checked = newIsChecked; + this.domNode.setAttribute('aria-checked', String(this._checked)); + if (this._checked) { + this.domNode.classList.add('checked'); } - return Promise.resolve(); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(RenameController.ID, RenameController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(RenameAction); -const RenameCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorCommand"].bindToContribution(RenameController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new RenameCommand({ - id: 'acceptRenameInput', - precondition: _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_RENAME_INPUT_VISIBLE"], - handler: x => x.acceptRenameInput(false), - kbOpts: { - weight: 100 /* EditorContrib */ + 99, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 3 /* Enter */ + else { + this.domNode.classList.remove('checked'); + } + this.applyStyles(); } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new RenameCommand({ - id: 'acceptRenameInputWithPreview', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["ContextKeyExpr"].and(_renameInputField_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_RENAME_INPUT_VISIBLE"], _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["ContextKeyExpr"].has('config.editor.rename.enablePreview')), - handler: x => x.acceptRenameInput(true), - kbOpts: { - weight: 100 /* EditorContrib */ + 99, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 1024 /* Shift */ + 3 /* Enter */ + width() { + return 2 /*marginleft*/ + 2 /*border*/ + 2 /*padding*/ + 16 /* icon width */; } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorCommand"])(new RenameCommand({ - id: 'cancelRenameInput', - precondition: _renameInputField_js__WEBPACK_IMPORTED_MODULE_6__["CONTEXT_RENAME_INPUT_VISIBLE"], - handler: x => x.cancelRenameInput(), - kbOpts: { - weight: 100 /* EditorContrib */ + 99, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_5__["EditorContextKeys"].focus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] + style(styles) { + if (styles.inputActiveOptionBorder) { + this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder; + } + if (styles.inputActiveOptionForeground) { + this._opts.inputActiveOptionForeground = styles.inputActiveOptionForeground; + } + if (styles.inputActiveOptionBackground) { + this._opts.inputActiveOptionBackground = styles.inputActiveOptionBackground; + } + this.applyStyles(); } -})); -// ---- api bridge command -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerModelAndPositionCommand"])('_executeDocumentRenameProvider', function (model, position, ...args) { - const [newName] = args; - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_25__["assertType"])(typeof newName === 'string'); - return rename(model, position, newName); -}); -//todo@joh use editor options world -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_22__["Registry"].as(_platform_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_23__["Extensions"].Configuration).registerConfiguration({ - id: 'editor', - properties: { - 'editor.rename.enablePreview': { - scope: 5 /* LANGUAGE_OVERRIDABLE */, - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('enablePreview', "Enable/disable the ability to preview changes before renaming"), - default: true, - type: 'boolean' + applyStyles() { + if (this.domNode) { + this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent'; + this.domNode.style.color = this._checked && this._opts.inputActiveOptionForeground ? this._opts.inputActiveOptionForeground.toString() : 'inherit'; + this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : 'transparent'; } } -}); + enable() { + this.domNode.tabIndex = 0; + this.domNode.setAttribute('aria-disabled', String(false)); + } + disable() { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeTabIndexAndUpdateFocus"](this.domNode); + this.domNode.setAttribute('aria-disabled', String(true)); + } +} /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css ***! - \**************************************************************************************/ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css": +/*!***************************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css ***! + \***************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./renameInputField.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css"); +/* harmony import */ var _css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon-animations.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css"); @@ -215833,1908 +72595,564 @@ var options = {}; options.insert = "head"; options.singleton = false; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_renameInputField_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_animations_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.js ***! - \*************************************************************************************/ -/*! exports provided: CONTEXT_RENAME_INPUT_VISIBLE, RenameInputField */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css": +/*!******************************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css ***! + \******************************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_RENAME_INPUT_VISIBLE", function() { return CONTEXT_RENAME_INPUT_VISIBLE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameInputField", function() { return RenameInputField; }); -/* harmony import */ var _renameInputField_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./renameInputField.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon-modifications.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const CONTEXT_RENAME_INPUT_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('renameInputVisible', false); -let RenameInputField = class RenameInputField { - constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService) { - this._editor = _editor; - this._acceptKeybindings = _acceptKeybindings; - this._themeService = _themeService; - this._keybindingService = _keybindingService; - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this.allowEditorOverflow = true; - this._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService); - this._editor.addContentWidget(this); - this._disposables.add(this._editor.onDidChangeConfiguration(e => { - if (e.hasChanged(36 /* fontInfo */)) { - this._updateFont(); - } - })); - this._disposables.add(_themeService.onDidColorThemeChange(this._updateStyles, this)); - } - dispose() { - this._disposables.dispose(); - this._editor.removeContentWidget(this); - } - getId() { - return '__renameInputWidget'; - } - getDomNode() { - if (!this._domNode) { - this._domNode = document.createElement('div'); - this._domNode.className = 'monaco-editor rename-box'; - this._input = document.createElement('input'); - this._input.className = 'rename-input'; - this._input.type = 'text'; - this._input.setAttribute('aria-label', Object(_nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"])('renameAriaLabel', "Rename input. Type new name and press Enter to commit.")); - this._domNode.appendChild(this._input); - this._label = document.createElement('div'); - this._label.className = 'rename-label'; - this._domNode.appendChild(this._label); - const updateLabel = () => { - var _a, _b; - const [accept, preview] = this._acceptKeybindings; - this._keybindingService.lookupKeybinding(accept); - this._label.innerText = Object(_nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"])({ key: 'label', comment: ['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"'] }, "{0} to Rename, {1} to Preview", (_a = this._keybindingService.lookupKeybinding(accept)) === null || _a === void 0 ? void 0 : _a.getLabel(), (_b = this._keybindingService.lookupKeybinding(preview)) === null || _b === void 0 ? void 0 : _b.getLabel()); - }; - updateLabel(); - this._disposables.add(this._keybindingService.onDidUpdateKeybindings(updateLabel)); - this._updateFont(); - this._updateStyles(this._themeService.getColorTheme()); - } - return this._domNode; - } - _updateStyles(theme) { - var _a, _b, _c, _d; - if (!this._input || !this._domNode) { - return; - } - const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["widgetShadow"]); - this._domNode.style.backgroundColor = String((_a = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["editorWidgetBackground"])) !== null && _a !== void 0 ? _a : ''); - this._domNode.style.boxShadow = widgetShadowColor ? ` 0 2px 8px ${widgetShadowColor}` : ''; - this._domNode.style.color = String((_b = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputForeground"])) !== null && _b !== void 0 ? _b : ''); - this._input.style.backgroundColor = String((_c = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputBackground"])) !== null && _c !== void 0 ? _c : ''); - // this._input.style.color = String(theme.getColor(inputForeground) ?? ''); - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_5__["inputBorder"]); - this._input.style.borderWidth = border ? '1px' : '0px'; - this._input.style.borderStyle = border ? 'solid' : 'none'; - this._input.style.borderColor = (_d = border === null || border === void 0 ? void 0 : border.toString()) !== null && _d !== void 0 ? _d : 'none'; - } - _updateFont() { - if (!this._input || !this._label) { - return; - } - const fontInfo = this._editor.getOption(36 /* fontInfo */); - this._input.style.fontFamily = fontInfo.fontFamily; - this._input.style.fontWeight = fontInfo.fontWeight; - this._input.style.fontSize = `${fontInfo.fontSize}px`; - this._label.style.fontSize = `${fontInfo.fontSize * 0.8}px`; - } - getPosition() { - if (!this._visible) { - return null; - } - return { - position: this._position, - preference: [2 /* BELOW */, 1 /* ABOVE */] - }; - } - acceptInput(wantsPreview) { - if (this._currentAcceptInput) { - this._currentAcceptInput(wantsPreview); - } - } - cancelInput(focusEditor) { - if (this._currentCancelInput) { - this._currentCancelInput(focusEditor); - } - } - getInput(where, value, selectionStart, selectionEnd, supportPreview, token) { - this._domNode.classList.toggle('preview', supportPreview); - this._position = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_2__["Position"](where.startLineNumber, where.startColumn); - this._input.value = value; - this._input.setAttribute('selectionStart', selectionStart.toString()); - this._input.setAttribute('selectionEnd', selectionEnd.toString()); - this._input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20); - const disposeOnDone = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - return new Promise(resolve => { - this._currentCancelInput = (focusEditor) => { - this._currentAcceptInput = undefined; - this._currentCancelInput = undefined; - resolve(focusEditor); - return true; - }; - this._currentAcceptInput = (wantsPreview) => { - if (this._input.value.trim().length === 0 || this._input.value === value) { - // empty or whitespace only or not changed - this.cancelInput(true); - return; - } - this._currentAcceptInput = undefined; - this._currentCancelInput = undefined; - resolve({ - newName: this._input.value, - wantsPreview: supportPreview && wantsPreview - }); - }; - token.onCancellationRequested(() => this.cancelInput(true)); - disposeOnDone.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(false))); - this._show(); - }).finally(() => { - disposeOnDone.dispose(); - this._hide(); - }); - } - _show() { - this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0 /* Smooth */); - this._visible = true; - this._visibleContextKey.set(true); - this._editor.layoutContentWidget(this); - setTimeout(() => { - this._input.focus(); - this._input.setSelectionRange(parseInt(this._input.getAttribute('selectionStart')), parseInt(this._input.getAttribute('selectionEnd'))); - }, 100); - } - _hide() { - this._visible = false; - this._visibleContextKey.reset(); - this._editor.layoutContentWidget(this); - } -}; -RenameInputField = __decorate([ - __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__["IThemeService"]), - __param(3, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__["IKeybindingService"]), - __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["IContextKeyService"]) -], RenameInputField); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js ***! - \*******************************************************************************************/ -/*! exports provided: BracketSelectionRangeProvider */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css": +/*!****************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css ***! + \****************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BracketSelectionRangeProvider", function() { return BracketSelectionRangeProvider; }); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class BracketSelectionRangeProvider { - provideSelectionRanges(model, positions) { - return __awaiter(this, void 0, void 0, function* () { - const result = []; - for (const position of positions) { - const bucket = []; - result.push(bucket); - const ranges = new Map(); - yield new Promise(resolve => BracketSelectionRangeProvider._bracketsRightYield(resolve, 0, model, position, ranges)); - yield new Promise(resolve => BracketSelectionRangeProvider._bracketsLeftYield(resolve, 0, model, position, ranges, bucket)); - } - return result; - }); - } - static _bracketsRightYield(resolve, round, model, pos, ranges) { - const counts = new Map(); - const t1 = Date.now(); - while (true) { - if (round >= BracketSelectionRangeProvider._maxRounds) { - resolve(); - break; - } - if (!pos) { - resolve(); - break; - } - let bracket = model.findNextBracket(pos); - if (!bracket) { - resolve(); - break; - } - let d = Date.now() - t1; - if (d > BracketSelectionRangeProvider._maxDuration) { - setTimeout(() => BracketSelectionRangeProvider._bracketsRightYield(resolve, round + 1, model, pos, ranges)); - break; - } - const key = bracket.close[0]; - if (bracket.isOpen) { - // wait for closing - let val = counts.has(key) ? counts.get(key) : 0; - counts.set(key, val + 1); - } - else { - // process closing - let val = counts.has(key) ? counts.get(key) : 0; - val -= 1; - counts.set(key, Math.max(0, val)); - if (val < 0) { - let list = ranges.get(key); - if (!list) { - list = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_2__["LinkedList"](); - ranges.set(key, list); - } - list.push(bracket.range); - } - } - pos = bracket.range.getEndPosition(); - } - } - static _bracketsLeftYield(resolve, round, model, pos, ranges, bucket) { - const counts = new Map(); - const t1 = Date.now(); - while (true) { - if (round >= BracketSelectionRangeProvider._maxRounds && ranges.size === 0) { - resolve(); - break; - } - if (!pos) { - resolve(); - break; - } - let bracket = model.findPrevBracket(pos); - if (!bracket) { - resolve(); - break; - } - let d = Date.now() - t1; - if (d > BracketSelectionRangeProvider._maxDuration) { - setTimeout(() => BracketSelectionRangeProvider._bracketsLeftYield(resolve, round + 1, model, pos, ranges, bucket)); - break; - } - const key = bracket.close[0]; - if (!bracket.isOpen) { - // wait for opening - let val = counts.has(key) ? counts.get(key) : 0; - counts.set(key, val + 1); - } - else { - // opening - let val = counts.has(key) ? counts.get(key) : 0; - val -= 1; - counts.set(key, Math.max(0, val)); - if (val < 0) { - let list = ranges.get(key); - if (list) { - let closing = list.shift(); - if (list.size === 0) { - ranges.delete(key); - } - const innerBracket = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(bracket.range.getEndPosition(), closing.getStartPosition()); - const outerBracket = _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(bracket.range.getStartPosition(), closing.getEndPosition()); - bucket.push({ range: innerBracket }); - bucket.push({ range: outerBracket }); - BracketSelectionRangeProvider._addBracketLeading(model, outerBracket, bucket); - } - } - } - pos = bracket.range.getStartPosition(); - } - } - static _addBracketLeading(model, bracket, bucket) { - if (bracket.startLineNumber === bracket.endLineNumber) { - return; - } - // xxxxxxxx { - // - // } - const startLine = bracket.startLineNumber; - const column = model.getLineFirstNonWhitespaceColumn(startLine); - if (column !== 0 && column !== bracket.startColumn) { - bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](startLine, column), bracket.getEndPosition()) }); - bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](startLine, 1), bracket.getEndPosition()) }); - } - // xxxxxxxx - // { - // - // } - const aboveLine = startLine - 1; - if (aboveLine > 0) { - const column = model.getLineFirstNonWhitespaceColumn(aboveLine); - if (column === bracket.startColumn && column !== model.getLineLastNonWhitespaceColumn(aboveLine)) { - bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](aboveLine, column), bracket.getEndPosition()) }); - bucket.push({ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(new _common_core_position_js__WEBPACK_IMPORTED_MODULE_0__["Position"](aboveLine, 1), bracket.getEndPosition()) }); - } - } - } -} -BracketSelectionRangeProvider._maxDuration = 30; -BracketSelectionRangeProvider._maxRounds = 2; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js ***! - \*************************************************************************************/ -/*! exports provided: provideSelectionRanges */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideSelectionRanges", function() { return provideSelectionRanges; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _wordSelections_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./wordSelections.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js"); -/* harmony import */ var _bracketSelections_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bracketSelections.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./codicon.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_codicon_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), -class SelectionRanges { - constructor(index, ranges) { - this.index = index; - this.ranges = ranges; - } - mov(fwd) { - let index = this.index + (fwd ? 1 : -1); - if (index < 0 || index >= this.ranges.length) { - return this; - } - const res = new SelectionRanges(index, this.ranges); - if (res.ranges[index].equalsRange(this.ranges[this.index])) { - // next range equals this range, retry with next-next - return res.mov(fwd); - } - return res; - } -} -class SmartSelectController { - constructor(editor) { - this._ignoreSelection = false; - this._editor = editor; - } - static get(editor) { - return editor.getContribution(SmartSelectController.ID); - } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__["dispose"])(this._selectionListener); - } - run(forward) { - if (!this._editor.hasModel()) { - return; - } - const selections = this._editor.getSelections(); - const model = this._editor.getModel(); - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_7__["SelectionRangeRegistry"].has(model)) { - return; - } - let promise = Promise.resolve(undefined); - if (!this._state) { - promise = provideSelectionRanges(model, selections.map(s => s.getPosition()), _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None).then(ranges => { - if (!_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"](ranges) || ranges.length !== selections.length) { - // invalid result - return; - } - if (!this._editor.hasModel() || !_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["equals"](this._editor.getSelections(), selections, (a, b) => a.equalsSelection(b))) { - // invalid editor state - return; - } - for (let i = 0; i < ranges.length; i++) { - ranges[i] = ranges[i].filter(range => { - // filter ranges inside the selection - return range.containsPosition(selections[i].getStartPosition()) && range.containsPosition(selections[i].getEndPosition()); - }); - // prepend current selection - ranges[i].unshift(selections[i]); - } - this._state = ranges.map(ranges => new SelectionRanges(0, ranges)); - // listen to caret move and forget about state - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__["dispose"])(this._selectionListener); - this._selectionListener = this._editor.onDidChangeCursorPosition(() => { - if (!this._ignoreSelection) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_10__["dispose"])(this._selectionListener); - this._state = undefined; - } - }); - }); - } - return promise.then(() => { - if (!this._state) { - // no state - return; - } - this._state = this._state.map(state => state.mov(forward)); - const selections = this._state.map(state => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_5__["Selection"].fromPositions(state.ranges[state.index].getStartPosition(), state.ranges[state.index].getEndPosition())); - this._ignoreSelection = true; - try { - this._editor.setSelections(selections); - } - finally { - this._ignoreSelection = false; - } - }); - } -} -SmartSelectController.ID = 'editor.contrib.smartSelectController'; -class AbstractSmartSelect extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor(forward, opts) { - super(opts); - this._forward = forward; - } - run(_accessor, editor) { - return __awaiter(this, void 0, void 0, function* () { - let controller = SmartSelectController.get(editor); - if (controller) { - yield controller.run(this._forward); - } - }); - } -} -class GrowSelectionAction extends AbstractSmartSelect { - constructor() { - super(true, { - id: 'editor.action.smartSelect.expand', - label: _nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"]('smartSelect.expand', "Expand Selection"), - alias: 'Expand Selection', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */, - mac: { - primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */, - secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */], - }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"].MenubarSelectionMenu, - group: '1_basic', - title: _nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"]({ key: 'miSmartSelectGrow', comment: ['&& denotes a mnemonic'] }, "&&Expand Selection"), - order: 2 - } - }); - } -} -// renamed command id -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_13__["CommandsRegistry"].registerCommandAlias('editor.action.smartSelect.grow', 'editor.action.smartSelect.expand'); -class ShrinkSelectionAction extends AbstractSmartSelect { - constructor() { - super(false, { - id: 'editor.action.smartSelect.shrink', - label: _nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"]('smartSelect.shrink', "Shrink Selection"), - alias: 'Shrink Selection', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_6__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */, - mac: { - primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */, - secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */], - }, - weight: 100 /* EditorContrib */ - }, - menuOpts: { - menuId: _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"].MenubarSelectionMenu, - group: '1_basic', - title: _nls_js__WEBPACK_IMPORTED_MODULE_8__["localize"]({ key: 'miSmartSelectShrink', comment: ['&& denotes a mnemonic'] }, "&&Shrink Selection"), - order: 3 - } - }); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorContribution"])(SmartSelectController.ID, SmartSelectController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(GrowSelectionAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(ShrinkSelectionAction); -// word selection -_common_modes_js__WEBPACK_IMPORTED_MODULE_7__["SelectionRangeRegistry"].register('*', new _wordSelections_js__WEBPACK_IMPORTED_MODULE_11__["WordSelectionRangeProvider"]()); -function provideSelectionRanges(model, positions, token) { - const providers = _common_modes_js__WEBPACK_IMPORTED_MODULE_7__["SelectionRangeRegistry"].all(model); - if (providers.length === 1) { - // add word selection and bracket selection when no provider exists - providers.unshift(new _bracketSelections_js__WEBPACK_IMPORTED_MODULE_12__["BracketSelectionRangeProvider"]()); - } - let work = []; - let allRawRanges = []; - for (const provider of providers) { - work.push(Promise.resolve(provider.provideSelectionRanges(model, positions, token)).then(allProviderRanges => { - if (_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"](allProviderRanges) && allProviderRanges.length === positions.length) { - for (let i = 0; i < positions.length; i++) { - if (!allRawRanges[i]) { - allRawRanges[i] = []; - } - for (const oneProviderRanges of allProviderRanges[i]) { - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].isIRange(oneProviderRanges.range) && _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].containsPosition(oneProviderRanges.range, positions[i])) { - allRawRanges[i].push(_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].lift(oneProviderRanges.range)); - } - } - } - } - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_14__["onUnexpectedExternalError"])); - } - return Promise.all(work).then(() => { - return allRawRanges.map(oneRawRanges => { - if (oneRawRanges.length === 0) { - return []; - } - // sort all by start/end position - oneRawRanges.sort((a, b) => { - if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].isBefore(a.getStartPosition(), b.getStartPosition())) { - return 1; - } - else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].isBefore(b.getStartPosition(), a.getStartPosition())) { - return -1; - } - else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].isBefore(a.getEndPosition(), b.getEndPosition())) { - return -1; - } - else if (_common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"].isBefore(b.getEndPosition(), a.getEndPosition())) { - return 1; - } - else { - return 0; - } - }); - // remove ranges that don't contain the former range or that are equal to the - // former range - let oneRanges = []; - let last; - for (const range of oneRawRanges) { - if (!last || (_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].containsRange(range, last) && !_common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].equalsRange(range, last))) { - oneRanges.push(range); - last = range; - } - } - // add ranges that expand trivia at line starts and ends whenever a range - // wraps onto the a new line - let oneRangesWithTrivia = [oneRanges[0]]; - for (let i = 1; i < oneRanges.length; i++) { - const prev = oneRanges[i - 1]; - const cur = oneRanges[i]; - if (cur.startLineNumber !== prev.startLineNumber || cur.endLineNumber !== prev.endLineNumber) { - // add line/block range without leading/failing whitespace - const rangeNoWhitespace = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](prev.startLineNumber, model.getLineFirstNonWhitespaceColumn(prev.startLineNumber), prev.endLineNumber, model.getLineLastNonWhitespaceColumn(prev.endLineNumber)); - if (rangeNoWhitespace.containsRange(prev) && !rangeNoWhitespace.equalsRange(prev) && cur.containsRange(rangeNoWhitespace) && !cur.equalsRange(rangeNoWhitespace)) { - oneRangesWithTrivia.push(rangeNoWhitespace); - } - // add line/block range - const rangeFull = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"](prev.startLineNumber, 1, prev.endLineNumber, model.getLineMaxColumn(prev.endLineNumber)); - if (rangeFull.containsRange(prev) && !rangeFull.equalsRange(rangeNoWhitespace) && cur.containsRange(rangeFull) && !cur.equalsRange(rangeFull)) { - oneRangesWithTrivia.push(rangeFull); - } - } - oneRangesWithTrivia.push(cur); - } - return oneRangesWithTrivia; - }); - }); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerModelCommand"])('_executeSelectionRangeProvider', function (model, ...args) { - const [positions] = args; - return provideSelectionRanges(model, positions, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_1__["CancellationToken"].None); -}); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf": +/*!****************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf ***! + \****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (__webpack_require__.p + "codicon.ttf"); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/wordSelections.js ***! - \****************************************************************************************/ -/*! exports provided: WordSelectionRangeProvider */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js ***! + \*************************************************************************************/ +/*! exports provided: CodiconStyles, formatRule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordSelectionRangeProvider", function() { return WordSelectionRangeProvider; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodiconStyles", function() { return CodiconStyles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatRule", function() { return formatRule; }); +/* harmony import */ var _codicon_codicon_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./codicon/codicon.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"); +/* harmony import */ var _codicon_codicon_modifications_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./codicon/codicon-modifications.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifications.css"); +/* harmony import */ var _codicon_codicon_animations_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./codicon/codicon-animations.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-animations.css"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -class WordSelectionRangeProvider { - provideSelectionRanges(model, positions) { - const result = []; - for (const position of positions) { - const bucket = []; - result.push(bucket); - this._addInWordRanges(bucket, model, position); - this._addWordRanges(bucket, model, position); - this._addWhitespaceLine(bucket, model, position); - bucket.push({ range: model.getFullModelRange() }); - } - return result; - } - _addInWordRanges(bucket, model, pos) { - const obj = model.getWordAtPosition(pos); - if (!obj) { - return; - } - let { word, startColumn } = obj; - let offset = pos.column - startColumn; - let start = offset; - let end = offset; - let lastCh = 0; - // LEFT anchor (start) - for (; start >= 0; start--) { - let ch = word.charCodeAt(start); - if ((start !== offset) && (ch === 95 /* Underline */ || ch === 45 /* Dash */)) { - // foo-bar OR foo_bar - break; - } - else if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isLowerAsciiLetter"])(ch) && Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isUpperAsciiLetter"])(lastCh)) { - // fooBar - break; - } - lastCh = ch; - } - start += 1; - // RIGHT anchor (end) - for (; end < word.length; end++) { - let ch = word.charCodeAt(end); - if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isUpperAsciiLetter"])(ch) && Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["isLowerAsciiLetter"])(lastCh)) { - // fooBar - break; - } - else if (ch === 95 /* Underline */ || ch === 45 /* Dash */) { - // foo-bar OR foo_bar - break; - } - lastCh = ch; - } - if (start < end) { - bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](pos.lineNumber, startColumn + start, pos.lineNumber, startColumn + end) }); - } + + +const CodiconStyles = new class { + constructor() { + this.onDidChange = _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["iconRegistry"].onDidRegister; } - _addWordRanges(bucket, model, pos) { - const word = model.getWordAtPosition(pos); - if (word) { - bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](pos.lineNumber, word.startColumn, pos.lineNumber, word.endColumn) }); + getCSS() { + const rules = []; + for (let c of _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["iconRegistry"].all) { + rules.push(formatRule(c)); } + return rules.join('\n'); } - _addWhitespaceLine(bucket, model, pos) { - if (model.getLineLength(pos.lineNumber) > 0 - && model.getLineFirstNonWhitespaceColumn(pos.lineNumber) === 0 - && model.getLineLastNonWhitespaceColumn(pos.lineNumber) === 0) { - bucket.push({ range: new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](pos.lineNumber, 1, pos.lineNumber, model.getLineMaxColumn(pos.lineNumber)) }); - } +}; +function formatRule(c) { + let def = c.definition; + while (def instanceof _common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"]) { + def = def.definition; } + return `.codicon-${c.id}:before { content: '${def.character}'; }`; } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js ***! - \****************************************************************************************/ -/*! exports provided: SnippetController2 */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css": +/*!***************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css ***! + \***************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SnippetController2", function() { return SnippetController2; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _suggest_suggest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../suggest/suggest.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _snippetSession_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./snippetSession.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./contextview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const _defaultOptions = { - overwriteBefore: 0, - overwriteAfter: 0, - undoStopBefore: true, - undoStopAfter: true, - adjustWhitespace: true, - clipboardText: undefined, - overtypingCapturer: undefined -}; -let SnippetController2 = class SnippetController2 { - constructor(_editor, _logService, contextKeyService) { - this._editor = _editor; - this._logService = _logService; - this._snippetListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["DisposableStore"](); - this._modelVersionId = -1; - this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService); - this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService); - this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService); - } - static get(editor) { - return editor.getContribution(SnippetController2.ID); - } - dispose() { - this._inSnippet.reset(); - this._hasPrevTabstop.reset(); - this._hasNextTabstop.reset(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["dispose"])(this._session); - this._snippetListener.dispose(); - } - insert(template, opts) { - // this is here to find out more about the yet-not-understood - // error that sometimes happens when we fail to inserted a nested - // snippet - try { - this._doInsert(template, typeof opts === 'undefined' ? _defaultOptions : Object.assign(Object.assign({}, _defaultOptions), opts)); - } - catch (e) { - this.cancel(); - this._logService.error(e); - this._logService.error('snippet_error'); - this._logService.error('insert_template=', template); - this._logService.error('existing_template=', this._session ? this._session._logInfo() : ''); - } - } - _doInsert(template, opts) { - if (!this._editor.hasModel()) { - return; - } - // don't listen while inserting the snippet - // as that is the inflight state causing cancelation - this._snippetListener.clear(); - if (opts.undoStopBefore) { - this._editor.getModel().pushStackElement(); - } - if (!this._session) { - this._modelVersionId = this._editor.getModel().getAlternativeVersionId(); - this._session = new _snippetSession_js__WEBPACK_IMPORTED_MODULE_8__["SnippetSession"](this._editor, template, opts); - this._session.insert(); - } - else { - this._session.merge(template, opts); - } - if (opts.undoStopAfter) { - this._editor.getModel().pushStackElement(); - } - this._updateState(); - this._snippetListener.add(this._editor.onDidChangeModelContent(e => e.isFlush && this.cancel())); - this._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel())); - this._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState())); - } - _updateState() { - if (!this._session || !this._editor.hasModel()) { - // canceled in the meanwhile - return; - } - if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) { - // undo until the 'before' state happened - // and makes use cancel snippet mode - return this.cancel(); - } - if (!this._session.hasPlaceholder) { - // don't listen for selection changes and don't - // update context keys when the snippet is plain text - return this.cancel(); - } - if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) { - return this.cancel(); - } - this._inSnippet.set(true); - this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder); - this._hasNextTabstop.set(!this._session.isAtLastPlaceholder); - this._handleChoice(); - } - _handleChoice() { - if (!this._session || !this._editor.hasModel()) { - this._currentChoice = undefined; - return; - } - const { choice } = this._session; - if (!choice) { - this._currentChoice = undefined; - return; - } - if (this._currentChoice !== choice) { - this._currentChoice = choice; - this._editor.setSelections(this._editor.getSelections() - .map(s => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_3__["Selection"].fromPositions(s.getStartPosition()))); - const [first] = choice.options; - Object(_suggest_suggest_js__WEBPACK_IMPORTED_MODULE_5__["showSimpleSuggestions"])(this._editor, choice.options.map((option, i) => { - // let before = choice.options.slice(0, i); - // let after = choice.options.slice(i); - return { - kind: 13 /* Value */, - label: option.value, - insertText: option.value, - // insertText: `\${1|${after.concat(before).join(',')}|}$0`, - // snippetType: 'textmate', - sortText: 'a'.repeat(i + 1), - range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"].fromPositions(this._editor.getPosition(), this._editor.getPosition().delta(0, first.value.length)) - }; - })); - } - } - finish() { - while (this._inSnippet.get()) { - this.next(); - } - } - cancel(resetSelection = false) { - this._inSnippet.reset(); - this._hasPrevTabstop.reset(); - this._hasNextTabstop.reset(); - this._snippetListener.clear(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["dispose"])(this._session); - this._session = undefined; - this._modelVersionId = -1; - if (resetSelection) { - // reset selection to the primary cursor when being asked - // for. this happens when explicitly cancelling snippet mode, - // e.g. when pressing ESC - this._editor.setSelections([this._editor.getSelection()]); - } - } - prev() { - if (this._session) { - this._session.prev(); - } - this._updateState(); - } - next() { - if (this._session) { - this._session.next(); - } - this._updateState(); - } - isInSnippet() { - return Boolean(this._inSnippet.get()); - } -}; -SnippetController2.ID = 'snippetController2'; -SnippetController2.InSnippetMode = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["RawContextKey"]('inSnippetMode', false); -SnippetController2.HasNextTabstop = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["RawContextKey"]('hasNextTabstop', false); -SnippetController2.HasPrevTabstop = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["RawContextKey"]('hasPrevTabstop', false); -SnippetController2 = __decorate([ - __param(1, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_7__["ILogService"]), - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["IContextKeyService"]) -], SnippetController2); - -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorContribution"])(SnippetController2.ID, SnippetController2); -const CommandCtor = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorCommand"].bindToContribution(SnippetController2.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorCommand"])(new CommandCtor({ - id: 'jumpToNextSnippetPlaceholder', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["ContextKeyExpr"].and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop), - handler: ctrl => ctrl.next(), - kbOpts: { - weight: 100 /* EditorContrib */ + 30, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__["EditorContextKeys"].editorTextFocus, - primary: 2 /* Tab */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorCommand"])(new CommandCtor({ - id: 'jumpToPrevSnippetPlaceholder', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["ContextKeyExpr"].and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop), - handler: ctrl => ctrl.prev(), - kbOpts: { - weight: 100 /* EditorContrib */ + 30, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 2 /* Tab */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorCommand"])(new CommandCtor({ - id: 'leaveSnippet', - precondition: SnippetController2.InSnippetMode, - handler: ctrl => ctrl.cancel(true), - kbOpts: { - weight: 100 /* EditorContrib */ + 30, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_4__["EditorContextKeys"].editorTextFocus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorCommand"])(new CommandCtor({ - id: 'acceptSnippet', - precondition: SnippetController2.InSnippetMode, - handler: ctrl => ctrl.finish(), -})); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_contextview_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js ***! - \***********************************************************************************/ -/*! exports provided: Scanner, Marker, Text, TransformableMarker, Placeholder, Choice, Transform, FormatString, Variable, TextmateSnippet, SnippetParser */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js ***! + \**************************************************************************************/ +/*! exports provided: layout, ContextView */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scanner", function() { return Scanner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Marker", function() { return Marker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Text", function() { return Text; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransformableMarker", function() { return TransformableMarker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Placeholder", function() { return Placeholder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Choice", function() { return Choice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatString", function() { return FormatString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Variable", function() { return Variable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextmateSnippet", function() { return TextmateSnippet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SnippetParser", function() { return SnippetParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "layout", function() { return layout; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextView", function() { return ContextView; }); +/* harmony import */ var _contextview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextview.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); +/* harmony import */ var _canIUse_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../canIUse.js */ "./node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -class Scanner { - constructor() { - this.value = ''; - this.pos = 0; - } - static isDigitCharacter(ch) { - return ch >= 48 /* Digit0 */ && ch <= 57 /* Digit9 */; - } - static isVariableCharacter(ch) { - return ch === 95 /* Underline */ - || (ch >= 97 /* a */ && ch <= 122 /* z */) - || (ch >= 65 /* A */ && ch <= 90 /* Z */); - } - text(value) { - this.value = value; - this.pos = 0; - } - tokenText(token) { - return this.value.substr(token.pos, token.len); - } - next() { - if (this.pos >= this.value.length) { - return { type: 14 /* EOF */, pos: this.pos, len: 0 }; - } - let pos = this.pos; - let len = 0; - let ch = this.value.charCodeAt(pos); - let type; - // static types - type = Scanner._table[ch]; - if (typeof type === 'number') { - this.pos += 1; - return { type, pos, len: 1 }; - } - // number - if (Scanner.isDigitCharacter(ch)) { - type = 8 /* Int */; - do { - len += 1; - ch = this.value.charCodeAt(pos + len); - } while (Scanner.isDigitCharacter(ch)); - this.pos += len; - return { type, pos, len }; - } - // variable name - if (Scanner.isVariableCharacter(ch)) { - type = 9 /* VariableName */; - do { - ch = this.value.charCodeAt(pos + (++len)); - } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch)); - this.pos += len; - return { type, pos, len }; - } - // format - type = 10 /* Format */; - do { - len += 1; - ch = this.value.charCodeAt(pos + len); - } while (!isNaN(ch) - && typeof Scanner._table[ch] === 'undefined' // not static token - && !Scanner.isDigitCharacter(ch) // not number - && !Scanner.isVariableCharacter(ch) // not variable - ); - this.pos += len; - return { type, pos, len }; - } -} -Scanner._table = { - [36 /* DollarSign */]: 0 /* Dollar */, - [58 /* Colon */]: 1 /* Colon */, - [44 /* Comma */]: 2 /* Comma */, - [123 /* OpenCurlyBrace */]: 3 /* CurlyOpen */, - [125 /* CloseCurlyBrace */]: 4 /* CurlyClose */, - [92 /* Backslash */]: 5 /* Backslash */, - [47 /* Slash */]: 6 /* Forwardslash */, - [124 /* Pipe */]: 7 /* Pipe */, - [43 /* Plus */]: 11 /* Plus */, - [45 /* Dash */]: 12 /* Dash */, - [63 /* QuestionMark */]: 13 /* QuestionMark */, -}; -class Marker { - constructor() { - this._children = []; - } - appendChild(child) { - if (child instanceof Text && this._children[this._children.length - 1] instanceof Text) { - // this and previous child are text -> merge them - this._children[this._children.length - 1].value += child.value; - } - else { - // normal adoption of child - child.parent = this; - this._children.push(child); - } - return this; - } - replace(child, others) { - const { parent } = child; - const idx = parent.children.indexOf(child); - const newChildren = parent.children.slice(0); - newChildren.splice(idx, 1, ...others); - parent._children = newChildren; - (function _fixParent(children, parent) { - for (const child of children) { - child.parent = parent; - _fixParent(child.children, child); - } - })(others, parent); - } - get children() { - return this._children; - } - get snippet() { - let candidate = this; - while (true) { - if (!candidate) { - return undefined; - } - if (candidate instanceof TextmateSnippet) { - return candidate; - } - candidate = candidate.parent; - } - } - toString() { - return this.children.reduce((prev, cur) => prev + cur.toString(), ''); - } - len() { - return 0; - } -} -class Text extends Marker { - constructor(value) { - super(); - this.value = value; - } - toString() { - return this.value; - } - len() { - return this.value.length; - } - clone() { - return new Text(this.value); - } -} -class TransformableMarker extends Marker { -} -class Placeholder extends TransformableMarker { - constructor(index) { - super(); - this.index = index; - } - static compareByIndex(a, b) { - if (a.index === b.index) { - return 0; - } - else if (a.isFinalTabstop) { - return 1; - } - else if (b.isFinalTabstop) { - return -1; - } - else if (a.index < b.index) { - return -1; - } - else if (a.index > b.index) { - return 1; + + + + + + +/** + * Lays out a one dimensional view next to an anchor in a viewport. + * + * @returns The view offset within the viewport. + */ +function layout(viewportSize, viewSize, anchor) { + const anchorEnd = anchor.offset + anchor.size; + if (anchor.position === 0 /* Before */) { + if (viewSize <= viewportSize - anchorEnd) { + return anchorEnd; // happy case, lay it out after the anchor } - else { - return 0; + if (viewSize <= anchor.offset) { + return anchor.offset - viewSize; // ok case, lay it out before the anchor } + return Math.max(viewportSize - viewSize, 0); // sad case, lay it over the anchor } - get isFinalTabstop() { - return this.index === 0; - } - get choice() { - return this._children.length === 1 && this._children[0] instanceof Choice - ? this._children[0] - : undefined; - } - clone() { - let ret = new Placeholder(this.index); - if (this.transform) { - ret.transform = this.transform.clone(); + else { + if (viewSize <= anchor.offset) { + return anchor.offset - viewSize; // happy case, lay it out before the anchor } - ret._children = this.children.map(child => child.clone()); - return ret; - } -} -class Choice extends Marker { - constructor() { - super(...arguments); - this.options = []; - } - appendChild(marker) { - if (marker instanceof Text) { - marker.parent = this; - this.options.push(marker); + if (viewSize <= viewportSize - anchorEnd) { + return anchorEnd; // ok case, lay it out after the anchor } - return this; - } - toString() { - return this.options[0].value; - } - len() { - return this.options[0].len(); - } - clone() { - let ret = new Choice(); - this.options.forEach(ret.appendChild, ret); - return ret; + return 0; // sad case, lay it over the anchor } } -class Transform extends Marker { - constructor() { - super(...arguments); - this.regexp = new RegExp(''); - } - resolve(value) { - const _this = this; - let didMatch = false; - let ret = value.replace(this.regexp, function () { - didMatch = true; - return _this._replace(Array.prototype.slice.call(arguments, 0, -2)); - }); - // when the regex didn't match and when the transform has - // else branches, then run those - if (!didMatch && this._children.some(child => child instanceof FormatString && Boolean(child.elseValue))) { - ret = this._replace([]); - } - return ret; +class ContextView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { + constructor(container, domPosition) { + super(); + this.container = null; + this.delegate = null; + this.toDisposeOnClean = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; + this.toDisposeOnSetContainer = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; + this.shadowRoot = null; + this.shadowRootHostElement = null; + this.view = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.context-view'); + this.useFixedPosition = false; + this.useShadowDOM = false; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this.view); + this.setContainer(container, domPosition); + this._register(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["toDisposable"])(() => this.setContainer(null, 1 /* ABSOLUTE */))); } - _replace(groups) { - let ret = ''; - for (const marker of this._children) { - if (marker instanceof FormatString) { - let value = groups[marker.index] || ''; - value = marker.resolve(value); - ret += value; + setContainer(container, domPosition) { + if (this.container) { + this.toDisposeOnSetContainer.dispose(); + if (this.shadowRoot) { + this.shadowRoot.removeChild(this.view); + this.shadowRoot = null; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeNode"](this.shadowRootHostElement); + this.shadowRootHostElement = null; } else { - ret += marker.toString(); + this.container.removeChild(this.view); } + this.container = null; } - return ret; - } - toString() { - return ''; - } - clone() { - let ret = new Transform(); - ret.regexp = new RegExp(this.regexp.source, '' + (this.regexp.ignoreCase ? 'i' : '') + (this.regexp.global ? 'g' : '')); - ret._children = this.children.map(child => child.clone()); - return ret; - } -} -class FormatString extends Marker { - constructor(index, shorthandName, ifValue, elseValue) { - super(); - this.index = index; - this.shorthandName = shorthandName; - this.ifValue = ifValue; - this.elseValue = elseValue; - } - resolve(value) { - if (this.shorthandName === 'upcase') { - return !value ? '' : value.toLocaleUpperCase(); - } - else if (this.shorthandName === 'downcase') { - return !value ? '' : value.toLocaleLowerCase(); - } - else if (this.shorthandName === 'capitalize') { - return !value ? '' : (value[0].toLocaleUpperCase() + value.substr(1)); - } - else if (this.shorthandName === 'pascalcase') { - return !value ? '' : this._toPascalCase(value); - } - else if (Boolean(value) && typeof this.ifValue === 'string') { - return this.ifValue; - } - else if (!Boolean(value) && typeof this.elseValue === 'string') { - return this.elseValue; - } - else { - return value || ''; + if (container) { + this.container = container; + this.useFixedPosition = domPosition !== 1 /* ABSOLUTE */; + this.useShadowDOM = domPosition === 3 /* FIXED_SHADOW */; + if (this.useShadowDOM) { + this.shadowRootHostElement = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.shadow-root-host'); + this.container.appendChild(this.shadowRootHostElement); + this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' }); + this.shadowRoot.innerHTML = ` + + `; + this.shadowRoot.appendChild(this.view); + this.shadowRoot.appendChild(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('slot')); + } + else { + this.container.appendChild(this.view); + } + const toDisposeOnSetContainer = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); + ContextView.BUBBLE_UP_EVENTS.forEach(event => { + toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.container, event, (e) => { + this.onDOMEvent(e, false); + })); + }); + ContextView.BUBBLE_DOWN_EVENTS.forEach(event => { + toDisposeOnSetContainer.add(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this.container, event, (e) => { + this.onDOMEvent(e, true); + }, true)); + }); + this.toDisposeOnSetContainer = toDisposeOnSetContainer; } } - _toPascalCase(value) { - const match = value.match(/[a-z]+/gi); - if (!match) { - return value; + show(delegate) { + if (this.isVisible()) { + this.hide(); + } + // Show static box + _dom_js__WEBPACK_IMPORTED_MODULE_1__["clearNode"](this.view); + this.view.className = 'context-view'; + this.view.style.top = '0px'; + this.view.style.left = '0px'; + this.view.style.zIndex = '2500'; + this.view.style.position = this.useFixedPosition ? 'fixed' : 'absolute'; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["show"](this.view); + // Render content + this.toDisposeOnClean = delegate.render(this.view) || _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"].None; + // Set active delegate + this.delegate = delegate; + // Layout + this.doLayout(); + // Focus + if (this.delegate.focus) { + this.delegate.focus(); } - return match.map(function (word) { - return word.charAt(0).toUpperCase() - + word.substr(1).toLowerCase(); - }) - .join(''); - } - clone() { - let ret = new FormatString(this.index, this.shorthandName, this.ifValue, this.elseValue); - return ret; } -} -class Variable extends TransformableMarker { - constructor(name) { - super(); - this.name = name; + getViewElement() { + return this.view; } - resolve(resolver) { - let value = resolver.resolve(this); - if (this.transform) { - value = this.transform.resolve(value || ''); - } - if (value !== undefined) { - this._children = [new Text(value)]; - return true; + layout() { + if (!this.isVisible()) { + return; } - return false; - } - clone() { - const ret = new Variable(this.name); - if (this.transform) { - ret.transform = this.transform.clone(); + if (this.delegate.canRelayout === false && !(_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isIOS"] && _canIUse_js__WEBPACK_IMPORTED_MODULE_5__["BrowserFeatures"].pointerEvents)) { + this.hide(); + return; } - ret._children = this.children.map(child => child.clone()); - return ret; - } -} -function walk(marker, visitor) { - const stack = [...marker]; - while (stack.length > 0) { - const marker = stack.shift(); - const recurse = visitor(marker); - if (!recurse) { - break; + if (this.delegate.layout) { + this.delegate.layout(); } - stack.unshift(...marker.children); + this.doLayout(); } -} -class TextmateSnippet extends Marker { - get placeholderInfo() { - if (!this._placeholders) { - // fill in placeholders - let all = []; - let last; - this.walk(function (candidate) { - if (candidate instanceof Placeholder) { - all.push(candidate); - last = !last || last.index < candidate.index ? candidate : last; - } - return true; - }); - this._placeholders = { all, last }; + doLayout() { + // Check that we still have a delegate - this.delegate.layout may have hidden + if (!this.isVisible()) { + return; } - return this._placeholders; - } - get placeholders() { - const { all } = this.placeholderInfo; - return all; - } - offset(marker) { - let pos = 0; - let found = false; - this.walk(candidate => { - if (candidate === marker) { - found = true; - return false; - } - pos += candidate.len(); - return true; - }); - if (!found) { - return -1; + // Get anchor + let anchor = this.delegate.getAnchor(); + // Compute around + let around; + // Get the element's position and size (to anchor the view) + if (_dom_js__WEBPACK_IMPORTED_MODULE_1__["isHTMLElement"](anchor)) { + let elementPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](anchor); + around = { + top: elementPosition.top, + left: elementPosition.left, + width: elementPosition.width, + height: elementPosition.height + }; } - return pos; - } - fullLen(marker) { - let ret = 0; - walk([marker], marker => { - ret += marker.len(); - return true; - }); - return ret; - } - enclosingPlaceholders(placeholder) { - let ret = []; - let { parent } = placeholder; - while (parent) { - if (parent instanceof Placeholder) { - ret.push(parent); - } - parent = parent.parent; + else { + around = { + top: anchor.y, + left: anchor.x, + width: anchor.width || 1, + height: anchor.height || 2 + }; } - return ret; - } - resolveVariables(resolver) { - this.walk(candidate => { - if (candidate instanceof Variable) { - if (candidate.resolve(resolver)) { - this._placeholders = undefined; - } - } - return true; - }); - return this; - } - appendChild(child) { - this._placeholders = undefined; - return super.appendChild(child); - } - replace(child, others) { - this._placeholders = undefined; - return super.replace(child, others); - } - clone() { - let ret = new TextmateSnippet(); - this._children = this.children.map(child => child.clone()); - return ret; - } - walk(visitor) { - walk(this.children, visitor); - } -} -class SnippetParser { - constructor() { - this._scanner = new Scanner(); - this._token = { type: 14 /* EOF */, pos: 0, len: 0 }; - } - static escape(value) { - return value.replace(/\$|}|\\/g, '\\$&'); - } - static guessNeedsClipboard(template) { - return /\${?CLIPBOARD/.test(template); - } - parse(value, insertFinalTabstop, enforceFinalTabstop) { - this._scanner.text(value); - this._token = this._scanner.next(); - const snippet = new TextmateSnippet(); - while (this._parse(snippet)) { - // nothing - } - // fill in values for placeholders. the first placeholder of an index - // that has a value defines the value for all placeholders with that index - const placeholderDefaultValues = new Map(); - const incompletePlaceholders = []; - let placeholderCount = 0; - snippet.walk(marker => { - if (marker instanceof Placeholder) { - placeholderCount += 1; - if (marker.isFinalTabstop) { - placeholderDefaultValues.set(0, undefined); - } - else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) { - placeholderDefaultValues.set(marker.index, marker.children); - } - else { - incompletePlaceholders.push(marker); - } - } - return true; - }); - for (const placeholder of incompletePlaceholders) { - const defaultValues = placeholderDefaultValues.get(placeholder.index); - if (defaultValues) { - const clone = new Placeholder(placeholder.index); - clone.transform = placeholder.transform; - for (const child of defaultValues) { - clone.appendChild(child.clone()); - } - snippet.replace(placeholder, [clone]); - } + const viewSizeWidth = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getTotalWidth"](this.view); + const viewSizeHeight = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getTotalHeight"](this.view); + const anchorPosition = this.delegate.anchorPosition || 0 /* BELOW */; + const anchorAlignment = this.delegate.anchorAlignment || 0 /* LEFT */; + const verticalAnchor = { offset: around.top - window.pageYOffset, size: around.height, position: anchorPosition === 0 /* BELOW */ ? 0 /* Before */ : 1 /* After */ }; + let horizontalAnchor; + if (anchorAlignment === 0 /* LEFT */) { + horizontalAnchor = { offset: around.left, size: 0, position: 0 /* Before */ }; } - if (!enforceFinalTabstop) { - enforceFinalTabstop = placeholderCount > 0 && insertFinalTabstop; + else { + horizontalAnchor = { offset: around.left + around.width, size: 0, position: 1 /* After */ }; } - if (!placeholderDefaultValues.has(0) && enforceFinalTabstop) { - // the snippet uses placeholders but has no - // final tabstop defined -> insert at the end - snippet.appendChild(new Placeholder(0)); + const top = layout(window.innerHeight, viewSizeHeight, verticalAnchor) + window.pageYOffset; + // if view intersects vertically with anchor, shift it horizontally + if (_common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].intersects({ start: top, end: top + viewSizeHeight }, { start: verticalAnchor.offset, end: verticalAnchor.offset + verticalAnchor.size })) { + horizontalAnchor.size = around.width; + if (anchorAlignment === 1 /* RIGHT */) { + horizontalAnchor.offset = around.left; + } } - return snippet; + const left = layout(window.innerWidth, viewSizeWidth, horizontalAnchor); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClasses"](this.view, 'top', 'bottom', 'left', 'right'); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.view, anchorPosition === 0 /* BELOW */ ? 'bottom' : 'top'); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.view, anchorAlignment === 0 /* LEFT */ ? 'left' : 'right'); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["toggleClass"](this.view, 'fixed', this.useFixedPosition); + const containerPosition = _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.container); + this.view.style.top = `${top - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.view).top : containerPosition.top)}px`; + this.view.style.left = `${left - (this.useFixedPosition ? _dom_js__WEBPACK_IMPORTED_MODULE_1__["getDomNodePagePosition"](this.view).left : containerPosition.left)}px`; + this.view.style.width = 'initial'; } - _accept(type, value) { - if (type === undefined || this._token.type === type) { - let ret = !value ? true : this._scanner.tokenText(this._token); - this._token = this._scanner.next(); - return ret; + hide(data) { + const delegate = this.delegate; + this.delegate = null; + if (delegate === null || delegate === void 0 ? void 0 : delegate.onHide) { + delegate.onHide(data); } - return false; + this.toDisposeOnClean.dispose(); + _dom_js__WEBPACK_IMPORTED_MODULE_1__["hide"](this.view); } - _backTo(token) { - this._scanner.pos = token.pos + token.len; - this._token = token; - return false; + isVisible() { + return !!this.delegate; } - _until(type) { - const start = this._token; - while (this._token.type !== type) { - if (this._token.type === 14 /* EOF */) { - return false; + onDOMEvent(e, onCapture) { + if (this.delegate) { + if (this.delegate.onDOMEvent) { + this.delegate.onDOMEvent(e, document.activeElement); } - else if (this._token.type === 5 /* Backslash */) { - const nextToken = this._scanner.next(); - if (nextToken.type !== 0 /* Dollar */ - && nextToken.type !== 4 /* CurlyClose */ - && nextToken.type !== 5 /* Backslash */) { - return false; - } + else if (onCapture && !_dom_js__WEBPACK_IMPORTED_MODULE_1__["isAncestor"](e.target, this.container)) { + this.hide(); } - this._token = this._scanner.next(); - } - const value = this._scanner.value.substring(start.pos, this._token.pos).replace(/\\(\$|}|\\)/g, '$1'); - this._token = this._scanner.next(); - return value; - } - _parse(marker) { - return this._parseEscaped(marker) - || this._parseTabstopOrVariableName(marker) - || this._parseComplexPlaceholder(marker) - || this._parseComplexVariable(marker) - || this._parseAnything(marker); - } - // \$, \\, \} -> just text - _parseEscaped(marker) { - let value; - if (value = this._accept(5 /* Backslash */, true)) { - // saw a backslash, append escaped token or that backslash - value = this._accept(0 /* Dollar */, true) - || this._accept(4 /* CurlyClose */, true) - || this._accept(5 /* Backslash */, true) - || value; - marker.appendChild(new Text(value)); - return true; } - return false; } - // $foo -> variable, $1 -> tabstop - _parseTabstopOrVariableName(parent) { - let value; - const token = this._token; - const match = this._accept(0 /* Dollar */) - && (value = this._accept(9 /* VariableName */, true) || this._accept(8 /* Int */, true)); - if (!match) { - return this._backTo(token); - } - parent.appendChild(/^\d+$/.test(value) - ? new Placeholder(Number(value)) - : new Variable(value)); - return true; + dispose() { + this.hide(); + super.dispose(); } - // ${1:}, ${1} -> placeholder - _parseComplexPlaceholder(parent) { - let index; - const token = this._token; - const match = this._accept(0 /* Dollar */) - && this._accept(3 /* CurlyOpen */) - && (index = this._accept(8 /* Int */, true)); - if (!match) { - return this._backTo(token); - } - const placeholder = new Placeholder(Number(index)); - if (this._accept(1 /* Colon */)) { - // ${1:} - while (true) { - // ...} -> done - if (this._accept(4 /* CurlyClose */)) { - parent.appendChild(placeholder); - return true; - } - if (this._parse(placeholder)) { - continue; - } - // fallback - parent.appendChild(new Text('${' + index + ':')); - placeholder.children.forEach(parent.appendChild, parent); - return true; - } - } - else if (placeholder.index > 0 && this._accept(7 /* Pipe */)) { - // ${1|one,two,three|} - const choice = new Choice(); - while (true) { - if (this._parseChoiceElement(choice)) { - if (this._accept(2 /* Comma */)) { - // opt, -> more - continue; - } - if (this._accept(7 /* Pipe */)) { - placeholder.appendChild(choice); - if (this._accept(4 /* CurlyClose */)) { - // ..|} -> done - parent.appendChild(placeholder); - return true; - } - } - } - this._backTo(token); - return false; - } - } - else if (this._accept(6 /* Forwardslash */)) { - // ${1///} - if (this._parseTransform(placeholder)) { - parent.appendChild(placeholder); - return true; - } - this._backTo(token); - return false; - } - else if (this._accept(4 /* CurlyClose */)) { - // ${1} - parent.appendChild(placeholder); - return true; - } - else { - // ${1 <- missing curly or colon - return this._backTo(token); - } +} +ContextView.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur']; +ContextView.BUBBLE_DOWN_EVENTS = ['click']; +let SHADOW_ROOT_CSS = /* css */ ` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + @font-face { + font-family: "codicon"; + src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } +`; + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css": +/*!*************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./countBadge.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_countBadge_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js": +/*!************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js ***! + \************************************************************************************/ +/*! exports provided: CountBadge */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CountBadge", function() { return CountBadge; }); +/* harmony import */ var _countBadge_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./countBadge.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + + + +const defaultOpts = { + badgeBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#4D4D4D'), + badgeForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"].fromHex('#FFFFFF') +}; +class CountBadge { + constructor(container, options) { + this.count = 0; + this.options = options || Object.create(null); + Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_4__["mixin"])(this.options, defaultOpts, false); + this.badgeBackground = this.options.badgeBackground; + this.badgeForeground = this.options.badgeForeground; + this.badgeBorder = this.options.badgeBorder; + this.element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('.monaco-count-badge')); + this.countFormat = this.options.countFormat || '{0}'; + this.titleFormat = this.options.titleFormat || ''; + this.setCount(this.options.count || 0); } - _parseChoiceElement(parent) { - const token = this._token; - const values = []; - while (true) { - if (this._token.type === 2 /* Comma */ || this._token.type === 7 /* Pipe */) { - break; - } - let value; - if (value = this._accept(5 /* Backslash */, true)) { - // \, \|, or \\ - value = this._accept(2 /* Comma */, true) - || this._accept(7 /* Pipe */, true) - || this._accept(5 /* Backslash */, true) - || value; - } - else { - value = this._accept(undefined, true); - } - if (!value) { - // EOF - this._backTo(token); - return false; - } - values.push(value); - } - if (values.length === 0) { - this._backTo(token); - return false; - } - parent.appendChild(new Text(values.join(''))); - return true; + setCount(count) { + this.count = count; + this.render(); } - // ${foo:}, ${foo} -> variable - _parseComplexVariable(parent) { - let name; - const token = this._token; - const match = this._accept(0 /* Dollar */) - && this._accept(3 /* CurlyOpen */) - && (name = this._accept(9 /* VariableName */, true)); - if (!match) { - return this._backTo(token); - } - const variable = new Variable(name); - if (this._accept(1 /* Colon */)) { - // ${foo:} - while (true) { - // ...} -> done - if (this._accept(4 /* CurlyClose */)) { - parent.appendChild(variable); - return true; - } - if (this._parse(variable)) { - continue; - } - // fallback - parent.appendChild(new Text('${' + name + ':')); - variable.children.forEach(parent.appendChild, parent); - return true; - } - } - else if (this._accept(6 /* Forwardslash */)) { - // ${foo///} - if (this._parseTransform(variable)) { - parent.appendChild(variable); - return true; - } - this._backTo(token); - return false; - } - else if (this._accept(4 /* CurlyClose */)) { - // ${foo} - parent.appendChild(variable); - return true; - } - else { - // ${foo <- missing curly or colon - return this._backTo(token); - } + setTitleFormat(titleFormat) { + this.titleFormat = titleFormat; + this.render(); } - _parseTransform(parent) { - // ...//} - let transform = new Transform(); - let regexValue = ''; - let regexOptions = ''; - // (1) /regex - while (true) { - if (this._accept(6 /* Forwardslash */)) { - break; - } - let escaped; - if (escaped = this._accept(5 /* Backslash */, true)) { - escaped = this._accept(6 /* Forwardslash */, true) || escaped; - regexValue += escaped; - continue; - } - if (this._token.type !== 14 /* EOF */) { - regexValue += this._accept(undefined, true); - continue; - } - return false; - } - // (2) /format - while (true) { - if (this._accept(6 /* Forwardslash */)) { - break; - } - let escaped; - if (escaped = this._accept(5 /* Backslash */, true)) { - escaped = this._accept(5 /* Backslash */, true) || this._accept(6 /* Forwardslash */, true) || escaped; - transform.appendChild(new Text(escaped)); - continue; - } - if (this._parseFormatString(transform) || this._parseAnything(transform)) { - continue; - } - return false; - } - // (3) /option - while (true) { - if (this._accept(4 /* CurlyClose */)) { - break; - } - if (this._token.type !== 14 /* EOF */) { - regexOptions += this._accept(undefined, true); - continue; - } - return false; - } - try { - transform.regexp = new RegExp(regexValue, regexOptions); - } - catch (e) { - // invalid regexp - return false; - } - parent.transform = transform; - return true; + render() { + this.element.textContent = Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"])(this.countFormat, this.count); + this.element.title = Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["format"])(this.titleFormat, this.count); + this.applyStyles(); } - _parseFormatString(parent) { - const token = this._token; - if (!this._accept(0 /* Dollar */)) { - return false; - } - let complex = false; - if (this._accept(3 /* CurlyOpen */)) { - complex = true; - } - let index = this._accept(8 /* Int */, true); - if (!index) { - this._backTo(token); - return false; - } - else if (!complex) { - // $1 - parent.appendChild(new FormatString(Number(index))); - return true; - } - else if (this._accept(4 /* CurlyClose */)) { - // ${1} - parent.appendChild(new FormatString(Number(index))); - return true; - } - else if (!this._accept(1 /* Colon */)) { - this._backTo(token); - return false; - } - if (this._accept(6 /* Forwardslash */)) { - // ${1:/upcase} - let shorthand = this._accept(9 /* VariableName */, true); - if (!shorthand || !this._accept(4 /* CurlyClose */)) { - this._backTo(token); - return false; - } - else { - parent.appendChild(new FormatString(Number(index), shorthand)); - return true; - } - } - else if (this._accept(11 /* Plus */)) { - // ${1:+} - let ifValue = this._until(4 /* CurlyClose */); - if (ifValue) { - parent.appendChild(new FormatString(Number(index), undefined, ifValue, undefined)); - return true; - } - } - else if (this._accept(12 /* Dash */)) { - // ${2:-} - let elseValue = this._until(4 /* CurlyClose */); - if (elseValue) { - parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue)); - return true; - } - } - else if (this._accept(13 /* QuestionMark */)) { - // ${2:?:} - let ifValue = this._until(1 /* Colon */); - if (ifValue) { - let elseValue = this._until(4 /* CurlyClose */); - if (elseValue) { - parent.appendChild(new FormatString(Number(index), undefined, ifValue, elseValue)); - return true; - } - } - } - else { - // ${1:} - let elseValue = this._until(4 /* CurlyClose */); - if (elseValue) { - parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue)); - return true; - } - } - this._backTo(token); - return false; + style(styles) { + this.badgeBackground = styles.badgeBackground; + this.badgeForeground = styles.badgeForeground; + this.badgeBorder = styles.badgeBorder; + this.applyStyles(); } - _parseAnything(marker) { - if (this._token.type !== 14 /* EOF */) { - marker.appendChild(new Text(this._scanner.tokenText(this._token))); - this._accept(undefined); - return true; + applyStyles() { + if (this.element) { + const background = this.badgeBackground ? this.badgeBackground.toString() : ''; + const foreground = this.badgeForeground ? this.badgeForeground.toString() : ''; + const border = this.badgeBorder ? this.badgeBorder.toString() : ''; + this.element.style.backgroundColor = background; + this.element.style.color = foreground; + this.element.style.borderWidth = border ? '1px' : ''; + this.element.style.borderStyle = border ? 'solid' : ''; + this.element.style.borderColor = border; } - return false; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css ***! - \*************************************************************************************/ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css": +/*!*********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css ***! + \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./snippetSession.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css"); +/* harmony import */ var _css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./dropdown.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); @@ -217743,40 +73161,31 @@ var options = {}; options.insert = "head"; options.singleton = false; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_snippetSession_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_dropdown_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.js ***! - \************************************************************************************/ -/*! exports provided: OneSnippet, SnippetSession */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneSnippet", function() { return OneSnippet; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SnippetSession", function() { return SnippetSession; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _snippetSession_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./snippetSession.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ "./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./snippetParser.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js"); -/* harmony import */ var _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./snippetVariables.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/label/common/label.js */ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js": +/*!********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js ***! + \********************************************************************************/ +/*! exports provided: BaseDropdown, DropdownMenu */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseDropdown", function() { return BaseDropdown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMenu", function() { return DropdownMenu; }); +/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -217787,523 +73196,284 @@ __webpack_require__.r(__webpack_exports__); - - - - - - - - - -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["registerThemingParticipant"])((theme, collector) => { - function getColorGraceful(name) { - const color = theme.getColor(name); - return color ? color.toString() : 'transparent'; - } - collector.addRule(`.monaco-editor .snippet-placeholder { background-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["snippetTabstopHighlightBackground"])}; outline-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["snippetTabstopHighlightBorder"])}; }`); - collector.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["snippetFinalTabstopHighlightBackground"])}; outline-color: ${getColorGraceful(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["snippetFinalTabstopHighlightBorder"])}; }`); -}); -class OneSnippet { - constructor(editor, snippet, offset) { - this._nestingLevel = 1; - this._editor = editor; - this._snippet = snippet; - this._offset = offset; - this._placeholderGroups = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["groupBy"])(snippet.placeholders, _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Placeholder"].compareByIndex); - this._placeholderGroupsIdx = -1; - } - dispose() { - if (this._placeholderDecorations) { - this._editor.deltaDecorations([...this._placeholderDecorations.values()], []); - } - this._placeholderGroups.length = 0; - } - _initDecorations() { - if (this._placeholderDecorations) { - // already initialized - return; - } - this._placeholderDecorations = new Map(); - const model = this._editor.getModel(); - this._editor.changeDecorations(accessor => { - // create a decoration for each placeholder - for (const placeholder of this._snippet.placeholders) { - const placeholderOffset = this._snippet.offset(placeholder); - const placeholderLen = this._snippet.fullLen(placeholder); - const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].fromPositions(model.getPositionAt(this._offset + placeholderOffset), model.getPositionAt(this._offset + placeholderOffset + placeholderLen)); - const options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive; - const handle = accessor.addDecoration(range, options); - this._placeholderDecorations.set(placeholder, handle); - } - }); - } - move(fwd) { - if (!this._editor.hasModel()) { - return []; - } - this._initDecorations(); - // Transform placeholder text if necessary - if (this._placeholderGroupsIdx >= 0) { - let operations = []; - for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { - // Check if the placeholder has a transformation - if (placeholder.transform) { - const id = this._placeholderDecorations.get(placeholder); - const range = this._editor.getModel().getDecorationRange(id); - const currentValue = this._editor.getModel().getValueInRange(range); - operations.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__["EditOperation"].replaceMove(range, placeholder.transform.resolve(currentValue))); - } - } - if (operations.length > 0) { - this._editor.executeEdits('snippet.placeholderTransform', operations); - } - } - let couldSkipThisPlaceholder = false; - if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { - this._placeholderGroupsIdx += 1; - couldSkipThisPlaceholder = true; +class BaseDropdown extends _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["ActionRunner"] { + constructor(container, options) { + super(); + this._onDidChangeVisibility = new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); + this.onDidChangeVisibility = this._onDidChangeVisibility.event; + this._element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-dropdown')); + this._label = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this._element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.dropdown-label')); + let labelRenderer = options.labelRenderer; + if (!labelRenderer) { + labelRenderer = (container) => { + container.textContent = options.label || ''; + return null; + }; } - else if (fwd === false && this._placeholderGroupsIdx > 0) { - this._placeholderGroupsIdx -= 1; - couldSkipThisPlaceholder = true; + for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].CLICK, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].Tap]) { + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this.element, event, e => _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true))); // prevent default click behaviour to trigger } - else { - // the selection of the current placeholder might - // not acurate any more -> simply restore it - } - const newSelections = this._editor.getModel().changeDecorations(accessor => { - const activePlaceholders = new Set(); - // change stickiness to always grow when typing at its edges - // because these decorations represent the currently active - // tabstop. - // Special case #1: reaching the final tabstop - // Special case #2: placeholders enclosing active placeholders - const selections = []; - for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { - const id = this._placeholderDecorations.get(placeholder); - const range = this._editor.getModel().getDecorationRange(id); - selections.push(new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"](range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); - // consider to skip this placeholder index when the decoration - // range is empty but when the placeholder wasn't. that's a strong - // hint that the placeholder has been deleted. (all placeholder must match this) - couldSkipThisPlaceholder = couldSkipThisPlaceholder && this._hasPlaceholderBeenCollapsed(placeholder); - accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); - activePlaceholders.add(placeholder); - for (const enclosingPlaceholder of this._snippet.enclosingPlaceholders(placeholder)) { - const id = this._placeholderDecorations.get(enclosingPlaceholder); - accessor.changeDecorationOptions(id, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); - activePlaceholders.add(enclosingPlaceholder); + for (const event of [_dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].MOUSE_DOWN, _touch_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].Tap]) { + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this._label, event, e => { + if (e instanceof MouseEvent && e.detail > 1) { + return; // prevent multiple clicks to open multiple context menus (https://github.com/Microsoft/vscode/issues/41363) } - } - // change stickness to never grow when typing at its edges - // so that in-active tabstops never grow - for (const [placeholder, id] of this._placeholderDecorations) { - if (!activePlaceholders.has(placeholder)) { - accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive); + if (this.visible) { + this.hide(); } - } - return selections; - }); - return !couldSkipThisPlaceholder ? newSelections !== null && newSelections !== void 0 ? newSelections : [] : this.move(fwd); - } - _hasPlaceholderBeenCollapsed(placeholder) { - // A placeholder is empty when it wasn't empty when authored but - // when its tracking decoration is empty. This also applies to all - // potential parent placeholders - let marker = placeholder; - while (marker) { - if (marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Placeholder"]) { - const id = this._placeholderDecorations.get(marker); - const range = this._editor.getModel().getDecorationRange(id); - if (range.isEmpty() && marker.toString().length > 0) { - return true; + else { + this.show(); } - } - marker = marker.parent; + })); } - return false; - } - get isAtFirstPlaceholder() { - return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0; - } - get isAtLastPlaceholder() { - return this._placeholderGroupsIdx === this._placeholderGroups.length - 1; - } - get hasPlaceholder() { - return this._snippet.placeholders.length > 0; - } - computePossibleSelections() { - const result = new Map(); - for (const placeholdersWithEqualIndex of this._placeholderGroups) { - let ranges; - for (const placeholder of placeholdersWithEqualIndex) { - if (placeholder.isFinalTabstop) { - // ignore those - break; - } - if (!ranges) { - ranges = []; - result.set(placeholder.index, ranges); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addDisposableListener"])(this._label, _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventType"].KEY_UP, e => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_4__["StandardKeyboardEvent"](e); + if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["EventHelper"].stop(e, true); // https://github.com/Microsoft/vscode/issues/57997 + if (this.visible) { + this.hide(); } - const id = this._placeholderDecorations.get(placeholder); - const range = this._editor.getModel().getDecorationRange(id); - if (!range) { - // one of the placeholder lost its decoration and - // therefore we bail out and pretend the placeholder - // (with its mirrors) doesn't exist anymore. - result.delete(placeholder.index); - break; + else { + this.show(); } - ranges.push(range); } + })); + const cleanupFn = labelRenderer(this._label); + if (cleanupFn) { + this._register(cleanupFn); } - return result; + this._register(_touch_js__WEBPACK_IMPORTED_MODULE_1__["Gesture"].addTarget(this._label)); } - get choice() { - return this._placeholderGroups[this._placeholderGroupsIdx][0].choice; - } - merge(others) { - const model = this._editor.getModel(); - this._nestingLevel *= 10; - this._editor.changeDecorations(accessor => { - // For each active placeholder take one snippet and merge it - // in that the placeholder (can be many for `$1foo$1foo`). Because - // everything is sorted by editor selection we can simply remove - // elements from the beginning of the array - for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { - const nested = others.shift(); - console.assert(!nested._placeholderDecorations); - // Massage placeholder-indicies of the nested snippet to be - // sorted right after the insertion point. This ensures we move - // through the placeholders in the correct order - const indexLastPlaceholder = nested._snippet.placeholderInfo.last.index; - for (const nestedPlaceholder of nested._snippet.placeholderInfo.all) { - if (nestedPlaceholder.isFinalTabstop) { - nestedPlaceholder.index = placeholder.index + ((indexLastPlaceholder + 1) / this._nestingLevel); - } - else { - nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / this._nestingLevel); - } - } - this._snippet.replace(placeholder, nested._snippet.children); - // Remove the placeholder at which position are inserting - // the snippet and also remove its decoration. - const id = this._placeholderDecorations.get(placeholder); - accessor.removeDecoration(id); - this._placeholderDecorations.delete(placeholder); - // For each *new* placeholder we create decoration to monitor - // how and if it grows/shrinks. - for (const placeholder of nested._snippet.placeholders) { - const placeholderOffset = nested._snippet.offset(placeholder); - const placeholderLen = nested._snippet.fullLen(placeholder); - const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].fromPositions(model.getPositionAt(nested._offset + placeholderOffset), model.getPositionAt(nested._offset + placeholderOffset + placeholderLen)); - const handle = accessor.addDecoration(range, OneSnippet._decor.inactive); - this._placeholderDecorations.set(placeholder, handle); - } - } - // Last, re-create the placeholder groups by sorting placeholders by their index. - this._placeholderGroups = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["groupBy"])(this._snippet.placeholders, _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Placeholder"].compareByIndex); - }); + get element() { + return this._element; } -} -OneSnippet._decor = { - active: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__["ModelDecorationOptions"].register({ stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }), - inactive: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__["ModelDecorationOptions"].register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }), - activeFinal: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__["ModelDecorationOptions"].register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }), - inactiveFinal: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_7__["ModelDecorationOptions"].register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }), -}; -const _defaultOptions = { - overwriteBefore: 0, - overwriteAfter: 0, - adjustWhitespace: true, - clipboardText: undefined, - overtypingCapturer: undefined -}; -class SnippetSession { - constructor(editor, template, options = _defaultOptions) { - this._templateMerges = []; - this._snippets = []; - this._editor = editor; - this._template = template; - this._options = options; - } - static adjustWhitespace(model, position, snippet, adjustIndentation, adjustNewlines) { - const line = model.getLineContent(position.lineNumber); - const lineLeadingWhitespace = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"])(line, 0, position.column - 1); - snippet.walk(marker => { - if (marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Text"] && !(marker.parent instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Choice"])) { - // adjust indentation of text markers, except for choise elements - // which get adjusted when being selected - const lines = marker.value.split(/\r\n|\r|\n/); - if (adjustIndentation) { - for (let i = 1; i < lines.length; i++) { - let templateLeadingWhitespace = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["getLeadingWhitespace"])(lines[i]); - lines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + lines[i].substr(templateLeadingWhitespace.length); - } - } - if (adjustNewlines) { - const newValue = lines.join(model.getEOL()); - if (newValue !== marker.value) { - marker.parent.replace(marker, [new _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["Text"](newValue)]); - } - } - } - return true; - }); + show() { + if (!this.visible) { + this.visible = true; + this._onDidChangeVisibility.fire(true); + } } - static adjustSelection(model, selection, overwriteBefore, overwriteAfter) { - if (overwriteBefore !== 0 || overwriteAfter !== 0) { - // overwrite[Before|After] is compute using the position, not the whole - // selection. therefore we adjust the selection around that position - const { positionLineNumber, positionColumn } = selection; - const positionColumnBefore = positionColumn - overwriteBefore; - const positionColumnAfter = positionColumn + overwriteAfter; - const range = model.validateRange({ - startLineNumber: positionLineNumber, - startColumn: positionColumnBefore, - endLineNumber: positionLineNumber, - endColumn: positionColumnAfter - }); - selection = _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"].createWithDirection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn, selection.getDirection()); - } - return selection; - } - static createEditsAndSnippets(editor, template, overwriteBefore, overwriteAfter, enforceFinalTabstop, adjustWhitespace, clipboardText, overtypingCapturer) { - const edits = []; - const snippets = []; - if (!editor.hasModel()) { - return { edits, snippets }; - } - const model = editor.getModel(); - const workspaceService = editor.invokeWithinContext(accessor => accessor.get(_platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_8__["IWorkspaceContextService"], _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__["optional"])); - const modelBasedVariableResolver = editor.invokeWithinContext(accessor => new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["ModelBasedVariableResolver"](accessor.get(_platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_14__["ILabelService"], _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__["optional"]), model)); - const readClipboardText = () => clipboardText; - let delta = 0; - // know what text the overwrite[Before|After] extensions - // of the primary curser have selected because only when - // secondary selections extend to the same text we can grow them - let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0)); - let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter)); - // remember the first non-whitespace column to decide if - // `keepWhitespace` should be overruled for secondary selections - let firstLineFirstNonWhitespace = model.getLineFirstNonWhitespaceColumn(editor.getSelection().positionLineNumber); - // sort selections by their start position but remeber - // the original index. that allows you to create correct - // offset-based selection logic without changing the - // primary selection - const indexedSelections = editor.getSelections() - .map((selection, idx) => ({ selection, idx })) - .sort((a, b) => _common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts(a.selection, b.selection)); - for (const { selection, idx } of indexedSelections) { - // extend selection with the `overwriteBefore` and `overwriteAfter` and then - // compare if this matches the extensions of the primary selection - let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0); - let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter); - if (firstBeforeText !== model.getValueInRange(extensionBefore)) { - extensionBefore = selection; - } - if (firstAfterText !== model.getValueInRange(extensionAfter)) { - extensionAfter = selection; - } - // merge the before and after selection into one - const snippetSelection = selection - .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn) - .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn); - const snippet = new _snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["SnippetParser"]().parse(template, true, enforceFinalTabstop); - // adjust the template string to match the indentation and - // whitespace rules of this insert location (can be different for each cursor) - // happens when being asked for (default) or when this is a secondary - // cursor and the leading whitespace is different - const start = snippetSelection.getStartPosition(); - SnippetSession.adjustWhitespace(model, start, snippet, adjustWhitespace || (idx > 0 && firstLineFirstNonWhitespace !== model.getLineFirstNonWhitespaceColumn(selection.positionLineNumber)), true); - snippet.resolveVariables(new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["CompositeSnippetVariableResolver"]([ - modelBasedVariableResolver, - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["ClipboardBasedVariableResolver"](readClipboardText, idx, indexedSelections.length, editor.getOption(62 /* multiCursorPaste */) === 'spread'), - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["SelectionBasedVariableResolver"](model, selection, idx, overtypingCapturer), - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["CommentBasedVariableResolver"](model, selection), - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["TimeBasedVariableResolver"], - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["WorkspaceBasedVariableResolver"](workspaceService), - new _snippetVariables_js__WEBPACK_IMPORTED_MODULE_11__["RandomBasedVariableResolver"], - ])); - const offset = model.getOffsetAt(start) + delta; - delta += snippet.toString().length - model.getValueLengthInRange(snippetSelection); - // store snippets with the index of their originating selection. - // that ensures the primiary cursor stays primary despite not being - // the one with lowest start position - edits[idx] = _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_4__["EditOperation"].replace(snippetSelection, snippet.toString()); - edits[idx].identifier = { major: idx, minor: 0 }; // mark the edit so only our undo edits will be used to generate end cursors - snippets[idx] = new OneSnippet(editor, snippet, offset); - } - return { edits, snippets }; + hide() { + if (this.visible) { + this.visible = false; + this._onDidChangeVisibility.fire(false); + } } dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._snippets); - } - _logInfo() { - return `template="${this._template}", merged_templates="${this._templateMerges.join(' -> ')}"`; - } - insert() { - if (!this._editor.hasModel()) { - return; + super.dispose(); + this.hide(); + if (this.boxContainer) { + this.boxContainer.remove(); + this.boxContainer = undefined; } - // make insert edit and start with first selections - const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, false, this._options.adjustWhitespace, this._options.clipboardText, this._options.overtypingCapturer); - this._snippets = snippets; - this._editor.executeEdits('snippet', edits, undoEdits => { - if (this._snippets[0].hasPlaceholder) { - return this._move(true); - } - else { - return undoEdits - .filter(edit => !!edit.identifier) // only use our undo edits - .map(edit => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"].fromPositions(edit.range.getEndPosition())); - } - }); - this._editor.revealRange(this._editor.getSelections()[0]); - } - merge(template, options = _defaultOptions) { - if (!this._editor.hasModel()) { - return; + if (this.contents) { + this.contents.remove(); + this.contents = undefined; + } + if (this._label) { + this._label.remove(); + this._label = undefined; } - this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, template]); - const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, options.overwriteBefore, options.overwriteAfter, true, options.adjustWhitespace, options.clipboardText, options.overtypingCapturer); - this._editor.executeEdits('snippet', edits, undoEdits => { - for (const snippet of this._snippets) { - snippet.merge(snippets); - } - console.assert(snippets.length === 0); - if (this._snippets[0].hasPlaceholder) { - return this._move(undefined); - } - else { - return (undoEdits - .filter(edit => !!edit.identifier) // only use our undo edits - .map(edit => _common_core_selection_js__WEBPACK_IMPORTED_MODULE_6__["Selection"].fromPositions(edit.range.getEndPosition()))); - } - }); } - next() { - const newSelections = this._move(true); - this._editor.setSelections(newSelections); - this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); +} +class DropdownMenu extends BaseDropdown { + constructor(container, options) { + super(container, options); + this._actions = []; + this._contextMenuProvider = options.contextMenuProvider; + this.actions = options.actions || []; + this.actionProvider = options.actionProvider; + this.menuClassName = options.menuClassName || ''; + this.menuAsChild = !!options.menuAsChild; } - prev() { - const newSelections = this._move(false); - this._editor.setSelections(newSelections); - this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition()); + set menuOptions(options) { + this._menuOptions = options; + } + get menuOptions() { + return this._menuOptions; } - _move(fwd) { - const selections = []; - for (const snippet of this._snippets) { - const oneSelection = snippet.move(fwd); - selections.push(...oneSelection); + get actions() { + if (this.actionProvider) { + return this.actionProvider.getActions(); } - return selections; + return this._actions; } - get isAtFirstPlaceholder() { - return this._snippets[0].isAtFirstPlaceholder; + set actions(actions) { + this._actions = actions; } - get isAtLastPlaceholder() { - return this._snippets[0].isAtLastPlaceholder; + show() { + super.show(); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(this.element, 'active'); + this._contextMenuProvider.showContextMenu({ + getAnchor: () => this.element, + getActions: () => this.actions, + getActionsContext: () => this.menuOptions ? this.menuOptions.context : null, + getActionViewItem: action => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(action) : undefined, + getKeyBinding: action => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(action) : undefined, + getMenuClassName: () => this.menuClassName, + onHide: () => this.onHide(), + actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined, + anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0 /* LEFT */, + domForShadowRoot: this.menuAsChild ? this.element : undefined + }); } - get hasPlaceholder() { - return this._snippets[0].hasPlaceholder; + hide() { + super.hide(); } - get choice() { - return this._snippets[0].choice; + onHide() { + this.hide(); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.element, 'active'); } - isSelectionWithinPlaceholders() { - if (!this.hasPlaceholder) { - return false; - } - const selections = this._editor.getSelections(); - if (selections.length < this._snippets.length) { - // this means we started snippet mode with N - // selections and have M (N > M) selections. - // So one snippet is without selection -> cancel - return false; +} + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js ***! + \**********************************************************************************************/ +/*! exports provided: DropdownMenuActionViewItem */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMenuActionViewItem", function() { return DropdownMenuActionViewItem; }); +/* harmony import */ var _dropdown_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); +/* harmony import */ var _dropdown_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropdown.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + + + + +class DropdownMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_3__["BaseActionViewItem"] { + constructor(action, menuActionsOrProvider, contextMenuProvider, options = {}) { + super(null, action, options); + this.options = options; + this._onDidChangeVisibility = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); + this.menuActionsOrProvider = menuActionsOrProvider; + this.contextMenuProvider = contextMenuProvider; + if (this.options.actionRunner) { + this.actionRunner = this.options.actionRunner; } - let allPossibleSelections = new Map(); - for (const snippet of this._snippets) { - const possibleSelections = snippet.computePossibleSelections(); - // for the first snippet find the placeholder (and its ranges) - // that contain at least one selection. for all remaining snippets - // the same placeholder (and their ranges) must be used. - if (allPossibleSelections.size === 0) { - for (const [index, ranges] of possibleSelections) { - ranges.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts); - for (const selection of selections) { - if (ranges[0].containsRange(selection)) { - allPossibleSelections.set(index, []); - break; - } - } - } - } - if (allPossibleSelections.size === 0) { - // return false if we couldn't associate a selection to - // this (the first) snippet - return false; + } + render(container) { + const labelRenderer = (el) => { + this.element = Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('a.action-label')); + const classNames = this.options.classNames ? Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_5__["asArray"])(this.options.classNames) : []; + // todo@aeschli: remove codicon, should come through `this.options.classNames` + if (!classNames.find(c => c === 'icon')) { + classNames.push('codicon'); } - // add selections from 'this' snippet so that we know all - // selections for this placeholder - allPossibleSelections.forEach((array, index) => { - array.push(...possibleSelections.get(index)); - }); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClasses"])(this.element, ...classNames); + this.element.tabIndex = 0; + this.element.setAttribute('role', 'button'); + this.element.setAttribute('aria-haspopup', 'true'); + this.element.setAttribute('aria-expanded', 'false'); + this.element.title = this._action.label || ''; + return null; + }; + const options = { + contextMenuProvider: this.contextMenuProvider, + labelRenderer: labelRenderer, + menuAsChild: this.options.menuAsChild + }; + // Render the DropdownMenu around a simple action to toggle it + if (Array.isArray(this.menuActionsOrProvider)) { + options.actions = this.menuActionsOrProvider; } - // sort selections (and later placeholder-ranges). then walk both - // arrays and make sure the placeholder-ranges contain the corresponding - // selection - selections.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts); - for (let [index, ranges] of allPossibleSelections) { - if (ranges.length !== selections.length) { - allPossibleSelections.delete(index); - continue; + else { + options.actionProvider = this.menuActionsOrProvider; + } + this.dropdownMenu = this._register(new _dropdown_js__WEBPACK_IMPORTED_MODULE_4__["DropdownMenu"](container, options)); + this._register(this.dropdownMenu.onDidChangeVisibility(visible => { + var _a; + (_a = this.element) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', `${visible}`); + this._onDidChangeVisibility.fire(visible); + })); + this.dropdownMenu.menuOptions = { + actionViewItemProvider: this.options.actionViewItemProvider, + actionRunner: this.actionRunner, + getKeyBinding: this.options.keybindingProvider, + context: this._context + }; + if (this.options.anchorAlignmentProvider) { + const that = this; + this.dropdownMenu.menuOptions = Object.assign(Object.assign({}, this.dropdownMenu.menuOptions), { get anchorAlignment() { + return that.options.anchorAlignmentProvider(); + } }); + } + } + setActionContext(newContext) { + super.setActionContext(newContext); + if (this.dropdownMenu) { + if (this.dropdownMenu.menuOptions) { + this.dropdownMenu.menuOptions.context = newContext; } - ranges.sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_5__["Range"].compareRangesUsingStarts); - for (let i = 0; i < ranges.length; i++) { - if (!ranges[i].containsRange(selections[i])) { - allPossibleSelections.delete(index); - continue; - } + else { + this.dropdownMenu.menuOptions = { context: newContext }; } } - // from all possible selections we have deleted those - // that don't match with the current selection. if we don't - // have any left, we don't have a selection anymore - return allPossibleSelections.size > 0; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetVariables.js ***! - \**************************************************************************************/ -/*! exports provided: CompositeSnippetVariableResolver, SelectionBasedVariableResolver, ModelBasedVariableResolver, ClipboardBasedVariableResolver, CommentBasedVariableResolver, TimeBasedVariableResolver, WorkspaceBasedVariableResolver, RandomBasedVariableResolver */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompositeSnippetVariableResolver", function() { return CompositeSnippetVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionBasedVariableResolver", function() { return SelectionBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModelBasedVariableResolver", function() { return ModelBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClipboardBasedVariableResolver", function() { return ClipboardBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommentBasedVariableResolver", function() { return CommentBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeBasedVariableResolver", function() { return TimeBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceBasedVariableResolver", function() { return WorkspaceBasedVariableResolver; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RandomBasedVariableResolver", function() { return RandomBasedVariableResolver; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/path.js */ "./node_modules/monaco-editor/esm/vs/base/common/path.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _snippetParser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./snippetParser.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/workspaces/common/workspaces.js */ "./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js"); -/* harmony import */ var _base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/labels.js */ "./node_modules/monaco-editor/esm/vs/base/common/labels.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css": +/*!***********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css ***! + \***********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./findInput.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_findInput_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js ***! + \**********************************************************************************/ +/*! exports provided: FindInput */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindInput", function() { return FindInput; }); +/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./findInputCheckboxes.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -218315,625 +73485,380 @@ __webpack_require__.r(__webpack_exports__); - -class CompositeSnippetVariableResolver { - constructor(_delegates) { - this._delegates = _delegates; - // - } - resolve(variable) { - for (const delegate of this._delegates) { - let value = delegate.resolve(variable); - if (value !== undefined) { - return value; +const NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('defaultLabel', "input"); +class FindInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__["Widget"] { + constructor(parent, contextViewProvider, _showOptionButtons, options) { + super(); + this._showOptionButtons = _showOptionButtons; + this.fixFocusOnOptionClickEnabled = true; + this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onDidOptionChange = this._onDidOptionChange.event; + this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onKeyDown = this._onKeyDown.event; + this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onMouseDown = this._onMouseDown.event; + this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this._onCaseSensitiveKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onCaseSensitiveKeyDown = this._onCaseSensitiveKeyDown.event; + this._onRegexKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onRegexKeyDown = this._onRegexKeyDown.event; + this._lastHighlightFindOptions = 0; + this.contextViewProvider = contextViewProvider; + this.placeholder = options.placeholder || ''; + this.validation = options.validation; + this.label = options.label || NLS_DEFAULT_LABEL; + this.inputActiveOptionBorder = options.inputActiveOptionBorder; + this.inputActiveOptionForeground = options.inputActiveOptionForeground; + this.inputActiveOptionBackground = options.inputActiveOptionBackground; + this.inputBackground = options.inputBackground; + this.inputForeground = options.inputForeground; + this.inputBorder = options.inputBorder; + this.inputValidationInfoBorder = options.inputValidationInfoBorder; + this.inputValidationInfoBackground = options.inputValidationInfoBackground; + this.inputValidationInfoForeground = options.inputValidationInfoForeground; + this.inputValidationWarningBorder = options.inputValidationWarningBorder; + this.inputValidationWarningBackground = options.inputValidationWarningBackground; + this.inputValidationWarningForeground = options.inputValidationWarningForeground; + this.inputValidationErrorBorder = options.inputValidationErrorBorder; + this.inputValidationErrorBackground = options.inputValidationErrorBackground; + this.inputValidationErrorForeground = options.inputValidationErrorForeground; + const appendCaseSensitiveLabel = options.appendCaseSensitiveLabel || ''; + const appendWholeWordsLabel = options.appendWholeWordsLabel || ''; + const appendRegexLabel = options.appendRegexLabel || ''; + const history = options.history || []; + const flexibleHeight = !!options.flexibleHeight; + const flexibleWidth = !!options.flexibleWidth; + const flexibleMaxHeight = options.flexibleMaxHeight; + this.domNode = document.createElement('div'); + _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'monaco-findInput'); + this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__["HistoryInputBox"](this.domNode, this.contextViewProvider, { + placeholder: this.placeholder || '', + ariaLabel: this.label || '', + validationOptions: { + validation: this.validation + }, + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder, + history, + flexibleHeight, + flexibleWidth, + flexibleMaxHeight + })); + this.regex = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["RegexCheckbox"]({ + appendTitle: appendRegexLabel, + isChecked: false, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })); + this._register(this.regex.onChange(viaKeyboard => { + this._onDidOptionChange.fire(viaKeyboard); + if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { + this.inputBox.focus(); } - } - return undefined; - } -} -class SelectionBasedVariableResolver { - constructor(_model, _selection, _selectionIdx, _overtypingCapturer) { - this._model = _model; - this._selection = _selection; - this._selectionIdx = _selectionIdx; - this._overtypingCapturer = _overtypingCapturer; - // - } - resolve(variable) { - const { name } = variable; - if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') { - let value = this._model.getValueInRange(this._selection) || undefined; - let isMultiline = this._selection.startLineNumber !== this._selection.endLineNumber; - // If there was no selected text, try to get last overtyped text - if (!value && this._overtypingCapturer) { - const info = this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx); - if (info) { - value = info.value; - isMultiline = info.multiline; - } + this.validate(); + })); + this._register(this.regex.onKeyDown(e => { + this._onRegexKeyDown.fire(e); + })); + this.wholeWords = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["WholeWordsCheckbox"]({ + appendTitle: appendWholeWordsLabel, + isChecked: false, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })); + this._register(this.wholeWords.onChange(viaKeyboard => { + this._onDidOptionChange.fire(viaKeyboard); + if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { + this.inputBox.focus(); } - if (value && isMultiline && variable.snippet) { - // Selection is a multiline string which we indentation we now - // need to adjust. We compare the indentation of this variable - // with the indentation at the editor position and add potential - // extra indentation to the value - const line = this._model.getLineContent(this._selection.startLineNumber); - const lineLeadingWhitespace = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["getLeadingWhitespace"])(line, 0, this._selection.startColumn - 1); - let varLeadingWhitespace = lineLeadingWhitespace; - variable.snippet.walk(marker => { - if (marker === variable) { - return false; + this.validate(); + })); + this.caseSensitive = this._register(new _findInputCheckboxes_js__WEBPACK_IMPORTED_MODULE_6__["CaseSensitiveCheckbox"]({ + appendTitle: appendCaseSensitiveLabel, + isChecked: false, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground + })); + this._register(this.caseSensitive.onChange(viaKeyboard => { + this._onDidOptionChange.fire(viaKeyboard); + if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { + this.inputBox.focus(); + } + this.validate(); + })); + this._register(this.caseSensitive.onKeyDown(e => { + this._onCaseSensitiveKeyDown.fire(e); + })); + if (this._showOptionButtons) { + this.inputBox.paddingRight = this.caseSensitive.width() + this.wholeWords.width() + this.regex.width(); + } + // Arrow-Key support to navigate between options + let indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode]; + this.onkeydown(this.domNode, (event) => { + if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) { + let index = indexes.indexOf(document.activeElement); + if (index >= 0) { + let newIndex = -1; + if (event.equals(17 /* RightArrow */)) { + newIndex = (index + 1) % indexes.length; + } + else if (event.equals(15 /* LeftArrow */)) { + if (index === 0) { + newIndex = indexes.length - 1; + } + else { + newIndex = index - 1; + } } - if (marker instanceof _snippetParser_js__WEBPACK_IMPORTED_MODULE_3__["Text"]) { - varLeadingWhitespace = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["getLeadingWhitespace"])(marker.value.split(/\r\n|\r|\n/).pop()); + if (event.equals(9 /* Escape */)) { + indexes[index].blur(); } - return true; - }); - const whitespaceCommonLength = Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["commonPrefixLength"])(varLeadingWhitespace, lineLeadingWhitespace); - value = value.replace(/(\r\n|\r|\n)(.*)/g, (m, newline, rest) => `${newline}${varLeadingWhitespace.substr(whitespaceCommonLength)}${rest}`); + else if (newIndex >= 0) { + indexes[newIndex].focus(); + } + _dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); + } } - return value; - } - else if (name === 'TM_CURRENT_LINE') { - return this._model.getLineContent(this._selection.positionLineNumber); - } - else if (name === 'TM_CURRENT_WORD') { - const info = this._model.getWordAtPosition({ - lineNumber: this._selection.positionLineNumber, - column: this._selection.positionColumn - }); - return info && info.word || undefined; - } - else if (name === 'TM_LINE_INDEX') { - return String(this._selection.positionLineNumber - 1); - } - else if (name === 'TM_LINE_NUMBER') { - return String(this._selection.positionLineNumber); + }); + let controls = document.createElement('div'); + controls.className = 'controls'; + controls.style.display = this._showOptionButtons ? 'block' : 'none'; + controls.appendChild(this.caseSensitive.domNode); + controls.appendChild(this.wholeWords.domNode); + controls.appendChild(this.regex.domNode); + this.domNode.appendChild(controls); + if (parent) { + parent.appendChild(this.domNode); } - return undefined; + this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); + this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); + this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); + this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); } -} -class ModelBasedVariableResolver { - constructor(_labelService, _model) { - this._labelService = _labelService; - this._model = _model; - // + enable() { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'disabled'); + this.inputBox.enable(); + this.regex.enable(); + this.wholeWords.enable(); + this.caseSensitive.enable(); } - resolve(variable) { - const { name } = variable; - if (name === 'TM_FILENAME') { - return _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["basename"](this._model.uri.fsPath); - } - else if (name === 'TM_FILENAME_BASE') { - const name = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["basename"](this._model.uri.fsPath); - const idx = name.lastIndexOf('.'); - if (idx <= 0) { - return name; - } - else { - return name.slice(0, idx); - } - } - else if (name === 'TM_DIRECTORY' && this._labelService) { - if (_base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["dirname"](this._model.uri.fsPath) === '.') { - return ''; - } - return this._labelService.getUriLabel(Object(_base_common_resources_js__WEBPACK_IMPORTED_MODULE_2__["dirname"])(this._model.uri)); - } - else if (name === 'TM_FILEPATH' && this._labelService) { - return this._labelService.getUriLabel(this._model.uri); - } - return undefined; + disable() { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'disabled'); + this.inputBox.disable(); + this.regex.disable(); + this.wholeWords.disable(); + this.caseSensitive.disable(); } -} -class ClipboardBasedVariableResolver { - constructor(_readClipboardText, _selectionIdx, _selectionCount, _spread) { - this._readClipboardText = _readClipboardText; - this._selectionIdx = _selectionIdx; - this._selectionCount = _selectionCount; - this._spread = _spread; - // + setFocusInputOnOptionClick(value) { + this.fixFocusOnOptionClickEnabled = value; } - resolve(variable) { - if (variable.name !== 'CLIPBOARD') { - return undefined; - } - const clipboardText = this._readClipboardText(); - if (!clipboardText) { - return undefined; + setEnabled(enabled) { + if (enabled) { + this.enable(); } - // `spread` is assigning each cursor a line of the clipboard - // text whenever there the line count equals the cursor count - // and when enabled - if (this._spread) { - const lines = clipboardText.split(/\r\n|\n|\r/).filter(s => !Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_5__["isFalsyOrWhitespace"])(s)); - if (lines.length === this._selectionCount) { - return lines[this._selectionIdx]; - } + else { + this.disable(); } - return clipboardText; } -} -class CommentBasedVariableResolver { - constructor(_model, _selection) { - this._model = _model; - this._selection = _selection; - // + getValue() { + return this.inputBox.value; } - resolve(variable) { - const { name } = variable; - const langId = this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber, this._selection.selectionStartColumn); - const config = _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_4__["LanguageConfigurationRegistry"].getComments(langId); - if (!config) { - return undefined; - } - if (name === 'LINE_COMMENT') { - return config.lineCommentToken || undefined; - } - else if (name === 'BLOCK_COMMENT_START') { - return config.blockCommentStartToken || undefined; - } - else if (name === 'BLOCK_COMMENT_END') { - return config.blockCommentEndToken || undefined; + setValue(value) { + if (this.inputBox.value !== value) { + this.inputBox.value = value; } - return undefined; } -} -class TimeBasedVariableResolver { - resolve(variable) { - const { name } = variable; - if (name === 'CURRENT_YEAR') { - return String(new Date().getFullYear()); - } - else if (name === 'CURRENT_YEAR_SHORT') { - return String(new Date().getFullYear()).slice(-2); - } - else if (name === 'CURRENT_MONTH') { - return String(new Date().getMonth().valueOf() + 1).padStart(2, '0'); - } - else if (name === 'CURRENT_DATE') { - return String(new Date().getDate().valueOf()).padStart(2, '0'); - } - else if (name === 'CURRENT_HOUR') { - return String(new Date().getHours().valueOf()).padStart(2, '0'); - } - else if (name === 'CURRENT_MINUTE') { - return String(new Date().getMinutes().valueOf()).padStart(2, '0'); - } - else if (name === 'CURRENT_SECOND') { - return String(new Date().getSeconds().valueOf()).padStart(2, '0'); - } - else if (name === 'CURRENT_DAY_NAME') { - return TimeBasedVariableResolver.dayNames[new Date().getDay()]; - } - else if (name === 'CURRENT_DAY_NAME_SHORT') { - return TimeBasedVariableResolver.dayNamesShort[new Date().getDay()]; - } - else if (name === 'CURRENT_MONTH_NAME') { - return TimeBasedVariableResolver.monthNames[new Date().getMonth()]; - } - else if (name === 'CURRENT_MONTH_NAME_SHORT') { - return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()]; - } - else if (name === 'CURRENT_SECONDS_UNIX') { - return String(Math.floor(Date.now() / 1000)); + style(styles) { + this.inputActiveOptionBorder = styles.inputActiveOptionBorder; + this.inputActiveOptionForeground = styles.inputActiveOptionForeground; + this.inputActiveOptionBackground = styles.inputActiveOptionBackground; + this.inputBackground = styles.inputBackground; + this.inputForeground = styles.inputForeground; + this.inputBorder = styles.inputBorder; + this.inputValidationInfoBackground = styles.inputValidationInfoBackground; + this.inputValidationInfoForeground = styles.inputValidationInfoForeground; + this.inputValidationInfoBorder = styles.inputValidationInfoBorder; + this.inputValidationWarningBackground = styles.inputValidationWarningBackground; + this.inputValidationWarningForeground = styles.inputValidationWarningForeground; + this.inputValidationWarningBorder = styles.inputValidationWarningBorder; + this.inputValidationErrorBackground = styles.inputValidationErrorBackground; + this.inputValidationErrorForeground = styles.inputValidationErrorForeground; + this.inputValidationErrorBorder = styles.inputValidationErrorBorder; + this.applyStyles(); + } + applyStyles() { + if (this.domNode) { + const checkBoxStyles = { + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground, + }; + this.regex.style(checkBoxStyles); + this.wholeWords.style(checkBoxStyles); + this.caseSensitive.style(checkBoxStyles); + const inputBoxStyles = { + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder + }; + this.inputBox.style(inputBoxStyles); } - return undefined; } -} -TimeBasedVariableResolver.dayNames = [_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Sunday', "Sunday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Monday', "Monday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Tuesday', "Tuesday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Wednesday', "Wednesday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Thursday', "Thursday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Friday', "Friday"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('Saturday', "Saturday")]; -TimeBasedVariableResolver.dayNamesShort = [_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('SundayShort', "Sun"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('MondayShort', "Mon"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('TuesdayShort', "Tue"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('WednesdayShort', "Wed"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('ThursdayShort', "Thu"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('FridayShort', "Fri"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('SaturdayShort', "Sat")]; -TimeBasedVariableResolver.monthNames = [_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('January', "January"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('February', "February"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('March', "March"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('April', "April"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('May', "May"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('June', "June"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('July', "July"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('August', "August"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('September', "September"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('October', "October"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('November', "November"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('December', "December")]; -TimeBasedVariableResolver.monthNamesShort = [_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('JanuaryShort', "Jan"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('FebruaryShort', "Feb"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('MarchShort', "Mar"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('AprilShort', "Apr"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('MayShort', "May"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('JuneShort', "Jun"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('JulyShort', "Jul"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('AugustShort', "Aug"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('SeptemberShort', "Sep"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('OctoberShort', "Oct"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('NovemberShort', "Nov"), _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('DecemberShort', "Dec")]; -class WorkspaceBasedVariableResolver { - constructor(_workspaceService) { - this._workspaceService = _workspaceService; - // + select() { + this.inputBox.select(); } - resolve(variable) { - if (!this._workspaceService) { - return undefined; - } - const workspaceIdentifier = Object(_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__["toWorkspaceIdentifier"])(this._workspaceService.getWorkspace()); - if (!workspaceIdentifier) { - return undefined; - } - if (variable.name === 'WORKSPACE_NAME') { - return this._resolveWorkspaceName(workspaceIdentifier); - } - else if (variable.name === 'WORKSPACE_FOLDER') { - return this._resoveWorkspacePath(workspaceIdentifier); - } - return undefined; + focus() { + this.inputBox.focus(); } - _resolveWorkspaceName(workspaceIdentifier) { - if (Object(_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__["isSingleFolderWorkspaceIdentifier"])(workspaceIdentifier)) { - return _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["basename"](workspaceIdentifier.path); - } - let filename = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["basename"](workspaceIdentifier.configPath.path); - if (filename.endsWith(_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__["WORKSPACE_EXTENSION"])) { - filename = filename.substr(0, filename.length - _platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__["WORKSPACE_EXTENSION"].length - 1); - } - return filename; + getCaseSensitive() { + return this.caseSensitive.checked; } - _resoveWorkspacePath(workspaceIdentifier) { - if (Object(_platform_workspaces_common_workspaces_js__WEBPACK_IMPORTED_MODULE_6__["isSingleFolderWorkspaceIdentifier"])(workspaceIdentifier)) { - return Object(_base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__["normalizeDriveLetter"])(workspaceIdentifier.fsPath); - } - let filename = _base_common_path_js__WEBPACK_IMPORTED_MODULE_1__["basename"](workspaceIdentifier.configPath.path); - let folderpath = workspaceIdentifier.configPath.fsPath; - if (folderpath.endsWith(filename)) { - folderpath = folderpath.substr(0, folderpath.length - filename.length - 1); - } - return (folderpath ? Object(_base_common_labels_js__WEBPACK_IMPORTED_MODULE_7__["normalizeDriveLetter"])(folderpath) : '/'); + setCaseSensitive(value) { + this.caseSensitive.checked = value; } -} -class RandomBasedVariableResolver { - resolve(variable) { - const { name } = variable; - if (name === 'RANDOM') { - return Math.random().toString().slice(-6); - } - else if (name === 'RANDOM_HEX') { - return Math.random().toString(16).slice(-6); - } - return undefined; + getWholeWords() { + return this.wholeWords.checked; + } + setWholeWords(value) { + this.wholeWords.checked = value; + } + getRegex() { + return this.regex.checked; + } + setRegex(value) { + this.regex.checked = value; + this.validate(); + } + focusOnCaseSensitive() { + this.caseSensitive.focus(); + } + highlightFindOptions() { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'highlight-' + (this._lastHighlightFindOptions)); + this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions; + _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'highlight-' + (this._lastHighlightFindOptions)); + } + validate() { + this.inputBox.validate(); + } + clearMessage() { + this.inputBox.hideMessage(); } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js ***! - \*************************************************************************************/ -/*! exports provided: LineContext, CompletionModel */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputCheckboxes.js ***! + \********************************************************************************************/ +/*! exports provided: CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineContext", function() { return LineContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionModel", function() { return CompletionModel; }); -/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CaseSensitiveCheckbox", function() { return CaseSensitiveCheckbox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WholeWordsCheckbox", function() { return WholeWordsCheckbox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegexCheckbox", function() { return RegexCheckbox; }); +/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../checkbox/checkbox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -class LineContext { - constructor(leadingLineContent, characterCountDelta) { - this.leadingLineContent = leadingLineContent; - this.characterCountDelta = characterCountDelta; + +const NLS_CASE_SENSITIVE_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('caseDescription', "Match Case"); +const NLS_WHOLE_WORD_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('wordsDescription', "Match Whole Word"); +const NLS_REGEX_CHECKBOX_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('regexDescription', "Use Regular Expression"); +class CaseSensitiveCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { + constructor(opts) { + super({ + icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].caseSensitive, + title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle, + isChecked: opts.isChecked, + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionForeground: opts.inputActiveOptionForeground, + inputActiveOptionBackground: opts.inputActiveOptionBackground + }); } } -/** - * Sorted, filtered completion view model - * */ -class CompletionModel { - constructor(items, column, lineContext, wordDistance, options, snippetSuggestions, clipboardText) { - this.clipboardText = clipboardText; - this._snippetCompareFn = CompletionModel._compareCompletionItems; - this._items = items; - this._column = column; - this._wordDistance = wordDistance; - this._options = options; - this._refilterKind = 1 /* All */; - this._lineContext = lineContext; - if (snippetSuggestions === 'top') { - this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsUp; - } - else if (snippetSuggestions === 'bottom') { - this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsDown; - } - } - get lineContext() { - return this._lineContext; - } - set lineContext(value) { - if (this._lineContext.leadingLineContent !== value.leadingLineContent - || this._lineContext.characterCountDelta !== value.characterCountDelta) { - this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? 2 /* Incr */ : 1 /* All */; - this._lineContext = value; - } - } - get items() { - this._ensureCachedState(); - return this._filteredItems; - } - get allProvider() { - this._ensureCachedState(); - return this._allProvider; - } - get incomplete() { - this._ensureCachedState(); - return this._isIncomplete; - } - adopt(except) { - let res = []; - for (let i = 0; i < this._items.length;) { - if (!except.has(this._items[i].provider)) { - res.push(this._items[i]); - // unordered removed - this._items[i] = this._items[this._items.length - 1]; - this._items.pop(); - } - else { - // continue with next item - i++; - } - } - this._refilterKind = 1 /* All */; - return res; - } - get stats() { - this._ensureCachedState(); - return this._stats; - } - _ensureCachedState() { - if (this._refilterKind !== 0 /* Nothing */) { - this._createCachedState(); - } - } - _createCachedState() { - this._isIncomplete = new Set(); - this._allProvider = new Set(); - this._stats = { suggestionCount: 0, snippetCount: 0, textCount: 0 }; - const { leadingLineContent, characterCountDelta } = this._lineContext; - let word = ''; - let wordLow = ''; - // incrementally filter less - const source = this._refilterKind === 1 /* All */ ? this._items : this._filteredItems; - const target = []; - // picks a score function based on the number of - // items that we have to score/filter and based on the - // user-configuration - const scoreFn = (!this._options.filterGraceful || source.length > 2000) ? _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__["fuzzyScore"] : _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__["fuzzyScoreGracefulAggressive"]; - for (let i = 0; i < source.length; i++) { - const item = source[i]; - if (item.isInvalid) { - continue; // SKIP invalid items - } - // collect those supports that signaled having - // an incomplete result - if (item.container.incomplete) { - this._isIncomplete.add(item.provider); - } - this._allProvider.add(item.provider); - // 'word' is that remainder of the current line that we - // filter and score against. In theory each suggestion uses a - // different word, but in practice not - that's why we cache - const overwriteBefore = item.position.column - item.editStart.column; - const wordLen = overwriteBefore + characterCountDelta - (item.position.column - this._column); - if (word.length !== wordLen) { - word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); - wordLow = word.toLowerCase(); - } - // remember the word against which this item was - // scored - item.word = word; - if (wordLen === 0) { - // when there is nothing to score against, don't - // event try to do. Use a const rank and rely on - // the fallback-sort using the initial sort order. - // use a score of `-100` because that is out of the - // bound of values `fuzzyScore` will return - item.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__["FuzzyScore"].Default; - } - else { - // skip word characters that are whitespace until - // we have hit the replace range (overwriteBefore) - let wordPos = 0; - while (wordPos < overwriteBefore) { - const ch = word.charCodeAt(wordPos); - if (ch === 32 /* Space */ || ch === 9 /* Tab */) { - wordPos += 1; - } - else { - break; - } - } - const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name; - if (wordPos >= wordLen) { - // the wordPos at which scoring starts is the whole word - // and therefore the same rules as not having a word apply - item.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__["FuzzyScore"].Default; - } - else if (typeof item.completion.filterText === 'string') { - // when there is a `filterText` it must match the `word`. - // if it matches we check with the label to compute highlights - // and if that doesn't yield a result we have no highlights, - // despite having the match - let match = scoreFn(word, wordLow, wordPos, item.completion.filterText, item.filterTextLow, 0, false); - if (!match) { - continue; // NO match - } - if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["compareIgnoreCase"])(item.completion.filterText, textLabel) === 0) { - // filterText and label are actually the same -> use good highlights - item.score = match; - } - else { - // re-run the scorer on the label in the hope of a result BUT use the rank - // of the filterText-match - item.score = Object(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_0__["anyScore"])(word, wordLow, wordPos, textLabel, item.labelLow, 0); - item.score[0] = match[0]; // use score from filterText - } - } - else { - // by default match `word` against the `label` - let match = scoreFn(word, wordLow, wordPos, textLabel, item.labelLow, 0, false); - if (!match) { - continue; // NO match - } - item.score = match; - } - } - item.idx = i; - item.distance = this._wordDistance.distance(item.position, item.completion); - target.push(item); - // update stats - this._stats.suggestionCount++; - switch (item.completion.kind) { - case 27 /* Snippet */: - this._stats.snippetCount++; - break; - case 18 /* Text */: - this._stats.textCount++; - break; - } - } - this._filteredItems = target.sort(this._snippetCompareFn); - this._refilterKind = 0 /* Nothing */; - } - static _compareCompletionItems(a, b) { - if (a.score[0] > b.score[0]) { - return -1; - } - else if (a.score[0] < b.score[0]) { - return 1; - } - else if (a.distance < b.distance) { - return -1; - } - else if (a.distance > b.distance) { - return 1; - } - else if (a.idx < b.idx) { - return -1; - } - else if (a.idx > b.idx) { - return 1; - } - else { - return 0; - } - } - static _compareCompletionItemsSnippetsDown(a, b) { - if (a.completion.kind !== b.completion.kind) { - if (a.completion.kind === 27 /* Snippet */) { - return 1; - } - else if (b.completion.kind === 27 /* Snippet */) { - return -1; - } - } - return CompletionModel._compareCompletionItems(a, b); +class WholeWordsCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { + constructor(opts) { + super({ + icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].wholeWord, + title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle, + isChecked: opts.isChecked, + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionForeground: opts.inputActiveOptionForeground, + inputActiveOptionBackground: opts.inputActiveOptionBackground + }); } - static _compareCompletionItemsSnippetsUp(a, b) { - if (a.completion.kind !== b.completion.kind) { - if (a.completion.kind === 27 /* Snippet */) { - return -1; - } - else if (b.completion.kind === 27 /* Snippet */) { - return 1; - } - } - return CompletionModel._compareCompletionItems(a, b); +} +class RegexCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_0__["Checkbox"] { + constructor(opts) { + super({ + icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_2__["Codicon"].regex, + title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle, + isChecked: opts.isChecked, + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionForeground: opts.inputActiveOptionForeground, + inputActiveOptionBackground: opts.inputActiveOptionBackground + }); } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css ***! - \************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./suggest.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_suggest_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css ***! - \*********************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js ***! + \*************************************************************************************/ +/*! exports provided: PreserveCaseCheckbox, ReplaceInput */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_suggestStatusBar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./suggestStatusBar.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_suggestStatusBar_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_suggestStatusBar_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js ***! - \*****************************************************************************/ -/*! exports provided: Context, suggestWidgetStatusbarMenu, CompletionItem, CompletionOptions, getSnippetSuggestSupport, provideSuggestionItems, getSuggestionComparator, showSimpleSuggestions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "suggestWidgetStatusbarMenu", function() { return suggestWidgetStatusbarMenu; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionOptions", function() { return CompletionOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSnippetSuggestSupport", function() { return getSnippetSuggestSupport; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideSuggestionItems", function() { return provideSuggestionItems; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSuggestionComparator", function() { return getSuggestionComparator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSimpleSuggestions", function() { return showSimpleSuggestions; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../snippet/snippetParser.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreserveCaseCheckbox", function() { return PreserveCaseCheckbox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceInput", function() { return ReplaceInput; }); +/* harmony import */ var _findInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./findInput.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../inputbox/inputBox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../checkbox/checkbox.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; @@ -218942,403 +73867,255 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume - - - -const Context = { - Visible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestWidgetVisible', false), - DetailsVisible: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestWidgetDetailsVisible', false), - MultipleSuggestions: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestWidgetMultipleSuggestions', false), - MakesTextEdit: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestionMakesTextEdit', true), - AcceptSuggestionsOnEnter: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('acceptSuggestionOnEnter', true), - HasInsertAndReplaceRange: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestionHasInsertAndReplaceRange', false), - CanResolve: new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["RawContextKey"]('suggestionCanResolve', false), -}; -const suggestWidgetStatusbarMenu = new _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"]('suggestWidgetStatusBar'); -class CompletionItem { - constructor(position, completion, container, provider) { - this.position = position; - this.completion = completion; - this.container = container; - this.provider = provider; - // validation - this.isInvalid = false; - // sorting, filtering - this.score = _base_common_filters_js__WEBPACK_IMPORTED_MODULE_7__["FuzzyScore"].Default; - this.distance = 0; - this.textLabel = typeof completion.label === 'string' - ? completion.label - : completion.label.name; - // ensure lower-variants (perf) - this.labelLow = this.textLabel.toLowerCase(); - // validate label - this.isInvalid = !this.textLabel; - this.sortTextLow = completion.sortText && completion.sortText.toLowerCase(); - this.filterTextLow = completion.filterText && completion.filterText.toLowerCase(); - // normalize ranges - if (_common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].isIRange(completion.range)) { - this.editStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.startLineNumber, completion.range.startColumn); - this.editInsertEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.endLineNumber, completion.range.endColumn); - this.editReplaceEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.endLineNumber, completion.range.endColumn); - // validate range - this.isInvalid = this.isInvalid - || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].spansMultipleLines(completion.range) || completion.range.startLineNumber !== position.lineNumber; - } - else { - this.editStart = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.insert.startLineNumber, completion.range.insert.startColumn); - this.editInsertEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.insert.endLineNumber, completion.range.insert.endColumn); - this.editReplaceEnd = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_3__["Position"](completion.range.replace.endLineNumber, completion.range.replace.endColumn); - // validate ranges - this.isInvalid = this.isInvalid - || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].spansMultipleLines(completion.range.insert) || _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].spansMultipleLines(completion.range.replace) - || completion.range.insert.startLineNumber !== position.lineNumber || completion.range.replace.startLineNumber !== position.lineNumber - || completion.range.insert.startColumn !== completion.range.replace.startColumn; - } - // create the suggestion resolver - if (typeof provider.resolveCompletionItem !== 'function') { - this._resolveCache = Promise.resolve(); - this._isResolved = true; - } - } - // ---- resolving - get isResolved() { - return !!this._isResolved; - } - resolve(token) { - return __awaiter(this, void 0, void 0, function* () { - if (!this._resolveCache) { - const sub = token.onCancellationRequested(() => { - this._resolveCache = undefined; - this._isResolved = false; - }); - this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem(this.completion, token)).then(value => { - Object.assign(this.completion, value); - this._isResolved = true; - sub.dispose(); - }, err => { - if (Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["isPromiseCanceledError"])(err)) { - // the IPC queue will reject the request with the - // cancellation error -> reset cached - this._resolveCache = undefined; - this._isResolved = false; - } - }); - } - return this._resolveCache; +const NLS_DEFAULT_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('defaultLabel', "input"); +const NLS_PRESERVE_CASE_LABEL = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('label.preserveCaseCheckbox', "Preserve Case"); +class PreserveCaseCheckbox extends _checkbox_checkbox_js__WEBPACK_IMPORTED_MODULE_6__["Checkbox"] { + constructor(opts) { + super({ + // TODO: does this need its own icon? + icon: _common_codicons_js__WEBPACK_IMPORTED_MODULE_7__["Codicon"].preserveCase, + title: NLS_PRESERVE_CASE_LABEL + opts.appendTitle, + isChecked: opts.isChecked, + inputActiveOptionBorder: opts.inputActiveOptionBorder, + inputActiveOptionForeground: opts.inputActiveOptionForeground, + inputActiveOptionBackground: opts.inputActiveOptionBackground }); } } -class CompletionOptions { - constructor(snippetSortOrder = 2 /* Bottom */, kindFilter = new Set(), providerFilter = new Set()) { - this.snippetSortOrder = snippetSortOrder; - this.kindFilter = kindFilter; - this.providerFilter = providerFilter; - } -} -CompletionOptions.default = new CompletionOptions(); -let _snippetSuggestSupport; -function getSnippetSuggestSupport() { - return _snippetSuggestSupport; -} -class CompletionItemModel { - constructor(items, needsClipboard, dispoables) { - this.items = items; - this.needsClipboard = needsClipboard; - this.dispoables = dispoables; - } -} -function provideSuggestionItems(model, position, options = CompletionOptions.default, context = { triggerKind: 0 /* Invoke */ }, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__["CancellationToken"].None) { - return __awaiter(this, void 0, void 0, function* () { - // const t1 = Date.now(); - position = position.clone(); - const word = model.getWordAtPosition(position); - const defaultReplaceRange = word ? new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](position.lineNumber, word.startColumn, position.lineNumber, word.endColumn) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"].fromPositions(position); - const defaultRange = { replace: defaultReplaceRange, insert: defaultReplaceRange.setEndPosition(position.lineNumber, position.column) }; - const result = []; - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["DisposableStore"](); - let needsClipboard = false; - const onCompletionList = (provider, container) => { - if (!container) { - return; +class ReplaceInput extends _widget_js__WEBPACK_IMPORTED_MODULE_4__["Widget"] { + constructor(parent, contextViewProvider, _showOptionButtons, options) { + super(); + this._showOptionButtons = _showOptionButtons; + this.fixFocusOnOptionClickEnabled = true; + this.cachedOptionsWidth = 0; + this._onDidOptionChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onDidOptionChange = this._onDidOptionChange.event; + this._onKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onKeyDown = this._onKeyDown.event; + this._onMouseDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this._onInput = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this._onKeyUp = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this._onPreserveCaseKeyDown = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"]()); + this.onPreserveCaseKeyDown = this._onPreserveCaseKeyDown.event; + this.contextViewProvider = contextViewProvider; + this.placeholder = options.placeholder || ''; + this.validation = options.validation; + this.label = options.label || NLS_DEFAULT_LABEL; + this.inputActiveOptionBorder = options.inputActiveOptionBorder; + this.inputActiveOptionForeground = options.inputActiveOptionForeground; + this.inputActiveOptionBackground = options.inputActiveOptionBackground; + this.inputBackground = options.inputBackground; + this.inputForeground = options.inputForeground; + this.inputBorder = options.inputBorder; + this.inputValidationInfoBorder = options.inputValidationInfoBorder; + this.inputValidationInfoBackground = options.inputValidationInfoBackground; + this.inputValidationInfoForeground = options.inputValidationInfoForeground; + this.inputValidationWarningBorder = options.inputValidationWarningBorder; + this.inputValidationWarningBackground = options.inputValidationWarningBackground; + this.inputValidationWarningForeground = options.inputValidationWarningForeground; + this.inputValidationErrorBorder = options.inputValidationErrorBorder; + this.inputValidationErrorBackground = options.inputValidationErrorBackground; + this.inputValidationErrorForeground = options.inputValidationErrorForeground; + const history = options.history || []; + const flexibleHeight = !!options.flexibleHeight; + const flexibleWidth = !!options.flexibleWidth; + const flexibleMaxHeight = options.flexibleMaxHeight; + this.domNode = document.createElement('div'); + _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'monaco-findInput'); + this.inputBox = this._register(new _inputbox_inputBox_js__WEBPACK_IMPORTED_MODULE_3__["HistoryInputBox"](this.domNode, this.contextViewProvider, { + ariaLabel: this.label || '', + placeholder: this.placeholder || '', + validationOptions: { + validation: this.validation + }, + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder, + history, + flexibleHeight, + flexibleWidth, + flexibleMaxHeight + })); + this.preserveCase = this._register(new PreserveCaseCheckbox({ + appendTitle: '', + isChecked: false, + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground, + })); + this._register(this.preserveCase.onChange(viaKeyboard => { + this._onDidOptionChange.fire(viaKeyboard); + if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) { + this.inputBox.focus(); } - for (let suggestion of container.suggestions) { - if (!options.kindFilter.has(suggestion.kind)) { - // fill in default range when missing - if (!suggestion.range) { - suggestion.range = defaultRange; + this.validate(); + })); + this._register(this.preserveCase.onKeyDown(e => { + this._onPreserveCaseKeyDown.fire(e); + })); + if (this._showOptionButtons) { + this.cachedOptionsWidth = this.preserveCase.width(); + } + else { + this.cachedOptionsWidth = 0; + } + // Arrow-Key support to navigate between options + let indexes = [this.preserveCase.domNode]; + this.onkeydown(this.domNode, (event) => { + if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) { + let index = indexes.indexOf(document.activeElement); + if (index >= 0) { + let newIndex = -1; + if (event.equals(17 /* RightArrow */)) { + newIndex = (index + 1) % indexes.length; } - // fill in default sortText when missing - if (!suggestion.sortText) { - suggestion.sortText = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name; + else if (event.equals(15 /* LeftArrow */)) { + if (index === 0) { + newIndex = indexes.length - 1; + } + else { + newIndex = index - 1; + } } - if (!needsClipboard && suggestion.insertTextRules && suggestion.insertTextRules & 4 /* InsertAsSnippet */) { - needsClipboard = _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_10__["SnippetParser"].guessNeedsClipboard(suggestion.insertText); + if (event.equals(9 /* Escape */)) { + indexes[index].blur(); } - result.push(new CompletionItem(position, suggestion, container, provider)); - } - } - if (Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["isDisposable"])(container)) { - disposables.add(container); - } - }; - // ask for snippets in parallel to asking "real" providers. Only do something if configured to - // do so - no snippet filter, no special-providers-only request - const snippetCompletions = (() => __awaiter(this, void 0, void 0, function* () { - if (!_snippetSuggestSupport || options.kindFilter.has(27 /* Snippet */)) { - return; - } - if (options.providerFilter.size > 0 && !options.providerFilter.has(_snippetSuggestSupport)) { - return; - } - const list = yield _snippetSuggestSupport.provideCompletionItems(model, position, context, token); - onCompletionList(_snippetSuggestSupport, list); - }))(); - // add suggestions from contributed providers - providers are ordered in groups of - // equal score and once a group produces a result the process stops - // get provider groups, always add snippet suggestion provider - for (let providerGroup of _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["CompletionProviderRegistry"].orderedGroups(model)) { - // for each support in the group ask for suggestions - let lenBefore = result.length; - yield Promise.all(providerGroup.map((provider) => __awaiter(this, void 0, void 0, function* () { - if (options.providerFilter.size > 0 && !options.providerFilter.has(provider)) { - return; - } - try { - const list = yield provider.provideCompletionItems(model, position, context, token); - onCompletionList(provider, list); - } - catch (err) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["onUnexpectedExternalError"])(err); - } - }))); - if (lenBefore !== result.length || token.isCancellationRequested) { - break; - } - } - yield snippetCompletions; - if (token.isCancellationRequested) { - disposables.dispose(); - return Promise.reject(Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["canceled"])()); - } - // console.log(`${result.length} items AFTER ${Date.now() - t1}ms`); - return new CompletionItemModel(result.sort(getSuggestionComparator(options.snippetSortOrder)), needsClipboard, disposables); - }); -} -function defaultComparator(a, b) { - // check with 'sortText' - if (a.sortTextLow && b.sortTextLow) { - if (a.sortTextLow < b.sortTextLow) { - return -1; - } - else if (a.sortTextLow > b.sortTextLow) { - return 1; + else if (newIndex >= 0) { + indexes[newIndex].focus(); + } + _dom_js__WEBPACK_IMPORTED_MODULE_2__["EventHelper"].stop(event, true); + } + } + }); + let controls = document.createElement('div'); + controls.className = 'controls'; + controls.style.display = this._showOptionButtons ? 'block' : 'none'; + controls.appendChild(this.preserveCase.domNode); + this.domNode.appendChild(controls); + if (parent) { + parent.appendChild(this.domNode); } + this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); + this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); + this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); + this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); } - // check with 'label' - if (a.completion.label < b.completion.label) { - return -1; + enable() { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["removeClass"](this.domNode, 'disabled'); + this.inputBox.enable(); + this.preserveCase.enable(); } - else if (a.completion.label > b.completion.label) { - return 1; + disable() { + _dom_js__WEBPACK_IMPORTED_MODULE_2__["addClass"](this.domNode, 'disabled'); + this.inputBox.disable(); + this.preserveCase.disable(); } - // check with 'type' - return a.completion.kind - b.completion.kind; -} -function snippetUpComparator(a, b) { - if (a.completion.kind !== b.completion.kind) { - if (a.completion.kind === 27 /* Snippet */) { - return -1; + setEnabled(enabled) { + if (enabled) { + this.enable(); } - else if (b.completion.kind === 27 /* Snippet */) { - return 1; + else { + this.disable(); } } - return defaultComparator(a, b); -} -function snippetDownComparator(a, b) { - if (a.completion.kind !== b.completion.kind) { - if (a.completion.kind === 27 /* Snippet */) { - return 1; - } - else if (b.completion.kind === 27 /* Snippet */) { - return -1; - } + style(styles) { + this.inputActiveOptionBorder = styles.inputActiveOptionBorder; + this.inputActiveOptionForeground = styles.inputActiveOptionForeground; + this.inputActiveOptionBackground = styles.inputActiveOptionBackground; + this.inputBackground = styles.inputBackground; + this.inputForeground = styles.inputForeground; + this.inputBorder = styles.inputBorder; + this.inputValidationInfoBackground = styles.inputValidationInfoBackground; + this.inputValidationInfoForeground = styles.inputValidationInfoForeground; + this.inputValidationInfoBorder = styles.inputValidationInfoBorder; + this.inputValidationWarningBackground = styles.inputValidationWarningBackground; + this.inputValidationWarningForeground = styles.inputValidationWarningForeground; + this.inputValidationWarningBorder = styles.inputValidationWarningBorder; + this.inputValidationErrorBackground = styles.inputValidationErrorBackground; + this.inputValidationErrorForeground = styles.inputValidationErrorForeground; + this.inputValidationErrorBorder = styles.inputValidationErrorBorder; + this.applyStyles(); } - return defaultComparator(a, b); -} -const _snippetComparators = new Map(); -_snippetComparators.set(0 /* Top */, snippetUpComparator); -_snippetComparators.set(2 /* Bottom */, snippetDownComparator); -_snippetComparators.set(1 /* Inline */, defaultComparator); -function getSuggestionComparator(snippetConfig) { - return _snippetComparators.get(snippetConfig); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerDefaultLanguageCommand"])('_executeCompletionItemProvider', (model, position, args) => __awaiter(void 0, void 0, void 0, function* () { - const result = { - incomplete: false, - suggestions: [] - }; - const resolving = []; - const maxItemsToResolve = args['maxItemsToResolve'] || 0; - const completions = yield provideSuggestionItems(model, position); - for (const item of completions.items) { - if (resolving.length < maxItemsToResolve) { - resolving.push(item.resolve(_base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__["CancellationToken"].None)); + applyStyles() { + if (this.domNode) { + const checkBoxStyles = { + inputActiveOptionBorder: this.inputActiveOptionBorder, + inputActiveOptionForeground: this.inputActiveOptionForeground, + inputActiveOptionBackground: this.inputActiveOptionBackground, + }; + this.preserveCase.style(checkBoxStyles); + const inputBoxStyles = { + inputBackground: this.inputBackground, + inputForeground: this.inputForeground, + inputBorder: this.inputBorder, + inputValidationInfoBackground: this.inputValidationInfoBackground, + inputValidationInfoForeground: this.inputValidationInfoForeground, + inputValidationInfoBorder: this.inputValidationInfoBorder, + inputValidationWarningBackground: this.inputValidationWarningBackground, + inputValidationWarningForeground: this.inputValidationWarningForeground, + inputValidationWarningBorder: this.inputValidationWarningBorder, + inputValidationErrorBackground: this.inputValidationErrorBackground, + inputValidationErrorForeground: this.inputValidationErrorForeground, + inputValidationErrorBorder: this.inputValidationErrorBorder + }; + this.inputBox.style(inputBoxStyles); } - result.incomplete = result.incomplete || item.container.incomplete; - result.suggestions.push(item.completion); - } - try { - yield Promise.all(resolving); - return result; - } - finally { - setTimeout(() => completions.dispoables.dispose(), 100); } -})); -const _provider = new class { - constructor() { - this.onlyOnceSuggestions = []; + select() { + this.inputBox.select(); } - provideCompletionItems() { - let suggestions = this.onlyOnceSuggestions.slice(0); - let result = { suggestions }; - this.onlyOnceSuggestions.length = 0; - return result; + focus() { + this.inputBox.focus(); } -}; -_common_modes_js__WEBPACK_IMPORTED_MODULE_2__["CompletionProviderRegistry"].register('*', _provider); -function showSimpleSuggestions(editor, suggestions) { - setTimeout(() => { - _provider.onlyOnceSuggestions.push(...suggestions); - editor.getContribution('editor.contrib.suggestController').triggerSuggest(new Set().add(_provider)); - }, 0); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js ***! - \*****************************************************************************************/ -/*! exports provided: SuggestAlternatives */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuggestAlternatives", function() { return SuggestAlternatives; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - -let SuggestAlternatives = class SuggestAlternatives { - constructor(_editor, contextKeyService) { - this._editor = _editor; - this._index = 0; - this._ckOtherSuggestions = SuggestAlternatives.OtherSuggestions.bindTo(contextKeyService); + getPreserveCase() { + return this.preserveCase.checked; } - dispose() { - this.reset(); + setPreserveCase(value) { + this.preserveCase.checked = value; } - reset() { - this._ckOtherSuggestions.reset(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["dispose"])(this._listener); - this._model = undefined; - this._acceptNext = undefined; - this._ignore = false; - } - set({ model, index }, acceptNext) { - // no suggestions -> nothing to do - if (model.items.length === 0) { - this.reset(); - return; - } - // no alternative suggestions -> nothing to do - let nextIndex = SuggestAlternatives._moveIndex(true, model, index); - if (nextIndex === index) { - this.reset(); - return; - } - this._acceptNext = acceptNext; - this._model = model; - this._index = index; - this._listener = this._editor.onDidChangeCursorPosition(() => { - if (!this._ignore) { - this.reset(); - } - }); - this._ckOtherSuggestions.set(true); + focusOnPreserve() { + this.preserveCase.focus(); } - static _moveIndex(fwd, model, index) { - let newIndex = index; - while (true) { - newIndex = (newIndex + model.items.length + (fwd ? +1 : -1)) % model.items.length; - if (newIndex === index) { - break; - } - if (!model.items[newIndex].completion.additionalTextEdits) { - break; - } + validate() { + if (this.inputBox) { + this.inputBox.validate(); } - return newIndex; } - next() { - this._move(true); - } - prev() { - this._move(false); + set width(newWidth) { + this.inputBox.paddingRight = this.cachedOptionsWidth; + this.inputBox.width = newWidth; + this.domNode.style.width = newWidth + 'px'; } - _move(fwd) { - if (!this._model) { - // nothing to reason about - return; - } - try { - this._ignore = true; - this._index = SuggestAlternatives._moveIndex(fwd, this._model, this._index); - this._acceptNext({ index: this._index, item: this._model.items[this._index], model: this._model }); - } - finally { - this._ignore = false; - } + dispose() { + super.dispose(); } -}; -SuggestAlternatives.OtherSuggestions = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__["RawContextKey"]('hasOtherSuggestions', false); -SuggestAlternatives = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__["IContextKeyService"]) -], SuggestAlternatives); - +} /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js ***! - \*********************************************************************************************/ -/*! exports provided: CommitCharacterController */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js ***! + \************************************************************************************************/ +/*! exports provided: HighlightedLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommitCharacterController", function() { return CommitCharacterController; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/characterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HighlightedLabel", function() { return HighlightedLabel; }); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); +/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -219346,1857 +74123,499 @@ __webpack_require__.r(__webpack_exports__); -class CommitCharacterController { - constructor(editor, widget, accept) { - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._disposables.add(widget.onDidShow(() => this._onItem(widget.getFocusedItem()))); - this._disposables.add(widget.onDidFocus(this._onItem, this)); - this._disposables.add(widget.onDidHide(this.reset, this)); - this._disposables.add(editor.onWillType(text => { - if (this._active && !widget.isFrozen()) { - const ch = text.charCodeAt(text.length - 1); - if (this._active.acceptCharacters.has(ch) && editor.getOption(0 /* acceptSuggestionOnCommitCharacter */)) { - accept(this._active.item); - } - } - })); - } - _onItem(selected) { - if (!selected || !Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isNonEmptyArray"])(selected.item.completion.commitCharacters)) { - // no item or no commit characters - this.reset(); - return; - } - if (this._active && this._active.item.item === selected.item) { - // still the same item - return; - } - // keep item and its commit characters - const acceptCharacters = new _common_core_characterClassifier_js__WEBPACK_IMPORTED_MODULE_2__["CharacterSet"](); - for (const ch of selected.item.completion.commitCharacters) { - if (ch.length > 0) { - acceptCharacters.add(ch.charCodeAt(0)); - } - } - this._active = { acceptCharacters, item: selected }; - } - reset() { - this._active = undefined; +class HighlightedLabel { + constructor(container, supportCodicons) { + this.supportCodicons = supportCodicons; + this.text = ''; + this.title = ''; + this.highlights = []; + this.didEverRender = false; + this.domNode = document.createElement('span'); + this.domNode.className = 'monaco-highlighted-label'; + container.appendChild(this.domNode); } - dispose() { - this._disposables.dispose(); + get element() { + return this.domNode; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js ***! - \***************************************************************************************/ -/*! exports provided: SuggestController, TriggerSuggestAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuggestController", function() { return SuggestController; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriggerSuggestAction", function() { return TriggerSuggestAction; }); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../browser/core/editorState.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../snippet/snippetController2.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js"); -/* harmony import */ var _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../snippet/snippetParser.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js"); -/* harmony import */ var _suggestMemory_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./suggestMemory.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./suggest.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js"); -/* harmony import */ var _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./suggestAlternatives.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestAlternatives.js"); -/* harmony import */ var _suggestModel_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./suggestModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js"); -/* harmony import */ var _suggestWidget_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./suggestWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js"); -/* harmony import */ var _wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./wordContextKey.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _suggestCommitCharacters_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./suggestCommitCharacters.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestCommitCharacters.js"); -/* harmony import */ var _suggestOvertypingCapturer_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./suggestOvertypingCapturer.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// sticky suggest widget which doesn't disappear on focus out and such -let _sticky = false; -// _sticky = Boolean("true"); // done "weirdly" so that a lint warning prevents you from pushing this -class LineSuffix { - constructor(_model, _position) { - this._model = _model; - this._position = _position; - // spy on what's happening right of the cursor. two cases: - // 1. end of line -> check that it's still end of line - // 2. mid of line -> add a marker and compute the delta - const maxColumn = _model.getLineMaxColumn(_position.lineNumber); - if (maxColumn !== _position.column) { - const offset = _model.getOffsetAt(_position); - const end = _model.getPositionAt(offset + 1); - this._marker = _model.deltaDecorations([], [{ - range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].fromPositions(_position, end), - options: { stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ } - }]); + set(text, highlights = [], title = '', escapeNewLines) { + if (!text) { + text = ''; } - } - dispose() { - if (this._marker && !this._model.isDisposed()) { - this._model.deltaDecorations(this._marker, []); + if (escapeNewLines) { + // adjusts highlights inplace + text = HighlightedLabel.escapeNewLines(text, highlights); } - } - delta(position) { - if (this._model.isDisposed() || this._position.lineNumber !== position.lineNumber) { - // bail out early if things seems fishy - return 0; + if (this.didEverRender && this.text === text && this.title === title && _common_objects_js__WEBPACK_IMPORTED_MODULE_0__["equals"](this.highlights, highlights)) { + return; } - // read the marker (in case suggest was triggered at line end) or compare - // the cursor to the line end. - if (this._marker) { - const range = this._model.getDecorationRange(this._marker[0]); - const end = this._model.getOffsetAt(range.getStartPosition()); - return end - this._model.getOffsetAt(position); + if (!Array.isArray(highlights)) { + highlights = []; } - else { - return this._model.getLineMaxColumn(position.lineNumber) - position.column; - } - } -} -let SuggestController = class SuggestController { - constructor(editor, editorWorker, _memoryService, _commandService, _contextKeyService, _instantiationService, _logService, clipboardService) { - this._memoryService = _memoryService; - this._commandService = _commandService; - this._contextKeyService = _contextKeyService; - this._instantiationService = _instantiationService; - this._logService = _logService; - this._lineSuffix = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["MutableDisposable"](); - this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this.editor = editor; - this.model = new _suggestModel_js__WEBPACK_IMPORTED_MODULE_20__["SuggestModel"](this.editor, editorWorker, clipboardService); - this.widget = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_25__["IdleValue"](() => { - const widget = this._instantiationService.createInstance(_suggestWidget_js__WEBPACK_IMPORTED_MODULE_21__["SuggestWidget"], this.editor); - this._toDispose.add(widget); - this._toDispose.add(widget.onDidSelect(item => this._insertSuggestion(item, 0), this)); - // Wire up logic to accept a suggestion on certain characters - const commitCharacterController = new _suggestCommitCharacters_js__WEBPACK_IMPORTED_MODULE_27__["CommitCharacterController"](this.editor, widget, item => this._insertSuggestion(item, 2 /* NoAfterUndoStop */)); - this._toDispose.add(commitCharacterController); - this._toDispose.add(this.model.onDidSuggest(e => { - if (e.completionModel.items.length === 0) { - commitCharacterController.reset(); - } - })); - // Wire up makes text edit context key - const ctxMakesTextEdit = _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MakesTextEdit.bindTo(this._contextKeyService); - const ctxHasInsertAndReplace = _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange.bindTo(this._contextKeyService); - const ctxCanResolve = _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].CanResolve.bindTo(this._contextKeyService); - this._toDispose.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["toDisposable"])(() => { - ctxMakesTextEdit.reset(); - ctxHasInsertAndReplace.reset(); - ctxCanResolve.reset(); - })); - this._toDispose.add(widget.onDidFocus(({ item }) => { - // (ctx: makesTextEdit) - const position = this.editor.getPosition(); - const startColumn = item.editStart.column; - const endColumn = position.column; - let value = true; - if (this.editor.getOption(1 /* acceptSuggestionOnEnter */) === 'smart' - && this.model.state === 2 /* Auto */ - && !item.completion.command - && !item.completion.additionalTextEdits - && !(item.completion.insertTextRules & 4 /* InsertAsSnippet */) - && endColumn - startColumn === item.completion.insertText.length) { - const oldText = this.editor.getModel().getValueInRange({ - startLineNumber: position.lineNumber, - startColumn, - endLineNumber: position.lineNumber, - endColumn - }); - value = oldText !== item.completion.insertText; - } - ctxMakesTextEdit.set(value); - // (ctx: hasInsertAndReplaceRange) - ctxHasInsertAndReplace.set(!_common_core_position_js__WEBPACK_IMPORTED_MODULE_29__["Position"].equals(item.editInsertEnd, item.editReplaceEnd)); - // (ctx: canResolve) - ctxCanResolve.set(Boolean(item.provider.resolveCompletionItem) || Boolean(item.completion.documentation) || item.completion.detail !== item.completion.label); - })); - this._toDispose.add(widget.onDetailsKeyDown(e => { - // cmd + c on macOS, ctrl + c on Win / Linux - if (e.toKeybinding().equals(new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__["SimpleKeybinding"](true, false, false, false, 33 /* KEY_C */)) || - (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_30__["isMacintosh"] && e.toKeybinding().equals(new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_3__["SimpleKeybinding"](false, false, false, true, 33 /* KEY_C */)))) { - e.stopPropagation(); - return; - } - if (!e.toKeybinding().isModifierKey()) { - this.editor.focus(); - } - })); - return widget; - })); - // Wire up text overtyping capture - this._overtypingCapturer = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_25__["IdleValue"](() => { - return this._toDispose.add(new _suggestOvertypingCapturer_js__WEBPACK_IMPORTED_MODULE_28__["OvertypingCapturer"](this.editor, this.model)); - })); - this._alternatives = this._toDispose.add(new _base_common_async_js__WEBPACK_IMPORTED_MODULE_25__["IdleValue"](() => { - return this._toDispose.add(new _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__["SuggestAlternatives"](this.editor, this._contextKeyService)); - })); - this._toDispose.add(_instantiationService.createInstance(_wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__["WordContextKey"], editor)); - this._toDispose.add(this.model.onDidTrigger(e => { - this.widget.value.showTriggered(e.auto, e.shy ? 250 : 50); - this._lineSuffix.value = new LineSuffix(this.editor.getModel(), e.position); - })); - this._toDispose.add(this.model.onDidSuggest(e => { - if (!e.shy) { - let index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), e.completionModel.items); - this.widget.value.showSuggestions(e.completionModel, index, e.isFrozen, e.auto); + this.text = text; + this.title = title; + this.highlights = highlights; + this.render(); + } + render() { + let htmlContent = ''; + let pos = 0; + for (const highlight of this.highlights) { + if (highlight.end === highlight.start) { + continue; } - })); - this._toDispose.add(this.model.onDidCancel(e => { - if (!e.retrigger) { - this.widget.value.hideWidget(); + if (pos < highlight.start) { + htmlContent += ''; + const substring = this.text.substring(pos, highlight.start); + htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); + htmlContent += ''; + pos = highlight.end; } - })); - this._toDispose.add(this.editor.onDidBlurEditorWidget(() => { - if (!_sticky) { - this.model.cancel(); - this.model.clear(); + if (highlight.extraClasses) { + htmlContent += ``; } - })); - // Manage the acceptSuggestionsOnEnter context key - let acceptSuggestionsOnEnter = _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].AcceptSuggestionsOnEnter.bindTo(_contextKeyService); - let updateFromConfig = () => { - const acceptSuggestionOnEnter = this.editor.getOption(1 /* acceptSuggestionOnEnter */); - acceptSuggestionsOnEnter.set(acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart'); - }; - this._toDispose.add(this.editor.onDidChangeConfiguration(() => updateFromConfig())); - updateFromConfig(); - } - static get(editor) { - return editor.getContribution(SuggestController.ID); - } - dispose() { - this._alternatives.dispose(); - this._toDispose.dispose(); - this.widget.dispose(); - this.model.dispose(); - this._lineSuffix.dispose(); - } - _insertSuggestion(event, flags) { - if (!event || !event.item) { - this._alternatives.value.reset(); - this.model.cancel(); - this.model.clear(); - return; - } - if (!this.editor.hasModel()) { - return; - } - const model = this.editor.getModel(); - const modelVersionNow = model.getAlternativeVersionId(); - const { item } = event; - // - const tasks = []; - const cts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_32__["CancellationTokenSource"](); - // pushing undo stops *before* additional text edits and - // *after* the main edit - if (!(flags & 1 /* NoBeforeUndoStop */)) { - this.editor.pushUndoStop(); - } - // compute overwrite[Before|After] deltas BEFORE applying extra edits - const info = this.getOverwriteInfo(item, Boolean(flags & 8 /* AlternativeOverwriteConfig */)); - // keep item in memory - this._memoryService.memorize(model, this.editor.getPosition(), item); - if (Array.isArray(item.completion.additionalTextEdits)) { - // sync additional edits - const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["StableEditorScrollState"].capture(this.editor); - this.editor.executeEdits('suggestController.additionalTextEdits.sync', item.completion.additionalTextEdits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(edit.range), edit.text))); - scrollState.restoreRelativeVerticalPositionOfCursor(this.editor); - } - else if (!item.isResolved) { - // async additional edits - const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_34__["StopWatch"](true); - let position; - const docListener = model.onDidChangeContent(e => { - if (e.isFlush) { - cts.cancel(); - docListener.dispose(); - return; - } - for (let change of e.changes) { - const thisPosition = _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].getEndPosition(change.range); - if (!position || _common_core_position_js__WEBPACK_IMPORTED_MODULE_29__["Position"].isBefore(thisPosition, position)) { - position = thisPosition; - } - } - }); - let oldFlags = flags; - flags |= 2 /* NoAfterUndoStop */; - let didType = false; - let typeListener = this.editor.onWillType(() => { - typeListener.dispose(); - didType = true; - if (!(oldFlags & 2 /* NoAfterUndoStop */)) { - this.editor.pushUndoStop(); - } - }); - tasks.push(item.resolve(cts.token).then(() => { - if (!item.completion.additionalTextEdits || cts.token.isCancellationRequested) { - return false; - } - if (position && item.completion.additionalTextEdits.some(edit => _common_core_position_js__WEBPACK_IMPORTED_MODULE_29__["Position"].isBefore(position, _common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].getStartPosition(edit.range)))) { - return false; - } - if (didType) { - this.editor.pushUndoStop(); - } - const scrollState = _browser_core_editorState_js__WEBPACK_IMPORTED_MODULE_5__["StableEditorScrollState"].capture(this.editor); - this.editor.executeEdits('suggestController.additionalTextEdits.async', item.completion.additionalTextEdits.map(edit => _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_7__["EditOperation"].replace(_common_core_range_js__WEBPACK_IMPORTED_MODULE_8__["Range"].lift(edit.range), edit.text))); - scrollState.restoreRelativeVerticalPositionOfCursor(this.editor); - if (didType || !(oldFlags & 2 /* NoAfterUndoStop */)) { - this.editor.pushUndoStop(); - } - return true; - }).then(applied => { - this._logService.trace('[suggest] async resolving of edits DONE (ms, applied?)', sw.elapsed(), applied); - docListener.dispose(); - typeListener.dispose(); - })); - } - let { insertText } = item.completion; - if (!(item.completion.insertTextRules & 4 /* InsertAsSnippet */)) { - insertText = _snippet_snippetParser_js__WEBPACK_IMPORTED_MODULE_11__["SnippetParser"].escape(insertText); - } - _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__["SnippetController2"].get(this.editor).insert(insertText, { - overwriteBefore: info.overwriteBefore, - overwriteAfter: info.overwriteAfter, - undoStopBefore: false, - undoStopAfter: false, - adjustWhitespace: !(item.completion.insertTextRules & 1 /* KeepWhitespace */), - clipboardText: event.model.clipboardText, - overtypingCapturer: this._overtypingCapturer.value - }); - if (!(flags & 2 /* NoAfterUndoStop */)) { - this.editor.pushUndoStop(); + else { + htmlContent += ``; + } + const substring = this.text.substring(highlight.start, highlight.end); + htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); + htmlContent += ''; + pos = highlight.end; } - if (!item.completion.command) { - // done - this.model.cancel(); + if (pos < this.text.length) { + htmlContent += ''; + const substring = this.text.substring(pos); + htmlContent += this.supportCodicons ? Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_1__["renderCodicons"])(Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring)) : Object(_common_strings_js__WEBPACK_IMPORTED_MODULE_2__["escape"])(substring); + htmlContent += ''; } - else if (item.completion.command.id === TriggerSuggestAction.id) { - // retigger - this.model.trigger({ auto: true, shy: false }, true); + this.domNode.innerHTML = htmlContent; + if (this.title) { + this.domNode.title = this.title; } else { - // exec command, done - tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedError"])); - this.model.cancel(); - } - if (flags & 4 /* KeepAlternativeSuggestions */) { - this._alternatives.value.set(event, next => { - // cancel resolving of additional edits - cts.cancel(); - // this is not so pretty. when inserting the 'next' - // suggestion we undo until we are at the state at - // which we were before inserting the previous suggestion... - while (model.canUndo()) { - if (modelVersionNow !== model.getAlternativeVersionId()) { - model.undo(); - } - this._insertSuggestion(next, 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */ | (flags & 8 /* AlternativeOverwriteConfig */ ? 8 /* AlternativeOverwriteConfig */ : 0)); - break; - } - }); - } - this._alertCompletionItem(item); - // clear only now - after all tasks are done - Promise.all(tasks).finally(() => { - this.model.clear(); - cts.dispose(); - }); - } - getOverwriteInfo(item, toggleMode) { - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_26__["assertType"])(this.editor.hasModel()); - let replace = this.editor.getOption(96 /* suggest */).insertMode === 'replace'; - if (toggleMode) { - replace = !replace; - } - const overwriteBefore = item.position.column - item.editStart.column; - const overwriteAfter = (replace ? item.editReplaceEnd.column : item.editInsertEnd.column) - item.position.column; - const columnDelta = this.editor.getPosition().column - item.position.column; - const suffixDelta = this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0; - return { - overwriteBefore: overwriteBefore + columnDelta, - overwriteAfter: overwriteAfter + suffixDelta - }; - } - _alertCompletionItem({ completion: suggestion }) { - const textLabel = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name; - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["isNonEmptyArray"])(suggestion.additionalTextEdits)) { - let msg = _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('arai.alert.snippet', "Accepting '{0}' made {1} additional edits", textLabel, suggestion.additionalTextEdits.length); - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["alert"])(msg); - } - } - triggerSuggest(onlyFrom) { - if (this.editor.hasModel()) { - this.model.trigger({ auto: false, shy: false }, false, onlyFrom); - this.editor.revealLine(this.editor.getPosition().lineNumber, 0 /* Smooth */); - this.editor.focus(); + this.domNode.removeAttribute('title'); } + this.didEverRender = true; } - triggerSuggestAndAcceptBest(arg) { - if (!this.editor.hasModel()) { - return; - } - const positionNow = this.editor.getPosition(); - const fallback = () => { - if (positionNow.equals(this.editor.getPosition())) { - this._commandService.executeCommand(arg.fallback); - } - }; - const makesTextEdit = (item) => { - if (item.completion.insertTextRules & 4 /* InsertAsSnippet */ || item.completion.additionalTextEdits) { - // snippet, other editor -> makes edit - return true; - } - const position = this.editor.getPosition(); - const startColumn = item.editStart.column; - const endColumn = position.column; - if (endColumn - startColumn !== item.completion.insertText.length) { - // unequal lengths -> makes edit - return true; - } - const textNow = this.editor.getModel().getValueInRange({ - startLineNumber: position.lineNumber, - startColumn, - endLineNumber: position.lineNumber, - endColumn - }); - // unequal text -> makes edit - return textNow !== item.completion.insertText; - }; - _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__["Event"].once(this.model.onDidTrigger)(_ => { - // wait for trigger because only then the cancel-event is trustworthy - let listener = []; - _base_common_event_js__WEBPACK_IMPORTED_MODULE_23__["Event"].any(this.model.onDidTrigger, this.model.onDidCancel)(() => { - // retrigger or cancel -> try to type default text - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(listener); - fallback(); - }, undefined, listener); - this.model.onDidSuggest(({ completionModel }) => { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(listener); - if (completionModel.items.length === 0) { - fallback(); - return; + static escapeNewLines(text, highlights) { + let total = 0; + let extra = 0; + return text.replace(/\r\n|\r|\n/g, (match, offset) => { + extra = match === '\r\n' ? -1 : 0; + offset += total; + for (const highlight of highlights) { + if (highlight.end <= offset) { + continue; } - const index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), completionModel.items); - const item = completionModel.items[index]; - if (!makesTextEdit(item)) { - fallback(); - return; + if (highlight.start >= offset) { + highlight.start += extra; + } + if (highlight.end >= offset) { + highlight.end += extra; } - this.editor.pushUndoStop(); - this._insertSuggestion({ index, item, model: completionModel }, 4 /* KeepAlternativeSuggestions */ | 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */); - }, undefined, listener); - }); - this.model.trigger({ auto: false, shy: true }); - this.editor.revealLine(positionNow.lineNumber, 0 /* Smooth */); - this.editor.focus(); - } - acceptSelectedSuggestion(keepAlternativeSuggestions, alternativeOverwriteConfig) { - const item = this.widget.value.getFocusedItem(); - let flags = 0; - if (keepAlternativeSuggestions) { - flags |= 4 /* KeepAlternativeSuggestions */; - } - if (alternativeOverwriteConfig) { - flags |= 8 /* AlternativeOverwriteConfig */; - } - this._insertSuggestion(item, flags); - } - acceptNextSuggestion() { - this._alternatives.value.next(); - } - acceptPrevSuggestion() { - this._alternatives.value.prev(); - } - cancelSuggestWidget() { - this.model.cancel(); - this.model.clear(); - this.widget.value.hideWidget(); - } - selectNextSuggestion() { - this.widget.value.selectNext(); - } - selectNextPageSuggestion() { - this.widget.value.selectNextPage(); - } - selectLastSuggestion() { - this.widget.value.selectLast(); - } - selectPrevSuggestion() { - this.widget.value.selectPrevious(); - } - selectPrevPageSuggestion() { - this.widget.value.selectPreviousPage(); - } - selectFirstSuggestion() { - this.widget.value.selectFirst(); - } - toggleSuggestionDetails() { - this.widget.value.toggleDetails(); - } - toggleExplainMode() { - this.widget.value.toggleExplainMode(); - } - toggleSuggestionFocus() { - this.widget.value.toggleDetailsFocus(); - } -}; -SuggestController.ID = 'editor.contrib.suggestController'; -SuggestController = __decorate([ - __param(1, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_24__["IEditorWorkerService"]), - __param(2, _suggestMemory_js__WEBPACK_IMPORTED_MODULE_12__["ISuggestMemoryService"]), - __param(3, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__["ICommandService"]), - __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["IContextKeyService"]), - __param(5, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_16__["IInstantiationService"]), - __param(6, _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_33__["ILogService"]), - __param(7, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_35__["IClipboardService"]) -], SuggestController); - -class TriggerSuggestAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["EditorAction"] { - constructor() { - super({ - id: TriggerSuggestAction.id, - label: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('suggest.trigger.label', "Trigger Suggest"), - alias: 'Trigger Suggest', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].writable, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].hasCompletionItemProvider), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 10 /* Space */, - mac: { primary: 256 /* WinCtrl */ | 10 /* Space */, secondary: [512 /* Alt */ | 9 /* Escape */] }, - weight: 100 /* EditorContrib */ } + total += extra; + return '\u23CE'; }); } - run(accessor, editor) { - const controller = SuggestController.get(editor); - if (!controller) { - return; - } - controller.triggerSuggest(); - } } -TriggerSuggestAction.id = 'editor.action.triggerSuggest'; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorContribution"])(SuggestController.ID, SuggestController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorAction"])(TriggerSuggestAction); -const weight = 100 /* EditorContrib */ + 90; -const SuggestCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["EditorCommand"].bindToContribution(SuggestController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'acceptSelectedSuggestion', - precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, - handler(x) { - x.acceptSelectedSuggestion(true, false); - } -})); -// normal tab -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__["KeybindingsRegistry"].registerKeybindingRule({ - id: 'acceptSelectedSuggestion', - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus), - primary: 2 /* Tab */, - weight -}); -// accept on enter has special rules -_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_17__["KeybindingsRegistry"].registerKeybindingRule({ - id: 'acceptSelectedSuggestion', - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].AcceptSuggestionsOnEnter, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MakesTextEdit), - primary: 3 /* Enter */, - weight, -}); -_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_31__["MenuRegistry"].appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], { - command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]({ key: 'accept.accept', comment: ['{0} will be a keybinding, e.g "Enter to insert"'] }, "{0} to insert") }, - group: 'left', - order: 1, - when: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange.toNegated() -}); -_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_31__["MenuRegistry"].appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], { - command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]({ key: 'accept.insert', comment: ['{0} will be a keybinding, e.g "Enter to insert"'] }, "{0} to insert") }, - group: 'left', - order: 1, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.suggest.insertMode', 'insert')) -}); -_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_31__["MenuRegistry"].appendMenuItem(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], { - command: { id: 'acceptSelectedSuggestion', title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]({ key: 'accept.replace', comment: ['{0} will be a keybinding, e.g "Enter to replace"'] }, "{0} to replace") }, - group: 'left', - order: 1, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.suggest.insertMode', 'replace')) -}); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'acceptAlternativeSelectedSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 3 /* Enter */, - secondary: [1024 /* Shift */ | 2 /* Tab */], - }, - handler(x) { - x.acceptSelectedSuggestion(false, true); - }, - menuOpts: [{ - menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], - group: 'left', - order: 2, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.suggest.insertMode', 'insert')), - title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]({ key: 'accept.replace', comment: ['{0} will be a keybinding, e.g "Enter to replace"'] }, "{0} to replace") - }, { - menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], - group: 'left', - order: 2, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].HasInsertAndReplaceRange, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.suggest.insertMode', 'replace')), - title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]({ key: 'accept.insert', comment: ['{0} will be a keybinding, e.g "Enter to insert"'] }, "{0} to insert") - }] -})); -// continue to support the old command -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_14__["CommandsRegistry"].registerCommandAlias('acceptSelectedSuggestionOnEnter', 'acceptSelectedSuggestion'); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'hideSuggestWidget', - precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, - handler: x => x.cancelSuggestWidget(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectNextSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectNextSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 18 /* DownArrow */, - secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */], - mac: { primary: 18 /* DownArrow */, secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] } - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectNextPageSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectNextPageSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 12 /* PageDown */, - secondary: [2048 /* CtrlCmd */ | 12 /* PageDown */] - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectLastSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectLastSuggestion() -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectPrevSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectPrevSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 16 /* UpArrow */, - secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */], - mac: { primary: 16 /* UpArrow */, secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] } - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectPrevPageSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectPrevPageSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 11 /* PageUp */, - secondary: [2048 /* CtrlCmd */ | 11 /* PageUp */] - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'selectFirstSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].MultipleSuggestions), - handler: c => c.selectFirstSuggestion() -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'toggleSuggestionDetails', - precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, - handler: x => x.toggleSuggestionDetails(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 10 /* Space */, - mac: { primary: 256 /* WinCtrl */ | 10 /* Space */ } - }, - menuOpts: [{ - menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], - group: 'right', - order: 1, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].DetailsVisible, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].CanResolve), - title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('detail.more', "show less") - }, { - menuId: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["suggestWidgetStatusbarMenu"], - group: 'right', - order: 1, - when: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].DetailsVisible.toNegated(), _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].CanResolve), - title: _nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"]('detail.less', "show more") - }] -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'toggleExplainMode', - precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, - handler: x => x.toggleExplainMode(), - kbOpts: { - weight: 100 /* EditorContrib */, - primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */, - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'toggleSuggestionFocus', - precondition: _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible, - handler: x => x.toggleSuggestionFocus(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 10 /* Space */, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 10 /* Space */ } - } -})); -//#region tab completions -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'insertBestCompletion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.tabCompletion', 'on'), _wordContextKey_js__WEBPACK_IMPORTED_MODULE_22__["WordContextKey"].AtEnd, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible.toNegated(), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__["SuggestAlternatives"].OtherSuggestions.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__["SnippetController2"].InSnippetMode.toNegated()), - handler: (x, arg) => { - x.triggerSuggestAndAcceptBest(Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_26__["isObject"])(arg) ? Object.assign({ fallback: 'tab' }, arg) : { fallback: 'tab' }); - }, - kbOpts: { - weight, - primary: 2 /* Tab */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'insertNextSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.tabCompletion', 'on'), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__["SuggestAlternatives"].OtherSuggestions, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__["SnippetController2"].InSnippetMode.toNegated()), - handler: x => x.acceptNextSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 2 /* Tab */ - } -})); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorCommand"])(new SuggestCommand({ - id: 'insertPrevSuggestion', - precondition: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_15__["ContextKeyExpr"].equals('config.editor.tabCompletion', 'on'), _suggestAlternatives_js__WEBPACK_IMPORTED_MODULE_19__["SuggestAlternatives"].OtherSuggestions, _suggest_js__WEBPACK_IMPORTED_MODULE_18__["Context"].Visible.toNegated(), _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_10__["SnippetController2"].InSnippetMode.toNegated()), - handler: x => x.acceptPrevSuggestion(), - kbOpts: { - weight: weight, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_9__["EditorContextKeys"].textInputFocus, - primary: 1024 /* Shift */ | 2 /* Tab */ - } -})); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js ***! - \***********************************************************************************/ -/*! exports provided: Memory, NoMemory, LRUMemory, PrefixMemory, SuggestMemoryService, ISuggestMemoryService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Memory", function() { return Memory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoMemory", function() { return NoMemory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LRUMemory", function() { return LRUMemory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PrefixMemory", function() { return PrefixMemory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuggestMemoryService", function() { return SuggestMemoryService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ISuggestMemoryService", function() { return ISuggestMemoryService; }); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css": +/*!***************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./hover.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_hover_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); -class Memory { - constructor(name) { - this.name = name; - } - select(model, pos, items) { - if (items.length === 0) { - return 0; - } - let topScore = items[0].score[0]; - for (let i = 0; i < items.length; i++) { - const { score, completion: suggestion } = items[i]; - if (score[0] !== topScore) { - // stop when leaving the group of top matches - break; - } - if (suggestion.preselect) { - // stop when seeing an auto-select-item - return i; - } - } - return 0; - } -} -class NoMemory extends Memory { - constructor() { - super('first'); - } - memorize(model, pos, item) { - // no-op - } - toJSON() { - return undefined; - } - fromJSON() { - // - } -} -class LRUMemory extends Memory { +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js": +/*!********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hoverWidget.js ***! + \********************************************************************************/ +/*! exports provided: HoverWidget, renderHoverAction */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HoverWidget", function() { return HoverWidget; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderHoverAction", function() { return renderHoverAction; }); +/* harmony import */ var _hover_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hover.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + + +const $ = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]; +class HoverWidget extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { constructor() { - super('recentlyUsed'); - this._cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["LRUCache"](300, 0.66); - this._seq = 0; - } - memorize(model, pos, item) { - const { label } = item.completion; - const key = `${model.getLanguageIdentifier().language}/${label}`; - this._cache.set(key, { - touch: this._seq++, - type: item.completion.kind, - insertText: item.completion.insertText - }); - } - select(model, pos, items) { - if (items.length === 0) { - return 0; - } - const lineSuffix = model.getLineContent(pos.lineNumber).substr(pos.column - 10, pos.column - 1); - if (/\s$/.test(lineSuffix)) { - return super.select(model, pos, items); - } - let topScore = items[0].score[0]; - let indexPreselect = -1; - let indexRecency = -1; - let seq = -1; - for (let i = 0; i < items.length; i++) { - if (items[i].score[0] !== topScore) { - // consider only top items - break; - } - const key = `${model.getLanguageIdentifier().language}/${items[i].completion.label}`; - const item = this._cache.peek(key); - if (item && item.touch > seq && item.type === items[i].completion.kind && item.insertText === items[i].completion.insertText) { - seq = item.touch; - indexRecency = i; - } - if (items[i].completion.preselect && indexPreselect === -1) { - // stop when seeing an auto-select-item - return indexPreselect = i; - } - } - if (indexRecency !== -1) { - return indexRecency; - } - else if (indexPreselect !== -1) { - return indexPreselect; - } - else { - return 0; - } - } - toJSON() { - return this._cache.toJSON(); + super(); + this.containerDomNode = document.createElement('div'); + this.containerDomNode.className = 'monaco-hover'; + this.containerDomNode.tabIndex = 0; + this.containerDomNode.setAttribute('role', 'tooltip'); + this.contentsDomNode = document.createElement('div'); + this.contentsDomNode.className = 'monaco-hover-content'; + this._scrollbar = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_3__["DomScrollableElement"](this.contentsDomNode, {})); + this.containerDomNode.appendChild(this._scrollbar.getDomNode()); } - fromJSON(data) { - this._cache.clear(); - let seq = 0; - for (const [key, value] of data) { - value.touch = seq; - value.type = typeof value.type === 'number' ? value.type : Object(_common_modes_js__WEBPACK_IMPORTED_MODULE_2__["completionKindFromString"])(value.type); - this._cache.set(key, value); - } - this._seq = this._cache.size; + onContentsChanged() { + this._scrollbar.scanDomNode(); } } -class PrefixMemory extends Memory { - constructor() { - super('recentlyUsedByPrefix'); - this._trie = _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["TernarySearchTree"].forStrings(); - this._seq = 0; - } - memorize(model, pos, item) { - const { word } = model.getWordUntilPosition(pos); - const key = `${model.getLanguageIdentifier().language}/${word}`; - this._trie.set(key, { - type: item.completion.kind, - insertText: item.completion.insertText, - touch: this._seq++ - }); - } - select(model, pos, items) { - let { word } = model.getWordUntilPosition(pos); - if (!word) { - return super.select(model, pos, items); - } - let key = `${model.getLanguageIdentifier().language}/${word}`; - let item = this._trie.get(key); - if (!item) { - item = this._trie.findSubstr(key); - } - if (item) { - for (let i = 0; i < items.length; i++) { - let { kind, insertText } = items[i].completion; - if (kind === item.type && insertText === item.insertText) { - return i; - } - } - } - return super.select(model, pos, items); - } - toJSON() { - let entries = []; - this._trie.forEach((value, key) => entries.push([key, value])); - // sort by last recently used (touch), then - // take the top 200 item and normalize their - // touch - entries - .sort((a, b) => -(a[1].touch - b[1].touch)) - .forEach((value, i) => value[1].touch = i); - return entries.slice(0, 200); - } - fromJSON(data) { - this._trie.clear(); - if (data.length > 0) { - this._seq = data[0][1].touch + 1; - for (const [key, value] of data) { - value.type = typeof value.type === 'number' ? value.type : Object(_common_modes_js__WEBPACK_IMPORTED_MODULE_2__["completionKindFromString"])(value.type); - this._trie.set(key, value); - } - } +function renderHoverAction(parent, actionOptions, keybindingLabel) { + const actionContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](parent, $('div.action-container')); + const action = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](actionContainer, $('a.action')); + action.setAttribute('href', '#'); + action.setAttribute('role', 'button'); + if (actionOptions.iconClass) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](action, $(`span.icon.${actionOptions.iconClass}`)); } + const label = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](action, $('span')); + label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label; + return _dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](actionContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].CLICK, e => { + e.stopPropagation(); + e.preventDefault(); + actionOptions.run(actionContainer); + }); } -let SuggestMemoryService = class SuggestMemoryService { - constructor(_storageService, _modeService, _configService) { - this._storageService = _storageService; - this._modeService = _modeService; - this._configService = _configService; - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._persistSoon = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_4__["RunOnceScheduler"](() => this._saveState(), 500); - this._disposables.add(_storageService.onWillSaveState(e => { - if (e.reason === _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__["WillSaveStateReason"].SHUTDOWN) { - this._saveState(); - } - })); - } - dispose() { - this._disposables.dispose(); - this._persistSoon.dispose(); - } - memorize(model, pos, item) { - this._withStrategy(model, pos).memorize(model, pos, item); - this._persistSoon.schedule(); - } - select(model, pos, items) { - return this._withStrategy(model, pos).select(model, pos, items); - } - _withStrategy(model, pos) { - var _a, _b; - const mode = this._configService.getValue('editor.suggestSelection', { - overrideIdentifier: (_a = this._modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(pos.lineNumber, pos.column))) === null || _a === void 0 ? void 0 : _a.language, - resource: model.uri - }); - if (((_b = this._strategy) === null || _b === void 0 ? void 0 : _b.name) !== mode) { - this._saveState(); - const ctor = SuggestMemoryService._strategyCtors.get(mode) || NoMemory; - this._strategy = new ctor(); - try { - const share = this._configService.getValue('editor.suggest.shareSuggestSelections'); - const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */; - const raw = this._storageService.get(`${SuggestMemoryService._storagePrefix}/${mode}`, scope); - if (raw) { - this._strategy.fromJSON(JSON.parse(raw)); - } - } - catch (e) { - // things can go wrong with JSON... - } - } - return this._strategy; - } - _saveState() { - if (this._strategy) { - const share = this._configService.getValue('editor.suggest.shareSuggestSelections'); - const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */; - const raw = JSON.stringify(this._strategy); - this._storageService.store(`${SuggestMemoryService._storagePrefix}/${this._strategy.name}`, raw, scope); - } - } -}; -SuggestMemoryService._strategyCtors = new Map([ - ['recentlyUsedByPrefix', PrefixMemory], - ['recentlyUsed', LRUMemory], - ['first', NoMemory] -]); -SuggestMemoryService._storagePrefix = 'suggest/memories'; -SuggestMemoryService = __decorate([ - __param(0, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_1__["IStorageService"]), - __param(1, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_8__["IModeService"]), - __param(2, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]) -], SuggestMemoryService); - -const ISuggestMemoryService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__["createDecorator"])('ISuggestMemories'); -Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_7__["registerSingleton"])(ISuggestMemoryService, SuggestMemoryService, true); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js": +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js": /*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestModel.js ***! + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js ***! \**********************************************************************************/ -/*! exports provided: LineContext, SuggestModel */ +/*! exports provided: IconLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineContext", function() { return LineContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuggestModel", function() { return SuggestModel; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _completionModel_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./completionModel.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/completionModel.js"); -/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./suggest.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js"); -/* harmony import */ var _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../snippet/snippetController2.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _wordDistance_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./wordDistance.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IconLabel", function() { return IconLabel; }); +/* harmony import */ var _iconlabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iconlabel.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../highlightedlabel/highlightedLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -class LineContext { - constructor(model, position, auto, shy) { - this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1); - this.leadingWord = model.getWordUntilPosition(position); - this.lineNumber = position.lineNumber; - this.column = position.column; - this.auto = auto; - this.shy = shy; +class FastLabelNode { + constructor(_element) { + this._element = _element; } - static shouldAutoTrigger(editor) { - if (!editor.hasModel()) { - return false; - } - const model = editor.getModel(); - const pos = editor.getPosition(); - model.tokenizeIfCheap(pos.lineNumber); - const word = model.getWordAtPosition(pos); - if (!word) { - return false; - } - if (word.endColumn !== pos.column) { - return false; - } - if (!isNaN(Number(word.word))) { - return false; + get element() { + return this._element; + } + set textContent(content) { + if (this.disposed || content === this._textContent) { + return; } - return true; + this._textContent = content; + this._element.textContent = content; } -} -class SuggestModel { - constructor(_editor, _editorWorkerService, _clipboardService) { - this._editor = _editor; - this._editorWorkerService = _editorWorkerService; - this._clipboardService = _clipboardService; - this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._quickSuggestDelay = 10; - this._triggerCharacterListener = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._triggerQuickSuggest = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"](); - this._state = 0 /* Idle */; - this._completionDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); - this._onDidCancel = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this._onDidTrigger = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this._onDidSuggest = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidCancel = this._onDidCancel.event; - this.onDidTrigger = this._onDidTrigger.event; - this.onDidSuggest = this._onDidSuggest.event; - this._currentSelection = this._editor.getSelection() || new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_4__["Selection"](1, 1, 1, 1); - // wire up various listeners - this._toDispose.add(this._editor.onDidChangeModel(() => { - this._updateTriggerCharacters(); - this.cancel(); - })); - this._toDispose.add(this._editor.onDidChangeModelLanguage(() => { - this._updateTriggerCharacters(); - this.cancel(); - })); - this._toDispose.add(this._editor.onDidChangeConfiguration(() => { - this._updateTriggerCharacters(); - this._updateQuickSuggest(); - })); - this._toDispose.add(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].onDidChange(() => { - this._updateTriggerCharacters(); - this._updateActiveSuggestSession(); - })); - this._toDispose.add(this._editor.onDidChangeCursorSelection(e => { - this._onCursorChange(e); - })); - let editorIsComposing = false; - this._toDispose.add(this._editor.onDidCompositionStart(() => { - editorIsComposing = true; - })); - this._toDispose.add(this._editor.onDidCompositionEnd(() => { - // refilter when composition ends - editorIsComposing = false; - this._refilterCompletionItems(); - })); - this._toDispose.add(this._editor.onDidChangeModelContent(() => { - // only filter completions when the editor isn't - // composing a character, e.g. ¨ + u makes ü but just - // ¨ cannot be used for filtering - if (!editorIsComposing) { - this._refilterCompletionItems(); - } - })); - this._updateTriggerCharacters(); - this._updateQuickSuggest(); + set className(className) { + if (this.disposed || className === this._className) { + return; + } + this._className = className; + this._element.className = className; } - dispose() { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this._triggerCharacterListener); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest]); - this._toDispose.dispose(); - this._completionDisposables.dispose(); - this.cancel(); - } - // --- handle configuration & precondition changes - _updateQuickSuggest() { - this._quickSuggestDelay = this._editor.getOption(71 /* quickSuggestionsDelay */); - if (isNaN(this._quickSuggestDelay) || (!this._quickSuggestDelay && this._quickSuggestDelay !== 0) || this._quickSuggestDelay < 0) { - this._quickSuggestDelay = 10; - } - } - _updateTriggerCharacters() { - this._triggerCharacterListener.clear(); - if (this._editor.getOption(72 /* readOnly */) - || !this._editor.hasModel() - || !this._editor.getOption(99 /* suggestOnTriggerCharacters */)) { + set title(title) { + if (this.disposed || title === this._title) { return; } - const supportsByTriggerCharacter = new Map(); - for (const support of _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].all(this._editor.getModel())) { - for (const ch of support.triggerCharacters || []) { - let set = supportsByTriggerCharacter.get(ch); - if (!set) { - set = new Set(); - set.add(Object(_suggest_js__WEBPACK_IMPORTED_MODULE_7__["getSnippetSuggestSupport"])()); - supportsByTriggerCharacter.set(ch, set); - } - set.add(support); - } + this._title = title; + if (this._title) { + this._element.title = title; } - const checkTriggerCharacter = (text) => { - if (!text) { - // came here from the compositionEnd-event - const position = this._editor.getPosition(); - const model = this._editor.getModel(); - text = model.getLineContent(position.lineNumber).substr(0, position.column - 1); - } - let lastChar = ''; - if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__["isLowSurrogate"])(text.charCodeAt(text.length - 1))) { - if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_11__["isHighSurrogate"])(text.charCodeAt(text.length - 2))) { - lastChar = text.substr(text.length - 2); - } - } - else { - lastChar = text.charAt(text.length - 1); - } - const supports = supportsByTriggerCharacter.get(lastChar); - if (supports) { - // keep existing items that where not computed by the - // supports/providers that want to trigger now - const existing = this._completionModel - ? { items: this._completionModel.adopt(supports), clipboardText: this._completionModel.clipboardText } - : undefined; - this.trigger({ auto: true, shy: false, triggerCharacter: lastChar }, Boolean(this._completionModel), supports, existing); - } - }; - this._triggerCharacterListener.add(this._editor.onDidType(checkTriggerCharacter)); - this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(checkTriggerCharacter)); - } - // --- trigger/retrigger/cancel suggest - get state() { - return this._state; - } - cancel(retrigger = false) { - if (this._state !== 0 /* Idle */) { - this._triggerQuickSuggest.cancel(); - if (this._requestToken) { - this._requestToken.cancel(); - this._requestToken = undefined; - } - this._state = 0 /* Idle */; - this._completionModel = undefined; - this._context = undefined; - this._onDidCancel.fire({ retrigger }); + else { + this._element.removeAttribute('title'); } } - clear() { - this._completionDisposables.clear(); - } - _updateActiveSuggestSession() { - if (this._state !== 0 /* Idle */) { - if (!this._editor.hasModel() || !_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].has(this._editor.getModel())) { - this.cancel(); - } - else { - this.trigger({ auto: this._state === 2 /* Auto */, shy: false }, true); - } + set empty(empty) { + if (this.disposed || empty === this._empty) { + return; } + this._empty = empty; + this._element.style.marginLeft = empty ? '0' : ''; } - _onCursorChange(e) { - if (!this._editor.hasModel()) { - return; + dispose() { + this.disposed = true; + } +} +class IconLabel extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { + constructor(container, options) { + super(); + this.domNode = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.monaco-icon-label')))); + const labelContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.domNode.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('.monaco-icon-label-container')); + const nameContainer = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.monaco-icon-name-container')); + this.descriptionContainer = this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](labelContainer, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.monaco-icon-description-container')))); + if (options === null || options === void 0 ? void 0 : options.supportHighlights) { + this.nameNode = new LabelWithHighlights(nameContainer, !!options.supportCodicons); } - const model = this._editor.getModel(); - const prevSelection = this._currentSelection; - this._currentSelection = this._editor.getSelection(); - if (!e.selection.isEmpty() - || e.reason !== 0 /* NotSet */ - || (e.source !== 'keyboard' && e.source !== 'deleteLeft')) { - // Early exit if nothing needs to be done! - // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) - this.cancel(); - return; + else { + this.nameNode = new Label(nameContainer); } - if (!_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].has(model)) { - return; + if (options === null || options === void 0 ? void 0 : options.supportDescriptionHighlights) { + this.descriptionNodeFactory = () => new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-description')), !!options.supportCodicons); } - if (this._state === 0 /* Idle */) { - if (this._editor.getOption(70 /* quickSuggestions */) === false) { - // not enabled - return; + else { + this.descriptionNodeFactory = () => this._register(new FastLabelNode(_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.descriptionContainer.element, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-description')))); + } + } + setLabel(label, description, options) { + const classes = ['monaco-icon-label']; + if (options) { + if (options.extraClasses) { + classes.push(...options.extraClasses); } - if (!prevSelection.containsRange(this._currentSelection) && !prevSelection.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) { - // cursor didn't move RIGHT - return; + if (options.italic) { + classes.push('italic'); } - if (this._editor.getOption(96 /* suggest */).snippetsPreventQuickSuggestions && _snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_8__["SnippetController2"].get(this._editor).isInSnippet()) { - // no quick suggestion when in snippet mode - return; + if (options.strikethrough) { + classes.push('strikethrough'); } - this.cancel(); - this._triggerQuickSuggest.cancelAndSet(() => { - if (this._state !== 0 /* Idle */) { - return; - } - if (!LineContext.shouldAutoTrigger(this._editor)) { - return; - } - if (!this._editor.hasModel()) { - return; - } - const model = this._editor.getModel(); - const pos = this._editor.getPosition(); - // validate enabled now - const quickSuggestions = this._editor.getOption(70 /* quickSuggestions */); - if (quickSuggestions === false) { - return; - } - else if (quickSuggestions === true) { - // all good + } + this.domNode.className = classes.join(' '); + this.domNode.title = (options === null || options === void 0 ? void 0 : options.title) || ''; + this.nameNode.setLabel(label, options); + if (description || this.descriptionNode) { + if (!this.descriptionNode) { + this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand + } + if (this.descriptionNode instanceof _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"]) { + this.descriptionNode.set(description || '', options ? options.descriptionMatches : undefined); + if (options === null || options === void 0 ? void 0 : options.descriptionTitle) { + this.descriptionNode.element.title = options.descriptionTitle; } else { - // Check the type of the token that triggered this - model.tokenizeIfCheap(pos.lineNumber); - const lineTokens = model.getLineTokens(pos.lineNumber); - const tokenType = lineTokens.getStandardTokenType(lineTokens.findTokenIndexAtOffset(Math.max(pos.column - 1 - 1, 0))); - const inValidScope = quickSuggestions.other && tokenType === 0 /* Other */ - || quickSuggestions.comments && tokenType === 1 /* Comment */ - || quickSuggestions.strings && tokenType === 2 /* String */; - if (!inValidScope) { - return; - } + this.descriptionNode.element.removeAttribute('title'); } - // we made it till here -> trigger now - this.trigger({ auto: true, shy: false }); - }, this._quickSuggestDelay); - } - } - _refilterCompletionItems() { - // Re-filter suggestions. This MUST run async because filtering/scoring - // uses the model content AND the cursor position. The latter is NOT - // updated when the document has changed (the event which drives this method) - // and therefore a little pause (next mirco task) is needed. See: - // https://stackoverflow.com/questions/25915634/difference-between-microtask-and-macrotask-within-an-event-loop-context#25933985 - Promise.resolve().then(() => { - if (this._state === 0 /* Idle */) { - return; } - if (!this._editor.hasModel()) { - return; + else { + this.descriptionNode.textContent = description || ''; + this.descriptionNode.title = (options === null || options === void 0 ? void 0 : options.descriptionTitle) || ''; + this.descriptionNode.empty = !description; } - const model = this._editor.getModel(); - const position = this._editor.getPosition(); - const ctx = new LineContext(model, position, this._state === 2 /* Auto */, false); - this._onNewContext(ctx); - }); - } - trigger(context, retrigger = false, onlyFrom, existing) { - var _a; - if (!this._editor.hasModel()) { - return; - } - const model = this._editor.getModel(); - const auto = context.auto; - const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy); - // Cancel previous requests, change state & update UI - this.cancel(retrigger); - this._state = auto ? 2 /* Auto */ : 1 /* Manual */; - this._onDidTrigger.fire({ auto, shy: context.shy, position: this._editor.getPosition() }); - // Capture context when request was sent - this._context = ctx; - // Build context for request - let suggestCtx = { triggerKind: (_a = context.triggerKind) !== null && _a !== void 0 ? _a : 0 /* Invoke */ }; - if (context.triggerCharacter) { - suggestCtx = { - triggerKind: 1 /* TriggerCharacter */, - triggerCharacter: context.triggerCharacter - }; - } - this._requestToken = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_9__["CancellationTokenSource"](); - // kind filter and snippet sort rules - const snippetSuggestions = this._editor.getOption(93 /* snippetSuggestions */); - let snippetSortOrder = 1 /* Inline */; - switch (snippetSuggestions) { - case 'top': - snippetSortOrder = 0 /* Top */; - break; - // ↓ that's the default anyways... - // case 'inline': - // snippetSortOrder = SnippetSortOrder.Inline; - // break; - case 'bottom': - snippetSortOrder = 2 /* Bottom */; - break; } - let itemKindFilter = SuggestModel._createItemKindFilter(this._editor); - let wordDistance = _wordDistance_js__WEBPACK_IMPORTED_MODULE_10__["WordDistance"].create(this._editorWorkerService, this._editor); - let completions = Object(_suggest_js__WEBPACK_IMPORTED_MODULE_7__["provideSuggestionItems"])(model, this._editor.getPosition(), new _suggest_js__WEBPACK_IMPORTED_MODULE_7__["CompletionOptions"](snippetSortOrder, itemKindFilter, onlyFrom), suggestCtx, this._requestToken.token); - Promise.all([completions, wordDistance]).then(([completions, wordDistance]) => __awaiter(this, void 0, void 0, function* () { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this._requestToken); - if (this._state === 0 /* Idle */) { - return; - } - if (!this._editor.hasModel()) { - return; - } - let clipboardText = existing === null || existing === void 0 ? void 0 : existing.clipboardText; - if (!clipboardText && completions.needsClipboard) { - clipboardText = yield this._clipboardService.readText(); - } - const model = this._editor.getModel(); - let items = completions.items; - if (existing) { - const cmpFn = Object(_suggest_js__WEBPACK_IMPORTED_MODULE_7__["getSuggestionComparator"])(snippetSortOrder); - items = items.concat(existing.items).sort(cmpFn); - } - const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy); - this._completionModel = new _completionModel_js__WEBPACK_IMPORTED_MODULE_6__["CompletionModel"](items, this._context.column, { - leadingLineContent: ctx.leadingLineContent, - characterCountDelta: ctx.column - this._context.column - }, wordDistance, this._editor.getOption(96 /* suggest */), this._editor.getOption(93 /* snippetSuggestions */), clipboardText); - // store containers so that they can be disposed later - this._completionDisposables.add(completions.dispoables); - this._onNewContext(ctx); - })).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_1__["onUnexpectedError"]); } - static _createItemKindFilter(editor) { - // kind filter and snippet sort rules - const result = new Set(); - // snippet setting - const snippetSuggestions = editor.getOption(93 /* snippetSuggestions */); - if (snippetSuggestions === 'none') { - result.add(27 /* Snippet */); - } - // type setting - const suggestOptions = editor.getOption(96 /* suggest */); - if (!suggestOptions.showMethods) { - result.add(0 /* Method */); - } - if (!suggestOptions.showFunctions) { - result.add(1 /* Function */); - } - if (!suggestOptions.showConstructors) { - result.add(2 /* Constructor */); - } - if (!suggestOptions.showFields) { - result.add(3 /* Field */); - } - if (!suggestOptions.showVariables) { - result.add(4 /* Variable */); - } - if (!suggestOptions.showClasses) { - result.add(5 /* Class */); - } - if (!suggestOptions.showStructs) { - result.add(6 /* Struct */); - } - if (!suggestOptions.showInterfaces) { - result.add(7 /* Interface */); - } - if (!suggestOptions.showModules) { - result.add(8 /* Module */); - } - if (!suggestOptions.showProperties) { - result.add(9 /* Property */); - } - if (!suggestOptions.showEvents) { - result.add(10 /* Event */); - } - if (!suggestOptions.showOperators) { - result.add(11 /* Operator */); - } - if (!suggestOptions.showUnits) { - result.add(12 /* Unit */); - } - if (!suggestOptions.showValues) { - result.add(13 /* Value */); - } - if (!suggestOptions.showConstants) { - result.add(14 /* Constant */); - } - if (!suggestOptions.showEnums) { - result.add(15 /* Enum */); - } - if (!suggestOptions.showEnumMembers) { - result.add(16 /* EnumMember */); - } - if (!suggestOptions.showKeywords) { - result.add(17 /* Keyword */); - } - if (!suggestOptions.showWords) { - result.add(18 /* Text */); - } - if (!suggestOptions.showColors) { - result.add(19 /* Color */); - } - if (!suggestOptions.showFiles) { - result.add(20 /* File */); - } - if (!suggestOptions.showReferences) { - result.add(21 /* Reference */); - } - if (!suggestOptions.showColors) { - result.add(22 /* Customcolor */); - } - if (!suggestOptions.showFolders) { - result.add(23 /* Folder */); - } - if (!suggestOptions.showTypeParameters) { - result.add(24 /* TypeParameter */); - } - if (!suggestOptions.showSnippets) { - result.add(27 /* Snippet */); - } - if (!suggestOptions.showUsers) { - result.add(25 /* User */); - } - if (!suggestOptions.showIssues) { - result.add(26 /* Issue */); - } - return result; +} +class Label { + constructor(container) { + this.container = container; + this.label = undefined; + this.singleLabel = undefined; } - _onNewContext(ctx) { - if (!this._context) { - // happens when 24x7 IntelliSense is enabled and still in its delay - return; - } - if (ctx.lineNumber !== this._context.lineNumber) { - // e.g. happens when pressing Enter while IntelliSense is computed - this.cancel(); - return; - } - if (ctx.leadingWord.startColumn < this._context.leadingWord.startColumn) { - // happens when the current word gets outdented - this.cancel(); + setLabel(label, options) { + if (this.label === label && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_5__["equals"])(this.options, options)) { return; } - if (ctx.column < this._context.column) { - // typed -> moved cursor LEFT -> retrigger if still on a word - if (ctx.leadingWord.word) { - this.trigger({ auto: this._context.auto, shy: false }, true); - } - else { - this.cancel(); + this.label = label; + this.options = options; + if (typeof label === 'string') { + if (!this.singleLabel) { + this.container.innerText = ''; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this.container, 'multiple'); + this.singleLabel = _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })); } - return; - } - if (!this._completionModel) { - // happens when IntelliSense is not yet computed - return; - } - if (ctx.leadingWord.word.length !== 0 && ctx.leadingWord.startColumn > this._context.leadingWord.startColumn) { - // started a new word while IntelliSense shows -> retrigger - // Select those providers have not contributed to this completion model and re-trigger completions for - // them. Also adopt the existing items and merge them into the new completion model - const inactiveProvider = new Set(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["CompletionProviderRegistry"].all(this._editor.getModel())); - this._completionModel.allProvider.forEach(provider => inactiveProvider.delete(provider)); - const items = this._completionModel.adopt(new Set()); - this.trigger({ auto: this._context.auto, shy: false }, true, inactiveProvider, { items, clipboardText: this._completionModel.clipboardText }); - return; - } - if (ctx.column > this._context.column && this._completionModel.incomplete.size > 0 && ctx.leadingWord.word.length !== 0) { - // typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger - const { incomplete } = this._completionModel; - const items = this._completionModel.adopt(incomplete); - this.trigger({ auto: this._state === 2 /* Auto */, shy: false, triggerKind: 2 /* TriggerForIncompleteCompletions */ }, true, incomplete, { items, clipboardText: this._completionModel.clipboardText }); + this.singleLabel.textContent = label; } else { - // typed -> moved cursor RIGHT -> update UI - let oldLineContext = this._completionModel.lineContext; - let isFrozen = false; - this._completionModel.lineContext = { - leadingLineContent: ctx.leadingLineContent, - characterCountDelta: ctx.column - this._context.column - }; - if (this._completionModel.items.length === 0) { - if (LineContext.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < ctx.leadingWord.startColumn) { - // retrigger when heading into a new word - this.trigger({ auto: this._context.auto, shy: false }, true); - return; - } - if (!this._context.auto) { - // freeze when IntelliSense was manually requested - this._completionModel.lineContext = oldLineContext; - isFrozen = this._completionModel.items.length > 0; - if (isFrozen && ctx.leadingWord.word.length === 0) { - // there were results before but now there aren't - // and also we are not on a word anymore -> cancel - this.cancel(); - return; - } - } - else { - // nothing left - this.cancel(); - return; + this.container.innerText = ''; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.container, 'multiple'); + this.singleLabel = undefined; + for (let i = 0; i < label.length; i++) { + const l = label[i]; + const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }, l)); + if (i < label.length - 1) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-separator', undefined, (options === null || options === void 0 ? void 0 : options.separator) || '/')); } } - this._onDidSuggest.fire({ - completionModel: this._completionModel, - auto: this._context.auto, - shy: this._context.shy, - isFrozen, - }); } } } - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestOvertypingCapturer.js ***! - \***********************************************************************************************/ -/*! exports provided: OvertypingCapturer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OvertypingCapturer", function() { return OvertypingCapturer; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class OvertypingCapturer { - constructor(editor, suggestModel) { - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["DisposableStore"](); - this._lastOvertyped = []; - this._empty = true; - this._disposables.add(editor.onWillType(() => { - if (!this._empty) { - return; - } - if (!editor.hasModel()) { - return; - } - const selections = editor.getSelections(); - const selectionsLength = selections.length; - // Check if it will overtype any selections - let willOvertype = false; - for (let i = 0; i < selectionsLength; i++) { - if (!selections[i].isEmpty()) { - willOvertype = true; - break; - } - } - if (!willOvertype) { - return; +function splitMatches(labels, separator, matches) { + if (!matches) { + return undefined; + } + let labelStart = 0; + return labels.map(label => { + const labelRange = { start: labelStart, end: labelStart + label.length }; + const result = matches + .map(match => _common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].intersect(labelRange, match)) + .filter(range => !_common_range_js__WEBPACK_IMPORTED_MODULE_4__["Range"].isEmpty(range)) + .map(({ start, end }) => ({ start: start - labelStart, end: end - labelStart })); + labelStart = labelRange.end + separator.length; + return result; + }); +} +class LabelWithHighlights { + constructor(container, supportCodicons) { + this.container = container; + this.supportCodicons = supportCodicons; + this.label = undefined; + this.singleLabel = undefined; + } + setLabel(label, options) { + if (this.label === label && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_5__["equals"])(this.options, options)) { + return; + } + this.label = label; + this.options = options; + if (typeof label === 'string') { + if (!this.singleLabel) { + this.container.innerText = ''; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["removeClass"](this.container, 'multiple'); + this.singleLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })), this.supportCodicons); } - this._lastOvertyped = []; - const model = editor.getModel(); - for (let i = 0; i < selectionsLength; i++) { - const selection = selections[i]; - // Check for overtyping capturer restrictions - if (model.getValueLengthInRange(selection) > OvertypingCapturer._maxSelectionLength) { - return; + this.singleLabel.set(label, options === null || options === void 0 ? void 0 : options.matches, options === null || options === void 0 ? void 0 : options.title, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines); + } + else { + this.container.innerText = ''; + _dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.container, 'multiple'); + this.singleLabel = undefined; + const separator = (options === null || options === void 0 ? void 0 : options.separator) || '/'; + const matches = splitMatches(label, separator, options === null || options === void 0 ? void 0 : options.matches); + for (let i = 0; i < label.length; i++) { + const l = label[i]; + const m = matches ? matches[i] : undefined; + const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`; + const name = _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }); + const highlightedLabel = new _highlightedlabel_highlightedLabel_js__WEBPACK_IMPORTED_MODULE_2__["HighlightedLabel"](_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](this.container, name), this.supportCodicons); + highlightedLabel.set(l, m, options === null || options === void 0 ? void 0 : options.title, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines); + if (i < label.length - 1) { + _dom_js__WEBPACK_IMPORTED_MODULE_1__["append"](name, _dom_js__WEBPACK_IMPORTED_MODULE_1__["$"]('span.label-separator', undefined, separator)); } - this._lastOvertyped[i] = { value: model.getValueInRange(selection), multiline: selection.startLineNumber !== selection.endLineNumber }; } - this._empty = false; - })); - this._disposables.add(suggestModel.onDidCancel(e => { - if (!this._empty) { - this._empty = true; - } - })); - } - getLastOvertypedInfo(idx) { - if (!this._empty && idx >= 0 && idx < this._lastOvertyped.length) { - return this._lastOvertyped[idx]; } - return undefined; - } - dispose() { - this._disposables.dispose(); } } -OvertypingCapturer._maxSelectionLength = 51200; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js": +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css": /*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestWidget.js ***! + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css ***! \***********************************************************************************/ -/*! exports provided: editorSuggestWidgetBackground, editorSuggestWidgetBorder, editorSuggestWidgetForeground, editorSuggestWidgetSelectedBackground, editorSuggestWidgetHighlightForeground, SuggestWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSuggestWidgetBackground", function() { return editorSuggestWidgetBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSuggestWidgetBorder", function() { return editorSuggestWidgetBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSuggestWidgetForeground", function() { return editorSuggestWidgetForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSuggestWidgetSelectedBackground", function() { return editorSuggestWidgetSelectedBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSuggestWidgetHighlightForeground", function() { return editorSuggestWidgetHighlightForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuggestWidget", function() { return SuggestWidget; }); -/* harmony import */ var _media_suggest_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/suggest.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css"); -/* harmony import */ var _media_suggestStatusBar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./media/suggestStatusBar.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css"); -/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/codicons/codiconStyles.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js"); -/* harmony import */ var _documentSymbols_outlineTree_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../documentSymbols/outlineTree.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineTree.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../base/browser/ui/list/listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); -/* harmony import */ var _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/browser/ui/scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _suggest_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./suggest.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js"); -/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/theme/common/styler.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../markdown/markdownRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../base/browser/ui/iconLabel/iconLabel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js"); -/* harmony import */ var _common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../common/services/getIconClasses.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/getIconClasses.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/files/common/files.js */ "./node_modules/monaco-editor/esm/vs/platform/files/common/files.js"); -/* harmony import */ var _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../base/common/htmlContent.js */ "./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - // The codicon symbol styles are defined here and must be loaded - // The codicon symbol colors are defined here and must be loaded +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./iconlabel.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_iconlabel_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css": +/*!*********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css ***! + \*********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./inputBox.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_inputBox_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js": +/*!********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js ***! + \********************************************************************************/ +/*! exports provided: InputBox, HistoryInputBox */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputBox", function() { return InputBox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistoryInputBox", function() { return HistoryInputBox; }); +/* harmony import */ var _inputBox_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inputBox.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../formattedTextRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"); +/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); +/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_history_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/history.js */ "./node_modules/monaco-editor/esm/vs/base/common/history.js"); +/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ @@ -221210,2191 +74629,647 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume -const expandSuggestionDocsByDefault = false; -const suggestMoreInfoIcon = Object(_base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__["registerIcon"])('suggest-more-info', _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__["Codicon"].chevronRight); -/** - * Suggest widget colors - */ -const editorSuggestWidgetBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["registerColor"])('editorSuggestWidget.background', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBackground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBackground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBackground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); -const editorSuggestWidgetBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["registerColor"])('editorSuggestWidget.border', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBorder"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBorder"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorWidgetBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); -const editorSuggestWidgetForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["registerColor"])('editorSuggestWidget.foreground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorForeground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorForeground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["editorForeground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); -const editorSuggestWidgetSelectedBackground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["registerColor"])('editorSuggestWidget.selectedBackground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listFocusBackground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listFocusBackground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listFocusBackground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); -const editorSuggestWidgetHighlightForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["registerColor"])('editorSuggestWidget.highlightForeground', { dark: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listHighlightForeground"], light: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listHighlightForeground"], hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["listHighlightForeground"] }, _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); -const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i; -function extractColor(item, out) { - const label = typeof item.completion.label === 'string' - ? item.completion.label - : item.completion.label.name; - if (label.match(colorRegExp)) { - out[0] = label; - return true; - } - if (typeof item.completion.documentation === 'string' && item.completion.documentation.match(colorRegExp)) { - out[0] = item.completion.documentation; - return true; - } - return false; -} -function canExpandCompletionItem(item) { - if (!item) { - return false; - } - const suggestion = item.completion; - if (suggestion.documentation) { - return true; - } - return (suggestion.detail && suggestion.detail !== suggestion.label); -} -function getAriaId(index) { - return `suggest-aria-id:${index}`; -} -let ItemRenderer = class ItemRenderer { - constructor(widget, editor, triggerKeybindingLabel, _modelService, _modeService, _themeService) { - this.widget = widget; - this.editor = editor; - this.triggerKeybindingLabel = triggerKeybindingLabel; - this._modelService = _modelService; - this._modeService = _modeService; - this._themeService = _themeService; - } - get templateId() { - return 'suggestion'; - } - renderTemplate(container) { - const data = Object.create(null); - data.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["DisposableStore"](); - data.root = container; - data.root.classList.add('show-file-icons'); - data.icon = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(container, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.icon')); - data.colorspan = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(data.icon, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.colorspan')); - const text = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(container, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.contents')); - const main = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(text, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.main')); - data.iconContainer = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(main, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.icon-label.codicon')); - data.left = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(main, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.left')); - data.right = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(main, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.right')); - data.iconLabel = new _base_browser_ui_iconLabel_iconLabel_js__WEBPACK_IMPORTED_MODULE_26__["IconLabel"](data.left, { supportHighlights: true, supportCodicons: true }); - data.disposables.add(data.iconLabel); - data.parametersLabel = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(data.left, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.signature-label')); - data.qualifierLabel = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(data.left, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.qualifier-label')); - data.detailsLabel = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(data.right, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.details-label')); - data.readMore = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(data.right, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span.readMore' + suggestMoreInfoIcon.cssSelector)); - data.readMore.title = _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('readMore', "Read More ({0})", this.triggerKeybindingLabel); - const configureFont = () => { - const options = this.editor.getOptions(); - const fontInfo = options.get(36 /* fontInfo */); - const fontFamily = fontInfo.fontFamily; - const fontFeatureSettings = fontInfo.fontFeatureSettings; - const fontSize = options.get(97 /* suggestFontSize */) || fontInfo.fontSize; - const lineHeight = options.get(98 /* suggestLineHeight */) || fontInfo.lineHeight; - const fontWeight = fontInfo.fontWeight; - const fontSizePx = `${fontSize}px`; - const lineHeightPx = `${lineHeight}px`; - data.root.style.fontSize = fontSizePx; - data.root.style.fontWeight = fontWeight; - main.style.fontFamily = fontFamily; - main.style.fontFeatureSettings = fontFeatureSettings; - main.style.lineHeight = lineHeightPx; - data.icon.style.height = lineHeightPx; - data.icon.style.width = lineHeightPx; - data.readMore.style.height = lineHeightPx; - data.readMore.style.width = lineHeightPx; - }; - configureFont(); - data.disposables.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Event"].chain(this.editor.onDidChangeConfiguration.bind(this.editor)) - .filter(e => e.hasChanged(36 /* fontInfo */) || e.hasChanged(97 /* suggestFontSize */) || e.hasChanged(98 /* suggestLineHeight */)) - .on(configureFont, null)); - return data; - } - renderElement(element, index, templateData) { - const data = templateData; - const suggestion = element.completion; - const textLabel = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name; - data.root.id = getAriaId(index); - data.colorspan.style.backgroundColor = ''; - const labelOptions = { - labelEscapeNewLines: true, - matches: Object(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_5__["createMatches"])(element.score) - }; - let color = []; - if (suggestion.kind === 19 /* Color */ && extractColor(element, color)) { - // special logic for 'color' completion items - data.icon.className = 'icon customcolor'; - data.iconContainer.className = 'icon hide'; - data.colorspan.style.backgroundColor = color[0]; - } - else if (suggestion.kind === 20 /* File */ && this._themeService.getFileIconTheme().hasFileIcons) { - // special logic for 'file' completion items - data.icon.className = 'icon hide'; - data.iconContainer.className = 'icon hide'; - const labelClasses = Object(_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_27__["getIconClasses"])(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_29__["URI"].from({ scheme: 'fake', path: textLabel }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_31__["FileKind"].FILE); - const detailClasses = Object(_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_27__["getIconClasses"])(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_29__["URI"].from({ scheme: 'fake', path: suggestion.detail }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_31__["FileKind"].FILE); - labelOptions.extraClasses = labelClasses.length > detailClasses.length ? labelClasses : detailClasses; - } - else if (suggestion.kind === 23 /* Folder */ && this._themeService.getFileIconTheme().hasFolderIcons) { - // special logic for 'folder' completion items - data.icon.className = 'icon hide'; - data.iconContainer.className = 'icon hide'; - labelOptions.extraClasses = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_33__["flatten"])([ - Object(_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_27__["getIconClasses"])(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_29__["URI"].from({ scheme: 'fake', path: textLabel }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_31__["FileKind"].FOLDER), - Object(_common_services_getIconClasses_js__WEBPACK_IMPORTED_MODULE_27__["getIconClasses"])(this._modelService, this._modeService, _base_common_uri_js__WEBPACK_IMPORTED_MODULE_29__["URI"].from({ scheme: 'fake', path: suggestion.detail }), _platform_files_common_files_js__WEBPACK_IMPORTED_MODULE_31__["FileKind"].FOLDER) - ]); - } - else { - // normal icon - data.icon.className = 'icon hide'; - data.iconContainer.className = ''; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["addClasses"])(data.iconContainer, `suggest-icon ${Object(_common_modes_js__WEBPACK_IMPORTED_MODULE_25__["completionKindToCssClass"])(suggestion.kind)}`); - } - if (suggestion.tags && suggestion.tags.indexOf(1 /* Deprecated */) >= 0) { - labelOptions.extraClasses = (labelOptions.extraClasses || []).concat(['deprecated']); - labelOptions.matches = []; - } - data.iconLabel.setLabel(textLabel, undefined, labelOptions); - if (typeof suggestion.label === 'string') { - data.parametersLabel.textContent = ''; - data.qualifierLabel.textContent = ''; - data.detailsLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); - data.root.classList.add('string-label'); +const $ = _dom_js__WEBPACK_IMPORTED_MODULE_2__["$"]; +const defaultOpts = { + inputBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#3C3C3C'), + inputForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#CCCCCC'), + inputValidationInfoBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#55AAFF'), + inputValidationInfoBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#063B49'), + inputValidationWarningBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#B89500'), + inputValidationWarningBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#352A05'), + inputValidationErrorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#BE1100'), + inputValidationErrorBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].fromHex('#5A1D1D') +}; +class InputBox extends _widget_js__WEBPACK_IMPORTED_MODULE_7__["Widget"] { + constructor(container, contextViewProvider, options) { + super(); + this.state = 'idle'; + this.maxHeight = Number.POSITIVE_INFINITY; + this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidChange = this._onDidChange.event; + this._onDidHeightChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidHeightChange = this._onDidHeightChange.event; + this.contextViewProvider = contextViewProvider; + this.options = options || Object.create(null); + Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_9__["mixin"])(this.options, defaultOpts, false); + this.message = null; + this.placeholder = this.options.placeholder || ''; + this.ariaLabel = this.options.ariaLabel || ''; + this.inputBackground = this.options.inputBackground; + this.inputForeground = this.options.inputForeground; + this.inputBorder = this.options.inputBorder; + this.inputValidationInfoBorder = this.options.inputValidationInfoBorder; + this.inputValidationInfoBackground = this.options.inputValidationInfoBackground; + this.inputValidationInfoForeground = this.options.inputValidationInfoForeground; + this.inputValidationWarningBorder = this.options.inputValidationWarningBorder; + this.inputValidationWarningBackground = this.options.inputValidationWarningBackground; + this.inputValidationWarningForeground = this.options.inputValidationWarningForeground; + this.inputValidationErrorBorder = this.options.inputValidationErrorBorder; + this.inputValidationErrorBackground = this.options.inputValidationErrorBackground; + this.inputValidationErrorForeground = this.options.inputValidationErrorForeground; + if (this.options.validationOptions) { + this.validation = this.options.validationOptions.validation; } - else { - data.parametersLabel.textContent = (suggestion.label.parameters || '').replace(/\n.*$/m, ''); - data.qualifierLabel.textContent = (suggestion.label.qualifier || '').replace(/\n.*$/m, ''); - data.detailsLabel.textContent = (suggestion.label.type || '').replace(/\n.*$/m, ''); - data.root.classList.remove('string-label'); - } - if (canExpandCompletionItem(element)) { - data.right.classList.add('can-expand-details'); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(data.readMore); - data.readMore.onmousedown = e => { - e.stopPropagation(); - e.preventDefault(); - }; - data.readMore.onclick = e => { - e.stopPropagation(); - e.preventDefault(); - this.widget.toggleDetails(); - }; + this.element = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.monaco-inputbox.idle')); + let tagName = this.options.flexibleHeight ? 'textarea' : 'input'; + let wrapper = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](this.element, $('.wrapper')); + this.input = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](wrapper, $(tagName + '.input.empty')); + this.input.setAttribute('autocorrect', 'off'); + this.input.setAttribute('autocapitalize', 'off'); + this.input.setAttribute('spellcheck', 'false'); + this.onfocus(this.input, () => this.element.classList.add('synthetic-focus')); + this.onblur(this.input, () => this.element.classList.remove('synthetic-focus')); + if (this.options.flexibleHeight) { + this.maxHeight = typeof this.options.flexibleMaxHeight === 'number' ? this.options.flexibleMaxHeight : Number.POSITIVE_INFINITY; + this.mirror = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](wrapper, $('div.mirror')); + this.mirror.innerText = '\u00a0'; + this.scrollableElement = new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_11__["ScrollableElement"](this.element, { vertical: 1 /* Auto */ }); + if (this.options.flexibleWidth) { + this.input.setAttribute('wrap', 'off'); + this.mirror.style.whiteSpace = 'pre'; + this.mirror.style.wordWrap = 'initial'; + } + _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, this.scrollableElement.getDomNode()); + this._register(this.scrollableElement); + // from ScrollableElement to DOM + this._register(this.scrollableElement.onScroll(e => this.input.scrollTop = e.scrollTop)); + const onSelectionChange = _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Event"].filter(Object(_event_js__WEBPACK_IMPORTED_MODULE_12__["domEvent"])(document, 'selectionchange'), () => { + const selection = document.getSelection(); + return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === wrapper; + }); + // from DOM to ScrollableElement + this._register(onSelectionChange(this.updateScrollDimensions, this)); + this._register(this.onDidHeightChange(this.updateScrollDimensions, this)); } else { - data.right.classList.remove('can-expand-details'); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(data.readMore); - data.readMore.onmousedown = null; - data.readMore.onclick = null; - } - } - disposeTemplate(templateData) { - templateData.disposables.dispose(); - } -}; -ItemRenderer = __decorate([ - __param(3, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_28__["IModelService"]), - __param(4, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_22__["IModeService"]), - __param(5, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["IThemeService"]) -], ItemRenderer); -class SuggestionDetails { - constructor(container, widget, editor, markdownRenderer, kbToggleDetails) { - this.widget = widget; - this.editor = editor; - this.markdownRenderer = markdownRenderer; - this.kbToggleDetails = kbToggleDetails; - this.borderWidth = 1; - this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["DisposableStore"](); - this.el = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(container, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.details')); - this.disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["toDisposable"])(() => container.removeChild(this.el))); - this.body = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.body'); - this.scrollbar = new _base_browser_ui_scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_12__["DomScrollableElement"](this.body, {}); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.el, this.scrollbar.getDomNode()); - this.disposables.add(this.scrollbar); - this.header = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.body, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.header')); - this.close = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.header, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('span' + _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_36__["Codicon"].close.cssSelector)); - this.close.title = _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('readLess', "Read Less ({0})", this.kbToggleDetails); - this.type = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.header, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('p.type')); - this.docs = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.body, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('p.docs')); - this.configureFont(); - _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Event"].chain(this.editor.onDidChangeConfiguration.bind(this.editor)) - .filter(e => e.hasChanged(36 /* fontInfo */)) - .on(this.configureFont, this, this.disposables); - markdownRenderer.onDidRenderCodeBlock(() => this.scrollbar.scanDomNode(), this, this.disposables); - } - get element() { - return this.el; - } - renderLoading() { - this.type.textContent = _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('loading', "Loading..."); - this.docs.textContent = ''; - } - renderItem(item, explainMode) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this.renderDisposeable); - this.renderDisposeable = undefined; - let { documentation, detail } = item.completion; - // --- documentation - if (explainMode) { - let md = ''; - md += `score: ${item.score[0]}${item.word ? `, compared '${item.completion.filterText && (item.completion.filterText + ' (filterText)') || item.completion.label}' with '${item.word}'` : ' (no prefix)'}\n`; - md += `distance: ${item.distance}, see localityBonus-setting\n`; - md += `index: ${item.idx}, based on ${item.completion.sortText && `sortText: "${item.completion.sortText}"` || 'label'}\n`; - documentation = new _base_common_htmlContent_js__WEBPACK_IMPORTED_MODULE_32__["MarkdownString"]().appendCodeblock('empty', md); - detail = `Provider: ${item.provider._debugDisplayName}`; - } - if (!explainMode && !canExpandCompletionItem(item)) { - this.type.textContent = ''; - this.docs.textContent = ''; - this.el.classList.add('no-docs'); - return; - } - this.el.classList.remove('no-docs'); - if (typeof documentation === 'string') { - this.docs.classList.remove('markdown-docs'); - this.docs.textContent = documentation; + this.input.type = this.options.type || 'text'; + this.input.setAttribute('wrap', 'off'); } - else { - this.docs.classList.add('markdown-docs'); - this.docs.innerText = ''; - const renderedContents = this.markdownRenderer.render(documentation); - this.renderDisposeable = renderedContents; - this.docs.appendChild(renderedContents.element); + if (this.ariaLabel) { + this.input.setAttribute('aria-label', this.ariaLabel); } - // --- details - if (detail) { - this.type.innerText = detail.length > 100000 ? `${detail.substr(0, 100000)}…` : detail; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.type); + if (this.placeholder) { + this.setPlaceHolder(this.placeholder); } - else { - this.type.innerText = ''; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.type); + this.oninput(this.input, () => this.onValueChange()); + this.onblur(this.input, () => this.onBlur()); + this.onfocus(this.input, () => this.onFocus()); + this.ignoreGesture(this.input); + setTimeout(() => this.updateMirror(), 0); + // Support actions + if (this.options.actions) { + this.actionbar = this._register(new _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_5__["ActionBar"](this.element)); + this.actionbar.push(this.options.actions, { icon: true, label: false }); } - this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + (this.borderWidth * 2) + 'px'; - this.el.style.userSelect = 'text'; - this.el.tabIndex = -1; - this.close.onmousedown = e => { - e.preventDefault(); - e.stopPropagation(); - }; - this.close.onclick = e => { - e.preventDefault(); - e.stopPropagation(); - this.widget.toggleDetails(); - }; - this.body.scrollTop = 0; - this.scrollbar.scanDomNode(); - } - scrollDown(much = 8) { - this.body.scrollTop += much; - } - scrollUp(much = 8) { - this.body.scrollTop -= much; - } - scrollTop() { - this.body.scrollTop = 0; - } - scrollBottom() { - this.body.scrollTop = this.body.scrollHeight; - } - pageDown() { - this.scrollDown(80); - } - pageUp() { - this.scrollUp(80); - } - setBorderWidth(width) { - this.borderWidth = width; - } - configureFont() { - const options = this.editor.getOptions(); - const fontInfo = options.get(36 /* fontInfo */); - const fontFamily = fontInfo.fontFamily; - const fontSize = options.get(97 /* suggestFontSize */) || fontInfo.fontSize; - const lineHeight = options.get(98 /* suggestLineHeight */) || fontInfo.lineHeight; - const fontWeight = fontInfo.fontWeight; - const fontSizePx = `${fontSize}px`; - const lineHeightPx = `${lineHeight}px`; - this.el.style.fontSize = fontSizePx; - this.el.style.fontWeight = fontWeight; - this.el.style.fontFeatureSettings = fontInfo.fontFeatureSettings; - this.type.style.fontFamily = fontFamily; - this.close.style.height = lineHeightPx; - this.close.style.width = lineHeightPx; + this.applyStyles(); } - dispose() { - this.disposables.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this.renderDisposeable); - this.renderDisposeable = undefined; - } -} -let SuggestWidget = class SuggestWidget { - constructor(editor, telemetryService, keybindingService, contextKeyService, themeService, storageService, modeService, openerService, menuService, instantiationService) { - var _a, _b; - this.editor = editor; - this.telemetryService = telemetryService; - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = true; - this.suppressMouseDown = false; - this.state = 0 /* Hidden */; - this.isAddedAsContentWidget = false; - this.isAuto = false; - this.loadingTimeout = _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["Disposable"].None; - this.currentSuggestionDetails = null; - this.ignoreFocusEvents = false; - this.completionModel = null; - this.showTimeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_24__["TimeoutTimer"](); - this.toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["DisposableStore"](); - this.onDidSelectEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Emitter"](); - this.onDidFocusEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Emitter"](); - this.onDidHideEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Emitter"](); - this.onDidShowEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Emitter"](); - this.onDidSelect = this.onDidSelectEmitter.event; - this.onDidFocus = this.onDidFocusEmitter.event; - this.onDidHide = this.onDidHideEmitter.event; - this.onDidShow = this.onDidShowEmitter.event; - this.maxWidgetWidth = 660; - this.listWidth = 330; - this.firstFocusInCurrentList = false; - this.preferDocPositionTop = false; - this.docsPositionPreviousWidgetY = null; - this.explainMode = false; - this._onDetailsKeydown = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_7__["Emitter"](); - this.onDetailsKeyDown = this._onDetailsKeydown.event; - const markdownRenderer = this.toDispose.add(new _markdown_markdownRenderer_js__WEBPACK_IMPORTED_MODULE_21__["MarkdownRenderer"](editor, modeService, openerService)); - const kbToggleDetails = (_b = (_a = keybindingService.lookupKeybinding('toggleSuggestionDetails')) === null || _a === void 0 ? void 0 : _a.getLabel()) !== null && _b !== void 0 ? _b : ''; - this.isAuto = false; - this.focusedItem = null; - this.storageService = storageService; - this.element = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.editor-widget.suggest-widget'); - this.toDispose.add(Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["addDisposableListener"])(this.element, 'click', e => { - if (e.target === this.element) { - this.hideWidget(); - } - })); - this.messageElement = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.element, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.message')); - this.listElement = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.element, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.tree')); - const applyStatusBarStyle = () => this.element.classList.toggle('with-status-bar', this.editor.getOption(96 /* suggest */).statusBar.visible); - applyStatusBarStyle(); - this.statusBarElement = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["append"])(this.element, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["$"])('.suggest-status-bar')); - const actionViewItemProvider = (action => { - const kb = keybindingService.lookupKeybindings(action.id); - return new class extends _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_37__["ActionViewItem"] { - constructor() { - super(undefined, action, { label: true, icon: false }); - } - updateLabel() { - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_33__["isFalsyOrEmpty"])(kb) || !this.label) { - return super.updateLabel(); - } - const { label } = this.getAction(); - this.label.textContent = /{\d}/.test(label) - ? _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__["format"](this.getAction().label, kb[0].getLabel()) - : `${this.getAction().label} (${kb[0].getLabel()})`; - } - }; - }); - const leftActions = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_35__["ActionBar"](this.statusBarElement, { actionViewItemProvider }); - const rightActions = new _base_browser_ui_actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_35__["ActionBar"](this.statusBarElement, { actionViewItemProvider }); - const menu = menuService.createMenu(_suggest_js__WEBPACK_IMPORTED_MODULE_15__["suggestWidgetStatusbarMenu"], contextKeyService); - const renderMenu = () => { - const left = []; - const right = []; - for (let [group, actions] of menu.getActions()) { - if (group === 'left') { - left.push(...actions); - } - else { - right.push(...actions); - } - } - leftActions.clear(); - leftActions.push(left); - rightActions.clear(); - rightActions.push(right); - }; - this.toDispose.add(menu.onDidChange(() => renderMenu())); - this.toDispose.add(menu); - this.details = instantiationService.createInstance(SuggestionDetails, this.element, this, this.editor, markdownRenderer, kbToggleDetails); - const applyIconStyle = () => this.element.classList.toggle('no-icons', !this.editor.getOption(96 /* suggest */).showIcons); - applyIconStyle(); - let renderer = instantiationService.createInstance(ItemRenderer, this, this.editor, kbToggleDetails); - this.list = new _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_11__["List"]('SuggestWidget', this.listElement, this, [renderer], { - useShadows: false, - mouseSupport: false, - accessibilityProvider: { - getRole: () => 'option', - getAriaLabel: (item) => { - const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name; - if (item.isResolved && this.expandDocsSettingFromStorage()) { - const { documentation, detail } = item.completion; - const docs = _base_common_strings_js__WEBPACK_IMPORTED_MODULE_6__["format"]('{0}{1}', detail || '', documentation ? (typeof documentation === 'string' ? documentation : documentation.value) : ''); - return _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('ariaCurrenttSuggestionReadDetails', "{0}, docs: {1}", textLabel, docs); - } - else { - return textLabel; - } - }, - getWidgetAriaLabel: () => _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('suggest', "Suggest"), - getWidgetRole: () => 'listbox' - } - }); - this.toDispose.add(Object(_platform_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_17__["attachListStyler"])(this.list, themeService, { - listInactiveFocusBackground: editorSuggestWidgetSelectedBackground, - listInactiveFocusOutline: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["activeContrastBorder"] - })); - this.toDispose.add(themeService.onDidColorThemeChange(t => this.onThemeChange(t))); - this.toDispose.add(editor.onDidLayoutChange(() => this.onEditorLayoutChange())); - this.toDispose.add(this.list.onMouseDown(e => this.onListMouseDownOrTap(e))); - this.toDispose.add(this.list.onTap(e => this.onListMouseDownOrTap(e))); - this.toDispose.add(this.list.onDidChangeSelection(e => this.onListSelection(e))); - this.toDispose.add(this.list.onDidChangeFocus(e => this.onListFocus(e))); - this.toDispose.add(this.editor.onDidChangeCursorSelection(() => this.onCursorSelectionChanged())); - this.toDispose.add(this.editor.onDidChangeConfiguration(e => { - if (e.hasChanged(96 /* suggest */)) { - applyStatusBarStyle(); - applyIconStyle(); - } - })); - this.ctxSuggestWidgetVisible = _suggest_js__WEBPACK_IMPORTED_MODULE_15__["Context"].Visible.bindTo(contextKeyService); - this.ctxSuggestWidgetDetailsVisible = _suggest_js__WEBPACK_IMPORTED_MODULE_15__["Context"].DetailsVisible.bindTo(contextKeyService); - this.ctxSuggestWidgetMultipleSuggestions = _suggest_js__WEBPACK_IMPORTED_MODULE_15__["Context"].MultipleSuggestions.bindTo(contextKeyService); - this.onThemeChange(themeService.getColorTheme()); - this.toDispose.add(Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["addStandardDisposableListener"])(this.details.element, 'keydown', e => { - this._onDetailsKeydown.fire(e); - })); - this.toDispose.add(this.editor.onMouseDown((e) => this.onEditorMouseDown(e))); + onBlur() { + this._hideMessage(); + } + onFocus() { + this._showMessage(); + } + setPlaceHolder(placeHolder) { + this.placeholder = placeHolder; + this.input.setAttribute('placeholder', placeHolder); + this.input.title = placeHolder; } - onEditorMouseDown(mouseEvent) { - // Clicking inside details - if (this.details.element.contains(mouseEvent.target.element)) { - this.details.element.focus(); + setAriaLabel(label) { + this.ariaLabel = label; + if (label) { + this.input.setAttribute('aria-label', this.ariaLabel); } - // Clicking outside details and inside suggest else { - if (this.element.contains(mouseEvent.target.element)) { - this.editor.focus(); - } + this.input.removeAttribute('aria-label'); } } - onCursorSelectionChanged() { - if (this.state === 0 /* Hidden */) { - return; - } - this.editor.layoutContentWidget(this); + getAriaLabel() { + return this.ariaLabel; } - onEditorLayoutChange() { - if ((this.state === 3 /* Open */ || this.state === 5 /* Details */) && this.expandDocsSettingFromStorage()) { - this.expandSideOrBelow(); - } + get inputElement() { + return this.input; } - onListMouseDownOrTap(e) { - if (typeof e.element === 'undefined' || typeof e.index === 'undefined') { - return; - } - // prevent stealing browser focus from the editor - e.browserEvent.preventDefault(); - e.browserEvent.stopPropagation(); - this.select(e.element, e.index); + get value() { + return this.input.value; } - onListSelection(e) { - if (!e.elements.length) { - return; + set value(newValue) { + if (this.input.value !== newValue) { + this.input.value = newValue; + this.onValueChange(); } - this.select(e.elements[0], e.indexes[0]); } - select(item, index) { - const completionModel = this.completionModel; - if (!completionModel) { - return; - } - this.onDidSelectEmitter.fire({ item, index, model: completionModel }); - this.editor.focus(); - } - onThemeChange(theme) { - const backgroundColor = theme.getColor(editorSuggestWidgetBackground); - if (backgroundColor) { - this.listElement.style.backgroundColor = backgroundColor.toString(); - this.statusBarElement.style.backgroundColor = backgroundColor.toString(); - this.details.element.style.backgroundColor = backgroundColor.toString(); - this.messageElement.style.backgroundColor = backgroundColor.toString(); - } - const borderColor = theme.getColor(editorSuggestWidgetBorder); - if (borderColor) { - this.listElement.style.borderColor = borderColor.toString(); - this.statusBarElement.style.borderColor = borderColor.toString(); - this.details.element.style.borderColor = borderColor.toString(); - this.messageElement.style.borderColor = borderColor.toString(); - this.detailsBorderColor = borderColor.toString(); - } - const focusBorderColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["focusBorder"]); - if (focusBorderColor) { - this.detailsFocusBorderColor = focusBorderColor.toString(); - } - this.details.setBorderWidth(theme.type === 'hc' ? 2 : 1); - } - onListFocus(e) { - if (this.ignoreFocusEvents) { - return; - } - if (!e.elements.length) { - if (this.currentSuggestionDetails) { - this.currentSuggestionDetails.cancel(); - this.currentSuggestionDetails = null; - this.focusedItem = null; - } - this.editor.setAriaOptions({ activeDescendant: undefined }); - return; - } - if (!this.completionModel) { - return; - } - const item = e.elements[0]; - const index = e.indexes[0]; - this.firstFocusInCurrentList = !this.focusedItem; - if (item !== this.focusedItem) { - if (this.currentSuggestionDetails) { - this.currentSuggestionDetails.cancel(); - this.currentSuggestionDetails = null; - } - this.focusedItem = item; - this.list.reveal(index); - this.currentSuggestionDetails = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_24__["createCancelablePromise"])((token) => __awaiter(this, void 0, void 0, function* () { - const loading = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_24__["disposableTimeout"])(() => this.showDetails(true), 250); - token.onCancellationRequested(() => loading.dispose()); - const result = yield item.resolve(token); - loading.dispose(); - return result; - })); - this.currentSuggestionDetails.then(() => { - if (index >= this.list.length || item !== this.list.element(index)) { - return; - } - // item can have extra information, so re-render - this.ignoreFocusEvents = true; - this.list.splice(index, 1, [item]); - this.list.setFocus([index]); - this.ignoreFocusEvents = false; - if (this.expandDocsSettingFromStorage()) { - this.showDetails(false); - } - else { - this.element.classList.remove('docs-side'); - } - this.editor.setAriaOptions({ activeDescendant: getAriaId(index) }); - }).catch(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"]); - } - // emit an event - this.onDidFocusEmitter.fire({ item, index, model: this.completionModel }); + get height() { + return typeof this.cachedHeight === 'number' ? this.cachedHeight : _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalHeight"](this.element); } - setState(state) { - if (!this.element) { - return; - } - if (!this.isAddedAsContentWidget && state !== 0 /* Hidden */) { - this.isAddedAsContentWidget = true; - this.editor.addContentWidget(this); - } - const stateChanged = this.state !== state; - this.state = state; - this.element.classList.toggle('frozen', state === 4 /* Frozen */); - switch (state) { - case 0 /* Hidden */: - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.messageElement, this.details.element, this.listElement, this.statusBarElement); - this.hide(); - this.listHeight = 0; - if (stateChanged) { - this.list.splice(0, this.list.length); - } - this.focusedItem = null; - break; - case 1 /* Loading */: - this.messageElement.textContent = SuggestWidget.LOADING_MESSAGE; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.listElement, this.details.element, this.statusBarElement); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.messageElement); - this.element.classList.remove('docs-side'); - this.show(); - this.focusedItem = null; - break; - case 2 /* Empty */: - this.messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.listElement, this.details.element, this.statusBarElement); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.messageElement); - this.element.classList.remove('docs-side'); - this.show(); - this.focusedItem = null; - break; - case 3 /* Open */: - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.messageElement); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.listElement, this.statusBarElement); - this.show(); - break; - case 4 /* Frozen */: - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.messageElement); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.listElement); - this.show(); - break; - case 5 /* Details */: - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.messageElement); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.details.element, this.listElement, this.statusBarElement); - this.show(); - break; - } + focus() { + this.input.focus(); } - showTriggered(auto, delay) { - if (this.state !== 0 /* Hidden */) { - return; - } - this.isAuto = !!auto; - if (!this.isAuto) { - this.loadingTimeout = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_24__["disposableTimeout"])(() => this.setState(1 /* Loading */), delay); - } + blur() { + this.input.blur(); } - showSuggestions(completionModel, selectionIndex, isFrozen, isAuto) { - this.preferDocPositionTop = false; - this.docsPositionPreviousWidgetY = null; - this.loadingTimeout.dispose(); - if (this.currentSuggestionDetails) { - this.currentSuggestionDetails.cancel(); - this.currentSuggestionDetails = null; - } - if (this.completionModel !== completionModel) { - this.completionModel = completionModel; - } - if (isFrozen && this.state !== 2 /* Empty */ && this.state !== 0 /* Hidden */) { - this.setState(4 /* Frozen */); - return; + hasFocus() { + return document.activeElement === this.input; + } + select(range = null) { + this.input.select(); + if (range) { + this.input.setSelectionRange(range.start, range.end); } - let visibleCount = this.completionModel.items.length; - const isEmpty = visibleCount === 0; - this.ctxSuggestWidgetMultipleSuggestions.set(visibleCount > 1); - if (isEmpty) { - if (isAuto) { - this.setState(0 /* Hidden */); - } - else { - this.setState(2 /* Empty */); + } + isSelectionAtEnd() { + return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd; + } + enable() { + this.input.removeAttribute('disabled'); + } + disable() { + this.blur(); + this.input.disabled = true; + this._hideMessage(); + } + get width() { + return _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this.input); + } + set width(width) { + if (this.options.flexibleHeight && this.options.flexibleWidth) { + // textarea with horizontal scrolling + let horizontalPadding = 0; + if (this.mirror) { + const paddingLeft = parseFloat(this.mirror.style.paddingLeft || '') || 0; + const paddingRight = parseFloat(this.mirror.style.paddingRight || '') || 0; + horizontalPadding = paddingLeft + paddingRight; } - this.completionModel = null; + this.input.style.width = (width - horizontalPadding) + 'px'; } else { - if (this.state !== 3 /* Open */) { - const { stats } = this.completionModel; - stats['wasAutomaticallyTriggered'] = !!isAuto; - /* __GDPR__ - "suggestWidget" : { - "wasAutomaticallyTriggered" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }, - "${include}": [ - "${ICompletionStats}" - ] - } - */ - this.telemetryService.publicLog('suggestWidget', Object.assign({}, stats)); - } - this.focusedItem = null; - this.list.splice(0, this.list.length, this.completionModel.items); - if (isFrozen) { - this.setState(4 /* Frozen */); - } - else { - this.setState(3 /* Open */); - } - this.list.reveal(selectionIndex, 0); - this.list.setFocus([selectionIndex]); - // Reset focus border - if (this.detailsBorderColor) { - this.details.element.style.borderColor = this.detailsBorderColor; - } + this.input.style.width = width + 'px'; } - } - selectNextPage() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 5 /* Details */: - this.details.pageDown(); - return true; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusNextPage(); - return true; + if (this.mirror) { + this.mirror.style.width = width + 'px'; } } - selectNext() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusNext(1, true); - return true; + set paddingRight(paddingRight) { + if (this.options.flexibleHeight && this.options.flexibleWidth) { + this.input.style.width = `calc(100% - ${paddingRight}px)`; } - } - selectLast() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 5 /* Details */: - this.details.scrollBottom(); - return true; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusLast(); - return true; + else { + this.input.style.paddingRight = paddingRight + 'px'; } - } - selectPreviousPage() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 5 /* Details */: - this.details.pageUp(); - return true; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusPreviousPage(); - return true; + if (this.mirror) { + this.mirror.style.paddingRight = paddingRight + 'px'; } } - selectPrevious() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusPrevious(1, true); - return false; + updateScrollDimensions() { + if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number' || !this.scrollableElement) { + return; } + const scrollHeight = this.cachedContentHeight; + const height = this.cachedHeight; + const scrollTop = this.input.scrollTop; + this.scrollableElement.setScrollDimensions({ scrollHeight, height }); + this.scrollableElement.setScrollPosition({ scrollTop }); } - selectFirst() { - switch (this.state) { - case 0 /* Hidden */: - return false; - case 5 /* Details */: - this.details.scrollTop(); - return true; - case 1 /* Loading */: - return !this.isAuto; - default: - this.list.focusFirst(); - return true; + showMessage(message, force) { + this.message = message; + this.element.classList.remove('idle'); + this.element.classList.remove('info'); + this.element.classList.remove('warning'); + this.element.classList.remove('error'); + this.element.classList.add(this.classForType(message.type)); + const styles = this.stylesForType(this.message.type); + this.element.style.border = styles.border ? `1px solid ${styles.border}` : ''; + if (this.hasFocus() || force) { + this._showMessage(); } } - getFocusedItem() { - if (this.state !== 0 /* Hidden */ - && this.state !== 2 /* Empty */ - && this.state !== 1 /* Loading */ - && this.completionModel) { - return { - item: this.list.getFocusedElements()[0], - index: this.list.getFocus()[0], - model: this.completionModel - }; - } - return undefined; + hideMessage() { + this.message = null; + this.element.classList.remove('info'); + this.element.classList.remove('warning'); + this.element.classList.remove('error'); + this.element.classList.add('idle'); + this._hideMessage(); + this.applyStyles(); } - toggleDetailsFocus() { - if (this.state === 5 /* Details */) { - this.setState(3 /* Open */); - if (this.detailsBorderColor) { - this.details.element.style.borderColor = this.detailsBorderColor; - } - } - else if (this.state === 3 /* Open */ && this.expandDocsSettingFromStorage()) { - this.setState(5 /* Details */); - if (this.detailsFocusBorderColor) { - this.details.element.style.borderColor = this.detailsFocusBorderColor; + validate() { + let errorMsg = null; + if (this.validation) { + errorMsg = this.validation(this.value); + if (errorMsg) { + this.inputElement.setAttribute('aria-invalid', 'true'); + this.showMessage(errorMsg); } - } - this.telemetryService.publicLog2('suggestWidget:toggleDetailsFocus'); - } - toggleDetails() { - if (!canExpandCompletionItem(this.list.getFocusedElements()[0])) { - return; - } - if (this.expandDocsSettingFromStorage()) { - this.ctxSuggestWidgetDetailsVisible.set(false); - this.updateExpandDocsSetting(false); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["hide"])(this.details.element); - this.element.classList.remove('docs-side', 'doc-below'); - this.editor.layoutContentWidget(this); - this.telemetryService.publicLog2('suggestWidget:collapseDetails'); - } - else { - if (this.state !== 3 /* Open */ && this.state !== 5 /* Details */ && this.state !== 4 /* Frozen */) { - return; + else if (this.inputElement.hasAttribute('aria-invalid')) { + this.inputElement.removeAttribute('aria-invalid'); + this.hideMessage(); } - this.ctxSuggestWidgetDetailsVisible.set(true); - this.updateExpandDocsSetting(true); - this.showDetails(false); - this.telemetryService.publicLog2('suggestWidget:expandDetails'); } + return !errorMsg; } - showDetails(loading) { - if (!loading) { - // When loading, don't re-layout docs, as item is not resolved yet #88731 - this.expandSideOrBelow(); - } - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["show"])(this.details.element); - this.details.element.style.maxHeight = this.maxWidgetHeight + 'px'; - if (loading) { - this.details.renderLoading(); - } - else { - this.details.renderItem(this.list.getFocusedElements()[0], this.explainMode); + stylesForType(type) { + switch (type) { + case 1 /* INFO */: return { border: this.inputValidationInfoBorder, background: this.inputValidationInfoBackground, foreground: this.inputValidationInfoForeground }; + case 2 /* WARNING */: return { border: this.inputValidationWarningBorder, background: this.inputValidationWarningBackground, foreground: this.inputValidationWarningForeground }; + default: return { border: this.inputValidationErrorBorder, background: this.inputValidationErrorBackground, foreground: this.inputValidationErrorForeground }; } - // Reset margin-top that was set as Fix for #26416 - this.listElement.style.marginTop = '0px'; - // with docs showing up widget width/height may change, so reposition the widget - this.editor.layoutContentWidget(this); - this.adjustDocsPosition(); - this.editor.focus(); } - toggleExplainMode() { - if (this.list.getFocusedElements()[0] && this.expandDocsSettingFromStorage()) { - this.explainMode = !this.explainMode; - this.showDetails(false); + classForType(type) { + switch (type) { + case 1 /* INFO */: return 'info'; + case 2 /* WARNING */: return 'warning'; + default: return 'error'; } } - show() { - const newHeight = this.updateListHeight(); - if (newHeight !== this.listHeight) { - this.editor.layoutContentWidget(this); - this.listHeight = newHeight; - } - this.ctxSuggestWidgetVisible.set(true); - this.showTimeout.cancelAndSet(() => { - this.element.classList.add('visible'); - this.onDidShowEmitter.fire(this); - }, 100); - } - hide() { - // let the editor know that the widget is hidden - this.editor.layoutContentWidget(this); - this.ctxSuggestWidgetVisible.reset(); - this.ctxSuggestWidgetMultipleSuggestions.reset(); - this.element.classList.remove('visible'); - } - hideWidget() { - this.loadingTimeout.dispose(); - this.setState(0 /* Hidden */); - this.onDidHideEmitter.fire(this); - } - getPosition() { - if (this.state === 0 /* Hidden */) { - return null; + _showMessage() { + if (!this.contextViewProvider || !this.message) { + return; } - let preference = [2 /* BELOW */, 1 /* ABOVE */]; - if (this.preferDocPositionTop) { - preference = [1 /* ABOVE */]; + let div; + let layout = () => div.style.width = _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalWidth"](this.element) + 'px'; + this.contextViewProvider.showContextView({ + getAnchor: () => this.element, + anchorAlignment: 1 /* RIGHT */, + render: (container) => { + if (!this.message) { + return null; + } + div = _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](container, $('.monaco-inputbox-container')); + layout(); + const renderOptions = { + inline: true, + className: 'monaco-inputbox-message' + }; + const spanElement = (this.message.formatContent + ? Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__["renderFormattedText"])(this.message.content, renderOptions) + : Object(_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__["renderText"])(this.message.content, renderOptions)); + spanElement.classList.add(this.classForType(this.message.type)); + const styles = this.stylesForType(this.message.type); + spanElement.style.backgroundColor = styles.background ? styles.background.toString() : ''; + spanElement.style.color = styles.foreground ? styles.foreground.toString() : ''; + spanElement.style.border = styles.border ? `1px solid ${styles.border}` : ''; + _dom_js__WEBPACK_IMPORTED_MODULE_2__["append"](div, spanElement); + return null; + }, + onHide: () => { + this.state = 'closed'; + }, + layout: layout + }); + // ARIA Support + let alertText; + if (this.message.type === 3 /* ERROR */) { + alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertErrorMessage', "Error: {0}", this.message.content); } - return { - position: this.editor.getPosition(), - preference: preference - }; - } - getDomNode() { - return this.element; - } - getId() { - return SuggestWidget.ID; - } - isFrozen() { - return this.state === 4 /* Frozen */; - } - updateListHeight() { - let height = 0; - if (this.state === 2 /* Empty */ || this.state === 1 /* Loading */) { - height = this.unfocusedHeight; + else if (this.message.type === 2 /* WARNING */) { + alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertWarningMessage', "Warning: {0}", this.message.content); } else { - const suggestionCount = this.list.contentHeight / this.unfocusedHeight; - const { maxVisibleSuggestions } = this.editor.getOption(96 /* suggest */); - height = Math.min(suggestionCount, maxVisibleSuggestions) * this.unfocusedHeight; + alertText = _nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"]('alertInfoMessage', "Info: {0}", this.message.content); } - this.element.style.lineHeight = `${this.unfocusedHeight}px`; - this.listElement.style.height = `${height}px`; - this.statusBarElement.style.top = `${height}px`; - this.list.layout(height); - return height; + _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["alert"](alertText); + this.state = 'open'; } - /** - * Adds the propert classes, margins when positioning the docs to the side - */ - adjustDocsPosition() { - if (!this.editor.hasModel()) { - return; - } - const lineHeight = this.editor.getOption(51 /* lineHeight */); - const cursorCoords = this.editor.getScrolledVisiblePosition(this.editor.getPosition()); - const editorCoords = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["getDomNodePagePosition"])(this.editor.getDomNode()); - const cursorX = editorCoords.left + cursorCoords.left; - const cursorY = editorCoords.top + cursorCoords.top + cursorCoords.height; - const widgetCoords = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_10__["getDomNodePagePosition"])(this.element); - const widgetX = widgetCoords.left; - const widgetY = widgetCoords.top; - // Fixes #27649 - // Check if the Y changed to the top of the cursor and keep the widget flagged to prefer top - if (this.docsPositionPreviousWidgetY && - this.docsPositionPreviousWidgetY < widgetY && - !this.preferDocPositionTop) { - this.preferDocPositionTop = true; - this.adjustDocsPosition(); + _hideMessage() { + if (!this.contextViewProvider) { return; } - this.docsPositionPreviousWidgetY = widgetY; - if (widgetX < cursorX - this.listWidth) { - // Widget is too far to the left of cursor, swap list and docs - this.element.classList.add('list-right'); - } - else { - this.element.classList.remove('list-right'); + if (this.state === 'open') { + this.contextViewProvider.hideContextView(); } - // Compare top of the cursor (cursorY - lineheight) with widgetTop to determine if - // margin-top needs to be applied on list to make it appear right above the cursor - // Cannot compare cursorY directly as it may be a few decimals off due to zoooming - if (this.element.classList.contains('docs-side') - && cursorY - lineHeight > widgetY - && this.details.element.offsetHeight > this.listElement.offsetHeight) { - // Fix for #26416 - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor - this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; + this.state = 'idle'; + } + onValueChange() { + this._onDidChange.fire(this.value); + this.validate(); + this.updateMirror(); + this.input.classList.toggle('empty', !this.value); + if (this.state === 'open' && this.contextViewProvider) { + this.contextViewProvider.layout(); } } - /** - * Adds the proper classes for positioning the docs to the side or below depending on item - */ - expandSideOrBelow() { - if (!canExpandCompletionItem(this.focusedItem) && this.firstFocusInCurrentList) { - this.element.classList.remove('docs-side', 'docs-below'); + updateMirror() { + if (!this.mirror) { return; } - let matches = this.element.style.maxWidth.match(/(\d+)px/); - if (!matches || Number(matches[1]) < this.maxWidgetWidth) { - this.element.classList.add('docs-below'); - this.element.classList.remove('docs-side'); + const value = this.value; + const lastCharCode = value.charCodeAt(value.length - 1); + const suffix = lastCharCode === 10 ? ' ' : ''; + const mirrorTextContent = value + suffix; + if (mirrorTextContent) { + this.mirror.textContent = value + suffix; } - else if (canExpandCompletionItem(this.focusedItem)) { - this.element.classList.add('docs-side'); - this.element.classList.remove('docs-below'); + else { + this.mirror.innerText = '\u00a0'; } + this.layout(); } - // Heights - get maxWidgetHeight() { - return this.unfocusedHeight * this.editor.getOption(96 /* suggest */).maxVisibleSuggestions; - } - get unfocusedHeight() { - const options = this.editor.getOptions(); - return options.get(98 /* suggestLineHeight */) || options.get(36 /* fontInfo */).lineHeight; - } - // IDelegate - getHeight(element) { - return this.unfocusedHeight; - } - getTemplateId(element) { - return 'suggestion'; - } - expandDocsSettingFromStorage() { - return this.storageService.getBoolean('expandSuggestionDocs', 0 /* GLOBAL */, expandSuggestionDocsByDefault); - } - updateExpandDocsSetting(value) { - this.storageService.store('expandSuggestionDocs', value, 0 /* GLOBAL */); - } - dispose() { - this.details.dispose(); - this.list.dispose(); - this.toDispose.dispose(); - this.loadingTimeout.dispose(); - this.showTimeout.dispose(); - this.editor.removeContentWidget(this); - } -}; -SuggestWidget.ID = 'editor.widget.suggestWidget'; -SuggestWidget.LOADING_MESSAGE = _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('suggestWidget.loading', "Loading..."); -SuggestWidget.NO_SUGGESTIONS_MESSAGE = _nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"]('suggestWidget.noSuggestions', "No suggestions."); -SuggestWidget = __decorate([ - __param(1, _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_16__["ITelemetryService"]), - __param(2, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_13__["IKeybindingService"]), - __param(3, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_14__["IContextKeyService"]), - __param(4, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["IThemeService"]), - __param(5, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_20__["IStorageService"]), - __param(6, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_22__["IModeService"]), - __param(7, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_23__["IOpenerService"]), - __param(8, _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_34__["IMenuService"]), - __param(9, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_30__["IInstantiationService"]) -], SuggestWidget); - -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["registerThemingParticipant"])((theme, collector) => { - const matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground); - if (matchHighlight) { - collector.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`); - } - const foreground = theme.getColor(editorSuggestWidgetForeground); - if (foreground) { - collector.addRule(`.monaco-editor .suggest-widget { color: ${foreground}; }`); - } - const link = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["textLinkForeground"]); - if (link) { - collector.addRule(`.monaco-editor .suggest-widget a { color: ${link}; }`); - } - const codeBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_19__["textCodeBlockBackground"]); - if (codeBackground) { - collector.addRule(`.monaco-editor .suggest-widget code { background-color: ${codeBackground}; }`); - } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordContextKey.js ***! - \************************************************************************************/ -/*! exports provided: WordContextKey */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordContextKey", function() { return WordContextKey; }); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - -let WordContextKey = class WordContextKey extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(_editor, contextKeyService) { - super(); - this._editor = _editor; - this._enabled = false; - this._ckAtEnd = WordContextKey.AtEnd.bindTo(contextKeyService); - this._register(this._editor.onDidChangeConfiguration(e => e.hasChanged(101 /* tabCompletion */) && this._update())); - this._update(); + style(styles) { + this.inputBackground = styles.inputBackground; + this.inputForeground = styles.inputForeground; + this.inputBorder = styles.inputBorder; + this.inputValidationInfoBackground = styles.inputValidationInfoBackground; + this.inputValidationInfoForeground = styles.inputValidationInfoForeground; + this.inputValidationInfoBorder = styles.inputValidationInfoBorder; + this.inputValidationWarningBackground = styles.inputValidationWarningBackground; + this.inputValidationWarningForeground = styles.inputValidationWarningForeground; + this.inputValidationWarningBorder = styles.inputValidationWarningBorder; + this.inputValidationErrorBackground = styles.inputValidationErrorBackground; + this.inputValidationErrorForeground = styles.inputValidationErrorForeground; + this.inputValidationErrorBorder = styles.inputValidationErrorBorder; + this.applyStyles(); } - dispose() { - super.dispose(); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._selectionListener); - this._ckAtEnd.reset(); + applyStyles() { + const background = this.inputBackground ? this.inputBackground.toString() : ''; + const foreground = this.inputForeground ? this.inputForeground.toString() : ''; + const border = this.inputBorder ? this.inputBorder.toString() : ''; + this.element.style.backgroundColor = background; + this.element.style.color = foreground; + this.input.style.backgroundColor = 'inherit'; + this.input.style.color = foreground; + this.element.style.borderWidth = border ? '1px' : ''; + this.element.style.borderStyle = border ? 'solid' : ''; + this.element.style.borderColor = border; } - _update() { - // only update this when tab completions are enabled - const enabled = this._editor.getOption(101 /* tabCompletion */) === 'on'; - if (this._enabled === enabled) { + layout() { + if (!this.mirror) { return; } - this._enabled = enabled; - if (this._enabled) { - const checkForWordEnd = () => { - if (!this._editor.hasModel()) { - this._ckAtEnd.set(false); - return; - } - const model = this._editor.getModel(); - const selection = this._editor.getSelection(); - const word = model.getWordAtPosition(selection.getStartPosition()); - if (!word) { - this._ckAtEnd.set(false); - return; - } - this._ckAtEnd.set(word.endColumn === selection.getStartPosition().column); - }; - this._selectionListener = this._editor.onDidChangeCursorSelection(checkForWordEnd); - checkForWordEnd(); + const previousHeight = this.cachedContentHeight; + this.cachedContentHeight = _dom_js__WEBPACK_IMPORTED_MODULE_2__["getTotalHeight"](this.mirror); + if (previousHeight !== this.cachedContentHeight) { + this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight); + this.input.style.height = this.cachedHeight + 'px'; + this._onDidHeightChange.fire(this.cachedContentHeight); } - else if (this._selectionListener) { - this._ckAtEnd.reset(); - this._selectionListener.dispose(); - this._selectionListener = undefined; + } + insertAtCursor(text) { + const inputElement = this.inputElement; + const start = inputElement.selectionStart; + const end = inputElement.selectionEnd; + const content = inputElement.value; + if (start !== null && end !== null) { + this.value = content.substr(0, start) + text + content.substr(end); + inputElement.setSelectionRange(start + 1, start + 1); + this.layout(); } } -}; -WordContextKey.AtEnd = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"]('atEndOfWord', false); -WordContextKey = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]) -], WordContextKey); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/wordDistance.js ***! - \**********************************************************************************/ -/*! exports provided: WordDistance */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordDistance", function() { return WordDistance; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _smartSelect_bracketSelections_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../smartSelect/bracketSelections.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class WordDistance { - static create(service, editor) { - return __awaiter(this, void 0, void 0, function* () { - if (!editor.getOption(96 /* suggest */).localityBonus) { - return WordDistance.None; - } - if (!editor.hasModel()) { - return WordDistance.None; - } - const model = editor.getModel(); - const position = editor.getPosition(); - if (!service.canComputeWordRanges(model.uri)) { - return WordDistance.None; - } - const [ranges] = yield new _smartSelect_bracketSelections_js__WEBPACK_IMPORTED_MODULE_2__["BracketSelectionRangeProvider"]().provideSelectionRanges(model, [position]); - if (ranges.length === 0) { - return WordDistance.None; - } - const wordRanges = yield service.computeWordRanges(model.uri, ranges[0].range); - if (!wordRanges) { - return WordDistance.None; - } - // remove current word - const wordUntilPos = model.getWordUntilPosition(position); - delete wordRanges[wordUntilPos.word]; - return new class extends WordDistance { - distance(anchor, suggestion) { - if (!position.equals(editor.getPosition())) { - return 0; - } - if (suggestion.kind === 17 /* Keyword */) { - return 2 << 20; - } - let word = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name; - let wordLines = wordRanges[word]; - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isFalsyOrEmpty"])(wordLines)) { - return 2 << 20; - } - let idx = Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["binarySearch"])(wordLines, _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].fromPositions(anchor), _common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].compareRangesUsingStarts); - let bestWordRange = idx >= 0 ? wordLines[idx] : wordLines[Math.max(0, ~idx - 1)]; - let blockDistance = ranges.length; - for (const range of ranges) { - if (!_common_core_range_js__WEBPACK_IMPORTED_MODULE_1__["Range"].containsRange(range.range, bestWordRange)) { - break; - } - blockDistance -= 1; - } - return blockDistance; - } - }; - }); + dispose() { + this._hideMessage(); + this.message = null; + if (this.actionbar) { + this.actionbar.dispose(); + } + super.dispose(); } } -WordDistance.None = new class extends WordDistance { - distance() { return 0; } -}; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js ***! - \***************************************************************************************************/ -/*! exports provided: ToggleTabFocusModeAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleTabFocusModeAction", function() { return ToggleTabFocusModeAction; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/config/commonEditorConfig.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class ToggleTabFocusModeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["EditorAction"] { - constructor() { - super({ - id: ToggleTabFocusModeAction.ID, - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'toggle.tabMovesFocus', comment: ['Turn on/off use of tab key for moving focus around VS Code'] }, "Toggle Tab Key Moves Focus"), - alias: 'Toggle Tab Key Moves Focus', - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 2048 /* CtrlCmd */ | 43 /* KEY_M */, - mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 43 /* KEY_M */ }, - weight: 100 /* EditorContrib */ - } - }); +class HistoryInputBox extends InputBox { + constructor(container, contextViewProvider, options) { + super(container, contextViewProvider, options); + this.history = new _common_history_js__WEBPACK_IMPORTED_MODULE_10__["HistoryNavigator"](options.history, 100); } - run(accessor, editor) { - const oldValue = _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__["TabFocus"].getTabFocusMode(); - const newValue = !oldValue; - _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_3__["TabFocus"].setTabFocusMode(newValue); - if (newValue) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('toggle.tabMovesFocus.on', "Pressing Tab will now move focus to the next focusable element")); + addToHistory() { + if (this.value && this.value !== this.getCurrentValue()) { + this.history.add(this.value); } - else { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_1__["alert"])(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('toggle.tabMovesFocus.off', "Pressing Tab will now insert the tab character")); + } + showNextValue() { + if (!this.history.has(this.value)) { + this.addToHistory(); + } + let next = this.getNextValue(); + if (next) { + next = next === this.value ? this.getNextValue() : next; + } + if (next) { + this.value = next; + _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["status"](this.value); } } -} -ToggleTabFocusModeAction.ID = 'editor.action.toggleTabFocusMode'; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorAction"])(ToggleTabFocusModeAction); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js ***! - \***************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/stopwatch.js */ "./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class ForceRetokenizeAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.forceRetokenize', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('forceRetokenize', "Developer: Force Retokenize"), - alias: 'Developer: Force Retokenize', - precondition: undefined - }); + showPreviousValue() { + if (!this.history.has(this.value)) { + this.addToHistory(); + } + let previous = this.getPreviousValue(); + if (previous) { + previous = previous === this.value ? this.getPreviousValue() : previous; + } + if (previous) { + this.value = previous; + _aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["status"](this.value); + } } - run(accessor, editor) { - if (!editor.hasModel()) { - return; + getCurrentValue() { + let currentValue = this.history.current(); + if (!currentValue) { + currentValue = this.history.last(); + this.history.next(); } - const model = editor.getModel(); - model.resetTokenization(); - const sw = new _base_common_stopwatch_js__WEBPACK_IMPORTED_MODULE_2__["StopWatch"](true); - model.forceTokenization(model.getLineCount()); - sw.stop(); - console.log(`tokenization took ${sw.elapsed()}`); + return currentValue; + } + getPreviousValue() { + return this.history.previous() || this.history.first(); + } + getNextValue() { + return this.history.next() || this.history.last(); } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorAction"])(ForceRetokenizeAction); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js": -/*!***********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js ***! - \***********************************************************************************************************/ -/*! no exports provided */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css": +/*!***********************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css ***! + \***********************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../platform/dialogs/common/dialogs.js */ "./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./keybindingLabel.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const ignoreUnusualLineTerminators = 'ignoreUnusualLineTerminators'; -function writeIgnoreState(codeEditorService, model, state) { - codeEditorService.setModelProperty(model.uri, ignoreUnusualLineTerminators, state); -} -function readIgnoreState(codeEditorService, model) { - return codeEditorService.getModelProperty(model.uri, ignoreUnusualLineTerminators); -} -let UnusualLineTerminatorsDetector = class UnusualLineTerminatorsDetector extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(_editor, _dialogService, _codeEditorService) { - super(); - this._editor = _editor; - this._dialogService = _dialogService; - this._codeEditorService = _codeEditorService; - this._config = this._editor.getOption(103 /* unusualLineTerminators */); - this._register(this._editor.onDidChangeConfiguration((e) => { - if (e.hasChanged(103 /* unusualLineTerminators */)) { - this._config = this._editor.getOption(103 /* unusualLineTerminators */); - this._checkForUnusualLineTerminators(); - } - })); - this._register(this._editor.onDidChangeModel(() => { - this._checkForUnusualLineTerminators(); - })); - this._register(this._editor.onDidChangeModelContent((e) => { - if (e.isUndoing) { - // skip checking in case of undoing - return; - } - this._checkForUnusualLineTerminators(); - })); - } - _checkForUnusualLineTerminators() { - return __awaiter(this, void 0, void 0, function* () { - if (this._config === 'off') { - return; - } - if (!this._editor.hasModel()) { - return; - } - const model = this._editor.getModel(); - if (!model.mightContainUnusualLineTerminators()) { - return; - } - const ignoreState = readIgnoreState(this._codeEditorService, model); - if (ignoreState === true) { - // this model should be ignored - return; - } - if (this._editor.getOption(72 /* readOnly */)) { - // read only editor => sorry! - return; - } - if (this._config === 'auto') { - // just do it! - model.removeUnusualLineTerminators(this._editor.getSelections()); - return; - } - const result = yield this._dialogService.confirm({ - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.title', "Unusual Line Terminators"), - message: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.message', "Detected unusual line terminators"), - detail: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.detail', "This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."), - primaryButton: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.fix', "Fix this file"), - secondaryButton: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('unusualLineTerminators.ignore', "Ignore problem for this file") - }); - if (!result.confirmed) { - // this model should be ignored - writeIgnoreState(this._codeEditorService, model, true); - return; - } - model.removeUnusualLineTerminators(this._editor.getSelections()); - }); - } -}; -UnusualLineTerminatorsDetector.ID = 'editor.contrib.unusualLineTerminatorsDetector'; -UnusualLineTerminatorsDetector = __decorate([ - __param(1, _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__["IDialogService"]), - __param(2, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]) -], UnusualLineTerminatorsDetector); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorContribution"])(UnusualLineTerminatorsDetector.ID, UnusualLineTerminatorsDetector); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_keybindingLabel_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js": -/*!***********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js ***! - \***********************************************************************************************************/ -/*! no exports provided */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.js ***! + \**********************************************************************************************/ +/*! exports provided: KeybindingLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _common_services_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/semanticTokensProviderStyling.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modelServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeybindingLabel", function() { return KeybindingLabel; }); +/* harmony import */ var _keybindingLabel_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./keybindingLabel.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/keybindingLabels.js */ "./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - -let ViewportSemanticTokensContribution = class ViewportSemanticTokensContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(editor, _modelService, _themeService, _configurationService) { - super(); - this._modelService = _modelService; - this._themeService = _themeService; - this._configurationService = _configurationService; - this._editor = editor; - this._tokenizeViewport = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["RunOnceScheduler"](() => this._tokenizeViewportNow(), 100); - this._outstandingRequests = []; - this._register(this._editor.onDidScrollChange(() => { - this._tokenizeViewport.schedule(); - })); - this._register(this._editor.onDidChangeModel(() => { - this._cancelAll(); - this._tokenizeViewport.schedule(); - })); - this._register(this._editor.onDidChangeModelContent((e) => { - this._cancelAll(); - this._tokenizeViewport.schedule(); - })); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_3__["DocumentRangeSemanticTokensProviderRegistry"].onDidChange(() => { - this._cancelAll(); - this._tokenizeViewport.schedule(); - })); - this._register(this._configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(_common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__["SEMANTIC_HIGHLIGHTING_SETTING_ID"])) { - this._cancelAll(); - this._tokenizeViewport.schedule(); - } - })); - this._register(this._themeService.onDidColorThemeChange(() => { - this._cancelAll(); - this._tokenizeViewport.schedule(); - })); - } - static _getSemanticColoringProvider(model) { - const result = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["DocumentRangeSemanticTokensProviderRegistry"].ordered(model); - return (result.length > 0 ? result[0] : null); +const $ = _dom_js__WEBPACK_IMPORTED_MODULE_3__["$"]; +class KeybindingLabel { + constructor(container, os, options) { + this.os = os; + this.options = options; + this.domNode = _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](container, $('.monaco-keybinding')); + this.didEverRender = false; + container.appendChild(this.domNode); } - _cancelAll() { - for (const request of this._outstandingRequests) { - request.cancel(); + set(keybinding, matches) { + if (this.didEverRender && this.keybinding === keybinding && KeybindingLabel.areSame(this.matches, matches)) { + return; } - this._outstandingRequests = []; + this.keybinding = keybinding; + this.matches = matches; + this.render(); } - _removeOutstandingRequest(req) { - for (let i = 0, len = this._outstandingRequests.length; i < len; i++) { - if (this._outstandingRequests[i] === req) { - this._outstandingRequests.splice(i, 1); - return; + render() { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"](this.domNode); + if (this.keybinding) { + let [firstPart, chordPart] = this.keybinding.getParts(); + if (firstPart) { + this.renderPart(this.domNode, firstPart, this.matches ? this.matches.firstPart : null); + } + if (chordPart) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](this.domNode, $('span.monaco-keybinding-key-chord-separator', undefined, ' ')); + this.renderPart(this.domNode, chordPart, this.matches ? this.matches.chordPart : null); } + this.domNode.title = this.keybinding.getAriaLabel() || ''; + } + else if (this.options && this.options.renderUnboundKeybindings) { + this.renderUnbound(this.domNode); } + this.didEverRender = true; } - _tokenizeViewportNow() { - if (!this._editor.hasModel()) { - return; + renderPart(parent, part, match) { + const modifierLabels = _common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_2__["UILabelProvider"].modifierLabels[this.os]; + if (part.ctrlKey) { + this.renderKey(parent, modifierLabels.ctrlKey, Boolean(match === null || match === void 0 ? void 0 : match.ctrlKey), modifierLabels.separator); } - const model = this._editor.getModel(); - if (model.hasSemanticTokens()) { - return; + if (part.shiftKey) { + this.renderKey(parent, modifierLabels.shiftKey, Boolean(match === null || match === void 0 ? void 0 : match.shiftKey), modifierLabels.separator); } - if (!Object(_common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__["isSemanticColoringEnabled"])(model, this._themeService, this._configurationService)) { - return; + if (part.altKey) { + this.renderKey(parent, modifierLabels.altKey, Boolean(match === null || match === void 0 ? void 0 : match.altKey), modifierLabels.separator); } - const provider = ViewportSemanticTokensContribution._getSemanticColoringProvider(model); - if (!provider) { - return; + if (part.metaKey) { + this.renderKey(parent, modifierLabels.metaKey, Boolean(match === null || match === void 0 ? void 0 : match.metaKey), modifierLabels.separator); + } + const keyLabel = part.keyLabel; + if (keyLabel) { + this.renderKey(parent, keyLabel, Boolean(match === null || match === void 0 ? void 0 : match.keyCode), ''); } - const styling = this._modelService.getSemanticTokensProviderStyling(provider); - const visibleRanges = this._editor.getVisibleRangesPlusViewportAboveBelow(); - this._outstandingRequests = this._outstandingRequests.concat(visibleRanges.map(range => this._requestRange(model, range, provider, styling))); } - _requestRange(model, range, provider, styling) { - const requestVersionId = model.getVersionId(); - const request = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["createCancelablePromise"])(token => Promise.resolve(provider.provideDocumentRangeSemanticTokens(model, range, token))); - request.then((r) => { - if (!r || model.isDisposed() || model.getVersionId() !== requestVersionId) { - return; - } - model.setPartialSemanticTokens(range, Object(_common_services_semanticTokensProviderStyling_js__WEBPACK_IMPORTED_MODULE_5__["toMultilineTokens2"])(r, styling, model.getLanguageIdentifier())); - }).then(() => this._removeOutstandingRequest(request), () => this._removeOutstandingRequest(request)); - return request; + renderKey(parent, label, highlight, separator) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key' + (highlight ? '.highlight' : ''), undefined, label)); + if (separator) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key-separator', undefined, separator)); + } } -}; -ViewportSemanticTokensContribution.ID = 'editor.contrib.viewportSemanticTokens'; -ViewportSemanticTokensContribution = __decorate([ - __param(1, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_4__["IModelService"]), - __param(2, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_6__["IThemeService"]), - __param(3, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__["IConfigurationService"]) -], ViewportSemanticTokensContribution); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_2__["registerEditorContribution"])(ViewportSemanticTokensContribution.ID, ViewportSemanticTokensContribution); + renderUnbound(parent) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["append"](parent, $('span.monaco-keybinding-key', undefined, Object(_nls_js__WEBPACK_IMPORTED_MODULE_4__["localize"])('unbound', "Unbound"))); + } + static areSame(a, b) { + if (a === b || (!a && !b)) { + return true; + } + return !!a && !!b && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_1__["equals"])(a.firstPart, b.firstPart) && Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_1__["equals"])(a.chordPart, b.chordPart); + } +} /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js ***! - \*********************************************************************************************/ -/*! exports provided: getOccurrencesAtPosition */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOccurrencesAtPosition", function() { return getOccurrencesAtPosition; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css": +/*!*************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./list.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_list_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); +/***/ }), +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js": +/*!************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js ***! + \************************************************************************/ +/*! exports provided: ListError */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -const editorWordHighlight = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlight', 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorWordHighlightStrong = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorWordHighlightBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editor.wordHighlightBorder', { light: null, dark: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlightBorder', 'Border color of a symbol during read-access, like reading a variable.')); -const editorWordHighlightStrongBorder = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editor.wordHighlightStrongBorder', { light: null, dark: null, hc: _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["activeContrastBorder"] }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlightStrongBorder', 'Border color of a symbol during write-access, like writing to a variable.')); -const overviewRulerWordHighlightForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editorOverviewRuler.wordHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRulerWordHighlightForeground', 'Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true); -const overviewRulerWordHighlightStrongForeground = Object(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["registerColor"])('editorOverviewRuler.wordHighlightStrongForeground', { dark: '#C0A0C0CC', light: '#C0A0C0CC', hc: '#C0A0C0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overviewRulerWordHighlightStrongForeground', 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true); -const ctxHasWordHighlights = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["RawContextKey"]('hasWordHighlights', false); -function getOccurrencesAtPosition(model, position, token) { - const orderedByScore = _common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightProviderRegistry"].ordered(model); - // in order of score ask the occurrences provider - // until someone response with a good result - // (good = none empty array) - return Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["first"])(orderedByScore.map(provider => () => { - return Promise.resolve(provider.provideDocumentHighlights(model, position, token)) - .then(undefined, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__["onUnexpectedExternalError"]); - }), _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["isNonEmptyArray"]); -} -class OccurenceAtPositionRequest { - constructor(model, selection, wordSeparators) { - this._wordRange = this._getCurrentWordRange(model, selection); - this.result = Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["createCancelablePromise"])(token => this._compute(model, selection, wordSeparators, token)); - } - _getCurrentWordRange(model, selection) { - const word = model.getWordAtPosition(selection.getPosition()); - if (word) { - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"](selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn); - } - return null; - } - isValid(model, selection, decorationIds) { - const lineNumber = selection.startLineNumber; - const startColumn = selection.startColumn; - const endColumn = selection.endColumn; - const currentWordRange = this._getCurrentWordRange(model, selection); - let requestIsValid = Boolean(this._wordRange && this._wordRange.equalsRange(currentWordRange)); - // Even if we are on a different word, if that word is in the decorations ranges, the request is still valid - // (Same symbol) - for (let i = 0, len = decorationIds.length; !requestIsValid && i < len; i++) { - let range = model.getDecorationRange(decorationIds[i]); - if (range && range.startLineNumber === lineNumber) { - if (range.startColumn <= startColumn && range.endColumn >= endColumn) { - requestIsValid = true; - } - } - } - return requestIsValid; - } - cancel() { - this.result.cancel(); - } -} -class SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest { - _compute(model, selection, wordSeparators, token) { - return getOccurrencesAtPosition(model, selection.getPosition(), token).then(value => value || []); - } -} -class TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest { - constructor(model, selection, wordSeparators) { - super(model, selection, wordSeparators); - this._selectionIsEmpty = selection.isEmpty(); - } - _compute(model, selection, wordSeparators, token) { - return Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["timeout"])(250, token).then(() => { - if (!selection.isEmpty()) { - return []; - } - const word = model.getWordAtPosition(selection.getPosition()); - if (!word || word.word.length > 1000) { - return []; - } - const matches = model.findMatches(word.word, true, false, true, wordSeparators, false); - return matches.map(m => { - return { - range: m.range, - kind: _common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightKind"].Text - }; - }); - }); - } - isValid(model, selection, decorationIds) { - const currentSelectionIsEmpty = selection.isEmpty(); - if (this._selectionIsEmpty !== currentSelectionIsEmpty) { - return false; - } - return super.isValid(model, selection, decorationIds); - } -} -function computeOccurencesAtPosition(model, selection, wordSeparators) { - if (_common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightProviderRegistry"].has(model)) { - return new SemanticOccurenceAtPositionRequest(model, selection, wordSeparators); - } - return new TextualOccurenceAtPositionRequest(model, selection, wordSeparators); -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerModelAndPositionCommand"])('_executeDocumentHighlights', (model, position) => getOccurrencesAtPosition(model, position, _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None)); -class WordHighlighter { - constructor(editor, contextKeyService) { - this.toUnhook = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - this.workerRequestTokenId = 0; - this.workerRequestCompleted = false; - this.workerRequestValue = []; - this.lastCursorPositionChangeTime = 0; - this.renderDecorationsTimer = -1; - this.editor = editor; - this._hasWordHighlights = ctxHasWordHighlights.bindTo(contextKeyService); - this._ignorePositionChangeEvent = false; - this.occurrencesHighlight = this.editor.getOption(63 /* occurrencesHighlight */); - this.model = this.editor.getModel(); - this.toUnhook.add(editor.onDidChangeCursorPosition((e) => { - if (this._ignorePositionChangeEvent) { - // We are changing the position => ignore this event - return; - } - if (!this.occurrencesHighlight) { - // Early exit if nothing needs to be done! - // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;) - return; - } - this._onPositionChanged(e); - })); - this.toUnhook.add(editor.onDidChangeModelContent((e) => { - this._stopAll(); - })); - this.toUnhook.add(editor.onDidChangeConfiguration((e) => { - let newValue = this.editor.getOption(63 /* occurrencesHighlight */); - if (this.occurrencesHighlight !== newValue) { - this.occurrencesHighlight = newValue; - this._stopAll(); - } - })); - this._decorationIds = []; - this.workerRequestTokenId = 0; - this.workerRequest = null; - this.workerRequestCompleted = false; - this.lastCursorPositionChangeTime = 0; - this.renderDecorationsTimer = -1; - } - hasDecorations() { - return (this._decorationIds.length > 0); - } - restore() { - if (!this.occurrencesHighlight) { - return; - } - this._run(); - } - _getSortedHighlights() { - return _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["coalesce"](this._decorationIds - .map((id) => this.model.getDecorationRange(id)) - .sort(_common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].compareRangesUsingStarts)); - } - moveNext() { - let highlights = this._getSortedHighlights(); - let index = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["firstIndex"](highlights, (range) => range.containsPosition(this.editor.getPosition())); - let newIndex = ((index + 1) % highlights.length); - let dest = highlights[newIndex]; - try { - this._ignorePositionChangeEvent = true; - this.editor.setPosition(dest.getStartPosition()); - this.editor.revealRangeInCenterIfOutsideViewport(dest); - const word = this._getWord(); - if (word) { - const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber); - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__["alert"])(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`); - } - } - finally { - this._ignorePositionChangeEvent = false; - } - } - moveBack() { - let highlights = this._getSortedHighlights(); - let index = _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["firstIndex"](highlights, (range) => range.containsPosition(this.editor.getPosition())); - let newIndex = ((index - 1 + highlights.length) % highlights.length); - let dest = highlights[newIndex]; - try { - this._ignorePositionChangeEvent = true; - this.editor.setPosition(dest.getStartPosition()); - this.editor.revealRangeInCenterIfOutsideViewport(dest); - const word = this._getWord(); - if (word) { - const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber); - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_15__["alert"])(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`); - } - } - finally { - this._ignorePositionChangeEvent = false; - } - } - _removeDecorations() { - if (this._decorationIds.length > 0) { - // remove decorations - this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []); - this._hasWordHighlights.set(false); - } - } - _stopAll() { - // Remove any existing decorations - this._removeDecorations(); - // Cancel any renderDecorationsTimer - if (this.renderDecorationsTimer !== -1) { - clearTimeout(this.renderDecorationsTimer); - this.renderDecorationsTimer = -1; - } - // Cancel any worker request - if (this.workerRequest !== null) { - this.workerRequest.cancel(); - this.workerRequest = null; - } - // Invalidate any worker request callback - if (!this.workerRequestCompleted) { - this.workerRequestTokenId++; - this.workerRequestCompleted = true; - } - } - _onPositionChanged(e) { - // disabled - if (!this.occurrencesHighlight) { - this._stopAll(); - return; - } - // ignore typing & other - if (e.reason !== 3 /* Explicit */) { - this._stopAll(); - return; - } - this._run(); - } - _getWord() { - let editorSelection = this.editor.getSelection(); - let lineNumber = editorSelection.startLineNumber; - let startColumn = editorSelection.startColumn; - return this.model.getWordAtPosition({ - lineNumber: lineNumber, - column: startColumn - }); - } - _run() { - let editorSelection = this.editor.getSelection(); - // ignore multiline selection - if (editorSelection.startLineNumber !== editorSelection.endLineNumber) { - this._stopAll(); - return; - } - let startColumn = editorSelection.startColumn; - let endColumn = editorSelection.endColumn; - const word = this._getWord(); - // The selection must be inside a word or surround one word at most - if (!word || word.startColumn > startColumn || word.endColumn < endColumn) { - this._stopAll(); - return; - } - // All the effort below is trying to achieve this: - // - when cursor is moved to a word, trigger immediately a findOccurrences request - // - 250ms later after the last cursor move event, render the occurrences - // - no flickering! - const workerRequestIsValid = (this.workerRequest && this.workerRequest.isValid(this.model, editorSelection, this._decorationIds)); - // There are 4 cases: - // a) old workerRequest is valid & completed, renderDecorationsTimer fired - // b) old workerRequest is valid & completed, renderDecorationsTimer not fired - // c) old workerRequest is valid, but not completed - // d) old workerRequest is not valid - // For a) no action is needed - // For c), member 'lastCursorPositionChangeTime' will be used when installing the timer so no action is needed - this.lastCursorPositionChangeTime = (new Date()).getTime(); - if (workerRequestIsValid) { - if (this.workerRequestCompleted && this.renderDecorationsTimer !== -1) { - // case b) - // Delay the firing of renderDecorationsTimer by an extra 250 ms - clearTimeout(this.renderDecorationsTimer); - this.renderDecorationsTimer = -1; - this._beginRenderDecorations(); - } - } - else { - // case d) - // Stop all previous actions and start fresh - this._stopAll(); - let myRequestId = ++this.workerRequestTokenId; - this.workerRequestCompleted = false; - this.workerRequest = computeOccurencesAtPosition(this.model, this.editor.getSelection(), this.editor.getOption(105 /* wordSeparators */)); - this.workerRequest.result.then(data => { - if (myRequestId === this.workerRequestTokenId) { - this.workerRequestCompleted = true; - this.workerRequestValue = data || []; - this._beginRenderDecorations(); - } - }, _base_common_errors_js__WEBPACK_IMPORTED_MODULE_4__["onUnexpectedError"]); - } - } - _beginRenderDecorations() { - let currentTime = (new Date()).getTime(); - let minimumRenderTime = this.lastCursorPositionChangeTime + 250; - if (currentTime >= minimumRenderTime) { - // Synchronous - this.renderDecorationsTimer = -1; - this.renderDecorations(); - } - else { - // Asynchronous - this.renderDecorationsTimer = setTimeout(() => { - this.renderDecorations(); - }, (minimumRenderTime - currentTime)); - } - } - renderDecorations() { - this.renderDecorationsTimer = -1; - let decorations = []; - for (const info of this.workerRequestValue) { - if (info.range) { - decorations.push({ - range: info.range, - options: WordHighlighter._getDecorationOptions(info.kind) - }); - } - } - this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations); - this._hasWordHighlights.set(this.hasDecorations()); - } - static _getDecorationOptions(kind) { - if (kind === _common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightKind"].Write) { - return this._WRITE_OPTIONS; - } - else if (kind === _common_modes_js__WEBPACK_IMPORTED_MODULE_11__["DocumentHighlightKind"].Text) { - return this._TEXT_OPTIONS; - } - else { - return this._REGULAR_OPTIONS; - } - } - dispose() { - this._stopAll(); - this.toUnhook.dispose(); - } -} -WordHighlighter._WRITE_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'wordHighlightStrong', - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["themeColorFromId"])(overviewRulerWordHighlightStrongForeground), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center - } -}); -WordHighlighter._TEXT_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'selectionHighlight', - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["themeColorFromId"])(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["overviewRulerSelectionHighlightForeground"]), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center - } -}); -WordHighlighter._REGULAR_OPTIONS = _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_10__["ModelDecorationOptions"].register({ - stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, - className: 'wordHighlight', - overviewRuler: { - color: Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["themeColorFromId"])(overviewRulerWordHighlightForeground), - position: _common_model_js__WEBPACK_IMPORTED_MODULE_9__["OverviewRulerLane"].Center - } -}); -let WordHighlighterContribution = class WordHighlighterContribution extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"] { - constructor(editor, contextKeyService) { - super(); - this.wordHighlighter = null; - const createWordHighlighterIfPossible = () => { - if (editor.hasModel()) { - this.wordHighlighter = new WordHighlighter(editor, contextKeyService); - } - }; - this._register(editor.onDidChangeModel((e) => { - if (this.wordHighlighter) { - this.wordHighlighter.dispose(); - this.wordHighlighter = null; - } - createWordHighlighterIfPossible(); - })); - createWordHighlighterIfPossible(); - } - static get(editor) { - return editor.getContribution(WordHighlighterContribution.ID); - } - saveViewState() { - if (this.wordHighlighter && this.wordHighlighter.hasDecorations()) { - return true; - } - return false; - } - moveNext() { - if (this.wordHighlighter) { - this.wordHighlighter.moveNext(); - } - } - moveBack() { - if (this.wordHighlighter) { - this.wordHighlighter.moveBack(); - } - } - restoreViewState(state) { - if (this.wordHighlighter && state) { - this.wordHighlighter.restore(); - } - } - dispose() { - if (this.wordHighlighter) { - this.wordHighlighter.dispose(); - this.wordHighlighter = null; - } - super.dispose(); - } -}; -WordHighlighterContribution.ID = 'editor.contrib.wordHighlighter'; -WordHighlighterContribution = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]) -], WordHighlighterContribution); -class WordHighlightNavigationAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["EditorAction"] { - constructor(next, opts) { - super(opts); - this._isNext = next; - } - run(accessor, editor) { - const controller = WordHighlighterContribution.get(editor); - if (!controller) { - return; - } - if (this._isNext) { - controller.moveNext(); - } - else { - controller.moveBack(); - } - } -} -class NextWordHighlightAction extends WordHighlightNavigationAction { - constructor() { - super(true, { - id: 'editor.action.wordHighlight.next', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlight.next.label', "Go to Next Symbol Highlight"), - alias: 'Go to Next Symbol Highlight', - precondition: ctxHasWordHighlights, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 65 /* F7 */, - weight: 100 /* EditorContrib */ - } - }); - } -} -class PrevWordHighlightAction extends WordHighlightNavigationAction { - constructor() { - super(false, { - id: 'editor.action.wordHighlight.prev', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlight.previous.label', "Go to Previous Symbol Highlight"), - alias: 'Go to Previous Symbol Highlight', - precondition: ctxHasWordHighlights, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 1024 /* Shift */ | 65 /* F7 */, - weight: 100 /* EditorContrib */ - } - }); - } -} -class TriggerWordHighlightAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.wordHighlight.trigger', - label: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('wordHighlight.trigger.label', "Trigger Symbol Highlight"), - alias: 'Trigger Symbol Highlight', - precondition: ctxHasWordHighlights.toNegated(), - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].editorTextFocus, - primary: 0, - weight: 100 /* EditorContrib */ - } - }); - } - run(accessor, editor, args) { - const controller = WordHighlighterContribution.get(editor); - if (!controller) { - return; - } - controller.restoreViewState(true); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListError", function() { return ListError; }); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +class ListError extends Error { + constructor(user, message) { + super(`ListError [${user}] ${message}`); } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorContribution"])(WordHighlighterContribution.ID, WordHighlighterContribution); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorAction"])(NextWordHighlightAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorAction"])(PrevWordHighlightAction); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_6__["registerEditorAction"])(TriggerWordHighlightAction); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_14__["registerThemingParticipant"])((theme, collector) => { - const selectionHighlight = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorSelectionHighlight"]); - if (selectionHighlight) { - collector.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); - collector.addRule(`.monaco-editor .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); - } - const wordHighlight = theme.getColor(editorWordHighlight); - if (wordHighlight) { - collector.addRule(`.monaco-editor .wordHighlight { background-color: ${wordHighlight}; }`); - } - const wordHighlightStrong = theme.getColor(editorWordHighlightStrong); - if (wordHighlightStrong) { - collector.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); - } - const selectionHighlightBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_13__["editorSelectionHighlightBorder"]); - if (selectionHighlightBorder) { - collector.addRule(`.monaco-editor .selectionHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${selectionHighlightBorder}; box-sizing: border-box; }`); - } - const wordHighlightBorder = theme.getColor(editorWordHighlightBorder); - if (wordHighlightBorder) { - collector.addRule(`.monaco-editor .wordHighlight { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightBorder}; box-sizing: border-box; }`); - } - const wordHighlightStrongBorder = theme.getColor(editorWordHighlightStrongBorder); - if (wordHighlightStrongBorder) { - collector.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightStrongBorder}; box-sizing: border-box; }`); - } -}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js ***! - \*******************************************************************************************/ -/*! exports provided: MoveWordCommand, WordLeftCommand, WordRightCommand, CursorWordStartLeft, CursorWordEndLeft, CursorWordLeft, CursorWordStartLeftSelect, CursorWordEndLeftSelect, CursorWordLeftSelect, CursorWordAccessibilityLeft, CursorWordAccessibilityLeftSelect, CursorWordStartRight, CursorWordEndRight, CursorWordRight, CursorWordStartRightSelect, CursorWordEndRightSelect, CursorWordRightSelect, CursorWordAccessibilityRight, CursorWordAccessibilityRightSelect, DeleteWordCommand, DeleteWordLeftCommand, DeleteWordRightCommand, DeleteWordStartLeft, DeleteWordEndLeft, DeleteWordLeft, DeleteWordStartRight, DeleteWordEndRight, DeleteWordRight */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MoveWordCommand", function() { return MoveWordCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordLeftCommand", function() { return WordLeftCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordRightCommand", function() { return WordRightCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordStartLeft", function() { return CursorWordStartLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordEndLeft", function() { return CursorWordEndLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordLeft", function() { return CursorWordLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordStartLeftSelect", function() { return CursorWordStartLeftSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordEndLeftSelect", function() { return CursorWordEndLeftSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordLeftSelect", function() { return CursorWordLeftSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordAccessibilityLeft", function() { return CursorWordAccessibilityLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordAccessibilityLeftSelect", function() { return CursorWordAccessibilityLeftSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordStartRight", function() { return CursorWordStartRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordEndRight", function() { return CursorWordEndRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordRight", function() { return CursorWordRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordStartRightSelect", function() { return CursorWordStartRightSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordEndRightSelect", function() { return CursorWordEndRightSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordRightSelect", function() { return CursorWordRightSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordAccessibilityRight", function() { return CursorWordAccessibilityRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordAccessibilityRightSelect", function() { return CursorWordAccessibilityRightSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordCommand", function() { return DeleteWordCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordLeftCommand", function() { return DeleteWordLeftCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordRightCommand", function() { return DeleteWordRightCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordStartLeft", function() { return DeleteWordStartLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordEndLeft", function() { return DeleteWordEndLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordLeft", function() { return DeleteWordLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordStartRight", function() { return DeleteWordStartRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordEndRight", function() { return DeleteWordEndRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordRight", function() { return DeleteWordRight; }); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/commands/replaceCommand.js */ "./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js"); -/* harmony import */ var _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/controller/cursorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js"); -/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js"); -/* harmony import */ var _common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/controller/wordCharacterClassifier.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/selection.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js": +/*!******************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js ***! + \******************************************************************************/ +/*! exports provided: PagedList */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PagedList", function() { return PagedList; }); +/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _listWidget_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -223405,637 +75280,166 @@ __webpack_require__.r(__webpack_exports__); - - - - - - -class MoveWordCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["EditorCommand"] { - constructor(opts) { - super(opts); - this._inSelectionMode = opts.inSelectionMode; - this._wordNavigationType = opts.wordNavigationType; +class PagedRenderer { + constructor(renderer, modelProvider) { + this.renderer = renderer; + this.modelProvider = modelProvider; + } + get templateId() { return this.renderer.templateId; } + renderTemplate(container) { + const data = this.renderer.renderTemplate(container); + return { data, disposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None }; } - runEditorCommand(accessor, editor, args) { - if (!editor.hasModel()) { + renderElement(index, _, data, height) { + if (data.disposable) { + data.disposable.dispose(); + } + if (!data.data) { return; } - const wordSeparators = Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(editor.getOption(105 /* wordSeparators */)); - const model = editor.getModel(); - const selections = editor.getSelections(); - const result = selections.map((sel) => { - const inPosition = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"](sel.positionLineNumber, sel.positionColumn); - const outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType); - return this._moveTo(sel, outPosition, this._inSelectionMode); - }); - model.pushStackElement(); - editor._getViewModel().setCursorStates('moveWordCommand', 0 /* NotSet */, result.map(r => _common_controller_cursorCommon_js__WEBPACK_IMPORTED_MODULE_2__["CursorState"].fromModelSelection(r))); - if (result.length === 1) { - const pos = new _common_core_position_js__WEBPACK_IMPORTED_MODULE_5__["Position"](result[0].positionLineNumber, result[0].positionColumn); - editor.revealPosition(pos, 0 /* Smooth */); + const model = this.modelProvider(); + if (model.isResolved(index)) { + return this.renderer.renderElement(model.get(index), index, data.data, height); } + const cts = new _common_cancellation_js__WEBPACK_IMPORTED_MODULE_5__["CancellationTokenSource"](); + const promise = model.resolve(index, cts.token); + data.disposable = { dispose: () => cts.cancel() }; + this.renderer.renderPlaceholder(index, data.data); + promise.then(entry => this.renderer.renderElement(entry, index, data.data, height)); } - _moveTo(from, to, inSelectionMode) { - if (inSelectionMode) { - // move just position - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](from.selectionStartLineNumber, from.selectionStartColumn, to.lineNumber, to.column); + disposeTemplate(data) { + if (data.disposable) { + data.disposable.dispose(); + data.disposable = undefined; } - else { - // move everything - return new _common_core_selection_js__WEBPACK_IMPORTED_MODULE_7__["Selection"](to.lineNumber, to.column, to.lineNumber, to.column); + if (data.data) { + this.renderer.disposeTemplate(data.data); + data.data = undefined; } } } -class WordLeftCommand extends MoveWordCommand { - _move(wordSeparators, model, position, wordNavigationType) { - return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__["WordOperations"].moveWordLeft(wordSeparators, model, position, wordNavigationType); - } -} -class WordRightCommand extends MoveWordCommand { - _move(wordSeparators, model, position, wordNavigationType) { - return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__["WordOperations"].moveWordRight(wordSeparators, model, position, wordNavigationType); - } -} -class CursorWordStartLeft extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordStartLeft', - precondition: undefined - }); - } -} -class CursorWordEndLeft extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordEndLeft', - precondition: undefined - }); - } -} -class CursorWordLeft extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 1 /* WordStartFast */, - id: 'cursorWordLeft', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */, - mac: { primary: 512 /* Alt */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ - } - }); - } -} -class CursorWordStartLeftSelect extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordStartLeftSelect', - precondition: undefined - }); - } -} -class CursorWordEndLeftSelect extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordEndLeftSelect', - precondition: undefined - }); - } -} -class CursorWordLeftSelect extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 1 /* WordStartFast */, - id: 'cursorWordLeftSelect', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */, - mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ - } - }); - } -} -// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects -class CursorWordAccessibilityLeft extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 3 /* WordAccessibility */, - id: 'cursorWordAccessibilityLeft', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_9__["CONTEXT_ACCESSIBILITY_MODE_ENABLED"]), - win: { primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ + 1 - } - }); - } - _move(_, model, position, wordNavigationType) { - return super._move(Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__["EditorOptions"].wordSeparators.defaultValue), model, position, wordNavigationType); - } -} -class CursorWordAccessibilityLeftSelect extends WordLeftCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 3 /* WordAccessibility */, - id: 'cursorWordAccessibilityLeftSelect', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_9__["CONTEXT_ACCESSIBILITY_MODE_ENABLED"]), - win: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ + 1 - } - }); - } - _move(_, model, position, wordNavigationType) { - return super._move(Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__["EditorOptions"].wordSeparators.defaultValue), model, position, wordNavigationType); - } -} -class CursorWordStartRight extends WordRightCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordStartRight', - precondition: undefined - }); - } -} -class CursorWordEndRight extends WordRightCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordEndRight', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */, - mac: { primary: 512 /* Alt */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ - } - }); - } -} -class CursorWordRight extends WordRightCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordRight', - precondition: undefined - }); - } -} -class CursorWordStartRightSelect extends WordRightCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordStartRightSelect', - precondition: undefined - }); - } -} -class CursorWordEndRightSelect extends WordRightCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordEndRightSelect', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */, - mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ - } - }); - } -} -class CursorWordRightSelect extends WordRightCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordRightSelect', - precondition: undefined - }); - } -} -class CursorWordAccessibilityRight extends WordRightCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 3 /* WordAccessibility */, - id: 'cursorWordAccessibilityRight', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_9__["CONTEXT_ACCESSIBILITY_MODE_ENABLED"]), - win: { primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ + 1 - } - }); - } - _move(_, model, position, wordNavigationType) { - return super._move(Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__["EditorOptions"].wordSeparators.defaultValue), model, position, wordNavigationType); - } -} -class CursorWordAccessibilityRightSelect extends WordRightCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 3 /* WordAccessibility */, - id: 'cursorWordAccessibilityRightSelect', - precondition: undefined, - kbOpts: { - kbExpr: _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_10__["ContextKeyExpr"].and(_common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_9__["CONTEXT_ACCESSIBILITY_MODE_ENABLED"]), - win: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ + 1 - } - }); - } - _move(_, model, position, wordNavigationType) { - return super._move(Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_11__["EditorOptions"].wordSeparators.defaultValue), model, position, wordNavigationType); - } -} -class DeleteWordCommand extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["EditorCommand"] { - constructor(opts) { - super(opts); - this._whitespaceHeuristics = opts.whitespaceHeuristics; - this._wordNavigationType = opts.wordNavigationType; +class PagedAccessibilityProvider { + constructor(modelProvider, accessibilityProvider) { + this.modelProvider = modelProvider; + this.accessibilityProvider = accessibilityProvider; } - runEditorCommand(accessor, editor, args) { - if (!editor.hasModel()) { - return; - } - const wordSeparators = Object(_common_controller_wordCharacterClassifier_js__WEBPACK_IMPORTED_MODULE_4__["getMapForWordSeparators"])(editor.getOption(105 /* wordSeparators */)); - const model = editor.getModel(); - const selections = editor.getSelections(); - const commands = selections.map((sel) => { - const deleteRange = this._delete(wordSeparators, model, sel, this._whitespaceHeuristics, this._wordNavigationType); - return new _common_commands_replaceCommand_js__WEBPACK_IMPORTED_MODULE_1__["ReplaceCommand"](deleteRange, ''); - }); - editor.pushUndoStop(); - editor.executeCommands(this.id, commands); - editor.pushUndoStop(); + getWidgetAriaLabel() { + return this.accessibilityProvider.getWidgetAriaLabel(); } -} -class DeleteWordLeftCommand extends DeleteWordCommand { - _delete(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__["WordOperations"].deleteWordLeft(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType); - if (r) { - return r; + getAriaLabel(index) { + const model = this.modelProvider(); + if (!model.isResolved(index)) { + return null; } - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](1, 1, 1, 1); + return this.accessibilityProvider.getAriaLabel(model.get(index)); } } -class DeleteWordRightCommand extends DeleteWordCommand { - _delete(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_3__["WordOperations"].deleteWordRight(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType); - if (r) { - return r; - } - const lineCount = model.getLineCount(); - const maxColumn = model.getLineMaxColumn(lineCount); - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_6__["Range"](lineCount, maxColumn, lineCount, maxColumn); - } +function fromPagedListOptions(modelProvider, options) { + return Object.assign(Object.assign({}, options), { accessibilityProvider: options.accessibilityProvider && new PagedAccessibilityProvider(modelProvider, options.accessibilityProvider) }); } -class DeleteWordStartLeft extends DeleteWordLeftCommand { - constructor() { - super({ - whitespaceHeuristics: false, - wordNavigationType: 0 /* WordStart */, - id: 'deleteWordStartLeft', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); +class PagedList { + constructor(user, container, virtualDelegate, renderers, options = {}) { + const modelProvider = () => this.model; + const pagedRenderers = renderers.map(r => new PagedRenderer(r, modelProvider)); + this.list = new _listWidget_js__WEBPACK_IMPORTED_MODULE_3__["List"](user, container, virtualDelegate, pagedRenderers, fromPagedListOptions(modelProvider, options)); } -} -class DeleteWordEndLeft extends DeleteWordLeftCommand { - constructor() { - super({ - whitespaceHeuristics: false, - wordNavigationType: 2 /* WordEnd */, - id: 'deleteWordEndLeft', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); + updateOptions(options) { + this.list.updateOptions(options); } -} -class DeleteWordLeft extends DeleteWordLeftCommand { - constructor() { - super({ - whitespaceHeuristics: true, - wordNavigationType: 0 /* WordStart */, - id: 'deleteWordLeft', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 1 /* Backspace */, - mac: { primary: 512 /* Alt */ | 1 /* Backspace */ }, - weight: 100 /* EditorContrib */ - } - }); + getHTMLElement() { + return this.list.getHTMLElement(); } -} -class DeleteWordStartRight extends DeleteWordRightCommand { - constructor() { - super({ - whitespaceHeuristics: false, - wordNavigationType: 0 /* WordStart */, - id: 'deleteWordStartRight', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); + get onDidFocus() { + return this.list.onDidFocus; } -} -class DeleteWordEndRight extends DeleteWordRightCommand { - constructor() { - super({ - whitespaceHeuristics: false, - wordNavigationType: 2 /* WordEnd */, - id: 'deleteWordEndRight', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable - }); + get onDidDispose() { + return this.list.onDidDispose; } -} -class DeleteWordRight extends DeleteWordRightCommand { - constructor() { - super({ - whitespaceHeuristics: true, - wordNavigationType: 2 /* WordEnd */, - id: 'deleteWordRight', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].textInputFocus, - primary: 2048 /* CtrlCmd */ | 20 /* Delete */, - mac: { primary: 512 /* Alt */ | 20 /* Delete */ }, - weight: 100 /* EditorContrib */ - } - }); + get onMouseDblClick() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onMouseDblClick, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent })); } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordStartLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordEndLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordStartLeftSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordEndLeftSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordLeftSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordStartRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordEndRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordStartRightSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordEndRightSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordRightSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordAccessibilityLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordAccessibilityLeftSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordAccessibilityRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordAccessibilityRightSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordStartLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordEndLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordStartRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordEndRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordRight()); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js ***! - \***************************************************************************************************/ -/*! exports provided: DeleteWordPartLeft, DeleteWordPartRight, WordPartLeftCommand, CursorWordPartLeft, CursorWordPartLeftSelect, WordPartRightCommand, CursorWordPartRight, CursorWordPartRightSelect */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordPartLeft", function() { return DeleteWordPartLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteWordPartRight", function() { return DeleteWordPartRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordPartLeftCommand", function() { return WordPartLeftCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordPartLeft", function() { return CursorWordPartLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordPartLeftSelect", function() { return CursorWordPartLeftSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordPartRightCommand", function() { return WordPartRightCommand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordPartRight", function() { return CursorWordPartRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CursorWordPartRightSelect", function() { return CursorWordPartRightSelect; }); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/controller/cursorWordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorWordOperations.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../wordOperations/wordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -class DeleteWordPartLeft extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__["DeleteWordCommand"] { - constructor() { - super({ - whitespaceHeuristics: true, - wordNavigationType: 0 /* WordStart */, - id: 'deleteWordPartLeft', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1 /* Backspace */ }, - weight: 100 /* EditorContrib */ - } - }); + get onPointer() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onPointer, ({ element, index, browserEvent }) => ({ element: element === undefined ? undefined : this._model.get(element), index, browserEvent })); } - _delete(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__["WordPartOperations"].deleteWordPartLeft(wordSeparators, model, selection, whitespaceHeuristics); - if (r) { - return r; - } - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](1, 1, 1, 1); + get onDidChangeFocus() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onDidChangeFocus, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent })); } -} -class DeleteWordPartRight extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__["DeleteWordCommand"] { - constructor() { - super({ - whitespaceHeuristics: true, - wordNavigationType: 2 /* WordEnd */, - id: 'deleteWordPartRight', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].writable, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 20 /* Delete */ }, - weight: 100 /* EditorContrib */ - } - }); + get onDidChangeSelection() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.list.onDidChangeSelection, ({ elements, indexes, browserEvent }) => ({ elements: elements.map(e => this._model.get(e)), indexes, browserEvent })); } - _delete(wordSeparators, model, selection, whitespaceHeuristics, wordNavigationType) { - let r = _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__["WordPartOperations"].deleteWordPartRight(wordSeparators, model, selection, whitespaceHeuristics); - if (r) { - return r; - } - const lineCount = model.getLineCount(); - const maxColumn = model.getLineMaxColumn(lineCount); - return new _common_core_range_js__WEBPACK_IMPORTED_MODULE_2__["Range"](lineCount, maxColumn, lineCount, maxColumn); + get model() { + return this._model; } -} -class WordPartLeftCommand extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__["MoveWordCommand"] { - _move(wordSeparators, model, position, wordNavigationType) { - return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__["WordPartOperations"].moveWordPartLeft(wordSeparators, model, position); + set model(model) { + this._model = model; + this.list.splice(0, this.list.length, Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_2__["range"])(model.length)); } -} -class CursorWordPartLeft extends WordPartLeftCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordPartLeft', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ - } - }); + getFocus() { + return this.list.getFocus(); } -} -// Register previous id for compatibility purposes -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__["CommandsRegistry"].registerCommandAlias('cursorWordPartStartLeft', 'cursorWordPartLeft'); -class CursorWordPartLeftSelect extends WordPartLeftCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 0 /* WordStart */, - id: 'cursorWordPartLeftSelect', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ }, - weight: 100 /* EditorContrib */ - } - }); + setSelection(indexes, browserEvent) { + this.list.setSelection(indexes, browserEvent); } -} -// Register previous id for compatibility purposes -_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_5__["CommandsRegistry"].registerCommandAlias('cursorWordPartStartLeftSelect', 'cursorWordPartLeftSelect'); -class WordPartRightCommand extends _wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_4__["MoveWordCommand"] { - _move(wordSeparators, model, position, wordNavigationType) { - return _common_controller_cursorWordOperations_js__WEBPACK_IMPORTED_MODULE_1__["WordPartOperations"].moveWordPartRight(wordSeparators, model, position); + getSelection() { + return this.list.getSelection(); } -} -class CursorWordPartRight extends WordPartRightCommand { - constructor() { - super({ - inSelectionMode: false, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordPartRight', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ - } - }); + style(styles) { + this.list.style(styles); } -} -class CursorWordPartRightSelect extends WordPartRightCommand { - constructor() { - super({ - inSelectionMode: true, - wordNavigationType: 2 /* WordEnd */, - id: 'cursorWordPartRightSelect', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_3__["EditorContextKeys"].textInputFocus, - primary: 0, - mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ }, - weight: 100 /* EditorContrib */ - } - }); + dispose() { + this.list.dispose(); } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordPartLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new DeleteWordPartRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordPartLeft()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordPartLeftSelect()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordPartRight()); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorCommand"])(new CursorWordPartRightSelect()); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css ***! - \************************************************************************************/ -/*! exports provided: default */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js": +/*!****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js ***! + \****************************************************************************/ +/*! exports provided: ElementsDragAndDropData, ExternalElementsDragAndDropData, NativeDragAndDropData, ListView */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./zoneWidget.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementsDragAndDropData", function() { return ElementsDragAndDropData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExternalElementsDragAndDropData", function() { return ExternalElementsDragAndDropData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NativeDragAndDropData", function() { return NativeDragAndDropData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListView", function() { return ListView; }); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); +/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); +/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/scrollable.js */ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js"); +/* harmony import */ var _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./rangeMap.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js"); +/* harmony import */ var _rowCache_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./rowCache.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js"); +/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); +/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_zoneWidget_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js": -/*!***********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.js ***! - \***********************************************************************************/ -/*! exports provided: ViewZoneDelegate, OverlayWidgetDelegate, ZoneWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewZoneDelegate", function() { return ViewZoneDelegate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayWidgetDelegate", function() { return OverlayWidgetDelegate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZoneWidget", function() { return ZoneWidget; }); -/* harmony import */ var _zoneWidget_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoneWidget.css */ "./node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/sash/sash.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/model/textModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ @@ -224045,1636 +75449,952 @@ __webpack_require__.r(__webpack_exports__); -const defaultColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_3__["RGBA"](0, 122, 204)); -const defaultOptions = { - showArrow: true, - showFrame: true, - className: '', - frameColor: defaultColor, - arrowColor: defaultColor, - keepEditorSelection: false -}; -const WIDGET_ID = 'vs.editor.contrib.zoneWidget'; -class ViewZoneDelegate { - constructor(domNode, afterLineNumber, afterColumn, heightInLines, onDomNodeTop, onComputedHeight) { - this.id = ''; // A valid zone id should be greater than 0 - this.domNode = domNode; - this.afterLineNumber = afterLineNumber; - this.afterColumn = afterColumn; - this.heightInLines = heightInLines; - this._onDomNodeTop = onDomNodeTop; - this._onComputedHeight = onComputedHeight; +const DefaultOptions = { + useShadows: true, + verticalScrollMode: 1 /* Auto */, + setRowLineHeight: true, + setRowHeight: true, + supportDynamicHeights: false, + dnd: { + getDragElements(e) { return [e]; }, + getDragURI() { return null; }, + onDragStart() { }, + onDragOver() { return false; }, + drop() { } + }, + horizontalScrolling: false, + transformOptimization: true +}; +class ElementsDragAndDropData { + constructor(elements) { + this.elements = elements; + } + update() { } + getData() { + return this.elements; } - onDomNodeTop(top) { - this._onDomNodeTop(top); +} +class ExternalElementsDragAndDropData { + constructor(elements) { + this.elements = elements; } - onComputedHeight(height) { - this._onComputedHeight(height); + update() { } + getData() { + return this.elements; } } -class OverlayWidgetDelegate { - constructor(id, domNode) { - this._id = id; - this._domNode = domNode; +class NativeDragAndDropData { + constructor() { + this.types = []; + this.files = []; } - getId() { - return this._id; + update(dataTransfer) { + if (dataTransfer.types) { + this.types.splice(0, this.types.length, ...dataTransfer.types); + } + if (dataTransfer.files) { + this.files.splice(0, this.files.length); + for (let i = 0; i < dataTransfer.files.length; i++) { + const file = dataTransfer.files.item(i); + if (file && (file.size || file.type)) { + this.files.push(file); + } + } + } } - getDomNode() { - return this._domNode; + getData() { + return { + types: this.types, + files: this.files + }; } - getPosition() { - return null; +} +function equalsDragFeedback(f1, f2) { + if (Array.isArray(f1) && Array.isArray(f2)) { + return Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__["equals"])(f1, f2); } + return f1 === f2; } -class Arrow { - constructor(_editor) { - this._editor = _editor; - this._ruleName = Arrow._IdGenerator.nextId(); - this._decorations = []; - this._color = null; - this._height = -1; - // +class ListViewAccessibilityProvider { + constructor(accessibilityProvider) { + if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getSetSize) { + this.getSetSize = accessibilityProvider.getSetSize.bind(accessibilityProvider); + } + else { + this.getSetSize = (e, i, l) => l; + } + if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getPosInSet) { + this.getPosInSet = accessibilityProvider.getPosInSet.bind(accessibilityProvider); + } + else { + this.getPosInSet = (e, i) => i + 1; + } + if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.getRole) { + this.getRole = accessibilityProvider.getRole.bind(accessibilityProvider); + } + else { + this.getRole = _ => 'listitem'; + } + if (accessibilityProvider === null || accessibilityProvider === void 0 ? void 0 : accessibilityProvider.isChecked) { + this.isChecked = accessibilityProvider.isChecked.bind(accessibilityProvider); + } + else { + this.isChecked = _ => undefined; + } } - dispose() { - this.hide(); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeCSSRulesContainingSelector"](this._ruleName); +} +class ListView { + constructor(container, virtualDelegate, renderers, options = DefaultOptions) { + this.virtualDelegate = virtualDelegate; + this.domId = `list_id_${++ListView.InstanceCount}`; + this.renderers = new Map(); + this.renderWidth = 0; + this._scrollHeight = 0; + this.scrollableElementUpdateDisposable = null; + this.scrollableElementWidthDelayer = new _common_async_js__WEBPACK_IMPORTED_MODULE_14__["Delayer"](50); + this.splicing = false; + this.dragOverAnimationStopDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + this.dragOverMouseY = 0; + this.canDrop = false; + this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + this.onDragLeaveTimeout = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this._onDidChangeContentHeight = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this._horizontalScrolling = false; + if (options.horizontalScrolling && options.supportDynamicHeights) { + throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously'); + } + this.items = []; + this.itemId = 0; + this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["RangeMap"](); + for (const renderer of renderers) { + this.renderers.set(renderer.templateId, renderer); + } + this.cache = this.disposables.add(new _rowCache_js__WEBPACK_IMPORTED_MODULE_9__["RowCache"](this.renderers)); + this.lastRenderTop = 0; + this.lastRenderHeight = 0; + this.domNode = document.createElement('div'); + this.domNode.className = 'monaco-list'; + _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, this.domId); + this.domNode.tabIndex = 0; + _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'mouse-support', typeof options.mouseSupport === 'boolean' ? options.mouseSupport : true); + this._horizontalScrolling = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.horizontalScrolling, DefaultOptions.horizontalScrolling); + _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'horizontal-scrolling', this._horizontalScrolling); + this.additionalScrollHeight = typeof options.additionalScrollHeight === 'undefined' ? 0 : options.additionalScrollHeight; + this.accessibilityProvider = new ListViewAccessibilityProvider(options.accessibilityProvider); + this.rowsContainer = document.createElement('div'); + this.rowsContainer.className = 'monaco-list-rows'; + const transformOptimization = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.transformOptimization, DefaultOptions.transformOptimization); + if (transformOptimization) { + this.rowsContainer.style.transform = 'translate3d(0px, 0px, 0px)'; + } + this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_2__["Gesture"].addTarget(this.rowsContainer)); + this.scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_7__["Scrollable"](Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.smoothScrolling, false) ? 125 : 0, cb => _dom_js__WEBPACK_IMPORTED_MODULE_3__["scheduleAtNextAnimationFrame"](cb)); + this.scrollableElement = this.disposables.add(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_6__["SmoothScrollableElement"](this.rowsContainer, { + alwaysConsumeMouseWheel: true, + horizontal: 1 /* Auto */, + vertical: Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.verticalScrollMode, DefaultOptions.verticalScrollMode), + useShadows: Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.useShadows, DefaultOptions.useShadows), + }, this.scrollable)); + this.domNode.appendChild(this.scrollableElement.getDomNode()); + container.appendChild(this.domNode); + this.scrollableElement.onScroll(this.onScroll, this, this.disposables); + Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Change)(this.onTouchChange, this, this.disposables); + // Prevent the monaco-scrollable-element from scrolling + // https://github.com/Microsoft/vscode/issues/44181 + Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.scrollableElement.getDomNode(), 'scroll')(e => e.target.scrollTop = 0, null, this.disposables); + _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dragover'), e => this.toDragEvent(e))(this.onDragOver, this, this.disposables); + _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'drop'), e => this.toDragEvent(e))(this.onDrop, this, this.disposables); + Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dragleave')(this.onDragLeave, this, this.disposables); + Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(window, 'dragend')(this.onDragEnd, this, this.disposables); + this.setRowLineHeight = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.setRowLineHeight, DefaultOptions.setRowLineHeight); + this.setRowHeight = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.setRowHeight, DefaultOptions.setRowHeight); + this.supportDynamicHeights = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.supportDynamicHeights, DefaultOptions.supportDynamicHeights); + this.dnd = Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_0__["getOrDefault"])(options, o => o.dnd, DefaultOptions.dnd); + this.layout(); } - set color(value) { - if (this._color !== value) { - this._color = value; - this._updateStyle(); + get contentHeight() { return this.rangeMap.size; } + get horizontalScrolling() { return this._horizontalScrolling; } + set horizontalScrolling(value) { + if (value === this._horizontalScrolling) { + return; + } + if (value && this.supportDynamicHeights) { + throw new Error('Horizontal scrolling and dynamic heights not supported simultaneously'); + } + this._horizontalScrolling = value; + _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](this.domNode, 'horizontal-scrolling', this._horizontalScrolling); + if (this._horizontalScrolling) { + for (const item of this.items) { + this.measureItemWidth(item); + } + this.updateScrollWidth(); + this.scrollableElement.setScrollDimensions({ width: _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](this.domNode) }); + this.rowsContainer.style.width = `${Math.max(this.scrollWidth || 0, this.renderWidth)}px`; } - } - set height(value) { - if (this._height !== value) { - this._height = value; - this._updateStyle(); + else { + this.scrollableElementWidthDelayer.cancel(); + this.scrollableElement.setScrollDimensions({ width: this.renderWidth, scrollWidth: this.renderWidth }); + this.rowsContainer.style.width = ''; } } - _updateStyle() { - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeCSSRulesContainingSelector"](this._ruleName); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["createCSSRule"](`.monaco-editor ${this._ruleName}`, `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `); + updateOptions(options) { + if (options.additionalScrollHeight !== undefined) { + this.additionalScrollHeight = options.additionalScrollHeight; + } + if (options.smoothScrolling !== undefined) { + this.scrollable.setSmoothScrollDuration(options.smoothScrolling ? 125 : 0); + } + if (options.horizontalScrolling !== undefined) { + this.horizontalScrolling = options.horizontalScrolling; + } } - show(where) { - this._decorations = this._editor.deltaDecorations(this._decorations, [{ range: _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].fromPositions(where), options: { className: this._ruleName, stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ } }]); + splice(start, deleteCount, elements = []) { + if (this.splicing) { + throw new Error('Can\'t run recursive splices.'); + } + this.splicing = true; + try { + return this._splice(start, deleteCount, elements); + } + finally { + this.splicing = false; + this._onDidChangeContentHeight.fire(this.contentHeight); + } } - hide() { - this._editor.deltaDecorations(this._decorations, []); - } -} -Arrow._IdGenerator = new _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__["IdGenerator"]('.arrow-decoration-'); -class ZoneWidget { - constructor(editor, options = {}) { - this._arrow = null; - this._overlayWidget = null; - this._resizeSash = null; - this._positionMarkerId = []; - this._viewZone = null; - this._disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - this.container = null; - this._isShowing = false; - this.editor = editor; - this.options = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__["deepClone"](options); - _base_common_objects_js__WEBPACK_IMPORTED_MODULE_6__["mixin"](this.options, defaultOptions, false); - this.domNode = document.createElement('div'); - if (!this.options.isAccessible) { - this.domNode.setAttribute('aria-hidden', 'true'); - this.domNode.setAttribute('role', 'presentation'); - } - this._disposables.add(this.editor.onDidLayoutChange((info) => { - const width = this._getWidth(info); - this.domNode.style.width = width + 'px'; - this.domNode.style.left = this._getLeft(info) + 'px'; - this._onWidth(width); + _splice(start, deleteCount, elements = []) { + const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); + const deleteRange = { start, end: start + deleteCount }; + const removeRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRenderRange, deleteRange); + for (let i = removeRange.start; i < removeRange.end; i++) { + this.removeItemFromDOM(i); + } + const previousRestRange = { start: start + deleteCount, end: this.items.length }; + const previousRenderedRestRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRestRange, previousRenderRange); + const previousUnrenderedRestRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRestRange, previousRenderRange); + const inserted = elements.map(element => ({ + id: String(this.itemId++), + element, + templateId: this.virtualDelegate.getTemplateId(element), + size: this.virtualDelegate.getHeight(element), + width: undefined, + hasDynamicHeight: !!this.virtualDelegate.hasDynamicHeight && this.virtualDelegate.hasDynamicHeight(element), + lastDynamicHeightWidth: undefined, + row: null, + uri: undefined, + dropTarget: false, + dragStartDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None })); + let deleted; + // TODO@joao: improve this optimization to catch even more cases + if (start === 0 && deleteCount >= this.items.length) { + this.rangeMap = new _rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["RangeMap"](); + this.rangeMap.splice(0, 0, inserted); + this.items = inserted; + deleted = []; + } + else { + this.rangeMap.splice(start, deleteCount, inserted); + deleted = this.items.splice(start, deleteCount, ...inserted); + } + const delta = elements.length - deleteCount; + const renderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); + const renderedRestRange = Object(_rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["shift"])(previousRenderedRestRange, delta); + const updateRange = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(renderRange, renderedRestRange); + for (let i = updateRange.start; i < updateRange.end; i++) { + this.updateItemInDOM(this.items[i], i); + } + const removeRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderedRestRange, renderRange); + for (const range of removeRanges) { + for (let i = range.start; i < range.end; i++) { + this.removeItemFromDOM(i); + } + } + const unrenderedRestRanges = previousUnrenderedRestRanges.map(r => Object(_rangeMap_js__WEBPACK_IMPORTED_MODULE_8__["shift"])(r, delta)); + const elementsRange = { start, end: start + elements.length }; + const insertRanges = [elementsRange, ...unrenderedRestRanges].map(r => _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(renderRange, r)); + const beforeElement = this.getNextToLastElement(insertRanges); + for (const range of insertRanges) { + for (let i = range.start; i < range.end; i++) { + this.insertItemInDOM(i, beforeElement); + } + } + this.eventuallyUpdateScrollDimensions(); + if (this.supportDynamicHeights) { + this._rerender(this.scrollTop, this.renderHeight); + } + return deleted.map(i => i.element); } - dispose() { - if (this._overlayWidget) { - this.editor.removeOverlayWidget(this._overlayWidget); - this._overlayWidget = null; - } - if (this._viewZone) { - this.editor.changeViewZones(accessor => { - if (this._viewZone) { - accessor.removeZone(this._viewZone.id); - } - this._viewZone = null; + eventuallyUpdateScrollDimensions() { + this._scrollHeight = this.contentHeight; + this.rowsContainer.style.height = `${this._scrollHeight}px`; + if (!this.scrollableElementUpdateDisposable) { + this.scrollableElementUpdateDisposable = _dom_js__WEBPACK_IMPORTED_MODULE_3__["scheduleAtNextAnimationFrame"](() => { + this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight }); + this.updateScrollWidth(); + this.scrollableElementUpdateDisposable = null; }); } - this.editor.deltaDecorations(this._positionMarkerId, []); - this._positionMarkerId = []; - this._disposables.dispose(); } - create() { - this.domNode.classList.add('zone-widget'); - if (this.options.className) { - this.domNode.classList.add(this.options.className); - } - this.container = document.createElement('div'); - this.container.classList.add('zone-widget-container'); - this.domNode.appendChild(this.container); - if (this.options.showArrow) { - this._arrow = new Arrow(this.editor); - this._disposables.add(this._arrow); + eventuallyUpdateScrollWidth() { + if (!this.horizontalScrolling) { + this.scrollableElementWidthDelayer.cancel(); + return; } - this._fillContainer(this.container); - this._initSash(); - this._applyStyles(); + this.scrollableElementWidthDelayer.trigger(() => this.updateScrollWidth()); } - style(styles) { - if (styles.frameColor) { - this.options.frameColor = styles.frameColor; + updateScrollWidth() { + if (!this.horizontalScrolling) { + return; } - if (styles.arrowColor) { - this.options.arrowColor = styles.arrowColor; + let scrollWidth = 0; + for (const item of this.items) { + if (typeof item.width !== 'undefined') { + scrollWidth = Math.max(scrollWidth, item.width); + } } - this._applyStyles(); + this.scrollWidth = scrollWidth; + this.scrollableElement.setScrollDimensions({ scrollWidth: scrollWidth === 0 ? 0 : (scrollWidth + 10) }); } - _applyStyles() { - if (this.container && this.options.frameColor) { - let frameColor = this.options.frameColor.toString(); - this.container.style.borderTopColor = frameColor; - this.container.style.borderBottomColor = frameColor; + rerender() { + if (!this.supportDynamicHeights) { + return; } - if (this._arrow && this.options.arrowColor) { - let arrowColor = this.options.arrowColor.toString(); - this._arrow.color = arrowColor; + for (const item of this.items) { + item.lastDynamicHeightWidth = undefined; } + this._rerender(this.lastRenderTop, this.lastRenderHeight); } - _getWidth(info) { - return info.width - info.minimap.minimapWidth - info.verticalScrollbarWidth; + get length() { + return this.items.length; } - _getLeft(info) { - // If minimap is to the left, we move beyond it - if (info.minimap.minimapWidth > 0 && info.minimap.minimapLeft === 0) { - return info.minimap.minimapWidth; - } - return 0; + get renderHeight() { + const scrollDimensions = this.scrollableElement.getScrollDimensions(); + return scrollDimensions.height; } - _onViewZoneTop(top) { - this.domNode.style.top = top + 'px'; + element(index) { + return this.items[index].element; } - _onViewZoneHeight(height) { - this.domNode.style.height = `${height}px`; - if (this.container) { - let containerHeight = height - this._decoratingElementsHeight(); - this.container.style.height = `${containerHeight}px`; - const layoutInfo = this.editor.getLayoutInfo(); - this._doLayout(containerHeight, this._getWidth(layoutInfo)); - } - if (this._resizeSash) { - this._resizeSash.layout(); - } + domElement(index) { + const row = this.items[index].row; + return row && row.domNode; } - get position() { - const [id] = this._positionMarkerId; - if (!id) { - return undefined; - } - const model = this.editor.getModel(); - if (!model) { - return undefined; + elementHeight(index) { + return this.items[index].size; + } + elementTop(index) { + return this.rangeMap.positionAt(index); + } + indexAt(position) { + return this.rangeMap.indexAt(position); + } + indexAfter(position) { + return this.rangeMap.indexAfter(position); + } + layout(height, width) { + let scrollDimensions = { + height: typeof height === 'number' ? height : _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentHeight"](this.domNode) + }; + if (this.scrollableElementUpdateDisposable) { + this.scrollableElementUpdateDisposable.dispose(); + this.scrollableElementUpdateDisposable = null; + scrollDimensions.scrollHeight = this.scrollHeight; } - const range = model.getDecorationRange(id); - if (!range) { - return undefined; + this.scrollableElement.setScrollDimensions(scrollDimensions); + if (typeof width !== 'undefined') { + this.renderWidth = width; + if (this.supportDynamicHeights) { + this._rerender(this.scrollTop, this.renderHeight); + } + if (this.horizontalScrolling) { + this.scrollableElement.setScrollDimensions({ + width: typeof width === 'number' ? width : _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](this.domNode) + }); + } } - return range.getStartPosition(); } - show(rangeOrPos, heightInLines) { - const range = _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].isIRange(rangeOrPos) ? _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].lift(rangeOrPos) : _common_core_range_js__WEBPACK_IMPORTED_MODULE_7__["Range"].fromPositions(rangeOrPos); - this._isShowing = true; - this._showImpl(range, heightInLines); - this._isShowing = false; - this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: _common_model_textModel_js__WEBPACK_IMPORTED_MODULE_8__["ModelDecorationOptions"].EMPTY }]); - } - hide() { - if (this._viewZone) { - this.editor.changeViewZones(accessor => { - if (this._viewZone) { - accessor.removeZone(this._viewZone.id); - } - }); - this._viewZone = null; + // Render + render(previousRenderRange, renderTop, renderHeight, renderLeft, scrollWidth, updateItemsInDOM = false) { + const renderRange = this.getRenderRange(renderTop, renderHeight); + const rangesToInsert = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderRange, previousRenderRange); + const rangesToRemove = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRenderRange, renderRange); + const beforeElement = this.getNextToLastElement(rangesToInsert); + if (updateItemsInDOM) { + const rangesToUpdate = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].intersect(previousRenderRange, renderRange); + for (let i = rangesToUpdate.start; i < rangesToUpdate.end; i++) { + this.updateItemInDOM(this.items[i], i); + } } - if (this._overlayWidget) { - this.editor.removeOverlayWidget(this._overlayWidget); - this._overlayWidget = null; + for (const range of rangesToInsert) { + for (let i = range.start; i < range.end; i++) { + this.insertItemInDOM(i, beforeElement); + } } - if (this._arrow) { - this._arrow.hide(); + for (const range of rangesToRemove) { + for (let i = range.start; i < range.end; i++) { + this.removeItemFromDOM(i); + } } - } - _decoratingElementsHeight() { - let lineHeight = this.editor.getOption(51 /* lineHeight */); - let result = 0; - if (this.options.showArrow) { - let arrowHeight = Math.round(lineHeight / 3); - result += 2 * arrowHeight; + if (renderLeft !== undefined) { + this.rowsContainer.style.left = `-${renderLeft}px`; } - if (this.options.showFrame) { - let frameThickness = Math.round(lineHeight / 9); - result += 2 * frameThickness; + this.rowsContainer.style.top = `-${renderTop}px`; + if (this.horizontalScrolling && scrollWidth !== undefined) { + this.rowsContainer.style.width = `${Math.max(scrollWidth, this.renderWidth)}px`; } - return result; + this.lastRenderTop = renderTop; + this.lastRenderHeight = renderHeight; } - _showImpl(where, heightInLines) { - const position = where.getStartPosition(); - const layoutInfo = this.editor.getLayoutInfo(); - const width = this._getWidth(layoutInfo); - this.domNode.style.width = `${width}px`; - this.domNode.style.left = this._getLeft(layoutInfo) + 'px'; - // Render the widget as zone (rendering) and widget (lifecycle) - const viewZoneDomNode = document.createElement('div'); - viewZoneDomNode.style.overflow = 'hidden'; - const lineHeight = this.editor.getOption(51 /* lineHeight */); - // adjust heightInLines to viewport - const maxHeightInLines = Math.max(12, (this.editor.getLayoutInfo().height / lineHeight) * 0.8); - heightInLines = Math.min(heightInLines, maxHeightInLines); - let arrowHeight = 0; - let frameThickness = 0; - // Render the arrow one 1/3 of an editor line height - if (this._arrow && this.options.showArrow) { - arrowHeight = Math.round(lineHeight / 3); - this._arrow.height = arrowHeight; - this._arrow.show(position); - } - // Render the frame as 1/9 of an editor line height - if (this.options.showFrame) { - frameThickness = Math.round(lineHeight / 9); - } - // insert zone widget - this.editor.changeViewZones((accessor) => { - if (this._viewZone) { - accessor.removeZone(this._viewZone.id); - } - if (this._overlayWidget) { - this.editor.removeOverlayWidget(this._overlayWidget); - this._overlayWidget = null; + // DOM operations + insertItemInDOM(index, beforeElement) { + const item = this.items[index]; + if (!item.row) { + item.row = this.cache.alloc(item.templateId); + const role = this.accessibilityProvider.getRole(item.element) || 'listitem'; + item.row.domNode.setAttribute('role', role); + const checked = this.accessibilityProvider.isChecked(item.element); + if (typeof checked !== 'undefined') { + item.row.domNode.setAttribute('aria-checked', String(!!checked)); } - this.domNode.style.top = '-1000px'; - this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position.lineNumber, position.column, heightInLines, (top) => this._onViewZoneTop(top), (height) => this._onViewZoneHeight(height)); - this._viewZone.id = accessor.addZone(this._viewZone); - this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode); - this.editor.addOverlayWidget(this._overlayWidget); - }); - if (this.container && this.options.showFrame) { - const width = this.options.frameWidth ? this.options.frameWidth : frameThickness; - this.container.style.borderTopWidth = width + 'px'; - this.container.style.borderBottomWidth = width + 'px'; } - let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight(); - if (this.container) { - this.container.style.top = arrowHeight + 'px'; - this.container.style.height = containerHeight + 'px'; - this.container.style.overflow = 'hidden'; - } - this._doLayout(containerHeight, width); - if (!this.options.keepEditorSelection) { - this.editor.setSelection(where); - } - const model = this.editor.getModel(); - if (model) { - const revealLine = where.endLineNumber + 1; - if (revealLine <= model.getLineCount()) { - // reveal line below the zone widget - this.revealLine(revealLine, false); + if (!item.row.domNode.parentElement) { + if (beforeElement) { + this.rowsContainer.insertBefore(item.row.domNode, beforeElement); } else { - // reveal last line atop - this.revealLine(model.getLineCount(), true); + this.rowsContainer.appendChild(item.row.domNode); } } - } - revealLine(lineNumber, isLastLine) { - if (isLastLine) { - this.editor.revealLineInCenter(lineNumber, 0 /* Smooth */); + this.updateItemInDOM(item, index); + const renderer = this.renderers.get(item.templateId); + if (!renderer) { + throw new Error(`No renderer found for template id ${item.templateId}`); } - else { - this.editor.revealLine(lineNumber, 0 /* Smooth */); + if (renderer) { + renderer.renderElement(item.element, index, item.row.templateData, item.size); + } + const uri = this.dnd.getDragURI(item.element); + item.dragStartDisposable.dispose(); + item.row.domNode.draggable = !!uri; + if (uri) { + const onDragStart = Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(item.row.domNode, 'dragstart'); + item.dragStartDisposable = onDragStart(event => this.onDragStart(item.element, uri, event)); + } + if (this.horizontalScrolling) { + this.measureItemWidth(item); + this.eventuallyUpdateScrollWidth(); } } - setCssClass(className, classToReplace) { - if (!this.container) { + measureItemWidth(item) { + if (!item.row || !item.row.domNode) { return; } - if (classToReplace) { - this.container.classList.remove(classToReplace); + item.row.domNode.style.width = _browser_js__WEBPACK_IMPORTED_MODULE_15__["isFirefox"] ? '-moz-fit-content' : 'fit-content'; + item.width = _dom_js__WEBPACK_IMPORTED_MODULE_3__["getContentWidth"](item.row.domNode); + const style = window.getComputedStyle(item.row.domNode); + if (style.paddingLeft) { + item.width += parseFloat(style.paddingLeft); } - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addClass"](this.container, className); - } - _onWidth(widthInPixel) { - // implement in subclass - } - _doLayout(heightInPixel, widthInPixel) { - // implement in subclass - } - _relayout(newHeightInLines) { - if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) { - this.editor.changeViewZones(accessor => { - if (this._viewZone) { - this._viewZone.heightInLines = newHeightInLines; - accessor.layoutZone(this._viewZone.id); - } - }); + if (style.paddingRight) { + item.width += parseFloat(style.paddingRight); } + item.row.domNode.style.width = ''; } - // --- sash - _initSash() { - if (this._resizeSash) { - return; + updateItemInDOM(item, index) { + item.row.domNode.style.top = `${this.elementTop(index)}px`; + if (this.setRowHeight) { + item.row.domNode.style.height = `${item.size}px`; } - this._resizeSash = this._disposables.add(new _base_browser_ui_sash_sash_js__WEBPACK_IMPORTED_MODULE_2__["Sash"](this.domNode, this, { orientation: 1 /* HORIZONTAL */ })); - if (!this.options.isResizeable) { - this._resizeSash.hide(); - this._resizeSash.state = 0 /* Disabled */; + if (this.setRowLineHeight) { + item.row.domNode.style.lineHeight = `${item.size}px`; } - let data; - this._disposables.add(this._resizeSash.onDidStart((e) => { - if (this._viewZone) { - data = { - startY: e.startY, - heightInLines: this._viewZone.heightInLines, - }; - } - })); - this._disposables.add(this._resizeSash.onDidEnd(() => { - data = undefined; - })); - this._disposables.add(this._resizeSash.onDidChange((evt) => { - if (data) { - let lineDelta = (evt.currentY - data.startY) / this.editor.getOption(51 /* lineHeight */); - let roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta); - let newHeightInLines = data.heightInLines + roundedLineDelta; - if (newHeightInLines > 5 && newHeightInLines < 35) { - this._relayout(newHeightInLines); - } - } - })); - } - getHorizontalSashLeft() { - return 0; + item.row.domNode.setAttribute('data-index', `${index}`); + item.row.domNode.setAttribute('data-last-element', index === this.length - 1 ? 'true' : 'false'); + item.row.domNode.setAttribute('aria-setsize', String(this.accessibilityProvider.getSetSize(item.element, index, this.length))); + item.row.domNode.setAttribute('aria-posinset', String(this.accessibilityProvider.getPosInSet(item.element, index))); + item.row.domNode.setAttribute('id', this.getElementDomId(index)); + _dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"](item.row.domNode, 'drop-target', item.dropTarget); } - getHorizontalSashTop() { - return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - (this._decoratingElementsHeight() / 2); + removeItemFromDOM(index) { + const item = this.items[index]; + item.dragStartDisposable.dispose(); + const renderer = this.renderers.get(item.templateId); + if (item.row && renderer && renderer.disposeElement) { + renderer.disposeElement(item.element, index, item.row.templateData, item.size); + } + this.cache.release(item.row); + item.row = null; + if (this.horizontalScrolling) { + this.eventuallyUpdateScrollWidth(); + } } - getHorizontalSashWidth() { - const layoutInfo = this.editor.getLayoutInfo(); - return layoutInfo.width - layoutInfo.minimap.minimapWidth; + getScrollTop() { + const scrollPosition = this.scrollableElement.getScrollPosition(); + return scrollPosition.scrollTop; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/edcore.main.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/edcore.main.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_all_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./editor.all.js */ "./node_modules/monaco-editor/esm/vs/editor/editor.all.js"); -/* harmony import */ var _standalone_browser_accessibilityHelp_accessibilityHelp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./standalone/browser/accessibilityHelp/accessibilityHelp.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js"); -/* harmony import */ var _standalone_browser_iPadShowKeyboard_iPadShowKeyboard_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js"); -/* harmony import */ var _standalone_browser_inspectTokens_inspectTokens_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./standalone/browser/inspectTokens/inspectTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js"); -/* harmony import */ var _standalone_browser_quickAccess_standaloneHelpQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneHelpQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js"); -/* harmony import */ var _standalone_browser_quickAccess_standaloneGotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js"); -/* harmony import */ var _standalone_browser_quickAccess_standaloneGotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js"); -/* harmony import */ var _standalone_browser_quickAccess_standaloneCommandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./standalone/browser/quickAccess/standaloneCommandsQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js"); -/* harmony import */ var _standalone_browser_referenceSearch_standaloneReferenceSearch_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./standalone/browser/referenceSearch/standaloneReferenceSearch.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js"); -/* harmony import */ var _standalone_browser_toggleHighContrast_toggleHighContrast_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./standalone/browser/toggleHighContrast/toggleHighContrast.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js"); -/* harmony import */ var _editor_api_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_api_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_editor_api_js__WEBPACK_IMPORTED_MODULE_10__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_api_js__WEBPACK_IMPORTED_MODULE_10__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_api_js__WEBPACK_IMPORTED_MODULE_10__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.all.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/editor.all.js ***! - \****************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _browser_controller_coreCommands_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser/controller/coreCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js"); -/* harmony import */ var _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browser/widget/codeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js"); -/* harmony import */ var _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./browser/widget/diffEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js"); -/* harmony import */ var _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./browser/widget/diffNavigator.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js"); -/* harmony import */ var _contrib_anchorSelect_anchorSelect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contrib/anchorSelect/anchorSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.js"); -/* harmony import */ var _contrib_bracketMatching_bracketMatching_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contrib/bracketMatching/bracketMatching.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js"); -/* harmony import */ var _contrib_caretOperations_caretOperations_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./contrib/caretOperations/caretOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/caretOperations.js"); -/* harmony import */ var _contrib_caretOperations_transpose_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./contrib/caretOperations/transpose.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/caretOperations/transpose.js"); -/* harmony import */ var _contrib_clipboard_clipboard_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contrib/clipboard/clipboard.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js"); -/* harmony import */ var _contrib_codeAction_codeActionContributions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./contrib/codeAction/codeActionContributions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js"); -/* harmony import */ var _contrib_codelens_codelensController_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./contrib/codelens/codelensController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js"); -/* harmony import */ var _contrib_colorPicker_colorDetector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./contrib/colorPicker/colorDetector.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js"); -/* harmony import */ var _contrib_comment_comment_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./contrib/comment/comment.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/comment/comment.js"); -/* harmony import */ var _contrib_contextmenu_contextmenu_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./contrib/contextmenu/contextmenu.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js"); -/* harmony import */ var _contrib_cursorUndo_cursorUndo_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./contrib/cursorUndo/cursorUndo.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js"); -/* harmony import */ var _contrib_dnd_dnd_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./contrib/dnd/dnd.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.js"); -/* harmony import */ var _contrib_find_findController_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./contrib/find/findController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js"); -/* harmony import */ var _contrib_folding_folding_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./contrib/folding/folding.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js"); -/* harmony import */ var _contrib_fontZoom_fontZoom_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./contrib/fontZoom/fontZoom.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js"); -/* harmony import */ var _contrib_format_formatActions_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./contrib/format/formatActions.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js"); -/* harmony import */ var _contrib_gotoSymbol_documentSymbols_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./contrib/gotoSymbol/documentSymbols.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/documentSymbols.js"); -/* harmony import */ var _contrib_gotoSymbol_goToCommands_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./contrib/gotoSymbol/goToCommands.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js"); -/* harmony import */ var _contrib_gotoSymbol_link_goToDefinitionAtPosition_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js"); -/* harmony import */ var _contrib_gotoError_gotoError_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./contrib/gotoError/gotoError.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js"); -/* harmony import */ var _contrib_hover_hover_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./contrib/hover/hover.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js"); -/* harmony import */ var _contrib_indentation_indentation_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./contrib/indentation/indentation.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/indentation/indentation.js"); -/* harmony import */ var _contrib_inPlaceReplace_inPlaceReplace_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./contrib/inPlaceReplace/inPlaceReplace.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js"); -/* harmony import */ var _contrib_linesOperations_linesOperations_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./contrib/linesOperations/linesOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js"); -/* harmony import */ var _contrib_links_links_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./contrib/links/links.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js"); -/* harmony import */ var _contrib_multicursor_multicursor_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./contrib/multicursor/multicursor.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js"); -/* harmony import */ var _contrib_parameterHints_parameterHints_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./contrib/parameterHints/parameterHints.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.js"); -/* harmony import */ var _contrib_rename_onTypeRename_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./contrib/rename/onTypeRename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/onTypeRename.js"); -/* harmony import */ var _contrib_rename_rename_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./contrib/rename/rename.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js"); -/* harmony import */ var _contrib_smartSelect_smartSelect_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./contrib/smartSelect/smartSelect.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js"); -/* harmony import */ var _contrib_snippet_snippetController2_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./contrib/snippet/snippetController2.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js"); -/* harmony import */ var _contrib_suggest_suggestController_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./contrib/suggest/suggestController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js"); -/* harmony import */ var _contrib_tokenization_tokenization_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./contrib/tokenization/tokenization.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/tokenization/tokenization.js"); -/* harmony import */ var _contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./contrib/toggleTabFocusMode/toggleTabFocusMode.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js"); -/* harmony import */ var _contrib_unusualLineTerminators_unusualLineTerminators_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./contrib/unusualLineTerminators/unusualLineTerminators.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/unusualLineTerminators/unusualLineTerminators.js"); -/* harmony import */ var _contrib_viewportSemanticTokens_viewportSemanticTokens_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./contrib/viewportSemanticTokens/viewportSemanticTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens.js"); -/* harmony import */ var _contrib_wordHighlighter_wordHighlighter_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./contrib/wordHighlighter/wordHighlighter.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js"); -/* harmony import */ var _contrib_wordOperations_wordOperations_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./contrib/wordOperations/wordOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js"); -/* harmony import */ var _contrib_wordPartOperations_wordPartOperations_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./contrib/wordPartOperations/wordPartOperations.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../base/browser/ui/codicons/codiconStyles.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Load up these strings even in VSCode, even if they are not used -// in order to get them translated - - // The codicons are defined here and must be loaded - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.api.js": -/*!****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/editor.api.js ***! - \****************************************************************/ -/*! exports provided: CancellationTokenSource, Emitter, KeyCode, KeyMod, Position, Range, Selection, SelectionDirection, MarkerSeverity, MarkerTag, Uri, Token, editor, languages */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CancellationTokenSource", function() { return CancellationTokenSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Emitter", function() { return Emitter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyCode", function() { return KeyCode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyMod", function() { return KeyMod; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionDirection", function() { return SelectionDirection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerSeverity", function() { return MarkerSeverity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerTag", function() { return MarkerTag; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uri", function() { return Uri; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Token", function() { return Token; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editor", function() { return editor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "languages", function() { return languages; }); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/standalone/standaloneBase.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneBase.js"); -/* harmony import */ var _standalone_browser_standaloneEditor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./standalone/browser/standaloneEditor.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js"); -/* harmony import */ var _standalone_browser_standaloneLanguages_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./standalone/browser/standaloneLanguages.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const global = self; -// Set defaults for standalone editor -_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__["EditorOptions"].wrappingIndent.defaultValue = 0 /* None */; -_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__["EditorOptions"].glyphMargin.defaultValue = false; -_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__["EditorOptions"].autoIndent.defaultValue = 3 /* Advanced */; -_common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_0__["EditorOptions"].overviewRulerLanes.defaultValue = 2; -const api = Object(_common_standalone_standaloneBase_js__WEBPACK_IMPORTED_MODULE_1__["createMonacoBaseAPI"])(); -api.editor = Object(_standalone_browser_standaloneEditor_js__WEBPACK_IMPORTED_MODULE_2__["createMonacoEditorAPI"])(); -api.languages = Object(_standalone_browser_standaloneLanguages_js__WEBPACK_IMPORTED_MODULE_3__["createMonacoLanguagesAPI"])(); -const CancellationTokenSource = api.CancellationTokenSource; -const Emitter = api.Emitter; -const KeyCode = api.KeyCode; -const KeyMod = api.KeyMod; -const Position = api.Position; -const Range = api.Range; -const Selection = api.Selection; -const SelectionDirection = api.SelectionDirection; -const MarkerSeverity = api.MarkerSeverity; -const MarkerTag = api.MarkerTag; -const Uri = api.Uri; -const Token = api.Token; -const editor = api.editor; -const languages = api.languages; -global.monaco = api; -if (typeof global.require !== 'undefined' && typeof global.require.config === 'function') { - global.require.config({ - ignoreDuplicateModules: [ - 'vscode-languageserver-types', - 'vscode-languageserver-types/main', - 'vscode-languageserver-textdocument', - 'vscode-languageserver-textdocument/main', - 'vscode-nls', - 'vscode-nls/vscode-nls', - 'jsonc-parser', - 'jsonc-parser/main', - 'vscode-uri', - 'vscode-uri/index', - 'vs/basic-languages/typescript/typescript' - ] - }); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/editor.main.js": -/*!*****************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/editor.main.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _language_typescript_monaco_contribution__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../language/typescript/monaco.contribution */ "./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js"); -/* harmony import */ var _language_css_monaco_contribution__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../language/css/monaco.contribution */ "./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js"); -/* harmony import */ var _language_json_monaco_contribution__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../language/json/monaco.contribution */ "./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js"); -/* harmony import */ var _language_html_monaco_contribution__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../language/html/monaco.contribution */ "./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js"); -/* harmony import */ var _basic_languages_monaco_contribution__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../basic-languages/monaco.contribution */ "./node_modules/monaco-editor/esm/vs/basic-languages/monaco.contribution.js"); -/* harmony import */ var _edcore_main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edcore.main */ "./node_modules/monaco-editor/esm/vs/editor/edcore.main.js"); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _edcore_main__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _edcore_main__WEBPACK_IMPORTED_MODULE_5__[key]; }) }(__WEBPACK_IMPORT_KEY__)); - - - - - - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css": -/*!*************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css ***! - \*************************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./accessibilityHelp.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js": -/*!************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js ***! - \************************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _accessibilityHelp_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessibilityHelp.css */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); -/* harmony import */ var _base_browser_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/browser/formattedTextRenderer.js */ "./node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/browser/ui/widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../contrib/toggleTabFocusMode/toggleTabFocusMode.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - - -const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__["RawContextKey"]('accessibilityHelpWidgetVisible', false); -let AccessibilityHelpController = class AccessibilityHelpController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_6__["Disposable"] { - constructor(editor, instantiationService) { - super(); - this._editor = editor; - this._widget = this._register(instantiationService.createInstance(AccessibilityHelpWidget, this._editor)); + setScrollTop(scrollTop) { + if (this.scrollableElementUpdateDisposable) { + this.scrollableElementUpdateDisposable.dispose(); + this.scrollableElementUpdateDisposable = null; + this.scrollableElement.setScrollDimensions({ scrollHeight: this.scrollHeight }); + } + this.scrollableElement.setScrollPosition({ scrollTop }); } - static get(editor) { - return editor.getContribution(AccessibilityHelpController.ID); + get scrollTop() { + return this.getScrollTop(); } - show() { - this._widget.show(); + set scrollTop(scrollTop) { + this.setScrollTop(scrollTop); } - hide() { - this._widget.hide(); + get scrollHeight() { + return this._scrollHeight + (this.horizontalScrolling ? 10 : 0) + this.additionalScrollHeight; } -}; -AccessibilityHelpController.ID = 'editor.contrib.accessibilityHelpController'; -AccessibilityHelpController = __decorate([ - __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__["IInstantiationService"]) -], AccessibilityHelpController); -function getSelectionLabel(selections, charactersSelected) { - if (!selections || selections.length === 0) { - return _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].noSelection; + // Events + get onMouseClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'click'), e => this.toMouseEvent(e)); } + get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'dblclick'), e => this.toMouseEvent(e)); } + get onMouseMiddleClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].filter(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'auxclick'), e => this.toMouseEvent(e)), e => e.browserEvent.button === 1); } + get onMouseDown() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'mousedown'), e => this.toMouseEvent(e)); } + get onContextMenu() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'contextmenu'), e => this.toMouseEvent(e)); } + get onTouchStart() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.domNode, 'touchstart'), e => this.toTouchEvent(e)); } + get onTap() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_5__["domEvent"])(this.rowsContainer, _touch_js__WEBPACK_IMPORTED_MODULE_2__["EventType"].Tap), e => this.toGestureEvent(e)); } + toMouseEvent(browserEvent) { + const index = this.getItemIndexFromEventTarget(browserEvent.target || null); + const item = typeof index === 'undefined' ? undefined : this.items[index]; + const element = item && item.element; + return { browserEvent, index, element }; } - if (selections.length === 1) { - if (charactersSelected) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].singleSelectionRange, selections[0].positionLineNumber, selections[0].positionColumn, charactersSelected); - } - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].singleSelection, selections[0].positionLineNumber, selections[0].positionColumn); + toTouchEvent(browserEvent) { + const index = this.getItemIndexFromEventTarget(browserEvent.target || null); + const item = typeof index === 'undefined' ? undefined : this.items[index]; + const element = item && item.element; + return { browserEvent, index, element }; } - if (charactersSelected) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].multiSelectionRange, selections.length, charactersSelected); + toGestureEvent(browserEvent) { + const index = this.getItemIndexFromEventTarget(browserEvent.initialTarget || null); + const item = typeof index === 'undefined' ? undefined : this.items[index]; + const element = item && item.element; + return { browserEvent, index, element }; } - if (selections.length > 0) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].multiSelection, selections.length); + toDragEvent(browserEvent) { + const index = this.getItemIndexFromEventTarget(browserEvent.target || null); + const item = typeof index === 'undefined' ? undefined : this.items[index]; + const element = item && item.element; + return { browserEvent, index, element }; } - return ''; -} -let AccessibilityHelpWidget = class AccessibilityHelpWidget extends _base_browser_ui_widget_js__WEBPACK_IMPORTED_MODULE_5__["Widget"] { - constructor(editor, _contextKeyService, _keybindingService, _openerService) { - super(); - this._contextKeyService = _contextKeyService; - this._keybindingService = _keybindingService; - this._openerService = _openerService; - this._editor = editor; - this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(this._contextKeyService); - this._domNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._domNode.setClassName('accessibilityHelpWidget'); - this._domNode.setDisplay('none'); - this._domNode.setAttribute('role', 'dialog'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._contentDomNode = Object(_base_browser_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); - this._contentDomNode.setAttribute('role', 'document'); - this._domNode.appendChild(this._contentDomNode); - this._isVisible = false; - this._register(this._editor.onDidLayoutChange(() => { - if (this._isVisible) { - this._layout(); - } - })); - // Intentionally not configurable! - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addStandardDisposableListener"](this._contentDomNode.domNode, 'keydown', (e) => { - if (!this._isVisible) { - return; - } - if (e.equals(2048 /* CtrlCmd */ | 35 /* KEY_E */)) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["alert"])(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].emergencyConfOn); - this._editor.updateOptions({ - accessibilitySupport: 'on' - }); - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["clearNode"](this._contentDomNode.domNode); - this._buildContent(); - this._contentDomNode.domNode.focus(); - e.preventDefault(); - e.stopPropagation(); - } - if (e.equals(2048 /* CtrlCmd */ | 38 /* KEY_H */)) { - Object(_base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_4__["alert"])(_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].openingDocs); - let url = this._editor.getRawOptions().accessibilityHelpUrl; - if (typeof url === 'undefined') { - url = 'https://go.microsoft.com/fwlink/?linkid=852450'; - } - this._openerService.open(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_9__["URI"].parse(url)); - e.preventDefault(); - e.stopPropagation(); + onScroll(e) { + try { + const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight); + this.render(previousRenderRange, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth); + if (this.supportDynamicHeights) { + this._rerender(e.scrollTop, e.height); } - })); - this.onblur(this._contentDomNode.domNode, () => { - this.hide(); - }); - this._editor.addOverlayWidget(this); - } - dispose() { - this._editor.removeOverlayWidget(this); - super.dispose(); - } - getId() { - return AccessibilityHelpWidget.ID; - } - getDomNode() { - return this._domNode.domNode; + } + catch (err) { + console.error('Got bad scroll event:', e); + throw err; + } } - getPosition() { - return { - preference: null - }; + onTouchChange(event) { + event.preventDefault(); + event.stopPropagation(); + this.scrollTop -= event.translationY; } - show() { - if (this._isVisible) { + // DND + onDragStart(element, uri, event) { + if (!event.dataTransfer) { return; } - this._isVisible = true; - this._isVisibleKey.set(true); - this._layout(); - this._domNode.setDisplay('block'); - this._domNode.setAttribute('aria-hidden', 'false'); - this._contentDomNode.domNode.tabIndex = 0; - this._buildContent(); - this._contentDomNode.domNode.focus(); - } - _descriptionForCommand(commandId, msg, noKbMsg) { - let kb = this._keybindingService.lookupKeybinding(commandId); - if (kb) { - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](msg, kb.getAriaLabel()); - } - return _base_common_strings_js__WEBPACK_IMPORTED_MODULE_8__["format"](noKbMsg, commandId); - } - _buildContent() { - const options = this._editor.getOptions(); - const selections = this._editor.getSelections(); - let charactersSelected = 0; - if (selections) { - const model = this._editor.getModel(); - if (model) { - selections.forEach((selection) => { - charactersSelected += model.getValueLengthInRange(selection); - }); + const elements = this.dnd.getDragElements(element); + event.dataTransfer.effectAllowed = 'copyMove'; + event.dataTransfer.setData(_dnd_js__WEBPACK_IMPORTED_MODULE_13__["DataTransfers"].RESOURCES, JSON.stringify([uri])); + if (event.dataTransfer.setDragImage) { + let label; + if (this.dnd.getDragLabel) { + label = this.dnd.getDragLabel(elements, event); } + if (typeof label === 'undefined') { + label = String(elements.length); + } + const dragImage = _dom_js__WEBPACK_IMPORTED_MODULE_3__["$"]('.monaco-drag-image'); + dragImage.textContent = label; + document.body.appendChild(dragImage); + event.dataTransfer.setDragImage(dragImage, -10, -10); + setTimeout(() => document.body.removeChild(dragImage), 0); + } + this.currentDragData = new ElementsDragAndDropData(elements); + _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = new ExternalElementsDragAndDropData(elements); + if (this.dnd.onDragStart) { + this.dnd.onDragStart(this.currentDragData, event); + } + } + onDragOver(event) { + event.browserEvent.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome) + this.onDragLeaveTimeout.dispose(); + if (_dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData && _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData.getData() === 'vscode-ui') { + return false; + } + this.setupDragAndDropScrollTopAnimation(event.browserEvent); + if (!event.browserEvent.dataTransfer) { + return false; } - let text = getSelectionLabel(selections, charactersSelected); - if (options.get(47 /* inDiffEditor */)) { - if (options.get(72 /* readOnly */)) { - text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].readonlyDiffEditor; + // Drag over from outside + if (!this.currentDragData) { + if (_dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData) { + // Drag over from another list + this.currentDragData = _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData; } else { - text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].editableDiffEditor; + // Drag over from the desktop + if (!event.browserEvent.dataTransfer.types) { + return false; + } + this.currentDragData = new NativeDragAndDropData(); } } + const result = this.dnd.onDragOver(this.currentDragData, event.element, event.index, event.browserEvent); + this.canDrop = typeof result === 'boolean' ? result : result.accept; + if (!this.canDrop) { + this.currentDragFeedback = undefined; + this.currentDragFeedbackDisposable.dispose(); + return false; + } + event.browserEvent.dataTransfer.dropEffect = (typeof result !== 'boolean' && result.effect === 0 /* Copy */) ? 'copy' : 'move'; + let feedback; + if (typeof result !== 'boolean' && result.feedback) { + feedback = result.feedback; + } else { - if (options.get(72 /* readOnly */)) { - text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].readonlyEditor; + if (typeof event.index === 'undefined') { + feedback = [-1]; } else { - text += _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].editableEditor; + feedback = [event.index]; } } - const turnOnMessage = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__["isMacintosh"] - ? _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].changeConfigToOnMac - : _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].changeConfigToOnWinLinux); - switch (options.get(2 /* accessibilitySupport */)) { - case 0 /* Unknown */: - text += '\n\n - ' + turnOnMessage; - break; - case 2 /* Enabled */: - text += '\n\n - ' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].auto_on; - break; - case 1 /* Disabled */: - text += '\n\n - ' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].auto_off; - text += ' ' + turnOnMessage; - break; + // sanitize feedback list + feedback = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_12__["distinct"])(feedback).filter(i => i >= -1 && i < this.length).sort((a, b) => a - b); + feedback = feedback[0] === -1 ? [-1] : feedback; + if (equalsDragFeedback(this.currentDragFeedback, feedback)) { + return true; } - if (options.get(116 /* tabFocusMode */)) { - text += '\n\n - ' + this._descriptionForCommand(_contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__["ToggleTabFocusModeAction"].ID, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].tabFocusModeOnMsg, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].tabFocusModeOnMsgNoKb); + this.currentDragFeedback = feedback; + this.currentDragFeedbackDisposable.dispose(); + if (feedback[0] === -1) { // entire list feedback + _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.domNode, 'drop-target'); + _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](this.rowsContainer, 'drop-target'); + this.currentDragFeedbackDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](this.domNode, 'drop-target'); + _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](this.rowsContainer, 'drop-target'); + }); } else { - text += '\n\n - ' + this._descriptionForCommand(_contrib_toggleTabFocusMode_toggleTabFocusMode_js__WEBPACK_IMPORTED_MODULE_12__["ToggleTabFocusModeAction"].ID, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].tabFocusModeOffMsg, _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].tabFocusModeOffMsgNoKb); - } - const openDocMessage = (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_7__["isMacintosh"] - ? _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].openDocMac - : _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].openDocWinLinux); - text += '\n\n - ' + openDocMessage; - text += '\n\n' + _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].outroMsg; - this._contentDomNode.domNode.appendChild(Object(_base_browser_formattedTextRenderer_js__WEBPACK_IMPORTED_MODULE_3__["renderFormattedText"])(text)); - // Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents - this._contentDomNode.domNode.setAttribute('aria-label', text); - } - hide() { - if (!this._isVisible) { - return; - } - this._isVisible = false; - this._isVisibleKey.reset(); - this._domNode.setDisplay('none'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._contentDomNode.domNode.tabIndex = -1; - _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["clearNode"](this._contentDomNode.domNode); - this._editor.focus(); - } - _layout() { - let editorLayout = this._editor.getLayoutInfo(); - let w = Math.max(5, Math.min(AccessibilityHelpWidget.WIDTH, editorLayout.width - 40)); - let h = Math.max(5, Math.min(AccessibilityHelpWidget.HEIGHT, editorLayout.height - 40)); - this._domNode.setWidth(w); - this._domNode.setHeight(h); - let top = Math.round((editorLayout.height - h) / 2); - this._domNode.setTop(top); - let left = Math.round((editorLayout.width - w) / 2); - this._domNode.setLeft(left); - } -}; -AccessibilityHelpWidget.ID = 'editor.contrib.accessibilityHelpWidget'; -AccessibilityHelpWidget.WIDTH = 500; -AccessibilityHelpWidget.HEIGHT = 300; -AccessibilityHelpWidget = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_13__["IContextKeyService"]), - __param(2, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__["IKeybindingService"]), - __param(3, _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_16__["IOpenerService"]) -], AccessibilityHelpWidget); -class ShowAccessibilityHelpAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.showAccessibilityHelp', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["AccessibilityHelpNLS"].showAccessibilityHelpAction, - alias: 'Show Accessibility Help', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].focus, - primary: 512 /* Alt */ | 59 /* F1 */, - weight: 100 /* EditorContrib */, - linux: { - primary: 512 /* Alt */ | 1024 /* Shift */ | 59 /* F1 */, - secondary: [512 /* Alt */ | 59 /* F1 */] + for (const index of feedback) { + const item = this.items[index]; + item.dropTarget = true; + if (item.row && item.row.domNode) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"](item.row.domNode, 'drop-target'); } } - }); - } - run(accessor, editor) { - let controller = AccessibilityHelpController.get(editor); - if (controller) { - controller.show(); + this.currentDragFeedbackDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { + for (const index of feedback) { + const item = this.items[index]; + item.dropTarget = false; + if (item.row && item.row.domNode) { + _dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"](item.row.domNode, 'drop-target'); + } + } + }); } + return true; } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__["registerEditorContribution"])(AccessibilityHelpController.ID, AccessibilityHelpController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__["registerEditorAction"])(ShowAccessibilityHelpAction); -const AccessibilityHelpCommand = _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__["EditorCommand"].bindToContribution(AccessibilityHelpController.get); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_10__["registerEditorCommand"])(new AccessibilityHelpCommand({ - id: 'closeAccessibilityHelp', - precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE, - handler: x => x.hide(), - kbOpts: { - weight: 100 /* EditorContrib */ + 100, - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_11__["EditorContextKeys"].focus, - primary: 9 /* Escape */, - secondary: [1024 /* Shift */ | 9 /* Escape */] - } -})); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_18__["registerThemingParticipant"])((theme, collector) => { - const widgetBackground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__["editorWidgetBackground"]); - if (widgetBackground) { - collector.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${widgetBackground}; }`); + onDragLeave() { + this.onDragLeaveTimeout.dispose(); + this.onDragLeaveTimeout = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => this.clearDragOverFeedback(), 100); } - const widgetForeground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__["editorWidgetForeground"]); - if (widgetForeground) { - collector.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${widgetForeground}; }`); + onDrop(event) { + if (!this.canDrop) { + return; + } + const dragData = this.currentDragData; + this.teardownDragAndDropScrollTopAnimation(); + this.clearDragOverFeedback(); + this.currentDragData = undefined; + _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = undefined; + if (!dragData || !event.browserEvent.dataTransfer) { + return; + } + event.browserEvent.preventDefault(); + dragData.update(event.browserEvent.dataTransfer); + this.dnd.drop(dragData, event.element, event.index, event.browserEvent); } - const widgetShadowColor = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__["widgetShadow"]); - if (widgetShadowColor) { - collector.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + onDragEnd(event) { + this.canDrop = false; + this.teardownDragAndDropScrollTopAnimation(); + this.clearDragOverFeedback(); + this.currentDragData = undefined; + _dnd_js__WEBPACK_IMPORTED_MODULE_13__["StaticDND"].CurrentDragAndDropData = undefined; + if (this.dnd.onDragEnd) { + this.dnd.onDragEnd(event); + } } - const hcBorder = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_17__["contrastBorder"]); - if (hcBorder) { - collector.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`); + clearDragOverFeedback() { + this.currentDragFeedback = undefined; + this.currentDragFeedbackDisposable.dispose(); + this.currentDragFeedbackDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js ***! - \**********************************************************************************/ -/*! exports provided: Colorizer */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Colorizer", function() { return Colorizer; }); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/core/lineTokens.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/viewLayout/viewLineRenderer.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js"); -/* harmony import */ var _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/viewModel/viewModel.js */ "./node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModel.js"); -/* harmony import */ var _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/monarch/monarchLexer.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -class Colorizer { - static colorizeElement(themeService, modeService, domNode, options) { - options = options || {}; - let theme = options.theme || 'vs'; - let mimeType = options.mimeType || domNode.getAttribute('lang') || domNode.getAttribute('data-lang'); - if (!mimeType) { - console.error('Mode not detected'); - return Promise.resolve(); - } - themeService.setTheme(theme); - let text = domNode.firstChild ? domNode.firstChild.nodeValue : ''; - domNode.className += ' ' + theme; - let render = (str) => { - domNode.innerHTML = str; - }; - return this.colorize(modeService, text || '', mimeType, options).then(render, (err) => console.error(err)); - } - static colorize(modeService, text, mimeType, options) { - let tabSize = 4; - if (options && typeof options.tabSize === 'number') { - tabSize = options.tabSize; - } - if (_base_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["startsWithUTF8BOM"](text)) { - text = text.substr(1); - } - let lines = text.split(/\r\n|\r|\n/); - let language = modeService.getModeId(mimeType); - if (!language) { - return Promise.resolve(_fakeColorize(lines, tabSize)); - } - // Send out the event to create the mode - modeService.triggerMode(language); - const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistry"].get(language); - if (tokenizationSupport) { - return _colorize(lines, tabSize, tokenizationSupport); - } - const tokenizationSupportPromise = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistry"].getPromise(language); - if (tokenizationSupportPromise) { - // A tokenizer will be registered soon - return new Promise((resolve, reject) => { - tokenizationSupportPromise.then(tokenizationSupport => { - _colorize(lines, tabSize, tokenizationSupport).then(resolve, reject); - }, reject); - }); + // DND scroll top animation + setupDragAndDropScrollTopAnimation(event) { + if (!this.dragOverAnimationDisposable) { + const viewTop = _dom_js__WEBPACK_IMPORTED_MODULE_3__["getTopLeftOffset"](this.domNode).top; + this.dragOverAnimationDisposable = _dom_js__WEBPACK_IMPORTED_MODULE_3__["animate"](this.animateDragAndDropScrollTop.bind(this, viewTop)); } - return new Promise((resolve, reject) => { - let listener = null; - let timeout = null; - const execute = () => { - if (listener) { - listener.dispose(); - listener = null; - } - if (timeout) { - timeout.dispose(); - timeout = null; - } - const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistry"].get(language); - if (tokenizationSupport) { - _colorize(lines, tabSize, tokenizationSupport).then(resolve, reject); - return; - } - resolve(_fakeColorize(lines, tabSize)); - }; - // wait 500ms for mode to load, then give up - timeout = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"](); - timeout.cancelAndSet(execute, 500); - listener = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistry"].onDidChange((e) => { - if (e.changedLanguages.indexOf(language) >= 0) { - execute(); - } - }); - }); - } - static colorizeLine(line, mightContainNonBasicASCII, mightContainRTL, tokens, tabSize = 4) { - const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].isBasicASCII(line, mightContainNonBasicASCII); - const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].containsRTL(line, isBasicASCII, mightContainRTL); - let renderResult = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["renderViewLine2"])(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["RenderLineInput"](false, true, line, false, isBasicASCII, containsRTL, 0, tokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null)); - return renderResult.html; - } - static colorizeModelLine(model, lineNumber, tabSize = 4) { - let content = model.getLineContent(lineNumber); - model.forceTokenization(lineNumber); - let tokens = model.getLineTokens(lineNumber); - let inflatedTokens = tokens.inflate(); - return this.colorizeLine(content, model.mightContainNonBasicASCII(), model.mightContainRTL(), inflatedTokens, tabSize); - } -} -function _colorize(lines, tabSize, tokenizationSupport) { - return new Promise((c, e) => { - const execute = () => { - const result = _actualColorize(lines, tabSize, tokenizationSupport); - if (tokenizationSupport instanceof _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_6__["MonarchTokenizer"]) { - const status = tokenizationSupport.getLoadStatus(); - if (status.loaded === false) { - status.promise.then(execute, e); - return; - } + this.dragOverAnimationStopDisposable.dispose(); + this.dragOverAnimationStopDisposable = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => { + if (this.dragOverAnimationDisposable) { + this.dragOverAnimationDisposable.dispose(); + this.dragOverAnimationDisposable = undefined; } - c(result); - }; - execute(); - }); -} -function _fakeColorize(lines, tabSize) { - let html = []; - const defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */) - | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) - | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; - const tokens = new Uint32Array(2); - tokens[0] = 0; - tokens[1] = defaultMetadata; - for (let i = 0, length = lines.length; i < length; i++) { - let line = lines[i]; - tokens[0] = line.length; - const lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__["LineTokens"](tokens, line); - const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].isBasicASCII(line, /* check for basic ASCII */ true); - const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].containsRTL(line, isBasicASCII, /* check for RTL */ true); - let renderResult = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["renderViewLine2"])(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["RenderLineInput"](false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null)); - html = html.concat(renderResult.html); - html.push('
    '); - } - return html.join(''); -} -function _actualColorize(lines, tabSize, tokenizationSupport) { - let html = []; - let state = tokenizationSupport.getInitialState(); - for (let i = 0, length = lines.length; i < length; i++) { - let line = lines[i]; - let tokenizeResult = tokenizationSupport.tokenize2(line, state, 0); - _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__["LineTokens"].convertToEndOffset(tokenizeResult.tokens, line.length); - let lineTokens = new _common_core_lineTokens_js__WEBPACK_IMPORTED_MODULE_2__["LineTokens"](tokenizeResult.tokens, line); - const isBasicASCII = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].isBasicASCII(line, /* check for basic ASCII */ true); - const containsRTL = _common_viewModel_viewModel_js__WEBPACK_IMPORTED_MODULE_5__["ViewLineRenderingData"].containsRTL(line, isBasicASCII, /* check for RTL */ true); - let renderResult = Object(_common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["renderViewLine2"])(new _common_viewLayout_viewLineRenderer_js__WEBPACK_IMPORTED_MODULE_4__["RenderLineInput"](false, true, line, false, isBasicASCII, containsRTL, 0, lineTokens.inflate(), [], tabSize, 0, 0, 0, 0, -1, 'none', false, false, null)); - html = html.concat(renderResult.html); - html.push('
    '); - state = tokenizeResult.endState; - } - return html.join(''); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css": -/*!***********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***! - \***********************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./iPadShowKeyboard.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js": -/*!**********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js ***! - \**********************************************************************************************************/ -/*! exports provided: IPadShowKeyboard */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IPadShowKeyboard", function() { return IPadShowKeyboard; }); -/* harmony import */ var _iPadShowKeyboard_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iPadShowKeyboard.css */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css"); -/* harmony import */ var _base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - -class IPadShowKeyboard extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor) { - super(); - this.editor = editor; - this.widget = null; - if (_base_browser_browser_js__WEBPACK_IMPORTED_MODULE_1__["isIPad"]) { - this._register(editor.onDidChangeConfiguration(() => this.update())); - this.update(); - } + }, 1000); + this.dragOverMouseY = event.pageY; } - update() { - const shouldHaveWidget = (!this.editor.getOption(72 /* readOnly */)); - if (!this.widget && shouldHaveWidget) { - this.widget = new ShowKeyboardWidget(this.editor); + animateDragAndDropScrollTop(viewTop) { + if (this.dragOverMouseY === undefined) { + return; } - else if (this.widget && !shouldHaveWidget) { - this.widget.dispose(); - this.widget = null; + const diff = this.dragOverMouseY - viewTop; + const upperLimit = this.renderHeight - 35; + if (diff < 35) { + this.scrollTop += Math.max(-14, Math.floor(0.3 * (diff - 35))); } - } - dispose() { - super.dispose(); - if (this.widget) { - this.widget.dispose(); - this.widget = null; + else if (diff > upperLimit) { + this.scrollTop += Math.min(14, Math.floor(0.3 * (diff - upperLimit))); } } -} -IPadShowKeyboard.ID = 'editor.contrib.iPadShowKeyboard'; -class ShowKeyboardWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor) { - super(); - this.editor = editor; - this._domNode = document.createElement('textarea'); - this._domNode.className = 'iPadShowKeyboard'; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](this._domNode, 'touchstart', (e) => { - this.editor.focus(); - })); - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_2__["addDisposableListener"](this._domNode, 'focus', (e) => { - this.editor.focus(); - })); - this.editor.addOverlayWidget(this); - } - dispose() { - this.editor.removeOverlayWidget(this); - super.dispose(); - } - // ----- IOverlayWidget API - getId() { - return ShowKeyboardWidget.ID; + teardownDragAndDropScrollTopAnimation() { + this.dragOverAnimationStopDisposable.dispose(); + if (this.dragOverAnimationDisposable) { + this.dragOverAnimationDisposable.dispose(); + this.dragOverAnimationDisposable = undefined; + } } - getDomNode() { - return this._domNode; + // Util + getItemIndexFromEventTarget(target) { + const scrollableElement = this.scrollableElement.getDomNode(); + let element = target; + while (element instanceof HTMLElement && element !== this.rowsContainer && scrollableElement.contains(element)) { + const rawIndex = element.getAttribute('data-index'); + if (rawIndex) { + const index = Number(rawIndex); + if (!isNaN(index)) { + return index; + } + } + element = element.parentElement; + } + return undefined; } - getPosition() { + getRenderRange(renderTop, renderHeight) { return { - preference: 1 /* BOTTOM_RIGHT_CORNER */ + start: this.rangeMap.indexAt(renderTop), + end: this.rangeMap.indexAfter(renderTop + renderHeight - 1) }; } -} -ShowKeyboardWidget.ID = 'editor.contrib.ShowKeyboardWidget'; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(IPadShowKeyboard.ID, IPadShowKeyboard); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css": -/*!*****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css ***! - \*****************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./inspectTokens.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_inspectTokens_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js": -/*!****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js ***! - \****************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _inspectTokens_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inspectTokens.css */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/standaloneThemeService.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - -let InspectTokensController = class InspectTokensController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor, standaloneColorService, modeService) { - super(); - this._editor = editor; - this._modeService = modeService; - this._widget = null; - this._register(this._editor.onDidChangeModel((e) => this.stop())); - this._register(this._editor.onDidChangeModelLanguage((e) => this.stop())); - this._register(_common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenizationRegistry"].onDidChange((e) => this.stop())); - this._register(this._editor.onKeyUp((e) => e.keyCode === 9 /* Escape */ && this.stop())); - } - static get(editor) { - return editor.getContribution(InspectTokensController.ID); - } - dispose() { - this.stop(); - super.dispose(); - } - launch() { - if (this._widget) { - return; + /** + * Given a stable rendered state, checks every rendered element whether it needs + * to be probed for dynamic height. Adjusts scroll height and top if necessary. + */ + _rerender(renderTop, renderHeight) { + const previousRenderRange = this.getRenderRange(renderTop, renderHeight); + // Let's remember the second element's position, this helps in scrolling up + // and preserving a linear upwards scroll movement + let anchorElementIndex; + let anchorElementTopDelta; + if (renderTop === this.elementTop(previousRenderRange.start)) { + anchorElementIndex = previousRenderRange.start; + anchorElementTopDelta = 0; } - if (!this._editor.hasModel()) { - return; + else if (previousRenderRange.end - previousRenderRange.start > 1) { + anchorElementIndex = previousRenderRange.start + 1; + anchorElementTopDelta = this.elementTop(anchorElementIndex) - renderTop; } - this._widget = new InspectTokensWidget(this._editor, this._modeService); - } - stop() { - if (this._widget) { - this._widget.dispose(); - this._widget = null; + let heightDiff = 0; + while (true) { + const renderRange = this.getRenderRange(renderTop, renderHeight); + let didChange = false; + for (let i = renderRange.start; i < renderRange.end; i++) { + const diff = this.probeDynamicHeight(i); + if (diff !== 0) { + this.rangeMap.splice(i, 1, [this.items[i]]); + } + heightDiff += diff; + didChange = didChange || diff !== 0; + } + if (!didChange) { + if (heightDiff !== 0) { + this.eventuallyUpdateScrollDimensions(); + } + const unrenderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(previousRenderRange, renderRange); + for (const range of unrenderRanges) { + for (let i = range.start; i < range.end; i++) { + if (this.items[i].row) { + this.removeItemFromDOM(i); + } + } + } + const renderRanges = _common_range_js__WEBPACK_IMPORTED_MODULE_11__["Range"].relativeComplement(renderRange, previousRenderRange); + for (const range of renderRanges) { + for (let i = range.start; i < range.end; i++) { + const afterIndex = i + 1; + const beforeRow = afterIndex < this.items.length ? this.items[afterIndex].row : null; + const beforeElement = beforeRow ? beforeRow.domNode : null; + this.insertItemInDOM(i, beforeElement); + } + } + for (let i = renderRange.start; i < renderRange.end; i++) { + if (this.items[i].row) { + this.updateItemInDOM(this.items[i], i); + } + } + if (typeof anchorElementIndex === 'number') { + this.scrollTop = this.elementTop(anchorElementIndex) - anchorElementTopDelta; + } + this._onDidChangeContentHeight.fire(this.contentHeight); + return; + } } } -}; -InspectTokensController.ID = 'editor.contrib.inspectTokens'; -InspectTokensController = __decorate([ - __param(1, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__["IStandaloneThemeService"]), - __param(2, _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_7__["IModeService"]) -], InspectTokensController); -class InspectTokens extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.inspectTokens', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_11__["InspectTokensNLS"].inspectTokensAction, - alias: 'Developer: Inspect Tokens', - precondition: undefined - }); - } - run(accessor, editor) { - let controller = InspectTokensController.get(editor); - if (controller) { - controller.launch(); + probeDynamicHeight(index) { + const item = this.items[index]; + if (!item.hasDynamicHeight || item.lastDynamicHeightWidth === this.renderWidth) { + return 0; } - } -} -function renderTokenText(tokenText) { - let result = ''; - for (let charIndex = 0, len = tokenText.length; charIndex < len; charIndex++) { - let charCode = tokenText.charCodeAt(charIndex); - switch (charCode) { - case 9 /* Tab */: - result += '\u2192'; // → - break; - case 32 /* Space */: - result += '\u00B7'; // · - break; - default: - result += String.fromCharCode(charCode); + if (!!this.virtualDelegate.hasDynamicHeight && !this.virtualDelegate.hasDynamicHeight(item.element)) { + return 0; } - } - return result; -} -function getSafeTokenizationSupport(languageIdentifier) { - let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenizationRegistry"].get(languageIdentifier.language); - if (tokenizationSupport) { - return tokenizationSupport; - } - return { - getInitialState: () => _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__["NULL_STATE"], - tokenize: (line, state, deltaOffset) => Object(_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__["nullTokenize"])(languageIdentifier.language, line, state, deltaOffset), - tokenize2: (line, state, deltaOffset) => Object(_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_6__["nullTokenize2"])(languageIdentifier.id, line, state, deltaOffset) - }; -} -class InspectTokensWidget extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["Disposable"] { - constructor(editor, modeService) { - super(); - // Editor.IContentWidget.allowEditorOverflow - this.allowEditorOverflow = true; - this._editor = editor; - this._modeService = modeService; - this._model = this._editor.getModel(); - this._domNode = document.createElement('div'); - this._domNode.className = 'tokens-inspect-widget'; - this._tokenizationSupport = getSafeTokenizationSupport(this._model.getLanguageIdentifier()); - this._compute(this._editor.getPosition()); - this._register(this._editor.onDidChangeCursorPosition((e) => this._compute(this._editor.getPosition()))); - this._editor.addContentWidget(this); - } - dispose() { - this._editor.removeContentWidget(this); - super.dispose(); - } - getId() { - return InspectTokensWidget._ID; - } - _compute(position) { - let data = this._getTokensAtLine(position.lineNumber); - let token1Index = 0; - for (let i = data.tokens1.length - 1; i >= 0; i--) { - let t = data.tokens1[i]; - if (position.column - 1 >= t.offset) { - token1Index = i; - break; - } + const size = item.size; + if (!this.setRowHeight && item.row && item.row.domNode) { + let newSize = item.row.domNode.offsetHeight; + item.size = newSize; + item.lastDynamicHeightWidth = this.renderWidth; + return newSize - size; } - let token2Index = 0; - for (let i = (data.tokens2.length >>> 1); i >= 0; i--) { - if (position.column - 1 >= data.tokens2[(i << 1)]) { - token2Index = i; - break; + const row = this.cache.alloc(item.templateId); + row.domNode.style.height = ''; + this.rowsContainer.appendChild(row.domNode); + const renderer = this.renderers.get(item.templateId); + if (renderer) { + renderer.renderElement(item.element, index, row.templateData, undefined); + if (renderer.disposeElement) { + renderer.disposeElement(item.element, index, row.templateData, undefined); } } - let lineContent = this._model.getLineContent(position.lineNumber); - let tokenText = ''; - if (token1Index < data.tokens1.length) { - let tokenStartIndex = data.tokens1[token1Index].offset; - let tokenEndIndex = token1Index + 1 < data.tokens1.length ? data.tokens1[token1Index + 1].offset : lineContent.length; - tokenText = lineContent.substring(tokenStartIndex, tokenEndIndex); - } - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["reset"])(this._domNode, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('h2.tm-token', undefined, renderTokenText(tokenText), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('span.tm-token-length', undefined, `${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'}`))); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(this._domNode, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('hr.tokens-inspect-separator', { 'style': 'clear:both' })); - const metadata = (token2Index << 1) + 1 < data.tokens2.length ? this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]) : null; - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(this._domNode, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('table.tm-metadata-table', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tbody', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tr', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-key', undefined, 'language'), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-value', undefined, `${metadata ? metadata.languageIdentifier.language : '-?-'}`)), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tr', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-key', undefined, 'token type'), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-value', undefined, `${metadata ? this._tokenTypeToString(metadata.tokenType) : '-?-'}`)), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tr', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-key', undefined, 'font style'), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-value', undefined, `${metadata ? this._fontStyleToString(metadata.fontStyle) : '-?-'}`)), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tr', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-key', undefined, 'foreground'), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-value', undefined, `${metadata ? _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].Format.CSS.formatHex(metadata.foreground) : '-?-'}`)), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('tr', undefined, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-key', undefined, 'background'), Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('td.tm-metadata-value', undefined, `${metadata ? _base_common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].Format.CSS.formatHex(metadata.background) : '-?-'}`))))); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(this._domNode, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('hr.tokens-inspect-separator')); - if (token1Index < data.tokens1.length) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["append"])(this._domNode, Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["$"])('span.tm-token-type', undefined, data.tokens1[token1Index].type)); - } - this._editor.layoutContentWidget(this); - } - _decodeMetadata(metadata) { - let colorMap = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenizationRegistry"].getColorMap(); - let languageId = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenMetadata"].getLanguageId(metadata); - let tokenType = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenMetadata"].getTokenType(metadata); - let fontStyle = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenMetadata"].getFontStyle(metadata); - let foreground = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenMetadata"].getForeground(metadata); - let background = _common_modes_js__WEBPACK_IMPORTED_MODULE_5__["TokenMetadata"].getBackground(metadata); - return { - languageIdentifier: this._modeService.getLanguageIdentifier(languageId), - tokenType: tokenType, - fontStyle: fontStyle, - foreground: colorMap[foreground], - background: colorMap[background] - }; - } - _tokenTypeToString(tokenType) { - switch (tokenType) { - case 0 /* Other */: return 'Other'; - case 1 /* Comment */: return 'Comment'; - case 2 /* String */: return 'String'; - case 4 /* RegEx */: return 'RegEx'; - default: return '??'; + item.size = row.domNode.offsetHeight; + if (this.virtualDelegate.setDynamicHeight) { + this.virtualDelegate.setDynamicHeight(item.element, item.size); } + item.lastDynamicHeightWidth = this.renderWidth; + this.rowsContainer.removeChild(row.domNode); + this.cache.release(row); + return item.size - size; } - _fontStyleToString(fontStyle) { - let r = ''; - if (fontStyle & 1 /* Italic */) { - r += 'italic '; - } - if (fontStyle & 2 /* Bold */) { - r += 'bold '; + getNextToLastElement(ranges) { + const lastRange = ranges[ranges.length - 1]; + if (!lastRange) { + return null; } - if (fontStyle & 4 /* Underline */) { - r += 'underline '; + const nextToLastItem = this.items[lastRange.end]; + if (!nextToLastItem) { + return null; } - if (r.length === 0) { - r = '---'; + if (!nextToLastItem.row) { + return null; } - return r; + return nextToLastItem.row.domNode; } - _getTokensAtLine(lineNumber) { - let stateBeforeLine = this._getStateBeforeLine(lineNumber); - let tokenizationResult1 = this._tokenizationSupport.tokenize(this._model.getLineContent(lineNumber), stateBeforeLine, 0); - let tokenizationResult2 = this._tokenizationSupport.tokenize2(this._model.getLineContent(lineNumber), stateBeforeLine, 0); - return { - startState: stateBeforeLine, - tokens1: tokenizationResult1.tokens, - tokens2: tokenizationResult2.tokens, - endState: tokenizationResult1.endState - }; + getElementDomId(index) { + return `${this.domId}_${index}`; } - _getStateBeforeLine(lineNumber) { - let state = this._tokenizationSupport.getInitialState(); - for (let i = 1; i < lineNumber; i++) { - let tokenizationResult = this._tokenizationSupport.tokenize(this._model.getLineContent(i), state, 0); - state = tokenizationResult.endState; + // Dispose + dispose() { + if (this.items) { + for (const item of this.items) { + if (item.row) { + const renderer = this.renderers.get(item.row.templateId); + if (renderer) { + renderer.disposeTemplate(item.row.templateData); + } + } + } + this.items = []; } - return state; - } - getDomNode() { - return this._domNode; - } - getPosition() { - return { - position: this._editor.getPosition(), - preference: [2 /* BELOW */, 1 /* ABOVE */] - }; + if (this.domNode && this.domNode.parentNode) { + this.domNode.parentNode.removeChild(this.domNode); + } + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); } } -InspectTokensWidget._ID = 'editor.contrib.inspectTokensWidget'; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorContribution"])(InspectTokensController.ID, InspectTokensController); -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_4__["registerEditorAction"])(InspectTokens); -Object(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__["registerThemingParticipant"])((theme, collector) => { - const border = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorHoverBorder"]); - if (border) { - let borderWidth = theme.type === _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_10__["HIGH_CONTRAST"] ? 2 : 1; - collector.addRule(`.monaco-editor .tokens-inspect-widget { border: ${borderWidth}px solid ${border}; }`); - collector.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${border}; }`); - } - const background = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorHoverBackground"]); - if (background) { - collector.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${background}; }`); - } - const foreground = theme.getColor(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_9__["editorHoverForeground"]); - if (foreground) { - collector.addRule(`.monaco-editor .tokens-inspect-widget { color: ${foreground}; }`); - } -}); +ListView.InstanceCount = 0; +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onMouseClick", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onMouseDblClick", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onMouseMiddleClick", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onMouseDown", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onContextMenu", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onTouchStart", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_10__["memoize"] +], ListView.prototype, "onTap", null); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js": -/*!******************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js ***! - \******************************************************************************************************************/ -/*! exports provided: StandaloneCommandsQuickAccessProvider, GotoLineAction */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js": +/*!******************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js ***! + \******************************************************************************/ +/*! exports provided: isInputElement, isMonacoEditor, DefaultKeyboardNavigationDelegate, isSelectionSingleChangeEvent, isSelectionRangeChangeEvent, MouseController, DefaultStyleController, List */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneCommandsQuickAccessProvider", function() { return StandaloneCommandsQuickAccessProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GotoLineAction", function() { return GotoLineAction; }); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _contrib_quickAccess_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../contrib/quickAccess/commandsQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/commandsQuickAccess.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInputElement", function() { return isInputElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMonacoEditor", function() { return isMonacoEditor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultKeyboardNavigationDelegate", function() { return DefaultKeyboardNavigationDelegate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectionSingleChangeEvent", function() { return isSelectionSingleChangeEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectionRangeChangeEvent", function() { return isSelectionRangeChangeEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseController", function() { return MouseController; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultStyleController", function() { return DefaultStyleController; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return List; }); +/* harmony import */ var _list_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/decorators.js */ "./node_modules/monaco-editor/esm/vs/base/common/decorators.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); +/* harmony import */ var _list_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./list.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.js"); +/* harmony import */ var _listView_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _splice_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./splice.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js"); +/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); +/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); +/* harmony import */ var _aria_aria_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -225685,119 +76405,15 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - -let StandaloneCommandsQuickAccessProvider = class StandaloneCommandsQuickAccessProvider extends _contrib_quickAccess_commandsQuickAccess_js__WEBPACK_IMPORTED_MODULE_4__["AbstractEditorCommandsQuickAccessProvider"] { - constructor(instantiationService, codeEditorService, keybindingService, commandService, telemetryService, notificationService) { - super({ showAlias: false }, instantiationService, keybindingService, commandService, telemetryService, notificationService); - this.codeEditorService = codeEditorService; - } - get activeTextEditorControl() { return Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_5__["withNullAsUndefined"])(this.codeEditorService.getFocusedCodeEditor()); } - getCommandPicks() { - return __awaiter(this, void 0, void 0, function* () { - return this.getCodeEditorCommandPicks(); - }); - } -}; -StandaloneCommandsQuickAccessProvider = __decorate([ - __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_6__["IInstantiationService"]), - __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]), - __param(2, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_7__["IKeybindingService"]), - __param(3, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_8__["ICommandService"]), - __param(4, _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_9__["ITelemetryService"]), - __param(5, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_10__["INotificationService"]) -], StandaloneCommandsQuickAccessProvider); - -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__["Extensions"].Quickaccess).registerQuickAccessProvider({ - ctor: StandaloneCommandsQuickAccessProvider, - prefix: StandaloneCommandsQuickAccessProvider.PREFIX, - helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__["QuickCommandNLS"].quickCommandHelp, needsEditor: true }] -}); -class GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.quickCommand', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__["QuickCommandNLS"].quickCommandActionLabel, - alias: 'Command Palette', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_12__["EditorContextKeys"].focus, - primary: 59 /* F1 */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: 'z_commands', - order: 1 - } - }); - } - run(accessor) { - accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_13__["IQuickInputService"]).quickAccess.show(StandaloneCommandsQuickAccessProvider.PREFIX); - } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_11__["registerEditorAction"])(GotoLineAction); - -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js": -/*!******************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js ***! - \******************************************************************************************************************/ -/*! exports provided: StandaloneGotoLineQuickAccessProvider, GotoLineAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneGotoLineQuickAccessProvider", function() { return StandaloneGotoLineQuickAccessProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GotoLineAction", function() { return GotoLineAction; }); -/* harmony import */ var _contrib_quickAccess_gotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../contrib/quickAccess/gotoLineQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoLineQuickAccess.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; @@ -225808,7385 +76424,3214 @@ var __param = (undefined && undefined.__param) || function (paramIndex, decorato -let StandaloneGotoLineQuickAccessProvider = class StandaloneGotoLineQuickAccessProvider extends _contrib_quickAccess_gotoLineQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoLineQuickAccessProvider"] { - constructor(editorService) { - super(); - this.editorService = editorService; - this.onDidActiveTextEditorControlChange = _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Event"].None; - } - get activeTextEditorControl() { - return Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__["withNullAsUndefined"])(this.editorService.getFocusedCodeEditor()); +class TraitRenderer { + constructor(trait) { + this.trait = trait; + this.renderedElements = []; } -}; -StandaloneGotoLineQuickAccessProvider = __decorate([ - __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]) -], StandaloneGotoLineQuickAccessProvider); - -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["Registry"].as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__["Extensions"].Quickaccess).registerQuickAccessProvider({ - ctor: StandaloneGotoLineQuickAccessProvider, - prefix: StandaloneGotoLineQuickAccessProvider.PREFIX, - helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__["GoToLineNLS"].gotoLineActionLabel, needsEditor: true }] -}); -class GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.gotoLine', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__["GoToLineNLS"].gotoLineActionLabel, - alias: 'Go to Line/Column...', - precondition: undefined, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */, - mac: { primary: 256 /* WinCtrl */ | 37 /* KEY_G */ }, - weight: 100 /* EditorContrib */ - } - }); + get templateId() { + return `template:${this.trait.trait}`; } - run(accessor) { - accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__["IQuickInputService"]).quickAccess.show(StandaloneGotoLineQuickAccessProvider.PREFIX); + renderTemplate(container) { + return container; } -} -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(GotoLineAction); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js ***! - \********************************************************************************************************************/ -/*! exports provided: StandaloneGotoSymbolQuickAccessProvider, GotoLineAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneGotoSymbolQuickAccessProvider", function() { return StandaloneGotoSymbolQuickAccessProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GotoLineAction", function() { return GotoLineAction; }); -/* harmony import */ var _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../contrib/quickAccess/gotoSymbolQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/editorContextKeys.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - -let StandaloneGotoSymbolQuickAccessProvider = class StandaloneGotoSymbolQuickAccessProvider extends _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoSymbolQuickAccessProvider"] { - constructor(editorService) { - super(); - this.editorService = editorService; - this.onDidActiveTextEditorControlChange = _base_common_event_js__WEBPACK_IMPORTED_MODULE_6__["Event"].None; + renderElement(element, index, templateData) { + const renderedElementIndex = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["firstIndex"])(this.renderedElements, el => el.templateData === templateData); + if (renderedElementIndex >= 0) { + const rendered = this.renderedElements[renderedElementIndex]; + this.trait.unrender(templateData); + rendered.index = index; + } + else { + const rendered = { index, templateData }; + this.renderedElements.push(rendered); + } + this.trait.renderIndex(index, templateData); } - get activeTextEditorControl() { - return Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__["withNullAsUndefined"])(this.editorService.getFocusedCodeEditor()); + splice(start, deleteCount, insertCount) { + const rendered = []; + for (const renderedElement of this.renderedElements) { + if (renderedElement.index < start) { + rendered.push(renderedElement); + } + else if (renderedElement.index >= start + deleteCount) { + rendered.push({ + index: renderedElement.index + insertCount - deleteCount, + templateData: renderedElement.templateData + }); + } + } + this.renderedElements = rendered; } -}; -StandaloneGotoSymbolQuickAccessProvider = __decorate([ - __param(0, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_3__["ICodeEditorService"]) -], StandaloneGotoSymbolQuickAccessProvider); - -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["Registry"].as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__["Extensions"].Quickaccess).registerQuickAccessProvider({ - ctor: StandaloneGotoSymbolQuickAccessProvider, - prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoSymbolQuickAccessProvider"].PREFIX, - helpEntries: [ - { description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__["QuickOutlineNLS"].quickOutlineActionLabel, prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoSymbolQuickAccessProvider"].PREFIX, needsEditor: true }, - { description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__["QuickOutlineNLS"].quickOutlineByCategoryActionLabel, prefix: _contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoSymbolQuickAccessProvider"].PREFIX_BY_CATEGORY, needsEditor: true } - ] -}); -class GotoLineAction extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.quickOutline', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_5__["QuickOutlineNLS"].quickOutlineActionLabel, - alias: 'Go to Symbol...', - precondition: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].hasDocumentSymbolProvider, - kbOpts: { - kbExpr: _common_editorContextKeys_js__WEBPACK_IMPORTED_MODULE_8__["EditorContextKeys"].focus, - primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 45 /* KEY_O */, - weight: 100 /* EditorContrib */ - }, - contextMenuOpts: { - group: 'navigation', - order: 3 + renderIndexes(indexes) { + for (const { index, templateData } of this.renderedElements) { + if (indexes.indexOf(index) > -1) { + this.trait.renderIndex(index, templateData); } - }); + } } - run(accessor) { - accessor.get(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_9__["IQuickInputService"]).quickAccess.show(_contrib_quickAccess_gotoSymbolQuickAccess_js__WEBPACK_IMPORTED_MODULE_0__["AbstractGotoSymbolQuickAccessProvider"].PREFIX); + disposeTemplate(templateData) { + const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["firstIndex"])(this.renderedElements, el => el.templateData === templateData); + if (index < 0) { + return; + } + this.renderedElements.splice(index, 1); } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_7__["registerEditorAction"])(GotoLineAction); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js": -/*!**************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js ***! - \**************************************************************************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../platform/quickinput/common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _platform_quickinput_browser_helpQuickAccess_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/quickinput/browser/helpQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -_platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].as(_platform_quickinput_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__["Extensions"].Quickaccess).registerQuickAccessProvider({ - ctor: _platform_quickinput_browser_helpQuickAccess_js__WEBPACK_IMPORTED_MODULE_3__["HelpQuickAccessProvider"], - prefix: '', - helpEntries: [{ description: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__["QuickHelpNLS"].helpQuickAccessActionLabel, needsEditor: true }] -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css": -/*!*********************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css ***! - \*********************************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./standaloneQuickInput.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js": -/*!*******************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js ***! - \*******************************************************************************************************************/ -/*! exports provided: EditorScopedQuickInputServiceImpl, StandaloneQuickInputServiceImpl, QuickInputEditorContribution, QuickInputEditorWidget */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorScopedQuickInputServiceImpl", function() { return EditorScopedQuickInputServiceImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneQuickInputServiceImpl", function() { return StandaloneQuickInputServiceImpl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputEditorContribution", function() { return QuickInputEditorContribution; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputEditorWidget", function() { return QuickInputEditorWidget; }); -/* harmony import */ var _standaloneQuickInput_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./standaloneQuickInput.css */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css"); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/layout/browser/layoutService.js */ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _platform_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../platform/quickinput/browser/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js"); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - -let EditorScopedQuickInputServiceImpl = class EditorScopedQuickInputServiceImpl extends _platform_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_9__["QuickInputService"] { - constructor(editor, instantiationService, contextKeyService, themeService, accessibilityService, layoutService) { - super(instantiationService, contextKeyService, themeService, accessibilityService, layoutService); - this.host = undefined; - // Use the passed in code editor as host for the quick input widget - const contribution = QuickInputEditorContribution.get(editor); - this.host = { - _serviceBrand: undefined, - get container() { return contribution.widget.getDomNode(); }, - get dimension() { return editor.getLayoutInfo(); }, - get onLayout() { return editor.onDidLayoutChange; }, - focus: () => editor.focus() - }; +class Trait { + constructor(_trait) { + this._trait = _trait; + this.indexes = []; + this.sortedIndexes = []; + this._onChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); + this.onChange = this._onChange.event; } - createController() { - return super.createController(this.host); - } -}; -EditorScopedQuickInputServiceImpl = __decorate([ - __param(1, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__["IInstantiationService"]), - __param(2, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_5__["IContextKeyService"]), - __param(3, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__["IThemeService"]), - __param(4, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_6__["IAccessibilityService"]), - __param(5, _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_7__["ILayoutService"]) -], EditorScopedQuickInputServiceImpl); - -let StandaloneQuickInputServiceImpl = class StandaloneQuickInputServiceImpl { - constructor(instantiationService, codeEditorService) { - this.instantiationService = instantiationService; - this.codeEditorService = codeEditorService; - this.mapEditorToService = new Map(); - } - get activeService() { - const editor = this.codeEditorService.getFocusedCodeEditor(); - if (!editor) { - throw new Error('Quick input service needs a focused editor to work.'); - } - // Find the quick input implementation for the focused - // editor or create it lazily if not yet created - let quickInputService = this.mapEditorToService.get(editor); - if (!quickInputService) { - const newQuickInputService = quickInputService = this.instantiationService.createInstance(EditorScopedQuickInputServiceImpl, editor); - this.mapEditorToService.set(editor, quickInputService); - Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_10__["once"])(editor.onDidDispose)(() => { - newQuickInputService.dispose(); - this.mapEditorToService.delete(editor); - }); - } - return quickInputService; + get trait() { return this._trait; } + get renderer() { + return new TraitRenderer(this); + } + splice(start, deleteCount, elements) { + const diff = elements.length - deleteCount; + const end = start + deleteCount; + const indexes = [ + ...this.sortedIndexes.filter(i => i < start), + ...elements.map((hasTrait, i) => hasTrait ? i + start : -1).filter(i => i !== -1), + ...this.sortedIndexes.filter(i => i >= end).map(i => i + diff) + ]; + this.renderer.splice(start, deleteCount, elements.length); + this._set(indexes, indexes); } - get quickAccess() { return this.activeService.quickAccess; } - pick(picks, options = {}, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_3__["CancellationToken"].None) { - return this.activeService /* TS fail */.pick(picks, options, token); + renderIndex(index, container) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](container, this._trait, this.contains(index)); } - createQuickPick() { - return this.activeService.createQuickPick(); + unrender(container) { + _dom_js__WEBPACK_IMPORTED_MODULE_5__["removeClass"](container, this._trait); } -}; -StandaloneQuickInputServiceImpl = __decorate([ - __param(0, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_4__["IInstantiationService"]), - __param(1, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_8__["ICodeEditorService"]) -], StandaloneQuickInputServiceImpl); - -class QuickInputEditorContribution { - constructor(editor) { - this.editor = editor; - this.widget = new QuickInputEditorWidget(this.editor); + /** + * Sets the indexes which should have this trait. + * + * @param indexes Indexes which should have this trait. + * @return The old indexes which had this trait. + */ + set(indexes, browserEvent) { + return this._set(indexes, [...indexes].sort(numericSort), browserEvent); + } + _set(indexes, sortedIndexes, browserEvent) { + const result = this.indexes; + const sortedResult = this.sortedIndexes; + this.indexes = indexes; + this.sortedIndexes = sortedIndexes; + const toRender = disjunction(sortedResult, indexes); + this.renderer.renderIndexes(toRender); + this._onChange.fire({ indexes, browserEvent }); + return result; } - static get(editor) { - return editor.getContribution(QuickInputEditorContribution.ID); + get() { + return this.indexes; + } + contains(index) { + return Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["binarySearch"])(this.sortedIndexes, index, numericSort) >= 0; } dispose() { - this.widget.dispose(); + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this._onChange); } } -QuickInputEditorContribution.ID = 'editor.controller.quickInput'; -class QuickInputEditorWidget { - constructor(codeEditor) { - this.codeEditor = codeEditor; - this.domNode = document.createElement('div'); - this.codeEditor.addOverlayWidget(this); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] +], Trait.prototype, "renderer", null); +class SelectionTrait extends Trait { + constructor(setAriaSelected) { + super('selected'); + this.setAriaSelected = setAriaSelected; } - getId() { - return QuickInputEditorWidget.ID; + renderIndex(index, container) { + super.renderIndex(index, container); + if (this.setAriaSelected) { + if (this.contains(index)) { + container.setAttribute('aria-selected', 'true'); + } + else { + container.setAttribute('aria-selected', 'false'); + } + } } - getDomNode() { - return this.domNode; +} +/** + * The TraitSpliceable is used as a util class to be able + * to preserve traits across splice calls, given an identity + * provider. + */ +class TraitSpliceable { + constructor(trait, view, identityProvider) { + this.trait = trait; + this.view = view; + this.identityProvider = identityProvider; } - getPosition() { - return { preference: 2 /* TOP_CENTER */ }; + splice(start, deleteCount, elements) { + if (!this.identityProvider) { + return this.trait.splice(start, deleteCount, elements.map(() => false)); + } + const pastElementsWithTrait = this.trait.get().map(i => this.identityProvider.getId(this.view.element(i)).toString()); + const elementsWithTrait = elements.map(e => pastElementsWithTrait.indexOf(this.identityProvider.getId(e).toString()) > -1); + this.trait.splice(start, deleteCount, elementsWithTrait); } - dispose() { - this.codeEditor.removeOverlayWidget(this); +} +function isInputElement(e) { + return e.tagName === 'INPUT' || e.tagName === 'TEXTAREA'; +} +function isMonacoEditor(e) { + if (_dom_js__WEBPACK_IMPORTED_MODULE_5__["hasClass"](e, 'monaco-editor')) { + return true; + } + if (_dom_js__WEBPACK_IMPORTED_MODULE_5__["hasClass"](e, 'monaco-list')) { + return false; + } + if (!e.parentElement) { + return false; } + return isMonacoEditor(e.parentElement); } -QuickInputEditorWidget.ID = 'editor.contrib.quickInputWidget'; -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_1__["registerEditorContribution"])(QuickInputEditorContribution.ID, QuickInputEditorContribution); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js": -/*!******************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js ***! - \******************************************************************************************************************/ -/*! exports provided: StandaloneReferencesController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneReferencesController", function() { return StandaloneReferencesController; }); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../contrib/gotoSymbol/peek/referencesController.js */ "./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - -let StandaloneReferencesController = class StandaloneReferencesController extends _contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__["ReferencesController"] { - constructor(editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService) { - super(true, editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService); +class KeyboardController { + constructor(list, view, options) { + this.list = list; + this.view = view; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + const multipleSelectionSupport = options.multipleSelectionSupport !== false; + const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(view.domNode, 'keydown')) + .filter(e => !isInputElement(e.target)) + .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)); + onKeyDown.filter(e => e.keyCode === 3 /* Enter */).on(this.onEnter, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 16 /* UpArrow */).on(this.onUpArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 18 /* DownArrow */).on(this.onDownArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 11 /* PageUp */).on(this.onPageUpArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 12 /* PageDown */).on(this.onPageDownArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 9 /* Escape */).on(this.onEscape, this, this.disposables); + if (multipleSelectionSupport) { + onKeyDown.filter(e => (_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? e.metaKey : e.ctrlKey) && e.keyCode === 31 /* KEY_A */).on(this.onCtrlA, this, this.disposables); + } } -}; -StandaloneReferencesController = __decorate([ - __param(1, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["IContextKeyService"]), - __param(2, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__["ICodeEditorService"]), - __param(3, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_6__["INotificationService"]), - __param(4, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__["IInstantiationService"]), - __param(5, _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_7__["IStorageService"]), - __param(6, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__["IConfigurationService"]) -], StandaloneReferencesController); - -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorContribution"])(_contrib_gotoSymbol_peek_referencesController_js__WEBPACK_IMPORTED_MODULE_2__["ReferencesController"].ID, StandaloneReferencesController); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js ***! - \***************************************************************************************/ -/*! exports provided: SimpleModel, SimpleEditorModelResolverService, SimpleEditorProgressService, SimpleDialogService, SimpleNotificationService, StandaloneCommandService, StandaloneKeybindingService, SimpleConfigurationService, SimpleResourceConfigurationService, SimpleResourcePropertiesService, StandaloneTelemetryService, SimpleWorkspaceContextService, applyConfigurationValues, SimpleBulkEditService, SimpleUriLabelService, SimpleLayoutService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleModel", function() { return SimpleModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleEditorModelResolverService", function() { return SimpleEditorModelResolverService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleEditorProgressService", function() { return SimpleEditorProgressService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleDialogService", function() { return SimpleDialogService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleNotificationService", function() { return SimpleNotificationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneCommandService", function() { return StandaloneCommandService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneKeybindingService", function() { return StandaloneKeybindingService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleConfigurationService", function() { return SimpleConfigurationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleResourceConfigurationService", function() { return SimpleResourceConfigurationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleResourcePropertiesService", function() { return SimpleResourcePropertiesService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneTelemetryService", function() { return StandaloneTelemetryService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleWorkspaceContextService", function() { return SimpleWorkspaceContextService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyConfigurationValues", function() { return applyConfigurationValues; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleBulkEditService", function() { return SimpleBulkEditService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleUriLabelService", function() { return SimpleUriLabelService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleLayoutService", function() { return SimpleLayoutService; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../browser/editorBrowser.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"); -/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js"); -/* harmony import */ var _common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/config/commonEditorConfig.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js"); -/* harmony import */ var _common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/core/editOperation.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"); -/* harmony import */ var _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/core/position.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/position.js"); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/configuration/common/configurationModels.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js"); -/* harmony import */ var _platform_keybinding_common_abstractKeybindingService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/keybinding/common/abstractKeybindingService.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js"); -/* harmony import */ var _platform_keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingResolver.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js"); -/* harmony import */ var _platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/keybinding/common/resolvedKeybindingItem.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js"); -/* harmony import */ var _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/keybinding/common/usLayoutResolvedKeybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ "./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - -class SimpleModel { - constructor(model) { - this.disposed = false; - this.model = model; - this._onDispose = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); + onEnter(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.setSelection(this.list.getFocus(), e.browserEvent); } - get textEditorModel() { - return this.model; + onUpArrow(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.focusPrevious(1, false, e.browserEvent); + this.list.reveal(this.list.getFocus()[0]); + this.view.domNode.focus(); } - dispose() { - this.disposed = true; - this._onDispose.fire(); + onDownArrow(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.focusNext(1, false, e.browserEvent); + this.list.reveal(this.list.getFocus()[0]); + this.view.domNode.focus(); } -} -function withTypedEditor(widget, codeEditorCallback, diffEditorCallback) { - if (Object(_browser_editorBrowser_js__WEBPACK_IMPORTED_MODULE_9__["isCodeEditor"])(widget)) { - // Single Editor - return codeEditorCallback(widget); + onPageUpArrow(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.focusPreviousPage(e.browserEvent); + this.list.reveal(this.list.getFocus()[0]); + this.view.domNode.focus(); } - else { - // Diff Editor - return diffEditorCallback(widget); + onPageDownArrow(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.focusNextPage(e.browserEvent); + this.list.reveal(this.list.getFocus()[0]); + this.view.domNode.focus(); + } + onCtrlA(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.setSelection(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["range"])(this.list.length), e.browserEvent); + this.view.domNode.focus(); + } + onEscape(e) { + e.preventDefault(); + e.stopPropagation(); + this.list.setSelection([], e.browserEvent); + this.view.domNode.focus(); + } + dispose() { + this.disposables.dispose(); } } -let SimpleEditorModelResolverService = class SimpleEditorModelResolverService { - constructor(modelService) { - this.modelService = modelService; +var TypeLabelControllerState; +(function (TypeLabelControllerState) { + TypeLabelControllerState[TypeLabelControllerState["Idle"] = 0] = "Idle"; + TypeLabelControllerState[TypeLabelControllerState["Typing"] = 1] = "Typing"; +})(TypeLabelControllerState || (TypeLabelControllerState = {})); +const DefaultKeyboardNavigationDelegate = new class { + mightProducePrintableCharacter(event) { + if (event.ctrlKey || event.metaKey || event.altKey) { + return false; + } + return (event.keyCode >= 31 /* KEY_A */ && event.keyCode <= 56 /* KEY_Z */) + || (event.keyCode >= 21 /* KEY_0 */ && event.keyCode <= 30 /* KEY_9 */) + || (event.keyCode >= 93 /* NUMPAD_0 */ && event.keyCode <= 102 /* NUMPAD_9 */) + || (event.keyCode >= 80 /* US_SEMICOLON */ && event.keyCode <= 90 /* US_QUOTE */); + } +}; +class TypeLabelController { + constructor(list, view, keyboardNavigationLabelProvider, delegate) { + this.list = list; + this.view = view; + this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider; + this.delegate = delegate; + this.enabled = false; + this.state = TypeLabelControllerState.Idle; + this.automaticKeyboardNavigation = true; + this.triggered = false; + this.previouslyFocused = -1; + this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.updateOptions(list.options); } - setEditor(editor) { - this.editor = editor; + updateOptions(options) { + const enableKeyboardNavigation = typeof options.enableKeyboardNavigation === 'undefined' ? true : !!options.enableKeyboardNavigation; + if (enableKeyboardNavigation) { + this.enable(); + } + else { + this.disable(); + } + if (typeof options.automaticKeyboardNavigation !== 'undefined') { + this.automaticKeyboardNavigation = options.automaticKeyboardNavigation; + } } - createModelReference(resource) { - let model = null; - if (this.editor) { - model = withTypedEditor(this.editor, (editor) => this.findModel(editor, resource), (diffEditor) => this.findModel(diffEditor.getOriginalEditor(), resource) || this.findModel(diffEditor.getModifiedEditor(), resource)); + enable() { + if (this.enabled) { + return; } - if (!model) { - return Promise.reject(new Error(`Model not found`)); + const onChar = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown')) + .filter(e => !isInputElement(e.target)) + .filter(() => this.automaticKeyboardNavigation || this.triggered) + .map(event => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](event)) + .filter(e => this.delegate.mightProducePrintableCharacter(e)) + .forEach(e => { e.stopPropagation(); e.preventDefault(); }) + .map(event => event.browserEvent.key) + .event; + const onClear = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].debounce(onChar, () => null, 800); + const onInput = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].reduce(_common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(onChar, onClear), (r, i) => i === null ? null : ((r || '') + i)); + onInput(this.onInput, this, this.enabledDisposables); + onClear(this.onClear, this, this.enabledDisposables); + this.enabled = true; + this.triggered = false; + } + disable() { + if (!this.enabled) { + return; } - return Promise.resolve(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["ImmortalReference"](new SimpleModel(model))); + this.enabledDisposables.clear(); + this.enabled = false; + this.triggered = false; } - findModel(editor, resource) { - let model = this.modelService.getModel(resource); - if (model && model.uri.toString() !== resource.toString()) { - return null; + onClear() { + var _a; + const focus = this.list.getFocus(); + if (focus.length > 0 && focus[0] === this.previouslyFocused) { + // List: re-anounce element on typing end since typed keys will interupt aria label of focused element + // Do not announce if there was a focus change at the end to prevent duplication https://github.com/microsoft/vscode/issues/95961 + const ariaLabel = (_a = this.list.options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getAriaLabel(this.list.element(focus[0])); + if (ariaLabel) { + Object(_aria_aria_js__WEBPACK_IMPORTED_MODULE_18__["alert"])(ariaLabel); + } } - return model; + this.previouslyFocused = -1; } -}; -SimpleEditorModelResolverService = __decorate([ - __param(0, _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_15__["IModelService"]) -], SimpleEditorModelResolverService); - -class SimpleEditorProgressService { - show() { - return SimpleEditorProgressService.NULL_PROGRESS_RUNNER; + onInput(word) { + if (!word) { + this.state = TypeLabelControllerState.Idle; + this.triggered = false; + return; + } + const focus = this.list.getFocus(); + const start = focus.length > 0 ? focus[0] : 0; + const delta = this.state === TypeLabelControllerState.Idle ? 1 : 0; + this.state = TypeLabelControllerState.Typing; + for (let i = 0; i < this.list.length; i++) { + const index = (start + i + delta) % this.list.length; + const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(index)); + const labelStr = label && label.toString(); + if (typeof labelStr === 'undefined' || Object(_common_filters_js__WEBPACK_IMPORTED_MODULE_17__["matchesPrefix"])(word, labelStr)) { + this.previouslyFocused = start; + this.list.setFocus([index]); + this.list.reveal(index); + return; + } + } } - showWhile(promise, delay) { - return Promise.resolve(undefined); + dispose() { + this.disable(); + this.enabledDisposables.dispose(); + this.disposables.dispose(); } } -SimpleEditorProgressService.NULL_PROGRESS_RUNNER = { - done: () => { }, - total: () => { }, - worked: () => { } -}; -class SimpleDialogService { - confirm(confirmation) { - return this.doConfirm(confirmation).then(confirmed => { - return { - confirmed, - checkboxChecked: false // unsupported - }; - }); +class DOMFocusController { + constructor(list, view) { + this.list = list; + this.view = view; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(view.domNode, 'keydown')) + .filter(e => !isInputElement(e.target)) + .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)); + onKeyDown.filter(e => e.keyCode === 2 /* Tab */ && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey) + .on(this.onTab, this, this.disposables); } - doConfirm(confirmation) { - let messageText = confirmation.message; - if (confirmation.detail) { - messageText = messageText + '\n\n' + confirmation.detail; + onTab(e) { + if (e.target !== this.view.domNode) { + return; + } + const focus = this.list.getFocus(); + if (focus.length === 0) { + return; + } + const focusedDomElement = this.view.domElement(focus[0]); + if (!focusedDomElement) { + return; } - return Promise.resolve(window.confirm(messageText)); + const tabIndexElement = focusedDomElement.querySelector('[tabIndex]'); + if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement) || tabIndexElement.tabIndex === -1) { + return; + } + const style = window.getComputedStyle(tabIndexElement); + if (style.visibility === 'hidden' || style.display === 'none') { + return; + } + e.preventDefault(); + e.stopPropagation(); + tabIndexElement.focus(); } - show(severity, message, buttons, options) { - return Promise.resolve({ choice: 0 }); + dispose() { + this.disposables.dispose(); } } -class SimpleNotificationService { - info(message) { - return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__["default"].Info, message }); - } - warn(message) { - return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__["default"].Warning, message }); +function isSelectionSingleChangeEvent(event) { + return _common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; +} +function isSelectionRangeChangeEvent(event) { + return event.browserEvent.shiftKey; +} +function isMouseRightClick(event) { + return event instanceof MouseEvent && event.button === 2; +} +const DefaultMultipleSelectionController = { + isSelectionSingleChangeEvent, + isSelectionRangeChangeEvent +}; +class MouseController { + constructor(list) { + this.list = list; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this._onPointer = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); + this.onPointer = this._onPointer.event; + this.multipleSelectionSupport = !(list.options.multipleSelectionSupport === false); + if (this.multipleSelectionSupport) { + this.multipleSelectionController = list.options.multipleSelectionController || DefaultMultipleSelectionController; + } + this.mouseSupport = typeof list.options.mouseSupport === 'undefined' || !!list.options.mouseSupport; + if (this.mouseSupport) { + list.onMouseDown(this.onMouseDown, this, this.disposables); + list.onContextMenu(this.onContextMenu, this, this.disposables); + list.onMouseDblClick(this.onDoubleClick, this, this.disposables); + list.onTouchStart(this.onMouseDown, this, this.disposables); + this.disposables.add(_touch_js__WEBPACK_IMPORTED_MODULE_7__["Gesture"].addTarget(list.getHTMLElement())); + } + _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(list.onMouseClick, list.onMouseMiddleClick, list.onTap)(this.onViewPointer, this, this.disposables); } - error(error) { - return this.notify({ severity: _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__["default"].Error, message: error }); + isSelectionSingleChangeEvent(event) { + if (this.multipleSelectionController) { + return this.multipleSelectionController.isSelectionSingleChangeEvent(event); + } + return _common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"] ? event.browserEvent.metaKey : event.browserEvent.ctrlKey; } - notify(notification) { - switch (notification.severity) { - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__["default"].Error: - console.error(notification.message); - break; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_7__["default"].Warning: - console.warn(notification.message); - break; - default: - console.log(notification.message); - break; + isSelectionRangeChangeEvent(event) { + if (this.multipleSelectionController) { + return this.multipleSelectionController.isSelectionRangeChangeEvent(event); } - return SimpleNotificationService.NO_OP; + return event.browserEvent.shiftKey; } - status(message, options) { - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["Disposable"].None; + isSelectionChangeEvent(event) { + return this.isSelectionSingleChangeEvent(event) || this.isSelectionRangeChangeEvent(event); } -} -SimpleNotificationService.NO_OP = new _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_24__["NoOpNotification"](); -class StandaloneCommandService { - constructor(instantiationService) { - this._onWillExecuteCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this._onDidExecuteCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this._instantiationService = instantiationService; + onMouseDown(e) { + if (isMonacoEditor(e.browserEvent.target)) { + return; + } + if (document.activeElement !== e.browserEvent.target) { + this.list.domFocus(); + } } - executeCommand(id, ...args) { - const command = _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__["CommandsRegistry"].getCommand(id); - if (!command) { - return Promise.reject(new Error(`command '${id}' not found`)); + onContextMenu(e) { + if (isMonacoEditor(e.browserEvent.target)) { + return; } - try { - this._onWillExecuteCommand.fire({ commandId: id, args }); - const result = this._instantiationService.invokeFunction.apply(this._instantiationService, [command.handler, ...args]); - this._onDidExecuteCommand.fire({ commandId: id, args }); - return Promise.resolve(result); + const focus = typeof e.index === 'undefined' ? [] : [e.index]; + this.list.setFocus(focus, e.browserEvent); + } + onViewPointer(e) { + if (!this.mouseSupport) { + return; } - catch (err) { - return Promise.reject(err); + if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) { + return; + } + let reference = this.list.getFocus()[0]; + const selection = this.list.getSelection(); + reference = reference === undefined ? selection[0] : reference; + const focus = e.index; + if (typeof focus === 'undefined') { + this.list.setFocus([], e.browserEvent); + this.list.setSelection([], e.browserEvent); + return; + } + if (this.multipleSelectionSupport && this.isSelectionRangeChangeEvent(e)) { + return this.changeSelection(e, reference); + } + if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) { + return this.changeSelection(e, reference); } + this.list.setFocus([focus], e.browserEvent); + if (!isMouseRightClick(e.browserEvent)) { + this.list.setSelection([focus], e.browserEvent); + } + this._onPointer.fire(e); } -} -class StandaloneKeybindingService extends _platform_keybinding_common_abstractKeybindingService_js__WEBPACK_IMPORTED_MODULE_19__["AbstractKeybindingService"] { - constructor(contextKeyService, commandService, telemetryService, notificationService, logService, domNode) { - super(contextKeyService, commandService, telemetryService, notificationService, logService); - this._cachedResolver = null; - this._dynamicKeybindings = []; - this._register(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](domNode, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].KEY_DOWN, (e) => { - let keyEvent = new _base_browser_keyboardEvent_js__WEBPACK_IMPORTED_MODULE_2__["StandardKeyboardEvent"](e); - let shouldPreventDefault = this._dispatch(keyEvent, keyEvent.target); - if (shouldPreventDefault) { - keyEvent.preventDefault(); - keyEvent.stopPropagation(); - } - })); + onDoubleClick(e) { + if (isInputElement(e.browserEvent.target) || isMonacoEditor(e.browserEvent.target)) { + return; + } + if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) { + return; + } + const focus = this.list.getFocus(); + this.list.setSelection(focus, e.browserEvent); } - addDynamicKeybinding(commandId, _keybinding, handler, when) { - const keybinding = Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__["createKeybinding"])(_keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["OS"]); - const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - if (keybinding) { - this._dynamicKeybindings.push({ - keybinding: keybinding, - command: commandId, - when: when, - weight1: 1000, - weight2: 0, - extensionId: null - }); - toDispose.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => { - for (let i = 0; i < this._dynamicKeybindings.length; i++) { - let kb = this._dynamicKeybindings[i]; - if (kb.command === commandId) { - this._dynamicKeybindings.splice(i, 1); - this.updateResolver({ source: 1 /* Default */ }); - return; - } - } - })); + changeSelection(e, reference) { + const focus = e.index; + if (this.isSelectionRangeChangeEvent(e) && reference !== undefined) { + const min = Math.min(reference, focus); + const max = Math.max(reference, focus); + const rangeSelection = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_3__["range"])(min, max + 1); + const selection = this.list.getSelection(); + const contiguousRange = getContiguousRangeContaining(disjunction(selection, [reference]), reference); + if (contiguousRange.length === 0) { + return; + } + const newSelection = disjunction(rangeSelection, relativeComplement(selection, contiguousRange)); + this.list.setSelection(newSelection, e.browserEvent); } - toDispose.add(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_16__["CommandsRegistry"].registerCommand(commandId, handler)); - this.updateResolver({ source: 1 /* Default */ }); - return toDispose; - } - updateResolver(event) { - this._cachedResolver = null; - this._onDidUpdateKeybindings.fire(event); - } - _getResolver() { - if (!this._cachedResolver) { - const defaults = this._toNormalizedKeybindingItems(_platform_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_21__["KeybindingsRegistry"].getDefaultKeybindings(), true); - const overrides = this._toNormalizedKeybindingItems(this._dynamicKeybindings, false); - this._cachedResolver = new _platform_keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_20__["KeybindingResolver"](defaults, overrides, (str) => this._log(str)); - } - return this._cachedResolver; - } - _documentHasFocus() { - return document.hasFocus(); - } - _toNormalizedKeybindingItems(items, isDefault) { - let result = [], resultLen = 0; - for (const item of items) { - const when = item.when || undefined; - const keybinding = item.keybinding; - if (!keybinding) { - // This might be a removal keybinding item in user settings => accept it - result[resultLen++] = new _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__["ResolvedKeybindingItem"](undefined, item.command, item.commandArgs, when, isDefault, null); + else if (this.isSelectionSingleChangeEvent(e)) { + const selection = this.list.getSelection(); + const newSelection = selection.filter(i => i !== focus); + this.list.setFocus([focus]); + if (selection.length === newSelection.length) { + this.list.setSelection([...newSelection, focus], e.browserEvent); } else { - const resolvedKeybindings = this.resolveKeybinding(keybinding); - for (const resolvedKeybinding of resolvedKeybindings) { - result[resultLen++] = new _platform_keybinding_common_resolvedKeybindingItem_js__WEBPACK_IMPORTED_MODULE_22__["ResolvedKeybindingItem"](resolvedKeybinding, item.command, item.commandArgs, when, isDefault, null); - } + this.list.setSelection(newSelection, e.browserEvent); } } - return result; } - resolveKeybinding(keybinding) { - return [new _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__["USLayoutResolvedKeybinding"](keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["OS"])]; - } - resolveKeyboardEvent(keyboardEvent) { - let keybinding = new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_4__["SimpleKeybinding"](keyboardEvent.ctrlKey, keyboardEvent.shiftKey, keyboardEvent.altKey, keyboardEvent.metaKey, keyboardEvent.keyCode).toChord(); - return new _platform_keybinding_common_usLayoutResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_23__["USLayoutResolvedKeybinding"](keybinding, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["OS"]); + dispose() { + this.disposables.dispose(); } } -function isConfigurationOverrides(thing) { - return thing - && typeof thing === 'object' - && (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string') - && (!thing.resource || thing.resource instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__["URI"]); -} -class SimpleConfigurationService { - constructor() { - this._onDidChangeConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.onDidChangeConfiguration = this._onDidChangeConfiguration.event; - this._configuration = new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__["Configuration"](new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__["DefaultConfigurationModel"](), new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__["ConfigurationModel"]()); - } - getValue(arg1, arg2) { - const section = typeof arg1 === 'string' ? arg1 : undefined; - const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : {}; - return this._configuration.getValue(section, overrides, undefined); - } - updateValues(values) { - const previous = { data: this._configuration.toData() }; - let changedKeys = []; - for (const entry of values) { - const [key, value] = entry; - if (this.getValue(key) === value) { - continue; +class DefaultStyleController { + constructor(styleElement, selectorSuffix) { + this.styleElement = styleElement; + this.selectorSuffix = selectorSuffix; + } + style(styles) { + const suffix = this.selectorSuffix && `.${this.selectorSuffix}`; + const content = []; + if (styles.listBackground) { + if (styles.listBackground.isOpaque()) { + content.push(`.monaco-list${suffix} .monaco-list-rows { background: ${styles.listBackground}; }`); + } + else if (!_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"]) { // subpixel AA doesn't exist in macOS + console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`); } - this._configuration.updateValue(key, value); - changedKeys.push(key); } - if (changedKeys.length > 0) { - const configurationChangeEvent = new _platform_configuration_common_configurationModels_js__WEBPACK_IMPORTED_MODULE_18__["ConfigurationChangeEvent"]({ keys: changedKeys, overrides: [] }, previous, this._configuration); - configurationChangeEvent.source = 7 /* MEMORY */; - configurationChangeEvent.sourceConfig = null; - this._onDidChangeConfiguration.fire(configurationChangeEvent); + if (styles.listFocusBackground) { + content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`); + content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:hover { background-color: ${styles.listFocusBackground}; }`); // overwrite :hover style in this case! + } + if (styles.listFocusForeground) { + content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); + } + if (styles.listActiveSelectionBackground) { + content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`); + content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case! + } + if (styles.listActiveSelectionForeground) { + content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { color: ${styles.listActiveSelectionForeground}; }`); + } + if (styles.listFocusAndSelectionBackground) { + content.push(` + .monaco-drag-image, + .monaco-list${suffix}:focus .monaco-list-row.selected.focused { background-color: ${styles.listFocusAndSelectionBackground}; } + `); + } + if (styles.listFocusAndSelectionForeground) { + content.push(` + .monaco-drag-image, + .monaco-list${suffix}:focus .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; } + `); + } + if (styles.listInactiveFocusBackground) { + content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`); + content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`); // overwrite :hover style in this case! + } + if (styles.listInactiveSelectionBackground) { + content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`); + content.push(`.monaco-list${suffix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case! + } + if (styles.listInactiveSelectionForeground) { + content.push(`.monaco-list${suffix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`); + } + if (styles.listHoverBackground) { + content.push(`.monaco-list${suffix}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`); + } + if (styles.listHoverForeground) { + content.push(`.monaco-list${suffix} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`); + } + if (styles.listSelectionOutline) { + content.push(`.monaco-list${suffix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`); + } + if (styles.listFocusOutline) { + content.push(` + .monaco-drag-image, + .monaco-list${suffix}:focus .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; } + `); + } + if (styles.listInactiveFocusOutline) { + content.push(`.monaco-list${suffix} .monaco-list-row.focused { outline: 1px dotted ${styles.listInactiveFocusOutline}; outline-offset: -1px; }`); + } + if (styles.listHoverOutline) { + content.push(`.monaco-list${suffix} .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`); + } + if (styles.listDropBackground) { + content.push(` + .monaco-list${suffix}.drop-target, + .monaco-list${suffix} .monaco-list-rows.drop-target, + .monaco-list${suffix} .monaco-list-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; } + `); + } + if (styles.listFilterWidgetBackground) { + content.push(`.monaco-list-type-filter { background-color: ${styles.listFilterWidgetBackground} }`); + } + if (styles.listFilterWidgetOutline) { + content.push(`.monaco-list-type-filter { border: 1px solid ${styles.listFilterWidgetOutline}; }`); + } + if (styles.listFilterWidgetNoMatchesOutline) { + content.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${styles.listFilterWidgetNoMatchesOutline}; }`); + } + if (styles.listMatchesShadow) { + content.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${styles.listMatchesShadow}; }`); + } + const newStyles = content.join('\n'); + if (newStyles !== this.styleElement.innerHTML) { + this.styleElement.innerHTML = newStyles; } - return Promise.resolve(); } } -class SimpleResourceConfigurationService { - constructor(configurationService) { - this.configurationService = configurationService; - this._onDidChangeConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.configurationService.onDidChangeConfiguration((e) => { - this._onDidChangeConfiguration.fire({ affectedKeys: e.affectedKeys, affectsConfiguration: (resource, configuration) => e.affectsConfiguration(configuration) }); - }); +const defaultStyles = { + listFocusBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#7FB0D0'), + listActiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#0E639C'), + listActiveSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#FFFFFF'), + listFocusAndSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#094771'), + listFocusAndSelectionForeground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#FFFFFF'), + listInactiveSelectionBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#3F3F46'), + listHoverBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#2A2D2E'), + listDropBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#383B3D'), + treeIndentGuidesStroke: _common_color_js__WEBPACK_IMPORTED_MODULE_13__["Color"].fromHex('#a9a9a9') +}; +const DefaultOptions = { + keyboardSupport: true, + mouseSupport: true, + multipleSelectionSupport: true, + dnd: { + getDragURI() { return null; }, + onDragStart() { }, + onDragOver() { return false; }, + drop() { } } - getValue(resource, arg2, arg3) { - const position = _common_core_position_js__WEBPACK_IMPORTED_MODULE_13__["Position"].isIPosition(arg2) ? arg2 : null; - const section = position ? (typeof arg3 === 'string' ? arg3 : undefined) : (typeof arg2 === 'string' ? arg2 : undefined); - if (typeof section === 'undefined') { - return this.configurationService.getValue(); - } - return this.configurationService.getValue(section); +}; +// TODO@Joao: move these utils into a SortedArray class +function getContiguousRangeContaining(range, value) { + const index = range.indexOf(value); + if (index === -1) { + return []; + } + const result = []; + let i = index - 1; + while (i >= 0 && range[i] === value - (index - i)) { + result.push(range[i--]); + } + result.reverse(); + i = index; + while (i < range.length && range[i] === value + (i - index)) { + result.push(range[i++]); } + return result; } -let SimpleResourcePropertiesService = class SimpleResourcePropertiesService { - constructor(configurationService) { - this.configurationService = configurationService; +/** + * Given two sorted collections of numbers, returns the intersection + * between them (OR). + */ +function disjunction(one, other) { + const result = []; + let i = 0, j = 0; + while (i < one.length || j < other.length) { + if (i >= one.length) { + result.push(other[j++]); + } + else if (j >= other.length) { + result.push(one[i++]); + } + else if (one[i] === other[j]) { + result.push(one[i]); + i++; + j++; + continue; + } + else if (one[i] < other[j]) { + result.push(one[i++]); + } + else { + result.push(other[j++]); + } } - getEOL(resource, language) { - const eol = this.configurationService.getValue('files.eol', { overrideIdentifier: language, resource }); - if (eol && eol !== 'auto') { - return eol; + return result; +} +/** + * Given two sorted collections of numbers, returns the relative + * complement between them (XOR). + */ +function relativeComplement(one, other) { + const result = []; + let i = 0, j = 0; + while (i < one.length || j < other.length) { + if (i >= one.length) { + result.push(other[j++]); + } + else if (j >= other.length) { + result.push(one[i++]); } - return (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isLinux"] || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isMacintosh"]) ? '\n' : '\r\n'; + else if (one[i] === other[j]) { + i++; + j++; + continue; + } + else if (one[i] < other[j]) { + result.push(one[i++]); + } + else { + j++; + } + } + return result; +} +const numericSort = (a, b) => a - b; +class PipelineRenderer { + constructor(_templateId, renderers) { + this._templateId = _templateId; + this.renderers = renderers; } -}; -SimpleResourcePropertiesService = __decorate([ - __param(0, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_17__["IConfigurationService"]) -], SimpleResourcePropertiesService); - -class StandaloneTelemetryService { - publicLog(eventName, data) { - return Promise.resolve(undefined); + get templateId() { + return this._templateId; } - publicLog2(eventName, data) { - return this.publicLog(eventName, data); + renderTemplate(container) { + return this.renderers.map(r => r.renderTemplate(container)); } -} -class SimpleWorkspaceContextService { - constructor() { - const resource = _base_common_uri_js__WEBPACK_IMPORTED_MODULE_8__["URI"].from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' }); - this.workspace = { id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82', folders: [new _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_25__["WorkspaceFolder"]({ uri: resource, name: '', index: 0 })] }; + renderElement(element, index, templateData, height) { + let i = 0; + for (const renderer of this.renderers) { + renderer.renderElement(element, index, templateData[i++], height); + } } - getWorkspace() { - return this.workspace; + disposeElement(element, index, templateData, height) { + let i = 0; + for (const renderer of this.renderers) { + if (renderer.disposeElement) { + renderer.disposeElement(element, index, templateData[i], height); + } + i += 1; + } } - getWorkspaceFolder(resource) { - return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME ? this.workspace.folders[0] : null; + disposeTemplate(templateData) { + let i = 0; + for (const renderer of this.renderers) { + renderer.disposeTemplate(templateData[i++]); + } } } -SimpleWorkspaceContextService.SCHEME = 'inmemory'; -function applyConfigurationValues(configurationService, source, isDiffEditor) { - if (!source) { - return; +class AccessibiltyRenderer { + constructor(accessibilityProvider) { + this.accessibilityProvider = accessibilityProvider; + this.templateId = 'a18n'; } - if (!(configurationService instanceof SimpleConfigurationService)) { - return; + renderTemplate(container) { + return container; } - let toUpdate = []; - Object.keys(source).forEach((key) => { - if (Object(_common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__["isEditorConfigurationKey"])(key)) { - toUpdate.push([`editor.${key}`, source[key]]); + renderElement(element, index, container) { + const ariaLabel = this.accessibilityProvider.getAriaLabel(element); + if (ariaLabel) { + container.setAttribute('aria-label', ariaLabel); } - if (isDiffEditor && Object(_common_config_commonEditorConfig_js__WEBPACK_IMPORTED_MODULE_11__["isDiffEditorConfigurationKey"])(key)) { - toUpdate.push([`diffEditor.${key}`, source[key]]); + else { + container.removeAttribute('aria-label'); } - }); - if (toUpdate.length > 0) { - configurationService.updateValues(toUpdate); + const ariaLevel = this.accessibilityProvider.getAriaLevel && this.accessibilityProvider.getAriaLevel(element); + if (typeof ariaLevel === 'number') { + container.setAttribute('aria-level', `${ariaLevel}`); + } + else { + container.removeAttribute('aria-level'); + } + } + disposeTemplate(templateData) { + // noop } } -class SimpleBulkEditService { - constructor(_modelService) { - this._modelService = _modelService; - // +class ListViewDragAndDrop { + constructor(list, dnd) { + this.list = list; + this.dnd = dnd; } - hasPreviewHandler() { - return false; + getDragElements(element) { + const selection = this.list.getSelectedElements(); + const elements = selection.indexOf(element) > -1 ? selection : [element]; + return elements; } - apply(edits, _options) { - return __awaiter(this, void 0, void 0, function* () { - const textEdits = new Map(); - for (let edit of edits) { - if (!(edit instanceof _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_10__["ResourceTextEdit"])) { - throw new Error('bad edit - only text edits are supported'); - } - const model = this._modelService.getModel(edit.resource); - if (!model) { - throw new Error('bad edit - model not found'); - } - if (typeof edit.versionId === 'number' && model.getVersionId() !== edit.versionId) { - throw new Error('bad state - model changed in the meantime'); - } - let array = textEdits.get(model); - if (!array) { - array = []; - textEdits.set(model, array); - } - array.push(_common_core_editOperation_js__WEBPACK_IMPORTED_MODULE_12__["EditOperation"].replaceMove(_common_core_range_js__WEBPACK_IMPORTED_MODULE_14__["Range"].lift(edit.textEdit.range), edit.textEdit.text)); - } - let totalEdits = 0; - let totalFiles = 0; - for (const [model, edits] of textEdits) { - model.pushStackElement(); - model.pushEditOperations([], edits, () => []); - model.pushStackElement(); - totalFiles += 1; - totalEdits += edits.length; - } - return { - ariaSummary: _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["format"](_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_26__["SimpleServicesNLS"].bulkEditServiceSummary, totalEdits, totalFiles) - }; - }); + getDragURI(element) { + return this.dnd.getDragURI(element); } -} -class SimpleUriLabelService { - getUriLabel(resource, options) { - if (resource.scheme === 'file') { - return resource.fsPath; + getDragLabel(elements, originalEvent) { + if (this.dnd.getDragLabel) { + return this.dnd.getDragLabel(elements, originalEvent); } - return resource.path; - } -} -class SimpleLayoutService { - constructor(_codeEditorService, _container) { - this._codeEditorService = _codeEditorService; - this._container = _container; - this.onLayout = _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].None; + return undefined; } - get dimension() { - if (!this._dimension) { - this._dimension = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_1__["getClientArea"](window.document.body); + onDragStart(data, originalEvent) { + if (this.dnd.onDragStart) { + this.dnd.onDragStart(data, originalEvent); } - return this._dimension; } - get container() { - return this._container; + onDragOver(data, targetElement, targetIndex, originalEvent) { + return this.dnd.onDragOver(data, targetElement, targetIndex, originalEvent); } - focus() { - var _a; - (_a = this._codeEditorService.getFocusedCodeEditor()) === null || _a === void 0 ? void 0 : _a.focus(); + onDragEnd(originalEvent) { + if (this.dnd.onDragEnd) { + this.dnd.onDragEnd(originalEvent); + } } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css ***! - \*******************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./standalone-tokens.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_standalone_tokens_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js ***! - \*********************************************************************************************/ -/*! exports provided: StandaloneCodeEditor, StandaloneEditor, StandaloneDiffEditor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneCodeEditor", function() { return StandaloneCodeEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneEditor", function() { return StandaloneEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneDiffEditor", function() { return StandaloneDiffEditor; }); -/* harmony import */ var _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/aria/aria.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/widget/codeEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js"); -/* harmony import */ var _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../browser/widget/diffEditorWidget.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js"); -/* harmony import */ var _common_editorAction_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/editorAction.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./simpleServices.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js"); -/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - - - - - - - - - - - - -let LAST_GENERATED_COMMAND_ID = 0; -let ariaDomNodeCreated = false; -function createAriaDomNode() { - if (ariaDomNodeCreated) { - return; + drop(data, targetElement, targetIndex, originalEvent) { + this.dnd.drop(data, targetElement, targetIndex, originalEvent); } - ariaDomNodeCreated = true; - _base_browser_ui_aria_aria_js__WEBPACK_IMPORTED_MODULE_0__["setARIAContainer"](document.body); } -/** - * A code editor to be used both by the standalone editor and the standalone diff editor. - */ -let StandaloneCodeEditor = class StandaloneCodeEditor extends _browser_widget_codeEditorWidget_js__WEBPACK_IMPORTED_MODULE_3__["CodeEditorWidget"] { - constructor(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService, accessibilityService) { - options = options || {}; - options.ariaLabel = options.ariaLabel || _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["StandaloneCodeEditorNLS"].editorViewAccessibleLabel; - options.ariaLabel = options.ariaLabel + ';' + (_common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_19__["StandaloneCodeEditorNLS"].accessibilityHelpMessage); - super(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService); - if (keybindingService instanceof _simpleServices_js__WEBPACK_IMPORTED_MODULE_7__["StandaloneKeybindingService"]) { - this._standaloneKeybindingService = keybindingService; +class List { + constructor(user, container, virtualDelegate, renderers, _options = DefaultOptions) { + var _a; + this.user = user; + this._options = _options; + this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["EventBufferer"](); + this._ariaLabel = ''; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.didJustPressContextMenuKey = false; + this._onDidDispose = new _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Emitter"](); + this.onDidDispose = this._onDidDispose.event; + const role = this._options.accessibilityProvider && this._options.accessibilityProvider.getWidgetRole ? (_a = this._options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getWidgetRole() : 'list'; + this.selection = new SelectionTrait(role !== 'listbox'); + this.focus = new Trait('focused'); + Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_14__["mixin"])(_options, defaultStyles, false); + const baseRenderers = [this.focus.renderer, this.selection.renderer]; + this.accessibilityProvider = _options.accessibilityProvider; + if (this.accessibilityProvider) { + baseRenderers.push(new AccessibiltyRenderer(this.accessibilityProvider)); + if (this.accessibilityProvider.onDidChangeActiveDescendant) { + this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant, this, this.disposables); + } } - else { - this._standaloneKeybindingService = null; + renderers = renderers.map(r => new PipelineRenderer(r.templateId, [...baseRenderers, r])); + const viewOptions = Object.assign(Object.assign({}, _options), { dnd: _options.dnd && new ListViewDragAndDrop(this, _options.dnd) }); + this.view = new _listView_js__WEBPACK_IMPORTED_MODULE_12__["ListView"](container, virtualDelegate, renderers, viewOptions); + this.view.domNode.setAttribute('role', role); + if (_options.styleController) { + this.styleController = _options.styleController(this.view.domId); } - // Create the ARIA dom node as soon as the first editor is instantiated - createAriaDomNode(); - } - addCommand(keybinding, handler, context) { - if (!this._standaloneKeybindingService) { - console.warn('Cannot add command because the editor is configured with an unrecognized KeybindingService'); - return null; + else { + const styleElement = _dom_js__WEBPACK_IMPORTED_MODULE_5__["createStyleSheet"](this.view.domNode); + this.styleController = new DefaultStyleController(styleElement, this.view.domId); } - let commandId = 'DYNAMIC_' + (++LAST_GENERATED_COMMAND_ID); - let whenExpression = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].deserialize(context); - this._standaloneKeybindingService.addDynamicKeybinding(commandId, keybinding, handler, whenExpression); - return commandId; - } - createContextKey(key, defaultValue) { - return this._contextKeyService.createKey(key, defaultValue); - } - addAction(_descriptor) { - if ((typeof _descriptor.id !== 'string') || (typeof _descriptor.label !== 'string') || (typeof _descriptor.run !== 'function')) { - throw new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!'); - } - if (!this._standaloneKeybindingService) { - console.warn('Cannot add keybinding because the editor is configured with an unrecognized KeybindingService'); - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - } - // Read descriptor options - const id = _descriptor.id; - const label = _descriptor.label; - const precondition = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].equals('editorId', this.getId()), _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].deserialize(_descriptor.precondition)); - const keybindings = _descriptor.keybindings; - const keybindingsWhen = _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].and(precondition, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["ContextKeyExpr"].deserialize(_descriptor.keybindingContext)); - const contextMenuGroupId = _descriptor.contextMenuGroupId || null; - const contextMenuOrder = _descriptor.contextMenuOrder || 0; - const run = (accessor, ...args) => { - return Promise.resolve(_descriptor.run(this, ...args)); - }; - const toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - // Generate a unique id to allow the same descriptor.id across multiple editor instances - const uniqueId = this.getId() + ':' + id; - // Register the command - toDispose.add(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__["CommandsRegistry"].registerCommand(uniqueId, run)); - // Register the context menu item - if (contextMenuGroupId) { - let menuItem = { - command: { - id: uniqueId, - title: label - }, - when: precondition, - group: contextMenuGroupId, - order: contextMenuOrder - }; - toDispose.add(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuRegistry"].appendMenuItem(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_9__["MenuId"].EditorContext, menuItem)); + this.spliceable = new _splice_js__WEBPACK_IMPORTED_MODULE_15__["CombinedSpliceable"]([ + new TraitSpliceable(this.focus, this.view, _options.identityProvider), + new TraitSpliceable(this.selection, this.view, _options.identityProvider), + this.view + ]); + this.disposables.add(this.focus); + this.disposables.add(this.selection); + this.disposables.add(this.view); + this.disposables.add(this._onDidDispose); + this.onDidFocus = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'focus', true), () => null); + this.onDidBlur = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'blur', true), () => null); + this.disposables.add(new DOMFocusController(this, this.view)); + if (typeof _options.keyboardSupport !== 'boolean' || _options.keyboardSupport) { + const controller = new KeyboardController(this, this.view, _options); + this.disposables.add(controller); } - // Register the keybindings - if (Array.isArray(keybindings)) { - for (const kb of keybindings) { - toDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId, kb, run, keybindingsWhen)); - } + if (_options.keyboardNavigationLabelProvider) { + const delegate = _options.keyboardNavigationDelegate || DefaultKeyboardNavigationDelegate; + this.typeLabelController = new TypeLabelController(this, this.view, _options.keyboardNavigationLabelProvider, delegate); + this.disposables.add(this.typeLabelController); } - // Finally, register an internal editor action - let internalAction = new _common_editorAction_js__WEBPACK_IMPORTED_MODULE_5__["InternalEditorAction"](uniqueId, label, label, precondition, run, this._contextKeyService); - // Store it under the original id, such that trigger with the original id will work - this._actions[id] = internalAction; - toDispose.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - delete this._actions[id]; - })); - return toDispose; - } -}; -StandaloneCodeEditor = __decorate([ - __param(2, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__["IInstantiationService"]), - __param(3, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"]), - __param(4, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__["ICommandService"]), - __param(5, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]), - __param(6, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__["IKeybindingService"]), - __param(7, _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_17__["IThemeService"]), - __param(8, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__["INotificationService"]), - __param(9, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], StandaloneCodeEditor); - -let StandaloneEditor = class StandaloneEditor extends StandaloneCodeEditor { - constructor(domElement, options, toDispose, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, contextViewService, themeService, notificationService, configurationService, accessibilityService) { - Object(_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__["applyConfigurationValues"])(configurationService, options, false); - const themeDomRegistration = themeService.registerEditorContainer(domElement); - options = options || {}; - if (typeof options.theme === 'string') { - themeService.setTheme(options.theme); - } - let _model = options.model; - delete options.model; - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService, notificationService, accessibilityService); - this._contextViewService = contextViewService; - this._configurationService = configurationService; - this._standaloneThemeService = themeService; - this._register(toDispose); - this._register(themeDomRegistration); - let model; - if (typeof _model === 'undefined') { - model = self.monaco.editor.createModel(options.value || '', options.language || 'text/plain'); - this._ownsModel = true; + this.mouseController = this.createMouseController(_options); + this.disposables.add(this.mouseController); + this.onDidChangeFocus(this._onFocusChange, this, this.disposables); + this.onDidChangeSelection(this._onSelectionChange, this, this.disposables); + if (this.accessibilityProvider) { + this.ariaLabel = this.accessibilityProvider.getWidgetAriaLabel(); } - else { - model = _model; - this._ownsModel = false; - } - this._attachModel(model); - if (model) { - let e = { - oldModelUrl: null, - newModelUrl: model.uri - }; - this._onDidChangeModel.fire(e); + if (_options.multipleSelectionSupport) { + this.view.domNode.setAttribute('aria-multiselectable', 'true'); } } - dispose() { - super.dispose(); + get onDidChangeFocus() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(this.eventBufferer.wrapEvent(this.focus.onChange), e => this.toListEvent(e)); } - updateOptions(newOptions) { - Object(_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__["applyConfigurationValues"])(this._configurationService, newOptions, false); - if (typeof newOptions.theme === 'string') { - this._standaloneThemeService.setTheme(newOptions.theme); - } - super.updateOptions(newOptions); - } - _attachModel(model) { - super._attachModel(model); - if (this._modelData) { - this._contextViewService.setContainer(this._modelData.view.domNode.domNode); - } - } - _postDetachModelCleanup(detachedModel) { - super._postDetachModelCleanup(detachedModel); - if (detachedModel && this._ownsModel) { - detachedModel.dispose(); - this._ownsModel = false; - } - } -}; -StandaloneEditor = __decorate([ - __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__["IInstantiationService"]), - __param(4, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"]), - __param(5, _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__["ICommandService"]), - __param(6, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]), - __param(7, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__["IKeybindingService"]), - __param(8, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__["IContextViewService"]), - __param(9, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__["IStandaloneThemeService"]), - __param(10, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__["INotificationService"]), - __param(11, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__["IConfigurationService"]), - __param(12, _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], StandaloneEditor); - -let StandaloneDiffEditor = class StandaloneDiffEditor extends _browser_widget_diffEditorWidget_js__WEBPACK_IMPORTED_MODULE_4__["DiffEditorWidget"] { - constructor(domElement, options, toDispose, instantiationService, contextKeyService, keybindingService, contextViewService, editorWorkerService, codeEditorService, themeService, notificationService, configurationService, contextMenuService, editorProgressService, clipboardService) { - Object(_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__["applyConfigurationValues"])(configurationService, options, true); - const themeDomRegistration = themeService.registerEditorContainer(domElement); - options = options || {}; - if (typeof options.theme === 'string') { - options.theme = themeService.setTheme(options.theme); - } - super(domElement, options, clipboardService, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, editorProgressService); - this._contextViewService = contextViewService; - this._configurationService = configurationService; - this._standaloneThemeService = themeService; - this._register(toDispose); - this._register(themeDomRegistration); - this._contextViewService.setContainer(this._containerDomElement); + get onDidChangeSelection() { + return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].map(this.eventBufferer.wrapEvent(this.selection.onChange), e => this.toListEvent(e)); } - dispose() { - super.dispose(); + get domId() { return this.view.domId; } + get onMouseClick() { return this.view.onMouseClick; } + get onMouseDblClick() { return this.view.onMouseDblClick; } + get onMouseMiddleClick() { return this.view.onMouseMiddleClick; } + get onPointer() { return this.mouseController.onPointer; } + get onMouseDown() { return this.view.onMouseDown; } + get onTouchStart() { return this.view.onTouchStart; } + get onTap() { return this.view.onTap; } + get onContextMenu() { + const fromKeydown = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown')) + .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_8__["StandardKeyboardEvent"](e)) + .filter(e => this.didJustPressContextMenuKey = e.keyCode === 58 /* ContextMenu */ || (e.shiftKey && e.keyCode === 68 /* F10 */)) + .filter(e => { e.preventDefault(); e.stopPropagation(); return false; }) + .event; + const fromKeyup = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keyup')) + .filter(() => { + const didJustPressContextMenuKey = this.didJustPressContextMenuKey; + this.didJustPressContextMenuKey = false; + return didJustPressContextMenuKey; + }) + .filter(() => this.getFocus().length > 0 && !!this.view.domElement(this.getFocus()[0])) + .map(browserEvent => { + const index = this.getFocus()[0]; + const element = this.view.element(index); + const anchor = this.view.domElement(index); + return { index, element, anchor, browserEvent }; + }) + .event; + const fromMouse = _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].chain(this.view.onContextMenu) + .filter(() => !this.didJustPressContextMenuKey) + .map(({ element, index, browserEvent }) => ({ element, index, anchor: { x: browserEvent.clientX + 1, y: browserEvent.clientY }, browserEvent })) + .event; + return _common_event_js__WEBPACK_IMPORTED_MODULE_9__["Event"].any(fromKeydown, fromKeyup, fromMouse); } - updateOptions(newOptions) { - Object(_simpleServices_js__WEBPACK_IMPORTED_MODULE_7__["applyConfigurationValues"])(this._configurationService, newOptions, true); - if (typeof newOptions.theme === 'string') { - this._standaloneThemeService.setTheme(newOptions.theme); + get onKeyDown() { return Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.domNode, 'keydown'); } + createMouseController(options) { + return new MouseController(this); + } + updateOptions(optionsUpdate = {}) { + this._options = Object.assign(Object.assign({}, this._options), optionsUpdate); + if (this.typeLabelController) { + this.typeLabelController.updateOptions(this._options); } - super.updateOptions(newOptions); + this.view.updateOptions(optionsUpdate); } - _createInnerEditor(instantiationService, container, options) { - return instantiationService.createInstance(StandaloneCodeEditor, container, options); + get options() { + return this._options; } - getOriginalEditor() { - return super.getOriginalEditor(); + splice(start, deleteCount, elements = []) { + if (start < 0 || start > this.view.length) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid start index: ${start}`); + } + if (deleteCount < 0) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid delete count: ${deleteCount}`); + } + if (deleteCount === 0 && elements.length === 0) { + return; + } + this.eventBufferer.bufferEvents(() => this.spliceable.splice(start, deleteCount, elements)); } - getModifiedEditor() { - return super.getModifiedEditor(); + rerender() { + this.view.rerender(); } - addCommand(keybinding, handler, context) { - return this.getModifiedEditor().addCommand(keybinding, handler, context); + element(index) { + return this.view.element(index); } - createContextKey(key, defaultValue) { - return this.getModifiedEditor().createContextKey(key, defaultValue); + get length() { + return this.view.length; } - addAction(descriptor) { - return this.getModifiedEditor().addAction(descriptor); + get contentHeight() { + return this.view.contentHeight; } -}; -StandaloneDiffEditor = __decorate([ - __param(3, _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_14__["IInstantiationService"]), - __param(4, _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_12__["IContextKeyService"]), - __param(5, _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_15__["IKeybindingService"]), - __param(6, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__["IContextViewService"]), - __param(7, _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_6__["IEditorWorkerService"]), - __param(8, _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"]), - __param(9, _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_8__["IStandaloneThemeService"]), - __param(10, _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_16__["INotificationService"]), - __param(11, _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_11__["IConfigurationService"]), - __param(12, _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_13__["IContextMenuService"]), - __param(13, _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_21__["IEditorProgressService"]), - __param(14, _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_20__["IClipboardService"]) -], StandaloneDiffEditor); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js ***! - \**************************************************************************************************/ -/*! exports provided: StandaloneCodeEditorServiceImpl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneCodeEditorServiceImpl", function() { return StandaloneCodeEditorServiceImpl; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _browser_services_codeEditorServiceImpl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorServiceImpl.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class StandaloneCodeEditorServiceImpl extends _browser_services_codeEditorServiceImpl_js__WEBPACK_IMPORTED_MODULE_2__["CodeEditorServiceImpl"] { - getActiveCodeEditor() { - return null; // not supported in the standalone case + get scrollTop() { + return this.view.getScrollTop(); } - openCodeEditor(input, source, sideBySide) { - if (!source) { - return Promise.resolve(null); - } - return Promise.resolve(this.doOpenEditor(source, input)); + set scrollTop(scrollTop) { + this.view.setScrollTop(scrollTop); } - doOpenEditor(editor, input) { - const model = this.findModel(editor, input.resource); - if (!model) { - if (input.resource) { - const schema = input.resource.scheme; - if (schema === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__["Schemas"].http || schema === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__["Schemas"].https) { - // This is a fully qualified http or https URL - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["windowOpenNoOpener"])(input.resource.toString()); - return editor; - } - } - return null; - } - const selection = (input.options ? input.options.selection : null); - if (selection) { - if (typeof selection.endLineNumber === 'number' && typeof selection.endColumn === 'number') { - editor.setSelection(selection); - editor.revealRangeInCenter(selection, 1 /* Immediate */); - } - else { - const pos = { - lineNumber: selection.startLineNumber, - column: selection.startColumn - }; - editor.setPosition(pos); - editor.revealPositionInCenter(pos, 1 /* Immediate */); - } - } - return editor; + get ariaLabel() { + return this._ariaLabel; } - findModel(editor, resource) { - const model = editor.getModel(); - if (model && model.uri.toString() !== resource.toString()) { - return null; - } - return model; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js ***! - \*****************************************************************************************/ -/*! exports provided: create, onDidCreateEditor, createDiffEditor, createDiffNavigator, createModel, setModelLanguage, setModelMarkers, getModelMarkers, getModel, getModels, onDidCreateModel, onWillDisposeModel, onDidChangeModelLanguage, createWebWorker, colorizeElement, colorize, colorizeModelLine, tokenize, defineTheme, setTheme, remeasureFonts, createMonacoEditorAPI */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onDidCreateEditor", function() { return onDidCreateEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDiffEditor", function() { return createDiffEditor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDiffNavigator", function() { return createDiffNavigator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createModel", function() { return createModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setModelLanguage", function() { return setModelLanguage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setModelMarkers", function() { return setModelMarkers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModelMarkers", function() { return getModelMarkers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModel", function() { return getModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModels", function() { return getModels; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onDidCreateModel", function() { return onDidCreateModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onWillDisposeModel", function() { return onWillDisposeModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onDidChangeModelLanguage", function() { return onDidChangeModelLanguage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createWebWorker", function() { return createWebWorker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorizeElement", function() { return colorizeElement; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorize", function() { return colorize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorizeModelLine", function() { return colorizeModelLine; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenize", function() { return tokenize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineTheme", function() { return defineTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "remeasureFonts", function() { return remeasureFonts; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMonacoEditorAPI", function() { return createMonacoEditorAPI; }); -/* harmony import */ var _standalone_tokens_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./standalone-tokens.css */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _browser_services_openerService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/openerService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js"); -/* harmony import */ var _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../browser/widget/diffNavigator.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js"); -/* harmony import */ var _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/config/editorOptions.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"); -/* harmony import */ var _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/config/fontInfo.js */ "./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js"); -/* harmony import */ var _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/editorCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js"); -/* harmony import */ var _common_model_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/model.js */ "./node_modules/monaco-editor/esm/vs/editor/common/model.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/services/resolverService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"); -/* harmony import */ var _common_services_webWorker_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/services/webWorker.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/webWorker.js"); -/* harmony import */ var _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../common/standalone/standaloneEnums.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js"); -/* harmony import */ var _colorizer_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./colorizer.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js"); -/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./simpleServices.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js"); -/* harmony import */ var _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./standaloneCodeEditor.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js"); -/* harmony import */ var _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./standaloneServices.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js"); -/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/opener/common/opener.js */ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _browser_config_configuration_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../browser/config/configuration.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/config/configuration.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function withAllStandaloneServices(domElement, override, callback) { - let services = new _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["DynamicStandaloneServices"](domElement, override); - let simpleEditorModelResolverService = null; - if (!services.has(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__["ITextModelService"])) { - simpleEditorModelResolverService = new _simpleServices_js__WEBPACK_IMPORTED_MODULE_15__["SimpleEditorModelResolverService"](_standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get()); - services.set(_common_services_resolverService_js__WEBPACK_IMPORTED_MODULE_11__["ITextModelService"], simpleEditorModelResolverService); + set ariaLabel(value) { + this._ariaLabel = value; + this.view.domNode.setAttribute('aria-label', value); } - if (!services.has(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_26__["IOpenerService"])) { - services.set(_platform_opener_common_opener_js__WEBPACK_IMPORTED_MODULE_26__["IOpenerService"], new _browser_services_openerService_js__WEBPACK_IMPORTED_MODULE_2__["OpenerService"](services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__["ICodeEditorService"]), services.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_19__["ICommandService"]))); + domFocus() { + this.view.domNode.focus(); } - let result = callback(services); - if (simpleEditorModelResolverService) { - simpleEditorModelResolverService.setEditor(result); + layout(height, width) { + this.view.layout(height, width); } - return result; -} -/** - * Create a new editor under `domElement`. - * `domElement` should be empty (not contain other dom nodes). - * The editor will read the size of `domElement`. - */ -function create(domElement, options, override) { - return withAllStandaloneServices(domElement, override || {}, (services) => { - return new _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_16__["StandaloneEditor"](domElement, options, services, services.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__["IInstantiationService"]), services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__["ICodeEditorService"]), services.get(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_19__["ICommandService"]), services.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_21__["IContextKeyService"]), services.get(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_24__["IKeybindingService"]), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_22__["IContextViewService"]), services.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_18__["IStandaloneThemeService"]), services.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_25__["INotificationService"]), services.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_20__["IConfigurationService"]), services.get(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_27__["IAccessibilityService"])); - }); -} -/** - * Emitted when an editor is created. - * Creating a diff editor might cause this listener to be invoked with the two editors. - * @event - */ -function onDidCreateEditor(listener) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].codeEditorService.get().onCodeEditorAdd((editor) => { - listener(editor); - }); -} -/** - * Create a new diff editor under `domElement`. - * `domElement` should be empty (not contain other dom nodes). - * The editor will read the size of `domElement`. - */ -function createDiffEditor(domElement, options, override) { - return withAllStandaloneServices(domElement, override || {}, (services) => { - return new _standaloneCodeEditor_js__WEBPACK_IMPORTED_MODULE_16__["StandaloneDiffEditor"](domElement, options, services, services.get(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__["IInstantiationService"]), services.get(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_21__["IContextKeyService"]), services.get(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_24__["IKeybindingService"]), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_22__["IContextViewService"]), services.get(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_10__["IEditorWorkerService"]), services.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_1__["ICodeEditorService"]), services.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_18__["IStandaloneThemeService"]), services.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_25__["INotificationService"]), services.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_20__["IConfigurationService"]), services.get(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_22__["IContextMenuService"]), services.get(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_29__["IEditorProgressService"]), services.get(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_30__["IClipboardService"])); - }); -} -function createDiffNavigator(diffEditor, opts) { - return new _browser_widget_diffNavigator_js__WEBPACK_IMPORTED_MODULE_3__["DiffNavigator"](diffEditor, opts); -} -function doCreateModel(value, languageSelection, uri) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().createModel(value, languageSelection, uri); -} -/** - * Create a new editor model. - * You can specify the language that should be set for this model or let the language be inferred from the `uri`. - */ -function createModel(value, language, uri) { - value = value || ''; - if (!language) { - let firstLF = value.indexOf('\n'); - let firstLine = value; - if (firstLF !== -1) { - firstLine = value.substring(0, firstLF); + setSelection(indexes, browserEvent) { + for (const index of indexes) { + if (index < 0 || index >= this.length) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); + } } - return doCreateModel(value, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get().createByFilepathOrFirstLine(uri || null, firstLine), uri); - } - return doCreateModel(value, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get().create(language), uri); -} -/** - * Change the language for a model. - */ -function setModelLanguage(model, languageId) { - _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().setMode(model, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get().create(languageId)); -} -/** - * Set the markers for a model. - */ -function setModelMarkers(model, owner, markers) { - if (model) { - _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].markerService.get().changeOne(owner, model.uri, markers); - } -} -/** - * Get markers for owner and/or resource - * - * @returns list of markers - */ -function getModelMarkers(filter) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].markerService.get().read(filter); -} -/** - * Get the model that has `uri` if it exists. - */ -function getModel(uri) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().getModel(uri); -} -/** - * Get all the created models. - */ -function getModels() { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().getModels(); -} -/** - * Emitted when a model is created. - * @event - */ -function onDidCreateModel(listener) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().onModelAdded(listener); -} -/** - * Emitted right before a model is disposed. - * @event - */ -function onWillDisposeModel(listener) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().onModelRemoved(listener); -} -/** - * Emitted when a different language is set to a model. - * @event - */ -function onDidChangeModelLanguage(listener) { - return _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get().onModelModeChanged((e) => { - listener({ - model: e.model, - oldLanguage: e.oldModeId - }); - }); -} -/** - * Create a new web worker that has model syncing capabilities built in. - * Specify an AMD module to load that will `create` an object that will be proxied. - */ -function createWebWorker(opts) { - return Object(_common_services_webWorker_js__WEBPACK_IMPORTED_MODULE_12__["createWebWorker"])(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modelService.get(), opts); -} -/** - * Colorize the contents of `domNode` using attribute `data-lang`. - */ -function colorizeElement(domNode, options) { - const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].standaloneThemeService.get(); - themeService.registerEditorContainer(domNode); - return _colorizer_js__WEBPACK_IMPORTED_MODULE_14__["Colorizer"].colorizeElement(themeService, _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get(), domNode, options); -} -/** - * Colorize `text` using language `languageId`. - */ -function colorize(text, languageId, options) { - const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].standaloneThemeService.get(); - themeService.registerEditorContainer(document.body); - return _colorizer_js__WEBPACK_IMPORTED_MODULE_14__["Colorizer"].colorize(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get(), text, languageId, options); -} -/** - * Colorize a line in a model. - */ -function colorizeModelLine(model, lineNumber, tabSize = 4) { - const themeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].standaloneThemeService.get(); - themeService.registerEditorContainer(document.body); - return _colorizer_js__WEBPACK_IMPORTED_MODULE_14__["Colorizer"].colorizeModelLine(model, lineNumber, tabSize); -} -/** - * @internal - */ -function getSafeTokenizationSupport(language) { - let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_8__["TokenizationRegistry"].get(language); - if (tokenizationSupport) { - return tokenizationSupport; - } - return { - getInitialState: () => _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__["NULL_STATE"], - tokenize: (line, state, deltaOffset) => Object(_common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_9__["nullTokenize"])(language, line, state, deltaOffset) - }; -} -/** - * Tokenize `text` using language `languageId` - */ -function tokenize(text, languageId) { - let modeService = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].modeService.get(); - // Needed in order to get the mode registered for subsequent look-ups - modeService.triggerMode(languageId); - let tokenizationSupport = getSafeTokenizationSupport(languageId); - let lines = text.split(/\r\n|\r|\n/); - let result = []; - let state = tokenizationSupport.getInitialState(); - for (let i = 0, len = lines.length; i < len; i++) { - let line = lines[i]; - let tokenizationResult = tokenizationSupport.tokenize(line, state, 0); - result[i] = tokenizationResult.tokens; - state = tokenizationResult.endState; + this.selection.set(indexes, browserEvent); } - return result; -} -/** - * Define a new theme or update an existing theme. - */ -function defineTheme(themeName, themeData) { - _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].standaloneThemeService.get().defineTheme(themeName, themeData); -} -/** - * Switches to a theme. - */ -function setTheme(themeName) { - _standaloneServices_js__WEBPACK_IMPORTED_MODULE_17__["StaticServices"].standaloneThemeService.get().setTheme(themeName); -} -/** - * Clears all cached font measurements and triggers re-measurement. - */ -function remeasureFonts() { - Object(_browser_config_configuration_js__WEBPACK_IMPORTED_MODULE_28__["clearAllFontInfos"])(); -} -/** - * @internal - */ -function createMonacoEditorAPI() { - return { - // methods - create: create, - onDidCreateEditor: onDidCreateEditor, - createDiffEditor: createDiffEditor, - createDiffNavigator: createDiffNavigator, - createModel: createModel, - setModelLanguage: setModelLanguage, - setModelMarkers: setModelMarkers, - getModelMarkers: getModelMarkers, - getModels: getModels, - getModel: getModel, - onDidCreateModel: onDidCreateModel, - onWillDisposeModel: onWillDisposeModel, - onDidChangeModelLanguage: onDidChangeModelLanguage, - createWebWorker: createWebWorker, - colorizeElement: colorizeElement, - colorize: colorize, - colorizeModelLine: colorizeModelLine, - tokenize: tokenize, - defineTheme: defineTheme, - setTheme: setTheme, - remeasureFonts: remeasureFonts, - // enums - AccessibilitySupport: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["AccessibilitySupport"], - ContentWidgetPositionPreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["ContentWidgetPositionPreference"], - CursorChangeReason: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["CursorChangeReason"], - DefaultEndOfLine: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["DefaultEndOfLine"], - EditorAutoIndentStrategy: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["EditorAutoIndentStrategy"], - EditorOption: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["EditorOption"], - EndOfLinePreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["EndOfLinePreference"], - EndOfLineSequence: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["EndOfLineSequence"], - MinimapPosition: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["MinimapPosition"], - MouseTargetType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["MouseTargetType"], - OverlayWidgetPositionPreference: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["OverlayWidgetPositionPreference"], - OverviewRulerLane: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["OverviewRulerLane"], - RenderLineNumbersType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["RenderLineNumbersType"], - RenderMinimap: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["RenderMinimap"], - ScrollbarVisibility: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["ScrollbarVisibility"], - ScrollType: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["ScrollType"], - TextEditorCursorBlinkingStyle: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["TextEditorCursorBlinkingStyle"], - TextEditorCursorStyle: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["TextEditorCursorStyle"], - TrackedRangeStickiness: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["TrackedRangeStickiness"], - WrappingIndent: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_13__["WrappingIndent"], - // classes - ConfigurationChangedEvent: _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["ConfigurationChangedEvent"], - BareFontInfo: _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__["BareFontInfo"], - FontInfo: _common_config_fontInfo_js__WEBPACK_IMPORTED_MODULE_5__["FontInfo"], - TextModelResolvedOptions: _common_model_js__WEBPACK_IMPORTED_MODULE_7__["TextModelResolvedOptions"], - FindMatch: _common_model_js__WEBPACK_IMPORTED_MODULE_7__["FindMatch"], - // vars - EditorType: _common_editorCommon_js__WEBPACK_IMPORTED_MODULE_6__["EditorType"], - EditorOptions: _common_config_editorOptions_js__WEBPACK_IMPORTED_MODULE_4__["EditorOptions"] - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js ***! - \********************************************************************************************/ -/*! exports provided: register, getLanguages, getEncodedLanguageId, onLanguage, setLanguageConfiguration, EncodedTokenizationSupport2Adapter, TokenizationSupport2Adapter, setTokensProvider, setMonarchTokensProvider, registerReferenceProvider, registerRenameProvider, registerSignatureHelpProvider, registerHoverProvider, registerDocumentSymbolProvider, registerDocumentHighlightProvider, registerOnTypeRenameProvider, registerDefinitionProvider, registerImplementationProvider, registerTypeDefinitionProvider, registerCodeLensProvider, registerCodeActionProvider, registerDocumentFormattingEditProvider, registerDocumentRangeFormattingEditProvider, registerOnTypeFormattingEditProvider, registerLinkProvider, registerCompletionItemProvider, registerColorProvider, registerFoldingRangeProvider, registerDeclarationProvider, registerSelectionRangeProvider, registerDocumentSemanticTokensProvider, registerDocumentRangeSemanticTokensProvider, createMonacoLanguagesAPI */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "register", function() { return register; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLanguages", function() { return getLanguages; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEncodedLanguageId", function() { return getEncodedLanguageId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLanguage", function() { return onLanguage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLanguageConfiguration", function() { return setLanguageConfiguration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EncodedTokenizationSupport2Adapter", function() { return EncodedTokenizationSupport2Adapter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenizationSupport2Adapter", function() { return TokenizationSupport2Adapter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTokensProvider", function() { return setTokensProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMonarchTokensProvider", function() { return setMonarchTokensProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerReferenceProvider", function() { return registerReferenceProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerRenameProvider", function() { return registerRenameProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerSignatureHelpProvider", function() { return registerSignatureHelpProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerHoverProvider", function() { return registerHoverProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentSymbolProvider", function() { return registerDocumentSymbolProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentHighlightProvider", function() { return registerDocumentHighlightProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerOnTypeRenameProvider", function() { return registerOnTypeRenameProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDefinitionProvider", function() { return registerDefinitionProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerImplementationProvider", function() { return registerImplementationProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTypeDefinitionProvider", function() { return registerTypeDefinitionProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerCodeLensProvider", function() { return registerCodeLensProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerCodeActionProvider", function() { return registerCodeActionProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentFormattingEditProvider", function() { return registerDocumentFormattingEditProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentRangeFormattingEditProvider", function() { return registerDocumentRangeFormattingEditProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerOnTypeFormattingEditProvider", function() { return registerOnTypeFormattingEditProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLinkProvider", function() { return registerLinkProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerCompletionItemProvider", function() { return registerCompletionItemProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerColorProvider", function() { return registerColorProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerFoldingRangeProvider", function() { return registerFoldingRangeProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDeclarationProvider", function() { return registerDeclarationProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerSelectionRangeProvider", function() { return registerSelectionRangeProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentSemanticTokensProvider", function() { return registerDocumentSemanticTokensProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerDocumentRangeSemanticTokensProvider", function() { return registerDocumentRangeSemanticTokensProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMonacoLanguagesAPI", function() { return createMonacoLanguagesAPI; }); -/* harmony import */ var _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/core/range.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/range.js"); -/* harmony import */ var _common_core_token_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/core/token.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes/languageConfigurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js"); -/* harmony import */ var _common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/modesRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js"); -/* harmony import */ var _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/standalone/standaloneEnums.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js"); -/* harmony import */ var _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./standaloneServices.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js"); -/* harmony import */ var _common_monarch_monarchCompile_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/monarch/monarchCompile.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js"); -/* harmony import */ var _common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/monarch/monarchLexer.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - -/** - * Register information about a new language. - */ -function register(language) { - _common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_4__["ModesRegistry"].registerLanguage(language); -} -/** - * Get the information of all the registered languages. - */ -function getLanguages() { - let result = []; - result = result.concat(_common_modes_modesRegistry_js__WEBPACK_IMPORTED_MODULE_4__["ModesRegistry"].getLanguages()); - return result; -} -function getEncodedLanguageId(languageId) { - let lid = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].modeService.get().getLanguageIdentifier(languageId); - return lid ? lid.id : 0; -} -/** - * An event emitted when a language is first time needed (e.g. a model has it set). - * @event - */ -function onLanguage(languageId, callback) { - let disposable = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].modeService.get().onDidCreateMode((mode) => { - if (mode.getId() === languageId) { - // stop listening - disposable.dispose(); - // invoke actual listener - callback(); - } - }); - return disposable; -} -/** - * Set the editing configuration for a language. - */ -function setLanguageConfiguration(languageId, configuration) { - let languageIdentifier = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].modeService.get().getLanguageIdentifier(languageId); - if (!languageIdentifier) { - throw new Error(`Cannot set configuration for unknown language ${languageId}`); + getSelection() { + return this.selection.get(); } - return _common_modes_languageConfigurationRegistry_js__WEBPACK_IMPORTED_MODULE_3__["LanguageConfigurationRegistry"].register(languageIdentifier, configuration); -} -/** - * @internal - */ -class EncodedTokenizationSupport2Adapter { - constructor(actual) { - this._actual = actual; + getSelectedElements() { + return this.getSelection().map(i => this.view.element(i)); } - getInitialState() { - return this._actual.getInitialState(); + setFocus(indexes, browserEvent) { + for (const index of indexes) { + if (index < 0 || index >= this.length) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); + } + } + this.focus.set(indexes, browserEvent); } - tokenize(line, state, offsetDelta) { - throw new Error('Not supported!'); + focusNext(n = 1, loop = false, browserEvent, filter) { + if (this.length === 0) { + return; + } + const focus = this.focus.get(); + const index = this.findNextIndex(focus.length > 0 ? focus[0] + n : 0, loop, filter); + if (index > -1) { + this.setFocus([index], browserEvent); + } } - tokenize2(line, state) { - let result = this._actual.tokenizeEncoded(line, state); - return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationResult2"](result.tokens, result.endState); + focusPrevious(n = 1, loop = false, browserEvent, filter) { + if (this.length === 0) { + return; + } + const focus = this.focus.get(); + const index = this.findPreviousIndex(focus.length > 0 ? focus[0] - n : 0, loop, filter); + if (index > -1) { + this.setFocus([index], browserEvent); + } } -} -/** - * @internal - */ -class TokenizationSupport2Adapter { - constructor(standaloneThemeService, languageIdentifier, actual) { - this._standaloneThemeService = standaloneThemeService; - this._languageIdentifier = languageIdentifier; - this._actual = actual; - } - getInitialState() { - return this._actual.getInitialState(); - } - _toClassicTokens(tokens, language, offsetDelta) { - let result = []; - let previousStartIndex = 0; - for (let i = 0, len = tokens.length; i < len; i++) { - const t = tokens[i]; - let startIndex = t.startIndex; - // Prevent issues stemming from a buggy external tokenizer. - if (i === 0) { - // Force first token to start at first index! - startIndex = 0; + focusNextPage(browserEvent, filter) { + let lastPageIndex = this.view.indexAt(this.view.getScrollTop() + this.view.renderHeight); + lastPageIndex = lastPageIndex === 0 ? 0 : lastPageIndex - 1; + const lastPageElement = this.view.element(lastPageIndex); + const currentlyFocusedElement = this.getFocusedElements()[0]; + if (currentlyFocusedElement !== lastPageElement) { + const lastGoodPageIndex = this.findPreviousIndex(lastPageIndex, false, filter); + if (lastGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(lastGoodPageIndex)) { + this.setFocus([lastGoodPageIndex], browserEvent); } - else if (startIndex < previousStartIndex) { - // Force tokens to be after one another! - startIndex = previousStartIndex; + else { + this.setFocus([lastPageIndex], browserEvent); + } + } + else { + const previousScrollTop = this.view.getScrollTop(); + this.view.setScrollTop(previousScrollTop + this.view.renderHeight - this.view.elementHeight(lastPageIndex)); + if (this.view.getScrollTop() !== previousScrollTop) { + // Let the scroll event listener run + setTimeout(() => this.focusNextPage(browserEvent, filter), 0); } - result[i] = new _common_core_token_js__WEBPACK_IMPORTED_MODULE_1__["Token"](startIndex + offsetDelta, t.scopes, language); - previousStartIndex = startIndex; } - return result; } - tokenize(line, state, offsetDelta) { - let actualResult = this._actual.tokenize(line, state); - let tokens = this._toClassicTokens(actualResult.tokens, this._languageIdentifier.language, offsetDelta); - let endState; - // try to save an object if possible - if (actualResult.endState.equals(state)) { - endState = state; + focusPreviousPage(browserEvent, filter) { + let firstPageIndex; + const scrollTop = this.view.getScrollTop(); + if (scrollTop === 0) { + firstPageIndex = this.view.indexAt(scrollTop); } else { - endState = actualResult.endState; - } - return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationResult"](tokens, endState); - } - _toBinaryTokens(tokens, offsetDelta) { - const languageId = this._languageIdentifier.id; - const tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme; - let result = [], resultLen = 0; - let previousStartIndex = 0; - for (let i = 0, len = tokens.length; i < len; i++) { - const t = tokens[i]; - const metadata = tokenTheme.match(languageId, t.scopes); - if (resultLen > 0 && result[resultLen - 1] === metadata) { - // same metadata - continue; - } - let startIndex = t.startIndex; - // Prevent issues stemming from a buggy external tokenizer. - if (i === 0) { - // Force first token to start at first index! - startIndex = 0; + firstPageIndex = this.view.indexAfter(scrollTop - 1); + } + const firstPageElement = this.view.element(firstPageIndex); + const currentlyFocusedElement = this.getFocusedElements()[0]; + if (currentlyFocusedElement !== firstPageElement) { + const firstGoodPageIndex = this.findNextIndex(firstPageIndex, false, filter); + if (firstGoodPageIndex > -1 && currentlyFocusedElement !== this.view.element(firstGoodPageIndex)) { + this.setFocus([firstGoodPageIndex], browserEvent); } - else if (startIndex < previousStartIndex) { - // Force tokens to be after one another! - startIndex = previousStartIndex; + else { + this.setFocus([firstPageIndex], browserEvent); } - result[resultLen++] = startIndex + offsetDelta; - result[resultLen++] = metadata; - previousStartIndex = startIndex; } - let actualResult = new Uint32Array(resultLen); - for (let i = 0; i < resultLen; i++) { - actualResult[i] = result[i]; + else { + const previousScrollTop = scrollTop; + this.view.setScrollTop(scrollTop - this.view.renderHeight); + if (this.view.getScrollTop() !== previousScrollTop) { + // Let the scroll event listener run + setTimeout(() => this.focusPreviousPage(browserEvent, filter), 0); + } } - return actualResult; } - tokenize2(line, state, offsetDelta) { - let actualResult = this._actual.tokenize(line, state); - let tokens = this._toBinaryTokens(actualResult.tokens, offsetDelta); - let endState; - // try to save an object if possible - if (actualResult.endState.equals(state)) { - endState = state; + focusLast(browserEvent, filter) { + if (this.length === 0) { + return; } - else { - endState = actualResult.endState; + const index = this.findPreviousIndex(this.length - 1, false, filter); + if (index > -1) { + this.setFocus([index], browserEvent); } - return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationResult2"](tokens, endState); } -} -function isEncodedTokensProvider(provider) { - return 'tokenizeEncoded' in provider; -} -function isThenable(obj) { - return obj && typeof obj.then === 'function'; -} -/** - * Set the tokens provider for a language (manual implementation). - */ -function setTokensProvider(languageId, provider) { - let languageIdentifier = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].modeService.get().getLanguageIdentifier(languageId); - if (!languageIdentifier) { - throw new Error(`Cannot set tokens provider for unknown language ${languageId}`); + focusFirst(browserEvent, filter) { + this.focusNth(0, browserEvent, filter); } - const create = (provider) => { - if (isEncodedTokensProvider(provider)) { - return new EncodedTokenizationSupport2Adapter(provider); + focusNth(n, browserEvent, filter) { + if (this.length === 0) { + return; } - else { - return new TokenizationSupport2Adapter(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].standaloneThemeService.get(), languageIdentifier, provider); + const index = this.findNextIndex(n, false, filter); + if (index > -1) { + this.setFocus([index], browserEvent); } - }; - if (isThenable(provider)) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].registerPromise(languageId, provider.then(provider => create(provider))); } - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].register(languageId, create(provider)); -} -/** - * Set the tokens provider for a language (monarch implementation). - */ -function setMonarchTokensProvider(languageId, languageDef) { - const create = (languageDef) => { - return Object(_common_monarch_monarchLexer_js__WEBPACK_IMPORTED_MODULE_8__["createTokenizationSupport"])(_standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].modeService.get(), _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].standaloneThemeService.get(), languageId, Object(_common_monarch_monarchCompile_js__WEBPACK_IMPORTED_MODULE_7__["compile"])(languageId, languageDef)); - }; - if (isThenable(languageDef)) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].registerPromise(languageId, languageDef.then(languageDef => create(languageDef))); + findNextIndex(index, loop = false, filter) { + for (let i = 0; i < this.length; i++) { + if (index >= this.length && !loop) { + return -1; + } + index = index % this.length; + if (!filter || filter(this.element(index))) { + return index; + } + index++; + } + return -1; } - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["TokenizationRegistry"].register(languageId, create(languageDef)); -} -/** - * Register a reference provider (used by e.g. reference search). - */ -function registerReferenceProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["ReferenceProviderRegistry"].register(languageId, provider); -} -/** - * Register a rename provider (used by e.g. rename symbol). - */ -function registerRenameProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["RenameProviderRegistry"].register(languageId, provider); -} -/** - * Register a signature help provider (used by e.g. parameter hints). - */ -function registerSignatureHelpProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["SignatureHelpProviderRegistry"].register(languageId, provider); -} -/** - * Register a hover provider (used by e.g. editor hover). - */ -function registerHoverProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["HoverProviderRegistry"].register(languageId, { - provideHover: (model, position, token) => { - let word = model.getWordAtPosition(position); - return Promise.resolve(provider.provideHover(model, position, token)).then((value) => { - if (!value) { - return undefined; - } - if (!value.range && word) { - value.range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); - } - if (!value.range) { - value.range = new _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"](position.lineNumber, position.column, position.lineNumber, position.column); - } - return value; - }); + findPreviousIndex(index, loop = false, filter) { + for (let i = 0; i < this.length; i++) { + if (index < 0 && !loop) { + return -1; + } + index = (this.length + (index % this.length)) % this.length; + if (!filter || filter(this.element(index))) { + return index; + } + index--; } - }); -} -/** - * Register a document symbol provider (used by e.g. outline). - */ -function registerDocumentSymbolProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentSymbolProviderRegistry"].register(languageId, provider); -} -/** - * Register a document highlight provider (used by e.g. highlight occurrences). - */ -function registerDocumentHighlightProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentHighlightProviderRegistry"].register(languageId, provider); -} -/** - * Register an on type rename provider. - */ -function registerOnTypeRenameProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["OnTypeRenameProviderRegistry"].register(languageId, provider); -} -/** - * Register a definition provider (used by e.g. go to definition). - */ -function registerDefinitionProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DefinitionProviderRegistry"].register(languageId, provider); -} -/** - * Register a implementation provider (used by e.g. go to implementation). - */ -function registerImplementationProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["ImplementationProviderRegistry"].register(languageId, provider); -} -/** - * Register a type definition provider (used by e.g. go to type definition). - */ -function registerTypeDefinitionProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["TypeDefinitionProviderRegistry"].register(languageId, provider); -} -/** - * Register a code lens provider (used by e.g. inline code lenses). - */ -function registerCodeLensProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["CodeLensProviderRegistry"].register(languageId, provider); -} -/** - * Register a code action provider (used by e.g. quick fix). - */ -function registerCodeActionProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["CodeActionProviderRegistry"].register(languageId, { - provideCodeActions: (model, range, context, token) => { - let markers = _standaloneServices_js__WEBPACK_IMPORTED_MODULE_6__["StaticServices"].markerService.get().read({ resource: model.uri }).filter(m => { - return _common_core_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].areIntersectingOrTouching(m, range); - }); - return provider.provideCodeActions(model, range, { markers, only: context.only }, token); + return -1; + } + getFocus() { + return this.focus.get(); + } + getFocusedElements() { + return this.getFocus().map(i => this.view.element(i)); + } + reveal(index, relativeTop) { + if (index < 0 || index >= this.length) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); } - }); -} -/** - * Register a formatter that can handle only entire models. - */ -function registerDocumentFormattingEditProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentFormattingEditProviderRegistry"].register(languageId, provider); -} -/** - * Register a formatter that can handle a range inside a model. - */ -function registerDocumentRangeFormattingEditProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentRangeFormattingEditProviderRegistry"].register(languageId, provider); -} -/** - * Register a formatter than can do formatting as the user types. - */ -function registerOnTypeFormattingEditProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["OnTypeFormattingEditProviderRegistry"].register(languageId, provider); -} -/** - * Register a link provider that can find links in text. - */ -function registerLinkProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["LinkProviderRegistry"].register(languageId, provider); -} -/** - * Register a completion item provider (use by e.g. suggestions). - */ -function registerCompletionItemProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["CompletionProviderRegistry"].register(languageId, provider); -} -/** - * Register a document color provider (used by Color Picker, Color Decorator). - */ -function registerColorProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["ColorProviderRegistry"].register(languageId, provider); -} -/** - * Register a folding range provider - */ -function registerFoldingRangeProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["FoldingRangeProviderRegistry"].register(languageId, provider); -} -/** - * Register a declaration provider - */ -function registerDeclarationProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DeclarationProviderRegistry"].register(languageId, provider); -} -/** - * Register a selection range provider - */ -function registerSelectionRangeProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["SelectionRangeRegistry"].register(languageId, provider); -} -/** - * Register a document semantic tokens provider - */ -function registerDocumentSemanticTokensProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentSemanticTokensProviderRegistry"].register(languageId, provider); -} -/** - * Register a document range semantic tokens provider - */ -function registerDocumentRangeSemanticTokensProvider(languageId, provider) { - return _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["DocumentRangeSemanticTokensProviderRegistry"].register(languageId, provider); -} -/** - * @internal - */ -function createMonacoLanguagesAPI() { - return { - register: register, - getLanguages: getLanguages, - onLanguage: onLanguage, - getEncodedLanguageId: getEncodedLanguageId, - // provider methods - setLanguageConfiguration: setLanguageConfiguration, - setTokensProvider: setTokensProvider, - setMonarchTokensProvider: setMonarchTokensProvider, - registerReferenceProvider: registerReferenceProvider, - registerRenameProvider: registerRenameProvider, - registerCompletionItemProvider: registerCompletionItemProvider, - registerSignatureHelpProvider: registerSignatureHelpProvider, - registerHoverProvider: registerHoverProvider, - registerDocumentSymbolProvider: registerDocumentSymbolProvider, - registerDocumentHighlightProvider: registerDocumentHighlightProvider, - registerOnTypeRenameProvider: registerOnTypeRenameProvider, - registerDefinitionProvider: registerDefinitionProvider, - registerImplementationProvider: registerImplementationProvider, - registerTypeDefinitionProvider: registerTypeDefinitionProvider, - registerCodeLensProvider: registerCodeLensProvider, - registerCodeActionProvider: registerCodeActionProvider, - registerDocumentFormattingEditProvider: registerDocumentFormattingEditProvider, - registerDocumentRangeFormattingEditProvider: registerDocumentRangeFormattingEditProvider, - registerOnTypeFormattingEditProvider: registerOnTypeFormattingEditProvider, - registerLinkProvider: registerLinkProvider, - registerColorProvider: registerColorProvider, - registerFoldingRangeProvider: registerFoldingRangeProvider, - registerDeclarationProvider: registerDeclarationProvider, - registerSelectionRangeProvider: registerSelectionRangeProvider, - registerDocumentSemanticTokensProvider: registerDocumentSemanticTokensProvider, - registerDocumentRangeSemanticTokensProvider: registerDocumentRangeSemanticTokensProvider, - // enums - DocumentHighlightKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["DocumentHighlightKind"], - CompletionItemKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"], - CompletionItemTag: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["CompletionItemTag"], - CompletionItemInsertTextRule: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["CompletionItemInsertTextRule"], - SymbolKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["SymbolKind"], - SymbolTag: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["SymbolTag"], - IndentAction: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["IndentAction"], - CompletionTriggerKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["CompletionTriggerKind"], - SignatureHelpTriggerKind: _common_standalone_standaloneEnums_js__WEBPACK_IMPORTED_MODULE_5__["SignatureHelpTriggerKind"], - // classes - FoldingRangeKind: _common_modes_js__WEBPACK_IMPORTED_MODULE_2__["FoldingRangeKind"], - }; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js": -/*!*******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js ***! - \*******************************************************************************************/ -/*! exports provided: StaticServices, DynamicStandaloneServices */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StaticServices", function() { return StaticServices; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicStandaloneServices", function() { return DynamicStandaloneServices; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../browser/services/bulkEditService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js"); -/* harmony import */ var _browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../browser/services/codeEditorService.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"); -/* harmony import */ var _common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/services/editorWorkerService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js"); -/* harmony import */ var _common_services_editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/services/editorWorkerServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerServiceImpl.js"); -/* harmony import */ var _common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/services/modeService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js"); -/* harmony import */ var _common_services_modeServiceImpl_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/services/modeServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modeServiceImpl.js"); -/* harmony import */ var _common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/services/modelService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"); -/* harmony import */ var _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/services/modelServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/modelServiceImpl.js"); -/* harmony import */ var _common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/services/textResourceConfigurationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js"); -/* harmony import */ var _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./simpleServices.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/simpleServices.js"); -/* harmony import */ var _standaloneCodeServiceImpl_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./standaloneCodeServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeServiceImpl.js"); -/* harmony import */ var _standaloneThemeServiceImpl_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./standaloneThemeServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js"); -/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/standaloneThemeService.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js"); -/* harmony import */ var _platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../platform/actions/common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../platform/commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../platform/configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _platform_contextkey_browser_contextKeyService_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../platform/contextkey/browser/contextKeyService.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js"); -/* harmony import */ var _platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../platform/contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _platform_contextview_browser_contextMenuService_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextMenuService.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js"); -/* harmony import */ var _platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _platform_contextview_browser_contextViewService_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../platform/contextview/browser/contextViewService.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js"); -/* harmony import */ var _platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../platform/dialogs/common/dialogs.js */ "./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js"); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiationService.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js"); -/* harmony import */ var _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../../platform/instantiation/common/serviceCollection.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js"); -/* harmony import */ var _platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../platform/keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../platform/label/common/label.js */ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js"); -/* harmony import */ var _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../../platform/list/browser/listService.js */ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js"); -/* harmony import */ var _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../platform/log/common/log.js */ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js"); -/* harmony import */ var _platform_markers_common_markerService_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../../platform/markers/common/markerService.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js"); -/* harmony import */ var _platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../platform/markers/common/markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../../platform/notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../../platform/progress/common/progress.js */ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"); -/* harmony import */ var _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../../platform/storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../../platform/telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../../platform/workspace/common/workspace.js */ "./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js"); -/* harmony import */ var _platform_actions_common_menuService_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../../platform/actions/common/menuService.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js"); -/* harmony import */ var _common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../common/services/markersDecorationService.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js"); -/* harmony import */ var _common_services_markerDecorationsServiceImpl_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../common/services/markerDecorationsServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsServiceImpl.js"); -/* harmony import */ var _platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../platform/layout/browser/layoutService.js */ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js"); -/* harmony import */ var _platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../../platform/instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _platform_accessibility_common_accessibilityService_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../../platform/accessibility/common/accessibilityService.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js"); -/* harmony import */ var _platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../../platform/clipboard/common/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"); -/* harmony import */ var _platform_clipboard_browser_clipboardService_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../../platform/clipboard/browser/clipboardService.js */ "./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js"); -/* harmony import */ var _platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedo.js */ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js"); -/* harmony import */ var _platform_undoRedo_common_undoRedoService_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../../platform/undoRedo/common/undoRedoService.js */ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js"); -/* harmony import */ var _quickInput_standaloneQuickInputServiceImpl_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./quickInput/standaloneQuickInputServiceImpl.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputServiceImpl.js"); -/* harmony import */ var _platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../platform/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/* harmony import */ var _platform_userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../../platform/userDataSync/common/storageKeys.js */ "./node_modules/monaco-editor/esm/vs/platform/userDataSync/common/storageKeys.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -var StaticServices; -(function (StaticServices) { - const _serviceCollection = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__["ServiceCollection"](); - class LazyStaticService { - constructor(serviceId, factory) { - this._serviceId = serviceId; - this._factory = factory; - this._value = null; + const scrollTop = this.view.getScrollTop(); + const elementTop = this.view.elementTop(index); + const elementHeight = this.view.elementHeight(index); + if (Object(_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isNumber"])(relativeTop)) { + // y = mx + b + const m = elementHeight - this.view.renderHeight; + this.view.setScrollTop(m * Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_16__["clamp"])(relativeTop, 0, 1) + elementTop); } - get id() { return this._serviceId; } - get(overrides) { - if (!this._value) { - if (overrides) { - this._value = overrides[this._serviceId.toString()]; - } - if (!this._value) { - this._value = this._factory(overrides); - } - if (!this._value) { - throw new Error('Service ' + this._serviceId + ' is missing!'); - } - _serviceCollection.set(this._serviceId, this._value); - } - return this._value; - } - } - StaticServices.LazyStaticService = LazyStaticService; - let _all = []; - function define(serviceId, factory) { - let r = new LazyStaticService(serviceId, factory); - _all.push(r); - return r; - } - function init(overrides) { - // Create a fresh service collection - let result = new _platform_instantiation_common_serviceCollection_js__WEBPACK_IMPORTED_MODULE_25__["ServiceCollection"](); - // make sure to add all services that use `registerSingleton` - for (const [id, descriptor] of Object(_platform_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_43__["getSingletonServiceDescriptors"])()) { - result.set(id, descriptor); - } - // Initialize the service collection with the overrides - for (let serviceId in overrides) { - if (overrides.hasOwnProperty(serviceId)) { - result.set(Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__["createDecorator"])(serviceId), overrides[serviceId]); + else { + const viewItemBottom = elementTop + elementHeight; + const wrapperBottom = scrollTop + this.view.renderHeight; + if (elementTop < scrollTop && viewItemBottom >= wrapperBottom) { + // The element is already overflowing the viewport, no-op } - } - // Make sure the same static services are present in all service collections - _all.forEach(service => result.set(service.id, service.get(overrides))); - // Ensure the collection gets the correct instantiation service - let instantiationService = new _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__["InstantiationService"](result, true); - result.set(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__["IInstantiationService"], instantiationService); - return [result, instantiationService]; - } - StaticServices.init = init; - StaticServices.instantiationService = define(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_23__["IInstantiationService"], () => new _platform_instantiation_common_instantiationService_js__WEBPACK_IMPORTED_MODULE_24__["InstantiationService"](_serviceCollection, true)); - const configurationServiceImpl = new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleConfigurationService"](); - StaticServices.configurationService = define(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__["IConfigurationService"], () => configurationServiceImpl); - StaticServices.resourceConfigurationService = define(_common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__["ITextResourceConfigurationService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleResourceConfigurationService"](configurationServiceImpl)); - StaticServices.resourcePropertiesService = define(_common_services_textResourceConfigurationService_js__WEBPACK_IMPORTED_MODULE_9__["ITextResourcePropertiesService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleResourcePropertiesService"](configurationServiceImpl)); - StaticServices.contextService = define(_platform_workspace_common_workspace_js__WEBPACK_IMPORTED_MODULE_37__["IWorkspaceContextService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleWorkspaceContextService"]()); - StaticServices.labelService = define(_platform_label_common_label_js__WEBPACK_IMPORTED_MODULE_27__["ILabelService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleUriLabelService"]()); - StaticServices.telemetryService = define(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__["ITelemetryService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["StandaloneTelemetryService"]()); - StaticServices.dialogService = define(_platform_dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_22__["IDialogService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleDialogService"]()); - StaticServices.notificationService = define(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__["INotificationService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleNotificationService"]()); - StaticServices.markerService = define(_platform_markers_common_markers_js__WEBPACK_IMPORTED_MODULE_31__["IMarkerService"], () => new _platform_markers_common_markerService_js__WEBPACK_IMPORTED_MODULE_30__["MarkerService"]()); - StaticServices.modeService = define(_common_services_modeService_js__WEBPACK_IMPORTED_MODULE_5__["IModeService"], (o) => new _common_services_modeServiceImpl_js__WEBPACK_IMPORTED_MODULE_6__["ModeServiceImpl"]()); - StaticServices.standaloneThemeService = define(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_13__["IStandaloneThemeService"], () => new _standaloneThemeServiceImpl_js__WEBPACK_IMPORTED_MODULE_12__["StandaloneThemeServiceImpl"]()); - StaticServices.logService = define(_platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__["ILogService"], () => new _platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__["ConsoleLogService"]()); - StaticServices.undoRedoService = define(_platform_undoRedo_common_undoRedo_js__WEBPACK_IMPORTED_MODULE_47__["IUndoRedoService"], (o) => new _platform_undoRedo_common_undoRedoService_js__WEBPACK_IMPORTED_MODULE_48__["UndoRedoService"](StaticServices.dialogService.get(o), StaticServices.notificationService.get(o))); - StaticServices.modelService = define(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__["IModelService"], (o) => new _common_services_modelServiceImpl_js__WEBPACK_IMPORTED_MODULE_8__["ModelServiceImpl"](StaticServices.configurationService.get(o), StaticServices.resourcePropertiesService.get(o), StaticServices.standaloneThemeService.get(o), StaticServices.logService.get(o), StaticServices.undoRedoService.get(o))); - StaticServices.markerDecorationsService = define(_common_services_markersDecorationService_js__WEBPACK_IMPORTED_MODULE_39__["IMarkerDecorationsService"], (o) => new _common_services_markerDecorationsServiceImpl_js__WEBPACK_IMPORTED_MODULE_40__["MarkerDecorationsService"](StaticServices.modelService.get(o), StaticServices.markerService.get(o))); - StaticServices.codeEditorService = define(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"], (o) => new _standaloneCodeServiceImpl_js__WEBPACK_IMPORTED_MODULE_11__["StandaloneCodeEditorServiceImpl"](StaticServices.standaloneThemeService.get(o))); - StaticServices.editorProgressService = define(_platform_progress_common_progress_js__WEBPACK_IMPORTED_MODULE_33__["IEditorProgressService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleEditorProgressService"]()); - StaticServices.storageService = define(_platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__["IStorageService"], () => new _platform_storage_common_storage_js__WEBPACK_IMPORTED_MODULE_34__["InMemoryStorageService"]()); - StaticServices.storageSyncService = define(_platform_userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_51__["IStorageKeysSyncRegistryService"], () => new _platform_userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_51__["StorageKeysSyncRegistryService"]()); - StaticServices.editorWorkerService = define(_common_services_editorWorkerService_js__WEBPACK_IMPORTED_MODULE_3__["IEditorWorkerService"], (o) => new _common_services_editorWorkerServiceImpl_js__WEBPACK_IMPORTED_MODULE_4__["EditorWorkerServiceImpl"](StaticServices.modelService.get(o), StaticServices.resourceConfigurationService.get(o), StaticServices.logService.get(o))); -})(StaticServices || (StaticServices = {})); -class DynamicStandaloneServices extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor(domElement, overrides) { - super(); - const [_serviceCollection, _instantiationService] = StaticServices.init(overrides); - this._serviceCollection = _serviceCollection; - this._instantiationService = _instantiationService; - const configurationService = this.get(_platform_configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_16__["IConfigurationService"]); - const notificationService = this.get(_platform_notification_common_notification_js__WEBPACK_IMPORTED_MODULE_32__["INotificationService"]); - const telemetryService = this.get(_platform_telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_35__["ITelemetryService"]); - const themeService = this.get(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_36__["IThemeService"]); - const logService = this.get(_platform_log_common_log_js__WEBPACK_IMPORTED_MODULE_29__["ILogService"]); - let ensure = (serviceId, factory) => { - let value = null; - if (overrides) { - value = overrides[serviceId.toString()]; + else if (elementTop < scrollTop) { + this.view.setScrollTop(elementTop); } - if (!value) { - value = factory(); + else if (viewItemBottom >= wrapperBottom) { + this.view.setScrollTop(viewItemBottom - this.view.renderHeight); } - this._serviceCollection.set(serviceId, value); - return value; - }; - let contextKeyService = ensure(_platform_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_18__["IContextKeyService"], () => this._register(new _platform_contextkey_browser_contextKeyService_js__WEBPACK_IMPORTED_MODULE_17__["ContextKeyService"](configurationService))); - ensure(_platform_accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_41__["IAccessibilityService"], () => new _platform_accessibility_common_accessibilityService_js__WEBPACK_IMPORTED_MODULE_44__["AccessibilityService"](contextKeyService, configurationService)); - ensure(_platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__["IListService"], () => new _platform_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_28__["ListService"](themeService)); - let commandService = ensure(_platform_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_15__["ICommandService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["StandaloneCommandService"](this._instantiationService)); - let keybindingService = ensure(_platform_keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_26__["IKeybindingService"], () => this._register(new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["StandaloneKeybindingService"](contextKeyService, commandService, telemetryService, notificationService, logService, domElement))); - let layoutService = ensure(_platform_layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_42__["ILayoutService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleLayoutService"](StaticServices.codeEditorService.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"]), domElement)); - ensure(_platform_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_50__["IQuickInputService"], () => new _quickInput_standaloneQuickInputServiceImpl_js__WEBPACK_IMPORTED_MODULE_49__["StandaloneQuickInputServiceImpl"](_instantiationService, StaticServices.codeEditorService.get(_browser_services_codeEditorService_js__WEBPACK_IMPORTED_MODULE_2__["ICodeEditorService"]))); - let contextViewService = ensure(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__["IContextViewService"], () => this._register(new _platform_contextview_browser_contextViewService_js__WEBPACK_IMPORTED_MODULE_21__["ContextViewService"](layoutService))); - ensure(_platform_clipboard_common_clipboardService_js__WEBPACK_IMPORTED_MODULE_45__["IClipboardService"], () => new _platform_clipboard_browser_clipboardService_js__WEBPACK_IMPORTED_MODULE_46__["BrowserClipboardService"]()); - ensure(_platform_contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_20__["IContextMenuService"], () => { - const contextMenuService = new _platform_contextview_browser_contextMenuService_js__WEBPACK_IMPORTED_MODULE_19__["ContextMenuService"](telemetryService, notificationService, contextViewService, keybindingService, themeService); - contextMenuService.configure({ blockMouse: false }); // we do not want that in the standalone editor - return this._register(contextMenuService); - }); - ensure(_platform_actions_common_actions_js__WEBPACK_IMPORTED_MODULE_14__["IMenuService"], () => new _platform_actions_common_menuService_js__WEBPACK_IMPORTED_MODULE_38__["MenuService"](commandService)); - ensure(_browser_services_bulkEditService_js__WEBPACK_IMPORTED_MODULE_1__["IBulkEditService"], () => new _simpleServices_js__WEBPACK_IMPORTED_MODULE_10__["SimpleBulkEditService"](StaticServices.modelService.get(_common_services_modelService_js__WEBPACK_IMPORTED_MODULE_7__["IModelService"]))); + } + } + /** + * Returns the relative position of an element rendered in the list. + * Returns `null` if the element isn't *entirely* in the visible viewport. + */ + getRelativeTop(index) { + if (index < 0 || index >= this.length) { + throw new _list_js__WEBPACK_IMPORTED_MODULE_11__["ListError"](this.user, `Invalid index ${index}`); + } + const scrollTop = this.view.getScrollTop(); + const elementTop = this.view.elementTop(index); + const elementHeight = this.view.elementHeight(index); + if (elementTop < scrollTop || elementTop + elementHeight > scrollTop + this.view.renderHeight) { + return null; + } + // y = mx + b + const m = elementHeight - this.view.renderHeight; + return Math.abs((scrollTop - elementTop) / m); + } + getHTMLElement() { + return this.view.domNode; } - get(serviceId) { - let r = this._serviceCollection.get(serviceId); - if (!r) { - throw new Error('Missing service ' + serviceId); + style(styles) { + this.styleController.style(styles); + } + toListEvent({ indexes, browserEvent }) { + return { indexes, elements: indexes.map(i => this.view.element(i)), browserEvent }; + } + _onFocusChange() { + const focus = this.focus.get(); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'element-focused', focus.length > 0); + this.onDidChangeActiveDescendant(); + } + onDidChangeActiveDescendant() { + var _a; + const focus = this.focus.get(); + if (focus.length > 0) { + let id; + if ((_a = this.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.getActiveDescendantId) { + id = this.accessibilityProvider.getActiveDescendantId(this.view.element(focus[0])); + } + this.view.domNode.setAttribute('aria-activedescendant', id || this.view.getElementDomId(focus[0])); + } + else { + this.view.domNode.removeAttribute('aria-activedescendant'); } - return r; } - set(serviceId, instance) { - this._serviceCollection.set(serviceId, instance); + _onSelectionChange() { + const selection = this.selection.get(); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-none', selection.length === 0); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-single', selection.length === 1); + _dom_js__WEBPACK_IMPORTED_MODULE_5__["toggleClass"](this.view.domNode, 'selection-multiple', selection.length > 1); } - has(serviceId) { - return this._serviceCollection.has(serviceId); + dispose() { + this._onDidDispose.fire(); + this.disposables.dispose(); + this._onDidDispose.dispose(); } } +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] +], List.prototype, "onDidChangeFocus", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] +], List.prototype, "onDidChangeSelection", null); +__decorate([ + _common_decorators_js__WEBPACK_IMPORTED_MODULE_4__["memoize"] +], List.prototype, "onContextMenu", null); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeServiceImpl.js ***! - \***************************************************************************************************/ -/*! exports provided: StandaloneThemeServiceImpl */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js": +/*!****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js ***! + \****************************************************************************/ +/*! exports provided: groupIntersect, shift, consolidate, RangeMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StandaloneThemeServiceImpl", function() { return StandaloneThemeServiceImpl; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/modes/supports/tokenization.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/tokenization.js"); -/* harmony import */ var _common_themes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/themes.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js"); -/* harmony import */ var _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../platform/registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../platform/theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../base/browser/ui/codicons/codiconStyles.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupIntersect", function() { return groupIntersect; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shift", function() { return shift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consolidate", function() { return consolidate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeMap", function() { return RangeMap; }); +/* harmony import */ var _common_range_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/range.js */ "./node_modules/monaco-editor/esm/vs/base/common/range.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - - - - - - - - - - -const VS_THEME_NAME = 'vs'; -const VS_DARK_THEME_NAME = 'vs-dark'; -const HC_BLACK_THEME_NAME = 'hc-black'; -const colorRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["Registry"].as(_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_7__["Extensions"].ColorContribution); -const themingRegistry = _platform_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["Registry"].as(_platform_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_8__["Extensions"].ThemingContribution); -class StandaloneTheme { - constructor(name, standaloneThemeData) { - this.semanticHighlighting = false; - this.themeData = standaloneThemeData; - let base = standaloneThemeData.base; - if (name.length > 0) { - this.id = base + ' ' + name; - this.themeName = name; - } - else { - this.id = base; - this.themeName = base; - } - this.colors = null; - this.defaultColors = Object.create(null); - this._tokenTheme = null; - } - get base() { - return this.themeData.base; - } - notifyBaseUpdated() { - if (this.themeData.inherit) { - this.colors = null; - this._tokenTheme = null; - } - } - getColors() { - if (!this.colors) { - const colors = new Map(); - for (let id in this.themeData.colors) { - colors.set(id, _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex(this.themeData.colors[id])); - } - if (this.themeData.inherit) { - let baseData = getBuiltinRules(this.themeData.base); - for (let id in baseData.colors) { - if (!colors.has(id)) { - colors.set(id, _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex(baseData.colors[id])); - } - } - } - this.colors = colors; - } - return this.colors; - } - getColor(colorId, useDefault) { - const color = this.getColors().get(colorId); - if (color) { - return color; - } - if (useDefault !== false) { - return this.getDefault(colorId); +/** + * Returns the intersection between a ranged group and a range. + * Returns `[]` if the intersection is empty. + */ +function groupIntersect(range, groups) { + const result = []; + for (let r of groups) { + if (range.start >= r.range.end) { + continue; } - return undefined; - } - getDefault(colorId) { - let color = this.defaultColors[colorId]; - if (color) { - return color; + if (range.end < r.range.start) { + break; } - color = colorRegistry.resolveDefaultColor(colorId, this); - this.defaultColors[colorId] = color; - return color; - } - defines(colorId) { - return Object.prototype.hasOwnProperty.call(this.getColors(), colorId); - } - get type() { - switch (this.base) { - case VS_THEME_NAME: return 'light'; - case HC_BLACK_THEME_NAME: return 'hc'; - default: return 'dark'; - } - } - get tokenTheme() { - if (!this._tokenTheme) { - let rules = []; - let encodedTokensColors = []; - if (this.themeData.inherit) { - let baseData = getBuiltinRules(this.themeData.base); - rules = baseData.rules; - if (baseData.encodedTokensColors) { - encodedTokensColors = baseData.encodedTokensColors; - } - } - rules = rules.concat(this.themeData.rules); - if (this.themeData.encodedTokensColors) { - encodedTokensColors = this.themeData.encodedTokensColors; - } - this._tokenTheme = _common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__["TokenTheme"].createFromRawTokenTheme(rules, encodedTokensColors); + const intersection = _common_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].intersect(range, r.range); + if (_common_range_js__WEBPACK_IMPORTED_MODULE_0__["Range"].isEmpty(intersection)) { + continue; } - return this._tokenTheme; - } - getTokenStyleMetadata(type, modifiers, modelLanguage) { - // use theme rules match - const style = this.tokenTheme._match([type].concat(modifiers).join('.')); - const metadata = style.metadata; - const foreground = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenMetadata"].getForeground(metadata); - const fontStyle = _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenMetadata"].getFontStyle(metadata); - return { - foreground: foreground, - italic: Boolean(fontStyle & 1 /* Italic */), - bold: Boolean(fontStyle & 2 /* Bold */), - underline: Boolean(fontStyle & 4 /* Underline */) - }; + result.push({ + range: intersection, + size: r.size + }); } + return result; } -function isBuiltinTheme(themeName) { - return (themeName === VS_THEME_NAME - || themeName === VS_DARK_THEME_NAME - || themeName === HC_BLACK_THEME_NAME); +/** + * Shifts a range by that `much`. + */ +function shift({ start, end }, much) { + return { start: start + much, end: end + much }; } -function getBuiltinRules(builtinTheme) { - switch (builtinTheme) { - case VS_THEME_NAME: - return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__["vs"]; - case VS_DARK_THEME_NAME: - return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__["vs_dark"]; - case HC_BLACK_THEME_NAME: - return _common_themes_js__WEBPACK_IMPORTED_MODULE_5__["hc_black"]; +/** + * Consolidates a collection of ranged groups. + * + * Consolidation is the process of merging consecutive ranged groups + * that share the same `size`. + */ +function consolidate(groups) { + const result = []; + let previousGroup = null; + for (let group of groups) { + const start = group.range.start; + const end = group.range.end; + const size = group.size; + if (previousGroup && size === previousGroup.size) { + previousGroup.range.end = end; + continue; + } + previousGroup = { range: { start, end }, size }; + result.push(previousGroup); } + return result; } -function newBuiltInTheme(builtinTheme) { - let themeData = getBuiltinRules(builtinTheme); - return new StandaloneTheme(builtinTheme, themeData); +/** + * Concatenates several collections of ranged groups into a single + * collection. + */ +function concat(...groups) { + return consolidate(groups.reduce((r, g) => r.concat(g), [])); } -class StandaloneThemeServiceImpl extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["Disposable"] { +class RangeMap { constructor() { - super(); - this._onColorThemeChange = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - this.onDidColorThemeChange = this._onColorThemeChange.event; - this._environment = Object.create(null); - this._knownThemes = new Map(); - this._knownThemes.set(VS_THEME_NAME, newBuiltInTheme(VS_THEME_NAME)); - this._knownThemes.set(VS_DARK_THEME_NAME, newBuiltInTheme(VS_DARK_THEME_NAME)); - this._knownThemes.set(HC_BLACK_THEME_NAME, newBuiltInTheme(HC_BLACK_THEME_NAME)); - this._codiconCSS = _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_10__["CodiconStyles"].getCSS(); - this._themeCSS = ''; - this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`; - this._globalStyleElement = null; - this._styleElements = []; - this.setTheme(VS_THEME_NAME); - _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_10__["CodiconStyles"].onDidChange(() => { - this._codiconCSS = _base_browser_ui_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_10__["CodiconStyles"].getCSS(); - this._updateCSS(); - }); + this.groups = []; + this._size = 0; } - registerEditorContainer(domNode) { - if (_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["isInShadowDOM"](domNode)) { - return this._registerShadowDomContainer(domNode); - } - return this._registerRegularEditorContainer(); + splice(index, deleteCount, items = []) { + const diff = items.length - deleteCount; + const before = groupIntersect({ start: 0, end: index }, this.groups); + const after = groupIntersect({ start: index + deleteCount, end: Number.POSITIVE_INFINITY }, this.groups) + .map(g => ({ range: shift(g.range, diff), size: g.size })); + const middle = items.map((item, i) => ({ + range: { start: index + i, end: index + i + 1 }, + size: item.size + })); + this.groups = concat(before, middle, after); + this._size = this.groups.reduce((t, g) => t + (g.size * (g.range.end - g.range.start)), 0); } - _registerRegularEditorContainer() { - if (!this._globalStyleElement) { - this._globalStyleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createStyleSheet"](); - this._globalStyleElement.className = 'monaco-colors'; - this._globalStyleElement.innerHTML = this._allCSS; - this._styleElements.push(this._globalStyleElement); + /** + * Returns the number of items in the range map. + */ + get count() { + const len = this.groups.length; + if (!len) { + return 0; } - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["Disposable"].None; + return this.groups[len - 1].range.end; } - _registerShadowDomContainer(domNode) { - const styleElement = _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createStyleSheet"](domNode); - styleElement.className = 'monaco-colors'; - styleElement.innerHTML = this._allCSS; - this._styleElements.push(styleElement); - return { - dispose: () => { - for (let i = 0; i < this._styleElements.length; i++) { - if (this._styleElements[i] === styleElement) { - this._styleElements.splice(i, 1); - return; - } - } - } - }; + /** + * Returns the sum of the sizes of all items in the range map. + */ + get size() { + return this._size; } - defineTheme(themeName, themeData) { - if (!/^[a-z0-9\-]+$/i.test(themeName)) { - throw new Error('Illegal theme name!'); - } - if (!isBuiltinTheme(themeData.base) && !isBuiltinTheme(themeName)) { - throw new Error('Illegal theme base!'); - } - // set or replace theme - this._knownThemes.set(themeName, new StandaloneTheme(themeName, themeData)); - if (isBuiltinTheme(themeName)) { - this._knownThemes.forEach(theme => { - if (theme.base === themeName) { - theme.notifyBaseUpdated(); - } - }); + /** + * Returns the index of the item at the given position. + */ + indexAt(position) { + if (position < 0) { + return -1; } - if (this._theme && this._theme.themeName === themeName) { - this.setTheme(themeName); // refresh theme + let index = 0; + let size = 0; + for (let group of this.groups) { + const count = group.range.end - group.range.start; + const newSize = size + (count * group.size); + if (position < newSize) { + return index + Math.floor((position - size) / group.size); + } + index += count; + size = newSize; } + return index; } - getColorTheme() { - return this._theme; + /** + * Returns the index of the item right after the item at the + * index of the given position. + */ + indexAfter(position) { + return Math.min(this.indexAt(position) + 1, this.count); } - setTheme(themeName) { - let theme; - if (this._knownThemes.has(themeName)) { - theme = this._knownThemes.get(themeName); + /** + * Returns the start position of the item at the given index. + */ + positionAt(index) { + if (index < 0) { + return -1; } - else { - theme = this._knownThemes.get(VS_THEME_NAME); - } - if (this._theme === theme) { - // Nothing to do - return theme.id; - } - this._theme = theme; - let cssRules = []; - let hasRule = {}; - let ruleCollector = { - addRule: (rule) => { - if (!hasRule[rule]) { - cssRules.push(rule); - hasRule[rule] = true; - } + let position = 0; + let count = 0; + for (let group of this.groups) { + const groupCount = group.range.end - group.range.start; + const newCount = count + groupCount; + if (index < newCount) { + return position + ((index - count) * group.size); } - }; - themingRegistry.getThemingParticipants().forEach(p => p(theme, ruleCollector, this._environment)); - let tokenTheme = theme.tokenTheme; - let colorMap = tokenTheme.getColorMap(); - ruleCollector.addRule(Object(_common_modes_supports_tokenization_js__WEBPACK_IMPORTED_MODULE_4__["generateTokensCSSForColorMap"])(colorMap)); - this._themeCSS = cssRules.join('\n'); - this._updateCSS(); - _common_modes_js__WEBPACK_IMPORTED_MODULE_3__["TokenizationRegistry"].setColorMap(colorMap); - this._onColorThemeChange.fire(theme); - return theme.id; - } - _updateCSS() { - this._allCSS = `${this._codiconCSS}\n${this._themeCSS}`; - this._styleElements.forEach(styleElement => styleElement.innerHTML = this._allCSS); - } - getFileIconTheme() { - return { - hasFileIcons: false, - hasFolderIcons: false, - hidesExplorerArrows: false - }; + position += groupCount * group.size; + count = newCount; + } + return -1; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js": -/*!**************************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.js ***! - \**************************************************************************************************************/ -/*! no exports provided */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js": +/*!****************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/rowCache.js ***! + \****************************************************************************/ +/*! exports provided: RowCache */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../browser/editorExtensions.js */ "./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"); -/* harmony import */ var _common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/standaloneThemeService.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js"); -/* harmony import */ var _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/standaloneStrings.js */ "./node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowCache", function() { return RowCache; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - - -class ToggleHighContrast extends _browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["EditorAction"] { - constructor() { - super({ - id: 'editor.action.toggleHighContrast', - label: _common_standaloneStrings_js__WEBPACK_IMPORTED_MODULE_2__["ToggleHighContrastNLS"].toggleHighContrast, - alias: 'Toggle High Contrast Theme', - precondition: undefined - }); - this._originalThemeName = null; +function removeFromParent(element) { + try { + if (element.parentElement) { + element.parentElement.removeChild(element); + } + } + catch (e) { + // this will throw if this happens due to a blur event, nasty business + } +} +class RowCache { + constructor(renderers) { + this.renderers = renderers; + this.cache = new Map(); + } + /** + * Returns a row either by creating a new one or reusing + * a previously released row which shares the same templateId. + */ + alloc(templateId) { + let result = this.getTemplateCache(templateId).pop(); + if (!result) { + const domNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["$"])('.monaco-list-row'); + const renderer = this.getRenderer(templateId); + const templateData = renderer.renderTemplate(domNode); + result = { domNode, templateId, templateData }; + } + return result; } - run(accessor, editor) { - const standaloneThemeService = accessor.get(_common_standaloneThemeService_js__WEBPACK_IMPORTED_MODULE_1__["IStandaloneThemeService"]); - if (this._originalThemeName) { - // We must toggle back to the integrator's theme - standaloneThemeService.setTheme(this._originalThemeName); - this._originalThemeName = null; + /** + * Releases the row for eventual reuse. + */ + release(row) { + if (!row) { + return; } - else { - this._originalThemeName = standaloneThemeService.getColorTheme().themeName; - standaloneThemeService.setTheme('hc-black'); + this.releaseRow(row); + } + releaseRow(row) { + const { domNode, templateId } = row; + if (domNode) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(domNode, 'scrolling'); + removeFromParent(domNode); + } + const cache = this.getTemplateCache(templateId); + cache.push(row); + } + getTemplateCache(templateId) { + let result = this.cache.get(templateId); + if (!result) { + result = []; + this.cache.set(templateId, result); + } + return result; + } + dispose() { + this.cache.forEach((cachedRows, templateId) => { + for (const cachedRow of cachedRows) { + const renderer = this.getRenderer(templateId); + renderer.disposeTemplate(cachedRow.templateData); + cachedRow.domNode = null; + cachedRow.templateData = null; + } + }); + this.cache.clear(); + } + getRenderer(templateId) { + const renderer = this.renderers.get(templateId); + if (!renderer) { + throw new Error(`No renderer found for ${templateId}`); } + return renderer; } } -Object(_browser_editorExtensions_js__WEBPACK_IMPORTED_MODULE_0__["registerEditorAction"])(ToggleHighContrast); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js ***! - \*********************************************************************************************/ -/*! exports provided: isFuzzyActionArr, isFuzzyAction, isString, isIAction, empty, fixCase, sanitize, log, createError, substituteMatches, findRules, stateExists */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js": +/*!**************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js ***! + \**************************************************************************/ +/*! exports provided: CombinedSpliceable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFuzzyActionArr", function() { return isFuzzyActionArr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFuzzyAction", function() { return isFuzzyAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIAction", function() { return isIAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixCase", function() { return fixCase; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitize", function() { return sanitize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createError", function() { return createError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "substituteMatches", function() { return substituteMatches; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findRules", function() { return findRules; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stateExists", function() { return stateExists; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombinedSpliceable", function() { return CombinedSpliceable; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -function isFuzzyActionArr(what) { - return (Array.isArray(what)); -} -function isFuzzyAction(what) { - return !isFuzzyActionArr(what); -} -function isString(what) { - return (typeof what === 'string'); -} -function isIAction(what) { - return !isString(what); -} -// Small helper functions -/** - * Is a string null, undefined, or empty? - */ -function empty(s) { - return (s ? false : true); -} -/** - * Puts a string to lower case if 'ignoreCase' is set. - */ -function fixCase(lexer, str) { - return (lexer.ignoreCase && str ? str.toLowerCase() : str); -} -/** - * Ensures there are no bad characters in a CSS token class. - */ -function sanitize(s) { - return s.replace(/[&<>'"_]/g, '-'); // used on all output token CSS classes -} -// Logging -/** - * Logs a message. - */ -function log(lexer, msg) { - console.log(`${lexer.languageId}: ${msg}`); -} -// Throwing errors -function createError(lexer, msg) { - return new Error(`${lexer.languageId}: ${msg}`); -} -// Helper functions for rule finding and substitution -/** - * substituteMatches is used on lexer strings and can substitutes predefined patterns: - * $$ => $ - * $# => id - * $n => matched entry n - * @attr => contents of lexer[attr] - * - * See documentation for more info - */ -function substituteMatches(lexer, str, id, matches, state) { - const re = /\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g; - let stateMatches = null; - return str.replace(re, function (full, sub, dollar, hash, n, s, attr, ofs, total) { - if (!empty(dollar)) { - return '$'; // $$ - } - if (!empty(hash)) { - return fixCase(lexer, id); // default $# - } - if (!empty(n) && n < matches.length) { - return fixCase(lexer, matches[n]); // $n - } - if (!empty(attr) && lexer && typeof (lexer[attr]) === 'string') { - return lexer[attr]; //@attribute - } - if (stateMatches === null) { // split state on demand - stateMatches = state.split('.'); - stateMatches.unshift(state); - } - if (!empty(s) && s < stateMatches.length) { - return fixCase(lexer, stateMatches[s]); //$Sn - } - return ''; - }); -} -/** - * Find the tokenizer rules for a specific state (i.e. next action) - */ -function findRules(lexer, inState) { - let state = inState; - while (state && state.length > 0) { - const rules = lexer.tokenizer[state]; - if (rules) { - return rules; - } - const idx = state.lastIndexOf('.'); - if (idx < 0) { - state = null; // no further parent - } - else { - state = state.substr(0, idx); - } +class CombinedSpliceable { + constructor(spliceables) { + this.spliceables = spliceables; } - return null; -} -/** - * Is a certain state defined? In contrast to 'findRules' this works on a ILexerMin. - * This is used during compilation where we may know the defined states - * but not yet whether the corresponding rules are correct. - */ -function stateExists(lexer, inState) { - let state = inState; - while (state && state.length > 0) { - const exist = lexer.stateNames[state]; - if (exist) { - return true; - } - const idx = state.lastIndexOf('.'); - if (idx < 0) { - state = null; // no further parent - } - else { - state = state.substr(0, idx); - } + splice(start, deleteCount, elements) { + this.spliceables.forEach(s => s.splice(start, deleteCount, elements)); } - return false; } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js ***! - \**********************************************************************************************/ -/*! exports provided: compile */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js": +/*!************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js ***! + \************************************************************************/ +/*! exports provided: MENU_MNEMONIC_REGEX, MENU_ESCAPED_MNEMONIC_REGEX, Direction, Menu, cleanMnemonic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compile", function() { return compile; }); -/* harmony import */ var _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./monarchCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MENU_MNEMONIC_REGEX", function() { return MENU_MNEMONIC_REGEX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MENU_ESCAPED_MNEMONIC_REGEX", function() { return MENU_ESCAPED_MNEMONIC_REGEX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Direction", function() { return Direction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return Menu; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanMnemonic", function() { return cleanMnemonic; }); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _common_strings_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); +/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); +/* harmony import */ var _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actionbar/actionbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scrollbar/scrollableElement.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js"); +/* harmony import */ var _contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../contextview/contextview.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); +/* harmony import */ var _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); +/* harmony import */ var _codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../codicons/codiconStyles.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codiconStyles.js"); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* - * This module only exports 'compile' which compiles a JSON language definition - * into a typed and checked ILexer definition. - */ -/* - * Type helpers - * - * Note: this is just for sanity checks on the JSON description which is - * helpful for the programmer. No checks are done anymore once the lexer is - * already 'compiled and checked'. - * - */ -function isArrayOf(elemType, obj) { - if (!obj) { - return false; - } - if (!(Array.isArray(obj))) { - return false; - } - for (const el of obj) { - if (!(elemType(el))) { - return false; - } - } - return true; -} -function bool(prop, defValue) { - if (typeof prop === 'boolean') { - return prop; - } - return defValue; -} -function string(prop, defValue) { - if (typeof (prop) === 'string') { - return prop; - } - return defValue; -} -function arrayToHash(array) { - const result = {}; - for (const e of array) { - result[e] = true; - } - return result; -} -function createKeywordMatcher(arr, caseInsensitive = false) { - if (caseInsensitive) { - arr = arr.map(function (x) { return x.toLowerCase(); }); - } - const hash = arrayToHash(arr); - if (caseInsensitive) { - return function (word) { - return hash[word.toLowerCase()] !== undefined && hash.hasOwnProperty(word.toLowerCase()); - }; - } - else { - return function (word) { - return hash[word] !== undefined && hash.hasOwnProperty(word); - }; - } -} -// Lexer helpers -/** - * Compiles a regular expression string, adding the 'i' flag if 'ignoreCase' is set, and the 'u' flag if 'unicode' is set. - * Also replaces @\w+ or sequences with the content of the specified attribute - */ -function compileRegExp(lexer, str) { - let n = 0; - while (str.indexOf('@') >= 0 && n < 5) { // at most 5 expansions - n++; - str = str.replace(/@(\w+)/g, function (s, attr) { - let sub = ''; - if (typeof (lexer[attr]) === 'string') { - sub = lexer[attr]; - } - else if (lexer[attr] && lexer[attr] instanceof RegExp) { - sub = lexer[attr].source; - } - else { - if (lexer[attr] === undefined) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'language definition does not contain attribute \'' + attr + '\', used at: ' + str); - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'attribute reference \'' + attr + '\' must be a string, used at: ' + str); - } - } - return (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["empty"](sub) ? '' : '(?:' + sub + ')'); + + + + + + + + + + + + + + + +const MENU_MNEMONIC_REGEX = /\(&([^\s&])\)|(^|[^&])&([^\s&])/; +const MENU_ESCAPED_MNEMONIC_REGEX = /(&)?(&)([^\s&])/g; +const menuSelectionIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["registerIcon"])('menu-selection', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].check); +const menuSubmenuIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["registerIcon"])('menu-submenu', _common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["Codicon"].chevronRight); +var Direction; +(function (Direction) { + Direction[Direction["Right"] = 0] = "Right"; + Direction[Direction["Left"] = 1] = "Left"; +})(Direction || (Direction = {})); +class Menu extends _actionbar_actionbar_js__WEBPACK_IMPORTED_MODULE_3__["ActionBar"] { + constructor(container, actions, options = {}) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(container, 'monaco-menu-container'); + container.setAttribute('role', 'presentation'); + const menuElement = document.createElement('div'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(menuElement, 'monaco-menu'); + menuElement.setAttribute('role', 'presentation'); + super(menuElement, { + orientation: 2 /* VERTICAL */, + actionViewItemProvider: action => this.doGetActionViewItem(action, options, parentData), + context: options.context, + actionRunner: options.actionRunner, + ariaLabel: options.ariaLabel, + triggerKeys: { keys: [3 /* Enter */, ...(_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"] || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"] ? [10 /* Space */] : [])], keyDown: true } }); - } - let flags = (lexer.ignoreCase ? 'i' : '') + (lexer.unicode ? 'u' : ''); - return new RegExp(str, flags); -} -/** - * Compiles guard functions for case matches. - * This compiles 'cases' attributes into efficient match functions. - * - */ -function selectScrutinee(id, matches, state, num) { - if (num < 0) { - return id; - } - if (num < matches.length) { - return matches[num]; - } - if (num >= 100) { - num = num - 100; - let parts = state.split('.'); - parts.unshift(state); - if (num < parts.length) { - return parts[num]; - } - } - return null; -} -function createGuard(lexer, ruleName, tkey, val) { - // get the scrutinee and pattern - let scrut = -1; // -1: $!, 0-99: $n, 100+n: $Sn - let oppat = tkey; - let matches = tkey.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/); - if (matches) { - if (matches[3]) { // if digits - scrut = parseInt(matches[3]); - if (matches[2]) { - scrut = scrut + 100; // if [sS] present - } - } - oppat = matches[4]; - } - // get operator - let op = '~'; - let pat = oppat; - if (!oppat || oppat.length === 0) { - op = '!='; - pat = ''; - } - else if (/^\w*$/.test(pat)) { // just a word - op = '=='; - } - else { - matches = oppat.match(/^(@|!@|~|!~|==|!=)(.*)$/); - if (matches) { - op = matches[1]; - pat = matches[2]; - } - } - // set the tester function - let tester; - // special case a regexp that matches just words - if ((op === '~' || op === '!~') && /^(\w|\|)*$/.test(pat)) { - let inWords = createKeywordMatcher(pat.split('|'), lexer.ignoreCase); - tester = function (s) { return (op === '~' ? inWords(s) : !inWords(s)); }; - } - else if (op === '@' || op === '!@') { - let words = lexer[pat]; - if (!words) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'the @ match target \'' + pat + '\' is not defined, in rule: ' + ruleName); - } - if (!(isArrayOf(function (elem) { return (typeof (elem) === 'string'); }, words))) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'the @ match target \'' + pat + '\' must be an array of strings, in rule: ' + ruleName); - } - let inWords = createKeywordMatcher(words, lexer.ignoreCase); - tester = function (s) { return (op === '@' ? inWords(s) : !inWords(s)); }; - } - else if (op === '~' || op === '!~') { - if (pat.indexOf('$') < 0) { - // precompile regular expression - let re = compileRegExp(lexer, '^' + pat + '$'); - tester = function (s) { return (op === '~' ? re.test(s) : !re.test(s)); }; - } - else { - tester = function (s, id, matches, state) { - let re = compileRegExp(lexer, '^' + _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["substituteMatches"](lexer, pat, id, matches, state) + '$'); - return re.test(s); - }; - } - } - else { // if (op==='==' || op==='!=') { - if (pat.indexOf('$') < 0) { - let patx = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["fixCase"](lexer, pat); - tester = function (s) { return (op === '==' ? s === patx : s !== patx); }; - } - else { - let patx = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["fixCase"](lexer, pat); - tester = function (s, id, matches, state, eos) { - let patexp = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["substituteMatches"](lexer, patx, id, matches, state); - return (op === '==' ? s === patexp : s !== patexp); - }; - } - } - // return the branch object - if (scrut === -1) { - return { - name: tkey, value: val, test: function (id, matches, state, eos) { - return tester(id, id, matches, state, eos); - } - }; - } - else { - return { - name: tkey, value: val, test: function (id, matches, state, eos) { - let scrutinee = selectScrutinee(id, matches, state, scrut); - return tester(!scrutinee ? '' : scrutinee, id, matches, state, eos); - } - }; - } -} -/** - * Compiles an action: i.e. optimize regular expressions and case matches - * and do many sanity checks. - * - * This is called only during compilation but if the lexer definition - * contains user functions as actions (which is usually not allowed), then this - * may be called during lexing. It is important therefore to compile common cases efficiently - */ -function compileAction(lexer, ruleName, action) { - if (!action) { - return { token: '' }; - } - else if (typeof (action) === 'string') { - return action; // { token: action }; - } - else if (action.token || action.token === '') { - if (typeof (action.token) !== 'string') { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'a \'token\' attribute must be of type string, in rule: ' + ruleName); - } - else { - // only copy specific typed fields (only happens once during compile Lexer) - let newAction = { token: action.token }; - if (action.token.indexOf('$') >= 0) { - newAction.tokenSubst = true; - } - if (typeof (action.bracket) === 'string') { - if (action.bracket === '@open') { - newAction.bracket = 1 /* Open */; - } - else if (action.bracket === '@close') { - newAction.bracket = -1 /* Close */; - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'a \'bracket\' attribute must be either \'@open\' or \'@close\', in rule: ' + ruleName); - } + this.menuElement = menuElement; + this.actionsList.setAttribute('role', 'menu'); + this.actionsList.tabIndex = 0; + this.menuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"]()); + this.initializeStyleSheet(container); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, (e) => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + // Stop tab navigation of menus + if (event.equals(2 /* Tab */)) { + e.preventDefault(); } - if (action.next) { - if (typeof (action.next) !== 'string') { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'the next state must be a string value in rule: ' + ruleName); - } - else { - let next = action.next; - if (!/^(@pop|@push|@popall)$/.test(next)) { - if (next[0] === '@') { - next = next.substr(1); // peel off starting @ sign + }); + if (options.enableMnemonics) { + this.menuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, (e) => { + const key = e.key.toLocaleLowerCase(); + if (this.mnemonics.has(key)) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + const actions = this.mnemonics.get(key); + if (actions.length === 1) { + if (actions[0] instanceof SubmenuMenuActionViewItem && actions[0].container) { + this.focusItemByElement(actions[0].container); } - if (next.indexOf('$') < 0) { // no dollar substitution, we can check if the state exists - if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["stateExists"](lexer, _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["substituteMatches"](lexer, next, '', [], ''))) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'the next state \'' + action.next + '\' is not defined in rule: ' + ruleName); - } + actions[0].onClick(e); + } + if (actions.length > 1) { + const action = actions.shift(); + if (action && action.container) { + this.focusItemByElement(action.container); + actions.push(action); } + this.mnemonics.set(key, actions); } - newAction.next = next; - } - } - if (typeof (action.goBack) === 'number') { - newAction.goBack = action.goBack; - } - if (typeof (action.switchTo) === 'string') { - newAction.switchTo = action.switchTo; - } - if (typeof (action.log) === 'string') { - newAction.log = action.log; - } - if (typeof (action.nextEmbedded) === 'string') { - newAction.nextEmbedded = action.nextEmbedded; - lexer.usesEmbedded = true; - } - return newAction; - } - } - else if (Array.isArray(action)) { - let results = []; - for (let i = 0, len = action.length; i < len; i++) { - results[i] = compileAction(lexer, ruleName, action[i]); - } - return { group: results }; - } - else if (action.cases) { - // build an array of test cases - let cases = []; - // for each case, push a test function and result value - for (let tkey in action.cases) { - if (action.cases.hasOwnProperty(tkey)) { - const val = compileAction(lexer, ruleName, action.cases[tkey]); - // what kind of case - if (tkey === '@default' || tkey === '@' || tkey === '') { - cases.push({ test: undefined, value: val, name: tkey }); } - else if (tkey === '@eos') { - cases.push({ test: function (id, matches, state, eos) { return eos; }, value: val, name: tkey }); + })); + } + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"]) { + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(menuElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { + const event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + if (event.equals(14 /* Home */) || event.equals(11 /* PageUp */)) { + this.focusedItem = this.viewItems.length - 1; + this.focusNext(); + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); } - else { - cases.push(createGuard(lexer, ruleName, tkey, val)); // call separate function to avoid local variable capture + else if (event.equals(13 /* End */) || event.equals(12 /* PageDown */)) { + this.focusedItem = 0; + this.focusPrevious(); + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); } - } + })); } - // create a matching function - const def = lexer.defaultToken; - return { - test: function (id, matches, state, eos) { - for (const _case of cases) { - const didmatch = (!_case.test || _case.test(id, matches, state, eos)); - if (didmatch) { - return _case.value; - } - } - return def; + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.domNode, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OUT, e => { + let relatedTarget = e.relatedTarget; + if (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(relatedTarget, this.domNode)) { + this.focusedItem = undefined; + this.updateFocus(); + e.stopPropagation(); } - }; - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'an action must be a string, an object with a \'token\' or \'cases\' attribute, or an array of actions; in rule: ' + ruleName); - } -} -/** - * Helper class for creating matching rules - */ -class Rule { - constructor(name) { - this.regex = new RegExp(''); - this.action = { token: '' }; - this.matchOnlyAtLineStart = false; - this.name = ''; - this.name = name; - } - setRegex(lexer, re) { - let sregex; - if (typeof (re) === 'string') { - sregex = re; - } - else if (re instanceof RegExp) { - sregex = re.source; - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'rules must start with a match string or regular expression: ' + this.name); - } - this.matchOnlyAtLineStart = (sregex.length > 0 && sregex[0] === '^'); - this.name = this.name + ': ' + sregex; - this.regex = compileRegExp(lexer, '^(?:' + (this.matchOnlyAtLineStart ? sregex.substr(1) : sregex) + ')'); - } - setAction(lexer, act) { - this.action = compileAction(lexer, this.name, act); - } -} -/** - * Compiles a json description function into json where all regular expressions, - * case matches etc, are compiled and all include rules are expanded. - * We also compile the bracket definitions, supply defaults, and do many sanity checks. - * If the 'jsonStrict' parameter is 'false', we allow at certain locations - * regular expression objects and functions that get called during lexing. - * (Currently we have no samples that need this so perhaps we should always have - * jsonStrict to true). - */ -function compile(languageId, json) { - if (!json || typeof (json) !== 'object') { - throw new Error('Monarch: expecting a language definition object'); - } - // Create our lexer - let lexer = {}; - lexer.languageId = languageId; - lexer.noThrow = false; // raise exceptions during compilation - lexer.maxStack = 100; - // Set standard fields: be defensive about types - lexer.start = (typeof json.start === 'string' ? json.start : null); - lexer.ignoreCase = bool(json.ignoreCase, false); - lexer.unicode = bool(json.unicode, false); - lexer.tokenPostfix = string(json.tokenPostfix, '.' + lexer.languageId); - lexer.defaultToken = string(json.defaultToken, 'source'); - lexer.usesEmbedded = false; // becomes true if we find a nextEmbedded action - // For calling compileAction later on - let lexerMin = json; - lexerMin.languageId = languageId; - lexerMin.ignoreCase = lexer.ignoreCase; - lexerMin.unicode = lexer.unicode; - lexerMin.noThrow = lexer.noThrow; - lexerMin.usesEmbedded = lexer.usesEmbedded; - lexerMin.stateNames = json.tokenizer; - lexerMin.defaultToken = lexer.defaultToken; - // Compile an array of rules into newrules where RegExp objects are created. - function addRules(state, newrules, rules) { - for (const rule of rules) { - let include = rule.include; - if (include) { - if (typeof (include) !== 'string') { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'an \'include\' attribute must be a string at: ' + state); - } - if (include[0] === '@') { - include = include.substr(1); // peel off starting @ - } - if (!json.tokenizer[include]) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'include target \'' + include + '\' is not defined at: ' + state); - } - addRules(state + '.' + include, newrules, json.tokenizer[include]); + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.actionsList, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OVER, e => { + let target = e.target; + if (!target || !Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(target, this.actionsList) || target === this.actionsList) { + return; } - else { - const newrule = new Rule(state); - // Set up new rule attributes - if (Array.isArray(rule) && rule.length >= 1 && rule.length <= 3) { - newrule.setRegex(lexerMin, rule[0]); - if (rule.length >= 3) { - if (typeof (rule[1]) === 'string') { - newrule.setAction(lexerMin, { token: rule[1], next: rule[2] }); - } - else if (typeof (rule[1]) === 'object') { - const rule1 = rule[1]; - rule1.next = rule[2]; - newrule.setAction(lexerMin, rule1); - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'a next state as the last element of a rule can only be given if the action is either an object or a string, at: ' + state); - } - } - else { - newrule.setAction(lexerMin, rule[1]); - } - } - else { - if (!rule.regex) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'a rule must either be an array, or an object with a \'regex\' or \'include\' field at: ' + state); - } - if (rule.name) { - if (typeof rule.name === 'string') { - newrule.name = rule.name; - } - } - if (rule.matchOnlyAtStart) { - newrule.matchOnlyAtLineStart = bool(rule.matchOnlyAtLineStart, false); - } - newrule.setRegex(lexerMin, rule.regex); - newrule.setAction(lexerMin, rule.action); + while (target.parentElement !== this.actionsList && target.parentElement !== null) { + target = target.parentElement; + } + if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(target, 'action-item')) { + const lastFocusedItem = this.focusedItem; + this.setFocusedItem(target); + if (lastFocusedItem !== this.focusedItem) { + this.updateFocus(); } - newrules.push(newrule); } - } - } - // compile the tokenizer rules - if (!json.tokenizer || typeof (json.tokenizer) !== 'object') { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'a language definition must define the \'tokenizer\' attribute as an object'); - } - lexer.tokenizer = []; - for (let key in json.tokenizer) { - if (json.tokenizer.hasOwnProperty(key)) { - if (!lexer.start) { - lexer.start = key; + })); + let parentData = { + parent: this + }; + this.mnemonics = new Map(); + // Scroll Logic + this.scrollableElement = this._register(new _scrollbar_scrollableElement_js__WEBPACK_IMPORTED_MODULE_8__["DomScrollableElement"](menuElement, { + alwaysConsumeMouseWheel: true, + horizontal: 2 /* Hidden */, + vertical: 3 /* Visible */, + verticalScrollbarSize: 7, + handleMouseWheel: true, + useShadows: true + })); + const scrollElement = this.scrollableElement.getDomNode(); + scrollElement.style.position = ''; + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(scrollElement, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_UP, e => { + // Absorb clicks in menu dead space https://github.com/Microsoft/vscode/issues/63575 + // We do this on the scroll element so the scroll bar doesn't dismiss the menu either + e.preventDefault(); + })); + menuElement.style.maxHeight = `${Math.max(10, window.innerHeight - container.getBoundingClientRect().top - 35)}px`; + actions = actions.filter(a => { + var _a; + if ((_a = options.submenuIds) === null || _a === void 0 ? void 0 : _a.has(a.id)) { + console.warn(`Found submenu cycle: ${a.id}`); + return false; } - const rules = json.tokenizer[key]; - lexer.tokenizer[key] = new Array(); - addRules('tokenizer.' + key, lexer.tokenizer[key], rules); - } - } - lexer.usesEmbedded = lexerMin.usesEmbedded; // can be set during compileAction - // Set simple brackets - if (json.brackets) { - if (!(Array.isArray(json.brackets))) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'the \'brackets\' attribute must be defined as an array'); - } - } - else { - json.brackets = [ - { open: '{', close: '}', token: 'delimiter.curly' }, - { open: '[', close: ']', token: 'delimiter.square' }, - { open: '(', close: ')', token: 'delimiter.parenthesis' }, - { open: '<', close: '>', token: 'delimiter.angle' } - ]; - } - let brackets = []; - for (let el of json.brackets) { - let desc = el; - if (desc && Array.isArray(desc) && desc.length === 3) { - desc = { token: desc[2], open: desc[0], close: desc[1] }; - } - if (desc.open === desc.close) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'open and close brackets in a \'brackets\' attribute must be different: ' + desc.open + - '\n hint: use the \'bracket\' attribute if matching on equal brackets is required.'); - } - if (typeof desc.open === 'string' && typeof desc.token === 'string' && typeof desc.close === 'string') { - brackets.push({ - token: desc.token + lexer.tokenPostfix, - open: _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["fixCase"](lexer, desc.open), - close: _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["fixCase"](lexer, desc.close) - }); - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_0__["createError"](lexer, 'every element in the \'brackets\' array must be a \'{open,close,token}\' object or array'); - } - } - lexer.brackets = brackets; - // Disable throw so the syntax highlighter goes, no matter what - lexer.noThrow = true; - return lexer; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js ***! - \********************************************************************************************/ -/*! exports provided: MonarchTokenizer, createTokenizationSupport */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MonarchTokenizer", function() { return MonarchTokenizer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTokenizationSupport", function() { return createTokenizationSupport; }); -/* harmony import */ var _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/core/token.js */ "./node_modules/monaco-editor/esm/vs/editor/common/core/token.js"); -/* harmony import */ var _common_modes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/modes.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes.js"); -/* harmony import */ var _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/modes/nullMode.js */ "./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js"); -/* harmony import */ var _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./monarchCommon.js */ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const CACHE_STACK_DEPTH = 5; -/** - * Reuse the same stack elements up to a certain depth. - */ -class MonarchStackElementFactory { - constructor(maxCacheDepth) { - this._maxCacheDepth = maxCacheDepth; - this._entries = Object.create(null); - } - static create(parent, state) { - return this._INSTANCE.create(parent, state); + return true; + }); + this.push(actions, { icon: true, label: true, isMenu: true }); + container.appendChild(this.scrollableElement.getDomNode()); + this.scrollableElement.scanDomNode(); + this.viewItems.filter(item => !(item instanceof MenuSeparatorActionViewItem)).forEach((item, index, array) => { + item.updatePositionInSet(index + 1, array.length); + }); } - create(parent, state) { - if (parent !== null && parent.depth >= this._maxCacheDepth) { - // no caching above a certain depth - return new MonarchStackElement(parent, state); - } - let stackElementId = MonarchStackElement.getStackElementId(parent); - if (stackElementId.length > 0) { - stackElementId += '|'; - } - stackElementId += state; - let result = this._entries[stackElementId]; - if (result) { - return result; + initializeStyleSheet(container) { + if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isInShadowDOM"])(container)) { + this.styleSheet = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["createStyleSheet"])(container); + this.styleSheet.innerHTML = MENU_WIDGET_CSS; } - result = new MonarchStackElement(parent, state); - this._entries[stackElementId] = result; - return result; - } -} -MonarchStackElementFactory._INSTANCE = new MonarchStackElementFactory(CACHE_STACK_DEPTH); -class MonarchStackElement { - constructor(parent, state) { - this.parent = parent; - this.state = state; - this.depth = (this.parent ? this.parent.depth : 0) + 1; - } - static getStackElementId(element) { - let result = ''; - while (element !== null) { - if (result.length > 0) { - result += '|'; + else { + if (!Menu.globalStyleSheet) { + Menu.globalStyleSheet = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["createStyleSheet"])(); + Menu.globalStyleSheet.innerHTML = MENU_WIDGET_CSS; } - result += element.state; - element = element.parent; + this.styleSheet = Menu.globalStyleSheet; } - return result; } - static _equals(a, b) { - while (a !== null && b !== null) { - if (a === b) { - return true; - } - if (a.state !== b.state) { - return false; - } - a = a.parent; - b = b.parent; - } - if (a === null && b === null) { - return true; + style(style) { + const container = this.getContainer(); + const fgColor = style.foregroundColor ? `${style.foregroundColor}` : ''; + const bgColor = style.backgroundColor ? `${style.backgroundColor}` : ''; + const border = style.borderColor ? `1px solid ${style.borderColor}` : ''; + const shadow = style.shadowColor ? `0 2px 4px ${style.shadowColor}` : ''; + container.style.border = border; + this.domNode.style.color = fgColor; + this.domNode.style.backgroundColor = bgColor; + container.style.boxShadow = shadow; + if (this.viewItems) { + this.viewItems.forEach(item => { + if (item instanceof BaseMenuActionViewItem || item instanceof MenuSeparatorActionViewItem) { + item.style(style); + } + }); } - return false; - } - equals(other) { - return MonarchStackElement._equals(this, other); } - push(state) { - return MonarchStackElementFactory.create(this, state); + getContainer() { + return this.scrollableElement.getDomNode(); } - pop() { - return this.parent; + get onScroll() { + return this.scrollableElement.onScroll; } - popall() { - let result = this; - while (result.parent) { - result = result.parent; + focusItemByElement(element) { + const lastFocusedItem = this.focusedItem; + this.setFocusedItem(element); + if (lastFocusedItem !== this.focusedItem) { + this.updateFocus(); } - return result; - } - switchTo(state) { - return MonarchStackElementFactory.create(this.parent, state); - } -} -class EmbeddedModeData { - constructor(modeId, state) { - this.modeId = modeId; - this.state = state; } - equals(other) { - return (this.modeId === other.modeId - && this.state.equals(other.state)); - } - clone() { - let stateClone = this.state.clone(); - // save an object - if (stateClone === this.state) { - return this; + setFocusedItem(element) { + for (let i = 0; i < this.actionsList.children.length; i++) { + let elem = this.actionsList.children[i]; + if (element === elem) { + this.focusedItem = i; + break; + } } - return new EmbeddedModeData(this.modeId, this.state); - } -} -/** - * Reuse the same line states up to a certain depth. - */ -class MonarchLineStateFactory { - constructor(maxCacheDepth) { - this._maxCacheDepth = maxCacheDepth; - this._entries = Object.create(null); } - static create(stack, embeddedModeData) { - return this._INSTANCE.create(stack, embeddedModeData); + updateFocus(fromRight) { + super.updateFocus(fromRight, true); + if (typeof this.focusedItem !== 'undefined') { + // Workaround for #80047 caused by an issue in chromium + // https://bugs.chromium.org/p/chromium/issues/detail?id=414283 + // When that's fixed, just call this.scrollableElement.scanDomNode() + this.scrollableElement.setScrollPosition({ + scrollTop: Math.round(this.menuElement.scrollTop) + }); + } } - create(stack, embeddedModeData) { - if (embeddedModeData !== null) { - // no caching when embedding - return new MonarchLineState(stack, embeddedModeData); + doGetActionViewItem(action, options, parentData) { + if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"]) { + return new MenuSeparatorActionViewItem(options.context, action, { icon: true }); } - if (stack !== null && stack.depth >= this._maxCacheDepth) { - // no caching above a certain depth - return new MonarchLineState(stack, embeddedModeData); + else if (action instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["SubmenuAction"]) { + const menuActionViewItem = new SubmenuMenuActionViewItem(action, action.actions, parentData, Object.assign(Object.assign({}, options), { submenuIds: new Set([...(options.submenuIds || []), action.id]) })); + if (options.enableMnemonics) { + const mnemonic = menuActionViewItem.getMnemonic(); + if (mnemonic && menuActionViewItem.isEnabled()) { + let actionViewItems = []; + if (this.mnemonics.has(mnemonic)) { + actionViewItems = this.mnemonics.get(mnemonic); + } + actionViewItems.push(menuActionViewItem); + this.mnemonics.set(mnemonic, actionViewItems); + } + } + return menuActionViewItem; } - let stackElementId = MonarchStackElement.getStackElementId(stack); - let result = this._entries[stackElementId]; - if (result) { - return result; + else { + const menuItemOptions = { enableMnemonics: options.enableMnemonics, useEventAsContext: options.useEventAsContext }; + if (options.getKeyBinding) { + const keybinding = options.getKeyBinding(action); + if (keybinding) { + const keybindingLabel = keybinding.getLabel(); + if (keybindingLabel) { + menuItemOptions.keybinding = keybindingLabel; + } + } + } + const menuActionViewItem = new BaseMenuActionViewItem(options.context, action, menuItemOptions); + if (options.enableMnemonics) { + const mnemonic = menuActionViewItem.getMnemonic(); + if (mnemonic && menuActionViewItem.isEnabled()) { + let actionViewItems = []; + if (this.mnemonics.has(mnemonic)) { + actionViewItems = this.mnemonics.get(mnemonic); + } + actionViewItems.push(menuActionViewItem); + this.mnemonics.set(mnemonic, actionViewItems); + } + } + return menuActionViewItem; } - result = new MonarchLineState(stack, null); - this._entries[stackElementId] = result; - return result; } } -MonarchLineStateFactory._INSTANCE = new MonarchLineStateFactory(CACHE_STACK_DEPTH); -class MonarchLineState { - constructor(stack, embeddedModeData) { - this.stack = stack; - this.embeddedModeData = embeddedModeData; - } - clone() { - let embeddedModeDataClone = this.embeddedModeData ? this.embeddedModeData.clone() : null; - // save an object - if (embeddedModeDataClone === this.embeddedModeData) { - return this; +class BaseMenuActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__["BaseActionViewItem"] { + constructor(ctx, action, options = {}) { + options.isMenu = true; + super(action, action, options); + this.options = options; + this.options.icon = options.icon !== undefined ? options.icon : false; + this.options.label = options.label !== undefined ? options.label : true; + this.cssClass = ''; + // Set mnemonic + if (this.options.label && options.enableMnemonics) { + let label = this.getAction().label; + if (label) { + let matches = MENU_MNEMONIC_REGEX.exec(label); + if (matches) { + this.mnemonic = (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase(); + } + } } - return MonarchLineStateFactory.create(this.stack, this.embeddedModeData); + // Add mouse up listener later to avoid accidental clicks + this.runOnceToEnableMouseUp = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { + if (!this.element) { + return; + } + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_UP, e => { + // removed default prevention as it conflicts + // with BaseActionViewItem #101537 + // add back if issues arise and link new issue + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + // See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Interact_with_the_clipboard + // > Writing to the clipboard + // > You can use the "cut" and "copy" commands without any special + // permission if you are using them in a short-lived event handler + // for a user action (for example, a click handler). + // => to get the Copy and Paste context menu actions working on Firefox, + // there should be no timeout here + if (_browser_js__WEBPACK_IMPORTED_MODULE_14__["isFirefox"]) { + const mouseEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_15__["StandardMouseEvent"](e); + // Allowing right click to trigger the event causes the issue described below, + // but since the solution below does not work in FF, we must disable right click + if (mouseEvent.rightButton) { + return; + } + this.onClick(e); + } + // In all other cases, set timout to allow context menu cancellation to trigger + // otherwise the action will destroy the menu and a second context menu + // will still trigger for right click. + setTimeout(() => { + this.onClick(e); + }, 0); + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].CONTEXT_MENU, e => { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + })); + }, 100); + this._register(this.runOnceToEnableMouseUp); } - equals(other) { - if (!(other instanceof MonarchLineState)) { - return false; + render(container) { + super.render(container); + if (!this.element) { + return; } - if (!this.stack.equals(other.stack)) { - return false; + this.container = container; + this.item = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('a.action-menu-item')); + if (this._action.id === _common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"].ID) { + // A separator is a presentation item + this.item.setAttribute('role', 'presentation'); } - if (this.embeddedModeData === null && other.embeddedModeData === null) { - return true; + else { + this.item.setAttribute('role', 'menuitem'); + if (this.mnemonic) { + this.item.setAttribute('aria-keyshortcuts', `${this.mnemonic}`); + } } - if (this.embeddedModeData === null || other.embeddedModeData === null) { - return false; + this.check = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.menu-item-check' + menuSelectionIcon.cssSelector)); + this.check.setAttribute('role', 'none'); + this.label = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.action-label')); + if (this.options.label && this.options.keybinding) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.keybinding')).textContent = this.options.keybinding; } - return this.embeddedModeData.equals(other.embeddedModeData); + // Adds mouse up listener to actually run the action + this.runOnceToEnableMouseUp.schedule(); + this.updateClass(); + this.updateLabel(); + this.updateTooltip(); + this.updateEnabled(); + this.updateChecked(); } -} -class MonarchClassicTokensCollector { - constructor() { - this._tokens = []; - this._language = null; - this._lastTokenType = null; - this._lastTokenLanguage = null; + blur() { + super.blur(); + this.applyStyle(); } - enterMode(startOffset, modeId) { - this._language = modeId; + focus() { + super.focus(); + if (this.item) { + this.item.focus(); + } + this.applyStyle(); } - emit(startOffset, type) { - if (this._lastTokenType === type && this._lastTokenLanguage === this._language) { - return; + updatePositionInSet(pos, setSize) { + if (this.item) { + this.item.setAttribute('aria-posinset', `${pos}`); + this.item.setAttribute('aria-setsize', `${setSize}`); } - this._lastTokenType = type; - this._lastTokenLanguage = this._language; - this._tokens.push(new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__["Token"](startOffset, type, this._language)); - } - nestedModeTokenize(embeddedModeLine, embeddedModeData, offsetDelta) { - const nestedModeId = embeddedModeData.modeId; - const embeddedModeState = embeddedModeData.state; - const nestedModeTokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].get(nestedModeId); - if (!nestedModeTokenizationSupport) { - this.enterMode(offsetDelta, nestedModeId); - this.emit(offsetDelta, ''); - return embeddedModeState; - } - let nestedResult = nestedModeTokenizationSupport.tokenize(embeddedModeLine, embeddedModeState, offsetDelta); - this._tokens = this._tokens.concat(nestedResult.tokens); - this._lastTokenType = null; - this._lastTokenLanguage = null; - this._language = null; - return nestedResult.endState; - } - finalize(endState) { - return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__["TokenizationResult"](this._tokens, endState); - } -} -class MonarchModernTokensCollector { - constructor(modeService, theme) { - this._modeService = modeService; - this._theme = theme; - this._prependTokens = null; - this._tokens = []; - this._currentLanguageId = 0 /* Null */; - this._lastTokenMetadata = 0; - } - enterMode(startOffset, modeId) { - this._currentLanguageId = this._modeService.getLanguageIdentifier(modeId).id; - } - emit(startOffset, type) { - let metadata = this._theme.match(this._currentLanguageId, type); - if (this._lastTokenMetadata === metadata) { + } + updateLabel() { + if (!this.label) { return; } - this._lastTokenMetadata = metadata; - this._tokens.push(startOffset); - this._tokens.push(metadata); + if (this.options.label) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["clearNode"])(this.label); + let label = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_11__["stripCodicons"])(this.getAction().label); + if (label) { + const cleanLabel = cleanMnemonic(label); + if (!this.options.enableMnemonics) { + label = cleanLabel; + } + this.label.setAttribute('aria-label', cleanLabel.replace(/&&/g, '&')); + const matches = MENU_MNEMONIC_REGEX.exec(label); + if (matches) { + label = _common_strings_js__WEBPACK_IMPORTED_MODULE_1__["escape"](label); + // This is global, reset it + MENU_ESCAPED_MNEMONIC_REGEX.lastIndex = 0; + let escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label); + // We can't use negative lookbehind so if we match our negative and skip + while (escMatch && escMatch[1]) { + escMatch = MENU_ESCAPED_MNEMONIC_REGEX.exec(label); + } + const replaceDoubleEscapes = (str) => str.replace(/&&/g, '&'); + if (escMatch) { + this.label.append(_common_strings_js__WEBPACK_IMPORTED_MODULE_1__["ltrim"](replaceDoubleEscapes(label.substr(0, escMatch.index)), ' '), Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('u', { 'aria-hidden': 'true' }, escMatch[3]), _common_strings_js__WEBPACK_IMPORTED_MODULE_1__["rtrim"](replaceDoubleEscapes(label.substr(escMatch.index + escMatch[0].length)), ' ')); + } + else { + this.label.innerText = replaceDoubleEscapes(label).trim(); + } + if (this.item) { + this.item.setAttribute('aria-keyshortcuts', (!!matches[1] ? matches[1] : matches[3]).toLocaleLowerCase()); + } + } + else { + this.label.innerText = label.replace(/&&/g, '&').trim(); + } + } + } } - static _merge(a, b, c) { - let aLen = (a !== null ? a.length : 0); - let bLen = b.length; - let cLen = (c !== null ? c.length : 0); - if (aLen === 0 && bLen === 0 && cLen === 0) { - return new Uint32Array(0); + updateTooltip() { + let title = null; + if (this.getAction().tooltip) { + title = this.getAction().tooltip; } - if (aLen === 0 && bLen === 0) { - return c; + else if (!this.options.label && this.getAction().label && this.options.icon) { + title = this.getAction().label; + if (this.options.keybinding) { + title = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'titleLabel', comment: ['action title', 'action keybinding'] }, "{0} ({1})", title, this.options.keybinding); + } } - if (bLen === 0 && cLen === 0) { - return a; + if (title && this.item) { + this.item.title = title; } - let result = new Uint32Array(aLen + bLen + cLen); - if (a !== null) { - result.set(a); + } + updateClass() { + if (this.cssClass && this.item) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.item, this.cssClass); } - for (let i = 0; i < bLen; i++) { - result[aLen + i] = b[i]; + if (this.options.icon && this.label) { + this.cssClass = this.getAction().class || ''; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.label, 'icon'); + if (this.cssClass) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.label, this.cssClass); + } + this.updateEnabled(); } - if (c !== null) { - result.set(c, aLen + bLen); + else if (this.label) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.label, 'icon'); } - return result; } - nestedModeTokenize(embeddedModeLine, embeddedModeData, offsetDelta) { - const nestedModeId = embeddedModeData.modeId; - const embeddedModeState = embeddedModeData.state; - const nestedModeTokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].get(nestedModeId); - if (!nestedModeTokenizationSupport) { - this.enterMode(offsetDelta, nestedModeId); - this.emit(offsetDelta, ''); - return embeddedModeState; - } - let nestedResult = nestedModeTokenizationSupport.tokenize2(embeddedModeLine, embeddedModeState, offsetDelta); - this._prependTokens = MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, nestedResult.tokens); - this._tokens = []; - this._currentLanguageId = 0; - this._lastTokenMetadata = 0; - return nestedResult.endState; - } - finalize(endState) { - return new _common_core_token_js__WEBPACK_IMPORTED_MODULE_0__["TokenizationResult2"](MonarchModernTokensCollector._merge(this._prependTokens, this._tokens, null), endState); - } -} -class MonarchTokenizer { - constructor(modeService, standaloneThemeService, modeId, lexer) { - this._modeService = modeService; - this._standaloneThemeService = standaloneThemeService; - this._modeId = modeId; - this._lexer = lexer; - this._embeddedModes = Object.create(null); - this.embeddedLoaded = Promise.resolve(undefined); - // Set up listening for embedded modes - let emitting = false; - this._tokenizationRegistryListener = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].onDidChange((e) => { - if (emitting) { - return; - } - let isOneOfMyEmbeddedModes = false; - for (let i = 0, len = e.changedLanguages.length; i < len; i++) { - let language = e.changedLanguages[i]; - if (this._embeddedModes[language]) { - isOneOfMyEmbeddedModes = true; - break; - } + updateEnabled() { + if (this.getAction().enabled) { + if (this.element) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.element, 'disabled'); } - if (isOneOfMyEmbeddedModes) { - emitting = true; - _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].fire([this._modeId]); - emitting = false; + if (this.item) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.item, 'disabled'); + this.item.tabIndex = 0; } - }); - } - dispose() { - this._tokenizationRegistryListener.dispose(); - } - getLoadStatus() { - let promises = []; - for (let nestedModeId in this._embeddedModes) { - const tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].get(nestedModeId); - if (tokenizationSupport) { - // The nested mode is already loaded - if (tokenizationSupport instanceof MonarchTokenizer) { - const nestedModeStatus = tokenizationSupport.getLoadStatus(); - if (nestedModeStatus.loaded === false) { - promises.push(nestedModeStatus.promise); - } - } - continue; + } + else { + if (this.element) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, 'disabled'); } - const tokenizationSupportPromise = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].getPromise(nestedModeId); - if (tokenizationSupportPromise) { - // The nested mode is in the process of being loaded - promises.push(tokenizationSupportPromise); + if (this.item) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'disabled'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeTabIndexAndUpdateFocus"])(this.item); } } - if (promises.length === 0) { - return { - loaded: true - }; - } - return { - loaded: false, - promise: Promise.all(promises).then(_ => undefined) - }; } - getInitialState() { - let rootState = MonarchStackElementFactory.create(null, this._lexer.start); - return MonarchLineStateFactory.create(rootState, null); - } - tokenize(line, lineState, offsetDelta) { - let tokensCollector = new MonarchClassicTokensCollector(); - let endLineState = this._tokenize(line, lineState, offsetDelta, tokensCollector); - return tokensCollector.finalize(endLineState); - } - tokenize2(line, lineState, offsetDelta) { - let tokensCollector = new MonarchModernTokensCollector(this._modeService, this._standaloneThemeService.getColorTheme().tokenTheme); - let endLineState = this._tokenize(line, lineState, offsetDelta, tokensCollector); - return tokensCollector.finalize(endLineState); - } - _tokenize(line, lineState, offsetDelta, collector) { - if (lineState.embeddedModeData) { - return this._nestedTokenize(line, lineState, offsetDelta, collector); + updateChecked() { + if (!this.item) { + return; + } + if (this.getAction().checked) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'checked'); + this.item.setAttribute('role', 'menuitemcheckbox'); + this.item.setAttribute('aria-checked', 'true'); } else { - return this._myTokenize(line, lineState, offsetDelta, collector); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"])(this.item, 'checked'); + this.item.setAttribute('role', 'menuitem'); + this.item.setAttribute('aria-checked', 'false'); } } - _findLeavingNestedModeOffset(line, state) { - let rules = this._lexer.tokenizer[state.stack.state]; - if (!rules) { - rules = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["findRules"](this._lexer, state.stack.state); // do parent matching - if (!rules) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'tokenizer state is not defined: ' + state.stack.state); - } - } - let popOffset = -1; - let hasEmbeddedPopRule = false; - for (const rule of rules) { - if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["isIAction"](rule.action) || rule.action.nextEmbedded !== '@pop') { - continue; - } - hasEmbeddedPopRule = true; - let regex = rule.regex; - let regexSource = rule.regex.source; - if (regexSource.substr(0, 4) === '^(?:' && regexSource.substr(regexSource.length - 1, 1) === ')') { - let flags = (regex.ignoreCase ? 'i' : '') + (regex.unicode ? 'u' : ''); - regex = new RegExp(regexSource.substr(4, regexSource.length - 5), flags); - } - let result = line.search(regex); - if (result === -1 || (result !== 0 && rule.matchOnlyAtLineStart)) { - continue; - } - if (popOffset === -1 || result < popOffset) { - popOffset = result; - } + getMnemonic() { + return this.mnemonic; + } + applyStyle() { + if (!this.menuStyle) { + return; } - if (!hasEmbeddedPopRule) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: ' + state.stack.state); + const isSelected = this.element && Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, 'focused'); + const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor; + const bgColor = isSelected && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : undefined; + const border = isSelected && this.menuStyle.selectionBorderColor ? `thin solid ${this.menuStyle.selectionBorderColor}` : ''; + if (this.item) { + this.item.style.color = fgColor ? fgColor.toString() : ''; + this.item.style.backgroundColor = bgColor ? bgColor.toString() : ''; } - return popOffset; - } - _nestedTokenize(line, lineState, offsetDelta, tokensCollector) { - let popOffset = this._findLeavingNestedModeOffset(line, lineState); - if (popOffset === -1) { - // tokenization will not leave nested mode - let nestedEndState = tokensCollector.nestedModeTokenize(line, lineState.embeddedModeData, offsetDelta); - return MonarchLineStateFactory.create(lineState.stack, new EmbeddedModeData(lineState.embeddedModeData.modeId, nestedEndState)); + if (this.check) { + this.check.style.color = fgColor ? fgColor.toString() : ''; } - let nestedModeLine = line.substring(0, popOffset); - if (nestedModeLine.length > 0) { - // tokenize with the nested mode - tokensCollector.nestedModeTokenize(nestedModeLine, lineState.embeddedModeData, offsetDelta); + if (this.container) { + this.container.style.border = border; } - let restOfTheLine = line.substring(popOffset); - return this._myTokenize(restOfTheLine, lineState, offsetDelta + popOffset, tokensCollector); } - _safeRuleName(rule) { - if (rule) { - return rule.name; - } - return '(unknown)'; + style(style) { + this.menuStyle = style; + this.applyStyle(); } - _myTokenize(line, lineState, offsetDelta, tokensCollector) { - tokensCollector.enterMode(offsetDelta, this._modeId); - const lineLength = line.length; - let embeddedModeData = lineState.embeddedModeData; - let stack = lineState.stack; - let pos = 0; - let groupMatching = null; - // See https://github.com/Microsoft/monaco-editor/issues/1235: - // Evaluate rules at least once for an empty line - let forceEvaluation = true; - while (forceEvaluation || pos < lineLength) { - const pos0 = pos; - const stackLen0 = stack.depth; - const groupLen0 = groupMatching ? groupMatching.groups.length : 0; - const state = stack.state; - let matches = null; - let matched = null; - let action = null; - let rule = null; - let enteringEmbeddedMode = null; - // check if we need to process group matches first - if (groupMatching) { - matches = groupMatching.matches; - const groupEntry = groupMatching.groups.shift(); - matched = groupEntry.matched; - action = groupEntry.action; - rule = groupMatching.rule; - // cleanup if necessary - if (groupMatching.groups.length === 0) { - groupMatching = null; - } - } - else { - // otherwise we match on the token stream - if (!forceEvaluation && pos >= lineLength) { - // nothing to do - break; - } - forceEvaluation = false; - // get the rules for this state - let rules = this._lexer.tokenizer[state]; - if (!rules) { - rules = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["findRules"](this._lexer, state); // do parent matching - if (!rules) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'tokenizer state is not defined: ' + state); - } - } - // try each rule until we match - let restOfLine = line.substr(pos); - for (const rule of rules) { - if (pos === 0 || !rule.matchOnlyAtLineStart) { - matches = restOfLine.match(rule.regex); - if (matches) { - matched = matches[0]; - action = rule.action; - break; - } - } - } - } - // We matched 'rule' with 'matches' and 'action' - if (!matches) { - matches = ['']; - matched = ''; - } - if (!action) { - // bad: we didn't match anything, and there is no action to take - // we need to advance the stream or we get progress trouble - if (pos < lineLength) { - matches = [line.charAt(pos)]; - matched = matches[0]; - } - action = this._lexer.defaultToken; - } - if (matched === null) { - // should never happen, needed for strict null checking - break; - } - // advance stream - pos += matched.length; - // maybe call action function (used for 'cases') - while (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["isFuzzyAction"](action) && _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["isIAction"](action) && action.test) { - action = action.test(matched, matches, state, pos === lineLength); +} +class SubmenuMenuActionViewItem extends BaseMenuActionViewItem { + constructor(action, submenuActions, parentData, submenuOptions) { + super(action, action, submenuOptions); + this.submenuActions = submenuActions; + this.parentData = parentData; + this.submenuOptions = submenuOptions; + this.mysubmenu = null; + this.submenuDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["DisposableStore"]()); + this.mouseOver = false; + this.expandDirection = submenuOptions && submenuOptions.expandDirection !== undefined ? submenuOptions.expandDirection : Direction.Right; + this.showScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { + if (this.mouseOver) { + this.cleanupExistingSubmenu(false); + this.createSubmenu(false); } - let result = null; - // set the result: either a string or an array of actions - if (typeof action === 'string' || Array.isArray(action)) { - result = action; + }, 250); + this.hideScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_6__["RunOnceScheduler"](() => { + if (this.element && (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])(), this.element) && this.parentData.submenu === this.mysubmenu)) { + this.parentData.parent.focus(false); + this.cleanupExistingSubmenu(true); } - else if (action.group) { - result = action.group; + }, 750); + } + render(container) { + super.render(container); + if (!this.element) { + return; + } + if (this.item) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.item, 'monaco-submenu-item'); + this.item.setAttribute('aria-haspopup', 'true'); + this.updateAriaExpanded('false'); + this.submenuIndicator = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.item, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('span.submenu-indicator' + menuSubmenuIcon.cssSelector)); + this.submenuIndicator.setAttribute('aria-hidden', 'true'); + } + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_UP, e => { + let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + this.createSubmenu(true); } - else if (action.token !== null && action.token !== undefined) { - // do $n replacements? - if (action.tokenSubst) { - result = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["substituteMatches"](this._lexer, action.token, matched, matches, state); - } - else { - result = action.token; - } - // enter embedded mode? - if (action.nextEmbedded) { - if (action.nextEmbedded === '@pop') { - if (!embeddedModeData) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'cannot pop embedded mode if not inside one'); - } - embeddedModeData = null; - } - else if (embeddedModeData) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'cannot enter embedded mode from within an embedded mode'); - } - else { - enteringEmbeddedMode = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["substituteMatches"](this._lexer, action.nextEmbedded, matched, matches, state); - } - } - // state transformations - if (action.goBack) { // back up the stream.. - pos = Math.max(0, pos - action.goBack); - } - if (action.switchTo && typeof action.switchTo === 'string') { - let nextState = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["substituteMatches"](this._lexer, action.switchTo, matched, matches, state); // switch state without a push... - if (nextState[0] === '@') { - nextState = nextState.substr(1); // peel off starting '@' - } - if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["findRules"](this._lexer, nextState)) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'trying to switch to a state \'' + nextState + '\' that is undefined in rule: ' + this._safeRuleName(rule)); - } - else { - stack = stack.switchTo(nextState); - } - } - else if (action.transform && typeof action.transform === 'function') { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'action.transform not supported'); - } - else if (action.next) { - if (action.next === '@push') { - if (stack.depth >= this._lexer.maxStack) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'maximum tokenizer stack size reached: [' + - stack.state + ',' + stack.parent.state + ',...]'); - } - else { - stack = stack.push(state); - } - } - else if (action.next === '@pop') { - if (stack.depth <= 1) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'trying to pop an empty stack in rule: ' + this._safeRuleName(rule)); - } - else { - stack = stack.pop(); - } - } - else if (action.next === '@popall') { - stack = stack.popall(); - } - else { - let nextState = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["substituteMatches"](this._lexer, action.next, matched, matches, state); - if (nextState[0] === '@') { - nextState = nextState.substr(1); // peel off starting '@' - } - if (!_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["findRules"](this._lexer, nextState)) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'trying to set a next state \'' + nextState + '\' that is undefined in rule: ' + this._safeRuleName(rule)); - } - else { - stack = stack.push(nextState); - } - } - } - if (action.log && typeof (action.log) === 'string') { - _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["log"](this._lexer, this._lexer.languageId + ': ' + _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["substituteMatches"](this._lexer, action.log, matched, matches, state)); + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { + let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])() === this.item) { + if (event.equals(17 /* RightArrow */) || event.equals(3 /* Enter */)) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); } } - // check result - if (result === null) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'lexer rule has no well-defined action in rule: ' + this._safeRuleName(rule)); + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_OVER, e => { + if (!this.mouseOver) { + this.mouseOver = true; + this.showScheduler.schedule(); } - const computeNewStateForEmbeddedMode = (enteringEmbeddedMode) => { - // substitute language alias to known modes to support syntax highlighting - let enteringEmbeddedModeId = this._modeService.getModeIdForLanguageName(enteringEmbeddedMode); - if (enteringEmbeddedModeId) { - enteringEmbeddedMode = enteringEmbeddedModeId; - } - const embeddedModeData = this._getNestedEmbeddedModeData(enteringEmbeddedMode); - if (pos < lineLength) { - // there is content from the embedded mode on this line - const restOfLine = line.substr(pos); - return this._nestedTokenize(restOfLine, MonarchLineStateFactory.create(stack, embeddedModeData), offsetDelta + pos, tokensCollector); - } - else { - return MonarchLineStateFactory.create(stack, embeddedModeData); - } - }; - // is the result a group match? - if (Array.isArray(result)) { - if (groupMatching && groupMatching.groups.length > 0) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'groups cannot be nested: ' + this._safeRuleName(rule)); - } - if (matches.length !== result.length + 1) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'matched number of groups does not match the number of actions in rule: ' + this._safeRuleName(rule)); - } - let totalLen = 0; - for (let i = 1; i < matches.length; i++) { - totalLen += matches[i].length; - } - if (totalLen !== matched.length) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'with groups, all characters should be matched in consecutive groups in rule: ' + this._safeRuleName(rule)); - } - groupMatching = { - rule: rule, - matches: matches, - groups: [] - }; - for (let i = 0; i < result.length; i++) { - groupMatching.groups[i] = { - action: result[i], - matched: matches[i + 1] - }; - } - pos -= matched.length; - // call recursively to initiate first result match - continue; + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_LEAVE, e => { + this.mouseOver = false; + })); + this._register(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.element, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].FOCUS_OUT, e => { + if (this.element && !Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["isAncestor"])(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["getActiveElement"])(), this.element)) { + this.hideScheduler.schedule(); } - else { - // regular result - // check for '@rematch' - if (result === '@rematch') { - pos -= matched.length; - matched = ''; // better set the next state too.. - matches = null; - result = ''; - // Even though `@rematch` was specified, if `nextEmbedded` also specified, - // a state transition should occur. - if (enteringEmbeddedMode !== null) { - return computeNewStateForEmbeddedMode(enteringEmbeddedMode); - } - } - // check progress - if (matched.length === 0) { - if (lineLength === 0 || stackLen0 !== stack.depth || state !== stack.state || (!groupMatching ? 0 : groupMatching.groups.length) !== groupLen0) { - continue; - } - else { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, 'no progress in tokenizer in rule: ' + this._safeRuleName(rule)); - } - } - // return the result (and check for brace matching) - // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions - let tokenType = null; - if (_monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["isString"](result) && result.indexOf('@brackets') === 0) { - let rest = result.substr('@brackets'.length); - let bracket = findBracket(this._lexer, matched); - if (!bracket) { - throw _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["createError"](this._lexer, '@brackets token returned but no bracket defined as: ' + matched); - } - tokenType = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["sanitize"](bracket.token + rest); - } - else { - let token = (result === '' ? '' : result + this._lexer.tokenPostfix); - tokenType = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["sanitize"](token); - } - tokensCollector.emit(pos0 + offsetDelta, tokenType); + })); + this._register(this.parentData.parent.onScroll(() => { + this.parentData.parent.focus(false); + this.cleanupExistingSubmenu(false); + })); + } + onClick(e) { + // stop clicking from trying to run an action + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + this.cleanupExistingSubmenu(false); + this.createSubmenu(true); + } + cleanupExistingSubmenu(force) { + if (this.parentData.submenu && (force || (this.parentData.submenu !== this.mysubmenu))) { + // disposal may throw if the submenu has already been removed + try { + this.parentData.submenu.dispose(); } - if (enteringEmbeddedMode !== null) { - return computeNewStateForEmbeddedMode(enteringEmbeddedMode); + catch (_a) { } + this.parentData.submenu = undefined; + this.updateAriaExpanded('false'); + if (this.submenuContainer) { + this.submenuDisposables.clear(); + this.submenuContainer = undefined; } } - return MonarchLineStateFactory.create(stack, embeddedModeData); } - _getNestedEmbeddedModeData(mimetypeOrModeId) { - let nestedModeId = this._locateMode(mimetypeOrModeId); - if (nestedModeId) { - let tokenizationSupport = _common_modes_js__WEBPACK_IMPORTED_MODULE_1__["TokenizationRegistry"].get(nestedModeId); - if (tokenizationSupport) { - return new EmbeddedModeData(nestedModeId, tokenizationSupport.getInitialState()); + calculateSubmenuMenuLayout(windowDimensions, submenu, entry, expandDirection) { + const ret = { top: 0, left: 0 }; + // Start with horizontal + ret.left = Object(_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__["layout"])(windowDimensions.width, submenu.width, { position: expandDirection === Direction.Right ? 0 /* Before */ : 1 /* After */, offset: entry.left, size: entry.width }); + // We don't have enough room to layout the menu fully, so we are overlapping the menu + if (ret.left >= entry.left && ret.left < entry.left + entry.width) { + if (entry.left + 10 + submenu.width <= windowDimensions.width) { + ret.left = entry.left + 10; } + entry.top += 10; + entry.height = 0; + } + // Now that we have a horizontal position, try layout vertically + ret.top = Object(_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_9__["layout"])(windowDimensions.height, submenu.height, { position: 0 /* Before */, offset: entry.top, size: 0 }); + // We didn't have enough room below, but we did above, so we shift down to align the menu + if (ret.top + submenu.height === entry.top && ret.top + entry.height + submenu.height <= windowDimensions.height) { + ret.top += entry.height; } - return new EmbeddedModeData(nestedModeId || _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__["NULL_MODE_ID"], _common_modes_nullMode_js__WEBPACK_IMPORTED_MODULE_2__["NULL_STATE"]); + return ret; } - _locateMode(mimetypeOrModeId) { - if (!mimetypeOrModeId || !this._modeService.isRegisteredMode(mimetypeOrModeId)) { - return null; + createSubmenu(selectFirstItem = true) { + if (!this.element) { + return; } - if (mimetypeOrModeId === this._modeId) { - // embedding myself... - return mimetypeOrModeId; + if (!this.parentData.submenu) { + this.updateAriaExpanded('true'); + this.submenuContainer = Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["append"])(this.element, Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('div.monaco-submenu')); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.submenuContainer, 'menubar-menu-items-holder', 'context-view'); + // Set the top value of the menu container before construction + // This allows the menu constructor to calculate the proper max height + const computedStyles = getComputedStyle(this.parentData.parent.domNode); + const paddingTop = parseFloat(computedStyles.paddingTop || '0') || 0; + // this.submenuContainer.style.top = `${this.element.offsetTop - this.parentData.parent.scrollOffset - paddingTop}px`; + this.submenuContainer.style.zIndex = '1'; + this.submenuContainer.style.position = 'fixed'; + this.submenuContainer.style.top = '0'; + this.submenuContainer.style.left = '0'; + this.parentData.submenu = new Menu(this.submenuContainer, this.submenuActions, this.submenuOptions); + if (this.menuStyle) { + this.parentData.submenu.style(this.menuStyle); + } + // layout submenu + const entryBox = this.element.getBoundingClientRect(); + const entryBoxUpdated = { + top: entryBox.top - paddingTop, + left: entryBox.left, + height: entryBox.height + 2 * paddingTop, + width: entryBox.width + }; + const viewBox = this.submenuContainer.getBoundingClientRect(); + const { top, left } = this.calculateSubmenuMenuLayout({ height: window.innerHeight, width: window.innerWidth }, viewBox, entryBoxUpdated, this.expandDirection); + this.submenuContainer.style.left = `${left}px`; + this.submenuContainer.style.top = `${top}px`; + this.submenuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_UP, e => { + let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + if (event.equals(15 /* LeftArrow */)) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + this.parentData.parent.focus(); + this.cleanupExistingSubmenu(true); + } + })); + this.submenuDisposables.add(Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addDisposableListener"])(this.submenuContainer, _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].KEY_DOWN, e => { + let event = new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e); + if (event.equals(15 /* LeftArrow */)) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["EventHelper"].stop(e, true); + } + })); + this.submenuDisposables.add(this.parentData.submenu.onDidCancel(() => { + this.parentData.parent.focus(); + this.cleanupExistingSubmenu(true); + })); + this.parentData.submenu.focus(selectFirstItem); + this.mysubmenu = this.parentData.submenu; } - let modeId = this._modeService.getModeId(mimetypeOrModeId); - if (modeId) { - // Fire mode loading event - this._modeService.triggerMode(modeId); - this._embeddedModes[modeId] = true; + else { + this.parentData.submenu.focus(false); } - return modeId; - } -} -/** - * Searches for a bracket in the 'brackets' attribute that matches the input. - */ -function findBracket(lexer, matched) { - if (!matched) { - return null; } - matched = _monarchCommon_js__WEBPACK_IMPORTED_MODULE_3__["fixCase"](lexer, matched); - let brackets = lexer.brackets; - for (const bracket of brackets) { - if (bracket.open === matched) { - return { token: bracket.token, bracketType: 1 /* Open */ }; - } - else if (bracket.close === matched) { - return { token: bracket.token, bracketType: -1 /* Close */ }; + updateAriaExpanded(value) { + var _a; + if (this.item) { + (_a = this.item) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', value); } } - return null; -} -function createTokenizationSupport(modeService, standaloneThemeService, modeId, lexer) { - return new MonarchTokenizer(modeService, standaloneThemeService, modeId, lexer); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js ***! - \**********************************************************************************************/ -/*! exports provided: IStandaloneThemeService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IStandaloneThemeService", function() { return IStandaloneThemeService; }); -/* harmony import */ var _platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../platform/instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IStandaloneThemeService = Object(_platform_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('themeService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js ***! - \******************************************************************************/ -/*! exports provided: vs, vs_dark, hc_black */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vs", function() { return vs; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vs_dark", function() { return vs_dark; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hc_black", function() { return hc_black; }); -/* harmony import */ var _common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/view/editorColorRegistry.js */ "./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js"); -/* harmony import */ var _platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../platform/theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/* -------------------------------- Begin vs theme -------------------------------- */ -const vs = { - base: 'vs', - inherit: false, - rules: [ - { token: '', foreground: '000000', background: 'fffffe' }, - { token: 'invalid', foreground: 'cd3131' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - { token: 'variable', foreground: '001188' }, - { token: 'variable.predefined', foreground: '4864AA' }, - { token: 'constant', foreground: 'dd0000' }, - { token: 'comment', foreground: '008000' }, - { token: 'number', foreground: '098658' }, - { token: 'number.hex', foreground: '3030c0' }, - { token: 'regexp', foreground: '800000' }, - { token: 'annotation', foreground: '808080' }, - { token: 'type', foreground: '008080' }, - { token: 'delimiter', foreground: '000000' }, - { token: 'delimiter.html', foreground: '383838' }, - { token: 'delimiter.xml', foreground: '0000FF' }, - { token: 'tag', foreground: '800000' }, - { token: 'tag.id.pug', foreground: '4F76AC' }, - { token: 'tag.class.pug', foreground: '4F76AC' }, - { token: 'meta.scss', foreground: '800000' }, - { token: 'metatag', foreground: 'e00000' }, - { token: 'metatag.content.html', foreground: 'FF0000' }, - { token: 'metatag.html', foreground: '808080' }, - { token: 'metatag.xml', foreground: '808080' }, - { token: 'metatag.php', fontStyle: 'bold' }, - { token: 'key', foreground: '863B00' }, - { token: 'string.key.json', foreground: 'A31515' }, - { token: 'string.value.json', foreground: '0451A5' }, - { token: 'attribute.name', foreground: 'FF0000' }, - { token: 'attribute.value', foreground: '0451A5' }, - { token: 'attribute.value.number', foreground: '098658' }, - { token: 'attribute.value.unit', foreground: '098658' }, - { token: 'attribute.value.html', foreground: '0000FF' }, - { token: 'attribute.value.xml', foreground: '0000FF' }, - { token: 'string', foreground: 'A31515' }, - { token: 'string.html', foreground: '0000FF' }, - { token: 'string.sql', foreground: 'FF0000' }, - { token: 'string.yaml', foreground: '0451A5' }, - { token: 'keyword', foreground: '0000FF' }, - { token: 'keyword.json', foreground: '0451A5' }, - { token: 'keyword.flow', foreground: 'AF00DB' }, - { token: 'keyword.flow.scss', foreground: '0000FF' }, - { token: 'operator.scss', foreground: '666666' }, - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '666666' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorBackground"]]: '#FFFFFE', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorForeground"]]: '#000000', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorInactiveSelection"]]: '#E5EBF1', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorIndentGuides"]]: '#D3D3D3', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorActiveIndentGuides"]]: '#939393', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorSelectionHighlight"]]: '#ADD6FF4D' - } -}; -/* -------------------------------- End vs theme -------------------------------- */ -/* -------------------------------- Begin vs-dark theme -------------------------------- */ -const vs_dark = { - base: 'vs-dark', - inherit: false, - rules: [ - { token: '', foreground: 'D4D4D4', background: '1E1E1E' }, - { token: 'invalid', foreground: 'f44747' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - { token: 'variable', foreground: '74B0DF' }, - { token: 'variable.predefined', foreground: '4864AA' }, - { token: 'variable.parameter', foreground: '9CDCFE' }, - { token: 'constant', foreground: '569CD6' }, - { token: 'comment', foreground: '608B4E' }, - { token: 'number', foreground: 'B5CEA8' }, - { token: 'number.hex', foreground: '5BB498' }, - { token: 'regexp', foreground: 'B46695' }, - { token: 'annotation', foreground: 'cc6666' }, - { token: 'type', foreground: '3DC9B0' }, - { token: 'delimiter', foreground: 'DCDCDC' }, - { token: 'delimiter.html', foreground: '808080' }, - { token: 'delimiter.xml', foreground: '808080' }, - { token: 'tag', foreground: '569CD6' }, - { token: 'tag.id.pug', foreground: '4F76AC' }, - { token: 'tag.class.pug', foreground: '4F76AC' }, - { token: 'meta.scss', foreground: 'A79873' }, - { token: 'meta.tag', foreground: 'CE9178' }, - { token: 'metatag', foreground: 'DD6A6F' }, - { token: 'metatag.content.html', foreground: '9CDCFE' }, - { token: 'metatag.html', foreground: '569CD6' }, - { token: 'metatag.xml', foreground: '569CD6' }, - { token: 'metatag.php', fontStyle: 'bold' }, - { token: 'key', foreground: '9CDCFE' }, - { token: 'string.key.json', foreground: '9CDCFE' }, - { token: 'string.value.json', foreground: 'CE9178' }, - { token: 'attribute.name', foreground: '9CDCFE' }, - { token: 'attribute.value', foreground: 'CE9178' }, - { token: 'attribute.value.number.css', foreground: 'B5CEA8' }, - { token: 'attribute.value.unit.css', foreground: 'B5CEA8' }, - { token: 'attribute.value.hex.css', foreground: 'D4D4D4' }, - { token: 'string', foreground: 'CE9178' }, - { token: 'string.sql', foreground: 'FF0000' }, - { token: 'keyword', foreground: '569CD6' }, - { token: 'keyword.flow', foreground: 'C586C0' }, - { token: 'keyword.json', foreground: 'CE9178' }, - { token: 'keyword.flow.scss', foreground: '569CD6' }, - { token: 'operator.scss', foreground: '909090' }, - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '909090' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorBackground"]]: '#1E1E1E', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorForeground"]]: '#D4D4D4', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorInactiveSelection"]]: '#3A3D41', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorIndentGuides"]]: '#404040', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorActiveIndentGuides"]]: '#707070', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorSelectionHighlight"]]: '#ADD6FF26' - } -}; -/* -------------------------------- End vs-dark theme -------------------------------- */ -/* -------------------------------- Begin hc-black theme -------------------------------- */ -const hc_black = { - base: 'hc-black', - inherit: false, - rules: [ - { token: '', foreground: 'FFFFFF', background: '000000' }, - { token: 'invalid', foreground: 'f44747' }, - { token: 'emphasis', fontStyle: 'italic' }, - { token: 'strong', fontStyle: 'bold' }, - { token: 'variable', foreground: '1AEBFF' }, - { token: 'variable.parameter', foreground: '9CDCFE' }, - { token: 'constant', foreground: '569CD6' }, - { token: 'comment', foreground: '608B4E' }, - { token: 'number', foreground: 'FFFFFF' }, - { token: 'regexp', foreground: 'C0C0C0' }, - { token: 'annotation', foreground: '569CD6' }, - { token: 'type', foreground: '3DC9B0' }, - { token: 'delimiter', foreground: 'FFFF00' }, - { token: 'delimiter.html', foreground: 'FFFF00' }, - { token: 'tag', foreground: '569CD6' }, - { token: 'tag.id.pug', foreground: '4F76AC' }, - { token: 'tag.class.pug', foreground: '4F76AC' }, - { token: 'meta', foreground: 'D4D4D4' }, - { token: 'meta.tag', foreground: 'CE9178' }, - { token: 'metatag', foreground: '569CD6' }, - { token: 'metatag.content.html', foreground: '1AEBFF' }, - { token: 'metatag.html', foreground: '569CD6' }, - { token: 'metatag.xml', foreground: '569CD6' }, - { token: 'metatag.php', fontStyle: 'bold' }, - { token: 'key', foreground: '9CDCFE' }, - { token: 'string.key', foreground: '9CDCFE' }, - { token: 'string.value', foreground: 'CE9178' }, - { token: 'attribute.name', foreground: '569CD6' }, - { token: 'attribute.value', foreground: '3FF23F' }, - { token: 'string', foreground: 'CE9178' }, - { token: 'string.sql', foreground: 'FF0000' }, - { token: 'keyword', foreground: '569CD6' }, - { token: 'keyword.flow', foreground: 'C586C0' }, - { token: 'operator.sql', foreground: '778899' }, - { token: 'operator.swift', foreground: '909090' }, - { token: 'predefined.sql', foreground: 'FF00FF' }, - ], - colors: { - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorBackground"]]: '#000000', - [_platform_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_1__["editorForeground"]]: '#FFFFFF', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorIndentGuides"]]: '#FFFFFF', - [_common_view_editorColorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["editorActiveIndentGuides"]]: '#FFFFFF', - } -}; -/* -------------------------------- End hc-black theme -------------------------------- */ - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js ***! - \**************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/css/monaco.contribution.js ***! - \*******************************************************************************/ -/*! exports provided: cssDefaults, scssDefaults, lessDefaults */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssDefaults", function() { return cssDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scssDefaults", function() { return scssDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lessDefaults", function() { return lessDefaults; }); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ "./node_modules/monaco-editor/esm/vs/language/css/fillers/monaco-editor-core.js"); - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -// --- CSS configuration and defaults --------- -var LanguageServiceDefaultsImpl = /** @class */ (function () { - function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) { - this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this._languageId = languageId; - this.setDiagnosticsOptions(diagnosticsOptions); - this.setModeConfiguration(modeConfiguration); - } - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "onDidChange", { - get: function () { - return this._onDidChange.event; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "languageId", { - get: function () { - return this._languageId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "modeConfiguration", { - get: function () { - return this._modeConfiguration; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "diagnosticsOptions", { - get: function () { - return this._diagnosticsOptions; - }, - enumerable: false, - configurable: true - }); - LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) { - this._diagnosticsOptions = options || Object.create(null); - this._onDidChange.fire(this); - }; - LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) { - this._modeConfiguration = modeConfiguration || Object.create(null); - this._onDidChange.fire(this); - }; - return LanguageServiceDefaultsImpl; -}()); -var diagnosticDefault = { - validate: true, - lint: { - compatibleVendorPrefixes: 'ignore', - vendorPrefix: 'warning', - duplicateProperties: 'warning', - emptyRules: 'warning', - importStatement: 'ignore', - boxModel: 'ignore', - universalSelector: 'ignore', - zeroUnits: 'ignore', - fontFaceProperties: 'warning', - hexColorLength: 'error', - argumentsInColorFunction: 'error', - unknownProperties: 'warning', - ieHack: 'ignore', - unknownVendorSpecificProperties: 'ignore', - propertyIgnoredDueToDisplay: 'warning', - important: 'ignore', - float: 'ignore', - idSelector: 'ignore' - } -}; -var modeConfigurationDefault = { - completionItems: true, - hovers: true, - documentSymbols: true, - definitions: true, - references: true, - documentHighlights: true, - rename: true, - colors: true, - foldingRanges: true, - diagnostics: true, - selectionRanges: true -}; -var cssDefaults = new LanguageServiceDefaultsImpl('css', diagnosticDefault, modeConfigurationDefault); -var scssDefaults = new LanguageServiceDefaultsImpl('scss', diagnosticDefault, modeConfigurationDefault); -var lessDefaults = new LanguageServiceDefaultsImpl('less', diagnosticDefault, modeConfigurationDefault); -// export to the global based API -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].css = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults }; -// --- Registration to monaco editor --- -function getMode() { - return __webpack_require__.e(/*! import() */ 2).then(__webpack_require__.bind(null, /*! ./cssMode.js */ "./node_modules/monaco-editor/esm/vs/language/css/cssMode.js")); -} -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage('less', function () { - getMode().then(function (mode) { return mode.setupMode(lessDefaults); }); -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage('scss', function () { - getMode().then(function (mode) { return mode.setupMode(scssDefaults); }); -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage('css', function () { - getMode().then(function (mode) { return mode.setupMode(cssDefaults); }); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/html/monaco.contribution.js ***! - \********************************************************************************/ -/*! exports provided: htmlDefaults, handlebarDefaults, razorDefaults */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlDefaults", function() { return htmlDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handlebarDefaults", function() { return handlebarDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "razorDefaults", function() { return razorDefaults; }); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ "./node_modules/monaco-editor/esm/vs/language/html/fillers/monaco-editor-core.js"); - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -// --- HTML configuration and defaults --------- -var LanguageServiceDefaultsImpl = /** @class */ (function () { - function LanguageServiceDefaultsImpl(languageId, options, modeConfiguration) { - this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this._languageId = languageId; - this.setOptions(options); - this.setModeConfiguration(modeConfiguration); - } - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "onDidChange", { - get: function () { - return this._onDidChange.event; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "languageId", { - get: function () { - return this._languageId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "options", { - get: function () { - return this._options; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "modeConfiguration", { - get: function () { - return this._modeConfiguration; - }, - enumerable: false, - configurable: true - }); - LanguageServiceDefaultsImpl.prototype.setOptions = function (options) { - this._options = options || Object.create(null); - this._onDidChange.fire(this); - }; - LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) { - this._modeConfiguration = modeConfiguration || Object.create(null); - this._onDidChange.fire(this); - }; - return LanguageServiceDefaultsImpl; -}()); -var formatDefaults = { - tabSize: 4, - insertSpaces: false, - wrapLineLength: 120, - unformatted: 'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var', - contentUnformatted: 'pre', - indentInnerHtml: false, - preserveNewLines: true, - maxPreserveNewLines: null, - indentHandlebars: false, - endWithNewline: false, - extraLiners: 'head, body, /html', - wrapAttributes: 'auto' -}; -var htmlOptionsDefault = { - format: formatDefaults, - suggest: { html5: true, angular1: true, ionic: true } -}; -var handlebarOptionsDefault = { - format: formatDefaults, - suggest: { html5: true } -}; -var razorOptionsDefault = { - format: formatDefaults, - suggest: { html5: true, razor: true } -}; -function getConfigurationDefault(languageId) { - return { - completionItems: true, - hovers: true, - documentSymbols: true, - links: true, - documentHighlights: true, - rename: true, - colors: true, - foldingRanges: true, - selectionRanges: true, - diagnostics: languageId === htmlLanguageId, - documentFormattingEdits: languageId === htmlLanguageId, - documentRangeFormattingEdits: languageId === htmlLanguageId // turned off for Razor and Handlebar - }; -} -var htmlLanguageId = 'html'; -var handlebarsLanguageId = 'handlebars'; -var razorLanguageId = 'razor'; -var htmlDefaults = new LanguageServiceDefaultsImpl(htmlLanguageId, htmlOptionsDefault, getConfigurationDefault(htmlLanguageId)); -var handlebarDefaults = new LanguageServiceDefaultsImpl(handlebarsLanguageId, handlebarOptionsDefault, getConfigurationDefault(handlebarsLanguageId)); -var razorDefaults = new LanguageServiceDefaultsImpl(razorLanguageId, razorOptionsDefault, getConfigurationDefault(razorLanguageId)); -// export to the global based API -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].html = { htmlDefaults: htmlDefaults, razorDefaults: razorDefaults, handlebarDefaults: handlebarDefaults }; -// --- Registration to monaco editor --- -function getMode() { - return __webpack_require__.e(/*! import() */ 3).then(__webpack_require__.bind(null, /*! ./htmlMode.js */ "./node_modules/monaco-editor/esm/vs/language/html/htmlMode.js")); -} -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage(htmlLanguageId, function () { - getMode().then(function (mode) { return mode.setupMode(htmlDefaults); }); -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage(handlebarsLanguageId, function () { - getMode().then(function (mode) { return mode.setupMode(handlebarDefaults); }); -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage(razorLanguageId, function () { - getMode().then(function (mode) { return mode.setupMode(razorDefaults); }); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/json/monaco.contribution.js ***! - \********************************************************************************/ -/*! exports provided: jsonDefaults */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsonDefaults", function() { return jsonDefaults; }); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ "./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js"); - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var LanguageServiceDefaultsImpl = /** @class */ (function () { - function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) { - this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this._languageId = languageId; - this.setDiagnosticsOptions(diagnosticsOptions); - this.setModeConfiguration(modeConfiguration); - } - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "onDidChange", { - get: function () { - return this._onDidChange.event; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "languageId", { - get: function () { - return this._languageId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "modeConfiguration", { - get: function () { - return this._modeConfiguration; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "diagnosticsOptions", { - get: function () { - return this._diagnosticsOptions; - }, - enumerable: false, - configurable: true - }); - LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) { - this._diagnosticsOptions = options || Object.create(null); - this._onDidChange.fire(this); - }; - LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) { - this._modeConfiguration = modeConfiguration || Object.create(null); - this._onDidChange.fire(this); - }; - return LanguageServiceDefaultsImpl; -}()); -var diagnosticDefault = { - validate: true, - allowComments: true, - schemas: [], - enableSchemaRequest: false -}; -var modeConfigurationDefault = { - documentFormattingEdits: true, - documentRangeFormattingEdits: true, - completionItems: true, - hovers: true, - documentSymbols: true, - tokens: true, - colors: true, - foldingRanges: true, - diagnostics: true, - selectionRanges: true -}; -var jsonDefaults = new LanguageServiceDefaultsImpl('json', diagnosticDefault, modeConfigurationDefault); -// export to the global based API -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].json = { jsonDefaults: jsonDefaults }; -// --- Registration to monaco editor --- -function getMode() { - return __webpack_require__.e(/*! import() */ 4).then(__webpack_require__.bind(null, /*! ./jsonMode.js */ "./node_modules/monaco-editor/esm/vs/language/json/jsonMode.js")); -} -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].register({ - id: 'json', - extensions: ['.json', '.bowerrc', '.jshintrc', '.jscsrc', '.eslintrc', '.babelrc', '.har'], - aliases: ['JSON', 'json'], - mimetypes: ['application/json'] -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_1__["languages"].onLanguage('json', function () { - getMode().then(function (mode) { return mode.setupMode(jsonDefaults); }); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js ***! - \*********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js ***! - \*************************************************************************************************/ -/*! exports provided: typescriptVersion */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typescriptVersion", function() { return typescriptVersion; }); -// -// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript` -// -var typescriptVersion = "4.0.3"; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/language/typescript/monaco.contribution.js ***! - \**************************************************************************************/ -/*! exports provided: ModuleKind, JsxEmit, NewLineKind, ScriptTarget, ModuleResolutionKind, typescriptVersion, typescriptDefaults, javascriptDefaults, getTypeScriptWorker, getJavaScriptWorker */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleKind", function() { return ModuleKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsxEmit", function() { return JsxEmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NewLineKind", function() { return NewLineKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScriptTarget", function() { return ScriptTarget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleResolutionKind", function() { return ModuleResolutionKind; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typescriptVersion", function() { return typescriptVersion; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typescriptDefaults", function() { return typescriptDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "javascriptDefaults", function() { return javascriptDefaults; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTypeScriptWorker", function() { return getTypeScriptWorker; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getJavaScriptWorker", function() { return getJavaScriptWorker; }); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../editor/editor.api.js */ "./include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js"); -/* harmony import */ var _editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_editor_editor_api_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _lib_typescriptServicesMetadata_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/typescriptServicesMetadata.js */ "./node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js"); -/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ "./node_modules/monaco-editor/esm/vs/language/typescript/fillers/monaco-editor-core.js"); - -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - // do not import the whole typescriptServices here - -//#region enums copied from typescript to prevent loading the entire typescriptServices --- -var ModuleKind; -(function (ModuleKind) { - ModuleKind[ModuleKind["None"] = 0] = "None"; - ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; - ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; - ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; - ModuleKind[ModuleKind["System"] = 4] = "System"; - ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; - ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; -})(ModuleKind || (ModuleKind = {})); -var JsxEmit; -(function (JsxEmit) { - JsxEmit[JsxEmit["None"] = 0] = "None"; - JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve"; - JsxEmit[JsxEmit["React"] = 2] = "React"; - JsxEmit[JsxEmit["ReactNative"] = 3] = "ReactNative"; -})(JsxEmit || (JsxEmit = {})); -var NewLineKind; -(function (NewLineKind) { - NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; - NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed"; -})(NewLineKind || (NewLineKind = {})); -var ScriptTarget; -(function (ScriptTarget) { - ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3"; - ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5"; - ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015"; - ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016"; - ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017"; - ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; - ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; - ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; - ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; - ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; - ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; -})(ScriptTarget || (ScriptTarget = {})); -var ModuleResolutionKind; -(function (ModuleResolutionKind) { - ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic"; - ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs"; -})(ModuleResolutionKind || (ModuleResolutionKind = {})); -// --- TypeScript configuration and defaults --------- -var LanguageServiceDefaultsImpl = /** @class */ (function () { - function LanguageServiceDefaultsImpl(compilerOptions, diagnosticsOptions, workerOptions) { - this._onDidChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this._onDidExtraLibsChange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this._extraLibs = Object.create(null); - this._removedExtraLibs = Object.create(null); - this._eagerModelSync = false; - this.setCompilerOptions(compilerOptions); - this.setDiagnosticsOptions(diagnosticsOptions); - this.setWorkerOptions(workerOptions); - this._onDidExtraLibsChangeTimeout = -1; - } - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "onDidChange", { - get: function () { - return this._onDidChange.event; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "onDidExtraLibsChange", { - get: function () { - return this._onDidExtraLibsChange.event; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(LanguageServiceDefaultsImpl.prototype, "workerOptions", { - get: function () { - return this._workerOptions; - }, - enumerable: false, - configurable: true - }); - LanguageServiceDefaultsImpl.prototype.getExtraLibs = function () { - return this._extraLibs; - }; - LanguageServiceDefaultsImpl.prototype.addExtraLib = function (content, _filePath) { - var _this = this; - var filePath; - if (typeof _filePath === 'undefined') { - filePath = "ts:extralib-" + Math.random().toString(36).substring(2, 15); - } - else { - filePath = _filePath; - } - if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) { - // no-op, there already exists an extra lib with this content - return { - dispose: function () { } - }; + applyStyle() { + super.applyStyle(); + if (!this.menuStyle) { + return; } - var myVersion = 1; - if (this._removedExtraLibs[filePath]) { - myVersion = this._removedExtraLibs[filePath] + 1; + const isSelected = this.element && Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, 'focused'); + const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor; + if (this.submenuIndicator) { + this.submenuIndicator.style.color = fgColor ? `${fgColor}` : ''; } - if (this._extraLibs[filePath]) { - myVersion = this._extraLibs[filePath].version + 1; + if (this.parentData.submenu) { + this.parentData.submenu.style(this.menuStyle); } - this._extraLibs[filePath] = { - content: content, - version: myVersion - }; - this._fireOnDidExtraLibsChangeSoon(); - return { - dispose: function () { - var extraLib = _this._extraLibs[filePath]; - if (!extraLib) { - return; - } - if (extraLib.version !== myVersion) { - return; - } - delete _this._extraLibs[filePath]; - _this._removedExtraLibs[filePath] = myVersion; - _this._fireOnDidExtraLibsChangeSoon(); - } - }; - }; - LanguageServiceDefaultsImpl.prototype.setExtraLibs = function (libs) { - for (var filePath in this._extraLibs) { - this._removedExtraLibs[filePath] = this._extraLibs[filePath].version; - } - // clear out everything - this._extraLibs = Object.create(null); - if (libs && libs.length > 0) { - for (var _i = 0, libs_1 = libs; _i < libs_1.length; _i++) { - var lib = libs_1[_i]; - var filePath = lib.filePath || "ts:extralib-" + Math.random().toString(36).substring(2, 15); - var content = lib.content; - var myVersion = 1; - if (this._removedExtraLibs[filePath]) { - myVersion = this._removedExtraLibs[filePath] + 1; - } - this._extraLibs[filePath] = { - content: content, - version: myVersion - }; - } + } + dispose() { + super.dispose(); + this.hideScheduler.dispose(); + if (this.mysubmenu) { + this.mysubmenu.dispose(); + this.mysubmenu = null; } - this._fireOnDidExtraLibsChangeSoon(); - }; - LanguageServiceDefaultsImpl.prototype._fireOnDidExtraLibsChangeSoon = function () { - var _this = this; - if (this._onDidExtraLibsChangeTimeout !== -1) { - // already scheduled - return; + if (this.submenuContainer) { + this.submenuContainer = undefined; } - this._onDidExtraLibsChangeTimeout = setTimeout(function () { - _this._onDidExtraLibsChangeTimeout = -1; - _this._onDidExtraLibsChange.fire(undefined); - }, 0); - }; - LanguageServiceDefaultsImpl.prototype.getCompilerOptions = function () { - return this._compilerOptions; - }; - LanguageServiceDefaultsImpl.prototype.setCompilerOptions = function (options) { - this._compilerOptions = options || Object.create(null); - this._onDidChange.fire(undefined); - }; - LanguageServiceDefaultsImpl.prototype.getDiagnosticsOptions = function () { - return this._diagnosticsOptions; - }; - LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) { - this._diagnosticsOptions = options || Object.create(null); - this._onDidChange.fire(undefined); - }; - LanguageServiceDefaultsImpl.prototype.setWorkerOptions = function (options) { - this._workerOptions = options || Object.create(null); - this._onDidChange.fire(undefined); - }; - LanguageServiceDefaultsImpl.prototype.setMaximumWorkerIdleTime = function (value) { }; - LanguageServiceDefaultsImpl.prototype.setEagerModelSync = function (value) { - // doesn't fire an event since no - // worker restart is required here - this._eagerModelSync = value; - }; - LanguageServiceDefaultsImpl.prototype.getEagerModelSync = function () { - return this._eagerModelSync; - }; - return LanguageServiceDefaultsImpl; -}()); -var typescriptVersion = _lib_typescriptServicesMetadata_js__WEBPACK_IMPORTED_MODULE_1__["typescriptVersion"]; -var typescriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, target: ScriptTarget.Latest }, { noSemanticValidation: false, noSyntaxValidation: false }, {}); -var javascriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, allowJs: true, target: ScriptTarget.Latest }, { noSemanticValidation: true, noSyntaxValidation: false }, {}); -var getTypeScriptWorker = function () { - return getMode().then(function (mode) { return mode.getTypeScriptWorker(); }); -}; -var getJavaScriptWorker = function () { - return getMode().then(function (mode) { return mode.getJavaScriptWorker(); }); -}; -// export to the global based API -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__["languages"].typescript = { - ModuleKind: ModuleKind, - JsxEmit: JsxEmit, - NewLineKind: NewLineKind, - ScriptTarget: ScriptTarget, - ModuleResolutionKind: ModuleResolutionKind, - typescriptVersion: typescriptVersion, - typescriptDefaults: typescriptDefaults, - javascriptDefaults: javascriptDefaults, - getTypeScriptWorker: getTypeScriptWorker, - getJavaScriptWorker: getJavaScriptWorker -}; -// --- Registration to monaco editor --- -function getMode() { - return __webpack_require__.e(/*! import() */ 5).then(__webpack_require__.bind(null, /*! ./tsMode.js */ "./node_modules/monaco-editor/esm/vs/language/typescript/tsMode.js")); -} -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__["languages"].onLanguage('typescript', function () { - return getMode().then(function (mode) { return mode.setupTypeScript(typescriptDefaults); }); -}); -_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_2__["languages"].onLanguage('javascript', function () { - return getMode().then(function (mode) { return mode.setupJavaScript(javascriptDefaults); }); -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/nls.js": -/*!**************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/nls.js ***! - \**************************************************/ -/*! exports provided: localize */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localize", function() { return localize; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -function _format(message, args) { - let result; - if (args.length === 0) { - result = message; } - else { - result = message.replace(/\{(\d+)\}/g, function (match, rest) { - const index = rest[0]; - return typeof args[index] !== 'undefined' ? args[index] : match; - }); +} +class MenuSeparatorActionViewItem extends _actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_12__["ActionViewItem"] { + style(style) { + if (this.label) { + this.label.style.borderBottomColor = style.separatorColor ? `${style.separatorColor}` : ''; + } } - return result; } -function localize(data, message, ...args) { - return _format(message, args); +function cleanMnemonic(label) { + const regex = MENU_MNEMONIC_REGEX; + const matches = regex.exec(label); + if (!matches) { + return label; + } + const mnemonicInText = !matches[1]; + return label.replace(regex, mnemonicInText ? '$2$3' : '').trim(); } +let MENU_WIDGET_CSS = ` +.monaco-menu { + font-size: 13px; +} -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js ***! - \******************************************************************************************/ -/*! exports provided: IAccessibilityService, CONTEXT_ACCESSIBILITY_MODE_ENABLED */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IAccessibilityService", function() { return IAccessibilityService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTEXT_ACCESSIBILITY_MODE_ENABLED", function() { return CONTEXT_ACCESSIBILITY_MODE_ENABLED; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -const IAccessibilityService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('accessibilityService'); -const CONTEXT_ACCESSIBILITY_MODE_ENABLED = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_1__["RawContextKey"]('accessibilityModeEnabled', false); - - -/***/ }), +${Object(_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__["formatRule"])(menuSelectionIcon)} +${Object(_codicons_codiconStyles_js__WEBPACK_IMPORTED_MODULE_13__["formatRule"])(menuSubmenuIcon)} -/***/ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibilityService.js ***! - \*************************************************************************************************/ -/*! exports provided: AccessibilityService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccessibilityService", function() { return AccessibilityService; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _accessibility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} -let AccessibilityService = class AccessibilityService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["Disposable"] { - constructor(_contextKeyService, _configurationService) { - super(); - this._contextKeyService = _contextKeyService; - this._configurationService = _configurationService; - this._accessibilitySupport = 0 /* Unknown */; - this._onDidChangeScreenReaderOptimized = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this._accessibilityModeEnabledContext = _accessibility_js__WEBPACK_IMPORTED_MODULE_1__["CONTEXT_ACCESSIBILITY_MODE_ENABLED"].bindTo(this._contextKeyService); - const updateContextKey = () => this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized()); - this._register(this._configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration('editor.accessibilitySupport')) { - updateContextKey(); - this._onDidChangeScreenReaderOptimized.fire(); - } - })); - updateContextKey(); - this.onDidChangeScreenReaderOptimized(() => updateContextKey()); - } - get onDidChangeScreenReaderOptimized() { - return this._onDidChangeScreenReaderOptimized.event; - } - isScreenReaderOptimized() { - const config = this._configurationService.getValue('editor.accessibilitySupport'); - return config === 'on' || (config === 'auto' && this._accessibilitySupport === 2 /* Enabled */); - } - getAccessibilitySupport() { - return this._accessibilitySupport; - } -}; -AccessibilityService = __decorate([ - __param(0, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_3__["IContextKeyService"]), - __param(1, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_4__["IConfigurationService"]) -], AccessibilityService); +.monaco-menu .monaco-action-bar.animated .action-item.active { + transform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */ +} +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} -/***/ }), +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} -/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js ***! - \***********************************************************************************************/ -/*! exports provided: createAndFillInActionBarActions, MenuEntryActionViewItem, SubmenuEntryActionViewItem */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAndFillInActionBarActions", function() { return createAndFillInActionBarActions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuEntryActionViewItem", function() { return MenuEntryActionViewItem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmenuEntryActionViewItem", function() { return SubmenuEntryActionViewItem; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/idGenerator.js */ "./node_modules/monaco-editor/esm/vs/base/common/idGenerator.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _common_actions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../contextview/browser/contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../base/browser/ui/actionbar/actionViewItems.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js"); -/* harmony import */ var _base_browser_ui_dropdown_dropdownActionViewItem_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/browser/ui/dropdown/dropdownActionViewItem.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + opacity: 0.4; +} +/* Vertical actions */ +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid #bbb; + padding-top: 1px; + margin-left: .8em; + margin-right: .8em; +} +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 2em; + align-items: center; + position: relative; +} +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; +} +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} -// The alternative key on all platforms is alt. On windows we also support shift as an alternative key #44136 -class AlternativeKeyEmitter extends _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"] { - constructor(contextMenuService) { - super(); - this._subscriptions = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - this._isPressed = false; - this._suppressAltKeyUp = false; - this._subscriptions.add(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(document.body, 'keydown')(e => { - this.isPressed = e.altKey || ((_base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isWindows"] || _base_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isLinux"]) && e.shiftKey); - })); - this._subscriptions.add(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(document.body, 'keyup')(e => { - if (this.isPressed) { - if (this._suppressAltKeyUp) { - e.preventDefault(); - } - } - this._suppressAltKeyUp = false; - this.isPressed = false; - })); - this._subscriptions.add(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(document.body, 'mouseleave')(e => this.isPressed = false)); - this._subscriptions.add(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(document.body, 'blur')(e => this.isPressed = false)); - // Workaround since we do not get any events while a context menu is shown - this._subscriptions.add(contextMenuService.onDidContextMenu(() => this.isPressed = false)); - } - get isPressed() { - return this._isPressed; - } - set isPressed(value) { - this._isPressed = value; - this.fire(this._isPressed); - } - suppressAltKeyUp() { - // Sometimes the native alt behavior needs to be suppresed since the alt was already used as an alternative key - // Example: windows behavior to toggle tha top level menu #44396 - this._suppressAltKeyUp = true; - } - static getInstance(contextMenuService) { - if (!AlternativeKeyEmitter.instance) { - AlternativeKeyEmitter.instance = new AlternativeKeyEmitter(contextMenuService); - } - return AlternativeKeyEmitter.instance; - } - dispose() { - super.dispose(); - this._subscriptions.dispose(); - } +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; } -function createAndFillInActionBarActions(menu, options, target, isPrimaryGroup) { - const groups = menu.getActions(options); - // Action bars handle alternative actions on their own so the alternative actions should be ignored - fillInActions(groups, target, false, isPrimaryGroup); - return asDisposable(groups); + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; } -function asDisposable(groups) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["DisposableStore"](); - for (const [, actions] of groups) { - for (const action of actions) { - disposables.add(action); - } - } - return disposables; + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; } -function fillInActions(groups, target, useAlternativeActions, isPrimaryGroup = group => group === 'navigation') { - for (let tuple of groups) { - let [group, actions] = tuple; - if (useAlternativeActions) { - actions = actions.map(a => (a instanceof _common_actions_js__WEBPACK_IMPORTED_MODULE_8__["MenuItemAction"]) && !!a.alt ? a.alt : a); - } - if (isPrimaryGroup(group)) { - const to = Array.isArray(target) ? target : target.primary; - to.unshift(...actions); - } - else { - const to = Array.isArray(target) ? target : target.secondary; - if (to.length > 0) { - to.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_2__["Separator"]()); - } - to.push(...actions); - } - } + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; } -const ids = new _base_common_idGenerator_js__WEBPACK_IMPORTED_MODULE_4__["IdGenerator"]('menu-item-action-item-icon-'); -const ICON_PATH_TO_CSS_RULES = new Map(); -let MenuEntryActionViewItem = class MenuEntryActionViewItem extends _base_browser_ui_actionbar_actionViewItems_js__WEBPACK_IMPORTED_MODULE_13__["ActionViewItem"] { - constructor(_action, _keybindingService, _notificationService, _contextMenuService) { - super(undefined, _action, { icon: !!(_action.class || _action.item.icon), label: !_action.class && !_action.item.icon }); - this._action = _action; - this._keybindingService = _keybindingService; - this._notificationService = _notificationService; - this._wantsAltCommand = false; - this._itemClassDispose = this._register(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["MutableDisposable"]()); - this._altKey = AlternativeKeyEmitter.getInstance(_contextMenuService); - } - get _commandAction() { - return this._wantsAltCommand && this._action.alt || this._action; - } - onClick(event) { - event.preventDefault(); - event.stopPropagation(); - if (this._altKey.isPressed) { - this._altKey.suppressAltKeyUp(); - } - this.actionRunner.run(this._commandAction, this._context) - .then(undefined, err => this._notificationService.error(err)); - } - render(container) { - super.render(container); - this._updateItemClass(this._action.item); - let mouseOver = false; - let alternativeKeyDown = this._altKey.isPressed; - const updateAltState = () => { - const wantsAltCommand = mouseOver && alternativeKeyDown; - if (wantsAltCommand !== this._wantsAltCommand) { - this._wantsAltCommand = wantsAltCommand; - this.updateLabel(); - this.updateTooltip(); - this.updateClass(); - } - }; - if (this._action.alt) { - this._register(this._altKey.event(value => { - alternativeKeyDown = value; - updateAltState(); - })); - } - this._register(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(container, 'mouseleave')(_ => { - mouseOver = false; - updateAltState(); - })); - this._register(Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_1__["domEvent"])(container, 'mouseenter')(e => { - mouseOver = true; - updateAltState(); - })); - } - updateLabel() { - if (this.options.label && this.label) { - this.label.textContent = this._commandAction.label; - } - } - updateTooltip() { - if (this.label) { - const keybinding = this._keybindingService.lookupKeybinding(this._commandAction.id); - const keybindingLabel = keybinding && keybinding.getLabel(); - const tooltip = this._commandAction.tooltip || this._commandAction.label; - this.label.title = keybindingLabel - ? Object(_nls_js__WEBPACK_IMPORTED_MODULE_7__["localize"])('titleAndKb', "{0} ({1})", tooltip, keybindingLabel) - : tooltip; - } - } - updateClass() { - if (this.options.icon) { - if (this._commandAction !== this._action) { - if (this._action.alt) { - this._updateItemClass(this._action.alt.item); - } - } - else if (this._action.alt) { - this._updateItemClass(this._action.item); - } - } - } - _updateItemClass(item) { - var _a, _b; - this._itemClassDispose.value = undefined; - const icon = this._commandAction.checked && ((_a = item.toggled) === null || _a === void 0 ? void 0 : _a.icon) ? item.toggled.icon : item.icon; - if (_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["ThemeIcon"].isThemeIcon(icon)) { - // theme icons - const iconClass = _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["ThemeIcon"].asClassName(icon); - if (this.label && iconClass) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClasses"])(this.label, iconClass); - this._itemClassDispose.value = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => { - if (this.label) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClasses"])(this.label, iconClass); - } - }); - } - } - else if (icon) { - // icon path - let iconClass; - if ((_b = icon.dark) === null || _b === void 0 ? void 0 : _b.scheme) { - const iconPathMapKey = icon.dark.toString(); - if (ICON_PATH_TO_CSS_RULES.has(iconPathMapKey)) { - iconClass = ICON_PATH_TO_CSS_RULES.get(iconPathMapKey); - } - else { - iconClass = ids.nextId(); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createCSSRule"])(`.icon.${iconClass}`, `background-image: ${Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"])(icon.light || icon.dark)}`); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createCSSRule"])(`.vs-dark .icon.${iconClass}, .hc-black .icon.${iconClass}`, `background-image: ${Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"])(icon.dark)}`); - ICON_PATH_TO_CSS_RULES.set(iconPathMapKey, iconClass); - } - if (this.label) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["addClasses"])(this.label, 'icon', iconClass); - this._itemClassDispose.value = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_5__["toDisposable"])(() => { - if (this.label) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeClasses"])(this.label, 'icon', iconClass); - } - }); - } - } - } - } -}; -MenuEntryActionViewItem = __decorate([ - __param(1, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(2, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__["INotificationService"]), - __param(3, _contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__["IContextMenuService"]) -], MenuEntryActionViewItem); -let SubmenuEntryActionViewItem = class SubmenuEntryActionViewItem extends _base_browser_ui_dropdown_dropdownActionViewItem_js__WEBPACK_IMPORTED_MODULE_14__["DropdownMenuActionViewItem"] { - constructor(action, _notificationService, _contextMenuService) { - var _a; - const classNames = []; - if (action.item.icon) { - if (_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["ThemeIcon"].isThemeIcon(action.item.icon)) { - classNames.push(_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_12__["ThemeIcon"].asClassName(action.item.icon)); - } - else if ((_a = action.item.icon.dark) === null || _a === void 0 ? void 0 : _a.scheme) { - const iconPathMapKey = action.item.icon.dark.toString(); - if (ICON_PATH_TO_CSS_RULES.has(iconPathMapKey)) { - classNames.push('icon', ICON_PATH_TO_CSS_RULES.get(iconPathMapKey)); - } - else { - const className = ids.nextId(); - classNames.push('icon', className); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createCSSRule"])(`.icon.${className}`, `background-image: ${Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"])(action.item.icon.light || action.item.icon.dark)}`); - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createCSSRule"])(`.vs-dark .icon.${className}, .hc-black .icon.${className}`, `background-image: ${Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["asCSSUrl"])(action.item.icon.dark)}`); - ICON_PATH_TO_CSS_RULES.set(iconPathMapKey, className); - } - } - } - super(action, action.actions, _contextMenuService, { classNames }); - } -}; -SubmenuEntryActionViewItem = __decorate([ - __param(1, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_11__["INotificationService"]), - __param(2, _contextview_browser_contextView_js__WEBPACK_IMPORTED_MODULE_9__["IContextMenuService"]) -], SubmenuEntryActionViewItem); +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + padding: 0.5em 0 0 0; + margin-bottom: 0.5em; + width: 100%; + height: 0px !important; + margin-left: .8em !important; + margin-right: .8em !important; +} -/***/ }), +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} -/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js ***! - \******************************************************************************/ -/*! exports provided: isIMenuItem, MenuId, IMenuService, MenuRegistry, ExecuteCommandAction, SubmenuItemAction, MenuItemAction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIMenuItem", function() { return isIMenuItem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuId", function() { return MenuId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IMenuService", function() { return IMenuService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuRegistry", function() { return MenuRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExecuteCommandAction", function() { return ExecuteCommandAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmenuItemAction", function() { return SubmenuItemAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItemAction", function() { return MenuItemAction; }); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} +/* Context Menu */ +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; +} +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} +.monaco-menu .monaco-action-bar.vertical .action-item { + border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ +} -function isIMenuItem(item) { - return item.command !== undefined; +/* High Contrast Theming */ +:host-context(.hc-black) .context-view.monaco-menu-container { + box-shadow: none; } -class MenuId { - constructor(debugName) { - this.id = MenuId._idPool++; - this._debugName = debugName; - } + +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; } -MenuId._idPool = 0; -MenuId.CommandPalette = new MenuId('CommandPalette'); -MenuId.EditorContext = new MenuId('EditorContext'); -MenuId.EditorContextPeek = new MenuId('EditorContextPeek'); -MenuId.MenubarEditMenu = new MenuId('MenubarEditMenu'); -MenuId.MenubarGoMenu = new MenuId('MenubarGoMenu'); -MenuId.MenubarSelectionMenu = new MenuId('MenubarSelectionMenu'); -const IMenuService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('menuService'); -const MenuRegistry = new class { - constructor() { - this._commands = new Map(); - this._menuItems = new Map(); - this._onDidChangeMenu = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_5__["Emitter"](); - this.onDidChangeMenu = this._onDidChangeMenu.event; - this._commandPaletteChangeEvent = { - has: id => id === MenuId.CommandPalette - }; - } - addCommand(command) { - return this.addCommands(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].single(command)); - } - addCommands(commands) { - for (const command of commands) { - this._commands.set(command.id, command); - } - this._onDidChangeMenu.fire(this._commandPaletteChangeEvent); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["toDisposable"])(() => { - let didChange = false; - for (const command of commands) { - didChange = this._commands.delete(command.id) || didChange; - } - if (didChange) { - this._onDidChangeMenu.fire(this._commandPaletteChangeEvent); - } - }); - } - getCommand(id) { - return this._commands.get(id); - } - getCommands() { - const map = new Map(); - this._commands.forEach((value, key) => map.set(key, value)); - return map; - } - appendMenuItem(id, item) { - return this.appendMenuItems(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].single({ id, item })); - } - appendMenuItems(items) { - const changedIds = new Set(); - const toRemove = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_7__["LinkedList"](); - for (const { id, item } of items) { - let list = this._menuItems.get(id); - if (!list) { - list = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_7__["LinkedList"](); - this._menuItems.set(id, list); - } - toRemove.push(list.push(item)); - changedIds.add(id); - } - this._onDidChangeMenu.fire(changedIds); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["toDisposable"])(() => { - if (toRemove.size > 0) { - for (let fn of toRemove) { - fn(); - } - this._onDidChangeMenu.fire(changedIds); - toRemove.clear(); - } - }); - } - getMenuItems(id) { - let result; - if (this._menuItems.has(id)) { - result = [...this._menuItems.get(id)]; - } - else { - result = []; - } - if (id === MenuId.CommandPalette) { - // CommandPalette is special because it shows - // all commands by default - this._appendImplicitItems(result); - } - return result; - } - _appendImplicitItems(result) { - const set = new Set(); - for (const item of result) { - if (isIMenuItem(item)) { - set.add(item.command.id); - if (item.alt) { - set.add(item.alt.id); - } - } - } - this._commands.forEach((command, id) => { - if (!set.has(id)) { - result.push({ command }); - } - }); - } -}; -let ExecuteCommandAction = class ExecuteCommandAction extends _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__["Action"] { - constructor(id, label, _commandService) { - super(id, label); - this._commandService = _commandService; - } - run(...args) { - return this._commandService.executeCommand(this.id, ...args); - } -}; -ExecuteCommandAction = __decorate([ - __param(2, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__["ICommandService"]) -], ExecuteCommandAction); -class SubmenuItemAction extends _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__["SubmenuAction"] { - constructor(item, menuService, contextKeyService, options) { - super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, () => { - const result = []; - const menu = menuService.createMenu(item.submenu, contextKeyService); - const groups = menu.getActions(options); - menu.dispose(); - for (let group of groups) { - const [, actions] = group; - if (actions.length > 0) { - result.push(...actions); - result.push(new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_0__["Separator"]()); - } - } - if (result.length) { - result.pop(); // remove last separator - } - return result; - }, 'submenu'); - this.item = item; - } -} -let MenuItemAction = class MenuItemAction extends ExecuteCommandAction { - constructor(item, alt, options, contextKeyService, commandService) { - typeof item.title === 'string' ? super(item.id, item.title, commandService) : super(item.id, item.title.value, commandService); - this._cssClass = undefined; - this._enabled = !item.precondition || contextKeyService.contextMatchesRules(item.precondition); - this._tooltip = item.tooltip ? typeof item.tooltip === 'string' ? item.tooltip : item.tooltip.value : undefined; - if (item.toggled) { - const toggled = (item.toggled.condition ? item.toggled : { condition: item.toggled }); - this._checked = contextKeyService.contextMatchesRules(toggled.condition); - if (this._checked && toggled.tooltip) { - this._tooltip = typeof toggled.tooltip === 'string' ? toggled.tooltip : toggled.tooltip.value; - } - } - this._options = options || {}; - this.item = item; - this.alt = alt ? new MenuItemAction(alt, undefined, this._options, contextKeyService, commandService) : undefined; - } - dispose() { - if (this.alt) { - this.alt.dispose(); - } - super.dispose(); - } - run(...args) { - let runArgs = []; - if (this._options.arg) { - runArgs = [...runArgs, this._options.arg]; - } - if (this._options.shouldForwardArgs) { - runArgs = [...runArgs, ...args]; - } - return super.run(...runArgs); - } -}; -MenuItemAction = __decorate([ - __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_2__["IContextKeyService"]), - __param(4, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__["ICommandService"]) -], MenuItemAction); +/* Vertical Action Bar Styles */ -//#endregion +.monaco-menu .monaco-action-bar.vertical { + padding: .5em 0; +} +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 1.8em; +} -/***/ }), +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; +} -/***/ "./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js ***! - \**********************************************************************************/ -/*! exports provided: MenuService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MenuService", function() { return MenuService; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _actions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions.js */ "./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"); -/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + padding: 0.2em 0 0 0; + margin-bottom: 0.2em; +} +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} +.monaco-menu .action-item { + cursor: default; +} -let MenuService = class MenuService { - constructor(_commandService) { - this._commandService = _commandService; - // - } - createMenu(id, contextKeyService) { - return new Menu(id, this._commandService, contextKeyService, this); - } -}; -MenuService = __decorate([ - __param(0, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__["ICommandService"]) -], MenuService); +/* Arrows */ +.monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; +} -let Menu = class Menu { - constructor(_id, _commandService, _contextKeyService, _menuService) { - this._id = _id; - this._commandService = _commandService; - this._contextKeyService = _contextKeyService; - this._menuService = _menuService; - this._onDidChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"](); - this._dispoables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._menuGroups = []; - this._contextKeys = new Set(); - this._build(); - // rebuild this menu whenever the menu registry reports an - // event for this MenuId - this._dispoables.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].debounce(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].filter(_actions_js__WEBPACK_IMPORTED_MODULE_2__["MenuRegistry"].onDidChangeMenu, set => set.has(this._id)), () => { }, 50)(this._build, this)); - // when context keys change we need to check if the menu also - // has changed - this._dispoables.add(_base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].debounce(this._contextKeyService.onDidChangeContext, (last, event) => last || event.affectsSome(this._contextKeys), 50)(e => e && this._onDidChange.fire(undefined), this)); - } - dispose() { - this._dispoables.dispose(); - this._onDidChange.dispose(); - } - _build() { - // reset - this._menuGroups.length = 0; - this._contextKeys.clear(); - const menuItems = _actions_js__WEBPACK_IMPORTED_MODULE_2__["MenuRegistry"].getMenuItems(this._id); - let group; - menuItems.sort(Menu._compareMenuItems); - for (let item of menuItems) { - // group by groupId - const groupName = item.group || ''; - if (!group || group[0] !== groupName) { - group = [groupName, []]; - this._menuGroups.push(group); - } - group[1].push(item); - // keep keys for eventing - Menu._fillInKbExprKeys(item.when, this._contextKeys); - // keep precondition keys for event if applicable - if (Object(_actions_js__WEBPACK_IMPORTED_MODULE_2__["isIMenuItem"])(item) && item.command.precondition) { - Menu._fillInKbExprKeys(item.command.precondition, this._contextKeys); - } - // keep toggled keys for event if applicable - if (Object(_actions_js__WEBPACK_IMPORTED_MODULE_2__["isIMenuItem"])(item) && item.command.toggled) { - const toggledExpression = item.command.toggled.condition || item.command.toggled; - Menu._fillInKbExprKeys(toggledExpression, this._contextKeys); - } - } - this._onDidChange.fire(this); - } - get onDidChange() { - return this._onDidChange.event; - } - getActions(options) { - const result = []; - for (let group of this._menuGroups) { - const [id, items] = group; - const activeActions = []; - for (const item of items) { - if (this._contextKeyService.contextMatchesRules(item.when)) { - const action = Object(_actions_js__WEBPACK_IMPORTED_MODULE_2__["isIMenuItem"])(item) - ? new _actions_js__WEBPACK_IMPORTED_MODULE_2__["MenuItemAction"](item.command, item.alt, options, this._contextKeyService, this._commandService) - : new _actions_js__WEBPACK_IMPORTED_MODULE_2__["SubmenuItemAction"](item, this._menuService, this._contextKeyService, options); - activeActions.push(action); - } - } - if (activeActions.length > 0) { - result.push([id, activeActions]); - } - } - return result; - } - static _fillInKbExprKeys(exp, set) { - if (exp) { - for (let key of exp.keys()) { - set.add(key); - } - } - } - static _compareMenuItems(a, b) { - let aGroup = a.group; - let bGroup = b.group; - if (aGroup !== bGroup) { - // Falsy groups come last - if (!aGroup) { - return 1; - } - else if (!bGroup) { - return -1; - } - // 'navigation' group comes first - if (aGroup === 'navigation') { - return -1; - } - else if (bGroup === 'navigation') { - return 1; - } - // lexical sort for groups - let value = aGroup.localeCompare(bGroup); - if (value !== 0) { - return value; - } - } - // sort on priority - default is 0 - let aPrio = a.order || 0; - let bPrio = b.order || 0; - if (aPrio < bPrio) { - return -1; - } - else if (aPrio > bPrio) { - return 1; - } - // sort on titles - return Menu._compareTitles(Object(_actions_js__WEBPACK_IMPORTED_MODULE_2__["isIMenuItem"])(a) ? a.command.title : a.title, Object(_actions_js__WEBPACK_IMPORTED_MODULE_2__["isIMenuItem"])(b) ? b.command.title : b.title); - } - static _compareTitles(a, b) { - const aStr = typeof a === 'string' ? a : a.value; - const bStr = typeof b === 'string' ? b : b.value; - return aStr.localeCompare(bStr); - } -}; -Menu = __decorate([ - __param(1, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_3__["ICommandService"]), - __param(2, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["IContextKeyService"]), - __param(3, _actions_js__WEBPACK_IMPORTED_MODULE_2__["IMenuService"]) -], Menu); +.monaco-scrollable-element > .visible { + opacity: 1; + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); -/***/ }), + transition: opacity 100ms linear; +} +.monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; +} +.monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; +} -/***/ "./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/browser/contextScopedHistoryWidget.js ***! - \******************************************************************************************/ -/*! exports provided: HistoryNavigationWidgetContext, HistoryNavigationEnablementContext, createAndBindHistoryNavigationWidgetScopedContextKeyService, ContextScopedFindInput, ContextScopedReplaceInput */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* Scrollable Content Inset Shadow */ +.monaco-scrollable-element > .shadow { + position: absolute; + display: none; +} +.monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + box-shadow: #DDD 0 6px 6px -6px inset; +} +.monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + box-shadow: #DDD 6px 0 6px -6px inset; +} +.monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; +} +.monaco-scrollable-element > .shadow.top.left { + box-shadow: #DDD 6px 6px 6px -6px inset; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistoryNavigationWidgetContext", function() { return HistoryNavigationWidgetContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HistoryNavigationEnablementContext", function() { return HistoryNavigationEnablementContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAndBindHistoryNavigationWidgetScopedContextKeyService", function() { return createAndBindHistoryNavigationWidgetScopedContextKeyService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextScopedFindInput", function() { return ContextScopedFindInput; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextScopedReplaceInput", function() { return ContextScopedReplaceInput; }); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _base_browser_ui_findinput_findInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../base/browser/ui/findinput/findInput.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js"); -/* harmony import */ var _keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../keybinding/common/keybindingsRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"); -/* harmony import */ var _base_browser_ui_findinput_replaceInput_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../base/browser/ui/findinput/replaceInput.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/replaceInput.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; +/* ---------- Default Style ---------- */ +:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(100, 100, 100, .4); +} +:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(121, 121, 121, .4); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(111, 195, 223, .6); +} +.monaco-scrollable-element > .scrollbar > .slider:hover { + background: rgba(100, 100, 100, .7); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover { + background: rgba(111, 195, 223, .8); +} +.monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(0, 0, 0, .6); +} +:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(191, 191, 191, .4); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(111, 195, 223, 1); +} -const HistoryNavigationWidgetContext = 'historyNavigationWidget'; -const HistoryNavigationEnablementContext = 'historyNavigationEnabled'; -function bindContextScopedWidget(contextKeyService, widget, contextKey) { - new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"](contextKey, widget).bindTo(contextKeyService); +:host-context(.vs-dark) .monaco-scrollable-element .shadow.top { + box-shadow: none; } -function createWidgetScopedContextKeyService(contextKeyService, widget) { - return contextKeyService.createScoped(widget.target); + +:host-context(.vs-dark) .monaco-scrollable-element .shadow.left { + box-shadow: #000 6px 0 6px -6px inset; } -function getContextScopedWidget(contextKeyService, contextKey) { - return contextKeyService.getContext(document.activeElement).getValue(contextKey); + +:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left { + box-shadow: #000 6px 6px 6px -6px inset; } -function createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, widget) { - const scopedContextKeyService = createWidgetScopedContextKeyService(contextKeyService, widget); - bindContextScopedWidget(scopedContextKeyService, widget, HistoryNavigationWidgetContext); - const historyNavigationEnablement = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["RawContextKey"](HistoryNavigationEnablementContext, true).bindTo(scopedContextKeyService); - return { scopedContextKeyService, historyNavigationEnablement }; + +:host-context(.hc-black) .monaco-scrollable-element .shadow.top { + box-shadow: none; } -let ContextScopedFindInput = class ContextScopedFindInput extends _base_browser_ui_findinput_findInput_js__WEBPACK_IMPORTED_MODULE_1__["FindInput"] { - constructor(container, contextViewProvider, options, contextKeyService, showFindOptions = false) { - super(container, contextViewProvider, showFindOptions, options); - this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService); - } -}; -ContextScopedFindInput = __decorate([ - __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]) -], ContextScopedFindInput); -let ContextScopedReplaceInput = class ContextScopedReplaceInput extends _base_browser_ui_findinput_replaceInput_js__WEBPACK_IMPORTED_MODULE_3__["ReplaceInput"] { - constructor(container, contextViewProvider, options, contextKeyService, showReplaceOptions = false) { - super(container, contextViewProvider, showReplaceOptions, options); - this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService); - } -}; -ContextScopedReplaceInput = __decorate([ - __param(3, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]) -], ContextScopedReplaceInput); +:host-context(.hc-black) .monaco-scrollable-element .shadow.left { + box-shadow: none; +} -_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'history.showPrevious', - weight: 200 /* WorkbenchContrib */, - when: _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].and(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].has(HistoryNavigationWidgetContext), _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].equals(HistoryNavigationEnablementContext, true)), - primary: 16 /* UpArrow */, - secondary: [512 /* Alt */ | 16 /* UpArrow */], - handler: (accessor, arg2) => { - const widget = getContextScopedWidget(accessor.get(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]), HistoryNavigationWidgetContext); - if (widget) { - const historyInputBox = widget.historyNavigator; - historyInputBox.showPreviousValue(); - } - } -}); -_keybinding_common_keybindingsRegistry_js__WEBPACK_IMPORTED_MODULE_2__["KeybindingsRegistry"].registerCommandAndKeybindingRule({ - id: 'history.showNext', - weight: 200 /* WorkbenchContrib */, - when: _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].and(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].has(HistoryNavigationWidgetContext), _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["ContextKeyExpr"].equals(HistoryNavigationEnablementContext, true)), - primary: 18 /* DownArrow */, - secondary: [512 /* Alt */ | 18 /* DownArrow */], - handler: (accessor, arg2) => { - const widget = getContextScopedWidget(accessor.get(_contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_0__["IContextKeyService"]), HistoryNavigationWidgetContext); - if (widget) { - const historyInputBox = widget.historyNavigator; - historyInputBox.showNextValue(); - } - } -}); +:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left { + box-shadow: none; +} +`; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js ***! - \******************************************************************************************/ -/*! exports provided: BrowserClipboardService */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css": +/*!***************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css ***! + \***************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserClipboardService", function() { return BrowserClipboardService; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./mouseCursor.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"); -class BrowserClipboardService { - constructor() { - this.mapTextToType = new Map(); // unsupported in web (only in-memory) - this.findText = ''; // unsupported in web (only in-memory) - } - writeText(text, type) { - return __awaiter(this, void 0, void 0, function* () { - // With type: only in-memory is supported - if (type) { - this.mapTextToType.set(type, text); - return; - } - // Guard access to navigator.clipboard with try/catch - // as we have seen DOMExceptions in certain browsers - // due to security policies. - try { - return yield navigator.clipboard.writeText(text); - } - catch (error) { - console.error(error); - } - // Fallback to textarea and execCommand solution - const activeElement = document.activeElement; - const textArea = document.body.appendChild(Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["$"])('textarea', { 'aria-hidden': true })); - textArea.style.height = '1px'; - textArea.style.width = '1px'; - textArea.style.position = 'absolute'; - textArea.value = text; - textArea.focus(); - textArea.select(); - document.execCommand('copy'); - if (activeElement instanceof HTMLElement) { - activeElement.focus(); - } - document.body.removeChild(textArea); - return; - }); - } - readText(type) { - return __awaiter(this, void 0, void 0, function* () { - // With type: only in-memory is supported - if (type) { - return this.mapTextToType.get(type) || ''; - } - // Guard access to navigator.clipboard with try/catch - // as we have seen DOMExceptions in certain browsers - // due to security policies. - try { - return yield navigator.clipboard.readText(); - } - catch (error) { - console.error(error); - return ''; - } - }); - } - readFindText() { - return __awaiter(this, void 0, void 0, function* () { - return this.findText; - }); - } - writeFindText(text) { - return __awaiter(this, void 0, void 0, function* () { - this.findText = text; - }); - } -} + +var options = {}; -/***/ }), +options.insert = "head"; +options.singleton = false; -/***/ "./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js ***! - \*****************************************************************************************/ -/*! exports provided: IClipboardService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IClipboardService", function() { return IClipboardService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -const IClipboardService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('clipboardService'); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_mouseCursor_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js ***! - \********************************************************************************/ -/*! exports provided: ICommandService, CommandsRegistry */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js ***! + \**************************************************************************************/ +/*! exports provided: MOUSE_CURSOR_TEXT_CSS_CLASS_NAME */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ICommandService", function() { return ICommandService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommandsRegistry", function() { return CommandsRegistry; }); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/linkedList.js */ "./node_modules/monaco-editor/esm/vs/base/common/linkedList.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MOUSE_CURSOR_TEXT_CSS_CLASS_NAME", function() { return MOUSE_CURSOR_TEXT_CSS_CLASS_NAME; }); +/* harmony import */ var _mouseCursor_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mouseCursor.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - - - - - -const ICommandService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__["createDecorator"])('commandService'); -const CommandsRegistry = new class { - constructor() { - this._commands = new Map(); - this._onDidRegisterCommand = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.onDidRegisterCommand = this._onDidRegisterCommand.event; - } - registerCommand(idOrCommand, handler) { - if (!idOrCommand) { - throw new Error(`invalid command`); - } - if (typeof idOrCommand === 'string') { - if (!handler) { - throw new Error(`invalid command`); - } - return this.registerCommand({ id: idOrCommand, handler }); - } - // add argument validation if rich command metadata is provided - if (idOrCommand.description) { - const constraints = []; - for (let arg of idOrCommand.description.args) { - constraints.push(arg.constraint); - } - const actualHandler = idOrCommand.handler; - idOrCommand.handler = function (accessor, ...args) { - Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_1__["validateConstraints"])(args, constraints); - return actualHandler(accessor, ...args); - }; - } - // find a place to store the command - const { id } = idOrCommand; - let commands = this._commands.get(id); - if (!commands) { - commands = new _base_common_linkedList_js__WEBPACK_IMPORTED_MODULE_4__["LinkedList"](); - this._commands.set(id, commands); - } - let removeFn = commands.unshift(idOrCommand); - let ret = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_0__["toDisposable"])(() => { - removeFn(); - const command = this._commands.get(id); - if (command === null || command === void 0 ? void 0 : command.isEmpty()) { - this._commands.delete(id); - } - }); - // tell the world about this command - this._onDidRegisterCommand.fire(id); - return ret; - } - registerCommandAlias(oldId, newId) { - return CommandsRegistry.registerCommand(oldId, (accessor, ...args) => accessor.get(ICommandService).executeCommand(newId, ...args)); - } - getCommand(id) { - const list = this._commands.get(id); - if (!list || list.isEmpty()) { - return undefined; - } - return _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_5__["Iterable"].first(list); - } - getCommands() { - const result = new Map(); - for (const key of this._commands.keys()) { - const command = this.getCommand(key); - if (command) { - result.set(key, command); - } - } - return result; - } -}; +const MOUSE_CURSOR_TEXT_CSS_CLASS_NAME = `monaco-mouse-cursor-text`; /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js ***! - \******************************************************************************************/ -/*! exports provided: IConfigurationService, toValuesTree, addToValueTree, removeFromValueTree, getConfigurationValue, getConfigurationKeys, getDefaultValues */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css": +/*!***************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css ***! + \***************************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IConfigurationService", function() { return IConfigurationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toValuesTree", function() { return toValuesTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToValueTree", function() { return addToValueTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeFromValueTree", function() { return removeFromValueTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfigurationValue", function() { return getConfigurationValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfigurationKeys", function() { return getConfigurationKeys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultValues", function() { return getDefaultValues; }); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./progressbar.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"); + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const IConfigurationService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('configurationService'); -function toValuesTree(properties, conflictReporter) { - const root = Object.create(null); - for (let key in properties) { - addToValueTree(root, key, properties[key], conflictReporter); - } - return root; -} -function addToValueTree(settingsTreeRoot, key, value, conflictReporter) { - const segments = key.split('.'); - const last = segments.pop(); - let curr = settingsTreeRoot; - for (let i = 0; i < segments.length; i++) { - let s = segments[i]; - let obj = curr[s]; - switch (typeof obj) { - case 'undefined': - obj = curr[s] = Object.create(null); - break; - case 'object': - break; - default: - conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`); - return; - } - curr = obj; - } - if (typeof curr === 'object' && curr !== null) { - try { - curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606 - } - catch (e) { - conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`); - } - } - else { - conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`); - } -} -function removeFromValueTree(valueTree, key) { - const segments = key.split('.'); - doRemoveFromValueTree(valueTree, segments); -} -function doRemoveFromValueTree(valueTree, segments) { - const first = segments.shift(); - if (segments.length === 0) { - // Reached last segment - delete valueTree[first]; - return; - } - if (Object.keys(valueTree).indexOf(first) !== -1) { - const value = valueTree[first]; - if (typeof value === 'object' && !Array.isArray(value)) { - doRemoveFromValueTree(value, segments); - if (Object.keys(value).length === 0) { - delete valueTree[first]; - } - } - } -} -/** - * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting) - */ -function getConfigurationValue(config, settingPath, defaultValue) { - function accessSetting(config, path) { - let current = config; - for (const component of path) { - if (typeof current !== 'object' || current === null) { - return undefined; - } - current = current[component]; - } - return current; - } - const path = settingPath.split('.'); - const result = accessSetting(config, path); - return typeof result === 'undefined' ? defaultValue : result; -} -function getConfigurationKeys() { - const properties = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].as(_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__["Extensions"].Configuration).getConfigurationProperties(); - return Object.keys(properties); -} -function getDefaultValues() { - const valueTreeRoot = Object.create(null); - const properties = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].as(_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_2__["Extensions"].Configuration).getConfigurationProperties(); - for (let key in properties) { - let value = properties[key].default; - addToValueTree(valueTreeRoot, key, value, message => console.error(`Conflict in default settings: ${message}`)); - } - return valueTreeRoot; -} +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_progressbar_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js ***! - \************************************************************************************************/ -/*! exports provided: ConfigurationModel, DefaultConfigurationModel, Configuration, ConfigurationChangeEvent */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js ***! + \**************************************************************************************/ +/*! exports provided: ProgressBar */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfigurationModel", function() { return ConfigurationModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultConfigurationModel", function() { return DefaultConfigurationModel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Configuration", function() { return Configuration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConfigurationChangeEvent", function() { return ConfigurationChangeEvent; }); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); -/* harmony import */ var _configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressBar", function() { return ProgressBar; }); +/* harmony import */ var _progressbar_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./progressbar.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _common_objects_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/objects.js */ "./node_modules/monaco-editor/esm/vs/base/common/objects.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ -class ConfigurationModel { - constructor(_contents = {}, _keys = [], _overrides = []) { - this._contents = _contents; - this._keys = _keys; - this._overrides = _overrides; - this.isFrozen = false; - } - get contents() { - return this.checkAndFreeze(this._contents); - } - get overrides() { - return this.checkAndFreeze(this._overrides); - } - get keys() { - return this.checkAndFreeze(this._keys); - } - isEmpty() { - return this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0; - } - getValue(section) { - return section ? Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["getConfigurationValue"])(this.contents, section) : this.contents; - } - override(identifier) { - const overrideContents = this.getContentsForOverrideIdentifer(identifier); - if (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) { - // If there are no valid overrides, return self - return this; - } - let contents = {}; - for (const key of _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["distinct"]([...Object.keys(this.contents), ...Object.keys(overrideContents)])) { - let contentsForKey = this.contents[key]; - let overrideContentsForKey = overrideContents[key]; - // If there are override contents for the key, clone and merge otherwise use base contents - if (overrideContentsForKey) { - // Clone and merge only if base contents and override contents are of type object otherwise just override - if (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') { - contentsForKey = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](contentsForKey); - this.mergeContents(contentsForKey, overrideContentsForKey); - } - else { - contentsForKey = overrideContentsForKey; - } - } - contents[key] = contentsForKey; - } - return new ConfigurationModel(contents, this.keys, this.overrides); - } - merge(...others) { - const contents = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](this.contents); - const overrides = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](this.overrides); - const keys = [...this.keys]; - for (const other of others) { - this.mergeContents(contents, other.contents); - for (const otherOverride of other.overrides) { - const [override] = overrides.filter(o => _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["equals"](o.identifiers, otherOverride.identifiers)); - if (override) { - this.mergeContents(override.contents, otherOverride.contents); - } - else { - overrides.push(_base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](otherOverride)); - } - } - for (const key of other.keys) { - if (keys.indexOf(key) === -1) { - keys.push(key); - } - } - } - return new ConfigurationModel(contents, keys, overrides); - } - freeze() { - this.isFrozen = true; - return this; - } - mergeContents(source, target) { - for (const key of Object.keys(target)) { - if (key in source) { - if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"](source[key]) && _base_common_types_js__WEBPACK_IMPORTED_MODULE_2__["isObject"](target[key])) { - this.mergeContents(source[key], target[key]); - continue; - } - } - source[key] = _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepClone"](target[key]); - } - } - checkAndFreeze(data) { - if (this.isFrozen && !Object.isFrozen(data)) { - return _base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["deepFreeze"](data); - } - return data; - } - getContentsForOverrideIdentifer(identifier) { - for (const override of this.overrides) { - if (override.identifiers.indexOf(identifier) !== -1) { - return override.contents; - } - } - return null; - } - toJSON() { - return { - contents: this.contents, - overrides: this.overrides, - keys: this.keys - }; - } - // Update methods - setValue(key, value) { - this.addKey(key); - Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["addToValueTree"])(this.contents, key, value, e => { throw new Error(e); }); +const css_done = 'done'; +const css_active = 'active'; +const css_infinite = 'infinite'; +const css_discrete = 'discrete'; +const css_progress_container = 'monaco-progress-container'; +const css_progress_bit = 'progress-bit'; +const defaultOpts = { + progressBarBackground: _common_color_js__WEBPACK_IMPORTED_MODULE_2__["Color"].fromHex('#0E70C0') +}; +/** + * A progress bar with support for infinite or discrete progress. + */ +class ProgressBar extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor(container, options) { + super(); + this.options = options || Object.create(null); + Object(_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["mixin"])(this.options, defaultOpts, false); + this.workedVal = 0; + this.progressBarBackground = this.options.progressBarBackground; + this._register(this.showDelayedScheduler = new _common_async_js__WEBPACK_IMPORTED_MODULE_5__["RunOnceScheduler"](() => Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["show"])(this.element), 0)); + this.create(container); } - removeValue(key) { - if (this.removeKey(key)) { - Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["removeFromValueTree"])(this.contents, key); - } + create(container) { + this.element = document.createElement('div'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, css_progress_container); + container.appendChild(this.element); + this.bit = document.createElement('div'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.bit, css_progress_bit); + this.element.appendChild(this.bit); + this.applyStyles(); } - addKey(key) { - let index = this.keys.length; - for (let i = 0; i < index; i++) { - if (key.indexOf(this.keys[i]) === 0) { - index = i; - } - } - this.keys.splice(index, 1, key); + off() { + this.bit.style.width = 'inherit'; + this.bit.style.opacity = '1'; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.element, css_active, css_infinite, css_discrete); + this.workedVal = 0; + this.totalWork = undefined; } - removeKey(key) { - let index = this.keys.indexOf(key); - if (index !== -1) { - this.keys.splice(index, 1); - return true; - } - return false; + /** + * Stops the progressbar from showing any progress instantly without fading out. + */ + stop() { + return this.doDone(false); } -} -class DefaultConfigurationModel extends ConfigurationModel { - constructor() { - const contents = Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["getDefaultValues"])(); - const keys = Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["getConfigurationKeys"])(); - const overrides = []; - for (const key of Object.keys(contents)) { - if (_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["OVERRIDE_PROPERTY_PATTERN"].test(key)) { - overrides.push({ - identifiers: [Object(_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_5__["overrideIdentifierFromKey"])(key).trim()], - keys: Object.keys(contents[key]), - contents: Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["toValuesTree"])(contents[key], message => console.error(`Conflict in default settings file: ${message}`)), - }); + doDone(delayed) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"])(this.element, css_done); + // let it grow to 100% width and hide afterwards + if (!Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["hasClass"])(this.element, css_infinite)) { + this.bit.style.width = 'inherit'; + if (delayed) { + setTimeout(() => this.off(), 200); } - } - super(contents, keys, overrides); - } -} -class Configuration { - constructor(_defaultConfiguration, _localUserConfiguration, _remoteUserConfiguration = new ConfigurationModel(), _workspaceConfiguration = new ConfigurationModel(), _folderConfigurations = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["ResourceMap"](), _memoryConfiguration = new ConfigurationModel(), _memoryConfigurationByResource = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["ResourceMap"](), _freeze = true) { - this._defaultConfiguration = _defaultConfiguration; - this._localUserConfiguration = _localUserConfiguration; - this._remoteUserConfiguration = _remoteUserConfiguration; - this._workspaceConfiguration = _workspaceConfiguration; - this._folderConfigurations = _folderConfigurations; - this._memoryConfiguration = _memoryConfiguration; - this._memoryConfigurationByResource = _memoryConfigurationByResource; - this._freeze = _freeze; - this._workspaceConsolidatedConfiguration = null; - this._foldersConsolidatedConfigurations = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["ResourceMap"](); - this._userConfiguration = null; - } - getValue(section, overrides, workspace) { - const consolidateConfigurationModel = this.getConsolidateConfigurationModel(overrides, workspace); - return consolidateConfigurationModel.getValue(section); - } - updateValue(key, value, overrides = {}) { - let memoryConfiguration; - if (overrides.resource) { - memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource); - if (!memoryConfiguration) { - memoryConfiguration = new ConfigurationModel(); - this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration); + else { + this.off(); } } + // let it fade out and hide afterwards else { - memoryConfiguration = this._memoryConfiguration; - } - if (value === undefined) { - memoryConfiguration.removeValue(key); - } - else { - memoryConfiguration.setValue(key, value); - } - if (!overrides.resource) { - this._workspaceConsolidatedConfiguration = null; - } - } - get userConfiguration() { - if (!this._userConfiguration) { - this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration); - if (this._freeze) { - this._userConfiguration.freeze(); - } - } - return this._userConfiguration; - } - getConsolidateConfigurationModel(overrides, workspace) { - let configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace); - return overrides.overrideIdentifier ? configurationModel.override(overrides.overrideIdentifier) : configurationModel; - } - getConsolidatedConfigurationModelForResource({ resource }, workspace) { - let consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration(); - if (workspace && resource) { - const root = workspace.getFolder(resource); - if (root) { - consolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration; - } - const memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource); - if (memoryConfigurationForResource) { - consolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource); - } - } - return consolidateConfiguration; - } - getWorkspaceConsolidatedConfiguration() { - if (!this._workspaceConsolidatedConfiguration) { - this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration); - if (this._freeze) { - this._workspaceConfiguration = this._workspaceConfiguration.freeze(); - } - } - return this._workspaceConsolidatedConfiguration; - } - getFolderConsolidatedConfiguration(folder) { - let folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder); - if (!folderConsolidatedConfiguration) { - const workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration(); - const folderConfiguration = this._folderConfigurations.get(folder); - if (folderConfiguration) { - folderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration); - if (this._freeze) { - folderConsolidatedConfiguration = folderConsolidatedConfiguration.freeze(); - } - this._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration); + this.bit.style.opacity = '0'; + if (delayed) { + setTimeout(() => this.off(), 200); } else { - folderConsolidatedConfiguration = workspaceConsolidateConfiguration; + this.off(); } } - return folderConsolidatedConfiguration; + return this; } - toData() { - return { - defaults: { - contents: this._defaultConfiguration.contents, - overrides: this._defaultConfiguration.overrides, - keys: this._defaultConfiguration.keys - }, - user: { - contents: this.userConfiguration.contents, - overrides: this.userConfiguration.overrides, - keys: this.userConfiguration.keys - }, - workspace: { - contents: this._workspaceConfiguration.contents, - overrides: this._workspaceConfiguration.overrides, - keys: this._workspaceConfiguration.keys - }, - folders: [...this._folderConfigurations.keys()].reduce((result, folder) => { - const { contents, overrides, keys } = this._folderConfigurations.get(folder); - result.push([folder, { contents, overrides, keys }]); - return result; - }, []) - }; + /** + * Use this mode to indicate progress that has no total number of work units. + */ + infinite() { + this.bit.style.width = '2%'; + this.bit.style.opacity = '1'; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClasses"])(this.element, css_discrete, css_done); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_4__["addClasses"])(this.element, css_active, css_infinite); + return this; } - static parse(data) { - const defaultConfiguration = this.parseConfigurationModel(data.defaults); - const userConfiguration = this.parseConfigurationModel(data.user); - const workspaceConfiguration = this.parseConfigurationModel(data.workspace); - const folders = data.folders.reduce((result, value) => { - result.set(_base_common_uri_js__WEBPACK_IMPORTED_MODULE_4__["URI"].revive(value[0]), this.parseConfigurationModel(value[1])); - return result; - }, new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["ResourceMap"]()); - return new Configuration(defaultConfiguration, userConfiguration, new ConfigurationModel(), workspaceConfiguration, folders, new ConfigurationModel(), new _base_common_map_js__WEBPACK_IMPORTED_MODULE_0__["ResourceMap"](), false); - } - static parseConfigurationModel(model) { - return new ConfigurationModel(model.contents, model.keys, model.overrides).freeze(); - } -} -class ConfigurationChangeEvent { - constructor(change, previous, currentConfiguraiton, currentWorkspace) { - this.change = change; - this.previous = previous; - this.currentConfiguraiton = currentConfiguraiton; - this.currentWorkspace = currentWorkspace; - this._previousConfiguration = undefined; - const keysSet = new Set(); - change.keys.forEach(key => keysSet.add(key)); - change.overrides.forEach(([, keys]) => keys.forEach(key => keysSet.add(key))); - this.affectedKeys = [...keysSet.values()]; - const configurationModel = new ConfigurationModel(); - this.affectedKeys.forEach(key => configurationModel.setValue(key, {})); - this.affectedKeysTree = configurationModel.contents; - } - get previousConfiguration() { - if (!this._previousConfiguration && this.previous) { - this._previousConfiguration = Configuration.parse(this.previous.data); - } - return this._previousConfiguration; - } - affectsConfiguration(section, overrides) { - var _a; - if (this.doesAffectedKeysTreeContains(this.affectedKeysTree, section)) { - if (overrides) { - const value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, (_a = this.previous) === null || _a === void 0 ? void 0 : _a.workspace) : undefined; - const value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace); - return !_base_common_objects_js__WEBPACK_IMPORTED_MODULE_3__["equals"](value1, value2); - } - return true; - } - return false; + getContainer() { + return this.element; } - doesAffectedKeysTreeContains(affectedKeysTree, section) { - let requestedTree = Object(_configuration_js__WEBPACK_IMPORTED_MODULE_6__["toValuesTree"])({ [section]: true }, () => { }); - let key; - while (typeof requestedTree === 'object' && (key = Object.keys(requestedTree)[0])) { // Only one key should present, since we added only one property - affectedKeysTree = affectedKeysTree[key]; - if (!affectedKeysTree) { - return false; // Requested tree is not found - } - requestedTree = requestedTree[key]; + style(styles) { + this.progressBarBackground = styles.progressBarBackground; + this.applyStyles(); + } + applyStyles() { + if (this.bit) { + const background = this.progressBarBackground ? this.progressBarBackground.toString() : ''; + this.bit.style.backgroundColor = background; } - return true; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js": -/*!**************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js ***! - \**************************************************************************************************/ -/*! exports provided: Extensions, allSettings, applicationSettings, machineSettings, machineOverridableSettings, windowSettings, resourceSettings, resourceLanguageSettingsSchemaId, OVERRIDE_PROPERTY_PATTERN, overrideIdentifierFromKey, getDefaultValue, validateProperty */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css": +/*!*************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css ***! + \*************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "allSettings", function() { return allSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applicationSettings", function() { return applicationSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "machineSettings", function() { return machineSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "machineOverridableSettings", function() { return machineOverridableSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowSettings", function() { return windowSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resourceSettings", function() { return resourceSettings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resourceLanguageSettingsSchemaId", function() { return resourceLanguageSettingsSchemaId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVERRIDE_PROPERTY_PATTERN", function() { return OVERRIDE_PROPERTY_PATTERN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overrideIdentifierFromKey", function() { return overrideIdentifierFromKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultValue", function() { return getDefaultValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateProperty", function() { return validateProperty; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../jsonschemas/common/jsonContributionRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./sash.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"); + +var options = {}; +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const Extensions = { - Configuration: 'base.contributions.configuration' -}; -const allSettings = { properties: {}, patternProperties: {} }; -const applicationSettings = { properties: {}, patternProperties: {} }; -const machineSettings = { properties: {}, patternProperties: {} }; -const machineOverridableSettings = { properties: {}, patternProperties: {} }; -const windowSettings = { properties: {}, patternProperties: {} }; -const resourceSettings = { properties: {}, patternProperties: {} }; -const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage'; -const contributionRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["Registry"].as(_jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__["Extensions"].JSONContribution); -class ConfigurationRegistry { - constructor() { - this.overrideIdentifiers = new Set(); - this._onDidSchemaChange = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this._onDidUpdateConfiguration = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this.defaultValues = {}; - this.defaultLanguageConfigurationOverridesNode = { - id: 'defaultOverrides', - title: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('defaultLanguageConfigurationOverrides.title', "Default Language Configuration Overrides"), - properties: {} - }; - this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode]; - this.resourceLanguageSettingsSchema = { properties: {}, patternProperties: {}, additionalProperties: false, errorMessage: 'Unknown editor configuration setting', allowTrailingCommas: true, allowComments: true }; - this.configurationProperties = {}; - this.excludedConfigurationProperties = {}; - contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema); - } - registerConfiguration(configuration, validate = true) { - this.registerConfigurations([configuration], validate); - } - registerConfigurations(configurations, validate = true) { - const properties = []; - configurations.forEach(configuration => { - properties.push(...this.validateAndRegisterProperties(configuration, validate)); // fills in defaults - this.configurationContributors.push(configuration); - this.registerJSONConfiguration(configuration); - }); - contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema); - this._onDidSchemaChange.fire(); - this._onDidUpdateConfiguration.fire(properties); - } - registerOverrideIdentifiers(overrideIdentifiers) { - for (const overrideIdentifier of overrideIdentifiers) { - this.overrideIdentifiers.add(overrideIdentifier); - } - this.updateOverridePropertyPatternKey(); - } - validateAndRegisterProperties(configuration, validate = true, scope = 3 /* WINDOW */) { - scope = _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"](configuration.scope) ? scope : configuration.scope; - let propertyKeys = []; - let properties = configuration.properties; - if (properties) { - for (let key in properties) { - if (validate && validateProperty(key)) { - delete properties[key]; - continue; - } - const property = properties[key]; - // update default value - this.updatePropertyDefaultValue(key, property); - // update scope - if (OVERRIDE_PROPERTY_PATTERN.test(key)) { - property.scope = undefined; // No scope for overridable properties `[${identifier}]` - } - else { - property.scope = _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"](property.scope) ? scope : property.scope; - } - // Add to properties maps - // Property is included by default if 'included' is unspecified - if (properties[key].hasOwnProperty('included') && !properties[key].included) { - this.excludedConfigurationProperties[key] = properties[key]; - delete properties[key]; - continue; - } - else { - this.configurationProperties[key] = properties[key]; - } - if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) { - // If not set, default deprecationMessage to the markdown source - properties[key].deprecationMessage = properties[key].markdownDeprecationMessage; - } - propertyKeys.push(key); - } - } - let subNodes = configuration.allOf; - if (subNodes) { - for (let node of subNodes) { - propertyKeys.push(...this.validateAndRegisterProperties(node, validate, scope)); - } - } - return propertyKeys; - } - getConfigurationProperties() { - return this.configurationProperties; - } - registerJSONConfiguration(configuration) { - const register = (configuration) => { - let properties = configuration.properties; - if (properties) { - for (const key in properties) { - this.updateSchema(key, properties[key]); - } - } - let subNodes = configuration.allOf; - if (subNodes) { - subNodes.forEach(register); - } - }; - register(configuration); - } - updateSchema(key, property) { - allSettings.properties[key] = property; - switch (property.scope) { - case 1 /* APPLICATION */: - applicationSettings.properties[key] = property; - break; - case 2 /* MACHINE */: - machineSettings.properties[key] = property; - break; - case 6 /* MACHINE_OVERRIDABLE */: - machineOverridableSettings.properties[key] = property; - break; - case 3 /* WINDOW */: - windowSettings.properties[key] = property; - break; - case 4 /* RESOURCE */: - resourceSettings.properties[key] = property; - break; - case 5 /* LANGUAGE_OVERRIDABLE */: - resourceSettings.properties[key] = property; - this.resourceLanguageSettingsSchema.properties[key] = property; - break; - } - } - updateOverridePropertyPatternKey() { - for (const overrideIdentifier of this.overrideIdentifiers.values()) { - const overrideIdentifierProperty = `[${overrideIdentifier}]`; - const resourceLanguagePropertiesSchema = { - type: 'object', - description: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."), - errorMessage: _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('overrideSettings.errorMessage', "This setting does not support per-language configuration."), - $ref: resourceLanguageSettingsSchemaId, - }; - this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema); - allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema; - } - this._onDidSchemaChange.fire(); - } - updatePropertyDefaultValue(key, property) { - let defaultValue = this.defaultValues[key]; - if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](defaultValue)) { - defaultValue = property.default; - } - if (_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](defaultValue)) { - defaultValue = getDefaultValue(property.type); - } - property.default = defaultValue; - } -} -const OVERRIDE_PROPERTY = '\\[.*\\]$'; -const OVERRIDE_PROPERTY_PATTERN = new RegExp(OVERRIDE_PROPERTY); -function overrideIdentifierFromKey(key) { - return key.substring(1, key.length - 1); -} -function getDefaultValue(type) { - const t = Array.isArray(type) ? type[0] : type; - switch (t) { - case 'boolean': - return false; - case 'integer': - case 'number': - return 0; - case 'string': - return ''; - case 'array': - return []; - case 'object': - return {}; - default: - return null; - } -} -const configurationRegistry = new ConfigurationRegistry(); -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["Registry"].add(Extensions.Configuration, configurationRegistry); -function validateProperty(property) { - if (OVERRIDE_PROPERTY_PATTERN.test(property)) { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('config.property.languageDefault', "Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.", property); - } - if (configurationRegistry.getConfigurationProperties()[property] !== undefined) { - return _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('config.property.duplicate', "Cannot register '{0}'. This property is already registered.", property); - } - return null; -} +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_sash_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js ***! - \********************************************************************************************/ -/*! exports provided: Context, AbstractContextKeyService, ContextKeyService */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js": +/*!************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js ***! + \************************************************************************/ +/*! exports provided: Sash */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractContextKeyService", function() { return AbstractContextKeyService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyService", function() { return ContextKeyService; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keybinding/common/keybindingResolver.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sash", function() { return Sash; }); +/* harmony import */ var _sash_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sash.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); +/* harmony import */ var _touch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../touch.js */ "./node_modules/monaco-editor/esm/vs/base/browser/touch.js"); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -const KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context'; -class Context { - constructor(id, parent) { - this._id = id; - this._parent = parent; - this._value = Object.create(null); - this._value['_contextId'] = id; - } - setValue(key, value) { - // console.log('SET ' + key + ' = ' + value + ' ON ' + this._id); - if (this._value[key] !== value) { - this._value[key] = value; - return true; - } - return false; - } - removeValue(key) { - // console.log('REMOVE ' + key + ' FROM ' + this._id); - if (key in this._value) { - delete this._value[key]; - return true; - } - return false; - } - getValue(key) { - const ret = this._value[key]; - if (typeof ret === 'undefined' && this._parent) { - return this._parent.getValue(key); + + + +const DEBUG = false; +let globalSize = 4; +const onDidChangeGlobalSize = new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"](); +class Sash extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor(container, layoutProvider, options) { + super(); + this._state = 3 /* Enabled */; + this._onDidEnablementChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidEnablementChange = this._onDidEnablementChange.event; + this._onDidStart = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidStart = this._onDidStart.event; + this._onDidChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidChange = this._onDidChange.event; + this._onDidReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidReset = this._onDidReset.event; + this._onDidEnd = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_6__["Emitter"]()); + this.onDidEnd = this._onDidEnd.event; + this.linkedSash = undefined; + this.orthogonalStartSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"]()); + this.orthogonalEndSashDisposables = this._register(new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"]()); + this.el = Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["$"])('.monaco-sash')); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'mac'); } - return ret; - } -} -class NullContext extends Context { - constructor() { - super(-1, null); - } - setValue(key, value) { - return false; - } - removeValue(key) { - return false; - } - getValue(key) { - return undefined; - } -} -NullContext.INSTANCE = new NullContext(); -class ConfigAwareContextValuesContainer extends Context { - constructor(id, _configurationService, emitter) { - super(id, null); - this._configurationService = _configurationService; - this._values = new Map(); - this._listener = this._configurationService.onDidChangeConfiguration(event => { - if (event.source === 6 /* DEFAULT */) { - // new setting, reset everything - const allKeys = Array.from(this._values.keys()); - this._values.clear(); - emitter.fire(new ArrayContextKeyChangeEvent(allKeys)); + this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, 'mousedown')(this.onMouseDown, this)); + this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, 'dblclick')(this.onMouseDoubleClick, this)); + this._register(_touch_js__WEBPACK_IMPORTED_MODULE_4__["Gesture"].addTarget(this.el)); + this._register(Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].Start)(this.onTouchStart, this)); + if (typeof options.size === 'number') { + this.size = options.size; + if (options.orientation === 0 /* VERTICAL */) { + this.el.style.width = `${this.size}px`; } else { - const changedKeys = []; - for (const configKey of event.affectedKeys) { - const contextKey = `config.${configKey}`; - if (this._values.has(contextKey)) { - this._values.delete(contextKey); - changedKeys.push(contextKey); - } - } - emitter.fire(new ArrayContextKeyChangeEvent(changedKeys)); + this.el.style.height = `${this.size}px`; } - }); - } - dispose() { - this._listener.dispose(); - } - getValue(key) { - if (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) { - return super.getValue(key); - } - if (this._values.has(key)) { - return this._values.get(key); - } - const configKey = key.substr(ConfigAwareContextValuesContainer._keyPrefix.length); - const configValue = this._configurationService.getValue(configKey); - let value = undefined; - switch (typeof configValue) { - case 'number': - case 'boolean': - case 'string': - value = configValue; - break; - default: - if (Array.isArray(configValue)) { - value = JSON.stringify(configValue); - } - } - this._values.set(key, value); - return value; - } - setValue(key, value) { - return super.setValue(key, value); - } - removeValue(key) { - return super.removeValue(key); - } -} -ConfigAwareContextValuesContainer._keyPrefix = 'config.'; -class ContextKey { - constructor(service, key, defaultValue) { - this._service = service; - this._key = key; - this._defaultValue = defaultValue; - this.reset(); - } - set(value) { - this._service.setContext(this._key, value); - } - reset() { - if (typeof this._defaultValue === 'undefined') { - this._service.removeContext(this._key); } else { - this._service.setContext(this._key, this._defaultValue); + this.size = globalSize; + this._register(onDidChangeGlobalSize.event(size => { + this.size = size; + this.layout(); + })); } - } - get() { - return this._service.getContextKeyValue(this._key); - } -} -class SimpleContextKeyChangeEvent { - constructor(key) { - this.key = key; - } - affectsSome(keys) { - return keys.has(this.key); - } -} -class ArrayContextKeyChangeEvent { - constructor(keys) { - this.keys = keys; - } - affectsSome(keys) { - for (const key of this.keys) { - if (keys.has(key)) { - return true; - } + this.hidden = false; + this.layoutProvider = layoutProvider; + this.orthogonalStartSash = options.orthogonalStartSash; + this.orthogonalEndSash = options.orthogonalEndSash; + this.orientation = options.orientation || 0 /* VERTICAL */; + if (this.orientation === 1 /* HORIZONTAL */) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'horizontal'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'vertical'); } - return false; - } -} -class CompositeContextKeyChangeEvent { - constructor(events) { - this.events = events; - } - affectsSome(keys) { - for (const e of this.events) { - if (e.affectsSome(keys)) { - return true; - } + else { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'horizontal'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'vertical'); } - return false; - } -} -class AbstractContextKeyService { - constructor(myContextId) { - this._onDidChangeContext = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["PauseableEmitter"]({ merge: input => new CompositeContextKeyChangeEvent(input) }); - this._isDisposed = false; - this._myContextId = myContextId; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'debug', DEBUG); + this.layout(); } - createKey(key, defaultValue) { - if (this._isDisposed) { - throw new Error(`AbstractContextKeyService has been disposed`); + get state() { return this._state; } + set state(state) { + if (this._state === state) { + return; } - return new ContextKey(this, key, defaultValue); - } - get onDidChangeContext() { - return this._onDidChangeContext.event; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'disabled', state === 0 /* Disabled */); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'minimum', state === 1 /* Minimum */); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'maximum', state === 2 /* Maximum */); + this._state = state; + this._onDidEnablementChange.fire(state); } - bufferChangeEvents(callback) { - this._onDidChangeContext.pause(); - try { - callback(); + get orthogonalStartSash() { return this._orthogonalStartSash; } + set orthogonalStartSash(sash) { + this.orthogonalStartSashDisposables.clear(); + if (sash) { + this.orthogonalStartSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this)); + this.onOrthogonalStartSashEnablementChange(sash.state); } - finally { - this._onDidChangeContext.resume(); + else { + this.onOrthogonalStartSashEnablementChange(0 /* Disabled */); } + this._orthogonalStartSash = sash; } - createScoped(domNode) { - if (this._isDisposed) { - throw new Error(`AbstractContextKeyService has been disposed`); + get orthogonalEndSash() { return this._orthogonalEndSash; } + set orthogonalEndSash(sash) { + this.orthogonalEndSashDisposables.clear(); + if (sash) { + this.orthogonalEndSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this)); + this.onOrthogonalEndSashEnablementChange(sash.state); } - return new ScopedContextKeyService(this, domNode); - } - contextMatchesRules(rules) { - if (this._isDisposed) { - throw new Error(`AbstractContextKeyService has been disposed`); + else { + this.onOrthogonalEndSashEnablementChange(0 /* Disabled */); } - const context = this.getContextValuesContainer(this._myContextId); - const result = _keybinding_common_keybindingResolver_js__WEBPACK_IMPORTED_MODULE_5__["KeybindingResolver"].contextMatchesRules(context, rules); - // console.group(rules.serialize() + ' -> ' + result); - // rules.keys().forEach(key => { console.log(key, ctx[key]); }); - // console.groupEnd(); - return result; + this._orthogonalEndSash = sash; } - getContextKeyValue(key) { - if (this._isDisposed) { - return undefined; + onMouseDown(e) { + _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); + let isMultisashResize = false; + if (!e.__orthogonalSashEvent) { + const orthogonalSash = this.getOrthogonalSash(e); + if (orthogonalSash) { + isMultisashResize = true; + e.__orthogonalSashEvent = true; + orthogonalSash.onMouseDown(e); + } } - return this.getContextValuesContainer(this._myContextId).getValue(key); - } - setContext(key, value) { - if (this._isDisposed) { - return; + if (this.linkedSash && !e.__linkedSashEvent) { + e.__linkedSashEvent = true; + this.linkedSash.onMouseDown(e); } - const myContext = this.getContextValuesContainer(this._myContextId); - if (!myContext) { + if (!this.state) { return; } - if (myContext.setValue(key, value)) { - this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key)); + // Select both iframes and webviews; internally Electron nests an iframe + // in its component, but this isn't queryable. + const iframes = [ + ...Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["getElementsByTagName"])('iframe'), + ...Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["getElementsByTagName"])('webview'), + ]; + for (const iframe of iframes) { + iframe.style.pointerEvents = 'none'; // disable mouse events on iframes as long as we drag the sash } - } - removeContext(key) { - if (this._isDisposed) { - return; + const mouseDownEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardMouseEvent"](e); + const startX = mouseDownEvent.posx; + const startY = mouseDownEvent.posy; + const altKey = mouseDownEvent.altKey; + const startEvent = { startX, currentX: startX, startY, currentY: startY, altKey }; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addClass"])(this.el, 'active'); + this._onDidStart.fire(startEvent); + // fix https://github.com/Microsoft/vscode/issues/21675 + const style = Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["createStyleSheet"])(this.el); + const updateStyle = () => { + let cursor = ''; + if (isMultisashResize) { + cursor = 'all-scroll'; + } + else if (this.orientation === 1 /* HORIZONTAL */) { + if (this.state === 1 /* Minimum */) { + cursor = 's-resize'; + } + else if (this.state === 2 /* Maximum */) { + cursor = 'n-resize'; + } + else { + cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 'row-resize' : 'ns-resize'; + } + } + else { + if (this.state === 1 /* Minimum */) { + cursor = 'e-resize'; + } + else if (this.state === 2 /* Maximum */) { + cursor = 'w-resize'; + } + else { + cursor = _common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] ? 'col-resize' : 'ew-resize'; + } + } + style.innerHTML = `* { cursor: ${cursor} !important; }`; + }; + const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + updateStyle(); + if (!isMultisashResize) { + this.onDidEnablementChange(updateStyle, null, disposables); } - if (this.getContextValuesContainer(this._myContextId).removeValue(key)) { - this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key)); - } - } - getContext(target) { - if (this._isDisposed) { - return NullContext.INSTANCE; - } - return this.getContextValuesContainer(findContextAttr(target)); - } -} -let ContextKeyService = class ContextKeyService extends AbstractContextKeyService { - constructor(configurationService) { - super(0); - this._contexts = new Map(); - this._toDispose = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - this._lastContextId = 0; - const myContext = new ConfigAwareContextValuesContainer(this._myContextId, configurationService, this._onDidChangeContext); - this._contexts.set(this._myContextId, myContext); - this._toDispose.add(myContext); - // Uncomment this to see the contexts continuously logged - // let lastLoggedValue: string | null = null; - // setInterval(() => { - // let values = Object.keys(this._contexts).map((key) => this._contexts[key]); - // let logValue = values.map(v => JSON.stringify(v._value, null, '\t')).join('\n'); - // if (lastLoggedValue !== logValue) { - // lastLoggedValue = logValue; - // console.log(lastLoggedValue); - // } - // }, 2000); - } - dispose() { - this._isDisposed = true; - this._toDispose.dispose(); + const onMouseMove = (e) => { + _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); + const mouseMoveEvent = new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardMouseEvent"](e); + const event = { startX, currentX: mouseMoveEvent.posx, startY, currentY: mouseMoveEvent.posy, altKey }; + this._onDidChange.fire(event); + }; + const onMouseUp = (e) => { + _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(e, false); + this.el.removeChild(style); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["removeClass"])(this.el, 'active'); + this._onDidEnd.fire(); + disposables.dispose(); + for (const iframe of iframes) { + iframe.style.pointerEvents = 'auto'; + } + }; + Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(window, 'mousemove')(onMouseMove, null, disposables); + Object(_event_js__WEBPACK_IMPORTED_MODULE_8__["domEvent"])(window, 'mouseup')(onMouseUp, null, disposables); } - getContextValuesContainer(contextId) { - if (this._isDisposed) { - return NullContext.INSTANCE; + onMouseDoubleClick(e) { + const orthogonalSash = this.getOrthogonalSash(e); + if (orthogonalSash) { + orthogonalSash._onDidReset.fire(); } - return this._contexts.get(contextId) || NullContext.INSTANCE; - } - createChildContext(parentContextId = this._myContextId) { - if (this._isDisposed) { - throw new Error(`ContextKeyService has been disposed`); + if (this.linkedSash) { + this.linkedSash._onDidReset.fire(); } - let id = (++this._lastContextId); - this._contexts.set(id, new Context(id, this.getContextValuesContainer(parentContextId))); - return id; + this._onDidReset.fire(); } - disposeContext(contextId) { - if (!this._isDisposed) { - this._contexts.delete(contextId); - } + onTouchStart(event) { + _dom_js__WEBPACK_IMPORTED_MODULE_7__["EventHelper"].stop(event); + const listeners = []; + const startX = event.pageX; + const startY = event.pageY; + const altKey = event.altKey; + this._onDidStart.fire({ + startX: startX, + currentX: startX, + startY: startY, + currentY: startY, + altKey + }); + listeners.push(Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addDisposableListener"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].Change, (event) => { + if (_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isNumber"](event.pageX) && _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isNumber"](event.pageY)) { + this._onDidChange.fire({ + startX: startX, + currentX: event.pageX, + startY: startY, + currentY: event.pageY, + altKey + }); + } + })); + listeners.push(Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["addDisposableListener"])(this.el, _touch_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].End, (event) => { + this._onDidEnd.fire(); + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(listeners); + })); } -}; -ContextKeyService = __decorate([ - __param(0, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_3__["IConfigurationService"]) -], ContextKeyService); - -class ScopedContextKeyService extends AbstractContextKeyService { - constructor(parent, domNode) { - super(parent.createChildContext()); - this._parent = parent; - if (domNode) { - this._domNode = domNode; - this._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(this._myContextId)); + layout() { + if (this.orientation === 0 /* VERTICAL */) { + const verticalProvider = this.layoutProvider; + this.el.style.left = verticalProvider.getVerticalSashLeft(this) - (this.size / 2) + 'px'; + if (verticalProvider.getVerticalSashTop) { + this.el.style.top = verticalProvider.getVerticalSashTop(this) + 'px'; + } + if (verticalProvider.getVerticalSashHeight) { + this.el.style.height = verticalProvider.getVerticalSashHeight(this) + 'px'; + } } - } - dispose() { - this._isDisposed = true; - this._parent.disposeContext(this._myContextId); - if (this._domNode) { - this._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR); - this._domNode = undefined; + else { + const horizontalProvider = this.layoutProvider; + this.el.style.top = horizontalProvider.getHorizontalSashTop(this) - (this.size / 2) + 'px'; + if (horizontalProvider.getHorizontalSashLeft) { + this.el.style.left = horizontalProvider.getHorizontalSashLeft(this) + 'px'; + } + if (horizontalProvider.getHorizontalSashWidth) { + this.el.style.width = horizontalProvider.getHorizontalSashWidth(this) + 'px'; + } } } - get onDidChangeContext() { - return _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Event"].any(this._parent.onDidChangeContext, this._onDidChangeContext.event); + hide() { + this.hidden = true; + this.el.style.display = 'none'; + this.el.setAttribute('aria-hidden', 'true'); } - getContextValuesContainer(contextId) { - if (this._isDisposed) { - return NullContext.INSTANCE; - } - return this._parent.getContextValuesContainer(contextId); + onOrthogonalStartSashEnablementChange(state) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'orthogonal-start', state !== 0 /* Disabled */); } - createChildContext(parentContextId = this._myContextId) { - if (this._isDisposed) { - throw new Error(`ScopedContextKeyService has been disposed`); - } - return this._parent.createChildContext(parentContextId); + onOrthogonalEndSashEnablementChange(state) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_7__["toggleClass"])(this.el, 'orthogonal-end', state !== 0 /* Disabled */); } - disposeContext(contextId) { - if (this._isDisposed) { - return; + getOrthogonalSash(e) { + if (this.orientation === 0 /* VERTICAL */) { + if (e.offsetY <= this.size) { + return this.orthogonalStartSash; + } + else if (e.offsetY >= this.el.clientHeight - this.size) { + return this.orthogonalEndSash; + } } - this._parent.disposeContext(contextId); - } -} -function findContextAttr(domNode) { - while (domNode) { - if (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) { - const attr = domNode.getAttribute(KEYBINDING_CONTEXT_ATTR); - if (attr) { - return parseInt(attr, 10); + else { + if (e.offsetX <= this.size) { + return this.orthogonalStartSash; + } + else if (e.offsetX >= this.el.clientWidth - this.size) { + return this.orthogonalEndSash; } - return NaN; } - domNode = domNode.parentElement; + return undefined; + } + dispose() { + super.dispose(); + this.el.remove(); } - return 0; } -_commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__["CommandsRegistry"].registerCommand(_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["SET_CONTEXT_COMMAND_ID"], function (accessor, contextKey, contextValue) { - accessor.get(_common_contextkey_js__WEBPACK_IMPORTED_MODULE_4__["IContextKeyService"]).createKey(String(contextKey), contextValue); -}); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js ***! - \************************************************************************************/ -/*! exports provided: ContextKeyExpr, ContextKeyFalseExpr, ContextKeyTrueExpr, ContextKeyDefinedExpr, ContextKeyEqualsExpr, ContextKeyInExpr, ContextKeyNotInExpr, ContextKeyNotEqualsExpr, ContextKeyNotExpr, ContextKeyRegexExpr, ContextKeyNotRegexExpr, ContextKeyAndExpr, ContextKeyOrExpr, RawContextKey, IContextKeyService, SET_CONTEXT_COMMAND_ID */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyExpr", function() { return ContextKeyExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyFalseExpr", function() { return ContextKeyFalseExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyTrueExpr", function() { return ContextKeyTrueExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyDefinedExpr", function() { return ContextKeyDefinedExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyEqualsExpr", function() { return ContextKeyEqualsExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyInExpr", function() { return ContextKeyInExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyNotInExpr", function() { return ContextKeyNotInExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyNotEqualsExpr", function() { return ContextKeyNotEqualsExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyNotExpr", function() { return ContextKeyNotExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyRegexExpr", function() { return ContextKeyRegexExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyNotRegexExpr", function() { return ContextKeyNotRegexExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyAndExpr", function() { return ContextKeyAndExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextKeyOrExpr", function() { return ContextKeyOrExpr; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RawContextKey", function() { return RawContextKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IContextKeyService", function() { return IContextKeyService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_CONTEXT_COMMAND_ID", function() { return SET_CONTEXT_COMMAND_ID; }); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js ***! + \******************************************************************************************/ +/*! exports provided: AbstractScrollbar */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractScrollbar", function() { return AbstractScrollbar; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); +/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); +/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); +/* harmony import */ var _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scrollbarVisibilityController.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -233194,1868 +79639,1330 @@ __webpack_require__.r(__webpack_exports__); -const STATIC_VALUES = new Map(); -STATIC_VALUES.set('false', false); -STATIC_VALUES.set('true', true); -STATIC_VALUES.set('isMac', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"]); -STATIC_VALUES.set('isLinux', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isLinux"]); -STATIC_VALUES.set('isWindows', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWindows"]); -STATIC_VALUES.set('isWeb', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWeb"]); -STATIC_VALUES.set('isMacNative', _base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isMacintosh"] && !_base_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["isWeb"]); -const hasOwnProperty = Object.prototype.hasOwnProperty; -class ContextKeyExpr { - static has(key) { - return ContextKeyDefinedExpr.create(key); - } - static equals(key, value) { - return ContextKeyEqualsExpr.create(key, value); - } - static regex(key, value) { - return ContextKeyRegexExpr.create(key, value); - } - static not(key) { - return ContextKeyNotExpr.create(key); - } - static and(...expr) { - return ContextKeyAndExpr.create(expr); - } - static or(...expr) { - return ContextKeyOrExpr.create(expr); - } - static deserialize(serialized, strict = false) { - if (!serialized) { - return undefined; - } - return this._deserializeOrExpression(serialized, strict); - } - static _deserializeOrExpression(serialized, strict) { - let pieces = serialized.split('||'); - return ContextKeyOrExpr.create(pieces.map(p => this._deserializeAndExpression(p, strict))); - } - static _deserializeAndExpression(serialized, strict) { - let pieces = serialized.split('&&'); - return ContextKeyAndExpr.create(pieces.map(p => this._deserializeOne(p, strict))); - } - static _deserializeOne(serializedOne, strict) { - serializedOne = serializedOne.trim(); - if (serializedOne.indexOf('!=') >= 0) { - let pieces = serializedOne.split('!='); - return ContextKeyNotEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); - } - if (serializedOne.indexOf('==') >= 0) { - let pieces = serializedOne.split('=='); - return ContextKeyEqualsExpr.create(pieces[0].trim(), this._deserializeValue(pieces[1], strict)); - } - if (serializedOne.indexOf('=~') >= 0) { - let pieces = serializedOne.split('=~'); - return ContextKeyRegexExpr.create(pieces[0].trim(), this._deserializeRegexValue(pieces[1], strict)); - } - if (serializedOne.indexOf(' in ') >= 0) { - let pieces = serializedOne.split(' in '); - return ContextKeyInExpr.create(pieces[0].trim(), pieces[1].trim()); - } - if (/^\!\s*/.test(serializedOne)) { - return ContextKeyNotExpr.create(serializedOne.substr(1).trim()); - } - return ContextKeyDefinedExpr.create(serializedOne); + + + + +/** + * The orthogonal distance to the slider at which dragging "resets". This implements "snapping" + */ +const MOUSE_DRAG_RESET_DISTANCE = 140; +class AbstractScrollbar extends _widget_js__WEBPACK_IMPORTED_MODULE_5__["Widget"] { + constructor(opts) { + super(); + this._lazyRender = opts.lazyRender; + this._host = opts.host; + this._scrollable = opts.scrollable; + this._scrollbarState = opts.scrollbarState; + this._visibilityController = this._register(new _scrollbarVisibilityController_js__WEBPACK_IMPORTED_MODULE_4__["ScrollbarVisibilityController"](opts.visibility, 'visible scrollbar ' + opts.extraScrollbarClassName, 'invisible scrollbar ' + opts.extraScrollbarClassName)); + this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); + this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__["GlobalMouseMoveMonitor"]()); + this._shouldRender = true; + this.domNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); + this.domNode.setAttribute('role', 'presentation'); + this.domNode.setAttribute('aria-hidden', 'true'); + this._visibilityController.setDomNode(this.domNode); + this.domNode.setPosition('absolute'); + this.onmousedown(this.domNode.domNode, (e) => this._domNodeMouseDown(e)); } - static _deserializeValue(serializedValue, strict) { - serializedValue = serializedValue.trim(); - if (serializedValue === 'true') { - return true; - } - if (serializedValue === 'false') { - return false; - } - let m = /^'([^']*)'$/.exec(serializedValue); - if (m) { - return m[1].trim(); - } - return serializedValue; + // ----------------- creation + /** + * Creates the dom node for an arrow & adds it to the container + */ + _createArrow(opts) { + let arrow = this._register(new _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarArrow"](opts)); + this.domNode.domNode.appendChild(arrow.bgDomNode); + this.domNode.domNode.appendChild(arrow.domNode); } - static _deserializeRegexValue(serializedValue, strict) { - if (Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_0__["isFalsyOrWhitespace"])(serializedValue)) { - if (strict) { - throw new Error('missing regexp-value for =~-expression'); - } - else { - console.warn('missing regexp-value for =~-expression'); - } - return null; - } - let start = serializedValue.indexOf('/'); - let end = serializedValue.lastIndexOf('/'); - if (start === end || start < 0 /* || to < 0 */) { - if (strict) { - throw new Error(`bad regexp-value '${serializedValue}', missing /-enclosure`); - } - else { - console.warn(`bad regexp-value '${serializedValue}', missing /-enclosure`); - } - return null; + /** + * Creates the slider dom node, adds it to the container & hooks up the events + */ + _createSlider(top, left, width, height) { + this.slider = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_1__["createFastDomNode"])(document.createElement('div')); + this.slider.setClassName('slider'); + this.slider.setPosition('absolute'); + this.slider.setTop(top); + this.slider.setLeft(left); + if (typeof width === 'number') { + this.slider.setWidth(width); } - let value = serializedValue.slice(start + 1, end); - let caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : ''; - try { - return new RegExp(value, caseIgnoreFlag); + if (typeof height === 'number') { + this.slider.setHeight(height); } - catch (e) { - if (strict) { - throw new Error(`bad regexp-value '${serializedValue}', parse error: ${e}`); + this.slider.setLayerHinting(true); + this.slider.setContain('strict'); + this.domNode.domNode.appendChild(this.slider.domNode); + this.onmousedown(this.slider.domNode, (e) => { + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { }); } - else { - console.warn(`bad regexp-value '${serializedValue}', parse error: ${e}`); + }); + this.onclick(this.slider.domNode, e => { + if (e.leftButton) { + e.stopPropagation(); } - return null; - } - } -} -function cmp(a, b) { - return a.cmp(b); -} -class ContextKeyFalseExpr { - constructor() { - this.type = 0 /* False */; - } - cmp(other) { - return this.type - other.type; - } - equals(other) { - return (other.type === this.type); - } - evaluate(context) { - return false; - } - serialize() { - return 'false'; - } - keys() { - return []; - } - negate() { - return ContextKeyTrueExpr.INSTANCE; - } -} -ContextKeyFalseExpr.INSTANCE = new ContextKeyFalseExpr(); -class ContextKeyTrueExpr { - constructor() { - this.type = 1 /* True */; - } - cmp(other) { - return this.type - other.type; - } - equals(other) { - return (other.type === this.type); - } - evaluate(context) { - return true; - } - serialize() { - return 'true'; - } - keys() { - return []; - } - negate() { - return ContextKeyFalseExpr.INSTANCE; - } -} -ContextKeyTrueExpr.INSTANCE = new ContextKeyTrueExpr(); -class ContextKeyDefinedExpr { - constructor(key) { - this.key = key; - this.type = 2 /* Defined */; - } - static create(key) { - const staticValue = STATIC_VALUES.get(key); - if (typeof staticValue === 'boolean') { - return staticValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE; - } - return new ContextKeyDefinedExpr(key); - } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.key < other.key) { - return -1; - } - if (this.key > other.key) { - return 1; - } - return 0; - } - equals(other) { - if (other.type === this.type) { - return (this.key === other.key); - } - return false; - } - evaluate(context) { - return (!!context.getValue(this.key)); - } - serialize() { - return this.key; - } - keys() { - return [this.key]; - } - negate() { - return ContextKeyNotExpr.create(this.key); - } -} -class ContextKeyEqualsExpr { - constructor(key, value) { - this.key = key; - this.value = value; - this.type = 4 /* Equals */; - } - static create(key, value) { - if (typeof value === 'boolean') { - return (value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key)); - } - const staticValue = STATIC_VALUES.get(key); - if (typeof staticValue === 'boolean') { - const trueValue = staticValue ? 'true' : 'false'; - return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE); - } - return new ContextKeyEqualsExpr(key, value); - } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.key < other.key) { - return -1; - } - if (this.key > other.key) { - return 1; - } - if (this.value < other.value) { - return -1; - } - if (this.value > other.value) { - return 1; - } - return 0; - } - equals(other) { - if (other.type === this.type) { - return (this.key === other.key && this.value === other.value); - } - return false; - } - evaluate(context) { - // Intentional == - // eslint-disable-next-line eqeqeq - return (context.getValue(this.key) == this.value); - } - serialize() { - return this.key + ' == \'' + this.value + '\''; - } - keys() { - return [this.key]; - } - negate() { - return ContextKeyNotEqualsExpr.create(this.key, this.value); - } -} -class ContextKeyInExpr { - constructor(key, valueKey) { - this.key = key; - this.valueKey = valueKey; - this.type = 10 /* In */; - } - static create(key, valueKey) { - return new ContextKeyInExpr(key, valueKey); - } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.key < other.key) { - return -1; - } - if (this.key > other.key) { - return 1; - } - if (this.valueKey < other.valueKey) { - return -1; - } - if (this.valueKey > other.valueKey) { - return 1; - } - return 0; - } - equals(other) { - if (other.type === this.type) { - return (this.key === other.key && this.valueKey === other.valueKey); - } - return false; - } - evaluate(context) { - const source = context.getValue(this.valueKey); - const item = context.getValue(this.key); - if (Array.isArray(source)) { - return (source.indexOf(item) >= 0); - } - if (typeof item === 'string' && typeof source === 'object' && source !== null) { - return hasOwnProperty.call(source, item); - } - return false; - } - serialize() { - return this.key + ' in \'' + this.valueKey + '\''; - } - keys() { - return [this.key, this.valueKey]; - } - negate() { - return ContextKeyNotInExpr.create(this); - } -} -class ContextKeyNotInExpr { - constructor(_actual) { - this._actual = _actual; - this.type = 11 /* NotIn */; - // - } - static create(actual) { - return new ContextKeyNotInExpr(actual); - } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - return this._actual.cmp(other._actual); - } - equals(other) { - if (other.type === this.type) { - return this._actual.equals(other._actual); - } - return false; - } - evaluate(context) { - return !this._actual.evaluate(context); - } - serialize() { - throw new Error('Method not implemented.'); - } - keys() { - return this._actual.keys(); - } - negate() { - return this._actual; - } -} -class ContextKeyNotEqualsExpr { - constructor(key, value) { - this.key = key; - this.value = value; - this.type = 5 /* NotEquals */; + }); } - static create(key, value) { - if (typeof value === 'boolean') { - if (value) { - return ContextKeyNotExpr.create(key); + // ----------------- Update state + _onElementSize(visibleSize) { + if (this._scrollbarState.setVisibleSize(visibleSize)) { + this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); + this._shouldRender = true; + if (!this._lazyRender) { + this.render(); } - return ContextKeyDefinedExpr.create(key); - } - const staticValue = STATIC_VALUES.get(key); - if (typeof staticValue === 'boolean') { - const falseValue = staticValue ? 'true' : 'false'; - return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE); - } - return new ContextKeyNotEqualsExpr(key, value); - } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.key < other.key) { - return -1; - } - if (this.key > other.key) { - return 1; - } - if (this.value < other.value) { - return -1; - } - if (this.value > other.value) { - return 1; - } - return 0; - } - equals(other) { - if (other.type === this.type) { - return (this.key === other.key && this.value === other.value); - } - return false; - } - evaluate(context) { - // Intentional != - // eslint-disable-next-line eqeqeq - return (context.getValue(this.key) != this.value); - } - serialize() { - return this.key + ' != \'' + this.value + '\''; - } - keys() { - return [this.key]; - } - negate() { - return ContextKeyEqualsExpr.create(this.key, this.value); - } -} -class ContextKeyNotExpr { - constructor(key) { - this.key = key; - this.type = 3 /* Not */; - } - static create(key) { - const staticValue = STATIC_VALUES.get(key); - if (typeof staticValue === 'boolean') { - return (staticValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE); } - return new ContextKeyNotExpr(key); + return this._shouldRender; } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.key < other.key) { - return -1; - } - if (this.key > other.key) { - return 1; + _onElementScrollSize(elementScrollSize) { + if (this._scrollbarState.setScrollSize(elementScrollSize)) { + this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); + this._shouldRender = true; + if (!this._lazyRender) { + this.render(); + } } - return 0; + return this._shouldRender; } - equals(other) { - if (other.type === this.type) { - return (this.key === other.key); + _onElementScrollPosition(elementScrollPosition) { + if (this._scrollbarState.setScrollPosition(elementScrollPosition)) { + this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); + this._shouldRender = true; + if (!this._lazyRender) { + this.render(); + } } - return false; - } - evaluate(context) { - return (!context.getValue(this.key)); - } - serialize() { - return '!' + this.key; - } - keys() { - return [this.key]; + return this._shouldRender; } - negate() { - return ContextKeyDefinedExpr.create(this.key); + // ----------------- rendering + beginReveal() { + this._visibilityController.setShouldBeVisible(true); } -} -class ContextKeyRegexExpr { - constructor(key, regexp) { - this.key = key; - this.regexp = regexp; - this.type = 7 /* Regex */; - // + beginHide() { + this._visibilityController.setShouldBeVisible(false); } - static create(key, regexp) { - return new ContextKeyRegexExpr(key, regexp); + render() { + if (!this._shouldRender) { + return; + } + this._shouldRender = false; + this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); + this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()); } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; + // ----------------- DOM events + _domNodeMouseDown(e) { + if (e.target !== this.domNode.domNode) { + return; } - if (this.key < other.key) { - return -1; + this._onMouseDown(e); + } + delegateMouseDown(e) { + let domTop = this.domNode.domNode.getClientRects()[0].top; + let sliderStart = domTop + this._scrollbarState.getSliderPosition(); + let sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(); + let mousePos = this._sliderMousePosition(e); + if (sliderStart <= mousePos && mousePos <= sliderStop) { + // Act as if it was a mouse down on the slider + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { }); + } } - if (this.key > other.key) { - return 1; + else { + // Act as if it was a mouse down on the scrollbar + this._onMouseDown(e); } - const thisSource = this.regexp ? this.regexp.source : ''; - const otherSource = other.regexp ? other.regexp.source : ''; - if (thisSource < otherSource) { - return -1; + } + _onMouseDown(e) { + let offsetX; + let offsetY; + if (e.target === this.domNode.domNode && typeof e.browserEvent.offsetX === 'number' && typeof e.browserEvent.offsetY === 'number') { + offsetX = e.browserEvent.offsetX; + offsetY = e.browserEvent.offsetY; } - if (thisSource > otherSource) { - return 1; + else { + const domNodePosition = _dom_js__WEBPACK_IMPORTED_MODULE_0__["getDomNodePagePosition"](this.domNode.domNode); + offsetX = e.posx - domNodePosition.left; + offsetY = e.posy - domNodePosition.top; } - return 0; - } - equals(other) { - if (other.type === this.type) { - const thisSource = this.regexp ? this.regexp.source : ''; - const otherSource = other.regexp ? other.regexp.source : ''; - return (this.key === other.key && thisSource === otherSource); + this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(offsetX, offsetY))); + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { }); } - return false; - } - evaluate(context) { - let value = context.getValue(this.key); - return this.regexp ? this.regexp.test(value) : false; } - serialize() { - const value = this.regexp - ? `/${this.regexp.source}/${this.regexp.ignoreCase ? 'i' : ''}` - : '/invalid/'; - return `${this.key} =~ ${value}`; + _sliderMouseDown(e, onDragFinished) { + const initialMousePosition = this._sliderMousePosition(e); + const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); + const initialScrollbarState = this._scrollbarState.clone(); + this.slider.toggleClassName('active', true); + this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_2__["standardMouseMoveMerger"], (mouseMoveData) => { + const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); + const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_6__["isWindows"] && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { + // The mouse has wondered away from the scrollbar => reset dragging + this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition()); + return; + } + const mousePosition = this._sliderMousePosition(mouseMoveData); + const mouseDelta = mousePosition - initialMousePosition; + this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); + }, () => { + this.slider.toggleClassName('active', false); + this._host.onDragEnd(); + onDragFinished(); + }); + this._host.onDragStart(); } - keys() { - return [this.key]; + _setDesiredScrollPositionNow(_desiredScrollPosition) { + let desiredScrollPosition = {}; + this.writeScrollPosition(desiredScrollPosition, _desiredScrollPosition); + this._scrollable.setScrollPositionNow(desiredScrollPosition); } - negate() { - return ContextKeyNotRegexExpr.create(this); + updateScrollbarSize(scrollbarSize) { + this._updateScrollbarSize(scrollbarSize); + this._scrollbarState.setScrollbarSize(scrollbarSize); + this._shouldRender = true; + if (!this._lazyRender) { + this.render(); + } } } -class ContextKeyNotRegexExpr { - constructor(_actual) { - this._actual = _actual; - this.type = 8 /* NotRegex */; - // + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js ***! + \********************************************************************************************/ +/*! exports provided: HorizontalScrollbar */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalScrollbar", function() { return HorizontalScrollbar; }); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); +/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js"); +/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); +/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + + + +const scrollbarButtonLeftIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-left', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleLeft); +const scrollbarButtonRightIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-right', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleRight); +class HorizontalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__["AbstractScrollbar"] { + constructor(scrollable, options, host) { + const scrollDimensions = scrollable.getScrollDimensions(); + const scrollPosition = scrollable.getCurrentScrollPosition(); + super({ + lazyRender: options.lazyRender, + host: host, + scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarState"]((options.horizontalHasArrows ? options.arrowSize : 0), (options.horizontal === 2 /* Hidden */ ? 0 : options.horizontalScrollbarSize), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), scrollDimensions.width, scrollDimensions.scrollWidth, scrollPosition.scrollLeft), + visibility: options.horizontal, + extraScrollbarClassName: 'horizontal', + scrollable: scrollable + }); + if (options.horizontalHasArrows) { + let arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; + let scrollbarDelta = (options.horizontalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; + this._createArrow({ + className: 'scra', + icon: scrollbarButtonLeftIcon, + top: scrollbarDelta, + left: arrowDelta, + bottom: undefined, + right: undefined, + bgWidth: options.arrowSize, + bgHeight: options.horizontalScrollbarSize, + onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 1, 0)), + }); + this._createArrow({ + className: 'scra', + icon: scrollbarButtonRightIcon, + top: scrollbarDelta, + left: undefined, + bottom: undefined, + right: arrowDelta, + bgWidth: options.arrowSize, + bgHeight: options.horizontalScrollbarSize, + onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, -1, 0)), + }); + } + this._createSlider(Math.floor((options.horizontalScrollbarSize - options.horizontalSliderSize) / 2), 0, undefined, options.horizontalSliderSize); + } + _updateSlider(sliderSize, sliderPosition) { + this.slider.setWidth(sliderSize); + this.slider.setLeft(sliderPosition); } - static create(actual) { - return new ContextKeyNotRegexExpr(actual); + _renderDomNode(largeSize, smallSize) { + this.domNode.setWidth(largeSize); + this.domNode.setHeight(smallSize); + this.domNode.setLeft(0); + this.domNode.setBottom(0); } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - return this._actual.cmp(other._actual); + onDidScroll(e) { + this._shouldRender = this._onElementScrollSize(e.scrollWidth) || this._shouldRender; + this._shouldRender = this._onElementScrollPosition(e.scrollLeft) || this._shouldRender; + this._shouldRender = this._onElementSize(e.width) || this._shouldRender; + return this._shouldRender; } - equals(other) { - if (other.type === this.type) { - return this._actual.equals(other._actual); - } - return false; + _mouseDownRelativePosition(offsetX, offsetY) { + return offsetX; } - evaluate(context) { - return !this._actual.evaluate(context); + _sliderMousePosition(e) { + return e.posx; } - serialize() { - throw new Error('Method not implemented.'); + _sliderOrthogonalMousePosition(e) { + return e.posy; } - keys() { - return this._actual.keys(); + _updateScrollbarSize(size) { + this.slider.setHeight(size); } - negate() { - return this._actual; + writeScrollPosition(target, scrollPosition) { + target.scrollLeft = scrollPosition; } } -class ContextKeyAndExpr { - constructor(expr) { - this.expr = expr; - this.type = 6 /* And */; + + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css": +/*!******************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css ***! + \******************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../../css-loader/dist/cjs.js!./scrollbars.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"); + + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); + + + +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_scrollbars_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + +/***/ }), + +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js ***! + \******************************************************************************************/ +/*! exports provided: MouseWheelClassifier, AbstractScrollableElement, ScrollableElement, SmoothScrollableElement, DomScrollableElement */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MouseWheelClassifier", function() { return MouseWheelClassifier; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractScrollableElement", function() { return AbstractScrollableElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollableElement", function() { return ScrollableElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmoothScrollableElement", function() { return SmoothScrollableElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomScrollableElement", function() { return DomScrollableElement; }); +/* harmony import */ var _media_scrollbars_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/scrollbars.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../fastDomNode.js */ "./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); +/* harmony import */ var _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./horizontalScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/horizontalScrollbar.js"); +/* harmony import */ var _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./verticalScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/scrollable.js */ "./node_modules/monaco-editor/esm/vs/base/common/scrollable.js"); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../browser.js */ "./node_modules/monaco-editor/esm/vs/base/browser/browser.js"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + + + + + + + + + + + + +const HIDE_TIMEOUT = 500; +const SCROLL_WHEEL_SENSITIVITY = 50; +const SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED = true; +class MouseWheelClassifierItem { + constructor(timestamp, deltaX, deltaY) { + this.timestamp = timestamp; + this.deltaX = deltaX; + this.deltaY = deltaY; + this.score = 0; } - static create(_expr) { - return ContextKeyAndExpr._normalizeArr(_expr); +} +class MouseWheelClassifier { + constructor() { + this._capacity = 5; + this._memory = []; + this._front = -1; + this._rear = -1; } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; - } - if (this.expr.length < other.expr.length) { - return -1; - } - if (this.expr.length > other.expr.length) { - return 1; + isPhysicalMouseWheel() { + if (this._front === -1 && this._rear === -1) { + // no elements + return false; } - for (let i = 0, len = this.expr.length; i < len; i++) { - const r = cmp(this.expr[i], other.expr[i]); - if (r !== 0) { - return r; + // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ... + let remainingInfluence = 1; + let score = 0; + let iteration = 1; + let index = this._rear; + do { + const influence = (index === this._front ? remainingInfluence : Math.pow(2, -iteration)); + remainingInfluence -= influence; + score += this._memory[index].score * influence; + if (index === this._front) { + break; } - } - return 0; + index = (this._capacity + index - 1) % this._capacity; + iteration++; + } while (true); + return (score <= 0.5); } - equals(other) { - if (other.type === this.type) { - if (this.expr.length !== other.expr.length) { - return false; - } - for (let i = 0, len = this.expr.length; i < len; i++) { - if (!this.expr[i].equals(other.expr[i])) { - return false; - } - } - return true; + accept(timestamp, deltaX, deltaY) { + const item = new MouseWheelClassifierItem(timestamp, deltaX, deltaY); + item.score = this._computeScore(item); + if (this._front === -1 && this._rear === -1) { + this._memory[0] = item; + this._front = 0; + this._rear = 0; } - return false; - } - evaluate(context) { - for (let i = 0, len = this.expr.length; i < len; i++) { - if (!this.expr[i].evaluate(context)) { - return false; + else { + this._rear = (this._rear + 1) % this._capacity; + if (this._rear === this._front) { + // Drop oldest + this._front = (this._front + 1) % this._capacity; } + this._memory[this._rear] = item; } - return true; } - static _normalizeArr(arr) { - const expr = []; - let hasTrue = false; - for (const e of arr) { - if (!e) { - continue; - } - if (e.type === 1 /* True */) { - // anything && true ==> anything - hasTrue = true; - continue; - } - if (e.type === 0 /* False */) { - // anything && false ==> false - return ContextKeyFalseExpr.INSTANCE; - } - if (e.type === 6 /* And */) { - expr.push(...e.expr); - continue; - } - expr.push(e); + /** + * A score between 0 and 1 for `item`. + * - a score towards 0 indicates that the source appears to be a physical mouse wheel + * - a score towards 1 indicates that the source appears to be a touchpad or magic mouse, etc. + */ + _computeScore(item) { + if (Math.abs(item.deltaX) > 0 && Math.abs(item.deltaY) > 0) { + // both axes exercised => definitely not a physical mouse wheel + return 1; } - if (expr.length === 0 && hasTrue) { - return ContextKeyTrueExpr.INSTANCE; + let score = 0.5; + const prev = (this._front === -1 && this._rear === -1 ? null : this._memory[this._rear]); + if (prev) { + // const deltaT = item.timestamp - prev.timestamp; + // if (deltaT < 1000 / 30) { + // // sooner than X times per second => indicator that this is not a physical mouse wheel + // score += 0.25; + // } + // if (item.deltaX === prev.deltaX && item.deltaY === prev.deltaY) { + // // equal amplitude => indicator that this is a physical mouse wheel + // score -= 0.25; + // } } - if (expr.length === 0) { - return undefined; + if (!this._isAlmostInt(item.deltaX) || !this._isAlmostInt(item.deltaY)) { + // non-integer deltas => indicator that this is not a physical mouse wheel + score += 0.25; } - if (expr.length === 1) { - return expr[0]; + return Math.min(Math.max(score, 0), 1); + } + _isAlmostInt(value) { + const delta = Math.abs(Math.round(value) - value); + return (delta < 0.01); + } +} +MouseWheelClassifier.INSTANCE = new MouseWheelClassifier(); +class AbstractScrollableElement extends _widget_js__WEBPACK_IMPORTED_MODULE_6__["Widget"] { + constructor(element, options, scrollable) { + super(); + this._onScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"]()); + this.onScroll = this._onScroll.event; + this._onWillScroll = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_8__["Emitter"]()); + element.style.overflow = 'hidden'; + this._options = resolveOptions(options); + this._scrollable = scrollable; + this._register(this._scrollable.onScroll((e) => { + this._onWillScroll.fire(e); + this._onDidScroll(e); + this._onScroll.fire(e); + })); + let scrollbarHost = { + onMouseWheel: (mouseWheelEvent) => this._onMouseWheel(mouseWheelEvent), + onDragStart: () => this._onDragStart(), + onDragEnd: () => this._onDragEnd(), + }; + this._verticalScrollbar = this._register(new _verticalScrollbar_js__WEBPACK_IMPORTED_MODULE_5__["VerticalScrollbar"](this._scrollable, this._options, scrollbarHost)); + this._horizontalScrollbar = this._register(new _horizontalScrollbar_js__WEBPACK_IMPORTED_MODULE_4__["HorizontalScrollbar"](this._scrollable, this._options, scrollbarHost)); + this._domNode = document.createElement('div'); + this._domNode.className = 'monaco-scrollable-element ' + this._options.className; + this._domNode.setAttribute('role', 'presentation'); + this._domNode.style.position = 'relative'; + this._domNode.style.overflow = 'hidden'; + this._domNode.appendChild(element); + this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode); + this._domNode.appendChild(this._verticalScrollbar.domNode.domNode); + if (this._options.useShadows) { + this._leftShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); + this._leftShadowDomNode.setClassName('shadow'); + this._domNode.appendChild(this._leftShadowDomNode.domNode); + this._topShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); + this._topShadowDomNode.setClassName('shadow'); + this._domNode.appendChild(this._topShadowDomNode.domNode); + this._topLeftShadowDomNode = Object(_fastDomNode_js__WEBPACK_IMPORTED_MODULE_2__["createFastDomNode"])(document.createElement('div')); + this._topLeftShadowDomNode.setClassName('shadow top-left-corner'); + this._domNode.appendChild(this._topLeftShadowDomNode.domNode); } - expr.sort(cmp); - // We must distribute any OR expression because we don't support parens - // OR extensions will be at the end (due to sorting rules) - while (expr.length > 1) { - const lastElement = expr[expr.length - 1]; - if (lastElement.type !== 9 /* Or */) { - break; - } - // pop the last element - expr.pop(); - // pop the second to last element - const secondToLastElement = expr.pop(); - // distribute `lastElement` over `secondToLastElement` - const resultElement = ContextKeyOrExpr.create(lastElement.expr.map(el => ContextKeyAndExpr.create([el, secondToLastElement]))); - if (resultElement) { - expr.push(resultElement); - expr.sort(cmp); - } + else { + this._leftShadowDomNode = null; + this._topShadowDomNode = null; + this._topLeftShadowDomNode = null; } - return new ContextKeyAndExpr(expr); + this._listenOnDomNode = this._options.listenOnDomNode || this._domNode; + this._mouseWheelToDispose = []; + this._setListeningToMouseWheel(this._options.handleMouseWheel); + this.onmouseover(this._listenOnDomNode, (e) => this._onMouseOver(e)); + this.onnonbubblingmouseout(this._listenOnDomNode, (e) => this._onMouseOut(e)); + this._hideTimeout = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_7__["TimeoutTimer"]()); + this._isDragging = false; + this._mouseIsOver = false; + this._shouldRender = true; + this._revealOnScroll = true; } - serialize() { - return this.expr.map(e => e.serialize()).join(' && '); + dispose() { + this._mouseWheelToDispose = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this._mouseWheelToDispose); + super.dispose(); } - keys() { - const result = []; - for (let expr of this.expr) { - result.push(...expr.keys()); - } - return result; + /** + * Get the generated 'scrollable' dom node + */ + getDomNode() { + return this._domNode; } - negate() { - let result = []; - for (let expr of this.expr) { - result.push(expr.negate()); - } - return ContextKeyOrExpr.create(result); + getOverviewRulerLayoutInfo() { + return { + parent: this._domNode, + insertBefore: this._verticalScrollbar.domNode.domNode, + }; } -} -class ContextKeyOrExpr { - constructor(expr) { - this.expr = expr; - this.type = 9 /* Or */; + /** + * Delegate a mouse down event to the vertical scrollbar. + * This is to help with clicking somewhere else and having the scrollbar react. + */ + delegateVerticalScrollbarMouseDown(browserEvent) { + this._verticalScrollbar.delegateMouseDown(browserEvent); } - static create(_expr) { - const expr = ContextKeyOrExpr._normalizeArr(_expr); - if (expr.length === 0) { - return undefined; - } - if (expr.length === 1) { - return expr[0]; + getScrollDimensions() { + return this._scrollable.getScrollDimensions(); + } + setScrollDimensions(dimensions) { + this._scrollable.setScrollDimensions(dimensions, false); + } + /** + * Update the class name of the scrollable element. + */ + updateClassName(newClassName) { + this._options.className = newClassName; + // Defaults are different on Macs + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"]) { + this._options.className += ' mac'; } - return new ContextKeyOrExpr(expr); + this._domNode.className = 'monaco-scrollable-element ' + this._options.className; } - cmp(other) { - if (other.type !== this.type) { - return this.type - other.type; + /** + * Update configuration options for the scrollbar. + * Really this is Editor.IEditorScrollbarOptions, but base shouldn't + * depend on Editor. + */ + updateOptions(newOptions) { + if (typeof newOptions.handleMouseWheel !== 'undefined') { + this._options.handleMouseWheel = newOptions.handleMouseWheel; + this._setListeningToMouseWheel(this._options.handleMouseWheel); } - if (this.expr.length < other.expr.length) { - return -1; + if (typeof newOptions.mouseWheelScrollSensitivity !== 'undefined') { + this._options.mouseWheelScrollSensitivity = newOptions.mouseWheelScrollSensitivity; } - if (this.expr.length > other.expr.length) { - return 1; + if (typeof newOptions.fastScrollSensitivity !== 'undefined') { + this._options.fastScrollSensitivity = newOptions.fastScrollSensitivity; } - for (let i = 0, len = this.expr.length; i < len; i++) { - const r = cmp(this.expr[i], other.expr[i]); - if (r !== 0) { - return r; - } + if (typeof newOptions.scrollPredominantAxis !== 'undefined') { + this._options.scrollPredominantAxis = newOptions.scrollPredominantAxis; + } + if (typeof newOptions.horizontalScrollbarSize !== 'undefined') { + this._horizontalScrollbar.updateScrollbarSize(newOptions.horizontalScrollbarSize); + } + if (!this._options.lazyRender) { + this._render(); } - return 0; } - equals(other) { - if (other.type === this.type) { - if (this.expr.length !== other.expr.length) { - return false; - } - for (let i = 0, len = this.expr.length; i < len; i++) { - if (!this.expr[i].equals(other.expr[i])) { - return false; - } - } - return true; + // -------------------- mouse wheel scrolling -------------------- + _setListeningToMouseWheel(shouldListen) { + let isListening = (this._mouseWheelToDispose.length > 0); + if (isListening === shouldListen) { + // No change + return; + } + // Stop listening (if necessary) + this._mouseWheelToDispose = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_9__["dispose"])(this._mouseWheelToDispose); + // Start listening (if necessary) + if (shouldListen) { + let onMouseWheel = (browserEvent) => { + this._onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_3__["StandardWheelEvent"](browserEvent)); + }; + this._mouseWheelToDispose.push(_dom_js__WEBPACK_IMPORTED_MODULE_1__["addDisposableListener"](this._listenOnDomNode, _dom_js__WEBPACK_IMPORTED_MODULE_1__["EventType"].MOUSE_WHEEL, onMouseWheel, { passive: false })); } - return false; } - evaluate(context) { - for (let i = 0, len = this.expr.length; i < len; i++) { - if (this.expr[i].evaluate(context)) { - return true; + _onMouseWheel(e) { + const classifier = MouseWheelClassifier.INSTANCE; + if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) { + const osZoomFactor = window.devicePixelRatio / Object(_browser_js__WEBPACK_IMPORTED_MODULE_12__["getZoomFactor"])(); + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isWindows"] || _common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isLinux"]) { + // On Windows and Linux, the incoming delta events are multiplied with the OS zoom factor. + // The OS zoom factor can be reverse engineered by using the device pixel ratio and the configured zoom factor into account. + classifier.accept(Date.now(), e.deltaX / osZoomFactor, e.deltaY / osZoomFactor); + } + else { + classifier.accept(Date.now(), e.deltaX, e.deltaY); } } - return false; - } - static _normalizeArr(arr) { - let expr = []; - let hasFalse = false; - if (arr) { - for (let i = 0, len = arr.length; i < len; i++) { - const e = arr[i]; - if (!e) { - continue; + // console.log(`${Date.now()}, ${e.deltaY}, ${e.deltaX}`); + if (e.deltaY || e.deltaX) { + let deltaY = e.deltaY * this._options.mouseWheelScrollSensitivity; + let deltaX = e.deltaX * this._options.mouseWheelScrollSensitivity; + if (this._options.scrollPredominantAxis) { + if (Math.abs(deltaY) >= Math.abs(deltaX)) { + deltaX = 0; } - if (e.type === 0 /* False */) { - // anything || false ==> anything - hasFalse = true; - continue; + else { + deltaY = 0; } - if (e.type === 1 /* True */) { - // anything || true ==> true - return [ContextKeyTrueExpr.INSTANCE]; + } + if (this._options.flipAxes) { + [deltaY, deltaX] = [deltaX, deltaY]; + } + // Convert vertical scrolling to horizontal if shift is held, this + // is handled at a higher level on Mac + const shiftConvert = !_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"] && e.browserEvent && e.browserEvent.shiftKey; + if ((this._options.scrollYToX || shiftConvert) && !deltaX) { + deltaX = deltaY; + deltaY = 0; + } + if (e.browserEvent && e.browserEvent.altKey) { + // fastScrolling + deltaX = deltaX * this._options.fastScrollSensitivity; + deltaY = deltaY * this._options.fastScrollSensitivity; + } + const futureScrollPosition = this._scrollable.getFutureScrollPosition(); + let desiredScrollPosition = {}; + if (deltaY) { + const desiredScrollTop = futureScrollPosition.scrollTop - SCROLL_WHEEL_SENSITIVITY * deltaY; + this._verticalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollTop); + } + if (deltaX) { + const desiredScrollLeft = futureScrollPosition.scrollLeft - SCROLL_WHEEL_SENSITIVITY * deltaX; + this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition, desiredScrollLeft); + } + // Check that we are scrolling towards a location which is valid + desiredScrollPosition = this._scrollable.validateScrollPosition(desiredScrollPosition); + if (futureScrollPosition.scrollLeft !== desiredScrollPosition.scrollLeft || futureScrollPosition.scrollTop !== desiredScrollPosition.scrollTop) { + const canPerformSmoothScroll = (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED + && this._options.mouseWheelSmoothScroll + && classifier.isPhysicalMouseWheel()); + if (canPerformSmoothScroll) { + this._scrollable.setScrollPositionSmooth(desiredScrollPosition); } - if (e.type === 9 /* Or */) { - expr = expr.concat(e.expr); - continue; + else { + this._scrollable.setScrollPositionNow(desiredScrollPosition); } - expr.push(e); - } - if (expr.length === 0 && hasFalse) { - return [ContextKeyFalseExpr.INSTANCE]; + this._shouldRender = true; } - expr.sort(cmp); } - return expr; - } - serialize() { - return this.expr.map(e => e.serialize()).join(' || '); - } - keys() { - const result = []; - for (let expr of this.expr) { - result.push(...expr.keys()); + if (this._options.alwaysConsumeMouseWheel || this._shouldRender) { + e.preventDefault(); + e.stopPropagation(); } - return result; } - negate() { - let result = []; - for (let expr of this.expr) { - result.push(expr.negate()); + _onDidScroll(e) { + this._shouldRender = this._horizontalScrollbar.onDidScroll(e) || this._shouldRender; + this._shouldRender = this._verticalScrollbar.onDidScroll(e) || this._shouldRender; + if (this._options.useShadows) { + this._shouldRender = true; } - const terminals = (node) => { - if (node.type === 9 /* Or */) { - return node.expr; - } - return [node]; - }; - // We don't support parens, so here we distribute the AND over the OR terminals - // We always take the first 2 AND pairs and distribute them - while (result.length > 1) { - const LEFT = result.shift(); - const RIGHT = result.shift(); - const all = []; - for (const left of terminals(LEFT)) { - for (const right of terminals(RIGHT)) { - all.push(ContextKeyExpr.and(left, right)); - } - } - result.unshift(ContextKeyExpr.or(...all)); + if (this._revealOnScroll) { + this._reveal(); + } + if (!this._options.lazyRender) { + this._render(); } - return result[0]; } -} -class RawContextKey extends ContextKeyDefinedExpr { - constructor(key, defaultValue) { - super(key); - this._defaultValue = defaultValue; + /** + * Render / mutate the DOM now. + * Should be used together with the ctor option `lazyRender`. + */ + renderNow() { + if (!this._options.lazyRender) { + throw new Error('Please use `lazyRender` together with `renderNow`!'); + } + this._render(); } - bindTo(target) { - return target.createKey(this.key, this._defaultValue); + _render() { + if (!this._shouldRender) { + return; + } + this._shouldRender = false; + this._horizontalScrollbar.render(); + this._verticalScrollbar.render(); + if (this._options.useShadows) { + const scrollState = this._scrollable.getCurrentScrollPosition(); + let enableTop = scrollState.scrollTop > 0; + let enableLeft = scrollState.scrollLeft > 0; + this._leftShadowDomNode.setClassName('shadow' + (enableLeft ? ' left' : '')); + this._topShadowDomNode.setClassName('shadow' + (enableTop ? ' top' : '')); + this._topLeftShadowDomNode.setClassName('shadow top-left-corner' + (enableTop ? ' top' : '') + (enableLeft ? ' left' : '')); + } } - getValue(target) { - return target.getContextKeyValue(this.key); + // -------------------- fade in / fade out -------------------- + _onDragStart() { + this._isDragging = true; + this._reveal(); } - toNegated() { - return ContextKeyExpr.not(this.key); + _onDragEnd() { + this._isDragging = false; + this._hide(); } -} -const IContextKeyService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('contextKeyService'); -const SET_CONTEXT_COMMAND_ID = 'setContext'; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js ***! - \*************************************************************************************/ -/*! exports provided: InputFocusedContextKey */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputFocusedContextKey", function() { return InputFocusedContextKey; }); -const InputFocusedContextKey = 'inputFocus'; - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css": -/*!***********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css ***! - \***********************************************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../css-loader/dist/cjs.js!./contextMenuHandler.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css"); - - - -var options = {}; - -options.insert = "head"; -options.singleton = false; - -var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); - - - -/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js ***! - \**********************************************************************************************/ -/*! exports provided: ContextMenuHandler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextMenuHandler", function() { return ContextMenuHandler; }); -/* harmony import */ var _contextMenuHandler_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextMenuHandler.css */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css"); -/* harmony import */ var _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/actions.js */ "./node_modules/monaco-editor/esm/vs/base/common/actions.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_browser_ui_menu_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/browser/ui/menu/menu.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js"); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/common/styler.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js"); -/* harmony import */ var _base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/browser/event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); -/* harmony import */ var _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/browser/mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - - -class ContextMenuHandler { - constructor(contextViewService, telemetryService, notificationService, keybindingService, themeService) { - this.contextViewService = contextViewService; - this.telemetryService = telemetryService; - this.notificationService = notificationService; - this.keybindingService = keybindingService; - this.themeService = themeService; - this.focusToReturn = null; - this.block = null; - this.options = { blockMouse: true }; + _onMouseOut(e) { + this._mouseIsOver = false; + this._hide(); } - configure(options) { - this.options = options; + _onMouseOver(e) { + this._mouseIsOver = true; + this._reveal(); } - showContextMenu(delegate) { - const actions = delegate.getActions(); - if (!actions.length) { - return; // Don't render an empty context menu - } - this.focusToReturn = document.activeElement; - let menu; - let shadowRootElement = Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["isHTMLElement"])(delegate.domForShadowRoot) ? delegate.domForShadowRoot : undefined; - this.contextViewService.showContextView({ - getAnchor: () => delegate.getAnchor(), - canRelayout: false, - anchorAlignment: delegate.anchorAlignment, - render: (container) => { - let className = delegate.getMenuClassName ? delegate.getMenuClassName() : ''; - if (className) { - container.className += ' ' + className; - } - // Render invisible div to block mouse interaction in the rest of the UI - if (this.options.blockMouse) { - this.block = container.appendChild(Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["$"])('.context-view-block')); - this.block.style.position = 'fixed'; - this.block.style.cursor = 'initial'; - this.block.style.left = '0'; - this.block.style.top = '0'; - this.block.style.width = '100%'; - this.block.style.height = '100%'; - this.block.style.zIndex = '-1'; - Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__["domEvent"])(this.block, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_DOWN)((e) => e.stopPropagation()); - } - const menuDisposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["DisposableStore"](); - const actionRunner = delegate.actionRunner || new _base_common_actions_js__WEBPACK_IMPORTED_MODULE_1__["ActionRunner"](); - actionRunner.onDidBeforeRun(this.onActionRun, this, menuDisposables); - actionRunner.onDidRun(this.onDidActionRun, this, menuDisposables); - menu = new _base_browser_ui_menu_menu_js__WEBPACK_IMPORTED_MODULE_3__["Menu"](container, actions, { - actionViewItemProvider: delegate.getActionViewItem, - context: delegate.getActionsContext ? delegate.getActionsContext() : null, - actionRunner, - getKeyBinding: delegate.getKeyBinding ? delegate.getKeyBinding : action => this.keybindingService.lookupKeybinding(action.id) - }); - menuDisposables.add(Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["attachMenuStyler"])(menu, this.themeService)); - menu.onDidCancel(() => this.contextViewService.hideContextView(true), null, menuDisposables); - menu.onDidBlur(() => this.contextViewService.hideContextView(true), null, menuDisposables); - Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__["domEvent"])(window, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].BLUR)(() => { this.contextViewService.hideContextView(true); }, null, menuDisposables); - Object(_base_browser_event_js__WEBPACK_IMPORTED_MODULE_6__["domEvent"])(window, _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["EventType"].MOUSE_DOWN)((e) => { - if (e.defaultPrevented) { - return; - } - let event = new _base_browser_mouseEvent_js__WEBPACK_IMPORTED_MODULE_7__["StandardMouseEvent"](e); - let element = event.target; - // Don't do anything as we are likely creating a context menu - if (event.rightButton) { - return; - } - while (element) { - if (element === container) { - return; - } - element = element.parentElement; - } - this.contextViewService.hideContextView(true); - }, null, menuDisposables); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["combinedDisposable"])(menuDisposables, menu); - }, - focus: () => { - if (menu) { - menu.focus(!!delegate.autoSelectFirstItem); - } - }, - onHide: (didCancel) => { - if (delegate.onHide) { - delegate.onHide(!!didCancel); - } - if (this.block) { - Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_4__["removeNode"])(this.block); - this.block = null; - } - if (this.focusToReturn) { - this.focusToReturn.focus(); - } - } - }, shadowRootElement, !!shadowRootElement); + _reveal() { + this._verticalScrollbar.beginReveal(); + this._horizontalScrollbar.beginReveal(); + this._scheduleHide(); } - onActionRun(e) { - if (this.telemetryService) { - this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' }); - } - this.contextViewService.hideContextView(false); - // Restore focus here - if (this.focusToReturn) { - this.focusToReturn.focus(); + _hide() { + if (!this._mouseIsOver && !this._isDragging) { + this._verticalScrollbar.beginHide(); + this._horizontalScrollbar.beginHide(); } } - onDidActionRun(e) { - if (e.error && this.notificationService) { - this.notificationService.error(e.error); + _scheduleHide() { + if (!this._mouseIsOver && !this._isDragging) { + this._hideTimeout.cancelAndSet(() => this._hide(), HIDE_TIMEOUT); } } } - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js ***! - \**********************************************************************************************/ -/*! exports provided: ContextMenuService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextMenuService", function() { return ContextMenuService; }); -/* harmony import */ var _contextMenuHandler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contextMenuHandler.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js"); -/* harmony import */ var _contextView_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contextView.js */ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"); -/* harmony import */ var _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - -let ContextMenuService = class ContextMenuService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_7__["Disposable"] { - constructor(telemetryService, notificationService, contextViewService, keybindingService, themeService) { - super(); - this._onDidContextMenu = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this.onDidContextMenu = this._onDidContextMenu.event; - this.contextMenuHandler = new _contextMenuHandler_js__WEBPACK_IMPORTED_MODULE_0__["ContextMenuHandler"](contextViewService, telemetryService, notificationService, keybindingService, themeService); +class ScrollableElement extends AbstractScrollableElement { + constructor(element, options) { + options = options || {}; + options.mouseWheelSmoothScroll = false; + const scrollable = new _common_scrollable_js__WEBPACK_IMPORTED_MODULE_11__["Scrollable"](0, (callback) => _dom_js__WEBPACK_IMPORTED_MODULE_1__["scheduleAtNextAnimationFrame"](callback)); + super(element, options, scrollable); + this._register(scrollable); } - configure(options) { - this.contextMenuHandler.configure(options); + setScrollPosition(update) { + this._scrollable.setScrollPositionNow(update); } - // ContextMenu - showContextMenu(delegate) { - this.contextMenuHandler.showContextMenu(delegate); - this._onDidContextMenu.fire(); +} +class SmoothScrollableElement extends AbstractScrollableElement { + constructor(element, options, scrollable) { + super(element, options, scrollable); } -}; -ContextMenuService = __decorate([ - __param(0, _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_2__["ITelemetryService"]), - __param(1, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_4__["INotificationService"]), - __param(2, _contextView_js__WEBPACK_IMPORTED_MODULE_1__["IContextViewService"]), - __param(3, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_6__["IKeybindingService"]), - __param(4, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_5__["IThemeService"]) -], ContextMenuService); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js ***! - \***************************************************************************************/ -/*! exports provided: IContextViewService, IContextMenuService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IContextViewService", function() { return IContextViewService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IContextMenuService", function() { return IContextMenuService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IContextViewService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('contextViewService'); -const IContextMenuService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('contextMenuService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js ***! - \**********************************************************************************************/ -/*! exports provided: ContextViewService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContextViewService", function() { return ContextViewService; }); -/* harmony import */ var _base_browser_ui_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/ui/contextview/contextview.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../layout/browser/layoutService.js */ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - -let ContextViewService = class ContextViewService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(layoutService) { - super(); - this.layoutService = layoutService; - this.currentViewDisposable = _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; - this.container = layoutService.container; - this.contextView = this._register(new _base_browser_ui_contextview_contextview_js__WEBPACK_IMPORTED_MODULE_0__["ContextView"](this.container, 1 /* ABSOLUTE */)); - this.layout(); - this._register(layoutService.onLayout(() => this.layout())); + setScrollPosition(update) { + this._scrollable.setScrollPositionNow(update); } - // ContextView - setContainer(container, domPosition) { - this.contextView.setContainer(container, domPosition || 1 /* ABSOLUTE */); + getScrollPosition() { + return this._scrollable.getCurrentScrollPosition(); } - showContextView(delegate, container, shadowRoot) { - if (container) { - if (container !== this.container) { - this.container = container; - this.setContainer(container, shadowRoot ? 3 /* FIXED_SHADOW */ : 2 /* FIXED */); - } - } - else { - if (this.container !== this.layoutService.container) { - this.container = this.layoutService.container; - this.setContainer(this.container, 1 /* ABSOLUTE */); +} +class DomScrollableElement extends ScrollableElement { + constructor(element, options) { + super(element, options); + this._element = element; + this.onScroll((e) => { + if (e.scrollTopChanged) { + this._element.scrollTop = e.scrollTop; } - } - this.contextView.show(delegate); - const disposable = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - if (this.currentViewDisposable === disposable) { - this.hideContextView(); + if (e.scrollLeftChanged) { + this._element.scrollLeft = e.scrollLeft; } }); - this.currentViewDisposable = disposable; - return disposable; - } - getContextViewElement() { - return this.contextView.getViewElement(); + this.scanDomNode(); } - layout() { - this.contextView.layout(); + scanDomNode() { + // width, scrollLeft, scrollWidth, height, scrollTop, scrollHeight + this.setScrollDimensions({ + width: this._element.clientWidth, + scrollWidth: this._element.scrollWidth, + height: this._element.clientHeight, + scrollHeight: this._element.scrollHeight + }); + this.setScrollPosition({ + scrollLeft: this._element.scrollLeft, + scrollTop: this._element.scrollTop, + }); } - hideContextView(data) { - this.contextView.hide(data); +} +function resolveOptions(opts) { + let result = { + lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false), + className: (typeof opts.className !== 'undefined' ? opts.className : ''), + useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true), + handleMouseWheel: (typeof opts.handleMouseWheel !== 'undefined' ? opts.handleMouseWheel : true), + flipAxes: (typeof opts.flipAxes !== 'undefined' ? opts.flipAxes : false), + alwaysConsumeMouseWheel: (typeof opts.alwaysConsumeMouseWheel !== 'undefined' ? opts.alwaysConsumeMouseWheel : false), + scrollYToX: (typeof opts.scrollYToX !== 'undefined' ? opts.scrollYToX : false), + mouseWheelScrollSensitivity: (typeof opts.mouseWheelScrollSensitivity !== 'undefined' ? opts.mouseWheelScrollSensitivity : 1), + fastScrollSensitivity: (typeof opts.fastScrollSensitivity !== 'undefined' ? opts.fastScrollSensitivity : 5), + scrollPredominantAxis: (typeof opts.scrollPredominantAxis !== 'undefined' ? opts.scrollPredominantAxis : true), + mouseWheelSmoothScroll: (typeof opts.mouseWheelSmoothScroll !== 'undefined' ? opts.mouseWheelSmoothScroll : true), + arrowSize: (typeof opts.arrowSize !== 'undefined' ? opts.arrowSize : 11), + listenOnDomNode: (typeof opts.listenOnDomNode !== 'undefined' ? opts.listenOnDomNode : null), + horizontal: (typeof opts.horizontal !== 'undefined' ? opts.horizontal : 1 /* Auto */), + horizontalScrollbarSize: (typeof opts.horizontalScrollbarSize !== 'undefined' ? opts.horizontalScrollbarSize : 10), + horizontalSliderSize: (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : 0), + horizontalHasArrows: (typeof opts.horizontalHasArrows !== 'undefined' ? opts.horizontalHasArrows : false), + vertical: (typeof opts.vertical !== 'undefined' ? opts.vertical : 1 /* Auto */), + verticalScrollbarSize: (typeof opts.verticalScrollbarSize !== 'undefined' ? opts.verticalScrollbarSize : 10), + verticalHasArrows: (typeof opts.verticalHasArrows !== 'undefined' ? opts.verticalHasArrows : false), + verticalSliderSize: (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : 0) + }; + result.horizontalSliderSize = (typeof opts.horizontalSliderSize !== 'undefined' ? opts.horizontalSliderSize : result.horizontalScrollbarSize); + result.verticalSliderSize = (typeof opts.verticalSliderSize !== 'undefined' ? opts.verticalSliderSize : result.verticalScrollbarSize); + // Defaults are different on Macs + if (_common_platform_js__WEBPACK_IMPORTED_MODULE_10__["isMacintosh"]) { + result.className += ' mac'; } -}; -ContextViewService = __decorate([ - __param(0, _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_2__["ILayoutService"]) -], ContextViewService); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js ***! - \******************************************************************************/ -/*! exports provided: IDialogService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IDialogService", function() { return IDialogService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IDialogService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('dialogService'); + return result; +} /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js ***! - \****************************************************************************/ -/*! exports provided: EditorOpenContext */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js ***! + \***************************************************************************************/ +/*! exports provided: ARROW_IMG_SIZE, ScrollbarArrow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EditorOpenContext", function() { return EditorOpenContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROW_IMG_SIZE", function() { return ARROW_IMG_SIZE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarArrow", function() { return ScrollbarArrow; }); +/* harmony import */ var _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../globalMouseMoveMonitor.js */ "./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js"); +/* harmony import */ var _widget_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../widget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var EditorOpenContext; -(function (EditorOpenContext) { - /** - * Default: the editor is opening via a programmatic call - * to the editor service API. - */ - EditorOpenContext[EditorOpenContext["API"] = 0] = "API"; - /** - * Indicates that a user action triggered the opening, e.g. - * via mouse or keyboard use. - */ - EditorOpenContext[EditorOpenContext["USER"] = 1] = "USER"; -})(EditorOpenContext || (EditorOpenContext = {})); -/***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js ***! - \************************************************************************************/ -/*! exports provided: ExtensionIdentifier */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExtensionIdentifier", function() { return ExtensionIdentifier; }); /** - * **!Do not construct directly!** - * - * **!Only static methods because it gets serialized!** - * - * This represents the "canonical" version for an extension identifier. Extension ids - * have to be case-insensitive (due to the marketplace), but we must ensure case - * preservation because the extension API is already public at this time. - * - * For example, given an extension with the publisher `"Hello"` and the name `"World"`, - * its canonical extension identifier is `"Hello.World"`. This extension could be - * referenced in some other extension's dependencies using the string `"hello.world"`. - * - * To make matters more complicated, an extension can optionally have an UUID. When two - * extensions have the same UUID, they are considered equal even if their identifier is different. + * The arrow image size. */ -class ExtensionIdentifier { - constructor(value) { - this.value = value; - this._lower = value.toLowerCase(); - } - /** - * Gives the value by which to index (for equality). - */ - static toKey(id) { - if (typeof id === 'string') { - return id.toLowerCase(); +const ARROW_IMG_SIZE = 11; +class ScrollbarArrow extends _widget_js__WEBPACK_IMPORTED_MODULE_1__["Widget"] { + constructor(opts) { + super(); + this._onActivate = opts.onActivate; + this.bgDomNode = document.createElement('div'); + this.bgDomNode.className = 'arrow-background'; + this.bgDomNode.style.position = 'absolute'; + this.bgDomNode.style.width = opts.bgWidth + 'px'; + this.bgDomNode.style.height = opts.bgHeight + 'px'; + if (typeof opts.top !== 'undefined') { + this.bgDomNode.style.top = '0px'; + } + if (typeof opts.left !== 'undefined') { + this.bgDomNode.style.left = '0px'; + } + if (typeof opts.bottom !== 'undefined') { + this.bgDomNode.style.bottom = '0px'; + } + if (typeof opts.right !== 'undefined') { + this.bgDomNode.style.right = '0px'; + } + this.domNode = document.createElement('div'); + this.domNode.className = opts.className; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.domNode, opts.icon.classNames); + this.domNode.style.position = 'absolute'; + this.domNode.style.width = ARROW_IMG_SIZE + 'px'; + this.domNode.style.height = ARROW_IMG_SIZE + 'px'; + if (typeof opts.top !== 'undefined') { + this.domNode.style.top = opts.top + 'px'; + } + if (typeof opts.left !== 'undefined') { + this.domNode.style.left = opts.left + 'px'; + } + if (typeof opts.bottom !== 'undefined') { + this.domNode.style.bottom = opts.bottom + 'px'; } - return id._lower; + if (typeof opts.right !== 'undefined') { + this.domNode.style.right = opts.right + 'px'; + } + this._mouseMoveMonitor = this._register(new _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__["GlobalMouseMoveMonitor"]()); + this.onmousedown(this.bgDomNode, (e) => this._arrowMouseDown(e)); + this.onmousedown(this.domNode, (e) => this._arrowMouseDown(e)); + this._mousedownRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__["IntervalTimer"]()); + this._mousedownScheduleRepeatTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_2__["TimeoutTimer"]()); } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/files/common/files.js": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/files/common/files.js ***! - \**************************************************************************/ -/*! exports provided: FileKind */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileKind", function() { return FileKind; }); -var FileKind; -(function (FileKind) { - FileKind[FileKind["FILE"] = 0] = "FILE"; - FileKind[FileKind["FOLDER"] = 1] = "FOLDER"; - FileKind[FileKind["ROOT_FOLDER"] = 2] = "ROOT_FOLDER"; -})(FileKind || (FileKind = {})); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js ***! - \****************************************************************************************/ -/*! exports provided: SyncDescriptor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncDescriptor", function() { return SyncDescriptor; }); -class SyncDescriptor { - constructor(ctor, staticArguments = [], supportsDelayedInstantiation = false) { - this.ctor = ctor; - this.staticArguments = staticArguments; - this.supportsDelayedInstantiation = supportsDelayedInstantiation; + _arrowMouseDown(e) { + let scheduleRepeater = () => { + this._mousedownRepeatTimer.cancelAndSet(() => this._onActivate(), 1000 / 24); + }; + this._onActivate(); + this._mousedownRepeatTimer.cancel(); + this._mousedownScheduleRepeatTimer.cancelAndSet(scheduleRepeater, 200); + this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, _globalMouseMoveMonitor_js__WEBPACK_IMPORTED_MODULE_0__["standardMouseMoveMerger"], (mouseMoveData) => { + /* Intentional empty */ + }, () => { + this._mousedownRepeatTimer.cancel(); + this._mousedownScheduleRepeatTimer.cancel(); + }); + e.preventDefault(); } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js": +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js": /*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js ***! + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js ***! \***************************************************************************************/ -/*! exports provided: registerSingleton, getSingletonServiceDescriptors */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerSingleton", function() { return registerSingleton; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSingletonServiceDescriptors", function() { return getSingletonServiceDescriptors; }); -/* harmony import */ var _descriptors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./descriptors.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const _registry = []; -function registerSingleton(id, ctor, supportsDelayedInstantiation) { - _registry.push([id, new _descriptors_js__WEBPACK_IMPORTED_MODULE_0__["SyncDescriptor"](ctor, [], supportsDelayedInstantiation)]); -} -function getSingletonServiceDescriptors() { - return _registry; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js ***! - \**********************************************************************************/ -/*! exports provided: Node, Graph */ +/*! exports provided: ScrollbarState */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Graph", function() { return Graph; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarState", function() { return ScrollbarState; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -class Node { - constructor(data) { - this.incoming = new Map(); - this.outgoing = new Map(); - this.data = data; +/** + * The minimal size of the slider (such that it can still be clickable) -- it is artificially enlarged. + */ +const MINIMUM_SLIDER_SIZE = 20; +class ScrollbarState { + constructor(arrowSize, scrollbarSize, oppositeScrollbarSize, visibleSize, scrollSize, scrollPosition) { + this._scrollbarSize = Math.round(scrollbarSize); + this._oppositeScrollbarSize = Math.round(oppositeScrollbarSize); + this._arrowSize = Math.round(arrowSize); + this._visibleSize = visibleSize; + this._scrollSize = scrollSize; + this._scrollPosition = scrollPosition; + this._computedAvailableSize = 0; + this._computedIsNeeded = false; + this._computedSliderSize = 0; + this._computedSliderRatio = 0; + this._computedSliderPosition = 0; + this._refreshComputedValues(); } -} -class Graph { - constructor(_hashFn) { - this._hashFn = _hashFn; - this._nodes = new Map(); - // empty + clone() { + return new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize, this._visibleSize, this._scrollSize, this._scrollPosition); } - roots() { - const ret = []; - for (let node of this._nodes.values()) { - if (node.outgoing.size === 0) { - ret.push(node); - } + setVisibleSize(visibleSize) { + let iVisibleSize = Math.round(visibleSize); + if (this._visibleSize !== iVisibleSize) { + this._visibleSize = iVisibleSize; + this._refreshComputedValues(); + return true; } - return ret; - } - insertEdge(from, to) { - const fromNode = this.lookupOrInsertNode(from); - const toNode = this.lookupOrInsertNode(to); - fromNode.outgoing.set(this._hashFn(to), toNode); - toNode.incoming.set(this._hashFn(from), fromNode); + return false; } - removeNode(data) { - const key = this._hashFn(data); - this._nodes.delete(key); - for (let node of this._nodes.values()) { - node.outgoing.delete(key); - node.incoming.delete(key); + setScrollSize(scrollSize) { + let iScrollSize = Math.round(scrollSize); + if (this._scrollSize !== iScrollSize) { + this._scrollSize = iScrollSize; + this._refreshComputedValues(); + return true; } + return false; } - lookupOrInsertNode(data) { - const key = this._hashFn(data); - let node = this._nodes.get(key); - if (!node) { - node = new Node(data); - this._nodes.set(key, node); + setScrollPosition(scrollPosition) { + let iScrollPosition = Math.round(scrollPosition); + if (this._scrollPosition !== iScrollPosition) { + this._scrollPosition = iScrollPosition; + this._refreshComputedValues(); + return true; } - return node; + return false; } - isEmpty() { - return this._nodes.size === 0; + setScrollbarSize(scrollbarSize) { + this._scrollbarSize = scrollbarSize; } - toString() { - let data = []; - for (let [key, value] of this._nodes) { - data.push(`${key}, (incoming)[${[...value.incoming.keys()].join(', ')}], (outgoing)[${[...value.outgoing.keys()].join(',')}]`); + static _computeValues(oppositeScrollbarSize, arrowSize, visibleSize, scrollSize, scrollPosition) { + const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); + const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); + const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize); + if (!computedIsNeeded) { + // There is no need for a slider + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedRepresentableSize), + computedSliderRatio: 0, + computedSliderPosition: 0, + }; } - return data.join('\n'); + // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise + const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize))); + // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize` + // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`. + const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize); + const computedSliderPosition = (scrollPosition * computedSliderRatio); + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedSliderSize), + computedSliderRatio: computedSliderRatio, + computedSliderPosition: Math.round(computedSliderPosition), + }; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js ***! - \******************************************************************************************/ -/*! exports provided: _util, IInstantiationService, createDecorator, optional */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_util", function() { return _util; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IInstantiationService", function() { return IInstantiationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDecorator", function() { return createDecorator; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -// ------ internal util -var _util; -(function (_util) { - _util.serviceIds = new Map(); - _util.DI_TARGET = '$di$target'; - _util.DI_DEPENDENCIES = '$di$dependencies'; - function getServiceDependencies(ctor) { - return ctor[_util.DI_DEPENDENCIES] || []; - } - _util.getServiceDependencies = getServiceDependencies; -})(_util || (_util = {})); -const IInstantiationService = createDecorator('instantiationService'); -function storeServiceDependency(id, target, index, optional) { - if (target[_util.DI_TARGET] === target) { - target[_util.DI_DEPENDENCIES].push({ id, index, optional }); + _refreshComputedValues() { + const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition); + this._computedAvailableSize = r.computedAvailableSize; + this._computedIsNeeded = r.computedIsNeeded; + this._computedSliderSize = r.computedSliderSize; + this._computedSliderRatio = r.computedSliderRatio; + this._computedSliderPosition = r.computedSliderPosition; } - else { - target[_util.DI_DEPENDENCIES] = [{ id, index, optional }]; - target[_util.DI_TARGET] = target; + getArrowSize() { + return this._arrowSize; } -} -/** - * The *only* valid way to create a {{ServiceIdentifier}}. - */ -function createDecorator(serviceId) { - if (_util.serviceIds.has(serviceId)) { - return _util.serviceIds.get(serviceId); + getScrollPosition() { + return this._scrollPosition; + } + getRectangleLargeSize() { + return this._computedAvailableSize; } - const id = function (target, key, index) { - if (arguments.length !== 3) { - throw new Error('@IServiceName-decorator can only be used to decorate a parameter'); + getRectangleSmallSize() { + return this._scrollbarSize; + } + isNeeded() { + return this._computedIsNeeded; + } + getSliderSize() { + return this._computedSliderSize; + } + getSliderPosition() { + return this._computedSliderPosition; + } + /** + * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider. + * `offset` is based on the same coordinate system as the `sliderPosition`. + */ + getDesiredScrollPositionFromOffset(offset) { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; } - storeServiceDependency(id, target, index, false); - }; - id.toString = () => serviceId; - _util.serviceIds.set(serviceId, id); - return id; -} -/** - * Mark a service dependency as optional. - */ -function optional(serviceIdentifier) { - return function (target, key, index) { - if (arguments.length !== 3) { - throw new Error('@optional-decorator can only be used to decorate a parameter'); + let desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2; + return Math.round(desiredSliderPosition / this._computedSliderRatio); + } + /** + * Compute a desired `scrollPosition` such that the slider moves by `delta`. + */ + getDesiredScrollPositionFromDelta(delta) { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; } - storeServiceDependency(serviceIdentifier, target, index, true); - }; + let desiredSliderPosition = this._computedSliderPosition + delta; + return Math.round(desiredSliderPosition / this._computedSliderRatio); + } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js": -/*!*************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js ***! - \*************************************************************************************************/ -/*! exports provided: InstantiationService */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js": +/*!******************************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js ***! + \******************************************************************************************************/ +/*! exports provided: ScrollbarVisibilityController */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstantiationService", function() { return InstantiationService; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./graph.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js"); -/* harmony import */ var _descriptors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descriptors.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js"); -/* harmony import */ var _instantiation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _serviceCollection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./serviceCollection.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollbarVisibilityController", function() { return ScrollbarVisibilityController; }); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - - - - -// TRACING -const _enableTracing = false; -class CyclicDependencyError extends Error { - constructor(graph) { - super('cyclic dependency between services'); - this.message = graph.toString(); - } -} -class InstantiationService { - constructor(services = new _serviceCollection_js__WEBPACK_IMPORTED_MODULE_4__["ServiceCollection"](), strict = false, parent) { - this._services = services; - this._strict = strict; - this._parent = parent; - this._services.set(_instantiation_js__WEBPACK_IMPORTED_MODULE_3__["IInstantiationService"], this); - } - createChild(services) { - return new InstantiationService(services, this._strict, this); - } - invokeFunction(fn, ...args) { - let _trace = Trace.traceInvocation(fn); - let _done = false; - try { - const accessor = { - get: (id, isOptional) => { - if (_done) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["illegalState"])('service accessor is only valid during the invocation of its target method'); - } - const result = this._getOrCreateServiceInstance(id, _trace); - if (!result && isOptional !== _instantiation_js__WEBPACK_IMPORTED_MODULE_3__["optional"]) { - throw new Error(`[invokeFunction] unknown service '${id}'`); - } - return result; - } - }; - return fn(accessor, ...args); - } - finally { - _done = true; - _trace.stop(); - } +class ScrollbarVisibilityController extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor(visibility, visibleClassName, invisibleClassName) { + super(); + this._visibility = visibility; + this._visibleClassName = visibleClassName; + this._invisibleClassName = invisibleClassName; + this._domNode = null; + this._isVisible = false; + this._isNeeded = false; + this._shouldBeVisible = false; + this._revealTimer = this._register(new _common_async_js__WEBPACK_IMPORTED_MODULE_0__["TimeoutTimer"]()); } - createInstance(ctorOrDescriptor, ...rest) { - let _trace; - let result; - if (ctorOrDescriptor instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__["SyncDescriptor"]) { - _trace = Trace.traceCreation(ctorOrDescriptor.ctor); - result = this._createInstance(ctorOrDescriptor.ctor, ctorOrDescriptor.staticArguments.concat(rest), _trace); - } - else { - _trace = Trace.traceCreation(ctorOrDescriptor); - result = this._createInstance(ctorOrDescriptor, rest, _trace); + // ----------------- Hide / Reveal + applyVisibilitySetting(shouldBeVisible) { + if (this._visibility === 2 /* Hidden */) { + return false; } - _trace.stop(); - return result; - } - _createInstance(ctor, args = [], _trace) { - // arguments defined by service decorators - let serviceDependencies = _instantiation_js__WEBPACK_IMPORTED_MODULE_3__["_util"].getServiceDependencies(ctor).sort((a, b) => a.index - b.index); - let serviceArgs = []; - for (const dependency of serviceDependencies) { - let service = this._getOrCreateServiceInstance(dependency.id, _trace); - if (!service && this._strict && !dependency.optional) { - throw new Error(`[createInstance] ${ctor.name} depends on UNKNOWN service ${dependency.id}.`); - } - serviceArgs.push(service); - } - let firstServiceArgPos = serviceDependencies.length > 0 ? serviceDependencies[0].index : args.length; - // check for argument mismatches, adjust static args if needed - if (args.length !== firstServiceArgPos) { - console.warn(`[createInstance] First service dependency of ${ctor.name} at position ${firstServiceArgPos + 1} conflicts with ${args.length} static arguments`); - let delta = firstServiceArgPos - args.length; - if (delta > 0) { - args = args.concat(new Array(delta)); - } - else { - args = args.slice(0, firstServiceArgPos); - } + if (this._visibility === 3 /* Visible */) { + return true; } - // now create the instance - return new ctor(...[...args, ...serviceArgs]); + return shouldBeVisible; } - _setServiceInstance(id, instance) { - if (this._services.get(id) instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__["SyncDescriptor"]) { - this._services.set(id, instance); - } - else if (this._parent) { - this._parent._setServiceInstance(id, instance); - } - else { - throw new Error('illegalState - setting UNKNOWN service instance'); + setShouldBeVisible(rawShouldBeVisible) { + let shouldBeVisible = this.applyVisibilitySetting(rawShouldBeVisible); + if (this._shouldBeVisible !== shouldBeVisible) { + this._shouldBeVisible = shouldBeVisible; + this.ensureVisibility(); } } - _getServiceInstanceOrDescriptor(id) { - let instanceOrDesc = this._services.get(id); - if (!instanceOrDesc && this._parent) { - return this._parent._getServiceInstanceOrDescriptor(id); - } - else { - return instanceOrDesc; + setIsNeeded(isNeeded) { + if (this._isNeeded !== isNeeded) { + this._isNeeded = isNeeded; + this.ensureVisibility(); } } - _getOrCreateServiceInstance(id, _trace) { - let thing = this._getServiceInstanceOrDescriptor(id); - if (thing instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__["SyncDescriptor"]) { - return this._createAndCacheServiceInstance(id, thing, _trace.branch(id, true)); - } - else { - _trace.branch(id, false); - return thing; - } - } - _createAndCacheServiceInstance(id, desc, _trace) { - const graph = new _graph_js__WEBPACK_IMPORTED_MODULE_1__["Graph"](data => data.id.toString()); - let cycleCount = 0; - const stack = [{ id, desc, _trace }]; - while (stack.length) { - const item = stack.pop(); - graph.lookupOrInsertNode(item); - // a weak but working heuristic for cycle checks - if (cycleCount++ > 1000) { - throw new CyclicDependencyError(graph); - } - // check all dependencies for existence and if they need to be created first - for (let dependency of _instantiation_js__WEBPACK_IMPORTED_MODULE_3__["_util"].getServiceDependencies(item.desc.ctor)) { - let instanceOrDesc = this._getServiceInstanceOrDescriptor(dependency.id); - if (!instanceOrDesc && !dependency.optional) { - console.warn(`[createInstance] ${id} depends on ${dependency.id} which is NOT registered.`); - } - if (instanceOrDesc instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__["SyncDescriptor"]) { - const d = { id: dependency.id, desc: instanceOrDesc, _trace: item._trace.branch(dependency.id, true) }; - graph.insertEdge(item, d); - stack.push(d); - } - } - } - while (true) { - const roots = graph.roots(); - // if there is no more roots but still - // nodes in the graph we have a cycle - if (roots.length === 0) { - if (!graph.isEmpty()) { - throw new CyclicDependencyError(graph); - } - break; - } - for (const { data } of roots) { - // create instance and overwrite the service collections - const instance = this._createServiceInstanceWithOwner(data.id, data.desc.ctor, data.desc.staticArguments, data.desc.supportsDelayedInstantiation, data._trace); - this._setServiceInstance(data.id, instance); - graph.removeNode(data); - } - } - return this._getServiceInstanceOrDescriptor(id); + setDomNode(domNode) { + this._domNode = domNode; + this._domNode.setClassName(this._invisibleClassName); + // Now that the flags & the dom node are in a consistent state, ensure the Hidden/Visible configuration + this.setShouldBeVisible(false); } - _createServiceInstanceWithOwner(id, ctor, args = [], supportsDelayedInstantiation, _trace) { - if (this._services.get(id) instanceof _descriptors_js__WEBPACK_IMPORTED_MODULE_2__["SyncDescriptor"]) { - return this._createServiceInstance(ctor, args, supportsDelayedInstantiation, _trace); + ensureVisibility() { + if (!this._isNeeded) { + // Nothing to be rendered + this._hide(false); + return; } - else if (this._parent) { - return this._parent._createServiceInstanceWithOwner(id, ctor, args, supportsDelayedInstantiation, _trace); + if (this._shouldBeVisible) { + this._reveal(); } else { - throw new Error(`illegalState - creating UNKNOWN service instance ${ctor.name}`); + this._hide(true); } } - _createServiceInstance(ctor, args = [], _supportsDelayedInstantiation, _trace) { - if (!_supportsDelayedInstantiation) { - // eager instantiation - return this._createInstance(ctor, args, _trace); - } - else { - // Return a proxy object that's backed by an idle value. That - // strategy is to instantiate services in our idle time or when actually - // needed but not when injected into a consumer - const idle = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__["IdleValue"](() => this._createInstance(ctor, args, _trace)); - return new Proxy(Object.create(null), { - get(target, key) { - if (key in target) { - return target[key]; - } - let obj = idle.value; - let prop = obj[key]; - if (typeof prop !== 'function') { - return prop; - } - prop = prop.bind(obj); - target[key] = prop; - return prop; - }, - set(_target, p, value) { - idle.value[p] = value; - return true; - } - }); + _reveal() { + if (this._isVisible) { + return; } - } -} -class Trace { - constructor(type, name) { - this.type = type; - this.name = name; - this._start = Date.now(); - this._dep = []; - } - static traceInvocation(ctor) { - return !_enableTracing ? Trace._None : new Trace(1 /* Invocation */, ctor.name || ctor.toString().substring(0, 42).replace(/\n/g, '')); - } - static traceCreation(ctor) { - return !_enableTracing ? Trace._None : new Trace(0 /* Creation */, ctor.name); - } - branch(id, first) { - let child = new Trace(2 /* Branch */, id.toString()); - this._dep.push([id, first, child]); - return child; - } - stop() { - let dur = Date.now() - this._start; - Trace._totals += dur; - let causedCreation = false; - function printChild(n, trace) { - let res = []; - let prefix = new Array(n + 1).join('\t'); - for (const [id, first, child] of trace._dep) { - if (first && child) { - causedCreation = true; - res.push(`${prefix}CREATES -> ${id}`); - let nested = printChild(n + 1, child); - if (nested) { - res.push(nested); - } - } - else { - res.push(`${prefix}uses -> ${id}`); - } + this._isVisible = true; + // The CSS animation doesn't play otherwise + this._revealTimer.setIfNotSet(() => { + if (this._domNode) { + this._domNode.setClassName(this._visibleClassName); } - return res.join('\n'); + }, 0); + } + _hide(withFadeAway) { + this._revealTimer.cancel(); + if (!this._isVisible) { + return; } - let lines = [ - `${this.type === 0 /* Creation */ ? 'CREATE' : 'CALL'} ${this.name}`, - `${printChild(1, this)}`, - `DONE, took ${dur.toFixed(2)}ms (grand total ${Trace._totals.toFixed(2)}ms)` - ]; - if (dur > 2 || causedCreation) { - console.log(lines.join('\n')); + this._isVisible = false; + if (this._domNode) { + this._domNode.setClassName(this._invisibleClassName + (withFadeAway ? ' fade' : '')); } } } -Trace._None = new class extends Trace { - constructor() { super(-1, null); } - stop() { } - branch() { return this; } -}; -Trace._totals = 0; -//#endregion /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js ***! - \**********************************************************************************************/ -/*! exports provided: ServiceCollection */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js ***! + \******************************************************************************************/ +/*! exports provided: VerticalScrollbar */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServiceCollection", function() { return ServiceCollection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalScrollbar", function() { return VerticalScrollbar; }); +/* harmony import */ var _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mouseEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js"); +/* harmony import */ var _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./abstractScrollbar.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js"); +/* harmony import */ var _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scrollbarArrow.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"); +/* harmony import */ var _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scrollbarState.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js"); +/* harmony import */ var _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -class ServiceCollection { - constructor(...entries) { - this._entries = new Map(); - for (let [id, service] of entries) { - this.set(id, service); + + + + + +const scrollbarButtonUpIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-up', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleUp); +const scrollbarButtonDownIcon = Object(_common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["registerIcon"])('scrollbar-button-down', _common_codicons_js__WEBPACK_IMPORTED_MODULE_4__["Codicon"].triangleDown); +class VerticalScrollbar extends _abstractScrollbar_js__WEBPACK_IMPORTED_MODULE_1__["AbstractScrollbar"] { + constructor(scrollable, options, host) { + const scrollDimensions = scrollable.getScrollDimensions(); + const scrollPosition = scrollable.getCurrentScrollPosition(); + super({ + lazyRender: options.lazyRender, + host: host, + scrollbarState: new _scrollbarState_js__WEBPACK_IMPORTED_MODULE_3__["ScrollbarState"]((options.verticalHasArrows ? options.arrowSize : 0), (options.vertical === 2 /* Hidden */ ? 0 : options.verticalScrollbarSize), + // give priority to vertical scroll bar over horizontal and let it scroll all the way to the bottom + 0, scrollDimensions.height, scrollDimensions.scrollHeight, scrollPosition.scrollTop), + visibility: options.vertical, + extraScrollbarClassName: 'vertical', + scrollable: scrollable + }); + if (options.verticalHasArrows) { + let arrowDelta = (options.arrowSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; + let scrollbarDelta = (options.verticalScrollbarSize - _scrollbarArrow_js__WEBPACK_IMPORTED_MODULE_2__["ARROW_IMG_SIZE"]) / 2; + this._createArrow({ + className: 'scra', + icon: scrollbarButtonUpIcon, + top: arrowDelta, + left: scrollbarDelta, + bottom: undefined, + right: undefined, + bgWidth: options.verticalScrollbarSize, + bgHeight: options.arrowSize, + onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 0, 1)), + }); + this._createArrow({ + className: 'scra', + icon: scrollbarButtonDownIcon, + top: undefined, + left: scrollbarDelta, + bottom: arrowDelta, + right: undefined, + bgWidth: options.verticalScrollbarSize, + bgHeight: options.arrowSize, + onActivate: () => this._host.onMouseWheel(new _mouseEvent_js__WEBPACK_IMPORTED_MODULE_0__["StandardWheelEvent"](null, 0, -1)), + }); } + this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, undefined); } - set(id, instanceOrDescriptor) { - const result = this._entries.get(id); - this._entries.set(id, instanceOrDescriptor); - return result; + _updateSlider(sliderSize, sliderPosition) { + this.slider.setHeight(sliderSize); + this.slider.setTop(sliderPosition); + } + _renderDomNode(largeSize, smallSize) { + this.domNode.setWidth(smallSize); + this.domNode.setHeight(largeSize); + this.domNode.setRight(0); + this.domNode.setTop(0); + } + onDidScroll(e) { + this._shouldRender = this._onElementScrollSize(e.scrollHeight) || this._shouldRender; + this._shouldRender = this._onElementScrollPosition(e.scrollTop) || this._shouldRender; + this._shouldRender = this._onElementSize(e.height) || this._shouldRender; + return this._shouldRender; + } + _mouseDownRelativePosition(offsetX, offsetY) { + return offsetY; + } + _sliderMousePosition(e) { + return e.posy; + } + _sliderOrthogonalMousePosition(e) { + return e.posx; } - has(id) { - return this._entries.has(id); + _updateScrollbarSize(size) { + this.slider.setWidth(size); } - get(id) { - return this._entries.get(id); + writeScrollPosition(target, scrollPosition) { + target.scrollTop = scrollPosition; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js ***! - \***************************************************************************************************/ -/*! exports provided: Extensions */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css": +/*!***********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css ***! + \***********************************************************************************/ +/*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); +/* harmony import */ var _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../css-loader/dist/cjs.js!./splitview.css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"); + + +var options = {}; + +options.insert = "head"; +options.singleton = false; + +var update = _style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__["default"], options); -const Extensions = { - JSONContribution: 'base.contributions.json' -}; -function normalizeId(id) { - if (id.length > 0 && id.charAt(id.length - 1) === '#') { - return id.substring(0, id.length - 1); - } - return id; -} -class JSONContributionRegistry { - constructor() { - this._onDidChangeSchema = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"](); - this.schemasById = {}; - } - registerSchema(uri, unresolvedSchemaContent) { - this.schemasById[normalizeId(uri)] = unresolvedSchemaContent; - this._onDidChangeSchema.fire(uri); - } - notifySchemaChanged(uri) { - this._onDidChangeSchema.fire(uri); - } -} -const jsonContributionRegistry = new JSONContributionRegistry(); -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].add(Extensions.JSONContribution, jsonContributionRegistry); +/* harmony default export */ __webpack_exports__["default"] = (_css_loader_dist_cjs_js_splitview_css__WEBPACK_IMPORTED_MODULE_1__["default"].locals || {}); + /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js": -/*!***************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js ***! - \***************************************************************************************************/ -/*! exports provided: AbstractKeybindingService */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js ***! + \**********************************************************************************/ +/*! exports provided: Sizing, SplitView */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractKeybindingService", function() { return AbstractKeybindingService; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sizing", function() { return Sizing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SplitView", function() { return SplitView; }); +/* harmony import */ var _splitview_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./splitview.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sash/sash.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"); +/* harmony import */ var _common_color_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -235065,894 +80972,671 @@ __webpack_require__.r(__webpack_exports__); -class AbstractKeybindingService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(_contextKeyService, _commandService, _telemetryService, _notificationService, _logService) { + + + + + +const defaultStyles = { + separatorBorder: _common_color_js__WEBPACK_IMPORTED_MODULE_8__["Color"].transparent +}; +class ViewItem { + constructor(container, view, size, disposable) { + this.container = container; + this.view = view; + this.disposable = disposable; + this._cachedVisibleSize = undefined; + if (typeof size === 'number') { + this._size = size; + this._cachedVisibleSize = undefined; + _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](container, 'visible'); + } + else { + this._size = 0; + this._cachedVisibleSize = size.cachedVisibleSize; + } + } + set size(size) { + this._size = size; + } + get size() { + return this._size; + } + get visible() { + return typeof this._cachedVisibleSize === 'undefined'; + } + setVisible(visible, size) { + if (visible === this.visible) { + return; + } + if (visible) { + this.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize); + this._cachedVisibleSize = undefined; + } + else { + this._cachedVisibleSize = typeof size === 'number' ? size : this.size; + this.size = 0; + } + _dom_js__WEBPACK_IMPORTED_MODULE_4__["toggleClass"](this.container, 'visible', visible); + if (this.view.setVisible) { + this.view.setVisible(visible); + } + } + get minimumSize() { return this.visible ? this.view.minimumSize : 0; } + get viewMinimumSize() { return this.view.minimumSize; } + get maximumSize() { return this.visible ? this.view.maximumSize : 0; } + get viewMaximumSize() { return this.view.maximumSize; } + get priority() { return this.view.priority; } + get snap() { return !!this.view.snap; } + set enabled(enabled) { + this.container.style.pointerEvents = enabled ? '' : 'none'; + } + layout(offset, layoutContext) { + this.layoutContainer(offset); + this.view.layout(this.size, offset, layoutContext); + } + dispose() { + this.disposable.dispose(); + return this.view; + } +} +class VerticalViewItem extends ViewItem { + layoutContainer(offset) { + this.container.style.top = `${offset}px`; + this.container.style.height = `${this.size}px`; + } +} +class HorizontalViewItem extends ViewItem { + layoutContainer(offset) { + this.container.style.left = `${offset}px`; + this.container.style.width = `${this.size}px`; + } +} +var State; +(function (State) { + State[State["Idle"] = 0] = "Idle"; + State[State["Busy"] = 1] = "Busy"; +})(State || (State = {})); +var Sizing; +(function (Sizing) { + Sizing.Distribute = { type: 'distribute' }; + function Split(index) { return { type: 'split', index }; } + Sizing.Split = Split; + function Invisible(cachedVisibleSize) { return { type: 'invisible', cachedVisibleSize }; } + Sizing.Invisible = Invisible; +})(Sizing || (Sizing = {})); +class SplitView extends _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { + constructor(container, options = {}) { super(); - this._contextKeyService = _contextKeyService; - this._commandService = _commandService; - this._telemetryService = _telemetryService; - this._notificationService = _notificationService; - this._logService = _logService; - this._onDidUpdateKeybindings = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"]()); - this._currentChord = null; - this._currentChordChecker = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["IntervalTimer"](); - this._currentChordStatusMessage = null; - this._logging = false; - } - get onDidUpdateKeybindings() { - return this._onDidUpdateKeybindings ? this._onDidUpdateKeybindings.event : _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].None; // Sinon stubbing walks properties on prototype - } - dispose() { - super.dispose(); - } - _log(str) { - if (this._logging) { - this._logService.info(`[KeybindingService]: ${str}`); + this.size = 0; + this.contentSize = 0; + this.proportions = undefined; + this.viewItems = []; + this.sashItems = []; + this.state = State.Idle; + this._onDidSashChange = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); + this.onDidSashChange = this._onDidSashChange.event; + this._onDidSashReset = this._register(new _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); + this._startSnappingEnabled = true; + this._endSnappingEnabled = true; + this.orientation = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](options.orientation) ? 0 /* VERTICAL */ : options.orientation; + this.inverseAltBehavior = !!options.inverseAltBehavior; + this.proportionalLayout = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](options.proportionalLayout) ? true : !!options.proportionalLayout; + this.el = document.createElement('div'); + _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, 'monaco-split-view2'); + _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, this.orientation === 0 /* VERTICAL */ ? 'vertical' : 'horizontal'); + container.appendChild(this.el); + this.sashContainer = _dom_js__WEBPACK_IMPORTED_MODULE_4__["append"](this.el, _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.sash-container')); + this.viewContainer = _dom_js__WEBPACK_IMPORTED_MODULE_4__["append"](this.el, _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.split-view-container')); + this.style(options.styles || defaultStyles); + // We have an existing set of view, add them now + if (options.descriptor) { + this.size = options.descriptor.size; + options.descriptor.views.forEach((viewDescriptor, index) => { + const sizing = _common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefined"](viewDescriptor.visible) || viewDescriptor.visible ? viewDescriptor.size : { type: 'invisible', cachedVisibleSize: viewDescriptor.size }; + const view = viewDescriptor.view; + this.doAddView(view, sizing, index, true); + }); + // Initialize content size and proportions for first layout + this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + this.saveProportions(); } } - getKeybindings() { - return this._getResolver().getKeybindings(); - } - lookupKeybindings(commandId) { - return _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["coalesce"](this._getResolver().lookupKeybindings(commandId).map(item => item.resolvedKeybinding)); - } - lookupKeybinding(commandId) { - const result = this._getResolver().lookupPrimaryKeybinding(commandId); - if (!result) { - return undefined; + get orthogonalStartSash() { return this._orthogonalStartSash; } + set orthogonalStartSash(sash) { + for (const sashItem of this.sashItems) { + sashItem.sash.orthogonalStartSash = sash; } - return result.resolvedKeybinding; - } - dispatchEvent(e, target) { - return this._dispatch(e, target); + this._orthogonalStartSash = sash; } - softDispatch(e, target) { - const keybinding = this.resolveKeyboardEvent(e); - if (keybinding.isChord()) { - console.warn('Unexpected keyboard event mapped to a chord'); - return null; - } - const [firstPart,] = keybinding.getDispatchParts(); - if (firstPart === null) { - // cannot be dispatched, probably only modifier keys - return null; + get orthogonalEndSash() { return this._orthogonalEndSash; } + set orthogonalEndSash(sash) { + for (const sashItem of this.sashItems) { + sashItem.sash.orthogonalEndSash = sash; } - const contextValue = this._contextKeyService.getContext(target); - const currentChord = this._currentChord ? this._currentChord.keypress : null; - return this._getResolver().resolve(contextValue, currentChord, firstPart); - } - _enterChordMode(firstPart, keypressLabel) { - this._currentChord = { - keypress: firstPart, - label: keypressLabel - }; - this._currentChordStatusMessage = this._notificationService.status(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('first.chord', "({0}) was pressed. Waiting for second key of chord...", keypressLabel)); - const chordEnterTime = Date.now(); - this._currentChordChecker.cancelAndSet(() => { - if (!this._documentHasFocus()) { - // Focus has been lost => leave chord mode - this._leaveChordMode(); - return; - } - if (Date.now() - chordEnterTime > 5000) { - // 5 seconds elapsed => leave chord mode - this._leaveChordMode(); - } - }, 500); + this._orthogonalEndSash = sash; } - _leaveChordMode() { - if (this._currentChordStatusMessage) { - this._currentChordStatusMessage.dispose(); - this._currentChordStatusMessage = null; + get startSnappingEnabled() { return this._startSnappingEnabled; } + set startSnappingEnabled(startSnappingEnabled) { + if (this._startSnappingEnabled === startSnappingEnabled) { + return; } - this._currentChordChecker.cancel(); - this._currentChord = null; - } - _dispatch(e, target) { - return this._doDispatch(this.resolveKeyboardEvent(e), target); + this._startSnappingEnabled = startSnappingEnabled; + this.updateSashEnablement(); } - _doDispatch(keybinding, target) { - let shouldPreventDefault = false; - if (keybinding.isChord()) { - console.warn('Unexpected keyboard event mapped to a chord'); - return false; - } - const [firstPart,] = keybinding.getDispatchParts(); - if (firstPart === null) { - this._log(`\\ Keyboard event cannot be dispatched.`); - // cannot be dispatched, probably only modifier keys - return shouldPreventDefault; - } - const contextValue = this._contextKeyService.getContext(target); - const currentChord = this._currentChord ? this._currentChord.keypress : null; - const keypressLabel = keybinding.getLabel(); - const resolveResult = this._getResolver().resolve(contextValue, currentChord, firstPart); - this._logService.trace('KeybindingService#dispatch', keypressLabel, resolveResult === null || resolveResult === void 0 ? void 0 : resolveResult.commandId); - if (resolveResult && resolveResult.enterChord) { - shouldPreventDefault = true; - this._enterChordMode(firstPart, keypressLabel); - return shouldPreventDefault; - } - if (this._currentChord) { - if (!resolveResult || !resolveResult.commandId) { - this._notificationService.status(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('missing.chord', "The key combination ({0}, {1}) is not a command.", this._currentChord.label, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ }); - shouldPreventDefault = true; - } - } - this._leaveChordMode(); - if (resolveResult && resolveResult.commandId) { - if (!resolveResult.bubble) { - shouldPreventDefault = true; - } - if (typeof resolveResult.commandArgs === 'undefined') { - this._commandService.executeCommand(resolveResult.commandId).then(undefined, err => this._notificationService.warn(err)); - } - else { - this._commandService.executeCommand(resolveResult.commandId, resolveResult.commandArgs).then(undefined, err => this._notificationService.warn(err)); - } - this._telemetryService.publicLog2('workbenchActionExecuted', { id: resolveResult.commandId, from: 'keybinding' }); + get endSnappingEnabled() { return this._endSnappingEnabled; } + set endSnappingEnabled(endSnappingEnabled) { + if (this._endSnappingEnabled === endSnappingEnabled) { + return; } - return shouldPreventDefault; + this._endSnappingEnabled = endSnappingEnabled; + this.updateSashEnablement(); } - mightProducePrintableCharacter(event) { - if (event.ctrlKey || event.metaKey) { - // ignore ctrl/cmd-combination but not shift/alt-combinatios - return false; - } - // weak check for certain ranges. this is properly implemented in a subclass - // with access to the KeyboardMapperFactory. - if ((event.keyCode >= 31 /* KEY_A */ && event.keyCode <= 56 /* KEY_Z */) - || (event.keyCode >= 21 /* KEY_0 */ && event.keyCode <= 30 /* KEY_9 */)) { - return true; + style(styles) { + if (styles.separatorBorder.isTransparent()) { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["removeClass"](this.el, 'separator-border'); + this.el.style.removeProperty('--separator-border'); } - return false; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js ***! - \************************************************************************************************/ -/*! exports provided: BaseResolvedKeybinding */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseResolvedKeybinding", function() { return BaseResolvedKeybinding; }); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/keybindingLabels.js */ "./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js"); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -class BaseResolvedKeybinding extends _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["ResolvedKeybinding"] { - constructor(os, parts) { - super(); - if (parts.length === 0) { - throw Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_0__["illegalArgument"])(`parts`); + else { + _dom_js__WEBPACK_IMPORTED_MODULE_4__["addClass"](this.el, 'separator-border'); + this.el.style.setProperty('--separator-border', styles.separatorBorder.toString()); } - this._os = os; - this._parts = parts; - } - getLabel() { - return _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__["UILabelProvider"].toLabel(this._os, this._parts, (keybinding) => this._getLabel(keybinding)); - } - getAriaLabel() { - return _base_common_keybindingLabels_js__WEBPACK_IMPORTED_MODULE_1__["AriaLabelProvider"].toLabel(this._os, this._parts, (keybinding) => this._getAriaLabel(keybinding)); - } - isChord() { - return (this._parts.length > 1); } - getParts() { - return this._parts.map((keybinding) => this._getPart(keybinding)); - } - _getPart(keybinding) { - return new _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_2__["ResolvedKeybindingPart"](keybinding.ctrlKey, keybinding.shiftKey, keybinding.altKey, keybinding.metaKey, this._getLabel(keybinding), this._getAriaLabel(keybinding)); - } - getDispatchParts() { - return this._parts.map((keybinding) => this._getDispatchPart(keybinding)); + addView(view, size, index = this.viewItems.length, skipLayout) { + this.doAddView(view, size, index, skipLayout); } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js ***! - \************************************************************************************/ -/*! exports provided: IKeybindingService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IKeybindingService", function() { return IKeybindingService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IKeybindingService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('keybindingService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js ***! - \********************************************************************************************/ -/*! exports provided: KeybindingResolver */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeybindingResolver", function() { return KeybindingResolver; }); -class KeybindingResolver { - constructor(defaultKeybindings, overrides, log) { - this._log = log; - this._defaultKeybindings = defaultKeybindings; - this._defaultBoundCommands = new Map(); - for (let i = 0, len = defaultKeybindings.length; i < len; i++) { - const command = defaultKeybindings[i].command; - if (command) { - this._defaultBoundCommands.set(command, true); - } + layout(size, layoutContext) { + const previousSize = Math.max(this.size, this.contentSize); + this.size = size; + this.layoutContext = layoutContext; + if (!this.proportions) { + const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); + this.resize(this.viewItems.length - 1, size - previousSize, undefined, lowPriorityIndexes, highPriorityIndexes); } - this._map = new Map(); - this._lookupMap = new Map(); - this._keybindings = KeybindingResolver.combine(defaultKeybindings, overrides); - for (let i = 0, len = this._keybindings.length; i < len; i++) { - let k = this._keybindings[i]; - if (k.keypressParts.length === 0) { - // unbound - continue; - } - if (k.when && k.when.type === 0 /* False */) { - // when condition is false - continue; + else { + for (let i = 0; i < this.viewItems.length; i++) { + const item = this.viewItems[i]; + item.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(Math.round(this.proportions[i] * size), item.minimumSize, item.maximumSize); } - // TODO@chords - this._addKeyPress(k.keypressParts[0], k); } + this.distributeEmptySpace(); + this.layoutViews(); } - static _isTargetedForRemoval(defaultKb, keypressFirstPart, keypressChordPart, command, when) { - if (defaultKb.command !== command) { - return false; - } - // TODO@chords - if (keypressFirstPart && defaultKb.keypressParts[0] !== keypressFirstPart) { - return false; + saveProportions() { + if (this.proportionalLayout && this.contentSize > 0) { + this.proportions = this.viewItems.map(i => i.size / this.contentSize); } - // TODO@chords - if (keypressChordPart && defaultKb.keypressParts[1] !== keypressChordPart) { - return false; + } + onSashStart({ sash, start, alt }) { + for (const item of this.viewItems) { + item.enabled = false; } - if (when) { - if (!defaultKb.when) { - return false; - } - if (!when.equals(defaultKb.when)) { - return false; + const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash); + // This way, we can press Alt while we resize a sash, macOS style! + const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(Object(_event_js__WEBPACK_IMPORTED_MODULE_9__["domEvent"])(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)), Object(_event_js__WEBPACK_IMPORTED_MODULE_9__["domEvent"])(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false))); + const resetSashDragState = (start, alt) => { + const sizes = this.viewItems.map(i => i.size); + let minDelta = Number.NEGATIVE_INFINITY; + let maxDelta = Number.POSITIVE_INFINITY; + if (this.inverseAltBehavior) { + alt = !alt; } - } - return true; - } - /** - * Looks for rules containing -command in `overrides` and removes them directly from `defaults`. - */ - static combine(defaults, rawOverrides) { - defaults = defaults.slice(0); - let overrides = []; - for (const override of rawOverrides) { - if (!override.command || override.command.length === 0 || override.command.charAt(0) !== '-') { - overrides.push(override); - continue; + if (alt) { + // When we're using the last sash with Alt, we're resizing + // the view to the left/up, instead of right/down as usual + // Thus, we must do the inverse of the usual + const isLastSash = index === this.sashItems.length - 1; + if (isLastSash) { + const viewItem = this.viewItems[index]; + minDelta = (viewItem.minimumSize - viewItem.size) / 2; + maxDelta = (viewItem.maximumSize - viewItem.size) / 2; + } + else { + const viewItem = this.viewItems[index + 1]; + minDelta = (viewItem.size - viewItem.maximumSize) / 2; + maxDelta = (viewItem.size - viewItem.minimumSize) / 2; + } } - const command = override.command.substr(1); - // TODO@chords - const keypressFirstPart = override.keypressParts[0]; - const keypressChordPart = override.keypressParts[1]; - const when = override.when; - for (let j = defaults.length - 1; j >= 0; j--) { - if (this._isTargetedForRemoval(defaults[j], keypressFirstPart, keypressChordPart, command, when)) { - defaults.splice(j, 1); + let snapBefore; + let snapAfter; + if (!alt) { + const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); + const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); + const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); + const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].viewMaximumSize - sizes[i]), 0); + const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); + const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0); + const minDelta = Math.max(minDeltaUp, minDeltaDown); + const maxDelta = Math.min(maxDeltaDown, maxDeltaUp); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); + if (typeof snapBeforeIndex === 'number') { + const viewItem = this.viewItems[snapBeforeIndex]; + const halfSize = Math.floor(viewItem.viewMinimumSize / 2); + snapBefore = { + index: snapBeforeIndex, + limitDelta: viewItem.visible ? minDelta - halfSize : minDelta + halfSize, + size: viewItem.size + }; + } + if (typeof snapAfterIndex === 'number') { + const viewItem = this.viewItems[snapAfterIndex]; + const halfSize = Math.floor(viewItem.viewMinimumSize / 2); + snapAfter = { + index: snapAfterIndex, + limitDelta: viewItem.visible ? maxDelta + halfSize : maxDelta - halfSize, + size: viewItem.size + }; } } - } - return defaults.concat(overrides); + this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapBefore, snapAfter, disposable }; + }; + resetSashDragState(start, alt); } - _addKeyPress(keypress, item) { - const conflicts = this._map.get(keypress); - if (typeof conflicts === 'undefined') { - // There is no conflict so far - this._map.set(keypress, [item]); - this._addToLookupMap(item); - return; + onSashChange({ current }) { + const { index, start, sizes, alt, minDelta, maxDelta, snapBefore, snapAfter } = this.sashDragState; + this.sashDragState.current = current; + const delta = current - start; + const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter); + if (alt) { + const isLastSash = index === this.sashItems.length - 1; + const newSizes = this.viewItems.map(i => i.size); + const viewItemIndex = isLastSash ? index : index + 1; + const viewItem = this.viewItems[viewItemIndex]; + const newMinDelta = viewItem.size - viewItem.maximumSize; + const newMaxDelta = viewItem.size - viewItem.minimumSize; + const resizeIndex = isLastSash ? index - 1 : index + 1; + this.resize(resizeIndex, -newDelta, newSizes, undefined, undefined, newMinDelta, newMaxDelta); } - for (let i = conflicts.length - 1; i >= 0; i--) { - let conflict = conflicts[i]; - if (conflict.command === item.command) { - continue; - } - const conflictIsChord = (conflict.keypressParts.length > 1); - const itemIsChord = (item.keypressParts.length > 1); - // TODO@chords - if (conflictIsChord && itemIsChord && conflict.keypressParts[1] !== item.keypressParts[1]) { - // The conflict only shares the chord start with this command - continue; - } - if (KeybindingResolver.whenIsEntirelyIncluded(conflict.when, item.when)) { - // `item` completely overwrites `conflict` - // Remove conflict from the lookupMap - this._removeFromLookupMap(conflict); - } + this.distributeEmptySpace(); + this.layoutViews(); + } + onSashEnd(index) { + this._onDidSashChange.fire(index); + this.sashDragState.disposable.dispose(); + this.saveProportions(); + for (const item of this.viewItems) { + item.enabled = true; } - conflicts.push(item); - this._addToLookupMap(item); } - _addToLookupMap(item) { - if (!item.command) { + onViewChange(item, size) { + const index = this.viewItems.indexOf(item); + if (index < 0 || index >= this.viewItems.length) { return; } - let arr = this._lookupMap.get(item.command); - if (typeof arr === 'undefined') { - arr = [item]; - this._lookupMap.set(item.command, arr); + size = typeof size === 'number' ? size : item.size; + size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, item.maximumSize); + if (this.inverseAltBehavior && index > 0) { + // In this case, we want the view to grow or shrink both sides equally + // so we just resize the "left" side by half and let `resize` do the clamping magic + this.resize(index - 1, Math.floor((item.size - size) / 2)); + this.distributeEmptySpace(); + this.layoutViews(); } else { - arr.push(item); + item.size = size; + this.relayout([index], undefined); } } - _removeFromLookupMap(item) { - if (!item.command) { - return; + resizeView(index, size) { + if (this.state !== State.Idle) { + throw new Error('Cant modify splitview'); } - let arr = this._lookupMap.get(item.command); - if (typeof arr === 'undefined') { + this.state = State.Busy; + if (index < 0 || index >= this.viewItems.length) { return; } - for (let i = 0, len = arr.length; i < len; i++) { - if (arr[i] === item) { - arr.splice(i, 1); - return; - } - } + const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length).filter(i => i !== index); + const lowPriorityIndexes = [...indexes.filter(i => this.viewItems[i].priority === 1 /* Low */), index]; + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); + const item = this.viewItems[index]; + size = Math.round(size); + size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, Math.min(item.maximumSize, this.size)); + item.size = size; + this.relayout(lowPriorityIndexes, highPriorityIndexes); + this.state = State.Idle; } - /** - * Returns true if it is provable `a` implies `b`. - */ - static whenIsEntirelyIncluded(a, b) { - if (!b) { - return true; + distributeViewSizes() { + const flexibleViewItems = []; + let flexibleSize = 0; + for (const item of this.viewItems) { + if (item.maximumSize - item.minimumSize > 0) { + flexibleViewItems.push(item); + flexibleSize += item.size; + } } - if (!a) { - return false; + const size = Math.floor(flexibleSize / flexibleViewItems.length); + for (const item of flexibleViewItems) { + item.size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(size, item.minimumSize, item.maximumSize); } - return this._implies(a, b); + const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); + this.relayout(lowPriorityIndexes, highPriorityIndexes); } - /** - * Returns true if it is provable `p` implies `q`. - */ - static _implies(p, q) { - const notP = p.negate(); - const terminals = (node) => { - if (node.type === 9 /* Or */) { - return node.expr; - } - return [node]; - }; - let expr = terminals(notP).concat(terminals(q)); - for (let i = 0; i < expr.length; i++) { - const a = expr[i]; - const notA = a.negate(); - for (let j = i + 1; j < expr.length; j++) { - const b = expr[j]; - if (notA.equals(b)) { - return true; - } - } + getViewSize(index) { + if (index < 0 || index >= this.viewItems.length) { + return -1; } - return false; - } - getKeybindings() { - return this._keybindings; + return this.viewItems[index].size; } - lookupKeybindings(commandId) { - let items = this._lookupMap.get(commandId); - if (typeof items === 'undefined' || items.length === 0) { - return []; + doAddView(view, size, index = this.viewItems.length, skipLayout) { + if (this.state !== State.Idle) { + throw new Error('Cant modify splitview'); } - // Reverse to get the most specific item first - let result = [], resultLen = 0; - for (let i = items.length - 1; i >= 0; i--) { - result[resultLen++] = items[i]; + this.state = State.Busy; + // Add view + const container = _dom_js__WEBPACK_IMPORTED_MODULE_4__["$"]('.split-view-view'); + if (index === this.viewItems.length) { + this.viewContainer.appendChild(container); } - return result; - } - lookupPrimaryKeybinding(commandId) { - let items = this._lookupMap.get(commandId); - if (typeof items === 'undefined' || items.length === 0) { - return null; + else { + this.viewContainer.insertBefore(container, this.viewContainer.children.item(index)); } - return items[items.length - 1]; - } - resolve(context, currentChord, keypress) { - this._log(`| Resolving ${keypress}${currentChord ? ` chorded from ${currentChord}` : ``}`); - let lookupMap = null; - if (currentChord !== null) { - // Fetch all chord bindings for `currentChord` - const candidates = this._map.get(currentChord); - if (typeof candidates === 'undefined') { - // No chords starting with `currentChord` - this._log(`\\ No keybinding entries.`); - return null; - } - lookupMap = []; - for (let i = 0, len = candidates.length; i < len; i++) { - let candidate = candidates[i]; - // TODO@chords - if (candidate.keypressParts[1] === keypress) { - lookupMap.push(candidate); - } - } + const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size)); + const containerDisposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => this.viewContainer.removeChild(container)); + const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(onChangeDisposable, containerDisposable); + let viewSize; + if (typeof size === 'number') { + viewSize = size; + } + else if (size.type === 'split') { + viewSize = this.getViewSize(size.index) / 2; + } + else if (size.type === 'invisible') { + viewSize = { cachedVisibleSize: size.cachedVisibleSize }; } else { - const candidates = this._map.get(keypress); - if (typeof candidates === 'undefined') { - // No bindings with `keypress` - this._log(`\\ No keybinding entries.`); - return null; - } - lookupMap = candidates; + viewSize = view.minimumSize; } - let result = this._findCommand(context, lookupMap); - if (!result) { - this._log(`\\ From ${lookupMap.length} keybinding entries, no when clauses matched the context.`); - return null; + const item = this.orientation === 0 /* VERTICAL */ + ? new VerticalViewItem(container, view, viewSize, disposable) + : new HorizontalViewItem(container, view, viewSize, disposable); + this.viewItems.splice(index, 0, item); + // Add sash + if (this.viewItems.length > 1) { + const sash = this.orientation === 0 /* VERTICAL */ + ? new _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__["Sash"](this.sashContainer, { getHorizontalSashTop: (sash) => this.getSashPosition(sash) }, { + orientation: 1 /* HORIZONTAL */, + orthogonalStartSash: this.orthogonalStartSash, + orthogonalEndSash: this.orthogonalEndSash + }) + : new _sash_sash_js__WEBPACK_IMPORTED_MODULE_7__["Sash"](this.sashContainer, { getVerticalSashLeft: (sash) => this.getSashPosition(sash) }, { + orientation: 0 /* VERTICAL */, + orthogonalStartSash: this.orthogonalStartSash, + orthogonalEndSash: this.orthogonalEndSash + }); + const sashEventMapper = this.orientation === 0 /* VERTICAL */ + ? (e) => ({ sash, start: e.startY, current: e.currentY, alt: e.altKey }) + : (e) => ({ sash, start: e.startX, current: e.currentX, alt: e.altKey }); + const onStart = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidStart, sashEventMapper); + const onStartDisposable = onStart(this.onSashStart, this); + const onChange = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidChange, sashEventMapper); + const onChangeDisposable = onChange(this.onSashChange, this); + const onEnd = _common_event_js__WEBPACK_IMPORTED_MODULE_2__["Event"].map(sash.onDidEnd, () => Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash)); + const onEndDisposable = onEnd(this.onSashEnd, this); + const onDidResetDisposable = sash.onDidReset(() => { + const index = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["firstIndex"])(this.sashItems, item => item.sash === sash); + const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); + const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); + if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) { + return; + } + if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) { + return; + } + this._onDidSashReset.fire(index); + }); + const disposable = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["combinedDisposable"])(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash); + const sashItem = { sash, disposable }; + this.sashItems.splice(index - 1, 0, sashItem); } - // TODO@chords - if (currentChord === null && result.keypressParts.length > 1 && result.keypressParts[1] !== null) { - this._log(`\\ From ${lookupMap.length} keybinding entries, matched chord, when: ${printWhenExplanation(result.when)}, source: ${printSourceExplanation(result)}.`); - return { - enterChord: true, - leaveChord: false, - commandId: null, - commandArgs: null, - bubble: false - }; + container.appendChild(view.element); + let highPriorityIndexes; + if (typeof size !== 'number' && size.type === 'split') { + highPriorityIndexes = [size.index]; } - this._log(`\\ From ${lookupMap.length} keybinding entries, matched ${result.command}, when: ${printWhenExplanation(result.when)}, source: ${printSourceExplanation(result)}.`); - return { - enterChord: false, - leaveChord: result.keypressParts.length > 1, - commandId: result.command, - commandArgs: result.commandArgs, - bubble: result.bubble - }; - } - _findCommand(context, matches) { - for (let i = matches.length - 1; i >= 0; i--) { - let k = matches[i]; - if (!KeybindingResolver.contextMatchesRules(context, k.when)) { - continue; - } - return k; + if (!skipLayout) { + this.relayout([index], highPriorityIndexes); } - return null; - } - static contextMatchesRules(context, rules) { - if (!rules) { - return true; + this.state = State.Idle; + if (!skipLayout && typeof size !== 'number' && size.type === 'distribute') { + this.distributeViewSizes(); } - return rules.evaluate(context); } -} -function printWhenExplanation(when) { - if (!when) { - return `no when condition`; + relayout(lowPriorityIndexes, highPriorityIndexes) { + const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes); + this.distributeEmptySpace(); + this.layoutViews(); + this.saveProportions(); } - return `${when.serialize()}`; -} -function printSourceExplanation(kb) { - if (kb.isDefault) { - if (kb.extensionId) { - return `built-in extension ${kb.extensionId}`; + resize(index, delta, sizes = this.viewItems.map(i => i.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) { + if (index < 0 || index >= this.viewItems.length) { + return 0; } - return `built-in`; - } - if (kb.extensionId) { - return `user extension ${kb.extensionId}`; - } - return `user`; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js": -/*!*********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js ***! - \*********************************************************************************************/ -/*! exports provided: KeybindingsRegistry, Extensions */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeybindingsRegistry", function() { return KeybindingsRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); -/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -class KeybindingsRegistryImpl { - constructor() { - this._coreKeybindings = []; - this._extensionKeybindings = []; - this._cachedMergedKeybindings = null; - } - /** - * Take current platform into account and reduce to primary & secondary. - */ - static bindToCurrentPlatform(kb) { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["OS"] === 1 /* Windows */) { - if (kb && kb.win) { - return kb.win; + const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); + const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); + if (highPriorityIndexes) { + for (const index of highPriorityIndexes) { + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(upIndexes, index); + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(downIndexes, index); } } - else if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["OS"] === 2 /* Macintosh */) { - if (kb && kb.mac) { - return kb.mac; + if (lowPriorityIndexes) { + for (const index of lowPriorityIndexes) { + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(upIndexes, index); + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(downIndexes, index); } } - else { - if (kb && kb.linux) { - return kb.linux; - } + const upItems = upIndexes.map(i => this.viewItems[i]); + const upSizes = upIndexes.map(i => sizes[i]); + const downItems = downIndexes.map(i => this.viewItems[i]); + const downSizes = downIndexes.map(i => sizes[i]); + const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0); + const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0); + const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0); + const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0); + const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta); + const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta); + let snapped = false; + if (snapBefore) { + const snapView = this.viewItems[snapBefore.index]; + const visible = delta >= snapBefore.limitDelta; + snapped = visible !== snapView.visible; + snapView.setVisible(visible, snapBefore.size); } - return kb; - } - registerKeybindingRule(rule) { - const actualKb = KeybindingsRegistryImpl.bindToCurrentPlatform(rule); - if (actualKb && actualKb.primary) { - const kk = Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__["createKeybinding"])(actualKb.primary, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["OS"]); - if (kk) { - this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, 0, rule.when); - } + if (!snapped && snapAfter) { + const snapView = this.viewItems[snapAfter.index]; + const visible = delta < snapAfter.limitDelta; + snapped = visible !== snapView.visible; + snapView.setVisible(visible, snapAfter.size); + } + if (snapped) { + return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta); + } + delta = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(delta, minDelta, maxDelta); + for (let i = 0, deltaUp = delta; i < upItems.length; i++) { + const item = upItems[i]; + const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(upSizes[i] + deltaUp, item.minimumSize, item.maximumSize); + const viewDelta = size - upSizes[i]; + deltaUp -= viewDelta; + item.size = size; } - if (actualKb && Array.isArray(actualKb.secondary)) { - for (let i = 0, len = actualKb.secondary.length; i < len; i++) { - const k = actualKb.secondary[i]; - const kk = Object(_base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__["createKeybinding"])(k, _base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["OS"]); - if (kk) { - this._registerDefaultKeybinding(kk, rule.id, rule.args, rule.weight, -i - 1, rule.when); - } - } + for (let i = 0, deltaDown = delta; i < downItems.length; i++) { + const item = downItems[i]; + const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(downSizes[i] - deltaDown, item.minimumSize, item.maximumSize); + const viewDelta = size - downSizes[i]; + deltaDown += viewDelta; + item.size = size; } + return delta; } - registerCommandAndKeybindingRule(desc) { - this.registerKeybindingRule(desc); - _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_2__["CommandsRegistry"].registerCommand(desc); - } - static _mightProduceChar(keyCode) { - if (keyCode >= 21 /* KEY_0 */ && keyCode <= 30 /* KEY_9 */) { - return true; + distributeEmptySpace(lowPriorityIndex) { + const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + let emptyDelta = this.size - contentSize; + const indexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(this.viewItems.length - 1, -1); + const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */); + const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */); + for (const index of highPriorityIndexes) { + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToStart"])(indexes, index); } - if (keyCode >= 31 /* KEY_A */ && keyCode <= 56 /* KEY_Z */) { - return true; + for (const index of lowPriorityIndexes) { + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(indexes, index); } - return (keyCode === 80 /* US_SEMICOLON */ - || keyCode === 81 /* US_EQUAL */ - || keyCode === 82 /* US_COMMA */ - || keyCode === 83 /* US_MINUS */ - || keyCode === 84 /* US_DOT */ - || keyCode === 85 /* US_SLASH */ - || keyCode === 86 /* US_BACKTICK */ - || keyCode === 110 /* ABNT_C1 */ - || keyCode === 111 /* ABNT_C2 */ - || keyCode === 87 /* US_OPEN_SQUARE_BRACKET */ - || keyCode === 88 /* US_BACKSLASH */ - || keyCode === 89 /* US_CLOSE_SQUARE_BRACKET */ - || keyCode === 90 /* US_QUOTE */ - || keyCode === 91 /* OEM_8 */ - || keyCode === 92 /* OEM_102 */); - } - _assertNoCtrlAlt(keybinding, commandId) { - if (keybinding.ctrlKey && keybinding.altKey && !keybinding.metaKey) { - if (KeybindingsRegistryImpl._mightProduceChar(keybinding.keyCode)) { - console.warn('Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ', keybinding, ' for ', commandId); - } + if (typeof lowPriorityIndex === 'number') { + Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["pushToEnd"])(indexes, lowPriorityIndex); } - } - _registerDefaultKeybinding(keybinding, commandId, commandArgs, weight1, weight2, when) { - if (_base_common_platform_js__WEBPACK_IMPORTED_MODULE_1__["OS"] === 1 /* Windows */) { - this._assertNoCtrlAlt(keybinding.parts[0], commandId); + for (let i = 0; emptyDelta !== 0 && i < indexes.length; i++) { + const item = this.viewItems[indexes[i]]; + const size = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_5__["clamp"])(item.size + emptyDelta, item.minimumSize, item.maximumSize); + const viewDelta = size - item.size; + emptyDelta -= viewDelta; + item.size = size; } - this._coreKeybindings.push({ - keybinding: keybinding, - command: commandId, - commandArgs: commandArgs, - when: when, - weight1: weight1, - weight2: weight2, - extensionId: null - }); - this._cachedMergedKeybindings = null; } - getDefaultKeybindings() { - if (!this._cachedMergedKeybindings) { - this._cachedMergedKeybindings = [].concat(this._coreKeybindings).concat(this._extensionKeybindings); - this._cachedMergedKeybindings.sort(sorter); + layoutViews() { + // Save new content size + this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0); + // Layout views + let offset = 0; + for (const viewItem of this.viewItems) { + viewItem.layout(offset, this.layoutContext); + offset += viewItem.size; } - return this._cachedMergedKeybindings.slice(0); - } -} -const KeybindingsRegistry = new KeybindingsRegistryImpl(); -// Define extension point ids -const Extensions = { - EditorModes: 'platform.keybindingsRegistry' -}; -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__["Registry"].add(Extensions.EditorModes, KeybindingsRegistry); -function sorter(a, b) { - if (a.weight1 !== b.weight1) { - return a.weight1 - b.weight1; - } - if (a.command < b.command) { - return -1; - } - if (a.command > b.command) { - return 1; + // Layout sashes + this.sashItems.forEach(item => item.sash.layout()); + this.updateSashEnablement(); } - return a.weight2 - b.weight2; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js": -/*!************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js ***! - \************************************************************************************************/ -/*! exports provided: ResolvedKeybindingItem, removeElementsAfterNulls */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedKeybindingItem", function() { return ResolvedKeybindingItem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeElementsAfterNulls", function() { return removeElementsAfterNulls; }); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -class ResolvedKeybindingItem { - constructor(resolvedKeybinding, command, commandArgs, when, isDefault, extensionId) { - this.resolvedKeybinding = resolvedKeybinding; - this.keypressParts = resolvedKeybinding ? removeElementsAfterNulls(resolvedKeybinding.getDispatchParts()) : []; - this.bubble = (command ? command.charCodeAt(0) === 94 /* Caret */ : false); - this.command = this.bubble ? command.substr(1) : command; - this.commandArgs = commandArgs; - this.when = when; - this.isDefault = isDefault; - this.extensionId = extensionId; - } -} -function removeElementsAfterNulls(arr) { - let result = []; - for (let i = 0, len = arr.length; i < len; i++) { - const element = arr[i]; - if (!element) { - // stop processing at first encountered null - return result; + updateSashEnablement() { + let previous = false; + const collapsesDown = this.viewItems.map(i => previous = (i.size - i.minimumSize > 0) || previous); + previous = false; + const expandsDown = this.viewItems.map(i => previous = (i.maximumSize - i.size > 0) || previous); + const reverseViews = [...this.viewItems].reverse(); + previous = false; + const collapsesUp = reverseViews.map(i => previous = (i.size - i.minimumSize > 0) || previous).reverse(); + previous = false; + const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse(); + let position = 0; + for (let index = 0; index < this.sashItems.length; index++) { + const { sash } = this.sashItems[index]; + const viewItem = this.viewItems[index]; + position += viewItem.size; + const min = !(collapsesDown[index] && expandsUp[index + 1]); + const max = !(expandsDown[index] && collapsesUp[index + 1]); + if (min && max) { + const upIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index, -1); + const downIndexes = Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_6__["range"])(index + 1, this.viewItems.length); + const snapBeforeIndex = this.findFirstSnapIndex(upIndexes); + const snapAfterIndex = this.findFirstSnapIndex(downIndexes); + const snappedBefore = typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible; + const snappedAfter = typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible; + if (snappedBefore && collapsesUp[index] && (position > 0 || this.startSnappingEnabled)) { + sash.state = 1 /* Minimum */; + } + else if (snappedAfter && collapsesDown[index] && (position < this.contentSize || this.endSnappingEnabled)) { + sash.state = 2 /* Maximum */; + } + else { + sash.state = 0 /* Disabled */; + } + } + else if (min && !max) { + sash.state = 1 /* Minimum */; + } + else if (!min && max) { + sash.state = 2 /* Maximum */; + } + else { + sash.state = 3 /* Enabled */; + } } - result.push(element); } - return result; -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js": -/*!****************************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js ***! - \****************************************************************************************************/ -/*! exports provided: USLayoutResolvedKeybinding */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USLayoutResolvedKeybinding", function() { return USLayoutResolvedKeybinding; }); -/* harmony import */ var _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/keyCodes.js */ "./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"); -/* harmony import */ var _baseResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./baseResolvedKeybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -/** - * Do not instantiate. Use KeybindingService to get a ResolvedKeybinding seeded with information about the current kb layout. - */ -class USLayoutResolvedKeybinding extends _baseResolvedKeybinding_js__WEBPACK_IMPORTED_MODULE_1__["BaseResolvedKeybinding"] { - constructor(actual, os) { - super(os, actual.parts); - } - _keyCodeToUILabel(keyCode) { - if (this._os === 2 /* Macintosh */) { - switch (keyCode) { - case 15 /* LeftArrow */: - return '←'; - case 16 /* UpArrow */: - return '↑'; - case 17 /* RightArrow */: - return '→'; - case 18 /* DownArrow */: - return '↓'; + getSashPosition(sash) { + let position = 0; + for (let i = 0; i < this.sashItems.length; i++) { + position += this.viewItems[i].size; + if (this.sashItems[i].sash === sash) { + return position; } } - return _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__["KeyCodeUtils"].toString(keyCode); + return 0; } - _getLabel(keybinding) { - if (keybinding.isDuplicateModifierCase()) { - return ''; + findFirstSnapIndex(indexes) { + // visible views first + for (const index of indexes) { + const viewItem = this.viewItems[index]; + if (!viewItem.visible) { + continue; + } + if (viewItem.snap) { + return index; + } } - return this._keyCodeToUILabel(keybinding.keyCode); - } - _getAriaLabel(keybinding) { - if (keybinding.isDuplicateModifierCase()) { - return ''; + // then, hidden views + for (const index of indexes) { + const viewItem = this.viewItems[index]; + if (viewItem.visible && viewItem.maximumSize - viewItem.minimumSize > 0) { + return undefined; + } + if (!viewItem.visible && viewItem.snap) { + return index; + } } - return _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__["KeyCodeUtils"].toString(keybinding.keyCode); - } - _getDispatchPart(keybinding) { - return USLayoutResolvedKeybinding.getDispatchStr(keybinding); + return undefined; } - static getDispatchStr(keybinding) { - if (keybinding.isModifierKey()) { - return null; - } - let result = ''; - if (keybinding.ctrlKey) { - result += 'ctrl+'; - } - if (keybinding.shiftKey) { - result += 'shift+'; - } - if (keybinding.altKey) { - result += 'alt+'; - } - if (keybinding.metaKey) { - result += 'meta+'; - } - result += _base_common_keyCodes_js__WEBPACK_IMPORTED_MODULE_0__["KeyCodeUtils"].toString(keybinding.keyCode); - return result; + dispose() { + super.dispose(); + this.viewItems.forEach(i => i.dispose()); + this.viewItems = []; + this.sashItems.forEach(i => i.disposable.dispose()); + this.sashItems = []; } } /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/label/common/label.js": -/*!**************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/label/common/label.js ***! - \**************************************************************************/ -/*! exports provided: ILabelService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ILabelService", function() { return ILabelService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ILabelService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('labelService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js ***! - \************************************************************************************/ -/*! exports provided: ILayoutService */ +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js": +/*!********************************************************************************!*\ + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js ***! + \********************************************************************************/ +/*! exports provided: ComposedTreeDelegate, RenderIndentGuides, AbstractTree */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ILayoutService", function() { return ILayoutService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ILayoutService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('layoutService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js ***! - \********************************************************************************/ -/*! exports provided: IListService, ListService, WorkbenchListSupportsMultiSelectContextKey, WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus, WorkbenchListDoubleSelection, WorkbenchListMultiSelection, WorkbenchListSupportsKeyboardNavigation, WorkbenchListAutomaticKeyboardNavigationKey, WorkbenchListAutomaticKeyboardNavigation, didBindWorkbenchListAutomaticKeyboardNavigation, multiSelectModifierSettingKey, openModeSettingKey, horizontalScrollingKey, keyboardNavigationSettingKey, automaticKeyboardNavigationSettingKey, WorkbenchList, WorkbenchPagedList, WorkbenchObjectTree, WorkbenchCompressibleObjectTree, WorkbenchDataTree, WorkbenchAsyncDataTree, WorkbenchCompressibleAsyncDataTree */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IListService", function() { return IListService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListService", function() { return ListService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListSupportsMultiSelectContextKey", function() { return WorkbenchListSupportsMultiSelectContextKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListFocusContextKey", function() { return WorkbenchListFocusContextKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListHasSelectionOrFocus", function() { return WorkbenchListHasSelectionOrFocus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListDoubleSelection", function() { return WorkbenchListDoubleSelection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListMultiSelection", function() { return WorkbenchListMultiSelection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListSupportsKeyboardNavigation", function() { return WorkbenchListSupportsKeyboardNavigation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListAutomaticKeyboardNavigationKey", function() { return WorkbenchListAutomaticKeyboardNavigationKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchListAutomaticKeyboardNavigation", function() { return WorkbenchListAutomaticKeyboardNavigation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "didBindWorkbenchListAutomaticKeyboardNavigation", function() { return didBindWorkbenchListAutomaticKeyboardNavigation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiSelectModifierSettingKey", function() { return multiSelectModifierSettingKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openModeSettingKey", function() { return openModeSettingKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "horizontalScrollingKey", function() { return horizontalScrollingKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyboardNavigationSettingKey", function() { return keyboardNavigationSettingKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "automaticKeyboardNavigationSettingKey", function() { return automaticKeyboardNavigationSettingKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchList", function() { return WorkbenchList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchPagedList", function() { return WorkbenchPagedList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchObjectTree", function() { return WorkbenchObjectTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchCompressibleObjectTree", function() { return WorkbenchCompressibleObjectTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchDataTree", function() { return WorkbenchDataTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchAsyncDataTree", function() { return WorkbenchAsyncDataTree; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkbenchCompressibleAsyncDataTree", function() { return WorkbenchCompressibleAsyncDataTree; }); -/* harmony import */ var _base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/browser/dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); -/* harmony import */ var _base_browser_ui_list_listPaging_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/browser/ui/list/listPaging.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js"); -/* harmony import */ var _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/browser/ui/list/listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../configuration/common/configurationRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../theme/common/styler.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js"); -/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../contextkey/common/contextkeys.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js"); -/* harmony import */ var _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../base/browser/ui/tree/objectTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js"); -/* harmony import */ var _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../base/browser/ui/tree/asyncDataTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js"); -/* harmony import */ var _base_browser_ui_tree_dataTree_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../base/browser/ui/tree/dataTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js"); -/* harmony import */ var _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComposedTreeDelegate", function() { return ComposedTreeDelegate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenderIndentGuides", function() { return RenderIndentGuides; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractTree", function() { return AbstractTree; }); +/* harmony import */ var _media_tree_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./media/tree.css */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../list/listWidget.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../keyboardEvent.js */ "./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js"); +/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); +/* harmony import */ var _dnd_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../dnd.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dnd.js"); +/* harmony import */ var _common_arrays_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); +/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../list/listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); +/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../event.js */ "./node_modules/monaco-editor/esm/vs/base/browser/event.js"); +/* harmony import */ var _common_filters_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); +/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./indexTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"); +/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _common_platform_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../common/platform.js */ "./node_modules/monaco-editor/esm/vs/base/common/platform.js"); +/* harmony import */ var _common_numbers_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../common/numbers.js */ "./node_modules/monaco-editor/esm/vs/base/common/numbers.js"); +/* harmony import */ var _common_collections_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../common/collections.js */ "./node_modules/monaco-editor/esm/vs/base/common/collections.js"); +/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./treeIcons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; @@ -235972,3338 +81656,1135 @@ var __param = (undefined && undefined.__param) || function (paramIndex, decorato -const IListService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_9__["createDecorator"])('listService'); -let ListService = class ListService { - constructor(_themeService) { - this._themeService = _themeService; - this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this.lists = []; - this._lastFocusedWidget = undefined; - this._hasCreatedStyleController = false; - } - get lastFocusedList() { - return this._lastFocusedWidget; - } - register(widget, extraContextKeys) { - if (!this._hasCreatedStyleController) { - this._hasCreatedStyleController = true; - // create a shared default tree style sheet for performance reasons - const styleController = new _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["DefaultStyleController"](Object(_base_browser_dom_js__WEBPACK_IMPORTED_MODULE_0__["createStyleSheet"])(), ''); - this.disposables.add(Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["attachListStyler"])(styleController, this._themeService)); - } - if (this.lists.some(l => l.widget === widget)) { - throw new Error('Cannot register the same widget multiple times'); - } - // Keep in our lists list - const registeredList = { widget, extraContextKeys }; - this.lists.push(registeredList); - // Check for currently being focused - if (widget.getHTMLElement() === document.activeElement) { - this._lastFocusedWidget = widget; - } - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["combinedDisposable"])(widget.onDidFocus(() => this._lastFocusedWidget = widget), Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["toDisposable"])(() => this.lists.splice(this.lists.indexOf(registeredList), 1)), widget.onDidDispose(() => { - this.lists = this.lists.filter(l => l !== registeredList); - if (this._lastFocusedWidget === widget) { - this._lastFocusedWidget = undefined; - } - })); - } - dispose() { - this.disposables.dispose(); +class TreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_9__["ElementsDragAndDropData"] { + constructor(data) { + super(data.elements.map(node => node.element)); + this.data = data; } -}; -ListService = __decorate([ - __param(0, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]) -], ListService); - -const RawWorkbenchListFocusContextKey = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listFocus', true); -const WorkbenchListSupportsMultiSelectContextKey = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listSupportsMultiselect', true); -const WorkbenchListFocusContextKey = _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["ContextKeyExpr"].and(RawWorkbenchListFocusContextKey, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["ContextKeyExpr"].not(_contextkey_common_contextkeys_js__WEBPACK_IMPORTED_MODULE_14__["InputFocusedContextKey"])); -const WorkbenchListHasSelectionOrFocus = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listHasSelectionOrFocus', false); -const WorkbenchListDoubleSelection = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listDoubleSelection', false); -const WorkbenchListMultiSelection = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listMultiSelection', false); -const WorkbenchListSupportsKeyboardNavigation = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"]('listSupportsKeyboardNavigation', true); -const WorkbenchListAutomaticKeyboardNavigationKey = 'listAutomaticKeyboardNavigation'; -const WorkbenchListAutomaticKeyboardNavigation = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["RawContextKey"](WorkbenchListAutomaticKeyboardNavigationKey, true); -let didBindWorkbenchListAutomaticKeyboardNavigation = false; -function createScopedContextKeyService(contextKeyService, widget) { - const result = contextKeyService.createScoped(widget.getHTMLElement()); - RawWorkbenchListFocusContextKey.bindTo(result); - return result; } -const multiSelectModifierSettingKey = 'workbench.list.multiSelectModifier'; -const openModeSettingKey = 'workbench.list.openMode'; -const horizontalScrollingKey = 'workbench.list.horizontalScrolling'; -const keyboardNavigationSettingKey = 'workbench.list.keyboardNavigation'; -const automaticKeyboardNavigationSettingKey = 'workbench.list.automaticKeyboardNavigation'; -const treeIndentKey = 'workbench.tree.indent'; -const treeRenderIndentGuidesKey = 'workbench.tree.renderIndentGuides'; -const listSmoothScrolling = 'workbench.list.smoothScrolling'; -function useAltAsMultipleSelectionModifier(configurationService) { - return configurationService.getValue(multiSelectModifierSettingKey) === 'alt'; -} -class MultipleSelectionController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(configurationService) { - super(); - this.configurationService = configurationService; - this.useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - this.registerListeners(); - } - registerListeners() { - this._register(this.configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(multiSelectModifierSettingKey)) { - this.useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(this.configurationService); - } - })); - } - isSelectionSingleChangeEvent(event) { - if (this.useAltAsMultipleSelectionModifier) { - return event.browserEvent.altKey; - } - return Object(_base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isSelectionSingleChangeEvent"])(event); - } - isSelectionRangeChangeEvent(event) { - return Object(_base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isSelectionRangeChangeEvent"])(event); +function asTreeDragAndDropData(data) { + if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_9__["ElementsDragAndDropData"]) { + return new TreeElementsDragAndDropData(data); } + return data; } -function toWorkbenchListOptions(options, configurationService, keybindingService) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - const result = Object.assign({}, options); - if (options.multipleSelectionSupport !== false && !options.multipleSelectionController) { - const multipleSelectionController = new MultipleSelectionController(configurationService); - result.multipleSelectionController = multipleSelectionController; - disposables.add(multipleSelectionController); +class TreeNodeListDragAndDrop { + constructor(modelProvider, dnd) { + this.modelProvider = modelProvider; + this.dnd = dnd; + this.autoExpandDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; } - result.keyboardNavigationDelegate = { - mightProducePrintableCharacter(e) { - return keybindingService.mightProducePrintableCharacter(e); - } - }; - result.smoothScrolling = configurationService.getValue(listSmoothScrolling); - return [result, disposables]; -} -let WorkbenchList = class WorkbenchList extends _base_browser_ui_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["List"] { - constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService) { - const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey); - const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService); - super(user, container, delegate, renderers, Object.assign(Object.assign(Object.assign({ keyboardSupport: false }, Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["computeStyles"])(themeService.getColorTheme(), _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["defaultListStyles"])), workbenchListOptions), { horizontalScrolling })); - this.disposables.add(workbenchListOptionsDisposable); - this.contextKeyService = createScopedContextKeyService(contextKeyService, this); - this.themeService = themeService; - const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService); - listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false)); - this.listHasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService); - this.listDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService); - this.listMultiSelection = WorkbenchListMultiSelection.bindTo(this.contextKeyService); - this.horizontalScrolling = options.horizontalScrolling; - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - this.disposables.add(this.contextKeyService); - this.disposables.add(listService.register(this)); - if (options.overrideStyles) { - this.updateStyles(options.overrideStyles); - } - this.disposables.add(this.onDidChangeSelection(() => { - const selection = this.getSelection(); - const focus = this.getFocus(); - this.contextKeyService.bufferChangeEvents(() => { - this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0); - this.listMultiSelection.set(selection.length > 1); - this.listDoubleSelection.set(selection.length === 2); - }); - })); - this.disposables.add(this.onDidChangeFocus(() => { - const selection = this.getSelection(); - const focus = this.getFocus(); - this.listHasSelectionOrFocus.set(selection.length > 0 || focus.length > 0); - })); - this.disposables.add(configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(multiSelectModifierSettingKey)) { - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - } - let options = {}; - if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) { - const horizontalScrolling = configurationService.getValue(horizontalScrollingKey); - options = Object.assign(Object.assign({}, options), { horizontalScrolling }); - } - if (e.affectsConfiguration(listSmoothScrolling)) { - const smoothScrolling = configurationService.getValue(listSmoothScrolling); - options = Object.assign(Object.assign({}, options), { smoothScrolling }); - } - if (Object.keys(options).length > 0) { - this.updateOptions(options); - } - })); + getDragURI(node) { + return this.dnd.getDragURI(node.element); } - updateOptions(options) { - super.updateOptions(options); - if (options.overrideStyles) { - this.updateStyles(options.overrideStyles); + getDragLabel(nodes, originalEvent) { + if (this.dnd.getDragLabel) { + return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent); } + return undefined; } - dispose() { - super.dispose(); - if (this._styler) { - this._styler.dispose(); - } - } - updateStyles(styles) { - if (this._styler) { - this._styler.dispose(); - } - this._styler = Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["attachListStyler"])(this, this.themeService, styles); - } -}; -WorkbenchList = __decorate([ - __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(6, IListService), - __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]) -], WorkbenchList); - -let WorkbenchPagedList = class WorkbenchPagedList extends _base_browser_ui_list_listPaging_js__WEBPACK_IMPORTED_MODULE_1__["PagedList"] { - constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService) { - const horizontalScrolling = typeof options.horizontalScrolling !== 'undefined' ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey); - const [workbenchListOptions, workbenchListOptionsDisposable] = toWorkbenchListOptions(options, configurationService, keybindingService); - super(user, container, delegate, renderers, Object.assign(Object.assign(Object.assign({ keyboardSupport: false }, Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["computeStyles"])(themeService.getColorTheme(), _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["defaultListStyles"])), workbenchListOptions), { horizontalScrolling })); - this.disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - this.disposables.add(workbenchListOptionsDisposable); - this.contextKeyService = createScopedContextKeyService(contextKeyService, this); - this.horizontalScrolling = options.horizontalScrolling; - const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService); - listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false)); - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - this.disposables.add(this.contextKeyService); - this.disposables.add(listService.register(this)); - if (options.overrideStyles) { - this.disposables.add(Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["attachListStyler"])(this, themeService, options.overrideStyles)); - } - this.disposables.add(configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(multiSelectModifierSettingKey)) { - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - } - let options = {}; - if (e.affectsConfiguration(horizontalScrollingKey) && this.horizontalScrolling === undefined) { - const horizontalScrolling = configurationService.getValue(horizontalScrollingKey); - options = Object.assign(Object.assign({}, options), { horizontalScrolling }); - } - if (e.affectsConfiguration(listSmoothScrolling)) { - const smoothScrolling = configurationService.getValue(listSmoothScrolling); - options = Object.assign(Object.assign({}, options), { smoothScrolling }); - } - if (Object.keys(options).length > 0) { - this.updateOptions(options); - } - })); - } - dispose() { - super.dispose(); - this.disposables.dispose(); + onDragStart(data, originalEvent) { + if (this.dnd.onDragStart) { + this.dnd.onDragStart(asTreeDragAndDropData(data), originalEvent); + } } -}; -WorkbenchPagedList = __decorate([ - __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(6, IListService), - __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]) -], WorkbenchPagedList); - -class ResourceNavigator extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"] { - constructor(widget, options) { - var _a, _b; - super(); - this.widget = widget; - this._onDidOpen = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.onDidOpen = this._onDidOpen.event; - this.openOnFocus = (_a = options === null || options === void 0 ? void 0 : options.openOnFocus) !== null && _a !== void 0 ? _a : false; - this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].filter(this.widget.onDidChangeSelection, e => e.browserEvent instanceof KeyboardEvent)(e => this.onSelectionFromKeyboard(e))); - this._register(this.widget.onPointer((e) => this.onPointer(e.browserEvent))); - this._register(this.widget.onMouseDblClick((e) => this.onMouseDblClick(e.browserEvent))); - if (this.openOnFocus) { - this._register(_base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].filter(this.widget.onDidChangeFocus, e => e.browserEvent instanceof KeyboardEvent)(e => this.onFocusFromKeyboard(e))); - } - if (typeof (options === null || options === void 0 ? void 0 : options.openOnSingleClick) !== 'boolean' && (options === null || options === void 0 ? void 0 : options.configurationService)) { - this.openOnSingleClick = (options === null || options === void 0 ? void 0 : options.configurationService.getValue(openModeSettingKey)) !== 'doubleClick'; - this._register(options === null || options === void 0 ? void 0 : options.configurationService.onDidChangeConfiguration(() => { - this.openOnSingleClick = (options === null || options === void 0 ? void 0 : options.configurationService.getValue(openModeSettingKey)) !== 'doubleClick'; - })); + onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) { + const result = this.dnd.onDragOver(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); + const didChangeAutoExpandNode = this.autoExpandNode !== targetNode; + if (didChangeAutoExpandNode) { + this.autoExpandDisposable.dispose(); + this.autoExpandNode = targetNode; } - else { - this.openOnSingleClick = (_b = options === null || options === void 0 ? void 0 : options.openOnSingleClick) !== null && _b !== void 0 ? _b : true; + if (typeof targetNode === 'undefined') { + return result; } - } - onFocusFromKeyboard(event) { - const focus = this.widget.getFocus(); - this.widget.setSelection(focus, event.browserEvent); - const preserveFocus = typeof event.browserEvent.preserveFocus === 'boolean' ? event.browserEvent.preserveFocus : true; - const pinned = false; - const sideBySide = false; - this._open(preserveFocus, pinned, sideBySide, event.browserEvent); - } - onSelectionFromKeyboard(event) { - if (event.elements.length !== 1) { - return; + if (didChangeAutoExpandNode && typeof result !== 'boolean' && result.autoExpand) { + this.autoExpandDisposable = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_14__["disposableTimeout"])(() => { + const model = this.modelProvider(); + const ref = model.getNodeLocation(targetNode); + if (model.isCollapsed(ref)) { + model.setCollapsed(ref, false); + } + this.autoExpandNode = undefined; + }, 500); } - const preserveFocus = typeof event.browserEvent.preserveFocus === 'boolean' ? event.browserEvent.preserveFocus : true; - const pinned = false; - const sideBySide = false; - this._open(preserveFocus, pinned, sideBySide, event.browserEvent); - } - onPointer(browserEvent) { - if (!this.openOnSingleClick) { - return; + if (typeof result === 'boolean' || !result.accept || typeof result.bubble === 'undefined' || result.feedback) { + if (!raw) { + const accept = typeof result === 'boolean' ? result : result.accept; + const effect = typeof result === 'boolean' ? undefined : result.effect; + return { accept, effect, feedback: [targetIndex] }; + } + return result; } - const isDoubleClick = browserEvent.detail === 2; - if (isDoubleClick) { - return; + if (result.bubble === 1 /* Up */) { + const model = this.modelProvider(); + const ref = model.getNodeLocation(targetNode); + const parentRef = model.getParentNodeLocation(ref); + const parentNode = model.getNode(parentRef); + const parentIndex = parentRef && model.getListIndex(parentRef); + return this.onDragOver(data, parentNode, parentIndex, originalEvent, false); } - const isMiddleClick = browserEvent.button === 1; - const preserveFocus = true; - const pinned = isMiddleClick; - const sideBySide = browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey; - this._open(preserveFocus, pinned, sideBySide, browserEvent); + const model = this.modelProvider(); + const ref = model.getNodeLocation(targetNode); + const start = model.getListIndex(ref); + const length = model.getListRenderCount(ref); + return Object.assign(Object.assign({}, result), { feedback: Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["range"])(start, start + length) }); } - onMouseDblClick(browserEvent) { - if (!browserEvent) { - return; - } - const preserveFocus = false; - const pinned = true; - const sideBySide = (browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey); - this._open(preserveFocus, pinned, sideBySide, browserEvent); - } - _open(preserveFocus, pinned, sideBySide, browserEvent) { - this._onDidOpen.fire({ - editorOptions: { - preserveFocus, - pinned, - revealIfVisible: true - }, - sideBySide, - element: this.widget.getSelection()[0], - browserEvent - }); + drop(data, targetNode, targetIndex, originalEvent) { + this.autoExpandDisposable.dispose(); + this.autoExpandNode = undefined; + this.dnd.drop(asTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); } -} -class TreeResourceNavigator extends ResourceNavigator { - constructor(tree, options) { - super(tree, options); + onDragEnd(originalEvent) { + if (this.dnd.onDragEnd) { + this.dnd.onDragEnd(originalEvent); + } } } -function createKeyboardNavigationEventFilter(container, keybindingService) { - let inChord = false; - return event => { - if (inChord) { - inChord = false; - return false; - } - const result = keybindingService.softDispatch(event, container); - if (result && result.enterChord) { - inChord = true; - return false; - } - inChord = false; - return true; - }; +function asListOptions(modelProvider, options) { + return options && Object.assign(Object.assign({}, options), { identityProvider: options.identityProvider && { + getId(el) { + return options.identityProvider.getId(el.element); + } + }, dnd: options.dnd && new TreeNodeListDragAndDrop(modelProvider, options.dnd), multipleSelectionController: options.multipleSelectionController && { + isSelectionSingleChangeEvent(e) { + return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); + }, + isSelectionRangeChangeEvent(e) { + return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); + } + }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getSetSize(node) { + const model = modelProvider(); + const ref = model.getNodeLocation(node); + const parentRef = model.getParentNodeLocation(ref); + const parentNode = model.getNode(parentRef); + return parentNode.visibleChildrenCount; + }, + getPosInSet(node) { + return node.visibleChildIndex + 1; + }, isChecked: options.accessibilityProvider && options.accessibilityProvider.isChecked ? (node) => { + return options.accessibilityProvider.isChecked(node.element); + } : undefined, getRole: options.accessibilityProvider && options.accessibilityProvider.getRole ? (node) => { + return options.accessibilityProvider.getRole(node.element); + } : () => 'treeitem', getAriaLabel(e) { + return options.accessibilityProvider.getAriaLabel(e.element); + }, + getWidgetAriaLabel() { + return options.accessibilityProvider.getWidgetAriaLabel(); + }, getWidgetRole: options.accessibilityProvider && options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel(node) { + return node.depth; + }, getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => { + return options.accessibilityProvider.getActiveDescendantId(node.element); + }) }), keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(node) { + return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(node.element); + } }), enableKeyboardNavigation: options.simpleKeyboardNavigation }); } -let WorkbenchObjectTree = class WorkbenchObjectTree extends _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__["ObjectTree"] { - constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) { - const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService); - super(user, container, delegate, renderers, treeOptions); - this.disposables.add(disposable); - this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); - this.disposables.add(this.internals); - } -}; -WorkbenchObjectTree = __decorate([ - __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(6, IListService), - __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(10, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchObjectTree); - -let WorkbenchCompressibleObjectTree = class WorkbenchCompressibleObjectTree extends _base_browser_ui_tree_objectTree_js__WEBPACK_IMPORTED_MODULE_15__["CompressibleObjectTree"] { - constructor(user, container, delegate, renderers, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) { - const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService); - super(user, container, delegate, renderers, treeOptions); - this.disposables.add(disposable); - this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); - this.disposables.add(this.internals); +class ComposedTreeDelegate { + constructor(delegate) { + this.delegate = delegate; } - updateOptions(options = {}) { - super.updateOptions(options); - if (options.overrideStyles) { - this.internals.updateStyleOverrides(options.overrideStyles); - } + getHeight(element) { + return this.delegate.getHeight(element.element); } -}; -WorkbenchCompressibleObjectTree = __decorate([ - __param(5, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(6, IListService), - __param(7, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(8, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(9, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(10, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchCompressibleObjectTree); - -let WorkbenchDataTree = class WorkbenchDataTree extends _base_browser_ui_tree_dataTree_js__WEBPACK_IMPORTED_MODULE_17__["DataTree"] { - constructor(user, container, delegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) { - const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService); - super(user, container, delegate, renderers, dataSource, treeOptions); - this.disposables.add(disposable); - this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); - this.disposables.add(this.internals); + getTemplateId(element) { + return this.delegate.getTemplateId(element.element); + } + hasDynamicHeight(element) { + return !!this.delegate.hasDynamicHeight && this.delegate.hasDynamicHeight(element.element); + } + setDynamicHeight(element, height) { + if (this.delegate.setDynamicHeight) { + this.delegate.setDynamicHeight(element.element, height); + } } - updateOptions(options = {}) { - super.updateOptions(options); - if (options.overrideStyles) { - this.internals.updateStyleOverrides(options.overrideStyles); - } - } -}; -WorkbenchDataTree = __decorate([ - __param(6, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(7, IListService), - __param(8, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(9, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(10, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(11, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchDataTree); - -let WorkbenchAsyncDataTree = class WorkbenchAsyncDataTree extends _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__["AsyncDataTree"] { - constructor(user, container, delegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) { - const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService); - super(user, container, delegate, renderers, dataSource, treeOptions); - this.disposables.add(disposable); - this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); - this.disposables.add(this.internals); - } - get onDidOpen() { return this.internals.onDidOpen; } - updateOptions(options = {}) { - super.updateOptions(options); - if (options.overrideStyles) { - this.internals.updateStyleOverrides(options.overrideStyles); - } - } -}; -WorkbenchAsyncDataTree = __decorate([ - __param(6, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(7, IListService), - __param(8, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(9, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(10, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(11, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchAsyncDataTree); - -let WorkbenchCompressibleAsyncDataTree = class WorkbenchCompressibleAsyncDataTree extends _base_browser_ui_tree_asyncDataTree_js__WEBPACK_IMPORTED_MODULE_16__["CompressibleAsyncDataTree"] { - constructor(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, options, contextKeyService, listService, themeService, configurationService, keybindingService, accessibilityService) { - const { options: treeOptions, getAutomaticKeyboardNavigation, disposable } = workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService); - super(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, treeOptions); - this.disposables.add(disposable); - this.internals = new WorkbenchTreeInternals(this, options, getAutomaticKeyboardNavigation, options.overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService); - this.disposables.add(this.internals); - } -}; -WorkbenchCompressibleAsyncDataTree = __decorate([ - __param(7, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(8, IListService), - __param(9, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(10, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(11, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_10__["IKeybindingService"]), - __param(12, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchCompressibleAsyncDataTree); - -function workbenchTreeDataPreamble(container, options, contextKeyService, configurationService, keybindingService, accessibilityService) { - WorkbenchListSupportsKeyboardNavigation.bindTo(contextKeyService); - if (!didBindWorkbenchListAutomaticKeyboardNavigation) { - WorkbenchListAutomaticKeyboardNavigation.bindTo(contextKeyService); - didBindWorkbenchListAutomaticKeyboardNavigation = true; - } - const getAutomaticKeyboardNavigation = () => { - // give priority to the context key value to disable this completely - let automaticKeyboardNavigation = contextKeyService.getContextKeyValue(WorkbenchListAutomaticKeyboardNavigationKey); - if (automaticKeyboardNavigation) { - automaticKeyboardNavigation = configurationService.getValue(automaticKeyboardNavigationSettingKey); - } - return automaticKeyboardNavigation; - }; - const accessibilityOn = accessibilityService.isScreenReaderOptimized(); - const keyboardNavigation = accessibilityOn ? 'simple' : configurationService.getValue(keyboardNavigationSettingKey); - const horizontalScrolling = options.horizontalScrolling !== undefined ? options.horizontalScrolling : configurationService.getValue(horizontalScrollingKey); - const [workbenchListOptions, disposable] = toWorkbenchListOptions(options, configurationService, keybindingService); - const additionalScrollHeight = options.additionalScrollHeight; - return { - getAutomaticKeyboardNavigation, - disposable, - options: Object.assign(Object.assign({ - // ...options, // TODO@Joao why is this not splatted here? - keyboardSupport: false }, workbenchListOptions), { indent: configurationService.getValue(treeIndentKey), renderIndentGuides: configurationService.getValue(treeRenderIndentGuidesKey), smoothScrolling: configurationService.getValue(listSmoothScrolling), automaticKeyboardNavigation: getAutomaticKeyboardNavigation(), simpleKeyboardNavigation: keyboardNavigation === 'simple', filterOnType: keyboardNavigation === 'filter', horizontalScrolling, keyboardNavigationEventFilter: createKeyboardNavigationEventFilter(container, keybindingService), additionalScrollHeight, hideTwistiesOfChildlessElements: options.hideTwistiesOfChildlessElements, expandOnlyOnDoubleClick: configurationService.getValue(openModeSettingKey) === 'doubleClick' }) - }; } -let WorkbenchTreeInternals = class WorkbenchTreeInternals { - constructor(tree, options, getAutomaticKeyboardNavigation, overrideStyles, contextKeyService, listService, themeService, configurationService, accessibilityService) { - this.tree = tree; - this.themeService = themeService; - this.disposables = []; - this.contextKeyService = createScopedContextKeyService(contextKeyService, tree); - const listSupportsMultiSelect = WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService); - listSupportsMultiSelect.set(!(options.multipleSelectionSupport === false)); - this.hasSelectionOrFocus = WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService); - this.hasDoubleSelection = WorkbenchListDoubleSelection.bindTo(this.contextKeyService); - this.hasMultiSelection = WorkbenchListMultiSelection.bindTo(this.contextKeyService); - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - const interestingContextKeys = new Set(); - interestingContextKeys.add(WorkbenchListAutomaticKeyboardNavigationKey); - const updateKeyboardNavigation = () => { - const accessibilityOn = accessibilityService.isScreenReaderOptimized(); - const keyboardNavigation = accessibilityOn ? 'simple' : configurationService.getValue(keyboardNavigationSettingKey); - tree.updateOptions({ - simpleKeyboardNavigation: keyboardNavigation === 'simple', - filterOnType: keyboardNavigation === 'filter' - }); - }; - this.updateStyleOverrides(overrideStyles); - this.disposables.push(this.contextKeyService, listService.register(tree), tree.onDidChangeSelection(() => { - const selection = tree.getSelection(); - const focus = tree.getFocus(); - this.contextKeyService.bufferChangeEvents(() => { - this.hasSelectionOrFocus.set(selection.length > 0 || focus.length > 0); - this.hasMultiSelection.set(selection.length > 1); - this.hasDoubleSelection.set(selection.length === 2); - }); - }), tree.onDidChangeFocus(() => { - const selection = tree.getSelection(); - const focus = tree.getFocus(); - this.hasSelectionOrFocus.set(selection.length > 0 || focus.length > 0); - }), configurationService.onDidChangeConfiguration(e => { - let newOptions = {}; - if (e.affectsConfiguration(multiSelectModifierSettingKey)) { - this._useAltAsMultipleSelectionModifier = useAltAsMultipleSelectionModifier(configurationService); - } - if (e.affectsConfiguration(treeIndentKey)) { - const indent = configurationService.getValue(treeIndentKey); - newOptions = Object.assign(Object.assign({}, newOptions), { indent }); - } - if (e.affectsConfiguration(treeRenderIndentGuidesKey)) { - const renderIndentGuides = configurationService.getValue(treeRenderIndentGuidesKey); - newOptions = Object.assign(Object.assign({}, newOptions), { renderIndentGuides }); - } - if (e.affectsConfiguration(listSmoothScrolling)) { - const smoothScrolling = configurationService.getValue(listSmoothScrolling); - newOptions = Object.assign(Object.assign({}, newOptions), { smoothScrolling }); - } - if (e.affectsConfiguration(keyboardNavigationSettingKey)) { - updateKeyboardNavigation(); - } - if (e.affectsConfiguration(automaticKeyboardNavigationSettingKey)) { - newOptions = Object.assign(Object.assign({}, newOptions), { automaticKeyboardNavigation: getAutomaticKeyboardNavigation() }); - } - if (e.affectsConfiguration(horizontalScrollingKey) && options.horizontalScrolling === undefined) { - const horizontalScrolling = configurationService.getValue(horizontalScrollingKey); - newOptions = Object.assign(Object.assign({}, newOptions), { horizontalScrolling }); - } - if (e.affectsConfiguration(openModeSettingKey)) { - newOptions = Object.assign(Object.assign({}, newOptions), { expandOnlyOnDoubleClick: configurationService.getValue(openModeSettingKey) === 'doubleClick' }); - } - if (Object.keys(newOptions).length > 0) { - tree.updateOptions(newOptions); - } - }), this.contextKeyService.onDidChangeContext(e => { - if (e.affectsSome(interestingContextKeys)) { - tree.updateOptions({ automaticKeyboardNavigation: getAutomaticKeyboardNavigation() }); - } - }), accessibilityService.onDidChangeScreenReaderOptimized(() => updateKeyboardNavigation())); - this.navigator = new TreeResourceNavigator(tree, Object.assign({ configurationService }, options)); - this.disposables.push(this.navigator); +var RenderIndentGuides; +(function (RenderIndentGuides) { + RenderIndentGuides["None"] = "none"; + RenderIndentGuides["OnHover"] = "onHover"; + RenderIndentGuides["Always"] = "always"; +})(RenderIndentGuides || (RenderIndentGuides = {})); +class EventCollection { + constructor(onDidChange, _elements = []) { + this._elements = _elements; + this.onDidChange = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].forEach(onDidChange, elements => this._elements = elements); } - get onDidOpen() { return this.navigator.onDidOpen; } - updateStyleOverrides(overrideStyles) { - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this.styler); - this.styler = overrideStyles ? Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_12__["attachListStyler"])(this.tree, this.themeService, overrideStyles) : _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["Disposable"].None; + get elements() { + return this._elements; } - dispose() { - this.disposables = Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this.disposables); - Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["dispose"])(this.styler); - this.styler = undefined; - } -}; -WorkbenchTreeInternals = __decorate([ - __param(4, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_8__["IContextKeyService"]), - __param(5, IListService), - __param(6, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_13__["IThemeService"]), - __param(7, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_6__["IConfigurationService"]), - __param(8, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_18__["IAccessibilityService"]) -], WorkbenchTreeInternals); -const configurationRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_11__["Registry"].as(_configuration_common_configurationRegistry_js__WEBPACK_IMPORTED_MODULE_7__["Extensions"].Configuration); -configurationRegistry.registerConfiguration({ - 'id': 'workbench', - 'order': 7, - 'title': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('workbenchConfigurationTitle', "Workbench"), - 'type': 'object', - 'properties': { - [multiSelectModifierSettingKey]: { - 'type': 'string', - 'enum': ['ctrlCmd', 'alt'], - 'enumDescriptions': [ - Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('multiSelectModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on macOS."), - Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('multiSelectModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on macOS.") - ], - 'default': 'ctrlCmd', - 'description': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])({ - key: 'multiSelectModifier', - comment: [ - '- `ctrlCmd` refers to a value the setting can take and should not be localized.', - '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.' - ] - }, "The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.") - }, - [openModeSettingKey]: { - 'type': 'string', - 'enum': ['singleClick', 'doubleClick'], - 'default': 'singleClick', - 'description': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])({ - key: 'openModeModifier', - comment: ['`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized.'] - }, "Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ") - }, - [horizontalScrollingKey]: { - 'type': 'boolean', - 'default': false, - 'description': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('horizontalScrolling setting', "Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.") - }, - [treeIndentKey]: { - 'type': 'number', - 'default': 8, - minimum: 0, - maximum: 40, - 'description': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('tree indent setting', "Controls tree indentation in pixels.") - }, - [treeRenderIndentGuidesKey]: { - type: 'string', - enum: ['none', 'onHover', 'always'], - default: 'onHover', - description: Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('render tree indent guides', "Controls whether the tree should render indent guides.") - }, - [listSmoothScrolling]: { - type: 'boolean', - default: false, - description: Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('list smoothScrolling setting', "Controls whether lists and trees have smooth scrolling."), - }, - [keyboardNavigationSettingKey]: { - 'type': 'string', - 'enum': ['simple', 'highlight', 'filter'], - 'enumDescriptions': [ - Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('keyboardNavigationSettingKey.simple', "Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."), - Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('keyboardNavigationSettingKey.highlight', "Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."), - Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('keyboardNavigationSettingKey.filter', "Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.") - ], - 'default': 'highlight', - 'description': Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('keyboardNavigationSettingKey', "Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.") - }, - [automaticKeyboardNavigationSettingKey]: { - 'type': 'boolean', - 'default': true, - markdownDescription: Object(_nls_js__WEBPACK_IMPORTED_MODULE_5__["localize"])('automatic keyboard navigation setting', "Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.") +} +class TreeRenderer { + constructor(renderer, modelProvider, onDidChangeCollapseState, activeNodes, options = {}) { + this.renderer = renderer; + this.modelProvider = modelProvider; + this.activeNodes = activeNodes; + this.renderedElements = new Map(); + this.renderedNodes = new Map(); + this.indent = TreeRenderer.DefaultIndent; + this.hideTwistiesOfChildlessElements = false; + this.shouldRenderIndentGuides = false; + this.renderedIndentGuides = new _common_collections_js__WEBPACK_IMPORTED_MODULE_17__["SetMap"](); + this.activeIndentNodes = new Set(); + this.indentGuidesDisposable = _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.templateId = renderer.templateId; + this.updateOptions(options); + _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(onDidChangeCollapseState, e => e.node)(this.onDidChangeNodeTwistieState, this, this.disposables); + if (renderer.onDidChangeTwistieState) { + renderer.onDidChangeTwistieState(this.onDidChangeTwistieState, this, this.disposables); } } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/log/common/log.js": -/*!**********************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js ***! - \**********************************************************************/ -/*! exports provided: ILogService, LogLevel, DEFAULT_LOG_LEVEL, AbstractLogService, ConsoleLogService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ILogService", function() { return ILogService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogLevel", function() { return LogLevel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_LOG_LEVEL", function() { return DEFAULT_LOG_LEVEL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractLogService", function() { return AbstractLogService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsoleLogService", function() { return ConsoleLogService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const ILogService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('logService'); -var LogLevel; -(function (LogLevel) { - LogLevel[LogLevel["Trace"] = 0] = "Trace"; - LogLevel[LogLevel["Debug"] = 1] = "Debug"; - LogLevel[LogLevel["Info"] = 2] = "Info"; - LogLevel[LogLevel["Warning"] = 3] = "Warning"; - LogLevel[LogLevel["Error"] = 4] = "Error"; - LogLevel[LogLevel["Critical"] = 5] = "Critical"; - LogLevel[LogLevel["Off"] = 6] = "Off"; -})(LogLevel || (LogLevel = {})); -const DEFAULT_LOG_LEVEL = LogLevel.Info; -class AbstractLogService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(...arguments); - this.level = DEFAULT_LOG_LEVEL; - this._onDidChangeLogLevel = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"]()); - } - setLevel(level) { - if (this.level !== level) { - this.level = level; - this._onDidChangeLogLevel.fire(this.level); + updateOptions(options = {}) { + if (typeof options.indent !== 'undefined') { + this.indent = Object(_common_numbers_js__WEBPACK_IMPORTED_MODULE_16__["clamp"])(options.indent, 0, 40); + } + if (typeof options.renderIndentGuides !== 'undefined') { + const shouldRenderIndentGuides = options.renderIndentGuides !== RenderIndentGuides.None; + if (shouldRenderIndentGuides !== this.shouldRenderIndentGuides) { + this.shouldRenderIndentGuides = shouldRenderIndentGuides; + this.indentGuidesDisposable.dispose(); + if (shouldRenderIndentGuides) { + const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.activeNodes.onDidChange(this._onDidChangeActiveNodes, this, disposables); + this.indentGuidesDisposable = disposables; + this._onDidChangeActiveNodes(this.activeNodes.elements); + } + } + } + if (typeof options.hideTwistiesOfChildlessElements !== 'undefined') { + this.hideTwistiesOfChildlessElements = options.hideTwistiesOfChildlessElements; } } - getLevel() { - return this.level; - } -} -class ConsoleLogService extends AbstractLogService { - constructor(logLevel = DEFAULT_LOG_LEVEL) { - super(); - this.setLevel(logLevel); + renderTemplate(container) { + const el = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(container, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-row')); + const indent = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-indent')); + const twistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-twistie')); + const contents = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(el, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.monaco-tl-contents')); + const templateData = this.renderer.renderTemplate(contents); + return { container, indent, twistie, indentGuidesDisposable: _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"].None, templateData }; } - trace(message, ...args) { - if (this.getLevel() <= LogLevel.Trace) { - console.log('%cTRACE', 'color: #888', message, ...args); + renderElement(node, index, templateData, height) { + if (typeof height === 'number') { + this.renderedNodes.set(node, { templateData, height }); + this.renderedElements.set(node.element, node); } - } - info(message, ...args) { - if (this.getLevel() <= LogLevel.Info) { - console.log('%c INFO', 'color: #33f', message, ...args); + const indent = TreeRenderer.DefaultIndent + (node.depth - 1) * this.indent; + templateData.twistie.style.paddingLeft = `${indent}px`; + templateData.indent.style.width = `${indent + this.indent - 16}px`; + this.renderTwistie(node, templateData); + if (typeof height === 'number') { + this.renderIndentGuides(node, templateData); } + this.renderer.renderElement(node, index, templateData.templateData, height); } - error(message, ...args) { - if (this.getLevel() <= LogLevel.Error) { - console.log('%c ERR', 'color: #f33', message, ...args); + disposeElement(node, index, templateData, height) { + templateData.indentGuidesDisposable.dispose(); + if (this.renderer.disposeElement) { + this.renderer.disposeElement(node, index, templateData.templateData, height); + } + if (typeof height === 'number') { + this.renderedNodes.delete(node); + this.renderedElements.delete(node.element); } } - dispose() { - // noop - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js ***! - \************************************************************************************/ -/*! exports provided: MarkerService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerService", function() { return MarkerService; }); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _markers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./markers.js */ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - - -class DoubleResourceMap { - constructor() { - this._byResource = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__["ResourceMap"](); - this._byOwner = new Map(); + disposeTemplate(templateData) { + this.renderer.disposeTemplate(templateData.templateData); } - set(resource, owner, value) { - let ownerMap = this._byResource.get(resource); - if (!ownerMap) { - ownerMap = new Map(); - this._byResource.set(resource, ownerMap); - } - ownerMap.set(owner, value); - let resourceMap = this._byOwner.get(owner); - if (!resourceMap) { - resourceMap = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__["ResourceMap"](); - this._byOwner.set(owner, resourceMap); + onDidChangeTwistieState(element) { + const node = this.renderedElements.get(element); + if (!node) { + return; } - resourceMap.set(resource, value); - } - get(resource, owner) { - let ownerMap = this._byResource.get(resource); - return ownerMap === null || ownerMap === void 0 ? void 0 : ownerMap.get(owner); + this.onDidChangeNodeTwistieState(node); } - delete(resource, owner) { - let removedA = false; - let removedB = false; - let ownerMap = this._byResource.get(resource); - if (ownerMap) { - removedA = ownerMap.delete(owner); + onDidChangeNodeTwistieState(node) { + const data = this.renderedNodes.get(node); + if (!data) { + return; } - let resourceMap = this._byOwner.get(owner); - if (resourceMap) { - removedB = resourceMap.delete(resource); + this.renderTwistie(node, data.templateData); + this._onDidChangeActiveNodes(this.activeNodes.elements); + this.renderIndentGuides(node, data.templateData); + } + renderTwistie(node, templateData) { + if (this.renderer.renderTwistie) { + this.renderer.renderTwistie(node.element, templateData.twistie); } - if (removedA !== removedB) { - throw new Error('illegal state'); + if (node.collapsible && (!this.hideTwistiesOfChildlessElements || node.visibleChildrenCount > 0)) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(templateData.twistie, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeItemExpandedIcon"].classNames, 'collapsible'); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(templateData.twistie, 'collapsed', node.collapsed); } - return removedA && removedB; - } - values(key) { - var _a, _b, _c, _d; - if (typeof key === 'string') { - return (_b = (_a = this._byOwner.get(key)) === null || _a === void 0 ? void 0 : _a.values()) !== null && _b !== void 0 ? _b : _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].empty(); + else { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(templateData.twistie, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeItemExpandedIcon"].classNames, 'collapsible', 'collapsed'); } - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_2__["URI"].isUri(key)) { - return (_d = (_c = this._byResource.get(key)) === null || _c === void 0 ? void 0 : _c.values()) !== null && _d !== void 0 ? _d : _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].empty(); + if (node.collapsible) { + templateData.container.setAttribute('aria-expanded', String(!node.collapsed)); } - return _base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].map(_base_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].concat(...this._byOwner.values()), map => map[1]); - } -} -class MarkerStats { - constructor(service) { - this.errors = 0; - this.infos = 0; - this.warnings = 0; - this.unknowns = 0; - this._data = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__["ResourceMap"](); - this._service = service; - this._subscription = service.onMarkerChanged(this._update, this); - } - dispose() { - this._subscription.dispose(); - } - _update(resources) { - for (const resource of resources) { - const oldStats = this._data.get(resource); - if (oldStats) { - this._substract(oldStats); - } - const newStats = this._resourceStats(resource); - this._add(newStats); - this._data.set(resource, newStats); + else { + templateData.container.removeAttribute('aria-expanded'); } } - _resourceStats(resource) { - const result = { errors: 0, warnings: 0, infos: 0, unknowns: 0 }; - // TODO this is a hack - if (resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__["Schemas"].inMemory || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__["Schemas"].walkThrough || resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_1__["Schemas"].walkThroughSnippet) { - return result; + renderIndentGuides(target, templateData) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["clearNode"])(templateData.indent); + templateData.indentGuidesDisposable.dispose(); + if (!this.shouldRenderIndentGuides) { + return; } - for (const { severity } of this._service.read({ resource })) { - if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Error) { - result.errors += 1; + const disposableStore = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + const model = this.modelProvider(); + let node = target; + while (true) { + const ref = model.getNodeLocation(node); + const parentRef = model.getParentNodeLocation(ref); + if (!parentRef) { + break; } - else if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Warning) { - result.warnings += 1; + const parent = model.getNode(parentRef); + const guide = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.indent-guide', { style: `width: ${this.indent}px` }); + if (this.activeIndentNodes.has(parent)) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(guide, 'active'); } - else if (severity === _markers_js__WEBPACK_IMPORTED_MODULE_4__["MarkerSeverity"].Info) { - result.infos += 1; + if (templateData.indent.childElementCount === 0) { + templateData.indent.appendChild(guide); } else { - result.unknowns += 1; + templateData.indent.insertBefore(guide, templateData.indent.firstElementChild); } + this.renderedIndentGuides.add(parent, guide); + disposableStore.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => this.renderedIndentGuides.delete(parent, guide))); + node = parent; } - return result; + templateData.indentGuidesDisposable = disposableStore; } - _substract(op) { - this.errors -= op.errors; - this.warnings -= op.warnings; - this.infos -= op.infos; - this.unknowns -= op.unknowns; + _onDidChangeActiveNodes(nodes) { + if (!this.shouldRenderIndentGuides) { + return; + } + const set = new Set(); + const model = this.modelProvider(); + nodes.forEach(node => { + const ref = model.getNodeLocation(node); + try { + const parentRef = model.getParentNodeLocation(ref); + if (node.collapsible && node.children.length > 0 && !node.collapsed) { + set.add(node); + } + else if (parentRef) { + set.add(model.getNode(parentRef)); + } + } + catch (_a) { + // noop + } + }); + this.activeIndentNodes.forEach(node => { + if (!set.has(node)) { + this.renderedIndentGuides.forEach(node, line => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(line, 'active')); + } + }); + set.forEach(node => { + if (!this.activeIndentNodes.has(node)) { + this.renderedIndentGuides.forEach(node, line => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(line, 'active')); + } + }); + this.activeIndentNodes = set; } - _add(op) { - this.errors += op.errors; - this.warnings += op.warnings; - this.infos += op.infos; - this.unknowns += op.unknowns; + dispose() { + this.renderedNodes.clear(); + this.renderedElements.clear(); + this.indentGuidesDisposable.dispose(); + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); } } -class MarkerService { - constructor() { - this._onMarkerChanged = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - this.onMarkerChanged = _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Event"].debounce(this._onMarkerChanged.event, MarkerService._debouncer, 0); - this._data = new DoubleResourceMap(); - this._stats = new MarkerStats(this); - } - dispose() { - this._stats.dispose(); +TreeRenderer.DefaultIndent = 8; +class TypeFilter { + constructor(tree, keyboardNavigationLabelProvider, _filter) { + this.tree = tree; + this.keyboardNavigationLabelProvider = keyboardNavigationLabelProvider; + this._filter = _filter; + this._totalCount = 0; + this._matchCount = 0; + this._pattern = ''; + this._lowercasePattern = ''; + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + tree.onWillRefilter(this.reset, this, this.disposables); } - remove(owner, resources) { - for (const resource of resources || []) { - this.changeOne(owner, resource, []); - } + get totalCount() { return this._totalCount; } + get matchCount() { return this._matchCount; } + set pattern(pattern) { + this._pattern = pattern; + this._lowercasePattern = pattern.toLowerCase(); } - changeOne(owner, resource, markerData) { - if (Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_0__["isFalsyOrEmpty"])(markerData)) { - // remove marker for this (owner,resource)-tuple - const removed = this._data.delete(resource, owner); - if (removed) { - this._onMarkerChanged.fire([resource]); + filter(element, parentVisibility) { + if (this._filter) { + const result = this._filter.filter(element, parentVisibility); + if (this.tree.options.simpleKeyboardNavigation) { + return result; } - } - else { - // insert marker for this (owner,resource)-tuple - const markers = []; - for (const data of markerData) { - const marker = MarkerService._toMarker(owner, resource, data); - if (marker) { - markers.push(marker); - } + let visibility; + if (typeof result === 'boolean') { + visibility = result ? 1 /* Visible */ : 0 /* Hidden */; } - this._data.set(resource, owner, markers); - this._onMarkerChanged.fire([resource]); - } - } - static _toMarker(owner, resource, data) { - let { code, severity, message, source, startLineNumber, startColumn, endLineNumber, endColumn, relatedInformation, tags, } = data; - if (!message) { - return undefined; - } - // santize data - startLineNumber = startLineNumber > 0 ? startLineNumber : 1; - startColumn = startColumn > 0 ? startColumn : 1; - endLineNumber = endLineNumber >= startLineNumber ? endLineNumber : startLineNumber; - endColumn = endColumn > 0 ? endColumn : startColumn; - return { - resource, - owner, - code, - severity, - message, - source, - startLineNumber, - startColumn, - endLineNumber, - endColumn, - relatedInformation, - tags, - }; - } - read(filter = Object.create(null)) { - let { owner, resource, severities, take } = filter; - if (!take || take < 0) { - take = -1; - } - if (owner && resource) { - // exactly one owner AND resource - const data = this._data.get(resource, owner); - if (!data) { - return []; + else if (Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__["isFilterResult"])(result)) { + visibility = Object(_indexTreeModel_js__WEBPACK_IMPORTED_MODULE_12__["getVisibleState"])(result.visibility); } else { - const result = []; - for (const marker of data) { - if (MarkerService._accept(marker, severities)) { - const newLen = result.push(marker); - if (take > 0 && newLen === take) { - break; - } - } - } - return result; - } - } - else if (!owner && !resource) { - // all - const result = []; - for (let markers of this._data.values()) { - for (let data of markers) { - if (MarkerService._accept(data, severities)) { - const newLen = result.push(data); - if (take > 0 && newLen === take) { - return result; - } - } - } - } - return result; - } - else { - // of one resource OR owner - const iterable = this._data.values(resource !== null && resource !== void 0 ? resource : owner); - const result = []; - for (const markers of iterable) { - for (const data of markers) { - if (MarkerService._accept(data, severities)) { - const newLen = result.push(data); - if (take > 0 && newLen === take) { - return result; - } - } - } + visibility = result; } - return result; - } - } - static _accept(marker, severities) { - return severities === undefined || (severities & marker.severity) === marker.severity; - } - static _debouncer(last, event) { - if (!last) { - MarkerService._dedupeMap = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__["ResourceMap"](); - last = []; - } - for (const uri of event) { - if (!MarkerService._dedupeMap.has(uri)) { - MarkerService._dedupeMap.set(uri, true); - last.push(uri); + if (visibility === 0 /* Hidden */) { + return false; } } - return last; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js ***! - \******************************************************************************/ -/*! exports provided: MarkerSeverity, IMarkerData, IMarkerService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerSeverity", function() { return MarkerSeverity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IMarkerData", function() { return IMarkerData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IMarkerService", function() { return IMarkerService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -var MarkerSeverity; -(function (MarkerSeverity) { - MarkerSeverity[MarkerSeverity["Hint"] = 1] = "Hint"; - MarkerSeverity[MarkerSeverity["Info"] = 2] = "Info"; - MarkerSeverity[MarkerSeverity["Warning"] = 4] = "Warning"; - MarkerSeverity[MarkerSeverity["Error"] = 8] = "Error"; -})(MarkerSeverity || (MarkerSeverity = {})); -(function (MarkerSeverity) { - function compare(a, b) { - return b - a; - } - MarkerSeverity.compare = compare; - const _displayStrings = Object.create(null); - _displayStrings[MarkerSeverity.Error] = Object(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"])('sev.error', "Error"); - _displayStrings[MarkerSeverity.Warning] = Object(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"])('sev.warning', "Warning"); - _displayStrings[MarkerSeverity.Info] = Object(_nls_js__WEBPACK_IMPORTED_MODULE_1__["localize"])('sev.info', "Info"); - function toString(a) { - return _displayStrings[a] || ''; - } - MarkerSeverity.toString = toString; - function fromSeverity(severity) { - switch (severity) { - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Error: return MarkerSeverity.Error; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Warning: return MarkerSeverity.Warning; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Info: return MarkerSeverity.Info; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Ignore: return MarkerSeverity.Hint; - } - } - MarkerSeverity.fromSeverity = fromSeverity; - function toSeverity(severity) { - switch (severity) { - case MarkerSeverity.Error: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Error; - case MarkerSeverity.Warning: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Warning; - case MarkerSeverity.Info: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Info; - case MarkerSeverity.Hint: return _base_common_severity_js__WEBPACK_IMPORTED_MODULE_2__["default"].Ignore; - } - } - MarkerSeverity.toSeverity = toSeverity; -})(MarkerSeverity || (MarkerSeverity = {})); -var IMarkerData; -(function (IMarkerData) { - const emptyString = ''; - function makeKey(markerData) { - return makeKeyOptionalMessage(markerData, true); - } - IMarkerData.makeKey = makeKey; - function makeKeyOptionalMessage(markerData, useMessage) { - let result = [emptyString]; - if (markerData.source) { - result.push(markerData.source.replace('¦', '\\¦')); + this._totalCount++; + if (this.tree.options.simpleKeyboardNavigation || !this._pattern) { + this._matchCount++; + return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; } - else { - result.push(emptyString); + const label = this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(element); + const labelStr = label && label.toString(); + if (typeof labelStr === 'undefined') { + return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; } - if (markerData.code) { - if (typeof markerData.code === 'string') { - result.push(markerData.code.replace('¦', '\\¦')); + const score = Object(_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["fuzzyScore"])(this._pattern, this._lowercasePattern, 0, labelStr, labelStr.toLowerCase(), 0, true); + if (!score) { + if (this.tree.options.filterOnType) { + return 2 /* Recurse */; } else { - result.push(markerData.code.value.replace('¦', '\\¦')); + return { data: _common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].Default, visibility: true }; } + // DEMO: smarter filter ? + // return parentVisibility === TreeVisibility.Visible ? true : TreeVisibility.Recurse; } - else { - result.push(emptyString); - } - if (markerData.severity !== undefined && markerData.severity !== null) { - result.push(MarkerSeverity.toString(markerData.severity)); + this._matchCount++; + return { data: score, visibility: true }; + } + reset() { + this._totalCount = 0; + this._matchCount = 0; + } + dispose() { + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); + } +} +class TypeFilterController { + constructor(tree, model, view, filter, keyboardNavigationDelegate) { + this.tree = tree; + this.view = view; + this.filter = filter; + this.keyboardNavigationDelegate = keyboardNavigationDelegate; + this._enabled = false; + this._pattern = ''; + this._empty = false; + this._onDidChangeEmptyState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this.positionClassName = 'ne'; + this.automaticKeyboardNavigation = true; + this.triggered = false; + this._onDidChangePattern = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this.enabledDisposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this.domNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])(`.monaco-list-type-filter.${this.positionClassName}`); + this.domNode.draggable = true; + Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.domNode, 'dragstart')(this.onDragStart, this, this.disposables); + this.messageDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(view.getHTMLElement(), Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])(`.monaco-list-type-filter-message`)); + this.labelDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this.domNode, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('span.label')); + const controls = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(this.domNode, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('.controls')); + this._filterOnType = !!tree.options.filterOnType; + this.filterOnTypeDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(controls, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('input.filter')); + this.filterOnTypeDomNode.type = 'checkbox'; + this.filterOnTypeDomNode.checked = this._filterOnType; + this.filterOnTypeDomNode.tabIndex = -1; + this.updateFilterOnTypeTitleAndIcon(); + Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.filterOnTypeDomNode, 'input')(this.onDidChangeFilterOnType, this, this.disposables); + this.clearDomNode = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["append"])(controls, Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["$"])('button.clear' + _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterClearIcon"].cssSelector)); + this.clearDomNode.tabIndex = -1; + this.clearDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('clear', "Clear"); + this.keyboardNavigationEventFilter = tree.options.keyboardNavigationEventFilter; + model.onDidSplice(this.onDidSpliceModel, this, this.disposables); + this.updateOptions(tree.options); + } + get enabled() { return this._enabled; } + get pattern() { return this._pattern; } + get filterOnType() { return this._filterOnType; } + updateOptions(options) { + if (options.simpleKeyboardNavigation) { + this.disable(); } else { - result.push(emptyString); - } - // Modifed to not include the message as part of the marker key to work around - // https://github.com/microsoft/vscode/issues/77475 - if (markerData.message && useMessage) { - result.push(markerData.message.replace('¦', '\\¦')); + this.enable(); } - else { - result.push(emptyString); + if (typeof options.filterOnType !== 'undefined') { + this._filterOnType = !!options.filterOnType; + this.filterOnTypeDomNode.checked = this._filterOnType; } - if (markerData.startLineNumber !== undefined && markerData.startLineNumber !== null) { - result.push(markerData.startLineNumber.toString()); + if (typeof options.automaticKeyboardNavigation !== 'undefined') { + this.automaticKeyboardNavigation = options.automaticKeyboardNavigation; } - else { - result.push(emptyString); + this.tree.refilter(); + this.render(); + if (!this.automaticKeyboardNavigation) { + this.onEventOrInput(''); } - if (markerData.startColumn !== undefined && markerData.startColumn !== null) { - result.push(markerData.startColumn.toString()); + } + enable() { + if (this._enabled) { + return; } - else { - result.push(emptyString); + const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.view.getHTMLElement(), 'keydown')) + .filter(e => !Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.target) || e.target === this.filterOnTypeDomNode) + .filter(e => e.key !== 'Dead' && !/^Media/.test(e.key)) + .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e)) + .filter(this.keyboardNavigationEventFilter || (() => true)) + .filter(() => this.automaticKeyboardNavigation || this.triggered) + .filter(e => (this.keyboardNavigationDelegate.mightProducePrintableCharacter(e) && !(e.keyCode === 18 /* DownArrow */ || e.keyCode === 16 /* UpArrow */ || e.keyCode === 15 /* LeftArrow */ || e.keyCode === 17 /* RightArrow */)) || ((this.pattern.length > 0 || this.triggered) && ((e.keyCode === 9 /* Escape */ || e.keyCode === 1 /* Backspace */) && !e.altKey && !e.ctrlKey && !e.metaKey) || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__["isMacintosh"] ? (e.altKey && !e.metaKey) : e.ctrlKey) && !e.shiftKey))) + .forEach(e => { e.stopPropagation(); e.preventDefault(); }) + .event; + const onClear = Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.clearDomNode, 'click'); + _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].any(onKeyDown, onClear)) + .event(this.onEventOrInput, this, this.enabledDisposables); + this.filter.pattern = ''; + this.tree.refilter(); + this.render(); + this._enabled = true; + this.triggered = false; + } + disable() { + if (!this._enabled) { + return; } - if (markerData.endLineNumber !== undefined && markerData.endLineNumber !== null) { - result.push(markerData.endLineNumber.toString()); + this.domNode.remove(); + this.enabledDisposables.clear(); + this.tree.refilter(); + this.render(); + this._enabled = false; + this.triggered = false; + } + onEventOrInput(e) { + if (typeof e === 'string') { + this.onInput(e); } - else { - result.push(emptyString); + else if (e instanceof MouseEvent || e.keyCode === 9 /* Escape */ || (e.keyCode === 1 /* Backspace */ && (_common_platform_js__WEBPACK_IMPORTED_MODULE_15__["isMacintosh"] ? e.altKey : e.ctrlKey))) { + this.onInput(''); } - if (markerData.endColumn !== undefined && markerData.endColumn !== null) { - result.push(markerData.endColumn.toString()); + else if (e.keyCode === 1 /* Backspace */) { + this.onInput(this.pattern.length === 0 ? '' : this.pattern.substr(0, this.pattern.length - 1)); } else { - result.push(emptyString); + this.onInput(this.pattern + e.browserEvent.key); } - result.push(emptyString); - return result.join('¦'); - } - IMarkerData.makeKeyOptionalMessage = makeKeyOptionalMessage; -})(IMarkerData || (IMarkerData = {})); -const IMarkerService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('markerService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js ***! - \****************************************************************************************/ -/*! exports provided: Severity, INotificationService, NoOpNotification */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Severity", function() { return Severity; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INotificationService", function() { return INotificationService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoOpNotification", function() { return NoOpNotification; }); -/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -var Severity = _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__["default"]; -const INotificationService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('notificationService'); -class NoOpNotification { -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js": -/*!****************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js ***! - \****************************************************************************/ -/*! exports provided: IOpenerService, NullOpenerService, matchesScheme */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IOpenerService", function() { return IOpenerService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullOpenerService", function() { return NullOpenerService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesScheme", function() { return matchesScheme; }); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/strings.js */ "./node_modules/monaco-editor/esm/vs/base/common/strings.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - -const IOpenerService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["createDecorator"])('openerService'); -const NullOpenerService = Object.freeze({ - _serviceBrand: undefined, - registerOpener() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"].None; }, - registerValidator() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"].None; }, - registerExternalUriResolver() { return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"].None; }, - setExternalOpener() { }, - open() { - return __awaiter(this, void 0, void 0, function* () { return false; }); - }, - resolveExternalUri(uri) { - return __awaiter(this, void 0, void 0, function* () { return { resolved: uri, dispose() { } }; }); - }, -}); -function matchesScheme(target, scheme) { - if (_base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].isUri(target)) { - return Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["equalsIgnoreCase"])(target.scheme, scheme); - } - else { - return Object(_base_common_strings_js__WEBPACK_IMPORTED_MODULE_3__["startsWithIgnoreCase"])(target, scheme + ':'); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js ***! - \********************************************************************************/ -/*! exports provided: Progress, IEditorProgressService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Progress", function() { return Progress; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IEditorProgressService", function() { return IEditorProgressService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -class Progress { - constructor(callback) { - this.callback = callback; } - report(item) { - this._value = item; - this.callback(this._value); - } -} -Progress.None = Object.freeze({ report() { } }); -const IEditorProgressService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('editorProgressService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js": -/*!**********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js ***! - \**********************************************************************************************/ -/*! exports provided: AbstractCommandsQuickAccessProvider, CommandsHistory */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractCommandsQuickAccessProvider", function() { return AbstractCommandsQuickAccessProvider; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommandsHistory", function() { return CommandsHistory; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _pickerQuickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pickerQuickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/filters.js */ "./node_modules/monaco-editor/esm/vs/base/common/filters.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/* harmony import */ var _storage_common_storage_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../storage/common/storage.js */ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"); -/* harmony import */ var _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../configuration/common/configuration.js */ "./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../keybinding/common/keybinding.js */ "./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"); -/* harmony import */ var _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../commands/common/commands.js */ "./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"); -/* harmony import */ var _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../telemetry/common/telemetry.js */ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _base_common_errorMessage_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../base/common/errorMessage.js */ "./node_modules/monaco-editor/esm/vs/base/common/errorMessage.js"); -/* harmony import */ var _userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../userDataSync/common/storageKeys.js */ "./node_modules/monaco-editor/esm/vs/platform/userDataSync/common/storageKeys.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - - - - - - - - - - -let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends _pickerQuickAccess_js__WEBPACK_IMPORTED_MODULE_1__["PickerQuickAccessProvider"] { - constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) { - super(AbstractCommandsQuickAccessProvider.PREFIX, options); - this.options = options; - this.instantiationService = instantiationService; - this.keybindingService = keybindingService; - this.commandService = commandService; - this.telemetryService = telemetryService; - this.notificationService = notificationService; - this.commandsHistory = this._register(this.instantiationService.createInstance(CommandsHistory)); - } - getPicks(filter, disposables, token) { - return __awaiter(this, void 0, void 0, function* () { - // Ask subclass for all command picks - const allCommandPicks = yield this.getCommandPicks(disposables, token); - if (token.isCancellationRequested) { - return []; - } - // Filter - const filteredCommandPicks = []; - for (const commandPick of allCommandPicks) { - const labelHighlights = Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__["withNullAsUndefined"])(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label)); - const aliasHighlights = commandPick.commandAlias ? Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_4__["withNullAsUndefined"])(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias)) : undefined; - // Add if matching in label or alias - if (labelHighlights || aliasHighlights) { - commandPick.highlights = { - label: labelHighlights, - detail: this.options.showAlias ? aliasHighlights : undefined - }; - filteredCommandPicks.push(commandPick); - } - // Also add if we have a 100% command ID match - else if (filter === commandPick.commandId) { - filteredCommandPicks.push(commandPick); - } - } - // Add description to commands that have duplicate labels - const mapLabelToCommand = new Map(); - for (const commandPick of filteredCommandPicks) { - const existingCommandForLabel = mapLabelToCommand.get(commandPick.label); - if (existingCommandForLabel) { - commandPick.description = commandPick.commandId; - existingCommandForLabel.description = existingCommandForLabel.commandId; - } - else { - mapLabelToCommand.set(commandPick.label, commandPick); - } - } - // Sort by MRU order and fallback to name otherwise - filteredCommandPicks.sort((commandPickA, commandPickB) => { - const commandACounter = this.commandsHistory.peek(commandPickA.commandId); - const commandBCounter = this.commandsHistory.peek(commandPickB.commandId); - if (commandACounter && commandBCounter) { - return commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older - } - if (commandACounter) { - return -1; // first command was used, so it wins over the non used one - } - if (commandBCounter) { - return 1; // other command was used so it wins over the command - } - // both commands were never used, so we sort by name - return commandPickA.label.localeCompare(commandPickB.label); - }); - const commandPicks = []; - let addSeparator = false; - for (let i = 0; i < filteredCommandPicks.length; i++) { - const commandPick = filteredCommandPicks[i]; - const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId); - const ariaLabel = keybinding ? - Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('commandPickAriaLabelWithKeybinding', "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) : - commandPick.label; - // Separator: recently used - if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) { - commandPicks.push({ type: 'separator', label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('recentlyUsed', "recently used") }); - addSeparator = true; - } - // Separator: other commands - if (i !== 0 && addSeparator && !this.commandsHistory.peek(commandPick.commandId)) { - commandPicks.push({ type: 'separator', label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('morecCommands', "other commands") }); - addSeparator = false; // only once - } - // Command - commandPicks.push(Object.assign(Object.assign({}, commandPick), { ariaLabel, detail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined, keybinding, accept: () => __awaiter(this, void 0, void 0, function* () { - // Add to history - this.commandsHistory.push(commandPick.commandId); - // Telementry - this.telemetryService.publicLog2('workbenchActionExecuted', { - id: commandPick.commandId, - from: 'quick open' - }); - // Run - try { - yield this.commandService.executeCommand(commandPick.commandId); - } - catch (error) { - if (!Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_12__["isPromiseCanceledError"])(error)) { - this.notificationService.error(Object(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"])('canNotRun', "Command '{0}' resulted in an error ({1})", commandPick.label, Object(_base_common_errorMessage_js__WEBPACK_IMPORTED_MODULE_14__["toErrorMessage"])(error))); - } - } - }) })); + onInput(pattern) { + const container = this.view.getHTMLElement(); + if (pattern && !this.domNode.parentElement) { + container.append(this.domNode); + } + else if (!pattern && this.domNode.parentElement) { + this.domNode.remove(); + this.tree.domFocus(); + } + this._pattern = pattern; + this._onDidChangePattern.fire(pattern); + this.filter.pattern = pattern; + this.tree.refilter(); + if (pattern) { + this.tree.focusNext(0, true, undefined, node => !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].isDefault(node.filterData)); + } + const focus = this.tree.getFocus(); + if (focus.length > 0) { + const element = focus[0]; + if (this.tree.getRelativeTop(element) === null) { + this.tree.reveal(element, 0.5); } - return commandPicks; - }); + } + this.render(); + if (!pattern) { + this.triggered = false; + } } -}; -AbstractCommandsQuickAccessProvider.PREFIX = '>'; -AbstractCommandsQuickAccessProvider.WORD_FILTER = Object(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__["or"])(_base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__["matchesPrefix"], _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__["matchesWords"], _base_common_filters_js__WEBPACK_IMPORTED_MODULE_3__["matchesContiguousSubString"]); -AbstractCommandsQuickAccessProvider = __decorate([ - __param(1, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_8__["IInstantiationService"]), - __param(2, _keybinding_common_keybinding_js__WEBPACK_IMPORTED_MODULE_9__["IKeybindingService"]), - __param(3, _commands_common_commands_js__WEBPACK_IMPORTED_MODULE_10__["ICommandService"]), - __param(4, _telemetry_common_telemetry_js__WEBPACK_IMPORTED_MODULE_11__["ITelemetryService"]), - __param(5, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_13__["INotificationService"]) -], AbstractCommandsQuickAccessProvider); - -let CommandsHistory = class CommandsHistory extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor(storageService, configurationService, storageKeysSyncRegistryService) { - super(); - this.storageService = storageService; - this.configurationService = configurationService; - this.configuredCommandsHistoryLength = 0; - // opt-in to syncing - storageKeysSyncRegistryService.registerStorageKey({ key: CommandsHistory.PREF_KEY_CACHE, version: 1 }); - storageKeysSyncRegistryService.registerStorageKey({ key: CommandsHistory.PREF_KEY_COUNTER, version: 1 }); - this.updateConfiguration(); - this.load(); - this.registerListeners(); - } - registerListeners() { - this._register(this.configurationService.onDidChangeConfiguration(() => this.updateConfiguration())); - } - updateConfiguration() { - this.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService); - if (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) { - CommandsHistory.cache.limit = this.configuredCommandsHistoryLength; - CommandsHistory.saveState(this.storageService); - } - } - load() { - const raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, 0 /* GLOBAL */); - let serializedCache; - if (raw) { - try { - serializedCache = JSON.parse(raw); + onDragStart() { + const container = this.view.getHTMLElement(); + const { left } = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["getDomNodePagePosition"])(container); + const containerWidth = container.clientWidth; + const midContainerWidth = containerWidth / 2; + const width = this.domNode.clientWidth; + const disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + let positionClassName = this.positionClassName; + const updatePosition = () => { + switch (positionClassName) { + case 'nw': + this.domNode.style.top = `4px`; + this.domNode.style.left = `4px`; + break; + case 'ne': + this.domNode.style.top = `4px`; + this.domNode.style.left = `${containerWidth - width - 6}px`; + break; } - catch (error) { - // invalid data + }; + const onDragOver = (event) => { + event.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome) + const x = event.screenX - left; + if (event.dataTransfer) { + event.dataTransfer.dropEffect = 'none'; } - } - const cache = CommandsHistory.cache = new _base_common_map_js__WEBPACK_IMPORTED_MODULE_5__["LRUCache"](this.configuredCommandsHistoryLength, 1); - if (serializedCache) { - let entries; - if (serializedCache.usesLRU) { - entries = serializedCache.entries; + if (x < midContainerWidth) { + positionClassName = 'nw'; } else { - entries = serializedCache.entries.sort((a, b) => a.value - b.value); + positionClassName = 'ne'; } - entries.forEach(entry => cache.set(entry.key, entry.value)); - } - CommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, 0 /* GLOBAL */, CommandsHistory.counter); + updatePosition(); + }; + const onDragEnd = () => { + this.positionClassName = positionClassName; + this.domNode.className = `monaco-list-type-filter ${this.positionClassName}`; + this.domNode.style.top = ''; + this.domNode.style.left = ''; + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(disposables); + }; + updatePosition(); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.domNode, positionClassName); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClass"])(this.domNode, 'dragging'); + disposables.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClass"])(this.domNode, 'dragging'))); + Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(document, 'dragover')(onDragOver, null, disposables); + Object(_event_js__WEBPACK_IMPORTED_MODULE_10__["domEvent"])(this.domNode, 'dragend')(onDragEnd, null, disposables); + _dnd_js__WEBPACK_IMPORTED_MODULE_7__["StaticDND"].CurrentDragAndDropData = new _dnd_js__WEBPACK_IMPORTED_MODULE_7__["DragAndDropData"]('vscode-ui'); + disposables.add(Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => _dnd_js__WEBPACK_IMPORTED_MODULE_7__["StaticDND"].CurrentDragAndDropData = undefined)); } - push(commandId) { - if (!CommandsHistory.cache) { + onDidSpliceModel() { + if (!this._enabled || this.pattern.length === 0) { return; } - CommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command - CommandsHistory.saveState(this.storageService); + this.tree.refilter(); + this.render(); } - peek(commandId) { - var _a; - return (_a = CommandsHistory.cache) === null || _a === void 0 ? void 0 : _a.peek(commandId); + onDidChangeFilterOnType() { + this.tree.updateOptions({ filterOnType: this.filterOnTypeDomNode.checked }); + this.tree.refilter(); + this.tree.domFocus(); + this.render(); + this.updateFilterOnTypeTitleAndIcon(); } - static saveState(storageService) { - if (!CommandsHistory.cache) { - return; + updateFilterOnTypeTitleAndIcon() { + if (this.filterOnType) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOffIcon"].classNames); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOnIcon"].classNames); + this.filterOnTypeDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('disable filter on type', "Disable Filter on Type"); + } + else { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["removeClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOnIcon"].classNames); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["addClasses"])(this.filterOnTypeDomNode, _treeIcons_js__WEBPACK_IMPORTED_MODULE_18__["treeFilterOnTypeOffIcon"].classNames); + this.filterOnTypeDomNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('enable filter on type', "Enable Filter on Type"); } - const serializedCache = { usesLRU: true, entries: [] }; - CommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value })); - storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), 0 /* GLOBAL */); - storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, 0 /* GLOBAL */); } - static getConfiguredCommandHistoryLength(configurationService) { - var _a, _b; - const config = configurationService.getValue(); - const configuredCommandHistoryLength = (_b = (_a = config.workbench) === null || _a === void 0 ? void 0 : _a.commandPalette) === null || _b === void 0 ? void 0 : _b.history; - if (typeof configuredCommandHistoryLength === 'number') { - return configuredCommandHistoryLength; + render() { + const noMatches = this.filter.totalCount > 0 && this.filter.matchCount === 0; + if (this.pattern && this.tree.options.filterOnType && noMatches) { + this.messageDomNode.textContent = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('empty', "No elements found"); + this._empty = true; + } + else { + this.messageDomNode.innerText = ''; + this._empty = false; } - return CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.domNode, 'no-matches', noMatches); + this.domNode.title = Object(_nls_js__WEBPACK_IMPORTED_MODULE_13__["localize"])('found', "Matched {0} out of {1} elements", this.filter.matchCount, this.filter.totalCount); + this.labelDomNode.textContent = this.pattern.length > 16 ? '…' + this.pattern.substr(this.pattern.length - 16) : this.pattern; + this._onDidChangeEmptyState.fire(this._empty); } -}; -CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH = 50; -CommandsHistory.PREF_KEY_CACHE = 'commandPalette.mru.cache'; -CommandsHistory.PREF_KEY_COUNTER = 'commandPalette.mru.counter'; -CommandsHistory.counter = 1; -CommandsHistory = __decorate([ - __param(0, _storage_common_storage_js__WEBPACK_IMPORTED_MODULE_6__["IStorageService"]), - __param(1, _configuration_common_configuration_js__WEBPACK_IMPORTED_MODULE_7__["IConfigurationService"]), - __param(2, _userDataSync_common_storageKeys_js__WEBPACK_IMPORTED_MODULE_15__["IStorageKeysSyncRegistryService"]) -], CommandsHistory); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js": -/*!******************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/helpQuickAccess.js ***! - \******************************************************************************************/ -/*! exports provided: HelpQuickAccessProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HelpQuickAccessProvider", function() { return HelpQuickAccessProvider; }); -/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/* harmony import */ var _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - -let HelpQuickAccessProvider = class HelpQuickAccessProvider { - constructor(quickInputService) { - this.quickInputService = quickInputService; - this.registry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["Registry"].as(_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_1__["Extensions"].Quickaccess); + shouldAllowFocus(node) { + if (!this.enabled || !this.pattern || this.filterOnType) { + return true; + } + if (this.filter.totalCount > 0 && this.filter.matchCount <= 1) { + return true; + } + return !_common_filters_js__WEBPACK_IMPORTED_MODULE_11__["FuzzyScore"].isDefault(node.filterData); } - provide(picker) { - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_4__["DisposableStore"](); - // Open a picker with the selected value if picked - disposables.add(picker.onDidAccept(() => { - const [item] = picker.selectedItems; - if (item) { - this.quickInputService.quickAccess.show(item.prefix, { preserveValue: true }); - } - })); - // Also open a picker when we detect the user typed the exact - // name of a provider (e.g. `?term` for terminals) - disposables.add(picker.onDidChangeValue(value => { - const providerDescriptor = this.registry.getQuickAccessProvider(value.substr(HelpQuickAccessProvider.PREFIX.length)); - if (providerDescriptor && providerDescriptor.prefix && providerDescriptor.prefix !== HelpQuickAccessProvider.PREFIX) { - this.quickInputService.quickAccess.show(providerDescriptor.prefix, { preserveValue: true }); - } - })); - // Fill in all providers separated by editor/global scope - const { editorProviders, globalProviders } = this.getQuickAccessProviders(); - picker.items = editorProviders.length === 0 || globalProviders.length === 0 ? - // Without groups - [ - ...(editorProviders.length === 0 ? globalProviders : editorProviders) - ] : - // With groups - [ - { label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"])('globalCommands', "global commands"), type: 'separator' }, - ...globalProviders, - { label: Object(_nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"])('editorCommands', "editor commands"), type: 'separator' }, - ...editorProviders - ]; - return disposables; - } - getQuickAccessProviders() { - const globalProviders = []; - const editorProviders = []; - for (const provider of this.registry.getQuickAccessProviders().sort((providerA, providerB) => providerA.prefix.localeCompare(providerB.prefix))) { - if (provider.prefix === HelpQuickAccessProvider.PREFIX) { - continue; // exclude help which is already active - } - for (const helpEntry of provider.helpEntries) { - const prefix = helpEntry.prefix || provider.prefix; - const label = prefix || '\u2026' /* ... */; - (helpEntry.needsEditor ? editorProviders : globalProviders).push({ - prefix, - label, - ariaLabel: Object(_nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"])('helpPickAriaLabel', "{0}, {1}", label, helpEntry.description), - description: helpEntry.description - }); - } + dispose() { + if (this._enabled) { + this.domNode.remove(); + this.enabledDisposables.dispose(); + this._enabled = false; + this.triggered = false; } - return { editorProviders, globalProviders }; + this._onDidChangePattern.dispose(); + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); } -}; -HelpQuickAccessProvider.PREFIX = '?'; -HelpQuickAccessProvider = __decorate([ - __param(0, _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__["IQuickInputService"]) -], HelpQuickAccessProvider); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js": -/*!********************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js ***! - \********************************************************************************************/ -/*! exports provided: TriggerAction, PickerQuickAccessProvider */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TriggerAction", function() { return TriggerAction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PickerQuickAccessProvider", function() { return PickerQuickAccessProvider; }); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -var TriggerAction; -(function (TriggerAction) { - /** - * Do nothing after the button was clicked. - */ - TriggerAction[TriggerAction["NO_ACTION"] = 0] = "NO_ACTION"; - /** - * Close the picker. - */ - TriggerAction[TriggerAction["CLOSE_PICKER"] = 1] = "CLOSE_PICKER"; - /** - * Update the results of the picker. - */ - TriggerAction[TriggerAction["REFRESH_PICKER"] = 2] = "REFRESH_PICKER"; - /** - * Remove the item from the picker. - */ - TriggerAction[TriggerAction["REMOVE_ITEM"] = 3] = "REMOVE_ITEM"; -})(TriggerAction || (TriggerAction = {})); -function isPicksWithActive(obj) { - const candidate = obj; - return Array.isArray(candidate.items); -} -function isFastAndSlowPicks(obj) { - const candidate = obj; - return !!candidate.picks && candidate.additionalPicks instanceof Promise; -} -class PickerQuickAccessProvider extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(prefix, options) { - super(); - this.prefix = prefix; - this.options = options; +} +function asTreeMouseEvent(event) { + let target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Unknown; + if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasParentWithClass"])(event.browserEvent.target, 'monaco-tl-twistie', 'monaco-tl-row')) { + target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Twistie; } - provide(picker, token) { - var _a; - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - // Apply options if any - picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground); - // Disable filtering & sorting, we control the results - picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false; - // Set initial picks and update on type - let picksCts = undefined; - const picksDisposable = disposables.add(new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["MutableDisposable"]()); - const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () { - const picksDisposables = picksDisposable.value = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - // Cancel any previous ask for picks and busy - picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true); - picker.busy = false; - // Create new cancellation source for this run - picksCts = new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_0__["CancellationTokenSource"](token); - // Collect picks and support both long running and short or combined - const picksToken = picksCts.token; - const picksFilter = picker.value.substr(this.prefix.length).trim(); - const providedPicks = this.getPicks(picksFilter, picksDisposables, picksToken); - const applyPicks = (picks, skipEmpty) => { - var _a; - let items; - let activeItem = undefined; - if (isPicksWithActive(picks)) { - items = picks.items; - activeItem = picks.active; - } - else { - items = picks; - } - if (items.length === 0) { - if (skipEmpty) { - return false; - } - if (picksFilter.length > 0 && ((_a = this.options) === null || _a === void 0 ? void 0 : _a.noResultsPick)) { - items = [this.options.noResultsPick]; - } - } - picker.items = items; - if (activeItem) { - picker.activeItems = [activeItem]; - } - return true; - }; - // No Picks - if (providedPicks === null) { - // Ignore - } - // Fast and Slow Picks - else if (isFastAndSlowPicks(providedPicks)) { - let fastPicksApplied = false; - let slowPicksApplied = false; - yield Promise.all([ - // Fast Picks: to reduce amount of flicker, we race against - // the slow picks over 500ms and then set the fast picks. - // If the slow picks are faster, we reduce the flicker by - // only setting the items once. - (() => __awaiter(this, void 0, void 0, function* () { - yield Object(_base_common_async_js__WEBPACK_IMPORTED_MODULE_2__["timeout"])(PickerQuickAccessProvider.FAST_PICKS_RACE_DELAY); - if (picksToken.isCancellationRequested) { - return; - } - if (!slowPicksApplied) { - fastPicksApplied = applyPicks(providedPicks.picks, true /* skip over empty to reduce flicker */); - } - }))(), - // Slow Picks: we await the slow picks and then set them at - // once together with the fast picks, but only if we actually - // have additional results. - (() => __awaiter(this, void 0, void 0, function* () { - picker.busy = true; - try { - const awaitedAdditionalPicks = yield providedPicks.additionalPicks; - if (picksToken.isCancellationRequested) { - return; - } - let picks; - let activePick = undefined; - if (isPicksWithActive(providedPicks.picks)) { - picks = providedPicks.picks.items; - activePick = providedPicks.picks.active; - } - else { - picks = providedPicks.picks; - } - let additionalPicks; - let additionalActivePick = undefined; - if (isPicksWithActive(awaitedAdditionalPicks)) { - additionalPicks = awaitedAdditionalPicks.items; - additionalActivePick = awaitedAdditionalPicks.active; - } - else { - additionalPicks = awaitedAdditionalPicks; - } - if (additionalPicks.length > 0 || !fastPicksApplied) { - // If we do not have any activePick or additionalActivePick - // we try to preserve the currently active pick from the - // fast results. This fixes an issue where the user might - // have made a pick active before the additional results - // kick in. - // See https://github.com/microsoft/vscode/issues/102480 - let fallbackActivePick = undefined; - if (!activePick && !additionalActivePick) { - const fallbackActivePickCandidate = picker.activeItems[0]; - if (fallbackActivePickCandidate && picks.indexOf(fallbackActivePickCandidate) !== -1) { - fallbackActivePick = fallbackActivePickCandidate; - } - } - applyPicks({ - items: [...picks, ...additionalPicks], - active: activePick || additionalActivePick || fallbackActivePick - }); - } - } - finally { - if (!picksToken.isCancellationRequested) { - picker.busy = false; - } - slowPicksApplied = true; - } - }))() - ]); - } - // Fast Picks - else if (!(providedPicks instanceof Promise)) { - applyPicks(providedPicks); + else if (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasParentWithClass"])(event.browserEvent.target, 'monaco-tl-contents', 'monaco-tl-row')) { + target = _tree_js__WEBPACK_IMPORTED_MODULE_6__["TreeMouseEventTarget"].Element; + } + return { + browserEvent: event.browserEvent, + element: event.element ? event.element.element : null, + target + }; +} +function dfs(node, fn) { + fn(node); + node.children.forEach(child => dfs(child, fn)); +} +/** + * The trait concept needs to exist at the tree level, because collapsed + * tree nodes will not be known by the list. + */ +class Trait { + constructor(identityProvider) { + this.identityProvider = identityProvider; + this.nodes = []; + this._onDidChange = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this.onDidChange = this._onDidChange.event; + } + get nodeSet() { + if (!this._nodeSet) { + this._nodeSet = this.createNodeSet(); + } + return this._nodeSet; + } + set(nodes, browserEvent) { + if (Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["equals"])(this.nodes, nodes)) { + return; + } + this._set(nodes, false, browserEvent); + } + _set(nodes, silent, browserEvent) { + this.nodes = [...nodes]; + this.elements = undefined; + this._nodeSet = undefined; + if (!silent) { + const that = this; + this._onDidChange.fire({ get elements() { return that.get(); }, browserEvent }); + } + } + get() { + if (!this.elements) { + this.elements = this.nodes.map(node => node.element); + } + return [...this.elements]; + } + getNodes() { + return this.nodes; + } + has(node) { + return this.nodeSet.has(node); + } + onDidModelSplice({ insertedNodes, deletedNodes }) { + if (!this.identityProvider) { + const set = this.createNodeSet(); + const visit = (node) => set.delete(node); + deletedNodes.forEach(node => dfs(node, visit)); + this.set([...set.values()]); + return; + } + const deletedNodesIdSet = new Set(); + const deletedNodesVisitor = (node) => deletedNodesIdSet.add(this.identityProvider.getId(node.element).toString()); + deletedNodes.forEach(node => dfs(node, deletedNodesVisitor)); + const insertedNodesMap = new Map(); + const insertedNodesVisitor = (node) => insertedNodesMap.set(this.identityProvider.getId(node.element).toString(), node); + insertedNodes.forEach(node => dfs(node, insertedNodesVisitor)); + const nodes = []; + for (const node of this.nodes) { + const id = this.identityProvider.getId(node.element).toString(); + const wasDeleted = deletedNodesIdSet.has(id); + if (!wasDeleted) { + nodes.push(node); } - // Slow Picks else { - picker.busy = true; - try { - const awaitedPicks = yield providedPicks; - if (picksToken.isCancellationRequested) { - return; - } - applyPicks(awaitedPicks); - } - finally { - if (!picksToken.isCancellationRequested) { - picker.busy = false; - } - } - } - }); - disposables.add(picker.onDidChangeValue(() => updatePickerItems())); - updatePickerItems(); - // Accept the pick on accept and hide picker - disposables.add(picker.onDidAccept(event => { - const [item] = picker.selectedItems; - if (typeof (item === null || item === void 0 ? void 0 : item.accept) === 'function') { - if (!event.inBackground) { - picker.hide(); // hide picker unless we accept in background - } - item.accept(picker.keyMods, event); - } - })); - // Trigger the pick with button index if button triggered - disposables.add(picker.onDidTriggerItemButton(({ button, item }) => __awaiter(this, void 0, void 0, function* () { - var _b, _c; - if (typeof item.trigger === 'function') { - const buttonIndex = (_c = (_b = item.buttons) === null || _b === void 0 ? void 0 : _b.indexOf(button)) !== null && _c !== void 0 ? _c : -1; - if (buttonIndex >= 0) { - const result = item.trigger(buttonIndex, picker.keyMods); - const action = (typeof result === 'number') ? result : yield result; - if (token.isCancellationRequested) { - return; - } - switch (action) { - case TriggerAction.NO_ACTION: - break; - case TriggerAction.CLOSE_PICKER: - picker.hide(); - break; - case TriggerAction.REFRESH_PICKER: - updatePickerItems(); - break; - case TriggerAction.REMOVE_ITEM: - const index = picker.items.indexOf(item); - if (index !== -1) { - const items = picker.items.slice(); - items.splice(index, 1); - picker.items = items; - } - break; - } + const insertedNode = insertedNodesMap.get(id); + if (insertedNode) { + nodes.push(insertedNode); } } - }))); - return disposables; + } + this._set(nodes, true); + } + createNodeSet() { + const set = new Set(); + for (const node of this.nodes) { + set.add(node); + } + return set; } } -PickerQuickAccessProvider.FAST_PICKS_RACE_DELAY = 200; // timeout before we accept fast results before slow results are present - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js": -/*!**************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js ***! - \**************************************************************************************/ -/*! exports provided: QuickAccessController */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickAccessController", function() { return QuickAccessController; }); -/* harmony import */ var _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/functional.js */ "./node_modules/monaco-editor/esm/vs/base/common/functional.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - -let QuickAccessController = class QuickAccessController extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(quickInputService, instantiationService) { - super(); - this.quickInputService = quickInputService; - this.instantiationService = instantiationService; - this.registry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_3__["Registry"].as(_common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__["Extensions"].Quickaccess); - this.mapProviderToDescriptor = new Map(); - this.lastAcceptedPickerValues = new Map(); - this.visibleQuickAccess = undefined; - } - show(value = '', options) { - var _a; - // Find provider for the value to show - const [provider, descriptor] = this.getOrInstantiateProvider(value); - // Return early if quick access is already showing on that same prefix - const visibleQuickAccess = this.visibleQuickAccess; - const visibleDescriptor = visibleQuickAccess === null || visibleQuickAccess === void 0 ? void 0 : visibleQuickAccess.descriptor; - if (visibleQuickAccess && descriptor && visibleDescriptor === descriptor) { - // Apply value only if it is more specific than the prefix - // from the provider and we are not instructed to preserve - if (value !== descriptor.prefix && !(options === null || options === void 0 ? void 0 : options.preserveValue)) { - visibleQuickAccess.picker.value = value; - } - // Always adjust selection - this.adjustValueSelection(visibleQuickAccess.picker, descriptor, options); +class TreeNodeListMouseController extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["MouseController"] { + constructor(list, tree) { + super(list); + this.tree = tree; + } + onViewPointer(e) { + if (Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.browserEvent.target) || Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isMonacoEditor"])(e.browserEvent.target)) { return; } - // Rewrite the filter value based on certain rules unless disabled - if (descriptor && !(options === null || options === void 0 ? void 0 : options.preserveValue)) { - let newValue = undefined; - // If we have a visible provider with a value, take it's filter value but - // rewrite to new provider prefix in case they differ - if (visibleQuickAccess && visibleDescriptor && visibleDescriptor !== descriptor) { - const newValueCandidateWithoutPrefix = visibleQuickAccess.value.substr(visibleDescriptor.prefix.length); - if (newValueCandidateWithoutPrefix) { - newValue = `${descriptor.prefix}${newValueCandidateWithoutPrefix}`; - } - } - // Otherwise, take a default value as instructed - if (!newValue) { - const defaultFilterValue = provider === null || provider === void 0 ? void 0 : provider.defaultFilterValue; - if (defaultFilterValue === _common_quickAccess_js__WEBPACK_IMPORTED_MODULE_2__["DefaultQuickAccessFilterValue"].LAST) { - newValue = this.lastAcceptedPickerValues.get(descriptor); - } - else if (typeof defaultFilterValue === 'string') { - newValue = `${descriptor.prefix}${defaultFilterValue}`; - } - } - if (typeof newValue === 'string') { - value = newValue; - } + const node = e.element; + if (!node) { + return super.onViewPointer(e); } - // Create a picker for the provider to use with the initial value - // and adjust the filtering to exclude the prefix from filtering - const disposables = new _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); - const picker = disposables.add(this.quickInputService.createQuickPick()); - picker.value = value; - this.adjustValueSelection(picker, descriptor, options); - picker.placeholder = descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder; - picker.quickNavigate = options === null || options === void 0 ? void 0 : options.quickNavigateConfiguration; - picker.hideInput = !!picker.quickNavigate && !visibleQuickAccess; // only hide input if there was no picker opened already - if (typeof (options === null || options === void 0 ? void 0 : options.itemActivation) === 'number' || (options === null || options === void 0 ? void 0 : options.quickNavigateConfiguration)) { - picker.itemActivation = (_a = options === null || options === void 0 ? void 0 : options.itemActivation) !== null && _a !== void 0 ? _a : _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__["ItemActivation"].SECOND /* quick nav is always second */; - } - picker.contextKey = descriptor === null || descriptor === void 0 ? void 0 : descriptor.contextKey; - picker.filterValue = (value) => value.substring(descriptor ? descriptor.prefix.length : 0); - if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder) { - picker.ariaLabel = descriptor === null || descriptor === void 0 ? void 0 : descriptor.placeholder; - } - // Register listeners - const cancellationToken = this.registerPickerListeners(picker, provider, descriptor, value, disposables); - // Ask provider to fill the picker as needed if we have one - if (provider) { - disposables.add(provider.provide(picker, cancellationToken)); - } - // Finally, show the picker. This is important because a provider - // may not call this and then our disposables would leak that rely - // on the onDidHide event. - picker.show(); - } - adjustValueSelection(picker, descriptor, options) { - var _a; - let valueSelection; - // Preserve: just always put the cursor at the end - if (options === null || options === void 0 ? void 0 : options.preserveValue) { - valueSelection = [picker.value.length, picker.value.length]; + if (this.isSelectionRangeChangeEvent(e) || this.isSelectionSingleChangeEvent(e)) { + return super.onViewPointer(e); + } + const target = e.browserEvent.target; + const onTwistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'monaco-tl-twistie') + || (Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'monaco-icon-label') && Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(target, 'folder-icon') && e.browserEvent.offsetX < 16); + let expandOnlyOnTwistieClick = false; + if (typeof this.tree.expandOnlyOnTwistieClick === 'function') { + expandOnlyOnTwistieClick = this.tree.expandOnlyOnTwistieClick(node.element); } - // Otherwise: select the value up until the prefix else { - valueSelection = [(_a = descriptor === null || descriptor === void 0 ? void 0 : descriptor.prefix.length) !== null && _a !== void 0 ? _a : 0, picker.value.length]; + expandOnlyOnTwistieClick = !!this.tree.expandOnlyOnTwistieClick; } - picker.valueSelection = valueSelection; - } - registerPickerListeners(picker, provider, descriptor, value, disposables) { - // Remember as last visible picker and clean up once picker get's disposed - const visibleQuickAccess = this.visibleQuickAccess = { picker, descriptor, value }; - disposables.add(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - if (visibleQuickAccess === this.visibleQuickAccess) { - this.visibleQuickAccess = undefined; - } - })); - // Whenever the value changes, check if the provider has - // changed and if so - re-create the picker from the beginning - disposables.add(picker.onDidChangeValue(value => { - const [providerForValue] = this.getOrInstantiateProvider(value); - if (providerForValue !== provider) { - this.show(value, { preserveValue: true } /* do not rewrite value from user typing! */); - } - else { - visibleQuickAccess.value = value; // remember the value in our visible one + if (expandOnlyOnTwistieClick && !onTwistie) { + return super.onViewPointer(e); + } + if (this.tree.expandOnlyOnDoubleClick && e.browserEvent.detail !== 2 && !onTwistie) { + return super.onViewPointer(e); + } + if (node.collapsible) { + const model = this.tree.model; // internal + const location = model.getNodeLocation(node); + const recursive = e.browserEvent.altKey; + model.setCollapsed(location, undefined, recursive); + if (expandOnlyOnTwistieClick && onTwistie) { + return; } - })); - // Remember picker input for future use when accepting - if (descriptor) { - disposables.add(picker.onDidAccept(() => { - this.lastAcceptedPickerValues.set(descriptor, picker.value); - })); } - // Create a cancellation token source that is valid as long as the - // picker has not been closed without picking an item - const cts = disposables.add(new _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__["CancellationTokenSource"]()); - Object(_base_common_functional_js__WEBPACK_IMPORTED_MODULE_6__["once"])(picker.onDidHide)(() => { - if (picker.selectedItems.length === 0) { - cts.cancel(); + super.onViewPointer(e); + } + onDoubleClick(e) { + const onTwistie = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["hasClass"])(e.browserEvent.target, 'monaco-tl-twistie'); + if (onTwistie) { + return; + } + super.onDoubleClick(e); + } +} +/** + * We use this List subclass to restore selection and focus as nodes + * get rendered in the list, possibly due to a node expand() call. + */ +class TreeNodeList extends _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["List"] { + constructor(user, container, virtualDelegate, renderers, focusTrait, selectionTrait, options) { + super(user, container, virtualDelegate, renderers, options); + this.focusTrait = focusTrait; + this.selectionTrait = selectionTrait; + } + createMouseController(options) { + return new TreeNodeListMouseController(this, options.tree); + } + splice(start, deleteCount, elements = []) { + super.splice(start, deleteCount, elements); + if (elements.length === 0) { + return; + } + const additionalFocus = []; + const additionalSelection = []; + elements.forEach((node, index) => { + if (this.focusTrait.has(node)) { + additionalFocus.push(start + index); + } + if (this.selectionTrait.has(node)) { + additionalSelection.push(start + index); } - // Start to dispose once picker hides - disposables.dispose(); }); - return cts.token; - } - getOrInstantiateProvider(value) { - const providerDescriptor = this.registry.getQuickAccessProvider(value); - if (!providerDescriptor) { - return [undefined, undefined]; + if (additionalFocus.length > 0) { + super.setFocus(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["distinctES6"])([...super.getFocus(), ...additionalFocus])); } - let provider = this.mapProviderToDescriptor.get(providerDescriptor); - if (!provider) { - provider = this.instantiationService.createInstance(providerDescriptor.ctor); - this.mapProviderToDescriptor.set(providerDescriptor, provider); + if (additionalSelection.length > 0) { + super.setSelection(Object(_common_arrays_js__WEBPACK_IMPORTED_MODULE_8__["distinctES6"])([...super.getSelection(), ...additionalSelection])); } - return [provider, providerDescriptor]; } -}; -QuickAccessController = __decorate([ - __param(0, _common_quickInput_js__WEBPACK_IMPORTED_MODULE_0__["IQuickInputService"]), - __param(1, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_5__["IInstantiationService"]) -], QuickAccessController); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js ***! - \*************************************************************************************/ -/*! exports provided: QuickInputService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickInputService", function() { return QuickInputService; }); -/* harmony import */ var _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/browser/layoutService.js */ "./node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../base/common/cancellation.js */ "./node_modules/monaco-editor/esm/vs/base/common/cancellation.js"); -/* harmony import */ var _theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../theme/common/styler.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js"); -/* harmony import */ var _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../contextkey/common/contextkey.js */ "./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js"); -/* harmony import */ var _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../accessibility/common/accessibility.js */ "./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"); -/* harmony import */ var _base_parts_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/parts/quickinput/browser/quickInput.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/quickInput.js"); -/* harmony import */ var _list_browser_listService_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../list/browser/listService.js */ "./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js"); -/* harmony import */ var _quickAccess_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./quickAccess.js */ "./node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - - - - - - - - - - - -let QuickInputService = class QuickInputService extends _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__["Themable"] { - constructor(instantiationService, contextKeyService, themeService, accessibilityService, layoutService) { - super(themeService); - this.instantiationService = instantiationService; - this.contextKeyService = contextKeyService; - this.accessibilityService = accessibilityService; - this.layoutService = layoutService; - this.contexts = new Map(); + setFocus(indexes, browserEvent, fromAPI = false) { + super.setFocus(indexes, browserEvent); + if (!fromAPI) { + this.focusTrait.set(indexes.map(i => this.element(i)), browserEvent); + } + } + setSelection(indexes, browserEvent, fromAPI = false) { + super.setSelection(indexes, browserEvent); + if (!fromAPI) { + this.selectionTrait.set(indexes.map(i => this.element(i)), browserEvent); + } } - get controller() { - if (!this._controller) { - this._controller = this._register(this.createController()); +} +class AbstractTree { + constructor(user, container, delegate, renderers, _options = {}) { + this._options = _options; + this.eventBufferer = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["EventBufferer"](); + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["DisposableStore"](); + this._onWillRefilter = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this.onWillRefilter = this._onWillRefilter.event; + this._onDidUpdateOptions = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + const treeDelegate = new ComposedTreeDelegate(delegate); + const onDidChangeCollapseStateRelay = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Relay"](); + const onDidChangeActiveNodes = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Relay"](); + const activeNodes = new EventCollection(onDidChangeActiveNodes.event); + this.renderers = renderers.map(r => new TreeRenderer(r, () => this.model, onDidChangeCollapseStateRelay.event, activeNodes, _options)); + for (let r of this.renderers) { + this.disposables.add(r); } - return this._controller; - } - get quickAccess() { - if (!this._quickAccess) { - this._quickAccess = this._register(this.instantiationService.createInstance(_quickAccess_js__WEBPACK_IMPORTED_MODULE_10__["QuickAccessController"])); + let filter; + if (_options.keyboardNavigationLabelProvider) { + filter = new TypeFilter(this, _options.keyboardNavigationLabelProvider, _options.filter); + _options = Object.assign(Object.assign({}, _options), { filter: filter }); // TODO need typescript help here + this.disposables.add(filter); } - return this._quickAccess; - } - createController(host = this.layoutService, options) { - var _a, _b; - const defaultOptions = { - idPrefix: 'quickInput_', - container: host.container, - ignoreFocusOut: () => false, - isScreenReaderOptimized: () => this.accessibilityService.isScreenReaderOptimized(), - backKeybindingLabel: () => undefined, - setContextKey: (id) => this.setContextKey(id), - returnFocus: () => host.focus(), - createList: (user, container, delegate, renderers, options) => this.instantiationService.createInstance(_list_browser_listService_js__WEBPACK_IMPORTED_MODULE_9__["WorkbenchList"], user, container, delegate, renderers, options), - styles: this.computeStyles() - }; - const controller = this._register(new _base_parts_quickinput_browser_quickInput_js__WEBPACK_IMPORTED_MODULE_8__["QuickInputController"](Object.assign(Object.assign({}, defaultOptions), options))); - controller.layout(host.dimension, (_b = (_a = host.offset) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0); - // Layout changes - this._register(host.onLayout(dimension => { var _a, _b; return controller.layout(dimension, (_b = (_a = host.offset) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0); })); - // Context keys - this._register(controller.onShow(() => this.resetContextKeys())); - this._register(controller.onHide(() => this.resetContextKeys())); - return controller; - } - setContextKey(id) { - let key; - if (id) { - key = this.contexts.get(id); - if (!key) { - key = new _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["RawContextKey"](id, false) - .bindTo(this.contextKeyService); - this.contexts.set(id, key); + this.focus = new Trait(_options.identityProvider); + this.selection = new Trait(_options.identityProvider); + this.view = new TreeNodeList(user, container, treeDelegate, this.renderers, this.focus, this.selection, Object.assign(Object.assign({}, asListOptions(() => this.model, _options)), { tree: this })); + this.model = this.createModel(user, this.view, _options); + onDidChangeCollapseStateRelay.input = this.model.onDidChangeCollapseState; + const onDidModelSplice = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].forEach(this.model.onDidSplice, e => { + this.eventBufferer.bufferEvents(() => { + this.focus.onDidModelSplice(e); + this.selection.onDidModelSplice(e); + }); + }); + // Make sure the `forEach` always runs + onDidModelSplice(() => null, null, this.disposables); + // Active nodes can change when the model changes or when focus or selection change. + // We debounce it with 0 delay since these events may fire in the same stack and we only + // want to run this once. It also doesn't matter if it runs on the next tick since it's only + // a nice to have UI feature. + onDidChangeActiveNodes.input = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(_common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].any(onDidModelSplice, this.focus.onDidChange, this.selection.onDidChange)) + .debounce(() => null, 0) + .map(() => { + const set = new Set(); + for (const node of this.focus.getNodes()) { + set.add(node); } + for (const node of this.selection.getNodes()) { + set.add(node); + } + return [...set.values()]; + }).event; + if (_options.keyboardSupport !== false) { + const onKeyDown = _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].chain(this.view.onKeyDown) + .filter(e => !Object(_list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["isInputElement"])(e.target)) + .map(e => new _keyboardEvent_js__WEBPACK_IMPORTED_MODULE_5__["StandardKeyboardEvent"](e)); + onKeyDown.filter(e => e.keyCode === 15 /* LeftArrow */).on(this.onLeftArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 17 /* RightArrow */).on(this.onRightArrow, this, this.disposables); + onKeyDown.filter(e => e.keyCode === 10 /* Space */).on(this.onSpace, this, this.disposables); } - if (key && key.get()) { - return; // already active context - } - this.resetContextKeys(); - if (key) { - key.set(true); + if (_options.keyboardNavigationLabelProvider) { + const delegate = _options.keyboardNavigationDelegate || _list_listWidget_js__WEBPACK_IMPORTED_MODULE_2__["DefaultKeyboardNavigationDelegate"]; + this.typeFilterController = new TypeFilterController(this, this.model, this.view, filter, delegate); + this.focusNavigationFilter = node => this.typeFilterController.shouldAllowFocus(node); + this.disposables.add(this.typeFilterController); } + this.styleElement = Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["createStyleSheet"])(this.view.getHTMLElement()); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.getHTMLElement(), 'always', this._options.renderIndentGuides === RenderIndentGuides.Always); } - resetContextKeys() { - this.contexts.forEach(context => { - if (context.get()) { - context.reset(); - } + get onDidChangeFocus() { return this.eventBufferer.wrapEvent(this.focus.onDidChange); } + get onDidChangeSelection() { return this.eventBufferer.wrapEvent(this.selection.onDidChange); } + get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.view.onMouseDblClick, asTreeMouseEvent); } + get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.view.onPointer, asTreeMouseEvent); } + get onDidFocus() { return this.view.onDidFocus; } + get onDidChangeCollapseState() { return this.model.onDidChangeCollapseState; } + get expandOnlyOnDoubleClick() { var _a; return (_a = this._options.expandOnlyOnDoubleClick) !== null && _a !== void 0 ? _a : false; } + get expandOnlyOnTwistieClick() { return typeof this._options.expandOnlyOnTwistieClick === 'undefined' ? false : this._options.expandOnlyOnTwistieClick; } + get onDidDispose() { return this.view.onDidDispose; } + updateOptions(optionsUpdate = {}) { + this._options = Object.assign(Object.assign({}, this._options), optionsUpdate); + for (const renderer of this.renderers) { + renderer.updateOptions(optionsUpdate); + } + this.view.updateOptions({ + enableKeyboardNavigation: this._options.simpleKeyboardNavigation, + automaticKeyboardNavigation: this._options.automaticKeyboardNavigation, + smoothScrolling: this._options.smoothScrolling, + horizontalScrolling: this._options.horizontalScrolling }); + if (this.typeFilterController) { + this.typeFilterController.updateOptions(this._options); + } + this._onDidUpdateOptions.fire(this._options); + Object(_dom_js__WEBPACK_IMPORTED_MODULE_3__["toggleClass"])(this.getHTMLElement(), 'always', this._options.renderIndentGuides === RenderIndentGuides.Always); } - pick(picks, options = {}, token = _base_common_cancellation_js__WEBPACK_IMPORTED_MODULE_4__["CancellationToken"].None) { - return this.controller.pick(picks, options, token); + get options() { + return this._options; } - createQuickPick() { - return this.controller.createQuickPick(); + // Widget + getHTMLElement() { + return this.view.getHTMLElement(); } - updateStyles() { - this.controller.applyStyles(this.computeStyles()); + get scrollTop() { + return this.view.scrollTop; } - computeStyles() { - return { - widget: Object.assign({}, Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - quickInputBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["quickInputBackground"], - quickInputForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["quickInputForeground"], - quickInputTitleBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["quickInputTitleBackground"], - contrastBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["contrastBorder"], - widgetShadow: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["widgetShadow"] - })), - inputBox: Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - inputForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputForeground"], - inputBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputBackground"], - inputBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputBorder"], - inputValidationInfoBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationInfoBackground"], - inputValidationInfoForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationInfoForeground"], - inputValidationInfoBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationInfoBorder"], - inputValidationWarningBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationWarningBackground"], - inputValidationWarningForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationWarningForeground"], - inputValidationWarningBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationWarningBorder"], - inputValidationErrorBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationErrorBackground"], - inputValidationErrorForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationErrorForeground"], - inputValidationErrorBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["inputValidationErrorBorder"] - }), - countBadge: Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - badgeBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["badgeBackground"], - badgeForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["badgeForeground"], - badgeBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["contrastBorder"] - }), - button: Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - buttonForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["buttonForeground"], - buttonBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["buttonBackground"], - buttonHoverBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["buttonHoverBackground"], - buttonBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["contrastBorder"] - }), - progressBar: Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - progressBarBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["progressBarBackground"] - }), - list: Object(_theme_common_styler_js__WEBPACK_IMPORTED_MODULE_5__["computeStyles"])(this.theme, { - listBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["quickInputBackground"], - // Look like focused when inactive. - listInactiveFocusForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["listFocusForeground"], - listInactiveFocusBackground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["listFocusBackground"], - listFocusOutline: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["activeContrastBorder"], - listInactiveFocusOutline: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["activeContrastBorder"], - pickerGroupBorder: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["pickerGroupBorder"], - pickerGroupForeground: _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_3__["pickerGroupForeground"] - }) - }; + set scrollTop(scrollTop) { + this.view.scrollTop = scrollTop; } -}; -QuickInputService = __decorate([ - __param(0, _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_1__["IInstantiationService"]), - __param(1, _contextkey_common_contextkey_js__WEBPACK_IMPORTED_MODULE_6__["IContextKeyService"]), - __param(2, _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_2__["IThemeService"]), - __param(3, _accessibility_common_accessibility_js__WEBPACK_IMPORTED_MODULE_7__["IAccessibilityService"]), - __param(4, _layout_browser_layoutService_js__WEBPACK_IMPORTED_MODULE_0__["ILayoutService"]) -], QuickInputService); - - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js ***! - \*************************************************************************************/ -/*! exports provided: DefaultQuickAccessFilterValue, Extensions, QuickAccessRegistry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultQuickAccessFilterValue", function() { return DefaultQuickAccessFilterValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuickAccessRegistry", function() { return QuickAccessRegistry; }); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/arrays.js */ "./node_modules/monaco-editor/esm/vs/base/common/arrays.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -var DefaultQuickAccessFilterValue; -(function (DefaultQuickAccessFilterValue) { - /** - * Keep the value as it is given to quick access. - */ - DefaultQuickAccessFilterValue[DefaultQuickAccessFilterValue["PRESERVE"] = 0] = "PRESERVE"; - /** - * Use the value that was used last time something was accepted from the picker. - */ - DefaultQuickAccessFilterValue[DefaultQuickAccessFilterValue["LAST"] = 1] = "LAST"; -})(DefaultQuickAccessFilterValue || (DefaultQuickAccessFilterValue = {})); -const Extensions = { - Quickaccess: 'workbench.contributions.quickaccess' -}; -class QuickAccessRegistry { - constructor() { - this.providers = []; - this.defaultProvider = undefined; + domFocus() { + this.view.domFocus(); + } + layout(height, width) { + this.view.layout(height, width); } - registerQuickAccessProvider(provider) { - // Extract the default provider when no prefix is present - if (provider.prefix.length === 0) { - this.defaultProvider = provider; + style(styles) { + const suffix = `.${this.view.domId}`; + const content = []; + if (styles.treeIndentGuidesStroke) { + content.push(`.monaco-list${suffix}:hover .monaco-tl-indent > .indent-guide, .monaco-list${suffix}.always .monaco-tl-indent > .indent-guide { border-color: ${styles.treeIndentGuidesStroke.transparent(0.4)}; }`); + content.push(`.monaco-list${suffix} .monaco-tl-indent > .indent-guide.active { border-color: ${styles.treeIndentGuidesStroke}; }`); } - else { - this.providers.push(provider); - } - // sort the providers by decreasing prefix length, such that longer - // prefixes take priority: 'ext' vs 'ext install' - the latter should win - this.providers.sort((providerA, providerB) => providerB.prefix.length - providerA.prefix.length); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["toDisposable"])(() => { - this.providers.splice(this.providers.indexOf(provider), 1); - if (this.defaultProvider === provider) { - this.defaultProvider = undefined; - } - }); + const newStyles = content.join('\n'); + if (newStyles !== this.styleElement.innerHTML) { + this.styleElement.innerHTML = newStyles; + } + this.view.style(styles); } - getQuickAccessProviders() { - return Object(_base_common_arrays_js__WEBPACK_IMPORTED_MODULE_1__["coalesce"])([this.defaultProvider, ...this.providers]); + collapse(location, recursive = false) { + return this.model.setCollapsed(location, true, recursive); } - getQuickAccessProvider(prefix) { - const result = prefix ? (this.providers.find(provider => prefix.startsWith(provider.prefix)) || undefined) : undefined; - return result || this.defaultProvider; + expand(location, recursive = false) { + return this.model.setCollapsed(location, false, recursive); } -} -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].add(Extensions.Quickaccess, new QuickAccessRegistry()); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js ***! - \************************************************************************************/ -/*! exports provided: IQuickInputService, NO_KEY_MODS, ItemActivation */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IQuickInputService", function() { return IQuickInputService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/parts/quickinput/common/quickInput.js */ "./node_modules/monaco-editor/esm/vs/base/parts/quickinput/common/quickInput.js"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NO_KEY_MODS", function() { return _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["NO_KEY_MODS"]; }); - -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ItemActivation", function() { return _base_parts_quickinput_common_quickInput_js__WEBPACK_IMPORTED_MODULE_1__["ItemActivation"]; }); - - - -const IQuickInputService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('quickInputService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js ***! - \********************************************************************************/ -/*! exports provided: Registry */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Registry", function() { return Registry; }); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/* harmony import */ var _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/assert.js */ "./node_modules/monaco-editor/esm/vs/base/common/assert.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -class RegistryImpl { - constructor() { - this.data = new Map(); + isCollapsible(location) { + return this.model.isCollapsible(location); } - add(id, data) { - _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__["ok"](_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isString"](id)); - _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__["ok"](_base_common_types_js__WEBPACK_IMPORTED_MODULE_0__["isObject"](data)); - _base_common_assert_js__WEBPACK_IMPORTED_MODULE_1__["ok"](!this.data.has(id), 'There is already an extension with this id'); - this.data.set(id, data); + setCollapsible(location, collapsible) { + return this.model.setCollapsible(location, collapsible); } - as(id) { - return this.data.get(id) || null; + isCollapsed(location) { + return this.model.isCollapsed(location); } -} -const Registry = new RegistryImpl(); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js": -/*!****************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/severityIcon/common/severityIcon.js ***! - \****************************************************************************************/ -/*! exports provided: SeverityIcon */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeverityIcon", function() { return SeverityIcon; }); -/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/common/themeService.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"); -/* harmony import */ var _theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/common/colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/* harmony import */ var _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/codicons.js */ "./node_modules/monaco-editor/esm/vs/base/common/codicons.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -var SeverityIcon; -(function (SeverityIcon) { - function className(severity) { - switch (severity) { - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__["default"].Ignore: - return 'severity-ignore ' + _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].info.classNames; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__["default"].Info: - return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].info.classNames; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__["default"].Warning: - return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].warning.classNames; - case _base_common_severity_js__WEBPACK_IMPORTED_MODULE_0__["default"].Error: - return _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].error.classNames; - default: - return ''; - } - } - SeverityIcon.className = className; -})(SeverityIcon || (SeverityIcon = {})); -Object(_theme_common_themeService_js__WEBPACK_IMPORTED_MODULE_1__["registerThemingParticipant"])((theme, collector) => { - const errorIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["problemsErrorIconForeground"]); - if (errorIconForeground) { - const errorCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].error.cssSelector; - collector.addRule(` - .monaco-editor .zone-widget ${errorCodiconSelector}, - .markers-panel .marker-icon${errorCodiconSelector}, - .extensions-viewlet > .extensions ${errorCodiconSelector} { - color: ${errorIconForeground}; - } - `); - } - const warningIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["problemsWarningIconForeground"]); - if (warningIconForeground) { - const warningCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].warning.cssSelector; - collector.addRule(` - .monaco-editor .zone-widget ${warningCodiconSelector}, - .markers-panel .marker-icon${warningCodiconSelector}, - .extensions-viewlet > .extensions ${warningCodiconSelector}, - .extension-editor ${warningCodiconSelector} { - color: ${warningIconForeground}; - } - `); - } - const infoIconForeground = theme.getColor(_theme_common_colorRegistry_js__WEBPACK_IMPORTED_MODULE_2__["problemsInfoIconForeground"]); - if (infoIconForeground) { - const infoCodiconSelector = _base_common_codicons_js__WEBPACK_IMPORTED_MODULE_3__["Codicon"].info.cssSelector; - collector.addRule(` - .monaco-editor .zone-widget ${infoCodiconSelector}, - .markers-panel .marker-icon${infoCodiconSelector}, - .extensions-viewlet > .extensions ${infoCodiconSelector}, - .extension-editor ${infoCodiconSelector} { - color: ${infoIconForeground}; - } - `); + refilter() { + this._onWillRefilter.fire(undefined); + this.model.refilter(); } -}); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js": -/*!******************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js ***! - \******************************************************************************/ -/*! exports provided: IStorageService, WillSaveStateReason, InMemoryStorageService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IStorageService", function() { return IStorageService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WillSaveStateReason", function() { return WillSaveStateReason; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InMemoryStorageService", function() { return InMemoryStorageService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _base_common_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/types.js */ "./node_modules/monaco-editor/esm/vs/base/common/types.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const IStorageService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('storageService'); -var WillSaveStateReason; -(function (WillSaveStateReason) { - WillSaveStateReason[WillSaveStateReason["NONE"] = 0] = "NONE"; - WillSaveStateReason[WillSaveStateReason["SHUTDOWN"] = 1] = "SHUTDOWN"; -})(WillSaveStateReason || (WillSaveStateReason = {})); -class InMemoryStorageService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_2__["Disposable"] { - constructor() { - super(...arguments); - this._onDidChangeStorage = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this._onWillSaveState = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_1__["Emitter"]()); - this.onWillSaveState = this._onWillSaveState.event; - this.globalCache = new Map(); - this.workspaceCache = new Map(); + setSelection(elements, browserEvent) { + const nodes = elements.map(e => this.model.getNode(e)); + this.selection.set(nodes, browserEvent); + const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1); + this.view.setSelection(indexes, browserEvent, true); } - getCache(scope) { - return scope === 0 /* GLOBAL */ ? this.globalCache : this.workspaceCache; + getSelection() { + return this.selection.get(); } - get(key, scope, fallbackValue) { - const value = this.getCache(scope).get(key); - if (Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"])(value)) { - return fallbackValue; - } - return value; + setFocus(elements, browserEvent) { + const nodes = elements.map(e => this.model.getNode(e)); + this.focus.set(nodes, browserEvent); + const indexes = elements.map(e => this.model.getListIndex(e)).filter(i => i > -1); + this.view.setFocus(indexes, browserEvent, true); } - getBoolean(key, scope, fallbackValue) { - const value = this.getCache(scope).get(key); - if (Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"])(value)) { - return fallbackValue; - } - return value === 'true'; + focusNext(n = 1, loop = false, browserEvent, filter = this.focusNavigationFilter) { + this.view.focusNext(n, loop, browserEvent, filter); } - getNumber(key, scope, fallbackValue) { - const value = this.getCache(scope).get(key); - if (Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"])(value)) { - return fallbackValue; - } - return parseInt(value, 10); + getFocus() { + return this.focus.get(); } - store(key, value, scope) { - // We remove the key for undefined/null values - if (Object(_base_common_types_js__WEBPACK_IMPORTED_MODULE_3__["isUndefinedOrNull"])(value)) { - return this.remove(key, scope); - } - // Otherwise, convert to String and store - const valueStr = String(value); - // Return early if value already set - const currentValue = this.getCache(scope).get(key); - if (currentValue === valueStr) { - return Promise.resolve(); + reveal(location, relativeTop) { + this.model.expandTo(location); + const index = this.model.getListIndex(location); + if (index === -1) { + return; } - // Update in cache - this.getCache(scope).set(key, valueStr); - // Events - this._onDidChangeStorage.fire({ scope, key }); - return Promise.resolve(); + this.view.reveal(index, relativeTop); } - remove(key, scope) { - const wasDeleted = this.getCache(scope).delete(key); - if (!wasDeleted) { - return Promise.resolve(); // Return early if value already deleted + /** + * Returns the relative position of an element rendered in the list. + * Returns `null` if the element isn't *entirely* in the visible viewport. + */ + getRelativeTop(location) { + const index = this.model.getListIndex(location); + if (index === -1) { + return null; } - // Events - this._onDidChangeStorage.fire({ scope, key }); - return Promise.resolve(); - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js ***! - \**********************************************************************************/ -/*! exports provided: ITelemetryService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITelemetryService", function() { return ITelemetryService; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const ITelemetryService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('telemetryService'); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js ***! - \**********************************************************************************/ -/*! exports provided: Extensions, registerColor, foreground, errorForeground, iconForeground, focusBorder, contrastBorder, activeContrastBorder, textLinkForeground, textCodeBlockBackground, widgetShadow, inputBackground, inputForeground, inputBorder, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, inputValidationInfoBackground, inputValidationInfoForeground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningForeground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorForeground, inputValidationErrorBorder, selectBackground, selectForeground, buttonForeground, buttonBackground, buttonHoverBackground, badgeBackground, badgeForeground, scrollbarShadow, scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, progressBarBackground, editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder, editorInfoForeground, editorInfoBorder, editorHintForeground, editorHintBorder, editorBackground, editorForeground, editorWidgetBackground, editorWidgetForeground, editorWidgetBorder, editorWidgetResizeBorder, quickInputBackground, quickInputForeground, quickInputTitleBackground, pickerGroupForeground, pickerGroupBorder, editorSelectionBackground, editorSelectionForeground, editorInactiveSelection, editorSelectionHighlight, editorSelectionHighlightBorder, editorFindMatch, editorFindMatchHighlight, editorFindRangeHighlight, editorFindMatchBorder, editorFindMatchHighlightBorder, editorFindRangeHighlightBorder, editorHoverHighlight, editorHoverBackground, editorHoverForeground, editorHoverBorder, editorHoverStatusBarBackground, editorActiveLinkForeground, editorLightBulbForeground, editorLightBulbAutoFixForeground, defaultInsertColor, defaultRemoveColor, diffInserted, diffRemoved, diffInsertedOutline, diffRemovedOutline, diffBorder, diffDiagonalFill, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listInactiveSelectionForeground, listInactiveFocusBackground, listHoverBackground, listHoverForeground, listDropBackground, listHighlightForeground, listFilterWidgetBackground, listFilterWidgetOutline, listFilterWidgetNoMatchesOutline, treeIndentGuidesStroke, menuBorder, menuForeground, menuBackground, menuSelectionForeground, menuSelectionBackground, menuSelectionBorder, menuSeparatorBackground, snippetTabstopHighlightBackground, snippetTabstopHighlightBorder, snippetFinalTabstopHighlightBackground, snippetFinalTabstopHighlightBorder, overviewRulerFindMatchForeground, overviewRulerSelectionHighlightForeground, minimapFindMatch, minimapSelection, minimapError, minimapWarning, minimapBackground, minimapSliderBackground, minimapSliderHoverBackground, minimapSliderActiveBackground, problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground, darken, lighten, transparent, oneOf, resolveColorValue, workbenchColorsSchemaId */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerColor", function() { return registerColor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "foreground", function() { return foreground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "errorForeground", function() { return errorForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconForeground", function() { return iconForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focusBorder", function() { return focusBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contrastBorder", function() { return contrastBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "activeContrastBorder", function() { return activeContrastBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textLinkForeground", function() { return textLinkForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textCodeBlockBackground", function() { return textCodeBlockBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "widgetShadow", function() { return widgetShadow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputBackground", function() { return inputBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputForeground", function() { return inputForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputBorder", function() { return inputBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputActiveOptionBorder", function() { return inputActiveOptionBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputActiveOptionBackground", function() { return inputActiveOptionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputActiveOptionForeground", function() { return inputActiveOptionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationInfoBackground", function() { return inputValidationInfoBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationInfoForeground", function() { return inputValidationInfoForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationInfoBorder", function() { return inputValidationInfoBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationWarningBackground", function() { return inputValidationWarningBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationWarningForeground", function() { return inputValidationWarningForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationWarningBorder", function() { return inputValidationWarningBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationErrorBackground", function() { return inputValidationErrorBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationErrorForeground", function() { return inputValidationErrorForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputValidationErrorBorder", function() { return inputValidationErrorBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectBackground", function() { return selectBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectForeground", function() { return selectForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buttonForeground", function() { return buttonForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buttonBackground", function() { return buttonBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buttonHoverBackground", function() { return buttonHoverBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "badgeBackground", function() { return badgeBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "badgeForeground", function() { return badgeForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollbarShadow", function() { return scrollbarShadow; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollbarSliderBackground", function() { return scrollbarSliderBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollbarSliderHoverBackground", function() { return scrollbarSliderHoverBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollbarSliderActiveBackground", function() { return scrollbarSliderActiveBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "progressBarBackground", function() { return progressBarBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorErrorForeground", function() { return editorErrorForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorErrorBorder", function() { return editorErrorBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWarningForeground", function() { return editorWarningForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWarningBorder", function() { return editorWarningBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorInfoForeground", function() { return editorInfoForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorInfoBorder", function() { return editorInfoBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHintForeground", function() { return editorHintForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHintBorder", function() { return editorHintBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorBackground", function() { return editorBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorForeground", function() { return editorForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWidgetBackground", function() { return editorWidgetBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWidgetForeground", function() { return editorWidgetForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWidgetBorder", function() { return editorWidgetBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorWidgetResizeBorder", function() { return editorWidgetResizeBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quickInputBackground", function() { return quickInputBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quickInputForeground", function() { return quickInputForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quickInputTitleBackground", function() { return quickInputTitleBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pickerGroupForeground", function() { return pickerGroupForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pickerGroupBorder", function() { return pickerGroupBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSelectionBackground", function() { return editorSelectionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSelectionForeground", function() { return editorSelectionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorInactiveSelection", function() { return editorInactiveSelection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSelectionHighlight", function() { return editorSelectionHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorSelectionHighlightBorder", function() { return editorSelectionHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindMatch", function() { return editorFindMatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindMatchHighlight", function() { return editorFindMatchHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindRangeHighlight", function() { return editorFindRangeHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindMatchBorder", function() { return editorFindMatchBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindMatchHighlightBorder", function() { return editorFindMatchHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorFindRangeHighlightBorder", function() { return editorFindRangeHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHoverHighlight", function() { return editorHoverHighlight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHoverBackground", function() { return editorHoverBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHoverForeground", function() { return editorHoverForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHoverBorder", function() { return editorHoverBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorHoverStatusBarBackground", function() { return editorHoverStatusBarBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorActiveLinkForeground", function() { return editorActiveLinkForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorLightBulbForeground", function() { return editorLightBulbForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editorLightBulbAutoFixForeground", function() { return editorLightBulbAutoFixForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultInsertColor", function() { return defaultInsertColor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultRemoveColor", function() { return defaultRemoveColor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffInserted", function() { return diffInserted; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffRemoved", function() { return diffRemoved; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffInsertedOutline", function() { return diffInsertedOutline; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffRemovedOutline", function() { return diffRemovedOutline; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffBorder", function() { return diffBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diffDiagonalFill", function() { return diffDiagonalFill; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listFocusBackground", function() { return listFocusBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listFocusForeground", function() { return listFocusForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listActiveSelectionBackground", function() { return listActiveSelectionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listActiveSelectionForeground", function() { return listActiveSelectionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listInactiveSelectionBackground", function() { return listInactiveSelectionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listInactiveSelectionForeground", function() { return listInactiveSelectionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listInactiveFocusBackground", function() { return listInactiveFocusBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listHoverBackground", function() { return listHoverBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listHoverForeground", function() { return listHoverForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listDropBackground", function() { return listDropBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listHighlightForeground", function() { return listHighlightForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listFilterWidgetBackground", function() { return listFilterWidgetBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listFilterWidgetOutline", function() { return listFilterWidgetOutline; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listFilterWidgetNoMatchesOutline", function() { return listFilterWidgetNoMatchesOutline; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "treeIndentGuidesStroke", function() { return treeIndentGuidesStroke; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuBorder", function() { return menuBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuForeground", function() { return menuForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuBackground", function() { return menuBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuSelectionForeground", function() { return menuSelectionForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuSelectionBackground", function() { return menuSelectionBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuSelectionBorder", function() { return menuSelectionBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "menuSeparatorBackground", function() { return menuSeparatorBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snippetTabstopHighlightBackground", function() { return snippetTabstopHighlightBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snippetTabstopHighlightBorder", function() { return snippetTabstopHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snippetFinalTabstopHighlightBackground", function() { return snippetFinalTabstopHighlightBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snippetFinalTabstopHighlightBorder", function() { return snippetFinalTabstopHighlightBorder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerFindMatchForeground", function() { return overviewRulerFindMatchForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overviewRulerSelectionHighlightForeground", function() { return overviewRulerSelectionHighlightForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapFindMatch", function() { return minimapFindMatch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapSelection", function() { return minimapSelection; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapError", function() { return minimapError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapWarning", function() { return minimapWarning; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapBackground", function() { return minimapBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapSliderBackground", function() { return minimapSliderBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapSliderHoverBackground", function() { return minimapSliderHoverBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minimapSliderActiveBackground", function() { return minimapSliderActiveBackground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "problemsErrorIconForeground", function() { return problemsErrorIconForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "problemsWarningIconForeground", function() { return problemsWarningIconForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "problemsInfoIconForeground", function() { return problemsInfoIconForeground; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return darken; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return lighten; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transparent", function() { return transparent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oneOf", function() { return oneOf; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveColorValue", function() { return resolveColorValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "workbenchColorsSchemaId", function() { return workbenchColorsSchemaId; }); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/color.js */ "./node_modules/monaco-editor/esm/vs/base/common/color.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../jsonschemas/common/jsonContributionRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js"); -/* harmony import */ var _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - - - -// color registry -const Extensions = { - ColorContribution: 'base.contributions.colors' -}; -class ColorRegistry { - constructor() { - this._onDidChangeSchema = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_2__["Emitter"](); - this.onDidChangeSchema = this._onDidChangeSchema.event; - this.colorSchema = { type: 'object', properties: {} }; - this.colorReferenceSchema = { type: 'string', enum: [], enumDescriptions: [] }; - this.colorsById = {}; - } - registerColor(id, defaults, description, needsTransparency = false, deprecationMessage) { - let colorContribution = { id, description, defaults, needsTransparency, deprecationMessage }; - this.colorsById[id] = colorContribution; - let propertySchema = { type: 'string', description, format: 'color-hex', defaultSnippets: [{ body: '${1:#ff0000}' }] }; - if (deprecationMessage) { - propertySchema.deprecationMessage = deprecationMessage; - } - this.colorSchema.properties[id] = propertySchema; - this.colorReferenceSchema.enum.push(id); - this.colorReferenceSchema.enumDescriptions.push(description); - this._onDidChangeSchema.fire(); - return id; + return this.view.getRelativeTop(index); } - resolveDefaultColor(id, theme) { - const colorDesc = this.colorsById[id]; - if (colorDesc && colorDesc.defaults) { - const colorValue = colorDesc.defaults[theme.type]; - return resolveColorValue(colorValue, theme); + // List + onLeftArrow(e) { + e.preventDefault(); + e.stopPropagation(); + const nodes = this.view.getFocusedElements(); + if (nodes.length === 0) { + return; } - return undefined; - } - getColorSchema() { - return this.colorSchema; - } - toString() { - let sorter = (a, b) => { - let cat1 = a.indexOf('.') === -1 ? 0 : 1; - let cat2 = b.indexOf('.') === -1 ? 0 : 1; - if (cat1 !== cat2) { - return cat1 - cat2; + const node = nodes[0]; + const location = this.model.getNodeLocation(node); + const didChange = this.model.setCollapsed(location, true); + if (!didChange) { + const parentLocation = this.model.getParentNodeLocation(location); + if (!parentLocation) { + return; } - return a.localeCompare(b); - }; - return Object.keys(this.colorsById).sort(sorter).map(k => `- \`${k}\`: ${this.colorsById[k].description}`).join('\n'); - } -} -const colorRegistry = new ColorRegistry(); -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].add(Extensions.ColorContribution, colorRegistry); -function registerColor(id, defaults, description, needsTransparency, deprecationMessage) { - return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage); -} -// ----- base colors -const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#616161', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); -const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('errorForeground', "Overall foreground color for error messages. This color is only used if not overridden by a component.")); -const iconForeground = registerColor('icon.foreground', { dark: '#C5C5C5', light: '#424242', hc: '#FFFFFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('iconForeground', "The default color for icons in the workbench.")); -const focusBorder = registerColor('focusBorder', { dark: '#007FD4', light: '#0090F1', hc: '#F38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); -const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); -const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); -const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hc: '#3794FF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('textLinkForeground', "Foreground color for links in text.")); -const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('textCodeBlockBackground', "Background color for code blocks in text.")); -// ----- widgets -const widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); -const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputBoxBackground', "Input box background.")); -const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputBoxForeground', "Input box foreground.")); -const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputBoxBorder', "Input box border.")); -const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC00', light: '#007ACC00', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); -const inputActiveOptionBackground = registerColor('inputOption.activeBackground', { dark: transparent(focusBorder, 0.4), light: transparent(focusBorder, 0.2), hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].transparent }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputOption.activeBackground', "Background color of activated options in input fields.")); -const inputActiveOptionForeground = registerColor('inputOption.activeForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputOption.activeForeground', "Foreground color of activated options in input fields.")); -const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationInfoBackground', "Input validation background color for information severity.")); -const inputValidationInfoForeground = registerColor('inputValidation.infoForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationInfoForeground', "Input validation foreground color for information severity.")); -const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationInfoBorder', "Input validation border color for information severity.")); -const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationWarningBackground', "Input validation background color for warning severity.")); -const inputValidationWarningForeground = registerColor('inputValidation.warningForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationWarningForeground', "Input validation foreground color for warning severity.")); -const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationWarningBorder', "Input validation border color for warning severity.")); -const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationErrorBackground', "Input validation background color for error severity.")); -const inputValidationErrorForeground = registerColor('inputValidation.errorForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationErrorForeground', "Input validation foreground color for error severity.")); -const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('inputValidationErrorBorder', "Input validation border color for error severity.")); -const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('dropdownBackground', "Dropdown background.")); -const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('dropdownForeground', "Dropdown foreground.")); -const buttonForeground = registerColor('button.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('buttonForeground', "Button foreground color.")); -const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('buttonBackground', "Button background color.")); -const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('buttonHoverBackground', "Button background color when hovering.")); -const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#C4C4C4', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); -const badgeForeground = registerColor('badge.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, light: '#333', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); -const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); -const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#797979').transparent(0.4), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('scrollbarSliderBackground', "Scrollbar slider background color.")); -const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#646464').transparent(0.7), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('scrollbarSliderHoverBackground', "Scrollbar slider background color when hovering.")); -const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#BFBFBF').transparent(0.4), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#000000').transparent(0.6), hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('scrollbarSliderActiveBackground', "Scrollbar slider background color when clicked on.")); -const progressBarBackground = registerColor('progressBar.background', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#0E70C0'), light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#0E70C0'), hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('progressBarBackground', "Background color of the progress bar that can show for long running operations.")); -const editorErrorForeground = registerColor('editorError.foreground', { dark: '#F48771', light: '#E51400', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorError.foreground', 'Foreground color of error squigglies in the editor.')); -const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#E47777').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('errorBorder', 'Border color of error boxes in the editor.')); -const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#E9A700', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.')); -const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#FFCC00').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('warningBorder', 'Border color of warning boxes in the editor.')); -const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#75BEFF', light: '#75BEFF', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorInfo.foreground', 'Foreground color of info squigglies in the editor.')); -const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#75BEFF').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('infoBorder', 'Border color of info boxes in the editor.')); -const editorHintForeground = registerColor('editorHint.foreground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorHint.foreground', 'Foreground color of hint squigglies in the editor.')); -const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex('#eeeeee').transparent(0.8) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('hintBorder', 'Border color of hint boxes in the editor.')); -/** - * Editor background color. - * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 - * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. - */ -const editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorBackground', "Editor background color.")); -/** - * Editor foreground color. - */ -const editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorForeground', "Editor default foreground color.")); -/** - * Editor widgets - */ -const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#252526', light: '#F3F3F3', hc: '#0C141F' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); -const editorWidgetForeground = registerColor('editorWidget.foreground', { dark: foreground, light: foreground, hc: foreground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorWidgetForeground', 'Foreground color of editor widgets, such as find/replace.')); -const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.')); -const editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorWidgetResizeBorder', "Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")); -/** - * Quick pick widget - */ -const quickInputBackground = registerColor('quickInput.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('pickerBackground', "Quick picker background color. The quick picker widget is the container for pickers like the command palette.")); -const quickInputForeground = registerColor('quickInput.foreground', { dark: editorWidgetForeground, light: editorWidgetForeground, hc: editorWidgetForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('pickerForeground', "Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")); -const quickInputTitleBackground = registerColor('quickInputTitle.background', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 255, 255, 0.105)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](0, 0, 0, 0.06)), hc: '#000000' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('pickerTitleBackground', "Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")); -const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('pickerGroupForeground', "Quick picker color for grouping labels.")); -const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('pickerGroupBorder', "Quick picker color for grouping borders.")); -/** - * Editor selection colors. - */ -const editorSelectionBackground = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorSelectionBackground', "Color of the editor selection.")); -const editorSelectionForeground = registerColor('editor.selectionForeground', { light: null, dark: null, hc: '#000000' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorSelectionForeground', "Color of the selected text for high contrast.")); -const editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelectionBackground, 0.5), dark: transparent(editorSelectionBackground, 0.5), hc: transparent(editorSelectionBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorInactiveSelection', "Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."), true); -const editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelectionBackground, editorBackground, 0.3, 0.6), hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorSelectionHighlight', 'Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorSelectionHighlightBorder = registerColor('editor.selectionHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorSelectionHighlightBorder', "Border color for regions with the same content as the selection.")); -/** - * Editor find match colors. - */ -const editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorFindMatch', "Color of the current search match.")); -const editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('findMatchHighlight', "Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."), true); -const editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('findRangeHighlight', "Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true); -const editorFindMatchBorder = registerColor('editor.findMatchBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorFindMatchBorder', "Border color of the current search match.")); -const editorFindMatchHighlightBorder = registerColor('editor.findMatchHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('findMatchHighlightBorder', "Border color of the other search matches.")); -const editorFindRangeHighlightBorder = registerColor('editor.findRangeHighlightBorder', { dark: null, light: null, hc: transparent(activeContrastBorder, 0.4) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('findRangeHighlightBorder', "Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."), true); -/** - * Editor hover - */ -const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('hoverHighlight', 'Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.'), true); -const editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('hoverBackground', 'Background color of the editor hover.')); -const editorHoverForeground = registerColor('editorHoverWidget.foreground', { light: editorWidgetForeground, dark: editorWidgetForeground, hc: editorWidgetForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('hoverForeground', 'Foreground color of the editor hover.')); -const editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('hoverBorder', 'Border color of the editor hover.')); -const editorHoverStatusBarBackground = registerColor('editorHoverWidget.statusBarBackground', { dark: lighten(editorHoverBackground, 0.2), light: darken(editorHoverBackground, 0.05), hc: editorWidgetBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('statusBarBackground', "Background color of the editor hover status bar.")); -/** - * Editor link colors - */ -const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].blue, hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].cyan }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('activeLinkForeground', 'Color of active links.')); -/** - * Editor lighbulb icon colors - */ -const editorLightBulbForeground = registerColor('editorLightBulb.foreground', { dark: '#FFCC00', light: '#DDB100', hc: '#FFCC00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorLightBulbForeground', "The color used for the lightbulb actions icon.")); -const editorLightBulbAutoFixForeground = registerColor('editorLightBulbAutoFix.foreground', { dark: '#75BEFF', light: '#007ACC', hc: '#75BEFF' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('editorLightBulbAutoFixForeground', "The color used for the lightbulb auto fix actions icon.")); -/** - * Diff Editor Colors - */ -const defaultInsertColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](155, 185, 85, 0.2)); -const defaultRemoveColor = new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 0, 0, 0.2)); -const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffEditorInserted', 'Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.'), true); -const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffEditorRemoved', 'Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.'), true); -const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); -const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffEditorRemovedOutline', 'Outline color for text that got removed.')); -const diffBorder = registerColor('diffEditor.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffEditorBorder', 'Border color between the two text editors.')); -const diffDiagonalFill = registerColor('diffEditor.diagonalFill', { dark: '#cccccc33', light: '#22222233', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('diffDiagonalFill', "Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")); -/** - * List and tree colors - */ -const listFocusBackground = registerColor('list.focusBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -const listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listFocusForeground', "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#0074E8', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].white, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#37373D', light: '#E4E6F1', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -const listInactiveFocusBackground = registerColor('list.inactiveFocusBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listInactiveFocusBackground', "List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); -const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listHoverForeground', "List/Tree foreground when hovering over items using the mouse.")); -const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); -const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#0066BF', hc: focusBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); -const listFilterWidgetBackground = registerColor('listFilterWidget.background', { light: '#efc1ad', dark: '#653723', hc: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].black }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listFilterWidgetBackground', 'Background color of the type filter widget in lists and trees.')); -const listFilterWidgetOutline = registerColor('listFilterWidget.outline', { dark: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].transparent, light: _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].transparent, hc: '#f38518' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listFilterWidgetOutline', 'Outline color of the type filter widget in lists and trees.')); -const listFilterWidgetNoMatchesOutline = registerColor('listFilterWidget.noMatchesOutline', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('listFilterWidgetNoMatchesOutline', 'Outline color of the type filter widget in lists and trees, when there are no matches.')); -const treeIndentGuidesStroke = registerColor('tree.indentGuidesStroke', { dark: '#585858', light: '#a9a9a9', hc: '#a9a9a9' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('treeIndentGuidesStroke', "Tree stroke color for the indentation guides.")); -/** - * Menu colors - */ -const menuBorder = registerColor('menu.border', { dark: null, light: null, hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuBorder', "Border color of menus.")); -const menuForeground = registerColor('menu.foreground', { dark: selectForeground, light: foreground, hc: selectForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuForeground', "Foreground color of menu items.")); -const menuBackground = registerColor('menu.background', { dark: selectBackground, light: selectBackground, hc: selectBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuBackground', "Background color of menu items.")); -const menuSelectionForeground = registerColor('menu.selectionForeground', { dark: listActiveSelectionForeground, light: listActiveSelectionForeground, hc: listActiveSelectionForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuSelectionForeground', "Foreground color of the selected menu item in menus.")); -const menuSelectionBackground = registerColor('menu.selectionBackground', { dark: listActiveSelectionBackground, light: listActiveSelectionBackground, hc: listActiveSelectionBackground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuSelectionBackground', "Background color of the selected menu item in menus.")); -const menuSelectionBorder = registerColor('menu.selectionBorder', { dark: null, light: null, hc: activeContrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuSelectionBorder', "Border color of the selected menu item in menus.")); -const menuSeparatorBackground = registerColor('menu.separatorBackground', { dark: '#BBBBBB', light: '#888888', hc: contrastBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('menuSeparatorBackground', "Color of a separator menu item in menus.")); -/** - * Snippet placeholder colors - */ -const snippetTabstopHighlightBackground = registerColor('editor.snippetTabstopHighlightBackground', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](124, 124, 124, 0.3)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](10, 50, 100, 0.2)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](124, 124, 124, 0.3)) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('snippetTabstopHighlightBackground', "Highlight background color of a snippet tabstop.")); -const snippetTabstopHighlightBorder = registerColor('editor.snippetTabstopHighlightBorder', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('snippetTabstopHighlightBorder', "Highlight border color of a snippet tabstop.")); -const snippetFinalTabstopHighlightBackground = registerColor('editor.snippetFinalTabstopHighlightBackground', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('snippetFinalTabstopHighlightBackground', "Highlight background color of the final tabstop of a snippet.")); -const snippetFinalTabstopHighlightBorder = registerColor('editor.snippetFinalTabstopHighlightBorder', { dark: '#525252', light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](10, 50, 100, 0.5)), hc: '#525252' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('snippetFinalTabstopHighlightBorder', "Highlight border color of the final tabstop of a snippet.")); -const overviewRulerFindMatchForeground = registerColor('editorOverviewRuler.findMatchForeground', { dark: '#d186167e', light: '#d186167e', hc: '#AB5A00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('overviewRulerFindMatchForeground', 'Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.'), true); -const overviewRulerSelectionHighlightForeground = registerColor('editorOverviewRuler.selectionHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('overviewRulerSelectionHighlightForeground', 'Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.'), true); -const minimapFindMatch = registerColor('minimap.findMatchHighlight', { light: '#d18616', dark: '#d18616', hc: '#AB5A00' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapFindMatchHighlight', 'Minimap marker color for find matches.'), true); -const minimapSelection = registerColor('minimap.selectionHighlight', { light: '#ADD6FF', dark: '#264F78', hc: '#ffffff' }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapSelectionHighlight', 'Minimap marker color for the editor selection.'), true); -const minimapError = registerColor('minimap.errorHighlight', { dark: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 18, 18, 0.7)), light: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 18, 18, 0.7)), hc: new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"](new _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["RGBA"](255, 50, 50, 1)) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapError', 'Minimap marker color for errors.')); -const minimapWarning = registerColor('minimap.warningHighlight', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningBorder }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('overviewRuleWarning', 'Minimap marker color for warnings.')); -const minimapBackground = registerColor('minimap.background', { dark: null, light: null, hc: null }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapBackground', "Minimap background color.")); -const minimapSliderBackground = registerColor('minimapSlider.background', { light: transparent(scrollbarSliderBackground, 0.5), dark: transparent(scrollbarSliderBackground, 0.5), hc: transparent(scrollbarSliderBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapSliderBackground', "Minimap slider background color.")); -const minimapSliderHoverBackground = registerColor('minimapSlider.hoverBackground', { light: transparent(scrollbarSliderHoverBackground, 0.5), dark: transparent(scrollbarSliderHoverBackground, 0.5), hc: transparent(scrollbarSliderHoverBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapSliderHoverBackground', "Minimap slider background color when hovering.")); -const minimapSliderActiveBackground = registerColor('minimapSlider.activeBackground', { light: transparent(scrollbarSliderActiveBackground, 0.5), dark: transparent(scrollbarSliderActiveBackground, 0.5), hc: transparent(scrollbarSliderActiveBackground, 0.5) }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('minimapSliderActiveBackground', "Minimap slider background color when clicked on.")); -const problemsErrorIconForeground = registerColor('problemsErrorIcon.foreground', { dark: editorErrorForeground, light: editorErrorForeground, hc: editorErrorForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('problemsErrorIconForeground', "The color used for the problems error icon.")); -const problemsWarningIconForeground = registerColor('problemsWarningIcon.foreground', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('problemsWarningIconForeground', "The color used for the problems warning icon.")); -const problemsInfoIconForeground = registerColor('problemsInfoIcon.foreground', { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, _nls_js__WEBPACK_IMPORTED_MODULE_3__["localize"]('problemsInfoIconForeground', "The color used for the problems info icon.")); -// ----- color functions -function darken(colorValue, factor) { - return (theme) => { - let color = resolveColorValue(colorValue, theme); - if (color) { - return color.darken(factor); - } - return undefined; - }; -} -function lighten(colorValue, factor) { - return (theme) => { - let color = resolveColorValue(colorValue, theme); - if (color) { - return color.lighten(factor); - } - return undefined; - }; -} -function transparent(colorValue, factor) { - return (theme) => { - let color = resolveColorValue(colorValue, theme); - if (color) { - return color.transparent(factor); + const parentListIndex = this.model.getListIndex(parentLocation); + this.view.reveal(parentListIndex); + this.view.setFocus([parentListIndex]); } - return undefined; - }; -} -function oneOf(...colorValues) { - return (theme) => { - for (let colorValue of colorValues) { - let color = resolveColorValue(colorValue, theme); - if (color) { - return color; - } + } + onRightArrow(e) { + e.preventDefault(); + e.stopPropagation(); + const nodes = this.view.getFocusedElements(); + if (nodes.length === 0) { + return; } - return undefined; - }; -} -function lessProminent(colorValue, backgroundColorValue, factor, transparency) { - return (theme) => { - let from = resolveColorValue(colorValue, theme); - if (from) { - let backgroundColor = resolveColorValue(backgroundColorValue, theme); - if (backgroundColor) { - if (from.isDarkerThan(backgroundColor)) { - return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].getLighterColor(from, backgroundColor, factor).transparent(transparency); - } - return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].getDarkerColor(from, backgroundColor, factor).transparent(transparency); + const node = nodes[0]; + const location = this.model.getNodeLocation(node); + const didChange = this.model.setCollapsed(location, false); + if (!didChange) { + if (!node.children.some(child => child.visible)) { + return; } - return from.transparent(factor * transparency); + const [focusedIndex] = this.view.getFocus(); + const firstChildIndex = focusedIndex + 1; + this.view.reveal(firstChildIndex); + this.view.setFocus([firstChildIndex]); } - return undefined; - }; -} -// ----- implementation -/** - * @param colorValue Resolve a color value in the context of a theme - */ -function resolveColorValue(colorValue, theme) { - if (colorValue === null) { - return undefined; } - else if (typeof colorValue === 'string') { - if (colorValue[0] === '#') { - return _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"].fromHex(colorValue); + onSpace(e) { + e.preventDefault(); + e.stopPropagation(); + const nodes = this.view.getFocusedElements(); + if (nodes.length === 0) { + return; } - return theme.getColor(colorValue); - } - else if (colorValue instanceof _base_common_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"]) { - return colorValue; + const node = nodes[0]; + const location = this.model.getNodeLocation(node); + const recursive = e.browserEvent.altKey; + this.model.setCollapsed(location, undefined, recursive); } - else if (typeof colorValue === 'function') { - return colorValue(theme); + dispose() { + Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["dispose"])(this.disposables); + this.view.dispose(); } - return undefined; } -const workbenchColorsSchemaId = 'vscode://schemas/workbench-colors'; -let schemaRegistry = _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_0__["Registry"].as(_jsonschemas_common_jsonContributionRegistry_js__WEBPACK_IMPORTED_MODULE_4__["Extensions"].JSONContribution); -schemaRegistry.registerSchema(workbenchColorsSchemaId, colorRegistry.getColorSchema()); -const delayer = new _base_common_async_js__WEBPACK_IMPORTED_MODULE_5__["RunOnceScheduler"](() => schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId), 200); -colorRegistry.onDidChangeSchema(() => { - if (!delayer.isScheduled()) { - delayer.schedule(); - } -}); -// setTimeout(_ => console.log(colorRegistry.toString()), 5000); /***/ }), -/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js": -/*!***************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/styler.js ***! - \***************************************************************************/ -/*! exports provided: computeStyles, attachStyler, attachBadgeStyler, attachListStyler, defaultListStyles, defaultMenuStyles, attachMenuStyler */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeStyles", function() { return computeStyles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachStyler", function() { return attachStyler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachBadgeStyler", function() { return attachBadgeStyler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachListStyler", function() { return attachListStyler; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultListStyles", function() { return defaultListStyles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultMenuStyles", function() { return defaultMenuStyles; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachMenuStyler", function() { return attachMenuStyler; }); -/* harmony import */ var _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorRegistry.js */ "./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -function computeStyles(theme, styleMap) { - const styles = Object.create(null); - for (let key in styleMap) { - const value = styleMap[key]; - if (value) { - styles[key] = Object(_colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["resolveColorValue"])(value, theme); - } - } - return styles; -} -function attachStyler(themeService, styleMap, widgetOrCallback) { - function applyStyles(theme) { - const styles = computeStyles(themeService.getColorTheme(), styleMap); - if (typeof widgetOrCallback === 'function') { - widgetOrCallback(styles); - } - else { - widgetOrCallback.style(styles); - } - } - applyStyles(themeService.getColorTheme()); - return themeService.onDidColorThemeChange(applyStyles); -} -function attachBadgeStyler(widget, themeService, style) { - return attachStyler(themeService, { - badgeBackground: (style && style.badgeBackground) || _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["badgeBackground"], - badgeForeground: (style && style.badgeForeground) || _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["badgeForeground"], - badgeBorder: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["contrastBorder"] - }, widget); -} -function attachListStyler(widget, themeService, overrides) { - return attachStyler(themeService, Object.assign(Object.assign({}, defaultListStyles), (overrides || {})), widget); -} -const defaultListStyles = { - listFocusBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listFocusBackground"], - listFocusForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listFocusForeground"], - listActiveSelectionBackground: Object(_colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["darken"])(_colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listActiveSelectionBackground"], 0.1), - listActiveSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listActiveSelectionForeground"], - listFocusAndSelectionBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listActiveSelectionBackground"], - listFocusAndSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listActiveSelectionForeground"], - listInactiveSelectionBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listInactiveSelectionBackground"], - listInactiveSelectionForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listInactiveSelectionForeground"], - listInactiveFocusBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listInactiveFocusBackground"], - listHoverBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listHoverBackground"], - listHoverForeground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listHoverForeground"], - listDropBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listDropBackground"], - listFocusOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["activeContrastBorder"], - listSelectionOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["activeContrastBorder"], - listHoverOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["activeContrastBorder"], - listFilterWidgetBackground: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listFilterWidgetBackground"], - listFilterWidgetOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listFilterWidgetOutline"], - listFilterWidgetNoMatchesOutline: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["listFilterWidgetNoMatchesOutline"], - listMatchesShadow: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["widgetShadow"], - treeIndentGuidesStroke: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["treeIndentGuidesStroke"] -}; -const defaultMenuStyles = { - shadowColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["widgetShadow"], - borderColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuBorder"], - foregroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuForeground"], - backgroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuBackground"], - selectionForegroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuSelectionForeground"], - selectionBackgroundColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuSelectionBackground"], - selectionBorderColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuSelectionBorder"], - separatorColor: _colorRegistry_js__WEBPACK_IMPORTED_MODULE_0__["menuSeparatorBackground"] -}; -function attachMenuStyler(widget, themeService, style) { - return attachStyler(themeService, Object.assign(Object.assign({}, defaultMenuStyles), style), widget); -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js": +/***/ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js": /*!*********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js ***! + !*** ./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js ***! \*********************************************************************************/ -/*! exports provided: IThemeService, themeColorFromId, ThemeIcon, DARK, HIGH_CONTRAST, getThemeTypeSelector, Extensions, registerThemingParticipant, Themable */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IThemeService", function() { return IThemeService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "themeColorFromId", function() { return themeColorFromId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ThemeIcon", function() { return ThemeIcon; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DARK", function() { return DARK; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HIGH_CONTRAST", function() { return HIGH_CONTRAST; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getThemeTypeSelector", function() { return getThemeTypeSelector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Extensions", function() { return Extensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerThemingParticipant", function() { return registerThemingParticipant; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Themable", function() { return Themable; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../registry/common/platform.js */ "./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js"); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const IThemeService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('themeService'); -function themeColorFromId(id) { - return { id }; -} -var ThemeIcon; -(function (ThemeIcon) { - function isThemeIcon(obj) { - return obj && typeof obj === 'object' && typeof obj.id === 'string'; - } - ThemeIcon.isThemeIcon = isThemeIcon; - const _regexFromString = /^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i; - function fromString(str) { - const match = _regexFromString.exec(str); - if (!match) { - return undefined; - } - let [, owner, name] = match; - if (!owner) { - owner = `codicon/`; - } - return { id: owner + name }; - } - ThemeIcon.fromString = fromString; - const _regexAsClassName = /^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i; - function asClassName(icon) { - // todo@martin,joh -> this should go into the ThemeService - const match = _regexAsClassName.exec(icon.id); - if (!match) { - return undefined; - } - let [, , name, modifier] = match; - let className = `codicon codicon-${name}`; - if (modifier) { - className += ` ${modifier.substr(1)}`; - } - return className; - } - ThemeIcon.asClassName = asClassName; -})(ThemeIcon || (ThemeIcon = {})); -// base themes -const DARK = 'dark'; -const HIGH_CONTRAST = 'hc'; -function getThemeTypeSelector(type) { - switch (type) { - case DARK: return 'vs-dark'; - case HIGH_CONTRAST: return 'hc-black'; - default: return 'vs'; - } -} -// static theming participant -const Extensions = { - ThemingContribution: 'base.contributions.theming' -}; -class ThemingRegistry { - constructor() { - this.themingParticipants = []; - this.themingParticipants = []; - this.onThemingParticipantAddedEmitter = new _base_common_event_js__WEBPACK_IMPORTED_MODULE_3__["Emitter"](); - } - onColorThemeChange(participant) { - this.themingParticipants.push(participant); - this.onThemingParticipantAddedEmitter.fire(participant); - return Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => { - const idx = this.themingParticipants.indexOf(participant); - this.themingParticipants.splice(idx, 1); - }); - } - getThemingParticipants() { - return this.themingParticipants; - } -} -let themingRegistry = new ThemingRegistry(); -_registry_common_platform_js__WEBPACK_IMPORTED_MODULE_2__["Registry"].add(Extensions.ThemingContribution, themingRegistry); -function registerThemingParticipant(participant) { - return themingRegistry.onColorThemeChange(participant); -} -/** - * Utility base class for all themable components. - */ -class Themable extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor(themeService) { - super(); - this.themeService = themeService; - this.theme = themeService.getColorTheme(); - // Hook up to theme changes - this._register(this.themeService.onDidColorThemeChange(theme => this.onThemeChange(theme))); - } - onThemeChange(theme) { - this.theme = theme; - this.updateStyles(); - } - updateStyles() { - // Subclasses to override - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js": -/*!********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js ***! - \********************************************************************************/ -/*! exports provided: IUndoRedoService, ResourceEditStackSnapshot */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IUndoRedoService", function() { return IUndoRedoService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResourceEditStackSnapshot", function() { return ResourceEditStackSnapshot; }); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -const IUndoRedoService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_0__["createDecorator"])('undoRedoService'); -class ResourceEditStackSnapshot { - constructor(resource, elements) { - this.resource = resource; - this.elements = elements; - } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js ***! - \***************************************************************************************/ -/*! exports provided: UndoRedoService */ +/*! exports provided: AsyncDataTree, CompressibleAsyncDataTree */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UndoRedoService", function() { return UndoRedoService; }); -/* harmony import */ var _nls_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../nls.js */ "./node_modules/monaco-editor/esm/vs/nls.js"); -/* harmony import */ var _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./undoRedo.js */ "./node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js"); -/* harmony import */ var _base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../base/common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); -/* harmony import */ var _instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../instantiation/common/extensions.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js"); -/* harmony import */ var _dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../dialogs/common/dialogs.js */ "./node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js"); -/* harmony import */ var _base_common_severity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../base/common/severity.js */ "./node_modules/monaco-editor/esm/vs/base/common/severity.js"); -/* harmony import */ var _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../base/common/network.js */ "./node_modules/monaco-editor/esm/vs/base/common/network.js"); -/* harmony import */ var _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../notification/common/notification.js */ "./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncDataTree", function() { return AsyncDataTree; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompressibleAsyncDataTree", function() { return CompressibleAsyncDataTree; }); +/* harmony import */ var _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./abstractTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js"); +/* harmony import */ var _objectTree_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectTree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js"); +/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tree.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"); +/* harmony import */ var _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); +/* harmony import */ var _common_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); +/* harmony import */ var _common_async_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/async.js */ "./node_modules/monaco-editor/esm/vs/base/common/async.js"); +/* harmony import */ var _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../common/iterator.js */ "./node_modules/monaco-editor/esm/vs/base/common/iterator.js"); +/* harmony import */ var _list_listView_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../list/listView.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"); +/* harmony import */ var _common_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../common/errors.js */ "./node_modules/monaco-editor/esm/vs/base/common/errors.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../dom.js */ "./node_modules/monaco-editor/esm/vs/base/browser/dom.js"); +/* harmony import */ var _indexTreeModel_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./indexTreeModel.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"); +/* harmony import */ var _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treeIcons.js */ "./node_modules/monaco-editor/esm/vs/base/browser/ui/tree/treeIcons.js"); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __param = (undefined && undefined.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -239322,6673 +82803,1613 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume -const DEBUG = false; -function getResourceLabel(resource) { - return resource.scheme === _base_common_network_js__WEBPACK_IMPORTED_MODULE_6__["Schemas"].file ? resource.fsPath : resource.path; + + + +function createAsyncDataTreeNode(props) { + return Object.assign(Object.assign({}, props), { children: [], refreshPromise: undefined, stale: true, slow: false, collapsedByDefault: undefined }); } -let stackElementCounter = 0; -class ResourceStackElement { - constructor(actual, resourceLabel, strResource) { - this.id = (++stackElementCounter); - this.type = 0 /* Resource */; - this.actual = actual; - this.label = actual.label; - this.resourceLabel = resourceLabel; - this.strResource = strResource; - this.resourceLabels = [this.resourceLabel]; - this.strResources = [this.strResource]; - this.isValid = true; +function isAncestor(ancestor, descendant) { + if (!descendant.parent) { + return false; } - setValid(isValid) { - this.isValid = isValid; + else if (descendant.parent === ancestor) { + return true; } - toString() { - return `[${this.id}] [${this.isValid ? 'VALID' : 'INVALID'}] ${this.actual}`; + else { + return isAncestor(ancestor, descendant.parent); } } -class ResourceReasonPair { - constructor(resourceLabel, reason) { - this.resourceLabel = resourceLabel; - this.reason = reason; +function intersects(node, other) { + return node === other || isAncestor(node, other) || isAncestor(other, node); +} +class AsyncDataTreeNodeWrapper { + constructor(node) { + this.node = node; } + get element() { return this.node.element.element; } + get children() { return this.node.children.map(node => new AsyncDataTreeNodeWrapper(node)); } + get depth() { return this.node.depth; } + get visibleChildrenCount() { return this.node.visibleChildrenCount; } + get visibleChildIndex() { return this.node.visibleChildIndex; } + get collapsible() { return this.node.collapsible; } + get collapsed() { return this.node.collapsed; } + get visible() { return this.node.visible; } + get filterData() { return this.node.filterData; } } -class RemovedResources { - constructor() { - this.elements = new Map(); +class AsyncDataTreeRenderer { + constructor(renderer, nodeMapper, onDidChangeTwistieState) { + this.renderer = renderer; + this.nodeMapper = nodeMapper; + this.onDidChangeTwistieState = onDidChangeTwistieState; + this.renderedNodes = new Map(); + this.templateId = renderer.templateId; } - createMessage() { - const externalRemoval = []; - const noParallelUniverses = []; - for (const [, element] of this.elements) { - const dest = (element.reason === 0 /* ExternalRemoval */ - ? externalRemoval - : noParallelUniverses); - dest.push(element.resourceLabel); - } - let messages = []; - if (externalRemoval.length > 0) { - messages.push(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'externalRemoval', comment: ['{0} is a list of filenames'] }, "The following files have been closed and modified on disk: {0}.", externalRemoval.join(', '))); + renderTemplate(container) { + const templateData = this.renderer.renderTemplate(container); + return { templateData }; + } + renderElement(node, index, templateData, height) { + this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height); + } + renderTwistie(element, twistieElement) { + if (element.slow) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["addClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); } - if (noParallelUniverses.length > 0) { - messages.push(_nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'noParallelUniverses', comment: ['{0} is a list of filenames'] }, "The following files have been modified in an incompatible way: {0}.", noParallelUniverses.join(', '))); + else { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["removeClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); } - return messages.join('\n'); - } - get size() { - return this.elements.size; + return false; } - has(strResource) { - return this.elements.has(strResource); + disposeElement(node, index, templateData, height) { + if (this.renderer.disposeElement) { + this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height); + } } - set(strResource, value) { - this.elements.set(strResource, value); + disposeTemplate(templateData) { + this.renderer.disposeTemplate(templateData.templateData); } - delete(strResource) { - return this.elements.delete(strResource); + dispose() { + this.renderedNodes.clear(); } } -class WorkspaceStackElement { - constructor(actual, resourceLabels, strResources) { - this.id = (++stackElementCounter); - this.type = 1 /* Workspace */; - this.actual = actual; - this.label = actual.label; - this.resourceLabels = resourceLabels; - this.strResources = strResources; - this.removedResources = null; - this.invalidatedResources = null; - } - canSplit() { - return (typeof this.actual.split === 'function'); - } - removeResource(resourceLabel, strResource, reason) { - if (!this.removedResources) { - this.removedResources = new RemovedResources(); - } - if (!this.removedResources.has(strResource)) { - this.removedResources.set(strResource, new ResourceReasonPair(resourceLabel, reason)); - } - } - setValid(resourceLabel, strResource, isValid) { - if (isValid) { - if (this.invalidatedResources) { - this.invalidatedResources.delete(strResource); - if (this.invalidatedResources.size === 0) { - this.invalidatedResources = null; - } - } - } - else { - if (!this.invalidatedResources) { - this.invalidatedResources = new RemovedResources(); - } - if (!this.invalidatedResources.has(strResource)) { - this.invalidatedResources.set(strResource, new ResourceReasonPair(resourceLabel, 0 /* ExternalRemoval */)); - } - } +function asTreeEvent(e) { + return { + browserEvent: e.browserEvent, + elements: e.elements.map(e => e.element) + }; +} +function asTreeMouseEvent(e) { + return { + browserEvent: e.browserEvent, + element: e.element && e.element.element, + target: e.target + }; +} +class AsyncDataTreeElementsDragAndDropData extends _list_listView_js__WEBPACK_IMPORTED_MODULE_7__["ElementsDragAndDropData"] { + constructor(data) { + super(data.elements.map(node => node.element)); + this.data = data; } - toString() { - return `[${this.id}] [${this.invalidatedResources ? 'INVALID' : 'VALID'}] ${this.actual}`; +} +function asAsyncDataTreeDragAndDropData(data) { + if (data instanceof _list_listView_js__WEBPACK_IMPORTED_MODULE_7__["ElementsDragAndDropData"]) { + return new AsyncDataTreeElementsDragAndDropData(data); } + return data; } -class ResourceEditStack { - constructor(resourceLabel, strResource) { - this.resourceLabel = resourceLabel; - this.strResource = strResource; - this._past = []; - this._future = []; - this.locked = false; - this.versionId = 1; +class AsyncDataTreeNodeListDragAndDrop { + constructor(dnd) { + this.dnd = dnd; } - dispose() { - for (const element of this._past) { - if (element.type === 1 /* Workspace */) { - element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */); - } - } - for (const element of this._future) { - if (element.type === 1 /* Workspace */) { - element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */); - } - } - this.versionId++; + getDragURI(node) { + return this.dnd.getDragURI(node.element); } - toString() { - let result = []; - result.push(`* ${this.strResource}:`); - for (let i = 0; i < this._past.length; i++) { - result.push(` * [UNDO] ${this._past[i]}`); + getDragLabel(nodes, originalEvent) { + if (this.dnd.getDragLabel) { + return this.dnd.getDragLabel(nodes.map(node => node.element), originalEvent); } - for (let i = this._future.length - 1; i >= 0; i--) { - result.push(` * [REDO] ${this._future[i]}`); + return undefined; + } + onDragStart(data, originalEvent) { + if (this.dnd.onDragStart) { + this.dnd.onDragStart(asAsyncDataTreeDragAndDropData(data), originalEvent); } - return result.join('\n'); } - flushAllElements() { - this._past = []; - this._future = []; - this.versionId++; + onDragOver(data, targetNode, targetIndex, originalEvent, raw = true) { + return this.dnd.onDragOver(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); } - _setElementValidFlag(element, isValid) { - if (element.type === 1 /* Workspace */) { - element.setValid(this.resourceLabel, this.strResource, isValid); - } - else { - element.setValid(isValid); - } + drop(data, targetNode, targetIndex, originalEvent) { + this.dnd.drop(asAsyncDataTreeDragAndDropData(data), targetNode && targetNode.element, targetIndex, originalEvent); } - setElementsValidFlag(isValid, filter) { - for (const element of this._past) { - if (filter(element.actual)) { - this._setElementValidFlag(element, isValid); - } - } - for (const element of this._future) { - if (filter(element.actual)) { - this._setElementValidFlag(element, isValid); - } + onDragEnd(originalEvent) { + if (this.dnd.onDragEnd) { + this.dnd.onDragEnd(originalEvent); } } - pushElement(element) { - // remove the future - for (const futureElement of this._future) { - if (futureElement.type === 1 /* Workspace */) { - futureElement.removeResource(this.resourceLabel, this.strResource, 1 /* NoParallelUniverses */); - } - } - this._future = []; - if (this._past.length > 0) { - const lastElement = this._past[this._past.length - 1]; - if (lastElement.type === 0 /* Resource */ && !lastElement.isValid) { - // clear undo stack - this._past = []; - } - } - this._past.push(element); - this.versionId++; - } - createSnapshot(resource) { - const elements = []; - for (let i = 0, len = this._past.length; i < len; i++) { - elements.push(this._past[i].id); - } - for (let i = this._future.length - 1; i >= 0; i--) { - elements.push(this._future[i].id); - } - return new _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__["ResourceEditStackSnapshot"](resource, elements); - } - restoreSnapshot(snapshot) { - const snapshotLength = snapshot.elements.length; - let isOK = true; - let snapshotIndex = 0; - let removePastAfter = -1; - for (let i = 0, len = this._past.length; i < len; i++, snapshotIndex++) { - const element = this._past[i]; - if (isOK && (snapshotIndex >= snapshotLength || element.id !== snapshot.elements[snapshotIndex])) { - isOK = false; - removePastAfter = 0; - } - if (!isOK && element.type === 1 /* Workspace */) { - element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */); +} +function asObjectTreeOptions(options) { + return options && Object.assign(Object.assign({}, options), { collapseByDefault: true, identityProvider: options.identityProvider && { + getId(el) { + return options.identityProvider.getId(el.element); } - } - let removeFutureBefore = -1; - for (let i = this._future.length - 1; i >= 0; i--, snapshotIndex++) { - const element = this._future[i]; - if (isOK && (snapshotIndex >= snapshotLength || element.id !== snapshot.elements[snapshotIndex])) { - isOK = false; - removeFutureBefore = i; + }, dnd: options.dnd && new AsyncDataTreeNodeListDragAndDrop(options.dnd), multipleSelectionController: options.multipleSelectionController && { + isSelectionSingleChangeEvent(e) { + return options.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); + }, + isSelectionRangeChangeEvent(e) { + return options.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({}, e), { element: e.element })); } - if (!isOK && element.type === 1 /* Workspace */) { - element.removeResource(this.resourceLabel, this.strResource, 0 /* ExternalRemoval */); + }, accessibilityProvider: options.accessibilityProvider && Object.assign(Object.assign({}, options.accessibilityProvider), { getPosInSet: undefined, getSetSize: undefined, getRole: options.accessibilityProvider.getRole ? (el) => { + return options.accessibilityProvider.getRole(el.element); + } : () => 'treeitem', isChecked: options.accessibilityProvider.isChecked ? (e) => { + var _a; + return !!((_a = options.accessibilityProvider) === null || _a === void 0 ? void 0 : _a.isChecked(e.element)); + } : undefined, getAriaLabel(e) { + return options.accessibilityProvider.getAriaLabel(e.element); + }, + getWidgetAriaLabel() { + return options.accessibilityProvider.getWidgetAriaLabel(); + }, getWidgetRole: options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider.getWidgetRole() : () => 'tree', getAriaLevel: options.accessibilityProvider.getAriaLevel && (node => { + return options.accessibilityProvider.getAriaLevel(node.element); + }), getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => { + return options.accessibilityProvider.getActiveDescendantId(node.element); + }) }), filter: options.filter && { + filter(e, parentVisibility) { + return options.filter.filter(e.element, parentVisibility); } + }, keyboardNavigationLabelProvider: options.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, options.keyboardNavigationLabelProvider), { getKeyboardNavigationLabel(e) { + return options.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element); + } }), sorter: undefined, expandOnlyOnTwistieClick: typeof options.expandOnlyOnTwistieClick === 'undefined' ? undefined : (typeof options.expandOnlyOnTwistieClick !== 'function' ? options.expandOnlyOnTwistieClick : (e => options.expandOnlyOnTwistieClick(e.element))), additionalScrollHeight: options.additionalScrollHeight }); +} +function dfs(node, fn) { + fn(node); + node.children.forEach(child => dfs(child, fn)); +} +class AsyncDataTree { + constructor(user, container, delegate, renderers, dataSource, options = {}) { + this.user = user; + this.dataSource = dataSource; + this.nodes = new Map(); + this.subTreeRefreshPromises = new Map(); + this.refreshPromises = new Map(); + this._onDidRender = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this._onDidChangeNodeSlowState = new _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Emitter"](); + this.nodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__["WeakMapper"](node => new AsyncDataTreeNodeWrapper(node)); + this.disposables = new _common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["DisposableStore"](); + this.identityProvider = options.identityProvider; + this.autoExpandSingleChildren = typeof options.autoExpandSingleChildren === 'undefined' ? false : options.autoExpandSingleChildren; + this.sorter = options.sorter; + this.collapseByDefault = options.collapseByDefault; + this.tree = this.createTree(user, container, delegate, renderers, options); + this.root = createAsyncDataTreeNode({ + element: undefined, + parent: null, + hasChildren: true + }); + if (this.identityProvider) { + this.root = Object.assign(Object.assign({}, this.root), { id: null }); } - if (removePastAfter !== -1) { - this._past = this._past.slice(0, removePastAfter); - } - if (removeFutureBefore !== -1) { - this._future = this._future.slice(removeFutureBefore + 1); - } - this.versionId++; - } - getElements() { - const past = []; - const future = []; - for (const element of this._past) { - past.push(element.actual); - } - for (const element of this._future) { - future.push(element.actual); - } - return { past, future }; + this.nodes.set(null, this.root); + this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState, this, this.disposables); } - getClosestPastElement() { - if (this._past.length === 0) { - return null; - } - return this._past[this._past.length - 1]; + get onDidChangeFocus() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onDidChangeFocus, asTreeEvent); } + get onDidChangeSelection() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onDidChangeSelection, asTreeEvent); } + get onMouseDblClick() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onMouseDblClick, asTreeMouseEvent); } + get onPointer() { return _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].map(this.tree.onPointer, asTreeMouseEvent); } + get onDidFocus() { return this.tree.onDidFocus; } + get onDidDispose() { return this.tree.onDidDispose; } + createTree(user, container, delegate, renderers, options) { + const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__["ComposedTreeDelegate"](delegate); + const objectTreeRenderers = renderers.map(r => new AsyncDataTreeRenderer(r, this.nodeMapper, this._onDidChangeNodeSlowState.event)); + const objectTreeOptions = asObjectTreeOptions(options) || {}; + return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__["ObjectTree"](user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions); } - getClosestFutureElement() { - if (this._future.length === 0) { - return null; - } - return this._future[this._future.length - 1]; + updateOptions(options = {}) { + this.tree.updateOptions(options); } - hasPastElements() { - return (this._past.length > 0); + // Widget + getHTMLElement() { + return this.tree.getHTMLElement(); } - hasFutureElements() { - return (this._future.length > 0); + get scrollTop() { + return this.tree.scrollTop; } - splitPastWorkspaceElement(toRemove, individualMap) { - for (let j = this._past.length - 1; j >= 0; j--) { - if (this._past[j] === toRemove) { - if (individualMap.has(this.strResource)) { - // gets replaced - this._past[j] = individualMap.get(this.strResource); - } - else { - // gets deleted - this._past.splice(j, 1); - } - break; - } - } - this.versionId++; + set scrollTop(scrollTop) { + this.tree.scrollTop = scrollTop; } - splitFutureWorkspaceElement(toRemove, individualMap) { - for (let j = this._future.length - 1; j >= 0; j--) { - if (this._future[j] === toRemove) { - if (individualMap.has(this.strResource)) { - // gets replaced - this._future[j] = individualMap.get(this.strResource); - } - else { - // gets deleted - this._future.splice(j, 1); - } - break; - } - } - this.versionId++; + domFocus() { + this.tree.domFocus(); } - moveBackward(element) { - this._past.pop(); - this._future.push(element); - this.versionId++; + layout(height, width) { + this.tree.layout(height, width); } - moveForward(element) { - this._future.pop(); - this._past.push(element); - this.versionId++; + style(styles) { + this.tree.style(styles); } -} -class EditStackSnapshot { - constructor(editStacks) { - this.editStacks = editStacks; - this._versionIds = []; - for (let i = 0, len = this.editStacks.length; i < len; i++) { - this._versionIds[i] = this.editStacks[i].versionId; - } + // Model + getInput() { + return this.root.element; } - isValid() { - for (let i = 0, len = this.editStacks.length; i < len; i++) { - if (this._versionIds[i] !== this.editStacks[i].versionId) { - return false; + setInput(input, viewState) { + return __awaiter(this, void 0, void 0, function* () { + this.refreshPromises.forEach(promise => promise.cancel()); + this.refreshPromises.clear(); + this.root.element = input; + const viewStateContext = viewState && { viewState, focus: [], selection: [] }; + yield this._updateChildren(input, true, false, viewStateContext); + if (viewStateContext) { + this.tree.setFocus(viewStateContext.focus); + this.tree.setSelection(viewStateContext.selection); } - } - return true; - } -} -const missingEditStack = new ResourceEditStack('', ''); -missingEditStack.locked = true; -let UndoRedoService = class UndoRedoService { - constructor(_dialogService, _notificationService) { - this._dialogService = _dialogService; - this._notificationService = _notificationService; - this._editStacks = new Map(); - this._uriComparisonKeyComputers = []; - } - getUriComparisonKey(resource) { - for (const uriComparisonKeyComputer of this._uriComparisonKeyComputers) { - if (uriComparisonKeyComputer[0] === resource.scheme) { - return uriComparisonKeyComputer[1].getComparisonKey(resource); + if (viewState && typeof viewState.scrollTop === 'number') { + this.scrollTop = viewState.scrollTop; } - } - return resource.toString(); - } - _print(label) { - console.log(`------------------------------------`); - console.log(`AFTER ${label}: `); - let str = []; - for (const element of this._editStacks) { - str.push(element[1].toString()); - } - console.log(str.join('\n')); + }); } - pushElement(element) { - if (element.type === 0 /* Resource */) { - const resourceLabel = getResourceLabel(element.resource); - const strResource = this.getUriComparisonKey(element.resource); - this._pushElement(new ResourceStackElement(element, resourceLabel, strResource)); - } - else { - const seen = new Set(); - const resourceLabels = []; - const strResources = []; - for (const resource of element.resources) { - const resourceLabel = getResourceLabel(resource); - const strResource = this.getUriComparisonKey(resource); - if (seen.has(strResource)) { - continue; - } - seen.add(strResource); - resourceLabels.push(resourceLabel); - strResources.push(strResource); + _updateChildren(element = this.root.element, recursive = true, rerender = false, viewStateContext) { + return __awaiter(this, void 0, void 0, function* () { + if (typeof this.root.element === 'undefined') { + throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, 'Tree input not set'); } - if (resourceLabels.length === 1) { - this._pushElement(new ResourceStackElement(element, resourceLabels[0], strResources[0])); + if (this.root.refreshPromise) { + yield this.root.refreshPromise; + yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); } - else { - this._pushElement(new WorkspaceStackElement(element, resourceLabels, strResources)); + const node = this.getDataNode(element); + yield this.refreshAndRenderNode(node, recursive, viewStateContext); + if (rerender) { + try { + this.tree.rerender(node); + } + catch (_a) { + // missing nodes are fine, this could've resulted from + // parallel refresh calls, removing `node` altogether + } } + }); + } + // View + rerender(element) { + if (element === undefined || element === this.root.element) { + this.tree.rerender(); + return; } - if (DEBUG) { - this._print('pushElement'); - } + const node = this.getDataNode(element); + this.tree.rerender(node); + } + collapse(element, recursive = false) { + const node = this.getDataNode(element); + return this.tree.collapse(node === this.root ? null : node, recursive); } - _pushElement(element) { - for (let i = 0, len = element.strResources.length; i < len; i++) { - const resourceLabel = element.resourceLabels[i]; - const strResource = element.strResources[i]; - let editStack; - if (this._editStacks.has(strResource)) { - editStack = this._editStacks.get(strResource); + expand(element, recursive = false) { + return __awaiter(this, void 0, void 0, function* () { + if (typeof this.root.element === 'undefined') { + throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, 'Tree input not set'); } - else { - editStack = new ResourceEditStack(resourceLabel, strResource); - this._editStacks.set(strResource, editStack); + if (this.root.refreshPromise) { + yield this.root.refreshPromise; + yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); } - editStack.pushElement(element); - } - } - getLastElement(resource) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - if (editStack.hasFutureElements()) { - return null; + const node = this.getDataNode(element); + if (this.tree.hasElement(node) && !this.tree.isCollapsible(node)) { + return false; } - const closestPastElement = editStack.getClosestPastElement(); - return closestPastElement ? closestPastElement.actual : null; - } - return null; - } - _splitPastWorkspaceElement(toRemove, ignoreResources) { - const individualArr = toRemove.actual.split(); - const individualMap = new Map(); - for (const _element of individualArr) { - const resourceLabel = getResourceLabel(_element.resource); - const strResource = this.getUriComparisonKey(_element.resource); - const element = new ResourceStackElement(_element, resourceLabel, strResource); - individualMap.set(element.strResource, element); - } - for (const strResource of toRemove.strResources) { - if (ignoreResources && ignoreResources.has(strResource)) { - continue; + if (node.refreshPromise) { + yield this.root.refreshPromise; + yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); } - const editStack = this._editStacks.get(strResource); - editStack.splitPastWorkspaceElement(toRemove, individualMap); - } - } - _splitFutureWorkspaceElement(toRemove, ignoreResources) { - const individualArr = toRemove.actual.split(); - const individualMap = new Map(); - for (const _element of individualArr) { - const resourceLabel = getResourceLabel(_element.resource); - const strResource = this.getUriComparisonKey(_element.resource); - const element = new ResourceStackElement(_element, resourceLabel, strResource); - individualMap.set(element.strResource, element); - } - for (const strResource of toRemove.strResources) { - if (ignoreResources && ignoreResources.has(strResource)) { - continue; + if (node !== this.root && !node.refreshPromise && !this.tree.isCollapsed(node)) { + return false; } - const editStack = this._editStacks.get(strResource); - editStack.splitFutureWorkspaceElement(toRemove, individualMap); - } - } - removeElements(resource) { - const strResource = typeof resource === 'string' ? resource : this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - editStack.dispose(); - this._editStacks.delete(strResource); - } - if (DEBUG) { - this._print('removeElements'); - } - } - setElementsValidFlag(resource, isValid, filter) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - editStack.setElementsValidFlag(isValid, filter); - } - if (DEBUG) { - this._print('setElementsValidFlag'); - } - } - createSnapshot(resource) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - return editStack.createSnapshot(resource); - } - return new _undoRedo_js__WEBPACK_IMPORTED_MODULE_1__["ResourceEditStackSnapshot"](resource, []); - } - restoreSnapshot(snapshot) { - const strResource = this.getUriComparisonKey(snapshot.resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - editStack.restoreSnapshot(snapshot); - if (!editStack.hasPastElements() && !editStack.hasFutureElements()) { - // the edit stack is now empty, just remove it entirely - editStack.dispose(); - this._editStacks.delete(strResource); + const result = this.tree.expand(node === this.root ? null : node, recursive); + if (node.refreshPromise) { + yield this.root.refreshPromise; + yield _common_event_js__WEBPACK_IMPORTED_MODULE_4__["Event"].toPromise(this._onDidRender.event); } - } - if (DEBUG) { - this._print('restoreSnapshot'); - } + return result; + }); } - getElements(resource) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - return editStack.getElements(); - } - return { past: [], future: [] }; + setSelection(elements, browserEvent) { + const nodes = elements.map(e => this.getDataNode(e)); + this.tree.setSelection(nodes, browserEvent); } - canUndo(resource) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - return editStack.hasPastElements(); - } - return false; + getSelection() { + const nodes = this.tree.getSelection(); + return nodes.map(n => n.element); } - _onError(err, element) { - Object(_base_common_errors_js__WEBPACK_IMPORTED_MODULE_2__["onUnexpectedError"])(err); - // An error occured while undoing or redoing => drop the undo/redo stack for all affected resources - for (const strResource of element.strResources) { - this.removeElements(strResource); - } - this._notificationService.error(err); + setFocus(elements, browserEvent) { + const nodes = elements.map(e => this.getDataNode(e)); + this.tree.setFocus(nodes, browserEvent); } - _acquireLocks(editStackSnapshot) { - // first, check if all locks can be acquired - for (const editStack of editStackSnapshot.editStacks) { - if (editStack.locked) { - throw new Error('Cannot acquire edit stack lock'); - } - } - // can acquire all locks - for (const editStack of editStackSnapshot.editStacks) { - editStack.locked = true; - } - return () => { - // release all locks - for (const editStack of editStackSnapshot.editStacks) { - editStack.locked = false; - } - }; + getFocus() { + const nodes = this.tree.getFocus(); + return nodes.map(n => n.element); } - _safeInvokeWithLocks(element, invoke, editStackSnapshot, cleanup = _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["Disposable"].None) { - const releaseLocks = this._acquireLocks(editStackSnapshot); - let result; - try { - result = invoke(); - } - catch (err) { - releaseLocks(); - cleanup.dispose(); - return this._onError(err, element); - } - if (result) { - // result is Promise - return result.then(() => { - releaseLocks(); - cleanup.dispose(); - }, (err) => { - releaseLocks(); - cleanup.dispose(); - return this._onError(err, element); - }); - } - else { - // result is void - releaseLocks(); - cleanup.dispose(); + reveal(element, relativeTop) { + this.tree.reveal(this.getDataNode(element), relativeTop); + } + // Implementation + getDataNode(element) { + const node = this.nodes.get((element === this.root.element ? null : element)); + if (!node) { + throw new _tree_js__WEBPACK_IMPORTED_MODULE_2__["TreeError"](this.user, `Data tree node not found: ${element}`); } + return node; } - _invokeWorkspacePrepare(element) { + refreshAndRenderNode(node, recursive, viewStateContext) { return __awaiter(this, void 0, void 0, function* () { - if (typeof element.actual.prepareUndoRedo === 'undefined') { - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["Disposable"].None; - } - const result = element.actual.prepareUndoRedo(); - if (typeof result === 'undefined') { - return _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["Disposable"].None; - } - return result; - }); - } - _invokeResourcePrepare(element, callback) { - if (element.actual.type !== 1 /* Workspace */ || typeof element.actual.prepareUndoRedo === 'undefined') { - // no preparation needed - callback(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["Disposable"].None); - return; - } - const r = element.actual.prepareUndoRedo(); - if (!r) { - // nothing to clean up - callback(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["Disposable"].None); - return; - } - if (Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_8__["isDisposable"])(r)) { - callback(r); - return; - } - return r.then((disposable) => { - callback(disposable); + yield this.refreshNode(node, recursive, viewStateContext); + this.render(node, viewStateContext); }); } - _getAffectedEditStacks(element) { - const affectedEditStacks = []; - for (const strResource of element.strResources) { - affectedEditStacks.push(this._editStacks.get(strResource) || missingEditStack); - } - return new EditStackSnapshot(affectedEditStacks); - } - _tryToSplitAndUndo(strResource, element, ignoreResources, message) { - if (element.canSplit()) { - this._splitPastWorkspaceElement(element, ignoreResources); - this._notificationService.info(message); - return new WorkspaceVerificationError(this.undo(strResource)); - } - else { - // Cannot safely split this workspace element => flush all undo/redo stacks - for (const strResource of element.strResources) { - this.removeElements(strResource); + refreshNode(node, recursive, viewStateContext) { + return __awaiter(this, void 0, void 0, function* () { + let result; + this.subTreeRefreshPromises.forEach((refreshPromise, refreshNode) => { + if (!result && intersects(refreshNode, node)) { + result = refreshPromise.then(() => this.refreshNode(node, recursive, viewStateContext)); + } + }); + if (result) { + return result; } - this._notificationService.info(message); - return new WorkspaceVerificationError(); - } + return this.doRefreshSubTree(node, recursive, viewStateContext); + }); } - _checkWorkspaceUndo(strResource, element, editStackSnapshot, checkInvalidatedResources) { - if (element.removedResources) { - return this._tryToSplitAndUndo(strResource, element, element.removedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceUndo', comment: ['{0} is a label for an operation. {1} is another message.'] }, "Could not undo '{0}' across all files. {1}", element.label, element.removedResources.createMessage())); - } - if (checkInvalidatedResources && element.invalidatedResources) { - return this._tryToSplitAndUndo(strResource, element, element.invalidatedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceUndo', comment: ['{0} is a label for an operation. {1} is another message.'] }, "Could not undo '{0}' across all files. {1}", element.label, element.invalidatedResources.createMessage())); - } - // this must be the last past element in all the impacted resources! - const cannotUndoDueToResources = []; - for (const editStack of editStackSnapshot.editStacks) { - if (editStack.getClosestPastElement() !== element) { - cannotUndoDueToResources.push(editStack.resourceLabel); + doRefreshSubTree(node, recursive, viewStateContext) { + return __awaiter(this, void 0, void 0, function* () { + let done; + node.refreshPromise = new Promise(c => done = c); + this.subTreeRefreshPromises.set(node, node.refreshPromise); + node.refreshPromise.finally(() => { + node.refreshPromise = undefined; + this.subTreeRefreshPromises.delete(node); + }); + try { + const childrenToRefresh = yield this.doRefreshNode(node, recursive, viewStateContext); + node.stale = false; + yield Promise.all(childrenToRefresh.map(child => this.doRefreshSubTree(child, recursive, viewStateContext))); } - } - if (cannotUndoDueToResources.length > 0) { - return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceUndoDueToChanges', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not undo '{0}' across all files because changes were made to {1}", element.label, cannotUndoDueToResources.join(', '))); - } - const cannotLockDueToResources = []; - for (const editStack of editStackSnapshot.editStacks) { - if (editStack.locked) { - cannotLockDueToResources.push(editStack.resourceLabel); + finally { + done(); } - } - if (cannotLockDueToResources.length > 0) { - return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceUndoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}", element.label, cannotLockDueToResources.join(', '))); - } - // check if new stack elements were added in the meantime... - if (!editStackSnapshot.isValid()) { - return this._tryToSplitAndUndo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceUndoDueToInMeantimeUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime", element.label)); - } - return null; - } - _workspaceUndo(strResource, element) { - const affectedEditStacks = this._getAffectedEditStacks(element); - const verificationError = this._checkWorkspaceUndo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/ false); - if (verificationError) { - return verificationError.returnValue; - } - return this._confirmAndExecuteWorkspaceUndo(strResource, element, affectedEditStacks); + }); } - _confirmAndExecuteWorkspaceUndo(strResource, element, editStackSnapshot) { + doRefreshNode(node, recursive, viewStateContext) { return __awaiter(this, void 0, void 0, function* () { - if (element.canSplit()) { - // this element can be split - const result = yield this._dialogService.show(_base_common_severity_js__WEBPACK_IMPORTED_MODULE_5__["default"].Info, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('confirmWorkspace', "Would you like to undo '{0}' across all files?", element.label), [ - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'ok', comment: ['{0} denotes a number that is > 1'] }, "Undo in {0} Files", editStackSnapshot.editStacks.length), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('nok', "Undo this File"), - _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]('cancel', "Cancel"), - ], { - cancelId: 2 - }); - if (result.choice === 2) { - // choice: cancel - return; - } - if (result.choice === 1) { - // choice: undo this file - this._splitPastWorkspaceElement(element, null); - return this.undo(strResource); - } - // choice: undo in all files - // At this point, it is possible that the element has been made invalid in the meantime (due to the confirmation await) - const verificationError1 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*invalidated resources will be checked after the prepare call*/ false); - if (verificationError1) { - return verificationError1.returnValue; - } + node.hasChildren = !!this.dataSource.hasChildren(node.element); + let childrenPromise; + if (!node.hasChildren) { + childrenPromise = Promise.resolve(_common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].empty()); + } + else { + const slowTimeout = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_5__["timeout"])(800); + slowTimeout.then(() => { + node.slow = true; + this._onDidChangeNodeSlowState.fire(node); + }, _ => null); + childrenPromise = this.doGetChildren(node) + .finally(() => slowTimeout.cancel()); } - // prepare - let cleanup; try { - cleanup = yield this._invokeWorkspacePrepare(element); + const children = yield childrenPromise; + return this.setChildren(node, children, recursive, viewStateContext); } catch (err) { - return this._onError(err, element); - } - // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await) - const verificationError2 = this._checkWorkspaceUndo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/ true); - if (verificationError2) { - cleanup.dispose(); - return verificationError2.returnValue; + if (node !== this.root) { + this.tree.collapse(node === this.root ? null : node); + } + if (Object(_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["isPromiseCanceledError"])(err)) { + return []; + } + throw err; } - for (const editStack of editStackSnapshot.editStacks) { - editStack.moveBackward(element); + finally { + if (node.slow) { + node.slow = false; + this._onDidChangeNodeSlowState.fire(node); + } } - return this._safeInvokeWithLocks(element, () => element.actual.undo(), editStackSnapshot, cleanup); }); } - _resourceUndo(editStack, element) { - if (!element.isValid) { - // invalid element => immediately flush edit stack! - editStack.flushAllElements(); - return; - } - if (editStack.locked) { - const message = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotResourceUndoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation.'] }, "Could not undo '{0}' because there is already an undo or redo operation running.", element.label); - this._notificationService.info(message); - return; + doGetChildren(node) { + let result = this.refreshPromises.get(node); + if (result) { + return result; } - return this._invokeResourcePrepare(element, (cleanup) => { - editStack.moveBackward(element); - return this._safeInvokeWithLocks(element, () => element.actual.undo(), new EditStackSnapshot([editStack]), cleanup); - }); + result = Object(_common_async_js__WEBPACK_IMPORTED_MODULE_5__["createCancelablePromise"])(() => __awaiter(this, void 0, void 0, function* () { + const children = yield this.dataSource.getChildren(node.element); + return this.processChildren(children); + })); + this.refreshPromises.set(node, result); + return result.finally(() => { this.refreshPromises.delete(node); }); } - undo(resource) { - const strResource = typeof resource === 'string' ? resource : this.getUriComparisonKey(resource); - if (!this._editStacks.has(strResource)) { - return; - } - const editStack = this._editStacks.get(strResource); - const element = editStack.getClosestPastElement(); - if (!element) { + _onDidChangeCollapseState({ node, deep }) { + if (node.element === null) { return; } - try { - if (element.type === 1 /* Workspace */) { - return this._workspaceUndo(strResource, element); + if (!node.collapsed && node.element.stale) { + if (deep) { + this.collapse(node.element.element); } else { - return this._resourceUndo(editStack, element); - } - } - finally { - if (DEBUG) { - this._print('undo'); - } - } - } - canRedo(resource) { - const strResource = this.getUriComparisonKey(resource); - if (this._editStacks.has(strResource)) { - const editStack = this._editStacks.get(strResource); - return editStack.hasFutureElements(); - } - return false; - } - _tryToSplitAndRedo(strResource, element, ignoreResources, message) { - if (element.canSplit()) { - this._splitFutureWorkspaceElement(element, ignoreResources); - this._notificationService.info(message); - return new WorkspaceVerificationError(this.redo(strResource)); - } - else { - // Cannot safely split this workspace element => flush all undo/redo stacks - for (const strResource of element.strResources) { - this.removeElements(strResource); + this.refreshAndRenderNode(node.element, false) + .catch(_common_errors_js__WEBPACK_IMPORTED_MODULE_8__["onUnexpectedError"]); } - this._notificationService.info(message); - return new WorkspaceVerificationError(); } } - _checkWorkspaceRedo(strResource, element, editStackSnapshot, checkInvalidatedResources) { - if (element.removedResources) { - return this._tryToSplitAndRedo(strResource, element, element.removedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceRedo', comment: ['{0} is a label for an operation. {1} is another message.'] }, "Could not redo '{0}' across all files. {1}", element.label, element.removedResources.createMessage())); - } - if (checkInvalidatedResources && element.invalidatedResources) { - return this._tryToSplitAndRedo(strResource, element, element.invalidatedResources, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceRedo', comment: ['{0} is a label for an operation. {1} is another message.'] }, "Could not redo '{0}' across all files. {1}", element.label, element.invalidatedResources.createMessage())); + setChildren(node, childrenElementsIterable, recursive, viewStateContext) { + const childrenElements = [...childrenElementsIterable]; + // perf: if the node was and still is a leaf, avoid all this hassle + if (node.children.length === 0 && childrenElements.length === 0) { + return []; } - // this must be the last future element in all the impacted resources! - const cannotRedoDueToResources = []; - for (const editStack of editStackSnapshot.editStacks) { - if (editStack.getClosestFutureElement() !== element) { - cannotRedoDueToResources.push(editStack.resourceLabel); + const nodesToForget = new Map(); + const childrenTreeNodesById = new Map(); + for (const child of node.children) { + nodesToForget.set(child.element, child); + if (this.identityProvider) { + const collapsed = this.tree.isCollapsed(child); + childrenTreeNodesById.set(child.id, { node: child, collapsed }); } } - if (cannotRedoDueToResources.length > 0) { - return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceRedoDueToChanges', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not redo '{0}' across all files because changes were made to {1}", element.label, cannotRedoDueToResources.join(', '))); - } - const cannotLockDueToResources = []; - for (const editStack of editStackSnapshot.editStacks) { - if (editStack.locked) { - cannotLockDueToResources.push(editStack.resourceLabel); + const childrenToRefresh = []; + const children = childrenElements.map(element => { + const hasChildren = !!this.dataSource.hasChildren(element); + if (!this.identityProvider) { + const asyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, hasChildren }); + if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { + asyncDataTreeNode.collapsedByDefault = false; + childrenToRefresh.push(asyncDataTreeNode); + } + return asyncDataTreeNode; } - } - if (cannotLockDueToResources.length > 0) { - return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceRedoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}", element.label, cannotLockDueToResources.join(', '))); - } - // check if new stack elements were added in the meantime... - if (!editStackSnapshot.isValid()) { - return this._tryToSplitAndRedo(strResource, element, null, _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotWorkspaceRedoDueToInMeantimeUndoRedo', comment: ['{0} is a label for an operation. {1} is a list of filenames.'] }, "Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime", element.label)); - } - return null; - } - _workspaceRedo(strResource, element) { - const affectedEditStacks = this._getAffectedEditStacks(element); - const verificationError = this._checkWorkspaceRedo(strResource, element, affectedEditStacks, /*invalidated resources will be checked after the prepare call*/ false); - if (verificationError) { - return verificationError.returnValue; - } - return this._executeWorkspaceRedo(strResource, element, affectedEditStacks); - } - _executeWorkspaceRedo(strResource, element, editStackSnapshot) { - return __awaiter(this, void 0, void 0, function* () { - // prepare - let cleanup; - try { - cleanup = yield this._invokeWorkspacePrepare(element); + const id = this.identityProvider.getId(element).toString(); + const result = childrenTreeNodesById.get(id); + if (result) { + const asyncDataTreeNode = result.node; + nodesToForget.delete(asyncDataTreeNode.element); + this.nodes.delete(asyncDataTreeNode.element); + this.nodes.set(element, asyncDataTreeNode); + asyncDataTreeNode.element = element; + asyncDataTreeNode.hasChildren = hasChildren; + if (recursive) { + if (result.collapsed) { + asyncDataTreeNode.children.forEach(node => dfs(node, node => this.nodes.delete(node.element))); + asyncDataTreeNode.children.splice(0, asyncDataTreeNode.children.length); + asyncDataTreeNode.stale = true; + } + else { + childrenToRefresh.push(asyncDataTreeNode); + } + } + else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { + asyncDataTreeNode.collapsedByDefault = false; + childrenToRefresh.push(asyncDataTreeNode); + } + return asyncDataTreeNode; } - catch (err) { - return this._onError(err, element); + const childAsyncDataTreeNode = createAsyncDataTreeNode({ element, parent: node, id, hasChildren }); + if (viewStateContext && viewStateContext.viewState.focus && viewStateContext.viewState.focus.indexOf(id) > -1) { + viewStateContext.focus.push(childAsyncDataTreeNode); } - // At this point, it is possible that the element has been made invalid in the meantime (due to the prepare await) - const verificationError = this._checkWorkspaceRedo(strResource, element, editStackSnapshot, /*now also check that there are no more invalidated resources*/ true); - if (verificationError) { - cleanup.dispose(); - return verificationError.returnValue; + if (viewStateContext && viewStateContext.viewState.selection && viewStateContext.viewState.selection.indexOf(id) > -1) { + viewStateContext.selection.push(childAsyncDataTreeNode); } - for (const editStack of editStackSnapshot.editStacks) { - editStack.moveForward(element); + if (viewStateContext && viewStateContext.viewState.expanded && viewStateContext.viewState.expanded.indexOf(id) > -1) { + childrenToRefresh.push(childAsyncDataTreeNode); } - return this._safeInvokeWithLocks(element, () => element.actual.redo(), editStackSnapshot, cleanup); - }); - } - _resourceRedo(editStack, element) { - if (!element.isValid) { - // invalid element => immediately flush edit stack! - editStack.flushAllElements(); - return; - } - if (editStack.locked) { - const message = _nls_js__WEBPACK_IMPORTED_MODULE_0__["localize"]({ key: 'cannotResourceRedoDueToInProgressUndoRedo', comment: ['{0} is a label for an operation.'] }, "Could not redo '{0}' because there is already an undo or redo operation running.", element.label); - this._notificationService.info(message); - return; - } - return this._invokeResourcePrepare(element, (cleanup) => { - editStack.moveForward(element); - return this._safeInvokeWithLocks(element, () => element.actual.redo(), new EditStackSnapshot([editStack]), cleanup); + else if (hasChildren && this.collapseByDefault && !this.collapseByDefault(element)) { + childAsyncDataTreeNode.collapsedByDefault = false; + childrenToRefresh.push(childAsyncDataTreeNode); + } + return childAsyncDataTreeNode; }); - } - redo(resource) { - const strResource = typeof resource === 'string' ? resource : this.getUriComparisonKey(resource); - if (!this._editStacks.has(strResource)) { - return; - } - const editStack = this._editStacks.get(strResource); - const element = editStack.getClosestFutureElement(); - if (!element) { - return; + for (const node of nodesToForget.values()) { + dfs(node, node => this.nodes.delete(node.element)); } - try { - if (element.type === 1 /* Workspace */) { - return this._workspaceRedo(strResource, element); - } - else { - return this._resourceRedo(editStack, element); - } + for (const child of children) { + this.nodes.set(child.element, child); } - finally { - if (DEBUG) { - this._print('redo'); - } + node.children.splice(0, node.children.length, ...children); + // TODO@joao this doesn't take filter into account + if (node !== this.root && this.autoExpandSingleChildren && children.length === 1 && childrenToRefresh.length === 0) { + children[0].collapsedByDefault = false; + childrenToRefresh.push(children[0]); } + return childrenToRefresh; } -}; -UndoRedoService = __decorate([ - __param(0, _dialogs_common_dialogs_js__WEBPACK_IMPORTED_MODULE_4__["IDialogService"]), - __param(1, _notification_common_notification_js__WEBPACK_IMPORTED_MODULE_7__["INotificationService"]) -], UndoRedoService); - -class WorkspaceVerificationError { - constructor(returnValue) { - this.returnValue = returnValue; - } -} -Object(_instantiation_common_extensions_js__WEBPACK_IMPORTED_MODULE_3__["registerSingleton"])(_undoRedo_js__WEBPACK_IMPORTED_MODULE_1__["IUndoRedoService"], UndoRedoService); - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/userDataSync/common/storageKeys.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/userDataSync/common/storageKeys.js ***! - \***************************************************************************************/ -/*! exports provided: IStorageKeysSyncRegistryService, StorageKeysSyncRegistryService */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IStorageKeysSyncRegistryService", function() { return IStorageKeysSyncRegistryService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StorageKeysSyncRegistryService", function() { return StorageKeysSyncRegistryService; }); -/* harmony import */ var _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/event.js */ "./node_modules/monaco-editor/esm/vs/base/common/event.js"); -/* harmony import */ var _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/lifecycle.js */ "./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - -const IStorageKeysSyncRegistryService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__["createDecorator"])('IStorageKeysSyncRegistryService'); -class StorageKeysSyncRegistryService extends _base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["Disposable"] { - constructor() { - super(); - this._storageKeys = new Map(); - this._onDidChangeStorageKeys = this._register(new _base_common_event_js__WEBPACK_IMPORTED_MODULE_0__["Emitter"]()); - this._register(Object(_base_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_1__["toDisposable"])(() => this._storageKeys.clear())); - } - get storageKeys() { return [...this._storageKeys.values()]; } - registerStorageKey(storageKey) { - if (!this._storageKeys.has(storageKey.key)) { - this._storageKeys.set(storageKey.key, storageKey); - this._onDidChangeStorageKeys.fire(this.storageKeys); + render(node, viewStateContext) { + const children = node.children.map(node => this.asTreeElement(node, viewStateContext)); + this.tree.setChildren(node === this.root ? null : node, children); + if (node !== this.root) { + this.tree.setCollapsible(node, node.hasChildren); } + this._onDidRender.fire(); } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js ***! - \**********************************************************************************/ -/*! exports provided: IWorkspaceContextService, IWorkspace, IWorkspaceFolder, Workspace, WorkspaceFolder */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IWorkspaceContextService", function() { return IWorkspaceContextService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IWorkspace", function() { return IWorkspace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IWorkspaceFolder", function() { return IWorkspaceFolder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Workspace", function() { return Workspace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceFolder", function() { return WorkspaceFolder; }); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); -/* harmony import */ var _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../base/common/resources.js */ "./node_modules/monaco-editor/esm/vs/base/common/resources.js"); -/* harmony import */ var _instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../instantiation/common/instantiation.js */ "./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"); -/* harmony import */ var _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../base/common/map.js */ "./node_modules/monaco-editor/esm/vs/base/common/map.js"); -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - - - -const IWorkspaceContextService = Object(_instantiation_common_instantiation_js__WEBPACK_IMPORTED_MODULE_2__["createDecorator"])('contextService'); -var IWorkspace; -(function (IWorkspace) { - function isIWorkspace(thing) { - return !!(thing && typeof thing === 'object' - && typeof thing.id === 'string' - && Array.isArray(thing.folders)); - } - IWorkspace.isIWorkspace = isIWorkspace; -})(IWorkspace || (IWorkspace = {})); -var IWorkspaceFolder; -(function (IWorkspaceFolder) { - function isIWorkspaceFolder(thing) { - return !!(thing && typeof thing === 'object' - && _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"].isUri(thing.uri) - && typeof thing.name === 'string' - && typeof thing.toResource === 'function'); - } - IWorkspaceFolder.isIWorkspaceFolder = isIWorkspaceFolder; -})(IWorkspaceFolder || (IWorkspaceFolder = {})); -class Workspace { - constructor(_id, folders = [], _configuration = null) { - this._id = _id; - this._configuration = _configuration; - this._foldersMap = _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__["TernarySearchTree"].forUris(); - this.folders = folders; - } - get folders() { - return this._folders; - } - set folders(folders) { - this._folders = folders; - this.updateFoldersMap(); - } - get id() { - return this._id; - } - get configuration() { - return this._configuration; - } - set configuration(configuration) { - this._configuration = configuration; - } - getFolder(resource) { - if (!resource) { - return null; + asTreeElement(node, viewStateContext) { + if (node.stale) { + return { + element: node, + collapsible: node.hasChildren, + collapsed: true + }; + } + let collapsed; + if (viewStateContext && viewStateContext.viewState.expanded && node.id && viewStateContext.viewState.expanded.indexOf(node.id) > -1) { + collapsed = false; + } + else { + collapsed = node.collapsedByDefault; } - return this._foldersMap.findSubstr(resource.with({ - scheme: resource.scheme, - authority: resource.authority, - path: resource.path - })) || null; + node.collapsedByDefault = undefined; + return { + element: node, + children: node.hasChildren ? _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].map(node.children, child => this.asTreeElement(child, viewStateContext)) : [], + collapsible: node.hasChildren, + collapsed + }; } - updateFoldersMap() { - this._foldersMap = _base_common_map_js__WEBPACK_IMPORTED_MODULE_3__["TernarySearchTree"].forUris(); - for (const folder of this.folders) { - this._foldersMap.set(folder.uri, folder); + processChildren(children) { + if (this.sorter) { + children = [...children].sort(this.sorter.compare.bind(this.sorter)); } + return children; } - toJSON() { - return { id: this.id, folders: this.folders, configuration: this.configuration }; + dispose() { + this.disposables.dispose(); } } -class WorkspaceFolder { - constructor(data, raw) { - this.raw = raw; - this.uri = data.uri; - this.index = data.index; - this.name = data.name; - } - toResource(relativePath) { - return _base_common_resources_js__WEBPACK_IMPORTED_MODULE_1__["joinPath"](this.uri, relativePath); - } - toJSON() { - return { uri: this.uri, name: this.name, index: this.index }; +class CompressibleAsyncDataTreeNodeWrapper { + constructor(node) { + this.node = node; } -} - - -/***/ }), - -/***/ "./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js": -/*!************************************************************************************!*\ - !*** ./node_modules/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js ***! - \************************************************************************************/ -/*! exports provided: WORKSPACE_EXTENSION, isSingleFolderWorkspaceIdentifier, toWorkspaceIdentifier */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WORKSPACE_EXTENSION", function() { return WORKSPACE_EXTENSION; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSingleFolderWorkspaceIdentifier", function() { return isSingleFolderWorkspaceIdentifier; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toWorkspaceIdentifier", function() { return toWorkspaceIdentifier; }); -/* harmony import */ var _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../base/common/uri.js */ "./node_modules/monaco-editor/esm/vs/base/common/uri.js"); - -const WORKSPACE_EXTENSION = 'code-workspace'; -function isSingleFolderWorkspaceIdentifier(obj) { - return obj instanceof _base_common_uri_js__WEBPACK_IMPORTED_MODULE_0__["URI"]; -} -function toWorkspaceIdentifier(workspace) { - if (workspace.configuration) { + get element() { return { - configPath: workspace.configuration, - id: workspace.id + elements: this.node.element.elements.map(e => e.element), + incompressible: this.node.element.incompressible }; } - if (workspace.folders.length === 1) { - return workspace.folders[0].uri; - } - // Empty workspace - return undefined; -} -//#endregion - - -/***/ }), - -/***/ "./node_modules/process/browser.js": -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); + get children() { return this.node.children.map(node => new CompressibleAsyncDataTreeNodeWrapper(node)); } + get depth() { return this.node.depth; } + get visibleChildrenCount() { return this.node.visibleChildrenCount; } + get visibleChildIndex() { return this.node.visibleChildIndex; } + get collapsible() { return this.node.collapsible; } + get collapsed() { return this.node.collapsed; } + get visible() { return this.node.visible; } + get filterData() { return this.node.filterData; } } -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; +class CompressibleAsyncDataTreeRenderer { + constructor(renderer, nodeMapper, compressibleNodeMapperProvider, onDidChangeTwistieState) { + this.renderer = renderer; + this.nodeMapper = nodeMapper; + this.compressibleNodeMapperProvider = compressibleNodeMapperProvider; + this.onDidChangeTwistieState = onDidChangeTwistieState; + this.renderedNodes = new Map(); + this.disposables = []; + this.templateId = renderer.templateId; } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; + renderTemplate(container) { + const templateData = this.renderer.renderTemplate(container); + return { templateData }; } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); + renderElement(node, index, templateData, height) { + this.renderer.renderElement(this.nodeMapper.map(node), index, templateData.templateData, height); } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); + renderCompressedElements(node, index, templateData, height) { + this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height); } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); + renderTwistie(element, twistieElement) { + if (element.slow) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["addClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); + else { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_9__["removeClasses"])(twistieElement, _treeIcons_js__WEBPACK_IMPORTED_MODULE_11__["treeItemLoadingIcon"].classNames); } + return false; } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } + disposeElement(node, index, templateData, height) { + if (this.renderer.disposeElement) { + this.renderer.disposeElement(this.nodeMapper.map(node), index, templateData.templateData, height); } - queueIndex = -1; - len = queue.length; } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; + disposeCompressedElements(node, index, templateData, height) { + if (this.renderer.disposeCompressedElements) { + this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(node), index, templateData.templateData, height); } } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), - -/***/ "./node_modules/regexparam/dist/regexparam.mjs": -/*!*****************************************************!*\ - !*** ./node_modules/regexparam/dist/regexparam.mjs ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function (str, loose) { - if (str instanceof RegExp) return { keys:false, pattern:str }; - var c, o, tmp, ext, keys=[], pattern='', arr = str.split('/'); - arr[0] || arr.shift(); - - while (tmp = arr.shift()) { - c = tmp[0]; - if (c === '*') { - keys.push('wild'); - pattern += '/(.*)'; - } else if (c === ':') { - o = tmp.indexOf('?', 1); - ext = tmp.indexOf('.', 1); - keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) ); - pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)'; - if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext); - } else { - pattern += '/' + tmp; - } - } - - return { - keys: keys, - pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i') - }; -}); - - -/***/ }), - -/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": -/*!****************************************************************************!*\ - !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isOldIE = function isOldIE() { - var memo; - return function memorize() { - if (typeof memo === 'undefined') { - // Test for IE <= 9 as proposed by Browserhacks - // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 - // Tests for existence of standard globals is to allow style-loader - // to operate correctly into non-standard environments - // @see https://github.com/webpack-contrib/style-loader/issues/177 - memo = Boolean(window && document && document.all && !window.atob); - } - - return memo; - }; -}(); - -var getTarget = function getTarget() { - var memo = {}; - return function memorize(target) { - if (typeof memo[target] === 'undefined') { - var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself - - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch (e) { - // istanbul ignore next - styleTarget = null; - } - } - - memo[target] = styleTarget; + disposeTemplate(templateData) { + this.renderer.disposeTemplate(templateData.templateData); } - - return memo[target]; - }; -}(); - -var stylesInDom = []; - -function getIndexByIdentifier(identifier) { - var result = -1; - - for (var i = 0; i < stylesInDom.length; i++) { - if (stylesInDom[i].identifier === identifier) { - result = i; - break; + dispose() { + this.renderedNodes.clear(); + this.disposables = Object(_common_lifecycle_js__WEBPACK_IMPORTED_MODULE_3__["dispose"])(this.disposables); } - } - - return result; } - -function modulesToDom(list, options) { - var idCountMap = {}; - var identifiers = []; - - for (var i = 0; i < list.length; i++) { - var item = list[i]; - var id = options.base ? item[0] + options.base : item[0]; - var count = idCountMap[id] || 0; - var identifier = "".concat(id, " ").concat(count); - idCountMap[id] = count + 1; - var index = getIndexByIdentifier(identifier); - var obj = { - css: item[1], - media: item[2], - sourceMap: item[3] - }; - - if (index !== -1) { - stylesInDom[index].references++; - stylesInDom[index].updater(obj); - } else { - stylesInDom.push({ - identifier: identifier, - updater: addStyle(obj, options), - references: 1 - }); - } - - identifiers.push(identifier); - } - - return identifiers; +function asCompressibleObjectTreeOptions(options) { + const objectTreeOptions = options && asObjectTreeOptions(options); + return objectTreeOptions && Object.assign(Object.assign({}, objectTreeOptions), { keyboardNavigationLabelProvider: objectTreeOptions.keyboardNavigationLabelProvider && Object.assign(Object.assign({}, objectTreeOptions.keyboardNavigationLabelProvider), { getCompressedNodeKeyboardNavigationLabel(els) { + return options.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(els.map(e => e.element)); + } }) }); } - -function insertStyleElement(options) { - var style = document.createElement('style'); - var attributes = options.attributes || {}; - - if (typeof attributes.nonce === 'undefined') { - var nonce = true ? __webpack_require__.nc : undefined; - - if (nonce) { - attributes.nonce = nonce; +class CompressibleAsyncDataTree extends AsyncDataTree { + constructor(user, container, virtualDelegate, compressionDelegate, renderers, dataSource, options = {}) { + super(user, container, virtualDelegate, renderers, dataSource, options); + this.compressionDelegate = compressionDelegate; + this.compressibleNodeMapper = new _tree_js__WEBPACK_IMPORTED_MODULE_2__["WeakMapper"](node => new CompressibleAsyncDataTreeNodeWrapper(node)); + this.filter = options.filter; } - } - - Object.keys(attributes).forEach(function (key) { - style.setAttribute(key, attributes[key]); - }); - - if (typeof options.insert === 'function') { - options.insert(style); - } else { - var target = getTarget(options.insert || 'head'); - - if (!target) { - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + createTree(user, container, delegate, renderers, options) { + const objectTreeDelegate = new _abstractTree_js__WEBPACK_IMPORTED_MODULE_0__["ComposedTreeDelegate"](delegate); + const objectTreeRenderers = renderers.map(r => new CompressibleAsyncDataTreeRenderer(r, this.nodeMapper, () => this.compressibleNodeMapper, this._onDidChangeNodeSlowState.event)); + const objectTreeOptions = asCompressibleObjectTreeOptions(options) || {}; + return new _objectTree_js__WEBPACK_IMPORTED_MODULE_1__["CompressibleObjectTree"](user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions); } - - target.appendChild(style); - } - - return style; -} - -function removeStyleElement(style) { - // istanbul ignore if - if (style.parentNode === null) { - return false; - } - - style.parentNode.removeChild(style); -} -/* istanbul ignore next */ - - -var replaceText = function replaceText() { - var textStore = []; - return function replace(index, replacement) { - textStore[index] = replacement; - return textStore.filter(Boolean).join('\n'); - }; -}(); - -function applyToSingletonTag(style, index, remove, obj) { - var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE - - /* istanbul ignore if */ - - if (style.styleSheet) { - style.styleSheet.cssText = replaceText(index, css); - } else { - var cssNode = document.createTextNode(css); - var childNodes = style.childNodes; - - if (childNodes[index]) { - style.removeChild(childNodes[index]); + asTreeElement(node, viewStateContext) { + return Object.assign({ incompressible: this.compressionDelegate.isIncompressible(node.element) }, super.asTreeElement(node, viewStateContext)); } - - if (childNodes.length) { - style.insertBefore(cssNode, childNodes[index]); - } else { - style.appendChild(cssNode); + updateOptions(options = {}) { + this.tree.updateOptions(options); } - } -} - -function applyToTag(style, options, obj) { - var css = obj.css; - var media = obj.media; - var sourceMap = obj.sourceMap; - - if (media) { - style.setAttribute('media', media); - } else { - style.removeAttribute('media'); - } - - if (sourceMap && typeof btoa !== 'undefined') { - css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); - } // For old IE - - /* istanbul ignore if */ - - - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - while (style.firstChild) { - style.removeChild(style.firstChild); + render(node, viewStateContext) { + if (!this.identityProvider) { + return super.render(node, viewStateContext); + } + // Preserve traits across compressions. Hacky but does the trick. + // This is hard to fix properly since it requires rewriting the traits + // across trees and lists. Let's just keep it this way for now. + const getId = (element) => this.identityProvider.getId(element).toString(); + const getUncompressedIds = (nodes) => { + const result = new Set(); + for (const node of nodes) { + const compressedNode = this.tree.getCompressedTreeNode(node === this.root ? null : node); + if (!compressedNode.element) { + continue; + } + for (const node of compressedNode.element.elements) { + result.add(getId(node.element)); + } + } + return result; + }; + const oldSelection = getUncompressedIds(this.tree.getSelection()); + const oldFocus = getUncompressedIds(this.tree.getFocus()); + super.render(node, viewStateContext); + const selection = this.getSelection(); + let didChangeSelection = false; + const focus = this.getFocus(); + let didChangeFocus = false; + const visit = (node) => { + const compressedNode = node.element; + if (compressedNode) { + for (let i = 0; i < compressedNode.elements.length; i++) { + const id = getId(compressedNode.elements[i].element); + const element = compressedNode.elements[compressedNode.elements.length - 1].element; + // github.com/microsoft/vscode/issues/85938 + if (oldSelection.has(id) && selection.indexOf(element) === -1) { + selection.push(element); + didChangeSelection = true; + } + if (oldFocus.has(id) && focus.indexOf(element) === -1) { + focus.push(element); + didChangeFocus = true; + } + } + } + node.children.forEach(visit); + }; + visit(this.tree.getCompressedTreeNode(node === this.root ? null : node)); + if (didChangeSelection) { + this.setSelection(selection); + } + if (didChangeFocus) { + this.setFocus(focus); + } } - - style.appendChild(document.createTextNode(css)); - } -} - -var singleton = null; -var singletonCounter = 0; - -function addStyle(obj, options) { - var style; - var update; - var remove; - - if (options.singleton) { - var styleIndex = singletonCounter++; - style = singleton || (singleton = insertStyleElement(options)); - update = applyToSingletonTag.bind(null, style, styleIndex, false); - remove = applyToSingletonTag.bind(null, style, styleIndex, true); - } else { - style = insertStyleElement(options); - update = applyToTag.bind(null, style, options); - - remove = function remove() { - removeStyleElement(style); - }; - } - - update(obj); - return function updateStyle(newObj) { - if (newObj) { - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { - return; - } - - update(obj = newObj); - } else { - remove(); + // For compressed async data trees, `TreeVisibility.Recurse` doesn't currently work + // and we have to filter everything beforehand + // Related to #85193 and #85835 + processChildren(children) { + if (this.filter) { + children = _common_iterator_js__WEBPACK_IMPORTED_MODULE_6__["Iterable"].filter(children, e => { + const result = this.filter.filter(e, 1 /* Visible */); + const visibility = getVisibility(result); + if (visibility === 2 /* Recurse */) { + throw new Error('Recursive tree visibility not supported in async data compressed trees'); + } + return visibility === 1 /* Visible */; + }); + } + return super.processChildren(children); } - }; } - -module.exports = function (list, options) { - options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of \n\t\t\t\t`,this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(G.a("slot"))):this.container.appendChild(this.view);const n=new _e.b;Or.BUBBLE_UP_EVENTS.forEach(e=>{n.add(G.n(this.container,e,e=>{this.onDOMEvent(e,!1)}))}),Or.BUBBLE_DOWN_EVENTS.forEach(e=>{n.add(G.n(this.container,e,e=>{this.onDOMEvent(e,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),G.s(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",G.Z(this.view),this.toDisposeOnClean=e.render(this.view)||_e.a.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||ve.c&&Er.a.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(G.M(t)){let n=G.C(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const n=G.H(this.view),i=G.G(this.view),r=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,s={offset:e.top-window.pageYOffset,size:e.height,position:0===r?0:1};let a;a=0===o?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};const l=Tr(window.innerHeight,i,s)+window.pageYOffset;Dr.a.intersects({start:l,end:l+i},{start:s.offset,end:s.offset+s.size})&&(a.size=e.width,1===o&&(a.offset=e.left));const c=Tr(window.innerWidth,n,a);G.R(this.view,"top","bottom","left","right"),G.e(this.view,0===r?"bottom":"top"),G.e(this.view,0===o?"left":"right"),G.ab(this.view,"fixed",this.useFixedPosition);const d=G.C(this.container);this.view.style.top=`${l-(this.useFixedPosition?G.C(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?G.C(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),G.K(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!G.L(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Or.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Or.BUBBLE_DOWN_EVENTS=["click"];let Nr='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var Ir=n(16),Ar=n(112),Rr=n(30),Pr=n(59);const jr=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Fr=/(&)?(&)([^\s&])/g,Br=Object(Ir.e)("menu-selection",Ir.a.check),Wr=Object(Ir.e)("menu-submenu",Ir.a.chevronRight);var Hr;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Hr||(Hr={}));class Yr extends Lr.a{constructor(e,t,n={}){Object(G.e)(e,"monaco-menu-container"),e.setAttribute("role","presentation");const i=document.createElement("div");Object(G.e)(i,"monaco-menu"),i.setAttribute("role","presentation"),super(i,{orientation:2,actionViewItemProvider:e=>this.doGetActionViewItem(e,n,r),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,triggerKeys:{keys:[3,...ve.f||ve.d?[10]:[]],keyDown:!0}}),this.menuElement=i,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new _e.b),this.initializeStyleSheet(e),Object(G.i)(i,G.c.KEY_DOWN,e=>{new Gt.a(e).equals(2)&&e.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(Object(G.i)(i,G.c.KEY_DOWN,e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){G.b.stop(e,!0);const n=this.mnemonics.get(t);if(1===n.length&&(n[0]instanceof zr&&n[0].container&&this.focusItemByElement(n[0].container),n[0].onClick(e)),n.length>1){const e=n.shift();e&&e.container&&(this.focusItemByElement(e.container),n.push(e)),this.mnemonics.set(t,n)}}})),ve.d&&this._register(Object(G.i)(i,G.c.KEY_DOWN,e=>{const t=new Gt.a(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),G.b.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),G.b.stop(e,!0))})),this._register(Object(G.i)(this.domNode,G.c.MOUSE_OUT,e=>{let t=e.relatedTarget;Object(G.L)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())})),this._register(Object(G.i)(this.actionsList,G.c.MOUSE_OVER,e=>{let t=e.target;if(t&&Object(G.L)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(Object(G.I)(t,"action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}));let r={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Mr.a(i,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(Object(G.i)(o,G.c.MOUSE_UP,e=>{e.preventDefault()})),i.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(e=>{var t;return null===(t=n.submenuIds)||void 0===t||!t.has(e.id)||(console.warn(`Found submenu cycle: ${e.id}`),!1)}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(e=>!(e instanceof Ur)).forEach((e,t,n)=>{e.updatePositionInSet(t+1,n.length)})}initializeStyleSheet(e){Object(G.O)(e)?(this.styleSheet=Object(G.v)(e),this.styleSheet.innerHTML=$r):(Yr.globalStyleSheet||(Yr.globalStyleSheet=Object(G.v)(),Yr.globalStyleSheet.innerHTML=$r),this.styleSheet=Yr.globalStyleSheet)}style(e){const t=this.getContainer(),n=e.foregroundColor?`${e.foregroundColor}`:"",i=e.backgroundColor?`${e.backgroundColor}`:"",r=e.borderColor?`1px solid ${e.borderColor}`:"",o=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=r,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(t=>{(t instanceof Vr||t instanceof Ur)&&t.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(Object(G.i)(this.element,G.c.MOUSE_UP,e=>{if(G.b.stop(e,!0),Rr.h){if(new Pr.a(e).rightButton)return;this.onClick(e)}setTimeout(()=>{this.onClick(e)},0)})),this._register(Object(G.i)(this.element,G.c.CONTEXT_MENU,e=>{G.b.stop(e,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=Object(G.p)(this.element,Object(G.a)("a.action-menu-item")),this._action.id===xr.c.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=Object(G.p)(this.item,Object(G.a)("span.menu-item-check"+Br.cssSelector)),this.check.setAttribute("role","none"),this.label=Object(G.p)(this.item,Object(G.a)("span.action-label")),this.options.label&&this.options.keybinding&&(Object(G.p)(this.item,Object(G.a)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){Object(G.s)(this.label);let e=Object(Ir.h)(this.getAction().label);if(e){const t=function(e){const t=jr,n=t.exec(e);if(!n)return e;const i=!n[1];return e.replace(t,i?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const n=jr.exec(e);if(n){e=Fe.u(e),Fr.lastIndex=0;let t=Fr.exec(e);for(;t&&t[1];)t=Fr.exec(e);const i=e=>e.replace(/&&/g,"&");t?this.label.append(Fe.K(i(e.substr(0,t.index))," "),Object(G.a)("u",{"aria-hidden":"true"},t[3]),Fe.Q(i(e.substr(t.index+t[0].length))," ")):this.label.innerText=i(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=dn.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&Object(G.R)(this.item,this.cssClass),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",Object(G.e)(this.label,"icon"),this.cssClass&&Object(G.f)(this.label,this.cssClass),this.updateEnabled()):this.label&&Object(G.Q)(this.label,"icon")}updateEnabled(){this.getAction().enabled?(this.element&&Object(G.Q)(this.element,"disabled"),this.item&&(Object(G.Q)(this.item,"disabled"),this.item.tabIndex=0)):(this.element&&Object(G.e)(this.element,"disabled"),this.item&&(Object(G.e)(this.item,"disabled"),Object(G.T)(this.item)))}updateChecked(){this.item&&(this.getAction().checked?(Object(G.e)(this.item,"checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(Object(G.Q)(this.item,"checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&Object(G.I)(this.element,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=i)}style(e){this.menuStyle=e,this.applyStyle()}}class zr extends Vr{constructor(e,t,n,i){super(e,e,i),this.submenuActions=t,this.parentData=n,this.submenuOptions=i,this.mysubmenu=null,this.submenuDisposables=this._register(new _e.b),this.mouseOver=!1,this.expandDirection=i&&void 0!==i.expandDirection?i.expandDirection:Hr.Right,this.showScheduler=new me.d(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new me.d(()=>{this.element&&!Object(G.L)(Object(G.x)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(Object(G.e)(this.item,"monaco-submenu-item"),this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Object(G.p)(this.item,Object(G.a)("span.submenu-indicator"+Wr.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Object(G.i)(this.element,G.c.KEY_UP,e=>{let t=new Gt.a(e);(t.equals(17)||t.equals(3))&&(G.b.stop(e,!0),this.createSubmenu(!0))})),this._register(Object(G.i)(this.element,G.c.KEY_DOWN,e=>{let t=new Gt.a(e);Object(G.x)()===this.item&&(t.equals(17)||t.equals(3))&&G.b.stop(e,!0)})),this._register(Object(G.i)(this.element,G.c.MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Object(G.i)(this.element,G.c.MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(Object(G.i)(this.element,G.c.FOCUS_OUT,e=>{this.element&&!Object(G.L)(Object(G.x)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}onClick(e){G.b.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,i){const r={top:0,left:0};return r.left=Tr(e.width,t.width,{position:i===Hr.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new Gt.a(e).equals(15)&&(G.b.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Object(G.i)(this.submenuContainer,G.c.KEY_DOWN,e=>{new Gt.a(e).equals(15)&&G.b.stop(e,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&Object(G.I)(this.element,"focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Ur extends Ar.a{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}let $r=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${Object(tr.b)(Br)}\n${Object(tr.b)(Wr)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var qr=n(82),Kr=n(34);class Gr{constructor(e,t,n,i,r){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.themeService=r,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let n;this.focusToReturn=document.activeElement;let i=Object(G.M)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,render:i=>{let r=e.getMenuClassName?e.getMenuClassName():"";r&&(i.className+=" "+r),this.options.blockMouse&&(this.block=i.appendChild(Object(G.a)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",Object(Kr.a)(this.block,G.c.MOUSE_DOWN)(e=>e.stopPropagation()));const o=new _e.b,s=e.actionRunner||new xr.b;return s.onDidBeforeRun(this.onActionRun,this,o),s.onDidRun(this.onDidActionRun,this,o),n=new Yr(i,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),o.add(Object(qr.c)(n,this.themeService)),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,o),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,o),Object(Kr.a)(window,G.c.BLUR)(()=>{this.contextViewService.hideContextView(!0)},null,o),Object(Kr.a)(window,G.c.MOUSE_DOWN)(e=>{if(e.defaultPrevented)return;let t=new Pr.a(e),n=t.target;if(!t.rightButton){for(;n;){if(n===i)return;n=n.parentElement}this.contextViewService.hideContextView(!0)}},null,o),Object(_e.e)(o,n)},focus:()=>{n&&n.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(Object(G.S)(this.block),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},i,!!i)}onActionRun(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&this.notificationService&&this.notificationService.error(e.error)}}var Zr=n(108),Jr=function(e,t){return function(n,i){t(n,i,e)}};let Xr=class extends _e.a{constructor(e,t,n,i,r){super(),this._onDidContextMenu=this._register(new F.a),this.onDidContextMenu=this._onDidContextMenu.event,this.contextMenuHandler=new Gr(n,e,t,i,r)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()}};Xr=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Jr(0,Zr.a),Jr(1,Sn.a),Jr(2,Qn.b),Jr(3,ti.a),Jr(4,ni.c)],Xr);const Qr=Object(ei.c)("layoutService");let eo=class extends _e.a{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=_e.a.None,this.container=e.container,this.contextView=this._register(new Or(this.container,1)),this.layout(),this._register(e.onLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,n){t?t!==this.container&&(this.container=t,this.setContainer(t,n?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const i=Object(_e.h)(()=>{this.currentViewDisposable===i&&this.hideContextView()});return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};eo=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([function(e,t){return function(n,i){t(n,i,e)}}(0,Qr)],eo);var to=n(204);class no{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class io{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing.set(this._hashFn(t),i),i.incoming.set(this._hashFn(e),n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new no(e),this._nodes.set(t,n)),n}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,n]of this._nodes)e.push(`${t}, (incoming)[${[...n.incoming.keys()].join(", ")}], (outgoing)[${[...n.outgoing.keys()].join(",")}]`);return e.join("\n")}}var ro=n(176),oo=n(153);const so=!1;class ao extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class lo{constructor(e=new oo.a,t=!1,n){this._services=e,this._strict=t,this._parent=n,this._services.set(ei.a,this)}createChild(e){return new lo(e,this._strict,this)}invokeFunction(e,...t){let n=co.traceInvocation(e),i=!1;try{return e({get:(e,t)=>{if(i)throw Object(be.c)("service accessor is only valid during the invocation of its target method");const r=this._getOrCreateServiceInstance(e,n);if(!r&&t!==ei.d)throw new Error(`[invokeFunction] unknown service '${e}'`);return r}},...t)}finally{i=!0,n.stop()}}createInstance(e,...t){let n,i;return e instanceof ro.a?(n=co.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=co.traceCreation(e),i=this._createInstance(e,t,n)),n.stop(),i}_createInstance(e,t=[],n){let i=ei.b.getServiceDependencies(e).sort((e,t)=>e.index-t.index),r=[];for(const t of i){let i=this._getOrCreateServiceInstance(t.id,n);if(!i&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);r.push(i)}let o=i.length>0?i[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let n=o-t.length;t=n>0?t.concat(new Array(n)):t.slice(0,o)}return new e(...[...t,...r])}_setServiceInstance(e,t){if(this._services.get(e)instanceof ro.a)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof ro.a?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_createAndCacheServiceInstance(e,t,n){const i=new io(e=>e.id.toString());let r=0;const o=[{id:e,desc:t,_trace:n}];for(;o.length;){const t=o.pop();if(i.lookupOrInsertNode(t),r++>1e3)throw new ao(i);for(let n of ei.b.getServiceDependencies(t.desc.ctor)){let r=this._getServiceInstanceOrDescriptor(n.id);if(r||n.optional||console.warn(`[createInstance] ${e} depends on ${n.id} which is NOT registered.`),r instanceof ro.a){const e={id:n.id,desc:r,_trace:t._trace.branch(n.id,!0)};i.insertEdge(t,e),o.push(e)}}}for(;;){const e=i.roots();if(0===e.length){if(!i.isEmpty())throw new ao(i);break}for(const{data:t}of e){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e),i.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],i,r){if(this._services.get(e)instanceof ro.a)return this._createServiceInstance(t,n,i,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,r);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],n,i){if(n){const n=new me.b(()=>this._createInstance(e,t,i));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let i=n.value,r=i[t];return"function"!=typeof r?r:(r=r.bind(i),e[t]=r,r)},set:(e,t,i)=>(n.value[t]=i,!0)})}return this._createInstance(e,t,i)}}class co{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return so?new co(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):co._None}static traceCreation(e){return so?new co(0,e.name):co._None}branch(e,t){let n=new co(2,e.toString());return this._dep.push([e,t,n]),n}stop(){let e=Date.now()-this._start;co._totals+=e;let t=!1;let n=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(n,i){let r=[],o=new Array(n+1).join("\t");for(const[s,a,l]of i._dep)if(a&&l){t=!0,r.push(`${o}CREATES -> ${s}`);let i=e(n+1,l);i&&r.push(i)}else r.push(`${o}uses -> ${s}`);return r.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${co._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join("\n"))}}co._None=new class extends co{constructor(){super(-1,null)}stop(){}branch(){return this}},co._totals=0;var uo=n(169),ho=n(129),fo=n(52),go=n(38);class po{constructor(){this._byResource=new nn.b,this._byOwner=new Map}set(e,t,n){let i=this._byResource.get(e);i||(i=new Map,this._byResource.set(e,i)),i.set(t,n);let r=this._byOwner.get(t);r||(r=new nn.b,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){let n=this._byResource.get(e);return null==n?void 0:n.get(t)}delete(e,t){let n=!1,i=!1,r=this._byResource.get(e);r&&(n=r.delete(t));let o=this._byOwner.get(t);if(o&&(i=o.delete(e)),n!==i)throw new Error("illegal state");return n&&i}values(e){var t,n,i,r;return"string"==typeof e?null!==(n=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==n?n:go.a.empty():W.a.isUri(e)?null!==(r=null===(i=this._byResource.get(e))||void 0===i?void 0:i.values())&&void 0!==r?r:go.a.empty():go.a.map(go.a.concat(...this._byOwner.values()),e=>e[1])}}class mo{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new nn.b,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===X.b.inMemory||e.scheme===X.b.walkThrough||e.scheme===X.b.walkThroughSnippet)return t;for(const{severity:n}of this._service.read({resource:e}))n===fo.c.Error?t.errors+=1:n===fo.c.Warning?t.warnings+=1:n===fo.c.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class _o{constructor(){this._onMarkerChanged=new F.a,this.onMarkerChanged=F.b.debounce(this._onMarkerChanged.event,_o._debouncer,0),this._data=new po,this._stats=new mo(this)}dispose(){this._stats.dispose()}remove(e,t){for(const n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(Object(Ee.n)(n)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const i=[];for(const r of n){const n=_o._toMarker(e,t,r);n&&i.push(n)}this._data.set(t,e,i),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:i,severity:r,message:o,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:u,tags:h}=n;if(o)return{resource:t,owner:e,code:i,severity:r,message:o,source:s,startLineNumber:a=a>0?a:1,startColumn:l=l>0?l:1,endLineNumber:c=c>=a?c:a,endColumn:d=d>0?d:l,relatedInformation:u,tags:h}}read(e=Object.create(null)){let{owner:t,resource:n,severities:i,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){const e=this._data.get(n,t);if(e){const t=[];for(const n of e)if(_o._accept(n,i)){const e=t.push(n);if(r>0&&e===r)break}return t}return[]}if(t||n){const e=this._data.values(null!=n?n:t),o=[];for(const t of e)for(const e of t)if(_o._accept(e,i)){const t=o.push(e);if(r>0&&t===r)return o}return o}{const e=[];for(let t of this._data.values())for(let n of t)if(_o._accept(n,i)){const t=e.push(n);if(r>0&&t===r)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(_o._dedupeMap=new nn.b,e=[]);for(const n of t)_o._dedupeMap.has(n)||(_o._dedupeMap.set(n,!0),e.push(n));return e}}var bo=n(87),vo=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},yo=function(e,t){return function(n,i){t(n,i,e)}};let wo=class{constructor(e){this._commandService=e}createMenu(e,t){return new Co(e,this._commandService,t,this)}};wo=vo([yo(0,ee.b)],wo);let Co=class e{constructor(e,t,n,i){this._id=e,this._commandService=t,this._contextKeyService=n,this._menuService=i,this._onDidChange=new F.a,this._dispoables=new _e.b,this._menuGroups=[],this._contextKeys=new Set,this._build(),this._dispoables.add(F.b.debounce(F.b.filter(Jn.d.onDidChangeMenu,e=>e.has(this._id)),()=>{},50)(this._build,this)),this._dispoables.add(F.b.debounce(this._contextKeyService.onDidChangeContext,(e,t)=>e||t.affectsSome(this._contextKeys),50)(e=>e&&this._onDidChange.fire(void 0),this))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=Jn.d.getMenuItems(this._id);let n;t.sort(e._compareMenuItems);for(let i of t){const t=i.group||"";if(n&&n[0]===t||(n=[t,[]],this._menuGroups.push(n)),n[1].push(i),e._fillInKbExprKeys(i.when,this._contextKeys),Object(Jn.f)(i)&&i.command.precondition&&e._fillInKbExprKeys(i.command.precondition,this._contextKeys),Object(Jn.f)(i)&&i.command.toggled){const t=i.command.toggled.condition||i.command.toggled;e._fillInKbExprKeys(t,this._contextKeys)}}this._onDidChange.fire(this)}get onDidChange(){return this._onDidChange.event}getActions(e){const t=[];for(let n of this._menuGroups){const[i,r]=n,o=[];for(const t of r)if(this._contextKeyService.contextMatchesRules(t.when)){const n=Object(Jn.f)(t)?new Jn.c(t.command,t.alt,e,this._contextKeyService,this._commandService):new Jn.e(t,this._menuService,this._contextKeyService,e);o.push(n)}o.length>0&&t.push([i,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(let n of e.keys())t.add(n)}static _compareMenuItems(t,n){let i=t.group,r=n.group;if(i!==r){if(!i)return 1;if(!r)return-1;if("navigation"===i)return-1;if("navigation"===r)return 1;let e=i.localeCompare(r);if(0!==e)return e}let o=t.order||0,s=n.order||0;return os?1:e._compareTitles(Object(Jn.f)(t)?t.command.title:t.title,Object(Jn.f)(n)?n.command.title:n.title)}static _compareTitles(e,t){const n="string"==typeof e?e:e.value,i="string"==typeof t?t:t.value;return n.localeCompare(i)}};Co=vo([yo(1,ee.b),yo(2,Xn.b),yo(3,Jn.a)],Co);var So=n(273),ko=function(e,t){return function(n,i){t(n,i,e)}};function xo(e){return e.toString()}class Lo extends _e.a{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Object(_e.h)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const n=[...this._markersData.keys()];this._markersData.clear();const i=this.model.deltaDecorations(n,t);for(let t=0;tthis._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(xo(e.uri));return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(xo(e));t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new Lo(e);this._markerDecorations.set(xo(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(xo(e.uri));t&&(t.dispose(),this._markerDecorations.delete(xo(e.uri))),e.uri.scheme!==X.b.inMemory&&e.uri.scheme!==X.b.internal&&e.uri.scheme!==X.b.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let n=t.map(t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)}));e.update(t,n)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let n=Y.a.lift(t);if(t.severity!==fo.c.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2)),(n=e.validateRange(n)).isEmpty()){let t=e.getWordAtPosition(n.getStartPosition());if(t)n=new Y.a(n.startLineNumber,t.startColumn,n.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===t||(n=n.endColumn>=t?new Y.a(n.startLineNumber,t-1,n.endLineNumber,t):new Y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){let i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0}};Mo=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([ko(0,lt.a),ko(1,fo.b)],Mo);var Do=n(103),Eo=function(e,t){return function(n,i){t(n,i,e)}};let To=class extends _e.a{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new F.a,this._accessibilityModeEnabledContext=ii.a.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire())})),n(),this.onDidChangeScreenReaderOptimized(()=>n())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};To=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Eo(0,Xn.b),Eo(1,tn.a)],To);var Oo=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};class No{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return Oo(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const n=document.activeElement,i=document.body.appendChild(Object(G.a)("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(i)}))}readText(e){return Oo(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return Oo(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Oo(this,void 0,void 0,(function*(){this.findText=e}))}}var Io=n(154),Ao=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Ro=function(e,t){return function(n,i){t(n,i,e)}},Po=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function jo(e){return e.scheme===X.b.file?e.fsPath:e.path}let Fo=0;class Bo{constructor(e,t,n){this.id=++Fo,this.type=0,this.actual=e,this.label=e.label,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[${this.id}] [${this.isValid?"VALID":"INVALID"}] ${this.actual}`}}class Wo{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ho{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){(0===n.reason?e:t).push(n.resourceLabel)}let n=[];return e.length>0&&n.push(dn.a({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(dn.a({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Yo{constructor(e,t,n){this.id=++Fo,this.type=1,this.actual=e,this.label=e.label,this.resourceLabels=t,this.strResources=n,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,n){this.removedResources||(this.removedResources=new Ho),this.removedResources.has(t)||this.removedResources.set(t,new Wo(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ho),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Wo(e,0)))}toString(){return`[${this.id}] [${this.invalidatedResources?"INVALID":"VALID"}] ${this.actual}`}}class Vo{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);if(this._future=[],this._past.length>0){const e=this._past[this._past.length-1];0!==e.type||e.isValid||(this._past=[])}this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,n=this._past.length;e=0;e--)t.push(this._future[e].id);return new Io.b(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,i=0,r=-1;for(let o=0,s=this._past.length;o=t||s.id!==e.elements[i])&&(n=!1,r=0),n||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let r=this._future.length-1;r>=0;r--,i++){const s=this._future[r];n&&(i>=t||s.id!==e.elements[i])&&(n=!1,o=r),n||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==r&&(this._past=this._past.slice(0,r)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class zo{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;e{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,i=_e.a.None){const r=this._acquireLocks(n);let o;try{o=t()}catch(t){return r(),i.dispose(),this._onError(t,e)}if(o)return o.then(()=>{r(),i.dispose()},t=>(r(),i.dispose(),this._onError(t,e)));r(),i.dispose()}_invokeWorkspacePrepare(e){return Po(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return _e.a.None;const t=e.actual.prepareUndoRedo();return void 0===t?_e.a.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return void t(_e.a.None);const n=e.actual.prepareUndoRedo();if(n){if(!Object(_e.g)(n))return n.then(e=>{t(e)});t(n)}else t(_e.a.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||Uo);return new zo(t)}_tryToSplitAndUndo(e,t,n,i){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.info(i),new qo(this.undo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.info(i),new qo}_checkWorkspaceUndo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,dn.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,dn.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const e of n.editStacks)e.getClosestPastElement()!==t&&r.push(e.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,dn.a({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const o=[];for(const e of n.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,dn.a({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,dn.a({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceUndo(e,t,n,!1);return i?i.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n)}_confirmAndExecuteWorkspaceUndo(e,t,n){return Po(this,void 0,void 0,(function*(){if(t.canSplit()){const i=yield this._dialogService.show(Zt.a.Info,dn.a("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[dn.a({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),dn.a("nok","Undo this File"),dn.a("cancel","Cancel")],{cancelId:2});if(2===i.choice)return;if(1===i.choice)return this._splitPastWorkspaceElement(t,null),this.undo(e);const r=this._checkWorkspaceUndo(e,t,n,!1);if(r)return r.returnValue}let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceUndo(e,t,n,!0);if(r)return i.dispose(),r.returnValue;for(const e of n.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,i)}))}_resourceUndo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new zo([e]),n)));{const e=dn.a({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}undo(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);if(!this._editStacks.has(t))return;const n=this._editStacks.get(t),i=n.getClosestPastElement();if(i)try{return 1===i.type?this._workspaceUndo(t,i):this._resourceUndo(n,i)}finally{0}}canRedo(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasFutureElements()}return!1}_tryToSplitAndRedo(e,t,n,i){if(t.canSplit())return this._splitFutureWorkspaceElement(t,n),this._notificationService.info(i),new qo(this.redo(e));for(const e of t.strResources)this.removeElements(e);return this._notificationService.info(i),new qo}_checkWorkspaceRedo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,dn.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,dn.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const e of n.editStacks)e.getClosestFutureElement()!==t&&r.push(e.resourceLabel);if(r.length>0)return this._tryToSplitAndRedo(e,t,null,dn.a({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const o=[];for(const e of n.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,dn.a({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,dn.a({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceRedo(e,t,n,!1);return i?i.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return Po(this,void 0,void 0,(function*(){let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return i.dispose(),r.returnValue;for(const e of n.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,i)}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new zo([e]),n)));{const e=dn.a({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}redo(e){const t="string"==typeof e?e:this.getUriComparisonKey(e);if(!this._editStacks.has(t))return;const n=this._editStacks.get(t),i=n.getClosestFutureElement();if(i)try{return 1===i.type?this._workspaceRedo(t,i):this._resourceRedo(n,i)}finally{0}}};$o=Ao([Ro(0,to.a),Ro(1,Sn.a)],$o);class qo{constructor(e){this.returnValue=e}}Object(Do.b)(Io.a,$o);n(635);var Ko=n(4),Go=(n(239),n(139)),Zo=n(155);const Jo=new me.b(()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function Xo(e,t,n){const i=e.toLowerCase(),r=t.toLowerCase(),o=function(e,t,n){const i=e.toLowerCase(),r=t.toLowerCase(),o=i.startsWith(n),s=r.startsWith(n);if(o!==s)return o?-1:1;if(o&&s){if(i.lengthr.length)return 1}return 0}(e,t,n);if(o)return o;const s=i.endsWith(n);if(s!==r.endsWith(n))return s?-1:1;const a=function(e,t,n=!1){const i=e||"",r=t||"",o=Jo.value.collator.compare(i,r);return Jo.value.collatorIsNumeric&&0===o&&i!==r?i=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};const cs=G.a;class ds{constructor(e){this.hidden=!1,this._onChecked=new F.a,this.onChecked=this._onChecked.event,Object(rn.a)(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class us{get templateId(){return us.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=G.p(e,cs(".quick-input-list-entry"));const n=G.p(t.entry,cs("label.quick-input-list-label"));t.toDisposeTemplate.push(G.n(n,G.c.CLICK,e=>{t.checkbox.offsetParent||e.preventDefault()})),t.checkbox=G.p(n,cs("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(G.n(t.checkbox,G.c.CHANGE,e=>{t.element.checked=t.checkbox.checked}));const i=G.p(n,cs(".quick-input-list-rows")),r=G.p(i,cs(".quick-input-list-row")),o=G.p(i,cs(".quick-input-list-row"));t.label=new Qo.a(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportCodicons:!0});const s=G.p(r,cs(".quick-input-list-entry-keybinding"));t.keybinding=new as(s,ve.a);const a=G.p(o,cs(".quick-input-list-label-meta"));return t.detail=new es.a(a,!0),t.separator=G.p(t.entry,cs(".quick-input-list-separator")),t.actionBar=new Lr.a(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){n.toDisposeElement=Object(_e.f)(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(e=>n.checkbox.checked=e));const{labelHighlights:i,descriptionHighlights:r,detailHighlights:o}=e,s=Object.create(null);s.matches=i||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=r||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,s),n.keybinding.set(e.item.keybinding),n.detail.set(e.saneDetail,o),e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",e.separator?G.e(n.entry,"quick-input-list-separator-border"):G.Q(n.entry,"quick-input-list-separator-border"),n.actionBar.clear();const a=e.item.buttons;a&&a.length?(n.actionBar.push(a.map((t,n)=>{let i=t.iconClass||(t.iconPath?os(t.iconPath):void 0);t.alwaysVisible&&(i=i?`${i} always-visible`:"always-visible");const r=new xr.a(`id-${n}`,"",i,!0,()=>(e.fireButtonTriggered({button:t,item:e.item}),Promise.resolve()));return r.tooltip=t.tooltip||"",r}),{icon:!0,label:!1}),G.e(n.entry,"has-actions")):G.Q(n.entry,"has-actions")}disposeElement(e,t,n){n.toDisposeElement=Object(_e.f)(n.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Object(_e.f)(e.toDisposeElement),e.toDisposeTemplate=Object(_e.f)(e.toDisposeTemplate)}}us.ID="listelement";class hs{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return us.ID}}var fs;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(fs||(fs={}));class gs{constructor(e,t,n){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new F.a,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new F.a,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new F.a,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new F.a,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new F.a,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new F.a,this.onKeyDown=this._onKeyDown.event,this._onLeave=new F.a,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=G.p(this.parent,cs(".quick-input-list"));const i=new hs,r=new ps;this.list=n.createList("QuickInput",this.container,i,[new us],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:r}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(e=>{const t=new Gt.a(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(ve.f?e.metaKey:e.ctrlKey)&&this.list.setFocus(Object(Ee.s)(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const n=this.list.getFocus();1===n.length&&n[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)})),this.disposables.push(this.list.onMouseDown(e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()})),this.disposables.push(G.i(this.container,G.c.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(e=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return F.b.map(this.list.onDidChangeFocus,e=>e.elements.map(e=>e.item))}get onDidChangeSelection(){return F.b.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(e=>e.item),event:e.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,i=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Object(_e.f)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce((n,i,r)=>{var o,s,a;if("separator"!==i.type){const l=r&&e[r-1],c=i.label&&i.label.replace(/\r?\n/g," "),d=i.description&&i.description.replace(/\r?\n/g," "),u=i.detail&&i.detail.replace(/\r?\n/g," "),h=i.ariaLabel||[c,d,u].map(e=>e&&Object(Zo.c)(e).text).filter(e=>!!e).join(", ");n.push(new ds({index:r,item:i,saneLabel:c,saneAriaLabel:h,saneDescription:d,saneDetail:u,labelHighlights:null===(o=i.highlights)||void 0===o?void 0:o.label,descriptionHighlights:null===(s=i.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=i.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return n},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(e=>e.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((e,t,n)=>(e.set(t.item,n),e),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const n of e)t.add(n);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===fs.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=fs.First),e===fs.Previous&&0===this.list.getFocus()[0]&&(e=fs.Last),e===fs.Second&&this.list.length<2&&(e=fs.First),e){case fs.First:this.list.focusFirst();break;case fs.Second:this.list.focusNth(1);break;case fs.Last:this.list.focusLast();break;case fs.Next:this.list.focusNext();break;case fs.Previous:this.list.focusPrevious();break;case fs.NextPage:this.list.focusNextPage();break;case fs.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;(e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach(t=>{const n=this.matchOnLabel?Object(ye.n)(Object(Zo.b)(e,Object(Zo.c)(t.saneLabel))):void 0,i=this.matchOnDescription?Object(ye.n)(Object(Zo.b)(e,Object(Zo.c)(t.saneDescription||""))):void 0,r=this.matchOnDetail?Object(ye.n)(Object(Zo.b)(e,Object(Zo.c)(t.saneDetail||""))):void 0;n||i||r?(t.labelHighlights=n,t.descriptionHighlights=i,t.detailHighlights=r,t.hidden=!1):(t.labelHighlights=void 0,t.descriptionHighlights=void 0,t.detailHighlights=void 0,t.hidden=!t.item.alwaysShow),t.separator=void 0}):this.elements.forEach(e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0});const t=this.elements.filter(e=>!e.hidden);if(this.sortByLabel&&e){const n=e.toLowerCase();t.sort((e,t)=>(function(e,t,n){const i=e.labelHighlights||[],r=t.labelHighlights||[];if(i.length&&!r.length)return-1;if(!i.length&&r.length)return 1;if(0===i.length&&0===r.length)return 0;return Xo(e.saneLabel,t.saneLabel,n)})(e,t,n))}return this.elementsToIndexes=t.reduce((e,t,n)=>(e.set(t.item,n),e),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=Object(_e.f)(this.elementDisposables),this.disposables=Object(_e.f)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}ls([ts.a],gs.prototype,"onDidChangeFocus",null),ls([ts.a],gs.prototype,"onDidChangeSelection",null);class ps{getWidgetAriaLabel(){return Object(dn.a)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var ms=n(205);const _s=G.a;class bs extends _e.a{constructor(e){super(),this.parent=e,this.onKeyDown=e=>G.i(this.inputBox.inputElement,G.c.KEY_DOWN,t=>{e(new Gt.a(t))}),this.onMouseDown=e=>G.i(this.inputBox.inputElement,G.c.MOUSE_DOWN,t=>{e(new Pr.a(t))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=G.p(this.parent,_s(".quick-input-box")),this.inputBox=this._register(new ms.b(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Zt.a.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Zt.a.Info?1:e===Zt.a.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Zt.a.Info?1:e===Zt.a.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var vs=n(232);n(637);const ys="done",ws="active",Cs="infinite",Ss="discrete",ks="monaco-progress-container",xs="progress-bit",Ls={progressBarBackground:Yi.a.fromHex("#0E70C0")};class Ms extends _e.a{constructor(e,t){super(),this.options=t||Object.create(null),Object(rn.g)(this.options,Ls,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new me.d(()=>Object(G.Z)(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),Object(G.e)(this.element,ks),e.appendChild(this.element),this.bit=document.createElement("div"),Object(G.e)(this.bit,xs),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",Object(G.R)(this.element,ws,Cs,Ss),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return Object(G.e)(this.element,ys),Object(G.I)(this.element,Cs)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",Object(G.R)(this.element,Ss,ys),Object(G.f)(this.element,ws,Cs),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}n(638);var Ds=n(50);const Es={buttonBackground:Yi.a.fromHex("#0E639C"),buttonHoverBackground:Yi.a.fromHex("#006BB3"),buttonForeground:Yi.a.white};class Ts extends _e.a{constructor(e,t){super(),this._onDidClick=this._register(new F.a),this.options=t||Object.create(null),Object(rn.g)(this.options,Es,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),G.e(this._element,"monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Ds.b.addTarget(this._element)),[G.c.CLICK,Ds.a.Tap].forEach(e=>{this._register(G.i(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):G.b.stop(e)}))}),this._register(G.i(this._element,G.c.KEY_DOWN,e=>{const t=new Gt.a(e);let n=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),n=!0):t.equals(9)&&(this._element.blur(),n=!0),n&&G.b.stop(t,!0)})),this._register(G.i(this._element,G.c.MOUSE_OVER,e=>{G.I(this._element,"disabled")||this.setHoverBackground()})),this._register(G.i(this._element,G.c.MOUSE_OUT,e=>{this.applyStyles()})),this.focusTracker=this._register(G.bb(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;(e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null)&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const n=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=n?"1px":"",this._element.style.borderStyle=n?"solid":"",this._element.style.borderColor=n}}get element(){return this._element}set label(e){G.I(this._element,"monaco-text-button")||G.e(this._element,"monaco-text-button"),this.options.supportCodicons?G.U(this._element,...function(e){const t=new Array;let n,i=0,r=0;for(;null!==(n=Ir.g.exec(e));){r=n.index||0,t.push(e.substring(i,r)),i=(n.index||0)+n[0].length;const[,o,s,a,l]=n;t.push(o?`$(${s})`:G.a(`span.codicon.codicon-${a}${l?`.codicon-animation-${l}`:""}`))}return i{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description.textContent!==t&&(this.ui.description.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new me.e,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter(e=>e===Is);this.ui.leftActionBar.push(e.map((e,t)=>{const n=new xr.a(`id-${t}`,"",e.iconClass||os(e.iconPath),!0,()=>Os(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return n.tooltip=e.tooltip||"",n}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter(e=>e!==Is);this.ui.rightActionBar.push(t.map((e,t)=>{const n=new xr.a(`id-${t}`,"",e.iconClass||os(e.iconPath),!0,()=>Os(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return n.tooltip=e.tooltip||"",n}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?Object(dn.a)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e===Zt.a.Error){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class Rs extends As{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new F.a),this.onDidAcceptEmitter=this._register(new F.a),this.onDidCustomEmitter=this._register(new F.a),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?Go.a.NONE:Go.a.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new F.a),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new F.a),this.onDidTriggerItemButtonEmitter=this._register(new F.a),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value=e||"",this.update()}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Go.b:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(fs.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(fs.Next),this.canSelectMany&&this.ui.list.domFocus(),G.b.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(fs.Previous):this.ui.list.focus(fs.Last),this.canSelectMany&&this.ui.list.domFocus(),G.b.stop(e,!0);break;case 12:this.ui.list.focus(fs.NextPage),this.canSelectMany&&this.ui.list.domFocus(),G.b.stop(e,!0);break;case 11:this.ui.list.focus(fs.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),G.b.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!0}));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(fs.First),G.b.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(fs.Last),G.b.stop(e,!0))}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.onDidAcceptEmitter.fire({inBackground:!1})})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Object(Ee.g)(e,this._activeItems,(e,t)=>e===t)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Object(Ee.g)(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.onDidAcceptEmitter.fire({inBackground:t instanceof MouseEvent&&1===t.button}))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Object(Ee.g)(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}registerQuickNavigation(){return G.i(this.ui.container,G.c.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Gt.a(e),n=t.keyCode;this._quickNavigate.keybindings.some(e=>{const[i,r]=e.getParts();return!r&&(i.shiftKey&&4===n?!(t.ctrlKey||t.altKey||t.metaKey):!(!i.altKey||6!==n)||(!(!i.ctrlKey||5!==n)||!(!i.metaKey||57!==n)))})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!1})),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=!1,t=!1;this._hideInput&&this._items.length>0&&(this.ui.isScreenReaderOptimized()?t=!0:e=!0),G.ab(this.ui.container,"hidden-input",e);const n={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};if(this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),t)this.ui.inputBox.ariaLabel="";else{const e=this.ariaLabel||this.placeholder||Rs.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==e&&(this.ui.inputBox.ariaLabel=e)}if(this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Go.a.NONE:this._itemActivation=Go.a.FIRST;break;case Go.a.SECOND:this.ui.list.focus(fs.Second),this._itemActivation=Go.a.FIRST;break;case Go.a.LAST:this.ui.list.focus(fs.Last),this._itemActivation=Go.a.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.validationMessage?(this.ui.message.textContent=this.validationMessage,this.showMessageDecoration(Zt.a.Error)):(this.ui.message.textContent=null,this.showMessageDecoration(Zt.a.Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),n.inputBox||this.ui.list.domFocus()}}Rs.DEFAULT_ARIA_LABEL=Object(dn.a)("quickInputBox.ariaLabel","Type to narrow down results.");class Ps extends _e.a{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new F.a),this.onDidCustomEmitter=this._register(new F.a),this.onDidTriggerButtonEmitter=this._register(new F.a),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new F.a),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new F.a),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(G.i(window,G.c.KEY_DOWN,e,!0)),this._register(G.i(window,G.c.KEY_UP,e,!0)),this._register(G.i(window,G.c.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=G.p(this.parentElement,Ns(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=G.v(e),n=G.p(e,Ns(".quick-input-titlebar")),i=this._register(new Lr.a(n));i.domNode.classList.add("quick-input-left-action-bar");const r=G.p(n,Ns(".quick-input-title")),o=this._register(new Lr.a(n));o.domNode.classList.add("quick-input-right-action-bar");const s=G.p(e,Ns(".quick-input-description")),a=G.p(e,Ns(".quick-input-header")),l=G.p(a,Ns("input.quick-input-check-all"));l.type="checkbox",this._register(G.n(l,G.c.CHANGE,e=>{const t=l.checked;C.setAllVisibleChecked(t)})),this._register(G.i(l,G.c.CLICK,e=>{(e.x||e.y)&&u.setFocus()}));const c=G.p(a,Ns(".quick-input-and-message")),d=G.p(c,Ns(".quick-input-filter")),u=this._register(new bs(d));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const h=G.p(d,Ns(".quick-input-visible-count"));h.setAttribute("aria-live","polite"),h.setAttribute("aria-atomic","true");const f=new vs.a(h,{countFormat:Object(dn.a)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),g=G.p(d,Ns(".quick-input-count"));g.setAttribute("aria-live","polite");const p=new vs.a(g,{countFormat:Object(dn.a)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),m=G.p(a,Ns(".quick-input-action")),_=new Ts(m);_.label=Object(dn.a)("ok","OK"),this._register(_.onDidClick(e=>{this.onDidAcceptEmitter.fire()}));const b=G.p(a,Ns(".quick-input-action")),v=new Ts(b);v.label=Object(dn.a)("custom","Custom"),this._register(v.onDidClick(e=>{this.onDidCustomEmitter.fire()}));const y=G.p(c,Ns(`#${this.idPrefix}message.quick-input-message`)),w=new Ms(e);G.e(w.getContainer(),"quick-input-progress");const C=this._register(new gs(e,this.idPrefix+"list",this.options));this._register(C.onChangedAllVisibleChecked(e=>{l.checked=e})),this._register(C.onChangedVisibleCount(e=>{f.setCount(e)})),this._register(C.onChangedCheckedCount(e=>{p.setCount(e)})),this._register(C.onLeave(()=>{setTimeout(()=>{u.setFocus(),this.controller instanceof Rs&&this.controller.canSelectMany&&C.clearFocus()},0)})),this._register(C.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const S=G.bb(e);return this._register(S),this._register(G.i(e,G.c.FOCUS,e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0},!0)),this._register(S.onDidBlur(()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(),this.previousFocusElement=void 0})),this._register(G.i(e,G.c.FOCUS,e=>{u.setFocus()})),this._register(G.i(e,G.c.KEY_DOWN,t=>{const n=new Gt.a(t);switch(n.keyCode){case 3:G.b.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:G.b.stop(t,!0),this.hide();break;case 2:if(!n.altKey&&!n.ctrlKey&&!n.metaKey){const i=[".action-label.codicon"];e.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list");const r=e.querySelectorAll(i.join(", "));n.shiftKey&&n.target===r[0]?(G.b.stop(t,!0),r[r.length-1].focus()):n.shiftKey||n.target!==r[r.length-1]||(G.b.stop(t,!0),r[0].focus())}}})),this.ui={container:e,styleSheet:t,leftActionBar:i,titleBar:n,title:r,description:s,rightActionBar:o,checkAll:l,filterContainer:d,inputBox:u,visibleCountContainer:h,visibleCount:f,countContainer:g,count:p,okContainer:m,ok:_,message:y,customButtonContainer:b,customButton:v,progressBar:w,list:C,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},n=j.a.None){return new Promise((i,r)=>{let o=e=>{o=i,t.onKeyMods&&t.onKeyMods(s.keyMods),i(e)};if(n.isCancellationRequested)return void o(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept(()=>{if(s.canSelectMany)o(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(o(e),s.hide())}}),s.onDidChangeActive(e=>{const n=e[0];n&&t.onDidFocus&&t.onDidFocus(n)}),s.onDidChangeSelection(e=>{if(!s.canSelectMany){const t=e[0];t&&(o(t),s.hide())}}),s.onDidTriggerItemButton(e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice();e.splice(t,1),s.items=e}}}))),s.onDidChangeValue(e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])}),n.onCancellationRequested(()=>{s.hide()}),s.onDidHide(()=>{Object(_e.f)(l),o(void 0)})];s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then(([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter(e=>"separator"!==e.type&&e.picked)),a&&(s.activeItems=[a])}),s.show(),Promise.resolve(e).then(void 0,e=>{r(e),s.hide()})})}createQuickPick(){const e=this.getUI();return new Rs(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n&&n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Zt.a.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),t.message.textContent="",t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const i=this.options.backKeybindingLabel();Is.tooltip=i?Object(dn.a)("quickInput.backWithKeybinding","Back ({0})",i):Object(dn.a)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description.style.display=e.description?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkAll?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(){var e;const t=this.controller;if(t){const n=!(null===(e=this.ui)||void 0===e?void 0:e.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),t.didHide()}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Ps.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,contrastBorder:i,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=n?n.toString():"",this.ui.container.style.border=i?`1px solid ${i}`:"",this.ui.container.style.boxShadow=r?`0 5px 8px ${r}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const o=[];this.styles.list.listInactiveFocusForeground&&(o.push(`.monaco-list .monaco-list-row.focused { color: ${this.styles.list.listInactiveFocusForeground}; }`),o.push(`.monaco-list .monaco-list-row.focused:hover { color: ${this.styles.list.listInactiveFocusForeground}; }`)),this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`);const s=o.join("\n");s!==this.ui.styleSheet.innerHTML&&(this.ui.styleSheet.innerHTML=s)}}}Ps.MAX_WIDTH=600;var js=n(97),Fs=n(127),Bs=n(126),Ws=function(e,t){return function(n,i){t(n,i,e)}};let Hs=class extends _e.a{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Li.a.as(Fs.b.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){var n;const[i,r]=this.getOrInstantiateProvider(e),o=this.visibleQuickAccess,s=null==o?void 0:o.descriptor;if(o&&r&&s===r)return e===r.prefix||(null==t?void 0:t.preserveValue)||(o.picker.value=e),void this.adjustValueSelection(o.picker,r,t);if(r&&!(null==t?void 0:t.preserveValue)){let t=void 0;if(o&&s&&s!==r){const e=o.value.substr(s.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==i?void 0:i.defaultFilterValue;e===Fs.a.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const a=new _e.b,l=a.add(this.quickInputService.createQuickPick());l.value=e,this.adjustValueSelection(l,r,t),l.placeholder=null==r?void 0:r.placeholder,l.quickNavigate=null==t?void 0:t.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!o,("number"==typeof(null==t?void 0:t.itemActivation)||(null==t?void 0:t.quickNavigateConfiguration))&&(l.itemActivation=null!==(n=null==t?void 0:t.itemActivation)&&void 0!==n?n:js.b.SECOND),l.contextKey=null==r?void 0:r.contextKey,l.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(l.ariaLabel=null==r?void 0:r.placeholder);const c=this.registerPickerListeners(l,i,r,e,a);i&&a.add(i.provide(l,c)),l.show()}adjustValueSelection(e,t,n){var i;let r;r=(null==n?void 0:n.preserveValue)?[e.value.length,e.value.length]:[null!==(i=null==t?void 0:t.prefix.length)&&void 0!==i?i:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,i,r){const o=this.visibleQuickAccess={picker:e,descriptor:n,value:i};r.add(Object(_e.h)(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),r.add(e.onDidChangeValue(e=>{const[n]=this.getOrInstantiateProvider(e);n!==t?this.show(e,{preserveValue:!0}):o.value=e})),n&&r.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)}));const s=r.add(new j.b);return Object(Bs.a)(e.onDidHide)(()=>{0===e.selectedItems.length&&s.cancel(),r.dispose()}),s.token}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};Hs=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Ws(0,js.a),Ws(1,ei.a)],Hs);var Ys=function(e,t){return function(n,i){t(n,i,e)}};let Vs=class extends ni.d{constructor(e,t,n,i,r){super(n),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=i,this.layoutService=r,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Hs))),this._quickAccess}createController(e=this.layoutService,t){var n,i;const r={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>void 0,setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,n,i,r)=>this.instantiationService.createInstance(ho.d,e,t,n,i,r),styles:this.computeStyles()},o=this._register(new Ps(Object.assign(Object.assign({},r),t)));return o.layout(e.dimension,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0),this._register(e.onLayout(t=>{var n,i;return o.layout(t,null!==(i=null===(n=e.offset)||void 0===n?void 0:n.top)&&void 0!==i?i:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let t;e&&((t=this.contexts.get(e))||(t=new Xn.c(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=j.a.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Object(qr.d)(this.theme,{quickInputBackground:Ji.dc,quickInputForeground:Ji.ec,quickInputTitleBackground:Ji.fc,contrastBorder:Ji.h,widgetShadow:Ji.uc})),inputBox:Object(qr.d)(this.theme,{inputForeground:Ji.hb,inputBackground:Ji.fb,inputBorder:Ji.gb,inputValidationInfoBackground:Ji.lb,inputValidationInfoForeground:Ji.nb,inputValidationInfoBorder:Ji.mb,inputValidationWarningBackground:Ji.ob,inputValidationWarningForeground:Ji.qb,inputValidationWarningBorder:Ji.pb,inputValidationErrorBackground:Ji.ib,inputValidationErrorForeground:Ji.kb,inputValidationErrorBorder:Ji.jb}),countBadge:Object(qr.d)(this.theme,{badgeBackground:Ji.c,badgeForeground:Ji.d,badgeBorder:Ji.h}),button:Object(qr.d)(this.theme,{buttonForeground:Ji.f,buttonBackground:Ji.e,buttonHoverBackground:Ji.g,buttonBorder:Ji.h}),progressBar:Object(qr.d)(this.theme,{progressBarBackground:Ji.cc}),list:Object(qr.d)(this.theme,{listBackground:Ji.dc,listInactiveFocusForeground:Ji.yb,listInactiveFocusBackground:Ji.xb,listFocusOutline:Ji.b,listInactiveFocusOutline:Ji.b,pickerGroupBorder:Ji.Xb,pickerGroupForeground:Ji.Yb})}}};Vs=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}([Ys(0,ei.a),Ys(1,Xn.b),Ys(2,ni.c),Ys(3,ii.b),Ys(4,Qr)],Vs);var zs=function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Us=function(e,t){return function(n,i){t(n,i,e)}};let $s=class extends Vs{constructor(e,t,n,i,r,o){super(t,n,i,r,o),this.host=void 0;const s=Ks.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};$s=zs([Us(1,ei.a),Us(2,Xn.b),Us(3,ni.c),Us(4,ii.b),Us(5,Qr)],$s);let qs=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance($s,e);this.mapEditorToService.set(e,t),Object(Bs.a)(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},n=j.a.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}};qs=zs([Us(0,ei.a),Us(1,K.a)],qs);class Ks{constructor(e){this.editor=e,this.widget=new Gs(this.editor)}static get(e){return e.getContribution(Ks.ID)}dispose(){this.widget.dispose()}}Ks.ID="editor.controller.quickInput";class Gs{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Gs.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}Gs.ID="editor.contrib.quickInputWidget",Object(Ko.m)(Ks.ID,Ks);var Zs,Js=n(185);!function(e){const t=new oo.a;class n{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=n;let i=[];function r(e,t){let r=new n(e,t);return i.push(r),r}e.init=function(e){let t=new oo.a;for(const[e,n]of Object(Do.a)())t.set(e,n);for(let n in e)e.hasOwnProperty(n)&&t.set(Object(ei.c)(n),e[n]);i.forEach(n=>t.set(n.id,n.get(e)));let n=new lo(t,!0);return t.set(ei.a,n),[t,n]},e.instantiationService=r(ei.a,()=>new lo(t,!0));const o=new jn;e.configurationService=r(tn.a,()=>o),e.resourceConfigurationService=r(ct.a,()=>new Fn(o)),e.resourcePropertiesService=r(ct.b,()=>new Bn(o)),e.contextService=r(kn.a,()=>new Hn),e.labelService=r(uo.a,()=>new zn),e.telemetryService=r(Zr.a,()=>new Wn),e.dialogService=r(to.a,()=>new Nn),e.notificationService=r(Sn.a,()=>new In),e.markerService=r(fo.b,()=>new _o),e.modeService=r(fi.a,e=>new Ti),e.standaloneThemeService=r(Zn.a,()=>new ur),e.logService=r(dt.b,()=>new dt.a),e.undoRedoService=r(Io.a,t=>new $o(e.dialogService.get(t),e.notificationService.get(t))),e.modelService=r(lt.a,t=>new Oi.a(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t))),e.markerDecorationsService=r(So.a,t=>new Mo(e.modelService.get(t),e.markerService.get(t))),e.codeEditorService=r(K.a,t=>new Hi(e.standaloneThemeService.get(t))),e.editorProgressService=r(oi.a,()=>new On),e.storageService=r(bo.a,()=>new bo.b),e.storageSyncService=r(Js.a,()=>new Js.b),e.editorWorkerService=r(ge.a,t=>new _t(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t)))}(Zs||(Zs={}));class Xs extends _e.a{constructor(e,t){super();const[n,i]=Zs.init(t);this._serviceCollection=n,this._instantiationService=i;const r=this.get(tn.a),o=this.get(Sn.a),s=this.get(Zr.a),a=this.get(ni.c),l=this.get(dt.b);let c=(e,n)=>{let i=null;return t&&(i=t[e.toString()]),i||(i=n()),this._serviceCollection.set(e,i),i},d=c(Xn.b,()=>this._register(new Sr(r)));c(ii.b,()=>new To(d,r)),c(ho.a,()=>new ho.b(a));let u=c(ee.b,()=>new An(this._instantiationService)),h=c(ti.a,()=>this._register(new Rn(d,u,s,o,l,e))),f=c(Qr,()=>new Un(Zs.codeEditorService.get(K.a),e));c(js.a,()=>new qs(i,Zs.codeEditorService.get(K.a)));let g=c(Qn.b,()=>this._register(new eo(f)));c(ri.a,()=>new No),c(Qn.a,()=>{const e=new Xr(s,o,g,h,a);return e.configure({blockMouse:!1}),this._register(e)}),c(Jn.a,()=>new wo(u)),c(Xt.a,()=>new Vn(Zs.modelService.get(lt.a)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}var Qs=n(77);function ea(e,t,n){let i=new Xs(e,t),r=null;i.has(pe.a)||(r=new Tn(Zs.modelService.get()),i.set(pe.a,r)),i.has(te.a)||i.set(te.a,new ae(i.get(K.a),i.get(ee.b)));let o=n(i);return r&&r.setEditor(o),o}function ta(e,t,n){return ea(e,n||{},n=>new ui(e,t,n,n.get(ei.a),n.get(K.a),n.get(ee.b),n.get(Xn.b),n.get(ti.a),n.get(Qn.b),n.get(Zn.a),n.get(Sn.a),n.get(tn.a),n.get(ii.b)))}function na(e){return Zs.codeEditorService.get().onCodeEditorAdd(t=>{e(t)})}function ia(e,t,n){return ea(e,n||{},n=>new hi(e,t,n,n.get(ei.a),n.get(Xn.b),n.get(ti.a),n.get(Qn.b),n.get(ge.a),n.get(K.a),n.get(Zn.a),n.get(Sn.a),n.get(tn.a),n.get(Qn.a),n.get(oi.a),n.get(ri.a)))}function ra(e,t){return new le.a(e,t)}function oa(e,t,n){return Zs.modelService.get().createModel(e,t,n)}function sa(e,t,n){if(e=e||"",!t){let t=e.indexOf("\n"),i=e;return-1!==t&&(i=e.substring(0,t)),oa(e,Zs.modeService.get().createByFilepathOrFirstLine(n||null,i),n)}return oa(e,Zs.modeService.get().create(t),n)}function aa(e,t){Zs.modelService.get().setMode(e,Zs.modeService.get().create(t))}function la(e,t,n){e&&Zs.markerService.get().changeOne(t,e.uri,n)}function ca(e){return Zs.markerService.get().read(e)}function da(e){return Zs.modelService.get().getModel(e)}function ua(){return Zs.modelService.get().getModels()}function ha(e){return Zs.modelService.get().onModelAdded(e)}function fa(e){return Zs.modelService.get().onModelRemoved(e)}function ga(e){return Zs.modelService.get().onModelModeChanged(t=>{e({model:t.model,oldLanguage:t.oldModeId})})}function pa(e){return function(e,t){return new kt(e,t)}(Zs.modelService.get(),e)}function ma(e,t){const n=Zs.standaloneThemeService.get();return n.registerEditorContainer(e),$t.colorizeElement(n,Zs.modeService.get(),e,t)}function _a(e,t,n){return Zs.standaloneThemeService.get().registerEditorContainer(document.body),$t.colorize(Zs.modeService.get(),e,t,n)}function ba(e,t,n=4){return Zs.standaloneThemeService.get().registerEditorContainer(document.body),$t.colorizeModelLine(e,t,n)}function va(e,t){Zs.modeService.get().triggerMode(t);let n=function(e){let t=he.C.get(e);return t||{getInitialState:()=>fe.c,tokenize:(t,n,i)=>Object(fe.d)(e,t,n,i)}}(t),i=e.split(/\r\n|\r|\n/),r=[],o=n.getInitialState();for(let e=0,t=i.length;e=0&&n<5;)n++,t=t.replace(/@(\w+)/g,(function(n,i){let r="";if("string"==typeof e[i])r=e[i];else{if(!(e[i]&&e[i]instanceof RegExp))throw void 0===e[i]?At(e,"language definition does not contain attribute '"+i+"', used at: "+t):At(e,"attribute reference '"+i+"' must be a string, used at: "+t);r=e[i].source}return Ot(r)?"":"(?:"+r+")"}));let i=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,i)}function Ma(e,t,n,i){let r=-1,o=n,s=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(r=parseInt(s[3]),s[2]&&(r+=100)),o=s[4]);let a,l="~",c=o;if(o&&0!==o.length?/^\w*$/.test(c)?l="==":(s=o.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(l=s[1],c=s[2]):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){let n=e[c];if(!n)throw At(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const n of t)if(!e(n))return!1;return!0}((function(e){return"string"==typeof e}),n))throw At(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);let i=xa(n,e.ignoreCase);a=function(e){return"@"===l?i(e):!i(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){let t=La(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,n,i,r){return La(e,"^"+Rt(e,c,n,i,r)+"$").test(t)};else if(c.indexOf("$")<0){let t=Nt(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Nt(e,c);a=function(n,i,r,o,s){let a=Rt(e,t,i,r,o);return"=="===l?n===a:n!==a}}else{let t=xa(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===r?{name:n,value:i,test:function(e,t,n,i){return a(e,e,t,n,i)}}:{name:n,value:i,test:function(e,t,n,i){let o=function(e,t,n,i){if(i<0)return e;if(i=100){i-=100;let e=n.split(".");if(e.unshift(n),i0&&"^"===n[0],this.name=this.name+": "+n,this.regex=La(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=function e(t,n,i){if(i){if("string"==typeof i)return i;if(i.token||""===i.token){if("string"!=typeof i.token)throw At(t,"a 'token' attribute must be of type string, in rule: "+n);{let e={token:i.token};if(i.token.indexOf("$")>=0&&(e.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)e.bracket=1;else{if("@close"!==i.bracket)throw At(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+n);e.bracket=-1}if(i.next){if("string"!=typeof i.next)throw At(t,"the next state must be a string value in rule: "+n);{let r=i.next;if(!/^(@pop|@push|@popall)$/.test(r)&&("@"===r[0]&&(r=r.substr(1)),r.indexOf("$")<0&&!function(e,t){let n=t;for(;n&&n.length>0;){if(e.stateNames[n])return!0;const t=n.lastIndexOf(".");n=t<0?null:n.substr(0,t)}return!1}(t,Rt(t,r,"",[],""))))throw At(t,"the next state '"+i.next+"' is not defined in rule: "+n);e.next=r}}return"number"==typeof i.goBack&&(e.goBack=i.goBack),"string"==typeof i.switchTo&&(e.switchTo=i.switchTo),"string"==typeof i.log&&(e.log=i.log),"string"==typeof i.nextEmbedded&&(e.nextEmbedded=i.nextEmbedded,t.usesEmbedded=!0),e}}if(Array.isArray(i)){let r=[];for(let o=0,s=i.length;o{i.getId()===e&&(n.dispose(),t())});return n}function Ia(e,t){let n=Zs.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error(`Cannot set configuration for unknown language ${e}`);return De.a.register(n,t)}class Aa{constructor(e){this._actual=e}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){throw new Error("Not supported!")}tokenize2(e,t){let n=this._actual.tokenizeEncoded(e,t);return new z.c(n.tokens,n.endState)}}class Ra{constructor(e,t,n){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=n}getInitialState(){return this._actual.getInitialState()}_toClassicTokens(e,t,n){let i=[],r=0;for(let o=0,s=e.length;o0&&r[o-1]===c)continue;let d=l.startIndex;0===a?d=0:d(function(e){return"tokenizeEncoded"in e})(e)?new Aa(e):new Ra(Zs.standaloneThemeService.get(),n,e);return Pa(t)?he.C.registerPromise(e,t.then(e=>i(e))):he.C.register(e,i(t))}function Fa(e,t){const n=t=>(function(e,t,n,i){return new zt(e,t,n,i)})(Zs.modeService.get(),Zs.standaloneThemeService.get(),e,function(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");let n={};n.languageId=e,n.noThrow=!1,n.maxStack=100,n.start="string"==typeof t.start?t.start:null,n.ignoreCase=Sa(t.ignoreCase,!1),n.unicode=Sa(t.unicode,!1),n.tokenPostfix=ka(t.tokenPostfix,"."+n.languageId),n.defaultToken=ka(t.defaultToken,"source"),n.usesEmbedded=!1;let i=t;function r(e,o,s){for(const a of s){let s=a.include;if(s){if("string"!=typeof s)throw At(n,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw At(n,"include target '"+s+"' is not defined at: "+e);r(e+"."+s,o,t.tokenizer[s])}else{const t=new Da(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(i,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(i,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw At(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(i,e)}}else t.setAction(i,a[1]);else{if(!a.regex)throw At(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Sa(a.matchOnlyAtLineStart,!1)),t.setRegex(i,a.regex),t.setAction(i,a.action)}o.push(t)}}}if(i.languageId=e,i.ignoreCase=n.ignoreCase,i.unicode=n.unicode,i.noThrow=n.noThrow,i.usesEmbedded=n.usesEmbedded,i.stateNames=t.tokenizer,i.defaultToken=n.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw At(n,"a language definition must define the 'tokenizer' attribute as an object");n.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){n.start||(n.start=e);const i=t.tokenizer[e];n.tokenizer[e]=new Array,r("tokenizer."+e,n.tokenizer[e],i)}if(n.usesEmbedded=i.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw At(n,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let o=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw At(n,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw At(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:t.token+n.tokenPostfix,open:Nt(n,t.open),close:Nt(n,t.close)})}return n.brackets=o,n.noThrow=!0,n}(e,t));return Pa(t)?he.C.registerPromise(e,t.then(e=>n(e))):he.C.register(e,n(t))}function Ba(e,t){return he.v.register(e,t)}function Wa(e,t){return he.w.register(e,t)}function Ha(e,t){return he.y.register(e,t)}function Ya(e,t){return he.p.register(e,{provideHover:(e,n,i)=>{let r=e.getWordAtPosition(n);return Promise.resolve(t.provideHover(e,n,i)).then(e=>{if(e)return!e.range&&r&&(e.range=new Y.a(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),e.range||(e.range=new Y.a(n.lineNumber,n.column,n.lineNumber,n.column)),e})}})}function Va(e,t){return he.m.register(e,t)}function za(e,t){return he.i.register(e,t)}function Ua(e,t){return he.u.register(e,t)}function $a(e,t){return he.f.register(e,t)}function qa(e,t){return he.q.register(e,t)}function Ka(e,t){return he.D.register(e,t)}function Ga(e,t){return he.b.register(e,t)}function Za(e,t){return he.a.register(e,{provideCodeActions:(e,n,i,r)=>{let o=Zs.markerService.get().read({resource:e.uri}).filter(e=>Y.a.areIntersectingOrTouching(e,n));return t.provideCodeActions(e,n,{markers:o,only:i.only},r)}})}function Ja(e,t){return he.g.register(e,t)}function Xa(e,t){return he.j.register(e,t)}function Qa(e,t){return he.t.register(e,t)}function el(e,t){return he.s.register(e,t)}function tl(e,t){return he.d.register(e,t)}function nl(e,t){return he.c.register(e,t)}function il(e,t){return he.o.register(e,t)}function rl(e,t){return he.e.register(e,t)}function ol(e,t){return he.x.register(e,t)}function sl(e,t){return he.l.register(e,t)}function al(e,t){return he.k.register(e,t)}n.d(t,"CancellationTokenSource",(function(){return dl})),n.d(t,"Emitter",(function(){return ul})),n.d(t,"KeyCode",(function(){return hl})),n.d(t,"KeyMod",(function(){return fl})),n.d(t,"Position",(function(){return gl})),n.d(t,"Range",(function(){return pl})),n.d(t,"Selection",(function(){return ml})),n.d(t,"SelectionDirection",(function(){return _l})),n.d(t,"MarkerSeverity",(function(){return bl})),n.d(t,"MarkerTag",(function(){return vl})),n.d(t,"Uri",(function(){return yl})),n.d(t,"Token",(function(){return wl})),n.d(t,"editor",(function(){return Cl})),n.d(t,"languages",(function(){return Sl}));const ll=self;P.g.wrappingIndent.defaultValue=0,P.g.glyphMargin.defaultValue=!1,P.g.autoIndent.defaultValue=3,P.g.overviewRulerLanes.defaultValue=2;const cl=$();cl.editor={create:ta,onDidCreateEditor:na,createDiffEditor:ia,createDiffNavigator:ra,createModel:sa,setModelLanguage:aa,setModelMarkers:la,getModelMarkers:ca,getModels:ua,getModel:da,onDidCreateModel:ha,onWillDisposeModel:fa,onDidChangeModelLanguage:ga,createWebWorker:pa,colorizeElement:ma,colorize:_a,colorizeModelLine:ba,tokenize:va,defineTheme:ya,setTheme:wa,remeasureFonts:Ca,AccessibilitySupport:i,ContentWidgetPositionPreference:l,CursorChangeReason:c,DefaultEndOfLine:d,EditorAutoIndentStrategy:h,EditorOption:f,EndOfLinePreference:g,EndOfLineSequence:p,MinimapPosition:y,MouseTargetType:w,OverlayWidgetPositionPreference:C,OverviewRulerLane:S,RenderLineNumbersType:k,RenderMinimap:x,ScrollbarVisibility:M,ScrollType:L,TextEditorCursorBlinkingStyle:N,TextEditorCursorStyle:I,TrackedRangeStickiness:A,WrappingIndent:R,ConfigurationChangedEvent:P.b,BareFontInfo:ce.a,FontInfo:ce.b,TextModelResolvedOptions:ue.e,FindMatch:ue.b,EditorType:de.a,EditorOptions:P.g},cl.languages={register:Ea,getLanguages:Ta,onLanguage:Na,getEncodedLanguageId:Oa,setLanguageConfiguration:Ia,setTokensProvider:ja,setMonarchTokensProvider:Fa,registerReferenceProvider:Ba,registerRenameProvider:Wa,registerCompletionItemProvider:tl,registerSignatureHelpProvider:Ha,registerHoverProvider:Ya,registerDocumentSymbolProvider:Va,registerDocumentHighlightProvider:za,registerOnTypeRenameProvider:Ua,registerDefinitionProvider:$a,registerImplementationProvider:qa,registerTypeDefinitionProvider:Ka,registerCodeLensProvider:Ga,registerCodeActionProvider:Za,registerDocumentFormattingEditProvider:Ja,registerDocumentRangeFormattingEditProvider:Xa,registerOnTypeFormattingEditProvider:Qa,registerLinkProvider:el,registerColorProvider:nl,registerFoldingRangeProvider:il,registerDeclarationProvider:rl,registerSelectionRangeProvider:ol,registerDocumentSemanticTokensProvider:sl,registerDocumentRangeSemanticTokensProvider:al,DocumentHighlightKind:u,CompletionItemKind:o,CompletionItemTag:s,CompletionItemInsertTextRule:r,SymbolKind:T,SymbolTag:O,IndentAction:m,CompletionTriggerKind:a,SignatureHelpTriggerKind:E,FoldingRangeKind:he.n};const dl=cl.CancellationTokenSource,ul=cl.Emitter,hl=cl.KeyCode,fl=cl.KeyMod,gl=cl.Position,pl=cl.Range,ml=cl.Selection,_l=cl.SelectionDirection,bl=cl.MarkerSeverity,vl=cl.MarkerTag,yl=cl.Uri,wl=cl.Token,Cl=cl.editor,Sl=cl.languages;ll.monaco=cl,void 0!==ll.require&&"function"==typeof ll.require.config&&ll.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},function(e,t,n){"use strict";n(86);var i=n(212),r={},o={},s=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,n){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=n}))}return e.getOrCreate=function(t){return o[t]||(o[t]=new e(t)),o[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,r[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;r[t]=e,i.languages.register(e);var n=s.getOrCreate(t);i.languages.setMonarchTokensProvider(t,n.whenLoaded().then((function(e){return e.language}))),i.languages.onLanguage(t,(function(){n.load().then((function(e){i.languages.setLanguageConfiguration(t,e.conf)}))}))}a({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return n.e(7).then(n.bind(null,911))}}),a({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return n.e(8).then(n.bind(null,912))}}),a({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return n.e(9).then(n.bind(null,913))}}),a({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return n.e(10).then(n.bind(null,914))}}),a({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return n.e(11).then(n.bind(null,915))}}),a({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return n.e(12).then(n.bind(null,916))}}),a({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return n.e(13).then(n.bind(null,917))}}),a({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return n.e(0).then(n.bind(null,918))}}),a({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return n.e(0).then(n.bind(null,918))}}),a({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return n.e(14).then(n.bind(null,919))}}),a({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return n.e(15).then(n.bind(null,920))}}),a({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return n.e(16).then(n.bind(null,921))}}),a({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return n.e(17).then(n.bind(null,922))}}),a({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return n.e(18).then(n.bind(null,923))}}),a({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return n.e(19).then(n.bind(null,924))}}),a({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return n.e(20).then(n.bind(null,925))}}),a({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return n.e(21).then(n.bind(null,926))}}),a({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars"],mimetypes:["text/x-handlebars-template"],loader:function(){return n.e(22).then(n.bind(null,927))}}),a({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return n.e(23).then(n.bind(null,928))}}),a({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return n.e(24).then(n.bind(null,929))}}),a({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return n.e(25).then(n.bind(null,930))}}),a({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return n.e(26).then(n.bind(null,931))}}),a({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return n.e(3).then(n.bind(null,932))}}),a({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return n.e(27).then(n.bind(null,933))}}),a({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return n.e(28).then(n.bind(null,934))}}),a({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return n.e(29).then(n.bind(null,935))}}),a({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return n.e(30).then(n.bind(null,936))}}),a({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return n.e(31).then(n.bind(null,937))}}),a({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return n.e(32).then(n.bind(null,938))}}),a({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return n.e(33).then(n.bind(null,939))}}),a({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return n.e(34).then(n.bind(null,940))}}),a({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return n.e(35).then(n.bind(null,941))}}),a({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return n.e(36).then(n.bind(null,942))}}),a({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return n.e(37).then(n.bind(null,943))}}),a({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return n.e(38).then(n.bind(null,944))}}),a({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return n.e(39).then(n.bind(null,945))}}),a({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return n.e(40).then(n.bind(null,946))}}),a({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return n.e(41).then(n.bind(null,947))}}),a({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return n.e(42).then(n.bind(null,948))}}),a({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return n.e(43).then(n.bind(null,949))}}),a({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return n.e(44).then(n.bind(null,950))}}),a({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return n.e(45).then(n.bind(null,951))}}),a({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return n.e(46).then(n.bind(null,952))}}),a({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return n.e(47).then(n.bind(null,953))}}),a({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return n.e(48).then(n.bind(null,954))}}),a({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return n.e(49).then(n.bind(null,955))}}),a({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return n.e(50).then(n.bind(null,956))}}),a({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return n.e(51).then(n.bind(null,957))}}),a({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return n.e(52).then(n.bind(null,958))}}),a({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return n.e(53).then(n.bind(null,959))}}),a({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return n.e(54).then(n.bind(null,960))}}),a({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return n.e(55).then(n.bind(null,961))}}),a({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return n.e(56).then(n.bind(null,962))}}),a({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return n.e(57).then(n.bind(null,963))}}),a({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return n.e(58).then(n.bind(null,964))}}),a({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return n.e(59).then(n.bind(null,965))}}),a({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return n.e(60).then(n.bind(null,966))}}),a({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return n.e(61).then(n.bind(null,967))}}),a({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return n.e(62).then(n.bind(null,968))}}),a({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return n.e(63).then(n.bind(null,969))}}),a({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return n.e(1).then(n.bind(null,970))}}),a({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return n.e(1).then(n.bind(null,970))}}),a({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return n.e(64).then(n.bind(null,971))}}),a({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return n.e(65).then(n.bind(null,972))}}),a({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return n.e(66).then(n.bind(null,908))}}),a({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return n.e(67).then(n.bind(null,973))}}),a({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\n.unsubscribe():n}function d(e){let t;return c(e,e=>t=e)(),t}function u(e,t,n,i){if(e){const r=h(e,t,n,i);return e[0](r)}}function h(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function f(e,t,n,i){return e[2]&&i?t.dirty|e[2](i(n)):t.dirty}function g(e){return null==e?"":e}new Set;function p(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function b(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function k(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function x(e){return""===e?void 0:+e}function L(e,t){t=""+t,e.data!==t&&(e.data=t)}function M(e,t){(null!=t||e.value)&&(e.value=t)}function D(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}let E;function T(e){E=e}function O(){if(!E)throw new Error("Function called outside component initialization");return E}function N(e){O().$$.on_mount.push(e)}const I=[],A=[],R=[],P=[],j=Promise.resolve();let F=!1;function B(){F||(F=!0,j.then(H))}function W(e){R.push(e)}function H(){const e=new Set;do{for(;I.length;){const e=I.shift();T(e),Y(e.$$)}for(;A.length;)A.pop()();for(let t=0;t{V.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}"undefined"!=typeof window?window:global;new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);let G;function Z(e){e&&e.c()}function J(e,t,n){const{fragment:i,on_mount:o,on_destroy:l,after_update:c}=e.$$;i&&i.m(t,n),W(()=>{const t=o.map(r).filter(a);l?l.push(...t):s(t),e.$$.on_mount=[]}),c.forEach(W)}function X(e,t){const n=e.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Q(e,t,n,r,a,l,c=[-1]){const d=E;T(e);const u=t.props||{},h=e.$$={fragment:null,ctx:null,props:l,update:i,not_equal:a,bound:o(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:o(),dirty:c};let f=!1;var g;h.ctx=n?n(e,u,(t,n,i=n)=>(h.ctx&&a(h.ctx[t],h.ctx[t]=i)&&(h.bound[t]&&h.bound[t](i),f&&function(e,t){-1===e.$$.dirty[0]&&(I.push(e),B(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}});class ee{$destroy(){X(this,1),this.$destroy=i}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}}const te=[];function ne(e,t){return{subscribe:ie(e,t).subscribe}}function ie(e,t=i){let n;const r=[];function o(t){if(l(e,t)&&(e=t,n)){const t=!te.length;for(let t=0;t{const e=r.indexOf(l);-1!==e&&r.splice(e,1),0===r.length&&(n(),n=null)}}}}function re(e,t,n){const r=!Array.isArray(e),o=r?[e]:e,l=t.length<2;return ne(n,e=>{let n=!1;const c=[];let d=0,u=i;const h=()=>{if(d)return;u();const n=t(r?c[0]:c,e);l?e(n):u=a(n)?n:i},f=o.map((e,t)=>e.subscribe(e=>{c[t]=e,d&=~(1<{d|=1<{X(e,1)}),$()}i?(Z((o=new i(r(e))).$$.fragment),q(o.$$.fragment,1),J(o,t.parentNode,t)):o=null}else i&&o.$set(s)},i(e){n||(o&&q(o.$$.fragment,e),n=!0)},o(e){o&&K(o.$$.fragment,e),n=!1},d(e){e&&_(t),o&&X(o,e)}}}function ae(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let i="";return n>-1&&(i=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:i}}const le=ne(ae(),(function(e){const t=()=>{e(ae())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}})),ce=re(le,e=>e.location);re(le,e=>e.querystring);function de(e,t,n){let r,o=i;!function(e,t,n){e.$$.on_destroy.push(c(t,n))}(e,le,e=>n(3,r=e)),e.$$.on_destroy.push(()=>o());let{routes:s={}}=t;class a{constructor(e,t){if(!t||"function"!=typeof t&&("object"!=typeof t||!0!==t._sveltesparouter))throw Error("Invalid component object");if(!e||"string"==typeof e&&(e.length<1||"/"!=e.charAt(0)&&"*"!=e.charAt(0))||"object"==typeof e&&!(e instanceof RegExp))throw Error('Invalid value for "path" argument');const{pattern:n,keys:i}=oe(e);this.path=e,"object"==typeof t&&!0===t._sveltesparouter?(this.component=t.route,this.conditions=t.conditions||[]):(this.component=t,this.conditions=[]),this._pattern=n,this._keys=i}match(e){const t=this._pattern.exec(e);if(null===t)return null;if(!1===this._keys)return t;const n={};let i=0;for(;i{const i=e.$$.callbacks[t];if(i){const r=D(t,n);i.slice().forEach(t=>{t.call(e,r)})}}}(),g=(e,t)=>{setTimeout(()=>{f(e,t)},0)};return e.$set=e=>{"routes"in e&&n(2,s=e.routes)},e.$$.update=()=>{if(9&e.$$.dirty){n(0,u=null);let e=0;for(;!u&&e{let t;try{const n=he.Base64.decode(e);console.log("state from url",n),t=JSON.parse(n)}catch(e){console.error("Init error",e),t=fe}ge.set({...t,updateEditor:!0})},me=e=>{ge.set(e)},_e=(e,t)=>{const n=d(ge);ge.set({...n,code:e,updateEditor:t})},be=(e,t)=>{const n=d(ge);ge.set({...n,mermaid:e,updateEditor:t})},ve=(ge.subscribe(e=>{!function(e){if(!e||e.length<1||"/"!=e.charAt(0)&&0!==e.indexOf("#/"))throw Error("Invalid parameter location");setTimeout(()=>{const t=("#"==e.charAt(0)?"":"#")+e;history.replaceState(void 0,void 0,t),window.dispatchEvent(new Event("hashchange"))},0)}(`/${d(ce).split("/")[1]||"edit"}/`+he.Base64.encodeURI(JSON.stringify(e)))}),ie(void 0)),ye=ie(void 0);var we=n(210),Ce=n.n(we);n(568);function Se(e){let t,n,i;return{c(){t=v("div"),n=y(e[1]),k(t,"id","error"),k(t,"class",i=g(e[0])+" svelte-104hor5")},m(e,i){m(e,t,i),p(t,n)},p(e,r){2&r&&L(n,e[1]),1&r&&i!==(i=g(e[0])+" svelte-104hor5")&&k(t,"class",i)},d(e){e&&_(t)}}}function ke(e){let t,n=e[1]&&Se(e);return{c(){n&&n.c(),t=C()},m(e,i){n&&n.m(e,i),m(e,t,i)},p(e,[i]){e[1]?n?n.p(e,i):((n=Se(e)).c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:i,o:i,d(e){n&&n.d(e),e&&_(t)}}}function xe(e,t,n){let i,{classes:r=""}=t,{errorStore:o}=t;return o.subscribe(e=>{n(1,i=!!e&&e.toString())}),e.$set=e=>{"classes"in e&&n(0,r=e.classes),"errorStore"in e&&n(2,o=e.errorStore)},[r,i,o]}var Le=class extends ee{constructor(e){super(),Q(this,e,xe,ke,l,{classes:0,errorStore:2})}};const Me=e=>{e.languages.register({id:"mermaid"}),e.languages.setMonarchTokensProvider("mermaid",{typeKeywords:["graph","stateDiagram","sequenceDiagram","classDiagram","pie","flowchart","gantt"],keywords:["patricipant","as"],arrows:["---","===","--\x3e","==>"],tokenizer:{root:[[/[{}]/,"delimiter.bracket"],[/[a-z_$][\w$]*/,{cases:{"@typeKeywords":"keyword","@keywords":"keyword"}}],[/[-=>ox]+/,{cases:{"@arrows":"transition"}}],[/[\[\{\(}]+.+?[\)\]\}]+/,"string"],[/\".*\"/,"string"]]},whitespace:[[/[ \t\r\n]+/,"white"],[/\%\%.*$/,"comment"]]}),e.editor.defineTheme("myCoolTheme",{base:"vs",inherit:!1,rules:[{token:"keyword",foreground:"880000",fontStyle:"bold"},{token:"custom-error",foreground:"ff0000",fontStyle:"bold"},{token:"string",foreground:"AA8500"},{token:"transition",foreground:"008800",fontStyle:"bold"},{token:"delimiter.bracket",foreground:"000000",fontStyle:"bold"}]}),e.languages.registerCompletionItemProvider("mermaid",{provideCompletionItems:()=>{return{suggestions:[{label:"simpleText",kind:e.languages.CompletionItemKind.Text,insertText:"simpleText"},{label:"testing",kind:e.languages.CompletionItemKind.Keyword,insertText:"testing(${1:condition})",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"ifelse",kind:e.languages.CompletionItemKind.Snippet,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,documentation:"If-Else Statement"}]}}})},De=e=>t=>e&&e.layout();var Ee=n(237),Te=n(565),Oe=n.n(Te)()({strategy:"scroll"});function Ne(e,t){Oe.listenTo(e,t);var n=t;return{update:function(t){Oe.removeListener(e,n),Oe.listenTo(e,t),n=t},destroy:function(){Oe.removeListener(e,n)}}}n(890);function Ie(e){let t,n,i,r,o;const s=new Le({props:{errorStore:ve}});return{c(){t=v("div"),n=v("div"),r=w(),Z(s.$$.fragment),k(n,"id","editor"),k(n,"class","svelte-129q4vv"),k(t,"id","editor-container")},m(a,l){m(a,t,l),p(t,n),i=Ne.call(null,n,e[0])||{},p(t,r),J(s,t,null),o=!0},p(e,[t]){a(i.update)&&1&t&&i.update.call(null,e[0])},i(e){o||(q(s.$$.fragment,e),o=!0)},o(e){K(s.$$.fragment,e),o=!1},d(e){e&&_(t),i&&a(i.destroy)&&i.destroy(),X(s)}}}function Ae(e,t,n){let i;const r=[];let o=null,s=()=>{};const a=(e,t)=>{try{Ce.a.parse(e),i&&(t&&i.setValue(e),r.forEach(e=>{i.deltaDecorations(e,[])})),_e(e,!1),ve.set(void 0)}catch(e){ve.set("Syntax Error"),console.log("Error in parsed",e.hash);e.hash.line;r.push(i.deltaDecorations([],[{range:new Ee.Range(e.hash.loc.first_line,e.hash.loc.last_line,e.hash.loc.first_column,e.hash.loc.last_column),options:{inlineClassName:"myInlineDecoration"}}]))}};ge.subscribe(e=>{e.updateEditor&&a(e.code,!0)});return N(async()=>{Me(Ee),o=document.getElementById("editor"),i=Ee.editor.create(o,{value:"",theme:"myCoolTheme",language:"mermaid"}),n(0,s=De(i)),i.onDidChangeModelContent((function(e){a(i.getValue(),!1)})),Me(Ee)}),[s]}var Re=class extends ee{constructor(e){super(),Q(this,e,Ae,Ie,l,{})}},Pe=n(86);n(891);function je(e){let t,n,i,r,o;const s=new Le({props:{errorStore:ye}});return{c(){t=v("div"),n=v("div"),r=w(),Z(s.$$.fragment),k(n,"id","editor-conf"),k(n,"class","svelte-e1y9ss"),k(t,"id","editor-container")},m(a,l){m(a,t,l),p(t,n),i=Ne.call(null,n,e[0])||{},p(t,r),J(s,t,null),o=!0},p(e,[t]){a(i.update)&&1&t&&i.update.call(null,e[0])},i(e){o||(q(s.$$.fragment,e),o=!0)},o(e){K(s.$$.fragment,e),o=!1},d(e){e&&_(t),i&&a(i.destroy)&&i.destroy(),X(s)}}}function Fe(e,t,n){let i,r=()=>{};const o=(e,t)=>{console.log(e),t&&i&&i.setValue(JSON.stringify(e,null,2)),be(e,!1),ye.set(void 0)};ge.subscribe(e=>{console.log(e.mermaid,e.updateEditor),e.updateEditor&&o(e.mermaid,!0)});return N(async()=>{console.log("Mounting config");const e=document.getElementById("editor-conf");i=Pe.editor.create(e,{value:"",theme:"myCoolTheme",language:"json"}),n(0,r=De(i)),i.onDidChangeModelContent((function(e){try{const e=JSON.parse(i.getValue());o(e,!1)}catch(e){console.log("Error in parsed",e),ye.set(e)}})),Me(Pe)}),[r]}var Be=class extends ee{constructor(e){super(),Q(this,e,Fe,je,l,{})}};n(892);function We(e){let t,n,r;return{c(){t=v("div"),k(n=v("div"),"id","container"),k(n,"class","svelte-adxv1m"),k(t,"id","view"),k(t,"class",r=e[1]+" "+e[0]+" svelte-adxv1m")},m(i,r){m(i,t,r),p(t,n),e[8](n)},p(e,[n]){3&n&&r!==(r=e[1]+" "+e[0]+" svelte-adxv1m")&&k(t,"class",r)},i:i,o:i,d(n){n&&_(t),e[8](null)}}}function He(e,t,n){const i=e=>(e=e.replace(/^\s*%%.*\n/g,"\n"),console.debug("Detecting diagram type based on the text "+e),e.match(/^\s*sequenceDiagram/)?"sequence":e.match(/^\s*gantt/)?"gantt":e.match(/^\s*classDiagram/)?"class":e.match(/^\s*stateDiagram/)?"state":e.match(/^\s*gitGraph/)?"git":e.match(/^\s*flowchart/)?"flowchart":e.match(/^\s*info/)?"info":e.match(/^\s*pie/)?"pie":"flowchart");let r;const o=e=>{clearTimeout(r),r=setTimeout((function(){console.log("ga:","send","event","render",e,e),ga("send","event",e,"render","render")}),5e3)};let s,{code:a=""}=t,{configClasses:l=""}=t,{codeClasses:c=""}=t;N(async()=>{ge.subscribe(e=>{try{s&&e&&(n(3,a=e.code.replace(//g,">")),n(2,s.innerHTML=a,s),o(i(a)),delete s.dataset.processed,Ce.a.initialize(Object.assign({},e.mermaid)),Ce.a.init(void 0,s),a&&Ce.a.render("graph-div",a,d))}catch(e){console.log("view fail",e)}}),ve.subscribe(e=>{void 0===e?n(1,c=""):(n(1,c="error"),console.log("code error: ",e))}),ye.subscribe(e=>{void 0===e?n(0,l=""):(n(0,l="error"),console.log("conf error: ",e))})});let d=function(e,t){};return e.$set=e=>{"code"in e&&n(3,a=e.code),"configClasses"in e&&n(0,l=e.configClasses),"codeClasses"in e&&n(1,c=e.codeClasses)},[l,c,s,a,r,i,o,d,function(e){A[e?"unshift":"push"](()=>{n(2,s=e)})}]}var Ye=class extends ee{constructor(e){super(),Q(this,e,He,We,l,{code:3,configClasses:0,codeClasses:1})}};n(893);function Ve(e){let t,n,i,r,o,s,a;const l=e[4].default,c=u(l,e,e[3],null);return{c(){t=v("div"),n=v("div"),i=y(e[0]),r=w(),o=v("div"),c&&c.c(),k(n,"id","title"),k(n,"class","padding svelte-m2i2uf"),k(o,"id","content"),k(o,"class",s=g(e[1])+" svelte-m2i2uf"),k(t,"id","card"),k(t,"class","svelte-m2i2uf")},m(e,s){m(e,t,s),p(t,n),p(n,i),p(t,r),p(t,o),c&&c.m(o,null),a=!0},p(e,[t]){(!a||1&t)&&L(i,e[0]),c&&c.p&&8&t&&c.p(h(l,e,e[3],null),f(l,e[3],t,null)),(!a||2&t&&s!==(s=g(e[1])+" svelte-m2i2uf"))&&k(o,"class",s)},i(e){a||(q(c,e),a=!0)},o(e){K(c,e),a=!1},d(e){e&&_(t),c&&c.d(e)}}}function ze(e,t,n){let{title:i=""}=t,{noPadding:r=!1}=t,o="padding";r&&n(1,o="");let{$$slots:s={},$$scope:a}=t;return e.$set=e=>{"title"in e&&n(0,i=e.title),"noPadding"in e&&n(2,r=e.noPadding),"$$scope"in e&&n(3,a=e.$$scope)},[i,o,r,a,s]}var Ue=class extends ee{constructor(e){super(),Q(this,e,ze,Ve,l,{title:0,noPadding:2})}};n(894);function $e(e){let t,n;const i=e[1].default,r=u(i,e,e[0],null);return{c(){t=v("div"),r&&r.c(),k(t,"id","tag"),k(t,"class","svelte-1nm8e4l")},m(e,i){m(e,t,i),r&&r.m(t,null),n=!0},p(e,[t]){r&&r.p&&1&t&&r.p(h(i,e,e[0],null),f(i,e[0],t,null))},i(e){n||(q(r,e),n=!0)},o(e){K(r,e),n=!1},d(e){e&&_(t),r&&r.d(e)}}}function qe(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$set=e=>{"$$scope"in e&&n(0,r=e.$$scope)},[r,i]}var Ke=class extends ee{constructor(e){super(),Q(this,e,qe,$e,l,{})}},Ge=n(21),Ze=n.n(Ge);n(896);function Je(e){let t,n,r,o,a,l,c,d,u,h,f,g,b,C,x,L,D,E,T,O,N,I,A,R,P,j,F,B,W,H,Y,V,z,U,$,q,K,G,Z,J,X,Q,ee,te,ne,ie,re,oe,se,ae,le,ce,de,ue,he,fe=e[7](),ge=!1,pe=!1,me=fe&&function(e){let t,n,i,r;return{c(){t=v("button"),n=v("a"),i=y("Copy Image"),k(n,"class","link-style svelte-187ys3m"),k(n,"href",e[0]),k(n,"download",""),k(t,"class","button-style svelte-187ys3m"),r=S(n,"click",e[8])},m(e,r){m(e,t,r),p(t,n),p(n,i)},p(e,t){1&t&&k(n,"href",e[0])},d(e){e&&_(t),r()}}}(e);function _e(){ge=!0,e[21].call(te)}function be(){pe=!0,e[23].call(ce)}return{c(){t=v("div"),me&&me.c(),n=w(),r=v("button"),o=v("a"),a=y("Download PNG"),l=w(),c=v("button"),d=v("a"),u=y("Link to view"),h=w(),f=v("button"),g=v("a"),b=y("Download SVG"),C=w(),x=v("button"),L=v("a"),D=y("Link to Image"),E=w(),T=v("button"),O=v("a"),N=y("Link to SVG"),I=y("\n (markdown is base64 encoded for these urls)"),A=w(),R=v("div"),(P=v("label")).textContent="Copy Markdown",j=w(),F=v("br"),B=w(),W=v("input"),H=w(),Y=v("p"),(V=v("label")).textContent="PNG size:",z=v("br"),U=w(),$=v("input"),q=w(),(K=v("label")).textContent="auto",G=v("br"),Z=w(),J=v("input"),X=w(),(Q=v("label")).textContent="width",ee=w(),te=v("input"),ie=v("br"),re=w(),oe=v("input"),se=w(),(ae=v("label")).textContent="height",le=w(),ce=v("input"),ue=v("br"),k(o,"class","link-style svelte-187ys3m"),k(o,"href",e[0]),k(o,"download",""),k(r,"class","button-style svelte-187ys3m"),k(d,"class","link-style svelte-187ys3m"),k(d,"href",e[0]),k(c,"class","button-style svelte-187ys3m"),k(g,"class","link-style svelte-187ys3m"),k(g,"href",e[0]),k(g,"download",""),k(f,"class","button-style svelte-187ys3m"),k(L,"class","link-style svelte-187ys3m"),k(L,"href",e[1]),k(x,"class","button-style svelte-187ys3m"),k(O,"class","link-style svelte-187ys3m"),k(O,"href",e[2]),k(T,"class","button-style svelte-187ys3m"),k(t,"id","links"),k(t,"class","svelte-187ys3m"),k(P,"for","markdown"),k(P,"class","button-style svelte-187ys3m"),k(W,"id","markdown"),k(W,"type","text"),W.value=e[3],k(W,"class","svelte-187ys3m"),k(R,"id","copy-section"),k(R,"class","svelte-187ys3m"),k($,"type","radio"),$.__value="auto",$.value=$.__value,k($,"id","autosize"),e[19][0].push($),k(K,"for","autosize"),k(J,"type","radio"),J.__value="width",J.value=J.__value,k(J,"id","width-active"),e[19][0].push(J),k(Q,"for","width"),k(te,"id","width"),k(te,"type","number"),k(te,"min","3"),k(te,"max","10000"),te.disabled=ne="width"!==e[4],k(oe,"type","radio"),oe.__value="height",oe.value=oe.__value,k(oe,"id","height-active"),e[19][0].push(oe),k(ae,"for","height"),k(ce,"id","height"),k(ce,"type","number"),k(ce,"min","3"),k(ce,"max","10000"),ce.disabled=de="height"!==e[4],he=[S(o,"click",e[9]),S(g,"click",e[10]),S(W,"click",e[11]),S($,"change",e[18]),S(J,"change",e[20]),S(te,"input",_e),S(oe,"change",e[22]),S(ce,"input",be)]},m(i,s){m(i,t,s),me&&me.m(t,null),p(t,n),p(t,r),p(r,o),p(o,a),p(t,l),p(t,c),p(c,d),p(d,u),p(t,h),p(t,f),p(f,g),p(g,b),p(t,C),p(t,x),p(x,L),p(L,D),p(t,E),p(t,T),p(T,O),p(O,N),p(t,I),m(i,A,s),m(i,R,s),p(R,P),p(R,j),p(R,F),p(R,B),p(R,W),m(i,H,s),m(i,Y,s),p(Y,V),p(Y,z),p(Y,U),p(Y,$),$.checked=$.__value===e[4],p(Y,q),p(Y,K),p(Y,G),p(Y,Z),p(Y,J),J.checked=J.__value===e[4],p(Y,X),p(Y,Q),p(Y,ee),p(Y,te),M(te,e[5]),p(Y,ie),p(Y,re),p(Y,oe),oe.checked=oe.__value===e[4],p(Y,se),p(Y,ae),p(Y,le),p(Y,ce),M(ce,e[6]),p(Y,ue)},p(e,[t]){fe&&me.p(e,t),1&t&&k(o,"href",e[0]),1&t&&k(d,"href",e[0]),1&t&&k(g,"href",e[0]),2&t&&k(L,"href",e[1]),4&t&&k(O,"href",e[2]),8&t&&(W.value=e[3]),16&t&&($.checked=$.__value===e[4]),16&t&&(J.checked=J.__value===e[4]),16&t&&ne!==(ne="width"!==e[4])&&(te.disabled=ne),!ge&&32&t&&M(te,e[5]),ge=!1,16&t&&(oe.checked=oe.__value===e[4]),16&t&&de!==(de="height"!==e[4])&&(ce.disabled=de),!pe&&64&t&&M(ce,e[6]),pe=!1},i:i,o:i,d(n){n&&_(t),me&&me.d(),n&&_(A),n&&_(R),n&&_(H),n&&_(Y),e[19][0].splice(e[19][0].indexOf($),1),e[19][0].splice(e[19][0].indexOf(J),1),e[19][0].splice(e[19][0].indexOf(oe),1),s(he)}}}function Xe(e,t,n){const i=()=>{const e=document.getElementById("container").innerHTML.replaceAll("
    ","
    ");return he.Base64.encode(e)},r=(e,t)=>{const n=document.createElement("canvas"),r=document.querySelector("#container svg").getBoundingClientRect();if(n.width=r.width,n.height=r.height,"width"===h){const e=r.height/r.width;n.width=f,n.height=f*e}else if("height"===h){const e=r.width/r.height;n.width=g*e,n.height=g}const o=n.getContext("2d");o.fillStyle="white",o.fillRect(0,0,n.width,n.height);const s=new Image;s.onload=t(n,o,s),console.log("SVG",i()),s.src=`data:image/svg+xml;base64,${i()}`,e.stopPropagation(),e.preventDefault()},o=(e,t,n)=>()=>{t.drawImage(n,0,0,e.width,e.height);const i=document.createElement("a");i.download=`mermaid-diagram-${Ze()().format("YYYYMMDDHHmmss")}.png`,i.href=e.toDataURL("image/png").replace("image/png","image/octet-stream"),i.click()},s=(e,t,n)=>()=>{t.drawImage(n,0,0,e.width,e.height),e.toBlob(e=>{try{navigator.clipboard.write([new ClipboardItem({[e.type]:e})])}catch(e){console.error(e)}})};let a,l,c,d,u,h="auto",f=1920,g=1080;const p=ge.subscribe(e=>{l=he.Base64.encodeURI(JSON.stringify(e)),n(0,a=`${window.location.pathname.split("#")[0]}#/view/${l}`),n(1,c=`https://mermaid.ink/img/${l}`),n(2,d=`https://mermaid.ink/svg/${l}`),n(3,u=`[![](${c})](${window.location.protocol}//${window.location.host}${window.location.pathname}#/edit/${l})`)});return[a,c,d,u,h,f,g,()=>window.hasOwnProperty("ClipboardItem"),e=>{r(e,s)},e=>{r(e,o)},e=>{console.log("event",e.target),e.target.href=`data:image/svg+xml;base64,${i()}`,e.target.download=`mermaid-diagram-${Ze()().format("YYYYMMDDHHmmss")}.svg`,console.log("event",e)},e=>{e.target.select(),document.execCommand("Copy")},l,i,r,o,s,p,function(){h=this.__value,n(4,h)},[[]],function(){h=this.__value,n(4,h)},function(){f=x(this.value),n(5,f)},function(){h=this.__value,n(4,h)},function(){g=x(this.value),n(6,g)}]}var Qe=class extends ee{constructor(e){super(),Q(this,e,Xe,Je,l,{})}},et=n(566);n(897);function tt(e,t,n){const i=e.slice();return i[7]=t[n],i[9]=n,i}function nt(e,t,n){const i=e.slice();return i[10]=t[n],i[9]=n,i}function it(e){let t,n,i,r,o=e[10]+"";function s(...t){return e[5](e[10],...t)}return{c(){t=v("button"),n=y(o),i=w(),k(t,"class","button-style svelte-mx8k4g"),r=S(t,"click",s)},m(e,r){m(e,t,r),p(t,n),p(t,i)},p(t,n){e=t},d(e){e&&_(t),r()}}}function rt(e){let t;const n=new Re({props:{data:e[1].data}});return{c(){Z(n.$$.fragment)},m(e,i){J(n,e,i),t=!0},p(e,t){const i={};2&t&&(i.data=e[1].data),n.$set(i)},i(e){t||(q(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){X(n,e)}}}function ot(e){let t;const n=new Be({});return{c(){Z(n.$$.fragment)},m(e,i){J(n,e,i),t=!0},i(e){t||(q(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){X(n,e)}}}function st(e){let t;const n=new Ye({});return{c(){Z(n.$$.fragment)},m(e,i){J(n,e,i),t=!0},i(e){t||(q(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){X(n,e)}}}function at(e){let t;return{c(){t=y("No records.")},m(e,n){m(e,t,n)},p:i,d(e){e&&_(t)}}}function lt(e){let t,n=e[2],i=[];for(let t=0;t0?lt:at}let a=s(e),l=a(e);return{c(){(t=v("span")).textContent="Automatically saves once every\n minute, up to 10 records.",n=w(),i=v("br"),r=w(),o=v("div"),l.c(),k(t,"id","historyLoaderSubTitle"),k(t,"class","svelte-mx8k4g"),k(o,"id","historyList"),k(o,"class","button-container svelte-mx8k4g")},m(e,s){m(e,t,s),m(e,n,s),m(e,i,s),m(e,r,s),m(e,o,s),l.m(o,null)},p(e,t){a===(a=s(e))&&l?l.p(e,t):(l.d(1),(l=a(e))&&(l.c(),l.m(o,null)))},d(e){e&&_(t),e&&_(n),e&&_(i),e&&_(r),e&&_(o),l.d()}}}function ut(e){let t;return{c(){(t=v("div")).innerHTML=' \n \n \n ',k(t,"class","button-container svelte-mx8k4g")},m(e,n){m(e,t,n)},d(e){e&&_(t)}}}function ht(e){let t;const n=new Qe({});return{c(){Z(n.$$.fragment)},m(e,i){J(n,e,i),t=!0},i(e){t||(q(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){X(n,e)}}}function ft(e){let t;return{c(){t=y(e[0])},m(e,n){m(e,t,n)},p(e,n){1&n&&L(t,e[0])},d(e){e&&_(t)}}}function gt(e){let t,n,i,r,o,s,a,l,c,d,u,h,f,g,C,S,x,L,M,D,E,T,O,N=Object.keys(e[3]),I=[];for(let t=0;tMermaid Live Editor',i=w(),r=v("div"),o=v("div"),(s=v("span")).innerHTML="Diagram presets:",a=w();for(let e=0;e{ga("send","pageview"),ga("send","event","version",i,i);n(2,r=JSON.parse(localStorage.getItem("_mermaid_history_")||"[]"));let e=r.length>0?r[r.length-1]:null;o.data?pe(o.data):e?me({code:e.code,mermaid:{},updateEditor:!0}):a("Flow Chart");let t=null;ge.subscribe(e=>{t=e&&e.code||t}),setInterval(()=>{t!=e&&(r.unshift({time:(new Date).toISOString(),code:e=t}),r.length>10&&r.pop(),localStorage.setItem("_mermaid_history_",JSON.stringify(r))),n(2,r)},6e4)});let{params:o={}}=t;const s={"Flow Chart":"graph TD\n A[Christmas] --\x3e|Get money| B(Go shopping)\n B --\x3e C{Let me think}\n C --\x3e|One| D[Laptop]\n C --\x3e|Two| E[iPhone]\n C --\x3e|Three| F[fa:fa-car Car]","Sequence Diagram":"sequenceDiagram\n Alice->>+John: Hello John, how are you?\n Alice->>+John: John, can you hear me?\n John--\x3e>-Alice: Hi Alice, I can hear you!\n John--\x3e>-Alice: I feel great!\n ","Class Diagram":"classDiagram\n Animal <|-- Duck\n Animal <|-- Fish\n Animal <|-- Zebra\n Animal : +int age\n Animal : +String gender\n Animal: +isMammal()\n Animal: +mate()\n class Duck{\n +String beakColor\n +swim()\n +quack()\n }\n class Fish{\n -int sizeInFeet\n -canEat()\n }\n class Zebra{\n +bool is_wild\n +run()\n }\n ","State Diagram":"stateDiagram-v2\n [*] --\x3e Still\n Still --\x3e [*]\n Still --\x3e Moving\n Moving --\x3e Still\n Moving --\x3e Crash\n Crash --\x3e [*]\n ","Gantt Chart":"gantt\n title A Gantt Diagram\n dateFormat YYYY-MM-DD\n section Section\n A task :a1, 2014-01-01, 30d\n Another task :after a1 , 20d\n section Another\n Task in sec :2014-01-12 , 12d\n another task : 24d\n ","Pie Chart":'pie title Pets adopted by volunteers\n "Dogs" : 386\n "Cats" : 85\n "Rats" : 15\n ',"ER Diagram":'erDiagram\n CUSTOMER }|..|{ DELIVERY-ADDRESS : has\n CUSTOMER ||--o{ ORDER : places\n CUSTOMER ||--o{ INVOICE : "liable for"\n DELIVERY-ADDRESS ||--o{ ORDER : receives\n INVOICE ||--|{ ORDER : covers\n ORDER ||--|{ ORDER-ITEM : includes\n PRODUCT-CATEGORY ||--|{ PRODUCT : contains\n PRODUCT ||--o{ ORDER-ITEM : "ordered in"\n '};function a(e){pt(s[e])}return e.$set=e=>{"mermaidVersion"in e&&n(0,i=e.mermaidVersion),"params"in e&&n(1,o=e.params)},[i,o,r,s,a,(e,t)=>a(e),(e,t)=>pt(e.code)]}var bt=class extends ee{constructor(e){super(),Q(this,e,_t,gt,l,{mermaidVersion:0,params:1})}};n(898);function vt(e){let t,n;const r=new Ye({});return{c(){t=v("div"),Z(r.$$.fragment),k(t,"id","view-page"),k(t,"class","svelte-clxwlp")},m(e,i){m(e,t,i),J(r,t,null),n=!0},p:i,i(e){n||(q(r.$$.fragment,e),n=!0)},o(e){K(r.$$.fragment,e),n=!1},d(e){e&&_(t),X(r)}}}function yt(e){return N(async()=>{ga("send","pageview")}),[]}var wt=class extends ee{constructor(e){super(),Q(this,e,yt,vt,l,{})}};function Ct(e){let t,n,r;const o=new ue({props:{routes:e[0]}});return{c(){t=v("link"),n=w(),Z(o.$$.fragment),k(t,"href","https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"),k(t,"rel","stylesheet")},m(e,i){p(document.head,t),m(e,n,i),J(o,e,i),r=!0},p:i,i(e){r||(q(o.$$.fragment,e),r=!0)},o(e){K(o.$$.fragment,e),r=!1},d(e){_(t),e&&_(n),X(o,e)}}}function St(e){return[{"/":bt,"/edit/:data":bt,"/view/:data":wt,"*":bt}]}const kt=new class extends ee{constructor(e){super(),Q(this,e,St,Ct,l,{})}}({target:document.body,props:{}});window.app=kt;t.default=kt},function(e,t,n){"use strict";n(90),n(182),n(341),n(340),n(276),n(277),n(332),n(289),n(278),n(279),n(327),n(222),n(330),n(280),n(281),n(333),n(183),n(324),n(282),n(328);var i=n(24),r=n(3),o=n(54),s=n(26),a=n(110),l=n(209),c=n(28),d=n(20),u=n(38),h=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};function f(e,t,n){return h(this,void 0,void 0,(function*(){const i=yield l.b.create(e,n),r=[];for(const e of i.children.values())e instanceof l.a?r.push(e.symbol):r.push(...u.a.map(e.children.values(),e=>e.symbol));let o=[];return n.isCancellationRequested?o:(t?function e(t,n,i){for(let r of n)t.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||i,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&e(t,r.children,r.name)}(o,r,""):o=r,o.sort(g))}))}function g(e,t){return r.a.compareRangesUsingStarts(e.range,t.range)}c.a.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return h(this,void 0,void 0,(function*(){const[n]=t;Object(d.b)(i.a.isUri(n));const r=e.get(o.a).getModel(n);if(r)return f(r,!1,s.a.None);const l=yield e.get(a.a).createModelReference(n);try{return yield f(l.object.textEditorModel,!1,s.a.None)}finally{l.dispose()}}))}));n(225),n(223),n(200),n(323),n(284),n(335),n(325),n(336),n(286),n(329),n(287),n(338),n(339),n(150),n(322);var p=n(0),m=n(4),_=n(167);class b extends m.b{constructor(){super({id:"editor.action.forceRetokenize",label:p.a("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.resetTokenization();const i=new _.a(!0);n.forceTokenization(n.getLineCount()),i.stop(),console.log(`tokenization took ${i.elapsed()}`)}}Object(m.k)(b);n(196),n(290),n(291),n(292),n(170),n(293),n(44),n(162)},function(e,t,n){"use strict";n(86);var i,r,o,s,a,l=n(197);!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative"}(r||(r={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(o||(o={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(s||(s={})),function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(a||(a={}));var c=function(){function e(e,t,n){this._onDidChange=new l.Emitter,this._onDidExtraLibsChange=new l.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),e.prototype.getExtraLibs=function(){return this._extraLibs},e.prototype.addExtraLib=function(e,t){var n,i=this;if(n=void 0===t?"ts:extralib-"+Math.random().toString(36).substring(2,15):t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var r=1;return this._removedExtraLibs[n]&&(r=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(r=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var e=i._extraLibs[n];e&&e.version===r&&(delete i._extraLibs[n],i._removedExtraLibs[n]=r,i._fireOnDidExtraLibsChangeSoon())}}},e.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var n=0,i=e;n